Proportional Integral Differential (PID) Motor Control
PID is a control 'filter' , which helps you get to a goal setpoint as fast
as possible without overshoot or oscillation. The technique is siple realy:
-
Find the 'error' ie the difference between where the system is, and where
it needs to be. Multipl this error by a gain value known as Kp. This is the
proportional component of the output.
-
Find the difference between the last error and the current error and multiply
by another gain known as Kd. This is the differential component of the output.
It is responsible for accelerating the motor if the error is large.
-
Find the running average of errors, and multiply by another gain value known
as Ki. This term is responsible for damping the system to prevent overshoot
and oscillation.
-
Add the proportional, differential and integral terms together and scale
the result down to 255 max, and use this value as a PWM value.
The algorithim gives more power to the motor when it's further from the target,
and less power when it's close to the target.
By choosing the Kp, Kd and Ki terms properly you can 'tune' the filter to
respond smoothly and rapidly to any position demand without overshooting.
Thanks to: Mark Hull Engineering/Technical EMS (Africa) (Pty) Ltd
For that introduction
NEW! MassMind.org BOB PID Servo Motor Control
Tuning a PID Motor Controller
See also:
Interested:
Archive:
Comments:
An AC spindle motor will not benefit from PID mode in a driving VFD unless the motor is rated for full torque at zero speed. Otherwise, the best you can do is mechanically gear the motor down so it can run at high speed while the spindle is running slowly. Then the PID will have some effect.