THE FEEDFORWARD CONTROL OF A CHEMICAL REACTOR

analog computer. Significant improvement in control was observed over a wide spectrum of disturbances. N RECENT years there has been increasing intere...
0 downloads 0 Views 629KB Size
T H E FEEDFORWARD CONTROL OF A CHEMICAL REACTOR J. T. H A R R I S ' AND R. S. SCHECHTER Department of Chemical Engineering, University of Texas, Austin, Tex.

A feedforward controller was designed using both the response characterisiics of an analog-simulated, nonlinear chemical reactor and the linearized differential equations describing the process. The characteristics of a combined feedforward and feedback control system are investigated by simulation of an analog computer. Significant improvement in control was observed over a wide spectrum of disturbances.

years there has been increasing interest in automatic 34.odern processing equipment and high product standards have made automatic control both a necessary and a profitable part of the chemical processing industry. Safety is another factor hvhich has catalyzed the development of automated processes. Chemical processes by their very nature d o not lend themselves to simple control. Often the kinetic equations representing the rates of chemical reactions are highly nonlinear, making the dynamic analysis difficult, if not impossible. T h e continuous stirred-tank reactor is the simplest reaction system (and the most frequently studied). I n their excellent Lvork Bilous and .4mundson (2) considered the stability of a continuous-flow stirred-tank reactor. They established criteria to determine the stability of the reaction system and studied the nature of the approach to the stationary state. Ehrenfeld ( 6 ) considered the same type of reactor. Included in this analysis .$casa comparison of the exact solutions of the differential equations obstained from a n analog computer with the solutions obtained by linearizing the equations and solving them analytically by Laplace transform techniques. The two t)-pes of solutions compared very well for small step upsets in the system. Aris and Amundson ( 7 ) investigated the controllability of the stirred-tank reactor. They analyzed the approach of the reaction system to steady state, the stability in the neighborhood of steady state, and the possibility of control. I t was found better from the theoretical standpoint to use the temperature of the reactor instead of the concentration as the measured variable. Hotvever, this procedure is not practical in many actual cases, bemuse the outlet concentration is usually the variable of interest, and the temperature of the reactor and the outlet concentrations are often not simply related. Bilous, Block, and %et (3) also considered the control of stirred-tank reactors. They used frequency response analysis to design the feedback control systems for a stirred-tank reactor and compared the quality of control for various controller settings for some numerical examples. N RECENT

I process control.

Present address, E. I. du Pont de Nemours & Co., Inc., Wilmington, Del.

Root-locus methods were used by Ellingsen and Ceaglske

(7) to design a control system for a stirred-tank reactor using the linearized reactor equations. They controlled their reactor about both stable and unstable steady states, using either temperature or concentration as the measured variable. These investigators found that when using a three-mode feedback controller it was not much more difficult to control the system about a n unstable steady state than a t a stable steady state. Tierney, Holman. Nemanic, and Amundson (8) simulated a stirred-tank reactor and its conventional control system on a digital computer. They also demonstrated the effectiveness of feedforward control to modify the setpoint of a conventional controller. As a n alternative procedure. they suggested that the feedback and the feedforward signals be algebraically combined to change the manipulated variable. These investigators also simulated a complete controlling digital computer which utilized combined feedforward and feedback control. Studies of combined feedback and feedforward control of a stirred-tank reactor are presented in this paper. Control of one of the outlet concentrations was effected using the temperature of the reactor as the manipulated variable. Corrections in the temperature were made by the combined action of feedforward and feedback control. The signal from the feedback controller was summed algebraically with the signal from the feedforward controller to modify the temperature. This procedure was suggested by Tierney, Holman, Nemanic, and Amundson (8) but was not tested by them. The reactor was simulated on a n analog computer, and a satisfactory feedback control system was found using this stimulation program. The feedforward controller was designed in two ways using (1) the results of a frequency response analysis of the nonlinear simulated system and (2) the linearized differential equations which describe the reaction system. Reactor Dynamics

Reactor Equations. In the development of the dynamic equations describing the stirred-tank chemical reactor (pictured schematically in Figure 1) the following assumptions are made :

1. The reacting mixture is perfectly mixed-that are no temperature or concentration gradients. VOL. 2

NO. 3

is, there

JULY 1963

245

2. The heat transfer coefficient between the reacting mixture and the heat exchanger is constant. 3. The changes of volume and density owing to the reaction are negligible. 4. The outlet concentrations and temperature are identical with those which exist in the reaction vessel. 5. The average heat capacity of all streams is a constant. 6. The stoichiometric equation for the reaction is A f vbB

Equations 1, 2, 3, and 4 can be simplified considerably if the deviations from steady state are small. For this case, the differential equations can be linearized by expanding each term into a Taylor series about the stationary state and neglecting second-order and higher terms. Applying this procedure to the system of differential equations gives

vrR

The dynamic equations of the stirred-tank reactor are obtained by formulating the energy and material balances around the system. These balances are simply statements of the conservation of energy and mass. Follo\ving Bilous and Amundson, we write in which

in which the following dimensionless variables have been used :

*

T TO

= -

XLl

‘la

= -

‘lb

= -

XO

xb

x0

vv

=

e

=-

XQ

wt

AE R To UA

=-

7

= -

PCP

w

Figure 1. Schematic diagram of continuous-flow stirred-tank reactor 246

l&EC

6b

= 7b

li.

=*-*.

*a

=

56

= $b

-

$68

=

-

*cs

‘la

*a

*c

vas

- Tba - *as

2.0

$‘as

1.0

$‘bs

Qa = 0.5 Q b = 0.5

+cs

= = =

2.0 2.0

ff

5.0

=

x

@ = 20 y = 15.0

0.8

c =

10’

Vb Vr

= 1.0 = 1.0

1.8

which result in

V

0

=

where subscript s refers to the steady-state value, and the tilde superscript denotes the deviation from steady state. The definitions of the constants appearing in these equations, together with their numerical value a t the steady state of the system to be considered, appear in Table I . These numerical values arise from the following arbitrary choice of the parameters. v a ~ s= Tbzs =

X, -

-

‘la

PROCESS DESIGN A N D DEVELOPMENT

=

0.901

qas =

0.765

Tbs

0.265

vrs

= 0.235

a t the steady state. These are the steady-state conditions about which control will be studied. This particular choice of the parameters does not have any evident advantage over any other choice; however, in selecting a set of parameters to be investigated, it is desirable to have all the concentrations and temperatures of such a magnitude that a finite disturbance perceptibly changes these variables. Finally, it was deemed desirable to study control about a stable stationary state. That the particular valuesof theparameters selected for our study yield a stable system can be most easily demonstrated by constructing a plot of the rate of heat generation as a function of temperature and a plot of the variation in the rate of heat removal as a function of temperature on the same graph. Bilous and Amundson ( 2 ) have shown that the system is stable if the slope of the rate of heat-generation curve is less than the slope of the heat-removal curve a t the point of intersection of these two curves. This comparison has been made for our system and the stationary state found to be stable. Thus the parameters given above seem to form a reasonable set about which to study control.

Constants of linearized Differential Equations

Uejnition

Value

- B

+ ai?

-(1

-1.31

?br)

- P -ae

A

- _

-0.885

?as

D _. -

*'

-5.78

Vaivbs

*a2

-0.307 -1.88

Figure 2. system

Block diagram of reaction

Feedback Control

To control the reactor, it was decided to use a n outlet concentration, qa, as the controlled variable. The manipulated variable was selected to be the temperature of the coolant, since the reaction is temperature sensitive. The temperature in the cooling coils is normally regulated by altering the flow rate of coolant or steam in the heat exchanger, but to avoid unnecessary complication of the problem, the temperature of the coolant was requlated directly. Since the time constants relating the change in the flow rate of coolant or steam to the change in the temperature of the heat exchanger, are small compared to the other time constants of the system, no loss of generality was involved. Since feedforward control used by itself is not likely to be satisfactory because of drift. it was desirable to include a feedback control system in i he over-all control scheme. The feedback controller was not the principal object of study i n this investigation and it was decided arbitrarily to use a proportional-reset con troller for our feedback control. T h e controller was designed by trial and error analog computer simulation, so that for step changes in the concentration the overshoot was held to a minimum, the return to the set point was fast, and the oscillations were damped rapidly. Feedforward Control

Figure 2 shows a block signal flow diagram of the process and its control system. I t is easily wen from this diagram that if

.-

-

ijb; = $a =

then

and

-

&

=

O

t 0.05 iia

-

'

0.00 -0135

-

I

W

-

Q a l ai

+O.lO

= 1.4

/

0.00

n

-0.100

I

2

3

4

5

6

7

e Figure 3. Response of outlet concentration to disturbance in inlet concentration

If 5, is to equal zero, which is the desired effect of the control system, set

Equation 8 defines the transfer function of the feedforward controller for a linear system. This function is the ratio of the transfer function of the inlet concentration-outlet concentration relationship to the transfer function of the coolant temperature-outlet concentration relationship. Empirical Design of Feedforward Controller. Thus, it is necessary to know the transfer function of the reactor to design a feedforward control system. One means of establishing these relationships entails the application of frequency response techniques. Sinusoidal disturbances of various frequencies are superimposed on the steady-state values of one of the inlet concentrations and on the coolant temperature and their effects on the outlet concentration are observed. T h e frequency response analysis of the system was made using the nonlinear mathematical model simulated o n the analog VOL. 2

NO. 3

JULY 1 9 6 3

247

ii, -0.05

-

0.3

f . ~

+O.lO

0.00

-

-a---’/

-0.10

For the purpose of design, it is helpful to have an approximate expression for the transfer functions. The Bode plots are very useful in the selection of a n approximation of the transfer function. The slope of the log of the amplitude ratio (MI)us. log frequency curve (Figure 5) a t high frequencies is -20 decibels per decade. This characteristic shape of the Bode plot clearly indicates that the response to a disturbance in the inlet concentration is approximately first order. The transfer function of a first-order system is known ( 4 ) to be of the form

-‘T +L*

(9)

9

where

Figure 4. Response of outlet concentration to disturbance in coolant temperature

p

computer. Typical frequency response curves for sinusoidal upsets in the inlet concentration and the coolant temperature are shown in Figures 3 and 4, respectively. Plotted simultaneously against time in Figures 3 and 4 are the outlet concentration (upper curve) and the sinusoidal disturbance. I t can be seen that the output varies in a periodic manner and lags the input sinusoidal disturbance. From similar graphs the ratio of the amplitude of the output to the amplitude of the sinusoidal disturbance can be determined for various frequencies, and the number of degrees that the output lags the inlet sinusoidal disturbance can be determined. The periodic outputs due to the sinusoidal inputs are not symmetric. For the frequencies used to generate the results shown in Figures 3 and 4, the amplitude of the positive portion of the output is greater than the negative amplitude. However, this difference in amplitude varies with frequency, being more pronounced at low frequencies. This behavior is due to the nonlinearity of the reaction system and is partially due to the fact that a t a higher temperature, a small change in temperature has less effect on the reaction rate than a t a lower temperature. The amplitude of the outlet concentration was taken as an average of the positive and the negative amplitudes. This procedure does not appear to have theoretical significance but was decided upon rather arbitrarily. Figures 5 and 6 show the Bode plot for the sinusoidal disturbances in the inlet concentration of the reactor. The experimental data are shown as points, and the calculated responses (discussed) as smooth curves.

W

Figure 5. 248

G = transfer function M = over-all gain of system = Laplace transform variable

and subscript 1 refers to the response of the system to disturbances in the inlet concentration. Values of T I = 0.80 and M I = 0.83 provided an adequate fit of experimental results, as can be seen in Figures 5 and 6 by comparing solid theoretical curve with experimental points. Figures 7 and 8 show the Bode plot relating the response of the outlet concentration to a sinusoidal disturbance in the coolant temperature. I t is not difficult to see that the frequency response is approximately that of a second-order system and is given by

where 5 is the damping coefficient and subscript 2 refers to the response of the system to disturbances in the coolant temperature. An adequate representation of the experimental response was obtained by letting Mz = -0.305, { = 0.505, and T2 = 0.566. The calculated response is plotted as the smooth curves in Figures 7 and 8. Using Equations 9 and 10 in Equation 8 there results

From Figure 2 we see that GFacharacterizes the response -of ij, relative to variations in Gar. Using Equation 11 and converting back to the time domain, we obtain

RADIAN / UNIT DIMENSIONLESS TIME

Amplitude ratio vs. frequency of disturbance in inlet concentration

l & E C PROCESS D E S I G N A N D D E V E L O P M E N T

,.O 0

.

-*\

3d 6' 0

Q sd CURVE CALCULATED FROM FRST ORDER APPROXIMATION

12d

I56

186

02

01

Solving Equation 12 fsor solution gives

.Jc

I

0.4

I

06

I

I

I

08

IO

20

I

60

40

I

80 100

and neglecting the complementary

-~0 A(yGc) =

I

TI l c f ~ [ M PT I

.ini)+ (T22E2$(Q d

2TzP d( d Q a7 iai)

+ Q&i])

d7

(13)

The complementary solution and the other initial conditions in the solution may be neglected because the time, 8,is much greater than the time constants of the system, and the system will have forgotten the initial conditions. After integrating by parts twice, Equatimon 13 becomes

The last term of Equation 14 can be simulated on an analog

$,lo

0.1

a2

computer equipped for repetitive operation, but the analog

0.4

0.6 OB I0

RADIAN

/

20

4.0

6.0 80 10.0

UNIT DIMENSIONLESS TIME

Figure 7. Amplitude ratio vs. frequency of d i s t u r b a n c e in coolant temperature

W

Figure 8.

RADIAN

/

UNIT DIMENSIONLESS TIME

P h a s e lag vs. frequency of d i s t u r b a n c e in coolant temperature VOL. 2

NO. 3

JU1.Y

1963

249

computer used in this investigation was not so equipped. Thus it was necessary to select a function to represent the variation in the input concentration rather than using statistical disturbances. I t was decided to study the response of the control system to sinusoidal upsets in the input concentration. Suband integrating, we stituting a sinusoidal variation for Qoiaz. obtain

By arguments identical to those detailed previously, we have

where the parameters are defined as

A = -

a13 M = (Q22Q33

-

A

a22)

(a33

+

-(4121123

a32a23)

- 413Q22) 19.7

=

5.78

=

-7.48

If the disturbance in the inlet concentration is again assumed to be sinusoidal, Equation 21 becomes 2 T2E2 +

k) (&) TI)^ +

w 2)]sin

wB

(15)

When the previously evaluated constants for the system are used, Equation 15 reduces to Using the appropriate numerical values, we have

A(Gc)=

[0.278

w

-

2.61

w

cos w0

+

e) 1 + cos + wo

w2

(1.12 The coefficients of the cosine and the sine correspond directly to the feedforward controller settings. Derivation of Feedforward Controller Characteristics from Linearized Equations. The feedforward controller can also be designed theoretically from the linear equations describing the behavior of the reactor. By transforming the set of linearized equations (Equations 15, 16, and 17), we can

show

If iai= $, = $b = $< = 0, the transfer function for the ratio of 5a to Q,?& is

If if y;,

-

-

tar= ?Ibi

= $a =

=

0, the way in which

-

6, varies

is varied is

From Equation 8

(20) 250

sin wB

(23)

The coefficients of the cosine and sine correspond directly to the feedforward controller settings. Discussion of Results

The feedforward controller settings that were calculated empirically and theoretically were compared by disturbing the system with a sinusoidal disturbance in the inlet concentration and computing the integral of the error squared over a time interval after steady state was observed:

Eunconrralled

-

w2

using the analog simulation of the reactor and its control system. The integral of the error squared is a valid test of the quality of control because it depends on both the magnitude of the deviation and the length of time the deviation persists. The percentage improvement of feedback control over the uncontrolled response is defined to be

! D I is the determinant defined by

where

+ 1-)2.30 +

I & E C P R O C E S S DESIGN A N D DEVELOPMENT

I'

=

(

-

EfeedQack)

&noontrolled

loo

(25)

and the percentage improvement of combined feedforward and feedback control over feedback control alone is

A number of these percentage improvements are plotted as a function of the frequency of the sinusoidal disturbance in the inlet concentration in Figure 9. From Figure 9 it is easily seen that the percentage improvement of feedback control over uncontrolled response increases as the frequency of the in!et disturbance decreases. This is to be expected, since at the higher frequencies the phase shift of the closed loop system becomes significant. In fact, a t very high frequencies ( w 2 4.0) the control with feedback alone gives larger deviations than that of the uncontrolled system. At frequencies less than w = 0.3 the percentage improvement using combined control over feedback control alone falls off very sharply because a t the low frequencies feedback control

5%..1

0.2

0.3

0.4

05

0.7

0.6

0%

1.0

0.9

w

Figure 9. Percenfage improvement in control as function of frequency of disturbance in inlet concentraton

alone gives good control. This can be substantiated by noting that the feedback control system compensated for 99.4% of the deviation a t w = 0.1, whereas 96.3y0 of the uncontrolled deviation is attenuated by the feedback control system a t w = 0.3. Thus the rffect of feedforward control i, not required to achieve good control a t the loir frequencies. As the frequency of the disturbance is increased, the contribution of the feedforward control system becomes significant. Figure 9 indicates that the percentage effectiveness of the feedback system decreases while the control effected by the combined feedback and feedforward system remains essentially constant < 1.0). in the range of intermediate frequencies (0.3 < I t is in this range of frequencies that the use of feedforward control appears to be the most fruitful, since the feedback control is only partially effective. Furthermore, this spectrum of frequencies has a period ranging from approximately 6 to 20 on the dimensionless time scale which is based on the holding time of the reaction vessel. Thus disturbances will in general “contain” a large amount of energy in this frequency range, and feedforward is required to compensate for these disturbances. I n a range of frequencies between w = 1.5 and (J = 3.0 the effectiveness of combined control decreases. This decrease was not investigated extensively ; however, it may be attributed to the fact that feedback control has become almost ineffective (the uncontrolled deviation reduced by only approximately 50%) and yet the system deviations are large enough to allow nonlinearities to persist. This means, of course, that the feedforward controller will not be wholly effective, since the design is based on a linear hypothesis. ,4t most frequencies studied the theoretical feedforward controller settings gave less error and thus a higher percentage improvement than the settings computed by frequency response methods. Thus if the kinetics of the system are known, a good feedforward controller can be designed from the linearized equations of the system. O n the other hand, if all the properties of the system are not known, a satisfactory feedforward controller for the system can be designed by an experimental frequency response technique. The variations of the outlet concentration, qa, for amplitude sinusoidal disturbances in the inlet concentration, qai, are (J

t a025

woo

- 0025 -

~ n n n n n n n n q

-”

*0025

a300 ,*0-0025

WONTROCLED RESPONSE

f vl Av A Av Av A A A h‘ FEEDBACK CONTROL

too25

OD00 -0025

+a025

0000 -0025

2

0

6

4

IO

8

I2

16

14

I8

20

22

e

Figure 10.

Variation in outlet concentration w = 3.0, 10% disturbance

+a050

0.000

-aoso

-

I

I

UNCONTROLLED RESPONSE

I

FEEDBACK COMROL

0M)O z0.025

moo -a025

0

5

IO

15

20

25

30

35

40

45

50

55

e

Figure 1 1 .

Variation in outlet concentration w = 0.5, lO7c disturbance

VOL. 2

NO. 3

JULY 1 9 6 3

251

G = transfer function AH = heat of reaction

Zj

000 -0 10 UNCONTROLLED RESPONSE

*a05

000 -OD5 COO5

000

- 095 ,005

000 -005

0

5

IO

15

20

30

25

35

40

45

x)

55

e

Figure 12.

Variation in outlet concentration 0.5, 20yc disturbance

w =

in feedback control over uncontrolled response ,Z = percentage improvement in combination feedforwardfeedback control over feedback control alone k = reaction velocity constant K = reaction velocity coefficient M = over-all system gain p = Laplace transform variable Q = flow rate of inlet streams containing subscripted component R = gas law constant R = product T , = temperature in heat exchanger T = temperature in reactor U = mean heat transfer coefficient V = volume of reactor W’ = total effluent flow rate X = concentration GREEKLETTERS a, 0,y, 6 = dimensionless parameters defined in text

E

= damping coefficient = dimensionless concentration

7

shown in Figures 10 and 11 as sinusoidal disturbances with an amplitude of 10% of the steady-state concentration and frequencies, w ,equal to 3.0 and 0.3. These results are typical. A similar plot is shown in Figure 12 for a 20% amplitude sinusoidal disturbance in the inlet concentration. The value of (J in Figure 12 is G . 5 . If the system were linear, doubling the magnitude of the disturbance would result in a value of E four times as great, since the error is squared in the calculation of E. Because of the nonlinearity of the reaction system, the peaks of the uncontrolled response to the higher amplitude disturbance are cut off, and the value of E‘is less than four times that obtained with the smaller amplitude disturbance. However, the percentage improvements in control obtained with the larger disturbance \yere somewhat less than those obtained for the smaller disturbance. This indicates that the design of the feedfonvard controller based on the linear hypothesis becomes less satisfactory as the nonlinearities of the system are accentuated. Even with the large disturbance. the addition of feedforward significantly improves control. The best settings for the feedforward controller were sought by trial and error on the analog simulation of the reactor and its controllers by manually adjusting the potentiometers that represented the controller settings. The graph of the outlet concentration variation was observed, and settings for the controller were obtained such that the deviations from the control point were a minimum for each frequency of the sinusoidal disturbance in the inlet concentration. I t was found impossible to improve significantly on the calculated settings for the controller. Nomenclature u

= constants of linearized equations

A = reactant A = heat transfer area A R = amplitude ratio B - = reactant c p = average mean heat capacity of all reactants and diluents E = integral of error squared AE = energy of activation

252

I & E C PROCESS D E S I G N A N D DEVELOPMENT

= percentage improvement

0 = dimensionless time A, p , 6 = constants? defined in text Y = stoichiometric coefficient p = density 7 = dummy variable $ L = phase lag $ = dimensionless temperature w = frequency

SUBSCRIPTS = reactant A b = reactant B c = coolant F a = feedforward controlling on outlet concentration of reactant A i = inlet conditions 0 = reference value r = product R 1 = response of system due to disturbances in inlet concentration 2 = response of system due to disturbances in coolant temperature s = steady-state a

SUPERSCRIPTS = deviation from steady state - = transformed variable

-

References

(1) Aris, Rutherford, .4mundson, N. R., Chem. Eng. Sci. 7, 121-31 (1958). (2) Bilous, Olegh,Amundson,N. R., A.Z.CI1.E. J . 1,513-21 (1955) (3) Bilous, Olegh, Block, H. D., Piret, E. L., Zbid., 3, 248 (1957). (4) Ceaglske. N. H., “Automatic Process Control for Chemical Engineers,” Wiley, New York, 1956. (5) Duthie, R. L., Control Eng. 6 , 136-40 (May 1959). (6) Ehrenfeld, J. R., “Dynamics and Control for Chemical Processes,” Sc.D. dissertation, Massachusetts Institute of Technology, 1957. (7) Ellingsen, \Y. R., Ceaglske, N. H., A.Z.Ch.E. J . 5 , 30-6 (1959). (8) Tierney, J. W., Holman, C. J., Xemanic, D. J., Amundson, N. R., Control Eng. 4 , 166-75 (September 1957). RECEIVED for review July 23, 1962 ACCEPTEDNovember 1, 1962