Performance Test 2

The first half of the second performance test involved the AEV travelling the same course as performance test one. For this test however, the AEV had to travel down a slope after exiting the gate and connect to a caboose at the bottom of the slope in the loading zone. After stopping in the loading zone while connected to the caboose for five seconds, the AEV and the caboose had to travel out of the zone while connected. This task had to be completed with two different sets of code so that some conclusions could be made on how to use a more efficient code for the final performance test. Our approach to completing the task was to have the AEV exit the gate with a low motor speed in order to allow it to coast down the slope. The idea was that gravity would bring the AEV down the hill with enough momentum to connect to the caboose. After choosing an arbitrary number for motor speed to test this, the AEV successfully connected to the caboose on the first attempt. After waiting for five seconds, the AEV’s motors were reversed at a high percent power due to the added weight of the caboose. The first half of the first code was highly based off of the code used in performance test one. The second code decreased the power that the AEV used to approach the first gate. Both code are shown below.

 

Code with Higher Power

motorSpeed(4,37);                  //run both motors at 37% power

goToAbsolutePosition(191);  //continue until AEV reaches 191 marks

brake(4);                                   //stop both motors

goToAbsolutePosition(211);  //coast until AEV reaches 211 marks

reverse(4);                                //reverse both motors

motorSpeed(4,35);                 //run both motors at 35% power for 2 seconds (air braking)

goFor(2);

brake(4);                                  //stop both motors

goFor(8);                                 //remain stopped for 8 seconds

reverse(4);                               //reverse both motors

motorSpeed(4,34);                //run both motors at 34% power for 2 seconds (exit gate)

goFor(2);

brake(4);                                 //stop both motors

goFor(13);                              //coast ~7 seconds, remain stopped ~6 seconds

reverse(4);                              //reverse both motors

motorSpeed(4,55);                //run both motors at 55% power for 2 seconds (start return trip)

goFor(2);

 

Code with Lower Power

motorSpeed(4,27);                  //run both motors at 27% power

goToAbsolutePosition(242); //continue until AEV reaches 242 marks

brake(4);                                    //stop both motors

goToAbsolutePosition(257);  //coast until AEV reaches 257 marks

reverse(4);                                 //reverse both motors

motorSpeed(4,23);                  //run both motors at 23% power for 2 seconds (air braking)

goFor(2);

brake(4);                                //stop both motors

goFor(8);                                //remain stopped for 8 seconds

reverse(4);                             //reverse both motors

motorSpeed(4,34);              //run both motors at 34% power for 2 seconds (exit gate)

goFor(2);

brake(4);                               //stop both motors

goFor(13);                             //coast ~7 seconds, remain stopped ~6 seconds

reverse(4)                              //reverse both motors

motorSpeed(4,55);              //run both motors at 55% power for 2 seconds (start return trip)

goFor(2);

 

Both sets of code completed the performance test successfully, but there were some clear differences between the two runs. The second run took less time, however this only came from the section between the starting zone and the gate, so the time difference was not very large. The energy difference was surprising, however. The higher powered code used 100.927 Joules of energy while the lower powered code used 98.769 Joules of energy. This difference came from the fact that less power was used, meaning that the AEV is more energy efficient when using less power over a longer duration. From these results, we decided that using a code with lower percent power was the most efficient way for the AEV to complete the final performance test.