On-Line Parameter Estimation through Dynamic Inversion: A Real

Mar 15, 2007 - This real-time study shows that the simple inversion-based parameter ... to this article, users are encouraged to perform a search inSc...
0 downloads 0 Views 216KB Size
Ind. Eng. Chem. Res. 2007, 46, 2503-2507

2503

On-Line Parameter Estimation through Dynamic Inversion: A Real-Time Study Chanin Panjapornpon† and Masoud Soroush* Department of Chemical and Biological Engineering, Drexel UniVersity, Philadelphia, PennsylVania 19104

This manuscript presents the first real-time implementation of a nonlinear, dynamic-inversion-based, parameter estimation method. The estimation method is implemented on a pilot-scale setup to estimate the overall heattransfer coefficient and the rate of heat generation in a tank (electric heater power) online. In the case of the electric heater power, the estimate is compared with the actual heater power supplied to the tank, which allows evaluation of the accuracy of the parameter estimate. Excellent convergence of the estimate of the heater power to its actual value is shown. This observation indicates that the estimator is able to estimate the rate of thermal energy generated by any source inside the tank. For example, the source of this thermal energy can be chemical or nuclear reaction(s). Although the setup is very simple, it does allow one to perform estimation for a parameter whose actual value is known; such a luxury is rarely available in practice. The overall heat-transfer coefficient is estimated at different stirrer speeds. This real-time study shows that the simple inversion-based parameter estimation method is capable of providing reliable estimates in real time. 1. Introduction Process parameters can very rarely be measured. Information on unknown process parameters can be obtained indirectly by means of a parameter estimator. In addition to its application in process monitoring, parameter estimation is an essential component of every adaptive control scheme. The general problem of parameter estimation is that of “fitting” a model to a set of measurements. This process involves postulating a model with some unknown parameters and then calculating the values of the parameters that render the model-predicted values of process outputs “closest” to the measured values of the process outputs. In off-line parameter estimation (as in linear regression), a model is fitted “optimally” to the process measurements from one or several completed process operations. However, in online parameter estimation, a model is fitted optimally to the past and present process measurements while the process is operating. For safe operation of extremely exothermic chemical reactors, such as bulk polymerization reactors, accurate information on reaction heat-production rate and overall heat-transfer coefficient of the reactor/cooling equipment is essential.1 There are no sensors that can measure these important parameters directly. The rate of heat generation by reactions is strongly dependent on the heat of the reactions, the reaction rate constants, and the concentration of reactants. In reactors, the overall heat-transfer coefficient usually varies with time, for example, because of fouling and/or an increase in the viscosity of the reacting mixture. Features such as these have motivated several studies on the on-line estimation of these parameters.2-6 Existing methods of parameter estimation include, but are not limited to, parameter estimation via state estimation,6-13 parameter estimation via dynamic inversion,3,4 and predictionerror-based estimation methods, such as the gradient estimator, the standard least-squares estimator, and least-squares with exponential forgetting.14-16 The first methodsparameter estimation via state estimationshas been used widely. It involves formulating the parameter estimation problem as a state estimation one, which requires a model for each of the unknown parameters to be estimated. Simple parameter models such as * To whom corespondence should be addressed. Tel.: +1-215-9851710. Fax: +1-215-895-5837. E-mail: [email protected]. † Current address: Department of Chemical Engineering, Kasetsart University, Bangkok 10900, Thailand.

“random walk” and “random ramp” have often been used in chemical engineering.5,6 After appropriate parameter models have been chosen, a state estimator (such as an extended Kalman filter,6-13 a moving horizon state estimator,17,18 or a reducedorder Luenberger observer6,19) is used to estimate the states and parameters simultaneously. This manuscript presents the first real-time implementation of the nonlinear, dynamic-inversion-based parameter estimation method that was developed by Tatiraju and Soroush.3,4 The parameter estimator includes a left inverse of the process model and, at each time instant, calculates least-squared-error estimates of parameters by using readily available on-line measurements. The parameter estimation method can provide accurate estimates of unknown time-varying and constant process parameters from readily available measurements. It is computationally efficient and simple to use. The estimation method is implemented on a pilot-scale setup to estimate the overall heat-transfer coefficient and the rate of heat generation in a tank (electric heater power) online. In the case of the electric heater power, the estimate is compared with the actual heater power supplied to the setup, which allows one to evaluate the accuracy of the estimate. The organization of this paper is as follows. The inversionbased parameter estimation method is presented briefly in section 2. The features of the pilot-scale setup are described in section 3. Section 4 presents a mathematical model of the setup that describes the liquid level and temperature in the tank and validates the model. Section 5 presents on-line estimation results. Finally, concluding remarks are given in section 6. 2. Preliminaries: Parameter Estimation via Dynamic Inversion Consider the general class of nonlinear processes described by a linearly parameterized mathematical model of the form3,4

y˘ ) f(y,u) + g(y,u)p

(1)

where y ) [y1‚‚‚yn]T, u ) [u1‚‚‚um]T, and p ) [p1‚‚‚pq]T represent the vectors of measurable outputs, measurable inputs, and process parameters, respectively, f(.,.) and g(.,.) are smooth functions. The parameters p1, ..., pq are unknown and can be time-varying. It is assumed that the n × q matrix g(y, u) has a generic rank of q on R n × R m; that is, rank [g(y, u)] ) q on a subset of R n × R m.

10.1021/ie060933p CCC: $37.00 © 2007 American Chemical Society Published on Web 03/15/2007

2504

Ind. Eng. Chem. Res., Vol. 46, No. 8, 2007

Let yˆ represent the value of the vector of measurable outputs when the process model is driven by an estimated value of the vector of process parameters pˆ not driven by p; that is, yˆ is governed by

yˆ˘ ) f(yˆ ,u) + g(yˆ ,u)pˆ

(2)

Comparing the dynamic systems of eqs 1 and 2, we see that, if yˆ f y asymptotically, then pˆ f p asymptotically. Thus, if there is a mechanism for forcing yˆ to go to y asymptotically, then the estimated value of the vector of process parameters, pˆ , will converge to p asymptotically. The following theorem, which is based on this idea, describes the inversion-based parameter estimator. Theorem 1:3 For a process of the form of eq 1 with rank[g(y,u)] ) q, ∀ (y, u) ∈ R n × R m, the parameter estimator,

{

{}

1 yˆ˘ ) diag (y - yˆ ) βl

( {}

pˆ ) [g(yˆ ,u)Tg(yˆ ,u)]-1 g(yˆ ,u)T diag

)

1 [y - yˆ ] - f(yˆ ,u) βl (3)

where β1, ..., βn are positive scalar tunable parameters, has the following properties: (a) pˆ f p asymptotically, in the limit as the values of the parameters β1, ..., βn all approach zero. (b) pˆ f p asymptotically, if y˘ 1, ..., y˘ n f 0 asymptotically. The parameter estimator of eq 3 inherently includes a lowpass filter for each of the measurable outputs: each yˆ l is indeed the output of a first-order low-pass filter, which has a time constant of βl and whose input is the measurable output yl. The lower the lowest frequency (the higher the largest amplitude) of the noise components of a measurement, yl, the higher the value for βl should be; a higher value of βl leads to blocking more noise in the yl measurement at the price of a slower convergence of the estimates. The inversion-based estimator calculates the parameter estimates based on filtered measurable outputs. Furthermore, the estimator can be used to estimate fast time-varying unknown parameters. Remark 1: Property (a) of the estimator describes a theoretical limit. In practice, to ensure adequate filtering of high-frequency noise components of output measurements, sufficiently large values for the parameters β1, ..., βn should be chosen. Therefore, the phenomenon of peaking20,21 that may occur in high-gain state observers does not occur when the estimator is implemented. Robustness to plant-model mismatch, measurement noise, and unmeasured disturbances is as important in estimation as it is in control, but it is more challenging in estimation. Here, robustness to output-measurement noise is ensured by the lowpass filters that are inherently included in the estimator. At each time instant, the inversion-based parameter estimator calculates the least-squared-error (LSE) estimates of the parameters; at each time instant, it provides parameter values that render yˆ as close as possible to y in the LSE sense (which yield the LSE fit of the model to the measurements). This appealing property is a consequence of the fact that eq 3 is an nth-order left inverse of the dynamic system of eq 1. Of course, if a different model is used, different parameter estimates will be obtained; it has been well-established that, in every parameter estimation, parameter estimates are dependent on the model structure. This parameter estimator provides parameter values that yield the LSE fit of a model to measurements, whether the model structure is right or wrong. Given a model with a reliable structure,

Figure 1. Schematic of the pilot-scale tank.

unmeasured disturbances and parametric uncertainties that strongly affect the model parameter estimates should be taken into account in the parameter estimation. To this end, the disturbances and the parametric uncertainties can be considered as unknown parameters, and a parameter estimator is then used to estimate the extended vector of unknown parameters, which include the original parameters and the unmeasured disturbances/ parametric uncertainties. The parameter estimator of eq 3 cannot be used for a process which has a g(y,u) matrix with a generic rank of q but crosses the singular manifold on which rank [g(y,u)] < q. Remark 2: For a process of the form of eq 1 with a matrix g(y,u), which has a generic rank of q but loses a rank on a manifold, one can use the parameter estimator,

{

{}

1 yˆ˘ ) diag (y - yˆ ) βl pˆ ) [g(yˆ ,u)Tg(yˆ ,u) + diag{γl}]-1g(yˆ ,u)T × 1 diag [y - yˆ ] - f(yˆ ,u) - g(yˆ ,u)pj + pj βl

( {}

)

(4)

where pj is the nominal value of the vector of process parameters, and γ1, ..., γq are positive scalar tunable parameters, whose values should be chosen such that the matrix [gTg + diag {γl}] is full rank for all (y,u) ∈ R n × R m. The values of these tunable parameters are recommended to be set according to γl ) gll(yj,uj)2/10 000, l ) 1, ‚‚‚, q, where yj and uj are the steady-state values of y and u, respectively. It is assumed that the nominal steady-state pair (equilibrium pair) of the process, (yj,uj), is not on the singular manifold where the matrix g(y,u) is not full rank. 3. Pilot-Scale Process A part of the setup built by Panjapornpon et al.22 to conduct real-time process systems engineering studies is used. The setup has been used in teaching and research. It is housed in the Process Systems Engineering Laboratory of the Department of Chemical and Biological Engineering at Drexel University. Only the part used in this study is described here. A description of the entire setup can be found in ref 22. A schematic of the part of the pilot-scale setup is shown in Figure 1. It has a clear, plastic, cylindrical tank. The tank has an outside diameter of 0.2 m and a height of 1.0 m. Inside the tank, there is a helical copper tube (coiled copper tube bank) that can be used for heating or cooling, depending on the temperature of the water flowing into the copper tube. One end of the copper tube is connected by a hose to cold city water, hot water, or a mixture of both, which allows the inlet temperature of the water stream flowing into the copper tube to be adjusted. Thermal energy can also be supplied to the tank

Ind. Eng. Chem. Res., Vol. 46, No. 8, 2007 2505

by an electrical heater that consists of two heat cartridges located inside the tank. The tank has a variable-speed agitator. This part has five resistance temperature detectors (RTDs), two flow-rate sensors, one level sensor, and one control valve. The RTDs measure the temperature of the inlet and outlet streams of the tank and the cooling/heating copper tube. The level sensor measures the water level in the tank. The flow rate of the inlet stream (q0) is measured by one on-line and one offline (rotameter) flow meter. A control valve adjusts the flow rate of the inlet water stream (q0). A proportional control valve receives an analog input signal and sets the flow rate proportionally. All the sensors and actuators are connected to a microcomputer. For example, the power of the heater is set by the computer. More details on the setup can be found in ref 22. 3.1. Mathematical Model and Model Validation. Assuming constant liquid density, a mass balance on the liquid (water) in the tank yields

A

dh ) q0 + qd - q1 dt

Figure 2. Relationship between the outlet flow rate and the liquid level.

(5)

The outlet flow rate q1 is dependent on the level of the liquid in the tank (h). One way to obtain the relationship between q1 and h is to set the inlet flow rate q0 to different constant values while qd ) 0, and then record the corresponding value of the liquid level under steady-state conditions. An LSE curve fit to the data points yields the correlation (constitutive equation) that relates q1 to h. The data points collected from such an experiment and the correlation predictions are shown in Figure 2. The governing constitutive equation is -4 0.1258

q1 ) 2.75 × 10 h

(6)

Figure 3. Model prediction and measurement of the liquid level and their difference.

On-line Runge-Kutta numerical integration of eq 5, together with eq 6, with on-line measurement of the inlet flow rate as an input (forcing function) yields the predicted water level shown in Figure 3, which also depicts on-line measurement of the water level. As can be seen, the model is capable of predicting the water level adequately well. Under a few standard assumptions, such as constant liquid density and heat capacity, energy balances for the tank and the helical tube yield1

dT q0(T0 - T) + qd(Td - T) ) + dt Ah wjcj UAxh (Tj1 - T) 1 - exp FcAh wjcj

(

[

Tj2 ) T + (Tj1 - T) exp -

)

(

)]

UAxh wjcj

+

P (7a) FcAh (7b)

The variables and parameters are defined in the Notation section. For model validation purposes, the overall heat-transfer coefficient, U, is estimated offline. When the flow rates of all streams to/from the tank are zero, under steady-state conditions, eq 7 reduces to

Tj2 - Tj1 P ) UAxh ln[(T - Tj1)/(T - Tj2)] which implies that U can be estimated from temperature and level measurements and the heater power. By setting the heater power to different constant values, maintaining a constant stirrer speed, measuring the temperature under steady-state conditions, and performing linear regression, one can estimate U. The

Figure 4. Model prediction and measurement of water temperature in the tank, their difference, and measurements of the water level and the inlet flow rate, with heater powers of 2800 W and a zero coolant flow rate.

parameter estimation yields U ) 1768.18 J m-2 K-1 s-1 when the stirrer speed is 504 rpm. The reported range for the overall heat-transfer coefficient of a copper coil with cold water inside and hot water outside is 850-1560 J m-2 K-1 s-1.23 The cooling/heating surface area per unit height of the copper coil is Ax ) 0.164 m2/m. Given the parameter values, eq 7, with the on-line measurements of the level and flow rate and qd ) 0 as inputs (forcing functions), was integrated to predict the temperature of the outlet stream. Figure 4 depicts the modelpredicted and measured temperature and measurements of the

2506

Ind. Eng. Chem. Res., Vol. 46, No. 8, 2007

water level and the inlet flow rate, when the heater power is equal to 2800 J/s and the coolant flow rate is zero. As can be observed, the model also is capable of predicting the temperature adequately well. 4. On-Line Parameter Estimation 4.1. Parameter Estimator Design. Parameter estimation is performed when the tank inlet and outlet flow rates are all zero. The overall heat-transfer coefficient and the heater power are estimated from measurements of the outlet stream temperature (T), the inlet coolant temperature (Tj1), and the outlet coolant temperature (Tj2). Based on the model described by eq 7, the parameter estimator of eq 3 takes the following form:

{

1 Tˆ˙ ) (T - Tˆ ), (Tˆ (0) ) T(0)) β T - Tˆ - βR1(Tj1 - Tˆ )[1 - exp(- pˆ 2)] pˆ 1 ) β Tj1 - T pˆ 2 ) ln Tj2 - T

(

)

(8)

Figure 5. Actual heater power, and estimates of the heater power and the overall heat-transfer coefficient.

where

p1 )

P FcAh

p2 )

UAxh wjcj

R1 )

wjcj FcAh

Figure 6. Estimated overall heat-transfer coefficient when the stirrer speed is increased stepwise.

Here, Tˆ is filtered temperature T (filtered by a first-order lowpass filter), and β is the filter time constant. Theoretically, the smaller the value of β, the more accurate the value of the estimated parameter pˆ 1. In this study, the standard deviation of the noise component of the water temperature measurement is high, so β is set to a large value to filter the noise component effectively. The following discrete-time version of the continuous-time estimator of eq 8 is implemented:

{

Tˆ (k + 1) ) λTˆ (k) + (1 - λ)T(k), θ(k) )

Tj1(k) - T(k)

pˆ 1(k) ) pˆ 2 ) ln

(Tˆ (0) ) T(0))

Tj1(k) - Tj2(k)

can be chemical or nuclear reaction(s). Although the setup is very simple, it does allow one to perform estimation for a parameter whose actual value is known; in the case of the heater power, the performance of the estimator (accuracy of the estimate) can be evaluated. Figure 6 shows the estimate of the overall heat-transfer coefficient when the stirrer speed is increased stepwise and the heater power is maintained constant. As expected, the overall heat-transfer coefficient increases with the stirrer speed nonlinearly. The tunable parameter β has a value of 100 s for this study.

T(k) - Tˆ (k) - βR1(Tj1(k) - Tˆ (k))θ(k) β Tj1(k) - T(k)

(

Tj2(k) - T(k)

(9)

)

where λ ) exp(-β∆t) and ∆t is the sampling period. 4.2. Results. Figure 5 shows the estimates of the overall heattransfer coefficient and the heater power, as well as the actual heater power; the dashed line represents the actual heater power. The stirrer speed is maintained constant. The heater is turned on at t ) 200 s and then turned off at t ) 1200 s. The estimates shown are for β ) 50 and 100 s. In case the actual value of the heater power is known, the excellent convergence of the estimate to its actual value and the effect of β on this convergence can be clearly observed. This indicates that the estimator is able to estimate the rate of thermal energy generated by any source inside the tank. For example, the source of this thermal energy

5. Conclusions The first real-time implementation of the nonlinear, dynamicinversion-based, parameter estimation method was presented. The overall heat-transfer coefficient and the rate of heat generation in a tank (electric heater power) were estimated online. In the case of the electric heater power, the estimate was compared with the actual heater power supplied to the tank, which allows evaluation of the accuracy of the parameter estimate. This indicates that the estimator is able to estimate the rate of thermal energy generated by any source inside the tank. For example, the source of this thermal energy can be chemical or nuclear reaction(s). Although the setup is very simple, it allows one to perform estimation for a parameter whose actual value is known; in the case of the heater power, the performance of the estimator (accuracy of the estimate) can be evaluated. Such a luxury is rarely available in practice. The overall heat-transfer coefficient was estimated at different stirrer speeds.

Ind. Eng. Chem. Res., Vol. 46, No. 8, 2007 2507

Real-time results from this study confirm our earlier simulation results, which showed very good performance of the inversion-based parameter estimator, in terms of parameter estimate convergence and robustness with respect to model errors.3 Acknowledgment The authors would like to thank the Department of Chemical and Biological Engineering at Drexel University for supporting this project. Notation A ) cross section area of the tank (m2) Ax ) heat-transfer surface area of the coil in the tank per unit height of the tank (m2/m) c ) heat capacity of the fluid inside the tank (J kg-1 K-1) cj ) heat capacity of liquid flowing through the cooling/heating tube (J kg-1 K-1) h ) level of water in the tank (m) p1, p2 ) unknown process parameters P ) heater power (J/s) q0 ) flow rate of the first inlet stream (m3/s) q1 ) flow rate of the outlet stream (m3/s) qd ) flow rate of the second inlet stream (m3/s) t ) time (s) T ) outlet stream temperature (K) T0 ) temperature of the first inlet stream (K) Td ) temperature of the second inlet stream (K) Tˆ ) filtered value of the liquid temperature (K) Tj1 ) inlet temperature of the coolant stream (K) Tj2 ) outlet temperature of the coolant stream (K) U ) coil-tank overall heat-transfer coefficient (J m-2 K-1 s-1) u ) vector of measurable inputs wj ) mass flow rate of the coolant (kg/s) y ) vector of measurable outputs yˆ ) vector of the predicted values of the measured variables Greek Letters βj ) estimator tunable parameters, where j ) 1, ..., n (s) γj ) estimator tunable parameters, where j ) 1, ..., q F ) density of the liquid (kg/m3) Literature Cited (1) Chylla, R. W.; Haase, D. R. Temperature Control of Semibatch Polymerization Reactors. Comput. Chem. Eng. 1993, 17 (3), 257. (2) Tyner, D.; Soroush, M.; Grady, M. C. Adaptive Temperature Control of Multi-Product Jacketed Reactors. Ind. Eng. Chem. Res. 1999, 38 (11), 4337.

(3) Tatiraju, S.; Soroush, M. Parameter Estimator Design with Application to a Chemical Reactor. Ind. Eng. Chem. Res. 1998, 37 (2), 455. (4) Tatiraju, S.; Soroush, M. Parameter Estimation via Inversion with Application to a Reactor. Proc. Am. Control Conf. 1997, 2429. (5) Kosanovich, K. A.; Piovoso, M. J.; Rokhlenko, V.; Guez, A. Nonlinear Adaptive Control with Parameter Estimation of a CSTR. J. Process Control 1995, 5, 137. (6) Dochain, D. State and Parameter Estimation in Chemical and Biochemical Processes: A Tutorial. J. Process Control. 2003, 13, 801. (7) Cheng, Y. S.; Abi, C. F.; Kershenbaum, L. S. On-line Estimation for a Fixed-Bed Reactor with Catalyst Deactivation using Nonlinear Programming Techniques. Comput. Chem. Eng. 1996, 20 (B), 793. (8) Bonvin, D.; de Valliere, P.; Rippin, D. W. T. Application of Estimation Techniques to Batch ReactorssI. Modelling Thermal Effects. Comput. Chem. Eng. 1989, 13 (1/2), 1. (9) Elicabe, G. E.; Ozdeger, E.; Georgakis, C. Online Estimation of Reaction Rates in Semicontinuous Reactors. Ind. Eng. Chem. Res. 1995, 34 (4), 1219. (10) Gudi, R. D.; Shah, S. L.; Gray, M. R. Multirate State and Parameter Estimation in an Antibiotic Fermentation with Delayed Measurements. Biotechnol. Bioeng. 1994, 44 (11), 1271. (11) Schuler, H.; Schmidt, Ch.-U. Model-Based Measurement Techniques in Chemical Reactor Applications. Int. Chem. Eng. 1993, 33 (4), 559. (12) Semino, D. M.; Morretta, M.; Scali, C. Parameter Estimation in Extended Kalman Filters for Quality Control in Polymerization Reactor. Comput. Chem. Eng. 1996, 20, 913. (13) Sirohi, A.; Choi, K. Y. On-line Parameter Estimation in a Continuous Polymerization Process. Ind. Eng. Chem. Res. 1996, 35, 1332. (14) Bastin, G.; Gevers, M. G. Stable Adaptive Observers for Nonlinear Time-Varying Systems. IEEE Trans. Automat. Control 1988, 33 (7), 650. (15) Narendra, K. S.; Annaswamy, A. M. Stable AdaptiVe Systems; Prentice Hall: Englewood Cliffs, NJ, 1988. (16) Slotine, J.-J. E.; Li, W. Applied Nonlinear Control; Prentice Hall: Englewood Cliffs, NJ, 1991. (17) Michalska, H.; Mayne, D. Q. Moving Horizon Observers and Observer-Based Control. IEEE Trans. Automat. Control 1995, 40, 995. (18) Muske, K. R.; Rawlings, J. B. Nonlinear MoVing Horizon State Estimation, Methods of Model Based Process Control; Berber, R., Ed.; Kluwer Academic Publishers: Dordrecht, The Netherlands, 1995. (19) Soroush, M. Nonlinear State-Observer Design with Application to Reactors. Chem. Eng. Sci. 1997, 52 (3), 387. (20) El-Farra, N.; Christofides, P. D. Bounded Robust Control of Constrained Multivariable Nonlinear Processes. Chem. Eng. Sci. 2003, 58, 3025. (21) Christofides, P. D. Robust Output Feedback Control of Nonlinear Singularly Perturbed Systems. Automatica 2000, 36, 45. (22) Panjapornpon, C.; Fletcher, N.; Soroush, M. A Flexible Pilot-Scale Setup for Real-Time Studies in Process Systems Engineering. Chem. Eng. Educ. 2006, 40 (1), 40. (23) Perry, R. H.; Green, D. W. Perry’s Chemical Engineers’ Handbook, 7th ed.; McGraw-Hill: New York, 1997; Table 11-2, pp 11-21.

ReceiVed for reView July 18, 2006 ReVised manuscript receiVed January 23, 2007 Accepted January 29, 2007 IE060933P