User Manual

Table Of Contents
Operating in Closed Loop Tracking Mode
Advanced Digital Motor Controller User Manual 151
Operating in Closed Loop Tracking Mode
In this mode, the controller makes no effort to compute a smooth, millisecond by milli-
second position trajectory. Instead, the current feedback position is periodically compared
with the requested destination and power is applied to the motor using these two values
in a PID control loop.
This mode will work best if changes in the commands are smooth and not much faster
than what the motor can physically follow.
Position Mode Relative Control Loop Description
The controller performs the Relative Position mode using a full featured Proportional, Inte-
gral and Differential (PID) algorithm. This technique has a long history of usage in control
systems and works on performing adjustments to the Power Output based on the dif-
ference measured between the desired position (set by the user) and the actual position
(captured by the position sensor).
Figure 10-4 shows a representation of the PID algorithm. Every 1 millisecond, the control-
ler measures the actual motor position and subtracts it from the desired position to com-
pute the position error.
The resulting error value is then multiplied by a user selectable Proportional Gain. The result-
ing value becomes one of the components used to command the motor. The effect of this
part of the algorithm is to apply power to the motor that is proportional with the distance
between the current and desired positions: when far apart, high power is applied, with the
power being gradually reduced and stopped as the motor moves to the final position. The
Proportional feedback is the most important component of the PID in Position mode.
A higher Proportional Gain will cause the algorithm to apply a higher level of power for a
given measured error, thus making the motor move quicker. Because of inertia, however,
a faster moving motor will have more difficulty stopping when it reaches its desired posi-
tion. It will therefore overshoot and possibly oscillate around that end position.
Differential
Gain
Propor tional
Gain
Output
Measured Position
-
x
Σ
x
dE
dt
Integral
Gain
x
dE
dt
E= Error
Sensor
Desired Position
Integrator
Limit
FIGURE 11-4 . PID algorithm used in Position Mode