How do I set the PID settings when my motor speed is unstable?


30 September 2021

The three settings in PID stand for Proportional, Integral and Derivative. 
1 - Start with I and D set at 0. 
2 - Increase the P until a change in rpm setpoint causes the motor speed to change to the new setting without overshooting.  If overshooting occurs, reduce the P.
3 – Enter a value for I.  The I is to remove the steady state error.  If I is too large, motor speed will oscillate.
4 – Finally enter a value for D.  Often D is best left at 0.  Increase the P value until you get a little overshoot.  Now add some D and see if the overshoot can be removed.  Too much D and the steady state motor speed is not stable but rather moves around a bit with noise.  If this is the case reduce or remove D.