Combined feedforward-feedback servo control scheme for an

Combined feedforward-feedback servo control scheme for an exothermic batch reactor. Arthur Jutan, and Ashok Uppal. Ind. Eng. Chem. Process Des...
1 downloads 0 Views 1MB Size
Ind. Eng. Chem. Process Des. Dev. 1984, 23, 597-602

Literature Cited Boyd, D. M. Chem. f n g . frog. 1975, 77(6), 55. Brosilow, C. B.; Tong, M. AIChE J. 1978, 24, 492. Fuentes, C.; Luyben, W. L. Ind. Eng. Chem. Fundam. 1982, 27, 323. Joseph, B.; Brosilow, C. 8 . AIChE J . 1978, 24, 485. Luyben. W. L. AIChE J . 1972, 78, 238. Luyben. W. L. Ind. Eng. Chem. Fundam. 1973, 72, 463. Mosler, H. A.; Weber, R. U S . Patent 3855074, 1974.

597

Patke, N. G.; Deshpande, P. B.; Chou, A. Ind. Eng. Chem. Process Des. Dev. 1982, 27, 266. Shah, M. K.;Luyben, W. L. Chem. Eng. Symp. Ser. No. 56 1979, 2.6/1. Wang, J. C.; Henke, G. E. Hydrocarbon Process. 1966, 45(8), 155. Weber, R.; Brosllow, C. B. AIChE J . 1972, 78, 614.

Received for review June 2, 1983 Accepted October 14, 1983

Combined Feedforward-Feedback Servo Control Scheme for an Exothermic Batch Reactor Arthur Jutan” and Ashok Uppal Xerox Research Centre of Canada, Mississauga, Ontario, Canada L5K 2L 7

Temperature control of an exothermic batch reaction is studied here. Only the energy balance is used in the derivation of the control algorithm. Coupling to the mass balance is through the heat generation term which can be predicted from the process. The two control variables, steam pressure and coolant flow, are related through a single variable. This variable is manipulated through the feedforward algorithm to compensate for the heat generation. I t is further modified through Dahlin’s feedback algorithm applied to the locally linearized process. Simulations are presented which show the effectiveness of the control scheme and its sensitivity to modeling and measurement errors.

Introduction The control of a batch reactor system provides an interesting challenge in that the system has no steady state. A servo control strategy is, thus, required to move the system dong a predetermined desired temperature vs. time trajectory. This problem has commonly been approached by using open-loop optimal control theory, in which the trajectory was obtained as a solution to, say, a “minimum time of reaction” problem. The difficulties encountered with these optimal servo control strategies was that no allowance was made for modeling errors and there was no feedback from the process through process measurements. The control strategies that were obtained were not robust and often quite sensitive to model differences. Their subsequent implementation on actual processes was often unsuccessful (Fm, 1973). In addition, any nonlinearities in the process model would greatly increase the computational effort required for the solution to the optimal problem and thus limit ita usefulness for on-line control strategies. This paper seeks to establish the feasibility of a new control algorithm for servo control of a batch reactor. This is accomplished through a computer simulation using a mathematical model of a pilot plant batch reactor. The next stage would be the actual on-line implementation, the details of which will be reported in a subsequent paper. Here, we develop a feedforward-feedback control algorithm for an exothermic batch reactor system. Both the feedforward and feedback algorithms can be separately tuned and both algorithms rely on process measurements (with superimposed measurement error) as well as a process model for control calculations. Dahlin’s algorithm is used for the feedback algorithm because of its ability to compensate for process dead time (Dahlin, 1968). The nonlinear heat generation term in the energy balance is treated as an inferential disturbance (predicted from process measurements) and a feedforward algorithm is 0196-4305/84/1123-0597$01.50/0

used to compensate for its effect on the controlled variable. Literature values were used to obtain typical reactor parameters for the model. The reactor dynamics were then simulated on a Data General Eclipse S/230. The control algorithms were tested by using superimposed measurement and modeling errors and results are compared to a standard three-term Proportional Integral Derivative control algorithm (Coughanowr et al., 1965)with derivative action on the process variable to avoid derivative kick due to set point changes. The details of the reaction system are unfortunately proprietory (Xerox Inc.) and discussion of this area will be in general terms only. However, the methodology presented here applies to any exothermic/endothermic batch reaction system; therefore this restriction should not cause any serious difficulties. T h e Batch Reactor Control Problem The need for a servo control system occurs during process startup and shutdown where it may be desirable to follow predetermined trajectories in say temperature vs. time. Usually, this part of the process control is performed manually since most control schemes are tuned for regulatory control of a system around some steady state. The current work was motivated because of the need to collect isothermal kinetic data from a series of batch experiments. In order to minimize data collection time, the reactor temperature had to be brought up to the required temperature as rapidly as possible with minimum overshoot and then this temperature had to be maintained for some period of time during which data were collected. Following this period, the reactor had to be quenched in a controlled manner. These requirements indicated that a time/temperature profile of the shape shown in Figure 1 should be used. Process Description. The reactor model used in this initial simulation study is based on an existing 2-gal batch reactor as shown in Figure 2. The reactor is filled with 0 1984 American Chemical Society

598

Ind. Eng. Chem. Process Des. Dev., Vol. 23, No. 3, 1984 270

-

360

240

-

320

210 -

280

, ; , ,

180-

I

I

-z

I

;

k150-

F

,, ,

P 120-

200

a v

/!

160 W

I

90

240

-/

120

,

80

40

0’ 0

I

50

I

100

150

I

1

I

200

250

300

J

0

350

TIME (SEC) XlO-’

Figure 3. Exotherm (AH) vs. time.

Figure 1. Desired time/ temperature path.

resented by an equation of the form (1). For simultaneous reactions with three independent species we can express the component mass balance as

cooling r----I C water in

I control

Heat Balance. The heat balance is given by Am

I

Te- temp. of environment

k

-

steam supply

cooling coil

jacket reaction temp.

steam ‘temp.

‘-4

steam trap

Yf Figure 2. Batch reactor process.

reactants and then sealed. The contents of the reactor are heated with steam supplied to the jacket. Condensed steam is collected in a steam trap and directed to a drain. The reaction mixture is continuously stirred at a fiied rpm. The reactor is fitted with a cooling coil through which chilled water is passed under flow control. Control of the heating rate is accomplished by regulating the steam pressure and, hence, temperature (assuming equilibrium) in the reactor jacket by using a pressure regulator whose set point is manipulated under computer control. Cooling rate is controlled by manipulating the water flow rate through the cooling coil. The control strategy developed in this paper manipulates these two variables simultaneously to drive the reactor temperature along a prescribed time/temperature path. The reaction is exothermic and significant heat is generated along the reaction path (see Figure 3).

Mathematical Model Mass Balance. Often a kinetic model is not available for a particular reaction. For proprietary reasons (Xerox Inc.), we are not able to identify the nature of the three chemical species used in the reaction under study, but we assume that a kinetic model for these species can be rep-

Heat is added to the system by the steam at temperature Tsin the reactor jacket and by internally generated heat from the exothermic reaction term, AH, which is a complicated function of the concentrations given by the solution to the equations in (1). Heat is lost to the environment through the top of the reactor which is not insulated, as well as to the coolant water flowing through the cooling coil. We assume that for a sufficiently rapid coolant flow rate the inlet and outlet temperatures will not vary by much and an average water coolant temperature Twmay be used. One can ensure a minimum flow rate by choosing Uc(min)in eq 8 below. The overall heat transfer coefficient for the cooling coil is a function of the stirring rate and the coolant flow rate. Coulson and Richardson (1964) give correlations for these heat transfer coefficients and using the dimensions of the pilot reactor, the correlation provided us with 1

1

where f is the coolant flow rate in L/min (surface area of coil = 1.4 ft2; Reynolds number = 10000; tube diameter = 0.25 in.; rpm = 1170). The two manipulated variables are thus f and Ts(Ps) and they drive the reactor temperature Tr through eq 2 and 3. The additional forcing function m(t)is transient in nature and its exact form depends on the heat generated by the chemical reactions. The AH curve for the particular set of reactions studied here was determined experimentally from bench-scale calorimeter experiments by one of the authors (Uppal, 1979). He used a reaction mixture immersed in an oil bath held at constant temperature. Using a heat balance, he calculated the energy generation term due to the heat of reaction AH. A typical AH curve

Ind. Eng. Chem. Process Des. Dev., Vol. 23, No. 3, 1984 Predicted

Feedback

Process without disturbance

Tr

-

TI

Figure 4. Process control algorithm.

is shown in Figure 3. For the purpose of simulation this curve was fitted using cubic splines. Prediction of the Exotherm. Coupling from the mass balances (1) occurs through the AH term in the energy balance (2). Detailed information concerning the number of reactions and the reaction mechanisms are required if one wishes to obtain an expression for this heat generation term. Often this information is not available or at the very least a large kinetic study is required to obtain it. Where many simultaneous reactions are involved, this is often not practicable. However, in order to control the process we do require information about AH and instead of obtaining a theoretical model we can predict its value from on-line process measurements. If we rewrite eq 2 as dT1 AH(t) = VPC - - UsAj(Ts - TI) + hJe(Tr - TJ + dt U A T , - T,) (4)

T, and T, are measured once and assumed not to change with time, but this is not a required restriction. All other variables can be measured continuously from the process and hence AH(t) can be predicted using (5). Usually, for servo control we require the value of AH(t + n),that is, the value of AH at n time steps ahead where n for our case is 1. An extrapolation technique such as the NewtonRaphson Backward Formula (Lapidus, 1962) can be used to extrapolate n steps ahead using as many past values of AH calculated from (5) as is necessary. Precise prediction is not required for control purposes and quite often direction of the change and an order of magnitude approximation to the size of the change is adequate. We will see in the following section on control that the feedforward control scheme, which requires AH (predicted), is used in conjunction with a feedback scheme. Control Algorithm If we examine the heat balance (2), we see that apart from the AH term we have a simple linear first-order system. If we treat the AH@)as though it were a measured disturbance (inferentially through 51, we can derive a feedforward control scheme to cancel the effect of AH@) on the reactor temperature. This algorithm can be implemented in conjunction with a feedback algorithm which can compensate for, apart from the usual errors, the lack of precise cancellation of the effects of AH. The process control configuration is shown in Figure 4. Single Output Control Using Multiple Inputs. Usually one manipulated variable, such as steam temperature (pressure) is all that is required for controlling one output variable such as reactor temperature. If we use another manipulated variable (cooling water flow rate) here we would have an over-determined control system with too many degrees of freedom. One way of solving this problem is to fix the water flow rate in the coils at some chosen value so as to provide an

599

''adequate" rate of cooling when the steam pressure in the jacket has been reduced to zero. We then simply manipulate the single variable (steam temperature) to control the reactor temperature. This arrangement works well for regulatory control when a constant reactor temperature is required. However, for servo control the reactor set point temperature can vary as shown in Figure 1. Here, if water flow rate is fixed at a high value, rapid cooling can be achieved for the cooling section of the curve in Figure 1, but this may seriously affect the heating ability of the steam which has to first overcome the cooling effect of the water before it can raise the reactor temperature. This difficulty is solved by allowing both manipulated variables to change through a single parametric variable z. This artificial variable z is then considered to be the single manipulated variable used to control the reactor temperature T,. This results in minimum cooling flow rates for maximum heating and maximum flow rates for maximum cool down ability. We have a single, controlled-variable reactor temperature TI, which is controlled by manipulating two variables the heat transfer coefficient Ucthrough cooling water flow rate f and the steam temperature T,. We can write a parametric representation of T,(P,) and Uc through an artificial variable z. T, = p1 (6) (7) uc= ff2z + p2 z is a parametric variable with no units and is normalized to lie between 0 and 1. A linear function is the simplest but is not a restriction. There may, in fact, be an optimal functional form. We define z = 0 to represent maximum cooling and minimum heating and z = 1vice versa. With these definitions, we can easily solve for the unknown coefficients as follows a1 = (T,(max) - T,(min)) p1 = T,,(min) a2 = (UJmin) - Uc(max)) p2 = Uc(max) (8) where the maximum and minimum values for U, and T, are chosen from process or safety limits. We can substitute for T, and Uc in eq 4 and derive a control algorithm in terms of z which, in turn, drives eq 6 and 7 simultaneously to produce manipulations in T,(P,) and UC@. Feedforward Algorithm. If we discretize eq 2 and substitute for T, and Uc according to (6) and (7), we can obtain an expression for the manipulated variable z as a function of the desired reactor temperature at the next time step Tdt+l,the current reactor temperature TI,and the heat generated at the current time AHt.

+

where

+ hJ, + &Ac B = heAeTe+ &ACTw+ U,A$l D = U,Ajr~l+ a2AcTW A = U,Aj

E = -a2Ac (10) Equation 9 gives the required manipulation in zt so that the actual reactor temperature at the next time interval ( t + l), T,.,, will equal the desired temperature Td,+l. AHt can be predicted from (5) using process measurements but for the purposes of simulation it was obtained using a spline fit to Figure 3. A random error was added to the curve before use in eq 9 to simulate a prediction

600

Ind. Eng. Chem. Process Des. Dev., Vol. 23, No. 3, 1984

error as well as provide a means for examining the sensitivity of the algorithm. Feedback Algorithm. Dahlin’s algorithm (Dahlin, 1968) was used for feedback control and its position mode form is given by

(11) where m, is the manipulatd variable, K is the steady-state gain of the process, e, is the error at time t , N is the number of dead time intervals, and y2, y4 are defined as y z = 1 - exp(-AT/X) (12) y4 = 1 - exp(-AT/r) (13)

where X is Dahlin’s closed loop tuning parameter, AT is the control interval, and 7 is the process time constant. Discretization induces at least one dead time interval, but apart from this, the process model used for simulations has no dead time. In the actual process, however, we expect some dead time as part of the process response and Dahlin’s algorithm is thus a good choice. In combining the two algorithms, additional tuning parameters, el and e2 may be introduced which interpolate between the two algorithms. We can chose e2 = 1- c1 and then we have z = elz(feedforward) + (1- e,)z(feedback) (14) el would have to be determined on-line by trial and error. For example, if we suspected large modeling errors in the feedforward algorithm c1 would be set