Lab 9- Performance Test 2

Situation

The ninth week of the lab involved testing two different codes on the design selected from the previous week.  The team also developed a code that would allow the AEV to successfully complete the mission even when there was not adequate lighting.  The purpose of this lab was to finalize and test two different codes for the AEV that would successfully complete the mission.  All of the information and data collected in this lab helped the team further analyze the AEV and select the best code possible in order to complete the mission of transporting the R2D2 units successfully and efficiently.  

First, the team brainstormed and wrote the first code.  The AEV was tested along each portion of the track and tweaks were made along the way.  This code was saved and then a new one was created based off of the first.  The second code was different in the fact that the team utilized the ‘celerate’ command rather than running the AEV at a constant power.  After each code was written to perfection, all run data was saved.  During the last part of lab, the team wrote a code based solely on timing (rather than using the sensors).  The purpose of this code was so that the AEV could run and still complete the mission even if the lights in the room were off.  After perfecting this code, all the run data was again saved.

Results and Analysis

The two different codes planned by the team in order to accomplish the mission were both successful in the lab time given. The codes created had more differences than similarities, but the second code created used the first code as a base. The distances and wait times needed to accomplish each stage of the mission are shown below in Table 1.

Table 1: Mission Distances and Wait Times

In the first code, see appendix, the AEV was solely reliant on the wheel count sensors. In stage A, the AEV was powered at a constant power until it reached a certain amount of marks, the power was then set to 0, effectively braking the AEV, but also allowing the wheel count sensors to still count. When the AEV coasted past a mark set by the group, the AEV’s motors would reverse and the run at a constant speed for a short interval, stopping the AEV in front of the gate sensor. After waiting a period of seven seconds, stage B, the AEV motors were reversed again and the motors were given constant power until a mark count about halfway between the gate and the caboose. From here, the AEV coasted until it coupled with the caboose, accomplishing stage C. Then, to accomplish stage D, there was then a five second period before the motors would reverse and run at a constant power which was higher than the initial constant power. At a specified mark the AEV motor power would drop to 0 and the AEV would coast until it reached a specified mark before the gate. At this point, the motors would reverse and run at a constant power for a short time interval, stopping the AEV, finishing stage E. After waiting seven second for the gate open, stage F, the power in the motors was restored to the power it was before the AEV stopped before the gate and ran until it reached a mark between the gate and the end point. Once this mark was reached, the AEV would coast to the end of the track and, if needed, the motors would reverse and run for a short time if the AEV passed a mark close to the end of the track, finally completing stage G.

The second code, see appendix, was different than the first in a couple areas. The four instances where the AEV was run at a constant power, excluding the stopping motions, in the first code scheme were now changed to the ‘celerate’ command. However, the points where the AEV was coasting were still included in the second code. Lastly, the relative position command used in the first code after picking up the AEV had to be changed to absolute position because the ‘celerate’ command is time based and a relative positioning command could be very inconsistent.

Because of the differences in the code, they each have their advantages and disadvantages. The first code proved itself to be better than the second because of a couple factors. The first, and most important, characteristic of the first code was the consistency provided by using the wheel count sensors. While the wheel count sensors have an error of about 4 or 5 marks every 500 marks, this only amounts to 2 inches difference. The error however, is small compared to the benefit the sensors provide. For example, on the track in room 308, there is a piece of masking tape on the track at the start that causes the AEV to go slower or even, if positioned poorly at the start, prohibit the AEV from moving. The benefit provided by the wheel count sensors is that the AEV will run at the desired power until it reaches the marks, whereas, the celerate command would be greatly affected by the tape on the track and would have no means to cope with this variable, potentially allowing the AEV to come up short of the gate. Another benefit of the mark-based code is that the track can be mapped out by position and distance, which is unchanging, whereas the celerate command would require complex calculations to figure out the time and speeds needed to achieve as specific distance. While the second code was not as successful as the first, it did have an advantage over the first code. This advantage is energy efficiency. Because the first code runs at a constant motor power and the second code uses the celerate command, the area under the curve for the celerate command would be less because it would form a trapezoid with a flat base and the constant power would form a rectangle.

The advantage of the second code is going to be critical concept in the upcoming lab, improving energy efficiency. Preliminarily, the first code is already quite energy efficient because of its long periods of coasting during the run. While this is beneficial to team, improvements to the coding methods while the motors are running is going to be crucial to improving the energy efficiency of the AEV during its run. Attempting to change the motor power to one that is more energy efficient could be an option that could reduce the energy consumed. Although the AEV is quite bare with the current design, the group might considering stripping a part in order to reduce the weight of the vehicle as another method of increasing energy efficiency.