7 – Performance Test 2

Performance test 2 focused on comparing two different codes and determining which one provided the more energy efficient and consistent results. Using the design that we decided on in performance test 1 (our team’s design) when testing both codes, we were able to directly see the impact of the differences in the two codes. The two codes are as follows:

Code 1:

reverse(4);

celerate(4,0,26,3);

motorSpeed(4,26);

goToRelativePosition(140);

brake(4);

reverse(4);

motorSpeed(4,50);

goFor(1);

brake(4);

goFor(7.5);

reverse(4);

motorSpeed(4,26);

goToRelativePosition(50);

brake(4);

goFor(11);

reverse(4);

motorSpeed(4,50);

goToRelativePosition(100);

brake(4);

 

Code 2:

reverse(4);

celerate(4,0,27,3);

motorSpeed(4,27);

goToAbsolutePosition(137);

brake(4);

reverse(4);

motorSpeed(4,49);

goFor(1);

brake(4);

goFor(7.5);

reverse(4);

motorSpeed(4,25);

goToRelativePosition(50);

brake(4);

goFor(11);

reverse(4);

motorSpeed(4,52);

goToRelativePosition(-105);

brake(4);

 

There is no doubt that we had to make some slight changes to some aspects of our code a multitude of times. However, for an overview of the evolution of our code, not much changed except for the numbers slightly. The biggest difference is that we first had relative position but attempted the use of absolute position and found that it worked more consistently. Also, we figured out that on the way back, we needed a negative sign in front of our distance because the motors are going in the opposite way.

When testing these codes on the track, we found not too much of a difference. However, the first code we used barely worked because the AEV stopped either just barely in front of the second sensor or a foot in front of the first sensor – showing how inconsistent the runs would be. Also, on the way down towards the load, the AEV went slightly too fast and hit the load too hard. With the second code we tested, it proved to be very consistent and had a small deviation in between the sensors for where the AEV stopped to trigger the gate. This code also allowed for the AEV to slowly make its way towards the load and hit it softly, but enough to connect to it. The graphs for these results are as follows:

Code 1:

Code 2: