Appendix C: Tuning Your System
91
For new systems this sequence of steps should be performed twice; once with no motor load to
provide a stable set of starting terms, and once with the motor loaded to fine-tune the initial
parameters.
The Derivative term should be set to zero.
C.4.1 Step 1: Set Proportional Gain (K
p
)
The Proportional Gain is dependent upon the ratio between the number of encoder counts and the
number of steps (or microsteps) per revolution of the motor. The greater the number of steps (or
microsteps) per encoder count, the larger the Proportional Gain. Most often the Proportional
Gain will be between 20 and 400. Start with the Proportional Gain at 20 and all other gains (K
p
,
K
d
, K
i
, K
v
, and K
a
) at 0. Try some two-point motions and increase the Proportional Gain until
the motor stalls. Then reduce the Proportional Gain to 1/2 the value that caused the motor to
stall.
C.4.2 Step 2: Set Velocity and Acceleration Feed
Forward
Set the motion parameters in the
Motion/Two-Point Motion
window for a move which takes 5
to 10 seconds using a typical desired speed and acceleration. Notice the position error during the
constant speed portion of the motion. Increase the K
v
term until the constant velocity error is
reduced to the desired level. Use the same method to adjust the K
a
term watching the error
during the acceleration and deceleration portions of the motion. The Acceleration Feed-Forward
won't be needed for most systems.
C.4.3 Step 3: Setting the Integral Gain (K
i
)
The best way to tune the Integral Gain is to observe the static error at the end of a move as the K
i
term is increased. Using the two-point motion window, set the following motion parameters:
Parameter Setting
Delay 2
Position 1
0
Position 2
20000
Velocity 10000
Acceleration 10000
Start the motion and observe the position error between moves. Gradually increase K
i
until the final
position error is 1 or 2 encoder counts. As you increase K
i
above this level, watch for oscillation at the
beginning or end of the motion. If oscillation occurs reduce the value of K
i.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com