Situation
The second performance test focused on evaluating the coding for the AEV by comparing two different codes from the team and determine which code accomplishes the objective while fulfilling the constraints of high energy efficiency. The importance of this test is to evaluate how consistent the performance of the AEV would be for the final test. For the first code, the AEV would try to complete the objective purely by accelerating and coasting. The second code would try to brake the AEV with a servo motor. By running several runs for each code, the team observed the run and evaluated the data collected. This testing is necessary to compare which code has a more consistent performance while fulfilling the constraints.
Results & Analysis
In the beginning of the second performance test, the AEV performed nicely when it pass through the gate, but was unable to drag the payload pass through the return track. However, after a few runs, the team discovered that the AEV perform quite differently with each run, and has to made modifications to the code to continue the testing. Due to errors from MATLAB, the group can not get any results, so their results are based on observation.
The distinguishable differences in the codes was that the group took more consideration in the coasting abilities of the AEV. The AEV was also slowed down way way sooner than it was able to make it to the gate. The issue will this is take the AEV is stopped before the gate, then slowly proceeds to it afterwards, but this adds additional time to the runs and additional things to consider in the code. The energy efficiency has improved because there is less power needed to run the AEV.
Table 01: Breakdown Distances
No. |
Track description |
Distance | Wait time |
1. | From the start point to the gate. | 190 inches | 7 seconds |
2. | From the gate to the payload. | 207 inches | 5 seconds |
3. | From payload retrieval to the gate. | 190 inches | 7 seconds |
4. | From the gate back to the start point. | 207 inches | None |
Takeaways
- General – Take into consideration of external factors might affect the AEVs performance.
- Specific – Take into consideration that different batteries hold different charge and the coding should be adjusted slightly to accommodate that.
- Specific – Each run depletes the battery power by a certain amount, so batteries should be swapped out after a few runs otherwise the AEV’s performance would vary even though the coding remains the same.
Weekly Goals
- Adjust the coding to accommodate the new design that is laser cutted.
- Able to lower the power consumption to below 180 J.
- Add the acrylic base to the AEV
- Modify the code to consider the new weight of the AEV, which includes changing the speed, braking, and coasting distance
Weekly Schedule
Table 02: Week 11 Schedule
Task | Teammate(s) | Start Date | Due Date | Time Needed |
Replace the AEV with the new part | Ameeya | 03/31/17 | 04/03/17 | 1-2 hours |
Modify the final code for the new AEV design | All | 04/03/17 | 04/07/17 | TBD |
Extra credit video | Teck Yang | 3/28/17 | 04/24/17 | TBD |
Appendix A
Performance Test Utilized Code 1
celerate(4,0,30,0.5); //Accelerate all motors from 0% to 30% in 0.5 seconds.
goToRelativePosition(100);
brake(4); //Brake all motors for 10 seconds when it read 110 marks.
goFor(10);
int absolutePosition = getVehiclePostion(); //stores AEV’s absolute position into an integer.
//if AEV overshoots the second sensor
if (absolutePosition > 409) {
reverse(4); //reverse all motors
celerate(4,0,13,0.1); //accelerate all motors from 0% to 13% power in 0.1 seconds.
goToAbsolutePosition(400);
brake(4); //brakes all motors for 7 seconds when AEV reaches the middle of two sensors.
goFor(7);
}
//if AEV didn’t reach the first sensor
else if (absolutePosition < 392) {
celerate(4,0,13,0.1); //accelerate all motors from 0% to13% power in 0.1 seconds.
goToAbsolutePosition(400);
brake(4); //brakes all motors for 7 seconds when AEV reaches the middle of two sensors.
goFor(7);
}
//if AEV is in between the two sensors
else{
brake(4);// brakes all motors for 7 seocnds
goFor(7);
}
celerate (4,0,30,0.5); //accelerate all motors from 0% to 30% power in 0.5 seconds.
goToRelativePosition(125);
brake(4); //brake all motors for 15 seconds when it read 125 marks.
goFor(15);
reverse(4); //reverse all motors
celerate (4,0,30,0.5);//accelerate all motors from 0% to 30% power in 0.5 seconds.
goToRelativePosition(-125);
brake(4); //brake all motos for 10 seconds when it move 125 marks backwards
goFor(10);
//if AEV overshoots the second sensor
if (absolutePosition < 432) {
reverse(4); // reverse all motors
celerate(4,0,10,0.5); //accelerate all motors from 0% to 10% power in 0.5 seconds.
goToAbsolutePosition(440);
brake(4); //brake all motors for 7 seconds when it is between two sensors
goFor(7);
}
//if AEV didn’t reach the first sensor
else if (absolutePosition > 440){
celerate (4,0,10,0.5); //accelerate all motors from 0% to 10% power in 0.5 seconds
goToAbsolutePosition(440);
brake(4); //brake all motors for 7 seconds when it is between two sensors.
goFor(7);
//if AEV is between two sensors
else {
brake(4);
goFor(7);
}
celerate (4,0,30,0.5); //accelerate all motors from 0% to 30% power.
goToRelativePosition(-125);
brake(4); //brake all motors for 15 seconds when it move 125 marks backwards.
goFor(15);
Performance Test Utilized Code 2
celerate(4,0,30,0.5);//accelerate all motors from 0% to 30% power in 0.5 seconds
goToRelativePosition(140);
brake(4);//brake all motors when AEV reads 140 marks
goToAbsolutePosition(390);
rotateServo(90.00); //rotate servo 90 degrees clockwise when AEV reads 390 marks
goFor(1);
rotateServo(-90.00);//after 1 second, rotate servo 90 degrees anticlockwise
goFor(7);
celerate (4,0,30,0.5);//accelerate all motors from 0% to 30% power in 0.5 seconds
goToRelativePosition(135);
brake(4);//brake all motors when AEV reads 135 marks
goFor(13);
reverse(4);//after 13 seconds, reverse all motors
celerate (4,0,50,0.5);//accelerate all motors from 0% to 50% power.
goToRelativePosition(-140);
brake(4);//brake all motors when AEV reads 140 marks backwards
goToAbsolutePosition(440);
rotateServo(90.00); //rotate servo 90 degrees clockwise when AEV reads 440 marks
goFor(1);
rotateServo(-90.00);//after 1 second, rotate servo 90 degrees anticlockwise
goFor(7);
celerate (4,0,50,0.5);//after 7seconds,accelerate all motors from 0% to 50% power in 0.5 seconds.
goToRelativePosition(-125);
brake(4);//brake all motors when AEV reads 125 marks backwards
Appendix B
Team Meeting Notes
Date: April 2, 2017
Time: 9am-12pm
Members Present: Teck Yang Koh, Ameeya Watkins, Brisa Reyes, Justin Western
Topics Discussed: Progress Report, code modifications
Objective:
Discuss the AEV’s progress and determine how the AEV will likely perform in the final run.
To Do/ Action Items:
- Evaluate code to accommodate the slight design changes.
- Finish the Week 11 Progress Report
- Construct the AEV using the new part
Decisions:
The has changed changed the AEV by adding their new acrylic part that was made. The group determined the the overall AEV code is working well, but will need to be tested and updated with the new addition to the AEV.
Reflections:
The group need to focus on progress their code more, so they can come near to completely the length of the full track. It will be important that the code works with the new part for the AEV.
Table 03: Overview of Upcoming Labs
Labs | Goals |
Lab 10A | Retrieve the payload successfully at least 3 times out of 5. |
Lab 10B | Reduce power consumption by increasing coasting distance but able to complete the objective at the same time. |
Lab 10C | Debug for a more consistent performance. |