4.2.1.3.4 Tuning Steps
Step 1.
Set the PID constants of both controllers equal to 0. By default, the integral limit of the velocity controller
should be set to motor maximum torque in [mNm], and the integral limit of position controller should be set
to motor maximum velocity in [rpm].
Important
from this step forth, the step response of position controller should always be evaluated.
Step 2.
In this step, the k constant of the velocity controller should be tuned. Increase the k of both position and
velocity controllers with a ratio of 10 (k = 10 * k ). Once the real position starts to follow the
reference position, stop increasing the k and only focus on increasing the k . Increase (sharpen)
the velocity controller as much as possible. As a rule of thumb, increase k until you get close to the
instability margin (at this margin, you will feel a vibration effect and some acoustic noise which is because of
controller sharpness). Now, you can reduce k to 90% of its value to increase the stability margin, and
remove vibration noise.
Step 3.
Now that the velocity controller is tuned, it is time to tune the parameters of the PID position controller. Start
with k , and increase it until you again get close to the instability margin, and then reduce k to
its 90%. So far, the proportional parts of both inner velocity loop and outer position loop are tuned.
Step 4.
In this step, increase k to eliminate the steady state error. As a suggestion start with k equal to 0.01, and in
each step, increase it with a factor of 2. Increase k step by step until the following two conditions are met at
the same time: - the overshoot is in its acceptable range - the steady-state error is eliminated in a short enough
period of time
P P
P_velocity P_position
P_position P_velocity
P_velocity
P_velocity
P_position P_position
I I
I