Part 1: Use of the NXT Ultrasonic Sensor to Measure the Distance Between the Sensor and the Target
The first step involved making a connection of an ultrasonic sensor at the bottom of NXT brick to Port 4 after which the brick was connected to the PC using the USB cable. The availability of RWTH Mind storms NXT toolbox on the MATLAB path was checked. At the speed of every 50ms for 10 seconds, the distance between the sensor and the target was measured and recorded with the help of the RWTH NXT MATLAB program which was written (Chang, 18). This led to a pop-up window which was labeled Figure 1 after the distance measured was plotted as a function of time. Just before the 1 KHz tone at 100ms duration started to play by the measurement, there was the writing of one-line command within the program. Before the continuation, consideration was given to the usage of the pause command which provided 0.5 seconds pause. After the measurement sequence had ended playing a 200 Hz tone at 500ms duration, again, a one-line command was written within the program. It also allowed the plotting of the distance as a function of time. The running of the program was fronted by first placing a piece of cardboard in front of the ultrasonic sensor, approximately a distance of 30 cm (Chang, 20).
Part 2: Measuring Angular Displacement of NXT Servo Motors
In this section, there was the connection of the servomotors to Port B and Port C respectively on the right and the right wheel at the NXT brick top part. Then the brick and the PC were connected using the USB cable. The angular displacements were measured and recorded every 50ms for 10 seconds in degrees of the two servomotors respectively with the aid of the RWTH NXT MATLAB program which was written. They were then plotted on Figure 2 as functions of time. Similarly to the first part, there was the writing of one-line command followed by the running of the program following the similar procedure as that applied in previous part two.
Part 3: Open-Loop Angular Velocity Control
Also in this section, a connection of the servomotors was used. This was followed by the writing of an RWTH NXT MATLAB program that was vital in measuring the angular displacement of the degR and right wheel. This as well enabled controlling the left servomotor a process that allowed the left wheel angular velocity became proportional to degR. There was the writing of one-line command followed by the running of the program following the similar procedure as that applied in previous parts.
Part 4: Open-Loop Step Responses
This step started by applying the original connection of the servomotors. To have the two servomotors simultaneously driven as well as measure and record their respective angular displacement, a magnitude 50 step input was generated after the writing of RWTH NXT MATLAB program. Any measurements and control were updated faster for a second to achieve data resolution at its possible best. This led to the plotting of the angular displacements of the two wheels against time on figure 5. The writing of one-line command within the program and its subsequent running of the program allowed various plots which all appeared in the report.
Part 5: Closed-Loop Position Following
The section used the same servomotor connection. Further, there was the synchronization of the angular displacements of both the right and the left wheels after the implementation of the control system of a closed-loop position following the writing of the RWTH NXT MATLAB program. At Port B's servomotor, there is an optical encoder that detects the angular displacement by acting as a sensor. The detected angular displacement is then used by the closed-loop system as reference input in controlling Port C servomotor. This allows the angular displacement at Port C to follow the reference input of that of Port B closely. The angular displacements in degrees for the two servomotors are plotted as a function of time in figure 7 after the execution of the main program. Similar to the preceding parts, there was the writing of one-line command and subsequent running of the program. Depending on the obtained vehicle dynamics model and the employed controller, a Simulink program was built for the closed-loop position.
Part 6: Closed-Loop Ultrasonic Tracking
This involved the similar setup of the servomotor as those in the preceding procedures. At the NXT brick bottom part, Port 4 and Port 1 are connected with the ultrasonic and touch sensors respectively. There needs for the pre-set safety distance in front of the vehicle is kept by controlling the NXT vehicle motion. This requires the implementation of the closed-loop ultrasonic control system. This involved the plotting of the two wheels' translational displacement, the ultrasonic sensor, and the obstacle distance as well as the servomotor control input. The program loop was vital in the measurement update and the action control. Similar to the preceding parts, there was the writing of one-line command and subsequent running of the program. Simulink program was built for the closed-loop ultrasonic distance.
Work cited
Chang B.C, Hartman David: MEM 351- Lab II Closed Loop Ultrasonic Tracking Control of a LEGO Mindstorms NXT Vehicle using RWTH NXT MATLAB. Drexel University, January 2017.
Cite this page
Paper Example on RWTH NXT MATLAB Program. (2022, Jul 08). Retrieved from https://proessays.net/essays/paper-example-on-rwth-nxt-matlab-program
If you are the original author of this essay and no longer wish to have it published on the ProEssays website, please click below to request its removal:
- Research Paper on Fracking
- Technologies and Innovations in Supply Chain Management Paper Example
- Essay Sample on Screen Brightness of Cellular Devices and Radiation
- Increase the Efficiency of Generating Power from Solar Sphere Design - Essay Sample
- Sex Robots: The Future of Sex Work and Sexual Engagement - Essay Sample
- Driverless Automobiles: A History of Innovation - Essay Sample
- Essay Sample on Netflix: The Birth of an Idea from an Embarrassing VHS Mishap