External versus Internal Open-Loop Unstable Processes - Industrial

Jun 11, 1998 - Douglas, J. M.; Orcutt, J. C.; Berthiaume, P. W. Design and control of feed-effluent, exchanger−reactor systems. Ind. Eng Chem. Funda...
0 downloads 0 Views 164KB Size
Ind. Eng. Chem. Res. 1998, 37, 2713-2720

2713

PROCESS DESIGN AND CONTROL External versus Internal Open-Loop Unstable Processes William L. Luyben† Department of Chemical Engineering, Lehigh University, Bethlehem, Pennsylvania 18015

This paper points out that there are two distinctly different types of open-loop unstable processes and that this leads to different methods for the selection and tuning of feedback controllers. Internal open-loop instability occurs when an individual unit operation is open-loop unstable, i.e., one or more open-loop eigenvalues with positive real parts. The classical chemical engineering example is the exothermic irreversible chemical reactor. External open-loop instability occurs when a collection of open-loop stable units are connected in such a way that the coupled system is open-loop unstable. The classical chemical example is a feed/effluent heat exchanger connected with an adiabatic exothermic chemical reactor. These two types of processes have different dynamic structures. The transfer function of an internal open-loop unstable process is typically of order 2 or higher. The transfer function of an external open-loop unstable process typically has a net order of zero. This difference explains the phenomenon described by Tyreus and Luyben (J. Process Control 1993, 3 (4), 241-251) of using reset action to improve dynamic control, which conflicts with conventional wisdom that adding reset or integral action degrades dynamic performance. 1. Introduction The occurrence of open-loop instability in chemical engineering processes is fairly common. Many chemical reactors with backmixing exhibit open-loop instability when exothermic irreversible reactions are taking place. This can occur when heats of reaction are high or when heat-transfer areas or heat-transfer coefficients are low. Conversion must also be moderate so that there is sufficient reactant present in the reactor to fuel the potential runaway. The second commonly encountered chemical engineering process in which open-loop instability has been reported is the combination of a feed/effluent heat exchanger with an adiabatic exothermic reactor. Douglas et al. (1962) and Silverstein and Shinnar (1982) discuss how the feedback of heat can lead to a coupled process that is unstable. Tyreus and Luyben (1993) explored the exchanger/ reactor process and demonstrated an unexpected phenomenon. In most processes, integral or reset action is added to remove steady-state error, but its addition leads to a degradation in dynamic performance, i.e., controller gains must be reduced and closed-loop time constants increased for the same closed-loop damping coefficient. However, Tyreus and Luyben showed that adding integral action in the exchanger/reactor process improved dynamic responses. The effect was demonstrated, but no fundamental explanation of its underlying cause was presented. That is the basic purpose of this paper. The literature contains a number of papers dealing with the tuning of open-loop unstable processes. All of †

Telephone: 610-758-4256. Fax: 610-758-5297. E-mail: [email protected].

these papers assume that the dynamics of the open-loop unstable process can be approximated by a deadtime/ positive-pole transfer function.

GM(s) )

Kpe-Ds τos - 1

(1)

In some papers additional lags (negative poles) are also considered.

GM(s) )

Kpe-Ds (τos - 1)(τ1s + 1)

(2)

Recent papers that explore this type of system include Poulin and Pomerleau (1996), Venkatashankar and Chidambaram (1994), Shafiei and Shenton (1994), Rotstein and Lewin (1991), and DePaor and O’Malley (1989). This type of model is assumed to describe any open-loop unstable system. We will assume that this type of model can be used for describing the dynamics of internal open-loop unstable processes, such as continuous stirred-tank reactors (CSTR) with exothermic irreversible chemical reactions. The validity of this assumption will be explored in a future paper. For external open-loop unstable processes, we will show that the transfer function given in eq 1 is not appropriate. These external open-loop systems have a different structure, and this yields different transfer functions. 2. Internal Open-Loop Unstable Processes Figure 1 illustrates the effects of controller type (P or PI), deadtime, and reset action for a process with the transfer function given in eq 1. Since this transfer

S0888-5885(98)00040-2 CCC: $15.00 © 1998 American Chemical Society Published on Web 06/11/1998

2714 Ind. Eng. Chem. Res., Vol. 37, No. 7, 1998

The need to preheat the feed to a desired temperature is the usual case when the reaction is carried out in a tubular reactor. Unless some minimum inlet temperature is achieved, the reaction will quench. If the reactor is a CSTR, there is usually no kinetic reason for feed preheating, although there are often energy conservation reasons for feed preheating. Tyreus and Luyben (1993) discussed the tubular reactor case, with the additional complexity of inverse response. They modeled the tubular reactor by including deadtime, and this led to a fairly complex analysis of the coupled open-loop unstable process using frequency-response methods. In the analysis given below, we use a more simple model of the reactor so that the analysis is easier. Extension to more complex models is more tedious but straightforward. Figure 2 gives a block diagram of the individual components in the open-loop system. We assume that the dynamics of the heat exchanger are negligible compared to the dynamics of the reactor, so the reactor inlet temperature Tin is related to the flow rate of the bypass stream FB and the reactor exit temperature Tout by the algebraic equation

Tin(s) ) K1Tout(s) + K2FB(s)

(3)

Note that K2 is negative since an increase in the bypass flow rate decreases Tin. This means that the temperature controller Gc(s) must increase the bypass flow rate when the temperature increases, so the controller gain must be negative. To avoid confusion, we will use positive controller gains and a positive K2 in the analysis that follows. The reactor is assumed to have the simple open-loop stable transfer function with a negative pole at s ) -1/τR.

GR(s) )

Figure 1. Nyquist plots for the internal open-loop unstable process: (A) P control; (B) PI control.

function has one pole in the RHP, these Nyquist plots must have one counter-clockwise encirclement of the (-1, 0) point for the closed-loop system to be stable. There is a controller gain Kmin below which an encirclement cannot occur, and there is also a controller gain Kmax above which a counterclockwise encirclement cannot occur. Figure 1A shows that the range of stable gains for P control gets smaller as deadtime increases. Figure 1B shows that when PI control is used, the range of stable gains increases as the integral time constant τI is increased. There is a limiting value of reset τmin I below which the system cannot be stablized. Thus for an internal open-loop unstable process, adding reset or integral action degrades the dynamic performance. This is the case in open-loop stable processes as well. 3. External Open-Loop Unstable Processes Figure 2 shows a feed-effluent heat exchanger coupled with an adiabatic exothermic reactor. The heat of reaction produces a reactor effluent temperature that is higher than the temperature of the feed stream to the reactor. Therefore, heat can be recovered from the hot stream leaving the reactor. The control objective is to control the reactor inlet temperature by manipulating the bypass flow of cold material around the heat exchanger.

Tout(s) Tin(s)

)

KR τRs + 1

(4)

Combining eqs 3 and 4 gives

KR Tin ) K1 T + K2FB τRs + 1 in

[

Tin 1 -

Tin(s) )

[

(5a)

]

K1KR ) K2FB τRs + 1

] (

(5b)

K2(τRs + 1) F ) τRs + 1 - K1KR B K2 (τ s + 1) K1KR - 1 R FB(s) (6) τR s-1 K1KR - 1

GCP(s) )

Tin(s) FB(s)

[( ( [(

)

)

)

)

] ]

K2 (τ s + 1) K1KR - 1 R τR s-1 K1KR - 1

)

(7)

Thus, the coupled open-loop system has a transfer function GCP(s) relating the controlled variable Tin(s) to the manipulated variable FB(s) that is open-loop unstable

Ind. Eng. Chem. Res., Vol. 37, No. 7, 1998 2715

arg GM(iω)GC(iω) ) -π ) -ωuD - π + arctan(ωuτo) (9) An iterative procedure can be used to solve for ωu, given the parameters D and τo. As Figure 1B shows, using a PI controller changes both Kmin and Kmax, and they approach each other as reset time τI is decreased. 4.2. External Open-Loop Unstable Process. 4.2.1. Proportional Control. If the external openloop unstable process has the transfer function given in eq 7 and a proportional controller is used, the closedloop characteristic equation is

1 + GCP(s)GC(s) ) 0 ) 1 + Figure 2. External open-loop unstable process.

if the product of the gains K1KR is greater than 1. The heat-exchanger gain K1 depends on the heat-transfer area and the approach temperature differential on the hot end of the process (the temperature difference between the entering hot stream and the exiting cold stream), but it cannot be greater than unity. We use a value of K1 ) 0.8 in the numerical example given later in this paper. The reactor gain KR depends on the heat of reaction, the temperature dependence of the reaction rate, and the initial extent of conversion. Tyreus and Luyben explored values between 2 and 7. We initially use a value of KR ) 2.5 in the numerical case discussed later, but the impact of this important parameter is explored in a later section of this paper. The important feature of the transfer function given in eq 7 is that it has a net order of zero; i.e., the order of the numerator polynomial in s is the same as the order of the denominator polynomial in s. With the simple first-order reactor model used in eq 4, these polynomials are of order 1. If a higher order reactor model is used, the orders of the numerator and denominator polynomials are higher, but the net order of the transfer function GCP(s) remains zero. Thus, these external open-loop unstable processes have an important structural difference from the internal open-loop unstable processes. The impact of this difference is seen in controller tuning and in the controller stability limits for Kmax and Kmin. 4. Closed-Loop Stability 4.1. Internal Open-Loop Unstable Process. If the internal open-loop unstable process has the transfer function given in eq 1 and a proportional controller is used (Gc(s) ) Kc), the closed-loop characteristic equation is

1 + GM(s)GC(s) ) 0 ) 1 +

[ ]

Kpe-Ds K τos - 1 c

(8)

As Figure 1 indicates, the minimum value of controller gain to achieve a counterclockwise encirclement of the (-1, 0) point is Kmin ) 1/Kp. The maximum value of gain Kmax occurs at a frequency ωu where the curve crosses the negative real axis with a phase angle of -180°.

[( (

)

]

K2 (τ s + 1) K1KR - 1 R Kc τR s-1 K1KR - 1 (10)

)

The root locus plot for this system has a single root, which starts in the RHP at the positive pole s ) (K1KR - 1/τR) when Kc ) 0. As Kc increases, the root moves to the left along the real axis, reaching the origin when the controller gain is

Kmin )

K1KR - 1 K2

(11)

This is the minimum gain needed for closed-loop stability. As gain continues to increase, the root moves to the left and approaches the zero at s ) -1/τR as Kc f ∞. Thus, in this system there is no maximum controller gain. This is a major difference between the internal and external open-loop unstable processes. In any real system there are always addition lags and/ or deadtimes. In the exchanger/reactor process there will be temperature measurement lags and control valve lags. We assume that there are three first-order lags with time constant τm. This makes the closed-loop characteristic equation

1+

[( (

)

]

K2 (τ s + 1) K1KR - 1 R Kc )0 τR (τms + 1)3 s-1 K1KR - 1

)

(12)

Now there are four roots, three of them starting far to the left on the negative real axis at s ) -1/τm. Two of these roots become complex conjugates and move into the RHP as controller gain is increased to Kmax. This value of controller gain depends mostly on the value of τm provided the ratio τm/τR is small, which is the typical case. The value of the imaginary part of s where these roots cross the imaginary axis is approximately 1.7/τm since

arg

(

)

1 ) -3 arctan(ωτm) ) -π (τms + 1)3

(13)

when the phase angle contribution of the three lags is -180°. 4.2.2. Proportional-Integral Control. If the external open-loop unstable process has the transfer function given in eq 7 and a proportional-integral controller is used, the closed-loop characteristic equation is

2716 Ind. Eng. Chem. Res., Vol. 37, No. 7, 1998

Figure 3. Nyquist plots for P control of the external open-loop unstable process.

[(

][

Figure 4. Nyquist plots for PI control of the external open-loop unstable process.

1 + GCP(s)GC(s) ) 0 ) K2 (τ s + 1) K1KR - 1 R τIs + 1 1+ Kc (14) τR τIs s-1 K1KR - 1

(

)

)

]

The root locus plot will have two roots, one starting at the origin and the other at the positive pole s ) (K1KR - 1)/τR. The two roots join in the RHP, become complex conjugates, circle into the LHP, and approach the two zeros at s ) -1/τR and s ) -1/τI as Kc f ∞. Thus, there is no maximum value of controller gain. Rearranging eq 14 to put it in the form of a polynomial in s gives

[(

)

]

τRτI (1 + K2Kc) s2 + K1KR - 1 K2Kc K2Kc (τR + τI) - τI s + ) 0 (15) K1KR - 1 K1KR - 1

[(

)

] [

]

Figure 5. Effect of reset on minimum and maximum gains.

Solving for the real part of the two complex conjugate roots and equating to zero give the value of the minimum controller gain.

Kmin )

(

)(

)

τI K1KR - 1 τR + τI K2

(16)

Comparing the minimum gains for P control given in eq 11 and for PI control given in eq 16 shows that the PI minimum gain is less than the P minimum gain by the factor τI/(τR + τI). The smaller the reset time (the more reset action), the smaller this ratio and the smaller the PI minimum gain. Now, just as in the P control case, there will be other lags that will yield a maximum controller gain. However, since this maximum gain is primarily a function of these lags (τm), the maximum gains for the P and PI will be approximately the same. So, the smaller the minimum gain, the wider the range of stable controller gains.

The simple analysis given above clearly demonstrates analytically why adding reset action improves the control of these external open-loop unstable processes. This is completely opposite to the effect of reset in internal open-loop unstable processes. 5. Controller Tuning To demonstrate the concepts discussed above, a numerical case is considered. The various time constants are expressed as ratios to the reactor time constant τR: τm/τR and τI/τR. Time is given in dimensionless units t/τR. Frequency is expressed in radians: ωτR. All gains are expressed as products: KcK2 and KRK1. Specific values used are τm/τR ) 0.1 and KRK1 ) 2.5. Figure 3 gives Nyquist plots of the external open-loop unstable process, including three lags and using proportional-only control. The maximum value of dimen-

Ind. Eng. Chem. Res., Vol. 37, No. 7, 1998 2717

Figure 7. Closed-loop log modulus plots with P control.

Figure 8. Setpoint step responses for P and PI control.

Figure 6. Closed-loop log modulus plots for PI control: (A) reset ) 0.61Pu; (B) reset ) Pu; (C) reset ) 1.5Pu.

sionless controller gain (Kmax K2) is calculated numeric cally to be 6.55. The minimum gain is unity. The ultimate frequency is ωuτR ) 15.8. Curves are shown K2/4, for three values of controller gain KcK2: 1, Kmax c and Kmax K /2. There is a limited range of stable gains. 2 c Figure 4 shows the effect of using PI control with varying the reset time. Controller gain is constant at unity for all the curves. The three values used for τI/τR are the ultimate period (Pu ) 2π/ωuτR ) 0.397), half Pu, and one-quarter Pu. We define the length of the line along the negative real axis in which the (-1, 0) point must lie as the stability range. The two points of intersection with the negative real axis correspond to Kmax and Kmin. It is clear that this stability range initially increases as the reset time is decreased from infinity (P control) to smaller values. This effect should be compared with the effect of reset in internal openloop unstable processes, as shown in Figure 1B. Of course, eventually, as the reset time is reduced further, the stability range will begin to decrease

2718 Ind. Eng. Chem. Res., Vol. 37, No. 7, 1998

Figure 10. Effect of KR on Kmax and Kmin.

Figure 9. Effect of KR on Nyquist plots: (A) P control; (B) PI control.

because the high-frequency crossing point of the curve moves to the left. So there should be an optimum value for the reset time. One intuitive measure of the stability range is the ratio of the maximum to the minimum /Kmin gains Kmax c c . Figure 5 plots these two gains and their ratio versus reset time. The maximum ratio occurs at a reset time τI/τR ) 0.242. This value of reset is 0.61Pu. The corresponding maximum and minimum K2 ) 3.73 values of gain with this reset time are Kmax c and Kmin K ) 0.255, giving a ratio of 14.8. 2 c To test whether or not our intuitive guess that the reset time that maximizes the ratio of gains provides the best control, closed-loop log modulus plots were made for a number of reset times. Controller gains were varied until the gain was found that minimized the peak in the curve. This was repeated for several values of the reset time. Figure 6A uses a reset time of 0.61Pu, which is predicted to give the best performance if the notion of using the maximum gain ratio is correct. The optimum gain is KcK2 ) 0.765 ) 3Kmin c K2. This value of gain gives the minimum peak height. An optimum gain occurs because the peak in the curve becomes very large as we approach either the minimum gain (at low

frequencies) or the maximum gain (at high frequencies). The best performance obtainable with this value of reset is a peak in the log modulus curve of 4 dB at a resonant frequency of 3 rad. Parts B and C of Figure 6 show what happens as the reset time is increased from 0.61Pu to Pu to 1.5Pu to 2Pu. Performance initially improves as we increase the reset time: the peak height decreases and the resonant frequency increases. We want small peaks because this corresponds to larger closed-loop damping coefficients. We want large resonant frequencies because this indicates tighter control (small closed-loop time constants). The best reset value is 1.5Pu where the peak is 3 dB and the resonant frequency is about 9 rad. Therefore, the reset time that maximizes the ratio of maximum to minimum gains is not the optimum. Figure 7 gives closed-loop log modulus plots for various gains when P control is used. The value of gain that gives a reasonable 3 dB peak is one-third of the maximum gain (KcK2 ) 2.2). The resonant frequency is at about 13 rad, indicating that the closed-loop time constant with P control is smaller than that with PI control. However, one of the significant problems with P control is steady-state offset, which is significantly amplified in these open-loop unstable systems. This problem was pointed out by DePaor and O’Malley (1989). Note in Figure 7 that the low-frequency asymptotes occur at positive decibels, which means the magnitude ratio is greater than 1.

[ ] Y(iω)

set Y(iω)

>1

(17)

ωf0

In normal systems, a proportional controller gives a steady-state servo transfer function that is less than unity. The steady-state error increases as the controller gain decreases. Results of dynamic simulations are given in Figure 8. A unit step change in setpoint is made at time equal the zero. These results confirm the frequency response predictions. The PI controller gives a better response than the P controller, and the PI controller with a reset

Ind. Eng. Chem. Res., Vol. 37, No. 7, 1998 2719

both P and PI controllers. In Figure 9B the reset time is set equal to the ultimate period Pu for each value of KR. The narrowing of the stability range is clearly shown. Figure 10 shows how the maximum and minimum gains change as KR changes for both P and PI control. Note that with P control the stability range goes to zero for values of KR above 7, indicating that the closed-loop system cannot be stabilized. Figure 11 gives closed-loop log modulus curves for the case when KR ) 4. The controller is PI with the reset time set equal to the ultimate period. When the measurement lag is τm/τR ) 0.1, Figure 11A shows that the smallest attainable peak in the curve is 7 dB. This indicates a fairly oscillatory system with potentially poor robustness. Figure 11B shows that performance can be improved by reducing the measurement lag to τm/τR ) 0.05. Now the peak can be reduced to 3 dB. This occurs because reducing the measurement lag increases the maximum controller gain, and this increases the stability range. The numerical example illustrates the importance of keeping measurement lags small in these open-loop unstable processes. This is true for both external or internal open-loop unstable processes. 7. Conclusion Two types of open-loop unstable processes are identified and contrasted. The counterintuitive effect of integral action for external open-loop unstable processes is explained through mathematical analysis. A tuning procedure is developed for this type of system that finds the optimum values for reset and controller gain that produce a desired peak in the closed-loop log modulus curve at the largest possible resonant frequency. The desired peak height cannot be achieved if the reactor gain is too large or if the measurement lags are not kept small. Nomenclature Figure 11. Effect of measurement lag on closed-loop log modulus with KR ) 4: (A) τm ) 0.1; (B) τm ) 0.05.

of 1.5Pu ) 0.60 gives the best response. Note the large steady-state offset produced by the P controller. 6. Effect of KR The most important parameter in external open-loop unstable processes is the process gain KR. This indicates the degree of amplification of a change in inlet temperature to the reactor as it appears in the outlet temperature. In the numerical example considered above, a value of KRK1 ) 2.5 was used. In this section we look at the impact of KR on controller tuning. As we will demonstrate, increasing KR makes it more difficult to stabilize the system, and if KR is too large, closed-loop stability may not be possible unless the design of the heat exchanger is modified to reduce K1 (i.e., reduce the area of heat transfer). As shown in eq 7, there is a positive pole located at s ) (K1KR - 1)/τR. As KR increases, the pole moves to the right along the positive real axis. Thus the minimum controller gain increases, and the stable range between the maximum and minimum gains decreases. Figure 9 shows the effect of KR on the Nyquist plot for

D ) deadtime GC ) feedback controller transfer function GCP ) transfer function of coupled exchanger/reactor process GR ) reactor transfer function GM ) process transfer function K1 ) heat exchanger gain K2 ) heat exchanger gain Kc ) controller gain Kp ) process gain KR ) reactor gain Lc ) closed-loop log modulus s ) Laplace transform variable t ) time U ) manipulated variable Y ) process output Yset ) setpoint τI ) reset or integral time constant τm ) measurement lag time constant τo ) process open-loop time constant

2720 Ind. Eng. Chem. Res., Vol. 37, No. 7, 1998 τR ) reactor time constant ω ) frequency (rad/time)

Literature Cited DePaor, A. M.; O’Malley, M. Controllers of Ziegler-Nichols type for unstable process with time delay Int. J. Control 1989, 49 (4), 1273-1284. Douglas, J. M.; Orcutt, J. C.; Berthiaume, P. W. Design and control of feed-effluent, exchanger-reactor systems. Ind. Eng Chem. Fundam. 1962, 1, 253-257. Poulin, E.; Pomerleau, A. PID tuning for integrating and unstable processes. IEE Proc.-Control Theory Appl. 1996, 143 (5), 429435. Rotstein, G. E.; Lewin, D. R. Simple PI and PID tuning for openloop unstable systems. Ind. Eng. Chem. Res. 1991, 30, 1864-1869. Shafiei, Z.; Shenton, A. T. Tuning of PID-type controllers for stable and unstable systems with time delay. Automatica 1994, 30 (10), 1609-1615.

Silverstein, J. L.; Shinnar, R. Effect of design on the stability and control of fixed-bed catalytic reactors with heat feedback. 1. Concepts. Ind. Eng. Chem. Process Des. Dev. 1982, 21, 241256. Tyreus, B. D.; Luyben, W. L. Unusual dynamics of a reactor/ preheater process with deadtime, inverse response and openloop instability. J. Process Control 1993, 3 (4), 241-251. Venkatashankar, V.; Chidambaram, M. Design of P and PI controllers for unstable first-order plus time delay systems. Int. J. Control 1994, 60 (1), 137-144.

Received for review January 21, 1998 Revised manuscript received April 13, 1998 Accepted April 14, 1998 IE9800400