Code

It is obvious that coasting is much more energy-efficient than power braking, however, coasting is also less accurate than power braking. Through the whole semester, the team worked to improve the programming to increase accuracy of controlled coasting. Figure 1 is an example that shows how the team used “while” loop to increase the accuracy of coasting. The “while” loop keeps tracking the AEV until it reaches the goal distance. Once the AEV reaches that distance, it starts braking immediately. Since the accuracy of coasting was improved by the “while” loop, the team was able to reduce the time of using power braking. In the Performance Test 1, the total energy used for power braking was 12.332 J(Figure 2. PT1 Power Braking Energy Used). After the team improved the code, the total energy used for power braking in Part 1 of Final Performance Test was 2.801 J(Figure 3. FT Part 1 Braking Energy Used). It is clear that the energy-efficiency has been significant improved by the new code.

Figure 1. Part 1 of Final Performance Test Code

 

Figure 2. PT1 Power Braking Energy Used

 

 

Figure 3. FT Part 1 Braking Energy Used