I'm working on a digital PID motion controller. The target/goal is to move at (very) constant velocity. Position feedback is from a linear encoder with quadrature output. The input to the controller is a linear ramp (i.e. constant velocity) and the PID changes the motor output to minimize the error. The system works, but I'm looking to improve its performance at low velocities.
At low velocities there are only a few pulses from the encoder per servo cycle. In the error signal I can clearly see this quantization. If I lower the frequency of the servo cycle; the controller performance increases (i.e. smaller velocity variations).
Two questions:
- Is there a method to determine optimal servo frequency?
- Would it be beneficial to separate the controller in two control loops; an inner velocity loop and an outer position loop. Perhaps with both running at different frequencies?
Any pointers to good documentation are appreciated.
Thanks, Fitzgerald