Problems Using PID for Velocity
We have a PID control loop to control velocity of a motor. We have the tooth counter giving us our current velocity, and an OI analog input giving us our target. The code is written such that the motor can never go backwards. (The tooth counters are giving us a speed of about 0-18, we're hoping to increase that range a little.)
The problem is that, when using only a P loop, it oscillates violently at mid- to low-speeds. Meaning that it revs up, then stops, revs up then stops, etc. (Victor set to coast.)
Anyone seen this before in their own code? Any recomendations on using PID for velocity->velocity control loops?
|