Chapter 3
Tuning Servo Systems
©
National Instruments Corporation
3-5
Kd (Derivative Gain)
The derivative gain (Kd) determines the contribution of restoring force
proportional to the rate of change (derivative) of position error. This force
acts much like viscous damping in a damped spring and mass mechanical
system. A shock absorber is an example of this effect.
The PID loop computes the derivative of position error every derivative
sample period. A non-zero value of Kd is required for all systems that use
torque block amplifiers, where the command output is proportional to
motor torque, for the servo loop operation to be stable. Too small a Kd
value results in servo loop instability.
With velocity block amplifiers, where the command output is proportional
to motor velocity, it is typical to set Kd to zero or a very small positive
value.
Kv (Velocity Feedback)
You can use a primary or secondary feedback encoder for velocity
feedback. Setting the velocity feedback gain (Kv) to a value other than
zero (0) enables velocity feedback using the secondary encoder, if
configured, or the primary encoder if a secondary encoder is not
configured.
Kv is used to scale this velocity feedback before it is added to the other
components in the 16-bit DAC command output. Kv is similar to derivative
gain (Kd) except that it scales the velocity estimated from encoder
resources only. The derivative gain scales the derivative of the position
error, which is the difference between the instantaneous trajectory position
and the primary feedback position. Like the Kd term, the velocity feedback
derivative is calculated every derivative sample period and the contribution
is updated every PID sample period.
Velocity feedback is estimated through a combination of speed-dependent
algorithms. Velocity is measured based on the time elapsed between each
encoder count.
Vff (Velocity Feedforward)
The velocity feedforward gain (Vff) determines the contribution in the
16-bit DAC command output that is directly proportional to the
instantaneous trajectory velocity. This value is used to minimize following
error during the constant velocity portion of a move and can be changed at
any time to tune the PID loop.