User Manual

Table Of Contents
Closed Loop Speed Mode
142 Advanced Digital Motor Controller User Manual V2.0 July 8 2019
Differential
Gain
Proportional
Gain
Output
Measured Speed or Position
-
x
Σ
x
dE
dt
Integral
Gain
x
dE
dt
E= Error
Sensor
Desired Speed
or Position
Integrator
Limit
FIGURE 10-3. PID algorithm used in speed modes
PID tuning in Closed Loop Speed Mode
As discussed above, three parameters - Proportional Gain, Integral Gain, and Differential
Gain - can be adjusted to tune the Closed Loop Speed control algorithm. 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.