Like in the previous challenge, we made the car coast instead of braking. Below is a picture of our power settings and how they are a product of a constant gain factor and the average of the shaft-encoder variables.
After making our program, we tested it out on the concrete floor. It worked extremely well (moved very straight) and stopped exactly where it was supposed to.
Here is a video of it:
We then tried it on the carpet. The MotorCar beared right slightly, not as badly as it did when it was running under the "bang bang distance" program. This time, the car stopped short by 2 inches of the 10 feet mark.
Here is a video of it:
We then tested our program with the car going up the ramp. We were impressed because the car moved very straight and it came closer to the mark then when it was running the "Bang Bang" distance. It was about 4 inches short of the 10 feet mark.
Finally, we tested it out with the car going down the ramp. The car beared to the right but it straightened out very well, which made us very happy and convinced us that our proportional control was working. The car did not pass the 10 feet mark as much as it did the "Bang Bang" distance control. Instead of being off by a foot, it was off by around 6 inches. Here is a video of it:
These trials showed us that the proportional control worked much better than the bang bang control for this distance challenge. But we were still unable to make the car stop exactly at the 10 feet mark on the three surfaces (upramp, downramp, carpet).
We then tested out different gains because we wanted to see how it affected the motion of the MotorCar on the concrete floor. Our original gain was 800. We first tried a lower gain of 100. This resulted in the car deviating right. It still went 10 feet, but it did not go straight at all. We then tried a higher gain of 1300. The car still went 10 feet but it also deviated to the right. This showed us that we had the right gain and that changing it would really affect the results and if we had tested it out the ramp, the car would have surely fallen off.
No comments:
Post a Comment