Quote:
Originally Posted by billbo911
Slow loop timing could easily cause both overshoots and undershoots.
|
We had a lot of this at first. When we set up bang-bang on our shooter, our encoder outputs were jumping around by about 300 rpm, and even with direct drive off a miniCIM, bang-bang didn't sound very good.
Eventually we convinced the rpm function of the counter class to use the FPGA timer, and the numbers settled down very well.
Then by having the code attempt to update the Talon output every millisecond we eliminated almost all of the overshoot and variation. It is changing state so quickly now that the motors sound just as smooth as ones receiving constant PWM.