PID Control: Single Loop & Actions
PID Control: Single Loop & Actions
Chapter 23
23.1 Single Loop Controller
23.2 Proportional Action
23.3 Integral Action
23.4 Derivative Action
23.5 Bumpless Transfer
23.6 Derivative Feedback
23.7 Integral Windup
23.8 Worked Example
23.9 Other Analogue Forms of PID Controller
23.10 Discretised Form of PID
23.11 Incremental Form of PID
23.12 Mnemonics and Nomenclature
23.13 Summary of Control Actions
Proportional, integral and derivative (PID) control 23.1 Single Loop Controller
is often referred to as 3-term control. P action was
The 3-term controller, often referred to as a sin-
introduced in Chapter 22. It provides the basis for
PID control, any I and/or D action is always su- gle loop controller (SLC), is a standard sized unit
perimposed on the P action. This chapter is con- for panel mounting alongside recorders and other
cerned with the functionality of PID control and its control room displays and switches. Multiple SLCs
open and closed loop behaviour. An equation for are typically rack mounted. It is a single unit which
PID control is first developed in analogue form, as contains both the comparator and the controller
used in pneumatic and electronic controllers. This proper. Thus it has two input signals, the measured
is then translated into a discrete form for imple- value and the set point, and one output signal. It
mentation as an algorithm in a digital controller. would also have its own power and/or air supply.
The principles discussed in this chapter and The facia of a typical SLC is depicted in Fig-
the equations developed are essentially the same ure 23.1. Often referred to as a faceplate, it has a
whether the PID controller is a dedicated single scale for reading values of the measured value and
loop controller, a function provided within some set point. The range of the scale normally corre-
other control loop element such as a dp cell, or is sponds to the calibration of the measuring element,
a configurable function within a distributed con- or else is 0–100% by default. With pneumatic con-
trol system capable of supporting multiple loops trollers the signals would be indicated by pointers.
With electronic controllers liquid crystal displays
simultaneously.
(LCD) or light emitting diode (LED) bar displays
are used whereas with digital controllers a VDU
representation of the faceplate is common prac-
tice. Faceplates also show relevant alarm limits. A
156 23 PID Control
θR e
MV SP OP KC
+
150 100 –
θ1
Equation 23.3. This is clearly a source of confu- a so-called over-damped response. The change in
sion: it is best to avoid using the term bandwidth set point causes a step increase in error and, be-
and to consistently work with gain. cause the controller is reverse acting, produces a
sudden closing of the valve. Thereafter the valve
125°C [0–100 %] slowly opens as the error reduces and the level
5 gently rises towards the new set point with a steady
+
– state offset.Increasing KC produces a faster asymp-
totic approach towards a smaller offset.
[100–150 °C]
However, there is some critical value beyond
which increasing KC causes the response to be-
Fig. 23.3 Temperature controller for explaining bandwidth come oscillatory, as depicted in the second trace.
In effect, the controller is so sensitive that it has
Note that outside the range of 115 < 1 < 135◦C over-compensated for the increase in set point by
the controller output is constrained by the limits closing the valve too much. This causes the level
of the output signal range. Thus 0 would be ei- to rise quickly and overshoot the set point. As the
ther 100% for all values of 1 < 115◦C or 0% for level crosses the set point the error becomes neg-
1 > 135◦ C. When a signal is so constrained it is ative so the controller increases its output. The re-
said to be saturated. sultant valve opening is more than that required
In Chapter 22 the steady state response of a to compensate for the overshoot so the level falls
closed loop system was considered. In particular, below the set point. And so on. Provided the value
the way in which increasing KC reduces offset was of KC is not too high these oscillations decay away
analysed. Also of importance is an understanding fairly quickly and the under-damped response set-
of how varying KC affects the dynamic response. tles out with a reduced steady state offset. Increas-
It is convenient to consider this in relation to the ing KC further causes the response to become even
same level control system of Figure 22.1.The closed more oscillatory and, eventually, causes the system
loop response to step increases in set point hR and to become unstable.
inlet flowrate F1 are as shown in Figures 23.4 and A similar sort of analysis can be applied to Fig-
23.5, respectively. ure 23.5. The principal effects of P action are sum-
Two traces are shown on Figure 23.4. The expo- marised in Table 23.1 on page 163.
nential one corresponds to a low gain and depicts
t t
0 KC
Fig. 23.4 Closed loop response to step change in set point Fig. 23.5 Closed loop response to step change in inlet flow
158 23 PID Control
Δh
ΔhR
PID
P
PI
t
0
Fig. 23.7 Closed loop P, PI and PID response to a step change in set point
than for P action alone. The oscillations are larger the addition of a derivative term to Equation 23.4
in magnitude and have a lower frequency. In effect as follows:
the I action, which is working in the same direc- t
1 de
tion as the P action, accentuates any overshooting 0 = B ± KC e + edt + TD (23.6)
that occurs. It is evident that I action has a desta- TR 0 dt
bilising effect which is obviously undesirable. The
TD is known as the rate time and characterises the
principal effects of I action are also summarised in
D action. Adjusting TD varies the amount of D ac-
Table 23.1.
tion, setting it to zero turns off the D action alto-
Equation 23.4 is the classical form of PI con-
gether. TD has the dimensions of time: for process
troller. This is historic, due to the feedback inher-
control purposes it is normal for TD to have units
ent in the design of pneumatic and electronic con-
of minutes.
trollers. Note the interaction between the P and I
The open loop response of a PID controller to a
terms: varying KC affects the amount of integral
sawtooth change in error is depicted in Figure 23.8.
action because KC lies outside the bracket. An al-
Again assume that the controller is forward acting,
ternative non-interacting form is as follows:
is in its AUTO mode and has a 4–20-mA output
range. Suppose that the error is zero for t < 0 and
1 t
for t > t , and that the error is a ramp of slope m
0 = B ± KC e + edt (23.5) for 0 < t < t .
TI 0
Substituting e = mt into Equation 23.6 gives:
TI is known as the integral time. It can be seen by KC mt2
inspection that TI = TR /KC . 0 = B + KC mt + + K C TD m
TR 2
The response shows an initial step change in out-
put of magnitude KC TD m due to the D action. This
23.4 Derivative Action is followed by a quadratic which is due to the P
The purpose of D action is to stabilise and speed up and I actions. At t = t there is another step change
the response of a PI controller. This is realised by as the contribution to the output of the P and D
160 23 PID Control
e slope m Δh PID
e’
Δh r
t
0 t
0
θ0 e
20
t
K C m t’ + KC TD m 0
t
K C TD m ∫0 e dt
θB
K C . mt’2
4 TR 2
t
t 0
0 t’
de
dt
Fig. 23.8 Open loop response of PID controller to a sawtooth t
change in error 0
plant can suffer damage from sudden changes. For 23.6 Derivative Feedback
example, suddenly turning off the flow of cooling
water to a jacket may cause a vessel’s glass linings Another source of step change in error occurs
to crack. Suddenly applying a vacuum to a packed when the controller is in its AUTO mode and the set
column will cause flashing which leads to the pack- point is suddenly changed.Of particular concern is
ings breaking up. Such sudden changes in output the D action which will initially respond to a large
value of de/dt and may cause the output to jump
are invariably caused by the controller being forced
to respond to step changes in error. to saturation. To counter this derivative feedback
One source of step change in error occurs when may be specified, as follows:
t
a controller is transferred from its MAN mode of 1 d1
operation into AUTO. If the measured value is not 0 = B ± KC e + e.dt − TD (23.7)
TR 0 dt
at its set point, depending on the settings, the con-
Note that the D action responds to changes in the
troller output may well jump to saturation. A sim-
measured value rather than to the error. Also note
ple way round this problem is to adjust the output
the minus sign which allows for the fact that the
in MAN mode until the measured value and set
measured value moves in the opposite direction to
point coincide prior to switching into AUTO.
the error signal. Whilst the set point is constant
Alternatively,a bumpless transfer function may
the controller behaves in exactly the same way as
be specified. In effect, on transfer into its AUTO
the classical controller of Equation 23.6. However,
mode, the set point is adjusted to coincide with
when the set point changes, only the P & I actions
the measured value and hence zero error. This re-
respond. This form of 3-term control is common
sults in the controller being started off in AUTO
in modern digital controllers.
mode with the wrong set point, but that may then
be ramped up or down to its correct value at an ap-
propriate rate. The integral action is also initialised
by setting it to zero and whatever was the output
signal in MAN mode at the time of transfer nor-
23.7 Integral Windup
mally becomes the value of the bias in AUTO. Another commonly encountered problem is in-
Thus, tegral windup. If the controller output saturates
whilst an error exists, the I action will continue to
R = 1 |t=0 integrate the error and, potentially, can become a
0 very large quantity. When eventually the error re-
e.dt = 0 duces to zero, the controller output should be able
−∞ to respond to the new situation. However, it will be
B = 0 |t=0 unable to do so until the error has changed sign
and existed long enough for the effect of the inte-
Set point tracking is an alternative means of re- gration prior to the change of sign to be cancelled
alising bumpless transfer. Thus, whilst the con- out. The output remains saturated throughout this
troller is in MAN mode, the set point is continu- period and the controller is effectively inoperative.
ously adjusted to whatever is the value of the mea- A simple way round this problem is to switch the
sured value. This means that when the controller is controller into its MAN mode when the saturation
switched into AUTO mode, there is zero error and occurs. Switching it back into AUTO when the sit-
transfer is bumpless. Again, the integral action is uation permits causes the I action to be initialised
initialised by setting it to zero. at zero.
For transfers from AUTO into MAN mode the A more satisfactory way of addressing the is-
output is normally frozen at whatever was its value sue is to specify an integral desaturation facility. In
in AUTO at the time of transfer. effect, whilst saturation of the output occurs, the I
162 23 PID Control
action is suspended. This may be achieved by the i.e. when t ≈ 15.4 min. Note that this must be an
I action considering the error to be zero during open loop test: the input signal is ramping down at
saturation. Alternatively, in digital controllers, the a constant rate and appears to be independent of
instructions used for calculating the I action may the controller output.
be by-passed during periods of saturation, as illus-
trated later on.
23.9 Other Analogue Forms
of PID Controller
23.8 Worked Example Equation 23.6 is the classical form of PID controller
and Equation 23.7 is the most common form used
A classical 3-term controller which is forward act- in digital controllers. There are, however, many
ing has the following settings: variations on the theme which are supported by
40% bandwidth, 5 min reset time, 1 min rate time. most modern controllers. For example, to make
the controller more sensitive to large errors the P
Also it is known that an output of 10 mA in MAN- action may operate on the square of the error:
UAL is required for bumpless transfer to AUTO.
This information is sufficient to deduce the pa- 1 t d1
0 = B ± KC Sign(e).e + 2
e.dt − TD
rameters of Equation 23.6: TR 0 dt
1 t de To make the controller penalise errors that persist
0 = 10 + 2.5 e + e.dt +
5 0 dt the I action may be time weighted, with some fa-
Suppose the controller is at steady state in AUTO cility for reinitialising the I action:
when the measured value starts to decrease at the t
1 d1
rate of 0.1 mA/min. 0 = B ± KC e + e.t.dt − TD
TR 0 dt
Thus, if t < 0 then e = 0 and 0 = 10 mA, and
if t ≥ 0 then: It is important to be aware of exactly what form
d1 of 3-term control has been specified and what is
= −0.1.
dt being implemented.
However,e = R −1 .Assuming R is constant then:
de
=−
d1
= +0.1, 23.10 Discretised Form of PID
dt dt
Equation 23.7 is an analogue form of PID control
whence e = +0.1 t.
and has to be translated into a discretised form for
Substituting for e into the PID equation gives:
implementation in a digital controller. It may be
1 t d(0.1 t) discretised as follows:
0 = 10 + 2.5 0.1 t + (0.1 t) dt + ⎛
5 0 dt
⎞
1 j
1,j − 1,j−1
0,j ≈ B ± KC ⎝ej + T ek .t − TD ⎠
= 10.25 + 0.25 t + 0.025 t2 R
k=1
t
⎛ ⎞
Inspection reveals a small jump in output at t = 0 of j
KC .TD
reaches 20 mA, i.e. when: = B ± ⎝KC .ej + KI. ek − KD . 1,j − 1,j−1 ⎠ (23.8)
k=1