Adaptive control strategies for achieving desired temperature profiles

Adaptive control strategies for achieving desired temperature profiles during process start-up. 1. ... Susan F. Phillips, Dale E. Seborg, and Kenneth ...
3 downloads 0 Views 2MB Size
I n d . Eng. C h e m . Res. 1988,27, 1434-1443

1434

Adaptive Control Strategies for Achieving Desired Temperature Profiles during Process Start-up. 1. Model Development and Simulation Studies Susan F. Phillipst and Dale E. Seborg* Department of Chemical & Nuclear Engineering, University of California, Santa Barbara, California 93106

Kenneth J. Legalt E x x o n Research and Engineering Company, Clinton Township, Annandale, N e w Jersey 08801

An adaptive control strategy has been developed for the start-up of a fluidized sand bath. A self-tuning control (STC) approach is used to determine the switching time and satisfactory PID controller settings for conventional dual-mode temperature control. The STC strategy is based on recursive least-squares estimation of parameters in a second-order discrete time model and in a prediction error model. A simulation study demonstrates the feasibility and limitations of the proposed control strategy. An experimental evaluation is described in part 2. 1. Introduction It is desirable to start up many processes by making a smooth and rapid transition to the desired operating condition with little or no overshoot. For systems with large thermal capacitances, it is particularly difficult to avoid temperature overshoot unless a conservative and slow start-up strategy is implemented. The fastest acceptable start-up can be achieved by heating at full power until the temperature nears the set point and then switching the heater off and allowing the process temperature to coast to the set point. Then regulatory control is begun. In this paper, an adaptive control strategy is used to predict the optimum time at which heating should be stopped and also to determine suitable PID controller settings during the heat-up. These settings are employed after the process reached the set point. For some types of control problems, an optimal start-up policy can be precalculated. Koppel and Latour (1965) and Latour et al. (1967,1968) proved that for linear, secondorder, single-input/single-output systems it is necessary to switch the input only once from one constraint to the other to provide the most rapid transition from one steady state to another. If a second-order process model is available, it is possible to calculate the switching time a priori or on-line. In a pH control application, Hsu et al. (1972) approached the start-up control problem by using an adaptive modification of time optimal control. They assumed that the time delay and the steady-state gain of the process were known a priori. The time constants for a second-order model were obtained by time domain regression and were used to calculate the switching time according to the time optimal algorithms given by Koppel and Latour (1965). Shinskey (1979) discussed dual mode control which utilized both an on-off controller and a conventional feedback controller for improved control. The on-off controller provided rapid transition between set points. After the process reached a new set point, a feedback controller (e.g., a PID controller) regulated the process. The switching time for the on-off control was calculated from a process model or obtained empirically. A simple approach to the start-up problem is to use PID control with conservative settings; however, this approach

* To whom all correspondence should be addressed.

'Now Senior Systems Engineer at Texas Instruments, Inc., Iselin, N J 08830. Now Applications Scientist, Ametek Computer Research Division, Monrovia, CA 91016.

*

is often unsatisfactory due to lengthy start-ups and sluggish responses to upsets. If less conservative PID controller settings me employed, the time for the start-up is reduced but some overshoot is more likely, which is often undesirable. Model-based approaches can be satisfactory if an accurate process model is available. A study based on this approach was reported by Lenells (1982). He used a physically based model to predict the future trajectory of the temperature during heatup, employing ranges of physical parameters to account for uncertainty in the model. The heat input was calculated to prevent overshoot for the worst case. The self-tuning controller (STC) developed by Clarke and Gawthrop (1975, 1979) was based on the on-line estimation of parameters in an assumed dynamic model. The control calculations a t each sampling instant were then based on the estimated parameters and minimization of a quadratic cost function. In recent studies, the STC was applied to the start-up problem for batch reactors by Hodgson (1982) and Johnson (1984). Cameron and Seborg (1983) modified the Clarke-Gawthrop approach to develop a STC with a PID structure (PIDSTC). This approach can be used to calculate PID controller settings on-line. In this paper it is proposed that the start-up switching time be calculated on-line based on the estimated parameters in a dynamic model and predictions of the future output variable, the process temperature. Once the set point is approached, the PIDSTC controller will be used, with controller settings derived from the estimated parameters. In part 2 of this paper, the experimental application of this approach to a fluidized sand-bath unit at Exxon Research and Engineering Company (ER&E) is reported. 2. Problem Description Fluidized sand baths used to provide constant-temperature environments for pilot-unit systems are of interest because the large time constants complicate start-up. Figure 1shows a schematic diagram of a typical sand bath which is 1-2 m high, about 30 cm in diameter, and contains about 50 kg of sand. The reactor that is submerged in the fluidized sand is not shown. Thermocouples placed at various heights along the center of the bed show no appreciable axial temperature variation within the measurement accuracy of the thermocouples when the sand bath is operating properly. The sand baths are characterized by large dominant time constants, typically about

0888-5885/88/ 2627- 1434$01.50/ 0 0 1988 American Chemical Society

Ind. Eng. Chem. Res., Vol. 27, No. 8, 1988 1435 Exit Air

3"--~--r~-

f

I

I

1

,

r

, r r r~~

!

7 I-.-

j

/fxprr,rnrnlal

L

t

"L_-L, L

zoo

~

L

L

1L

1

1

!

1

1

1

6""

400

4

1

1

800

1

1

1

~

l"0"

T i m e [imi,)

Figure 2. Experimental and model step responses for 55% heat input. Table I. Switchinn Times Por 100% Power

Fluidizing Air

Figure 1. Schematic diagram of a fluidized sand bath

40-60 min, depending on sand-bath design. The objective of this investigation is to automate both the switching of the heater during heat-up and the tuning of the PID controller. The resulting control strategy should be general enough to apply to other processes characterized by significant thermal time constants such as thick-walled, gas-phase, stirred tank reactors and batch reactors where it i s desirable to achieve a given temperature profile. Currently, a popular method for controlling these types of processes is to use the dual mode controller described in the previous section. To use the dual mode control strategy, five design parameters must be specified the temperature (or time) where the full power heating is switched off, (T, (or t,)); the initial PID controller output after the switch to PID control (U); and the three controller settings for the PID algorithm (Kc,Ti, and Td).For pilobscale fluidized sand baths, it usually takes two or three start-ups of the sand hath and a significant amount of time to determine appropriate values for these five parameters by trial and error. For a critical or difficult sand bath, this tuning procedure can take days or weeks. In this paper, it is proposed to use adaptive control techniques to determine appropriate values for these five parameters. Parameters in standard discrete-time models were estimated on-line, and long-range predictions were calculated to determine the switching time or, equivalently, the switching temperature. An estimated process gain obtained from the parameter estimates was used to calculate the initial PID controller output. After the temperature set point was reached, a standard PID controller was employed using controller settings based on the estimated model parameters. 3. Simulation Model

A theoretical model of a fluidized sandbath at ER&E was developed, consisting of three ordinary differential equations (ODES) and one partial differential equation

t,,

t,,,

T,,

T-,

mm 100 125 150 175 200 225

min 175 117 183 192 211 232

OC 83 141 211 281 327 360

"C

-

~~

~~

155 206 254 300

335 364 462

t,,

- tmin 75 52 33 17 11 7

AT = TmuTaw,"C 12 65 43 19 8 4

(PDE). The ODES result from the energy balances for (i) the wall of the sand bath together with the heater, (ii) the sand and air mixture inside the sand hath, and (iii) the uninsulated top plate that the sand and air contact. The PDE was included to describe the temperature profile in the insulation around the sand hath. This dynamic model was based on the following assumptions: 1. The airsand mixture is well mixed. 2. There is no loss of sand. 3. The wall and heater are at the same temperature. 4. The temperature i s continuous a t the heater-insulation interface. 5. Radiation losses from the insulation surface are insignificant. 6. The heat of reaction from the reactor is insignificant. 7. The heat capacity of the reactor is neglected. 8. There are no heat losses from the bottom surface of the sand bath. The dvnamic model is Dresented in the Amendix. The experimental data were provided by ER&E: Using reasonable values for the physical parameters in the model such as heat-transfer coefficients and thermal conductivity, the model fitsthe experimental step test data remarkably well. (See Figure 2.) The process was somewhat nonlinear because the process gains were different for different step inputs. This nonlinearity was accounted for in the model by allowing suitable physical parameters, such as heattransfer coefficients, to vary with temperature. The dynamic model was used to determine suitahle switching times for a variety of temperature set points. Table I shows the switching time (t,) that was required to reach a specified maximum temperature (T-) assuming that the start-up began a t time t = 0. The time that the maximum temperature occurred in (t,) and the temperature a t the switching time (T,) are also included. The last two columns show how much the temperature changed (AT = T,, - TSw) and how long it took the sand bath to reach the maximum temperature after the heater was switched off (tms - taw).

1436 Ind. Eng. Chem. Res., Vol. 27, No. 8, 1988

As would be expected, both AT and t,, - t,, decreased as T,, increased because the rate of heat loss increased. For example, to achieve a low T,, of 206 "C, it was necessary to switch the heater off at t,, = 125 min. The sand-bath temperature rose 65 "C (i.e., AT = 65 "C) and reached a maximum 52 min later (i.e., t,, - t , = 52). By contrast, when T,, = 335 "C, the heater was switched off a t t,, = 200 min and a t a temperature of T,, = 327 "C. Then the sand-bath temperature increased by only 8 "C before reaching T,, = 335 "C 11 min later. 4. Theory In this section, the mathematical models that were used in the adaptive control strategy are summarized briefly. Several different types of models were required. The prediction of the switching time was made by using prediction error models. The switch to PID control required an estimate of the initial PID controller output calculated from an estimate of the steady-state gain. Then one of two alternative approaches (the PIDSTC of Cameron and Seborg (1983) or PID tuning relations based on secondorder continuous-time transfer function models of Smith et al. (1975)) was used to determine the PID controller settings. The theories for both approaches are summarized in this section. 4.1. Prediction Error Models. Long-range predictions of an output variable can be based on a discrete-time model of the process. Assume that the process can be modeled well by a second-order system with time delay:

+

A(z-')y(t) = ~ - ~ B ( z - ~ ) u (Ct()z - l ) e ( t )

+ alz-' + a22-2 B(2-1) = bo + b'z-1

= Uloq(t-1)

+ Ulltl(t-2) - jqtlt-1) + + $ifi(t-21t-3) + ~ l o u ( t - k )+

$119(t-1lt-2)

U'lu(t-k-1)

+ d t ) (5)

For two time steps ahead (1 = 2), the prediction error model has the form €2(t) = U20€2(t-2) + U21€2(t-3) - F(tlt-2) + $219(t-llt-3) $2fi(t-2lt-4) + $2&(t-31t-5) + ~2ou(t-k)+ ~2lu(t-k-1) ~z+(t-k-2) + ~ ( t(6) )

+

The 14 unknown parameters (uij, qij,and wij) were evaluated at each sampling instant by using standard RLS estimation. Then the prediction for one time step into the future was made by setting t,(t+l) and ~ ( t + l equal ) to their expected values of zero:

jqt+llt) = o,,t,(t) + oll€'(t-l) + $lljqtlt-l) + $1&(t-lIt-2) + iirlou(t-k+l) + iirl,u(t-k) (7) Similarly, the prediction for two time steps ahead was 9(t+2@ = Dzot2(t)+ ozl€z(t-l) + $219(t+llt-1) + $2fi(tlt-2) + $2&(t-llt-3) + &&(t-k+2) + iir,,u(t-k+l) + iir22u(t-k) (8)

(1)

(2)

jqt+llt) = $lly(t+l-llt)

(3)

is the backward shift operator, i.e., z-ly(t) = y(t-l), and C(2-l) is a polynomial in 2-l usually specified as C = 1. Also y(t) is the process output (the sand-bath temperature), u ( t ) is the process input (the signal to the heater), and e ( t ) is an uncorrelated sequence of random variables. t denotes the sampling instant (t = 0,1,2, etc.), and k is the process time delay expressed as a multiple of the sampling period. Variables u and y are expressed as deviations from steady-state values for the process input and output, respectively. Recursive least-squares (RLS) estimation was used to obtain estimates of the model parameters, (ai)and (bi).This model could then be used to predict future values of the sand-bath temperature 1 time steps ahead, 9(t+llt). This symbol denotes the estimate of output y a t time t + 1 based on information available at time t. However, this approach had two disadvantages: (i) it tended to provide poor predictions for large values of 1, and (ii) there was no feedback about the performance of the predictions. For these reasons, prediction error models were used instead of the standard discrete-time model in eq 1because they contained information about the quality of the prediction. Following DeKeyser and Van Cauwenberghe (19811, the prediction error model has the form 2-l

~ ( t=) T(~-')e(t-l)

t1(t)

Since the process model in eq 1 was second order, predictions for 1 time steps ahead where 1 > 2 were calculated by using the predictions for g(t+llt) and 9(t+21t) and the recursive formula:

where A(2-l) = 1

the parameters for the one time step ahead (1 = 1)and two time steps ahead (1 = 2) prediction error models only. The one time step ahead (1 = 1)prediction error, denoted by tl(t), is given by

+ 9(~-')9(tlt-l)+ Q(z-')u(t-k) + ~ ( t ) (4)

where ~ ( tis)the prediction error, t(t) = y(t) - jj(tlt-l), and ~ ( tis) referred to as the residue. For a second-order process model, polynomial T has degree 1, polynomial 9 has degree 1+1 with $o = -1, and polynomial R has degree 1. For a process that can be accurately modeled by a second-order transfer function, it was necessary to estimate

+ $lfi(t+l-21t) + Cj,,u(t+l-k) + iirllu(t+1-k-l)

(9)

Of course the predictions 0) used in the prediction error models in eq 5 and 6 must be made by using eq 7 and 8 and the actual inputs u(t-k+2), u(t-k+l), and u(t-k). However, a separate set of predictions can be made by using eq 9 for any hypothetical set of future inputs. In this paper, predictions over the next L time steps (1 I1 5 L where typically L = 100)were made at each sampling instant based on an assumed set of future inputs. 4.2. Initialization of the PID Controller. It was necessary to initialize the PID controller with the correct controller output. The correct value of the initial PID controller output was predicJed using an estimate of the steady-state process gain, K,, which was calculated as follows: n,

j=O

where ijli and 5,. were the estimated coefficients of the polynomials Q(z-i) and *(z-') in the one time step ahead prediction error model of eq 5. Knowing the estimated process gain and the desired steady-state output, the set point yr, it was possible to determine the initial PID controller output ( U ) that would be needed to obtain that steady state. The standard expression for the process gain is

where Ay is the steady-state change in the output or

Ind. Eng. Chem. Res., Vol. 27, No. 8, 1988 1437 process temperature and Au is the change in the control signal needed to produce this change. In this case, ui and yi denote the process input and output when the sand bath is at room temperature. Note that ui = 0. The final conditions, uf and yf, denote the process input and output when the sand-bath is at the desired set-point temperature. Substituting K , for K , and yr for yf and rearranging gives

The equations for the PID settings can be rearranged to be

-

a u = Yr - Yi

KP Because U = Au ui and ui = 0, it follows that the initial PID controller output signal can be calculated as

+

if the temperature is a t the set point when the switch is made to PID control because ui is zero. If the sand-bath temperature is not at the set point when the switch is made to the PID controller, then it will be necessary to add correction factors to this initial PID controller output ( U ) to bring the temperature to set point. 4.3. Self-Tuning PID Controller. In this section we briefly summarize the self-tuning PID controller (PIDSTC) developed by Cameron and Seborg (1983) based on a modification of the well-known Clarke-Gawthrop (1975, 1979) self-tuning controller. The PIDSTC can be used to determine reasonable PID controller settings during the start-up period for the fluidized sand bath. The STC of Clarke and Gawthrop (1975, 1979) is designed to minimize the variance of an auxiliary output ($) which is defined as $(t) = Py(t) + Qu(t-k-1) - Ry,(t-k-l) (14) where P, Q, and R are user-specified rational functions in z-l and yr is the set-point temperature. Then the following Diophantine equation allows the calculation of the E(z-') and F ( Z - ~polynomials ) that are used in the control and prediction calculations:

CP, = AEPd

+ z-kF

(15)

where P, and Pd denote the numerator and denominator polynomials of P, respectively. Cameron and Seborg (1983) proposed a STC which has a PID structure when the assumed process model is second order (or third order) and the polynomial pd = 1 + pdlz-' is first order (or zero order). In their formulation, Q can no longer be specified arbitrarily. The resulting PID controller settings can be expressed in terms of the coefficients of the F polynomial. The details are given more attention in the paper by Cameron and Seborg (1983). The equations given in Cameron and Seborg (1983) contain an error which has been corrected in U

K , = --(2f2 + fi) CY

The user must specify four design parameters which affect the resulting control system performance: the sampling period At, u, and the polynomials P, and Pd. Note that parameter v acts much like a controller gain since it has a direct effect on K , without affecting T d or Ti. 4.4. PID Controller Settings from Second-Order Continuous-TimeModels. Smith et al. (1975) reported tuning relations for continuous PID controllers based on second-order continuous-time process models represented as a second-order plus time delay transfer function. This approach can be used to derive digital controller settings from the second-order discrete-time model in eq 1provided that the sampling period is small. The tuning relations reported by Smith et al. (1975) can be used to develop PID settings for a digital controller in the following manner. Consider a continuous-time transfer function:

The corresponding discrete-time model can be written in the form of eq 1where the coefficients of the A polynomial are a1 = 4% + Yz)

(23)

a2 = YlY2 (24) The intermediate terms y1 and y2 relate the coefficients a, and a? to the time constants 7, and 72 as follows: y1 = exp(-At/7J

(25)

= eXP(-At/d

(26)

72

where At was the sampling period. Model parameters a, and a2 are estimated on-line by using recursive least squares. Then estimates of the time constants (iland i2) are calculated by rearranging these equations so that time constants (iland i2) are expressed in terms of al and a2: -a1 Y l t Y2

=

f (a12 - 4 a p

(27)

2

(16)

where fi are the coefficients of the F polynomial, K , is the controller gain, Td is the derivative time for the PID controller, Ti is the integral time for the PID controller, At is the sampling period, u is a specified design parameter, and CY is defined as CY = 1 + pdl.

In the tuning relations of Smith et al. (1975), Ti = 7, and Td = r2 where T, is the major time constant and T~ is the minor time constant. Thus, we specify the integral time Ti = i, and the derivative time Td = iz.Finally, controller g_ainK , can be calculated after substituting il for 7, and K , for K , in an empirical correlation which was designed to produce a specified amount of overshoot: Xi,

K , = k,(AkAt

+ 1)

X = 1.125/kAt

(30) (31)

1438 Ind. Eng. Chem. Res., Vol. 27, No. 8, 1988 Table 11. Estimation Design Parameters diagonal elements of covariance matrix initial parameter estimates, GJO), $,,(O), O,,(O) forgetting factor, p assumed time delay, kat, min sampling period, A t , min

108 0 1.0 8.0 0.5

where X is a tuning factor and k a t is the assumed process time delay. In this paper the correlation for 1%overshoot is used. This approach for calculating PID settings from second-order continuous-time process models should be feasible provided that the sampling period ( A t ) is sufficiently small.

5. Implementation Considerations As indicated in the previous sections, it was necessary to perform parameter estimations for three discrete-time models: the standand discrete-time model in eq 1,a one time step ahead prediction error model in eq 5 , and a two time step ahead prediction error model in eq 6. The parameter estimates were obtained by recursive least-squares estimation by using the numerically robust UD factorization method proposed by Bierman (1977). Parameter estimation was not begun until a significant change in temperature had been observed during the initial part of the heat-up. This restriction forced the parameter estimates to reflect information from the steeper part of the heating curve rather than the initial response which can be dominated by noise. The parameter estimates for the second-order discrete-time model in eq 1 were used to obtain recommendations for the PID controller settings, while the two prediction error models in eq 5 and 6 were used to determine the correct switching time vi? long-range predictions. The estimated process gain (K,) and the initial PID controller output (v)can be determined from any of these three models. In this investigation, the one time step ahead prediction error model was used for this purpose. 6. Design Parameters The design parameters for the on-line parameter estimation are shown in Table 11. We will now discuss the effects of these design parameters and how numerical values were assigned. 6.1. On-Line Parameter Estimation. For the proposed start-up strategy to be successful, it is essential that reasonable estimates of parameters vq, $11, and wlI in the prediction error models be obtained prior to the switching time. Therefore, the estimation algorithm must converge rapidly to accurate estimates. The standard design parameters in the estimation algorithm must be carefully selected to provide rapid convergence: the forgetting factor p, the initial covariance matrix, and the initial parameter estimates O,(O), +bll(0), and Gll(0). Other key design decisions concern the choice of the sampling period A t , the assumed time delay k a t , and the degree of input excitation. 6.2. Sampling Period. The sampling period ( A t ) was an important design parameter. The sampling period must be small compared to the time constant of the system to obtain enough samples (at least 50) during the heating period which may be only three or four time constants in duration. The number of samples can be increased by sampling faster; however, sampling too quickly was undesirable because this can produce a nonminimum-phase discrete-time model as discussed by Astrom et al. (1984) and can also result in an unfavorable signal-to-noise ratio. For small sampling periods, the process did not move signficantly between samples. The calculation of contin-

uous-time model parameters became sensitive to noise when the sampling period ( A t )was small compared to the time constants (71 and T 2 ) , because the intermediate terms (7,and y2)approached 1so that parameter a, approached -2 and parameter a2 approached 1. However, if the sampling period ( A t )was large compared to the time constants (7,and 7 2 ) , the intermediate terms (yland y2) approached zero so that both parameters a, and a2 approached zero. Also, if At was too large, not enough samples were available to obtain accurate parameter estimates prior to the switching time ( t s w )and , hence it was not possible to accurately predict t,. Sampling periods of 0.5-5.0 min were used in the simulation studies that will be described later in this paper. 6.3. Assumed Time Delay. The assumed process time delay ( k a t ) had a significant effect on the parameter estimation. An approximate value of the time delay was obtained from experimental data by observing the response of the sand-bath temperature in the vicinity of the nominal set point after the heater was turned off. The time interval observed for the temperature to depart from the corresponding temperature trajectory for continued heating was used as an estimate of the time delay. 6.4. Input Excitation. The accuracy of the parameter estimation strongly depended on the quality of the input excitation. The optimal start-up policy called for maximum heating until the switching time. But this constant input resulted in little excitation and consequently poor estimation. During the start-up, it was possible to introduce a series of small step changes in the input. Although the start-up was slower because of the reduced heating rate, the parameter estimates were much improved. A pseudo random binary sequence (PRBS) which varied the input between 80% and 100% heating was used in this investigation. 7. Control Policy The proposed control strategy consisted of using the predictive model to provide on-line predictions of T-, the maximum sand-bath temperature that would be reached. This information then was used to determine the required switching time (iSw). In particular, at each sampling instant, predictions of the sand-bath temperature were made for the next 100 sampling instants assuming no further heating (i.e., u ( t + l ) = 0 for 1 I15 100). From physical consideratiop, the predicted temperature should reach a maximum (TmaX) during the 100 step prediction horizon agd then begin to decrease. If the predicted maximum (Tma)reached, or exceeded, the set point, the heater was switched off at the current sampling instant. Otherwise, full power heating was continued until the next sampling instant when these calculations were repeated. After the heater was switched off and the sand-bath temperature approached the set point within a certain tolerance, the PID controller was turned on. 8. Jacketing Software 8.1. Estimation Errors and Covariance Matrix

Trace. The quality of the parameter estimates varied for many reasons. At the beginning of a start-up the parameters tended to be inaccurate unless good a priori estimates were available. It was also common for the parameters to be upset after a disturbance occurred to the process or a set-point change was introduced. It was critical to monitor the parameter estimation so that poor parameter estimates were not used to predict the switching time (tsw)or to calculate the PID controller settings. There were many diagnostic aids that could be used to monitor the quality of the parameter estimates such as the estimation error,

Ind. Eng. Chem. Res., Vol. 27, No. 8, 1988 1439 the trace of the covariance matrix, the estimated process gain, the sign changes of the estimation error, or the rate of change in the parameter estimates. In this study the trace of the covariance matrix and the magnitude of the estimation error were found to be adequate indicators of poor parameter estimation quality. When these measures were larger than user-specified upper limits of 100 for the trace of the covariance matrix and 3 "C for the estimation error, the parameters were not used in further calculations. The user-specified upper limit for the trace of the covariance matrix was not critical because the trace changed rapidly from a high value to a low value after covariance resetting. The user-specified limit of the absolute value of the estimation error must be somewhat larger than the measurement noise level. 8.2. Criteria for Accepting the Predictions. Since the predictions of the maximum temperature tended to be inaccurate a t the beginning of the start-up, it was imperative to evaluate the accuracy of the predictions before determining the switching time. The criteria used to make this evaluation were as follows: 1. The absolute value of the one time step ahead prediction error must be below a limit (chosen as 3 "C). 2. The trace of the covariance matrix for the one time step ahead prediction error model must be less than 100. 3. The difference between the_current temperature ( T ) and the predicted maximum (T") during the next 100 sampling instants must be reasonable. It was decided that a difference of more than 100 O C was physically impossible, so predictions that indicated this situation were rejected. 4. The predicted maximum must not occur as the last prediction (i.e., 1 = 100). A maximum temperature occurring at step 1 = L was not acceptable because the temperature should increase and then decrease after the heater is turned off at 1 = 1. It was important that the prediction horizon (L)be large enough to allow the trajectory to show this peak when the predictions were accurate. 5. It was expected that the time of the predicted maximum (&,J would not change much from one sample to the next. Thus, ,f was used as a criterion for accepting a given prediction (Tmax).If the time of the predicted maximum),f( changed by more than 10 sampling periods from one set of predictions to the next, the predictions were not regarded as accurate. If all of these criteria were satisfied and the predicted maximum (Tmax) reached or exceeded the set point, the heater was switched off immediately. However, additional contingency criteria had to be included. If the actual temperature exceeded the set point because of a failure of the switching algorithm, the PID controller took over. After a switch to no heating, the PID controller was used if the temperature came within 5 "C of the set point or if the temperature began to decrease due to serious undershoot. 8.3. Criteria for Calculating the Initial Output of the PID Controller. The initial PID controller output ( U )was determined from the estimated steady-state gain, as described earlier. If this estimated gain was not positive, the initial PID controller output was not updated. This parameter was used only when the switch was made to PID control. 8.4. Criteria for Accepting the Calculated PID Controller Settings. The following criteria had to be satisfied in order for the controller settings calculated by using the PIDSTC algorithm to be accepted. First, both the trace of the covariance matrix and the estimation error of the standard discrete-time model had to be below user-specified limits. Second, for Td and Ti to be positive,

t __I

v

, O F

L

-? i

5

u

-

-

-

, /--YI

-

c 0 0 i ,

0

-

100

200

300

Time (min)

Figure 3. Sand-bath start-up for set point at 327 "C.

the value of 2f2 + f l must be negative and the value of fo f l f 2 must be positive as is evident from eq 20 and 21. If any of the above criteria were not satisfied, the calculated PID controller settings were not implemented and the user-specified default values for the PID controller settings were used instead.

+ +

9. Simulation Results 9.1. Long-Range Predictions. Figure 3 shows the predicted maximum (TmJ, the actual temperature ( T ) , and the controller output. The PRBS input excitation and the estimation were both started about t = 90 min into the run when the sand-bath temperature exceeded the userspecified temperature of 40 O C above the initial temperature (i.e., above the room temperature). The predicted maximum (7'") reached the set point of 327 "C at about t = 205 min which turned out to be slightly early because the sand-bath temperature ( T )did not reach the predicted maximum (T,). Between t = 205 and 218 min, the heater is off to allow the sand-bath temperature to coast up to the set point. A well-tuned (nonadaptive) PID controller was turned on at t = 218 min and provided a rapid approach to the set point. The process input in the bottom half of Figure 3 shows the PRBS excitation, the heater being switched off at t = 205 min, and the transfer to PID control at t = 218 min. The PID controller called for 100% heating for about 20 min from t = 218 to 238 min in order to bring the process to set point. The PID settings are K , = lO.O%/OC, T, = 10 min, and T d = 1min. These settings were also used in the later runs, unless noted otherwise. Figure 4 shows some of the parameter estimates for Figure 3. The estimated parameters were kept a t the initial value of zero until parameter estimation was started at approximately t = 90 min. It is clear that the parameter estimates converged quickly to values near their final steady-state values. The prediction error and the trace of the covariance matrix for the one time step ahead prediction model are shown in Figure 5. The prediction error was always small, but sudden changes occurred due to the switches to zero heating a t t = 205 min and then to PID control at t = 218 min. The trace was initially large when the estimation started, but it rapidly decreased to a small value. Figure 6 shows a start-up which had a set point of 257 "C. At this lower set point, there was less time available for parameter estimation and input excitation. Note that

1440 Ind. Eng. Chem. Res., Vol. 27, No. 8, 1988 0 10

-

I

--r-

--

-

1

-

Table 111. Influence of P , and Pd on Calculated PID Controller Settings

1

U

Kc Ti Td

CI ._

~

J

-

20C

100

0

_ _ -- -

--A1 -

i -300

Time (min'

Figure 4. Parameter estimates for Figure 3.

:

1.0, 1.0

1.0, 1.0-0.52-'

1.0 1.91

1.0

1.0 5.23 5.28 1.34

5.56 0.0

2.42 4.92 0.0

Table IV. Simulation Results for Calculated PID Controller Settings control parameter effect on K, Ti TA action increased more sampling period, decreased increased none vigorous At none more controller setting, increased none vigorous v coeff pnl decreased increased none more vigorous coeff Pdl increased increased increased balanced effect assumed time increased increased increased more conservadelay, k At tive

i

_ -

0 ' 3P

1.04.3z-', 1.0

-

1

i

Figure 5. Prediction error and trace of covariance matrix for Figure 3.

- -

103

L -

0

_I - - _

-

--

-._

-

- -_-

Figure 7. Sand-bath start-up for set point at 300 "C using trialand-error tuning.

_-- L L .-__ . 300

200

loo

Time ( m i n )

Figure 6. Sand-bath start-up for set point at 257

OC.

the predicted maximum reached the set point at t = 108 min, but the heat was not switched off due to the violation

of one of the criteria for switching, namely that the actual temperature be within 100 "C of the set point. At t = 150 min the predicted maximum does reach the set point under favorable conditions and the heater is switched off. After the switch to PID control at t = 163 min, the PID controller calls for 100% heating and then 0% heating and finally settles a t the value needed to maintain the sandbath temperature at the set point. 9.2. Self-Tuning PID Control. To investigate the performance of the PIDSTC in simulation studies, the PID settings for a known second-order system were calculated for several different P polynomials, and these are summarized in Table 111. For all the cases in Table 111, the following parameter values were used: the sampling period ( A t )was 2 min, the process gain (K,) was 300 "C/ % , the major time constant (7J was 50 min, and the minor time constant (72)was 30 min. The assumed time delay ( k a t ) was set equal to the actual time delay which was 3 min. Decreasing P d l decreased K , and Ti.However, decreasing pnlincreased K , and decreased Ti.(Note that coefficients pnland are nonpositive numbers.) The PID controller settings calculated by the PIDSTC method were also ex-

Ind. Eng. Chem. Res., Vol. 27, No. 8, 1988 1441 400

"

I

'

I

a

Z

u

"

"

$

-

v

307------7

i

L

-

00A

,,

0

,

200

100

300

0

Time (min)

100

?00

300

Time (min)

Figure 8. Sand-bath start-up for set point at 300 "C using PIDSTC.

Figure 9. Controller settings for set point at 300 O C using PIDSTC.

pected to depend on tuning factor (v), assumed time delay ( k a t ) ,and sampling period ( A t ) . The simulation studies performed by using the physically based sand-bath model resulted in the following conclusions that are summarized in Table IV. Figure 7 shows the start-up temperature profile for a set point of 300 OC. Figure 8 shows the start-up temperature profile obtained by using the PIDSTC instead of the constant PID settings determined by a trial-and-error procedure that were used in Figures 3,6, and 7. In Figure 8 the PID controller settings were updated at each sampling instant. Figures 7 and 8 are identical until the switch to PID control because they both use the same strategy for heat-up. After the switch to PID control, the standard PID controller in Figure 7 calls for 100% heating briefly and brings the sand-bath temperature to the set point quickly. In Figure 8, the PIDSTC does not produce the 100% heating necessary to heat the sand bath to the set-point temperature. Although it produces the correct controller output, there is a slow approach to the final set point. Also the oscillations in the controller output between t = 200 and 220 min are undesirable. In Figure 9 the PID controller settings produced by the PIDSTC algorithm are shown for the run in Figure 8. The default values are shown when the estimation begins at t = 90 min, but after t = 115 min, the calculated values from the PIDSTC are valid and are shown. These calculated settings are stable except for some disturbance observed at the time of the switches to 0% heating and then to PIDSTC control. The final values for the PID settings are as follows: K , = 9.9%/OC, Ti = 58.0 min, and Td = 1.1min. The calculated integral time is much larger than the value obtained by trial-and-error tuning.

Acknowledgment

10. Conclusions

Adaptive control strategies based on prediction error models can be used to calculate switching times and PID controller settings for processes with large thermal capacitances which require rapid start-up without overshoot. The accuracy of the predictions is affected by the sampling period, the amount of excitation, and the assumed time delay. The PIDSTC approach of h " n and Seborg (1983) for obtaining PID controller settings seems promking. The feasibility of the proposed control strategy was demonstrated with simulation studies of a fluidized sand bath.

Financial support from the National Science Foundation is gratefully acknowledged. Experimental data, equipment access, technical guidance, and financial support provided by the FED (formerly RTSD) division of Exxon Research and Engineering Company in Linden, NJ, and Clinton, NJ, are gratefully acknowledged. The assistance of J. Robert Sims is especially appreciated. Parts 1and 2 of this series were presented a t the National Meeting of the American Institute of Chemical Engineers, Houston, TX, April 1, 1987.

Nomenclature A = polynomial in discrete-time process model Abp = area between sand bath and top plate, cm2 Ahi = area of the heater insulation interface, cm2 A,, = area between the top plate and the environment, cm2 Awb = area between wall and bath, cm2 ai = parameters in the discrete-time model B = polynomial in discrete-time process model bi = parameters in the discrete-time model C = polynomial in z-l representing influence of noise on the discrete-time model C, = heat capacity of the air, cal/(g K) C h = heat capacity of the hearter, cal/(g K) Ci = heat capacity of the insulation, cal/(g K) C, = heat capacity of the top plate, cal/(g K) C, = heat capacity of the sand, cal/(g K) C, = heat capacity of the walls, cal/(g K) E = polynomial in 2-l e ( t ) = uncorrelated sequence of random variables F = polynomial in 2-l f i = coefficients of the F polynomial G,(s) = process transfer function h = heat-transfer coefficient on surface of insulation, cal/(min cm2 "C) Kc = calculated controller gain, % / K Kc = estimated controller gain, / K KP= process gain,K/ yo K , = estimated process gain, K/ % k = assumed process time delay index ki = thermal conductivity of insulation, cal/(min cm O C ) L = prediction horizon, the number of predicted steps ahead 1 = step ahead index mh = mass of the heater, g m, = mass of the top plate, g m, = mass of sand, g

1442 Ind. Eng. Chem. Res., Vol. 27, No. 8, 1988

m, = mass of the walls, g n, = number of coefficients in Q polynomial rz, = number of coefficients in D polynomial P, Q, R = user-specified polynomials in the STC auxiliary

output P, = numerator polynomial of P in STC auxiliary output Pd = denominator polynomial of P in STC auxiliary output pnl = coefficient of polynomial P, = coefficient of polynomial Pd q1 = energy produced by the electric heater, cal/min q2 = energy produced by the air preheater, cal/min r = radius, cm Tb = temperature of the sand bath, K T d = calculated derivative time, min T , = temperature of the ambient surroundings, K Ti = temperature of the insulation, K; also calculated integral time, min Tin= temperature of the inlet air, K T,,, = maximum temperature achieved, “C T,,, = predicted maximum temperature, “C T p = temperature of the top plate, K T,, = temperature of sand bath at the time of the switch, K T , = temperature of the wall of the sand bath, K AT = difference between maximum temperature and temperature at switching time, “C t = sampling instant in discrete-time model; also continuous time in the Appendix, min t,,, = time at which the maximum temperature is reached, min l,,, = estimated time of maximum temperature, min t,, = switching time, min is, = estimated switching time, min At = sampling period, min U = initial PID controller output, % Au = overall change in process input, % ubp= heat-transfer coefficient between bath and top plate, cal/(K min) U , = heat-transfer coefficient for losses from top plate, cal/(K min) Uwb= heat-transfer coefficient between wall and bath, cal/(K min) u = process input (signal to heater) uf = final process input ui = initial process input (zero) Vair = volume occupied by the air, cm3 w = volumetric flow rate of the air, cm3/min AY = overall change in process output, K y = process output, temperature of the sand bath, K 9 = prediction of future process output, K yf = final process input yi = initial process output (room temperature) yr = set point, “C 2-l = backward shift operator for discrete-time models Greek Symbols a = shorthand for 1 + from Pd in PIDSTC /3 = forgetting factor yl, yz = intermediate terms in the calculation of estimated

process time constants = prediction error t l = one time step ahead prediction error t

= two time steps ahead prediction error cp = emittance of the top plate 17 = residue of the prediction error model t2

8 = time delay, min X = tuning factor for the Smith method of obtaining PID Y

controller settings tuning factor for the PIDSTC

=

pa = density of air, g/cm3 pi = density of the insulation,

g/cm3

= Stefan-Boltzmann constant, cal/(m cm2 K4) T~ = major process time constant, min T~ = minor process time constant, min i, = estimated major process time constant, min i2 = estimated minor process time constant, min Tff = process time constant related to the forgetting factor, CT

min

T = polynomial in the prediction error models uij C#J

= coefficients of polynomial in the prediction error models = auxiliary output for the STC, the variance of which is

minimized

% = polynomial in the precition error models Q =

estimated polynomial in the prediction error models

= coefficients of polynomial in the prediction error models ? = polynomial in the prediction error models Q = estimated polynomial in the prediction error models

Jiij

mi,= coefficients of polynomial in the prediction error models

Appendix The dynamic model of the fluidized sand bath consists of the following differential equations: sand bath (air and sand)

wall and heater

top plate

insulation

with boundary conditions Ti= Twat the heater-insulation interface and aTi/ar = -(h/ki)(Ti - Te)at the outer surface of the insulation.

Literature Cited Astrom, K. J.; Hagander, P.; Stemby, J. “Zeros of Sampled Systems”. Automatica 1984, 20, 31. Bierman, G. J. Factorization Methods for Discrete Sequential Estimation; Academic: New York, 1977. Cameron, F.; Seborg, D. E. “A Self-Tuning Controller with a PID Structure”. Int. J . Control 1983, 38(2),401-417. Clarke, D. W.; Gawthrop, P. J. “Self-tuning Controller”. Proc. IEE, Part D 1975, 122,929-934. Clarke, D. W.; Gawthrop, P. J. “Self-Tuning Control”. Proc. IEE, Part D 1979, 126, 633-640. DeKeyser, R. M. C.; Van Cauwenberghe, A. R. “A Self Tuning Multistep Predictor Application”. Automatica 1981, 17(1), 167. Hodgson, A. J. F. “Problems of Integrity in Applications of Adaptive Controllers”. D.Phi1. Thesis, Univeristy of Oxford, England, 0. U.E.L. Report 1436/82, 1982. Hsu, E. H.; Bacher, S.; Kaufman, A. “A Self-Adapting Time-Optimal Control Algorithm for Second Order Processes”. AIChE J . 1972, I8(6), 1133-1139. Johnson. S. ”Modeline:and Control of a Batch Reactor with External Heat Exchangers”. M.S. Thesis, University of California, Santa Barbara, 1984. Koppel, L. B.; Latour, P. R. ‘Time Optimum Control of Secondorder Overdamped Systems with Transportation Lag”. Ind. Eng. Chem. Fundam. 1965, 4(4), 463-471. I

Znd. Eng. C h e m . Res. 1988,27, 1443-1449

1443

Shinskey, F. G. Process Control Systems, 2nd ed.; McGraw-Hill: New York, 1979. Smith, C. L.; Corripio, A. B.; Martin, J., Jr. “Controller Tuning from Simple Process Models”. Instrum. Technol. 1975,22(12), 39-44.

Latour, P. R.; Koppel, L. B.; Coughanowr, D. R. ”Time-Optimum Control of Chemical Processes for Set-Point Changes”. Ind. Eng. Chem. Process Des. Dev. 1967, 6(4), 452-460. Latour, P. R.; Koppel, L. B.; Coughanowr, D. R. “Feedback TimeOptimum Process Controllers”. Ind. Eng. Chem. Process Des. Dev. 1968, 7(3), 345-353. Lenells, M. “Adaptive Start Up Control”. Ph.D. Thesis, Lund Institute of Technology, Lund, Sweden, 1982.

Received for review May 11, 1987 Revised manuscript received February 23, 1988 Accepted March 5, 1988

Adaptive Control Strategies for Achieving Desired Temperature Profiles during Process Start-up. 2. Experimental Application Susan F. Phillips* and Dale E. Seborg* Department of Chemical & Nuclear Engineering, University of California, Santa Barbara, California 93106

Kenneth J. Legalt E r x o n Research and Engineering Company, Clinton Township, Annandale, N e w Jersey 08801

This paper describes the automated tuning of a temperature control strategy for the start-up of a fluidized sani bath by using adaptive control techniques. In the proposed algorithm, five parameters required t o tune the control strategy were determined during the heat-up to the operating point, eliminating the need for time-consuming trial-and-error tuning techniques. The method has been shown t o work well in simulation runs and in experiments on a pilot-scale sand bath. 1. Experimental Apparatus Exxon Research and Engineering (ER&E) has many pilot-scale reactors requiring a constant-temperature environment which is provided by custom-built sand baths. Tuning the existing dual mode temperature controller is a time-consuming procedure because of the long time constants for heating and cooling. It was proposed that adaptive control techniques could reduce the time required to obtain the five necessary control parameters: the switching time tBw;the PID controller settings K,, Ti,and Td;and the proper initial value for the PID controller U. The sand bath used for the experiments is located at the ER&E Clinton Township facility in New Jersey. This sand bath was smaller than the one simulated in part 1 but was otherwise quite similar. It has a steady-state gain of 4.9 “C/ % and a dominant time constant of about 50 min. The proposed control strategy was based on adaptive control techniques and should be applicable to other sand baths and similar start-up problems. The computer system used to monitor and control this sand bath as well as many others in the pilot reactor laboratory was the Exxon EPIC system which has been described by Wang et al. (1983). The system is a three-tier pyramid structure using Hewlett-Packard computers of appropriate sizes a t each level. The algorithm described in this paper runs on the Operator Station (the lowest level computer, a Hewlett-Packard 2250 Intelligent Measurement and Control Front End) which is responsible for all data acquisition and control functions. A sampling period of 10 s or longer was used in these experiments, although it was possible to use a sampling period of 1 s. Typically, several hundred variables can be recorded by the Operator Station. Variables from the algorithm, such as parameter * T o whom all correspondence should be addressed. ‘Now Senior Systems Engineer at Texas Instruments, Inc., Iselin, N J 08830. Now Applications Scientist, Ametek Computer Research Division, Monrovia, CA 91016.

*

0888-5885/88/2627-1443$01.50/0

Table I. Design Parameters set point, yr, OC sampling period, At, min assumed time delay, k A t , min forgetting factor, @ PIDSTC tunging factor, Y polynomial P,, polynomial Pd input excitation error limit, “C

for the Base Case Run 350 1.0 6.0

1.0 1.0

1.0-0.992-’ 1.0-0.902-’ PRBS with a base frequency of 5 min, changes between 80% and 100% 3.0

estimates, were recorded, as well as process measurements and the controller signal to the heater. For each run in this paper, about 35 variables were recorded a t every sampling instant including the fluidized sand bath temperatures, the controller output, parameter estimates, estimation errors, traces of the covariance matrices, calculated PID settings, the predicted maximum temperature, the recommended initial output of the PID controller, and the estimated parameters for the continuous-time process models. The flexibility of the EPIC system allowed both the standard Exxon control package and the proposed algorithm to run simultaneously, meeting the needs of the authors and the operators. Both the proposed algorithm and the standard control package for the sand bath were used in all of the experiments summarized in this paper. In this manner the standard control package, which includes safety features and is designed for proper display on the operator’s screen, was always in place. Two versions of the proposed strategy exist: an active version and a passive version. In the active version, the recommendations for the five parameters were used to replace the corresponding parameters by overriding constants in the standard control package, such as the PID settings, the switching temperature, and the initial output of the PID controller. In the passive version, the five parameters were displayed to the operator as recommendations only. The passive version had no effect on the standard control package, unless the operator chose to 0 1988 American Chemical Society