User Manual

Table Of Contents
Closed Loop Relative and Tracking Position Modes
162 Advanced Digital Motor Controller User Manual V2.1 December 3, 2020
The Roborun PC utility makes this experimentation easy by providing one screen for
changing the Proportional, Integral and Differential gains and another screen for running
and monitoring the motor.
When tuning the motor, first start with the Integral and Differential Gains at zero, increas-
ing the Proportional Gain until the motor overshoots and oscillates. Then add Differential
gain until there is no more overshoot. If the overshoot persists, reduce the Proportional
Gain. Add a minimal amount of Integral Gain. Further fine tune the PID by varying the
gains from these positions.
To set the Proportional Gain, which is the most important parameter, use the Roborun util-
ity to observe the three following values:
Command Value
Actual Position
Actual Speed
With the Integral Gain set to 0, the PID output should be:
PID Output = (Command Value - Actual Position) * Proportional Gain
The PID output can be the speed command or the applied power (voltage), depending on
whether the speed gains are set or zeroed respectively. Experiment first with the motor
electrically or mechanically disconnected and verify that the controller is measuring the
correct position and is applying the expected amount of power (voltage) to the motor de-
pending on the command given.
Verify that when the Command Value equals the Actual Position, the Applied Power (Volt-
age) equals to zero. Note that the Applied Power (Voltage) value is shown without the sign
in the PC utility.
In the case where the load moved by the motor is not fixed, the PID must be tuned with
the minimum expected load and tuned again with the maximum expected load. Then try
to find values that will work in both conditions. If the disparity between minimal and maxi-
mal possible loads is large, it may not be possible to find satisfactory tuning values.
PID Tuning Differences between Position Relative and
Position Tracking
The PID works the same way in both modes in that the desired position is compared to
the actually measured position.
In the Closed Loop Relative mode, the desired position is updated every ms and so the
PID deal with small differences between the two values.
In the Closed Loop Tracking mode, the desired position is changed whenever the com-
mand is changed by the user.
Tuning for both modes requires the same steps. However, the P, I and D values can be ex-
pected to be different in one mode or the other.