Experimental Study Summary
In this lab, Team A coded a scenario for the AEV to perform and record the AEV’s power (in Watts) – distance (in meters) relationship (seen below), and the AEV’s power – time (in seconds) relationship (seen below).
Code
Code | Comments |
---|---|
celerate(4,0,25,3); | //Step 1 (Start) |
motorSpeed(4,25); | //Step 2 |
goFor(1); | |
motorSpeed(4,20); | //Step 3 |
goFor(2); | |
reverse(4); | //Step 4 |
motorSpeed(4,25); | //Step 5 |
goFor(2); | |
brake(4); | //Step 6 (End) |
Arduino code for data analysis scenario
Results & Analysis
Looking at the power-distance graph, it starts with a steep increase in power, with little distance traveled, coinciding with the start of the code (seen below). This was due to the motors “warming up” and generating the desired power to move the vehicle. Next, the power stays constant for a displayed distance, due to the code directing the same amount of power to be used for this interval in step 2. The following then shows a sharp dip in the line, correlating with power change coded for this interval in step 3/4. Sometime in step 5, the graph shows a sharp increase/decrease in power, followed by a leveling out. Finally, the graph drops off to a zero-power reading in the interval of step 6, where the AEV came to a halt. In the power-time graph, each of the time intervals show a change in power that relates with the previously analysis of the power-distance graph. In step 1, the code describes an increase from zero to the desired power output, which can be seen on the graph below. Similar to the display of step 2 in the power-distance graph, the line shows a constant output of power for the code’s desired duration. For step 3/4, the line dips to the desired power output of the AEV, and continues on for the given interval of time. For step 5, the graph’s line shows a sharp increase/decrease, akin to the power-distance graph, which follows a leveling out. Finally, the line shows a sharp drop in power, which is shown in the final line in the code (step 6).