For the final part of vehicle optimization the main focus is to reduce the amount of energy used to complete the task. This was done by making small changes to the code and finalizing all the details of the AEV itself. One such difference can be found in the speed the AEV travels from the code optimization to this experiment going from 38% power to 40%. Other small changes include the distances in marks traveled before coasting and activating the servo brake. All of these small changes can make a big impact in energy, time, and success of the AEV and every aspect of the AEV needed to be tested before the final set of runs.
The actual testing for this experiment consisted of three runs doing the same task and looking at the results gathered. The AEV needed to move across the track and connect to the caboose and bring it back through the gate to the starting dock to complete the test. Each test had the accuracy, energy consumption, and time recorded. In the end, the second run ended up being the best of all the runs finishing with perfect accuracy meaning the AEV didn’t require any assistance throughout the run, and only using 126 Joules of energy in 59 seconds. The goal for the AEV was to be able to complete this final test within a predetermined budget of $600,000, and with the vehicle costing over $200,000. The final cost for the experiment was just under that budget by $20,000, which may seem like a lot but for each joule used it is $500 and for every second spent doing the test it was $1500. For the AEV to pass even the small details needed attention and that is one reason team A has been able to successfully work with the AEV. For a better understanding of the test ran and how it was completed, this power vs. distance graph was broken down with the code found at the bottom of the page.
Final test run
The graph shows what the AEV was doing during the whole run. The initial spike in energy is from the motors using energy but not turning until they get to a certain power. This is followed by a near flat line until it reaches 3 meters. This is from the vehicle moving a constant speed leading up to the gate. Then from 3 to 4 meters the power to the motors is turned off and the AEV coasts to the gate and stops with the servo. The spike at 4 meters is from the servo being used, and the time the vehicle waits for the gate to open isn’t displayed on the graph because it is not using energy and not moving. After the gate opens the flat portion of the graph from 4 to 5 meters is the AEV moving through the gate and picking up speed and momentum. Then at the 5 meter mark the AEV coasts the rest of the way to the caboose and connects. The spike of energy right after 8 meters is from the AEV picking up speed with the caboose attached. Afterwards, the same flat area is where it is traveling at a constant speed then coasting to the gate at 11 meters. Once the AEV waits and the gate opens it moves through causing the spike in energy and keeping a constant speed towards the beginning of the track. At 14 and 16 meters the small spikes are from the servo slowing down the AEV and preventing it from crashing into the starting dock.
Code used:
Refer here for information on command functions.
Code |
Explanation |
motorSpeed(1,40);
goToAbsolutePosition(252); brake(1); goToAbsolutePosition(321); |
Run motor one at 40% power until mark 252 is reached, and then let the AEV coast to mark 321. |
rotateServo(25);
goFor(1); rotateServo(0); |
At mark 321 stop the vehicle by braking with the servo. |
goFor(6);
motorSpeed(1,41); |
Wait at the gate for six sceonds before running motor one at 41% power. |
goToAbsolutePosition(392);
brake(1); goFor(12); |
Once the AEV reaches mark 392 stop all power to the motor and let the AEV coast to the cargo, and once attached wait 12 seconds for the necessary time. |
motorSpeed(2,52.5);
goToAbsolutePosition(448); brake(2); goToAbsolutePosition(364); |
Run motor two at 52% power until mark 448 was reached, then let the AEV coast to mark 364. |
rotateServo(25);
goFor(2); rotateServo(0); |
Stop the AEV by braking with the servo. |
goFor(5);
motorSpeed(2,53); |
Wait five seconds at the gate before running motor two at 53% power. |
goToAbsolutePosition(268);
brake(2); goToAbsolutePosition(236); |
At mark 268 let the AEV coast until mark 236 is reached. |
rotateServo(25);
goFor(2); rotateServo(0); |
Once mark 236 is reached the AEV is stopped by braking with the AEV. |
goFor(2);
rotateServo(0); goToAbsolutePosition(8); |
Let the AEV settle for two seconds until mark 8 is reached. |