Marlin Ch08
Marlin Ch08
Algorithm
8.1 m INTRODUCTION
Continuous feedback control offers the potential for improved plant operation by
maintaining selected variables close to their desired values. In this chapter we
will emphasize the control algorithm, while remembering that all elements in the
feedback loop affect control performance. Engineers should fully understand the
algorithm for three reasons. First, the performance of the entire feedback system
depends on the structure of the algorithm and the parameters used in the algorithm.
Second, all other elements are process equipment and instrumentation, which are
costly and time-consuming to alter, so a key area of flexibility in the loop is the
control calculation. Third, while engineers use only a few algorithms, as will be
explained, they are responsible for determining the values of adjustable parameters
in the algorithms.
In this chapter, we will learn about the proportional-integral-derivative (PID)
control algorithm. The PID algorithm has been successfully used in the process
industries since the 1940s and remains the most often used algorithm today. It
may seem surprising to the reader that one algorithm can be successful in many
applications—petroleum processing, steam generation, polymer processing, and
many more. This success is a result of the many good features of the algorithm,
which are covered initially in this chapter and expanded on and evaluated in later
chapters.
This algorithm is used for single-loop systems, also termed single input-
single output (SISO), which have one controlled and one manipulated variable.
Usually, many single-loop systems are implemented simultaneously on a process,
240 and the performance of each control system can be affected by interaction with the
immmmmmmmmMm other loops. However, the next few chapters will concentrate on ideal single-loop
CHAPTER 8 systems, in which interaction is negligible or nonexistent; extensions, including
The PID Algorithm interaction, are covered in Parts V and VI.
As we cover the PID control algorithm here and in subsequent chapters, we
will address important theoretical issues in feedback control including stability,
frequency response, tuning, and control performance. Thus, by covering the PID
controller in depth, we will acquire key analytical techniques applicable to all
feedback control systems, including PID and alternative control algorithms, along
with important knowledge about current practice.
with E denoting the error: the difference between the (desired value) set point
and (measured) controlled variable. It would seem unreasonable to demand that
the control system return to set point for all fluctuations in inputs. Therefore, we
select the most important, most often occurring input (disturbance) variation from
among the following cases:
1. The input variable varies but ultimately returns to its initial value; an example
is a pulse. For this input type most (but not all) processes would require no
feedback control to satisfy the condition in equation (8.1).
2. The input variable varies for some time and then attains a steady value different
from its initial value; this type we shall term steplike, because the transition
from initial to different final value does not have to be a perfect step. Feedback
control is required to achieve zero steady-state offset.
3. The input variables never attain a steady state; for this discussion, a ramp input
is often considered, D(t) = at, D(s) = a/s2.
Case 2 is the most typical situation, while case 3 occurs occasionally, as in a batch
system where the set point is changed as a ramp. For case 2, the expression in
equation (8.1) becomes
performance in this chapter, a step input, X(s) = \/s, will be used, because it
represents the most commonly occurring situation; other inputs will be considered
in later chapters.
Insensitivity to Errors
As we learned in Part II, we can never model a process exactly. Because parameters
in all control algorithms depend on process models, control algorithms will always
be in error despite our best modelling efforts. Therefore, control algorithms should
provide good performance when the adjustable parameters have "reasonable" er
rors. Naturally, all algorithms will give poor performance when the adjustable
parameter errors are very large. The range of reasonable errors and their effects on
control performance are studied in this and several subsequent chapters.
Wide Applicability
The PID control algorithm is a simple, single equation, but it can provide good con
trol performance for many different processes. This flexibility is achieved through
several adjustable parameters, whose values can be selected to modify the behavior
of the feedback system. The procedure for selecting the values is termed tuning,
and the adjustable parameters are termed tuning constants.
Timely Calculations
The control calculation is part of the feedback loop, and therefore it should be
calculated rapidly and reliably. Excessive time for calculation would introduce an
extra slow element in the control loop and, as we shall see, degrade the control
performance. Iterative calculations, which might occasionally not converge, would
result in a loss of control at unpredictable times. The PID algorithm is exceptionally
simple—a feature that was crucial to its initial use but is not as important now due
to the availability of inexpensive digital computers for control. Because of its wide
use, the PID controller is available in nearly all commercial digital control systems,
so that efficiently programmed and well-tested implementations are available.
Enhancements
No single algorithm can address all control requirements. A convenient feature of
the PID algorithm is its compatibility with enhancements that provide capabilities
not in the basic algorithm. Thus, we can enhance the basic PID without discarding
it. Many of the common enhancements are presented in Part IV.
The main goal of this chapter is to explain the PID algorithm fully. Each ele
ment of the algorithm is termed a mode and uses the time-dependent behavior of the
feedback information in a different manner, as indicated by the name proportional-
integral-derivative. Each mode of the equation and the key capability it provides
242 „-■ Proportional • Error Set
_.«- + point
<?*: ■- - ; > C K - S P d )
CHAPTER8
The PID Algorithm Derivative Eit)
Measured
variable
o
Manipulated
variable
MV(0 Sensor
-$3- Process
Final CV(i)
Controlled
element
variable
FIGURE 8.1
Overview schematic of a PID control loop.
are discussed thoroughly. The complete PID equation, which is the sum of the
three modes as shown in Figure 8.1, is then reviewed, and a few example control
responses are presented. The reader is cautioned that there is no consistency in
commercial control equipment regarding the sign of the subtraction when form
ing the error; the convention used in this book is Eit) — SP(f) — CV(f). Some
preprogrammed equipment uses the opposite sign, a factor that does not affect
the principles of this book but certainly affects the performance of actual control
systems! (Since the error is multiplied by one of the adjustable tuning constants,
the sign of the constant can be adapted to the sign of the error to give the desired
direction of the control manipulation.)
CVJs)
Gsis)
control system is termed the manipulated variable, MV(s). The desired value,
which must be specified independently to the controller, is called the set point,
SPis); it is also called the reference value in some books on automatic control.
The difference between the set point and the measured controlled variable is termed
the error, Eis). An input that changes due to external conditions and affects the
controlled variable is termed a disturbance, Dis), and the relationship between the
disturbance and the controlled variable is the disturbance transfer function, Gjis).
First, the transfer function of the controlled variable to the disturbance variable,
CVis)/Dis), is derived, with the change in the set point, SPis), taken to be zero.
The system involves a recycle, since the process output variable is used in de
termining the process input variable—our definition of feedback; therefore, special
care must be taken in deriving the transfer function. The four-step procedure pre
sented in Chapter 4 is used here. The first step is to begin with the variable in the
numerator of the transfer function, which in this case is CV(^). In the second step,
the expression for this variable as a function of input variables is derived in reverse
direction to the information flow in the block diagram. The result is
CVis) = Gpis)Gvis)MVis) + Gdis)Dis)
(8.3)
= Gpis)Gvis)Gcis)Gsis)[CVis)] + GdDis)
This procedure is followed until one of two situations is reached: the numerator
variable can be expressed as a function of the denominator variable alone (which
occurs for series systems), or the numerator variable can be expressed as a function
of itself and the denominator variable (which occurs for a simple feedback system).
The expression in equation (8.3) is clearly of the second type. The third step in
the procedure is to rearrange the equation so that the variables are separated as
follows:
In summary, the block diagram procedure for deriving a transfer function involves
four steps:
For simple systems like the one in Figure 8.2, the foregoing procedure will yield
the transfer function. In more complex systems, it will not be possible to eliminate
all intermediate variables immediately in step 2. Therefore, steps 2 and 3 must be
performed several times, as will be demonstrated in later chapters.
The use of block diagrams entails one potential difficulty, especially for the
person just learning process control. Since the block diagram represents the model
of the system, there is no distinction in the symbols used for various physical com
ponents in the system. For example, the block diagram in Figure 8.2 represents a
system composed of elements from the process, Gpis) and G</(s); instrumenta
tion, Gv(s) and Gs (s); and a control calculation performed by a computing device,
Geis).
Two generalizations can be made about the closed-loop transfer functions to
assist in checking the derived transfer functions using block diagram manipula
tions. First, the numerator is simply the product of all transfer functions between
the input (denominator variable) and the output (numerator variable). Second, the
denominator of the right-hand side is of the form 1 + G"(s). The term G"(s) is
the product of all elements in the feedback loop. These guidelines can be checked
by applying them to equations (8.5) and (8.6).
Finally, the transfer function notation is often simplified by lumping all in
strumentation and process dynamics into one term, Gp(s). This is equivalent to
the following expression.
1. The block diagram provides a visual "picture of the equations" showing the
feedback loop.
2. The general closed-loop transfer function model can be applied to any specific
system by substituting the transfer function models for the loop elements.
3. Entries in the overall transfer function denominator demonstrate that only the
elements in the feedback loop affect the system stability; neither the disturbance
nor the set point change affects stability.
MV(r) - MV,
The results of the block diagram analysis are not restricted to the proportional-
integral-derivative (PID) controller. Any linear controller algorithm [Gc(s)] would
yield the conclusions in the boxed highlight above.
&r alyzed. Recall that the feedback and disturbance processes are third-order. The
c*r
VA2 steady-state value for error under proportional control can be determined by re
arranging equation (8.11), substituting the models for Gpis) and Gdis), and apply
f a
t^rt* ing the final value theorem to the system with a steplike disturbance, Dis) = AD/s.
Recall that the valve transfer function is included in Gpis), and the sensor transfer
function is assumed to be unity, implying instantaneous, error-free measurement.
K, Kd
Gsis) = 1 GPis)Gvis) = Gdis) = Gds) = Ke
izs +1)3 izs + l)3
do
EXAMPLE 8.2.
Another important property of a control system is a fast response to a disturbance
or set point change. The expression for a disturbance response is analyzed using
" X°~ equation (8.11) for a simple process with the disturbance and feedback processes
being first-order with the same time constant. This system can be thought of as the
heat exchanger in Example 3.7 and has been selected to simplify the analytical 247
X „ Proportional Mode
GP(s) =z s—±t+ Gd(s)
1 z s + \ Gds) = Kt
= —2-
K„ K{
(8.13)
CVjs) _ ts + l _ \ + KcK£.
Dis) KCK_
zs + \ I 1 + K c K j
with KcKp>0 for negative feedback control. The analytical solutions for the step
disturbance response, Dis) = AD/s, for the process with and without proportional
control are
CV'(f) = 1 .A^5t
+ KcKp(] " e-'/lx/(l+KcK")]) (proportional control) (8.15)
Equation (8.15) demonstrates that the feedback controller alters both the time
constant of the closed-loop system and the final deviation from set point by a
factor of 1/(1 + KCKP) for a first-order process. This means that the feedback
system responds faster than the open-loop system to a step disturbance and has
a smaller deviation from set point. Both of these modifications to the system
behavior are generally desired. The results in equation (8.15) indicate that as the
controller gain is increased, the final value of the error decreases in magnitude
and the system reaches steady state faster. We might be tempted to generalize this
result (improperly) to all systems and apply high controller gains to all processes.
To test this idea on a more complex process, several dynamic responses for
the linearized model of the three-tank mixing process under proportional control
are shown in Figure 8.4a through d. Again, the input is a step disturbance in the
feed concentration. The case without control iKc = 0) shows the response of a
third-order system to a step input; it is overdamped and reaches a final value of the
disturbance magnitude. As the controller gain is increased to 10, the final value
of the error decreases, as predicted by equation (8.12). Also, the time to reach the
steady state decreases; that is, the dynamic response becomes faster, as predicted.
As the controller gain is increased to 100, the nature of the dynamic response
changes from overdamped to underdamped. As the controller gain is increased
further to 220, the system becomes unstable!
These results demonstrate an important feature of feedback control systems:
the closed-loop response can become underdamped and ultimately unstable as the
controller parameters are adjusted to make the controller very aggressive (increas
ing the controller gain, Kc). This example suggests, and later theoretical analysis
will confirm, that it is generally not possible to maintain the controlled variable
close to the set point by setting the controller gain to a very large value (although
this approach would work for the first-order process in Example 8.2). The reasons
for the instability and methods for predicting the stability limits are presented in
Chapter 10 after the control algorithm has been fully explained.
3 2> ti 5- 2
o 5 O <
Q.
n 33 c
B
S SB 5?
n w
3 o II
o O
«
»-■ in o
a* Wl
to B
a* s
CO H
sr 3
•< n
SP
O
T
ao ti Controller Concentration Controller Concentration
s 5 output (%) (%A) output (%) (% A)
c
00 co;o
n
rlt u
asrd
ti D
u
b
srti 9n o o b b
o 1—I—r
ai s <
GO 3 N—'
~ 32
3 ■a -s
J to n *
Q u. OT o 2.* 3
O S- •o
T O
53 O T3 J? O
*a
H •S CL o
o o
m s cCDa o o
•i1! n "
o O
T 3 3 H
30 O **r?
~* 3
i t o>
> 3 on
ita
r m fh
sop ort
i-i
o Q . « »*
< 8 «» o ?
s N ^ *
CL CO
n*3Ss S
o O
T aB b-
ii =r
O N CO
O £
CO la a?t
m to 3 ■3a
S
CO
" o TO* O j l_L
O
5 O 3? •a H fl
"II "•»
©Ta O
a* T 3o
jst to ■5 goo no
*< «■*, C l X ^ 3 Controller Concentration Controller Concentration
O
T ^ > 2
tt> P ca
1- output (%) (%A) output (%) (%A)
B ( I Q (»
3 r r • t ^W 5a ws 4s.
to r » * •8 3* ^ 3 o o o b
Cl o 1 1 1 1
^Tt
3 O
•s *§*
a. B» 3 ii *
CO
8'•a coTO- t9*c" °O ^T *1
3 kp^n "
&
° *S
© *2g <
s. fT t OyT - _
V: O S
O
T S «-* t o n3 Jr
— ««C. O - -
3 o to /-s a
O •-^ © >a» /—N H
* t - -
& s 3 S 3
T n
& O nrtol »A
:]) n
oc - -
ft 3 ■CT* *1
CL ■ o
CO 3* >j£,3
'O
cr c (1 l.a - -
to S 3
Cl 5? H - & S
O O TO
i cl Q.
»•
o Xc «■* ro 1 1 1 1 1 I 1 1 1
o
o o
the conventional form of the integral mode used in the commercial PID controller. 249
This form is used throughout the book for consistency and so that later correlations
for parameter values can be used. Again, the integral mode equation has a constant Derivative Mode
of initialization.
The behavior of the integral mode is summarized in Figure 8.5. For a constant
error, the manipulated variable increases linearly with a slope of Eit)Kc/ Ti. This
behavior is different from the proportional mode, in which the value is constant
over time for a constant error.
EXAMPLE 8.3.
The effect of the integral mode can be determined by evaluating the offset of lA0
the three-tank mixing process under integral-only control for a step disturbance, VA1
f e
Dis) -AD/s. lA2
*
K, Ka lA3
Gvis)GJs) = Gdis) = Gds) =Tjs£ Gsis) = 1 f a <t
(zs + W ~av" (zs + W
" " " " " " *■ (;itt)(;^t)(;itt) H
$
(8.17)
CV'(f) |,=00 = lim
. ' ♦ * f e s W = i T ) ( s i r ) ( = W J
=0
The integral control mode achieves zero steady-state offset, which is the primary
reason for including this mode.
n
Again, some dynamic responses of the three-tank mixing process are plotted,
this time with an integral controller, in Figure 8.6a and b. As can be seen, the
manipulation of the controller output is slower for integral-only control than for
proportional-only control. As a result, the controlled variable returns to the set
point slowly and experiences a larger maximum deviation. If the integral time is
reduced small enough, as in Figure 8.66, the controller will be very aggressive,
and the system will become highly oscillatory; further reduction in Tj can lead
to an unstable system. Under integral-only control with properly selected tuning
constants, the controlled variable returns to its set point, but the other aspects of
control performance are usually not acceptable. In summary:
The integral mode is simple; achieves zero offset; adjusts the manipulated variable in
a slower manner than the proportional mode, thus giving poor dynamic performance; <J 6 i i ' I I I I I L
and can cause instability if tuned improperly. 200
Time
FIGURE 8.6
8 . 6 □ D E R I VAT I V E M O D E Three-tank mixing process under
If the error is zero, both the proportional and integral modes give zero adjustment integral-only control subject to a
disturbance in feed composition ixA)B of
to the manipulated variable. This is a proper result if the controlled variable is not 0.8%A and Kc = [%open/%A],
changing; however, consider the situation in Figure 8.7 at time equal to / when Tl = [mhi\:ia)Kc = hTl = U
the disturbance just begins to affect the controlled variable. There, the error and ib) Kc = 1, 77 = 0.25.
250 integral error are nearly zero, but a substantial change in the manipulated variable
would seem to be appropriate because the rate of change of the controlled variable
CHAPTER 8 is large. This situation is addressed by the derivative mode:
The PID Algorithm
dEit)
Derivative mode: MVd(t) = KcTd-j^
dt + Id
(8.18)
Gc = ~E(sT= Cd
The final adjustable parameter is the derivative time Td, which has units of time,
and the mode again has an initialization constant. Note that the proportional gain
and derivative time are multiplied together to be consistent with the conventional
PID algorithm.
Some further insight can be gained by examining the following development of
Time a proportional-derivative controller (Rhinehart, 1991). Again consider the dynamic
FIGURE 8.7 response in Figure 8.7, in which the data available at the current time t, which is
at the beginning of the disturbance response; is shown by the solid line. The future
Assumed effect of disturbance on
controlled variable. response that would be obtained without feedback control is shown as the dotted
line; note that this is simply the disturbance response. The value of the Es, the total
effect of the disturbance on the controlled variable as time approaches infinity, can
be predicted using the assumption that the error is following a first-order response
with a time constant equal to the disturbance process time constant:
dE
zd— + E = Es (8.19)
dt
Since the error will increase to Es ultimately, the manipulated variable will have to
be adjusted by a value proportional to Es, or MV = Es/Kc. Rather than wait until
the error becomes large, when the proportional and integral modes would adjust
the manipulated variable, the controller could anticipate the future error using the
foregoing equation to give
MV = Kc (e + zd^\ + Id (8.20)
:l^r
VA1
rate of change.
t*r
VA2
EXAMPLE 8.4.
f a
A
i*r# The offset of a derivative controller can be determined by applying the final value
theorem to the three-tank mixing process for a step disturbance, D(s) — AD/s.
251
Derivative Mode
Controlled
variable,
CV
Time
FIGURE 8.8
Example of the calculation of the derivative mode with constant
set point.
Kr Ka
GMGM) = Gd(s) = Gc(s) = KcTds
( r j + 1 ) 3 ~ a v " ( r. y + 1 ) 3
CV'(r)|,=00 = 5-»0
lim
(,)(AD/^(^)(^)(_L_) (8.21)
+ ^(T7TT)(T7TT)(77TT) .
= KdAD £ 0
As is apparent, the derivative mode does not give zero offset. In fact, it does not
reduce the final deviation below that for a system without control for any distur
bance whose derivative tends toward zero as time increases; thus, its only benefit
can be in improving the transient response. Since the derivative is never used as
the only controller mode, dynamic responses are not included in this section, but
dynamic responses for the PID controller will be given.
The derivative mode amplifies sudden changes in the controller input signal,
causing potentially large variation in the controller output that can be unwanted for
two reasons. First, step changes to the set point lead to step changes in the error. The
derivative of a step change goes to infinity or, in practical cases, to a completely
open or closed control valve. This control action could lead to severe process upsets
and even to unsafe conditions. One approach to prevent this situation is to alter the
algorithm so that the derivative is taken on the controlled variable, not the error.
The modified derivative mode, remembering that Eit) = SP(0 — CV(/), is
dCVjt)
MVrf(0 = -KcTd + ld (8.22)
dt
While equation (8.22) reduces the extreme variation in the manipulated
variable resulting from set point changes, it does not solve the problem of
252 high-frequency noise on the controlled-variable measurement, which will also
cause excessive variation in the manipulated variable. An obvious step to reduce
CHAPTER 8 the effects of noise is to reduce the derivative time, perhaps to zero. Other steps to
The PID Algorithm reduce the effects of noise are presented in Chapter 12. In summary:
The derivative mode is simple; does not influence the final steady-state value of error;
provides rapid correction based on the rate of change of the controlled variable; and
can cause undesirable high-frequency variation in the manipulated variable.
/ i f dCVit)\
MV(0 = Kc \E(t) + -Jo E(t') dt' - Td—^-j + / (Recommended)
(8.232?)
Again, the controller has an initialization constant. Depending on the desired per
formance, various forms of the controller are used. The proportional mode is nor
mally retained for all forms, with the options being in the derivative and integral
modes. The most common alternative forms are as follows:
PROPORTIONAL-ONLY CONTROLLER.
MV(0 = Kc[E(t)] + I (8.24)
PROPORTIONAL-INTEGRAL CONTROLLER.
PROPORTIONAL-DERIVATIVE CONTROLLER.
ev.n , rrdE(t)\ , r
MV(0 = KC( E(t) + Td——
dt ) ) +/ (8.26a)
PROPORTIONAL-INTEGRAL-DERIVATIVE.
MV(s)
Gds) = ^^ = Kc (1 + -j- + Tds) (8.27)
E(s) \ T, s J
PROPORTIONAL-ONLY.
MV(s)
Gc(s) = = Kc (8.28)
E(s)
PROPORTIONAL-INTEGRAL.
MV(s)
Gds) = (8.29)
Eis) - * ( ■ ♦ £ )
PROPORTIONAL-DERIVATIVE.
MVjs) = Kci\ + Tds)
Gds) = (8.30)
Eis)
The reader is strongly encouraged to learn the various forms of the algorithms
in the time and Laplace domains, because they will be used in all subsequent topics.
Formulation. The model for this process was derived in Example 3.7. It is re
peated here with the models for the other elements in the control loop: the valve
and the controller (the sensor is assumed to be instantaneous).
U aFH+x
(T-Tcin) (8.31)
VpCp^=CppF(T0-T)- aEbc
do Fc +
2pcC,pc
(Wl
FC=\KV (8.32)
f a -
Thus, when the controller set point Tsp has been defined, the system is exactly
specified. Note that the system without control requires the valve position to be
defined, but that the controller now determines the valve opening based on its
algorithm in equation (8.33). The three equations can be linearized and the Laplace
transforms taken to obtain the following transfer functions:
K,
Gp(s) = zs + \ (8.34)
GM = Kv 1.0 (8.35)
v(s)
Gds) = (8.36)
Tsp(s) - T(s) - * ( ■ ♦ £ )
The process gain and time constant are functions of the equipment design
and operating conditions and are given in Example 3.7. We assume that the valve
opening is expressed in fraction open and that Gv(s) = 1. The block diagram of
the single-loop control system is given in Figure 8.2, and the closed-loop transfer
function is rearranged to give
Gp(s)Gv(s)Gc(s)
CV(s) = S?(s) (8.37)
\+Gp(s)Gv(s)Gc(s)Gs(s)
The general symbols are used for the controlled and set point variables,
CV(j) = T(s) and SP(.s) = Tsp(s). The transfer functions for the process, the PI
controller, and the instrumentation (Gs(s) = Gv(s) = 1) can be substituted into
equation (8.37) to give
GJs)Gcis)
CVis) = -—pK ' cW SP(5)
\+GJs)Gcis)
z s + \ c \ T, s )
■SP(J)
(8.38)
. + --*'-
ZS+ 1 * ( ' ♦ £ )
77^ + 1
SP(5)
rT, i Tjiy + KcKJ ±,
* H zr-r.——s + 1
KcKp KCK.
This can be rearranged to give the transfer function for the closed-loop system:
Equation (8.39) can be rearranged to solve for CVis) with SPis) = ASP/s
(step change). This expression can be inverted using entries 15 and 17 in Table
4.1 to give, forf < 1,
with z[ and z'2 the real, distinct roots of the characteristic polynomial when £ > 1.0.
Solution. Before an example response is evaluated, some important observa
tions are made:
The final observation concerns the manipulated variable, which is also important in
evaluating control performance. The transfer function for the manipulated variable
can be derived from block diagram algebra to be
MVjs) Gds)
(8.43)
SPis) ~ \+GJs)Gcis)Gvis)Gsis)
The characteristic polynomials for the transfer functions in equations (8.37) and
(8.43) are identical; thus, the periodic nature of the responses (over- or under-
damped) of the controlled and manipulated variables are the same since they are
affected by the same factors in the control loop. Thus, it would not be possible to
obtain underdamped behavior for the controlled variable and overdamped behav
ior for the manipulated variable. The close relationship between these variables is
natural, because the manipulated variable is calculated by the PI controller based
on the controlled variable.
Results analysis. A sample dynamic response is given in Figure 8.10 for this
system with Kp = -33.9°C/(m3/min) and z = 11.9 min from Example 3.7 and
tuning constant values of Kc = -0.059(m3/min)/°C and T, = 0.95 min, giving
z' = 2.38 min and £ = 0.30, and SP'Cy) = 2/s. The response is clearly under-
FIGURE8.10
Dynamic response of feedback loop: set point (dotted), temperature (solid),
and limits on magnitude (dashed).
damped, as indicated by the damping coefficient being less than 1.0. Also shown 257
in the figure is the boundary defined by the exponential in the analytical solution,
which determines the maximum amplitude of the oscillation at any time. Note that
Importance of the PID
another set of controller tuning constants could yield overdamped behavior for the Controller
closed-loop system. The parameters used in this example were selected some
what arbitrarily, and proper tuning methods are presented in the next two chapters.
Since both tuning constants, Kc and 7}, appear in z' and £, it is not possible
to attribute the damping or oscillations to a single tuning constant; they both affect
the "speed" and damping of the response. It is apparent from the expression
for £ that the response becomes more oscillatory as Kc is increased and as 7)
is decreased; the reason for the difference is that Kc is in the numerator of the
controller, whereas 7) is in the denominator of the control algorithm. It is also
apparent from equation (8.41) that the controlled-variable overshoot and decay
ratio increase as the damping coefficient decreases.
8.10 El CONCLUSIONS
In this chapter, the important proportional-integral-derivative control algorithm
was introduced, and the key features of each mode were demonstrated. The pro
portional mode provides fast response but does not reduce the offset to zero. The
integral mode reduces the offset to zero but provides relatively slow feedback
compensation. The derivative mode takes action based on the derivative of the
controlled variable but has no effect on the offset. The combination of the modes,
or a subset of the modes, is required to provide good control in most cases.
A few examples have demonstrated that the PID controller can achieve good
control performance with the proper choice of tuning constants. However, the
control system can perform poorly, and even become unstable, if improper values
of the controller tuning constants are used. An analytical method for determining
good values for the tuning constants was introduced in this chapter for simple first-
order processes with P-only and PI control. More general methods are presented
for more complex systems in the next two chapters.
The dramatic influence of feedback on the dynamic behavior of a process was
discussed in Chapter 7 and demonstrated mathematically in this chapter. Naturally,
the ability to maintain the controlled variable near its set point is a desirable 259
feature of feedback, but the potential change from an overdamped system to an mmmmMmmmmm
underdamped or even unstable one is a facet of feedback that must be understood Additional Resources
and monitored carefully to prevent unacceptable behavior. In Chapter 4, it was
demonstrated that the key facets of periodicity and stability are determined by the
roots of the characteristic equation, that is, by the poles of the transfer function.
For the three-tank mixing process without control, the characteristic equation is
giving the repeated poles s = — 1 /r. Since they are real and negative, the dynamic
response is overdamped and stable. When proportional feedback is added, the
transfer function is given in equation (8.12), and the characteristic equation is
Thus, the controller gain influences the poles and the exponents in the time-domain
solution for the concentration. The influence of feedback control on stability is the
major topic of Chapter 10.
Finally, it is important to note that the PID controller is emphasized in this
book because of its widespread use and its generally good performance. The dom
inant position of this algorithm is not surprising, because it evolved over years of
industrial practice. However, in nearly no case is it an "optimal" controller in any
sense (i.e., minimizing IAE or maximum deviation). Thus, other algorithms can
provide better performance in particular situations. Some alternative algorithms
will be introduced in this book after the basic concepts of feedback control have
been thoroughly covered.
REFERENCES
Franklin, G., and J. Powell, Digital Control of Dynamic Systems, Addison-
Wesley, Reading, MA, 1980.
Hougen, J., Measurements and Control Applications for Practicing Engineers,
Cahners Books, Boston, MA, 1972.
Korn, G., and T. Korn, Electronic Analog and Hybrid Computers, McGraw-
Hill, New York, 1972.
Ogata, K., Modern Control Engineering, Prentice-Hall, Englewood Cliffs, NJ,
1990.
Rhinehart, R., personal communication, 1991.
Smith, C, Digital Computer Process Control, Intext, Scranton, PA, 1972.
ADDITIONAL RESOURCES
A brief history of operator interfaces for process control, showing the key graphical
and pattern recognition features, is given in
Lieber, R., "Process Control Graphics for Petrochemical Plants," Chem. Eng.
Progr. 45-52 (Dec. 1982).
260 Additional analytical solutions to low-order closed-loop systems can be found in
CHAPTER 8 Weber, T., An Introduction to Process Dynamics and Control, Wiley, New
The PID Algorithm York, 1973.
For a more complete discussion of system types than presented in Section 8.2,
see
With models for the process and controller now available, the dynamic behavior of
a closed-loop system can be analyzed quantitatively. These questions provide some
learning examples while usingme mathematical tools available; additional analytical
methods are introduced in the next chapters. The key concept is the manner in which
the process and controller both influence the feedback system.
QUESTIONS
8.1. Determine the analytical expression for a step set point change in the fol
lowing processes under P-only and PI feedback control. You should select
values for the tuning constant that give acceptable performance.
id) Example 3.1 with CA as the controlled variable, Cao as the manipulated
variable, and ASP = 0.1 mole/m3.
ib) Example 3.7 with T as the controlled variable, F as the manipulated
variable, and ASP = 3°C. (Fc is constant.)
ic) Example 3.3 with CA2 as the controlled variable, Cao as the manipu
lated variable, and ASP = 0.05 mole/m3.
8.2. Program a dynamic simulation for the three-tank mixing system based on
the equations derived in Example 7.2.
id) Determine the open-loop responses in the third tank outlet concentra
tion to a step change in
(1) The inlet concentration of component A in stream B (1 to 1.5% A)
(2) The valve position in the A stream (50 to 60% open)
ib) Determine the closed-loop (PID) responses of the third tank outlet
concentration to
(1) A step set point change (3 to 3.5% A)
(2) A disturbance step change in the concentration of component A
in stream 5(1 to 1.5% A)
8.3. Using the appropriate transfer functions and applying the final value theo
rem, determine the final values of the error for a step set point change for
the heater in Example 8.5 under P-only, PI, and PID control.
8.4. The control system given in Figure Q8.4 controls the level by adjusting
the valve position of the flow out of the tank. Because of the pump, the
flow out can be assumed to be a function of only the valve percent open 261
and not of the level. Assume that the valve-flow relationship is linear (i.e.,
^out = Kvv). Questions
id) Derive the differential equation and transfer function relating the level
to the flows in and out.
ib) For the process with feedback control, determine the final value of the
error for a step change in the inlet flow for P-only and PI controllers.
Are the criteria for zero steady-state offset the same as for the three-
tank example? Explain why/why not.
ic) Discuss the differences between this and question 8.13.
8.5. The application to the final value theorem in equation (8.17) showed that
the three-tank mixing system under I-only control has zero steady-state
offset for a step disturbance. Is this a general conclusion for PID control FIGURE Q8.4
for all id) processes, ib) disturbance types, and (c) values of the tuning
constants? Discuss the implications of your answers on the success of
feedback control.
8.6. id) The final value theorem seems to demonstrate that the offset tends
to zero as the controller gain approaches infinity. Discuss this result,
especially with regard to the definition of the Laplace transform and
the dynamic responses shown in Figure 8.4a through d.
ib) The final value theorem provides one method for calculating the fi
nal value of a variable in a control system. Describe another way to
determine the final value of variables without using the final value the
orem. Use both methods to determine the final value of the manipulated
variable in the three-tank mixing process for a step disturbance in the
concentration of stream B, id) without control and ib) with P-only
feedback control.
8.7. id) Calculate the roots of the characteristic equations and relate them to the
dynamic behaviors of the closed-loop systems in Figure 8.4a through d.
ib) Select different tuning constant values that yield substantially different
dynamic behavior for the closed-loop system in Example 8.5. Describe
the different time-domain behavior.
8.8. Answer the following questions.
id) The transfer function of the PID controller in equation (8.27) has no
initialization constant. Why?
ib) Describe how to calculate the initialization constant / in equation
(8.23a and b) for a PID controller.
ic) The transfer functions Gcis) = MVis)/CVis) and
Gpis) = CV(s)/MV(s). Why isn't Gds) = G~l(s)l Why do they
have units that are the inverse of one another?
id) Verify the Laplace transform of the controller, equation (8.27), from
equation (8.23a).
ie) Determine the final value for the three-tank mixing process under PI
control for an impulse disturbance in the feed composition. Can you
determine a conclusion generally applicable to all processes?
(f) Repeat part (e) for a ramp disturbance.
262 8.9. When designing the feedback control algorithm, why were the following
modes not included, or when would they be applicable?
CHAPTER 8
The PID Algorithm (a) MV(t) = Kc Eit) + E(t")dt"
Ti Jo |yo
8.10. The controller display for the plant personnel does not present all possi
ble variables associated with the PID algorithm. For each variable, state
whether or not it is displayed and why: (a) controlled variable, (b) error,
(c) set point, (d) manipulated variable, (e) integral of the error, (f) derivative
of the error, and (g) initialization constant.
8.11. Describe how you would calculate the PID algorithm in a digital computer.
Prepare a flow chart of the calculations.
8.12. Consider the modified stirred-tank mixing system in Figure Q8.12. The
original concentration of the third tank remains 3 percent.
(a) Derive the equations describing the system.
(b) Draw a block diagram of the system.
(c) Derive the transfer functions for each element in the block diagram.
(d) Derive the closed-loop transfer function, CV(s)/SP(s).
7m3/ht
6.9 m3/hr
3% A
1%A
B-
OO hCD
A 00
0.14m3/hr <$>
100% A
Questions
if»-~©
0 -CSC}—^
FIGURE Q8.13
(a) Derive a linearized model and transfer functions for the process and
for the proportional-only controller.
(b) Draw a block diagram, and derive the closed-loop transfer function.
(c) Calculate the steady-state offset.
(d) Select an appropriate sign for the gain and calculate the time to reach
63 percent of the final steady-state error after a step disturbance in the
outlet valve position.
(e) Discuss the differences between this and question 8.4.
8.14. Consider the PID algorithm in equation (8.23a). For each of the individual
modes—proportional, integral, and derivative—describe with a sketch the
result of its calculation when the error is each of the following idealized
functions: (a) a constant, (b) an impulse, and (c) a sine (consider one cycle).
(This question provides a thought exercise to help understand the three PID
modes; this type of analysis is not performed when monitoring a control
system.)
8.15. For the series reactors in Figure Q8.15, the outlet concentration is controlled
at 0.414 mole/m3 by adjusting the inlet concentration with a proportional-
only feedback controller. At the initial base case operation, the valve is
50 percent open, giving Cao = 0.925 mole/m3. One first-order reaction
A ->• B occurs; the data are V = 1.05 m3, F = 0.085 m3/min, and k =
0.040 min-1. The process transfer function is derived in Example 4.2 as
CA2(s)/CA0(s) = 0.447/(8.25^ + l)2; the additional model relates the
valve to inlet concentration, which for a linear valve and small flow of A
(F » FA) gives CA0(s)/v(s) = 0.925/50 = 0.0185 (mole/m3)/%open;
you may assume for this question that the sensor dynamics are negligible.
(a) Determine whether the reactors are stable without feedback control.
(b) Determine the closed-loop transfer function for a set point response.
(c) By analyzing the denominator of the transfer function (the character
istic polynomial), determine the stability of the feedback system for
controller gain, Kc, values of (i) 0.0, (ii) 121, (iii) 605, and (iv) 2420
(in % valve opening/mole/m3).
(d) By analyzing the total closed-loop transfer function, determine the
steady-state offset for a set point change with controller gain, Kc,
values of (i) 0.0, (ii) 121, (iii) 605, and (iv) 2420 (in %valve
opening/mole/m3).
(e) Without simulating, sketch the general shape of the dynamic response
for a set point step change for each of the cases in (c) and (d) above.
264 Pure A
CHAPTER 8
The PID Algorithm
Solvent
FIGURE Q8.15
8.16. Analyze the following systems for the feasibility of feedback control.
(a) Example 1.1 with temperature T3 as the controlled variable, FexCh as
the manipulated variable, and ASP = FC.
(b) Example 1.2 with Ca2 as the controlled variable, Fs as the manipulated
variable, and ASP = 0.01 mole/m3.
8.17. The continuous control system in Figure Q8.17 is to be tuned for an un
derdamped open-loop process, £ < 1.0. As a physical example, you may
think of the CSTR with underdamped temperature dynamics in response
to a change in the coolant flow described in Section 3.6. However, the
question should be answered for the general system in Figure Q8.17.
(a) Determine the range of a P-only feedback controller gain that results in
an overdamped closed-loop system. Discuss the implications of your
results for the quality of feedback control performance.
(b) Repeat the analysis for a proportional-derivative controller and discuss
the effect of the derivative mode on the closed-loop dynamic behavior,
especially the periodicity.
^y^
SPWjp. Kc T V + 2&S + 1
FIGURE Q8.17
8.18. (a) Determine the PID controller modes that are required for zero steady-
state offset for an impulse disturbance for the following processes:
(1) The three-tank mixing process in Examples 7.2 and 7.3 with xAb
an impulse
(2) A non-self-regulating level system, like equation (5.15), with F0 265
an impulse and F\ adjusted by the controller
ib) Discuss the application of integral-only control to both processes. Questions
8.19. The elements in several control systems are shown in Figure Q8.19. For
each system, determine the transfer functions for CV(.s)/SP(.s) and
CVis)/Dis), where a disturbance is given.
(o)
ib)
—* °l —~*1
*> Gc ^ (+
sp-iQ
1 *> G2 +->
ic)
X0 Xi
Gc -*• G, 1 r—•»
s p — I Q — ▶
— G2 -« 1
—_l <r
0- D
FIGURE Q8.19
Block diagrams for several control systems. All quantities are Laplace-transformed; the
variable is) is omitted for simplicity.