You are on page 1of 9

CHAPTER 7 173

SELF-TUNING
Self-tuning, or auto-tuning as it may also be called, is a technology that has made rapid strides
in the past few years. Although the theoretical concepts underlying it have been around for
some time, only recently has computing power become inexpensive enough for calculation-
intensive self-tuning techniques to be economically viable in commercial products. Today,
practically all distributed control systems and microprocessor-based single-loop controllers,
even those aimed at the low end of the marketplace, include some type of self-tuning.
There are several reasons to use self-tuning. If the process is non-linearthat is, if it does not
exhibit the same response at one operating point as anotherand if the process is operated
under widely varying conditions, then the controllers tuning parameters should be changed to
match operating conditions. This change could be accomplished by using an operators log
that tabulates various combinations of tuning parameters for different operating conditions.
This method assumes that each operating condition can a priori be associated with a particular
combination of tuning parameters. It also depends on an operator or instrument technicians
diligence in entering the appropriate tuning parameters as operating condition changes. How-
ever, if process characteristics change rapidly, or cannot be categorized from simple measured
data, it probably is unreasonable to expect frequent manual changes to the tuning parameters
to produce satisfactory results.
An entirely different motivation for using self-tuning is the desire to have a procedure that will
determine an acceptable set of tuning parameters automatically during startups. This would
minimize the task of a control engineer or instrumentation technician in manually tuning the
loops.
A similar need for self-tuning exists if the end user cannot be presumed to have the knowledge
or experience to successfully tune the control loops manually. This problem is frequently faced
by manufacturers of lower-priced single-loop controllers (e.g., the quarter-DIN controllers.
DIN refers to a standard instrument faceplace and panelboard cut-out size.) whose market
often does not include sophisticated control equipment users.
The variety of motivations for using self-tuning naturally leads to the emergence of different
techniques, and a variety of self-tuning techniques are now on the market. Generally, these can
be grouped into the following categories: scheduled tuning, on-demand tuning, and adaptive
tuning.
7
Wade04.book Page 173 Thursday, April 15, 2004 12:20 PM
BASIC AND ADVANCED REGULATORY CONTROL: SYSTEM DESIGN AND APPLICATION
174 CHAPTER 7
SCHEDULED TUNING
With scheduled tuning, one or more tuning parameters are changed automatically as process
conditions or the operating point change. Adaptive gain is one form of scheduled tuning, in
which the control algorithm receives an external input that represents the controller gain. It is
the users responsibility to provide the correct value for the controller gain, either by means of
a table lookup or user-written program. Many controllers have provisions for adaptive gain.
A simple extension of this adaptive gain concept permits all three tuning parametersgain,
reset, and derivativeto be set from an external input. For example, a controller may provide
for a table lookup to determine which set of preset tuning parameters to use, as shown in Fig-
ure 7-1. Three sets of tuning parameters are stored in the table; this represents three different
operating regions. Also stored with each set are limits that determine the boundary for that
region, indexed by a key variable. The user can designate the variable that is the key to the
table. This may be the set point, process variable, error, controller output, or some variable not
directly related to the control loop. When this variable is within a region defined by specified
boundary limits, then the related tuning parameters are entered to the controller. If the control-
ler uses the position-mode algorithm, then some form of bumpless tuning, as described in
chapter 5, will be required.
Scheduled tuning is merely an automation of the operators log concept, in which predeter-
mined tuning parameters are manually entered according to the current operating point. It
should be noted that whereas the controller itself operates in the closed loop, the tuning proce-
dure is open loop. That is, if erroneous tuning values are specified for one or more regions, the
controller uses these values just as if they had been directly entered through a tuning display.
The controller makes no attempt to assess and modify its own performance by determining
improved tuning parameters. Even so, this method is a considerable improvement over
attempts to determine a single set of tuning parameters for all situations (one size fits all).
Scheduled tuning is probably more reliable than depending on manual entry of predetermined
tuning for various conditions. Furthermore, how the tuning parameters will be changed is com-
pletely obvious and within the control of the user. This feature may not be present in more
automated tuning procedures.
ON-DEMAND TUNING
One form of on-demand tuning is simply an automation of the open-loop testing method for
controller tuning that was described in the previous chapter. In its simplest form, the controller
uses existing tuning parameters until a command is given or a button labeled tune is pressed.
Then the following procedure is carried out automatically:
The control loop is switched to manual;
The controller output is changed by a specified amount. The amount of change is usu-
ally established in advance by the user as a configuration parameter;
Wade04.book Page 174 Thursday, April 15, 2004 12:20 PM
BASIC AND ADVANCED REGULATORY CONTROL: SYSTEM DESIGN AND APPLICATION
CHAPTER 7 175
The response to the step change in controller output is sampled and stored until the
complete response is observed;
Some type of numerical analysis is performed on the response data to determine an
approximate mathematical model for the process; this may be as simple as first-order
plus dead time;
Once process model parameters have been determined, some type of correlating equa-
tions are utilized to determine tentative values for controller tuning parameters. These
equations could be one of the equations sets presented in Table 6-1, or they could be
proprietary equations provided by the manufacturer;
The tentative tuning values are displayed to the user for confirmation. If confirmed,
they are inserted into the control algorithm.
Several elaborations on this on-demand tuning procedure may be incorporated. For example,
one manufacturers self-tuning algorithm first makes a single step to determine the approxi-
Figure 7-1. Scheduled Tuning
TABLE LOOK UP
OR
USER-WRTTEN
PROGRAM
GAN RESET DERV
PD PROCESS
3 SP PV
BOUNDARES
0 - 30%
30% - 70%
70% - 100%
GAN
G1
G2
G3
RESET
R1
R2
R3
DERV
D1
D2
D3
REGON
1
2
3
KEY VARABLE FOR REGONS: ___________
(Can be SP, PV, Error or Other Measured Variable)
(Example Figures)
Wade04.book Page 175 Thursday, April 15, 2004 12:20 PM
BASIC AND ADVANCED REGULATORY CONTROL: SYSTEM DESIGN AND APPLICATION
176 CHAPTER 7
mate time constant and dead time of the process. The step is removed and the process allowed
to settle, then a second step is applied for a length of time equal to 2.5 times the sum of the pre-
liminary estimates of dead time and time constant. This step permits the process gain to be
estimated. When this step is removed, the algorithm makes a final estimate of dead time and
process time constant. The objective of this sequence is to obtain better process response data
than a single step test would provide.
Another elaboration of this on-demand tuning procedure could be to fit a more precise process
model to the data than a simple first-order plus dead time.
In all of these cases, the essence of the technique is the samemake an open-loop step test,
observe the process, and calculate tuning parameters.
The problems with this on-demand technique are the same as those presented in chapter 6 for
manually initiated open-loop testing. Furthermore, a load upset may occur midway through
the response that masks the controller outputs response to the step change. Because of these
problems, the requirement for confirmation permits plant personnel to apply discretion before
the parameters are used on line by the control algorithm.
The advantages of this on-demand tuning technique are its simplicity and the fact that the user
does not need expertise in controller tuning. For these reasons, this technique is widely used,
especially by the so-called quarter-DIN controllers that are targeted for the lower end of the
controller market.
The technique can also be combined with other techniques. For instance, it can be combined
with scheduled tuning to determine tuning parameters for multiple operating regions. Within
any operating region, the user can command a tune operation, which initiates the bump-test
procedure described previously. If the resulting parameter set is confirmed, then the parame-
ters are entered into the table for the appropriate operating region.
Another approach to on-demand tuning, based upon the work of strm and Hgglund (Ref.
7-1), is called the relay method. It is related to the closed-loop tuning technique described in
chapter 6. When the command to tune is given, the controller is left in automatic at its current
operating point. This approach utilizes preconfigured high and low limits on the controller out-
put. These limits should be a selected amount above and below the current controller output.
An on/off control strategy (relay controller) is used. This causes the controller output to vary in
a square-wave fashion between the minimum and maximum output limits. Consequently, the
process variable will oscillate in an approximate sine wave as shown in Figure 7-2.
If the time in which the controller output dwells on one limit exceeds the dwell time at the
other limit, then both the high and low limits are moved an equal amount in the direction of the
longer dwell time. When the output response is symmetrical (dwell times at each limit are
equal), the period of oscillation is the same as the ultimate period, P
U
, which is determined by
the closed-loop test method described in chapter 6. (This is proven in Ref. 7-1.) Furthermore,
Wade04.book Page 176 Thursday, April 15, 2004 12:20 PM
BASIC AND ADVANCED REGULATORY CONTROL: SYSTEM DESIGN AND APPLICATION
CHAPTER 7 177
the ultimate gain, K
CU
, is a function of the ratio of amplitude of oscillation of the process vari-
able and controller output. Specifically:
(7-1)
where: V = Amplitude of square-wave oscillation of controller output
PV = Amplitude of oscillation of process variable.
Once K
CU
and P
U
have been determined, then an appropriate tuning parameter correlation,
such as Table 6-2, can be used to determine tuning parameters. This procedure, or some modi-
fication of it, has been automated and is the basis of several vendors automated loop-tuning
procedure.
ADAPTIVE TUNING
There are several techniques for on-line tuning in which the tuning parameters are determined
by an auxiliary program that automatically evaluates the closed-loop behavior and calculates
and modifies the tuning parameters whenever necessary. The Foxboro EXACT is an exam-
ple.
1
This tuning procedure observes the pattern of the response and then invokes a set of rules
for determining new tuning parameters that will drive the pattern closer to a desired response
pattern (Ref. 6-2). In essence, the technique attempts to mimic what an experienced, compe-
tent human would do in tuning the loop. According to Foxboro, the EXACT technique offers
the following features:
It does not require artificial load upsets; instead, it utilizes the normal process distur-
bances that occur;
Figure 7-2. Controller Output and PV Response for Relay Tuning
1. EXpert Adaptive Controller Tuner. EXACT is a trademark of The Foxboro Co.
P
u
PV
V
Max Output
Min Output
4

CU
PV
K
V
=
Wade04.book Page 177 Thursday, April 15, 2004 12:20 PM
BASIC AND ADVANCED REGULATORY CONTROL: SYSTEM DESIGN AND APPLICATION
178 CHAPTER 7
It does not attempt to impose an arbitrary mathematical model on the process.
As a part of the techniques setup procedure, the user establishes a band around the set point,
as shown in Figure 7-3. This band should be wider than the normal noise band of the process.
As long as the process variable remains within this band, the self-tuner is deactivated, although
the loop may be under closed-loop control utilizing existing tuning parameters.
Suppose that a load upset occurs that forces the process variable outside this band. The self-
tuner is then activated and begins to observe the pattern of the response. The pattern is charac-
terized by three successive peak deviations from set point P
1
, P
2
, and P
3
, and the period of
oscillation as measured by the time, T, between the first and third peaks. When the three peaks
have been determined, the damping ratio, DMP, and overshoot ratio, OVR, are calculated from:
(7-2)
(7-3)
The user, again as a part of the setup procedure, can specify target values for these ratios. In
essence, this is equivalent to specifying the desired shape of the response. Usually, these ratios
are not independent; hence, the technique does not attempt to drive both ratios to the specified
targets. Instead, the ratio that is closer to its target is determined. The difference between this
ratio and the target is used to calculate multiplying factors, which are applied to the present
tuning values to calculate new values. The period of oscillation is also used to adjust the reset
and derivative settings. Bear in mind that the actual steps are based on a series of heuristic
rules, not on a formal mathematical procedure. The newly calculated parameters are used to
update the working parameters in the PID algorithm.
Figure 7-3. Pattern Recognition Used by Foxboros EXACT Self-tuning Algorithm
P
1
P
2
P
3
T
Noise Band
Self-Tuner Actuated Here
Control loop is using
existing tuning parameters
New tuning
parameters
calculated
Set Point
3 2
1 2
P P
DMP
P P

2
1
P
OVR
P
=
Wade04.book Page 178 Thursday, April 15, 2004 12:20 PM
BASIC AND ADVANCED REGULATORY CONTROL: SYSTEM DESIGN AND APPLICATION
CHAPTER 7 179
The rules contain many statements that are intended to cope with anomalous conditions such
as these:
What if there are false peaks?
What if the second and/or third peak cannot be distinguished from the noise band?
What if the control loop is overdamped, so that upon a load or set point change, only
one peak occurs?
There are several setup parameters to be entered. We have mentioned the noise band and target
values for the damping and overshoot ratios. Other parameters include initial values for the
three tuning parameters, a factor that determines the extent to which the algorithm will use
derivative (an entry of 0.0 makes the algorithm use the proportional and integral modes only),
the maximum allowable damping and overshoot, a factor that places an upper and lower limit
on the calculated proportional band and integral time values, the maximum wait time for the
third peak, and a high-frequency output cycling limit. Even these setup parameters can be
determined in a semiautomated fashion, using the pretune procedure that is an integral part
of the EXACT package. This is similar to the on-demand open-loop tuning previously
described. The user places the controller in the pretune mode, specifies an amount of output
change (amount of process bump), and then enters a command to begin the process test. This
test allows the controller to learn enough about the process to calculate tentative values for the
setup parameters. The user can either accept these or change any of them at will. Once the pre-
tune test is completed, the EXACT procedure can be enabled to maintain control-loop tuning
automatically thereafter.
Although the EXACT procedure can be left in the enabled state indefinitely, many users prefer
to enable it only for a short time so as to determine acceptable tuning parameters, then disable
it (thus retaining constant tuning parameters) until it is felt that the loop again needs retuning.
Reports from users of this technique have been mixed. Some installations have reported very
good resultstypical of these has been pH control, where the process is both highly nonlinear
and time variable. Other reports have noted problems with processes that are too quiescent,
processes in which load disturbances and measurement noise are essentially indistinguishable,
and control loops that interact with other loops. The fact that problems have been cited should
not be interpreted as an indictment of the technique, however. They merely force us to recog-
nize that for this, as for any self-tuning technique, there are both more favorable and less favor-
able applications.
TUNING AIDS
A number of tuning aids are available as software packages from third-party vendors. Typi-
cally, these are executed in a Windows-based computer that can access process data in a vari-
ety of ways
2
:
Wade04.book Page 179 Thursday, April 15, 2004 12:20 PM
BASIC AND ADVANCED REGULATORY CONTROL: SYSTEM DESIGN AND APPLICATION
180 CHAPTER 7
Using OPC or DDE servers;
Through A/O converters connected to a particular control loops I/O;
Using custom-designed software that connects directly to a DCS or PLC data high-
way;
Using an ASCII file from a data historian.
These packages vary in their features and capabilities, but in general all of them receive input
process data, analyze this data, and calculate recommended tuning parameters. The better-
known packages provide the following features:
The loop can be tested in either the manual or automatic mode.
The data can be edited to remove noise spikes.
The user can choose from a number of performance criteria, including fast or slow
response to a load upset, the form of set point response, or lambda tuning.
The user can choose a safety factor, which in essence provides a trade-off between
robustness of the loop and loop performance.
The package provides a database of controllers, by manufacturer and control algo-
rithm type, so the calculated tuning parameters are specific to the controller being
used.
After calculating tuning parameters, the user can ask what-if-type questions, in
order to explore other values of the response selection or safety factors.
A number of analysis tools can be utilized, making it possible to display robustness
plots, standard deviation of the variable before and after tuning, and simulated
responses to set point and load upsets using the recommended tuning parameters.
(Robustness plots show how much variation in process gain or dead time can be toler-
ated while still maintaining loop stability.)
If the package is connected to the loop in real time, then on command, the recom-
mended tuning parameters can be downloaded to the controller.
2. Windows is a registered trademark of Microsoft Corporation.
Wade04.book Page 180 Thursday, April 15, 2004 12:20 PM
BASIC AND ADVANCED REGULATORY CONTROL: SYSTEM DESIGN AND APPLICATION
CHAPTER 7 181
REFERENCES
7-1. K. J. strm and T. Hgglund. PID Controllers: Theory, Design and Tuning, ISA
The Instrumentation, Systems, and Automation Society, 1995.
7-2. T. W. Kraus and T. J. Myron. Self-Tuning PID Controller Uses Pattern Recogni-
tion Approach, Control Engineering, June 1984, pp 106-11.
Wade04.book Page 181 Thursday, April 15, 2004 12:20 PM

You might also like