24
Chapter 5: MEI Software
Figure 5-1. Configure/Tuning Parameter Windows for Axes 0 and 1
The PID algorithm is based on the following formula:
On = KR ( Kp*En + Kd*(En - En-1) + Ki*Sn + Kv*Vn + 64*Ka*An + Kf * Mn) + Ko
The subscripted n represents the sample period. The terms are defined as follows:
Sn = Sn-1 + En if -Smax < Sn < Smax
Smax if Sn > Smax
-Smax if Sn < -Smax
On = DAC output
KR = overall scale factor
Kp = proportional gain
Kd = derivative gain
Ki = integral gain
Kv = velocity feed-forward
Ka = acceleration feed-forward
Ko = static DAC offset
Kf = friction feed-forward
En = position error
Mn = 0 or 1 based on the command velocity
Vn = command velocity
An = command acceleration * 2-6
Sn = integrated error
Smax = maximum integrated error
Proportional Gain
The proportional gain affects the analog command voltage or pulse rate based on the amount of
position error. The higher the proportional gain, the "stiffer" the response. If the proportional
gain is set too low, the response will be "mushy" - the motor will have trouble following the
commanded trajectory.
If the proportional gain is set too high, the motor may oscillate or "buzz" at rest or during motion.
The range of values for proportional gain is 0 to 32,767.
See appendix C, “Tuning Your System,” for more information on setting proportional gain.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com