0% found this document useful (0 votes)
80 views9 pages

PID Control: Single Loop & Actions

This document discusses PID control. It begins by introducing the single loop controller, which contains both a comparator and controller. It has two input signals (measured value and set point) and one output signal. It then explains proportional action, the basis for PID control. Proportional control provides an output that is proportional to the error between the measured value and set point. The proportional gain determines the sensitivity of the controller. Higher gain results in a faster response but can also cause instability if set too high.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views9 pages

PID Control: Single Loop & Actions

This document discusses PID control. It begins by introducing the single loop controller, which contains both a comparator and controller. It has two input signals (measured value and set point) and one output signal. It then explains proportional action, the basis for PID control. Proportional control provides an output that is proportional to the error between the measured value and set point. The proportional gain determines the sensitivity of the controller. Higher gain results in a faster response but can also cause instability if set too high.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

PID Control

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

Fig. 23.2 Symbols for signals of PID controller

125 50 23.2 Proportional Action


With reference to Figure 23.2 the equations of the
comparator and of a proportional controller are:
e = R − 1 (23.1)
0 = B ± KC .e (23.2)
The gain KC is the sensitivity of the controller, i.e.
100 0
the change in output per unit change in error. Gain
is traditionally expressed in terms of bandwidth,
SP A OP often denoted as %bw, although there is no obvi-
M
ous advantage from doing so. Provided the various
signals all have the same range and units, gain and
Fig. 23.1 Facia of a typical single loop controller bandwidth are simply related as follows:
100
KC = (23.3)
dial and/or dedicated pushbuttons enables the set %bw
point to be changed locally, i.e. by hand. Otherwise Thus a high bandwidth corresponds to a low gain
the set point is changed on a remote basis. There and vice versa. However, if the units are mixed, as
is often a separate scale to indicate the value of the is often the case with digital controllers, it is neces-
output signal, range 0–100%, with provision for sary to take the ranges of the signals into account.
varying the output by hand when in MAN mode. Strictly speaking, bandwidth is defined to be the
A switch enables the controller to be switched be- range of the error signal, expressed as a percent-
tween AUTO and MAN modes. age of the range of the measured value signal, that
All of the above functions are operational and causes the output signal to vary over its full range.
intended for use by plant personnel. Other func- The issue is best illustrated by means of a nu-
tions of the controller are technical and are nor- merical example. Consider Figure 23.3 in which
mally inaccessible from the faceplate. Thus, for ex- 1 and 0 have been scaled by software into en-
ample, the PID settings and the forward/reverse gineering units of 100–150 ◦ C and 0–100% re-
switch are typically adjusted either by dials inter- spectively. Suppose that the controller is forward
nal to the controller or by restricted access push- acting, KC = 5, R is 125◦ C and B is 50%.What this
buttons. Despite its name, a modern digital SLC means in practice is that signals within the range
will provide two or more 3-term controllers,handle 115 < 1 < 135◦ C,i.e. an error of ±10◦ C,will cause
several discrete I/O signals, and support extensive the output signal to vary from 0–100%. According
continuous control and logic functions. Access to to the definition of bandwidth,bw = 20/50×100 =
this functionality is restricted to engineering per- 40%, which is different from the value that would
sonnel, typically by means of a serial link. have been obtained by substituting KC = 5 into
23.2 Proportional Action 157

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

Δh ΔF1 = 0 Δh R = const. Δh Δh R = 0 ΔF1 = const.


Kc
ΔhR

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

23.3 Integral Action e

The purpose of I action is to eliminate offset. This e’


is realised by the addition of an integral term to t
Equation 23.2 as follows: 0
  t 
1
0 = B ± KC e + edt (23.4) θ0
TR 0

TR is known as the reset time and characterises 20


the I action. Adjusting TR varies the amount of I
action. Note that, because TR is in the denomina-
tor, to increase the effect of the I action TR has to be 2 KC e’
reduced and vice versa. The I action can be turned K C e’
off by setting TR to a very large value. TR has the θb
dimensions of time: for process control purposes 4
it is normal for TR to have units of minutes. t
The open loop response of a PI controller to a
0 TR
step change in error is depicted in Figure 23.6. As-
sume that the controller is forward acting, is in its Fig. 23.6 Open loop response of PI controller to a step change in
AUTO mode and has a 4–20 mA output range. Sup- error
pose that the error is zero until some point in time,
t = 0, when a step change in error of magnitude e The closed loop response of a PI controller with
occurs. appropriate settings to a step change in set point is
Substituting e = e into Equation 23.4 and in- depicted in Figure 23.7.
tegrating gives: Again it is convenient to consider the level con-
trol system of Figure 30.1. Initially the P action
Kc
0 = B + Kc e + et dominates and the response is much as described
TR for the under-damped case of Figure 23.4.However
The response shows an initial step change in out- as the oscillations decay away, leaving an offset,
put of magnitude KC e due to the P action. This is the I action becomes dominant. Whilst an error
followed by a ramp of slope KC /TR .e which is due persists the integral of the error increases. Thus
to the I action. When t = TR then: the controller output slowly closes the valve and
nudges the level towards its setpoint. As the error
0 = B + 2KC e reduces,the contribution of the P action to the con-
troller output decreases. Eventually, when there is
This enables the definition of reset time. TR is the zero error and the offset has been eliminated, the
time taken, in response to a step change in error, controller output consists of the bias term and the
for the I action to produce the same change in out- I action only. Note that although the error becomes
put as the P action. For this reason integral action zero the integral of the error is non-zero:
is often articulated in terms of repeats per minute: 
KC t
1 0 = B − edt
Repeats/min = TR 0
TR
Thus the P action is short term in effect whereas
Note that the output eventually ramps up to its the I action is long term. It can also be seen from
maximum value, 20 mA, and becomes saturated. Figure 23.7 that the response is more oscillatory
23.4 Derivative Action 159

Δ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

actions disappears. The residual constant output is


due to the I action that occurred before t = t . Fig. 23.9 Closed loop PID response to a step change in set point
The closed loop response of a PID controller
with appropriate settings to a step change in set nitude of the error. If the error is constant, D ac-
point is as depicted in Figure 23.7. It can be seen tion has no effect. However, if the error is chang-
that the effect of the D action is to reduce the ing, the D action boosts the controller output. The
amount of overshoot and to dampen the oscilla- faster the error is changing the more the output is
tions. This particular response is reproduced in boosted. An important constraint on the use of D
Figure 23.9 with the corresponding plots of e, action is noise on the error signal. The spikes of a
Int(edt) and de/dt vs time. noisy signal have large slopes of alternating sign.
Again, referring to the level control system of If the rate time is too large, D action amplifies the
Figure 22.1, it is evident that as the level crosses the spikes forcing the output signal to swing wildly.
set point and rises towards the first overshoot, the The principal effects of D action are summarised
sign of de/dt is negative. This boosts the controller in Table 23.1.
output so that the valve opening is more than it In addition to the effects of P, I and D actions,
would be due the P and I actions alone,with the ob- there are a number of other operational character-
vious effect of reducing the amount of overshoot. istics of 3-term controllers to be considered.
As the level passes the first overshoot and starts to
fall the sign of de/dt becomes positive and the valve
is closed more than it would be otherwise. And so
on. In effect the D action is anticipating overshoot
23.5 Bumpless Transfer
and countering it. If changes in controller output are required, it is
D action depends on the slope of the error and, good practice to move in a regulated rather than a
unlike P and I action, is independent of the mag- sudden manner from one state to another. Process
23.6 Derivative Feedback 161

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

= B ± ⎝KC .ej + KC .t ek − 1,j − 1,j−1 ⎠


0.25 mA followed by a quadratic increase in output TR t
k=1
⎛ ⎞
with time. The controller output saturates when it j

reaches 20 mA, i.e. when: = B ± ⎝KC .ej + KI. ek − KD . 1,j − 1,j−1 ⎠ (23.8)
k=1

20 = 10.25 + 0.25 t + 0.025 t2


where j represents the current instant in time and
t2 + 10 t − 390 = 0 t is the step length for numerical integration.This
23.11 Incremental Form of PID 163

is the non-interacting discretised form of PID con- 23.12 Mnemonics and


troller in which:
KC .t KC .TD
Nomenclature
KI = KD = BI B output bias
TR t
E e error
Equation 23.8 may be implemented by the follow-
IA – integral action
ing algorithms written in structured text. These
IP 1 measured value
algorithms would be executed in order, at a fre- KC KC proportional gain
quency known as the sampling period which cor- KD KD derivative action
responds to the step length t. Note that Line 2 es-
TD rate time
tablishes whether the controller output is saturated
KI KI integral gain
and, if so, by-passes the instruction for calculating
TR reset time
the I action on Line 3. Lines 5 and 6 constrain the TI integral time
controller output to its specified range: OP 0 controller output
E= SP-IP PIP previous measured value
if (OP=0 or OP=100) then goto L SP R set point
IA=IA+KI*E
L OP=BI+(KC*E+IA-KD*(IP-PIP))
if OP<0 then OP=0 23.13 Summary of Control
if OP>100 then OP=100
Actions
Sometimes the bias is deemed to be equivalent to
some notional integral action prior to the loop be- The affect of changing the controller settings on
ing switched into its AUTO mode. It is then in- the closed loop response of a PID controller is sum-
cluded in the algorithm implicitly as the initial marised in Table 23.1.
value of the integral action:
⎛ ⎞ Table 23.1 Summary of control actions

j

0,j = ±⎝KC .ej + KI . ek − KD . 1,j − 1,j−1 ⎠ Action Change Effect


k=−∞
P Increase KC Increases sensitivity
(23.9)
Reduces offset
Makes response more oscillatory

23.11 Incremental Form of PID System becomes less stable

I Reduce TR Eliminates offset faster


Equation 23.8 determines the absolute value of the
Increases amplitude of oscillations
output signal at the jth instant. There is an alterna-
Settling time becomes longer
tive, commonly used, incremental form which de-
Response becomes more sluggish
termines the change in output signal. At the j-1th
System becomes more unstable
instant the absolute output is given by
⎛ ⎞

j−1 D Increase TD Stabilises system

0,j−1 = B ± ⎝KC .ej−1 + KI . ek − KD . 1,j−1 − 1,j−2 ⎠ Reduces settling time


k=1
Speeds up response
Subtracting this from Equation 23.8 yields the in- Amplifies noise
cremental form:


0,j = ± KC . ej − ej−1 + KI .ej


 (23.10)

− KD . 1,j − 21,j−1 + 1,j−2

You might also like