[FC.1: Simple Straightness]
[FC.2: Straightness with b-b-c]
[FC. 3: Straightness with Proportional Control]
When we had our MotorCar travel some distance at full power, we discovered that it would not go so straight. Especially when we added some friction on either one of the wheels, it would just spin in a circle rather than slowing down the other wheel. When we applied friction to both wheels, it would not travel the full distance that we expected it to.
[FC.2: Straightness with b-b-c]
Here is our code to "Straightness with Bang-Bang Control." Depending on the shaft encoder variables, counta and countb, the bear-left and bear-right methods were invoked to control the MotorCar's straightness. The MotorCar moved forward pretty straight, but it was not very reliable because when we applied some friction to one wheel, the other wheel did slow down but not enough to go straight, so it bore to the side of the wheel with friction.
[FC. 3: Straightness with Proportional Control]
Here is our code for "Straightness with Proportional Control." I personally liked this method so much more than the side-bang-bang method because we could control the power settings of the two motors. Since we were able to control the powers, we could have the MotorCar go even straighter when we applied friction to just one wheel. Also, compared to the s-b-b control, proportional control had the MotorCar move smoothly forward. With s-b-b control, the MotorCar move left and right a lot, but with proportional control, it did not have much left and right movement.
No comments:
Post a Comment