User Manual

Table Of Contents
Closed Loop Speed Mode
152 Advanced Digital Motor Controller User Manual V2.1 December 3, 2020
Differential
Gain
Proportional
Gain
Output
(Reference Current
or Voltage commands
)
Measured Speed or Position
-
x
Σ
x
dE
dt
Integral
Gain
x
dE
dt
E= Error
Sensor
Desired Speed
or Position
Integrator
Limit
FIGURE 10-5. PID algorithm used in close loop speed modes
PID tuning in Closed Loop Speed Mode
As discussed above, three parameters - Speed Proportional Gain, Speed Integral Gain,
and Speed Differential Gain - can be adjusted to tune the Closed Loop Speed control al-
gorithm. The ultimate goal in a well tuned PID is a motor that reaches the desired speed
quickly without overshoot or oscillation.
Because many mechanical parameters such as motor power, gear ratio, load, and inertia
are difficult to model, tuning the PID is essentially a manual process that takes experimen-
tation.
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. First, run the motor with the preset values. Then experiment
with different values until a satisfactory behavior is found.
In Speed Mode, the Integral component of the PID is the most important and must be set
first. The Proportional and Differential components will help improve the response time
and loop stability.
Try initially to only use a small value of I and no P or D:
P = 0
I = 1
D = 0
These values practically always work, but they may cause the motor to be slowly reaching
the desired speed. Increase the I gain to improve responsiveness but keeping it below the
level at which the motor begins to oscillate. The experiment then with adding P gain, and
different values of I.
In the case where the load moved by the motor is not fixed, tune the PID with the mini-
mum expected load and tune it again with the maximum expected load. Then try to find