III. Tuning the PID Filter
BACKGROUND
The transient response of a control system reveals important
information about the “quality” of control, and because a step
input is easy to generate and sufficiently drastic, the tran-
sient response of a control system is often characterized by
the response to a step input, the system step response.
In turn, the step response of a control system can be char-
acterized by three attributes: maximum overshoot, rise time,
and settling time. These step response attributes are defined
in what follows and detailed graphically in
1.
The maximum overshoot, Mp, is the maximum peak
value of the response curve measured from unity. The
amount of maximum overshoot directly indicates the
relative stability of the system.
2.
The rise time, t
r
, is the time required for the response to
rise from ten to ninety percent of the final value.
3.
The settling time, t
s
, is the time required for the response
to reach and stay within two percent of the final value.
A critically damped control system provides optimum perfor-
mance. The step response of a critically damped control
system exhibits the minimum possible rise time that main-
tains zero overshoot and zero ringing (damped oscillations).
illustrates the step response of a critically damped
control system.
INTRODUCTION
The
LM628
is
a
digital
PID
controller.
The
loop-compensation filter of a PID controller is usually tuned
experimentally, especially if the system dynamics are not
well known or defined.
The ultimate goal of tuning the PID filter is to critically damp
the motor control system
— provide optimum tracking and
settling time.
As shown in
, the response of the PID filter is the
sum of three terms, a proportional term, an integral term, and
a derivative term. Five variables shape this response. These
five variables include the three gain coefficients (k
p
, k
i
, and
k
d
), the integration limit coefficient (i
l
), and the derivative
sampling coefficient (d
s
).
Tuning the filter equates to deter-
mining values for these variable coefficients, values that
critically damp the control system
.
Filter coefficients are best determined with a two-step experi-
mental approach. In the first step, the values of k
p
, k
i
, and k
d
(along with i
l
and d
s
) are systematically varied until reason-
ably good response characteristics are obtained. Manual
and visual methods are used to evaluate the effect of each
coefficient on system behavior. In the second step, an oscil-
loscope trace of the system step response provides detailed
information on system damping, and the filter coefficients,
determined in step one, are modified to critically damp the
system.
Note:
In step one, adjustments to filter coefficient values are inherently
coarse, while in step two, adjustments are inherently fine. Due to this
coarse/fine nature, steps one and two complement each other, and the
two-step approach is presented as the “best” tuning method. The PID
filter can be tuned with either step one or step two alone.
STEP ONE — MANUAL VISUAL METHOD
Introduction
In the first step, the values of k
p
, k
i
, and k
d
(along with i
l
and
d
s
) are systematically varied until reasonably good response
characteristics are obtained. Manual and visual methods are
used to evaluate the effect of each coefficient on system
behavior.
Note:
The next four numbered sections are ordered steps to tuning the PID
filter.
1. Prepare the System
The initialization section of the filter tuning program is ex-
ecuted to prepare the system for filter tuning. See
This section initializes the system, presets the filter param-
eters (k
p
, k
i
, il = 0, k
d
= 2, d
s
= 1), and commands the control
loop to hold the shaft at the current position.
After executing the initialization section of the filter tuning
program, both desired and actual shaft positions equal zero;
the shaft should be stationary. Any displacement of the shaft
constitutes a position error, but with both k
p
and k
i
set to
zero, the control loop can not correct this error.
2. Determine the Derivative Gain Coefficient
The filter derivative term provides damping to eliminate os-
cillation and minimize overshoot and ringing, stabilize the
system. Damping is provided as a force proportional to the
rate of change of position error, and the constant of propor-
tionality is k
d
x d
s
. See
.
Coefficients k
d
and d
s
are determined with an iterative pro-
cess. Coefficient k
d
is systematically increased until the shaft
begins high frequency oscillations. Coefficient d
s
is then
increased by one. The entire process is repeated until d
s
reaches a value appropriate for the system.
01086017
FIGURE 16. Unit Step Response Curve Showing
Transient Response Attributes
01086018
FIGURE 17. Unit Step Response of a
Critically Damped System
AN-693
www.national.com
18