After the second Performance Test was tested and conducted with the two codes and the code type was chosen (for more information, visit Performance Test 2), the code and preparations for the final Performance Test were underway. For the final test, it continues what had ended with the second Performance Test. The AEV now has to travel back to the starting position with the connected load.
To account for lack of precision in Performance Test 2, changes to the code were addressed. Rather than the past two Performance Tests where the brake would be continuous to allow the vehicle to make a complete stop at the gate, the servo in this case was programmed to brake for an instant before reaching the range of the desired stopping distance, the AEV coasts with less speed until it reaches the specified distance, then fully applies the brake to stop it with higher accuracy. To account for the increased mass going back, the motors have a greater power output, however the power provided to the motors is minimized to compensate for cost and energy consumption.
Figure 1: Final Performance Test Run 1 Data
Figure 2: Final Performance Test Run 2 Data
Figure 3: Final Performance Test Run 3 Data
After the three runs were conducted during this test, the average energy consumption for the runs was determined to be 141.31 J, and the average time taken to complete the full run was 56 seconds. Although the effort was made to account for the precision error, there was still lack of precision that could still be accounted for in various ways. One example of preventing such error would be to brake the vehicle entirely, then coast it forward by setting the AEV to run on little power until reaching the desired destination/distance. This would prevent recoil with the caboose and allow the AEV to stop accurately between the sensors by the gate. Below is a video demonstration of the AEV performing one of the tests in the final Performance Test.
Program used for the Final Performance Test. The AEV goes to the gate, pauses, continues through the gate, and connects with the caboose. The vehicle then continues back the way it came, approaches the gate, pauses, then brings the load back to the starting zone.
reverse(4); | // reverse motors becuase of backward configuration |
rotateServo(20); | // deactivate brake |
motorSpeed(4,50);
goFor(2); |
// Start the motors and run them until we are close to the gate |
motorSpeed(4,35);
goFor(1); motorSpeed(4,20); goFor(1); brake(4); goToAbsolutePosition(285); rotateServo(0); goFor(0.4); rotateServo(20); |
// slow down as we approach the gate |
goToAbsolutePosition(324); | // coast, then stop at the gate: |
rotateServo(0); | // rotate servo for brake |
goFor(8); | // Wait for gate to open |
rotateServo(20); | // unapply brake |
motorSpeed(4,45);
goFor(1.6); brake(4); |
// Start the motors and get close to the caboose |
goToAbsolutePosition(650); | // coast, then stop at the caboose to connect |
rotateServo(0);
goFor(0.22); rotateServo(20); |
// rotate servo for brake |
goFor(7.4); | // “AEV pauses for 5 seconds” |
reverse(4); | //START TO GO BACK:
// reverse motors |
motorSpeed(4,55); | // get close to the gate |
goToRelativePosition(-1); | // get out of the divit: |
goFor(2);
motorSpeed(4,40); goFor(1); motorSpeed(4,35); |
// approach gate: |
goToAbsolutePosition(456);
brake(4); goToAbsolutePosition(395); rotateServo(0); goFor(0.1); rotateServo(20); |
//power all the way through the hill: |
goToAbsolutePosition(364); | // coast to the gate and stop |
rotateServo(0); | // rotate servo for brake |
goFor(8); | // Wait for gate to open |
rotateServo(20); | // unapply brake |
motorSpeed(4,50);
goFor(2); brake(4); |
// Start the motors and get close to the final position |
goToAbsolutePosition(60); | // coast, then stop at the final position |
rotateServo(0);
goFor(0.5); rotateServo(20); |
// rotate servo for brake for 0.5 seconds |
goToAbsolutePosition(10);
rotateServo(0); |
//get a little closer and stop again |