EDH0162En1040 – 06/99
4.14
MM4005
Motion Control Tutorial
The problem for most users is to get a feeling for this formula, specially
when trying to tune the PID loop. Tuning the PID means changing its three
gain factors to obtain a certain system response, task quite difficult to
achieve without some understanding of its behavior.
The following paragraphs explain the PID components and their operation.
4.3.1.1
P Loop
Lets start with the simplest type of closed loop, the P (proportional) loop.
The diagram in Fig. 4.14 shows its configuration.
Fig. 4.14
— P Loop.
Every servo cycle, the actual position, as reported by the encoder, is com-
pared to the desired position generated by the trajectory generator. The
difference e is the positioning error (the following error). Amplifying it
(multiplying it by K
p
) generates a control signal that, converted to an ana-
log signal, is sent to the motor driver.
There are a few conclusions that could be drawn from studying this circuit:
• The motor control signal, thus the motor voltage, is proportional to the
following error.
• There must be a following error in order to drive the motor.
• Higher velocities need higher motor voltages and thus higher following
errors.
• At stop, small errors cannot be corrected if they don’t generate enough
voltage for the motor to overcome friction and stiction.
• Increasing the K
p
gain reduces the necessary following error but too
much of it will generate instabilities and oscillations.
4.3.1.2
PI Loop
To eliminate the error at stop and during long constant velocity motions
(usually called steady-state error), an integral term can be added to the
loop. This term integrates (adds) the error every servo cycle and the value,
multiplied by the K
i
gain factor, is added to the control signal (Fig. 4.15).
Fig. 4.15
— PI Loop.
X
K
p
X
K
i
e
Trajectory
Generator
Motion Controller
Servo Controller
Driver
Motor
Encoder
∫
e
e
Trajectory
Generator
Motion Controller
Servo Controller
Driver
Motor
Encoder
X
K
p
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com