This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA
(5.8)
. IJ\k2\
OVERDAMPED IMPULSE RESPONSE (£ > 1). Y
=
C[
)
(5.9)
^let/T
(5.10)
\T1T2 x\x2J
CRITICALLY DAMPED IMPULSE RESPONSE (£ = 1). Y
=
140 CHAPTER 5 Dynamic Behavior of Typical Process Systems
UNDERDAMPED IMPULSE RESPONSE ($ < 1). Y=
^VT^J
:eWr sin
V^i:
(5.11)
Both the step and impulse responses for a secondorder system have initial re sponses that are more gradual than for a firstorder system. The overdamped system approaches its final value smoothly, while the underdamped system experiences oscillations. The amplitude ratio of the frequency response is monotonically decreasing for an overdamped system and begins to deviate substantially from Kp around the frequency equal to 1/t. The amplitude ratio for secondorder systems with a damping coefficient below 0.707 exceeds Kp over a limited frequency range around 1/r. This resonance effect results from the inherent oscillatory tendency of the system reinforcing the input sine oscillations. K, AR = \G(jco)\ = \Y(jco)\ = (5.12) \X(jco)\ y/(]co2x2)2 + (2cox^)2 Dead Time The dead time or transportation delay was introduced in Example 4.3 for plug flow of liquids and can also occur for transportation of solids along a conveyor belt. It was shown to have the following model: Y(s) = e  6 s (5.13) X(s) The step response, impulse response, and amplitude ratio can all be easily deter mined, because the output is the input translated in time by 0. For example, this leads to the conclusion that the amplitude ratio is equal to 1.0 for all frequencies, which can be demonstrated mathematically by Y(t) = X(t  0) G(s) =
AR
=
 g  ^ i = cos (co9)  j sin (co0)\ = y cos2 (co9) + sin2 (toO)  1
(5.14) The dead time can be approximated by a transfer function that replaces the exponential in the Laplace variable (e~9s) with a ratio of polynomials in s. This approach is referred to as a Pade approximation, which is presented in Appendix D. In this book, we will not use dead time approximations; i.e., we will model the dead time as an exact delay as given in equations (5.13). The importance of dead time to feedback control can be understood by con sidering an example such as steering an automobile. With dead time, the automo bile would not respond immediately after the change in steering wheel position. Clearly, such an automobile would be difficult to drive and would require a skilled and patient driver who could wait for the effect of a steering wheel change to occur. Integrator The integrator is a special type of firstorder system; a process example of an integrator is a level system, which is modelled based on an overall material balance
141
to give (5.15)
pA— = pF0 pFx
In many cases the inlet and outlet flows do not depend on the level (unlike the tank draining Example 3.6). When no causal relationship exists from the level to the flow, the model has the following general form: dY' xh = holdup time (5.16)
r„_ = x<#/u")
G(s) = —— _= _ 1 X(s) xHs
(5.17)
The important difference between the integrator and the firstorder system in equation (5.1) is the lack of dependence of the derivative on the output variable (Y'y, that is, dY'/dt is independent of Y'. This results in a pole at s = 0 in the transfer function. The analytical expression for the output of the integrator is
Y'(t) = / ' X'(t')dt' Jo
(5.18)
A system like this simply accumulates the net input: thus, the name integrator. If the deviation in the input remains nonzero and of the same sign, the magnitude of the idealized model output increases without limit as time increases toward infinity. For a step input, AX Y' = (5.19) Step response: xh '
The impulse response also demonstrates that the system integrates the impulse (area under the impulse function), and then the output remains constant at its altered value when X'(t) returns to zero. The value of the impulse response is Y' = C/xh. The amplitude ratio can be determined to be Frequency response: AR = \G(jco)\ =
1
=
XHJCO
coj xHco2
1 xHco (5.20)
As the frequency decreases, the amount accumulated by the integrator each half period (which is related to the output amplitude) increases.
SelfRegulation The unique behavior of the integrator demonstrates that not all processes tend to a steady state after input changes cease and all inputs are constant. To clarify the distinction, the term selfregulation is introduced here.
For a process that is selfregulatory, the output variables tend to a steady state after the input variables have reached constant values.
Many processes encountered to this point have been selfregulatory, including the chemical reactors, heat exchanger, and mixing tanks. Selfregulatory processes are
Basic System Elements
142
generally easier to operate because they tend to a steady state. Naturally, the final steady state might be acceptable or not depending on the magnitude and direction of the input changes, so that process control is often applied to selfregulatory processes. The selfregulation in a process can be identified by analyzing the dynamic model to determine if the value of the output variable influences its derivative. For example, the heat exchanger in Example 3.7 has inherent negative feedback, because an increase in the output (outlet temperature) causes a decrease in a model input term (F/V + UA/VpCp)T, which stabilizes the system by decreasing the derivative:
CHAPTERS Dynamic Behavior of Typical Process Systems
dT
(F
UA
\
vPc„ 
External inputs
(F
UA
\
VpCp, Inherent negative feedback
(5.21)
Some processes have inherent positive and negative feedback; for example, the nonisothermal chemical reactor with exothermic chemical reaction is
< w
CA0
do
dT_ dt
\V ° VpCp VpCp VpCp cm) \V VpCpJ External inputs
Inherent negative feedback
+ jAHnn)kQeEfRTCk r' c.m
r
Icout
pCP Inherent positive feedback
The reactor has a negative feedback term in its energy balance, the same as for the heat exchanger. However, the exothermic chemical reaction contributes positive feedback, because the input term iAHrxnkoe~E/RTCA/pCp) increases when the output temperature increases. For the parameter values in Table C.l, case I, the inherent negative feedback in the process dominates, and the process achieves a steady state after a step input. The positive feedback is substantial, however, which leads to the periodic behavior and complex poles. Additional comments on the behavior and stability of processes are given in Appendix C. In contrast, nonselfregulatory processes do not tend to steadystate operation after all inputs have reached constant values. Thus, even a small (and constant) input change from an initial steady state can lead to large disturbances after a long time. A nonselfregulatory process can be identified from its dynamic model; the value of the output variable does not influence its derivative, as shown in equation (5.15), so that the derivative can have a constant (nonzero) value over a long time. Without intervention, a nonselfregulatory process can experience very large deviations from desired values; therefore, all nonselfregulatory processes require process control. The dynamics of typical nonselfregulatory processes are covered in Chapter 18, along control technology tailored to their special requirements. In summary, many different systems obeying the models of these basic el ements behave in a similar manner. After the parameters have been determined, their behavior for specified inputs is well understood. Thus, the experience learned from a few examples can be extended, with care, to many other systems.
5.3 Q SERIES STRUCTURES OF SIMPLE SYSTEMS
143
A structure involving a series of systems occurs often in process control. As dis cussed in Chapter 2, this structure can occur because of a processing sequence—for example, feed heat exchange, chemical reactor, product cooling, and product sep aration. Also, a control loop involves a final element (valve), process, and sensor in a series, as will be more fully discussed in Part III. Therefore, the understanding of how series structures behave is essential in the design of chemical plants and process control systems. Noninteracting Series There are two major categories of series systems, and the noninteracting system is covered first. It is worthwhile considering the mixing system, which conforms to the block diagram at the bottom of Figure 5Aa, in which each intermediate variable has physical meaning. dC
Va±2± = FC'FC' 'AO Al dt
(5.23)
dCA ' A2 = FC'Al  FC'A2 dt Note that the model equations have the general form V
dY! xt^KtYl.yY!
for / = 1,..., n
(5.24)
with Yq = X'
(5.25)
Any system modelled with equations of this structure constitutes a noninteracting series system. Important features of the system follow from this model. 1. Only y„_i and Yn (not Yn+\) appear in the equation for dYn/dt. 2. Following from (I), the downstream properties do not affect upstream prop erties; in the example, the concentration in tank 2 does not affect the concen tration in tank 1 but does affect tank 3.
ib)
X{s) Gx{s)
W
G2{s)
Y2{s) G3(*)
^
ia) FIGURE 5.4 Series of processes: (a) noninteracting; ib) interacting.
Series Structures of Simple Systems
144 CHAPTER 5 Dynamic Behavior of Typical Process Systems
3. The model for the general noninteracting series of firstorder systems can be developed by taking the Laplace transform of each equation (5.25) and combining them into one inputoutput expression. For a series of systems shown in Figure 5.4a, each represented by atransfer function G, is), the overall transfer function n\
Yn(s) = Gn(s)Gn.l(s). • • Gxis) = ]*] GniW (526) X(s) i=0 For n firstorder systems in series, this gives «i
Y«JS) Xis)
Y\K»i i=0
with Kni and xn, for the individual systems
n1
Y[(TniS + 1) i=0
(5.27) The gains and time constants appearing in equation (5.27) are the same as the values for the individual systems, as in equation (5.25). Thus, the model of interacting systems can be determined directly from the individual models. 4. If each system is stable (i.e., r, > 0 for all i), the series system is stable. This follows from the important observation that the poles (roots of the character istic polynomial) of the series system are the poles of the individual systems. Now the dynamic response of a series of noninteracting firstorder systems can be considered. Since so many possibilities exist, the simplest case of n identical systems, all with unity gain, is considered. The response to a step in the input, X'(s) = 1/5, is plotted in Figure 5.5. Note that the time is divided by the order of the system (i.e., the number of systems in series), which timescales the responses for easy comparison. We note that the shape of the response changes from the nowfamiliar exponential curve for n — 1. As n increases, the response begins to have an apparent dead time, which is the result of several firstorder systems in series. For very large n, the output response has a very steep change at time equal to nx. Thus, we conclude that the series of identical noninteracting firstorder systems approaches the behavior of a dead time with 0 % nx for large n. Again looking ahead to feedback control, a system with several firstorder systems in series would seem to be difficult to control, for the same reasons discussed for dead times. A second observation is that the curves all reach 63 percent of their output change at approximately the same value of t/nx\ this will be exploited later in the section. Finally, we note that the system is always overdamped, because the transfer function has n real poles, all at — 1/r. The amplitude ratio of the frequency response can be determined directly from the transfer function in equation (5.27) to be AR =
\Yn(jCO)\
\X(jco)\
= \G(jco)\ = [Y[Ki i=\
1
.VT+ (02X2 ) "
(5.28)
The amplitude ratio is always less than or equal to the overall gain, and it decreases rapidly as the frequency becomes large. Amplitude ratios for several series of
145 Series Structures of Simple Systems
1.5 Scaled time, tlnx
2
2.5 FIGURE 5.5
Responses of n identical noninteracting firstorder systems with K = 1 in series to a unit step at t = 0. identical firstorder systems are shown in Figure 5.6; again, the frequency is scaled to the order of the system to provide timescaling.
Interacting Series The second major category of series systems is interacting systems. Again, it is worthwhile considering a physical example, this being the levelflow process in Figure 5Ab. Assuming that the flow through each pipe is a function of the pressure difference, the model can be derived based on overall material balance for each vessel to give dLi Ai—L = Fi_l
dt
Ft
= Kj\(L(i — Li)  Ki(L, — Li+\)
(5.29)
because Fi = K[(Pi — P,+i) for the linearized system, and the pressures are proportional to the liquid levels. These model equations have the following general form for a series of two interacting firstorder systems: dY'
Hlj± = X'KliY{Yl) dY'
(5.30) (5.31)
Many important physical systems, including that in Figure 5.4fc, have struc tures described by equations (5.30) and (5.31); thus, these equations are considered representative of interacting systems for subsequent analysis. Some important fea tures of these systems follow from their model structure:
10°
146
rrrm—i—i i limn—i—i 11iii=j
ET 1 I I llllll—I IT
 n= 1,2,5,10,20,50
CHAPTER 5 Dynamic Behavior of Typical Process Systems
10' = o
■a 3 Q.
E <
102
103 102
'
101
'
i
'
i
Htm
i
i
1WJ I » ' min
10° 101 Scaled frequency (rad/time) cox n
103
FIGURE 5.6
Frequency responses of n identical noninteracting firstorder systems with K = 1 in series.
1. The variables Yn\, Yn, and Yn+i appear in the equation for dYn/dt. 2. Following from (1), the downstream properties affect upstream properties; for example, the exhaust pressure (Pj) influences both levels in Figure 5.4b. 3. The model for the general interacting series system of firstorder systems can be developed by taking the Laplace transform of equations (5.30) and (5.31) and combining them into one inputoutput expression, which results in poles of the interacting system that are different from the poles of the individual systems. The procedure for deriving the overall transfer function is shown in some detail, because the result is somewhat more complex than for a noninteracting system and because the procedure can be applied to systems of differing structures. First, the Laplace transform of equation (5.30) can be rearranged to give (with the primes deleted) 1
JJ
Ylis) = ^TXis) + —Y2(s) with xY\ = TT xns + 1 xY\s + 1 K\
(5.32)
The parameter zy\ is the time constant for the first system when considered indi vidually. The Laplace transform of the second equation is xY2sY2(s) = ^riYiis)  Y2(s)]  [Y2(s)  Y3(s)] with xY2 = Q (5.33) ti2 K2 Again, the parameter xy2 is the time constant for the second system when con sidered individually. The behavior of the combined system can be determined by
substituting equation (5.32) into (5.33) to give, after some rearrangement, (xYls + \)
Y2(s) =
147
Y3(s)
Series Structures of Simple Systems
XY\XY2S2 + f XY\ + XY2 + xY\ — j s + l (5.34)
l/K2
+
X(s)
xy\xY2s2 + [ xY\ + xY2 + xY\ — ) s + 1
K2)
(
Several important conclusions on the effect of the series structure on the dynamic behavior can be determined from an analysis of the denominator of the transfer function. The time constants of the interacting system (x\ and x2), which are the inverses of the poles, can be determined by solving the quadratic equation for the roots of the characteristic polynomial to give
(
* l \ 2
xy\ + Xyi + Xy\
xy\ + Xyi + xy\ — 1  4rn xY2
«1,2
2xy\Xy2
(5.35) Four characteristics of the dynamics of this type of series system are now estab lished. First, the possibility of complex poles is determined to establish whether periodic behavior is possible. The expression within the square root in equation (5.35) can be rearranged to give KA2 A
(
xyi + xyi + xYi— I —4xy\Xy2
(5.36) — (Xy\ — Xy2) + Xy
2xy\ +2xy2 + xy\
>0
Since both terms in the righthand expression are greater than zero, the entire expression is greater than zero, and complex poles are not possible for this system. Therefore, periodic behavior cannot occur for nonperiodic inputs, such as a step. Second, the stability of the process can be determined from equation (5.35). Note that the numerator has the form —a ± (a2 — b)05, with a and b both positive. Therefore, the poles for both signs of the root are negative, and the system is stable. Third, the "speed" of response of the interacting series system can be compared with the individual system responses. Since the poles are real, the characteristic polynomial in equation (5.34) can be written in an equivalent form as (5.37)
(xis + l)(x2s + 1) = X\X2S2 + (X[ + x2)s + 1
Equating the coefficients of like powers of s in equations (5.34) and (5.37) gives T\x2 = xy\Xy2 and X[ + x2 = xY\ + xY2 + Xyi
K2
(5.38)
Therefore, the sum of the time constants for the overall interacting system is greater than the sum of the individual systems. In other words, the interacting system is "slower," due to the interaction, than it would have been if the systems were noninteracting.
148 CHAPTERS Dynamic Behavior of Typical Process Systems
Fourth, equations (5.38) show that the product of the time constants is un changed but the sum is greater. Therefore, the difference between the interacting system time constants (tj  T2) is greater than the difference between the individ ual time constants (xyi  xy2)', that is, one time constant begins to dominate. This conclusion can be demonstrated by rearranging equations (5.38) to give (5.39) (xi  x2)2 = (xY\  xY2)2 + xYi—[ 2xY\ + 2xY2 + xY\ K2\ K2) Since the noninteracting series system has been shown to have all real poles, the dynamic responses of an interacting system of firstorder systems have many of the same characteristics as those of a noninteracting system; that is, they are stable and overdamped.
The previous results for interacting systems are applicable to (only) those systems that conform to the model; in addition to having variables F„_i, Y„, and Y„+\ appear in the equation for dYn/dt, the coefficients of each linearized term must conform to the structure and range of values in equations (5.30) and (5.31).
Many systems have the same model structures but different ranges for the values of the parameters. If the type of system is not obvious from the structure of the equations and the values of the model parameters, the model can be analyzed using the procedure just applied to the equations (5.30) and (5.31) to determine important characteristics of its dynamic behavior.
Noninteracting Series with Dead Time As will become more apparent in the next chapter, we often use firstorderwithdeadtime models to approximate more complex systems with monotonic step input responses. Therefore, noninteracting series of firstorderwithdeadtime sys tems are considered to conclude this section. The direct application of equation (5.26) results in
Y(s) Xis)
n\
= Y\Gniis) =
n*,)exp(J>s
w=l
1=0
1=1
with d (s) = XjS + 1
f\(XiS + 1) 1=1
(5.40) This overall transfer function provides the basis for the following equations, which give values for key parameters of a noninteracting series of firstorderwithdeadtime systems. n
n
Exact relationships: K 
(5.41a) n
Approximate relationship:
'63% » £(0/ + Tt)
(5.41ft)
The results for the overall gain and dead time follow directly from equation (5.40). The approximation for the time for the output response to a step input to reach 63 percent of its final value, t&%, is based on fitting an approximate model to the response of the series system, using the method of moments. The derivation of this expression is provided in Appendix D. The relationships in equations (5.41) are useful for quickly characterizing the approximate behavior of a noninteracting series system from the individual systems; comparison to solutions of noninter acting systems (e.g., Figure 5.5) shows that the expression for t&% is a reasonable approximation but not exact. EXAMPLE 5.1. Four firstorderwithdead time systems, with parameters in the following table, are placed in a noninteracting series. Describe the output response of this system to a step change in the input to the series at time = 2.
1
System Dead time, 0 Time constant, r Gain, K
2
3
0.40 0.90 1.5 3.3 1.0 0.25
4
1.2 1.70 5.2 0.95 3.0 1.33
msmmm^mmmi^mi0smmm^immm^^Mmm!mm\
The results in this section on noninteracting systems indicate that the output re sponse will be an overdamped sigmoid. Equations (5.41) can be used to estimate key values of the response. Note that the input occurred at time = 2, so that the points indicated on Figure 5.7 are based on the following results as measured from time = 2. 0 = 4.2 (after step) J^(0 + r) = 15.15 .. t63% & 15.15 (after step)
a:, = 1.0
The overall response is compared with the approximation in Figure 5.7, which demonstrates the usefulness of the approximation for t&%, because it gives an approximate "time scale" for the response. However, many sigmoidal curves could be drawn through the two points in the figure. The entire curve can be determined through analytical or numerical solution of the defining equations.
EXAMPLE 5.2. Inputoutput response. Two series systems, each with four elements, involve only transportation delays and mixing tanks. A step change is introduced into the input feed composition of each system with the flow rates constant. Determine and compare the dynamic responses of the output for each system. Since there is no chemical reaction, the systems have a gain of 1.0 and dynamic parameters given in the following table.
Case 1 Case 2
O x
X\
02
r2
*3
T3
0 0
2 2
2 2
0 2
0 1
2 0
#4
*4
149 Series Structures of Simple Systems
150 CHAPTER 5 Dynamic Behavior of Typical Process Systems
0.8
8 0.6 3
& 3
O
0.4
Approximate dead time
0.2
0
°L
35
5 Step
40
FIGURE 5.7
Dynamic response of series processes in Example 5.1 for a unit step at time = 2. The solution can be developed in several ways. The most general is to derive the overall inputoutput transfer functions for these systems. Y4(s) = Gds)Y3is) = • • ■ = G4(s)G3(s)G2(s)Gi(.s)X(s) y4(j)
i . Q g  f fl i + f t + f t + f t ) *
~X(S) ~ iTiS + \)iT2S + 1)(T35 + 1)(T4* + 1) l.Qg4'
~ (2j + \)i2s + 1)
Since the overall transfer functions are the same for the two systems, their dynamic inputoutput behaviors are identical. This is verified by the transient responses of the two cases for a step input at time = 2 in Figure 5.8, with each variable Ytit) on a separate scale.
The responses in Figure 5.8 show that two systems can have the same inputoutput behavior with different values for intermediate variables. In conclusion, the analysis in this section has demonstrated that both noninter acting and interacting series of n firstorder systems can be modelled by a transfer function with a characteristic polynomial of order n. Much about the dynamic re sponses of the series systems can be determined from the models of the individual systems. The results are summarized in Table 5.1. The series systems in this section provided additional reinforcement for the im portance of transfer function poles. The strongest general conclusions were based
151 Series Structures of Simple Systems
8
10 Time
20
12
FIGURE 5.8
Dynamic responses for series system in Example 5.2 to a unit step at time = 2. TABLE 5.1 Properties of series systems with firstorder elements (responses between input, X, and output, Y„) Individual firstorder Noninteracting systems series systems
Interacting series system, equations (5.30) and (5.31)
n firstorder systems Each is stable Time constants, t/
nthorder system Stable, not periodic Time constants are zit i = 1,..., n
nthorder system Stable, not periodic Time constants are not t/'s. They must be determined by solving the characteristic polynomial.
km
to * E x>
t&>% > ]CT«
Step response Frequency response
Overdamped, sigmoidal AR < Kp for all co
Overdamped, sigmoidal AR < Kp for all co
on the manner in which the poles of the overall system were or were not affected by the series structure. These conclusions concerned stability and the related property of periodic behavior. Since these generalizations dealt with properties completely determined by the poles, they are independent of the numerators in the transfer functions. In fact, the generalizations on stability and periodicity can be extended to any series transfer functions with denominators expressed as a polynomial in s.
152
However, the values of the poles do not provide general conclusions for the timedomain responses to step and sine inputs. Since both the numerator and denominator of the transfer function influence the dynamic behavior, the more specific results on dynamic responses are valid only for systems consistent with the assumptions in the derivations—that is, with a constant for the numerator of each series transfer function element. In particular, Figures 5.4 and 5.5 and all conclusions on the step response and amplitude ratio are specific to systems whose component elements have constant numerators. Finally, such strong conclusions for an overall system, based on the individual elements, are not always possible, as demonstrated by the structures considered in the remainder of this chapter.
CHAPTERS Dynamic Behavior of Typical Process Systems
5.4 m PARALLEL STRUCTURES OF SIMPLE SYSTEMS
A^ B
t&r ib) FIGURE 5.9
Examples of parallel systems in chemical engineering: (a) heat exchanger with bypass and ib) chemical reaction system.
Xis)
FIGURE 5.10
Example of a parallel structure involving two systems.
Parallel paths between a system input and its output can occur in processes, for example, the heat exchanger with multiple fluid flow paths in Figure 5.9a and the multiple reaction pathways in Figure 5.9b. Systems with parallel paths can experience unique dynamic behavior that can have a strong effect on control per formance. Therefore, engineers should understand the process structures leading to parallel structures giving good and poor dynamic behaviors. The basic concepts of parallel systems are introduced in this section to explain the reasons for the unique dynamic behavior, and detailed process examples are presented in Appendix I. A simple structure that demonstrates the important features of parallel systems is shown in Figure 5.10. The system has two paths between the input variable, X, and the output, Y. The overall model relating input and output can be determined using block diagram algebra. Ylis) = G]is)Xis)
(5.42)
Y2(s) = G2(s)X(s)
(5.43)
Y(s) = Y{(s) + Y2(s) The three equations can be combined to give
(5.44)
Y(s) = G1(s) + G2(.y) (5.45) X(s) For the situation in which each process is a firstorder process, G, (s) = Ki/(xis + 1), the model becomes £1 Y(s) + K2 (5.46) X(s) (xxs + l) " (x2s + l) Equation (5.46) can be rearranged to have a common denominator to give Y(s) = Kp(z3s + l) (5.47) X(s) (xlS + l)(x2s + 1)
with Kp = (KX+K2) X3 = (Klx2 + K2xl)/(Kl +K2) We note that the transfer function model in equation (5.47) has a polynomial in the Laplace variable s in the denominator, as has occurred in many previous models; the denominator terms result from taking the Laplace transform of derivatives in
the dynamic models. Since the stability and periodicity of the output Y(t) depend on the roots of the denominator, we conclude that the parallel structure does not alter these important aspects of dynamic behavior. In addition, this model has a new feature in the model, a polynomial in s in the transfer function numerator that results from the parallel structure. To investigate the effect of the parallel structure on dynamic behavior, the step response of the system in Figure 5.10 and modelled by equation (5.47) will be determined. The time behavior can be determined by setting X(s) = AX/s for a step change and taking the inverse Laplace transform using entry 10 in Table 4.1 (with a = z3). x\ — x3 _t/ x2 ' / ' I — x3 0_ t/r2\ Y'(t) = KpAX M + ^— 0
x2x\
X\
(5.48)
To enable us to plot a typical system, the following arbitrary parameter values are inserted into equation (5.48): K = 1, AX = 1, x\ = 2, and x2 = 1. The responses are plotted for several values of the parameter x3 in Figure 5.11. Key characteristics of the responses depend on the value of x3.
For negative values of 13 the step response changes initially in the direction opposite from the final steady state! This behavior is termed an inverse response and results from the parallel path.
1.5
1
1 4
1

/
/
1
1
1
1
l
1
1
3 2 1
0.5 /
0 3
o
1 2
0.5
1
1 5
10
Time FIGURE 5.11
Responses for a sample parallel system to a unit step at t = 0 in Xis); the model is Yis)/Xis) = Gis) = iz3s + l)/(2s + l)(s +1), with the value of T3 shown for each curve.
153 Parallel Structures of Simple Systems
154 CHAPTER 5 Dynamic Behavior of Typical Process Systems
This behavior can be explained by considering the system in Figure 5.10, which •shows that the output is the sum of two effects. When one path has fast dynamics and a negative gain, the process output initially decreases; however, if the second path has slower dynamics but a positive gain of larger magnitude, the ultimate output response will be positive. Thus, an inverse response occurs. Figure 5.11 also shows that the output can have transient values greater than its final value when x3 > X\ and x3 > x2. This behavior is termed overshoot and results from the parallel path. This behavior can be explained by considering the system in Figure 5.10. When one path has fast dynamics and a large positive gain, the process output initially increases a large amount; when the effects of the second slower path are negative but smaller in magnitude, the output decreases from its maximum, but remains positive. Thus, the overshoot occurs although the process is overdamped, i.e., nonperiodic. The importance of inverse response or overshoot can be recognized by thinking about how you would drive an automobile that had steering dynamics with either of these behaviors. Only a skilled driver could maintain the vehicle on the road, and no driver could achieve good performance. Therefore, the design engineer should seek to avoid processes that experience these behaviors through process equipment selection. Note that the dynamics are monotonic for many systems in Figure 5.11 when x3 ^ 0, so that only parallel structures with specific ranges of parameters yield these unique and usually undesirable behaviors. In Appendix I, some realistic parallelpath process examples are presented that experience interesting and im portant dynamic behavior. Approaches to improve dynamic performance through control are discussed throughout the book. In summary, parallel paths exist in many processes due to either complex interconnecting flow structures of individual systems or due to parallel effects within a single process. Since the poles are unaffected by a parallel structure, stability and damping of the overall system is not affected. This can be seen from equation (5.47), in which the denominator of the overall transfer function has the poles of the individual transfer functions. However, the parallel paths can have a significant effect on the dynamic behavior of the system, and the most complex behavior—overshoot or inverse response—occurs when parallel paths have significantly different speeds of response, so that parallel responses from an input affect the output at different times. Also, the approximate time to reach 63 percent of the output change for a step input is affected by the numerator, and it is not simply the sum of the individual time constants. The behavior of parallel systems of firstorder individual systems is summarized in Table 5.2. The behavior presented in this section can cause some difficulty in termi nology, since a stable overdamped system (f > 1) is usually thought to have a monotonic response to a step input. This is true when the transfer function numer ator is a constant, but it is not necessarily true when the numerator is a function of s. The potential dynamic behavior is summarized in Table 5.2.
Poles Response to nonperiodic input Monotonic response to step Complex Real
Periodic Nonperiodic
Not possible Possible, depends on numerator
TABLE 5.2
155
Properties of parallel systems with firstorder elements Recycle Structures
Individual firstorder systems
Parallel system
Each is first order Each is stable Poles are 1/r,
Order of the highest order in a parallel path Stable, not periodic Poles are 1/r,, / = l,...,n hi% 7^ St,
Step response Frequency response
Can be monotonic or experience overshoot or inverse response Amplitude ratio can exceed steadystate process gain (for some frequency range)
The emphasis on complex dynamic responses in this section does not indicate that all systems with numerator zeros give unfavorable dynamics such as large overshoot or inverse response.
The engineer can analyze the physical process for possible parallel paths with different dynamics to identify potentially complex dynamics and then use quantitative methods to determine whether the behavior may cause difficulty for control. Each input must be considered separately, because the characteristics of the output dynamic response differ for different inputs.
U
5.5 m RECYCLE STRUCTURES Recycle structures are used often in process plants, to return valuable material for reprocessing and to recover energy from effluent streams through heat exchange. Such interconnections, termed process integration, are often cited as potential causes of difficulty in plant operations in spite of their advantages in the steady state; therefore, it is important to understand the effects of recycle on process dynamics. This structure will be introduced through a process example and then will be generalized. EXAMPLE 5.3. Reactor with feedeffluent heat exchanger. The process design shown in Figure 5.12 has a feedeffluent heat exchanger that can be used for a chemical reactor with a high feed temperature and a need for cooling the product effluent stream. Formulation. The analysis begins with the transfer functions of the following indi vidual inputoutput relationships, represented in the block diagram in Figure 5.13. T2js) = GH2is) = Kh2 Tiis) = GH]is) = Kh\ (5.49) T4is) zH2s + 1 To i s ) " " " ' z m s + \ T4is) = GRis) = Kr his) "N" zRs + l The block diagram shows the output of the reactor returning to influence an input T3is) = T,is) + T2is)
FIGURE 5.12 Reactor with feedeffluent heat exchanger in Example 53.
w
Gmis)
hW s
h' < s)
i
GRis)
I 4fi)
T2is) GH2is) FIGURE 5.13
Block diagram of reactorexchanger in Example 5.3.
156 CHAPTERS Dynamic Behavior of Typical Process Systems
to the reactor. This is feedback that has been introduced into the process by a recycle of energy. To determine the behavior of the integrated system, the overall inputoutput transfer function must be determined using block diagram algebra. T4is) = GRis)T3is) = GRis)[Tiis) + T2is)] = GRis)[GH2is)T4is) + Gmis)T0is)]
(5.50) T4js) = GRis)GHljs) Tois) 1  GRis)GH2is) It is immediately apparent from the overall transfer function that recycle has fundamentally changed the behavior of the system, because the characteristic polynomial in equation (5.50) has been influenced and the poles of the overall system are not the poles of the individual units. Thus, the stability of the overall system cannot be guaranteed, even if each individual system is stable! To investigate the behavior of a recycle system further, models are defined for each of the individual processes in Figure 5.12. The following transfer functions are very simple, but the recycle system with these models experiences characteristics typical of realistic processes. GRis) = With recycle: Without recycle:
G„ds)=0A0
10*+ 1
GH2is) = 0.30 GH2is) = 0
The gains are dimensionless (°C/°C), and time is in minutes. The recycle heat exchanger model, Gmis), represents the effect of the recycle stream temperature on the reactor inlet temperature. If no recycle existed, i.e., if the effluent did not exchange heat with the reactor feed, T4is) would have no effect on T3is), so that GH2is) would not exist, which is represented by GH2is) = 0. These transfer function models can be substituted into equation (5.50) to determine the overall effect of a change in the process inlet temperature, Tois), on the reactor temperature with and without recycle. With recycle: T4js) Tois)
\\0s + \) 1
(0.40)
VlOs + lJ
(0.30)
12 100* + 1
(5.51)
Without recycle (G//2(.v) = 0): T4js) = GH]is)GRis) = 1.2 (5.52) Tois) 10*+ 1 Results analysis. The foregoing expressions and the dynamic responses for a step input of 2°C in T0 in Figure 5.14 show the dramatic effect of recycle on the steadystate gain and time constant; both increase by a factor of 10 due to recycle. This change can be understood by analyzing the interaction between the exchanger and reactor in the recycle system during a transient; an increase in T0 causes an increase in T3 and then T4, which causes an increase in T2, which causes an increase in T4, and so on; in short, the output change is reinforced through the recycle (feedback) exchanger. The system is still stable and selfregulatory, be cause of the dominant inherent negative feedback for the parameter values in this example, but the recycle has created an inherent positive feedback in the process,
157 Staged Processes
FIGURE 5.14 Dynamic responses for a 2°C step in T0 at time = 0 with and without recycle. (Note different scales.) Results from Example 53. which has significantly affected the dynamic response. The potentially unfavorable dynamic effects of recycle can be reduced through automatic control strategies, which retain most of the process performance benefits, as demonstrated for this chemical reactor design in Figure 24.11.
The simple example in this section demonstrates the potential effects of recycle on dynamic behavior: 1. Recycle can alter the stability and possibility for periodic behavior of the overall system, because it affects the poles of the overall system. 2. The time constants and steadystate gain of the overall system with recycle can be changed substantially from their values without recycle. Again, understanding the effect of recycle on dynamic responses is an important aspect of process dynamics, and the material in this section is enhanced by reference to the studies of recycle in the Additional Resources at the end of this chapter.
5.6 o STAGED PROCESSES Staged processes are used widely in the process industries for multiple contact ing of streams and can be considered as a special interconnection of elements, in which an element exchanges material and energy with only the adjoining stages.
158 CHAPTERS Dynamic Behavior of Typical Process Systems
Some common examples are vaporliquid equilibrium (Treybal, 1955), multieffect evaporation (Nisenfeld, 1985), and flotation (Narraway et al., 1991). Staged sys tems can experience a wide variety of dynamic behavior depending on the physical processes (e.g., mass transfer, heat transfer, and chemical reaction) that occur at each stage. The fundamental model for a staged system must include all significant bal ances on every stage. However, the variables at every stage are not always of great importance for the overall performance of the process, because only the properties of the streams leaving the process are usually of interest. In some cases, a few intermediate variables could be important; an example is the flows on stages of a stripping tower, which might approach or exceed the hydraulic limits for proper contacting efficiency. We will assume in this section that the only output properties of interest are in the product streams. In this section the dynamics of a distillation tower, shown in Figure 5.15, are considered as an example of staged systems to introduce the modelling approach and describe typical dynamic behavior. An accurate model of a multicomponent distillation tower must consider complex thermodynamic relationships and em ploy special numerical algorithms for the simultaneous solution of equilibrium expressions and material and energy balances. To simplify the presentation while maintaining a realistic model, the tower considered will separate only two compo nents, and the phase equilibrium is assumed to be well represented by a constant relative volatility (Smith and Van Ness, 1987). Also, the energy balance at each stage can be simplified by the assumption of equal molal overflow, which implies that the heats of vaporization of both components are equal and mixing and sensible heat effects are negligible. The assumptions are 1. The liquid level on every tray remains above the weir height. 2. Equal molal overflow applies. 3. Relative volatility a and heat of vaporization A. are constant. 4. Holdup in vapor phase is negligible.
0Z3
r \ FM* Feed
FMD Distillate
FM, VMq W
rcbr=TT FMB Bottoms XB
FIGURE 5.15 Distillation tower.
The following nomenclature is used:
159
MM = molar holdup of liquid on tray FM = molar flow rate of liquid X = mole fraction of light component in liquid A. = heat of vaporization VM = molar flow rate of vapor Y = mole fraction of light component in vapor
Staged Processes
The schematic of a general tray in Figure 5.16 shows that every tray has the potential for feed and product flows and heat transfer. With the assumptions and the general tray structure, the basic overall and component balances for each stage or tray (i = 1 n) can be formulated as dMM
£ = FM,+,  FM/ + FM/,  FM,,  yQuasisteadystate overall material (molar) balance on vapor phase: f
VM?,, = VM,_,+VM/f
i7i
WMiiYti+WMftYft VM i  l
i
diMMiXi) = FM/+,X/+i + FMfiXfi  (FM„ + FM,)X, dt  (VM/ + VMpi)Yj + VMU*^
1'
(5.53) Qi (5.54) (5.55) (5.56)
Light component balance on the tray (5.57)
This formulation is adequate for every equilibrium tray in the tower. For most trays, feed flows, product flows, and heat transferred are zero, while at least one tray has a nonzero feed. The top tray has a liquid feed, which is reflux, and its vapor stream goes to the total condenser. The bottom tray has its liquid go to the kettle reboiler, which is also an equilibrium stage. Note that although the equations can be formulated as shown, the computer implementation in this form would involve extensive multiplications for the zero streams; thus, an efficient implementation for a specific design would eliminate streams that are always zero. Since there are many more variables than equations in the conservation bal ances, the model is not completely specified by these balances alone. The model requires constitutive expressions to relate liquid and vapor compositions. The phase equilibrium equation for a binary system with constant relative volatility a is aXi Yi = (5.58) 1 + (a  \)Xi The model also requires constitutive expressions to relate liquid flows and inventories on the trays. The liquid flow from a tray is related to the level (L, = MMi/pntA) above the weir height, Lw, by (Foust et al., 1980) FM/ = KW tLw V PmA
VM,
VM„
Qi
♦
Vapor
FM/+1
FM,
Overall material (molar) balance on liquid phase:
vm,=vm;_! vmpi
Liquid
(5.59)
*
MM,
Xi
a VM*,_,
FM„
VMfl>
" FM;
VM,., FIGURE 5.16
General tray used in modelling distillation.
160 CHAPTERS Dynamic Behavior of Typical Process Systems
with A being the crosssectional area and pM moles/m3. The modelling effort is not complete until models are developed for the associated equipment, which for this distillation tower includes the heat exchangers that vaporize part of the liquid accumulated in the bottom drum and condense the overhead vapor. The behavior of these is not particularly complex but requires feedback control to model properly. To maintain simple model structures without the need for control at this point, the reboiler duty is assumed to be proportional to the heating medium flow, and the vapor overhead is assumed to be completely condensed without subcooling, so that the pressure is maintained at a constant value by adjusting the condensing duty, thus Qcond = VM„* (5.60) Qreb = ^reb^reb (5.61) Also, the volumes in the overhead and bottom accumulators can be modelled by overall and component balances. In reality, the levels of these inventories would be controlled by adjusting the product flows; in this example, the levels are assumed exactly constant, so that the models become FMD = VM„  FM/? (5.62) FMB = FM,  VM0 (5.63) The composition in the overhead accumulator (X„+, = Xq) can be deter mined from a component material balance: dXo = VM„y„  XD(¥MD + FM*) = VM„(y„  XD) (5.64) MMD dt Again, with the inventory constant, the kettle reboiler can be modelled with a component material balance (Xn = XB), equilibrium relationship, and a calcula tion of vapor flow based on heat transferred. dXB MMB dt = FM,X,  FMbXb  VMoFo aXB Y* = \ + (a\)XB VMo =
Qreb
(5.65) (5.66) (5.67)
To specify the system completely, sufficient external input variables must be defined so that the degrees of freedom are zero. The feed flow and composition must be specified along with two additional variables, here selected to be the distillate product flow Fo and the reboiler heating flow Freb. With these external variables specified, the degreesoffreedom analysis summarized in Table 5.3 shows that the system is exactly specified. The number of equations is equal to the number of de pendent variables; thus, there are zero degrees of freedom. Note that the parameters (k, a, Kw, MM/>, KKb, MMB, and Lw) were excluded from the analysis, because they are always constant. Also, the feed variables are determined by upstream pro cess conditions. Typically, external variables like the reboiler heating flow rate and the distillate product flow rate are adjusted to achieve the desired product compo sitions; here, they are assumed known external variables. The model formulation included assumptions, like constant accumulator levels and pressure, that are not necessary but simplify the model and presentation.
TABLE 5.3
161
Distillation degrees off freedom for n trays Equations
External specified Variables (dependent) variables (independent)
Trays (5.53) to (5.59) for each MM, FM, VM, X, t r a y Y, Y * , V * f o r e a c h t r a y p\usFMn+ltXn+x, V0, On) Y0 (7n+4) Overhead (5.60), (5.62), and 0cond (5.64) (3) (1) Reboiler (5.61), (5.63), (5.65), XB, FMfi, and QKb (5.66), and (5.67) (5) (3) To t a l In + 8 In + 8
FM/J/.VM/.Y/, FMp, VMP, Q for each tray (7/2)
FM*orFMDlMMD (2) Freb, MM5
TABLE 5.4 Base case design parameters for example binary distillation Relative volatility Number of trays Feed tray Analyzer dead times Feed light key Distillate light key Bottoms light key Feed flow Reflux flow Distillate flow Vapor reboiled Tray holdup Holdup in drums
2.4 17 9 2 min
XF = 0.50 XD = 0.98 fraction XB = 0.02 fraction
FM/r = 10.0 kmole/min FM/? = 8.53 kmole/min FMD = 5.0 kmole/min VM0 = 13.53 kmole/min MM, = l.Okmole MMfl=MMD = lO.Okmole
EXAMPLE 5.4. Determine the dynamic behavior of a binary distillation tower with the parameters in Table 5.4. The model equations can be integrated numerically to determine the response of the system from specified initial conditions for any values or func tions of the external variables. The dynamic responses are obtained by estab lishing a steadystate operating condition and introducing a single step change to one of the external variables; each step is 1 percent of the base case input value. (This is exactly how the experiment would be performed on the physical tower, as explained in Chapter 6.) The results are shown in Figure 5.17a and b. The composition responses are smooth monotonic sigmoidal curves, in spite of the complexity of the process. Note that changing a single input affects both
(2) 7« + 4
Staged Processes
CHAPTER 5 Dynamic Behavior of Typical Process Systems
13.7
17.06
162
xs co
8.53
20 40 Time (min)
20 40 Time (min) 0.98
0.03
20 40 Time (min)
20 40 Time (min) (a) o 27.06
8.65
1o 13.53 £>
Si u
a
> 20 40 Time (min)
20 40 Time (min)
0.985
0.035
0.03 o
o
E
E 0.025 
0.98
0.02
20 40 Time (min)
20 40 Time (min)
ib) FIGURE 5.17 Response of distillate and bottoms products in Example 5.6: (a) to reboiler step change; ib) to reflux step change. (These dynamic composition responses are obtained without sensor delays when the pressure and the distillate and bottoms accumulator levels are maintained constant.)
163
product compositions—an important factor in subsequent control design as dis cussed in Chapters 20 and 21.
Multiple InputMultiple Output Systems
S33»IP§i!i^
This summary presents a small sample of the results available on distillation dynamics. They have been presented as general guidelines for the behavior of twoproduct distillation with simple thermodynamics (e.g., no azeotropes) and no chemical reaction. The reader is encouraged to refer to the citations and Additional Resources for further details. This distillation example will be considered in later chapters, where the control of the product compositions, through adjustments to such variables as the reboiler duty and reflux flow, will be investigated.
5.7 □ MULTIPLE INPUTMULTIPLE OUTPUT SYSTEMS Many, but not all, of the systems modelled in Chapters 3,4, and 5 have involved a single input and output. If intermediate variables existed, they could be eliminated using transfer functions and block diagram algebra to develop a single inputsingle output (SISO) equation. This approach helped to simplify our task of learning how to model dynamic responses and is applicable to some realistic processes. However, the majority of processes have several inputs, and process operation is concerned with more than one output simultaneously. For example, the nonisothermal chem ical reactor in Section 3.6 has coolant flow and inlet concentration as inputs and reactor concentration and temperature as outputs. Also, the distillation tower in the previous section has distillate product flow, reboiler flow, and all feed properties and flow rate as inputs and concentration of both product streams as outputs. The methods described in the previous two chapters for developing fundamen tal models—linearization, transfer functions, block diagrams—are all applicable to these multiple inputmultiple output (MIMO) systems. Again, we see that many intermediate variables can exist in a process; in the distillation tower, the tray com positions and holdups are intermediate variables. These intermediate variables are included in the fundamental model and eliminated algebraically from the linearized inputoutput relationship. EXAMPLE 5.5.
'AO
Determine the dynamic response of the concentration in the CSTR with secondorder reaction in Example 3.5 to step changes in the inlet concentration and the feed flow rate. The definitions of the changes are Feed concentration step: Feed flow rate step:
ACao = 0.0925 mol/m3 AF = 0.0085 m3/min
at t = 2 min
do
at t = 7 min
The effect of several input variables on a single output variable can be determined through the individual inputoutput models. The fundamental model for the reactant component material balance is repeated here: V d_C* ^ = FiCMCA)VkC2A dt
U
(5.68)
To clarify the linearity of the model, all constants are substituted in equation (5.68)
164 CHAPTER 5 Dynamic Behavior of Typical Process Systems
to give (2.1)^ at= F(CA0  CA)  (2.1)(0.040)CJ
The model is nonlinear because of the product of variables and the concentra tion terms. The model in equation (5.68) can be linearized for a change in the inlet concentration (with flow constant) or for a change in the feed flow (with inlet concentration constant), giving dCi + C'K = KcaoCaAO dt
(5.69)
TCAO
dCi
(5.70)
with TCAO =
Fs+2VkCAs V
ZF
=
^CAO =
KF =
Fs + 2VkCAs
(CaOs ~ CAs
Fs + 2VkCAs "' Fs+2VkCAs
These two models can be solved for step changes to give [Ca(01cao = ACaoKcao(1 
\N\tht2tl
>0
(5.71) (5.72)
Note that the times from the steps are represented by different symbols (h and t2) because the two step changes are introduced at different times; also, the reactant concentration change is zero until tx > 0 or t2 > 0, respectively. The total change in reactor concentration of A is the sum of the changes due to inlet concentration and flow. CA(f) = CKit) + [CA(f)]cA0 + [C'Ait)]F
(5.73)
For the data in Example 3.5, the following values can be determined: V = 2.1 m3 Caos = 0.925 mole/m3 KCA0 = 0.146
Fs = 0.085 m3/min Ca5 = 0.236 mole/m3 zF = 3.62 min
k = 0.50 [(mole/m3)min]_1 tcao == 3.62 min KF = 1.19 (mol/m3)/(m3/min)
The results from the linearized analysis in equations (5.71) to (5.73) are given in Figure 5.18. Clearly, the output concentration is the sum of two firstorder step responses beginning at different times. This modelling approach can be extended to any number of input variables affecting an output.
EXAMPLE 5.6.
Sketch a block diagram showing the relationship between the input variables, reflux flow and reboiled vapor, and the output variable, light component mole fraction in the distillate and bottoms products. The data in Figure 5.16 show that both input variables affect both output vari ables. Thus, each input has two transfer functions, one for each of the output variables. The sketch for this process is shown in Figure 5.19. A natural ques tion is "How are the transfer functions determined?" In previous examples, the
0.25
165 Conclusions
10 15 Time (min)
20
25 FMRis)
cxdr(*)
<5>**Xd(*)
FIGURE 5.18
Dynamic response of reactant concentration for a step increase in inlet concentration (/ = 2) and step decrease in flow rate (t = 7) in Example 5.5.
GXDV(*)
gxbr(*)
fundamental model has been linearized and all intermediate variables eliminated by algebraic manipulations. However, the fundamental model for the distillation process is large, involving about 150 equations, so that the analytical procedure would be excessively timeconsuming. Fortunately, the transfer functions can be determined experimentally from data very similar to Figure 5.16, and this empirical modelling procedure is explained in the next chapter.
5.8 □ CONCLUSIONS
The results of this chapter clearly demonstrate that process structures have strong effects on dynamic behavior and that these effects can be predicted using the methods presented in the previous chapters. Many of the strongest results relate to the "longtime" behavior of the systems, because they are determined by the poles of the transfer function and are independent of the numerator zeros. These properties involve stability and the related tendency for over or underdamped behavior. However, the numerators also play an important role in the dynamic response, as shown by the examples in the section on parallel structures. It is worth noting that each of these process structures is covered individually to clarify the analysis of their effects on dynamic behavior. Naturally, a process may contain several of these structures, all of which will influence its behavior. The study of complex processes is delayed until Parts V and VI, which address the control of multiple inputmultiple output systems. Finally, in the last three chapters, dynamic responses of many processes to a step input have been shown to have a sigmoidal shape. This means that these processes could be approximated by adjusting parameters in a model of simple
VM0is)
GXBVW
•>©•* X„(5) FIGURE 5.19
Block diagram for the linearized models for a twoproduct distillation process.
166 CHAPTERS Dynamic Behavior of Typical Process Systems
structure. While this observation is not especially helpful for analytical modelling, it is very important for empirical modelling, which develops models based on experimental data. This is the topic of the next chapter.
REFERENCES Buckley, P., Techniques in Process Control, Wiley, New York, 1964. Foust, A. et al., Principles of Unit Operations, Wiley, New York, 1980. Narraway, L., J. Perkins, and G. Barton, "Interaction between Process Design and Process Control," J. Proc. Cont., 1, 5, 243250 (1991). Nisenfeld, E., Industrial Evaporators, Principles of Operation and Control, Instrument Society of America, Research Triangle Park, NC, 1985. Ogata, K., System Dynamics (2nd ed.), PrenticeHall, Englewood Cliffs, NJ, 1992. Treybal, R., Mass Transfer Operations, McGrawHill, New York, 1955. Smith, J., and H. Van Ness, Chemical Engineering Thermodynamics (4th ed.), McGrawHill, New York, 1987. Weber, T, An Introduction to Process Dynamics and Control, Wiley, New York, 1973.
ADDITIONAL RESOURCES Recycle systems occur frequently and substantially affect process dynamics. Some studies on these effects are noted here. Douglas, J., J. Orcutt, and P. Berthiaume, "Design of FeedEffluent ExchangerReactor Systems," IEC Fund., I, 4, 253257 (1962). Gilliland, E., L. Gould, and T. Boyle, "Dynamic Effects of Material Recycle," Joint Auto. Cont. Conf, Stanford, CA, 140146 (1964). Luyben, W, "Dynamics and Control of Recycle Systems. 1. Simple OpenLoop and ClosedLoop Systems," IEC Res., 32, 466475 (1993). Rinard, I., and B. Benjamin, "Control of Recycle Systems, Part 1. Continuous Systems," Auto. Cont. Conf, 1982, WA5. Inverse response can be a vexing problem for control. The engineer should understand the process causes of inverse response systems and modify the design to mitigate the effect. Iionya, K., and R. Altpeter, "Inverse Response in Process Control," IEC, 54, 7, 39 (1962). Modelling complex distillation columns is a challenging task that has received a great deal of study. Fuentes, C, and W. Luyben, "Control of High Purity Distillation Columns," IEC (Industrial and Engineering Chemistry), Proc. Des. Devel, 22, 361— 366(1983). Gilliland, E., and C. Reed, "Degrees of Freedom in Multicomponent Absorp tion and Rectification Columns," IEC, 34, 5, 551557 (1942).
Heckle, M., B. Seid, and W Gilles, "Conventional and Modern Control for Distillation Columns, Design and Operating Experience," Chem. Ing. Tech. (German), 47, 5, 183188 (1975). Holland, C, UnsteadyState Processes with Applications in Multicomponent Distillation, PrenticeHall, Englewood Cliffs, NJ, 1966. Howard, G., "Degrees of Freedom for UnsteadyState Distillation Processes," IEC Fund., 6, 1, 8689 (1967). Kapoor, N., T. McAvoy, and T. Marlin, "Effect of Recycle Structures on Dis tillation Time Constants," A. I. Ch. E. J., 32, 3, 411418 (1986). Kim, C, and J. Friedly, "Approximate Dynamics of Large Staged Systems," IEC, Proc. Des. Devel, 13, 2, 177181 (1974). Levy, R., A. Foss, and E. Grens, "Response Modes of Binary Distillation Columns," IEC Fund., 8, 4, 765776 (1969). Tyreus, B., W. Luyben, and W Schiesser, "Stiffness in Distillation Models and the Use of Implicit Integration Method to Reduce Computation Time," IEC Proc. Des. Devel, 14, 4, 427433 (1975). Formulating models and programming numerical solution methods is always a good learning opportunity; however, the task is timeconsuming. The use of com mercial simulation systems is recommended for modelling complex processes. These systems can simulate the dynamics of typical chemical processes using standard models and accurate physical property relationships. Aspen, Aspen Dynamics™ and Aspen Custom Modeller™, Aspen Technol ogy, 10 Canal Park, Cambridge, MA, 1999. HYSYS.PLANT v2.0 Documentation, Dynamic Modelling Manual, Hyprotech Ltd., Calgary, 1998. The guidance before the questions in Chapters 3 and 4 is appropriate here as well. The key new issue introduced in this chapter and demonstrated in these questions is the effect of structure on the behavior of relatively simple individual elements.
QUESTIONS 5.1. A linearized model for a stirredtank heat exchanger is derived in Example 3.7 for a change in the coolant flow rate. Extend these results by deriv ing the model for simultaneous changes in the coolant flow rate and inlet temperature. Also, determine an analytical expression for the outlet tem perature T'it), for simultaneous step changes in the coolant flow and inlet temperature. (You may use all results from Example 3.7 without deriving.) 5.2. The jacketed heat exchanger in Figure Q5.2 is to be modelled. The input variable is Tq, and the output variable is T. The inlet coolant temperature is constant. The following assumptions may be made: (1) Both vessels are well mixed. (2) Physical properties are constant. (3) Flows and volumes are constant.
7b
'cO
do
(4) Q = UAiT  Tc) (5) The dynamic balances on both volumes must be solved simulta neously. id) Write the basic balances for both volumes in deviation variables. ib) Take the Laplace transforms. (c) Combine into the transfer function T'is)/ Tq(s). id) Analyze this result to determine whether the dynamic behavior is (i) stable and (ii) periodic. Remember that these properties are defined by the denominator of the transfer function. ie) The transfer function ignores initial conditions of the system. Briefly explain why the transfer function is useful—in other words, what prop erties can be determined easily using the transfer function?
168 CHAPTER 5 Dynamic Behavior of Typical Process Systems
i
L
'
v2
*3
M
Tray 2
\ L
1
*2
M
Tray 1
ii L
yo
'
(a) i
L 1
i
?2
*3
M
Tray 2
i
« *2
'
M
Tray 1
i
L
v:o
'
ib) FIGURE Q5.3
5.3. The continuoustime systems of two stages shown in Figure Q5.3a and b are to be analyzed. Assumptions are the following: (1) Liquid holdups are constant = M. (2) Constant molal overflow; the liquid (L) and vapor (V) flows are constant. (3) The concentrations x3 (and x2 in Figure Q5.3b) are constant. (4) The accumulation in the vapor phase is negligible. (5) Equilibrium can be modelled as yi = Kxt for this binary system. The nature of the dynamic behavior is to be determined for the inputoutput x2(s)/yo(s). (a) Derive the timedomain equations describing the dynamics of the con centrations on the two trays, x[ (t) and ^(0.t0 tne input variable y'0(t), in deviation variables. (b) Combine the results of (a) into the single transfer function x2 (s)/yo(s). (c) Determine the nature of the response. Is it (i) stable, (ii) over or un derdamped? (d) Is the response of x2 to a step change in yn in Figure Q5.3« faster or slower than in the system in Figure Q5.3& (with the same parameter values and x2 constant)? 5.4. The series of four chemical reactors are shown in Figure Q5.4. Each reactor is constant volume and constant temperature, and the flow rate is constant. The reaction is A >• B with the rate expression ta = —kC&. The con centration of component A in the last reactor is to be controlled, and the feed concentration of the inlet to the first reactor is a potential manipulated variable. (a) Derive the model (algebraic and differential equations) relating Cao to CA4(b) Combine these equations into one inputoutput model that has only Cao and Ca4, with other relevant variables eliminated. (Hint: Taking the Laplace transform of the equations in deviation variables is a good approach.) (c) Based on the model in (b), determine (i) The order of the system (ii) The stability of the system (iii) The damping of the system
(iv) The gain of the system (v) The shape of the response of Ca4 to a step in Cao (d) Based on your results in (c), does a causal relationship exist between Cao and Ca4? (e) Based on your results in (d), is it possible to control CA4 by adjusting Cao?
169 Questions
FIGURE Q5.4
Series stirredtank reactors. 5.5. The recycle mixing system in Figure Q5.5 is to be considered. The feed flow is 1 unit, and the recycle flow is 9 units. The pipe has a dead time of 10 seconds, and the recycle has negligible dynamics. The system is initially at steady state with pure solvent entering as feed. At time = 0, the concentration of the feed increases to 10%A. Plot the concentration at the exit of the pipe from t = 0 to the new steady state. 5.6. The chemical reactor without control of temperature or concentration in Figure Q5.6 is to be modelled and analyzed. The assumptions are as follows: (1) Cp(Cp = Cv), density, UA are constant. (2) Q = UA(T  Tcin) (3) F, Tc, T0, level are constant. (4) Disturbance is Cao(0' (5) Heat of reaction is significant. (6) Heat losses are insignificant. (7) System is initially at steady state. (8) Rate of reaction = mole rA=k0eE'RTCA (m3)(min) (a) Derive the material and energy balances for this reactor. Carefully define the system, state all assumptions, and show all steps, especially in the energy balance.
F=l
a
F=
F„=9
FIGURE Q5.5 A0
i
(wm Cooling
^ FIGURE Q5.6
170 (b) Linearize the equations about their steadystate values and express \&&mmmMmmmm them in deviation variables. CHAPTER 5 (c) Based on the linearized equations, state whether the system can exDynamic Behavior of perience overdamped behavior, and state mathematical criteria as a
Vfteul*™*** basis for your decision (Hint: Solve for tne terms that affect tne exP°"
nents of the dynamic response, and establish criteria for the qualitative characteristics.) (d) Repeat (c) for underdamped behavior. (e) Repeat (c) for unstable behavior.
5.7. A single isothermal CSTR has the following elementary reactions. CaseLA^B CaselLA^B Only component A is in the feed stream, and its concentration, Cao, can change as the input to the system. Answer the following questions for both Cases I and II. (a) Derive the model describing the concentration of component B in the reactor. (b) Which of the general system structures covered in this chapter de scribes this system? (c) Determine whether the system can experience underdamped, overdamped, and unstable behavior for physically possible parameter values. (d) Describe the response of this system to feed concentration step changes in Cao and determine which system would have a faster response. (e) Repeat all parts of this question, with the composition of A in the reactor being the output variable. 5.8. Figure 5.1 can be expanded to include more process systems and more inputs. (a) Include the following systems, with a sketch of a physical process: (1)
\/(xs + l)3 and (2) e~es/(xs + 1). (b) Include the following inputs for all systems: (1) ramp (CO and (2) pulse of finite duration. 5.9. The dynamic response of Ts in the heat exchanger and stirredtank sys tem in Figure Q5.9 is to be determined for a step increase in the flow to the exchanger Fex, with the total coolant flow Fc constant. (Assume that negligible transportation lag occurs in the pipes.) (a) Derive the models for both stirred tanks. (b) Determine the individual transfer functions. (c) Derive the overall transfer function. (d) Which of the general system structures covered in this chapter de scribes this system? (e) Explain the numerator zeros (if any) and poles in the system. (f) Describe the dynamic response of this system for the input step change in F«v.
171
 k
Questions
U F„ = constant
"by
FIGURE Q5.9
5.10. The system of vessels in Figure Q5.10 has gas flowing through it, and F0 is independent of Pi. (a) Assume that the flow through the restrictions is subsonic. (1) Derive linearized models for the pressure in each system. (2) Determine the transfer function for F2(s)/Fq(s). (3) Describe the response of this system to a step in Fo. (b) Repeat the analysis in part (a) for sonic flow through the restrictions.
FIGURE Q5.10
5.11. Answer the following questions. (a) Demonstrate that the dynamic behavior of a series of stable, firstorder systems approaches the dynamic behavior of a dead time as the number of firstorder systems becomes large, with xn = x\/n. Determine the value of the dead time. (b) For the reactor with recycle in Example 5.5, determine the value of the heat exchanger gain, Kh2, that would cause the system to be unsta ble. Explain the expected dynamic response to an increase in the feed temperature. (c) Discuss the manual control of a series of noninteracting time constants, a parallel system with overshoot, and a parallel system with inverse response. What would be your thought process for feedback control?
172 (d) What would be the order of the transfer function between the input Mamh^Mimms^^^m FMD and the output Xd for the distillation tower in Section 5.6? CHAPTER 5
Dynamic Behavior of 5'12» An autocatalytic system has a chemical reaction in which the product inTypical Process fluences the rate; such kinetics occur in biological systems. Consider the systems following system occurring in a constantvolume, isothermal, wellstirred reactor. A + B ▶ 2B + other products rA = kCAC& (a) Formulate a dynamic model of the reactor to predict the concentration of B in the reactor. (b) Determine the possible steadystate values for Cb when only A is present in the feed. (Hint: Two possible steady states exist.) (c) Under what conditions does the reactor go to each steady state? (d) Reformulate the model and answer all questions for the case in which the product is separated and some pure B is returned to the reactor as a recycle. What would be the advantage of this recycle? How would the recycle affect the gain and time constant of Cb in response to a change in Cao? 5.13. For each of the systems in Figure Q5.13, demonstrate through a funda mental model whether the system inventory is selfregulating or not for changes in flow in. In all cases, the flow in (Fm) can change independent of the inventory in the vessel. (a) A heat exchanger in which the purecomponent liquid entering at its boiling point in the vessel boils and the duty is proportional to the heat transfer area. (b) A liquidfilled tank with a constant flow out. (c) A gasfilled system with a moving roof and a constant mass on the roof. The gas exits through a partially open restriction. (d) A gasfilled system with constant volume. The gas exits through a partially open restriction. 5.14. The stirredtank mixing process in Figure Q5.14 is to be analyzed. The system has a single feed, two tanks, and a single product. All flow rates, along with the levels, are constant. Answer the following questions com pletely. You may assume that (1) the tanks are well mixed, (2) the density is constant, and (3) transportation delays due to the pipes are negligible. For parts (a) through (c), F3 = Fo. (a) Derive the analytical model for the inputoutput system Cao and Ca2 with all flows constant. (b) What is the general structure of the system in (a)? (c) What conclusions can be determined for the system in id) regarding the stability, periodicity, and either overshoot or inverse response for a step input? id) Determine the answers for ia) through (c) for (i) F3 = 0 and (ii) F3 = very large. 5.15. The system in Figure Q5.15 has two stirred tanks; the first is a heat ex changer, and the second is a CSTR. The product of the reactor exchanges
173 Questions Liquid in Constant flow out
Hot fluid
ia)
ib)
f^l 'in
C^r^
(c)
id) FIGURE Q5.13
'AO
U
'Al
do
'A2
do FIGURE Q5.14
heat with the feed in the heat exchanger. A single, zerothorder reaction of A >• products occurs in the second reactor with a heat of reaction (—A Hnn). id) Formulate a model of the system to predict the temperature response in both tanks to a change in the feed temperature with all flows constant, and linearize the model. Determine to which process structure category this process belongs. ib) Determine under what conditions the system would experience (i) pe riodic behavior and (ii) unstable behavior, (c) Discuss your results and limitations in the model. [Hint: This system is simpler than Example 3.10, in that the coolant flow is constant; thus, UA = aF^ is constant. It is more complex in that the energy balances for the two tanks must be solved simultaneously.] 5.16. The recycle system in Figure Q5.16 has a wellmixed, isothermal, constantvolume reactor and subsequent separation unit, in which the unreacted feed is separated from the product and returned to the reactor. A single step change occurs in the reactor temperature, which can be considered a step in the rate constant of the firstorder reaction. Model the system and determine and compare the dynamics for two operating methods.
FIGURE Q5.15
Solvent
174
rAr CHAPTER 5 Dynamic Behavior of Typical Process Systems
Pure A
Lk
Products and Solvent
Pure A
FIGURE Q5.16
id) The flow FA is constant. ib) The flow FAr is constant. 5.17. A tubular heat exchanger with plug flow in the tube has steam at a constant temperature on the shell side. The system is initially at steady state with no temperature driving force, and the steam is introduced in a step to the shell. id) Determine the tube outlet temperature as a function of time. This will require analyzing a distributedparameter model. ib) Formulate a lumpedparameter model that would give an approximate result for the tube outlet temperature.
K
Transportation delay
^
u ob "Dead zone" section of volume, which has no transfer with wellmixed section
FIGURE Q5.18
5.18. One way to account for imperfect mixing in a single stirred tank is to include commonly occurring nonidealities and fit parameters in a model to empirical data. For the nonideal model in Figure Q5.18, plot the shapes of the step and impulse responses for various values of the nonidealities. Could you fit an imperfect model using one of these sets of data? 5.19. Derive the models reported in Figures 5.2 and 5.3 for the electrical and mechanical systems. 5.20. From the principles in this chapter (and Appendix D), estimate the shape and ?63% of the step change for the following systems: id) Example 3.3, ib) Example 3.10, (c) Question 4.15, and (d) Question 4.18. 5.21. A nonisothermal CSTR with heat transfer is modelled in Section C2 in Appendix C. For each of the following situations, describe the possible shapes of the dynamic response of the concentration, Ca, to a step change in the coolant flow rate. There may be more than one per situation. Ex plain your answers by discussing, for example, the interaction between the material and energy balances. id) No chemical reaction, Ko = 0 ib) Nonzero chemical reaction, but AHrxn = 0 (c) General case with nonzero reaction and heat of reaction
Empirical Model Identification 6.1 □ INTRODUCTION
To this point, we have been modelling processes using fundamental principles, and this approach has been very valuable in establishing relationships between parameters in physical systems and the transient behavior of the systems. Unfortu nately, this approach has limitations, which generally result from the complexity of fundamental models. For example, a fundamental model of a distillation col umn with 10 components and 50 trays would have on the order of 500 differential equations. In addition, the model would contain many parameters to character ize the thermodynamic relationships (equilibrium K values), rate processes (heat transfer coefficients), and model nonidealities (tray efficiencies). Therefore, mod elling most realistic processes requires a large engineering effort to formulate the equations, determine all parameter values, and solve the equations, usually through numerical methods. This effort is justified when very accurate predictions of dy namic responses over a wide range of process operating conditions are needed. This chapter presents a very efficient alternative modelling method specifi cally designed for process control, termed empirical identification. The models developed using this method provide the dynamic relationship between selected input and output variables. For example, the empirical model for the distillation column discussed previously could relate the reflux flow rate to the distillate com position. In comparison to this simple empirical model, the fundamental model provides information on how all of the tray and product compositions and temper atures depend on variables such as reflux. Thus, the empirical models described in
this chapter, while tailored to the specific needs of process control, do not provide enough information to satisfy all process design and analysis requirements and cannot replace fundamental models for all applications. In empirical model building, models are determined by making small changes in the input variable(s) about a nominal operating condition. The resulting dynamic response is used to determine the model. This general procedure is essentially an experimental linearization of the process that is valid for some region about the nominal conditions. As we shall see in later chapters, linear transfer function models developed using empirical methods are adequate for many process control designs and implementations. Because the analysis methods are not presented until later chapters, we cannot yet definitively evaluate the usefulness of the models, although we will see that they are quite useful. Thus, it is important to monitor the expected accuracy of the modelling methods in this chapter so that it can be considered in later chapters. As a rough guideline, the model parameters should be determined within ±20 percent, although much greater accuracy is required for a few multivariable control calculations. The empirical methods involve designed experiments, during which the pro cess is perturbed to generate dynamic data. The success of the methods requires close adherence to principles of experimental design and model fitting, which are presented in the next section. In subsequent sections, two identification methods are presented. The first method is termed the process reaction curve and employs sim ple, graphical procedures for model fitting. The second and more general method employs statistical principles for determining the parameters. Several examples are presented with each method. The final section reviews some advanced issues and other methods not presented in this chapter so that the reader will be able to select the most appropriate technology for model building.
176 CHAPTER 6 Empirical Model Identification
Start
A priori knowledge
Experimental Design •<
Plant Experiment
Determine Model Structure
Parameter Estimation
Diagnostic Evaluation Alternative data
6.2 a AN EMPIRICAL MODEL BUILDING PROCEDURE
Model Verification
Completion
FIGURE 6.1 Procedure for empirical transfer function model identification.
y do
£ CD
Empirical model building should be undertaken using the sixstep procedure shown in Figure 6.1. This procedure ensures that proper data is generated through careful experimental design and execution. Also, the procedure makes the best use of the data by thoroughly diagnosing and verifying results from the initial model parameter calculations. The schematic in Figure 6.1 highlights the fact that some a priori knowledge is required to plan the experiment and that the procedure can, and often does, require iteration, as shown by the dashed lines. At the completion of the procedure described in this section, an adequate model should be determined, or the engineer will at least know that a satisfactory model has not been identified and that further experimentation is required. Throughout this chapter several examples are presented. The first example is shown in Figure 6.2, which has two stirred tanks. The process model to be identified relates the valve opening in the heating oil line to the outlet temperature of the second tank.
Experimental Design FIGURE 6.2
Example process for empirical model identification.
An important and often underestimated aspect of empirical modelling is the need for proper experimental design. Since every method requires some type of input perturbation, the design determines its shape and duration. It also determines the
base operating conditions for the process, which essentially determine the con 177 ditions about which the process model is accurate. Finally, the magnitude of the ^jH«aii^^^iM«^ input perturbation is determined. This magnitude must be small enough to ensure An Empirical Model that the key safety and product quality limitations are observed. It is important to Building Procedure begin with a perturbation that is on the safe (small) side rather than cause a severe process disturbance. Clearly, the design requires a priori information about the process and its dynamic responses. This information is normally available from previous operating experience; if no prior information is available, some preliminary experiments must be performed. For the example in Figure 6.2, the time constants for each tank could be used to determine a first estimate for the response of the entire system. The result of this step is a complete plan for the test which should include 1. A description of the base operating conditions 2. A definition of the perturbations 3. A definition of the variables to be measured, along with the measurement frequency 4. An estimate of the duration of the experiment Naturally, the plan should be reviewed with all operating personnel to ensure that it does not interfere with other plant activities.
Plant Experiment The experiment should be executed as close to the plan as possible. While varia tion in plant operation is inevitable, large disturbances during the experiment can invalidate the results; therefore, plant operation should be monitored during the experiment. Since the experiment is designed to establish the relationship between one input and output, changes in other inputs during the experiment could make the data unusable for identifying a dynamic model. This monitoring must be per formed throughout the experiment, using measuring devices where available and using other sources of information, such as laboratory analysis, when process sen sors are not available. For the example in Figure 6.2, variables such as the feed inlet temperature affect the outlet temperature of the second tank, and they should be monitored to ensure that they are approximately constant during the experiment.
Determining Model Structure Currently, many methods are available to calculate the parameters in a model whose structure is set; however, few methods exist for determining the structure of a model (e.g., first or secondorder transfer function), based solely on the data. Typically, the engineer must assume a model structure and subsequently evaluate the assumption. The initial structure is selected based on prior knowledge of the unit operation, perhaps based on the structure of a fundamental model, and based on patterns in the experimental data just collected. The assumption is evaluated in the latter diagnostic step of this procedure. The goal is not to develop a model that exactly matches the experimental data. Rather, the goal is to develop a model that describes the inputoutput behavior of the process adequately for use in process control.
178 CHAPTER 6 Empirical Model Identification
Empirical methods typically use loworder linear models with dead time. Often (but not always), nrstorderwithdeadtime models are adequate for process control analysis and design.
At times, higherorder models are required, and advanced empirical methods are available for determining the model structure (Box and Jenkins, 1976).
Parameter Estimation At this point a model structure has been selected and data has been collected. Two methods are presented in this chapter to determine values for the model parameters so that the model provides a good fit to the experimental data. One method uses a graphical technique; the other uses statistical principles. Both methods provide estimates for parameters in transfer function models, such as gain, time constant, and dead time in a firstorderwithdeadtime model. The methods differ in the generality allowed in the model structure and experimental design.
Diagnostic Evaluation Some evaluation is required before the model is used for control. The diagnostic level of evaluation determines how well the model fits the data used for parameter estimation. Generally, the diagnostic evaluation can use two approaches: (1) a comparison of the model prediction with the measured data and (2) a comparison of the results with any assumptions used in the estimation method.
Verification The final check on the model is to verify it by comparison with additional data not used in the parameter estimation. Although this step is not always performed, it is worth comparing the model to data collected at another time to be sure that typical variation in plant operation does not significantly degrade model accuracy. The methods used in this step are the same as in the diagnostic evaluation step. It is appropriate to emphasize once again that the model developed by this procedure relates the input perturbation to the output response. The process mod elled includes all equipment between the input and output; thus, the typical model includes the dynamics of valves and sensors as well as the process equipment. As we will see later, this is not a limitation; in fact, the empirical model provides the proper information for control analysis, because it includes the elements in the control loop. Finally, two conflicting objectives must always be balanced in performing this experimental procedure. The first objective is the maintenance of safe, smooth, and profitable plant operation, for which a small experimental input perturbation is desired. However, the second objective is the development of an accurate model for process control design that will be improved by a relatively large input perturbation. The proper experimental procedure must balance these two objectives by allowing a shortterm disturbance so that the future plant operation is improved through good process control.
6.3 m THE PROCESS REACTION CURVE
179
The process reaction curve is probably the most widely used method for identifying dynamic models. It is simple to perform, and although it is the least general method, it provides adequate models for many applications. First, the method is explained and demonstrated through an example. Then it is critically evaluated, with strong and weak points noted. The process reaction curve method involves the following four actions:
1. Allow the process to reach steady state. 2. Introduce a single step change in the input variable. 3. Collect input and output response data until the process again reaches steady state. 4. Perform the graphical process reaction curve calculations.
The graphical calculations determine the parameters for a firstorderwithdeadtime model: the process reaction curve is restricted to this model. The form of the model is as follows, with Xis) denoting the input and Yis) denoting the output, both expressed in deviation variables:
Yis) Kpees Xis) xs + 1
(6.1)
There are two slightly different graphical techniques in common use, and both are explained in this section. The first technique, Method I, adapted from Ziegler and Nichols (1942), uses the graphical calculations shown in Figure 6.3 for the stirredtank process in Figure 6.2. The intermediate values determined from the
FIGURE 6.3 Process reaction curve, Method I.
The Process Reaction Curve
180 CHAPTER 6 Empirical Model Identification
graph are the magnitude of the input change, 8', the magnitude of the steadystate change in the output, A; and the maximum slope of the outputversustime plot, S. The values from the plot can be related to the model parameters according to the following relationships for a firstorderwithdeadtime model. The general model for a step in the input with t > 9 is Y'(t) = KpS[l  e{te)'r] (6.2) The slope for this response at any time t > 9 can be determined to be
« = {V[l^]} = f^^
(6.3)
The maximum slope occurs at t = 9, so S = A/x. Thus, the model parameters can be calculated as KP = A/5 x = A/S (6.4) 9 = intercept of maximum slope with initial value (as shown in Figure 6.3) A second technique, Method II, uses the graphical calculations shown in Fig ure 6.4. The intermediate values determined from the graph are the magnitude of the input change, 8; the magnitude of the steadystate change in the output, A; and the times at which the output reaches 28 and 63 percent of its final value. The values from the plot can be related to the model parameters using the general expression in equation (6.2). Any two values of time can be selected to determine the unknown parameters, 9 and r. The typical times are selected where the tran sient response is changing rapidly so that the model parameters can be accurately determined in spite of measurement noise (Smith, 1972). The expressions are Y(9 + x) = A(l  e~l) = 0.632A Y(9 + r/3) = A(l  e~l/3) = 0.283A 15 t\  10 U
Output /

c
/
0.63A Li

 5
■= 10h
/ Input
0 ' 0
'  0 1
1
5
5
i>
U.ZOil
/
' 10
l
I
I
20 Time
25
Process reaction curve, Method II.
J
5
15
FIGURE 6.4
u •o o 15 a
T, , 30
35
40
181
Thus, the values of time at which the output reaches 28.3 and 63.2 percent of its final value are used to calculate the model parameters. x hz%  9 +  t63% = 9 + x 3 (6.6) X — 1.5(^3% — *28%) 9 — f63% — X
The Process Reaction Curve
Ideally, both techniques should give representative models; however, Method I requires the engineer to find a slope (i.e., a derivative) of a measured signal.
Because of the difficulty in evaluating the slope, especially when the signal has highfrequency noise, Method I typically has larger errors in the parameter estimates; thus, Method II is preferred.
EXAMPLE 6.1. The process reaction experiments have been performed on the stirredtank system in Figure 6.2 and the data is given in Figures 6.3 and 6.4 for Methods I and II, respectively. Determine the parameters for the firstorderwithdeadtime model. Solution. The graphical calculations are shown in Figure 6.3 for Method I, and the calculations are summarized as 8 = 5.0% open A = 13.1°C KP = A/8 = (13.1°C)/(5% open) = 2.6°C/% open 5 = 1.40°C/min r = A/5 = (13.1°C)/(1.40°C/min) = 9.36 min 9 = 3.3 min The graphical results are shown in Figure 6.4 for Method II, and the calculations are summarized below. Note that the calculations for KPl A, and 8 are the same and thus not repeated. Also, time is measured from the input step change. 0.63A = 8.3°C f63* = 9.7 min 0.28A = 3.7°C t2m = 5.7 min r = \.5(t63%  f28%) = 15(9.7  5.7) min = 6.0 min 9 — t(,3% — r = (9.7 — 6.0) min = 3.7 min
Further details for the process reaction curve method are summarized below with respect to the sixstep empirical procedure. Experimental Design The calculation procedure is based on a perfect step change in the input as demon strated in equation (6.2). The input can normally be changed in a step when it is a manipulated variable, such as valve percent open; however, some control designs will require models for inputs such as feed composition, which cannot be manip ulated in a step, if at all. The sensitivity of the model results to deviations from a perfect input step are shown in Figure 6.5 for an example in which the true plant
w db %
cb
182 CHAPTER 6 Empirical Model Identification
0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 T input Tprocess
FIGURE 6.5
Sensitivity of process reaction curve to an imperfect step input, true process 0/(0 + t) = 0.33. had a dead time of 0.5 and a process time constant (Tpr0cess) of 1.0. The step change was introduced through a firstorder system with a time constant (Tinput) that varied from 0.0 (i.e., a perfect step) to 1.0. This case study demonstrates that very small deviations from a perfect step input are acceptable but that large deviations lead to significant model parameter errors, especially in the dead time. In addition to the input shape, the input magnitude is also important. As previously noted, the accuracy of the model depends on the magnitude of the input step change. The output change cannot be too small, because of noise in the measured output, which is caused by many small process disturbances and sensor nonidealities. The output signal is the magnitude of the change in the output variable. Naturally, the larger the input step, the more accurate the modelling results but the larger the disturbance to the process.
A rough guideline for the process reaction curve is that the signaltonoise ratio should be at least 5.
The noise level can be estimated as the variation experienced by the output variable when all measured inputs are constant. For example, if an output temper ature varies ±1°C due to noise, the input magnitude should be large enough to cause an output change A of at least 5°C. Finally, the duration of the experiment is set by the requirement of achieving a final steady state after the input step. Thus, the experiment would be expected to last at least a time equal to the dead time plus four time constants, 9 +4z. In the stirredtank example, the duration of the experiment could be estimated from the time constants of the two tanks, plus some time for the heat exchanger
and sensor dynamics. If the data is not recorded continuously, it should be col lected frequently enough for the graphical analysis; 40 or more points would be preferable, depending on the amount of highfrequency noise.
Plant Experiment Since model errors can be large if another, perhaps unmeasured, input variable changes, experiments should be designed to identify whether disturbances have occurred. One way to do this is to ensure that the final condition of the manipulated input variable is the same as the initial condition, which naturally requires more than one step change. Then, if the output variable also returns to its initial condition, one can reasonably assume that no longterm disturbance has occurred, although a transient disturbance could take place and not be identified by this checking method. If the final value of the output variable is significantly different from its initial value, the entire experiment is questionable and should be repeated. This situation is discussed further in Example 6.3.
Diagnostic Evaluation The basic technique for evaluating results of the process reaction curve is to plot the data and the model predictions on the same graph. Visual comparison can be used to determine whether the model provides a good fit to the data used in calculating its parameters. This procedure has been applied to Example 6.1 using the results from Method II, and the comparison is shown in Figure 6.6. Since the data and model do not differ by more than about 0.5°C throughout the transient, the model would normally be accepted for most control analyses. Most of the control analysis methods presented in later parts of the book require linear models, and information on strong nonlinearities would be a valuable result 15
Measured output
 10

co Q.
y T i
l
u
O
 5
5
& =1
o
Predicted output
!r /


0 5
1
■
10
15
i
i
i
i
20 Time
25
30
35
40
5
FIGURE 6.6
Comparison of measured and predicted outputs.
183 The Process Reaction Curve
184 CHAPTER 6 Empirical Model Identification
Time
FIGURE 6.7
Example of experimental design to evaluate the linearity of a process. of empirical model identification. The linearity can be evaluated by comparing the model parameters determined from experiments of various magnitudes and directions, as shown in Figure 6.7. If the model parameters are similar, the process is nearly linear over the range investigated. If the parameters are very different, the process is highly nonlinear, and control methods described in Chapter 16 may have to be applied. Ve r i fi c a t i o n If additional data is collected that is not used to calculate the model parameters, it can be compared with the model using the same techniques as in the diagnostic step. EXAMPLE 6.2.
A more realistic set of data for the two stirredtank heating process is given in Figure 6.8. This data has noise, which could be due to imperfect mixing, sensor noise, and variation in other input variables. The application of the process reaction curve requires some judgment. The reader should perform both methods on the data and note the difficulty in Method I. Typical results for the methods are given in the following table, but the reader can expect to obtain slightly different values due to the noise.
Method KP 0 r
2.6 2.4 10.8
Method II 2.6 3.7 5.9
°C/%open min min
FIGURE 6.8
Process reaction curve for Example 6.2.
FIGURE 6.9
Experiment data for process reaction curve when input is returned to its initial condition.
EXAMPLE 6.3.
Data for two step changes is given in Figure 6.9. Determine a dynamic model using the process reaction curve method. Note that there is no difference between the initial and final values of the input valve opening. However, the output temperature does not return to its initial value. This is due to some nonideality in the experiment, such as an unmeasured
do
1 do
186 CHAPTER 6 Empirical Model Identification
disturbance or a sticky valve that did not move as expected. Naturally, the output variable will not return to exactly the same value, but the difference between the initial and final values in this example seems suspiciously large, because 4°C is 50 percent of the temperature change occurring during the experiment. Therefore, this data should not be used, and the experiment should be repeated.
EXAMPLE 6.4. A fundamental model for a tank mixing process similar to Figure 6.10a will be developed in Chapter 7, where the time constant of each tank is shown to be volume/volumetric flow rate (V/F). Determine approximate models for this process at three flow rates of stream B given below when each tank volume is 35 m3. This example demonstrates the usefulness of the insight provided from funda mental modelling, even though a simplified model is determined empirically. The process reaction curve experiment was performed for this process at the three flow
CD $
1
U ■wk
CD
cb
©
(«)
Time (min)
(*) FIGURE 6.10 For Example 6.4: (a) Threetank mixing process; ib) process reaction curve for base case.
rates, all at a base exit concentration of 3 percent A, and the results at the base case flow are shown in Figure 6.106. The results are summarized in the following table.
Fundamental
Simplified Flow (m3/min)
KP (% A/% open)
0 (min)
5.1 7.0 8.1
0.055 0.04 0.036
7.6 5.5 4.7
T
0+T
(min)
(min)
14.5 10.5 9.1
22.1 16.0 13.8
(min) 20.7 15.0 + base case 12.9
HflGE8S8K8(l»R5«iIIB<5iPBSS(^^
The fundamental model demonstrates that the time constants (r = V/F) depend on the flow rate, decreasing as the flow increases. This trend is confirmed in the simplified model as well. Also, the approximate relationship for systems of noninteracting time constants in series, equation (5.41 b), that the sum of the dead times plus time constants is unchanged by model simplification, is rather good for this process.
The most important characteristics of the process reaction curve method are summarized in Table 6.1. The major advantages of the process reaction curve method are its simplicity and short experimental duration, which result in its fre quent application for simple control models.
TABLE 6.1 Summary off the process reaction curve Characteristic
Process reaction curve
Input magnitude
Large enough to give an output signaltonoise ratio greater than 5 The process should reach steady state; thus the duration is at least 0 + 4z A nearly perfect step change is required The model is restricted to firstorder with dead time; this model structure is adequate for processes having overdamped, monotonic step responses Accuracy can be strongly affected (degraded) by significant disturbances Plot model versus data; return input to initial value Simple hand and graphical calculations
Experiment duration Input change Model structure
Accuracy with unmeasured disturbances Diagnostics Calculations
187 The Process Reaction Curve
188 CHAPTER 6 Empirical Model Identification
6.4 a STATISTICAL MODEL IDENTIFICATION The previously described graphical method had two major limitations: a firstorderwithdeadtime model and a perfect step input. Statistical model identification methods provide more flexible approaches to identification that relax these limits to model structure and experimental design. In addition, the statistical method uses all data and not just a few points from the response, which should provide better parameter estimates from noisy process data. A simple version of statistical model fitting is presented here to introduce the concept and provide another useful identification method. The same sixstep procedure described in Section 6.2 is used with this method. The statistical method introduced here involves the following three actions:
1. Introduce a perturbation (or sequence of perturbations) in the input variable. There is no restriction on the shape of the perturbation, but the effect on the output must be large enough to enable a model to be identified. 2. 'Collect input and output response data. It is not necessary that the process regain steady state at the end of the experiment. 3. Calculate the model parameters as described in the subsequent paragraphs.
The statistical method described in this section uses a regression method to fit the experimental data, and the closedform solution method requires an algebraic equation with unknown parameters. Thus, the transfer function model must be converted into an algebraic model that relates the current value of the output to past values of the input and output. There are several methods for performing this transform; the most accurate and general for linear systems involves ztransforms, which serve a similar purpose for discrete systems as Laplace transforms serve for continuous systems (see Appendix L). The method used here is much simpler and is adequate for demonstrating the statistical identification method and fitting models of simple structure, such as firstorder with dead time (see Appendix F). The firstorderwithdeadtime model can be written in the time domain ac cording to the equation
JY'it) +Y'it) = KpX'it0) dt
(6.7)
Again, the prime denotes deviation from the initial steadystate value. This differ ential equation can be integrated from time f, to tt + At assuming that the input X'it) is constant over this period. Note that the dead time is represented by an integer number of sample delays (i.e., T = 9/ At). The resulting equation is y/+1 = e"'TYt' + Kpi\  eA"*)Xl In further equations the notation is simplified according to the equation y/+l=ay;+*x;_r
(6.8)
(6.9)
The challenge is to determine the parameters a, b, and T that provide the best model for the data. Then the model parameters Kp,z, and 9 can be calculated. The procedure used involves linear regression, which is briefly explained here and is thoroughly presented in many references (e.g., Box et al., 1978). Assume
for the moment that we know the value of r, the dead time (this assumption will be addressed later in the method). Typical data from the process experiment is given in Table 6.2; note that the measurements are provided at equispaced intervals. Since we want to fit an algebraic equation of the form in equation (6.9), the data must be arranged to conform to the equation. This is done in Table 6.2, where for every measured value of (Y{+l)m the corresponding measured values of (7/),,, and (Xj_r)m are provided on the same line. Using the model it is also possible to predict the output variable at any time, with (Yi+\)p representing the predicted value, using the appropriate measured variables.
189 Statistical Model Identification
(6.10)
(Y'i+l)p=a(Y!)m+b(X'i_r)l
Note that the subscript m indicates a measured value, and the subscript p indicates a predicted output value. The "best" model parameters a and b would provide an accurate prediction of the output at each time; thus, the goal is to calculate the values of the parameters a and b so that (Y'i+l)m and (Y[+l)p are as nearly equal as possible. The common technique for determining the parameters is to apply the least squares method, which minimizes the sum of error squared between the measured and predicted values over all samples, i = r + 1 to n. The error can be expressed as follows: n
n
i=r+\
n
/=r+i
/=r+i
(6.11) The minimization of this term requires that the derivatives of the sum of error TABLE 6.2 Data for statistical model identification Data in original format as collected in experiment
Timer
Input, X
Output, Y
0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6
50 50 52 52 52 52 52 52 52
75 75 75 75 75.05 75.1 75.3 75.6 75.7
Data in restructured format for regression model fitting, firstorderwithdeadtime model with dead time of two sample periods z vector in equation (6.16)
U matrix in equation (6.16) X' = X  Xs with X, = 50 Y' = Y  Ys with Ys = 75
Sample no. i
Output, y;+1
Delayed Output, F/ input, X(_2
1 2 3 4 5 6 7 8
0 0.05 0.1 0.3 0.6 0.7
0 0 0.05 0.1 0.3 0.6
0 0 2 2 2 2
Table contiinued for diiration of experiment ' M m ^ M ^ ^ m ^ i i ^ i ^ i i i ^ ^ ^ m m m ^ ^ ^ ^ i km®s^mmiimm$immMM&mmz^mmuMx&i I.MKK,*
190
squares with respect to the parameters are zero. 7 1
CHAPTER 6 Empirical Model Identification
_3_ da
= 2 E (y/)« IW+i)« " «G7)«  *(*/r>«] = 0 U=r+i
(6.12)
= 2 J] <*/r>« IW+i)»  flW)m  b(X'{_r)m] = 0
d_
lb
/=r+i
L/=r+i
i=r+i
(6.13) Equations (6.12) and (6.13) are linear in the two unknowns a and b, as is perhaps ""*~ moreeasily recognized when the equations are rearranged as follows: n
n
n
« E (y/)» +* E (*7)*(*/r)« = E (^"W+i)" (6'14> j=r+i
i=r+i
i=r+i
E <*/)(Xlr)«+* E (X!r)» = E (X/r)(i7+i)« (615)
=r+i
/=r+i
i=r+i
The values of the unknowns can be determined using various methods for solving linear equations (Anton, 1987); however, a more convenient approach is to use a computer program that is designed to solve the least squares problem. With these programs, the engineer simply enters the data in the form of Table 6.2, and the program automatically sets up and solves equations (6.14) and (6.15) for a and b. These programs are designed to solve the least squares method by matrix methods. The measured values for this problem can be entered into the following matrices:
U =
Y'
X'3r
Y M'
x\4  r
Y' \Jn\
z =
X n'  r  i j
n
(6.16)
_ Y1 n_
The least squares solution for the parameters can be shown to be (Graupe, 1972) =
(UTU)_,UTz
(6.17)
Many computer programs exist for solving linear least squares, and simple problems can be solved easily using a spreadsheet program with a linear regression option.
Given this method for determining the coefficients a and b, it is necessary to return to the assumption that the dead time, T = 9/At, is known. To determine the dead time accurately, it is necessary to solve the least squares problem in equations (6.14) and (6.15) for several values of T, with the value of T giving the lowest sum of error squared (more properly, the sum of error squared divided by the number of degrees of freedom, which is equal to the number of data points minus the number of parameters fitted) being the best estimate of the dead time. This approach, which is essentially a search in one direction, is required because the variable T is discrete (i.e., it takes only integer values), so that it is not possible
to determine the analytical derivative of the sum of errors squared with respect to dead time. Caution should be used, because the relationship between the dead time and sum of errors squared may not be monotonic; if more than one minimum exists, the dead time resulting in the smallest sum of errors squared should be selected. The statistical method presented in this section, minimizing the sum of er rors squared, is an intuitively appealing approach to finding the best values of the parameters. However, it depends on assumptions that, if violated significantly, could lead to erroneous estimates of the parameters. These assumptions are com pletely described in statistics textbooks (Box et al., 1978). The most important assumptions are the following: 1. The error £, is an independent random variable with zero mean. 2. The model structure reasonably represents the true process dynamics. 3. The parameters a and b do not change significantly during the experiment. The following assumptions are also made in the least squares method; how ever, the model accuracy is not as strongly affected when they are slightly violated: 4. The variance of the error is constant. 5. The input variable is known without error. When all assumptions are valid, the least squares assumption will yield good estimates of the parameters. Note that the experimental and diagnostic methods are designed to ensure that the assumptions are satisfied. EXAMPLE 6.5.
Determine the parameters for a firstorderwithdeadtime model for the stirredtank example data in Figure 6.3. The data must be sampled at equispaced periods, which were chosen to be 0.333 minutes for this example. Since the data arrays are very long, they are not reported. The data was organized as shown in Table 6.2. Several different values of the dead time were assumed, and the regression was performed for each. The results are summarized in the following table.
Y,e2
Dead time, r 7
8 9 10
0.964 0.9605 0.9578 0.9555
0.101 0.108 0.1143 0.1196
7.52 6.33 5.86 6.21
(minimum)
The dead time is selected to be the value that gives the smallest sum of errors squared; thus, the estimated dead time is 3 minutes, 0 = (O(Af) = 9(0.333). The other model parameters can be calculated from the regression results. r = At/(\na) = 0.333/(0.0431) = 7.7 min Kp = b/(\ a) = 0.1143/(1  0.9578) = 2.7°C/%open
191 Statistical Model Identification
192 CHAPTER 6 Empirical Model Identification
The comments in Section 6.3 regarding the process reaction curve and the sixstep procedure are also relevant for this statistical method. Some additional comments specific to the statistical method are given here. Experimental Design The input change can have a general shape (i.e., a step is not required), although Example 6.5 demonstrates that the statistical method works for step inputs. This generality is very important, because it is sometimes necessary to build models for inputs that are not directly manipulated, such as measured disturbance variables. Sufficient input changes are required to provide enough information to over come random noise in the measurement. Also, the data selected from the transient for use in the least squares determines which aspects of the dynamic response are fitted best. For example, if the duration of the experiment is too short, the method will provide a good fit for the initial part of the transient, but not necessarily for the steadystate gain. For this method with one or a few input changes, the in put changes should be large enough and of long enough duration that the output variable reaches at least 63 percent of its final value. Note that more sophisticated experimental design methods (beyond the treatment in this book) are available that require much smaller output variation at the expense of longer experiment duration (Box and Jenkins, 1976). Finally, the dead time cannot be determined with accuracy greater than the data collection sample period At. Thus, this period must be small enough to satisfy control system design requirements explained in later parts of the book. For now, a rough guideline can be used that At should be less than 5 percent of the sum of the dead time plus time constant. Plant Experimentation The input variable must be measured without significant noise. If this is not the case, more sophisticated statistical methods must be used. Model Structure Equations have been derived for a firstorder model in this chapter. Other models could be derived in the same manner. The simplest model structure that provides an adequate fit should be selected. Diagnostic Procedure One of the assumptions was that the error—the deviation between the model predic tion and the measurement—is a random variable. The errors, sometimes referred to as the residuals, can be plotted against time to determine whether any unexpected, large correlation in time exists. This is done for the results of the following example. EXAMPLE 6.6. Data has been collected for the same stirredtank system analyzed in Example 6.2; however, the data in this example contains noise, as shown in Figure 6.8. Determine the model parameters using the statistical identification method.
193 Statistical Model Identification
8 o.
FIGURE 6.11 Comparison of measured and predicted output values from Example 6.6.
The procedure for this data set is the same as used in Example 6.5. No judg ment is required in fitting slopes or smoothing curves as was required with the process reaction curve method. The results are as follows, plotted in Figure 6.11: At = 0.33 min T = 11 a = 0.9384 b = 0.2578 9 = 3.66 min r = 5.2 min Kp = 2.56°C/% open
Note that the model parameters are similar to the Method II results without noise, but that a slightly different value is determined for the dead time. The graphical comparison indicates a good fit to the experimental data. Further diagnostic analysis is possible by plotting the residuals to determine whether they are nearly random. This is done on Figure 6.12. The plot shows little correlation; note that some correlation is expected, because the simple model structure selected will not often provide the best possible fit to a set of data. Since the errors are only slightly correlated and small, the model structure and dead time are judged to be valid.
EXAMPLE 6.7. The dynamic data in Figure 6.13 was collected, showing the relationship between the inlet and outlet temperatures of the stirred tanks in Figure 6.2. Naturally, this data would require an additional sensor for the inlet temperature to the first tank. When this data was collected, the heating valve position and all other input vari ables were constant. Note that the input change was not even approximately a step, because the temperature depends on the operation of upstream units. De termine the parameters for a firstorderwithdeadtime model. Again, the statistical procedure was used. The results are as follows: r = 11 a = 0.9228 b = 0.0760 9 = 3.66 min z = 4.2 min Kp = 0.98°C/°C
194
1.5
X
x
CHAPTER 6 Empirical Model Identification
1" c o •a
x x
x 0.5 
X
*
&
*
3 O
X
*
xx
i*<
*
*x X
*x
X
1 0.5
X
X
xx
xx
x
x
X
x
^
v
X3^
xxx x x x x x x x xx l c x x x
X x xx x x x x x x w x
x x x *x
*x
xxx
v
$
X
^
x xx x x
1 1.5
^ x x xxxx^
X
*x
x
x*
*
V
x x x
x
X
1
1
10
1
1
1
1
1
15
20 Time
25
30
35
40
FIGURE 6.12
Plot of residuals between measured and predicted outputs from Example 6.6.
u o IS
FIGURE 6.13
Experimental data and model prediction for an input that is not a perfect step, analyzed in Example 6.7.
The model is compared with the data in Figure 6.13. The dynamic response is somewhat faster than the previous response, as might be expected because this model does not include the heat exchanger dynamics. The data in this example could not be analyzed using the graphical process reaction curve method because
the input deviates substantially from a perfect step. However, the statistical method provided good parameter estimates from this data.
195 Statistical Model Identification
The linear regression identification method for a firstorderwithdeadtime model is more general than the process reaction curve and can be used to fit important industrial processes. However, it also has limitations. Although it is easier to use and yields more accurate parameter values when the data has noise, it gives erroneous results when the noise is too large compared with the output change caused by the experiment—the same trend as with the process reaction curve. EXAMPLE 6.8. Figure 6.14 gives data recorded when a very small input change is introduced into the valve opening in the stirred tank system in Figure 6.2. The statistical method can be used, but the results (r = 0.6 min, 9 = 3.66 min, and Kp  2.3° C/%open) deviate from the previously reported, more accurate results obtained with larger input disturbances. Clearly, a model from such a small input change is not reliable.
^m^
1MmM*^UUmmmilMm*UimiimilUMMm*^^m
In addition, the simple statistical method used here is susceptible to unmea sured disturbances. The experimental design shown in Figure 6.9 is recommended to identify such disturbances. The statistical identification method described in this section is summarized in Table 6.3.
15
10 U o d
3a 5 i „rt .■'". *ii*
■?**■
5 0 5
J
I
I
I
I
I
L
10
15
20 Time
25
30
35
5 40
FIGURE 6.14
Example of empirical identification with an input perturbation that is too small.
196
TABLE 6.3 Summary of the statistical identification method
CHAPTER6 Empirical Model Identification
Characteristic
Statistical identification
Input
If the input change approximates a step, the pro cess output should deviate at least 63% of the potential steadystate change. The process does not have to reach steady state. No requirement regarding the shape of the input. Model structures other than firstorderwithdeadtime are possible, although the equations given here are restricted to firstorderwithdeadtime. Accuracy is strongly affected by significant disturbances. Plot model versus data, and plot residuals versus time. Calculations can be easily performed with a spread sheet or specialpurpose statistical computer program.
Experiment duration Input change Model structure
Accuracy with unmeasured disturbances Diagnostics Calculations
6.5 o ADDITIONAL TOPICS IN IDENTIFICATION
Some additional topics in identification are addressed in this section. The topics relate to both the process reaction curve method and the statistical method, unless otherwise noted. Other Model Structures
The methods presented here provide satisfactory models for processes that give smooth, sigmoidalshaped responses to a step input. Most, but not all, processes are in this category. More complex model structures are required for the higherorder, underdamped, and inverse response systems. Graphical methods are avail able for secondorder systems undergoing step changes (Graupe, 1972); however, the methods seem useful only when the output data has little noise, since they appear sensitive to noise. Many advanced statistical methods are available for more complex model structures (Cryor, 1986; Box and Jenkins, 1976). The general concept is unchanged, but the major difference from the method demonstrated in this chapter is that the least squares equations, similar to equations (6.14) and (6.15), cannot be arranged into a set of linear equations in variables uniquely related to the model parameters; therefore, a nonlinear optimization method is required for calculating the param eters. Also, confidence intervals provide useful diagnostic information. Again, the engineer must assume a model structure and employ diagnostics to determine whether the assumed structure is adequate.
Multiple Va r i a b l e s 197 Sometimes models are desired between an input and several outputs. For example, mmmmmmmmmsmmmm we may need the transfer function models between the reflux and the distillate and AddW identification bottoms product compositions of a distillation column. These models could be determined from one set of experimental data in which the reflux flow is perturbed and both compositions are recorded, as shown in Figure 5.lib. Then each model would be evaluated individually using the appropriate method, such as the process reaction curve. Operating Conditions The operating conditions for the experiment should be as close as possible to the normal operation of the process when the control system, designed using the model, is in operation. This is only natural, because significant deviation could introduce error into the model and reduce the effectiveness of the control. For example, the dynamic response of the stirredtank process in Figure 6.2 depends on the feed flow rate, as we would determine from a fundamental model. If the feed flow rate changes from the conditions under which the identification is performed, the linear transfer function model will be in error. An associated issue relates to the status of the control system when the exper iment is performed. A full discussion of this topic is premature here; however, the reader should appreciate that the process, including associated control strategies, must respond during the experiment as it would during normal operation. This topic is covered as appropriate in later chapters. Frequency Response As an alternative identification method, the frequency response of some physical systems, such as electrical circuits, can be determined experimentally by intro ducing input sine waves at several frequencies. Models can then be determined from the amplitude and phase angle relationships as a function of frequency. This method is not appropriate for complex chemical processes, because of the extreme disturbances caused over long durations, although it has been demonstrated on some unit operations (Harriott, 1964). As a more practical manner for using the amplitude and phase relationships, the process frequency response can be constructed from a single input perturbation using Fourier analysis (Hougen, 1964). This method has some of the advantages of the statistical method (for example, it allows inputs of general shape), but the statistical methods are generally preferred. Identification Under Control The empirical methods presented in this chapter are for inputoutput relation ships without control. After covering Part I on feedback control, you may wonder whether the process model can be identified when being controlled. The answer is yes, but only under specific conditions, as explained by Box and MacGregor (1976).
198 CHAPTER 6 Empirical Model Identification
6.6 □ CONCLUSIONS
Transfer function models of most chemical processes can be identified empirically using the methods described in this chapter. The general, sixstep experimental procedure should be employed, regardless of the calculation method used.
It is again worth emphasizing that the vast majority of control strategies are based on empirical models; thus, the methods in this chapter are of great practical importance.
Model Error Model errors result from measurement noise, unmeasured disturbances, imperfect input adjustments, and applying simple linear models to truly nonlinear processes. The examples in this chapter give realistic results, which indicate that model pa rameters are known only within ±20 percent at best for many processes. However, these models appear to capture the dominant dynamic behavior. Engineers must al ways consider the sensitivity of their decisions and calculations to expected model errors to ensure good performance of their designs. We will investigate the ef fects of model errors in later chapters and will learn that moderate errors do not substantially degrade the performance of singleloop controllers. A summary of a few sensitivity studies, which are helpful when reviewing modelling and control design, are given in Table 6.4. TABLE 6.4 Summary of sensitivity of control stability and performance to modelling errors Case
Issue studied
Example 9.2
The effect on performance of using controller tuning parameters based on an empirical model that is lowerorder than the true process The effect on performance of using controller tuning parameters based on an empirical model that is substantially different from the true process The effect of modelling error on the stability of feedback control, showing the change of model parameters likely to lead to significant differ ences in dynamic behavior The effect of modelling error on the stability of feedback control, showing the critical frequency range of importance The effect of modelling error on the perfor mance of feedback control, showing the frequency range of importance
Example 9.5
Example 10.15
Example 10.18
Figure 13.16 and discussion
Experimental Design The design of the experimental conditions, especially the input perturbation, has a great effect on the success of empirical model identification. The perturbation must be large enough, compared with other effects on the output, to allow accurate model parameter estimation. Naturally, this requirement is in conflict with the desire to minimize process disturbances, and some compromise is required. Model accuracy depends strongly on the experimental procedure, and no amount of analysis can compensate for a very poor experiment.
SixStep Procedure Empirical model identification is an iterative procedure that may involve several experiments and potential model structures before a satisfactory model has been determined. The procedure in Figure 6.1 clearly demonstrates the requirement for a priori information about the process to design the experiment. Since this information may be inexact, the experimental procedure may have to be repeated, perhaps using a larger perturbation, to obtain useful data. Also, the results of the analysis should be evaluated with diagnostic procedures to ensure that the model is accurate enough for control design. It is essential for engineers to recognize that the calculation procedure always yields parameter values and that they must judge the validity of the results based on diagnostics and knowledge of the process behavior based on fundamental models.
No process is known exactly! Good results using models with (unavoidable) errors is not simply fortuitous; process control methods have been developed over the years to function well in realistic situations.
In conclusion, empirical models can be determined by a rather straightforward ex perimental procedure combined with either a graphical or a statistical parameter es timation method. Usually, the models take the form of loworder transfer functions with dead time, which, although not capable of perfect prediction of all aspects of the process performance, provide the essential inputoutput relationships required for process control. The important topic of model error is considered in many of the subsequent chapters, where it is shown that models of the accuracy achieved with these empirical methods are adequate for many control design calculations. However, the selection of algorithms and determination of adjustable parameters must be performed with due consideration for the likely model errors. Therefore, lessons learned in this chapter about accuracy are applied in many later chapters.
REFERENCES Anton, H., Elementary Linear Algebra, Wiley, New York, 1987. Box, G., W. Hunter, and J. Hunter, Statistics for Experimenters, Wiley, New York, 1978. Box, G., and G. Jenkins, Time Series Analysis: Forecasting and Control, Holden Day, Oakland, CA, 1976.
199 References
200 CHAPTER6 Empirical Model Identification
Box, G., and J. MacGregor, "Parameter Estimation with ClosedLoop Oper ating Data," Technometrics, 18, 4, 371380 (1976). Cryor, J., Time Series Analysis, Duxbury Press, Boston, MA, 1986. Despande, P., and R. Ash, Elements of Computer Process Control, Instrument Society of America, Research Triangle Park, NC, 1988. Graupe, D., Identification of Systems, Van Nostrand Reinhold, New York, 1972. Harriott, P., Process Control, McGrawHill, New York, 1964. Hougen, J., Experiences and Experiments with Process Dynamics, Chem. Eng. Prog. Monograph Sen, 60, 4, 1964. Smith, C, Digital Computer Process Control, Intext Education Publishers, Scranton, PA, 1972. Ziegler J., and N. Nichols, "Optimum Settings for Automatic Controllers," Trans. ASME, 64, 759768 (1942).
ADDITIONAL RESOURCES Advanced statistical model identification methods are widely used in practice. The following reference provides further insight into some of the more popular approaches. Vandaele, W, Applied Time Series and BoxJenkins Models, Academic Press, New York, 1983. The following proceedings give a selection of model identification applica tions.
Ekyhoff, P., Trends and Progress in System Identification, Pergamon Press, Oxford, 1981. Computer programs are available to ease the application of statistical methods. The programs noted below can be applied to simple linear regression (Excel and Corel Quattro), to general statistical model fitting (S AS), and to empirical dynamic modelling for process control (MATLAB). Excel®, Microsoft MATLAB® and Identification Toolbox, The MathWorks Corel Quattro®, Corel SAS®, SAS Institute International standards have been established for testing and reporting dy namic models for process control equipment. A good summary is provided in ISAS261968 and ANSI MC4.11975, Dynamic Response Testing of Pro cess Control Instrumentation, Instrument Society of America, Research Triangle Park, NC, 1968.
201 Good results from the empirical method depend on proper engineering practices in experimental design and results analysis. The engineer must always crosscheck the empirical model against the possible models based on physical principles.
Questions
QUESTIONS 6.1. An experiment has been performed on a fired heater (furnace). The fuel valve was opened an additional increment of 2 percent in a step, giving the resulting temperature response in Figure Q6.1. Determine the model parameters using both process reaction curve methods and estimate the in accuracies in the parameter values due to the data and calculation methods.
6.2. Data has been collected from a chemical reactor. The inlet concentration was the only input variable that changed when the data was collected. The input and output data is given in Table Q6.2. TABLE Q6.2 Ti m e (min)
Input (%open)
Output (°C)
Time (min)
Input (%open)
Output (°C)
Time (min)
Input (% open)
Output (°C)
0 4 8 12 16 20 24 28 32
30 30 30 30 30 30 38 38 38
69.65 69.7 70.41 70.28 69.55 70.32 69.97 69.96 69.68
36 40 44 48 52 56 60 64 68
38 38 38 38 38 38 38 38 38
70.22 71.32 72.33 72.92 73.45 74.09 75.00 75.25 74.78
72 76 80 84 88 92 96 100 104
38 38 38 38 38 38 38 38 38
75.27 75.97 76.30 76.30 75.51 74.86 75.86 76.20 76.0
202
(a) Use the statistical identification method to estimate parameters in a firstorderwithdeadtime model. ib) Determine whether the model structure is adequate for this data, (c) Estimate the inaccuracies in the parameter values due to the data and calculation method. You may use a spreadsheet or statistical computer program. Note that the number of data points is smaller than desired for good estimation; this is solely to reduce the effort of typing the data into your program.
CHAPTER 6 Empirical Model Identification
® © © i—fa—x < > s ^
1 (S) (y)
FIGURE Q6.3
6.3. id) The chemical reactor system in Figure Q6.3 is to be modelled. The relationship between the steam valve on the preheat exchanger and the outlet concentration is to be determined. Develop a complete experi mental plan for a process reaction curve experiment. Include in your plan all actions, variables to be recorded or monitored, and any a priori information required from the plant operating personnel. ib) Repeat the discussion for the experiment to model the effect of the flow of the reboiler heating medium on the distillate composition for the distillation tower in Figure 5.18.
10 u
3
o
8 10 12 14 Time
40 50 Time
16 18
ib)
(«)
u D <
■a
8 . o
U
#
a •
u
1> 1 E 3
o
>
8
3
a. c
m *
5 0
15 20 25 Time ic) FIGURE Q6.4
5
30 40 50 Time id)
10
6.4. Several experiments were performed on the chemical reactor shown in Figure Q6.3. In each experiment, the heat exchanger valve was changed and the reactor outlet temperature T4 was recorded. The dynamic data are given in Figure Q6.4a through d. Discuss the results of each experiment, noting any deficiencies and stating whether the data can be used for estimation and if so, which estimation method(s)—process reaction curve, statistical, or both—could be used. 6.5. Individual experiments have been performed on the process in Figure Q6.3. The following transfer function models were determined from these exper iments: T3js) _ 0.55g°5* T4js) _ 3Ae~2As T2is) ~ 2s + 1 his) ~ 2.1s + 1 id) What are the units of the gains and do they make sense? Is the reaction exothermic or endothermic? ib) Determine an approximate firstorderwithdeadtime transfer function model for T$(s)f T2(s). (c) With better planning, could the model requested in (b) have been de termined directly from the experimental data used to determine the models given in the problem statement? 6.6. This question addresses dynamics of the mixing process in Figure Q6.6a, which has a mixing point, a pipe, and three identical, wellmixed tanks. Some information about the process follows. (i) The flow of pure component A is linear with the valve % open; Fa = KAv. (ii) The flow of pure component A is very small compared with the flow of B; Fa <$C Fr. Also, no component A exists in the B stream, (iii) Delays in the pipes designated by single lines are all negligible, (iv) The two materials have the same density, and xa is the volume percent (or weight %). (v) Fq is not influenced by the valve opening. (a) An experimental process reaction curve is given in Figure Q6.6b for a step change in the valve of +5% at time = 7.5 minutes. (i) Discuss the good and poor aspects of this experimental data that affect its usefulness for empirical modelling, (ii) Determine the model parameters for a model between the valve and the concentration in the third tank. (b) In this question, you are to model the physical process and determine whether the response in Figure Q6.6b is possible, i.e., consistent with the fundamental model you derive. (i) Develop the timedomain models for each process element in linear (or linearized) form in deviation variables. (ii) Take the Laplace transform of each model and combine into an overall transfer function between v'(s) and x'A3is). (iii) Compare the model with the data and conclude whether the fun damental model and data are or are not consistent. You must provide an explanation!
204
*A
/
L
CHAPTER 6 Empirical Model Identification
(A)
100
150
Time (min)
ib) FIGURE Q6.6
id) Mixing, delay, and series reactors; ib) process reaction curve. 6.7. The difference equation for a firstorder system was derived from the con tinuous differential equation in Section 6.4 by assuming that the input was constant over the sample period At. An alternative approach would be to approximate the derivative(s) by finite differences. Apply the finite differ ence approach to a firstorder and a secondorder model. Discuss how you would estimate the model parameters from a set of experimental data using least squares. 6.8. Although such experiments are not common for a process, frequency re sponse modelling is specified for some instrumentation (ISA, 1968). As sume that the data in Table Q6.8 was determined by changing the fluid temperature about a thermocouple and thermowell in a sinusoidal manner. (Refer to Figure 4.9 for the meaning of frequency response.) Determine an approximate model by answering the following:
id) Plot the amplitude ratio, and estimate the order of the model from this plot. ib) Estimate the steadystate gain and time constant(s) from the results in {a). ic) Plot the phase angle from the data and determine the value of the dead time, if any, from the plot.
205 Questions
TABLE Q6.8 Frequency 0.0001 0.001 0.005 0.010 0.015 0.050
Amplitude ratio 1.0 0.99 0.85 0.62 0.44 0.16
Phase angle (°) 1  7 32 51 63 80
6.9. It is important to use our knowledge of the process to design experiments and determine the range of applicability of the empirical models. Assume that the dynamic models for the following processes have been identified, for the input and output stated, using methods described in this chapter about some nominal operating conditions. After the experiments, the nom inal operating conditions change as defined in the following table by a "substantial" amount, say 50 percent. You are to determine id) whether the inputoutput dynamic behavior would change as a result of the change in nominal conditions ib) if so, which parameters would change and by how much ic) whether the empirical procedure should be repeated to identify a model at the new nominal operating conditions
Process (all are worked examples) Example 3.1: Mixing tank Example 3.1: Mixing tank Example 3.2: Isothermal CSTR Example 3.5: Isothermal CSTR Section 5.3: Noninteracting mixing tanks Section 5.3: Interacting levels
Input variable
Output variable
Process variable that changes for the new nominal operating condition
Cao Cao Cao Cao Cao Fo
cA
(Cao)j
CA Ca Ca Ca L2
6.10. Use Method II of the process reaction curve to evaluate empirical models from the dynamic responses in Figure 5.17a. Explain why you can obtain two models from one experiment.
F T (Cao)s
(Cao)*
(F0),
2 0 6 6 . 11 . T h e g r a p h i c a l m e t h o d s c o u l d b e e x t e n d e d t o o t h e r m o d e l s . D e v e l o p a mmsmsmammm^m method for estimating the parameters in a secondorder transfer function CHAPTER 6 with dead time and a constant numerator for a step input forcing funcEmplrlcai Model tion. The method should be able to fit both overdamped and underdamped i d e n t i fi c a t i o n s y s t e m s . S t a t e a l l a s s u m p t i o n s a n d e x p l a i n a l l s i x s t e p s . 6.12. The graphical methods could be extended to other forcing functions. For both first and secondorder systems with dead time, develop methods for fitting parameters from an impulse response. 6.13. We will be using firstorderwithdeadtime models often. Sketch an ideal process that is exactly firstorder with dead time. Derive the fundamen tal model and relate the equipment and operating conditions to the model parameters. Discuss how well this model approximates more complex pro cesses. 6.14. Develop a method for testing whether the empirical data can be fitted using equation (6.2). The method should involve comparing calculated values to a straightline model. 6.15. Both process reaction curve methods require that the process achieve a steady state after the step input. For both methods, suggest modifications that would relieve the requirement for a final steady state. Discuss the rela tive accuracy of these modified methods to those presented in the chapter. Could you apply your method to the first part of the transient response in Figure 3.10c? 6.16. Often, more than one input to a process changes during an experiment. For the process reaction curve and the statistical method: id) If possible, show how models for two inputs could be determined from such experiments. Clearly state the requirements of the experimental design and calculations. ib) Assume that the model between one of the inputs and the output is known. Show how to fit the parameters for the remaining input. 6.17. For each of the processes and dynamic data, state whether the process reaction curve, the statistical model fitting method, or both can be used. Also, state the model form necessary to model the process adequately. The systems are Examples 3.3,5.1, and Figure 5.5 (with n = 10). 6.18. The residual plot provides a visual display of goodness of fit. How could you use the calculated residuals to test the hypothesis that the model has provided a good fit? What could you do if the result of this test indicates that the model is not adequate? 6.19. id) Experiments were performed to obtain the process reaction curves in Figure 5.20a and b. How do you think that the results would change if (1) The step magnitudes were halved? doubled? (2) The step signs were inverted? (3) Both steps were made simultaneously? ib) Describe how the inventories (liquid levels) were controlled during the experiments. ic) Would the results change if the inventories were controlled differently?
Feedback Control !^4$^
To this point we have studied the dynamic responses of various systems and learned important relationships between process equipment and operating conditions and dynamic responses. In this part, we make a major change in perspective: we change from understanding the behavior of the system to altering its behavior to achieve safe and profitable process performance. This new perspective is shown schemat ically in Figure ni.l for a physical example given in Figure III.2. In discussing control, we will use the terms input and output in a specific manner, with input variables influencing the output variables as follows: Input
Process
Output
Feedback
Here we see a difference in terminology between modelling and feedback control. In feedback control the input is the cause and the output is the effect, and there is no requirement that the input or output variables be associated with a stream passing through the boundary defining the system. For example, the input can be a flow and the output can be the liquid level in the system. There is a cause/effect relationship in the process that cannot be directly in verted. In the process industries we usually desire to maintain selected output vari ables, such as pressure, temperature, or composition, at specified values. Therefore,
Desired value
208
1
PART in Feedback Control
Controller Sensor
1
Ma n i p u l a t e d variable
Final element
^
(Controlled variable
Process
Distu rhances
Other outputs
FIGURE 111.1
Schematic of feedback system. Feed
feedback is applied to achieve the desired output by adjusting an input. This ex ^
U db *~
Heating oil FIGURE 111.2 Process example of feedback.
♦■Product
plains why the feedback control algorithm is sometimes described as the inverse of the process relationship. First, the engineer selects the measured outlet variable whose behavior is specified; it is called the controlled variable and typically has a substantial effect on the process performance. In the example, the temperature of the stream leaving the stirred tank is the controlled variable. Many other output variables exist, such as the outlet flow rate and the exit heating oil temperature. Next, the variables that have been referred to as process inputs are divided into two categories: manipulated and disturbance variables. A manipulated variable is selected by the engineer for adjustment in a control strategy to achieve the desired performance in the controlled variable. In the physical example, the valve position in the heating oil pipe is the manipulated variable, since opening the valve increases the flow of heating oil and results in greater heat transfer to the fluid in the tank. All other input variables that influence the controlled variable are termed disturbances. Examples of disturbances are the inlet flow rate and inlet temperature. To achieve the desired behavior of the output variable, an additional compo nent must be added to the system. Here we consider feedback control, which was introduced in Chapter 1 as a method for adjusting an input variable based on a measured output variable. In the simplest case, the feedback system could involve a person who observes a thermometer reading and adjusts the heating valve by hand. Alternatively, feedback control can be automated by providing a computing device with an algorithm for adjusting the valve based on measured temperature values. To automate the feedback, the sensor must be designed to communicate with the computing device, and the final element must respond to the command from the computing device. Among the most important decisions made by the engineer are the selec tion of controlled and manipulated variables and the algorithm and parameters in the calculation. In this part, the greatest emphasis is placed on understanding the feedback principles through the analysis of particular feedback control algo
rithms. The selection of measured controlled variables and manipulated variables 209 is introduced here and expanded in later chapters. While this part emphasizes the Mm*mummikmiA control algorithm, one must never lose sight of the fact that the process is part part in of the control system! Since chemical engineers are responsible for designing the Feedback Control process equipment and determining operating conditions to achieve good process performance, the material in this part provides qualitative and quantitative methods for evaluating the likely dynamic performance of process designs under feedback control.
The Feedback Loop 7.1 n INTRODUCTION Now that we are prepared with a good understanding of process dynamics, we can begin to address the technology for automatic process control. The goals of process control—safety, environmental protection, equipment protection, smooth operation, quality control, and profit—are achieved by maintaining selected plant variables as close as possible to their best conditions. The variability of variables about their best values can be reduced by adjusting selected input variables using feedback control principles. As explained in Chapter 1, feedback makes use of an output of a system in deciding the way to influence an input to the system, and the technology presented in this part of the book explains how to employ feedback. This chapter builds on the chapters in Part I of the book, which were more qualitative and descriptive, by establishing the key quantitative aspects of a control system. It is important to emphasize that we are dealing with the control system, which involves the process and instrumentation as well as the control calculations. Thus, this chapter begins with a section on the feedback loop in which all elements are discussed. Then, reasons for control are reviewed, and because engineers should always be prepared to define measures of the effectiveness of their efforts, quan titative measures of control performance are defined for key disturbances; these measures are used throughout the remainder of the book. Because the process usually has several input and output variables, initial criteria are given for select ing the variables for a control loop. Finally, several general approaches to feedback
212
control, ranging from manual to automated methods, are discussed, along with guidelines for when to employ each approach.
CHAPTER 7 The Feedback Loop
7.2 Q PROCESS AND INSTRUMENT ELEMENTS OF THE FEEDBACK LOOP All elements of the feedback loop can affect control performance. In this section, the process and instrument elements of a typical loop, excluding the control cal culation, are introduced, and some quantitative information on their dynamics is given. This analysis provides a means for determining which elements of the loop introduce significant dynamics and when the dynamics of some fast elements can usually be considered negligible. A typical feedback control loop is shown in Figure 7.1. This discussion will address each element of the loop, beginning with the signal that is sent to the process equipment. This signal could be determined using feedback principles by a person or automatically by a computing device. Some key features of each element in the control loop are summarized in Table 7.1. The feedback signal in Figure 7.1 has a range usually expressed as 0 to 100%, whether determined by a controller or set manually by a person. When the signal is transmitted electronically, it usually is converted to a range of 4 to 20 milliamperes (mA) and can be transmitted long distances, certainly over one mile. When the signal is transmitted peumatically, it has a range of 3 to 15 psig and can only be transmitted over a shorter distance, usually limited to about 400 meters unless special signal reinforcement is provided. Pneumatic transmission would normally be used only when the controller is performing its calculations pneumatically, which is not common with modern equipment. Naturally, the electronic signal Feedback Display 200300'C 0100%
 — ^
420mA 420mA Compressed air 315 psi
Valve
Thermocouple in thermowell Process
FIGURE 7.1 Process and instrument elements in a typical control loop.
TABLE 7.1
213
Key features of control loop elements, excluding the process Loop element*
Function
typical range
Controller output
Initiate signal at a remote location intended for the final element Carry signal from controller to final element and from the sensor to the controller Change transmission signal to one compatible with final element Implement desired change in process Measure controlled variable
Operator/controller use 0100%
Transmission
Signal conversion
Final control element Sensor
Typical dynamic response, t63% ••
Process and Instrument Elements of the Feedback Loop
Pneumatic: 315 psig Pneumatic: 15 s Electronic: 420 milliamp (mA) Electronic to pneumatic: 420 mA to 315 psig Sensor to electronic: mV to 420 mA Valve: 0100% open
Electronic: Instantaneous 0.51.0 s
Scale selected to give good accuracy, e.g., 200300°C
Typically from a few seconds to several minutes
14 s
The terms input and output are with respect to a controller. **Time for output to reach 63% after step input. S«»KSK!sFiWSsSSC^^
transmission is essentially instantaneous; the pneumatic signal requires several seconds for transmission. Note that the standard signal ranges (e.g., 4 to 20 mA) are very important so that equipment manufactured by different suppliers can be interchanged. At the process unit, the output signal is used to adjust the final control element: the equipment that is manipulated by the control system. The final control element in the example, as in over 90 percent of process control applications, is a valve. The valve percent opening could be set by an electrical motor, but this is not usually done because of the danger of explosion with the highamperage power supply a motor would require. The alternative power supply typically used is compressed air. The signal is converted from electrical to pneumatic; 3 to 15 psig is the standard range of the pneumatic signal. The conversion is relatively accurate and rapid, as indicated by the entry for this element in Table 7.1. The pneumatic signal is transmitted a short distance to the control valve, which is specially designed to adjust its percent opening based on the pneumatic signal. Control valves respond relatively quickly, with typical time constants ranging from 1 to 4 sec. The general principles of a control valve are demonstrated in Figure 7.2. The process fluid flows through the opening in the valve, with the amount open (or resistance to flow) determined by the valve stem position. The valve stem
Air pressure Diaphragm
Valve plug and seat
FIGURE 7.2 Schematic of control valve.
2 1 4 i s c o n n e c t e d t o t h e d i a p h r a g m , w h i c h i s a fl e x i b l e m e t a l s h e e t t h a t c a n b e n d i n HMfe^MWBiiiM^kaMiii response to forces. The two forces acting on the diaphragm are the spring and chapter 7 the variable pressure from the control signal. For a zero control signal (3 psig), The Feedback Loop the diaphragm in Figure 7.2 would be deformed upward because of the greater force from the spring, and the valve stem would be raised, resulting in the greatest opening for flow. For a maximum signal (15 psig), the diaphragm in Figure 7.2 would be deformed downward by the greater force from the air pressure, and the stem would be lowered, resulting in the minimum opening for flow. Other arrangements are possible, and selection criteria are presented in Chapter 12. After the final control element has been adjusted, the process responds to the change. The process dynamics vary greatly for the wide range of equipment in the process industries, with typical dead times and time constants ranging from a few seconds (or faster) to hours. When the process is by far the slowest element in the control loop, the dynamics of the other elements are negligible. This situation is common, but important exceptions occur, as demonstrated in Example 7.1. The sensor responds to the change in plant conditions, preferably indicating the value of a single process variable, unaffected by all other variables. Usually, the sensor is not in direct contact with the potentially corrosive process materi als; therefore, the protective equipment or sample system must be included in the dynamic response. For example, a thin thermocouple wire responds quickly to a change in temperature, but the metal sleeve around the thermocouple, the thermowell, can have a time constant of 5 to 20 sec. Most sensor systems for flow, pressure, and level have time constants of a few seconds. Analyzers that perform complex physicochemical analyses can have much slower responses, on the order of 5 to 30 minutes or longer; they may be discrete, meaning that a new analyzer result becomes available periodically, with no new information between results. Physical principles and performance of sensors are diverse, and the reader is en couraged to refer to information in the additional resources from Chapter 1 on sensors for further details. The sensor signal is transmitted to the controller, which we are considering to be located in a remote control room. The transmission could be pneumatic (3 to 15 psig) or electrical (4 to 20 mA). The controller receives the signal and performs its control calculation. The controller can be an analog system; for example, an electronic analog controller consists of an electrical circuit that obeys the same equations as the desired control calculations (Hougen, 1972). For the next few chapters, we assume that the controller is a continuous electronic controller that performs its calculations instantaneously, and we will see in Chapter 11 that es sentially the same results can be obtained by a very fast digital computer, as is used in most modern control equipment. EXAMPLE 7.1.
The dynamic responses of two process and instrumentation systems similar to Fig ure 7.1, without the controller, are evaluated in this exercise. The system involves electronic transmission, a pneumatic valve, a firstorderwithdeadtime process, and a thermocouple in a thermowell. The dynamics of the individual elements are given in Table 7.2 with the time in seconds for two different systems, A and B. The dynamics of the entire loop are to be determined. The question could be stated, "How does a unit step change in the manual output affect the displayed variable,
TABLE 7.2
215
Dynamic models for elements in Example 7.1 Process and Instrument Elements of the Feedback Loop
Element
Units*
Case A
Case B
Manual station Transmission
mA/% output
0.16 1.0
0.16 1.0
Signal conversion Final element Process Sensor
psi/mA %open/psi °C/psi mV/°C mA/mV
0.75/(0.5*+ 1) 8.33/(1.5*+ 1) 1.84e107(3* + l) 0.11/(10*41) 1.48/(0.51*41) 1.0
0.75/(0.5* 41) 8.33/(1.5*41) 1.84*,007(300*41) 0.11/(10*41) 1.48/(0.51*41) 1.0
°C/mA
6.25/(1.0*41)
6.25/(1.0*41)
Signal conversion Transmission Display *Time is in seconds. l*j8W!»ISflIBtJKKMHBI^^
which is also the variable available for control, in the control house?" Note that the two systems are identical except for the process transfer functions. The physical system in this problem and shown in Figure 7.1 is recognized as a series of noninteracting systems. Therefore, equation (5.40) can be applied to determine the transfer function of the overall noninteracting series system. The result for Case B is Yjs) Xis)
n\
= f]G„_,(*) 1=0
100s
Yjs) _ (0.16)(1.0)(0.75)(8.33)(1.84)(0.11)(1.48)(1.0)(6.25)g Xis) ~ (0.5* 4 1)(1.55 4 0(300* 4 0(10* 4 0(0.51* 4 0(* 4 0 Before the simulation results are presented for this example, it is worthwhile performing an approximate analysis, using the simple approximation introduced in Chapter 5 for series processes. The overall gains and approximate 63 percent times for both systems that relate the manual signal to the display are shown in the following table:
Case A Case B Process gain KP = Y\ K, Time to 63% ^ E(r;40()
1.84 1.84 % 17.5 % 413.5
'C/(% controller output) seconds
2000
FIGURE 7.3
The two cases have been simulated, and the results are plotted in Figure 7.3a and o. The results of the approximate analysis compare favorably with the simulations. Note that for system A, which involves a fast process, the sensor and final element contribute significant dynamics, resulting in a substantial difference between the true process temperature and the displayed value of the temperature, which would be used for feedback control. In system B the process dynamics are much slower,
Transient response for Example 7.1 with a 1% step input change at time = 0. (a) Case A; ib) Case B.
216 CHAPTER 7 The Feedback Loop
and the dynamic effects of all other elements in the loop are negligible. This is a direct consequence of the timedomain solution to the model of this process for a step (1/*) input, which has the form Y\t) = C, 4 C2e~t/T* + C3e"« + • • • Clearly, a slow "mode" due to one especially long time constant will dominate the dynamic response, with the faster elements essentially at quasisteady state. One would expect that a dynamic analysis that considered the process alone for control design would not be adequate for Case A but would be adequate for Case B. HWWW#%8g
It is worth recalling that the empirical methods for determining the "process" dynamics presented in Chapter 6 involve changes to the manipulated signal and monitoring the response of the sensor signal as reported to the control system. Thus, the resulting model includes all elements in the loop, including instrumentation and transmission. Since the experiments usually employ the same instrumentation used subsequently for implementing the control system, the dynamic model identified is between the controller output and input—in other words, the system "seen" by the controller. This seems like the appropriate model for use in design control systems, and that intuition will be supported by later analysis. 7.3 eh SELECTING CONTROLLED AND MANIPULATED VA R I A B L E S Feedback control provides a connection between the controlled and manipulated variables. Perhaps the most important decision in designing a feedback control sys tem involves the selection of variables for measurement and manipulation. Some initial criteria are introduced in this section and applied to the continuousflow chemical reactor in Figure 7.4. As more details of feedback control are presented, further criteria will be presented throughout Part III for a singleloop controller. We begin by considering the controlled variable, which is selected so that the feedback control system can achieve an important control objective. The seven categories of control objectives were introduced in Chapter 2 and are repeated below.
Control objective FIGURE 7.4
Continuousflow chemical reactor example for selecting control loop variables.
1. Safety 2. Environmental protection 3. Equipment protection 4. Smooth plant operation and production rate 5. Product quality —▶
6. Profit optimization 7. Monitoring and diagnosis
Process variable
Sensor
Concentration of —▶ reactant A in the effluent
Analyzer in reactor effluent measuring the mole % A
From none to several controlled variables may be associated with each control 217 objective. Here, we consider the product quality objective and decide that the most laiiiftiMiii important process variable associated with product quality is the concentration of Selecting Controlled reactant A in the reactor effluent. The process variable must be measured in real and Manipulated time to make it available to the computer, and the natural selection for the sensor Variables would be an analyzer in the effluent stream. In practice, an onstream analyzer might not exist or might be too costly; for the next few chapters we will assume that a sensor is available to measure the key process variable and defer discussions of using substitute (inferential) variables, which are more easily measured, until later chapters. The second key decision is the selection of the manipulated variable, because we must adjust some process variable to affect the process. First, we identify all input variables that influence the measured variable. The input variables are summarized below for the reactor in Figure 7.4.
Input variables that affect Selected adjustable flow Manipulated valve the measured variable Disturbances: Feed temperature Solvent flow rate Feed composition, before mix Coolant inlet temperature Adjustable: F l o w o f p u r e A ▶• F l o w o f p u r e A ▶ v A Flow of coolant
Six important input variables are identified and separated into two categories: those that cannot be adjusted (disturbances) and those that can be adjusted. In general, the disturbance variables change due to changes in other plant units and in the environment outside the plant, and the control system should compensate for these disturbances. Disturbances cannot be used as manipulated variables. Only adjustable variables can be candidates for selection as a manipulated variable. To be an adjustable flow, a valve must influence the flow. (In general, manipulated variables include adjustable motor speeds and heater power, and so forth, but for the current discussion, we restrict the discussion to valves.) Criteria for selecting an adjustable variable include 1. Causal relationship between the valve and controlled variable (required) 2. Automated valve to influence the selected flow (required) 3. Fast speed of response (desired) 4. Ability to compensate for large disturbances (desired) 5. Ability to adjust the manipulated variable rapidly and with little upset to the remainder of the plant (desired) As a method for ensuring that the manipulated variable has a causal relationship on the controlled variable, the dynamic model between the valve and controlled
218
variable must have a nonzero value, i.e., ACa/AFA = Kp ^ 0. An important aspect of chemical plant design involves providing streams which accommodate the five criteria above; examples are cooling water, steam, and fuel gas, which are distributed and made available throughout a plant. Two potential adjustable flows exist in this example, and based on the infor mation available, either is acceptable. For the present, we will arbitrarily select the valve affecting the flow of pure component A, uA. After we have analyzed the effects of feedback dynamics more thoroughly, we will reconsider this selection in Example 13.12.
CHAPTER7 The Feedback Loop
In conclusion, the feedback system for product quality control connects the effluent composition analyzer to the valve in the pure A line.
The next section discusses desirable features of dynamic behavior for a control system and how these features can be characterized quantitatively. The calculations performed by the controller to determine the valve opening are presented in the next chapter.
7.4 Q CONTROL PERFORMANCE MEASURES FOR COMMON INPUT CHANGES The purpose of the feedback control loop is to maintain a small deviation between the controlled variable and the set point by adjusting the manipulated variable. In this section, the two general types of external input changes are presented, and quantitative control performance measures are presented for each.
Set Point Input Changes
•*A0
hdb'
*A1
c£> & ■
*A2 *A3
hdro"
^ FIGURE 7.5
Example feedback control system, threetank mixing process.
The first type of input change involves changes to the set point: the desired value for the operating variable, such as product composition. In many plants the set points remain constant for a long time. In other plants the values may be changed periodically; for example, in a batch operation the temperature may need to be changed during the batch. Control performance depends on the goals of the process operation. Let us here discuss some general control performance measures for a change in the controller set point on the threetank mixing process in Figure 7.5. In this process, two streams, A and B, are mixed in three series tanks, and the output concentration of component A is controlled by manipulating the flow of stream A. Here, we consider step changes to the set point; these changes represent the situation in which the plant operator occasionally changes the value and allows considerable time for the control system to respond. A typical dynamic response is given in Figure 7.6. This is somewhat idealized, because there is no measurement noise or effect of disturbances, but these effects will be considered later. Several facets of the dynamic response are considered in evaluating the control performance. OFFSET. Offset is a difference between final, steadystate values of the set point and of the controlled variable. In most cases, a zero steadystate offset is highly
/\
B
t/5 0>
23C8
5'>
3 .2
Controlled
L/l r*i i.
i »i
p
■J[
"3o. "TV
'c  C
E c
1
s2 ^ c o
D Manipulated
\
T
U Time, t
FIGURE 7.6
Typical transient response of a feedback control system to a step set point change. desired, because the control system should achieve the desired value, at least after a very long time. RISE TIME. This (Tr) is the time from the step change in the set point until the controlled variable ./to reaches the new set point. A short rise time is usually desired. INTEGRAL ERROR MEASURES. These indicate the cumulative deviation of the controlled variable from its set point during the transient response. Several such measures are used: Integral of the absolute value of the error (IAE): /•OO
IAE= / SP(/)CV(0df Jo
(7.1)
Integral of square of the error (ISE): /•OO
ISE = / [SP(r)  CW(t)fdt Jo
(7.2)
Integral of product of time and the absolute value of error (ITAE): /•OO
ITAE = / t \ S ? i t )  C Vi t ) \ d t
Jo
(7.3)
Integral of the error (DE):
IE
[SP(0  CWit)]dt (7.4) ./o The IAE is an easy value to analyze visually, because it is the sum of areas above and below the set point. It is an appropriate measure of control performance when the effect on control performance is linear with the deviation magnitude. The ISE is appropriate when large deviations cause greater performance degradation than small deviations. The ITAE penalizes deviations that endure for a long time. Note
2 2 0 th a t IE i s n o t n o rma l l y u se d , b e c a u s e p o s i ti v e a n d n e g a ti v e e r r o r s c a n c e l i n th e i^m^^mkmmmitmM integral, resulting in the possibility for large positive and negative errors to give a CHAPTER 7 small IE. A small integral error measure (e.g., IAE) is desired. The Feedback Loop
DECAY RATIO (B / A). The decay ratio is the ratio of neighboring peaks in an underdamped controlledvariable response. Usually, periodic behavior with large amplitudes is avoided in process variables; therefore, a small decay ratio is usually desired, and an overdamped response is sometimes desired. THE PERIOD OF OSCILLATION (P). Period of oscillation depends on the process dynamics and is an important characteristic of the closedloop response. It is not specified as a control performance goal. SETTLING TIME. Settling time is the time the system takes to attain a "nearly constant" value, usually ±5 percent of its final value. This measure is related to the rise time and decay ratio. A short settling time is usually favored. MANIPULATEDVARIABLE OVERSHOOT (C/D). This quantity is of con cern because the manipulated variable is also a process variable that influences per formance. There are often reasons to prevent large variations in the manipulated variable. Some large manipulations can cause longterm degradation in equipment performance; an example is the fuel flow to a furnace or boiler, where frequent, large manipulations can cause undue thermal stresses. In other cases manipulations can disturb an integrated process, as when the manipulated stream is supplied by another process. On the other hand, some manipulated variables can be adjusted without concern, such as cooling water flow. We will use the overshoot of the manipulated variable as an indication of how aggressively it has been adjusted. The overshoot is the maximum amount that the manipulated variable exceeds its final steadystate value and is usually expressed as a percent of the change in ma nipulated variable from its initial to its final value. Some overshoot is acceptable in many cases; little or no overshoot may be the best policy in some cases.
Disturbance Input Changes The second type of change to the closedloop system involves variations in uncon trolled inputs to the process. These variables, usually termed disturbances, would cause a large, sustained deviation of the controlled variable from its set point if corrective action were not taken. The way the input disturbance variables vary with time has a great effect on the performance of the control system. Therefore, we must be able to characterize the disturbances by means that (1) represent realis tic plant situations and (2) can be used in control design methods. Let us discuss three idealized disturbances and see how they affect the example mixing process in Figure 7.5. Several facets of the dynamic responses are considered in evaluating the control performance for each disturbance. STEP DISTURBANCE. Often, an important disturbance occurs infrequently and in a sudden manner. The causes of such disturbances are usually changes to
221
Maximum deviation Controlled
Control Performance Measures For Common Input Changes
Controlled
Manipulated
ic
o U
o U
Manipulated
Time, t
Time, /
id)
ib)
FIGURE 7.7
Transient response of the example process in Figure 7.5 in response to a step disturbance (a) without feedback control; ib) with feedback control. other parts of the plant that influence the process being considered. An example of a step upset in Figure 7.5 would be the inlet concentration of stream B. The responses of the outlet concentration, without and with control, to this disturbance are given in Figure 1.1a and b. We will often consider dynamic responses similar to those in Figure 7.7 when evaluating ways to achieve good control that minimizes the effects of step disturbances. The explanations for the measures are the same as for set point changes except for rise time, which is not applicable, and for the following measure, which has meaning only for disturbance responses and is shown in Figure 1.1b:
"S 
Controlled
Manipulated
MAXIMUM DEVIATION. The maximum deviation of the controlled variable from the set point is an important measure of the process degradation experienced due to the disturbance; for example, the deviation in pressure must remain below a specified value. Usually, a small value is desirable so that the process variable remains close to its set point.
STOCHASTIC INPUTS. As we recognize from our experiences in laboratories and plants, a process typically experiences a continual stream of small and large disturbances, so that the process is never at an exact steady state. A process that is subjected to such seemingly random upsets is termed a stochastic system. The response of the example process to stochastic upsets in all flows and concentrations is given in Figure 7.8a and b without and with control. The major control performance measure is the variance, cr£w, or standard deviation, ocv, of the controlled variable, which is defined as follows for a sample of n data points:
ctcv =
N
—Lyvcvcv,); n—1~ 1=1
(7.5)
co U
Time, t id)
Controlled
WW\a^Aa/" Manipulated
Time, t ib)
FIGURE 7.8
Transient response of the example process (a) without and ib) with feedback control to a stochastic disturbance.
222
With the mean
= cv=i£cv,
CHAPTER 7 The Feedback Loop
This variable is closely related to the ISE performance measure for step distur bances. The relationship depends on the approximations that (1) the mean can be replaced with the set point, which is normally valid for closedloop data, and (2) the number of points is large.
L VVCV  CV,)2 « I f (SP  CV)2*7 nlff
> X3 2 4 2 3 .'5* E rt E T3 §
s"3
Controlled
/ / \\ \
/' \\ >/
~ 
bC _ o U
// \
\\
\
/ / \\ 7/ \\
\y
/" //
v/
Manipulated
Time, t
(a) CA
O
3« •cC3 >
1 ja
Controlled
"3o. _
1E
T
Jo
(7.7)
Since the goal is usually to maintain controlled variables close to their set points, a small value of the variance is desired. In addition, the variance of the manipulated variable is often of interest, because too large a variance could cause longterm damage to equipment (fuel to a furnace) or cause upsets in plant sections provid ing the manipulated stream (steamgenerating boilers). We will not be analyzing stochastic systems in our design methods, but we will occasionally confirm that our designs perform well with example stochastic disturbances by simulation case studies. As you may expect, the mathematical analysis of these statistical distur bances is challenging and requires methods beyond the scope of this book. How ever, many practical and useful methods are available and should be considered by the advanced student (MacGregor, 1988; Cryor, 1986).
u
5
(7.6)
/=i
Manipulated
/^\\ / ^ \\ // " \\k / / T3 N / ^ ^ / \ / \ ju A / \\ ^ y / \ \y / \ *o< \ y co U rt
Time, /
ib) Fl(SURE 7.9
Transient response of the example system (a) without and ib) with control to a sine disturbance.
SINE INPUTS. An important aspect of stochastic systems in plants is that the disturbances can be thought of as the sum of many sine waves with different amplitudes and frequencies. In many cases the disturbance is composed predom inantly of one or a few sine waves. Therefore, the behavior of the control system in response to sine inputs is of great practical importance, because through this analysis we learn how the frequency of the disturbances influences the control per formance. The responses of the example system to a sine disturbance in the inlet concentration of stream B with and without control are given in Figure 7.9a and b. Control performance is measured by the amplitude of the output sine, which is often expressed as the ratio of the output to input sine amplitudes. Again, a small output amplitude is desired. We shall use the response to sine disturbances often in analyzing control systems, using the frequency response calculation methods introduced in Chapter 4. In summary, we will be considering two sources of external input change: set point changes and disturbances in input variables. Usually, we will consider the time functions of these disturbances as step and sine changes, because they are relatively easy to analyze and yield useful insights. The measures of control performance for each disturbancefunction combination were discussed in this section. It is important to emphasize two aspects of control performance. First, ideally good performance with respect to all measures is usually not possible. For example, it seems unreasonable to expect to achieve very fast response of the controlled variable through very slow adjustments in the manipulated variable. Therefore, control design almost always involves compromise. This raises the second aspect: that control performance must be defined with respect to the process operating objectives of a specific process or plant. It is not possible to define one set of universally applicable control performance goals for all chemical reactors or all
distillation towers. Guidance on setting goals will be provided throughout the book via many examples, with emphasis on the most common goals.
223 Control Performance Measures For Common Input Changes
Feedback reduces the variability of the controlled variable at the expense of increased variability of the manipulated variable.
Finally, the responses to all changes have demonstrated by example an impor tant point that will be proved in later chapters. The application of feedback control does not eliminate variability in the process plant; in fact, the "total variability" of the controlled and manipulated variables may not be changed. This conclu sion follows from the observation that a manipulated variable must be adjusted to reduce the variability in the output controlled variable. If these variables are selected properly, the performance of the plant, as measured by safety, product quality, and so forth, improves. The availability of manipulated variables depends on a skillful process design that provides numerous utility systems, such as cool ing water, steam, and fuel, which can be adjusted rapidly with little impact on the performance of the plant. EXAMPLE 7.2. One of the example processes analyzed several times in Part III is the threetank mixing process in Figure 7.5. This process is selected for its simplicity, which enables us to determine many characteristics of the feedback system, although it is complex enough to exhibit realistic behavior. The process design and model are introduced here; the linearized model is derived; and the selection of variables is discussed. Goal. The outlet concentration is to be maintained close to its set point. Derive the nonlinear and linearized models and select controlled and manipulated variables. Assumptions. 1. All tanks are well mixed. 2. Dynamics of the valve and sensor are negligible. 3. No transportation delays (dead times) exist. 4. A linear relationship exists between the valve opening and the flow of com ponent A. 5. Densities of components are equal. Data.
V = volume of each tank = 35 m3 FB = flow rate of stream B = 6.9 m3 min xm = concentration of A in all tanks and outlet flow = 3% A FA = flow rate of stream A = 0.14 m3/min (xa)b = concentration of stream B = 1% A (jca)a = concentration of stream A = 100% A v = valve position = 50% open
(base case) (base case) (base case) (base case)
Thus, the product flow rate is essentially the flow of stream B\ that is, FB » FA. Formulation. Since the variable to be controlled is the concentration leaving the last tank, component material balances on the mixing point and each mixing tank are given below.
VA0
m fc
VA1
t*r
lA2
t*ri
224 CHAPTER 7 The Feedback Loop
FbJXa)b + FA(xA)A FB + FA
*A0
(7.8)
dxAj
= (Fa + FB)ixM\  xM) for / = 1,3 (7.9) dt Note that the differential equations are nonlinear, because the products of flow and concentrations appear. (If you need a refresher, see Section 3.4 for the defini tion of linearity.) We will linearize these equations and determine how the process gains and time constants depend on the equipment and operating variables. The linearized models are now summarized, with the subscripts representing the initial steady state and the prime representing deviation variables. Kv = 0.0028
FA = Kvv'
m3/min %open
(7.10)
n
(7.ii;
{(*A/0.v — (*ab)s)
cao —
(FBx + FAsY
FAs + Fbs A ,HFAs + Fbs x for / = 1,3 (7.12) At vAil dt V ™ V The total flow is assumed to be approximately constant. By taking the Laplace transforms of these equations and performing standard algebraic manipulations, the feedback process relating the valve (v) to concentration (xA3) transfer function can be derived: Feedback:
*A3(S)
v(s) with Kp — Kv\
= Gp(s) =
Kr (zs + l)3
Fbs (*aa — xab)s (FAs + Fbs)
= 0.039
(7.13) %A % opening
(7.14)
= 5.0 min (7.15) Fbs + FAs It can be seen that the gain and all time constants are functions of the volumes and total flow. These expressions give an indication, which will be used in later chap ters, of how the dynamic response changes as a result of changes in operating conditions. The closedloop block diagram also includes the disturbance transfer function Gd(s): the effect of the disturbance if there were no control. This can be derived by assuming that the flows are all constant and that the important input variable that changes is (xA)B. The resulting model is T =
M:
FB
Fa + Fb]
*A3fr)
xab(s)
= Gd(s) =
Kd
1.0
(zs + l)3 (zs + l)3
(7.17)
Notice that two models have been developed for the same physical system, and they both relate an external input variable to the dependent output variable. The
model Gp(s) relates the manipulated valve to the concentration in the third tank. This provides the dynamic response for the feedback control system; as we shall see, favorable performance requires a large gain magnitude and fast dynamics. The model G(t(s) relates the inlet concentration disturbance to the concentration in the third tank. This provides the disturbance response without control; favorable per formance requires a small gain magnitude and slow dynamics. The reader should recognize and understand the difference between the two models. The selection of the controlled variable is summarized in the following analysis. Control objective 1. Safety 2. Environmental protection 3. Equipment protection 4. Smooth plant operation and production rate 5. Product quality —▶■
Process variable Sensor
Concentration of reactant —▶» Analyzer in reactor effluent A in the third tank measuring the mole % A
6. Profit optimization 7. Monitoring and diagnosis MS»«8SS»Jil^
The reader will notice that the concentration of A in the upstream tanks has a direct influence on the third tank and might wonder if measuring concentration in these tanks might be useful. Feedback does not require other measurements, but additional measurements can improve the dynamic behavior, as explained in Chapters 14 (cascade) and 15 (feedforward). The selection of the manipulated variable is straightforward, because only one valve exists. However, the analysis is presented here to complete the example for the reader. Input variables that affect the measured variable
Selected adjustable fl o w
Manipulated valve
Disturbances: Solvent flow rate Feed composition, (*a)b Composition of "pure A" stream Adjustable: Flow of pure A ▶
Flow of pure A
vA
WMMte&saMM^^
The selection criteria presented in Section 7.3 are reviewed in the following steps.
225 Control Performance Measures For Common Input Changes
1. Causal relationship (required). Yes, because AXa3/Aua = Kp = 0.039 ^ 0. 2. Valve to influence the selected flow (required). Yes, because a valve exists in the pure A pipe. 3. Fast speed of response (desired). We cannot evaluate this with the methods presented to this point in the book, but we will be evaluating this factor in Chapters 9 to 13. 4. Ability to compensate for large disturbances (desired). Yes, the reader can confirm that the exit concentration of 3 percent can be achieved for solvent flow rates of 013.8 m3/min. If the solvent flow is larger, the valve will be 100 percent open and the effluent concentration will decrease below 3 percent. 5. Ability to adjust the manipulated variable rapidly and with little upset to the remainder for the plant (desired). Further information is required to evaluate this factor. We will assume that the pure A is taken from a large storage tank, so that changes in the flow of A do not disturb other parts of the plant.
226 CHAPTER7 The Feedback Loop
Because the threetank mixing process is used in many examples in the remainder of the book, readers are strongly encouraged to fully understand the modelling and variable selection in Example 7.2.
EXAMPLE 7.3.
m iM* lA0
VA1
$ "
A3 AC)
Assume that the feedback control has been implemented on the mixing tanks problem with the goal of maintaining the outlet concentration near 3.0 percent. As an example of the control performance measures, the previous example is con trolled using feedback principles. The disturbance was a step change in the feed concentration, xAB, of magnitude +1.0 at time = 20. A feedback control algorithm explained in the next chapter was applied to this process with two different sets of adjustable parameters in Cases A and B, and the resulting control performance is shown in Figure 7.10a and b and summarized as follows.
Measure
Case A
Case B
Offset from SP IAE ISE IE CV maximum deviation Decay ratio Period (min) MV maximum overshoot
None 7.9 2.1 6.9 0.42 <.1 37 6.9/25 = 28%
None 30.5 12.8 30.5 0.66 (Overdamped) (Overdamped) 0% (expressed as % of steadystate change)
The controlled variable in Case A returns to its desired value relatively quickly, as indicated by the performance measures based on the error. This response re quires a more "aggressive" (i.e., faster) adjustment of the manipulated variable.
227 Control Performance Measures For Common Input Changes
FIGURE 7.10 Feedback responses for Example 7.3. (a) Case A; (b) Case B.
The general trend in feedback control is to require fast adjustments in the manipu lated variable to achieve rapid return to the desired value of the controlled variable. One might be tempted to generally conclude that Case A provides better control performance, but there are instances in which Case B would be preferred. The final evaluation requires a more complete statement of control objectives.
Two important conclusions can be made based on Example 7.3.
1. The desired control performance must be matched to the process requirements. 2. Both the controlled and manipulated variables must be monitored in order to evaluate the performance of a control system.
228
7.5
s APPROACHES
TO
PROCESS
CONTROL
ww^fflRfflfflffi^^ There could be many approaches to the control of industrial processes. In this £HAJTr!iR fiveL oapproaches so that the more common procedures are The F7. e e.d section, back op ' are rdiscussed r placed in perspective. No Control Naturally, the easiest approach is to do nothing other than to hold all input variables close to their design values. As we have seen, disturbances could result in large, sustained deviations in important process variables. This approach could have se rious effects on safety, product quality, and profit and is not generally acceptable for important variables. However, a degreesoffreedom analysis usually demon strates that only a limited number of variables can be controlled simultaneously, because of the small number of available manipulated variables. Therefore, the engineer must select the most important variables to be controlled. Manual Operation When corrective action is taken periodically by operating personnel, the approach is usually termed manual (or openloop) operation. In manual operation, the mea sured values of process variables are displayed to the operator, who has the ability to manipulate the final control element (valve) by making an adjustment in the control room to a signal that is transmitted to a valve, or, in a physically small plant, by adjusting the valve position by hand. This approach is not always bad or "lowtechnology," so we should understand when and why to use it. A typical strategy used for manual operation can be related to the basic principles of statistical process control and can best be described with reference to the data shown in Figure 7.11. Along with the measured process vari able, its desired value and upper and lower action values are plotted. The person ob serves the data and takes action only "when needed." Usually, the decision on when to take corrective action depends on the deviation from the desired value. If the pro cess variable remains within an acceptable range of values defined by action limits, the person makes no adjustment, and if the process variable exceeds the action lim its, the person takes corrective action. A slight alteration to this strategy could con sider the consecutive time spent above (or below) the desired value but within the action limits. If the time continuously above is too long, a small corrective action can be taken to move the mean of the process variable nearer to the desired value. This manual approach to process control depends on the person; therefore, the correct application of the approach is tied to the strengths and weaknesses of the human versus the computer. General criteria are presented in Table 7.3. They indicate that the manual approach is favored when the collection of key information is not automated and has a large amount of noise and when slow adjustments with "fuzzy," qualitative decisions are required. The automated approach is favored when rapid, frequent corrections using straightforward criteria are required. Also, the manual approach is favored when there is a substantial cost for the control effort; for example, if the process operation must be stopped or otherwise disrupted to effect the corrective action. In most control opportunities in the process industries, the corrective action, such as changing a valve opening or a motor speed, can be effected continuously and smoothly without disrupting the process.
229 Approaches to Process Control
Controlled variable Lower
Manipulated variable
Time
FIGURE 7.11 Transient response of a process under manual control to stochastic disturbances. TABLE 7.3 Features off manual and automatic control Control approach Advantages
Disadvantages
Manual operation
Performance of controlled variables is usually far from the best possible
Automated control
Reduces frequency of control corrections, which is important when control actions are costly or disruptive to plant operation Possible when control action requires information not available to the computer Draws attention to causes of deviations, which can then be eliminated by changes in equipment or plant operation Keeps personnel's attention on plant operation Good control perfomance for fast processes Can be applied uniformly to many variables in a plant Generally low cost
Applicable only to slow processes Personnel have difficulty maintaining concentration on many variables
Compensates for disturbances but does not prevent future occurrences Does not deal well with qualitative decisions May not promote people's understanding of process operation
Manual operation should be seen as complementary to the automatic ap proaches emphasized in this book. Statistical methods for monitoring, diagnosing, and continually improving process operation find wide application in the process
230 CHAPTER 7 The Feedback Loop
industries (MacGregor, 1988; Oakland, 1986), and they are discussed further in Chapter 26.
OnOffff Control The simplest form of automated control involves logic for the control calcula tions. In this approach, trigger values are established, and the control manipula tion changes state when the trigger value is reached. Usually the state change is between on and off, but it could be high or low values of the manipulated variable. This approach is demonstrated in Figure 7.12 and was modelled for the common example of onoff control in room temperature control via heating in Example 3.4. While appealing because of its simplicity, on/off control results in continuous cy cling, and performance is generally unacceptable for the stringent requirements of many processes. It is used in simple strategies such as maintaining the temperature of storage tanks within rather wide limits.
Continuous Automated Control The emphasis of this book is on process control that involves the continuous sens ing of process variables and adjustment of manipulated variables based on control calculations. This approach offers the best control performance for most process situations and can be easily automated using computing equipment. The types of control performance achieved by continuous control are shown in Figure 7.10a and b. The control calculation used to achieve this performance is the topic of the subsequent chapters in Part III. Since the control actions are performed continu ously, the manipulated variable is adjusted essentially continuously. As long as the adjustments are not too extreme, constant adjustments pose no problems to valves and their associated process equipment that have been designed for this application.
Emergency Controls Continuous control performs well in maintaining the process near its set point. However, continuous control does not ensure that the controlled variable remains
Controlled variable: Room temperature
22°C
~* 18°C
Manipulated variable: Furnace fuel Time FIGURE 7.12
Example of a process under on/off control.
within acceptable limits. A large upset can result in large deviations from the set 231 point, leading to process conditions that are hazardous to personnel and can cause t<,^^&*w*<*^^m damage to expensive equipment. For example, a vessel may experience too high Conclusions a pressure and rupture, or a chemical reactor may have too high a temperature and explode. To prevent safety violations, an additional level of control is applied in industrial and laboratory systems. Typically, the emergency controls measure a key variable(s) and take extreme action before a violation occurs; this action could include stopping all or critical flow rates or dramatically increasing cooling duty. As an example of an emergency response, when the pressure in a vessel with flows in and out reaches an upper limit, the flow of material into the vessel is stopped, and a large outflow valve is opened. The control calculations for emer gency control are usually not complex, but the detailed design of features such as sensor and valve locations is crucial to safe plant design and operation. The topic of emergency control is addressed in Chapter 24. You may assume that emergency controls are not required for the process examples in this part of the book unless otherwise stated. In industrial plants all five control approaches are used concurrently. Plant personnel continuously monitor plant performance, make periodic changes to achieve control of some variables that are not automated, and intervene when equipment or controls do not function well. Their attention is directed to po tential problems by audio and visual alarms, which are initiated when a process measurement exceeds a high or low limiting value. Continuous controls are ap plied to regulate the values of important variables that can be measured in real time. The use of continuous controls enables one person to supervise the op eration of a large plant section with many variables. The emergency controls are always in reserve, ready to take the extreme but necessary actions required when a plant approaches conditions that endanger people, environment, or equip ment.
7.6 Q CONCLUSIONS A review of the elements of a control loop and of typical dynamic responses of each element, with an example of transient calculation, shows that all elements in the loop contribute to the behavior of the controlled variable. Depending on the dynamic response of the process, the contributions of the instrument elements can be negligible or significant. Material in future chapters will clarify and quantify the relationship between dynamics and performance of the feedback system. The principles and methods for selecting variables and measuring control per formance discussed here for a singleloop system can be extended to processes with several controlled and manipulated variables, as will be shown in later chapters. A key observation is that feedback control does not reduce variability in a plant, but it moves the variability from the controlled variables to the manipulated variables. The engineer's challenge is to provide adequate manipulated variables that satisfy degrees of freedom and that can be adjusted without significantly affecting plant performance. The techniques used for continuous automated rather than manual control are emphasized because:
232 1. As demonstrated by its wide application, it is essential for achieving good CHAPTER 7 2. It provides a sound basis for evaluating the effects of process design on the The Feedback Loop dynamic performance. A thorough understanding of feedback control perfor mance provides the basis for designing more easily controlled processes by avoiding unfavorable dynamic responses. 3. It introduces fundamental topics in dynamics, feedback control, and stability that every engineer should master. The study of automatic control theory principles as applied to process systems provides a link for communication with other disciplines. In this chapter the feedback controller has been left relatively loosely defined. This has allowed a general discussion of principles without undue regard for a specific approach. However, to build systems that function properly, the engineer will require greater attention to detail. Thus, the most widely used feedback control algorithm will be introduced in the next chapter.
REFERENCES Cryor, J., Time Series Analysis, Duxbury Press, Boston, MA, 1986. Hougen, J., Measurements and Control—Applications for Practicing Engi neers, Cahners Books, Boston, MA, 1972. MacGregor, J. M., "OnLine Statistical Process Control," Chem. Engr. Prog. 84,10, 2131 (1988). Oakland, J., Statistical Process Control, Wiley, New York, 1986.
ADDITIONAL RESOURCES Additional information on the dynamic responses of instrumentation can be found in While, C, "Instrument Models for Process Simulation," Trans. Inst. MC, 1, 4, 187194(1979). Additional references on the dynamic responses of pneumatic equipment can be found in Harriott, P., Process Control, McGrawHill, New York, 1964, Chapter 10. Instrumentation in the control loop performs many functions tailored to the specific process application. Therefore, it is difficult to discuss sensor systems in general terms. The reader is encouraged to refer to the instrumentation references provided at the end of Chapter 1. The description of elements in the loop is currently accurate, but the situation is changing rapidly with the introduction of digital communication between the controller and the field instrumentation along with digital computation at the field equipment. For an introduction, see Lindner, K., "Fieldbus—A Milestone in Field Instrumentation Technology," Meas. and Cont., 23, 272277 (1990).
For a discussion of the interaction between the plant personnel and the au tomation equipment, see
233 Questions
Rijnsdorp, J., Integrated Process Control and Automation, Elsevier, Amster dam, 1991. Many important decisions can be made based on the understanding of feedback control, without consideration of the control calculation. These questions give some practice in thinking about the essential aspects of feedback.
QUESTIONS 7.1. Consider the CSTR in Figure Q7.1. No product is present in the feed stream, a single chemical reaction occurs in the reactor, and the heat of reaction is zero. Determine whether each of the following singleloop control designs is possible. [Hint: Does a causal process relationship exist?] Consider each question separately. (a) Control the product concentration in the reactor by adjusting the valve in the pure A pipe. (b) Control the product concentration in the reactor by adjusting the valve in the coolant flow pipe. (c) Control the product concentration in the reactor by adjusting the valve in the solvent pipe. (d) Control the temperature in the reactor by adjusting the valve in the pure A pipe. (e) Control the temperature in the reactor by adjusting the valve in the coolant flow pipe. if) Control the temperature in the reactor by adjusting the valve in the solvent pipe. F
CAO
lT + Y) & S o\ l v e n t
4
±±~
A V
PureA
CD r„
*Xvc FIGURE Q7.1 CSTR process
234 7.2. Elements in a control loop in Figure 1 Id are given in Table Q7.2 with their M^&mw&rwM^i] individual dynamics. The output signal is 0 to 100%, and the displayed CHAPTER 7 controlled variable is 0 to 20 weight %. Determine the response of the The Feedback Loop indicator (or controller input) to a step change in the output signal from the manual station (or controller output). (a) The time unit in the models is not specified. Using engineering judg ment, what units would expect to be correct: seconds, minutes, or hours? (b) First estimate the response, te3%, using an approximate method. (c) Give an estimate for how much the sensor, transmission, and valve dynamics affect the overall response. (d) Determine the response by solving the entire system numerically. TABLE Q7.2 Dynamic models Element
Units
Case A
Case B
Manual station Transmission Signal conversion Final element Process Sensor Signal conversion Transmission Display
psi/% output
0.083 1.0/(1.35 + 1) 0.75/(0.55 + 1) 8.33/(1.55 + 1) 0.50e"057(305 + l) 1.0/(15 + 1) — 1.0 1.25/(1.05 + 1)
0.083 1.0 0.75/(0.55 + 1) 8.33/(1.55 + 1) 0.50e207(305 + l) 1.0/(105 + 1) — 1.0 1.25/(1.05 + 1)
psi/mA %open/psi m3/psi mA/mV wt%/mA
7.3. For the series reactors in Figure Q7.3, the outlet concentration is controlled at 0.414 mole/m3 by adjusting the inlet concentration. At the initial base case operation, the valve is 50% open, giving Cao = 0.925 mole/m3. One firstorder reaction A ▶ B occurs; the data are V = 1.05 m3, F = 0.085 m3/min, and k = 0.040 min1. The process transfer function is derived in Example 4.2 as CA2(s)/CAo(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 dy namics are negligible. Answer the following questions about the operating window of the process: (a) Can the desired value of CA2 = 0.414 mole/m3 be achieved if the solvent flow changes from its base value of 0.085 m3/min to 0.12 m3/min? (b) Can the desired value of CA2 = 0.414 mole/m3 be achieved if the concentration of A in the solvent changes from its base value of 0.0 to 1.0 mole/m3? (c) Can the outlet concentration of A be increased to 0.828 mole/m3?
Pure A
235 Questions
Solvent
FIGURE Q7.3
7.4. (a) Discuss the three types of disturbances described in this chapter and give a process example of how each could be generated by an upstream process. (b) An alternative disturbance is a pulse function. Describe a pulse func tion, give control performance measures for a pulse disturbance, and give a process example of how it could be generated by an upstream process. 7.5. Dynamic responses for several different control systems in response to a change in the set point are given in Figure Q7.5. Discuss the control performance of each with respect to the measures explained in Section 7.4. (Note that the control performance cannot be evaluated exactly without a better definition of control objectives. Further exercises will be given in later chapters, when the objectives can be more precisely defined.) 7.6. A process with controls is shown in Figure Q7.6. The objective is to achieve a desired composition of B in the reactor effluent. The process consists of a feed tank of reactant A, which is maintained within a range of temperatures and is fed into the reactor, where the following reactions take place. A rel="nofollow">B A>C If the reactor level is too high, the pump motor should be shut off to prevent spilling the reactor contents. Identify at least one variable that is controlled by each of the five approaches to control presented in this chapter. Discuss why the approach is (or is not) a good choice. 7.7. Note that the electrical and pneumatic transmission ranges have a nonzero value for the lowest value of the range. Why is this a good selection for the range; that is, what is the advantage of this range selection?
236 CHAPTER 7 The Feedback Loop
Controlled
Set point
t M A A M A a a a I S * »Set t npoint nint
Manipulated
100 Time, t
200
200
(b) Set point
Set point
Controlled
Controlled
'{^
Manipulated
Manipulated
100 Time, /
200
(c)
200
100 Time, t id)
FIGURE Q7.5
Periodic deliveries
^ t'
Sample tap
Electrical heater
FIGURE Q7.6 Schematic drawing of process and control design.
Laboratory measures %B
7.8. Confirm that the gains in the instrument models used in Example 7.1 are reasonable. The sensor is an ironconstantan thermocouple. 7.9. The proposal was made to select the control pairing for one singleloop controller for the nonisothermal CSTR in Section 3.6 and Figure 3.17. Evaluate each using the criteria in Section 7.3. (a) Control the reactor temperature by adjusting the coolant flow rate. (b) Control the reactant concentration in the reactor by adjusting the coolant flow rate. (c) Control the coolant outlet temperature by adjusting the coolant flow rate. 7.10. The proposal was made to make one of the control pairings for the binary distillation tower in Example 5.4. Evaluate each using the criteria in Section 7.3. (a) Control the distillate composition by adjusting the reboiler heating flow. (b) Control the distillate composition by adjusting the distillate flow. (c) Control both the distillate and bottoms compositions simultaneously by adjusting the reboiler heating flow. 7.11. Answer the following questions, which address the range of a control sys tem. (a) The process in Example 1.1 (in Appendix I) is to control the process temperature after the mix by adjusting the flow ratio. Over what range of inlet temperatures 7b can the outlet temperature T3 be maintained at 90°C? (b) The nonisothermal CSTR in Section C.2 (in Appendix C) is to be operated at 420 K and 0.20 kmole/m3. Can this condition be achieved for the range of inlet concentration (Cao) of 1.0 to 2.0 mole/m3 and coolant flow rate (Fc) of 0 to 16 m3/min? If not, which range(s) has to be expanded and by how much? (c) For the CSTR in Example 3.3, can the outlet concentration of reactant be controlled at 0.85 mole/m3 by adjusting the inlet concentration? By adjusting the temperature of one reactor? 7.12. Answer the following questions on selecting control variables. Are there any limitations to the operating conditions for your answers? (a) In Example 1.2 (in Appendix I), can the outlet concentration be con trolled by adjusting the solvent flow rate? (b) How many valves influence the liquid level in the flash drum in Figure 1.8? Which of these valves would you recommend for use in feedback control? (c) In Figure 2.6, through adjustments of the air flow rate, can (i) the efficiency and (ii) the excess oxygen in the flue gas be controlled? 7.13. Evaluate the control design in Figure Q7.6. (a) Prepare a table for the selection of measured controlled variables based on the seven control objectives using the format presented in Section
2 3 8 7 . 3 . D o y o u fi n d m e a s u r e d c o n t r o l v a r i a b l e s i n F i g u r e Q 7 . 6 t o b e c o r CHAPTER 7 (fr) Prepare a table for the selection of a control valve (final element) to The Feedback Loop be connected to each controlled variable using the format presented in Section 7.3. Do you find the connections in Figure Q7.6 to be correctly selected? 7.14. For the process shown in Figure 1.8, (a) Prepare a table for the selection of measured controlled variables based on the seven control objectives using the format presented in Section 7.3. (b) Prepare a table for the selection of a control valve (final element) to be connected to each controlled variable using the format presented in Section 7.3. (Note: This is a challenging exercise, but it will help you to understand the manner that many singleloop controllers can be used to control a complex process. Do the best you can at this point; multipleloop systems are addressed in detail later in the book.) 7.15. Sketch the operating window for the threetank mixing process. The vari ables on the axes, which define the operating window, are (1) the outlet concentration (defining the range of achievable desired product) and (2) the concentration of A in the feed B, (xa)b (defining the range of distur bances that can be compensated by adjusting the valve). Discuss the shape of the window; is it rectangular?
The PID 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 timeconsuming 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 proportionalintegralderivative (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 singleloop systems, also termed single inputsingle output (SISO), which have one controlled and one manipulated variable. Usually, many singleloop 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 singleloop 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. 8.2 □ DESIRED FEATURES OF A FEEDBACK CONTROL ALGORITHM Many of the desired characteristics for feedback control were discussed in the previous chapter under quantitative measures of control performance. Here, a few of these characteristics are extended for use in this and upcoming chapters. Key Performance Feature: Zero Offset The performance measures discussed previously could be combined into two cat egories: dynamic (IAE, ISE, damping ratio, settling time, etc.) and steadystate. The steadystate goal—returning to set point—is further discussed here. This goal can be stated mathematically as follows by using the final value theorem, lim E(t) = lim sE(s)=0 (8.1)
f>oo
s*0
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 steadystate 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 lim E(t) = lim sE(s) = lim s ( ) G(s) = 0 (8.2)
rxx>
s>o
s^o
\
s
J
where G(s) — E(s)/X(s), and X(s) is the input disturbance D(s) or set point change SP(s). By satisfying equation (8.2), the control algorithm is guaranteed to return the controlled variable to its set point for that particular process and input function. Note that systems satisfying equation (8.2) are not guaranteed to achieve zero steadystate offset for other inputs, such as a ramp. To evaluate the control 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 welltested 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 timedependent behavior of the feedback information in a different manner, as indicated by the name proportionalintegralderivative. Each mode of the equation and the key capability it provides
241 Desired Features of a Feedback Control Algorithm
242 CHAPTER8 The PID Algorithm
_.«
„■ Proportional •
Error
Set
+ point ■  ; > C K  S P d )
Eit) Measured variable
Manipulated variable
o
MV(0
$3
Process
Final element
Sensor
CV(i) Controlled 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.)
8.3 m BLOCK DIAGRAM OF THE FEEDBACK LOOP In this chapter, key quantitative features of a dynamic process controlled by the proportionalintegralderivative (PID) controller will be presented. Since all ele ments in the loop affect the dynamic behavior, the modelling must combine the individual models of the process, instrumentation, and controller into one overall dynamic model of the loop. We learned in Chapter 4 how to combine individual models using block diagrams. Therefore, we begin the analysis of the control loop by deriving the transfer function models of the loop based on its constituent ele ments using block diagram algebra. By using general symbols of each of the loop elements, e.g., Gpis) for the process, we will derive overall transfer function mod els applicable to many specific systems. The model for any specific control loop can be developed by substituting the element models, e.g., Gp(s) = Kp/izs +1)2 for a secondorder process. The block diagram is shown in Figure 8.2 with the terminology that will be used throughout the book. Notice that the equipment elements in the feedback loop are collected into three transfer functions: the valve or final element, Gvis); the process, Gpis); and the sensor, Gsis). The computing element is the controller Gc is). The process output variable selected to be controlled is termed the controlled variable, CV(s), and the process input variable selected to be adjusted by the
243
Dis)
Gcis)
MV(s)
Gdis) i
CV(5)
Gvis)
Gpis)
CVJs) Gsis) Transfer Functions Gcis) = Controller Gvis) = Transmission, transducer, and valve Gpis) = Process Gsis) = Sensor, transducer, and transmission Gdis) = Disturbance
Variables CVis) = Controlled variable CVmis) = Measured value of controlled variable Dis) = Disturbance Eis) = Error MVis) = Manipulated variable SPis) = Set point FIGURE 8.2 Block diagram of a feedback control system.
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 fourstep 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) = Gpis)Gvis)Gcis)Gsis)[CVis)] + GdDis)
(8.3)
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:
[1 +Gpis)Gvis)Gcis)Gsis)]CVis) = Gdis)Dis)
(8.4)
Block Diagram of the Feedback Loop
244 CHAPTER 8 The PID Algorithm
Equation (8.4) can be rearranged to yield the closedloop disturbance transfer function, and the same procedure can be used to derive the set point transfer function. Closedloop transfer functions for a feedback loop CVis) Gdis) Disturbance response: Dis) \ + Gp(s)Gv(s)Gc(s)Gs(s) CVis) _ Gpis)Gvis)Gcis) Set point response: SP(5) 1 + Gpis)Gvis)Gcis)Gsis)
(8.5) (8.6)
In summary, the block diagram procedure for deriving a transfer function involves four steps: 1. Select the numerator of the transfer function. 2. Solve in reverse direction to the causal relationships (arrows) in the block diagram to eliminate all variables except the numerator and denominator in the transfer function. 3. Separate variables in the equation. 4. Divide by the denominator variable to complete the transfer function. 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
pirically, the only model determined is the overall product of all instrumentation and process elements, and the individual elements are not known. The resulting simplified transfer function is CVis) Gd T7T = . , r ,,r , . with Gp(s) = G'p(s)Gv(s)Gs(s) (8.8) D(s) 1 I Gp(s)Gc(s) y * This simplification is not used when the effects of sensors and final elements are to be shown clearly; however, it is used often to simplify notation. If the process transfer function Gp(s) is shown in a closedloop block diagram or transfer function without the sensor and final element, the reader should assume that it includes the dynamics of the sensor and final element, since feedback control requires all elements in the loop.
245 Proportional Mode
The block diagram analysis yields several valuable results: 1. The block diagram provides a visual "picture of the equations" showing the feedback loop. 2. The general closedloop 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 proportionalintegralderivative (PID) controller. Any linear controller algorithm [Gc(s)] would yield the conclusions in the boxed highlight above. 8.4 d PROPORTIONAL MODE It seems logical for the first mode to make the control action (i.e., the adjustment to the manipulated variable) proportional to the error signal, because as the error increases, the adjustment to the manipulated variable should increase. This concept is realized in the proportional mode of the PID controller:
Note: slope = Kc id)
Proportional mode: MVp(t) = KcE(t) + Ip MVp(= s )Kr __ (8.9) Eis) The controller gain Kc is the first of three adjustable parameters that enable the engineer to tailor the PID controller to various applications. The controller gain has units of [manipulated]/[controlled] variables, which is the inverse of the process gain Kp. Note that the equation includes a constant term or bias, which is used during initialization of the algorithm Ip. During initialization the value of the manipulated variable should remain unchanged; therefore, the initialization constant can be calculated at the time of initialization as Gcis) =
Ip = [MVit)KcEit)]\t=0 (8.10) The behavior of the proportional mode is summarized in Figure 8.3a and b. In deviation variables, a plot of manipulated variable versus error gives a straight line
MV(0
Time Note: Eit) = constant ib)
FIGURE 8.3 Summary of proportional mode.
246
with slope equal to the controller gain and zero intercept. A plot of the manipulated variable versus time for constant error gives a constant value. Although the concept seems logical, we do not yet know whether the control performance of the proportional controller satisfies the desired control performance goals presented in the previous chapter and Section 8.2. To evaluate performance it is useful to have the closedloop transfer function. The transfer function for the disturbance response of the system in Figure 8.2 is given in equation (8.5). Substituting the transfer function model for a proportional controller, Gds) = Kc, gives the following transfer function:
CHAPTER 8 The PID Algorithm
CVjs) = Gd(s) Dis) \+Gpis)Gvis)KcGsis) One of the most important goals in control performance is zero offset at the fi nal steady state. For a disturbance response, the zero steadystate offset requires E'it) ,oo= CV'(0 !,_>«,= 0. *A0
&r f a
lAI
c*r
VA2
t^rt*
EXAMPLE 8.1. The threetank mixing process under control modelled in Example 7.2 is now an alyzed. Recall that the feedback and disturbance processes are thirdorder. The steadystate value for error under proportional control can be determined by re arranging equation (8.11), substituting the models for Gpis) and Gdis), and apply 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, errorfree measurement.
Gsis) = 1 GPis)Gvis) =
CV'it)
= lim 5>0
K, izs +1)3
Gdis) =
Kd
izs + l)3
Gds) = Ke
Kd{rs + \)\zs + \)\zs + l) is)iAD/s)1 + KcKt ( — ) ( —+ )\J \zs( +—\J) . \zs + \J \zs
KdAD 1 + KcKt
7*0
(8.12)
u
Note that the feedback control system with proportional control does not achieve zero steadystate offset! This result can be understood by recognizing the proportional relationship between the error and the manipulated variable in the controller algorithm; the only way in which the control equation (8.9) can have the error return to zero is for the value of the manipulated variable to return to its initial condition. However, for the error to be zero in the process equation, the manipu lated variable must be different from its initial value, because it must compensate for the disturbance. Thus, steadystate offset occurs with proportionalonly control. This is a serious shortcoming, which must be corrected by one of the remaining two modes.
do " X°~
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 equation (8.11) for a simple process with the disturbance and feedback processes being firstorder 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 „ GP(s) =z s—±t+ Gd(s) = —21 z s + \ Gds) = Kt K„ K{ CVjs) _ ts + l _ \ + KcK£. Dis) KCK_
Proportional
(8.13)
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) = ADKdi\  e"x) (no control) (8.14) 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 closedloop system and the final deviation from set point by a factor of 1/(1 + KCKP) for a firstorder process. This means that the feedback system responds faster than the openloop 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 threetank 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 thirdorder 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 closedloop 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 firstorder 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.
Mode
s
ao
O T
SP
o « »■ a* to a* CO sr •<
3
B S
o 5 Q. n 3 3
3 2>
o in
c SB n
ti O
B s
Wl
o
O
II
w
5?
5
H 3 n
2 <
m
O O
30 >
o
H m
ai
00
3 u. O T S •o
<
GO
O i t
N ^ *
N la
CO
Cl B»
i
Cl
cl
5?
cr c to S 3
CL CO 3* 'O
«* O T S 3 o O •^ * t & T & O ft 3
CO
8'•a coTO t9*c" s. fT t OyT V: O
^Tt 3 O a.
•8
3? •a 5 O a* T 3o jst to ■5 *< «■*, C l O T ca tt> P 1B ( I Q (» 3 r r • t to r » *
to 3 ■3a S " o TO* CO
CO
£
s
3 ii o Q . < 8 «» CL CO o O T
•S o
T O 53 O *a CL o o s cCDa o O T 3 3
Q O
s
3 N—' ~ 32
"
(1 l.a
H  & S O O TO o X c «■* Q. »• o
>j£,3
■CT* *1
nrtol »A :]) n oc
— ««C. O to /s a © >a»
& © *2 g ° *S S t o n3 Jr
°O ^T *1 3
3 ii *
•s *§*
3* ^ 3
^W 5a ws
X ^ 3 ^ > 2
goo no
"II "•» ©Ta O
H fl
a?t
aB bii =r
n
fh rt on ita r m sop o « »* o ? n*3Ss S
o
•i1!
T3 J? O
■a s J to n o 2.* 3
*
co;o n rlt u asrd ti D u b srti 9n
5 c
ti
s
/—N
**r? ~*
H 3 n
H 3 o>
o o
ro
o
O O
o
o
b
j
l_L
1—I—r
b
Concentration (%A)
Controller Concentration output (%) (%A)
o
Controller output (%)
S 3
1

_
"
1 1 I 1 1


1 1 1
1
4s.
b
■ o
<
kp^n
o

o



1 1 1
o
Controller Concentration output (%) (%A)
Controller Concentration output (%) (% A)
the conventional form of the integral mode used in the commercial PID controller. 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 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.
249 Derivative Mode
EXAMPLE 8.3. The effect of the integral mode can be determined by evaluating the offset of the threetank mixing process under integralonly control for a step disturbance, Dis) AD/s. Gvis)GJs) =
lA0 VA1
f e
lA2
*
Ka K, Gdis) = Gds) =Tjs£ Gsis) = 1 (zs + W ~av" (zs + W " " " " " " *■ (;itt)(;^t)(;itt)
f
lA3
a
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 steadystate offset, which is the primary reason for including this mode.
n Again, some dynamic responses of the threetank 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 integralonly control than for proportionalonly 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 integralonly 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; and can cause instability if tuned improperly.
<J 6
i
i
'
I
I
I
I
I
L
200
Time FIGURE 8.6
8 . 6 □ D E R I VAT I V E M O D E
If the error is zero, both the proportional and integral modes give zero adjustment to the manipulated variable. This is a proper result if the controlled variable is not changing; however, consider the situation in Figure 8.7 at time equal to / when the disturbance just begins to affect the controlled variable. There, the error and
Threetank mixing process under integralonly control subject to a disturbance in feed composition ixA)B of 0.8%A and Kc = [%open/%A], Tl = [mhi\:ia)Kc = hTl = U 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 is large. This situation is addressed by the derivative mode:
CHAPTER 8 The PID Algorithm
Derivative mode:
dEit) MVd(t) = KcTdj^ dt + Id
(8.18)
Gc = ~E(sT= Cd
Time FIGURE 8.7
Assumed effect of disturbance on controlled variable.
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 a proportionalderivative controller (Rhinehart, 1991). Again consider the dynamic 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 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 firstorder response with a time constant equal to the disturbance process time constant: dE zd— + E = Es dt
(8.19)
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
Thus, the proportionalderivative modes are a natural result of the assumption that the error will respond as given in Figure 8.7. If the assumption is good, the derivative mode may improve the control performance. The behavior of the calculation for the derivativeonly mode is shown in Figure 8.8. When the controlled variable is constant, the derivative mode makes no change to the manipulated variable. When the controlled variable changes, the derivative mode adjusts the manipulated variable in a manner proportional to the rate of change.
*A0
:l^r f a A
VA1
t*r
(8.20)
VA2
i*r#
EXAMPLE 8.4. The offset of a derivative controller can be determined by applying the final value theorem to the threetank 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.
GMGM) =
Kr
Gd(s) =
Ka
( r j + 1 ) 3 ~ a v " ( r. y + 1 ) 3
CV'(r),=00 = 5»0 lim
Gc(s) = KcTds
(,)(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 MVrf(0 = KcTd
dCVjt) + ld dt
(8.22)
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 CHAPTER 8 The PID Algorithm
highfrequency noise on the controlledvariable measurement, which will also cause excessive variation in the manipulated variable. An obvious step to reduce the effects of noise is to reduce the derivative time, perhaps to zero. Other steps to reduce the effects of noise are presented in Chapter 12. In summary: The derivative mode is simple; does not influence the final steadystate value of error; provides rapid correction based on the rate of change of the controlled variable; and can cause undesirable highfrequency variation in the manipulated variable.
8.7 01 THE PID CONTROLLER Naturally, it is desired to retain the good features of each mode in the final control algorithm. This goal can be achieved by adding the three modes to give the final expression of the PID controller. Where the derivative mode appears, two forms are given: id) the standard and ib) the form recommended in this book because it prevents set point changes from causing excessive response, as described in the preceding section. TimeDomain Controller Algorithms PROPORTIONALINTEGRALDERIVATIVE. MV(0 = Kc (Eit) + 1 j* Eit1) dt' + Td^^j + / /
i
f
(8.23a)
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:
PROPORTIONALONLY CONTROLLER. MV(0 = Kc[E(t)] + I
(8.24)
PROPORTIONALINTEGRAL CONTROLLER.
MV(0 = Kc (Eit) + yJ E(t') dA + 1
(8.25)
PROPORTIONALDERIVATIVE CONTROLLER. ev.n , rrdE(t)\ , r MV(0 = KC( E(t) + Td—— dt ) ) +/
(8.26a)
MV(0 = Kc (E(t)  Td (/) J + / (Recommended) (8.26fc)
Selection from among the four forms will be discussed after many features of the controllers have been introduced.
Analytical Expression for a ClosedLoop Response
LaplaeeDomain Transfer Functions The control algorithms are used often in block diagrams and in closedloop transfer functions. In these analyses the main purposes are to determine limiting behavior for control systems (stability and frequency response), usually for disturbance response; thus, the PID form with derivative on the error is used for simplicity. The transfer functions for the common forms are as follows. Note that each transfer function is the output over the input, with the input and output taken with respect to the controller, which is the opposite of the process. Also, since transfer functions are always in deviation variables, the initialization constant does not appear. PROPORTIONALINTEGRALDERIVATIVE. MV(s) Gds) = ^^ = Kc (1 + j + Tds) (8.27) E(s) \ T, s J PROPORTIONALONLY. MV(s) Gc(s) = = Kc E(s)
(8.28)
PROPORTIONALINTEGRAL. Gds) =
MV(s) Eis)  * ( ■ ♦ £ )
253
(8.29)
PROPORTIONALDERIVATIVE. MVjs) = Kci\ + Tds) (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. Gds) =
8.8 m ANALYTICAL EXPRESSION FOR A CLOSEDLOOP RESPONSE It is clear that the algorithm structure and adjustable parameters affect the closedloop dynamic response. A straightforward method of determining how the pa rameters affect the response is to determine the analytical solution for the linear process with PID feedback. This is generally not done in practice, because of the complexity of the analytical solution for realistic processes, especially when the process has dead time. However, the analytical solution is derived here for a simple process, to aid in understanding the interplay between the process and the controller. EXAMPLE 8.5.
To facilitate the solution, a simple process—the stirredtank heater in Example 3.7—is selected, with the controlled variable being the tank temperature and the
254
manipulated variable being the coolant flow valve, as shown in Figure 8.9. Since proportional control was considered in Example 8.2, a proportionalintegral con troller is selected, because this will ensure zero steadystate offset. The response to a step set point change will be determined.
CHAPTER 8 The PID Algorithm
U
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).
aFH+x VpCp^=CppF(T0T)
do
(Wl
aEbc Fc + 2pcC,pc
(TTcin)
FC=\KV
(8.31)
(8.32)
f a FIGURE 8.9 Heat exchanger control system in Example 8.5.
v = Kc [(Tsv T) + jJ^ (Tsp  T) dA + I (8.33) First, the degrees of freedom of the closedloop control system will be evalu ated. Dependent variables: T, FCi v E x t e r n a l v a r i a b l e s : 7 b , F, Tc i a , Ts p D O F = 3  3 = 0 Constants: p, Cp, Cpc, a, b, Kv, AP, pct Kc, Tt, I, V
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 + \ GM = Kv Gds) =
(8.34)
1.0
v(s) Tsp(s)  T(s)  * ( ■ ♦ £ )
(8.35) (8.36)
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 singleloop control system is given in Figure 8.2, and the closedloop transfer function is rearranged to give CV(s) =
Gp(s)Gv(s)Gc(s) S?(s) \+Gp(s)Gv(s)Gc(s)Gs(s)
(8.37)
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)
. + *'
ZS+ 1
(8.38)
* ( ' ♦ £ )
77^ + 1 SP(5) rT, i Tjiy + KcKJ ±, * H zrr.——s + 1 KCK. KcKp This can be rearranged to give the transfer function for the closedloop system:
SXW
TO+1
(8.39)
SP(j) iz')2s2 + 2$z's + \ v ' This is presented in the standard form with the time constant (r') and damping coefficient expressed as 1 / T, /\ + KcKp\ * 2y KcKp \ Jt )
z =
KCKr,
(8.40)
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, Tit) = ASP
r'yfT^T2
+ASP i with
e^j£Ei;
V^F
(8.41)
e^'s[n(^LJlt +
or using entry 10 in Table 4.1 to give, for £ > 1 (et/x[ _ etix'2\ x[e"<  z!>e"T'i
T'it) = ASP T, * : ; " + 1 +  r; '  2 r Z\ Z>
(8.42)
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: 1. The feedback system is secondorder, although the process is firstorder. Thus, we see that the integral controller increases the order of the system by1. 2. The integral mode ensures zero steadystate offset, which can be verified by evaluating the foregoing expressions as time approaches infinity. 3. The response can be over or underdamped, depending on the parameters in equation (8.40). Again, we see that feedback can change the qualitative characteristics of the dynamic response.
256 CHAPTER 8 The PID Algorithm
4. The response for this system is always stable (for negative feedback, KCKP > 0); in other words, the output cannot grow in an unbounded man ner, because of the structure of the process and controller equations. This is not generally true for more complex and realistic process models (and es sentially all control systems involving real processes), as will be explained in Chapter 10. 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) SPis) ~ \+GJs)Gcis)Gvis)Gsis)
(8.43)
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 underdamped) 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 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 another set of controller tuning constants could yield overdamped behavior for the closedloop 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 controlledvariable overshoot and decay ratio increase as the damping coefficient decreases.
257 Importance of the PID Controller
This analysis could be extended to other simple systems, but it cannot be ap plied to most realistic systems, for which the inverse Laplace transform cannot be evaluated. Therefore, the derivation of complete analytical solutions will not be extended here. However, the general principles learned in this example are appli cable to the methods of analysis introduced in the next few chapters. Also, one important class of processes—inventories (levels)—is simple enough to allow pro cess equipment and controller design based on analytical solution of the linearized models, as covered in Chapter 18.
8.9 □ IMPORTANCE OF THE PID CONTROLLER The process industries, which operate equipment at high pressures and tempera tures with potentially hazardous materials, needed reliable process control many decades before digital computers became available. As a result, the control meth ods developed many decades ago were tailored to the limited computing equipment available at that time. The main method of automated computing during this period, and one which continues to be used today, is analog computation. The principle behind analog computing is the design of a physical system that follows the same equations as the equations desired to be solved (Korn and Korn, 1972). Naturally, the computing system must be simple and should have easy ways to alter param eters. An example of an analog control system is shown schematically in Figure 8.11. Here the level in a tank is controlled by adjusting the flow into the tank. The sensor is a float in the tank, and the final control element is the valve stem position. The controller is a proportionalonly algorithm, so that the controller output is proportional to the error signal. This algorithm is implemented in the figure by a bar that pivots on a fulcrum. As the level increases, the float rises and the valve closes, reducing flow into the tank. The control parameters can be changed by (1) increasing the height of the fulcrum to increase the set point (with an appropriate adjustment of the connecting bars) or (2) altering the fulcrum position along the bar to change the controller proportional gain. Although a few systems like the one in Figure 8.11 are in use (indeed, a form of that system is found in domestic toilet tanks), most of the analog controllers in the process industries use more sophisticated pneumatic or electronic principles
Row out set by downstream unit
FIGURE 8.11 Example of an analog level controller.
258 to automate the PID algorithm. The typical industrial implementation yields the mmiMmmmmmiiym\ following transfer function for an electronic analog controller calculation (Hougen, CHAPTER 8 1972): The PID Algorithm
mi = KJi±ZV£l \l±If] (8.44)
C V C s ) L Ti s ] 11 + u T d s ] Equation (8.44), often referred to as the interactive PID algorithm, is an approx imation to the PID algorithm when a is small. The tuning constants are adjusted by changing values of resistors and capacitors used in the circuit. Note that since the equation structure is different from the forms already introduced, this equation would require different values of their tuning constants; the tuning rules in this book are for the forms in equation (8.23/?). Analog controllers were used for many decades prior to the introduction of digital controllers and continue to be used today. Pneumatic analog controllers use air pressure as the source of power for the calculation to approximate the PID calculation (Ogata, 1990). The techniques in this book are based on the analysis of continuous systems, because we will be using Laplace transforms and similar mathematical methods. Most processes are continuous (e.g., stirred tanks and heat exchangers), and the controller is also continuous when implemented with analog computation. How ever, the controller is discrete when implemented by digital computation; discrete systems perform their function only at specific times. For most of this book, the as sumption is made that the control calculations are continuous, and this assumption is generally very good for digital controllers as long as the time for calculation is short compared with the process dynamic response. Since this situation is satisfied in most process control systems, the approach taken here is usually valid. Special features of digital control systems are introduced in Chapter 11 and covered there after as appropriate for subsequent topics, and numerous resources are dedicated entirely to the special aspects of digital control, for example, Appendix L, Franklin and Powell (1980) and Smith (1972). 8.10 El CONCLUSIONS In this chapter, the important proportionalintegralderivative 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 firstorder processes with Ponly 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 threetank mixing process without control, the characteristic equation is (T5
+
l)3=0
(8.45)
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 its
+
l)3
+
KCKP
=
0
(8.46)
Thus, the controller gain influences the poles and the exponents in the timedomain 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, AddisonWesley, 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, McGrawHill, New York, 1972. Ogata, K., Modern Control Engineering, PrenticeHall, 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. 4552 (Dec. 1982).
260
Additional analytical solutions to loworder closedloop systems can be found in Weber, T., An Introduction to Process Dynamics and Control, Wiley, New York, 1973.
CHAPTER 8 The PID Algorithm
For a more complete discussion of system types than presented in Section 8.2,
see Distephano, S., A. Stubbard, and I. Williams, Feedback Control Systems, McGrawHill, New York, 1976.
With models for the process and controller now available, the dynamic behavior of a closedloop 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 Ponly 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 threetank mixing system based on the equations derived in Example 7.2. id) Determine the openloop 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 closedloop (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 Ponly, 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 and not of the level. Assume that the valveflow relationship is linear (i.e., ^out = Kvv).
261 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 Ponly and PI controllers. Are the criteria for zero steadystate offset the same as for the threetank 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 threetank mixing system under Ionly control has zero steadystate offset for a step disturbance. Is this a general conclusion for PID control 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 threetank mixing process for a step disturbance in the concentration of stream B, id) without control and ib) with Ponly feedback control. 8.7. id) Calculate the roots of the characteristic equations and relate them to the dynamic behaviors of the closedloop systems in Figure 8.4a through d. ib) Select different tuning constant values that yield substantially different dynamic behavior for the closedloop system in Example 8.5. Describe the different timedomain 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 threetank 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.
FIGURE Q8.4
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) +
Ti Jo yo
E(t")dt"
ib) MV(0 = Kc(E(t))2 (Eit) + Y,f0 E{t>) dt)
(c) MV(r) = Ke ((E(t))2 + jr I'iEit'yfdt^ 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 stirredtank 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 closedloop transfer function, CV(s)/SP(s). 7m3/ht 3% A
6.9 m3/hr 1%A B
OO
hCD 00
A 0.14m3/hr 100% A
<$>
Disturbance is change in the concentration of stream C with the flow rate constant.
FIGURE Q8.12
8.13. The level control system with a proportionalonly algorithm in Figure Q8.13 is to be analyzed; the inlet flow is a function of only the valve open ing. The process is not typical; usually, the flow out would be pumped, but here it drains by gravity. However, this is a simple system to begin analyzing control systems; more realistic processes will be considered in subsequent chapters.
263 Questions
0
if»~© CSC}—^ FIGURE Q8.13
(a) Derive a linearized model and transfer functions for the process and for the proportionalonly controller. (b) Draw a block diagram, and derive the closedloop transfer function. (c) Calculate the steadystate offset. (d) Select an appropriate sign for the gain and calculate the time to reach 63 percent of the final steadystate 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 proportionalonly feedback controller. At the initial base case operation, the valve is 50 percent open, giving Cao = 0.925 mole/m3. One firstorder reaction A >• B occurs; the data are V = 1.05 m3, F = 0.085 m3/min, and k = 0.040 min1. 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 closedloop 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 closedloop transfer function, determine the steadystate 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.
Pure A
264 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 openloop 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 Ponly feedback controller gain that results in an overdamped closedloop system. Discuss the implications of your results for the quality of feedback control performance. (b) Repeat the analysis for a proportionalderivative controller and discuss the effect of the derivative mode on the closedloop dynamic behavior, especially the periodicity.
^y^ SPWjp.
MV(j) Kc
1.0 T V + 2&S + 1
CVis)
FIGURE Q8.17
8.18. (a) Determine the PID controller modes that are required for zero steadystate offset for an impulse disturbance for the following processes: (1) The threetank mixing process in Examples 7.2 and 7.3 with xAb an impulse
(2) A nonselfregulating level system, like equation (5.15), with F0 an impulse and F\ adjusted by the controller ib) Discuss the application of integralonly control to both processes. 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.
D
(o)
SP
g, Qr+
Gc
Gi ^ • • • — G,
—* °l —~*1
ib)
spiQ
*>
Gc
^ 1
*>
(+ G2
+>
G,
1
ic)
X0 s
p
—
I
Q
— ▶
Gc
Xi
*•
—
G2
—_l
«
r—•»
1
0
D
FIGURE Q8.19
Block diagrams for several control systems. All quantities are Laplacetransformed; the variable is) is omitted for simplicity.
265 Questions
PID Controller Tuning for Dynamic Performance 9.1 m INTRODUCTION As demonstrated in the previous chapter, the proportionalintegralderivative (PID) control algorithm has features that make it appropriate for use in feedback control. Its three adjustable tuning constants enable the engineer, through judicious selec tion of their values, to tailor the algorithm to a wide range of process applications. Previous examples showed that good control performance can be achieved with a proper choice of tuning constant values, but poor performance and even instability can result from a poor choice of values. Many methods can be used to determine the tuning constant values. In this chapter a method is presented that is based on the timedomain performance of the control system. Controller tuning methods based on dynamic performance have been used for many decades (e.g., Lopez et al., 1969; Fertik, 1975; Zumwalt, 1981), and the method presented here builds on these previous studies and has the following features: 1. It clearly defines and applies important performance issues that must be con sidered in controller tuning. 2. It provides easytouse correlations that are applicable to many controller tuning cases. 3. It provides a general calculation approach applicable to nearly any control tuning problem, which is important when the general correlations are not applicable.
268 CHAPTER 9 PID Controller Tuning for Dynamic Performance
4. It provides insight into important relationships between process dynamic model parameters and controller tuning constants.
9.2 a DEFINING THE TUNING PROBLEM The entire control problem must be completely defined before the tuning constants can be determined and control performance evaluated. Naturally, the physical pro cess is a key element of the system that must be defined. To consider the most typical class of processes, a firstorderwithdeadtime plant model is selected here because this model can adequately approximate the dynamics of processes with monotonic responses to a step input, as shown in Chapter 6. Also, the controller algorithm must be defined; the form of the PID controller used here is
MV(0 = Ke \E(t) + yj* E(t')dt'  Td^P~~\ + / (9.1) Note that the derivative term is calculated using the measured controlled variable, not the error.
The tuning constants must be derived using the same algorithm that is applied in the control system. The reader is cautioned to check the form of the PID controller algo rithm used in developing tuning correlations and in the control system computation; these must be compatible.
Next, we carefully define control performance by specifying several goals to be balanced concurrently. This definition provides a comprehensive specification of control performance that is flexible enough to represent most situations. The three goals are the following: 1. Controlledvariable performance. The welltuned controller should provide satisfactory performance for one or more measures of the behavior of the controlled variable. As an example, we shall select to minimize the IAE of the controlled variable. The meaning of the integral of the absolute value of the error, IAE, is repeated here.
IAE = / ' \SP(t)CV(t)\dt Jo
(9.2)
Zero steadystate offset for a steplike system input is ensured by the integral mode appearing in the controller. 2. Model error. Linear dynamic models always have errors, because the plant is nonlinear and its operation changes. Since the tuning will be based on these models, the tuning procedure should account for the errors, so that acceptable control performance is provided as the process dynamics change. The changes are defined as ± percentage changes from the basecase or nominal model parameters. The ability of a control system to provide good performance when the plant dynamics change is often termed robustness. 3. Manipulatedvariable behavior. The most important variable, other than the controlled variable, is the manipulated variable. We shall choose the com
TABLE 9.1
269
Summary of factors that must be defined in tuning a controller Major loop component Process
Key factor Model structure Model error
Input forcing Measured variable Controller Control performance
Structure Tuning constants Controlledvariable behavior
Manipulatedvariable behavior
Values used in this chapter for examples and correlations Linear, firstorder with dead time ± 25% in model parameters (structured so that all parameters increase and decrease the same %) Step input disturbance with Gd(s) = Gp(s) and step set point considered separately Unbiased controlled variable with highfrequency noise PID and PI Kc, 77, and Td Minimize the total IAE for several cases spanning a range of plant model parameter errors Manipulated variable must not have varia tion outside defined limits; see Figure 9.4
mon goal of preventing "excessive" variation in the manipulated variable by defining limits on its allowed variation, as explained shortly. To evaluate the control performance, the goals and the scenario(s) under which the controller operates need to be defined. These definitions are summarized in Table 9.1; the general factors are in the second column, and the specific values used to develop correlations in this chapter are in the third column. This may seem like a rather lengthy list of factors to establish before tuning a controller, but they are essential to any proper tuning method. Fortunately, the rather standard set of specifications in the third column is appropriate for a wide range of applications, and therefore it is possible to develop correlations that can be used in many plants, where this underlying specification of control performance is valid. The entries in Table 9.1 will be further explained as they are encountered in the next section. All subsequent chapters in this book require a good understanding of the factors that affect control performance.
The reader is encouraged to understand the factors in Table 9.1 thoroughly and to refer back to this section often when covering later chapters.
9.3 □ DETERMINING GOOD TUNING CONSTANT VALUES Given a complete definition of the process, controller, and control objectives, eval uating the tuning constants is a relatively straightforward task, at least conceptu ally. The "best" tuning constants are those values that satisfy the control perfor mance goals. With our definitions of Goals 1 to 3, the optimum tuning gives the
Determining Good Tuning Constant Values
270 CHAPTER 9 PID Controller Tuning for Dynamic Performance
minimum IAE, for the selected plant (with variations in model parameters), when the manipulated variable observes specified bounds on its dynamic behavior. The control objectives in Table 9.1 have been defined so that they can be quan titatively evaluated from the dynamic response of a control system. The dynamic response of the control system with a complex process model including dead time cannot be determined analytically, but it can be evaluated using a numerical so lution of the process and controller equations. The dynamic equations are solved from the initial steady state to the time at which the system attains steady state after the input change. The best values of the tuning constant can be determined by evaluating many values and selecting the values that yield best measure of control performance. Since the goal of this presentation is to concentrate on the effects of the process dynamics on tuning, not the detailed mathematics, the reader may visualize the best values being found by a grid search over a range of the tuning constant values, although this procedure would involve excessive computations. (Some further details on the solution approach are given in Appendix E.) The result is a set of tuning (Kc, Tj, Td) that gives the best performance for a specific plant, model uncertainty, and control performance definition. As explained in Section 9.2, we will consider a firstorderwithdeadtime plant because this model can (approximately) represent the dynamics of many overdamped processes. As a helpful image for the reader, a simple mixing process example shown in Figure 9.1 will be used throughout this chapter, although the results are not limited to this simple process, as will be demonstrated later in the chapter. The process can be described by the following transfer function model:
Gds)G'p(s)Gs(s)
Kne 9s
GPis) = ZS + l
(%A in outlet)/(%valve opening) (9.3)
Kd Gdis) = zs + \
(%A in outlet)/(%A in inlet)
(9.4)
From a fundamental balance on component A, the dead time and time constant can be determined as the following functions of the feed flow rate and equipment size.
Process used for calculating example tuning constants for good control performance.
The base case values are given here, and the functional relationships will be used in later examples to determine the modified dynamics for changes in production rate (FB).
Parameter Dead time, 0 Time constant, z Steadystate gain, KP
Dependence on process Base case value (A)iL)/FB V/FB Kv[ixA)A  ixA)B]/FB
5.0 min 5.0 min 1.0 (%A in outlet)/(%open)
In general, the three tuning constants iKc, 7>, and Td) should be evaluated si multaneously to achieve the best performance. However, we will gain considerable insight by considering the PID tuning constants and performance goals sequen tially. This will enable us to learn how the goals influence the values of the tuning constants and also the interaction among the values of the three tuning constants. Therefore, we shall begin with the simplest case, determining the value of one tun ing constant, Kc, which results in the minimum in the performance measure goal 1 (IAE). In this initial case, the other two tuning constant values (7) and Td) will be held constant at reasonable values. Then, values of all three tuning constants will be determined that give the best control performance, as represented by goal 1 (IAE). Finally, the values of the tuning constants are determined that give the best performance, as measured by the complete definition of control performance, goals 1 to 3. Recall that the feedback control system is designed to respond to disturbances and changes in set points (desired values). Initially, we will restrict attention to a unit step disturbance in the inlet concentration, Dis) = \/s %A in the inlet. Later, set point changes will be addressed.
Goal 1: ControlledVariable Performance (IAE) Let us begin with a PID controller applied to the example process. We will start by optimizing only one controller constant. Recall that the integral mode is required so that the controlled variable returns to its set point. Therefore, the study will find the best value of the controller gain, Kc, with the integral time (7> = 10 min) and derivative time (Td = 0 min) temporarily maintained at fixed values. The value selected for the integral time (the sum of the dead time and time constant) is reasonable (although not optimum), as demonstrated by further results, and the derivative time of zero simply turns off the derivative mode. For this first case, the goal in this analysis is temporarily limited to achieving the minimum value of the IAE for the base case plant model. The results of several transient responses are presented in Figure 9.2, with each case having a different value of the controller gain. The results show that the relationship between IAE and Kc is unimodal; that is, it has a single minimum. The minimum IAE is at a controller gain value of about Kc = 1.14%/(mole/m3) with an IAE of 9.1. For values of the controller gain smaller than the best value (e.g., Kc = 0.62), the controller is too "slow," leading to higher IAE. For values
271 Determining Good Tuning Constant Values
Process dynamics: Kp= 1.0, 0 = 5.0, t= 5.0 Kc=0.62 IAE =16.1 1
272 CHAPTER9 PID Controller Tuning for Dynamic Performance
0.5 1 1.5 Controller gain £=1.52 IAE =16.5
£.= 1.14 IAE = 9.2 i 1 r
1
I
"S o
1co
J.W
U
1
J
I
L
50
100 Time
150
200
FIGURE 9.2 Dynamic responses used to determine the best controller gain, Kc% open/ %A, with T, = 10 and Ta = 0.
of the controller gain larger than the best value (e.g., Kc = 1.52), the controller is too "aggressive," leading to oscillations and higher IAE. Note that the optimum is somewhat "flat"; that is, the control performance does not change very much for a range (about ±15%) about the optimum controller gain. However, if the controller gain is increased too much, the system will become unstable. (Determining the stability limit is addressed in the next chapter.) The graphical presentation used for one constant can be extended to two constants by varying the controller gain and integral time simultaneously while holding the derivative time constant (7^ = 0). Again, many dynamic responses can be evaluated and the results plotted. In this case, the coordinates are the controller gain and integral time, with the IAE plotted as contours. The results are presented in Figure 9.3, where the optimum tuning is Kc = 0.89 and 7> = 7.0. Again, the same qualitative behavior is obtained, with very large or small values of either constant giving poor control performance. In addition, the contours show the interaction between the variables; for example, nearly the same control performance can be achieved by gain and integral time values of (Kc = 0.6 and T§ = 4.5) and (Kc — 1.2 and 77 = 10), respectively. Again, the control performance is not too sensitive to the tuning values, as shown by the large region (valley) in which the performance changes by only about 10 percent. Finally, the evaluations identified a region in which the control system is not stable; that is, where the IAE becomes infinite. It is interesting that the region of good control performance—the lower valley in the contour plot—runs nearly parallel to the stability bound. This result will be used
273 Determining Good Tuning Constant Values
6 8 10 12 Controller integral time, Tt (minutes) FIGURE 9.3 Contours of controller performance, IAE, for values of controller gain and integral time.
TABLE 9.2 Summary of tuning study Integral Derivative G a i n , K c t i m e , T, t i m e , T d (%/%A) (min) (min) IAE+
Case
Objective
Optimize Kc Optimize Kc and T,
Goal 1 (IAE) 1.14 Goal 1 (IAE) 0.89
Optimize Kc, Than6Td Optimize Kc, T,, and Td
Goal 1 (IAE) 1.04
5.3
2.1
5.8
Goal
6.4
0.82
7.4* *■
13
0.88
10.0 (fixed) 0.0 (fixed) 7 . 0 0 . 0 ( fi x e d )
9.2 8.5
simultaneously +Evaluated for nominal model (without error) without noise. Process parameters were the gain Kp = 1.0%A/%, the time constant r = 5 minutes, and the dead time 0 = 5 minutes. •Greater than 5.8 because of additional goals 2 and 3.
in the next chapter, in which the stability of control systems is studied and tuning constant values are determined based on a margin from the stability bound. When three or more values are optimized, as is the case for a threemode controller, the results cannot be displayed graphically. One could take the same optimization procedure described for one and twovariable problems, which is simply to evaluate the IAE over a grid of tuning constant values and estimate the best values from the results or use a more sophisticated and efficient approach. The application of an optimization to the example process yields values of all three parameters that minimize IAE, and the values are reported in Table 9.2. This table summarizes the results with one, two, and all three constants being optimized; clearly, as more constants are free for adjustment, the IAE controller performance
•recommended
274 CHAPTER 9 PID Controller Tuning for Dynamic Performance
measure improves (i.e., decreases). Also, the optimum values for the controller gain and integral time change when we include the derivative time as an adjustable variable in the optimization. This result again demonstrates the interaction among the tuning constants. Minimizing the IAE is only the first of the three specified goals, which con siders the behavior of only the controlled variable and assumes perfect knowledge (model) of the process. This preliminary result does not provide the best control performance according to our specified goals; therefore, we must continue to refine the procedure to determine the best tuning constant values.
Goal 2: Good Control Performance with Model Errors To this point we have determined tuning constant values that minimize the IAE when the process dynamics are described exactly by the base case dynamic model. However, the model is never perfect, because of errors in the model identification procedure, as demonstrated in Chapter 6. Also, plant operating conditions, such as production rate, feed composition, and purity level, change, and because processes are nonlinear, these changes affect the dynamic behavior of the feedback process. The effect of changing operating conditions can be estimated by evaluating the linearized models at different conditions and determining the changes in gain, time constant, and dead time from their basecase values. Since the true process dynamic behavior changes, a useful tuning procedure should determine tuning constants that give good performance for a range of process dynamics about the base case or nominal model parameters, as required by the second control performance goal. When the tuning results in satisfactory performance for a reasonable range of process dynamics, the tuning is said to provide robustness.
In performing control and tuning analyses, the engineer must define the expected model error. The error estimate, usually expressed as ranges of parameters, can be based on the variation in plant operation and fundamental models from Chapters 3 through 5 or the results of several empirical model identifications using the methods in Chapter 6.
The size and type of model error is processspecific. For the purposes of devel oping correlations, the major source of variation in process dynamics is assumed to result from changes in the flow rate of the feed stream Fb in Figure 9.1 that cause ±25% changes in the parameters. While the range of parameters depends on the specific process, most processes experience parameter value changes of roughly this magnitude, and some have much larger variations. The resulting model pa rameters are given in Table 9.3; these values can be derived using the expressions already given relating the linearized model parameters to the process design and operation. Since in this example all parameters are proportional to the inverse of the feed flow, the parameters do not vary independently but in a correlated man ner as a result of changes in input variables. Such correlation among parameter variation is typical, because the major cause of variation in process dynamics is nonlinearity. Naturally, the functional relationship depends on the process and is not always as shown in the table.
TABLE 9.3
275
Model parameters for the threetank process Determining Good Tuning Constant Values
Low flow, Base case High flow, Model parameters / = 1 flow, / = 2 / = 3 KP
e z
1.25 6.25 6.25
1.0 5.0 5.0
0.75 3.75 3.75
The goal is to provide good control performance for this range, and one way to consider the variability in dynamics is to modify the objective function to be the sum of the IAE for the three cases, which include the base case and the extremes of low and high flow rates in Table 9.3. The objective is stated as follows: Minimize
EIAE<
(9.5)
i=i
by adjusting
Kc, Ti, Td
IAE, = r SP(0CV,(/)o7 Jo where CVt(t) is calculated using process parameters for i = 1 to 3 in Table 9.3. This modification is very important, because tuning constants that yield good performance for the nominal model may give poor performance or even result in instability as the true process parameters vary. Next, the third goal is discussed; afterward, the tuning constants satisfying all three goals are determined. Goal 3: ManipulatedVariable Behavior The third and final goal addresses the dynamic behavior of the manipulated vari able by requiring it to observe a limitation. As previously discussed, its variation should not be too great, because of wear to control and process equipment and disturbances to integrated units. There are many ways to define the variation of the manipulated variable. Here we will bound the allowed transient path of the manip ulated variable to a specified region around the final steadystate value during the dynamic response as shown in Figure 9.4. This rather general limitation enables us to address two related issues in manipulatedvariable variation: 1. The largestmagnitude variation in the manipulated variable in response to a disturbance or set point change 2. The highfrequency variation resulting from the small, continuous changes in the controlled variable often referred to as noise The allowable manipulatedvariable range is large during the initial part of the transient, where, in general, the manipulated variable should be able to overshoot its final value. The range is smaller after the effect of the step disturbance is corrected.
276 CHAPTER9 PID Controller Tuning for Dynamic Performance
o U
i
1
r
Average final value
Bound on manipulated variable l
l
L
FIGURE 9.4
Dynamic response of a feedback control system showing the bound on allowable manipulatedvariable adjustments. Even after a long time, the manipulated variable cannot be required to be absolutely constant, because feedback control responds to the small, continuous changes in the controlled variable (i.e., the noise). The limitation on the manipulated variable is determined by parameters that define the bound shown in Figure 9.4. Simulations to evaluate a tuning for goals 1 through 3 include representative noise on the measured, controlled variable and a bound on the manipulated variable. A model for defining the bound on the path, along with parameters used in this book, is presented in Appendix E. The proper values of the parameters used to define the allowed manipulated variable behavior should match the process application. The values in this study are good initial estimates for many process control designs. However, the specific parameter values are not the key concept in this goal statement; what is most important is this:
A properly denned statement of control performance includes a specification of acceptable manipulatedvariable behavior.
Since both controlled and manipulatedvariable plots of behaviors are important, most closedloop transient responses in this book show both the controlled and manipulated variables; in general, it is not possible to evaluate control performance by observing only the controlled variable. The controller constants in the example mixing process are optimized for the complete definition, and the results are Kc = 0.88, 77 = 6.4, and Td — 0.82. The dynamic response is given in Figure 9.4 for the nominal plant response. (Recall
that three dynamic responses, including model error, were considered concurrently in determining the optimum.) These tuning parameters satisfy goals 1 through 3 in our control performance definition. Note that compared to the results reported in Table 9.2, which satisfy only goal 1, the values satisfying all three goals have a lower gain, longer integral time, and shorter derivative time. Thus:
277 Determining Good Tuning Constant Values
The controller is detuned, leading to less aggressive adjustments by the feedback controller, to account for modelling errors and to reduce the variation in the manip ulated variable.
These tuning constants will not perform best when the model error is zero and no noise is present, but they will perform better over an expected range of conditions and are the values recommended for initial application. EXAMPLE 9.1. A modified process in Figure 9.1, with a shorter pipe and larger tank described by the nominal model in equation (9.6), is to be controlled by a PID controller. Determine the best initial tuning constant values for a PID controller based on (a) goal 1 alone and ib) goals 1 through 3. Gpis) =
Gvis)G'pis)Gsis)
1
Gds) = 8.S + 1
3
\.0e I s
do
8s+ 1
with Dis) = s
(9.6)
h»FA
Gds) = KC\ Eis) + ^1Tds CVis) Tis
The mathematical optimization must be performed for the two cases. The re sults of the analysis are given in Table 9.4. The results are similar to the example discussed previously in that the controller gain is decreased, the integral time is increased, and the derivative time is decreased—in this example to zero—as the additional goals are added. The net effect of adding goals 2 and 3 is that total deviation of the controlled variable from its set point (IAE) is larger than that achieved for the nominal process without modelling error. However, the perfor mance indicated by the more comprehensive measure, considering all cases and behavior of both the controlled and manipulated variables, is the best possible TABLE 9.4 Results for Example 9.1
Case
Controller Integral Derivative gain, Kc time, T, time, Td
(a) Performance, goal 1 alone 3.0 ib) Performance, goals 13 1.8 Evaluated for nominal model (without error) without noise.
3.7 5.2
1.1 0.0
IAE
1.46 2.95
■recommended
©
278 CHAPTER 9 PID Controller Tuning for Dynamic Performance
with a PID control algorithm. Thus, the tuning from case (b) is more robust, as will be demonstrated in Example 9.5.
Again we see that there is interaction among the tuning constants. As demon strated for a simple process in Example 8.5, each tuning constant affects many control performance measures, such as decay ratio and overshoot. Therefore, all tuning constants should be determined simultaneously to obtain the best possible performance within the capability of the PID algorithm. In conclusion, a very general method has been presented in this section for evaluating controller tuning constants. The method can be applied to any process model and controller algorithm and was applied to the linear, firstorderwithdeadtime process and PID controller in this section. The method addresses most control performance issues in a flexible manner, so that the engineer can adapt it to most circumstances by changing a few parameters in the control objective definition, such as the magnitude of the model errors or the allowable variability of the manipulated variable. However, an optimization must be performed for each individual problem, which could be very timeconsuming. Thus, the next section describes how controller tuning can be performed quickly in many situations using correlations developed with the optimization procedure.
9.4 n CORRELATIONS FOR TUNING CONSTANTS The purpose of tuning correlations is to enable the engineer to calculate tuning constants for many process applications that simultaneously achieve the three goals defined in Section 9.2 without performing the optimization. Correlations for tuning constants will reduce the engineering effort in controller tuning, and, perhaps more importantly, the correlations will show how the controller constants depend on feedback process dynamics. For the correlations developed in this sec tion, the tuning goals will be those defined in Table 9.1 and used in the previous example: 1. Minimize IAE 2. ±25% (correlated) change in the process model parameters 3. Limits on the variation of the manipulated variable The correlation should provide values for Kc, 7>, and Td based on values in a process dynamic model. The general approach is to select a model structure and determine the dimensionless parameters that define the closedloop dynamic response. To provide simple, yet general correlations, the process model must have a small number of parameters. Modelling examples in Chapter 6 demon strated that many processes can be represented by a firstorderwithdeadtime transfer function; therefore, this model structure is used in developing the tuning correlations: ,es
Gds)G'p(s)Gs(s)
Gp(s) = \ + xs
(9.7)
Since the control response is determined by the closedloop transfer function, the form of the correlation is determined from this transfer function:
CVis) Gdis) Dis) 1 + Gc(s)Gp(s)
Gdis)
1 + ^(1 + t^ + ^)(^TT^)
(9.8)
Every process responds with a different "speed," which can be characterized by the time for a step response to achieve 63 percent of its final value. For a firstorderwithdeadtime process, this time is (9 + z). Dividing the time by this value "scales" all processes to the same speed, so that one set of general correlations can be developed. The relationships are t' =
t
s—
e + x e + z
(9.9)
Substituting the modified Laplace variable for the timescaled equation gives CV(s') Dis*)
Gd(s')
.0
1 + KCKB 1 +
1 + Tds' \ ( ees''(e+r) T,s'/iO + x) 9 + z J \ \+XS'/(9 + x) (9.10)
The resulting equation has one parameter that characterizes the feedback process dynamics, 6/(6 + z), which we shall term the fraction dead time.
This parameter indicates what fraction of the total time needed for the openloop process step response to reach 63 percent of its final value is due to the dead time; it has values from 0.0 to 1.0. For example, the base case process data for Figure 9.1 had 9 = 5 and z = 5; thus, the fraction dead time was 0.5. Note that z/(9 + z) is not independent, because z/(9 + z) = 1 — 9/(9 + z). Analysis of equation (9.10) also demonstrates that the controller tuning con stants and process dynamic model parameters appear in the following dimension less forms: Gain = KcKp Integral time = Tj/(9 + x) Derivative time = Td/(9 + x)
(9.11)
These relationships are consistent with a commonsense interpretation of the feed back controller relationships. The dimensionless gain involves the magnitude of the change in the manipulated variable to correct for an error and should be related to the process gain. Also, proportional mode has no time dependence. The dimen sionless integral time and derivative times involve the timedependent behavior of the controlled variable and should be related to the dynamics or "time scale" of the process. The disturbance model is assumed to be the same as the feedback process model; that is, Gdis) = Gpis). Noise is assumed to be present in the controlled
279 Correlations for Tuning Constants
280 CHAPTER 9 PID Controller Tuning for Dynamic Performance
variable, as discussed in Section 9.3 and defined in Appendix E. The resulting transfer function has only one parameter that is entirely a function of the process [i.e., the fraction dead time 9/(9 + r)]; the tuning constants, expressed in the dimensionless forms in equation (9.11), also influence the dynamic performance. For the control objectives and process model (with error estimate) defined in Table 9.1, the tuning correlations are developed by (1) selecting various values of the fraction dead time in its possible range of 0 to 1 and (2) optimizing the control performance for each value by adjusting the dimensionless tuning constants. The results for the disturbance response are plotted in Figure 9.5a through c. The correlations indicate that a high controller gain is appropriate when the process has a small fraction dead time and that the controller gain generally decreases as the fraction dead time increases. This makes sense, because processes with longer dead times are more difficult to control; thus, the controller must be detuned. The dimensionless derivative time is zero for small fraction dead time and increases for longer dead times to compensate for the lower controller gain. The dimensionless integral time remains in a small range as the fraction dead time increases. The same procedure can be performed for the other major input forcing: set point changes. All of the assumptions and equation simplifications are the same, and the set point is assumed to change in a step. The resulting correlations are pre sented in Figure 9.5d through/ The tuning constants have the same general trends as the fraction dead time increases. The selection of whether to use the disturbance or set point correlations depends on the dominant input variation experienced by the control system. The range of model errors, ±25 percent, is reasonable when all parameters are significantly different from zero. However, when this percentage error is used, a very small dynamic parameter would also have a very small associated error, which may not be realistic. Because an underestimation of the error would generally lead to a controller that is too aggressive, and because the controller for 9/ (9+x) = 0.10 is already quite aggressive, the tuning correlations are not extended lower than 0.10, and the recommended tuning constant values are shown by the lines maintaining the constant values for 9/(9 + x) from 0.10 to 0. These values can be improved through finetuning, if required, as described later in this chapter. The tuning correlations presented in this section were developed by Ciancone and Marlin (1992) and will be referred to subsequently as the Ciancone correla tions. The controller tuning method using the Ciancone correlations consists of the following steps:
1. Ensure that the performance goals and assumptions are appropriate. 2. Determine the dynamic model using an empirical method (e.g., the process reaction curve), giving Kp, 6, and z. 3. Calculate the fraction dead time, 6/(6 + r). 4. Select the appropriate correlation, disturbance, or set point; use the disturbance if not sure. 5. Determine the dimensionless tuning values from the graphs for KcKp,
Ti/(6+z),tov\Td/(6 + z).
6. Calculate the dimensional controller tuning, e.g., Kc = (KCKP)/KP. 7. Implement and finetune as required (see Section 9.5).
281 Correlations for Tuning Constants
£
10 .20 .30 .40 .50 .60 .70 .80 .90 1.0
.10 .20 .30 .40 .50 .60 .70 .80 .90 1.0
Fraction dead time (jrzi)
Fraction dead time (/rr;)
ia)
id)
10 .20 .30 .40 .50 .60 .70 .80 .90 1.0
10 .20 .30 .40 .50 .60 .70 .80 .90 1.0
Fraction dead time (svz)
Fraction dead time (or;)
ib)
ie)
.10 .20 .30 .40 .50 .60 .70 .80 .90 1.0
0 .10 .20 .30 .40 .50 .60 .70 .80 .90 1.0
Fraction dead time (75+^)
Fraction dead time (arz.)
ic)
(/) FIGURE 9.5
Ciancone correlations for dimensionless tuning constants, PID algorithm. For disturbance response: ia) control system gain, ib) integral time, ic) derivative time. For set point response: id) gain, (e) integral time, if) derivative time.
282
The reader should recall the likely accuracy in the dynamic model when tuning a PID controller. The gain, time constant, and dead time from empirical identification have significant errors (20 percent is not uncommon); therefore, precise values from the correlations are not required, because small errors in reading the plot are insignificant when compared with the modelling errors. The use of the correlations is demonstrated in the following examples.
CHAPTER 9 PID Controller Tuning for Dynamic Performance
J
VA0
*
& &■
VA1 lA2 A3 AC)
EXAMPLE 9.2. Determine the tuning constants for a feedback PID controller applied to the threetank mixing process for a disturbance response (step in xAB) using the Ciancone tuning correlations. The first step is to fit a firstorderwithdeadtime model to the process, which was done using the process reaction curve method in Example 6.4. The results were Kp = 0.039 %A/% valve opening; 6 = 5.5 min; and z = 10.5 min. Then, the independent parameter is calculated as 6/i&+z) = 0.34. The dependent variables are determined from Figure 9.5a through c, and subsequent tuning constants are calculated as follows: KcKp = 1.2 77/(0+ r)= 0.69 Td/(0 + z) = 0.05
Kc = 1.2/.039 = 30% open/%A 77= 0.69(16) = 11 min Td= 0.05(16) =0.8 min
The dynamic response of the feedback system to a step feed composition disturbance of magnitude 0.80%A occurring at time = 20 is given in Figure 9.6, which results in an IAE of 7.4. The dynamic response is "well behaved"; that is, the
100 120 Time
180 200
0 20 40 60 80 100 120 140 160 180 200 Time FIGURE 9.6 Dynamic response of threetank process and PID controller with tuning from Example 9.2.
controlled variable returns to its set point reasonably quickly without excessive os cillations, and the manipulated variable does not experience excessive variation.
283 Correlations for Tuning Constants
The result in Example 9.2 shows that the correlations, which were developed for firstorderwithdeadtime plants, provide reasonable tuning for plants with other structures as long as the feedback process dynamics can be approximated well with a firstorderwithdeadtime model. Recall that overdamped processes with monotonic Sshaped step responses are well represented by firstorderwithdeadtime models.
EXAMPLE 9.3. When developing the correlations, the assumption was made that the disturbance transfer function was the same as the process feedback transfer function. Evaluate the tuning correlations for the same threetank system considered in Example 9.2 with a different disturbance time constant. Original disturbance transfer function: GAs) =
(55 + l)3 Altered disturbance transfer function: 1 Gds) = i5s + \) The altered transfer function would occur if the disturbance entered in the last tank of the three. The resulting transient of the system under closedloop control is plotted in Figure 9.7. As would be expected, the response is different, with the faster disturbance resulting in poorer control with respect to the maximum devi ation and IAE, which increased to 8.3. The slightly poorer control performance is the result of a more difficult process, due to the faster disturbance, being con trolled. Note that the correlation tuning constants give reasonably good, although not "optimal," performance even when the disturbance transfer function differs significantly from the feedback transfer function.
EXAMPLE 9.4. The correlations have been developed assuming that the process is linear, and it has accounted for changes in the process dynamics through the range of model error considered. In this example a process is considered in which the nonlinearities influence the dynamics during the transient response. The threetank mixer described in Example 7.2 is nonlinear if the flow of stream B changes, as seen by the fact that the time constants and gain in the linearized model depend on FB. Determine the tuning and dynamic response for the situation in which FB changes from its base value of 6.9 m3/min to 5.2 m3/min and returns to its base value. The tuning for the initial condition has been determined in Example 9.2. Before evaluating the dynamic response, it is worthwhile determining the change in the process dynamics resulting from the change in FB, which is summarized here for the models linearized about the base and disturbed steady states:
lA0
&T f a
lAl
t*r
*A2
1
lA3
0
284 CHAPTER 9 PID Controller Tuning for Dynamic Performance
§3.5 e o U
FIGURE 9.7 Dynamic response of threetank mixing process with faster disturbance dynamics from Example 9.3.
Parameter
Dependence on process
Time constant, z (min) Steadystate gain, KP (%A/% open)
V/(FB + FA) Kv[(xA)A  (xA)B]FB/(FB + FA)2
Base case Disturbed case value [FB = 6.9) value [FB = 5.2) 5.0 0.039
6.6 0.051
The process model changes during the transient, and it would be proper to correct the tuning. However, it is not possible to change the tuning for all distur bances, many of which are not measured; thus, the base case tuning is used during the entire transient in this example. The results are plotted in Figure 9.8. Note that the first transient in response to a decrease in flow experiences rather oscillatory behavior; this is because the process dynamics are slower because of the change in operations, and consequently the tuning is too aggressive. When returning to the base case, the tuning is only slightly underdamped, because the conditions are close to the dynamics for which the tuning constants were determined. Even for this significant change in process dynamics, the PID algorithm with tuning from the Ciancone correlations provides acceptable performance. Thus, the system is robust to disturbances of the magnitude considered in this example. However, larger changes in process operation would result in larger model variation and could seriously degrade performance or even cause instability. One method for maintaining good control performance when large changes in dynamics occur is
to continually recalculate the tuning constant values based on measured distur bances. This method is explained in Section 16.3.
285 Correlations for Tuning Constants
simMsssiss^s^
The results of the tuning studies lead to two important observations concerning the effects of process dynamics on tuning. First, the controller should be detuned; that is, the feedback adjustments should be reduced as the fraction dead time of the feedback process increases. Thus, we conclude that dead time in the feedback loop results in reduced or slower feedback adjustments and, presumably, poorer control. Theoretical justification for this result is presented in Chapter 10, and the effect on feedback performance is confirmed in Chapter 13. The second observation is that two models, the feedback process Gp(s) and the disturbance process Gd(s), both affect the tuning; this is determined by com paring the results for a process disturbance, which enters through a firstorder time constant, with those for a set point change, which is a perfect step. However, the major influence on tuning is normally from the feedback dynamics, and again, theoretical justification for this result will be presented in the next chapter. Other studies by Hill et al. (1987) showed that the tuning is insensitive to the disturbance time constant when Zd > r; thus, the differences between Figure 9.5a through c and 9.5d through/ typically represent the maximum change in tuning in response to different disturbance types. In many control applications the derivative mode is not employed. This is the case if the measurement signal has considerable noise. Also, the tuning correlations demonstrate that the derivative time is very small when the fraction dead time is small. Thus, tuning correlations for a proportionalintegral (PI) controller are provided in Figure 9.9a and b for a disturbance and set point responses. Note that it would not be correct to use the PID values and simply set the derivative time Td to zero, because of the interaction between the tuning constant values, although the correlations in Figure 9.9 are close to those in Figure 9.5 because of the small values of the derivative time in Figure 9.5. The tuning correlations presented in Figures 9.5 and 9.9 depend on the goals specified for the control performance. It is interesting to compare the results to a different set of goals. One of the earlier studies using an optimization procedure was performed by Lopez etal. (1969). In their study the goal was simply to minimize the IAE (our goal 1), without concern for potential variation in feedback dynamics or limitations on manipulatedvariable transient behavior. Their results are presented in Figure 9.10a and b and are applied in the following example.
Controlled variable T
Manipulated variable T
Disturbance
400 EXAMPLE 9.5. The altered mixing process in Figure 9.1, with the transfer function given below, is to be controlled with a PI controller. Calculate the tuning constants according to correlations in Figure 9.9a and b and 9.10 using the nominal model given below. Calculate the transient responses to a step disturbance of 2%A in feed composition at time = 7 for (a) the nominal feedback process and ib) an altered plant as defined below. Note that the nominal and actual plants have the same steadystate gain and "speed of response," as measured by the time to reach 63 percent of their steadystate value to a step change input; they differ only in their fraction dead time.
FIGURE 9.8 Dynamic response for Example 9.4 in which the feedback dynamics change due to the disturbance.
286 CHAPTER 9 PID Controller Tuning for Dynamic Performance
0.10
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
0.10
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
Fraction dead time \g+T)
Fraction dead time \a+t)
ia)
ic)
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
Fraction dead time \g+t)
Fraction dead time \q+t)
ib)
id)
FIGURE 9.9 Ciancone correlations for dimensionless tuning constants, PI algorithm. For disturbance response: ia) controller gain and ib) controller integral time. For set point response: ic) controller gain and id) controller integral time.
Nominal plant: 2.0*?2* 8j + 1 1.0 Gds) 8s+ 1 6 + z = 10 6 = 0.2 6+z Gpis)
b do
©
Pb»Fa
Altered plant: 2.0e  3 j
GPis) = ls + \
1.0 ls + \ 0 + r = lO 6 = 0.3 Gdis) =
6+z
287
10.00 n
Correlations for Tuning Constants
0.10 0.00 0.10 0.20 0.30 0.40 0.50 Fraction dead time (jjrrz)
0.60
ia)
0.00 0.00 0.10 0.20 0.30 0.40 0.50 0.60 Fraction dead time {irrz) ib)
FIGURE 9.10 Lopez et al. (1969) tuning correlations for minimizing the IAE for a PI controller in response to a disturbance.
The tuning constant values can be calculated for each correlation from the charts using the nominal model as
Ciancone Lopez Kc T,
0.9 5.2
1.5 6.0
%open/%A min
The closedloop dynamic responses are given in Figure 9.11a through d, and the control performance measure of IAE is summarized as
288
Ciancone
0 o 1
1 0.5
CHAPTER 9 PID Controller Tuning for Dynamic Performance
§ c 0
Lopez t 1
A
■ ■ ■ ■ 10 20 30 40 50 60 70 80 90 100 Time
U 0.5 c o
10 20 30 40 50 60 70 80 90 100 Time i
1
r
c
8 . 0 o
r
3 0.5
§ 05 !»
\
r>^
> 1.5
0 10 20 30 40 50 60 70 80 90 100 Time ia)
10 20 30 40 50 60 70 80 90 100 Time
ic)
Ciancone
Lopez
.8 • C 0 . 5
8 o 0
_/ \ A A /\ >^w^^ 
w \y \s v/^^^—
O 0.5
0 10 20 30 40 50 60 70 80 90 100
10 20 30 40 50 60 70 80 90 100 Time
Time
o
8.
0 10 20 30 40 50 60 70 80 90 100 Time
u > 73 >
10 20 30 40 50 60 70 80 90 100 Time
ib)
id)
FIGURE 9.11 Dynamic responses of deviation variables. With Ciancone tuning: (a) nominal plant, ib) altered plant With Lopez tuning: (c) nominal plant, id) altered plant.
Ciancone Lopez IAE for nominal plant 5.9 IAE for altered plant 7.6
4.0 14.54
■Ciancone gives robustness to model errors
These results should be anticipated from the control objectives used to derive the correlations. The Lopez correlation minimized IAE without consideration for model error. Thus, it performs best when the plant model is known perfectly, but it is unacceptably oscillatory and tends toward instability for even the modest model error considered in this example. The Ciancone correlations determined the tuning to perform well over a range of process dynamics; thus, the performance does not degrade as rapidly with model error.
The results of this section show that simple PID tuning correlations can be developed for processes that can be approximated by a firstorderwithdeadtime model. Selection of the proper correlation depends on the control performance goals. If the situation indicates that very accurate knowledge of the process is available and there is no concern for the manipulatedvariable variation, the best performance (i.e., lowest IAE of the controlled variable with PI feedback) is ob tained using the Lopez correlations; however, the control system with these tuning constants will not perform well if the process model has significant error or if the measurement has significant noise. As the control performance goals are defined more realistically for typical plant situations, the resulting tuning allows for more modelling error and for some limitation on the manipulatedvariable variation, and the resulting correlations have a broader range of good performance. This is an important factor for control systems that function continuously for months or years as plant conditions change. Thus, the Ciancone correlations are recommended here as a starting point for most control systems.
1\ming correlations have been developed as a function of fraction dead time for a PID controller, a firstorderwithdeadtime process, and typical control objectives. These are recommended for obtaining initial tuning constant values when the plant situation matches the factors in Table 9.1.
It is important to recognize that no claim is made for optimality in the real world, although an optimization method was used to determine the solution to the math ematical problem. The Ciancone correlations simply used a realistic definition of control performance to determine tuning. Also, while examples have shown that the correlations are valid for different disturbance model parameters and model errors, extrapolation beyond the defined conditions of the correlation (Table 9.1) must be done with care.
9.5 a FINETUNING THE CONTROLLER TUNING CONSTANTS The tuning constants calculated according to any method—optimization, correla tions, or the stability analysis in the next chapter—should be considered to be initial values. These values can be applied to the process to obtain empirical information on closedloop performance and modified until acceptable control performance is obtained. Determining modifications based on initial dynamic responses, often termed finetuning, is necessary because of errors in the base case process model and simplifications in the tuning method. A finetuning method is described here for a process being controlled by a PI control algorithm. This method is easy to perform and gives additional insight into the way the controller modes combine when controlling a process. After the initial tuning constants have been calculated and entered into the algorithm, the controller's status switch can be placed in the automatic position to allow the controller to perform its calculation and adjust the final element. Then, the response to a set point change is diagnosed to determine whether the tuning is satisfactory. A set point change is considered here because
289 FineTuning the Controller Tuning Constants
290 CHAPTER9 PID Controller Tuning for Dynamic Performance
1. It can be introduced when the diagnosis is performed. 2. A simple timedependent input disturbance—a step—is easy to achieve. 3. The magnitude can be selected by the engineer. 4. The effects of the proportional and integral mode calculations can be separated, which greatly simplifies the diagnosis of the controller behavior. The step response of a control system with a welltuned PI controller is given in Figure 9.12. The first important feature is the immediate change in the manipulated variable when the set point is changed. This is due to the proportional mode and is equal to KcAEit), which is equal to Kc ASP(f). This initial change is typically 50 to 150 percent of the change at the final steady state. The second feature is the delay, due to the dead time, between when the set point is changed and when the controlled variable initially responds. No controller can reduce this delay to be less than the dead time. During the delay the error is constant, so that the proportional term does not change, and the magnitude of the integral term increases linearly in proportion to KcEit)/Tj. When the controlled variable begins to respond, the proportional term decreases, while the integral term continues to increase. At the end of the transient response the proportional term, being proportional to error, is zero, and the integral term has adjusted the manipulated variable to a value that reduces offset to zero. The value of this interpretation can be seen when an improperly tuned con troller, giving the response in Figure 9.13, is considered. The control response seems slow, resulting in a large IAE and a long time to return to the set point. Analysis of the transient indicates that the initial change in the manipulated vari able when the set point is changed, termed the proportional "kick," is only about 30 percent of the final value, which indicates too small a value for the controller gain. The conclusion for the diagnosis is that the control system performance can be improved by increasing the controller gain, most likely in several moderate steps, with a plant test at each step to monitor the results of the changes. The
Time
FIGURE 9.12 Typical set point response of a welltuned PI control system.
291 FineTuning the Controller Tuning Constants
Time FIGURE 9.13 Example of a dynamic response of a PI control system with the controller gain too small.
Time FIGURE 9.14 Dynamic response of the control system in Example 9.6.
substantially improved performance of the control system with the controller gain increased by a factor of 2.5 is shown in Figure 9.12. EXAMPLE 9.6. A PI controller was not providing acceptable control performance. Preliminary analysis indicated that the sensor and control valve were functioning properly, so a step change was introduced to its set point. The response is given in Figure 9.14. Diagnose the performance, and suggest corrective action. Solution. The transient response is highly oscillatory, indicating a controller that is too aggressive. The cause could be too large a controller gain, too short an in tegral time, or both. The immediate proportional change is only about 70 percent of the final change in the manipulated variable; therefore, the controller gain is in a
292
reasonable range, is certainly not too large, and should not cause oscillatory be havior. The conclusion is that the integral time is too short. The transient response with double the integral time is that shown in Figure 9.12, confirming that reason ably good control performance can be achieved by changing only the integral time.
CHAPTER 9 PID Controller Tuning for Dynamic Performance
VA0
15i*r i*r# lA2
EXAMPLE 9.7. The threetank mixing control system has been tuned initially, and the system's dynamic response to a set point change is given in Figure 9.15a. Note that the measured concentration experiences many small disturbances because of chang ing inlet concentrations and flows in the process as well as measurement error. This noisy data more closely represents empirical data from process plants than do the ideal simulations in Figures 9.12 through 9.14. The control objectives have two unique aspects in this example, which are different from the general objectives considered so far but are not unusual in the process industries. 1. The downstream process is sensitive to oscillations in the concentration. Therefore, the controlled concentration should not experience overshoot. 2. The plant that supplies component A functions better with a smooth opera tion. Therefore, highfrequency variation in the manipulated variable is to be minimized. The initial tuning constants are Kc = 45% opening/%A, Ti = 11.0 minutes, and TD = 0.8 minute. Suggest changes to the tuning constant values that will improve the performance. Solution. The large, highfrequency variation in the manipulated variable is caused to a large extent by the noisy measurement and the derivative mode. Therefore, the first suggestion would be to reduce the derivative time to zero. Next, the controlled variable overshoots its set point, which can be prevented by making the controller feedback action less aggressive. Reducing the controller gain will slow the response and also slightly reduce the highfrequency variation of the ma nipulated variable, both desirable effects. The resulting tuning constants, which could be arrived at after several trials, are Kc = 15, Tt = 11, and Td = 0.A much more satisfactory dynamic response—that is, one that more closely satisfies the stated objectives for this example—was obtained with these tuning constants, as shown in Figure 9.15£>. Note that the much smoother performance was achieved with only a small increase in IAE, which changed from 11.6 to 12.9.
These finetuning examples demonstrate that
Analysis of the responses of the controlled and manipulated variables to a step change in the set point provides valuable diagnostic information on the causes of good and poor control performance, allowing the performance to be tailored to unique control objectives;
293 Conclusions
200
4.0
i
1
J
L
1
r
J
L 200
Time ib) FIGURE 9.15
Dynamic responses of feedback control system in Example 9.7: ia) initial (IAE = 11.6); ib) after finetuning (IAE = 12.9). Again, we see that both the controlled and manipulated variables must be observed when analyzing the performance of feedback control systems; complete diagnosis is not possible without information on both variables.
9.6 m CONCLUSIONS The starting point for feedback control consists of the control objectives, here specified as three goals. These goals encompass the major factors in process control performance; the specific parameters used (e.g., percent model error and limits on manipulatedvariable variation) can be selected to match a specific problem.
294 CHAPTER 9 PID Controller Tuning for Dynamic Performance
Control performance must be defined with respect to all important plant operating goals. In particular, desired behavior of the controlled and manipulated variables must be defined for expected disturbances, model errors, and noisy measurements.
A simple variable reduction of the closedloop transfer function, based on dimen sional analysis, can be employed in extending the optimization to general tuning correlations. These correlations are applicable only to those systems for which the underlying assumptions are valid: The process should be well represented by a firstorderwithdeadtime model, the model errors should be in the assumed range, and the desired controlled and manipulated behavior should be similar to the ob jectives stated in Table 9.1. Examples have demonstrated that the process does not have to be perfectly firstorder with dead time to achieve acceptable dynamic responses using the tuning correlations. A threestep tuning procedure would combine methods in previous chapters with methods in this chapter. The first step would be to determine the feedback process model G''Js)Gvis)Gsis) by fundamental modelling or empirical mod elling, using either the process reaction curve or a statistical identification method. Industrial controls are most often based on empirical models. In the second step, the initial tuning constant values would be determined; typically the values would be determined from the general correlations, but an optimization calculation could be performed for processes that are not adequately modelled by a firstorderwithdeadtime model. The third step involves a test of the closedloop control system and finetuning, if necessary. The set point step change provides separate informa tion on the proportional and integral modes to facilitate diagnosis and corrective action.
The dynamic behavior of both the controlled and the manipulated variables is re quired for evaluating the performance of a feedback control system.
The reader should clearly recognize the meaning of the term optimum. It is used here to mean results (i.e., tuning constant values) that are determined so that certain mathematical criteria are satisfied. The criteria are goals 1 to 3. Naturally, the relationships in Table 9.1 were selected to represent the true control situation closely for the majority of cases. However, control performance has many facets, from safety through profit; therefore, it is sometimes difficult to condense all of the critical factors into one measure of control performance. Even if the mathematical objectives successfully represent the true desired performance, the results will be satisfactory only when the parameters in the mathematical formulation specify the desired behavior. These parameters, such as the controlledvariable measurement noise, the expected plant model error, and the allowable manipulatedvariable variation, are never known exactly. Therefore, although the mathematical solution is "optimum," the usefulness of the results depends on the accuracy of the input data.
Practically, the values from the optimization or correlations are used as initial values to be applied to the physical system and improved based on empirical performance during fine tuning. Remember, when tuning a feedback controller, where you start is not as important as where you finish!
Finally, the three tuning constants in the PID algorithm all influence the dynamic behavior of the closedloop system. They must be determined simultaneously, because of this interaction. It should be apparent that the tuning approach using optimization is not limited to PID controllers; if another algorithm were suggested, its parameters could be op timized by the same procedure. In fact, some results for other feedback controllers are presented in Chapter 19. The techniques in this chapter provide practical methods for controller tuning that are applicable to many processes. However, they do not provide important explanations to key questions such as 1. Why do the tuning correlations have the shapes in Figure 9.5? 2. Why can a control system become unstable, and how can we predict when this will occur? 3. How does the controller change the dynamic behavior of an openloop system to that of a closedloop system? Methods for answering these more fundamental questions are addressed in the next chapter.
REFERENCES Ciancone, R., and T. Marlin, 'Tune Controllers to Meet Plant Objectives," Control, 5, 5057(1992). Edgar, T, and D. Himmelblau, Optimization of Chemical Processes, McGrawHill, 1988. Fertik, H., "Tuning Controllers for Noisy Processes," ISA Trans., 14, 4, 292304(1975). Hill, A., S. Kosinari, and B. Venkateshwa, "Effect of Disturbance Dynamics on Optimal Tuning," Instrumentation in the Chemical and Petroleum In dustries, Vol. 19, Instrument Society of America, Research Triangle Park, NC, 8997 (1987). Lopez, A., P. Murrill, and C. Smith, "Tuning PI and PID Digital Controllers," Instr. and Contr. Systems, 42, 8995 (Feb. 1969). Zumwalt, R., EXXON Process Control Professors' Workshop, Florham Park, NJ, 1981.
295 References
296 CHAPTER 9 PID Controller Tuning for Dynamic Performance
ADDITIONAL RESOURCES Other common forms of the PID control algorithm and conversions of tuning constants for these forms are given in Witt, S., and R. Waggoner, "Tuning Parameters for NonPID Three Mode Controllers," Hydro. Proc, 69, 7478 (June 1990). Analytical solutions for optimal tuning constant values for PID controllers can be obtained for some continuous control systems, specifically those involving processes without dead time. They can also be obtained for digital controllers for processes with dead time. References for analytical methods are given below; however, since such solutions are possible only with intensive analytical effort for limited control performance specifications, numerical methods are used in this chapter. Jury, E., SampleData Control Systems (2nd ed.), Krieger, 1979. Newton, G., L. Gould, and J. Kaiser, Analytical Design of Linear Feedback Controls, Wiley, New York, 1957. Stephanopoulos, G., "Optimization of ClosedLoop Responses," in Edgar, T. (ed.), AIChE Modular Instruction Series, Vol. 2, Module A2.5, 2638 (1981). Background on mathematical principles and numerical methods of optimiza tion can be obtained from many reference books, for example: Reklaitis, G., A. Ravindran, and K. Ragsdell, Engineering Optimization, Meth ods and Applications, Wiley, New York, 1983. Many other studies have been performed on optimizing timedomain control system performance, for example: Bortolotto, G., A. Desages, and J. Romagnoli, "Automatic Tuning of PID Controllers through Response Optimization over FiniteTime Horizon," Chem. Engr. Comm., 86, 1729 (1989). Gerry, J., "Tuning Process Controllers Starts in Manual," InTech, 125126 (May 1999). The diagnostic finetuning method described in this chapter is limited to step changes in the controller set point. A powerful method for diagnosing feedback controller performance is based on statistical properties of the controlled and ma nipulated variables. The method, which establishes the approach to best possible control and identifies reasons for poor performance, is given in Desborough, L., and T. Harris, "Performance Assessment for Univariate Feed back Control," Can. J. Chem. Engr., 70, 11861197 (1992). Harris, T., "Assessment of Control Loop Performance," Can. J. Chem. Engr., 67, 856861 (1989). Stanfelj, N., T. Marlin, and J. MacGregor, "Monitoring and Diagnosing Con trol System Performance—SISO Case," IEC Res., 32, 301314 (1993).
An alternative method of finetuning is based on shapes or patterns of response to disturbances. Good and poor responses are identified, and tuning constants are altered accordingly. This method has been applied in an automatic tuning system. For an introduction, see Kraus, T., and T. Myron, "SelfTuning PID Controller Uses Pattern Recogni tion Approach," Control Eng., 31, 106111 (June 1984). The derivative mode can substantially improve the performance of control loops involving processes that are underdamped or unstable without control. For underdamped systems, see question 8.17. For openloop unstable processes, see Cheung, T., and W. Luyben, "PD Control Improves Reactor Stability," Hydro. Proc, 58, 215218 (September 1979). These questions reinforce the key aspects of dynamic behavior that are considered in defining control performance and how the performance goals and process dynamics influence the controller tuning.
QUESTIONS 9.1. Given the results of the process reaction curve in Figure Q9.1, calculate the PI and PID tuning constants. The process was initially at steady state, and the manipulated variable was changed in a step at time = 0 by +1%. 1.50
l.oo 
0.50 
0.00
0.50
0.00 10
40 50 60 Time, t FIGURE Q9.1
9.2. Suppose that control goals different from those in Table 9.1 are specified for the tuning correlations. Predict the effect on the tuning constant values— that is, whether each would increase or decrease from the correlation values from Figure 9.5—for each set of goals.
298
id) The only goal is to minimize the IAE for the base case model. ib) The goals are to minimize IAE for ±25% change in model parameters, without concern for the manipulatedvariable variation, (c) The goals are to minimize IAE for ±50% change in model parameters, with concern for the manipulatedvariable variation—unchanged from Table 9.1.
CHAPTER 9 PID Controller Tuning for Dynamic Performance
9.3. Confirm the correlation between the linearized model parameters and the process operating conditions in Table 9.3. Calculate the change in flow rate for the specified range of model parameters. 9.4. The dynamic responses shown in Figure Q9.4 were obtained by introducing a step set point change to a PID controller. The dead time of the process is only a few minutes. For each case, determine whether the control is as good as possible and if not, what corrective steps should be taken. Note that the diagnosis of this data would require an exact specification of the control objectives. Use the general objectives considered in Table 9.1 and be as specific as possible regarding the change to the tuning constants.
S'i
ifc
Controlled
o o,
u a
Controlled
o B is £ 8 »
u a
Ic: Manipulated 100
200
Manipulated . 100
Time, /
Time, t
ia)
ib)
Manipulated L 100
200
200
Time, / ic)
id)
FIGURE Q9.4
9.5. The tuning constants for the threetank control system are given in Example 9.2. Predict how the optimum tuning constants will change as the following changes are made to the control system. The analysis should be based on principles of process dynamics, tuning factors, and tuning correlations. Be as specific as possible without resolving the optimization problem for each case.
id) A different control valve is installed whose maximum flow is 2.5 times 299 greater than the original valve. i*M»aM«iiiit«wiN ib) The volume of each tank is reduced by a factor of 2. Questions ic) The temperature of stream B is increased by 20°C. id) The set point of the controller is increased to 3.5 percent of component A in the thirdtank effluent. ie) Substantial highfrequency noise is present in the measurement of the controlled variable. 9.6. Given the following process reaction curves, for which of the processes is it appropriate to use the general tuning charts in Figure 9.4a through /? Explain your answer for each case. id) Figure 3.7 (tank 2 concentration) ib) Figure 3.18 ic) Figure 5.5 id) Figure 1.5 (Appendix I) ie) Figure 13a, 13b if) Figure 8.4a ig) Figure 5.17 9.7. Explain in your own words why the dimensionless parameters are (a) KCKP. (b) Tj/(9 + z). (c) Td/(9 + z). 9.8. Derive the closedloop transfer function for the threetank mixing process using the analytical (thirdorder) linearized model in response to a change in the composition in the A stream from Example 7.2. Perform a dimensional analysis using the method demonstrated in Section 9.4, determine the key dimensionless parameters, and explain the form of tuning correlations for this model structure and how you would develop them. 9.9. For one or more of the following processes, calculate the PI controller tuning constants by two correlations: Ciancone and Lopez. Compare the expected control performance for both correlations in response to a step change in the controller set point. Under which circumstances would each correlation give the best constants? (a) Question 6.1 (b) Question 6.2 (c) CSTR in Section 3.6 (d) Example 5.1 (e) Example 1.2 (Appendix I) if) Example 6.4 9.10. The two series CSTRs in Example 3.3 with the reaction A > products rA = 6.923 x 10V5000/rCA with T in K, has its outlet concentration of A, CA2, controlled by adjusting the inlet concentration Cao The temperature varies slowly between 290 and 315 K. Would this temperature variation require a significant adjustment in controller tuning? Justify your answer with quantitative analysis.
3 0 0 9 . 11 . T h e t h r e e c a s e s u s e d i n t h e t u n i n g o p t i m i z a t i o n a r e s e l e c t e d t o s p a n t h e mmme&Mmmmm range of expected plant operation (i.e., the range of plant model paramec h a p te r 9 te r s ) . S u p p o s e th a t th e c o n tr o l e n g i n e e r k n e w w h a t p e r c e n ta g e o f th e ti m e PID Controller Tuning that the plant will operate at various operating conditions in the range. SugP e r f o r m a n c e S e s t a m o d i fi c a t i o n t o t h e o p t i m i z a t i o n m e t h o d , s p e c i fi c a l l y t h e o b j e c t i v e function, that would include the information on time at each operation in determining the optimum tuning constants. 9.12. The tuning optimization method integrates the equations over a finite time to evaluate the IAE. (a) Write the equations that could be used to evaluate the IAE from the simulation results. (b) Write the equations for the ISE and ITAE that could be used with simulation results. For the ITAE, carefully define when the integration begins (i.e., where time equals zero). (c) Examples in this chapter demonstrated that a poor choice of tuning constant values could lead to an unstable system, with the controlled variable diverging from the solution. What is the theoretical value of the IAE for an unstable control system? How would the optimization system described in this chapter respond if an intermediate set of tuning constants led to an unstable response? (d) Determine the theoretical minimum IAE for controlling an ideal firstorder process with dead time in response to a step disturbance. (e) If an analytical expression were available for CV(f), it could be used in tuning. Determine the closedloop transfer function for a PI controller and a firstorderwithdeadtime process, Gp(s) = Kpe~6s/(xs + 1). For a step set point change, SP(s) = ASP/s, solve for CV(^) and invert the Laplace transform to obtain CV(t), if possible. 9.13. Control performance goals are defined in Table 9.1. Propose at least one alternative measure for every entry in the column labeled "Used in This Chapter." Each should involve a different performance measure and not be simply a different numerical value. Discuss the advantages of each entry, the original, and your proposed alternate. 9.14. Tuning constants for a PI controller for the following process are to be determined. 7
5e~23s
100 1
G'(s)Gds)Gs(s) =8 . —— Gd(s) = 5^ + 1 5^ +
The control objectives are essentially the same as used in this chapter. A colleague has calculated several sets of values for the controller gain and integral time. Determine which of these sets of constants, if any, is acceptable and explain why or why not.
Tuning Case A Case B Case C Case D Kc T,
12 6
12 1
0.3 6
0.3 1
9.15. Rules for interpreting the control performance are presented in the section 301 o n fi n e  t u n i n g a n d s u m m a r i z e d i n F i g u r e 9 . 1 2 . \ m m m M m m m m m m (a) Discuss the advantages of using a set point change response rather than Questions the disturbance response. (b) Prove the relationships given in Figure 9.12. (c) Demonstrate why the initial change in the manipulated variable is about 50 to 150 percent of its final value. Does this tuning guideline depend on the tuning goals and correlations used? 9.16. Figure 9.2 gives the controlled variable behavior for various values of the controller gain. Sketch the behavior of the manipulated variable you would expect for each case and explain your answers. Also, sketch the variable given here as a function of the controller gain Kc, and explain your answer.
f(¥)'*
Stability Analysis and Controller Tuning 10.1 a INTRODUCTION To this point, we have developed a control algorithm (the proportionalintegralderivative controller) and a method for tuning its adjustable constants. One might ask, "Isn't this sufficient for designing feedback control systems?" The answer is a resounding "No!", because we do not have a general method for evaluating the ef fects of elements in the closedloop system on dynamic stability and performance. Through various examples and exercises, we have seen how feedback control can change the qualitative behavior of a process, introducing oscillations in an originally overdamped system and potentially causing instability. In fact, we shall see that the stability limit is what prevents the use of a very high controller gain to improve the control performance of the controlled variable. Therefore, a thorough understanding of the stability of dynamic systems is essential, because it provides important relationships among process dynamics, controller tuning, and achievable performance. These relationships are used in a variety of ways, such as selecting controller modes, tuning controllers, and designing processes that are easier to control.
10.2 B THE CONCEPT OF STABILITY In vernacular English, the term "unstable" has a negative connotation. Certainly, no one would want to be described as unstable! This undesirable meaning extends to products of engineering design; we generally want our plants and control sys tems to be stable. To ensure consistency, we will use a clear and precise definition of
304
stability, termed bounded inputbounded output stability, which can be employed in the design and analysis of process control systems.
CHAPTER 10 Stability Analysis and Controller Tuning
A system is stable if all output variables are bounded when all input variables are bounded. A system that is not stable is unstable.
A variable is bounded when it does not increase in magnitude to ±00 as time increases. Typical bounded inputs are step changes and sine waves; an example of an unbounded input is a ramp function. Naturally, process output variables do not approach ±00 in a chemical plant, but serious consequences occur when these variables tend toward ±00 and reach large deviations from their normal values. For example, liquids overflow their vessels; closed vessels burst from high pressures; products degrade; and equipment is damaged by excessive temperatures. Thus, substantial incentives exist for maintaining plant variables, with and without control, at stable operating conditions. As a further clarification, a chemical reactor would be stable according to our definition if a step increase of 1°C in its inlet temperature led to a new steadystate outlet temperature that was 100°C higher. Thus, systems that are very sensitive can be stable as long as they attain a steady state after a step change. The methods in this chapter determine stability strictly as defined here, which is required for good operation but clearly is not alone sufficient to ensure good control performance. Other aspects of achieving acceptable control performance will be addressed in Chapter 13. 10.3 □ STABILITY OF LINEAR SYSTEMS—A SIMPLE EXAMPLE Since control system stability is the goal of this chapter, the definition will be reinforced through a process example that shows how the addition of feedback control changes the dynamic response of a linear process. In the next section, the analysis is generalized to any linear system. Diameter = 3 m Height = 3 m
EXAMPLE 10.1. The response of the nonselfregulating level process in Figure 10.1 to a step change in the inlet flow is to be determined for a case with proportionalonly control. The linear models for the process and the controller are dL
•A "j = F\n — ^out
(10.1) Fout = KciSP  L) + (F0M)S
FIGURE 10.1 Level process for Examples 10.1 and 10.3.
Expressing variables in deviation form, equating the set point and initial steady state (i.e., V = LLS = L SP), and combining into one equation gives A^ = F!n + KcL'
(10.2)
By taking the Laplace transform and rearranging, the transfer function for this
system can be derived as
305
Lis)
\/Kc
K(s)
s+\
(10.3)
& ) Solution. Since the system is simple, the following analytical solution to the equa tions can be derived for a step change in the inlet flow, F{a(s) = AFm/s.
L' = AFir ■KP
0*'/r)
(10.4)
with z = A/(Kc). As can be seen, the controller gain affects the time constant of the feedback system. As observed in earlier examples, increasing the magnitude of the controller gain, which gives negative feedback control (which in this case is Kc < 0), decreases the time constant as well as reducing the steadystate offset. Note that for this firstorder system the controller gain can be set to a very large magnitude without causing instability. This conclusion can be demonstrated by analyzing the expression for the time constant, which would have to change sign to cause instability. Since the time constant is positive and the analytical solution has a negative exponent for all gains (Kc < 0), this idealized system is stable for any negative feedback controller gain. This result is not true for most processes, as will be demonstrated in later examples. Recall that this analysis is valid only for the ideal, linear level control system described in equations (10.1), which has no sensor or final element dynamics and is perfectly linear. Also, this analysis ensures only that variables do not increase without bound; it does not ensure that the process variables in the real plant will remain within acceptable limits. Applying the final value theorem, the ultimate value of the level after a step change in the inlet flow is AFin
lim L = Vims Lis) = limj {~Kc)s = ^ (10.5) j>0 Kc s+1
iKc)
Substituting the process data into this expression for a 20 m3/h change in flow and a controller gain of 10 m3/h/m gives a final level deviation of 2 m, which, assuming that the level began in the middle of its range, is half a meter above the top of the tank wall! For this input the plant demonstrates nonlinear behavior by overflowing and is not modelled accurately by equations (10.1) when overflow occurs. Clearly, good control performance requires more than stability; however, stability is one essential component of a wellperforming control system.
This example demonstrates that the stability of the level system depends on the sign of the exponential term in the solution and that the feedback controller affects the exponential term. In the next section, the relationship of the exponential term to stability is generalized to address a set of ordinary differential equations of arbitrary order. 10.4 Q STABILITY ANALYSIS OF LINEAR AND LINEARIZED SYSTEMS
Essentially all chemical processes are nonlinear. Since no general stability analysis of nonlinear systems is available, the local stability of the linearized approxima tion about a steady state is evaluated. The local linear analysis is valid only in
Stability Analysis of Linear and Linearized Systems
306 CHAPTER 10 Stability Analysis and Controller Tuning
a very small region (theoretically, a differential region) about the linearization conditions. We will assume that a differential region exists about the steadystate operating conditions within which stability can be investigated, and Perlmutter (1972) gives a thorough justification of the linearized analysis, sometimes referred to as Liapunov's first method. Since the control system reduces variability in the controlled variables, the linear stability analysis is often adequate for making the control design and tuning decisions. However, we must recognize that the analysis is valid only at a point and that no rigorous conclusions can be drawn for a finite distance from this point. The successes of the vast majority of process control strategies designed using linear methods attest to the validity of the approach, when applied judiciously. To develop a general stability analysis for linearized systems, the following nthorder linear dynamic model with a forcing function f(t) is considered. dnY dn  l + ai + ... + anY = f(t) (10.6) dt ' "l dtn~l Note that we often formulate the model as a set of firstorder differential equations, which can be combined in the form of equation (10.6) by any of several proce dures, such as taking the Laplace transform of the original models and combining algebraically. The solution to equation (10.6) is composed of two terms: the particular solution, which depends on the forcing function, and the homogeneous solution, which is independent of the forcing function (Boyce and Diprima, 1986). The forcing functions for process control systems are set point changes and disturbances in process variables such as feed composition, which, since they are bounded, cannot cause instability in an otherwise stable system. Thus, we conclude that the particular solution of a stable system with bounded inputs must be stable. Therefore, the stability analysis concentrates on the homogeneous solution, which determines whether the system is stable, with or without forcing, as long as the inputs are bounded (Willems, 1970). The Laplace transform of the homogeneous part of equation (10.6), with all initial conditions equal to zero, is ,«i (sn + anis"1 + • • • + a{s + a0)Y(s) = 0 (10.7) As demonstrated in Chapter 4, the solution to equation (10.7) is of the form
Yit) = Axeait +... + (Bx + B2t + . •)«"'' + • • • + [Ci cos (a)t) + C2 sin (cot)^0"1 H
(10.8)
where a, = the ith real distinct root of the characteristic polynomial cip = repeated real root of the characteristic polynomial <xq = real part of complex root of the characteristic polynomial A, B,C = constants depending on the initial conditions The stability of the linearized system is entirely determined by the values of the exponents (the a's). When all of the exponents have negative real parts, the solution cannot increase in an unlimited fashion as time increases. However, if one or more exponents have positive real parts, variables in the system will be unbounded as time increases, and the system will be unstable by our definition. The special case of a zero real part is considered in Example 10.3, where it is shown
that a system with one or more zero real parts is bounded inputbounded output unstable. Thus, a test for stability involves determining all exponential terms and can be summarized in the following principle.
307 Stability Analysis of Linear and Linearized Systems
• The local stability of a system about a steadystate condition can be determined from a linearized model. • The linear approximation of the system is bounded inputbounded output stable if all exponents have negative real parts and is unstable if any exponential real part is zero or positive.
The linear approximation is valid only at the point of linearization. If the process operation changes significantly, the stability can be determined for several points with different operating conditions. However, the fact that a system may be stable for many points does not ensure that it is stable for conditions between these stable points. This is sometimes referred to as pointwise or local stability determination. F
EXAMPLE 10.2. Determine the stability of the variable T'(t) from the following model. d 2 T ' 1.23—— d T ' 1.387" = 0 ——— dt2 dt
To"
(10.9)
i^A
'A0
The exponential terms can be evaluated according to the following procedure.
do
is2\.23s\3S)T'is) = 0 s2 1.23*1.38 = 0 s = 0.71 s = 1.94*—unstable!
(10.10)
T'it) = A]e°lu +A2eU94'
T.
It is clear that T'it) is locally unstable about the steady state, because one of the exponential terms has a real part greater than zero. Insight into the cause of instability in a process without feedback control is given in Appendix C, where a chemical reactor is analyzed. (The numerical values for this example are from Case II in Appendix C, Table C.1.)
E.
'an
'jfefraatoM^^
EXAMPLE 10.3. The stability of the level process without control iKc = 0) shown in Figure 10.1 is to be determined. The vessel size and steadystate flow are the same as in Example 10.1. A material balance on the vessel results in the following model: Foax(t)
at
(10.11)
The model can be written in deviation variables and in transfer function form for the case with the outlet flow constant: . dL'it) dt Lis) Fds)
= KSf)
(10.12)
Ts
(10.13)
' o oT u t
308
The solution to this equation has a real part of the exponential equal to zero. We will assume that the process is initially at steady state and investigate the behavior of the level for two different input flows. First, assume that the flow in varies around its steadystate value according to a sine, M sin (cot), and the system is initially at steady state. The analytical solution for the level is as follows, and the dynamic behavior is shown in Figure 10.2 with A = 7.1 m2, M = 2 m3/mm, and co = 1 rad/min.
CHAPTER 10 Stability Analysis and Controller Tuning
M L'(t) = — [1  cos (a)t)] = 0.282(1  cos(O) Aco
S 1.5 r in  1 h E i 0.5
For this bounded input function, the output of the linearized system is bounded; therefore, the system is stable in this case. The second case involves a step function in the inlet flow, which increases by 2 m3/h at time = 0. The analytical solution for the level subject to a step change of magnitude M from an initial steady state is as follows, and the dynamic behavior is shown in Figure 10.3.
I ° 03
'E o5 o* "I 31.5
(10.14)
J
I
I
I
I
I
L
0 2 4 6 8 10 12 14 16 18 20 Time FIGURE 10.2 Response of the level in Example 103 to a sine flow disturbance.
2 4 6 8 10 12 14 16 18 20 Time FIGURE 10.3 Response of the level in Example 103 to a step flow disturbance.
M L'(t) = —t= 0.282/ A
(10.15)
For this bounded input, the output of the linearized model is unbounded (although the true nonlinear level is bounded because the maximum level is reached and the liquid overflows). Thus, the result of the stability analysis indicates a serious deficiency in the level process behavior without control, which should be modified through feedback. The difference between the behavior of the levels in these two cases is due to the nature of the forcing functions. The sine variation in deviation variables has a zero integral over any multiple of its period; thus, the level increases and decreases but does not accumulate. The step forcing function has a nonzero integral that increases with time, and the level, which integrates the difference between input and output, increases monotonically toward infinity. Since we are interested in general statements on stability that are valid for all bounded inputs, we shall consider a system with a zero real part in its exponential to be unstable, because it is unstable for some bounded input functions.
Local stability analysis using linearized models determines stability at the steady state; no rigorous information about behavior a finite deviation from the steady state is obtained.
10.5 u STABILITY ANALYSIS OF CONTROL SYSTEMS: PRINCIPLES Again, the local stability of a system will be evaluated by analyzing the linearized model. The analysis method for linear systems can be tailored to feedback control systems by considering the models in transfer function form. The resulting methods will be useful in (1) determining the stability of control designs, (2) selecting tuning constant values, and (3) gaining insight into how process characteristics influence tuning constants and control performance. We begin by considering a general
transfer function for a linear control system in Figure 10.4. CV(s) Gp(s)Gds)Gc(s) SPis) \+Gp(s)Gds)Gc(s)Gs(s) (10.16) CVis) Gdis) Dis) l+Gpis)Gds)Gds)Gsis) For the present, we will consider only the disturbance transfer function and will assume that the transfer function can be expressed as a polynomial in s as follows: (1 + Gpis)Gds)Gcis)Gds)) CVis) = Gdis)Dis) (10.17) (sn + alSn~l + a2s"2 + • • •) CV(j) = (s  ^)(s  fa) • • • (s  pm)D(s) The righthand side (the numerator of the original transfer function) represents the forcing function, which is always bounded because physical input variables cannot take unbounded values, and we assume that the disturbance transfer function, Gd(s), is stable. The essential information on stability is in the lefthand side of equation (10.17), called the characteristic polynomial, which is the denominator of the closedloop transfer function. In the system being considered, Figure 104, the characteristic polynomial is 1 + Gp(s)Gds)Gc(s)Gs(s). Setting the characteristic polynomial to zero produces the characteristic equation.
Before continuing, it is important to note that either transfer function in equa tion (10.16) could be considered, because the characteristic equations of both are identical. Thus, the stability analyses for set point changes and for disturbances yield the same results. Examination of the characteristic equation demonstrates
Dis)
SPis) ^*0
Eis)
Gds)
MWis)
GJs)
Gdis)
G„is)
n_ CVmis) Transfer Functions Gcis) = Controller Gvis) = Transmission, transducer, and valve Gpis) = Process Gsis) = Sensor, transducer, and transmission Gdis) = Disturbance
CVis) <♦>
Gsis) Variables CV(s) = Controlled variable CVm(s) = Measured value of controlled variable Dis) = Disturbance MV(.s) = Manipulated variable SPis) = Set point FIGURE 10.4 Block diagram of a feedback control system.
310 CHAPTER 10 Stability Analysis and Controller Tuning
that the equation contains all elements in the feedback control loop: process, sen sors, transmission, final elements, and controller. As we would expect, all of these terms affect stability. The disturbances and set point changes are not in the char acteristic equation, because they affect the input forcing; therefore, they do not affect stability. Naturally, the numerator terms affect the dynamic responses and control performance and must be considered in the control performance analysis, although not in this part, which establishes stability. Continuing the stability analysis, the solution to the homogeneous solution is evaluated to determine stability. For the transfer function, the exponents can be determined by the solution of the following equation resulting from equation (10.17): ,«i is" +axsn'+a2snz + •••) = 0
(10.18)
As before, if any solution of equation (10.18) has a real part greater than or equal to zero, the linearized system is unstable, because the controlled variable increases without limit as time increases. The stability test is summarized as follows: A linearized closedloop control system is locally stable at the steadystate point if all roots of the characteristic equation have negative real parts. If one or more roots with positive or zero real parts exist, the system is locally unstable.
Recall that the roots of the characteristic equation are also referred to as the poles of the closedloop transfer function, e.g., Gdis)/[\+Gpis)Gds)Gcis)Gsis)]. This approach to determining stability is applied to two examples to demonstrate typical results. EXAMPLE 10.4. The stability of the series chemical reactors shown in Figure 10.5 is to be deter mined. The reactors are well mixed and isothermal, and the reaction is firstorder in component A. The outlet concentration of reactant from the second reactor is con trolled with a PI feedback algorithm that manipulates the flow of the reactant, which is very much smaller than the flow of the solvent. The sensor and final element are assumed fast, and process data is as follows. Process.
V = 5m3 Fs =5m3/min >> pA Solvent
ao
do
db
©
Reactant
FIGURE 10.5
Series chemical reactors analyzed in Example 10.4.
vs = 50% open CAo = 20 mole/m3 k = 1 min1 CAOis)/vis) = Kv = 0.40 (mole/m3)/(% open)
311 Stability Analysis of Control Systems: Principles
PI Controller. Kc = 15(% open)/(mole/m3) 7/ = 1.0 min Formulation. The process model structure for this system is the same as for Example 3.3, but the data is different and the valve gain is included. The transfer functions for the process and controller are GPis) = Gds)
Kr izs + \)izs + \) (10.19)
 * (■♦ * )
with
10
\F + VKJ
mole/m3 %
= 0.50 min
The individual transfer functions can be combined to give the closedloop transfer function for a set point change, which includes the characteristic equation. CV(j) Gpis)Gds)Gcis) SPis) 1 + Gpis)Gds)Gcis)Gsis)
0.10 55 + l)2
15(1+fi)(o: 1+
(10.20)
» (■♦ * ) « * ? )
Characteristic equation.  ♦ " ( ' ♦ a w i w )
(10.21)
0 = 0.25s3+ l.0s2 +2.5s+ \.5 The solution to this cubic equation gives the exponents in the timedomain solution. These values are a,,2 = 1.60 ± 2.21 j a3 = 0.81 Since all roots have negative real parts, this system is stable. Remember, we still do not know how well the closedloop control system performs, although the complex poles indicate that the system is underdamped and the integral mode indicates that the controlled variable will return to its set point for a steplike disturbance.
lA0 VA1
f e EXAMPLE 10.5. The stability of the threetank mixing process in Example 7.2 is to be evaluated under feedback control with a proportionalonly controller.
1
hdb* fr"
VA2
cfe
VA3
0
i
312
1
r
0.4
CHAPTER 10 Stability Analysis and Controller Tuning
0.2
fedc
b
c
*—a b c d e
•5b 0 0.2 0.4 0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0.1
Real FIGURE 10.6
Root locus plot for Example 10.5 for controller gain values of (a) 0, ib) 50, ic) 100, id) 150, ie) 200, and if) 250. Assuming that the sensor is fast, Gsis) = 1, the closedloop transfer function is 1
CVjs) = Gds) Dis) 1 + GPis)Gds)Gcis)Gsis)
i5s + l)3 0.039 1 + Kci5s + l)3
(10.22)
Characteristic equation. 125s3 + 15s2 + \5s + (1 + 0.039 Kc) = 0
(10.23)
The solutions to the characteristic equation determine whether the system is stable or unstable. Solutions have been determined for several values of the con troller gain (with the proper sign for negative feedback control), and the results are plotted in Figure 10.6. Since the characteristic equation is cubic, three solu tions exist. The system without control, Kc = 0, is stable, because all roots (i.e., exponential terms) have the same negative real value (0.2). As the controller gain is increased from 0 to 250 in increments of 50, the poles approach, and then cross, the imaginary axis. This path can be interpreted as the solution becoming more oscillatory, due to the increasing size of the imaginary parts, and finally becoming unstable, since the exponents have zero and then positive real parts. Based on this analysis, the threetank mixing process is found to be (barely) stable (and periodic) for Kc < 200 and unstable for Kc > 250; further study shows that the stability limit is about Kc = 208. The control performance would be clearly unacceptable when the system is unstable, but again, we do not yet know for what range of controller gain the control performance is acceptable.
The results of Example 10.5 can be generalized to establish relationships be tween locations of roots of the characteristic equation (poles of the closedloop transfer function). In addition, features of dynamic responses can be inferred from the poles if a constant transfer function numerator is assumed. These generaliza tions are sketched in Figure 10.7, which shows the nature of the dynamic responses for various pole locations. Clearly, the numerical values of the poles (or equiva
Imaginary
313
Real
D
D
^ .
Time
\ / \ ^  ' Time
Time
Time
Time FIGURE 10.7
Examples of the relationship between the locations of the exponential terms and the dynamic behavior.
lently, their location in the complex plane) are very important for the dynamic response of a closedloop system. The method of plotting the roots of the characteristic equation as a function of the controller tuning constant(s) is termed root locus analysis and has been used for decades. Note that a rootsolving computer program is required to facilitate the construction of the plots. We will use another stability analysis method in further studies, but we directly calculated the poles of the closedloop transfer function here because of the excellent visual display of the effect of the tuning constants on the exponential terms and therefore on stability. In summary, for a linearized model (which determines local properties):
Application of the general stability analysis method to feedback control systems demonstrates that the roots of the characteristic equation determine the stability of the system. When the characteristic equation is a polynomial, a straightforward manner of determining the stability is to calculate the roots of the characteristic equation. If all roots have negative real parts, the system is bounded inputbounded output stable; if any root has a positive or zero real part, the system is unstable.
10.6 a STABILITY ANALYSIS OF CONTROL SYSTEMS: THE BODE METHOD The method presented in the previous section presents the principles of stability analysis of transfer functions and provides a vivid picture of the effects of controller tuning on the stability of control systems. However, we would like to have a method for analyzing control systems that
Stability Analysis of Control Systems: The Bode Method
1. Involves simple calculations 2. Addresses most processes of interest 3. Gives information on the relative stability of the system (i.e., how much a parameter must change to change the stability of the system) 4. Yields insight into how various process and controller characteristics affect tuning and control performance
314 CHAPTER 10 Stability Analysis and Controller Tuning
The most commonly used stability analysis methods are summarized in Table 10.1. Since many plants in the process industries have dead time, the methods that require polynomial transfer functions (root locus and Routh) will not be considered further. Of the two remaining, the Nyquist method is the most general. However, in spite of a few limitations, the Bode method of stability analysis is selected for emphasis in this book, because it involves simple calculations and, more importantly in the age of computers, gives more easily understood insights into the effect of process and controller elements on the stability of closedloop systems. The basis of the Bode method is first explained with reference to the system in Figure 10.8a and b; then, a simple calculation procedure is presented with several worked examples. Suppose that a sine wave is introduced into the set point with the loop maintained open as in Figure 10.8a. Because the system is linear, all variables oscillate in a sinusoidal manner. After some time, the system attains a "steady state," a standing wave in which the amplitudes do not change. The sine frequency can be selected so that the output signal, CV(f), lags the input signal, SP(0, by 180°. Note that the relative amplitudes of the various signals in Figure 10.8a would normally be different but are shown to be equal here because the process and controller transfer functions have not yet been specified. After steady state has been attained, the set point is changed to a constant value and the loop is closed, as shown in Figure 10.8&. Since this is a closedloop system, the sine affects the process output, which is fed back via the error signal to the process input. For the frequency selected with a phase difference of 180°, the returning signal reinforces the previous error signal because of the negative sign of the comparator.
TABLE 10.1
Summary of stability analysis methods Method
Plant model
Stability results
Results display
Root locus (Franklin et al., 1991) Routh (Willems, 1970) Bode
Polynomial in s
Relative
Graphical
Polynomial in s
Yes or no
Tabular
Relative
Graphical
Relative
Graphical
(1)Open loopstable (2) Monotonic decreasing amplitude ratio (AR) and phase angle (0) as frequency increases Nyquist (Dorf, 1986) Linear fe««Id«A^
/V/V" sp(.o
+
Eis) HT) «
^w^
rw\r
MVis)
CVis)
Gcis)
Gvis)
GDis)
AA^ GJs)
ia)
/\jxr /w^ spw
t' + _ Eis)
**Q
T
/W"
MV(j) Gcis)
CVis) Gvis)
GDis)
A/V^ Gsis)
ib) FIGURE 10.8 Bode stability analysis: (a) behavior of openloop system with sine forcing; ib) behavior of system after the forcing is stopped and the loop is closed.
A key factor that determines the behavior of this closedloop system is the amplification as the sine wave travels around the control loop once. If the signal decreases in magnitude every pass, it will ultimately reduce to zero, and the system is stable. If the signal increases in amplitude every pass, the wave will grow without limit and the system is unstable. This analysis leads to the Bode stability criterion. Two important factors need to be emphasized. First, the analysis is performed at the frequency at which the feedback signal lags the input signal by 180°; this is termed the critical or crossover frequency. Naturally, the critical frequency depends on all of the dynamic elements in the closedloop system. Second, for the amplitude of the wave to increase, the gain of the elements in the loop must be greater than 1. This gain depends on the amplitude ratios of the process, instrument, and controller elements in the loop at the critical frequency. The result is the Bode stability criterion for linear systems, which gives local results for a nonlinear system.
The Bode stability criterion states that a closedloop linear system is stable when its amplitude ratio is less than 1 at its critical frequency. The system is unstable if its amplitude ratio is greater than 1 at its critical frequency.
From this analysis, it is clear that a system with an amplitude ratio of exactly 1.0 would be at the stability limit, with a slight increase or decrease resulting in
315 Stability Analysis of Control Systems: The Bode Method
316 CHAPTER 10 Stability Analysis and Controller Tuning
instability or stability, respectively. Because of small inaccuracies in modelling and nonlinearities in processes, no real process can be maintained at its stability limit. Note that the Bode method considers all elements in the feedback loop: pro cess, sensors, transmission, controller, and final element. Naturally, some of these may contribute negligible dynamics and can be lumped into a smaller number of transfer functions. By convention, the transfer function used in the Bode analy sis is termed the openloop transfer function and is represented by the symbol
Gods)G0L(s) = Gp(s)Gds)Gc(s)Gds)
(10.24)
Before the Bode method is discussed further, limitations are pointed out. The Bode method cannot be applied to a few systems in which Gods) has particular features: 1. Unstable without control 2. Nonmonotonic phase angles or amplitude ratios at frequencies higher than the first crossing of —180° The Bode method is not appropriate for these systems because 1. The experiment in Figure 10.8 cannot be performed for an unstable process. 2. Nonmonotonic behavior in the Bode diagram of Gods) could lead to a higher harmonic of the critical frequency for which the magnitude is greater than 1.0. For processes with these features, the Nyquist stability analysis is recommended (Dorf, 1986). The amplitude ratio can be determined through analytical relationships intro duced in Chapter 4. The important relationships are summarized below for a general transfer function; these were applied to process transfer functions in Chapter 4 and will be extended here to Gods) As a brief summary of results in Chapter 4, 1. The frequency response relates the longtime output response to input sine forcing of the system. 2. The frequency response of a linear system can be easily calculated from any stable transfer function, G(s), as G(jco). 3. The amplitude ratio is the ratio of the output over the input sine magnitudes and can be calculated as AR = \G(jco)\ = V(Re [G(jco)])2 + (Im [Gijco)])2 (10.25) 4. The phase angle gives the amount that the output sine lags the input sine and can be calculated as ,
/r(.
.
t
i
/Im[G(»]\
(10.26)
Another important simplification provides a way for the frequency response of a series of transfer functions to be calculated from the individual frequency
responses. First, each individual transfer function can be represented in polar form by
317
Giija>) = \Glijo>)\e*'J (10.27) The series transfer function can then be expressed as
Stability Analysis of Control Systems: The Bode Method
Gij(o) = Y[ Giijco) = ( Y\ \Giijco)\ ) exp ( £>/./ ) = ARe'** (10.28) 1=1
1=1
with AR = Y\\Gdj
% % % % % %
define the complex variable d e fi n e t h e v a l u e o f f r e q u e n c y i n r a d / t i m e evaluate Gp(jw), a complex variable absolute value gives the magnitude angle gives phase angle in rad to obtain degrees, multiply by 180/pi
Expressions are provided in Table 10.2 for the amplitude ratio and phase angle of some simple, commonly used transfer functions. Computer calculations demon strated above can be used for any transfer functions, including those too complex to reduce algebraically.
Therefore, the reader is advised to concentrate on the principles introduced and applications demonstrated in this chapter, with the assurance that no practical limit exists to easily calculating the information needed for stability analysis.
TABLE 10.2
318
Summary of amplitude ratios and phase angles for common transfer functions [co is in rad/time, n is a positive integer)
CHAPTER 10 Stability Analysis and Controller Tuning
Transfer function Amplitude ratio* Phase angle (°)* K
K K zs + \ K ZSS2 + 2zi;S + 1
K K
 l
y/i\  z2co2)2 + (2zco$)2 K
„0s
1
Kc
tan1 (coz)
y/z20)2 + 1
K izs + 1)"
As
0
\
,
)
n
VVrW + l/
tan"1
Kd\ + zds)
icoz)
„ /360\
J_
90
Kc.\ + co2T2
tan  l
Kcy/\ + iTdCti)2
tan' iTdco)
Aco
( ' ♦ £ )
/ 2zcol \ \\z2co2)
[coT,)
Kc(l + ± + TdS) K.Jl + fa^)1 (^Jj;) •For the gain > 0.
EXAMPLE 10.6.
U do
f
FIGURE 10.9
Mixing process analyzed in Example 10.6.
The singletank mixing process with proportional control shown in Figure 10.9 is considered. This process is the same as the threetank mixer in Example 7.2 with the last two tanks removed. The process transfer function, which includes an ideal sensor and fast final element dynamics, is given as 0.039 (10.29) 5s + 1 with time in minutes. Note that the process is stable without control, since it has one pole at (0.2,0) in the realimaginary plane, so that it satisfies the criteria in Table 10.1 for the Bode method. The stability is to be determined by the Bode method. First, Gods) must be determined. This is the product of the valve, process, sensor, and controller transfer functions; G0ds) with proportionalonly control can be written as Gds) = Kc Gp(s)Gvis)Gsis) =
Gods) =
0.039ffc 5* + l
(10.30)
319 Stability Analysis of Control Systems: The Bode Method
101 10° 101 Frequency,
102
103
102
103
ia) 0 i—
10 20 30 40 3 50 a. 60 70 80 90 I— 10~3
i i n i n n i i i 11 m i i i i i i n n
10"
10"' 10° 101 Frequency,
FIGURE 10.10 Bode plot for the Godj<*>) in Example 10.6, with Kc = 1.0.
The magnitude and phase angle of Gods) can be calculated from G0dj
«(iry(^£) (0.039/i:c) J\+25co2 * = LGodio) = L (0.059Kc) + L
(10.31) 1 55 + 1
.  i i5co) = tan"'
These expressions are presented in Bode plots in Figure 10.10 for Kc = 1. Since the phase angle for this firstorder system does not decrease below 90° for any controller gain, the phase angle never reaches 180°, and the feedback signal cannot reinforce oscillations in the control loop. As a result, this idealized control system is stable for all negative feedback proportionalonly controller gains (Kc > 0 in this case). As the next example illustrates, nearly every realistic system can be made unstable with improper feedback control.
320 CHAPTER 10 Stability Analysis and Controller Tuning
EXAMPLE 10.7. The mixing process and proportional controller in Figure 10.9 and Example 10.6 are considered here, with the modification that the valve and sensor dynamics are more realistically modelled according to the following firstorder transfer functions with short time constants: Gds) = Kc GPis) =
0.039 5s+ 1
1 Gds) = 0.033s + 1
1
Gds) = 0.25s + 1 (10.32)
Equations (10.28) can be used to determine the amplitude ratio and phase angle for this series system, and the results are Gods) = (0.039tfc) \G0djco)\ =
1 1 1 1 + 5s 1 + 0.25s 1 + 0.033s
0 . 0 3 9 / T, 1 1 VI + 25co2 VI + 0.0625w2 VI + 0.001 lo>2 0
tGodJu) = tan1 i5co) + tan1 (0.25a;) + tan1 (0.033a>) + L (0.059 tfc)
(10.33) The amplitude ratio and phase angle are plotted in Figure 10.11 for a controller gain of 1.0. Because of the added dynamic elements in Gods), the phase angle
J I I I I Mil
10,2
10"'
10° Frequency, ta (rad/min) ia)
101
J l I l I III 102
10"
10
10° Frequency, w (rad/min)
10'
102
10"6
J I I I I l Ml
J
I
'
ib) FIGURE 10.11 Bode plot of Godjco) for the system in Example 10.7 with Kc = 1.0.
exceeds 180°. At the critical frequency (11.6 rad/min), the following values for the amplitude ratio are determined:
321 Stability Analysis of Control Systems: The Bode Method
Kc = \.0 G0L(M)I = 0.0002 < 1.0 Stable Kc = 500 \GodJ
Two important lessons have been learned from the last examples. The first lesson is that in theory, a stable transfer function Gods) that is first or secondorder cannot be made unstable with proportionalonly feedback control, because its phase angle is never less than 180°. The second lesson demonstrates that all real systems have additional dynamic elements in the control loop (e.g., valve, sensor, transmission) that contribute additional phase lag and result in a phase angle less than 180°, albeit at a very high frequency.
Thus, essentially all real process control systems can be made unstable simply by increasing the magnitude of the feedback controller gain. EXAMPLE 10.8. The chemical reactor process and control system in Example 10.4 are changed slightly. In this case, a transportation delay of 1 min exists between the mixing point and the first stirredtank reactor, with no reaction in the transport delay. Therefore, the process transfer function is modified to include the dead time. A proportionalintegral controller is proposed to control this process with the same tuning as Example 10.4; ATC = 15 and 7) = 1. Determine whether this system is stable. The Bode method can be applied to this example with the new aspect that dead time exists in the process. The first task is to determine Gods) As explained above, this transfer function contains all elements in the feedback loop; therefore, Gods) is Gods)
0.1 Oer . , . ( , ♦ ; ) (0.50s + l)2
(10.34)
The amplitude ratio and phase angle for each element can be combined to give the amplitude ratio and phase angle of G0Lija>).
I
V
0.10 W l i0.50jco+\)2
m
Solvent ■
'A0
TL
h
Reactant
~Uh
do
do
1$
322
lO3^
CHAPTER 10 Stability Analysis and Controller Tuning
■
■ ■ I I I I 11
10lt 10"2
■ 10'
10_l 10° Frequency, co (rad/min) (a)
u
100 =
■a 150  200 £ 250 300 h 101
10_1 10° Frequency, co (rad/min)
10
ib) FIGURE 10.12 Bode plot of God]®) for Example 10.8.
* = z^+z(1 + i.) + /(_±12_) + Le
JO)
360 = tan_1(l/fy) + 2tan1 i0.5co)  l.Oco— 2tt
These terms are plotted in Figure 10.12. Since the amplitude ratio is greater than 1 (1.32) at the critical frequency of 1.31 rad/min, the system is unstable. Note that the dead time introduced additional phase lag in the feedback system and caused the system to become unstable. This result agrees with our qualitative understanding that processes with dead time are more difficult to control via feedback. Stable control could be obtained by adjusting the tuning constant values.
The preceding examples have demonstrated interesting results. To expand on these experiences, it would be valuable to understand the contributions of com monly occurring process models and controller modes to the stability of a feedback control system. Also, it would be useful, when performing calculations, to have analytical and sample graphical frequency responses for these common elements. Both of these goals are satisfied by the analytical expressions and Bode plots pre sented to complete this section. The plots for the key process components—gain, firstorder, secondorder, pure integrator, and dead time—are presented in Figure 10.13a through e; these were developed from the transfer functions and expressions
323 Stability Analysis of Control Systems: The Bode Method
1 ' i i i mi 1 I I I I INI 1 1 I I I UN 1 1     
60
« 50 
10,2
I II 1 1 I I I III! I I I I Mill I I I I ■ IM 10" 10° 101 IO2 Frequency, co
ia)
10°
"I I I I I Nil I I I I Mill 1 1 I I I I III 1 1 I    
D.
Corner frequency
E <
io2 io2
u
I I I l nil 1 i i » i i i?l i i i i i mi i i i i T
10"
10°
10'
IO2
45 
FIGURE 10.13 Generalized Bode plots: (a) gain; ib) firstorder system.
324 CHAPTER 10 Stability Analysis and Controller Tuning
■u ^ j j o J
102 ic)
id) FIGURE 10.13 Cont. Generalized Bode plots: (c) secondorder system (the parameter is the damping coefficient §); (d) dead time.
325 Stability Analysis of Control Systems: The Bode Method
■a 60 "50
100 I t 10"
i
mini 1— IO"'
ii 1 10° co
i
'
i io1
i
ii"
I io2
ie)
FIGURE 10.13 Cont. Generalized Bode plots: ie) integrator; if) proportionalintegral controller.
326 CHAPTER 10 Stability Analysis and Controller Tuning
ig)
yu IA
« 60
u ■a o
60
0
5 u
a
.c
CL.
on
102
1
1.
i
i
i
i
11 >
10"
1
'
i
10°
'
i
i
ii
in
10'
i
O I2
coT, ih)
FIGURE 10.13 Cont. Generalized Bode plots: ig) proportionalderivative controller; ih) proportionalintegralderivative controller for which the derivatve time is onetenth of the integral time.
for amplitude ratio and phase angle in Table 10.2. The plots for the PI, PD, and PID controllers are presented in Figure 10.13/ through h and were also developed from the analytical expressions in Table 10.2. Note that these plots are presented in dimensionless parameters, so that they can be used to determine the frequency responses quickly for a system conforming to one of the general models. The tables and generalized figures are valid for the frequency responses of transfer functions with positive gains. When the gain is negative, (1) the amplitude ratio should be determined using the absolute value of the gain, AT, and (2) the phase angle is smaller by 180° iorn radians), i.e., (LG(jco))K
AR
1
~K~n
y/c02X2 + 1
(10.36)
0 = tan1 (—cox) Noting that the two variables co and x always appear as a product, they can be combined into one variable, cox, and the Bode plots expressed as a function of this single variable. Also, the amplitude ratio can be normalized by dividing by the process gain Kp. Similar manipulations are possible for the transfer functions of the other building blocks. EXAMPLE 10.9. Determine the amplitude ratio and phase angle of the following transfer function at a frequency of 0.40 rad/min: 0.039
(10.37) (l+5s)2 The first step is to calculate the parameters in the generalized Figure 10.13c. The results can be calculated as follows: G(s) =
, = 25 t = 5.0 £ = — 1 0 = 1.0 T2 2r
(10.38)
From the generalized charts, AR/KP = 0.2; AR = 0.2(0.039) = 0.0078; and
The Bode plot of any God jco) for a system consisting of a series of common elements can be easily prepared by using the expressions for these individual ele ments and equation (10.28). The usefulness of the general plots is not primarily in simplifying the calculations, because the calculations are not difficult by hand and computer programs are available to automate the calculations and plot the results. The real importance is in highlighting the contributions of various components to the stability of a feedback system. For example, note that an element in the feedback path that has a large phase angle contributes to lowering the critical fre quency. Since most process models have amplitudes that decrease with increasing frequency, a lower critical frequency yields a higher amplitude ratio for Godj^)Since a lower amplitude ratio is desired to maintain the amplitude ratio below 1.0
327 Stability Analysis of Control Systems: The Bode Method
for stability, elements with the larger phase angle tend to destabilize a feedback control system. Some of the key features of the most important transfer functions are summarized in Table 10.3. The readers are encouraged to compare the entries in the table with the Bode figures so that they understand the major contributions of each transfer function. Before we move on to controller tuning, a word of caution regarding terminol ogy is provided. The common term for the expression in equation (10.24), Gods), is the openloop transfer function; hence, the subscript OL. The term refers to Fig ure 10.8, where the feedback loop was temporarily opened. Unfortunately, the term openloop is also used for the response of a process to an input change without con trol. In this second case, the transfer function being considered is either the process transfer function Gp(s) or the disturbance transfer function Gd(s), depending on which inputoutput relationship is being considered. To avoid misinterpretation, it is best to relate the subscript OL to Figure 10.8 and to recognize that Gods) contains all elements in the feedback loop, including the controller. The conven tional terminology, although not as clear as desired, is used in this book to prevent confusion when consulting other references.
328 CHAPTER 10 Stability Analysis and Controller Tuning
TABLE 10.3
Summary of key features of process transfer function frequency responses Transfer function
Amplitude ratio, AR
Phase angle,
Gain, K Firstorder, l/(w + l)
Constant
0 0 to 90°
Secondorder, l/(z2s2 + 2$zs + \)
Monotonically decreases with increasing frequency, limiting slope = 1 (1) Shape depends on the damping ratio, can be nonmonotonic (2) Limiting slope = 2
nth order from n first order in series,
Monotonically decreases with
\/(zs + \)n
increasing frequency, limiting slope = n 1.0
Dead time,
0 to180°
Straight line with a slope of 1 from co to +oo through (co = 1, AR = 1)
At corner frequency (co = 1/r), AR = 0.707, and cf> = 45° (1) ARisnot monotonic for small damping coefficients (2) Key frequency is co = 1/r
0 to (90)n°
Otooo
g0s
Integrator, \/As
Key feature
90°
Ata>= 1/0,
Notes: 1. All slopes refer to the Bode diagram (A log(AR)/A log(eo)). 2. The phase angles for all transfer functions in this table decrease monotonically as frequency increases. 3. Phase angle values for the case with positive gain.
In summary, Bode stability analysis provides a method for determining the stability of most feedback control systems that include dead time. The calcula tions are relatively simple by hand when Gods) involves a series of individual transfer functions, and a computer can be programmed to perform the calculations automatically. In addition to providing a quantitative test, the Bode analysis yields insight into the effects on stability of various elements in the feedback loop.
10.7 □ CONTROLLER TUNING BASED ON STABILITY: ZIEGLERNICHOLS CLOSEDLOOP The Bode stability analysis provides a way to determine whether a process and feedback controller, with all elements completely specified, is stable. It is possible to alter the procedure slightly to determine, for a given process, the value of the gain for a proportionalonly controller that results in a desired amplitude ratio for Godj(*>) at its critical frequency. In particular, it is straightforward to determine the controller gain that would result in the system being on the margin just between stable and unstable behavior. Note that the proportionalonly controller affects the amplitude ratio but not the phase angle, thus making the calculation easier. The importance of this approach is that the results of the calculation (the con troller ultimate gain and critical frequency) can be used with tuning rules presented in this section to determine initial tuning for P, PI, and PID controllers. This tuning method is an alternative to the method presented in the previous chapter. While the tuning rules do not generally give as good performance as the Ciancone corre lations for simple firstorderwithdeadtime processes, the method in this section has two advantages: 1. It can be applied to processes that are not well modelled by firstorderwithdeadtime models. 2. It provides considerable insight into the effects of all loop elements (process, instrumentation, and control algorithm) on stability and proper tuning constant values. As with most tuning methods, the starting point is a process model that can be determined by fundamental modelling or by empirical model identification. The method then follows four steps. 1. Plot the amplitude ratio and the phase angle in the form of a Bode plot for Gods) At this step, the controller is a proportionalonly algorithm with the gain Kc set to 1.0. 2. Determine the critical frequency coc and the amplitude ratio at the critical frequency, \G0dJo)c)\. 3. Calculate the value of the controller gain for a proportionalonly controller that would result in the feedback system being at the stability margin. Since the stability margin is characterized by an amplitude ratio of 1.0 for GodJ<*>c)> and Kc does not influence the critical frequency, the controller gain at the stability limit can be determined by first calculating the critical frequency and then calculating the controller gain. ZGol(M) = LGpijcoc)GdJ(Oc)GsiJcoc) = 180° \GodJo>c)\ = Ku \GpijcOc)GdJo)c)Gsijcoc)\ = 1.0
(10.39)
329 Controller Tuning Based on Stability: ZieglerNichols ClosedLoop
TABLE 10.4
330
ZieglerNichols closedloop tuning correlations
CHAPTER 10 Stability Analysis and Controller Tuning
Controller
Ke
T,
Ponly
Ku/2 KJ2.2 KJl.l
—
PI PID
/yi.2 P„/2.0
Td
PM/8
Ultimate gain: Ku = Gpijcoc)GdJ(oc)Gsijcoc)\ 2n Ultimate period: Pu = — coc
(10.40)
Ku, termed the ultimate gain, is the controller gain that brings the system to the margin of stability at the critical frequency. Pu, termed the ultimate period, is the period of oscillation of the system at the margin of stability. Note that Ku has the units of the inverse of the process gain iKpKvKs)~x and that Pu has the units of time. 4. Calculate the controller tuning constant values according to the ZieglerNichols closedloop tuning correlations given in Table 10.4 (Ziegler and Nichols, 1942). The description "closedloop" indicates that the analysis is based on the stability of the closedloop feedback system, GolCO These correlations have been developed to provide acceptable control performance (they selected a 1:4 decay ratio) with reasonably aggressive feedback action; they believed that this also maintains the system a safe margin from instability.
VA0 VA1
f & "
e
^r i*rt *A2
EXAMPLE 10.10. Calculate controller tuning constants for the threetank mixing process in Example 7.2 by using the ZieglerNichols closedloop method. The transfer function for this process has already been developed, Gp(s) = 0.039/(5s+1)3 and the Bode plot of the transfer function with (Kc = 1) is presented in Figure 10.14 based on
«  f ' ,(5s ( ^+ l)3 ) £GOLijco) = 3 tan1 (—5co)
\G0dJco)\= 0.039
W1+5VJ
If the plot were not available, the calculations would have to be performed by hand. They involve a trialanderror procedure to determine the critical frequency and are often arranged in a table similar to the results in the following figure.
331 Controller Tuning Based on Stability: ZieglerNichols ClosedLoop
IO"2
IO'2
10l
IO"1 Frequency, co (rad/min)
IO"1 Frequency, co (rad/min)
FIGURE 10.14 Bode plote of Godjco) for Example 10.10 with Kc = 1.
Frequency a) (rad/min) 0.10 0.20 0.35 0.40
Phase angle 0(°)
Amplitude ratio AR
79.7 135 180.8 (critical frequency) 190.3
0.0279 0.0138 0.0048 0.0035
From the results in the table, the ultimate gain and period can be determined to be Pu = 2jt/coc = 17.9 min and Ku = 1/ARC = 208. The tuning constants for P, PI, and PID controllers according to the ZieglerNichols correlations are
C o n t r o l l e r K c ( % o p e n / % A ) T, ( m i n ) T d ( m i n ) Ponly PI PID
104 94.5 122.4
14.9 8.95
2.2
332 CHAPTER 10 Stability Analysis and Controller Tuning
200 FIGURE 10.15 Dynamic response of threetank mixing control system in Example 10.10 with ZieglerNichols tuning.
A sample of the transient response for a step change of +0.8%A in the feed concentration under PI control is given in Figure 10.15. As can be seen, the control performance is quite oscillatory, resulting in large variation in the manipulated vari able and in a long settling time. For most plant situations, this is too oscillatory, and control performance for this system similar to Figure 9.6 would be preferred. The engineer could finetune the controller constants using the concepts presented in Section 9.6.
Solvent
'AO
do
fi
Reactant
do
0
EXAMPLE 10.11. Calculate tuning for a PI controller applied to the series chemical reactors in Example 10.8. Recall that this is a secondorderwithdeadtime process with Gpis) = 0.10e~s/i0.50s + \)2. The Bode plot for G0dj
£G0dj(o) = L
333 Controller Tuning Based on Stability: ZieglerNichols ClosedLoop
0 100 200 » 300 no  400 £ 500 600 700 800 10r l
J
I
I
I
I
I
I
I
I
I
I
I
P
"
'
'
l
l
10° 10l Frequency, ft) (rad/min)
l
l
l
l
IO2 FIGURE 10.16
Bode plot of Example 10.11 with Kc = 1; for (a) the dead time, ib) one firstorder system, and ic) the entire transfer function Godj
1
\GodJa>)\ = 1 + 0.5 jco 1
1
1 + 0.5 jco 1
7~JW\
0.10 ^c Li
(1.0)(0.10)(1.0) 1+0.25a;2 V 1 + 0.25a;2 The results in Figure 10.16 are presented so that the effects of the individual process elements are clearly displayed. The dead time and one firstorder system are designated as a and b, respectively. The overall amplitude ratio and phase angle for G0dj
334 CHAPTER 10 Stability Analysis and Controller Tuning
are not particularly important as far as simplifying the calculations, which are eas ily programmed; however, they help the engineer visualize the effects on stability of individual elements in the feedback loop. For example, any element that con tributes a large phase lag itself will cause a large phase lag for Godjco). From this figure, the critical frequency is 1.73 rad/min and the magnitude at this frequency is 0.057; thus, the controller tuning would be, according to the ZieglerNichols tuning correlations in Table 10.4, Kc = 8.0% open/(mole/m3) and T, = 3.0 min.
Before this section is concluded, two common questions are addressed. First, the novice often has difficulty in selecting an initial frequency for the trialanderror calculation for the critical frequency. Since an exact guess is not required, a good initial estimate can usually be determined from the relationships in Tables 10.2 and 10.3, along with the plots in Figure 10.13. Basically, the initial frequency should be taken in the region where the Bode diagrams of the individual elements change greatly with frequency. Rough initial estimates for the frequency are given by the following expressions: coz = 1 (firstorder system) cox = 1 (secondorder system) coO — 1 (dead time) When these calculations give very different results, use the lowest of the esti mated frequencies to begin the trialanderror calculations, which usually converge quickly. The second common question regards the required accuracy of the converged answer. The engineer must always consider the accuracy of the information used in a calculation when interpreting the results. In Chapter 6, the results of empirical model fitting were found to have significant errors, usually 10 to 20 percent in all parameters. Therefore, it is not necessary to determine the critical frequency so that the phase angle deviation from —180° is less than 0.001°! A few degrees error is usually acceptable. In addition, our application of the results in determining tuning constants must consider the likely error in the model, as discussed in the next section.
10.8 o CONTROLLER TUNING AND STABILITY—SOME IMPORTANT INTERPRETATIONS Analysis using the Bode plots provides a quantitative method for evaluating how elements in the control loop influence stability and tuning. The principles and ex amples presented so far have demonstrated important results, which are reinforced in the following six interpretations, discussed with further examples. The reader is advised that these interpretations are very important, not only in tuning singleloop controllers but also in designing more complex control strategies and process modifications to achieve desired control performance.
Interpretation I: Effect off Process Dynamics on Tuning Clearly, the types of process and instrument equipment in the control loop affect the system stability and feedback tuning constants. It is worthwhile determining
how process dynamics affect feedback control, specifically the gain and integral time of a PI controller. Since the ultimate gain of the proportionalonly controller is the inverse of the amplitude ratio at the critical frequency, a higher controller gain for a stable system is achieved by decreasing the amplitude ratio at the critical frequency. Also, the amplitude ratio generally decreases for process elements as the frequency increases. Therefore, smaller time constants and dead times lead to a larger allowable controller gain. By the same logic, smaller values of the time constants and dead times lead to a smaller integral time, which, since integral time appears in the denominator, has the effect of giving stronger control action. The general conclusion is that more and longer time constants and dead times lead to detuning of the PID controller and that fewer and shorter time constants and dead times lead to larger controller gain, smaller integral time, and stronger feedback action. We expect that stronger feedback action will give better control performance, as is discussed in depth in Chapter 13. EXAMPLE 10.12. Consider a set of processes with one to seven firstorder systems in series, each with a gain of 1.0 and a time constant of 5.0. Determine the PI tuning for each of these systems. The expressions for the amplitude ratio and phase angle for a series of n firstorder systems can be developed using equations (5.40) and (10.36) and are given as
(,VVl+a>W K> y
AR
.I
cp = n tan (o;t) with Kp = 1.0 and z = 5.0
The ZieglerNichols closedloop tuning for these systems is as follows:
n
coc
ARWc
Kc
T,
1 3 5 7
00
—
oo
—
0.35 0.145 0.096
0.122 0.348 0.484
3.72 1.31 0.94
15.0 36.1 54.5
Clearly, the controller must be detuned as the feedback dynamics become slower.
The previous example clearly demonstrates that time constants affect feed back tuning and stability. Next, we would like to learn the relative importance of dead times and time constants. Since many processes can be represented by a firstorderwithdeadtime model, the key relationships between tuning and frac tion dead time 6/(0 + z) is investigated for ZieglerNichols PID tuning. In fact, correlations similar to those developed in Chapter 9 can be calculated using the Bode stability and ZieglerNichols methods. The PID controller gain correlations for Ciancone and ZieglerNichols are compared in Figure 10.17. The correlations have the same general shape, which points to the importance of the stability limit
335 Controller Tuning and Stability—Some Important Interpretations
336
10.00 rr
CHAPTER 10 Stability Analysis and Controller Tuning 1.00 
0.10 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.0 Fraction dead time Ciancone
e k&) ZieglerNichols
FIGURE 10.17
The effect of fraction dead time on PID controller gain with 6 + z constant.
in determining the most aggressive control action. Recall that stability was not explicitly considered in the Ciancone method, although tuning that gave unstable or oscillatory systems would have a large IAE and thus would not have been se lected as optimum. Note that the Ciancone gain values are lower, partly because of the objectives of robust performance with model errors and partly because of the limitation on manipulatedvariable variation with a noisy measured controlled variable. We would expect the Ciancone correlations to yield controllers that are more robust than those developed with ZieglerNichols tuning and thus perform better when realistic model errors occur. The Bode analysis demonstrates the fundamental relationship between frac tion dead time and tuning; the controller gain must be decreased to maintain sta bility as the fraction dead time increases (at constant 6 + x). Finally, it is important to reiterate that only the terms in the characteristic equation influence stability. Therefore, the disturbance transfer function Gd(s) and the manner in which the set point is changed do not influence the stability of the feedback control system.
t
FB
v—L.
Increasing Ume constants and dead times requires detuning of the PID controller. The dead time has a greater effect on the phase lag and tuning. Therefore, increasing the fraction dead time, 6/(6 + z), at constant 6 + z requires detuning of the PID controller.
O CD
?A
Fb»Fa
1 $
EXAMPLE 10.13. The two following different firstorderwithdeadtime processes are to be con trolled by PI controllers. Calculate the tuning constants for each and compare the results.
Plant A
337 B9
Plant B 1.0 2.0 8.0
Kp 1.0 t 8.0 0 2.0
Controller Tuning and Stability—Some Important Interpretations
\^msiiM^MsmsMs^^M^^^mm\
For each plant the Bode stability and ZieglerNichols tuning calculations are sum marized as
coc
ARC Ktl Pu
Kc Ti
Td
Plant A
Plant B
0.86 0.144 6.94 7.3 4.1 3.65 0.91
0.32 0.84 (Ponly with Kc = 1) 1.19 19.60 0.70 9.8 2.45
lB8$KSfiNSjfS$SfiW^M«l!R$ll&i^^
Note that the two plants have the same time to reach 63% of their openloop response after a step change: 9 + z. Even though they have the same "speed" of response, Plant B, with the higher fraction dead time, 9/(9 + z), has a much smaller controller gain and larger integral time. The difference in controller tuning constants, resulting from the different stability bound, certainly will result in poorer control performance for Plant B. (Naturally, the longer dead time for plant B also degrades the control performance.)
Interpretation II: Effect of Controller Modes on Stability
Each mode of the PID controller affects the stability of the feedback system. As shown in Figure 10.13a, a gain in Gods) does not affect the phase angle, although it affects the amplitude ratio. Therefore, increasing the magnitude of the controller gain tends to destabilize the system; that is, move it toward an amplitude ratio greater than 1. The proportionalintegral controller shown in Figure 10.13/ affects both the amplitude ratio and the phase angle; it increases the amplitude ratio beyond the proportionalonly controller and increases the phase lag. Thus, increasing the gain and decreasing the integral time tend to destabilize the feedback system. The proportionalderivative controller shown in Figure 10.13g increases the amplitude ratio but contributes negative phase lag, referred to as phase lead. Therefore, the derivative mode tends to stabilize the feedback system. These qualitative results are reflected in the ZieglerNichols tuning rules, which show the controller gain decreasing from Ponly to PI control and increasing from PI to PID control.
338 CHAPTER 10 Stability Analysis and Controller Tuning VA0
VAI
f e " fr"
i*r
lA2
t*rf
EXAMPLE 10.14. The stability of the threetank mixing process is to be determined for two cases: (a) under proportionalonly feedback control (Kc = 122) and (b) under proportionalintegral feedback control (Kc = 122 and 7> = 8). Note that the controller gain is the ZieglerNichols value for the PID controller from Example 10.10, but the integral time is slightly different and the derivative time is 0. The Bode plots are presented in Figure 10.18a and b. From Figure 10.18a, it is determined that case (a) is stable, since the amplitude ratio (0.60) is less than 1.0 at the critical frequency (0.35 rad/min). From Figure 10.18b, it is determined that case (b) is unstable, because it has an amplitude ratio greater than 1.0 (1.3) at its critical frequency (0.25 rad/min). This result clearly demonstrates the effect of the integral mode, which tends to destabilize the control system, since it contributes phase lag. Remember that the integral mode is nearly always retained, in spite of its tendency to destabilize the control system, because it ensures zero steadystate offset.
Interpretation III: Effect of Modelling Errors on Stability
The preceding examples in this chapter have assumed that the models of the pro cess were known exactly. Since the true dynamic response is never known exactly, it is important to determine how model errors affect stability. The best estimate of the dynamics will be called the nominal model. The general trends are relatively easy to ascertain based on the Bode stability analysis; plants with amplitude ratios and phase lags greater than their nominal models will be closer to the stability mar gin than the nominal model. As a example, consider a firstorderwithdeadtime process. Assuming that a nominal model is used to calculate the tuning constants, the system will tend to be closer to the stability margin than predicted if (1) the actual process dead time is greater than the nominal model, (2) the process gain is greater than the nominal model, or (3) the process time constant is greater than the nominal model. A consideration of modelling errors should be an integral part of any con troller tuning method. The timedomain Ciancone method in Chapter 9 specified modelling errors and optimized the dynamic responses for several cases simul taneously, and the ZieglerNichols correlations included a factor for model error by reducing the amplitude ratio at the critical frequency to about 0.5. As a result, a combination of model errors would have to cause the actual amplitude ratio at the critical frequency to be about twice the nominal model value for the system to be unstable. An alternative to the ZieglerNichols guideline for tuning based on the stability limit explicitly considers a measure of potential error. This method adjusts the controller tuning constant values so that the system is on the stable side of the limit by a specified amount. Either of the following specifications is used. GAIN MARGIN. The amplitude ratio of Godjo)) at the critical frequency is equal to 1/GM, where GM is called the gain margin and should be greater than 1. This ensures that the system is stable for any process modelling error that increases
WOl aidurexg joj (mf)™!) J» sjoid apog
8 rot aunoid 8 = lI pus ZZ\ = JX MUM [OJiuoo id iq) (aiun/puj) co 'Xouanbay ,01
oOI
i0l
jOI
01
j01
01
(auip/psj) m 'Xouanbay
.01
oOI
iOl
> 3 •o c
D. O
III = °yi W^ Iojiuod Xjuod (») (uiui/pbj) ro 'Xauanbay
.01
00I
,01
j4)I
e01
053
3 era
(uiui/puj) ro 'Xouanbay
.01 iiiii
oOI i—r
i
111
i
,01 i
i
i
i
i
■
■
01
z0l n
rrni—i
1
iiiii
t
i
i
c01
r
zOI SU0pB)%ldj3JUI )UB)J0dUII 3UIOS—iCjinqeiS
pue Su;mvx JanojJuo3
6€e
i > (°«) av sjqBJS >
~ =
,01 00l
= a,0l
> ■o3
the actual amplitude ratio of the process by less than a factor of GM. A typical value for GM is 2.0, but a larger value would be appropriate if large modelling errors that primarily influenced the amplitude ratio were anticipated.
340 CHAPTER 10 Stability Analysis and Controller Tuning
PHASE MARGIN. The phase angle of G0dj">) where the amplitude ratio is 1.0 is equal to (180° + PM), with PM a positive number referred to as the phase margin. A positive phase margin ensures that the system is stable for model errors that decrease the phase angle. A typical value for the phase margin is 30°, but a larger value would be appropriate if larger modelling errors were anticipated. Even if the models were perfect, the values of the gain margin and phase margin should not be reduced much below 2.0 and 30°, respectively. If they were reduced further, the performance of the feedback control system would be poor (i.e., highly oscillatory), because the roots of the characteristic equation would be too near the imaginary axis. Thus, these margins can be used as a way to include additional conservatism in the ZieglerNichols tuning methods if large model errors are expected.
CD
Fb»Fa
(6>
EXAMPLE 10.15. A nominal model for a process is given along with parameters defining processes I and II, which represent the range of the true process dynamics experienced as operating conditions vary. Naturally, we never know the true process, but we can usually estimate the potential deviations between the nominal model and true process from an analysis of repeated model identification experiments and from fundamental models, which indicate how the process dynamics change with, for example, the flow rate. (a) Determine values for the PI tuning constants based on the ZieglerNichols method for the nominal model and determine the resulting gain and phase mar gins. (b) Determine the stability of the true process at the extremes of its parameter ranges using the tuning based on the nominal model. True process Nominal model I II KP z 9
1.0 9.0 1.0
1.0 9.5 0.5
1.0 8.0 2.0
n»™^™i®ij«aww!S»i^^
Tuning can be determined for the nominal model using the Bode and ZieglerNichols closedloop methods, giving the following results: Gods) coc = 1.65
G0L(M)I= 0.067 tf„ = 14.9
Kc = 6.8 T, = 3.2 Gain margin = 2.0 Phase margin = 30°
The tuning constants appropriate for the nominal model using the ZieglerNichols method, that satisfy the general guidelines for gain and phase margins, are now
applied to the extremes of the dynamics of the true process. / 1 \ J 1\ 0e~6s 1 (\^&s
GoL(5) = 6.8(l + i)i^T \ 3.2.S/ zs + 1
True process with PI control I II coc 3.1 ARC 0.23 < 1
0.66 1.39 > 1
M«f»MSM:j%SMSl&^^
Note that Process I is stable with the nominal tuning, whereas Process II is unstable. The general trend should be expected, since Process II has a longer dead time, which contributes substantial phase lag and is more difficult to control. Process I has a shorter dead time, which contributes less phase lag and is easier to control. The key point is that the control system would become unstable for the moderate amount of variation of Process II from the nominal model.
Thus:
The control engineer should not rely exclusively on general tuning guidelines but should include information on the expected variation in process dynamics when tuning controllers.
The goal is normally for the worstcase model error to be stable and to give an acceptable (usually stable and not too oscillatory) closedloop dynamic response. Further calculations for Example 10.15 indicate that gain and phase margins for the nominal model of 4 and 60°, respectively, were required to give satisfactory performance for Process II. (This tuning gave gain and phase margins of 2 and 40°, respectively, for Process II.) The need for a larger stability margin can be understood when the Bode plot is prepared using the entire range of models possible, not just the nominal model. The range of possible models depends on the reasons for model errors; here the simplest approach is taken, with the process models I and II defining the extremes of the amplitude and phase angles possible. The Bode plot of Gods) = Gc(s)Gp(s), with the PI controller tuning for the nominal plant from Example 10.15, gives the range of values in Figure 10.19. Any amplitude ratio and phase angle within the two lines are possible for the assumed uncertainty. This plot clearly shows the effects of model errors, the possibility for instability in this case, and the need for a (larger) safety margin to account for the error. (Other ways to characterize the model error link the variation in process operation to the change in dynamics; for example, see Chapter 16.)
341 Controller Tuning and Stability—Some Important Interpretations
342 CHAPTER 10 Stability Analysis and Controller Tuning
10"
10'
10° Frequency, co (rad/time)
u at "to
a CL.
200 i
10"1
i
i
i
i
i
i
i
i
\
i
i
i
i
iS
10° Frequency, co (rad/time)
i
i
O I1
FIGURE 10.18 Uncertainty in Example 10.15 defined by models I and II with tuning for the nominal model.
Interpretation IV: Experimental Timing Approach The Bode tuning method enables the engineer to calculate the proportional con troller gain that brings the system to the stability limit. The same principle could be used to determine the ultimate gain experimentally through a simple trialanderror procedure called continuous cycling. The real physical system would be controlled by a proportionalonly controller, the set point perturbed slightly, and the transient response of the controlled variable observed. If the system is stable, either overdamped or oscillatory, the gain is increased; if unstable, the gain is decreased. The iterative procedure is continued, changing Kc until after a set point perturbation, the system oscillates with a constant amplitude. This behavior occurs when the system has exponential terms with (very nearly) zero values for their real parts, indicating that the system is at the stability margin. The gain at this condition is the ultimate gain, and the frequency of the oscillation is the critical frequency. These values, which in the continuous cycling procedure have been determined empirically, can be used with the ZieglerNichols closedloop tuning correlations in Table 10.4 for calculating the PID constants. From this explanation, it should be clear why the correlations used in this section are called the "closedloop" continuous cycling correlations. Also, we should recognize that this method combines an experimental identification method with tuning recommendations. This experimental method is not recommended, because of the significant, prolonged disturbances introduced to the process. It is presented here to give a physical, timedomain meaning to the Bode stability calculations.
4.0
c
a I 3.0
"l
1
1
1
1
1
i
1
r
343 Controller Tuning and Stability—Some Important Interpretations
.AAAAAAAAA/n
.rwwvwvw
I50 o
■
i
i
J
L
200 Time
FIGURE 10.20
Dynamic response of threetank mixing process with proportionalonly controller and Kc = 206, the ultimate gain.
EXAMPLE 10.16.
Perform the empirical continuous cycling tuning method on the threetank mixing process. The resulting dynamic response at the stability limit is given in Figure 10.20. The controller gain was found by trial and error to be 206 and the period to be about 18 minutes. These are essentially the same answers as found in Example 10.10, where the threetank mixing process was analyzed using the Bode method.
Interpretation V: Relationship between Stability and Performance
The analysis of roots of the characteristic equation 1 + Gods) = 0 and, equiv alent^, Bode plots of Gods) provide methods for determining the stability of linear systems. Naturally, any feedback control system must be stable if it is to provide good control performance. However, stability is not sufficient to guarantee good performance. To see why, consider the closedloop transfer function for a disturbance response: CVis) Gds) or_ CVis)x = G d s ) Dis) Dis) 1 + Gds)Gpis) 1 + Gds)Gpis)
(10.41) The stability analysis considers the denominator in the characteristic equation, 1 + Gc(s)Gp(s). Naturally, control performance also depends on the disturbance size and dynamics that appear in the numerator of the transfer function. For ex ample, the threetank mixing process would certainly remain closer to the set point
lA0
1\ . XM
TOt~l
&:
lA2 •*A3
Hb "(ST
344 CHAPTER 10 Stability Analysis and Controller Tuning
for an inlet concentration disturbance of 0.01% in stream B compared to a 1% disturbance. Also, the system is stable when the feedback controller gain has a value of 0.1, which would give very poor control performance compared with the tuning determined in Example 10.10 for this process (Kc = 94.5). Clearly, the methods in this chapter, while providing essential stability information, do not provide all the information required for process control design. Control system performance is covered in more detail in Chapter 13.
Stability is required for good control system performance. However, a control system can be stable and perform poorly.
EXAMPLE 10.17. Determine how the control performance changes for the following process with different disturbance dynamics. GPis) =
0.039 (l+5s)3
Gds) =
1 (1 + Tds)"
(10.42)
with zd = 5 and n equal to (a) 3 and ib) 1. The system was simulated with a PI controller using the tuning from Example 10.10. The two different disturbance transfer functions given here were consid ered. The first case (a) is the standard threetank mixing system, and the dynamic response is given in Figure 10.15. The results for the faster disturbance, case ib), are given in Figure 10.21. As expected, the faster the disturbance enters the pro cess, the poorer the feedback control system performs. Remember, the two cases considered in this example have the same relative stability because the feedback dynamics Gpis) and the controller Gc are identical; only the disturbances are dif ferent. (Also, note that the valve goes below 0% open in the simulation of the
Time FIGURE 10.21 Dynamic response for the system in Example 10.17, case ib) (faster disturbance).
linearized model, which is not physically possible; a nonlinear simulation should be performed.)
345 Additional Tuning Methods in Common Use, With a Recommendation
Interpretation VI: Modelling Requirement for Stability Analysis We use approximate models for control system analysis and design, and we should select the model that provides an adequate representation of the dynamic behavior required by the analysis method. The Bode stability analysis has pointed out the extreme importance of model accuracy near the critical frequency. Thus, we do not require a model that represents the process accurately at high frequencies—that is, those frequencies much higher than the critical frequency. EXAMPLE 10.18.
Compare the frequency responses for the threetank mixing process derived from (a) fundamentals and ib) empirical model fitting. The linearized fundamental model derived in Example 7.2 and repeated in equation (10.42) is thirdorder, and the empirical model is a firstorderwithdeadtime (approximate) model in Example 6.4. Their frequency responses, which equal Gods) with Gds) = Kc = 1, are given in Figure 10.22. Note that the two frequency responses are quite close at low frequencies, since they have the same steadystate gains. At very high frequencies, they differ greatly, but we are not interested in that frequency range. Near the critical frequency icoc « 0.35), the models do not differ greatly, which indicates that the two models give similar, but not exactly the same, tuning constants. Since essentially no model is perfect, we conclude that the error introduced by using a firstorderwithdeadtime model approximation is often acceptably small for the purposes of calculating initial tuning constant values. Recall that further tuning improvements are made through fine tuning.
In summary, tuning methods were presented in this section that are based on margins from the stability limit. The method can be applied to any stable process with a monotonic relationship between the phase angle and frequency. The methods in this section are especially helpful in determining the effects of various process and controller elements on the tuning constants. 10.9 Q ADDITIONAL TUNING METHODS IN COMMON USE, WITH A RECOMMENDATION To this point, two controller tuning methods have been presented. The Ciancone correlations were based on a comprehensive definition of control performance in the time domain, whereas the ZieglerNichols closedloop method was based on stability margin. Many other tuning methods have been developed and reported in the literature and textbooks. A few of the better known are summarized in this section, along with a recommendation on the methods to use. One wellknown method, known as the ZieglerNichols openloop method (Ziegler and Nichols, 1942), provides correlations that can be used with simplified process models developed from such sources as an openloop process reaction
lA0 lAl lA2
fr
[^T
t*r
10"1 g
346 CHAPTER 10 Stability Analysis and Controller Tuning
Firstorder with dead time
io2 e io3 •8 a io4
Thirdorder
<
10,5 10"
■
'
"
'
10'
10"1 10° Frequency, co (rad/min)
1(T2
Thirdorder 200 400 
% \\
600 
m i
F i r s t  o r d e r  —— with dead time
800 
* »
1000 
t
»» t
1
IO"2
i
i
i
i
i
i
i
i
i
"II
"
•"
IO"1 10° Frequency, co (rad/min)
I I I I I
101
FIGURE 10.22
Comparison of Bode plots for exact and approximate process models. curve. The objective of these correlations is a 1:4 decay ratio for the controlled variable. The tuning constants are calculated from the experimental model param eters according to the expressions in Table 10.5. Notice that the dead time is in the denominator of the calculation for the controller gain. This indicates that the controller gain should decrease as the dead time increases, a result consistent with other tuning methods already considered. However, the openloop ZieglerNichols correlation predicts a very large controller gain for processes with small dead times and an infinite gain for processes with no dead time. These results will lead to ex cessive variation in the manipulated variable and to a controller with too small a stability margin. Therefore, these correlations should not be used for processes with small fraction dead times. Many other tuning methods have been developed, generally based on either stability margins or timedomain performance. A summary of the methods is pre sented in Table 10.6, which gives the main objectives of each method, along with a reference, either in this book or in the literature. Note that the IMC method is covered in Chapter 19.
TABLE 10.5
347
ZieglerNichols openloop tuning based on process reaction curve Kr Ponly PI PID
Additional Tuning Methods in Common Use, With a Recommendation
Td
i\/Kp)/iz/9) i0.9/Kp)iz/9) i\.2/Kp)iz/9)
3.39 — 2.09 0.59
TABLE 10.6
Summary of PID tuning methods Input SP = set point D = disturbance
Tuning method
Stability objective
Objective for CV(0
Objective for MV(0
Model error
Noise on CV(0
Ciancone (Chapter 9)
None explicit
Min IAE
Overshoot and variation with noise
±25%
Yes
SP and D individually
Fertik(1974)
None explicit
Min ITAE with limit on overshoot
None
None explicit
No
SP and D individually
Gain/phase margin (Section 10.8)
Gain margin or phase margin
None
None
Depends on margins
No
n/a
IMC tuning (Section 19.7)
For specified model error
ISE (robust performance)
None
Tune A, see Morari and Zafiriou(1989)
No
SP and D (step and ramp) individually
Lopez et al. (1969)
None explicit
IAE, ISE, or ITAE
None
None
No
SP and D individually
ZieglerNichols closedloop (Section 10.7)
Implicit margin for stability (GM % 2)
4: 1 decay ratio
None
None explicit
No
n/a
ZieglerNichols openloop (Section 10.9)
Implicit margin for stability
4 : 1 decay None ratio
None explicit
No
n/a
(GM « 2)
With such a large selection available, some recommendations are needed to as sist in the proper choice of tuning method. Before presenting recommendations, a few key factors should be reiterated. First, most tuning methods rely on a simplified dynamic model of the openloop process. As a result, good control performance from the tuning depends on reasonably accurate model identification. Tuning cal culations cannot correct for modelling errors; they can only reduce the detrimen tal effects of such errors. Second, the tuning constants should be determined so
348 CHAPTER 10 Stability Analysis and Controller Tuning
Fundamental model
Empirical identification
Calculate initial tuning
that the control system achieves desired performance objectives relevant to the process. Because each method has different objectives, each provides somewhat different dynamic performance, which should be matched to the process require ments. Third, all methods provide initial values, which should be finetuned based on plant experience; the tuning procedure shown in Figure 10.23 should be used. The tuning methods being discussed appear as the "initial tuning" that relies on the identification and is modified by fine tuning, which corrects for modelling errors and adapts the performance to that desired for the process. The proper selection for a particular application should follow from the infor mation in the table. In other words:
The best choice for the initial tuning correlation is the method that was developed for objectives conforming most closely to those of the actual situation for which the controller is being tuned.
Implement and finetune Monitor performance
FIGURE 10.23
Major steps in the tuning procedure.
The following ranking, with the first entry being the preferred method, represents the author's personal preference for calculating initial tuning. 1. Ciancone tuning correlations from Chapter 9 2. Bode/(closedloop) ZieglerNichols when process cannot be satisfactorily fit ted by a firstorderwithdeadtime model 3. Nyquist/gain margin when the process does not satisfy the Bode criteria 4. Any of the other correlations as appropriate for the application scenario 5. Detailed analysis of the robustness of the system, through either the opti mization method in Chapter 9 or the robust performance analysis described in Morari and Zafiriou (1989) Approach 5 would always be the best, but it requires more effort than is usually justified for initial tuning. However, it may be required for systems involving complex dynamics and large model errors. 10.10 □ CONCLUSIONS
Several important topics have been covered in this chapter that are essential for a complete understanding of dynamic systems. We have learned 1. A useful definition of stability related to poles of the transfer function, i.e., the exponents in the solution of a set of linear differential equations 2. The effects of process and control elements in the feedback path that affect stability, such as dead times and time constants 3. Tuning methods based on a margin from the stability limit 4. That model errors must always be considered in tuning and that this results in detuned (i.e., less aggressive) feedback control action All of these results are consistent with the experience gathered in Chapter 9, which was restricted to firstorderwithdeadtime processes and PID control. The methods in this chapter provide a valuable theoretical basis that helps us understand
timedomain behavior and that can be applied for quantitatively analyzing stability and determining tuning for a wide range of systems. Numerical examples in this chapter, as well as Chapter 9, have demonstrated that simple linear models are often adequate for calculating initial tuning constants. These results confirm that the firstorderwithdeadtime models from empirical model fitting provide satisfactory accuracy for this control analysis. The stability analysis methods presented in this chapter are summarized in Figure 10.24, which gives a simple flowchart for the selection of the appropriate method for a particular problem. Note that the direct analysis of the roots of the characteristic equation is applicable to either open or closedloop systems that have polynomial characteristic equations. The Bode method can be applied to most closedloop systems, and the Nyquist method is the most general.
Is the system open or closedloop? Openloop
Closedloop
Determine the linear transfer function model
Determine the linear transfer function model
TO
CV(5) Gdjs) Dis) l+Gpis)Gvis)Gcis)Gsis)
r
i
x
Assuming that input is bounded and numerator is stable, denominator of Gpis) determines stability
Assuming that input is bounded and the numerator is stable, denominator determines stability
Is the denominator a
Is the denominator a polynomial in si
polynomial in si
N * Cannot solve for roots directly * Bode stability is for
Yo r N Solve for the roots of the denominator directly
Is the process without control stable?
Dis) = 0 s = alta2,...
closedloop systems
N
* Therefore, root locus and Bode not applicable
* Nyquist method applicable for this case
System is stable if Re(a),<0 for all i
Is GolO*°)I monotonic after first crossing of180°?
Calculate toc from ^GOl0'C0c)=180o System is stable if IGol(M,)I
FIGURE 10.24 Flowchart for selecting the stability analysis method for local analysis using linearized models.
349 Conclusions
350 CHAPTER 10 Stability Analysis and Controller Tuning
Many controller tuning methods have been presented in these two chapters. The correct method for a particular application depends on the objectives of the control system. The information in Table 10.6 will enable you to match the tuning with the control objectives. If no specific information is available, the Ciancone tuning correlations in Chapter 9 are recommended for initial tuning constant values.
REFERENCES Boyce, W, and R. Diprima, Elementary Differential Equations, Wiley, New York, 1986. Dorf, R., Feedback Control Systems Analysis and Synthesis, McGrawHill, New York, 1986. Fertik, H„ "Tuning Controllers for Noisy Processers," ISA Trans., 14,4,292304 (1974). Franklin, G., J. Powell, and A. EmamiNaeini, Feedback Control of Dynamic Systems (2nd ed.), AddisonWesley, Reading, MA, 1991. Lopez, A., P. Murrill, and C. Smith, "Tuning PI and PID Digital Controllers," Intr. andContr. Systems, 8995 (February 1969). Math Works, The Mathworks, Inc., Cochituate Place, 24 Prime Park Way, South Natich, MA, 1998. Morari, M., and E. Zafiriou, Robust Process Control, PrenticeHall, Engle wood Cliffs, NJ, 1989. Perlmutter, D., Stability of Chemical Reactors, PrenticeHall, Englewood Cliffs, NJ, 1972. Willems, J., Stability Theory of Dynamical Systems, Thomas Nelson and Sons, London, 1970. Ziegler, J., and N. Nichols, Trans. ASME, 64, 759768 (1942).
OTHER RESOURCES For a more detailed analysis of the root locus method, see the reference below, which gives design rules and applications. Douglas, J., Process Dynamics and Control, Vols. I and II, PrenticeHall, Englewood Cliffs, NJ, 1972. The next two references give further details on frequency response. The first is introductory, and the second uses more challenging mathematical methods. Caldwell, W, G. Coon, and L. Zoss, Frequency Response for Process Control, McGrawHill, New York, 1959. MacFarlane, A. (ed.), FrequencyResponse Methods in Control Systems, IEEE Press, New York, 1979. The following references present some historical background and some of the key milestones in control systems engineering. MacFarlane, A., "The Development of Frequency Response Techniques in Automatic Control," IEEE Trans. Auto Contr., AC24, 250 (1979). Oldenburger, R. (ed.), Frequency Response, Macmillan, New York, 1956.
The stability of a nonlinear system in a defined region can be determined for some systems and regions using the (second) method of Liapunov, which is presented in Perlmutter (1972) and LaSalle, J., and S. Lefschetz, Stability of Liapunov s Direct Method with Ap plications, Academic Press, New York, 1961. The methods introduced in this chapter provide a theoretical basis for determining the effects of all elements in the feedback loop, process, instrumentation, and control algorithm on stability and tuning. These questions ask you to apply these methods.
QUESTIONS 10.1. Consider the threetank mixing process with a proportionalonly controller in Example 10.5. Recalculate the root locus for the case with the three tank volumes reduced from 35 to 17.5 m3. Determine the controller gain for a proportionalonly algorithm at which the system is at the stability limit. Compare your result with Example 10.5 and discuss. 10.2. Example 10.4 established the stability of a system when operated at a temperature T = 320 K. Given the expression for the reaction rate constant of k = 6.63 x 108e~6500/7'min"1, determine if the system is stable at 300 K and 340 K. Explain the trend in your results and determine which of the three cases is the worst case from a stability point of view. 10.3. Answer the following questions, which revisit the interpretations (IVI) in Section 10.8. ia) (I) For the process in Example 5.2, determine the PI controller tuning constants using the ZieglerNichols closedloop method. The manipu lated variable is the inlet feed concentration, and the controlled variable is (i) Y\, (ii) Y2, (iii) *3, and (iv) Ya. Answer for both cases 1 and 2 in Example 5.2. ib) (II) Discuss the effect of the derivative mode on the stability of a closedloop control system. Explain the results with respect to a Bode stability analysis. (c) (III) A linearized model is derived for the process in Figure 9.1. The model is to be used for controller tuning. Model errors are estimated to be 30 percent in L, V, and FB, and they can vary independently. Estimate the worstcase dynamic model that is possible within the estimated errors. id) (IV) Assume that experimental data indicates that a closedloop PI system experienced sustained oscillations with constant amplitude at specified values of their tuning constants K'c and Tj. Estimate proper, new values for the tuning constants. ie) (V) Determine the range of tuning constant values that result in stability for the following systems and plot the region with Kc and 7} as axes. Locate good tuning constant values within this region: (1) the level system in Example 10.1 for Ponly and PI controllers; (2) the three
tank mixing system with a PI controller; (3) Figure 9.1 with 9 = 5 and
352
T=5.
if) (VI) Using arguments relating to stability and Bode plots, determine model simplifications in the system in Figure 7.1 and Table 7.2, to give the lowestorder system needed to analyze stability and tuning with acceptable accuracy.
CHAPTER 10 Stability Analysis and Controller Tuning
10.4. Given the process reaction curve in Figure Q10.4, calculate initial PID controller tuning constants using the ZieglerNichols tuning rules. Compare the results to values from the Ciancone correlations and predict which set of values would provide more aggressive control.
T 5% valve position
l
l
l
l
l
0
l
l
l
L
200 Time
FIGURE Q10.4
10.5. Given a feedback control system such as the threetank mixing process, determine the effect of the following equipment changes on the tuning constants. (a) Installing a fasterresponding control valve. (b) Installing a control valve with a larger maximum flow. (c) Installing a fasterresponding sensor. 10.6. Without calculating the exact values, sketch the Bode plots for the following transfer functions using approximations: 5.3 1 2 0e~2s (a) Gods) =4 . 3=—j ib) 5s + Gods) 1 5=s  ic) ( 3 Gods) s + = 'l )„2 2 10.7. Determine the root locus plot in the complex plane for controller gain of zero to instability for the following processes: (a) example heater in Section 8.7; (b) Example 10.1; (c) Example 10.8. For the systems with PI controllers, assume that the integral time is fixed at the value in the original solution. 10.8. (a) Is the Bode stability criterion necessary, sufficient, or necessary and sufficient?
(b) Is it possible to determine the stability of a feedback control system with nonselfregulating process using the Bode stability criterion? (c) Explain the limitations on the process transfer function imposed for the use of the Bode method. (d) Determine the stability of the system in Example 10.4 using the Bode method. 10.9. Confirm the expressions for the amplitude ratios and phase angles given in Table 10.2. 10.10. Prove the following statements and give an explanation for each in your own words by referring to a sample physical system. (a) The phase lag for a gain is zero. (b) The amplitude ratio for a firstorder system goes to zero as the fre quency goes to infinity. (c) The amplitude ratio for a secondorder system with a damping coeffi cient of 0.50 is not monotonic with frequency. (d) The phase angle decreases without limit as the frequency increases for a dead time. (e) For an integrator, the amplitude ratio becomes very large for low fre quencies and becomes very small for large frequencies. if) The amplitude ratio for a PI controller becomes very large at low frequencies. 10.11. For each of the physical systems in Table Q10.11, explain whether it can experience the dynamic responses shown in Figure Q10.11 for a step input (not necessarily at / = 0). The systems are to be considered idealized;
TABLE Ql 0.11
Input variable (separate answer for each)
Output variable (separate answer for each)
Control (separate answer for each)
Figure 7.1 and Example 7.1 Example 8.5
Signal to value
Measured temperature
None
Set point
Tank temperature
Reactor in Section C.2
Fc
Reactor temperature
(i) Ponly (ii) PI None
Example 1.2
0)FS (ii) FA (i) CA0 (ii) ^F* Set point (i) Signal to valve (ii) Set point of controller in Example 9.2
(i)CAi,(ii)CA2
None
(i)CAll(ii)CA2
None
cA
PID (i) None (ii) Ponly (iii) PI
System
Example 3.3 Example 9.1 Example 7.2
l&a^t&lWMteBi^^
(i)CAi,(ii)CA2, and (iii) CA3
353 Em Questions
354 CHAPTER 10 Stability Analysis and Controller Tuning
Time
ic) FIGUREQ10.il
in other words, the mixing is perfect, final element and sensor dynamics are negligible unless otherwise stated, and so forth. Provide quantitative support for each answer based on the model structure of the system. 10.12. The Bode stability technique is applied in this chapter to develop the ZieglerNichols closedloop tuning method. For each of the following changes describe an appropriate modification to the closedloop ZieglerNichols tuning method. Answer each part of this question separately. id) The controller used in the plant calculates the error with the sign in verted; E = CV  SP. ib) The linear plant model identified using a process reaction curve also has an estimate of the uncertainty in its feedback model parameters, Kp, 6, and z. ic) The process model, in addition to parameters for the feedback process, has estimates of the disturbance dead time and time constant. 10.13. The stability analysis methods introduced in this chapter are for linear systems, which give local results for nonlinear systems. What conclusions can be drawn from the linear analysis at the extremes of the ranges given about the stability of the following systems? (a) Example 9.4 with FB varying from 6.9 to 5.2 m3/min and ib) Example 9.1 with the volume of the tank and pipe varying by ±30%. 10.14. Given the systems with roots of the characteristic equation shown in Figure Q10.14, sketch the transient responses to a step input for each, assuming the numerator of the transfer function is 1.0. 10.15. Prove all of the statements in Table 10.3.
Im
355 Questions
Case
o&
Re
(a) O
(*) a ic) A
FIGURE Ql 0.14
10.16. Answer the following questions regarding the derivative mode. ia) Based on the Bode plot of a PID controller, what is the effect of highfrequency measurement noise on the manipulated variable? ib) Redraw Figure 10.13/* for Td = 77/4. ic) We have considered a PID controller that uses error in the derivative for the stability analysis. However, the controller algorithm used com monly in practice uses the controlled variable in the derivative mode. How should the stability analysis be altered to account for the use of the controlled variable in the derivative? 10.17. Consider the threetank mixing process in Example 7.2 with the same three 5minute time constants and with a transportation delay of 4.3 min between the mixing point and the entrance to the first tank. (a) Calculate initial tuning parameters using the Bode stability method and the ZieglerNichols correlations. (b) Explain the changes in the tuning constant values from those in Ex ample 10.10. (c) Would you expect the control performance for the system with trans portation delay to be better or worse than the system without trans portation delay? 10.18. (a) The dynamic performance of the system in Example 10.10 was deemed too oscillatory with the initial tuning calculated via ZieglerNichols correlations. How would you change the tuning constants, which con stants, and by how much to achieve reasonably good performance with little oscillation? (b) Given the results in Example 10.13 which showed that the ZieglerNichols tuning correlations do not seem to yield robust control perfor mance for low fraction dead time, how would you modify the ZieglerNichols correlations for 6/(9 + z) < 0.2?
Digital Implementation of Process Control 11.1 J INTRODUCTION As we have seen in the previous chapters, PID feedback control can be successfully implemented using continuous (analog) calculating equipment. This conclusion should not be surprising, given the 60 years of good industrial experience with process control and given the fact that digital computers were not available for much of this time. However, digital computers have been applied to process control since the 1960s, as soon as they provided sufficient computing power and reliability. Most, but not all, new controlcalculating equipment uses digital computation; however, the days of analog controllers are not over, for at least two reasons. First, control equipment has a long lifetime, so that equipment installed 10 or 20 years ago can still be in use; second, analog equipment has cost and reliability advantages in selected applications. Therefore, most plants have a mixture of analog and digital equipment, and the engineer should have an understanding of both approaches for control implementation. The basic concepts of digital control implementation are presented in this chapter. The major motivation for using digital equipment is the greater computing power and flexibility it can provide for controlling and monitoring process plants. To perform feedback control calculations via analog computation, an electrical circuit must be fabricated that obeys the PID algebraic and differential equations. Since each circuit is constructed separately, the calculations are performed rapidly in parallel, with no interaction between what are essentially independent analog computers. Analog equipment can be designed and built for a simple, standard cal culation such as a PID controller, but it would be costly to develop analog systems
358 CHAPTER 11 Digital Implementation of Process Control
for a wide range of controller equations, and each system would be inflexible: the algorithm could not be changed; only the parameters could be adjusted. In comparison, digital computation uses an entirely different concept. By rep resenting numbers in digital (binary) format and solving equations numerically to represent behavior of the control calculation of interest, the digital computer can easily execute a wide range of calculations on the same equipment, hardware, and basic software. Two differences between analog and digital systems are immedi ately apparent. First, the digital system performs its function periodically, which, as we shall see, affects the stability and performance of the closedloop system. Often, we refer to this type of control as discrete control, because control ad justments occur periodically of discretely. Second, the digital computer performs calculations in series; thus, if timeconsuming steps are involved in the control calculations, digital control might be too slow. Fortunately, modern digital com puters and associated equipment are fast enough that they do not normally impose limitations related to execution speed. Digital computers also provide very important advantages in areas not em phasized in this book but crucial to the successful operation of process plants. One area is minutetominute monitoring of plant conditions, which requires plant op erators to have rapid access to plant data, displayed in an easily analyzed manner. Digital systems provide excellent graphical displays, which can be tailored to the needs of each process and person. Another area is the longerterm monitoring of process performance. This often involves calculations based on process data to report key variables such as reactor yields, boiler efficiencies, and exchanger heat transfer coefficients. These calculations are easily programmed and are performed routinely by the digital computer. The purpose of this chapter is to provide an overview of the unique aspects of digital control. The approach taken here is to present the most important differences between analog and digital control that could affect the application of the control methods and designs covered in this book. This coverage will enable the reader to implement digital PID controllers as well as enhancements, such as feedforward and decoupling, and new algorithms, such as Internal Model Control, covered later in the book.
11.2 a STRUCTURE OF THE DIGITAL CONTROL SYSTEM Before investigating the key unique aspects of digital control, we shall quickly review the structure of the control equipment when digital computing is used for control and display. The components of a typical control loop, without the control calculation, were presented in Figure 7.2. Note that the sensor and transmission components are analog devices and can remain unchanged with digital control calculations. The loop with digital control is shown in Figure 11.1, where the unique features are highlighted. First, the signal of the controlled variable is converted from analog (e.g., 420 mA) to a digital representation. Then the control calculation is performed, and finally, the digital result is converted to an analog signal for transmission to the final control element. Process plants usually involve many variables, which are controlled and mon itored from a centralized location. A digital control system to achieve these re quirements is shown in Figure 11.2. Each measurement signal for control and
Digital value
Digital value
Digital control calculation
Structure of the Digital Control System
D/A and hold
Sample and A/D
420 mA
420 mA
mV
Compressed ^r\ I/P
<3)
air
J 315 psi
Thermocouple in thermowell
&3 Valve
Process
FIGURE 11.1
Schematic of single feedback control loop using digital calculation. * Monitoring * History * Optimization
Operators' console
VDU
Digital computer
VDU
Digital communication
Specialpurpose processor
j/Pr controller Additional controllers
A/D
A/D
D/A
D/A
359
* Input only * Safety control system
Signal transmission to/from process
FIGURE 11.2
Schematic of a distributed digital control system. monitoring is sent through an analogtodigital (A/D) converter to a digital com puter (or microprocessor, ^tPr). The results of the digital control calculations are converted for transmission in a digitaltoanalog (D/A) converter. The system may have one processor per control loop; however, most industrial systems have sev eral measurements and controller calculations per processor. Systems with 32 input measurements and 16 controller outputs per processor are not uncommon. This design is less costly, although it is somewhat less reliable, because several control loops would be affected should a processor fail.
360 CHAPTER 11 Digital Implementation of Process Control
Some data from each individual processor is shared with other processors to enable proper display and human interaction. The information exchange is per formed via a digital communication network (local area network, LAN), which enables data sharing among processors and between each processor and the unit that provides operator interface, usually called the operator console. An operator console is required so that a person can monitor the process and intervene to make changes in variables such as a valve opening, controller set point, or controller status (automatic or manual). Thus, the controller set point and tuning constants must be communicated from the console, where they are entered by a person, to the processor, where the control calculation is being performed. Also, the values of the controlled and manipulated variables should be communicated from the controller to the console for display to the person. Some data that is not typically communi cated from the individual control processors would be intermediate values, such as the integral error used in the controller calculation. The operator console has its own processor and data storage and has visual displays (video display units, VDUs), audio annunciators, and a means, such as a keyboard, for the operator to interact with the control variables. Graphical display of variables, which is easier to interpret, is used along with digital display, which is more precise. Also, variables can be superimposed on a schematic of the process to aid operators in placing data in context. To add flexibility, more powerful processors can be connected to the local area network so that they can have access to the process data. These processors can perform tasks that are not timecritical. Examples are processmonitoring cal culations and process optimization, which may adjust variables infrequently (e.g., once every few hours or shift). Since each digital processor performs its functions serially, it must have a means for deciding which task from among many to perform first. Thus, each processor has a realtime operating system, which organizes tasks according to a defined priority and schedule. For example, the control processor would consider its control calculations to be of high priority, and the operators' console would consider a set point change to be of high priority. Lowerpriority items, such as monitoring calculations, are performed when free time is available. An important aspect of realtime calculating is the ability to stop a lowerpriority task when a highpriority task appears. This is known as a priority interrupt and is an integral software feature of each processor in a digital control system. The goal, which is nearly completely achieved, is that the integrated digital system responds so fast that it is indistinguishable from an instantaneous system. Since each function is performed in series, each step in the control loop must be fast. For most modern equipment, the analogtodigital (A/D) and digitaltoanalog (D/A) conversions are very fast with respect to other dynamics in the digital equipment or the process. Each processor is designed to guarantee the execution of highpriority control tasks within a specified period, typically within 0.1 to 1 second. When estimating the integrated system response time, it is important to con sider all equipment in the loop. For example, response to a set point change, after it is entered by a person, includes the execution periods of the console processor, digital communication, control processor, and D/A converter with hold circuit and the dynamic responses of the transmission to the valve and of the valve. This total system might involve several seconds, which is not significant for most process
control loops but may be significant for very fast processes, such as machinery control. Another important factor in the control equipment is the accuracy of many signal conversions and calculations, which should not introduce errors that signif icantly influence the accuracy of the control loop. The values in the digital system are communicated with sufficient resolution (16 or more bits) that errors are very small. Typically, the A/D converter has an error on the order of ±0.05% of the sensor range, and the D/A converter has an error on the order of ±0.1 % of the final element range. In older digital control computers, calculations were performed in fixedpoint arithmetic; however, current equipment uses floatingpoint arithmetic, so that roundoff errors are no longer a significant problem. As a result, the errors oc curring in the digital system are not significant when compared to the inaccuracies associated with the sensors, valves, and process models in common use. The system in Figure 11.2 and described in this section is a network of com puters with its various functions distributed to individual processors. The type of control system is commonly called a distributed control system (DCS). Today's digital computers are powerful enough that one central computer could perform all of these functions. However, the distributed control structure has many advan tages, some of the most important of which are presented in Table 11.1. These advantages militate for the continued use of the distributed structure for control equipment design, regardless of future increases in computer processing speed. The major disadvantage of modern digital systems, which is not generally true for analog systems, is that few standards for design or interfacing are being observed. As a result, it is difficult to mix the equipment of two or more digital equipment suppliers in one control system.
TABLE 11.1
Features of a distributed control system (DCS) Feature
Effect on process control
Calculations performed in parallel by numerous processors
Control calculations are performed faster than if by one processor.
Limited number of controller calculations performed by a single processor
Control system is more reliable, because a processor failure affects only few control loops.
Control calculations and interfacing to process independent of other devices connected to the LAN
Control is more reliable, because failures of other devices do not immediately affect a control processor.
Small amount of equipment required for the minimum system
Only the equipment required must be purchased, and the system is easily expanded at low cost.
Each type of processor can have different hardware and software
Hardware and software can be tailored to specific applications like control, monitoring, operator console, and general data processing.
m
361 Structure of the Digital Control System
362 CHAPTER 11 Digital Implementation of Process Control
In conclusion, the control system in Figure 11.2 is designed to provide fast and reliable performance of process control calculations and interactions with plant personnel. Clearly, the computer network is complex and requires careful design. However, the plant operations personnel interact with the control equipment as though it were one entity and do not have to know in which computer a particular task is performed. Also, considerable effort is made to reduce the computer pro gramming required by process control engineers. For the most part, the preparation of control strategies in digital equipment involves the selection and integration of preprogrammed algorithms. This approach not only reduces engineering time; it also improves the reliability of the strategies. While distributed digital systems are the predominant structure for digital control equipment, the principles presented in the remainder of the chapter are applicable to any digital control equipment.
11.3 El EFFECTS OF SAMPLING A CONTINUOUS SIGNAL The digital computer operates on discrete numerical values of the measured con trolled variables, which are obtained by sampling from the continuous signal and converting this signal to digital form via A/D conversion. In this section, the way that the sampling is performed and the effects of sampling on process control are reviewed. As one might expect, some information is lost when a continuous signal is represented by periodic samples, as shown in Figure 11.3a through c. These figures show the results of sampling a continuous sine function in Figure 11,3a at a constant period, which is the common practice in process control and the only situation considered in this book. The sampled values for a small period (high frequency) in Figure 11.3b appear to represent the true, continuous signal closely, and the continuous signal could be reconstructed rather accurately from the sam pled values. However, the sampled values for a long period in Figure 11.3c appear to lose important characteristics of the continuous measurement, so that a recon struction from the sampled values would not accurately represent the continuous signal. The effects of sampling shown in Figure 11.3 are termed aliasing, which refers to the loss of highfrequency information due to sampling. An indication of the information lost by the sampling process can be deter mined through Shannon's sampling theorem, which is stated as follows and is proved in many textbooks (e.g., Astrom and Wittenmark, 1990).
A continuous function with all frequency components at or below co' can be repre sented uniquely by values sampled at a frequency equal to or greater than 2a/.
The importance of this statement is that it gives a quantitative relationship for how the sampling period affects the signal reconstruction. The relationship stated is not exactly applicable to process control, because the reconstruction of the signal for any time t' requires data after t', which would introduce an undesirable delay in the reconstructed signal being available for feedback control. However, the value given by the statement provides a useful bound that enables us to estimate the frequency range of the measurement signal that is lost when sampling at a specific frequency.
363
EXAMPLE 11.1.
The composition of a distillation tower product is measured by a continuous sensor, and the variable fluctuates due to many disturbances. The dominant variations are of frequencies up to 0.1 cycle/min (0.628 rad/min). At what frequency should the signal be sampled for complete reconstruction using the sampled values? If the signal has no frequency components above 0.1 cycles/min, the sampling frequency should be 1.256 rad/min for complete reconstruction. However, most signals have a broad range of frequency components, including some at very high frequencies. Thus, a very high sampling frequency would be required for complete reconstruction of essentially all process measurement signals.
1 0.8
11
0.6 0.4 0.2 0 0.2
11
0.4 ■0.6 0.8 1
4
in1
ill 8
12 Time
16
1
Effects of Sampling a Continuous Signal
1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8
• i
20
24
1
Time ib)
ia)
1
0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1
Time ic) FIGURE 11.3
Digital sampling: (a) example of continuous measurement signal; ib) results of sampling of the signal with a period of 2; ic) results of alternative sampling of the signal with a period of 12.8.
364 CHAPTER 11 Digital Implementation of Process Control
Fortunately, our goal is not to reconstruct the signal perfectly but to provide sufficient information to the controller to achieve good dynamic performance. Thus, it is often possible to sample much less frequently than specified by Shannon's theorem and still achieve good control performance (Gardenhire, 1964). If the signal has substantial highfrequency components with significant amplitudes, the continuous signal may have to be filtered, as discussed in Chapter 12. There are many options for using the sampled values to reconstruct the signal approximately. Two of the most common, zero and firstorder holds, are consid ered here. The simplest is the zeroorder hold, which assumes that the variable is constant between samples. The firstorder hold assumes that the variable changes in a linear fashion as predicted from the most recent two samples. These two methods are compared in Figures 11.4 and 11.5, where the main difference is the amplifica
0.5 
1.5
FIGURE 11.4
Zeroorder hold. 1.5 1 4
0.5
\\
0 f\
0.5 
1 1.5
0
I
'
1
I
1
5
10
15 Time
20
25
FIGURE 11.5
Firstorder hold.
30
365 The Discrete PID Control Algorithm
FIGURE 11.6
Reconstruction of signal after zeroorder hold. tion in the magnitude caused by the firstorder hold. Also, the firstorder hold has a larger phase lag, which is undesirable for closedloop control. For both of these reasons, the simpler zeroorder hold is used almost exclusively for process control. The effect of the zeroorder hold on the dynamics can be seen clearly if we re construct the original signal as shown in Figure 11.6. In the figure, the reconstructed signal is a smooth curve through the midpoint of the zeroorder hold. It is apparent that the reconstructed signal after the zeroorder hold is identical to the original signal after being passed through a dead time of Ar/2, where the sample period is At (Franklin et al., 1990). This explains the rule of thumb that the major effect on the stability and control performance of sampling can be estimated by adding At/2 to the dead time of the system. Since any additional delay due to sampling is undesirable for feedback control and process monitoring, feedback control per formance degrades as the process dynamics, including sampling, become slower. Therefore, the controller execution period should generally be made short. In some cases, monitoring process operations requires high data resolution, because shortterm changes in key variables can significantly influence process safety and profit. However, process monitoring also involves variables that change slowly with time, such as a heat transfer coefficient, and the data collected for this purpose does not have to be sampled rapidly. In conclusion, sampling is the main difference between continuous and digital control. Since process measurements have components at a wide range of frequen cies, some highfrequency information is lost by sampling. The effect of sampling on control performance, with a zeroorder hold used for sampling, is addressed after the digital controller algorithm is introduced in the next section. 11.4 n THE DISCRETE PID CONTROL ALGORITHM The proportionalintegralderivative control algorithm presented in Chapter 8 is continuous and cannot be used directly in digital computations. The algorithm appropriate for digital computation is a modified form of the continuous algorithm
that can be executed periodically using sampled values of the controlled variable to determine the value for the controller output. The controller output passes through a digitaltoanalog converter and a zeroorder hold; therefore, the signal to the final control element is changed to the result of the last calculation and held at this value until the next controller execution. The digital calculation should approximate the continuous PID algorithm:
366 CHAPTER 11 Digital Implementation of Process Control
MV(0
= Kc\Eit) + yJo E(t')dt'Td
+/
(11.1)
The method for approximating each mode is presented in equations (11.2) to (11.4). In these equations the value at the current sample is designated by the subscript N and the ith previous sample by N — i. Thus the current values of the controlled variable, set point, and controller output are CVn, SP#, and MV#, respectively. The error is defined consistently with continuous systems as En = SP# — CVN. Proportional mode: (MVjv)prop = KcEn
(11.2)
Integral mode:
(MV„)int Tl=7=T ^f>
(11.3)
Derivative mode: (MVN)der = KC^(CVN  CV*.,) (11.4) At The proportional term is selfexplanatory. The integral term is derived by approxi mating the continuous integration with a simple rectangular approximation. Those familiar with numerical methods recognize that this is not as accurate an approx imation as possible with other integration methods used in numerical analysis (Gerald and Wheatley, 1989). However, small numerical errors in this calculation are not too important, because the integral mode continues to make changes in the output until the error is zero. Thus, zero steadystate offset for steplike inputs is not compromised by small numerical errors. Note that all past values of the error do not have to be stored, because the summation can be calculated recursively according to the equation N
Sn = 2^ Ei = En + Sni
(11.5)
/=i
where Sn i = J^i' Ei ^^ls stored from the previous controller execution. The derivative is approximated by a backward difference. This approximation provides some smoothing; for example, the derivative of a perfect step is not infinite using equation (11.4), since At is never zero. The three modes are combined into the fullposition PID control algorithm: Fullposition Digital PID
MVN = Kc
At
n
Td_ ^ + TifE£' t;(cv"  cv*i) + / At /=i
(11.6)
Note that the constant of initialization is retained so that the manipulated variable does not change when the controller initiates its calculations. Equation (11.6) is referred to as the fullposition algorithm because it cal culates the value to be output to the manipulated variable at each execution. An alternative approach would be to calculate only the change in the controller output at each execution, which is achieved with the velocity form of the digital PID: AMVa, = Kc \en  ENi + ye" ^(CVa/ 2CVAT! +CVa,_2)1 (11.7) MVa, =MV,v_, +AMV,v
(11.8)
This equation is derived by subtracting the fullposition equation (11.6) at sample N — 1 from the equation at sample N. Either the fullposition or the velocity form can be used, and many commercial systems are in operation with each basic algorithm. The digital PID controller, either equation (11.6) or (11.7), can be rapidly executed in a process control computer. Only a few multiplications of current or recent past values times parameters and a summation are required. Also, little data storage is required for the parameters and few past values. In conclusion, simple numerical methods are adequate for approximating the integral and derivative terms in the PID controller. As a result, the controller modes, set point, and tuning constants are the same in the digital PID algorithm as they are in the continuous algorithm. This is very helpful, because we can apply what we have learned in previous chapters about how the modes affect stability and performance to the digital algorithm. For example, it can be shown for the digital controller that the integral mode is required for zero steadystate offset and that the derivative mode amplifies highfrequency noise. 11.5 □ EFFECTS OF DIGITAL CONTROL ON STABILITY, TUNING, AND PERFORMANCE The tuning of continuous control systems is presented in Chapter 9, and stability analysis is presented in Chapter 10. A similar, mathematically rigorous analysis of the stability of digital control systems can be performed and is presented in Ap pendix L. This section provides the essential results without detailed mathematical proofs. The major differences in digital systems are highlighted, modifications to existing tuning guidelines are provided, and examples are presented to demonstrate the results. The measures of control performance and the definition of stability are the same as introduced in previous chapters. As described in Section 11.3, sampling introduces an additional delay in the feedback system, and this delay is similar to, but not the same as, a dead time. Thus, we expect that longer sampling will tend to destabilize a feedback system and degrade its performance. EXAMPLE 11.2. As an example, we consider a feedback control system for which the transfer functions for the process and disturbance are as follows and the disturbance is a
367 Effects of Digital Control on Stability, Tuning, and Performance
Velocity Digital PID
368
step of magnitude 3.6: l.Oe"21
CHAPTER 11 Digital Implementation of Process Control
Gpis) = Gds) =
(105 + l)(0.2.y + 1) 1 (& + l)(lQs + l)
■1.0*' 2.2s
(10^ + 1) 3.6 Dis) = — s
(11.9)
The performance of the system under continuous PI feedback control is given in Figure 11.7a using the Ciancone tuning from Figure 9.9. The performance is given in Figure 11 lb under discrete PI control with an execution period of 9, using the same tuning as in Figure 11.7a. We notice that the discrete response is more oscillatory and gives generally poorer performance. Several other responses were simulated, and their results are summarized in Table 11.2. When the execution period was made long, in this case 10 or greater, the control system became unstable! i
r
t
1
r
CV'(r)
CV'(/) 
MV'(f) 
j
L Time
150
ia)
CV'(0 
MV'(f) 
FIGURE 11.7
Example process: (a) under continuous control; ib) under digital PI control with At = 9 using continuous tuning; (c) under digital control with At = 9 using altered tuning from Table 113.
TABLE 11.2
369
Example of the performance of PI controllers for various execution periods with Kc = 1.7 and T, = 5.5
Execution period
IAE
Continuous 0.5 1.0 3.0 7.0 9.0 10.0
18.9 18.9 19.1 19.9 25.8 32.0 Unstable
This example shows that the control performance generally degrades for increasing sample periods and that the system can become unstable at long periods. Since sampling introduces a delay in the feedback loop, we would expect that the tuning should be altered for digital systems to account for the sampling. The re sult in Section 11.3 indicated that the sample introduced an additional delay, which can be approximated as a dead time of At/2. Thus, one common approach for tun ing PID feedback controllers and estimating their performance is to add At/2 to the feedback process dead time and use methods and guidelines for continuous systems (Franklin, Powell, and Workman, 1990). The tuning rules developed in Chapters 9 and 10 can be applied to digital systems with the dead time used in the calculations equal to the process dead time plus onehalf of the sample period
(i.e., 6' = 6 + At/2).
As demonstrated in Example 11.2, slow digital PID controller execution can degrade feedback performance. Also, as the execution becomes faster, i.e., as the execution period becomes smaller, the performance is expected to approach that achieved using a continuous controller. Thus, a key question is "Below what value of the PID controller execution period do the digital and continuous controllers provide nearly the same performance?" The following guideline, based on expe rience, is recommended for selecting controller execution period:
To achieve digital control performance close to continuous performance, select the PID controller execution period At < 0.05(^ + r), with 9 and r the feedback dead time and dominant time constant, respectively.
The execution period is proportional to the feedback dynamics, which seems logical because faster processes would benefit from faster controller execution. Many of the modern digital control systems have execution periods less than 1 sec; therefore, this guideline is easily achieved for most chemical processes. However, it may not be easily achieved for (1) fast processes, such as pressure control of
Effects of Digital Control on Stability, Tuning, and Performance
370 CHAPTER 11 Digital Implementation of Process Control
liquidfilled systems, or (2) control systems using analyzers that provide a new measurement infrequently. The preceding discussion is summarized in the following tuning procedure:
1. Obtain an empirical model. 2. Determine the sample period [e.g., At < 0.05(0 + t)]. 3. Determine the tuning constants using appropriate methods (e.g., Ciancone cor relation or ZieglerNichols method) with 9' =6 + At/2. 4. Implement the initial tuning constants and finetune.
As stated previously, the values obtained from these guidelines should be con sidered initial estimates of the tuning constants, which are to be evaluated and improved based on empirical performance through finetuning. EXAMPLE 11.3.
Apply the recommended method to tune a digital controller for the process defined in equation (11.9). Results for several execution periods are given in Table 11.3, with the tuning again from the Ciancone correlations in Figure 9.9, and the control performance is shown in Figure 11 Jc for an execution period of 9. Note that in all cases, including that with an execution period of 10, the dynamic performance is stable and well behaved (not too oscillatory). Recall that the performance could be improved (IAE reduced) with some finetuning, but at the expense of robustness. It is apparent that the dynamic response is well behaved, with a reasonable damping ratio and moderate adjustments in the manipulated variable, when the digital controller is properly tuned. Also, it is clear that the performance of the digital controller is not as good as that of the continuous controller. In fact,
The performance of a continuous process under digital PID control is nearly always worse than under continuous control. The difference depends on the length of the execution period relative to the feedback dynamics.
TABLE 11.3
Example of the performance of PI controllers for various execution periods with tuning adjusted accordingly Execution period At Continuous 1 3 5 7 9 10
Dead time 0' = 9 + At/2 2.2 2.7 3.7 4.7 5.2 6.7 7.2
Fraction dead time
e'/iO' + x) 0.18 0.21 0.27 0.32 0.34 0.40 0.42
IAE
K,
1.7 1.76 1.50 1.23 1.2 1.05 1.0
5.5 6.1 8.9 10.3 10.6 11.0 11.1
18.9 19.2 26.8 36.0 37.2 42.7 44.8
Note that the execution period is related to the dynamics of the feedback process, since "fast" and "slow" must be relative to the process. A guideline drawn from Table 11.3 is that the effect of sampling and digital control is not usually significant when the sample period is less than about 0.05(0 + r). For a summary of many other guidelines, see Seborg, Edgar, and Mellichamp (1989).
371 Effects of Digital Control on Stability, Tuning, and Performance
Occasionally, controllers give poor performance that is a direct result of the digital implementation. This type of performance is shown in Figure 11.8a, in which a digital PI controller with a relatively slow execution period is controlling a process with very fast dynamics. The models for the process and controller are as follows: Process:
1.0 0.55 + 1
Controller:
mvn = kc(en + ^JTeA
(11.10)
with At = 0.5 (11.11)
The oscillations in the manipulated variable are known as ringing. Diagnosing the causes of ringing requires mathematics (ztransforms) (Appendix L). However, the cause of this poor performance can be understood by considering the digital controller equation (11.11). The controller adjusts the manipulated variable to cor rect an error (e.g., a large positive adjustment). If a large percentage of the effect of the correction appears in the measured control variable at the next execution, the current error En can be small while the past error, Eni, will be large with a negative sign, causing a large negative adjustment in the manipulated variable. The result is an oscillation in the manipulated variable every execution period,
i
CV'it) 
1
1
1
1
1
i
i
L
1
1
r
J
L
CV'it) 
MV\t) MV (/)
r 5
L
i
i
i
15
Time ib) FIGURE 11.8
Digital control of a fast process (a) with Kc = 1.4 and T, = 7.0; ib) with Kc = 0.14 and T, = 0.64.
372 CHAPTER 11 Digital Implementation of Process Control
which is very undesirable. In this case, the oscillations can be reduced by decreasing the controller gain and decreasing the integral time, so that the controller behaves more like an integral controller. The improved performance for the altered tuning is given in Figure 11.8Z?. This type of correction is usually sufficient to reduce ringing for PID control. We have seen that the digital controller generally gives poorer performance than the equivalent continuous controller, although the difference is not significant if the controller execution is fast with respect to the feedback process.
11.6 El EXAMPLE OF DIGITAL CONTROL STRATEGY To demonstrate the analysis of a control system for digital control, the execution periods for the flash system in Figure 11.9 are estimated. The process associated with the flow controller is very fast; thus, the execution period should be fast, and perhaps, the controller gain may have to be decreased due to ringing. The level inventory would normally have a holdup time (volume/flow) of about 5 min, so that very frequent level controller execution is not necessary. Let us assume that the analyzer periodically takes a sample from the liquid product and determines the composition by chromatography. In this case, the an alyzer provides new information to the controller at the completion of each batch analysis, which can be automated at a period depending on the difficulty of sep aration. For example, a simple chromatograph might be able to send an updated measured value of the controlled variable every 2 min. Since the analyzer controller should be executed only when a new measured value is available, the controller execution period should be 2 min. The execution periods can be approximated using the guideline of At = 0.05(0 + x) for PID controllers, with the process parameters determined by one of the empirical model identification methods described in Chapter 6. Modern digital controllers typically execute most loops very frequently, usually with a period under 1 sec, unless the engineer specifies a longer period. The results for the example are summarized in Table 11.4. Notice that the conventional digital systems might not satisfy the guideline for very fast processes, but the resulting small degradation of the control perfor
Steam FIGURE 11.9 Example process for selecting controller execution periods.
Liquid
TA B L E
11 . 4
373
D i g i t a l c o n t r o l l e r e~x~e c u t i o n "p e r i o d s ; f o r t h e ;e x a m p l eT ri en n dFsi g u r e 11 i. n9 i w w * w jDmi gj j i«t «a il Maximum execution Typical execution period Control Controlled variable period in commercial equipment Flow 0.2 Level 15 Analyzer
sec sec 2
0.1 0.1 min
to to 2
0.5 0.5 min
sec sec
mance is not usually significant for most flows and pressures. When the variable is extremely important, as is the case in compressor surge control, which prevents damage to expensive mechanical equipment, digital equipment with faster execu tion (and sensors and valves with faster responses) should be used (e.g., Staroselsky andLadin, 1979). The analyzer has a very long execution period; therefore, it would be best to select the execution immediately when the new measured value becomes available, rather than initiate execution every 2 min whether the updated measurement is available or not. Thus, it is common practice for the controller execution to be synchronized with the update of a sensor with a long sample period; this is achieved through a special signal that indicates that the new measured value has just arrived.
11.7 J TRENDS IN DIGITAL CONTROL The basic principles presented in this chapter should not change as digital control equipment evolves. However, many of the descriptions of the equipment will un doubtedly change; in fact, the simple descriptions here do not attempt to cover all of the newer features being used. A few of the more important trends in digital control are presented in this section.
Signal Transmission The equipment described in this chapter involves analog signal transmission be tween the central control room and the sensor and valve. It is possible to collect a large number of signals at the process equipment and transmit the information via a digital communication line. This digital communication would eliminate many— up to thousands—of the cables and terminations and result in great cost savings. The reliability of this digital system might not be as good, because the failure of the single transmission line would cause a large number of control loops to fail simultaneously. However, the potential economic benefit provides a driving force for improved, highreliability designs. This is a rapidly changing area for which important standards are being developed that should facilitate the integration of equipment from various suppliers (Lidner, 1990; Thomas, 1999). It is possible to communicate without physical connections, via telemetry. This method is now used to collect data from remote process equipment such as crude petroleum production equipment over hundreds of kilometers. When telemetry is sufficiently reliable, some control could be implemented using this communication method.
374
Smart Sensors
CHAPTER 11 Digital Implementation of Process Control
Microprocessor technology can be applied directly at the sensor and transmitter to provide better performance. An important feature of these sensors is the ability for selfcalibration—that is, automatic corrections for environmental changes, such as temperature, electrical noise, and process conditions.
Operator Displays Excellent displays are essential so that operating personnel can quickly analyze and respond to everchanging plant conditions. Current displays consist of multiple cathode ray tubes (CRTs). Future display technology is expected to provide flat screens of much larger area. These larger screens will allow more information to be displayed concurrently, thus improving process monitoring.
Controller Algorithms The flexibility of digital calculations eliminates a restriction previously imposed by analog computation that prevented engineers from employing complex algorithms for specialpurpose applications. Some of the most successful new algorithms use explicit dynamic models in the controller. These algorithms are presented in this book in Chapter 19 on predictive control and in Chapter 23 on centralized multivariable control.
Monitoring and Optimization The large amount of data collected and stored by digital control systems provides an excellent resource for engineering analysis of process performance. The results of this analysis can be used to adjust the operating conditions to improve product quality and profit. This topic is addressed in Chapter 26.
11.8 a CONCLUSIONS Digital computers have become the standard equipment for implementing process control calculations. However, the trend toward digital control is not based on better performance of PID control loops. In fact, the material in this chapter demonstrates that most PID control loops with digital controllers do not perform as well as those with continuous controllers, although the difference is usually very small. The sampling of a continuous measured signal for use in feedback control introduces a limit to control performance, because some highfrequency informa tion is lost through sampling. Shannon's theorem provides a quantitative estimate of the frequency range over which information is lost. Sampling and discrete execution introduce an additional dynamic effect in the feedback loop, which influences stability and performance. Guidelines are provided that indicate how the PID controller tuning should be modified to re tain the proper margin from the stability limit while providing reasonable control performance. As we recall, the stability margin is desired so that the control sys tem performs well when the process dynamic response changes from its estimated value—in other words, so that the system performance is robust.
A major conclusion from this chapter is that
The characteristics of the modes and tuning constants for the continuous PID con troller can be interpreted in the same manner for the digital PID controller. The digital PID controller must use modified tuning guidelines to achieve good performance and robustness.
This valuable result enables us to apply the same basic concepts to both continuous analog and digital controllers. The power of digital computers is in their flexibility to execute other control algorithms easily, even if the computations are complex. All control methods described in subsequent chapters can be implemented in either analog or digital calculating equipment, unless otherwise stated. Where the digital implementation is not obvious, the digital form of the controller algorithm is given.
This power will be capitalized on when applying advanced methods such as non linear control (Chapters 16 and 18), inferential control (Chapter 17), predictive control (Chapters 19 and 23), and optimization and statistical monitoring (Chap ter 26). Many of the guidelines and recommendations in this chapter have been verified through simulation examples. For continuous control systems, rigorous proofs and methods of analysis have been provided using Laplace transforms, for example, in Chapter 10 (and the forthcoming Chapter 13). Similar analysis methods are available for digital control systems using ztransforms. An introduction to ztransforms and their application to digital control systems analysis are provided in Appendix L.
REFERENCES Astrom, K., and B. Wittenmark, Computer Controlled Systems, PrenticeHall, Englewood Cliffs, NJ, 1990. Franklin, G., J. Powell, and M. Workman, Digital Control of Dynamic Systems (2nd ed.), AddisonWesley, Reading, MA, 1990. Gardenhire, L., "Selecting Sampling Rates," ISA J., 5964 (April 1964). Gerald, C, and P. Wheatley, Applied Numerical Analysis (4th ed.), AddisonWesley, Reading, MA, 1989. Lidner, KR, "Fieldbus—A Milestone in Field Instrumentation Technology," Meas. Control, 23, 272277 (1990). Seborg, D., T. Edgar, and D. Mellichamp, Process Dynamics and Control, Wiley, New York, 1989. Staroselsky, N., and L. Ladin, "Improved Surge Control for Centrifugal Com pressors," Chem. Engr., 86, 175184 (May 21, 1979). Thomas, J., "Fieldbuses and Interoperability," Control Engineering Practice, 7,8194(1999).
376 CHAPTER 11 Digital Implementation of Process Control
ADDITIONAL RESOURCES Each commercial digital control system has an enormous array of features, making comparisons difficult. A summary of the equipment for some major suppliers is provided in the manual Wade, H. (ed.), Distributed Control Systems Manual, Instrument Society of America, Research Triangle Park, NC, 1992 (with periodic updates). In addition to the references by Astrom and Wittenmark (1990) and by Franklin et al. (1990), the following book gives detailed information on ztransforms and digital control theory. Ogata, K., DiscreteTime Control Systems, PrenticeHall, Englewood Cliffs, NJ, 1987. For an analysis of digital controller execution periods that considers the dis turbance dynamics for statistical, rather than deterministic, disturbances, see MacGregor, J., "Optimal Choice of the Sampling Interval for Discrete Process Control," Technometrics, 18, 2,151160 (May 1976).
QUESTIONS 11.1. Answer these questions about the digital PID algorithm. (a) Give the equations for the fullposition and velocity PID controllers if a trapezoidal numerical integration were used for the integral mode. (b) The digital controller can be simplified to the following form to reduce realtime computations. Determine the values for the constants (the A,s) in terms of the tuning constants and execution period for (i) PID, (ii) PI, and (iii) PD controllers. AMV* = AXEN + A2EN\ + A3CVN + A4CV,v_i + A5CVN2 11.2. Many tuning rules were designed for continuous control systems, such as ZieglerNichols, Ciancone, and Lopez. (a) Describe the conditions, including quantitative measures, for which these tuning rules could be applied to digital controllers without mod ification. (b) How could you adjust the rules to systems that had longer execution periods than determined by the approximate guidelines given in part (a) of this question? 11.3. Develop a simulation of a simple process under digital PID control. Equa tions for the process are given below. The calculations can be performed using a spreadsheet or a programming language. The input change is a step set point change from 1 to 2.0 at time = 1.0. The process parameters can be taken from the system in Section 9.3; Kp = 1.0, x = 5.0, and 9 = 5.0, and the controller and simulation time steps can be taken to be equal; that
is,
8t
=
At
=
1.0.
377
Process: CV* = (eSt^)CVNi + Kp(\  eSt^)MVNr\ T = £ Questions
Controller: MVN = MVN\ + Kc (en  ENi + jrEN) with St = step size for the numerical solution of the process equation At = execution period of the digital controller (a) Verify the equations for the process and controller and determine the initial conditions for MV and CV. (b) Repeat the study summarized in Figure 9.2 for a set point change. (c) Use the tuning in Table 9.2 to obtain the IAE for set point changes. (d) Select tuning from several points on the response surface in Figure 9.3. Obtain the dynamic responses and explain the behavior: oscillatory, overdamped, and so forth. 11.4. Repeat question 11.3 for the system in Example 8.5 and obtain the dynamic response given in Figure 8.9. You must determine all parameters in the equations, including appropriate values for the process simulation step size and the execution period of the digital controller. Solve this problem by simulating (1) the linearized process model and (2) the nonlinear process model. 11.5. State for each of the controller variables in the following list (a) its source (e.g., from an operator, from process, or from a calculation) (b) whether the variable would be transferred to the operator console for display (1) SPyv, the controller set point (2) CV#, the current value of the controlled variable (3) Kc, the controller gain (4) Sn, the sum of all past errors used in approximating the integral error (5) MVjv, the current controller output (6) M/A, the status of the controller (M=manual or off, A=automatic or on) (7) AMV/v, the current change to the manipulated variable (8) En, the current value of the error 11.6. A process control design is given in Figure Ql 1.6. The process transfer functions Gp(s) follow, with time in minutes: (Gp(s))T = ——.../„\=1 . o~ \%open/ vds) \+2s / wt% \ Ads) \.3e~°5s (Gp(s))A = v2(s) 1 + 14s \% open/ (a) For each controller, determine the maximum execution period so that digital execution does not significantly affect the control performance. (b) Determine the PID controller tuning for each controller for two values of the execution period: (1) The result in (a) and (2) a value of 3 minutes
378 CHAPTER 11 Digital Implementation of Process Control
FIGURE Ql 1.6 11.7. In the chapter it was stated that the digital controller should not be executed faster than the measured controlled variable is updated. In your own words, explain the effect of executing the controller faster than the measurement update and why this effect is undesirable. 11.8. An example of ringing occurs when a digital proportionalonly controller is applied to a process that is so fast that it reaches steady state within one execution period, At. The following calculations, which are simple enough to be carried out by hand, will help explain ringing. (a) Calculate several steps of the response of a control system with a steadystate process with Kp = 1.0(6 = x = 0) and a proportionalonly controller, Kc = 0.8. Assume that the system is initially at steady state and a set point change of 5 units is made. (b) Repeat the calculation for an integralonly controller, equation (8.16). Find a value of the parameter (KcAt/ Ti) by trial and error that gives good dynamic performance for the controlled and manipulated vari ables. (c) Generalize the results in (a) and (b) and give a tuning rule for integralonly, digital control of a fast process. 11.9. Some example process dynamics and associated digital feedback execution periods are given in the following table. For each, calculate the PI controller tuning constants, assuming standard control performance objectives. Process transfer function Gp(s)
Execution period
(a) (b)
Threetank mixer, Example 7.2 Recycle system in equation (5.51)
Selected by reader Selected by reader
(c)
1 + 0.5s 1.2
(d) (e) (f)
1.2g°"
2.\e~2Qs
1 + 100s 2.\e~m$ 1+20*
At
0.25 5.0 30 30
11 . 1 0 . C o n s i d e r i n g t h e d e s c r i p t i o n o f a d i s t r i b u t e d d i g i t a l c o n t r o l s y s t e m , d e  3 7 9 termine which processors, signal converters, and transmission equipment %Mmmmmmmmmm\ must act and in what order for (a) the result of an operatorentered set point Questions change to reach the valve; (b) a process change to be detected and acted upon by the controller so that the valve is adjusted. 11.11. Consider a signal that is a perfect sine with period T^nai, and is sampled at period TsampiQ, with rsampie < rsigna. Determine the primary aliasing frequency (the sample frequency at which the sampled values are periodic with a period a multiple of the true signal sine frequency) as a function of the two periods. 11.12. (a) Determine bounds on the error between the continuous signal and the output of the sample/hold for a zeroorder and a firstorder hold. (Hint: Consider the rate of change of the continuous signal.) (b) Apply the results in (a) to a continuous sine signal and determine the errors for various values of the sample period to sine period. (c) Which hold gives a smaller error in (b)l 11.13. Answer the following questions regarding the computer implementation of the digital PID controller. (a) Can the controller tuning constants be changed while the controller is functioning without disturbing the manipulated variable? (Consider the velocity and fullpositional forms separately.) (b) For the velocity form of the PID, what is the value for MWN\ for the first execution of the controller? (c) For the fullposition form of the PID, the sum of the error term might become very large and overflow the word length. Is this a problem likely to occur? (d) Discuss how the calculations could be programmed to introduce limits on the change of the manipulated variable (AMV^), the set point (SPw), and the manipulated variable (MV#). (e) Can you anticipate any performance difficulties when the limitations in (d) are implemented? If yes, suggest modifications to the algorithm.
Practical Application of Feedback Control 12.1 n INTRODUCTION The major components of the feedback control calculations have been presented in previous chapters in this part. However, much more needs to be done to ensure the successful application of the principles already covered. Practical application of feedback control requires that equipment and calculations provide accuracy and reliability and also overcome a few shortcomings of the basic PID control algorithm. Some of these requirements are satisfied through careful specification and maintenance of equipment used in the control loop. Other requirements are satisfied through modifications to the control calculations. The application issues will be discussed with reference to the control loop diagram in Figure 12.1, which shows that many of the calculations can be grouped into three categories: input processing, control algorithm, and output processing. As shown in Table 12.1, most of the calculation modifications are available in both analog and digital equipment; however, a few are not available on standard analog equipment, because of excessive cost. The application requirements are discussed in the order of the four major topics given in Table 12.1. A few key equipment spec ifications are presented first, followed by input processing calculations, performed before the control calculation. Then, modifications to the PID control calculation are explained. Finally, a few issues related to output processing are presented. The topics in this chapter are by no means a complete presentation of practical issues for successful application of control; they are limited to the most important
382
Proportional *Sign * Units
CHAPTER 12 Practical Application of Feedback Control
O^sp
Integral * Windup Output processing * Initialization * Limits
m
Derivative * Filter
Input processing * Validity * Linearization * Filtering
Sensor Process
FIGURE 12.1 Simplified control loop drawing, showing application topics.
TABLE 12.1 Summary of application issues
Application topic Equipment specification Measurement range Final element capacity Failure mode Input processing Input validity Engineering units Linearization Filtering Control algorithm Sign Dimensionless gain Antireset windup Derivative filter Output processing Initialization Bounds on output variable
Available in either analog or digital equipment
Typically available only in digital equipment
t t t X X X X X X X X X X
t Involves field control equipment that is independent of analog or digital controllers.
issues for singleloop control. Further topics, addressing design, reliability, and safety, are covered in Part VI after multipleloop processes and controls have been introduced.
12.2 n EQUIPMENT SPECIFICATION Proper specification of process and control equipment is essential for good control performance. In this section, the specification of sensors and final control elements is discussed. Sensors are selected to provide an indication of the true controlled variable and are selected based on accuracy, reproducibility, and cost. The first two terms are defined here as paraphrased from ISA (1979). Accuracy is the degree of conformity to a standard (or true) value when the device is operated under specified conditions. This is usually expressed as a bound that errors will not exceed when a measuring device is used under these specified conditions, and it is often reported as inaccuracy as a percent on the instrument range. Reproducibility is the closeness of agreement among repeated sensor outputs for the same process variable value. Thus, a sensor that has very good reproducibil ity can have a large deviation from the true process variable; however, the sensor is consistent in providing (nearly) the same indication for the same true process variable. Often, deviations between the true variable and the sensor indication occur as a "drift" or slow change over a period of time, and this drift contributes a bias error. In these situations, the accuracy of the sensor may be poor, although it may provide a good indication of the change in the process variable, since the sensitivity relationship (A sensor signal)/( A true variable) may be nearly constant. Although a sensor with high accuracy is always preferred because it gives a close indication of the true process variable, cases will be encountered in later chapters in which reproducibility is acceptable as long as the sensitivity is unaffected by the drift. For example, reproducibility is often acceptable when the measurement is applied in enhancing the performance of a control design in which the key output controlled variable is measured with an accurate sensor. The importance of accuracy and reproducibility will become clearer after advanced control designs such as cascade and feedforward control are covered; therefore, the selection of sensors is discussed again in Chapter 24. Often, inaccuracies can be corrected by periodic calibration of the sensor. If the period of time between calibrations is relatively long, a drift from high accuracy over days or weeks could result in poor control performance. Thus, critical instruments deserve more frequent maintenance. If the period between calibrations is long, some other means for compensating the sensor value for a drift from the accurate signal may be used; often, laboratory analyses can be used to determine the bias between the sensor and true (laboratory) value. If this bias is expected to change very slowly, compared with laboratory updates, the corrected sensor value, equalling measurement plus bias, can be used for realtime control. Further discussion on using measurements that are not exact, but give approximate indications of the process variable over limited conditions, is given in Chapter 17 on inferential control.
Sensor Range An important factor that must be decided for every sensor is its range. For essen tially all sensors, accuracy and reproducibility improve as the range is reduced, which means that a small range would be preferred. However, the range must be
383 Equipment Specification
384 CHAPTER 12 Practical Application of Feedback Control
large enough to span the expected variation of the process variable during typi cal conditions, including disturbances and set point changes. Also, the measure ment ranges are selected for easy interpretation of graphical displays; thus, ranges are selected that are evenly divisible, such as 10, 20, 50, 100, or 200. Naturally, each measurement must be analyzed separately to determine the most appropriate ranges, but some typical examples are given in the following table. Variable
Typical set point Sensor range
Furnace outlet temperature 600°C Pressure 50 bar Composition 0.50 mole %
550650°C 4060 bar 02.0 mole %
Levels of liquids (or solids) in vessels are typically expressed as a percent of the span of the sensor rather than in length (meters). Flows are often measured by pressure drop across an orifice meter. Since orifice plates are supplied in a limited number of sizes, the equipment is selected to be the smallest size that is (just) large enough to measure the largest expected flow. The expected flow is always greater than the design flow; as a result of the limited equipment and expected flow range, the flow sensor can usually measure at least 120 percent of the design value, and its range is essentially never an even number such as 0 to 100 m3/day. These simple guidelines do not satisfy all situations, and two important excep tions are mentioned here. The first special situation involves nonnormal operations, such as startup and major disturbances, when the variable covers a much greater range. Clearly, the suppressed ranges about normal operation will not be satis factory in these cases. The usual practice is to provide an additional sensor with a much larger range to provide a measurement, with lower accuracy and repro ducibility, for these special cases. For example, the furnace outlet temperature shown in Figure 12.2, which is normally about 600°C, will vary from about 20 to 600°C during startup and must be monitored to ensure that the proper warmup rate is attained. An additional sensor with a range of 0 to 800°C could be used for this purpose. The additional sensor could be used for control by providing a switch, which selects either of the sensors for control. Naturally, the controller tuning constants would have to be adapted for the two types of operation. A second special situation occurs when the accuracy of a sensor varies over its range. For example, a flow might be normally about 30 m3/h in one operating situation and about 100 m3/h in the other. Since a pressure drop across an orifice meter does not measure the flow accurately for the lower onethird of its range, two pressure drop measurements are required with different ranges. For this example, the meter ranges might be 0 to 40 and 0 to 120 m3/h, with the smaller range providing good accuracy for smaller flows. Control Valve The other critical control equipment item is the final element, which is normally a control valve. The valve should be sized just large enough to handle the maximum
385 Equipment Specification Feed 550650 °C
0800 °C
@ (ti)
Fuel FIGURE 12.2
Fired heater with simple control strategy.
expected flow at the expected pressure drop and fluid properties. Oversized control valves (i.e., valves with maximum possible flows many times larger than needed) would be costly and might not provide precise maintenance of low flows. The acceptable range for many valves is about 25:1; in other words, the valve can regulate the flow smoothly from 4 to nearly 100 percent of its range, with flows below 4 percent having unacceptable variation. (Note that the range of stable flow depends on many factors in valve design and installation; the engineer should consult specific technical literature for the equipment and process design.) Valves are manufactured in specific sizes, and the engineer selects the smallest valve size that satisfies the maximum flow demand. If very tight regulation of small changes is required for a large total flow, a typical approach is to provide two valves, as shown in Figure 12.3. This example shows a pH control system in which acid is adjusted to achieve the desired pH. In this design, the position of the large valve is changed infrequently by the operator, and the position of the small valve is changed automatically by the controller. Strategies for the controller to adjust both valves are presented in Chapter 22 on variablestructure control.
Sensors and final elements are sized to (just) accommodate the typical operating range of the variable. Extreme oversizing of a single element is to be avoided; a separate element with larger range should be provided if necessary.
Another important issue is the behavior of control equipment when power is interrupted. Naturally, a power interruption is an infrequent occurrence, but proper equipment specification is critical so that the system responds safely in this situation. Power is supplied to most final control elements (i.e., valves) as air pressure, and loss of power results from the stoppage of air compressors or from the failure of pneumatic lines. The response of the valve when the air pressure, which
Large valve Small valve Acid
iC*3
Feed
s
Acid
1" do
 @ .PH
^ r FIGURE 12.3
Stirredtank pH control system with two manipulated valves, of which only one is adjusted automatically.
386 CHAPTER 12 Practical Application of Feedback Control
fo
[®  { & — o fc
fc
^
Heating medium
C&r fo
FIGURE 12.4
A flash separation unit with the valve failure modes.
is normally 3 to 15 psig, decreases below 3 psig is called its failure mode. Most valves fail open or fail closed, with the selection determined by the engineer to give the safest process conditions after the failure. Normally, the safest conditions involve the lowest pressures and temperatures. As an example, the flash drum in Figure 12.4 would have the valve failure modes shown in the figure, with "fo" used to designate a failopen valve and "fc" a failclosed valve. (An alternative designation is an arrow on the valve stem pointing in the direction that the valve takes upon air loss.) The valve failure modes in the example set the feed to zero, the output liquid flow to maximum, the heating medium flow to zero, and the vapor flow to its maximum. All of these actions tend to minimize the possibility of an unsafe condition by reducing the pressure. However, the proper failure actions must consider the integrated plant; for example, if a gas flow to the process normally receiving the liquid could result in a hazardous situation, the valve being adjusted by the level controller would be changed to failclosed. The proper failure mode can be ensured through simple mechanical changes to the valve, which can be made after installation in the process. Basically, the failure mode is determined by the spring that directs the valve position when no external air pressure provides a counteracting force. This spring can be arranged to ensure either a fully opened or fully closed position. As the air pressure is increased, the force on the restraining diaphragm increases, and the valve stem (position) moves against the spring.
The failure mode of the final control element is selected to reduce the possibility of injury to personnel and of damage to plant equipment.
The selection of a failure mode also affects the normal control system, because the failure mode is the position of the valve at 0 percent controller output. As the controller output increases, a failopen valve closes and a failclosed valve opens. As a result, the failure mode affects the sign of the process transfer function expressed as CV(j)/MV(j), which is the response "seen" by the controller. As a consequence, the controller gain used for negative feedback control is influenced by the failure mode. If the gain for the process CVis)/Fis), with Fis) representing the flow through the manipulated valve, is K*, the correct sign for the controller gain is given by
Failure mode Fail closed Fail open
Sign off the controller gain considering the failure mode
Signup Sign(*;)
This brief introduction to determining sensor ranges, valve sizes, and failure modes has covered only a few of the many important issues. These topics and many more are covered in depth in many references and instrumentation hand
books, which should be used when designing control systems (see references in Chapter 1).
387 Input Processing
12.3 b INPUT PROCESSING The general control system, involving the sensor, signal transmission, control cal culation, and transmission to the final element, was introduced in Chapter 7. In this section, we will look more closely at the processing of the signal from the com pletion of transmission to just before the control algorithm. The general objectives of this signal processing are to (1) improve reliability by checking signal validity, (2) perform calculations that improve the relationship between the signal and the actual process variable, and (3) reduce the effects of highfrequency noise. Validity Check The first step is to make a check of the validity of the signal received from the field instrument via transmission. As we recall, the electrical signal is typically 4 to 20 mA, and if the measured signal is substantially outside the expected range, the logical conclusion is that the signal is faulty and should not be used for con trol. A faulty signal could be caused by a sensor malfunction, power failure, or transmission cable failure. A component in the control system must identify when the signal is outside of its allowable range and place the controller in the manual mode before the value is used for control. An example is the furnace outlet temper ature controller in Figure 12.2. A typical cause of a sensor malfunction is for the thermocouple measuring the temperature to break physically, opening the circuit and resulting in a signal, after conversion from voltage to current, below 4 mA. If this situation were not recognized, the temperature controller would receive a measurement equal to the lowest value in the sensor range and, as a result, increase the fuel flow to its maximum. This action could result in serious damage to the process equipment and possible injury to people. The input check could quickly identify the failure and interrupt feedback control. An indication should be given to the operators, because the controller mode would be changed without their in tervention. Because of the logic required for this function, it is easily provided as a preprogrammed feature in many digital control systems, but it is not a standard feature in analog control because of its increased cost. Conversion for Nonlinearity
Fluid
The next step in input processing is to convert the signal to a better measure of the actual process variable. Naturally, the physical principles for sensors are chosen so that the signal gives a "good" measure of the process variable; however, factors such as reliability and cost often lead to sensors that need some compensation. An example is a flow meter that measures the pressure drop across an orifice, as shown in Figure 12.5. The flow and pressure drop are ideally related according to the equation
Flow
F = K.
AP
(12.1)
Orifice ^
FIGURE 12.5
Flow measurement by sensing the pressure difference about an orifice in a pipe.
388 CHAPTER 12 Practical Application of Feedback Control
with F = volumetric flow rate p = density AP = pressure difference across the orifice Typically, the sensor measures the pressure drop, so that K F = —JiSiSl0)iRl) + Zl with
(12.2)
S\ = signal from the sensor S\o = lowest value of the sensor signal R\ = range of the true process variable measured by the sensor Z\ = value of the true process variable when the sensor records its lowest signal (Sio) p = constant
Thus, using the sensor signal directly (i.e., without taking the square root) intro duces an error in the control loop. The accuracy would be improved by using the square root of the signal, as shown in equation (12.2), for control and also for process monitoring. In addition, the accuracy could be improved further for im portant flow measurements by automatically correcting for fluid density variations as follows: F = K.
(S{S{0)(RX) + ZX (Si  S2o)iR2) + Z2
(12.3)
with the subscript 1 for the pressure difference sensor signal and 2 for the density sensor signal. By far the most common flow measurement approach used commer cially is equation (12.2), with equation (12.3) used only when the accurate flow measurement is important enough to justify the added cost of the density analyzer. Another common example of sensor nonlinearity is the thermocouple tem perature sensor. A thermocouple generates a millivolt signal that depends on the temperature difference between the two junctions of the bimetallic circuit. The signal transmitted for control is either in millivolts or linearly converted to milliamps. However, the relationship between millivolts and temperature is not linear. Usually, the relationship can be represented by a polynomial or a piecewise linear approximation to achieve a more accurate temperature value; the additional cal culations are easily programmed as a function in the input processing to achieve a more accurate temperature value. These orifice flow and thermocouple temperature examples are only a few of the important relationships that must be considered in a plantwide control sys tem. Naturally, each relationship should be evaluated based on the physics of the sensor and the needs of the control system. Standard handbooks and equipment supplier manuals provide invaluable information for this analysis. The importance of the analysis extends beyond control to monitoring plant performance, which depends on accurate measurements to determine material balances, reactor yields, energy consumption, and so forth. Thus, many sensor signals are corrected for nonlinearities even when they are not used for closedloop control.
Engineering Units Another potential input calculation expresses the input in engineering units, which greatly simplifies the analysis of data by operations personnel. This calculation is
389
possible only in digital systems, as analog systems perform calculations using voltage or pressure. Recall that the result of the transmission and any correction for nonlinearity in digital systems is a signal in terms of the instrument range expressed as a percent (0 to 100) or a fraction (0 to 1). The variable is expressed in engineering units according to the following equation: CV = Z + RiS3  S30)
Input Processing
(12.4)
with S3 the signal from the sensor after correction for nonlinearity.
Filtering An important feature in input processing is filtering. The transmitted signal repre sents the result of many effects; some of these effects are due to the process, some are due to the sensor, and some are due to the transmission. These contributions to the signal received by the controller vary over a wide range of frequencies, as presented in Figure 12.6. The control calculation should be based on only the responses that can be affected by the manipulated variable, because very highfrequency components will result in highfrequency variation of the manipulated variable, which will not improve and may degrade the performance of the con trolled system. Some noise components are due to such factors as electrical interference and mechanical vibration, which have a much higher frequency than the process re sponse. (This distinction may not be so easy to make in controlling machinery or other very fast systems.) Other noise components are due to changes such as imperfect mixing and variations in process input variables such as flows, temper atures, and compositions; some of these variations may be closer to the critical frequency of the control loop. Finally, some measurement variations are due to changes in flows and compositions that occur at frequencies much below the criti cal frequency; the effects of these slow disturbances can be attenuated effectively by feedback control. The very highfrequency component of the signal cannot be influenced by a process control system, and thus is considered "noise"; the goal, therefore, is to remove the unwanted components from the signal, as shown in Figures 12.7 and 12.8. The filter is located in the feedback loop, and dynamics involved with the filter, like process dynamics, will influence the stability and control performance of the closedloop system. This statement can be demonstrated by deriving the following transfer function, which shows that the filter appears in the characteristic equation. CVjs) = Gpis)Gds)Gds) SP(5) 1 + Gp(s)Gds)Gc(s)Gf(s)Gs(s)
(12.5)
If it were possible to separate the signal ("true" process variable) from the noise, the perfect filter in Figure 12.8 would transmit the unaltered "true" process variable value to the controller and reduce the noise amplitude to zero. In addition, the perfect filter would do this without introducing phase lag! Unfortunately, there is no clear distinction between the "true" process variable, which can be influenced by adjusting the manipulated variable, and the "noise," which cannot be influenced and should be filtered. Also, no filter calculation exists that has the features of a perfect filter in Figure 12.8.
Controllable disturbances Uncontrollable disturbances Measurement noise Electrical interference
Sampling frequency 10r 4
102
1Q0
102
Frequency (Hz) FIGURE 12.6
Example frequency ranges for components in the measurement (Reprinted by permission. Copyright ©1966, Instrument Society of America. From Goff, K., "Dynamics of Direct Digital Control, Part I," ISA J., 13,11, 4549.)
390
Dis) Gdis) HS)
CHAPTER 12 Practical Application of Feedback Control
SP(*)i<">r^ Geis)
MV(s) Gvis)
Gpis)
Gfis) CV/tfL^lJ CVmis)
GXs)
1 CV(j)
CVis)
FIGURE 12.7
Block diagram of a feedback loop with a filter on the measurement.
Amplitude ratio
The filter calculation usually employed in the chemical process industries is a firstorder transfer lag: ■*Signal
Noise
CVfis) = Phase angle
ZfS +1
CVm(*)
(12.6)
with CVfis) = value after the filter CV„,(s) —measured value before the filter Zf = filter time constant
Frequency FIGURE 12.8
The amplitude ratio and phase angle of a perfect filter, which cannot be achieved exactly.
The gain is unity because the filter should not alter the actual signal at low fre quency, including the steady state. The frequency response of the continuous filter was derived in Section 4.5, is repeated in the following equations, and is shown in Figure 12.9. AR =
1
yjl+a>2x2
(12.7)
cp = tan_,(—cox/) The filter time constant, t/, is a tuning parameter that is selected to approximate the perfect filter shown in Figure 12.8; this goal requires that it be small with respect to the dominant process dynamics so that feedback control performance is not signif icantly degraded. Also, it should be large with respect to the noise period (inverse of frequency) so that noise is attenuated. These two requirements cannot usually be satisfied perfectly, because the signal has components of all frequencies and the cut off between process and noise is not known. As seen in Figure 12.9, the amplitude of highfrequency components decreases as the filter time constant is increased. In the example, signal components with a frequency smaller than 0.5/t/ are es sentially unaffected by the filter, while components with a much higher frequency have their magnitudes reduced substantially. This performance leads to the name lowpass filter, which is sometimes used to describe the filter that does not affect low frequencies—lets them pass through—while attenuating the highfrequency components of a signal. A simple case study has been performed to demonstrate the tradeoff between filtering and performance. The effect of filtering on a firstorderwithdeadtime plant is given in Figure 12.10. The controlledvariable per formance, measured simply as IAE in this example, degrades as the filter time
10°
1—P
T I I I I Mil 1—I I I I Mil
391 Input Processing
I 10' E
<
10"
J
10"
I
I
I
10"
I
MM
I
I
10°
I
I
I
MM
I
iii
IO1
FIGURE 12.9
Bode plot of firstorder filter.
M 120
0.6 0.7
FIGURE 12.10
The effect of measurement filtering on feedback control performance i$/i$ + z) = 0.33). constant is increased. The results are given in Figure 12.10, which shows the per cent increase in IAE over control without the filter as a function of the filter time constant. This case study was calculated for a plant with fraction dead time of 0.33 under a PI controller with tuning according to the Ciancone correlations. Thus, the results are typical but not general; similar trends can be expected for other systems.
Based on the goals of filtering, the guidelines in Table 12.2 are recommended for reducing the effects of highfrequency noise for a typical situation. These steps should be implemented in the order shown until the desired control performance is achieved. Normally, step 2 will take priority over step 3, because the controlledvariable performance is of greater importance. If reducing the effects of highfrequency noise is an overriding concern, the guidelines can be altered accordingly, such as achieving step 3 while allowing some degradation of the controlledvariable control performance. The final issue in filtering relates to digital implementation. A digital filter can be developed by first expressing the continuous filter in the time domain as a differential equation:
392 CHAPTER 12 Practical Application of Feedback Control
xfdCWdft(t) +CVfit) = CVmit)
(12.8)
leading to the digital form of the firstorder filter, (CV/),, = AiCVf^ + (1  A)(CVm)„ with A = e~At'T'
(12.9)
This equation can be derived by solving the differential equation defined by equa tion (12.8) and assuming that the measured value (CVm )„ is constant over the filter execution period At. The digital filter also has to be initialized when the calcu lations are first performed or when the computer is restarted. The typical filter initialization sets the initial filtered value to the value of the initial measurement. (12.10)
(CV/),=(CVm),
As is apparent, the firstorder filter can be easily implemented in a digital computer. However, the digital filter does not give exactly the same results as the continuous version, because of the effects of sampling. As discussed in Chapter 11 on digital control, sampling a continuous signal results in some loss of information. Shannon's theorem shows us that information in the continuous signal at frequen cies above about onehalf the sample frequency cannot be reconstructed from the sampled data. For example, sampled data taken at a period of one minute could not TABLE 12.2
Guidelines for reducing the effects off noise Step
Action
Justification
1. Reduce the amplification of noise by the control algorithm
Set derivative time to zero Td=0
2. Allow only a slight increase in the IAE of the controlled variable 3. Reduce the noise effects on the manipulated variable
Select a small filter zfl e.g. zf < 0.05(6 + z)
Prevent amplification of highfrequency component by controller Do not allow the filter to degrade control performance Achieve a small amplitude ratio for the highfrequency components
Select filter time constant to eliminate noise, e.g., Zf > 5/co„ where co„ is the noise frequency
be used to determine a sinusoidal variation in the continuous signal with a period of one second. As a result, the digital filter cannot attenuate higherfrequency noise. This is potentially a serious problem, because very highfrequency noise is possible due to mechanical vibrations of the sensor and electrical interference in signal transmission, as shown in Figure 12.6. Since a digital filter alone at a relatively long period cannot provide adequate filtering, most commercial digital control equipment has two filters in series: an analog filter before the analogtodigital (A/D) conversion and an (optional) digital filter after the conversion, as shown in Figure 12.11. The purpose of the analog filter is to reduce highfrequency components of the signal substantially, and typically, it has a time constant on the order of the sample period. The analog filter in this configuration is sometimes referred to as an antialiasing filter, since it reduces potential errors resulting from slowly sampling a signal with highfrequency components. The digital filter in the design, if needed, would be tuned according to the guidelines in Table 12.2 to further attenuate variations at higher frequencies. There is a tendency to overfilter signals used for control. Thus, the following recommendation should be considered:
Since the filter is a dynamic element in the feedback loop, signals used for control should be filtered no more than the minimum required to achieve good control performance.
Not all measurements are used for control; in fact, a rough estimate is that less than onethird of the signals transmitted to a central control room are used for control. The other signals serve the important purpose of enabling plant personnel to monitor the process. For displaying the current status of the process, these signals should not be filtered, except for the analog filter before the A/D converter, because any filter would delay the information display, which could confuse the plant operator. Much of this information is also stored for later process analysis. Since highfrequency data is usually not required, a typical approach is to store data consisting of averages of several samples of the measured variable within meaningful time pe riods such as hour, shift (8 hours), day, and week. This data concentration approach represents a filter that reduces the effects of highfrequency noise and shortterm Digital filter
Analog filter
i
cvm
cvmit)
CV(0
1
( C V ^ A n C V, ) , , . , + i\A)iCVm)n
A/D
XS+ 1
/
A/\yS
•••• FIGURE 12.11
Schematic of the effects of analog and digital filters in series.
393 Input Processing
394
plant variations. Assuming that the values used to calculate the average are taken infrequently enough to be independent, the effect of the number of values used in the average on the standard deviation is given as
CHAPTER 12 Practical Application of Feedback Control
Oavp.r —
*Jn
(12.11)
with oaver = standard deviation of the average Gm = standard deviation of the individual measurements used in calculating the average n = number of measurements used to calculate the average This filtering is desired for the purpose of longterm process analysis, such as detecting slow changes in heat transfer coefficients or catalyst activity, which in many cases change slowly over weeks or months.
*A0
fcr %
VAI
^r
VA2
t*ri
EXAMPLE 12.1. The measurement of the controlled variable in the threetank mixer feedback con trol system in Example 7.2 is modified to have higherfrequency sensor noise. Determine how a filter affects (a) the openloop response of the controlled vari able after the filter and ib) the control performance of the feedback system. Recall that the feedback process is thirdorder with all time constants equal to 5 minutes. Typical dynamic data of the controlled variable without control is shown in Figure 12.12, along with the responses of the signal after filters with two different time constants; the mean values are the same, but the plots are displaced for clearer comparison. As expected, the filters reduce the highfrequency variation in the unfiltered signal. The other key issue is the effect of the filter on the control performance. The dynamic responses of the control system with and without the derivative mode for various filter time constants are shown in Figure 12.13a through c; in all of these figures, the value of the controlled variable plotted is before the
Time FIGURE 12.12 Openloop dynamic data for Example 12.1 with zf equal to: (a) 0.0; ib) 3.0; and ic) 10.0 min.
filter; thus, this signal is modulated before being used in the controller. The amplifi cation of the measurement noise by the derivative mode is apparent by comparing Figure 12.13a and Figure 12.13b. In fact, simply eliminating the derivative might be sufficient in this case. The addition of the filter further smooths the manipulated variable but worsens the performance of the controlled variable. A measure of the controlledvariable performance is summarized in Table 12.3, which includes the need to change the controller tuning because of the addition of the filter in the control loop. The results are in general agreement with the guidelines shown in Figure 12.10.
4.0
I
r
i
1
4.0
r
i
i
i
i
i
i
1
1
r
■ntf^V^Milm ^VyM,*^"1*^ 50
50 m^wm>i"«nM»i '(P»m nm+wm»\*
MV
MV 0
I
I
I
I
0
I
I
I
I
I
i
150 Time ia)
40
i
1
1
1
1
0
I
I
I
I
I
Time
I
I
I
I
150 ib)
1
1
1
1
r
■dWWwiKM ■ f^yjy^M+k
MV
J
I
I
I
L
150 Time ic) FIGURE 12.13
Closedloop dynamic data for the system in Example 12.1: ia) PID without filtering; ib) PI without filtering; (c) PI with filtering (t/ = 3.0 min).
396
TABLE 12.3
Results from Example 12.1 CHAPTER 12 Practical Application of Feedback Control
Kc
Ti
Td
T/
IAE
30 30 29 26 22
11 11 12 14 23
0.88 0 0 0 0
0 0 1 3 10
9.4 9.5 10.3 12.5 21.2
No filter No filter Generally acceptable, zf/i6 + z)& 0.066 Generally too much filtering, zf/i& + z) « 0.20 Too much filtering, zf/i& + z) « 0.66
SetPoint Limits Often, limits are placed on the set point. Without a limit, the set point can take any value in the controlledvariable sensor range. Since the controlledvariable sensor range is selected to provide information during upsets and other atypical operations, it may include values that are clearly undesirable but not entirely preventable. Limits on the set point prevent an incorrect value being introduced (1) inadvertently by the operator or (2) by poor control of a primary in a cascade control strategy (see Chapter 14). 12.4 □ FEEDBACK CONTROL ALGORITHM Many features and options are included in commercial PID control algorithms. In this section, some selected features are introduced, because they are either required in many systems or are optional features used widely. The features are presented according to the mode of the PID controller that each affects. Controller Proportional Mode Throughout the previous chapters, we have allowed the controller gain to be either positive or negative as required to achieve negative feedback. In many control systems that use preprogrammed algorithms, the controller gain is required to be positive. Naturally, another option must be added; this is a "sense switch" that defines the sign of the controller output. The effect of the sense switch is
MV(0 = iKm)Kc
Kf"^)*'
(12.12)
The sense switch has two possible positions, which are defined in the following table using two common terminologies.
Value of K«
+1 1
Position
Position
Directacting Increase/increase Reverseacting Increase/decrease
This approach is not necessary, but it is used so widely that control engineers should be aware of the practice. We will continue to use controller gains of either sign in subsequent chapters unless otherwise specified. EXAMPLE 12.2. What is the correct sense switch position for the temperature feedback controller in Figure 12.2? Note that the process gain and failure mode of the control valve must be known to determine the proper sense of the controller. In this example, the valve failure mode is failclosed. Therefore, an increase in the controller output signal results in (1) the valve opening, (2) the fuel flow increasing, (3) the heat transferred increasing, and (4) the temperature increasing. The overall process loop gain is the product of all gains in the system, which must be positive to provide the desired (negative) feedback control. Sign(loop gain) = s\gn(Kv) sign(Kp) s\gn(Ks)KSf.nseKc =+\ The sensor gain is always positive, and when using the convention that the con troller gain is positive, the loop gain can be simplified to Sign(loop gain) = s\gn(Kv) sign(Kp) sign*(K^K^B? = +1 g i v i n g K x m fi = s i g n ( j r , , ) s \ g n ( K p ) In this example, K%tmt. = (+1)(+1) = +1; thus, the sense is directacting.
Another convention in commercial control systems is the use of dimensionless controller gains. This is required for analog systems, which perform calculations in scaled voltages or pressures, and it is retained in most digital systems. The scaling in the calculation is performed according to the following equation: MV MV^
/ = (Kc)s
E
cv; + 7>Uo
W^
Td
lev J dt
+ 1" (12.13)
\
with (Kc)s = dimensionless (scaled) controller gain = Kc(CVr/MVr) MVr —range of the manipulated variable [100% for a control valve] CVr = range of the sensor measuring the controlled variable in engineering units The range of values for the unsealed controller gain Kc is essentially unlimited, be cause the value can be altered by changing the units of the measurement. For exam ple, a controller gain of 1.0 (weight%)/(% open) is the same as 1.0 x 106(ppm)/(% open). However, the scaled controller gain has a limited range of values, because properly designed sensors and final elements have ranges that give good accuracy. For example, a very small dimensionless controller gain indicates that the final control element would have to be moved very accurately for small changes to control the process. In this case, the final element should be changed to one with a smaller capacity. A general guideline is that the scaled controller gain should have
397 Feedback Control Algorithm
a value near 1.0. Scaled controller gains outside the range of 0.01 to 10 suggest that the range of the sensor or final element may have been improperly selected. Some commercial controller algorithms include a slight modification in the proportional tuning constant term that does not influence the result of the controller calculation. The controller gain is replaced with the term 100/PB, with the symbol PB representing the proportional band.
398 CHAPTER 12 Practical Application of Feedback Control VA0 Al
A
\k
lA2
i*rf
The proportional band is calculated as PB = \00/(Kc)s. Proportional band is dimensionless.
The net PID controller calculation in equation (12.13) is unchanged because the controller gain is calculated as (Kc)s = 100/PB. Thus, the use of gain or propor tional band is arbitrary; either gives the same control loop performance. However, the engineer must know which convention is used in the controller and enter the appropriate value. Note that in finetuning, the controller is modified to be less aggressive by decreasing the controller gain or increasing the proportional band. Integral Mode Usually, the tuning constant associated with the integral mode is expressed in time units, minutes or seconds. Some commercial systems use a PID algorithm that calculates the same output as equation (12.13) but replaces the inverse of the integral time with an alternate parameter termed the reset time.
The reset time is the inverse of the integral time, Tr = 1/T/. The units for reset time are repeats per time unit, e,g., repeats per minute. EXAMPLE 12.3.
For the threetank mixing process, the concentration sensor has a range of 5%A, and the control valve is failclosed. Determine the dimensionless controller gain, proportional band, controller sense, and reset time. Recall that the process reaction curve identification and Ciancone tuning were applied to determine values for the controller gain in engineering units and the integral time, 30 (% opening/%A) and 11 minutes, respectively (see Example 9.2 for a refresher). Therefore, the dimensionless controller gain and proportional band are (Kc)s = Kc(CVr/MVr) = 30(% opening/%A)(5 %A)/(100% open) = 1.5 PB = \00/(Kc)s = 100/1.5 = 66.6 The controller sense is determined by tfsense = sign(^) sign(i^) = sign (l)sign (0.039) = +1 Therefore, the controller sense is directacting. The reset time is the inverse of the integral time, Tr = 1/77 = 1/11 =0.919 repeats per minute
The integral mode is included in the PID controller to eliminate steadystate offset for steplike disturbances, which it does satisfactorily as long as it has the ability to adjust the final element. If the final element cannot be adjusted because it is fully open or fully closed, the control system cannot achieve zero offset. This situation is not a deficiency of the control algorithm; it represents a shortcoming of the process and control equipment. The condition arises because the equipment capacity is not sufficient to compensate for the disturbance, which is presumably larger than the disturbances anticipated during the plant design. The fundamental solution is to increase the equipment capacity. However, when the final element (valve) reaches a limit, an additional diffi culty is encountered that is related to the controller algorithm and must be addressed with a modification to the algorithm. When the valve cannot be adjusted, the error remains nonzero for long periods of time, and the standard PID control algorithm [e.g., equation (12.12) or (11.6)] continues to calculate values for the controller output. Since the error cannot be reduced to zero, the integral mode integrates the error, which is essentially constant, over a long period of time; the result is a controller output value with a very large magnitude. Since the final element can change only within a restricted range (e.g., 0 to 100% for a valve), these large magnitudes for the controller output are meaningless, because they do not affect the process, and should be prevented. The situation just described is known as reset (integral) windup. Reset windup causes very poor control performance when, because of changes in plant operation, the controller is again able to adjust the final element and achieve zero offset. Suppose that reset windup has caused a very large positive value of the calculated controller output because a nonzero value of the error occurred for a long time. To reduce the integral term, the error must be negative for a very long time; thus, the controller maintains the final element at the limit for a long time simply to reduce the (improperly "woundup") value of the integral mode. The improper calculation can be prevented by many modifications to the stan dard PID algorithm that do not affect its good performance during normal cir cumstances. These modifications achieve antireset windup. The first modification explained here is termed externalfeedback and is offered in many commercial ana log and digital algorithms. The external feedback PI controller is shown in Figure 12.14. The system behaves exactly like the standard algorithm when the limitation is not active, as is demonstrated by the following transfer function, which can be derived by block diagram manipulation based on Figure 12.14. Eis)
(12.14)
MV*(s) = MV(s) However, the system with external feedback behaves differently from the standard PI controller when a limitation is encountered. When a limitation is active in Figure 12.14, the following transfer function defines the behavior: MV*(s) = constant MV*(s) MV(s) = KcE(s) + 7/5 + 1
(12.15)
with MV*(s) being the upper or lower MV limit. In this case, the controller output
399 Feedback Control Algorithm
Eis)
MV(j)
K„
MV*(s) *
4. A
T,s + l FIGURE 12.14
Block diagram of a PI control algorithm with external feedback.
400
approaches a finite, reasonable limiting value ofKcE(s)+MV*(s). Thus, external feedback is successful in providing antireset windup. These calculations can be implemented in either analog or digital systems. The second, alternative antireset windup modification can be implemented in digital systems. Reset windup can be prevented by using the velocity form of the digital PID algorithm, which is repeated here.
CHAPTER 12 Practical Application of Feedback Control
AMV n — Kc J En ^n i + ^  T7(CV„  2CVn_, + CV„_2) 11
At
MV„ = MV„_, + AMV„ (12.16) This algorithm does not accumulate the integral as long as the past value of the manipulated variable, MV„_i, is evaluated after the potential limitation. When this convention is observed, any difference between the previously calculated MV and the MV actually implemented (final element) is not accumulated. Many other methods are employed to prevent reset windup. The two methods described here are widely used and representative of the other methods. The key point of this discussion is that
Antireset windup should be included in every control algorithm that has integral mode, because limitations are encountered, perhaps infrequentiy, by essentially all control strategies due to large changes in operating conditions.
Reset windup is relatively simple to recognize and correct for a singleloop controller outputting to a valve, but it takes on increasing importance in more complex control strategies such as cascade and variablestructure systems, which are covered later in this book. Also, the general issue of reset windup exists for any controller that provides zero offset when no limitations exist. For example, reset windup is addressed again when the predictive control algorithms are covered in Chapter 19.
" •*A0 > *I
.
*A1
EP *■
lA2
i*r#
EXAMPLE 12.4. The threetank mixing process in Examples 7.2 and 9.2 initially is operating in the normal range. At a time of about 20 minutes, it experiences a large increase in the inlet concentration that causes the control valve to close and thus reach a limit. After about 140 minutes, the inlet concentration returns to its original value. Determine the dynamic responses of the feedback control system with and without antireset windup. The results of simulations are presented in Figure 12.15a and b. In Figure 12.15a the dynamic response of the system without antireset windup is shown. As usual, the set point, controlled variable, and manipulated variable are plotted. In addition, the calculated controller output is plotted for assistance in analysis, although this variable is not normally retained for display in a control system. After the initial disturbance, the valve position is quickly reduced to 0 percent open. Note that the calculated controller output continues to decrease, although it has no additional effect on the valve. During the time from 20 to 160 minutes, the controlled variable does not return to its set point because of the limitation in
"i
i
i
i
i
i
1
1
r
401 Feedback Control Algorithm
cv«
MV(0
ia) t
1
1
1
r
i
1
r
Offset CV(0
MV(0
Valve and controller output J
l
l
I
'
i
300 Time ib)
FIGURE 12.15 Dynamic response of the threetank mixing system: ia) without antireset windup; ib) with antireset windup. Note that CV(f) = *A3 and MV(0 is the controller output.
the range of the manipulated variable. When the inlet concentration returns to its normal value, the outlet concentration initially falls below its set point. The controller detects this situation immediately, but it cannot adjust the valve until the calculated controller output increases to the value of zero. This delay, which would be longer had the initial disturbance been longer, is the cause of a rather large disturbance. Finally, the PI controller returns the controlled variable to its set point, since the manipulated variable is no longer limited.
402 CHAPTER 12 Practical Application of Feedback Control
The case with antireset windup is shown in Figure 12.15b. The initial part of the process response is the same. However, the calculated controller output does not fall below the value of 0 percent; in fact, it remains essentially equal to the true valve position. When the inlet concentration returns to its normal value, the controller output is at zero percent and can rapidly respond to the new oper ating conditions. The second disturbance is much smaller than in Figure 12.15a, showing the advantage of antireset windup.
Derivative Mode An additional modification of the PID algorithm addresses the effect of noise on the derivative mode. It is clear that the derivative mode will amplify highfrequency noise present in the measured controlled variable. This effect can be reduced by decreasing the derivative time, perhaps to zero. Unfortunately, this step also reduces or eliminates the advantage of the derivative mode. A compromise is to filter the derivative mode by using the following equation: ctdTds ^  7 +1 (12.17) The result of this modification is to reduce the amplification of noise while retain ing some of the good control performance possible with the derivative mode. As the factor ad is increased from 0 to 1, the noise amplification is decreased, but the improvement in control performance due to the derivative mode decreases. This parameter has typical values of 0.1 to 0.2 and is not normally tuned by the engineer for each individual control loop. Since the PID control algorithm has been changed when equation (12.17) is used for the derivative mode, the controller tuning values must be changed, with the Ciancone correlations no longer being strictly applica ble. Tuning correlations for the PID controller with ad =0.1 are given by Fertik (1974). Initialization The PID controller requires special calculations for initialization. The specific ini tialization required depends upon the particular form of the PID control algorithm; typical initialization for the standard digital PID algorithm is as follows: AMVn
— K c l L n t L n .
+ ^  X7(CV„  2CV„_! + CV„_2) 7) At
MV„ = MV„_, + AMV„ MVi = MV0 that is, AMVi = 0 L,n\ = t,n
CV„_2 = CVn_! = cv„
for n = 1 for initialization for n = 1 for n = 1
(12.18)
This initialization strategy ensures that no large initial change in the manipulated variable will result from outdated past values of the error or controlled variables.
12.5 @ OUTPUT PROCESSING
403
The standard PID controller has no limits on output values, nor does it have special considerations when the algorithm is first used, as when the controller is switched from manual to automatic. As already described, the calculated controller output is initialized so that the actual valve position does not immediately change on account of the change in controller mode. In addition to initialization, the PID algorithm can be modified to limit selected variables. The most common limitation is on the manipulated variable, as is done when certain ranges of the manipulated variable are not acceptable. Thus, the ma nipulated variable is maintained within a restricted range less than 0 to 100 percent.
References
Measurement signal Check 420 mA
I I
Analog filter
MVmin < MV(0 < MVmax (12.19) An example of limiting the manipulated variable is the damper (i.e., valve), position in the stack of a fired heater as shown in Figure 12.2. The stack damper is adjusted to control the pressure of the combustion chamber. Since the stack is the only means for the combustion product gases to leave the combustion chamber, it should not be entirely blocked by a closed valve. However, the control system could attempt to close the damper completely due to a faulty pressure measurement or poor controller tuning. In this case, it is common to limit the controller output to
A/D conversion
prevent a blockage in the range of 0 to 80 percent (not 20 to 100 percent, because the damper is failopen, so that a signal of 100 percent would close the valve). Sometimes the rate of change of the manipulated variable is limited using the following expression: / AMV \ AMV„ = min(AMV, AMVmax) ( j^yf) (1220)
Convert to engineering units
■^ Input ^\ calculation?/
Digital ^ fi l t e r ? ^
This modification is appropriate when a rapid adjustment of the manipulated vari able can disturb the operation of a process.
REFERENCES
Y
Perform calculation
Perform calculation
Check status
12.6 a CONCLUSIONS Clearly, the simple, single PID equation, while performing well under limited con ditions, is not sufficient to provide feedback control under the various conditions experienced in realistic plant operation. Some of the most important modifications have been presented in this chapter, and many more modifications are described in publications noted in the references and additional resources. To complete this chapter, the flowchart for a PID controller that includes the modifications described in this chapter is given in Figure 12.16. The added complexity is apparent. However, the computations are readily packaged in pre programmed algorithms and performed rapidly by powerful microprocessorbased instrumentation. A wise and productive engineer uses these programs and does not attempt to develop all realtime calculations from scratch, although doing limited algorithm programming is a useful learning exercise for the student.
Y
Manual
Automatic First ^x Y s execution?^
Control calculation (e.g., PID)
I
Initialize
External feedback
Clamp D/A conversion Signal to final element FIGURE 12.16
Fertik, H., "Tuning Controllers for Noisy Processes," ISA Trans., 14, 4, 292304 (1974).
PID calculation flowchart.
404
Goff, K.W., "Dynamics in Direct Digital Control, Part I," ISA J., 13,11,45^19 (November, 1966); "Part II," ISA J., 13, 12, 4454 (December 1966). ISA, Process Instrumentation Terminology, ISAS51.11979, Instrument So ciety of America, Research Triangle Park, NC, 1979. Mellichamp, D., RealTime Computing, Van Nostrand, New York, 1983.
CHAPTER 12 Practical Application of Feedback Control
ADDITIONAL RESOURCES There are many technical references available for determining the performance of sensors and final control elements, including the references in Chapter 1. Also, equipment manufacturers provide information on the performance of their equip ment. The following references, along with the references for Chapter 18 on level control, provide additional information on key sensors. DeCarlo, J., Fundamentals of Flow Measurement, Instrument Society of Amer ica, Research Triangle Park, NC, 1984. Miller, R., Flow Measurement Engineering Handbook, McGrawHill, New York, 1983. Pollock, D., Thermocouples, Theory and Practice, CRC Press, Ann Arbor, 1991. The following references discuss many options for antireset windup. Gallun, S., C. Matthews, C. Senyard, and B. Slater, "Windup Protection and Initialization for Advanced Digital Control," Hydrocarbon Proc, 64,6368 (1985). Khandheria, J., and W. Luyben, "Experimental Evaluation of Digital Control Algorithms for Antiresetwindup," IEC Proc. Des. Devel, 15, 2, 278285 (1976). Many calculations in commercial instrumentation use scaled variables, be cause they are performed in analog systems using voltages or pressures. For an introduction to scaling, see Gordon, L., "Scaling Converts Process Signals to Instrument Ones," Chem. Engr., 91, 141146 (June 25,1984). For an introduction to some of the causes of highfrequency noise and means of its prevention, see Hazlewood, L., "Getting the Noise Out," Chem. Engr., 95, 105108 (Novem ber 21,1988). For a very clear discussion of filtering, in addition to Goff (1966) noted above,
see Corripio, A., C. Smith, and P. Murrill, "Filter Design for Digital Control Loops," Instr. Techn., 3338 (January 1973).
For a concise description of many PID controller enhancements in analog and 405 digital form, see Clark, D., "PID Algorithms and Their Computer Implementation," Trans. Inst. Meas. and Cont., 6, 6, 305316 (1984). QUESTIONS 12.1. Many filtering algorithms are possible. For each of the algorithms suggested below, describe its openloop frequency response and sketch its Bode plot. Also, discuss its advantages and disadvantages as a filter in a closedloop feedback control system. (fl) x2s2+0Axs + \ ib) with n = positive integer ixs + \)n ic) Averaging filter with m values in average ,™ ^ CV« + CV"1 + •' * + cv«—+i (CV/)„ = m XfS + \
12.2. Answer the questions in Table Q12.2 for each PID controller mode or tuning constant associated with each mode. Explain every entry completely, giving theoretical justification as well as the brief answer indicated. Answer this question on the basis of a commercial control system in which all control calculations are performed in scaled variables. 12.3. You have been given three control systems to analyze. Each has the dimen sionless controller gain given below. From this information alone, what can you determine about each control system? iKc)s = ia) 0.02, ib) 0.75, and ic) 123.00. 12.4. The control systems with the processes given below are to be tuned (1) without a filter and with a firstorder filter with (2) Xf = 0.5 min and (3) Xf = 3.0 min. Determine the PI tuning constants for all three cases using the Bode stability analysis and ZieglerNichols correlations. Also, state whether you expect the control performance, as measured by IAE, to be better or worse with the filter (after retuning). Why? ia) The empirical model derived in question 6.1 for the fired heater. ib) The empirical model for the packedbed reactor in Figure 6.3 from the data in Figure Q6.4c. (c) The linearized, analytical model for the stirredtank heater in Example 8.5. 12.5. For the process in Figure 2.2, answer the following questions. ia) Determine the proper failure modes for all valves. Also, give the proper controller sense for each controller, assuming that commercial con trollers are being used iKc > 0).
Questions
406
TABLE Ql 2.2
CHAPTER 12 Practical Application of Feedback Control
P
1
D
(a) Which modes eliminate offset? (b) Describe the speed of response for an upset (fastest, middle, slowest). (c) Compare the propagation of highfrequency noise from controlled to manipulated variable (most, middle, least). (d) As process dead time increases (with 9 + z constant), the tuning constant (increases, decreases, unchanged)? (e) Does the mode cause windup (Y, N)? (0 Should tuning constant be changed when filter is added to loop (Y, N)? ig) Is tuning constant affected by limits on the manipulated variable (Y, N)? ih) Should tuning constant be altered if the sensor range is changed (Y, N)? (/) Does tuning constant depend on the failure mode of the final element (Y, N)? (/) Does tuning constant depend on the linearization performed in the input processing (Y, N)? (/c) Should tuning constant be altered if the final element capacity is changed (Y, N)? (/) Should tuning constant be changed if the digital controller execution period is changed (Y, N)?
ib) What type of input processing would be appropriate for each measure ment? Why? ic) The following alterations are made after the process has been operating successfully. Determine any other changes that must be made as a consequence of each alteration. Your answers should be as specific and quantitative as possible. (1) The control valve for a steam heat exchanger is increased to accommodate a flow 50 percent greater than the original. (2) The failure mode of the control valve in the liquid
product stream changed from failopen to failclosed. (3) The range of 407 the temperature sensor is changed from 50100°C to 75125°C. \jmmmm^nmimmm 12.6. Answer questions 12.5 ia) and ib) for the CSTR in Figure 2.14. Questions 12.7. Answer questions 12.5 ia) and ib) for the boiler oxygen control in Figure 2.6. 12.8. In the discussion on external feedback, equations (12.14) and (12.15) were given to prove that reset windup would not occur. id) Derive these equations based on the block diagram and explain why reset windup does not occur. ib) Prepare the equations in their proper sequence for the digital imple mentation of external feedback. 12.9. An alternative antireset windup method is to use logic to prevent "inappro priate" integral action. This logic is based on the status of the manipulated variable. Develop a flowchart or logic table for this type of antireset windup and explain how it would work. 12.10. The goal of initializing the PID controller is to prevent a "bump" when the mode is changed and to prepare the controller for future calculations. De termine the proper initialization for the fullposition digital PID controller algorithm in equation (11.6) and explain each step. 12.11. A process uses infrequent laboratory analyses for control. The period of the analyses is much longer than the dynamics of the process. Due to the lack of accuracy in the laboratory method, the reported value has a relatively large standard deviation, resulting in noise in the feedback loop. Describe steps you would take to reduce this noise by a factor of 2. (For the purposes of this problem, you may not change the frequency for collecting one or a group of samples from the process.) 12.12. A signal to a digital controller has considerable highfrequency noise in spite of the analog filter before the A/D converter. The controller is being executedaccordingtotherulethatAf/(# + r) = 0.05, and the manipulated variable has too large a standard deviation. Explain what steps you would take in the digital PID control system to reduce the effects of noise on the manipulated variable and yet to have minimal effect on the control performance as measured by IAE of the controlled variable. 12.13. Answer the following questions regarding filtering. ia) Confirm the transfer function in equation (12.5). ib) The equation for the digital firstorder filter is presented in equation (12.9). Confirm this equation by deriving it from equation (12.8). ic) Discuss the behavior of a lowpass filter and give examples of its use in process control. id) A highpass filter attenuates the lowfrequency components. Describe an algorithm for a highpass filter and give examples of its use. 12.14. Consider an idealized case in which process data consists of a constant true signal plus purely random (white) noise with a mean of 0 and a standard deviation of 0.30.
408 («) Determine the value of the parameter A in the digital filter equation mstimdMmmmmm&MM (12.9) that reduces the standard deviation of the filtered value to 0.1. CHAPTER 12 You might have to build a simulation in a spreadsheet with several Practical Application hundred executions and try several values of A. of Feedback Control ^ Determine the number of duplicate samples of the variable to be taken every execution so that the average of these values will have a standard deviation of 0.10. 12.15. Consider the situation in which the measured controlled variable consisted of nearly all noise, with very infrequent changes in the true process variable due to slowly varying disturbances. Suggest a feedback control approach, not a PID algorithm, that would reduce unnecessary adjustments of the manipulated variable. 12.16. Many changes have been proposed to the standard digital PID controller, and we have considered several, such as the derivative on measured vari able rather than error. For each of the following proposed modifications in the PID algorithm, suggest a reason for the modification (that is, what possible benefit it would offer and under what circumstances) and any disadvantages. id) The proportional mode is calculated using the measured variables rather than the error. A
t
n
T
MV„ = Kc CV„ + — £>P/  CV/)  ^(CV„  CV,,.,) 7 j'=0
+/
ib) The controller gain is nonlinear; for example, For (SP„  CV„) > 0 Kc = K' For (SP„  CV„) < 0 KC = K' + K" SP„  CV„  ic) The rate of change of the manipulated variable is limited,  AMV < max. id) The allowable set point is limited, SPmin < SP < SPraax.
Performance of Feedback Control Systems 13.1 □ INTRODUCTION
As we have learned, feedback control has some very good features and can be applied to many processes using control algorithms like the PID controller. We certainly anticipate that a process with feedback control will perform better than one without feedback control, but how well do feedback systems perform? There are both theoretical and practical reasons for investigating control performance at this point in the book. First, engineers should be able to predict the performance of control systems to ensure that all essential objectives, especially safety but also product quality and profitability, are satisfied. Second, performance estimates can be used to evaluate potential investments associated with control. Only those con trol strategies or process changes that provide sufficient benefits beyond their costs, as predicted by quantitative calculations, should be implemented. Third, an engi neer should have a clear understanding of how key aspects of process design and control algorithms contribute to good (or poor) performance. This understanding will be helpful in designing process equipment, selecting operating conditions, and choosing control algorithms. Finally, after understanding the strengths and weak nesses of feedback control, it will be possible to enhance the control approaches introduced to this point in the book to achieve even better performance. In fact, Part IV of this book presents enhancements that overcome some of the limitations covered in this chapter. Two quantitative methods for evaluating closedloop control performance are presented in this chapter. The first is frequency response, which determines the
410 CHAPTER 13 Performance of Feedback Control Systems
response of important variables in the control system to sine forcing of either the disturbance or the set point. Frequency response is particularly effective in de termining and displaying the influence of the frequency of an input variable on control performance. The second quantitative method is simulation, involving nu merical solution of the equations defining all elements in the system. This method is effective in giving the entire transient response for important changes in the forcing functions, which can be any general function. Both of these methods re quire computations that are easily defined but very timeconsuming to perform by hand. Fortunately, the calculations can be programmed using simple concepts and executed in a short time using digital computers. After the two methods have been explained and demonstrated, they are em ployed to develop further understanding of the factors influencing control per formance. First, a useful performance bound is provided that defines the best performance possible through feedback control. Then, important effects of ele ments in the feedback system are analyzed. In one section the effects of feedback and disturbance dynamics on performance are clarified. In another section the effects of control elements, both physical equipment and algorithms, on control performance are evaluated. The chapter concludes with a table that summarizes the salient effects of control loop elements on control performance.
13.2 a CONTROL PERFORMANCE Many measures of control performance are possible, and each is appropriate in particular circumstances. The important measures are listed here, and the reader is referred to Chapter 7 to review their meanings. • Integral error (IAE, ISE, etc.) • Maximum deviation of controlled variable • Maximum overshoot of manipulated variable • Decay ratio • Rise time • Settling time • Standard deviation of controlled and manipulated variables • Magnitude of the controlled variable in response to a sine disturbance Two additional factors should be achieved for control performance to be ac ceptable; generally, they are not difficult to achieve but are included here for com pleteness of presentation. The first is zero steadystate offset of the controlled variable from the set point for steplike input changes. For nearly all control sys tems, zero offset is a desirable feature, and control systems must use a controller with an integral mode to achieve this objective. An important exception where zero offset is not required occurs with some level controllers. Level control is addressed in Chapter 18, where different control performance criteria from those used in this chapter are introduced. The second factor is stability. Clearly, we want every control system to be sta ble; therefore, control algorithms and tuning constants are selected to give stable performance over a range of operating conditions. It is very important to recog nize that stability places a limit on the maximum controller gain and, in a sense,
the control system performance. Without this limit, proportionalonly controllers with very high gains might provide tight control of the controlled variable in many applications. In this chapter we will confine our discussion to control systems that require zero offset and to controller tuning constant values that provide good performance over a reasonable range of operating conditions.
Also, we recognize that no general boundary exists between good and poor process performance. A maximum controlledvariable deviation of 5°C may be totally unacceptable in one case and result in essentially no detriment to operation in another case. In this chapter we identify the key factors influencing control per formance and develop quantitative methods for predicting performance measures that can be applied to a wide range of processes; the desired value or limit for each measure will depend on the particular process being considered. In evaluating control performance, we will use the following definition.
Control performance is the ability of a control system to achieve the desired dy namic responses, as indicated by the control performance measures, over an expected range of operating conditions.
This definition of performance includes both set point changes and disturbances. The phrase "over an expected range of operating conditions" refers to the fact that we never have perfect information on the process dynamics or disturbances. Differences between model and plant are inevitable, whether the models were derived analytically from first principles or were developed from empirical data such as the process reaction curve. In addition, differences occur because the plant dynamics change with process operating conditions (e.g., feed flow rate and catalyst activity). Since any model we use has some error, the control system must function "well" over an expected range of errors between the real plant and our expectation, or model, of the plant. The expected range of conditions can be estimated from our knowledge of the manner in which the plant is being operated (values of feed flow, reactor conversion, and so forth). The ability of a control system to function as the plant dynamics change is sometimes referred to as robust control. However, throughout this book we will consider performance to include this factor implicitly without expressly including the word robust every time. To reiterate, we must always consider our lack of perfect models and changing process dynamics when analyzing control performance. It is important to emphasize that the performance of a control system depends on all elements of the system: the process, the sensor, the final element, and the controller. Thus, all elements are included in the quantitative methods described in the next two sections, and important effects of these elements on performance are explored further in subsequent sections.
411 Control Performance
412 CHAPTER 13 Performance of Feedback Control Systems
13.3 □ CONTROL PERFORMANCE VIA CLOSEDLOOP FREQUENCY RESPONSE Continuously operating plants experience frequent, essentially continuous, dis turbances, so predicting the control system performance for this situation is very important. The approach introduced here is very general and can be applied to any linear plant, not just firstorderwithdeadtime, and any linear control algorithm. Also, it provides great insight into the influence of the frequency of the input (set point and disturbance) changes on the effectiveness of feedback control. The approach is based on the frequency response methods introduced in pre vious chapters. Frequency response calculates the system output in response to a sine input; we will use this approach in evaluating control system performance by assuming that the input variable—set point change or disturbance—is a sine func tion. While this is never exactly true, often the disturbance is periodic and behaves approximately like a sine. Also, a more complex disturbance can often be well represented by a combination of sines (e.g., Kraniauskas, 1992); thus, frequency response gives insight into how various frequency components in a more complex input affect performance. The control performance measure in this section is the amplitude ratio of the controlled variable, which can be considered the deviation from set point because the transfer function equations are in deviation variables. The frequency response of a stable, linear control system can be calculated by replacing the Laplace variable s with jco in its transfer function. The resulting expressions describe the amplitude ratio and phase angle of the controlled variable after a long enough time that the nonperiodic contribution to the solution is negligible. The control system in Figure 13.1 is the basis for the analysis, and this system has the following transfer function in response to a disturbance: CVjs) = Grf(£) Dis) l + Gp(s)Gds)Gc(s)Gds) It is helpful to consider the amplitude ratio of the controlled variable to the disturbance in equation (13.1), which can be expressed as the product of two factors: 1 \CV(jco)\ (13.2) \Gd(jco)\ 1 + Gp(jco)Gdjco)Gc(jco)Gs(jco) \D(jco)\
[
Dis)
SPis)
K>—*
Gcis)
MVis)
Gdis)
GJs)
Gvis)
Gsis) FIGURE 13.1 Block diagram of feedback control system.
CVis)
The first factor of the amplitude ratio is the numerator, which contains the openloop process disturbance model. The second factor is the contribution from the feedback control system. The frequency responses of the factors are given in Figure 13.2a and b and are referred to in analyzing the frequency response of the closedloop system. The results in Figure 13.2 are for the (arbitrary) system 1.0* 155
413 Control Performance via ClosedLoop Frequency Response
0.48
(1+i)
Gd = Gpis)Gds)Gds) = 2 0 s + \ "Gr"=' "0.60 V" " 30sJ " 20s + 1 When interpreting these plots, it is helpful to remember that (unachievable) perfect control would result in no controlledvariable deviation for all frequencies; in other words, the output (CV) amplitude would be zero for all frequencies. The closedloop system is first considered at limits of very low and very high frequency. This analysis makes use of equation (13.2) and Figure 13.2a and b. For disturbances with a very low frequency, the first factor (i.e., the process through which the disturbance travels) does not attenuate the disturbance; thus, its magnitude is large. (The disturbance dynamics are assumed similar to the feedback dynamics for this example.) However, the relatively fast feedback control loop will effectively attenuate a disturbance in this frequency range; thus, the magnitude of the feedback factor is small. The control system response is the product of the two magnitudes; therefore, the control system provides good performance at input frequencies much lower than the critical frequency, because of feedback control. Note that the integral mode of the PI controller is especially effective in rejecting slow disturbances and that in general, feedback control systems provide good control performance at very low disturbance frequencies. For disturbances at the other extreme of very high frequency, the feedback controller is not effective, because the disturbance is faster than the control loop can respond. In this case the magnitude of the second factor is nearly 1. However, 1 1 + GJjco) GviJco) GciJco) Gsija)
\Gdijco)\
10°
101 B 10° a
IO"1 _
\
o
1 4J
"a.
I
E <
\
10"3 E
m4
i i l i m n m i m i m m n i i i m i i t n n i i i m i m i i i m i i i i i mint
104 IO2 Frequency, co ia)
10°
i"'
IO6 IO2 IO7 IO6
mhim
m
iii
im
ntiiim
IO4 102 Frequency, co
mi
11 m i n i
10°
mm
IO2
ib)
FIGURE 13.2
Amplitude ratios in equation (13.2): ia) numerator; ib) denominator.
the disturbance process, as long as it consists of first or higherorder time constants (and not simply gains and dead times), filters the highfrequency disturbance. This filter results in a small magnitude of \Gdijco)\, reducing the magnitude of the controlled variable substantially. Therefore, the feedback control system provides good control performance for very high frequencies as well. Note that the good performance is not due to feedback control but rather to the disturbance time constant(s), which in this range is much larger than the disturbance period (i.e.,
414 CHAPTER 13 Performance of Feedback Control Systems
lfrd<£o>d)>
For intermediate frequencies, a harmonic or resonant peak occurs. This peak represents the most difficult frequencies for the feedback control system. In fact, for some systems the control system can perform worse than the same plant without control, indicating that disturbances can be slightly amplified by the feedback control loop around the harmonic frequency. The general shape of the closedloop frequency response to a disturbance for most feedback controller systems is similar to the curve in Figure 13.3. It is important that the engineer understand the reasons for the behavior in the low, intermediate, and highfrequency regions. Many disturbances in process plants have low frequencies, because they result from the changing operation of slowly re sponding systems such as the composition of flows from large upstream feed tanks. Many very fast disturbances occur due to imperfect mixing and highfrequency pressure disturbances. For both disturbances, feedback control performance tends to be good. However, many disturbances also occur around the critical frequency
Input DO)
Output CV(/)
W
\Gdija>)\ 1 + GpiJ(o) GviJ(o) Gcij
1(T7 IO6 IO5 IO4 IO3 IO2 10_1 10° 101 102 Frequency, (o FIGURE 13.3 Frequency response of feedbackcontrolled variable to disturbance.
of a feedback loop, because oscillations caused by an integrated process under feedback control tend to be in the same frequency range.
Disturbances around the closedloop resonant frequency are essentially uncontrol lable with any singleloop feedback controller, and therefore such disturbances should be prevented by changes to the process design or attenuated using enhance ments discussed in Part IV.
EXAMPLE 13.1. The plants presented in Figure 13.4 are subject to periodic disturbances. All plants have the same equipment structure, but they have different equipment sizes. They can all be modelled as firstorderwithdeadtime processes, and the dynamics of the sensor and valve are negligible. Determine the control performance in re sponse to a disturbance (£>) possible with the four designs and rank them ac cording to the amplitude ratios achieved by PI controllers. The solution to the example involves calculating the closedloop frequency response for each case. The calculations are based on equation (13.2), with the appropriate transfer functions for the individual elements—in this case, a firstorderwithdeadtime process, a firstorder disturbance, and a PI controller. The calculation of the amplitude ratio follows the same procedure used in Chapter 10, where s is replaced by jco in the transfer function; then the magnitude of the complex expression is determined. The results of the algebraic manipulations for this example are given in equation (13.3); recall that the frequency response could also be evaluated using computer methods not requiring these extensive algebraic manipulations. 1 (13.3) Amplitude ratio = \Gdijco)\ 1 + Gcijco)Gpijco)
rG do
% *■
Case
KP
e
T
y
A B C D
1.0 1.0 1.0 0.1
1.0 4.0 0.5 0.5
1.0 4.0 1.5 1.5
1.0 1.0 1.0 1.0
FIGURE 13.4 Schematic of process with model parameters for Example 13.1.
415 Control Performance via ClosedLoop Frequency Response
416
where
with Kd = 1
\Gdjco)\ = —&
yj\+(o2z2d
CHAPTER 13 Performance of Feedback Control Systems
1 1 + Gdjco)Gpijco)
y/jAC + BD)2 + jBC + AD)2 C2 + D2
A = TiZpco2 B = T,co C = KpKc[cos i9co)  T/wsin i~9co)]  TiZpco2 D = KpKc[sm i9co) + T{co cos i9co)] + Ttco
In each case, the PI controller has to be tuned; the tuning for this example is given below based on the Ciancone correlations in Figure 9.9a and b.
Case
0/iO + z)
KcKp
T,/i$ + z)
Ke
1/
A B C D
0.5 0.5 0.25 0.25
0.85 0.85 1.70 1.70
0.75 0.75 0.65 0.65
0.85 0.85 1.70 17.0
1.5 6.0 1.3 1.3
The best control performance has the smallest amplitude ratio (i.e., the smallest deviation from set point). These calculations have been performed, and the results are given in Figure 13.5, which shows that the best performance is possible with designs C and D. The next best is case A, and the worst is case B. Since the disturbance transfer function is the same for all cases, the processes with the longest dead time and the longest dead time plus time constant in the feedback path are more difficult to control; this explains why case B has the poorest 10' e—i i i nun—iiiii mi—iiiii mi—I I I I I i m
CandD
io3
'
IO"2
in
'
'"
10_I
iiiii
mi
i
i
10° 10' Frequency (rad/time)
FIGURE 13.5
Closedloop frequency responses for the cases in Example 13.1.
i
i
mi
IO2
performance and why case A is not as good as C and D. Note that processes C and D have the same dynamics and differ only in their gains. Thus, the controller gain can be selected to achieve the same KPKC and the same control performance. (This result assumes that the manipulated variable can be adjusted over a larger range for the process with the smaller process gain.) In addition to finding the best process, we have identified a region of disturbance frequency for which feedback control will not function well. Process changes or control enhancements would be in order if disturbances with large magnitudes were expected to occur in this frequency range. tt^mm&Mmmimm:,
mmmm®Mmm!®mmmmmmMM^^
EXAMPLE 13.2. Normal plant disturbances have many causes with different frequencies. This ex ample presents a simple case of two disturbances. As depicted in Figure 13.6, the input disturbance is the sum of two sine waves that have the same phase and have the amplitudes and frequencies given in the following table. The input dis turbances are not measured, but sample openloop dynamic data of the output variable [i.e., Gds)Dis)] are given in Figure 13.7a. What is the magnitude of the sine wave of the controlled variable when PI feedback control is implemented for the same disturbance?
Input No. 1 Input No. 2 0.010 1.0
Frequency (rad/min) Amplitude
0.20 0.50
The first step in the solution is to calculate the closedloop frequency response for this process with PI control. The process is firstorderwithdeadtime, and the calculations employ equation (13.3) with the following parameters: r = 2.0 7^ = 1.0 Kc = \.0 Tf =2.0
9 = 1.0 Gdis) = \
The amplitude ratio of each input considered individually can be determined as
Input No. 1
I
Input No. 2 ^K/KT*
s?is) —•O"*' _T
H)
+1 CVis)
}+2s
<J
FIGURE 13.6 Schematic showing the system and disturbances considered in Example 13.2.
417 Control Performance via ClosedLoop Frequency Response
418 CHAPTER 13 Performance of Feedback Control Systems >
2500
2500
FIGURE 13.7 Results for Example 13.2: (a) disturbance without control; ib) closedloop dynamic response with PI control.
shown in Figure 13.8. The lowerfrequency disturbance (input no. 1) has a very small amplitude ratio. Thus, the control performance for this part of the disturbance is good. The amplitude ratio for the higherfrequency input (input no. 2) is not small and is about 0.50, because it is in the region of the resonant frequency. Therefore, input No. 2 contributes most of the deviation for the closedloop feedback control system. This analysis can be compared with the dynamic response of the closedloop control system with the two sine disturbances given in Figure 13.7b. The response shows almost no effect of the slow sine disturbance and a significant effect from the faster sine disturbance. The magnitude of the closedloop simulation, about 0.25, is the same as the prediction from the frequency response analysis, 0.5 x 0.5. We can conclude from this example that the frequency response method provides valuable insight into which disturbance frequencies will and will not be attenuated significantly by feedback control.
O I1
419
i io°
Control Performance via ClosedLoop Frequency Response
Input No. 2
10r 4 10"
i
11
nun
10"
i 11 m i l l i 11 n u n < IO2 IO1 10° IO1 Frequency, co
IO2
FIGURE 13.8 Closedloop amplitude ratio for Example 13.2.
Most process control systems are primarily for disturbance response, but some have frequent changes to their set points. The frequency response approach devel oped for disturbance performance analysis can be extended to set point response to determine how well the control system can follow, or track, its set point. The following transfer function relates the controlled variable to the set point for the system in Figure 13.1:
CVjs) = Gpis)Gds)Gcjs) SPis) \+Gpis)Gds)Gds)Gds) The amplitude ratio of this transfer function can be calculated using standard pro cedures (setting s = jco) and plotted versus frequency of the set point variation. Perfect control would maintain the controlled variable exactly equal to the set point; in other words, the amplitude ratio would be equal to one (1.0) for all fre quencies. Very good control performance is achieved for very low frequencies, when the feedback control system has time to respond to slow set point change. As the frequency increases, the control performance becomes poorer, because the set point variations become too fast for the feedback control system to track closely. Again, a resonant peak can occur at intermediate frequencies. EXAMPLE 13.3. Calculate the set point frequency response for the plant in Example 13.1, case C. The transfer functions of the process and controller are given in Example 13.1. The result of calculating the amplitude ratio of equation (13.4) is given in Figure 13.9. As shown in the figure, the control system would provide good set point tracking (i.e., an amplitude ratio close to 1.0) for a large range of frequencies. The frequency range for which the amplitude ratio responds satisfactorily is often referred to as the system bandwidth; taking a typical criterion that the amplitude ratio of 1.0 to 0.707 is acceptable, the bandwidth of this system is frequencies from 0.0 to about 3 rad/time. yMmiMmmk^^mMmmm^mmaii^
420 CHAPTER 13 Performance of Feedback Control Systems
10 h i 11nun—i 11nun—i 11 nun—i i mini—i i mini—nrnn
CO
3 io° .3
> 6
! io' a "a. E <
10,2
' i'""" i 11min i 11mill i 11min i i mini i i Mini
IO4
IO3
102 101 Frequency, co
10°
10'
IO2
FIGURE 13.9
Closedloop frequency response for the set point response in Example 133. The calculation of the frequency response for the closedloop system is per formed by applying the same principles as for openloop systems. However, the calculations are much more complex. The frequency response for closedloop sys tems requires that the transfer function be solved for the magnitude, and the results must be derived for each system individually, as was done analytically in equation (13.3). Clearly, this amount of analytical manipulation could inhibit the application of the frequency response technique. In the past, graphical correlations have been used to facilitate the calcula tions for a limited number of process and controller structures. The Nichols charts (Edgar and Hougen, 1981) are an example of a graphical correlation approach to calculate the closedloop from the openloop frequency response. These charts are not included in this book because closedloop calculations are not now performed by hand. Since the advent of inexpensive digital computers, the calculations have been performed with the assistance of digital computer programs. Most higherlevel languages (e.g., FORTRAN) provide the option for defining variables as complex and solving for the real and imaginary parts; thus, the computer programming is straightforward, basically programming equation (13.2) with complex variables. An extension to the programming approach is to use one of many software packages that are designed for control system analysis, such as MATLAB™. An example of a simple MATLAB program to calculate the frequency response in Figure 13.9 is given in Table 13.1. For simple models, the approach in Example 13.1 can be used, but computer methods are recommended over algebraic manipulation for closedloop frequency response calculations. The frequency response approach presented in this section is a powerful, general method for predicting control system performance. The method can be applied to any stable, linear system for which the input can be characterized by a
421
TABLE 13.1
Example MATLAB™ program to calculate a closedloop frequency response % ** EXAMPLE 13.3 FREQUENCY RESPONSE *** % this MATLAB Mfile calculates and plots for Example 13.3 % ********************************************* % parameters in the linear model % ********************************************* kp = 1.0 ; taup = 1.5 ; thetap = 0.5; kc = 1.7 ; ti = 1.3; % ********************************************* % simulation parameters % ********************************************* wstart = .0001 ; % the smallest frequency wend = 100 ; % the highest frequency wtimes =800 ; % number of points in frequency range omega = logspace ( loglO(wstart), loglO(wend), wtimes); j j = s q r t (  l ) ; % d e fi n e t h e c o m p l e x v a r i a b l e % ********************************************* % put calculations here % ********************************************* for kk = 1:wtimes s = jj*omega(kk) ; Gp(kk) = kp * exp ( thetap * s) /( ( taup*s +1)) ; Gc(kk) = kc*(l + 1/ (ti * s) ) ; G (kk) = Gc(kk)*Gp(kk)/(l + Gc(kk)*Gp(kk)); AR(kk) = abs (G(kk)); end % for cnt % ************************************************** % plot the results in Bode plot !t
**************************************************
loglog( axis xlabel ylabel
omega, AR) ([4221]) ( ' f r e q u e n c y, r a d / t i m e ' ) ('amplitude ratio')
dominant sine. The calculations of the amplitude ratio for a closedloop system are usually too complex to be performed by hand but are easily performed via digital computation.
The great strength of frequency response is that it provides a clear indication of the control performance for an input (disturbance or set point change) at various frequencies.
Control Performance via ClosedLoop Frequency Response
422
13.4 [l CONTROL PERFORMANCE VIA CLOSEDLOOP SIMULATION
CHAPTER 13 Performance of Feedback Control Systems
Solution of the timedomain equations defining the dynamic behavior of the sys tem is another valuable method for evaluating the expected control performance of a design. Unfortunately, the differential and algebraic equations for a realistic control system are usually too complex to solve analytically, although that would be preferred so that analytical performance relationships could be determined. However, numerical solution of the algebraic and differential equations is possi ble and usually provides an excellent approximation to the behavior of the exact equations. One reason for using simulation is that control performance specifications are defined in the time domain. The comparison of the predicted performance to the specifications often requires the entire dynamic response—the variables over the entire transient response—to ensure proper dynamic behavior. Thus, the solution to the complete model is required. Also, the engineer likes to see the entire transient response to evaluate all factors, such as maximum deviation, decay ratio, and settling time. The simulation approach is particularly useful in determining the response of a system to a worstcase disturbance. This largest expected disturbance can be introduced, and the resulting response will indicate whether or not all process variables can be maintained within their specified limits. Numerical methods used to solve ordinary differential equations were de scribed briefly in Chapter 3. Note that equations for all elements in the system— process, instrumentation, and controller—must be solved simultaneously. Also, since the solution is numerical, there is no requirement to linearize the equations, although insight from the analysis of linear models is always helpful. Simulation methods have been used to prepare most of the closedloop dynamic responses in figures for this book.
*A0 Al
} *A2
&:
■ k
VA3
! $
EXAMPLE 13.4. Determine the dynamic response of the threetank mixing process defined in Ex ample 7.2 under PID control to a disturbance in the concentration in stream B of +0.8%. This is the case considered in Example 9.2, in which the PID tuning was first determined from a process reaction curve. The dynamic response of the closedloop control system was then determined by solving the algebraic and differential equations describing the system, along with the algorithm for the feedback con troller. The following equations summarize the model: E = SP  *A3
v = Kc\E + ±rj\(t')dt'Td
dt
+ 50
FA = 0.0028u XAQ =
(13.5)
Fb(xA)b + FdxA)A FB + FA
dxA/ = (FA + FB)(xAii  xAi) for / = 1,3 dt
Vr
The PID controller can be formulated for digital implementation as described in Chapter 11. Also, the differential equations can be solved by many methods; here they are formulated in the discrete manner using the Euler integration method.
Both the process and the controller are executed at the period At.
423
E„ = SP„ — (xA3)n (v)n = (»)„_, + Kc\En  £„_, + ^ + j; [(xA3)n + 2Cka3)„_,  (*A,)„_2]}
Control Performance via ClosedLoop Simulation
(FA)n=0.002S(v)n (13.6) ,{ xvA o[FB(xA)B ) „ = — +— FdxA)A~ —
L FB + FA J„ A t c r  _ l r. )
C*A/)n+l = ixAi)n +
 [(xAi1)„  (xAi)„] for / = 1, 3
Vi
The initial conditions are (jcA()0 = 3.0% A for / = 0,3 and (u)0 = 50% open. The controller tuning constants are Kc = 30, 7) = 11, and Td = 0.8. The disturbance was a step in ixA)B from its initial value of 1.0 to 1.8 at time 20. The execution period was selected to be small relative to the time constants of the process, 0.1 minute. The result of executing the equations (13.6) recursively is the entire transient response. The manipulated and controlled variables are plotted in the adjacent figure. Note that the numerical simulation approach is not limited to linear systems. In fact, this example involves several nonlinearities, e.g., Fajca.
The simulation method is not restricted to simple input forcing functions, and this flexibility is very useful in estimating likely improvements in control performance. As demonstrated in the previous example, the control performance can be determined based on a model of the feedback process and a model of the disturbance. If the disturbance is a complicated function, a representative sample of the effect of the disturbance on the variable to be controlled can be used as a "model" of the disturbance. The effect of the disturbance(s) can be obtained by collecting openloop data of the variable to be controlled as typical variabilities in plant operation occur. EXAMPLE 13.5. PI control is to be applied to the plant with feedback dynamics characterized by a dead time and single time constant. In the plant an undesirable feed compo nent is reacted to a benign effluent component. The outlet concentration is to be controlled by adjusting the feed preheat. The control objective is to maintain the outlet concentration just below its maximum value. Too low a concentration leads to costly side reactions and byproducts; thus, the goal is to reduce the variance. The model, determined by empirical identification, and the controller tuning are as follows: 25
ACjs) \.0e GPis)Gds)Gis) = \+2s vis)
G' = ,0(I + 237) <13'7)
A sample of representative dynamic data of the reactor effluent without control is presented in Figure 13.10a. Note that some of the variation is of low frequency; feedback control would be expected to be successful in attenuating these lowfrequency components. Also, some of the variation is relatively highfrequency, which, we expect, would be difficult to reduce with feedback control. To predict the performance of the control system, a simulation can be per formed using the plant model with the sample disturbance data. This approach
100 120 140 160 180 200 Time
424
i
1
1
1
r
i
1
r
CHAPTER 13 Performance of Feedback Control Systems
2000
2000
FIGURE 13.10 Reactor outlet concentration, Example 13.5: (a) effect of disturbance without control; ib) dynamic response with feedback control.
is shown schematically in Figure 13.11, where the digital simulation would in troduce the disturbance data collected from the process, Figure 13.10a, as the forcing function. Naturally, the controller calculation, here a proportionalintegral algorithm, receives the controlled process output, which is the sum of the effects from the manipulated variable and the disturbance. The results of the simulation are given in Figure 13.10b. The variability of the controlled variable, measured by standard deviation, has been reduced substantially by feedback control. Analysis of a larger set of data than shown in the figure, which gives a more reliable indica tion of performance, shows that the standard deviation is reduced by a factor of 5. As expected, the highfrequency components are not substantially reduced by the feedback control system. Because of the smaller variation, the average value of the concentration (i.e., the controller set point) could be changed to realize the benefits from improved control performance.
425 Process Factors Influencing SingleLoop Control Performance
D
SPis) iQ _n
Gcis)
GDis)
•o—
L FIGURE 13.11
Schematic of the calculation method for predicting control performance with a complex disturbance model by a simulation method.
This example clearly demonstrates the improvement possible with feedback control and provides a simple, simulationbased method for estimating control performance. The method requires a process model, a controller equation, and a sample of the output variable without control; it provides a prediction of the standard deviation of the manipulated and controlled variables. It can be used in conjunction with the benefits calculations to estimate control benefits quantita tively, as shown in Figure 13.11. The material in this section has demonstrated that:
Dynamic simulation via numerical solution of the system equations provides a man ner for determining the dynamic performance of a closedloop process control sys tem. The approach can (1) provide a solution for nonlinear as well as linear systems; (2) consider any input forcing functions; and (3) provide detailed information on all variables throughout the transient response.
Frequency response and dynamic simulation, provide methods required to analyze control systems quantitatively. These methods are applied in the next sections to develop understanding of how specific aspects of process dynamics and the PID controller influence performance.
13.5 □ PROCESS FACTORS INFLUENCING SINGLELOOP CONTROL PERFORMANCE Because the process iGpis) and Gdis)), instrumentation iGds) and Gsis)), and the controller (Gc(s)) appear in the closedloop transfer function in equation (13.1), all elements in the feedback system influence its dynamic response and control
426 CHAPTER 13 Performance of Feedback Control Systems
performance. It is tempting to believe that a cleverly designed controller algorithm can compensate for a difficult process; however, the process imposes limitations on the achievable feedback control performance, regardless of the feedback algorithm used. An understanding of the effects of process dynamics on control performance enables us to design plants that are easier to control, recognize limits to the perfor mance of singleloop feedback control, and design enhancements. The next topic establishes a bound on the best achievable feedback control performance that gives valuable insight into the effects of process dynamics.
A Bound on Achievable Performance The first topic introduced in this section is the performance bound (i.e., the best achievable performance) for a feedback system. The best performance is explained with reference to the process shown in Figure 13.4, where the control system is subjected to a step change disturbance. (Note that this concept is applicable to more general processes than Figure 13.4.) The dynamic responses of the controlled and manipulated variables are graphed versus time in Figure 13.12, and several important features of the response are highlighted. First, note that the effect of the feedback adjustment has no influence on the controlled variable for a period of time equal to the dead time in the feedback loop. Therefore, the integral error and maximum deviation shown in Figure 13.12 cannot be reduced lower than the openloop response for time from zero (when the disturbance first affects the controlled variable) to the dead time. For the special case of a step disturbance with magnitude AD and a firstorder disturbance transfer function with gain Kd and time constant xd, the limiting integral error and maximum deviation can be simply evaluated by the equations
E = Kd(\  e(t/Xd))AD for 0 < t < 6 IAEr
= / \E\dt Jo = \KdAD\ / \(\eVTd))\dt Jo = \KdAD\[6 + xd(ee^l)]
'max I mm
(13.8)
= \KdAD\ (1  *<*/*>)
(13.9)
(13.10)
IAEmin represents the minimum IAE possible, and £maxlmin represents the mini mum value possible for the maximum deviation for a feedback system with dead time 6, a step disturbance, and a disturbance time constant of xd. No singleloop feedback controller can reduce the values further. As shown in the figure, these values provide a useful bound with which to evaluate control performance. The important conclusion from this discussion is that
The dead time in the feedback path is the facet of the process that usually limits the control performance.
i
1 1 r Deviation cannot be reduced from this via feedback
427 Process Factors Influencing SingleLoop Control Performance
CV(/) MV(r)
Dead time in feedback process l
I
i_
Time
FIGURE 13.12 Typical dynamic response for a feedback control system.
The theoretical best achievable control performance cannot usually be realized with a PID control algorithm, although the PID often provides entirely satisfac tory performance. Methods exist for deriving the control algorithms giving the theoretical best or "optimal" control, with optimal defined several ways, such as minimum integral of error squared (Newton, Gould, and Kaiser, 1957; Astrom and Wittenmark, 1984). It is important to recognize that these optimal controllers can result in excessive variation in the manipulated variable, and their performance can be very sensitive to model errors. Therefore, the "optimal" algorithms are not often applied in the process industries, although their concepts are useful in determining the achievable performance bounds in equations (13.9) and (13.10). EXAMPLE 13.6. The potential designs shown in Figure 13.4, plus one additional, have been pro posed for a plant. It is expected that all designs have nearly the same capital cost. The major disturbance is an occasional step with magnitude of 2.5 units. Which of the designs will have the best control performance? The dynamic model parameters are summarized in the following table.
Feedback process Case A B C D E
Kp 1.0 1.0 1.0 0.1 1.0
e
T
1.0 4.0 0.5 0.5 0.5
1.0 4.0 1.5 1.5 1.5
Disturbance process xd
Kd
1.0 1.0 1.0 1.0 4.0
2.0 2.0 2.0 2.0 2.0
The feedback control systems could be simulated to determine the perfor mance for each. The selection of the best performing design would be straightfor ward, but the total effort would be substantial. In this example, the limiting (best
428
possible) performances will be evaluated using equations (13.9) and (13.10) as a basis for selecting the best design. The results of the calculations are given in the following table.
CHAPTER 13 Performance of Feedback Control Systems
Case
Minimum IAE Minimum £maxl equation (13.9) equation (13.10) (smallest is best) (smallest is best)
A B C D E
1.85 15.10 0.55 0.55 0.15
3.15 4.90 1.95 1.95 0.59
Ranking (1 = best) 4 5 2 (tied) 2 (tied) 1
The rankings of the original four cases agree with the conclusions in Example 13.1. All of these have the same disturbance dynamics, so that the performance ranking depends entirely on the feedback dynamics. Since cases C and D have the smallest dead time and fraction dead time, they provide the best performance from among the original cases A to D. Case E has the same feedback dynamics as cases C and D, but it has slower disturbance dynamics. Slower disturbance dy namics are favorable, because feedback compensation has more time to correct for the disturbance before a large deviation from set point occurs. The performance measures indicate that case E should give substantially better performance than the other designs for this step disturbance. Simulations with realistic PID con troller tuning confirm these conclusions, which are based on the theoretically best possible performance.
D
hf c J
®
EXAMPLE 13.7.
As a result of Example 13.6, we have selected the case E process design. The customers of the product have stated that they will not accept the product if it ever deviates more that ± 0.40 units from the desired value, i.e., the controller set point. How does our design measure up to this demand? The results table in Example 13.6 shows that the smallest possible maximum deviation is 0.59, which is larger than the maximum allowable violation. Since this is the best possible performance—with feedback control—we know that we should not investigate alternative PID tuning or alternative feedback control calculations. We know that we must change the structure of the problem. Possible solutions include (1) reducing the magnitude of the disturbance in an upstream process (always a good concept), (2) making the feedback process faster, (3) making the disturbance process slower, or (4) inventing a control approach different from feedback. In this example, we will investigate (3) by modifying the disturbance process. (In the next few chapters, we will develop new control approaches that might be less expensive.) The simplest change to the disturbance process would be an increase in the volume of the mixing tank that would increase the disturbance time constant. From equation (13.10), the minimum disturbance time constant to achieve the required performance (minimum lE^ < 0.40) is about 6.0. However, this cal culation assumes the best possible feedback compensation; therefore, a larger disturbance tank volume would be expected for realistic feedback control. A few
429 M Process Factors Influencing SingleLoop Control Performance
15 Time
20
FIGURE 13.13 Disturbance response of the case E process in Example 13.7 modified to have zd = 10. simulations with PI control and Ciancone tuning (Kc = 1.7 and T, = 1.3) found that a disturbance time constant of 10 was just large enough to achieve the desired control performance. The dynamic response to the disturbance for a disturbance time constant of 10 is shown in Figure 13.13. As expected, the behavior of the controlled variable with a realistic PI controller is not as good as with the optimal controller; as a result, the disturbance time constant had to be increased substan tially to obtain the desired performance. The wise engineer would evaluate the likely errors in the plant models and further increase the disturbance mixing tank volume to account for these uncertainties. m^m^:m¥m&mmmmMmmmmmM
The preceding discussion and examples demonstrate that both feedback and distur bance process dynamics influence control performance. Fast feedback dynamics and slow disturbance dynamics favor good performance. Understanding this difference is crucial when designing plants with favorable dynamic behavior.
The Effect of Inverse Response Inverse response is an important characteristic of the feedback process dynamics that, when it exists, has a major effect on control performance. The reasons why inverse responses occur are explained in Section 5.4 on parallel systems, and some process systems that have parallel structures are presented and modelled in Appendix I. The process considered here is modelled in Example 1.2. In that example, the parallel process structure resulted in the concentration first increasing, then decreasing in response to a step increase in the solvent flow rate. (The reader
430 CHAPTER 13 Performance of Feedback Control Systems
may want to review this example before proceeding.) Clearly, such a process is difficult to control, because the initial response of the controlled variable is in the "wrong" direction. The initial inverse response imposes a limit to the achievable control performance in a way similar to dead time. EXAMPLE 13.8. The inverse response process, the reactor in Example 1.2, is shown in Figure 13.14 with the proposed feedback control system. Determine the control performance for this system in response to a step change in the set point of a PI controller. The model for this process, linearized about the initial steady state, is repeated here; however, this model is not exact for the transient considered, because the gain and time constants depend on the flow of solvent, which changes through the transient: GPis) =
1.66(8.0$H) (8.25* + l)2
(13.11)
The tuning for the PI controller was determined by trial and error to be Kc = 0.45 m3/min(mole/m3) and Tt = 13.0 min, which resulted in the transient response in Figure 13.15. This transient was evaluated by a numerical solution of the nonlin ear differential equations. The control performance is less than ideal, because the initial response of the controlled variable is inverse to the change in the set point. However, the response is stable, returns to the set point, and is "well behaved" (i.e., not unduly oscillatory or slow to return to the set point).
It is important torecognize that this secondorder process without dead time cannot be controlled tightly, because of the inverse response, regardless of the feedback control algorithm.
Again, we see the influence of feedback dynamics on control performance.
FIGURE 13.14 Feedback control design for Example 13.8.
431 Process Factors Influencing SingleLoop Control Performance
0.12
FIGURE 13.15
Closedloop response of the inverse response process in Example 13.8.
Model Requirements for Predicting Control Performance Throughout this book, we have monitored the effects of modelling errors on de sign decisions such as tuning and on the resulting control performance. Here the effects of modelling errors on the accuracy of control performance predictions are considered. Two linear models for the threetank mixing process have been developed; one involves a thirdorder system, and the other involves a firstorderwithdeadtime approximation. How well does the performance predicted using the approximate model compare with the performance using the "exact" thirdorder model? To answer the question for this example, the closedloop frequency responses have been calculated for both cases. The controller is a PI algorithm with the tuning constants from Example 9.2 (with the small derivative time set to zero). The closedloop transfer functions for the two cases are as follows: Exact thirdorder model.
" l^nAI lA0
1 CVjs) Dis)
i5s + l)3
(13.12)
0039 „„
, + (57TIF30
I
( ' ♦ i l O
A
Approximate firstorderwithdeadtime model. le5.5s
CVis) Dis)
(10.5*+ 1) ,5.5s
1 + 0.039
■30
(10.5s+ 1)
(13.13)
(ib)
tr l*lir lA2
AA3
432 CHAPTER 13 Performance of Feedback Control Systems
The results of the analysis are plotted in Figure 13.16. The approximate firstorderwithdeadtime model represents the system with sufficient accuracy to pre dict the control performance, especially for the lowfrequency disturbances, which is the range for which feedback control is designed and effective. The predictions differ in the highfrequency range, but they both predict very good disturbance attenuation. The approximate model leads to some error in the region of the res onance peak; however, both models identify the proper resonance frequency and properly predict that feedback is not effective in this frequency region. The results of this example on control performance, along with Examples 9.2 and 9.3 on tuning and Example 10.17 on stability analysis, lead to a very important conclusion:
An approximate firstorderwithdeadtime model typically provides sufficient ac curacy for singleloop control tuning and performance analysis when the openloop process has an overdamped, sigmoidally shaped response between the manipulated and controlled variables.
Since many processes have such wellbehaved dynamic responses, the firstorderwithdeadtime models are used frequently in the process industries. The topics in this section demonstrate some key limitations imposed on control performance by process dynamics and provide some quantitative estimates of how various process parameters affect performance. From these results, it becomes clear that many deficiencies in control performance cannot be corrected by improving the singleloop control algorithm or tuning. Finally, the sensitivity of control design methods to modelling errors has been analyzed, and the results in this section, in conjunction with previous chapters, confirm the usefulness of approximate models.
io3 io2 io1 10° Frequency (rad/min) FIGURE 13.16
Comparison of closedloop frequency response for (a) exact thirdorder model, equation (13.12), and (b) approximate process model, equation (13.13).
102
13.6 m CONTROL SYSTEM FACTORS INFLUENCING CONTROL PERFORMANCE
The goal of the control instrumentation and algorithm is to achieve, as closely as is practically possible, the best control performance (for the controlled and ma nipulated variables) for the existing process dynamics. The effect of controller algorithm and tuning constants on the system's stability has been covered exten sively in Chapters 9 and 10 and will not be repeated here. Suffice it to say that the controller tuning is selected to provide a compromise that gives acceptable be havior over a range of process dynamics. Several other important control system factors are discussed in this section. M a n i p u l a t e d  Va r i a b l e B e h a v i o r
As emphasized in Chapter 9, the behavior of the manipulated variable is also considered when evaluating control system performance. The effect of feedback control can be determined from the block diagram in Figure 13.1. MV(j) = Gd(s)Gds)Gc(s) Dis) \+Gpis)Gds)Gds)Gds) The numerator includes the product of the disturbance and controller transfer functions. As the controller tuning is selected for more aggressive control (i.e., the gain is increased or integral time decreased), the magnitude of the manipulatedvariable variation is increased. In contrast, maintaining the controlled variable close to its set point requires aggressive control, as limited by feedback dynamics. Thus, the tuning is often selected as a compromise of these two concerns, manipulatedand controlledvariable performance. EXAMPLE 13.9. Evaluate the frequency response of the controlled and manipulated variables for the system in Example 13.1, case C. Evaluate three values of the controller gain relative to the base case: (a) 75%, (b) 100%, and (c) 125%. The magnitude of the controlled variable is determined from equation (13.2), and the magnitude of the manipulated variable is determined from the following equation: Gdijco)GdJco)Gcijco) (13.15) 1 + GpiJco)GviJio)Gcijco)GdJ(o) \DiJco)\ The results are given in Figure 13.17a and b. Note that the manipulatedvariable variation at low frequencies is nearly independent of the controller gain, since the manipulated variable is adjusted slowly, in quasisteady state, in response to the disturbance magnitude. However, at higher frequencies a smaller controller gain results in a smaller manipulatedvariable magnitude (variation). As expected, the smaller controller gain also results in an increased controlledvariable magnitude (variation).
Sensor and Final Element Dynamics
The dynamics of the final control element, usually but not always a valve, and the sensor appear in the feedback path. Therefore, they influence the stability and
433 Control System Factors Influencing Control Performance
434
lO1^
CHAPTER 13 Performance of Feedback Control Systems
101o2
IO"1
10° io1 Frequency (rad/min) ia)
10° 101 Frequency (rad/min)
102
ib)
FIGURE 13.17
Amplitude ratios for disturbance input for Example 13.9: (a) of manipulated variable; ib) of controlled variable. control performance. The closedloop transfer function, including the instrument elements, for the system was derived in Chapter 7 and is repeated here:
CVjs) = Gdis) Dis) \ + Gpis)Gds)Gds)Gds)
(13.16)
EXAMPLE 13.10. Calculate the frequency response of the controlled variable to a disturbance input for the system in Example 7.1, case A, (a) when the sensor and final element
dynamics are as given in the Example, and ib) when these dynamics are negligible (i.e., all instrument dead times and time constants are reduced to zero, so that the only significant dynamics in the feedback path are from the process). For both cases, the disturbance time constant is 3 minutes. The models for the two situations are given below. Example 13.10(a) 1.84
Kt
e
Kc
Example 13.10(a) 1.84 5.5 13.5 0.65 13.3 Example 13.10(b) 1.84 1.0 3 0.65 2.8
The results of the frequency response calculations are given in Figure 13.18. Clearly, the control performance is better for ib), where the instrumentation dy namics are negligible, because the instrumentation dynamics in (a) are substantial compared with the process. 10' kin nun—i i i nun—i i i min—i i i nun—i i 111in 3 D Q
f 10° >
Q.
E < IO'2 , IO3
I "III
10
IO1
10°
10'
O I2
Frequency (rad/min)
FIGURE 13.18 Amplitude ratio of controlled variable to disturbance for Example 13.10.
435 Control System Factors Influencing Control Performance
436 CHAPTER 13 Performance of Feedback Control Systems
Recall that the dynamic model determined through empirical identification in cludes all elements in the feedback path, Gpis)Gds)Gds)Gsis). When the control system uses the same instrumentation, the identified model provides the informa tion needed for tuning and control performance assessment.
Digital PID Controllers The PID algorithm can be implemented in a digital, or discrete manner, where the calculation is performed periodically. The effects of the execution period on tuning and control performance were covered in Chapter 11, where At/i6 + x) was iden tified as the parameter indicating the change from a continuous system. When this parameter is small, approximately 0.05, the system behavior is similar to that with a continuous controller; as the parameter increases, the control performance de grades from that achieved with a continuous controller. The digital control system can be easily simulated by executing the appropriate number of process simula tion time steps between successive controller executions to provide an accurate representation of the process dynamics. The magnitude of the controlled variable in response to a sine input (i.e., the amplitude ratio of the frequency response) can be obtained; the calculations require mathematical methods for discrete systems (ztransforms) covered in this book in Appendix L and in Ogata, 1987.
PID Mode Selection With detailed analysis of controller tuning and control system performance, it is possible to discuss the selection of controller modes—proportional, integral, and derivative—for various applications. Naturally, the appropriate selection depends on the control objectives. For the vast majority of applications, zero offset is desired for steplike inputs, and an integral mode is required, as was demonstrated in Chapter 8. A few control strategies do not require zero offset, and proportionalonly control is possible for these. The most common instances are some, but not all, level controllers, which are described in Chapter 18. Also, the proportional mode is nearly always used with the integral mode, because control systems with integralonly controllers tend to have slow, oscillatory dynamic responses. Therefore, the proportional and integral modes are used for nearly all con trollers, and the only choice regards the use of the derivative mode. The tuning correlations in Chapter 9 show that the derivative time (i.e., the contribution from the derivative mode) should be small for small fraction dead times and increase as the fraction dead time increases. A rationale for this trend is that the derivative is a "predictive" mode and that prediction is needed because of the dead time in the closedloop system. A quantitative explanation is that the phase lead provided by the derivative mode allows a higher controller gain and shorter integral time, resulting in better control performance. As previously discussed, the derivative mode amplifies highfrequency noise in the measured variable. If the difference between the noise and process response frequencies is large, the noise can be attenuated by filtering (see Chapter 12). If this is not the case, the controller derivative time must be reduced, perhaps to zero, to observe the limitation on the highfrequency variation of the manipulated variable.
EXAMPLE 13.11. Select appropriate modes for the PID controller applied to the process shown in Figure 13.19. LL1 and LI'S. The feed tanks have periodic, rather than continuous, supply flows. As a result, their levels must vary with time, and their total volumes must be large enough to contain the change in inventory accumulated between supply or delivery flows. Therefore, their levels are not controlled. Level indication allows plant operating personnel to monitor the levels. FCf and FC2. Flow controllers should maintain the flows at their set points. The flow process has little dead time and a relatively noisy measurement signal. Therefore, a PI controller is used. Since the flow process is so fast, the PI is some times tuned with a small gain and small integral time so that it performs closer to an integralonly controller. This tuning further reduces the effects of noise. LC2. The reactor level influences the residence time and, therefore, the reaction conversion. The level should be maintained at its set point, but extremely rapid changes to the manipulated flow are not desirable. A PI controller is used. TC1. The reactor temperature is also a key variable in determining the reaction conversion. The controller would be PID or PI, depending on the fraction dead time.
FIGURE 13.19 Schematic of process and controllers considered in Example 13.11.
437 Control System Factors Influencing Control Performance
438
TC2. The flash drum temperature is an important variable in controlling the sep aration. The controller would be PID or PI, depending on the fraction dead time.
CHAPTER 13 Performance of Feedback Control Systems
LC3. There is no incentive to maintain the flash drum level at a specific value as long as the level remains within its allowed range. Also, flow variation to down stream units should be small. Therefore, a Ponly controller could be used. A PI controller is also allowable in this case. PCf. The pressure of the flash drum is important for safety. It is also important for product quality, because the pressure affects the components in the flash vapor and liquid phases. The pressure dynamics should have essentially no dead time. Therefore, a PI controller is selected.
Selecting the Manipulated Variable In Chapter 7, five criteria were presented for selecting a manipulated variable from among several candidates. Here, we apply these criteria using quantitative dynamic models that improve our ability to evaluate candidate designs and to select the best manipulated variable. EXAMPLE 13.12.
Using the following quantitative data, select the manipulated valve for feedback control for the reactor in Figure 13.20 that will provide better control performance. Control objective. Maintain the reactant concentration in the reactor at 0.465 mole/m3. Design problem. Should the feedback controller manipulate vA or vc to achieve good dynamic performance? Disturbance. The reactant concentration in the solvent, (Ca)sol. is normally zero but can increase to 0.463 mole/m3 in a step.
AO
Solvent
«XVA Pure A
FIGURE 13.20 Chemical reactor analyzed in Example 13.12.
Model Information. 1. The reaction is firstorder with Arrhenius temperature dependence; rA = koeE'*TCA. 2. The reactor is well mixed, and the volume is constant. 3. Flows depend on the valve openings linearly; Fc = Kvcvc and FA = KAvA. 4. Heat transfer can be modelled similarly to Example 3.7, and heat losses are negligible. 5. The heat of reaction is zero.
439 Control System Factors Influencing Control Performance
Data. F = 0.085 m3/min, V = 2.1 m3, p = 106 g/m3, Cp = 1 cal/(g°C), T0 = 150°C, Tcin = 25°C, Fcs = 0.50 m3/min, Cpc = 1 cal/(g°C), pc = IO6 g/m3, *0 = 5.62 x 107 min"1, E/R = (15,000//?)K Steadystate operation. (Ca)sol = 0, CA0 = 0.965 mol/m3, CA = 0.465 mol/m3, Ts = 85.4°C, vA = 50%, vc = 50% A thorough analysis of the potential control designs requires information about the feedback dynamics. To provide this information, a dynamic model of the system is formulated, based on the following energy and component material balances. VpCp^ = FpCpiT0T)
aF*+x aFi
Fc +
iTTcin)
£Pc*pc
V^£ dt = F(CA0  CA)  VheE'RTCA with Fc = Kvcvc, FA = KAvA, and CA0 = itiA)iFA)/F, with p,A molar density in moles/m3 The equations can be linearized and the following transfer functions can be derived for the two potential feedback dynamic systems. CAis)
K FC
vcis) iz\s + \)iz2s + 1)
with KFC = 0.00468
mole/m3 %open
Z\ = 12.4 min and r2 = 11.7 min CAjs) _ KFA vAis) ~ (Tj + 1)
with KFA = 0.0097
mole/m3 %open
r = 12.4 min
Now, the five basic criteria are evaluated for the two potential manipulated variables.
1. Causal relationship 2. Automated valve available 3. Fast feedback dynamics 4. Able to compensate for largest disturbance 5. Adjust the valve without upsetting the plant
Feedback with vA + CA
Feedback with vc * C
Yes, KFA # 0 Yes Stable, firstorder system with z = 12.4 min; this is faster! Yes, when (Ca)Sol = 0.463, uA = 25%
Yes, KFC # 0 Yes Stable, secondorder system with T = 12.4 and z2 = 11.7 min; this is slower! Yes, when (Ca)SOl = 0.463, vc = 25%
Yes, a tank of reactant is available
Yes, cooling water is available
440 CHAPTER 13 Performance of Feedback Control Systems
Based on the analysis, either valve could be used for feedback control be cause a causal relationship exists, an automated valve is available, and the valve has sufficient range to compensate for the largest expected disturbance. The control performance would be best for the system with the fastest feedback dy namics, therefore, feedback using the reactant valve, vA, is chosen as the better manipulated variable. This analysis is confirmed by the dynamic responses of both feedback control systems in Figure 13.21. The PI controller tunings are Manipulating vA Manipulating uc
Kc = 200%/(mole/m3)
Ti = 3.0 min