408
Ind. Eng. Chem. Res. 2000, 39, 408-419
Nonlinear Observer Design for Process Monitoring Nikolaos Kazantzis* and Costas Kravaris†,§ Department of Chemical Engineering, The University of Michigan, Ann Arbor, Michigan 48109-2136
Raymond A. Wright The Dow Chemical Company, 1400 Building, Midland, Michigan 48667
The present work proposes a systematic nonlinear observer design framework for process monitoring. The objective is to accurately monitor key process variables associated with process safety or product quality, by designing a model-based nonlinear observer that directly utilizes the available information coming from continuous-time on-line process output measurements. The nonlinear observer possesses a state-dependent gain which is computed from the solution of a system of first-order linear partial differential equations (PDEs). Depending on whether the process operates in continuous or batch mode, a different mathematical treatment and solution scheme for the system of PDEs is needed. Within the proposed design framework, both full-order and reduced-order observers are studied. Finally, the performance of the proposed observer is evaluated in two chemical-engineering examples: (1) a catalytic batch reactor where the objective is to accurately estimate the catalyst activity and (2) an exothermic CSTR that exhibits steady-state multiplicity and the heat released by the reaction needs to be closely monitored. 1. Introduction In the modern chemical-processing industrial environment, higher demands for process safety and product quality necessitate the development of efficient and reliable process-monitoring schemes. It is widely recognized that the more reliable the process-monitoring scheme employed and the earlier the detection of an operational problem, the greater the intervening power and flexibility of the process-engineering team to correct it and restore operational order. Indeed, from a safety point of view, the amount of control action needed to correct a problem is less the earlier the problem is detected. Furthermore, from a product quality point of view, earlier detection of an operational problem might prevent the unnecessary production of off-spec products and subsequently minimize operational costs. Therefore, the need to develop reliable on-line process-monitoring schemes becomes quite acute nowadays. In that direction, the availability of a fairly accurate process model as well as all the information which is naturally captured by the process state variables are of paramount importance. However, the availability of all process state variables for direct on-line measurement is a rare occasion in practice. In most cases there is a substantial need for an accurate estimation of the unmeasurable process state variables, especially when they are used in the synthesis of model-based controllers or for process-monitoring purposes critically associated with process safety and product quality (Doyle, 1998; Soroush, 1998). For this particular task, a state observer * To whom correspondence should be addressed. Present address: Department of Chemical Engineering, Texas A&M University, College Station, TX 77843-3122. Phone: (409)8453492. Fax: (409)845-3361. E-mail:
[email protected]. † Present address: Department of Chemical Engineering, University of Patras, GR-26500 Patras, Greece. ‡ Fax: (517)638-6671. E-mail:
[email protected]. § Fax: (734)763-0459. E-mail:
[email protected].
is usually employed, to accurately reconstruct the unmeasurable process state variables by using a process model and the available on-line process output measurements. In the case of linear systems, both the wellknown Kalman filter (Gelb, 1974; Bastin and Dochain, 1990; Doyle, 1998) and its deterministic analogue realized by Luenberger’s observer (Luenberger, 1963; Chen, 1984) offer a complete solution to the problem. However, most chemical and physical processes are inherently nonlinear, and inevitably, the field of chemical engineering is dominated by the presence of processes that exhibit severe nonlinearities. In the case of nonlinear dynamic process models, the customary approach in designing state observers is based on a local linearization of the process model around a reference steady state and the subsequent employment of linear observer design methods (Gelb, 1974; Doyle, 1998). This approach, however, offers results of local validity that might lead to unacceptably poor performance of the observer, even in the presence of mild process nonlinearities (Kantor, 1989; Valluri and Soroush, 1996; Soroush, 1997, 1998). To overcome the limitations that arise from the application of linear observer design techniques and methods to nonlinear processes, nonlinear observers that are capable of directly coping with process nonlinearities need to be designed. In the field of nonlinear systems, the nonlinear observer design problem is much more challenging and has received a considerable amount of attention in the literature. Numerous attempts were made for the development of nonlinear observer design methods. One could mention the industrially popular extended Kalman filter as well as the extended Luenberger observer, whose design is based on a local linearization of the system around a reference trajectory, thus exhibiting only local validity (Adebekun and Schork, 1989; Bastin and Dochain, 1990; Kim and Choi, 1991; Quintero-Marmol et al., 1991; Kozub and MacGregor, 1992; Ogunnaike, 1994; Robertson et al., 1995; Doyle, 1998). A more recent attempt
10.1021/ie990321n CCC: $19.00 © 2000 American Chemical Society Published on Web 01/20/2000
Ind. Eng. Chem. Res., Vol. 39, No. 2, 2000 409
is Zeitz’s version of an extended Luenberger observer (Zeitz, 1987) which is in the same spirit as the extended Kalman filter, based upon a local linearization technique around the reconstructed state. Undoubtedly, the first systematic approach for the development of a design method for nonlinear observers was proposed by Krener and Isidori (1983) and Krener and Respondek (1985), who made use of a nonlinear state transformation to linearize the original system up to an additional output injection term. Linear methods were then employed to complete the observer design procedure. However, this linearization approach is based upon a set of extremely restrictive conditions (involutivity conditions) that can hardly be met by any physical system (Isidori, 1989). Moreover, Xia and Gao (1989) provided a set of necessary and sufficient conditions for the solvability of the observer error linearization problem in the case of time-varying systems. Nonlinear coordinate transformations were also employed to transform the nonlinear system to a suitable “observer canonical form”, where the observer design problem can be easily addressed (Bestle and Zeitz, 1983; Ding et al., 1990). All these approaches, however, impinge on the problem of relying on quite restrictive conditions. Other significant contributions to the nonlinear observer design problem can be found in recent pieces of research work where a different type of approach is adopted, enabling the derivation of theoretically sound results (Kantor, 1989; Tsinias, 1989, 1990; Dochain et al., 1992; Gauthier et al., 1992; Ciccarela et al., 1993; GibonFargeot et al., 1994; Appelhaus and Engell, 1996; Vallouri and Soroush, 1996; Soroush, 1997; Tatiraju and Soroush, 1997; Kurtz and Henson, 1998). However, all of the above approaches rely either on “high-gain” design methods, on restrictive Lipshitz continuity conditions, or on the a priori selection of an appropriate Lyapunov function, or finally, they are developed for classes of nonlinear systems with special structure. Motivated by prior theoretical results of the authors on the design of nonlinear observers (Kazantzis and Kravaris, 1998), the present work aims at the development of a systematic and practical nonlinear observer design framework for process-monitoring purposes. The formulation of the nonlinear observer design problem is realized via a system of first-order linear PDEs, and a rather general set of necessary and sufficient conditions for solvability is presented. Depending on the process operational mode (batch or continuous), a fundamentally different mathematical treatment and solution scheme is developed for the aforementioned system of PDEs. A nonlinear observer that possesses a state-dependent gain that can be computed from the solution of the system of PDEs may then be designed. The present paper is organized as follows: In section 2 prior theoretical results on the nonlinear full-order and reduced-order observer design problem are briefly presented as requisite preliminaries. Section 3 contains a discussion on the proposed mathematical treatment and solution scheme to the above problem for the two classes of processes considered: batch and continuous. In section 4 the performance of the proposed nonlinear observer is evaluated in two chemical-engineering examples. First, a catalytic batch reactor is considered and the objective is to estimate the catalyst activity on-line for design purposes. Second, an exothermic CSTR that exhibits steady-state multiplicity and is regulated at the operationally favorable middle unstable steady state
using a simple PI controller is considered. In accordance with the proposed approach, a reduced-order nonlinear observer is used to closely monitor the heat released by the reaction as well as conversion in the presence of process and sensor noise. Finally, some concluding remarks with regard to the proposed approach are presented in section 5. 2. Nonlinear Observer Design Method The present section contains a brief summary of the main theoretical results pertaining to the proposed nonlinear observer design method. A more thorough analysis as well as the detailed derivation of the theoretical results can be found in (Kazantzis and Kravaris, 1997, 1998). We consider multiple-output autonomous dynamic process models with a state-space representation of the form
x˘ ) f(x) yi ) hi(x)
(1)
(i ) 1, ..., m), where x ∈ Rn is the vector of process state variables, y1, ..., ym ∈ R are the process output variables, f(x) is a real analytic vector function on Rn, and h1(x), ..., hm(x) are real analytic scalar functions on Rn. It is understood that the model (1) is expressed in deviation variable form, so that the origin x ) 0 is an equilibrium point of (1) for which f(0) ) 0 with hi(0) ) 0. Denoting by H the m × n matrix,
[ ]
∂h1 (0) ∂x l H) ∂hm (0) ∂x
(2)
it is assumed that H has rank m, so that the outputs in (1) are linearly independent around the equilibrium point. It should be pointed out that a broad class of chemical processes can be modeled in the form (1), including feedback-controlled processes. 2.1. Full-Order Observers. For the dynamic process model (1), consider a nonlinear full-order observer of the following form:
[
xˆ˙ ) f(xˆ ) + L(xˆ )
y1 - h1(xˆ ) l ym-hm(xˆ )
]
(3)
where xˆ ∈ Rn is the state estimate. The above full-order observer has a state-dependent gain L(x), which can be designed according to
L(x) )
[∂T∂x (x)]
-1
B
(4)
where w ) T(x): Rn f Rn is a solution of the following system of linear first-order partial differential equations (PDEs):
[ ]
∂w f(x) ) Aw + B ∂x
h1(x) l hm(x)
(5)
with A and B being constant matrices of appropriate
410
Ind. Eng. Chem. Res., Vol. 39, No. 2, 2000
dimensions. Under the above choice of the nonlinear gain, the full-order observer (3) induces the error dynamics,
d (T(xˆ ) - T(x)) ) A(T(xˆ ) - T(x)) dt
(6)
and therefore, if A is chosen to be Hurwitz (negative eigenvalues), its eigenvalues regulate the exponential rate of decay of the error (T(xˆ ) - T(x)). Matrices A and B are the available design parameters and their selection should reflect the main design priorities and objectives. However, particular attention should be drawn to the fact that the eigenvalues of matrix A directly influence the convergence speed of the state estimate to the actual one. Notice that invertibility of the matrix (∂T/∂x)(xˆ ) implies that the state estimate xˆ asymptotically approaches the actual state x if A is Hurwitz. 2.2. Reduced-Order Observers. The full-order observer reconstructs the entire state vector when the measured output variables of the system represent a part of it. Consequently, intuitive reasons indicate that there is a redundancy in the full-order observer, which under certain conditions could be eliminated. It would therefore be conceivable to investigate the possibility of designing a reduced-order observer capable of accurately reconstructing only the unmeasurable process state variables and not the entire state vector. The reduced-order observer effectively exploits all the practically essential information coming from the available process output measurements. Furthermore, the dynamic simulation of the reduced-order observer is easier because of its lower dimensionality. Let us now consider the case where the outputs of the system form a part of the state vector. In this case the original system admits the following state-space representation:
x˘ M ) fM(xR,xM) y ) xM
(7)
where the first (n - m) state variables are collectively denoted by xR, the remaining m state variables by xM, and the output vector is exactly y ) xM. Notice that any system of the form (1) can be locally transformed into (7) under the assumption that the matrix H has full row rank. For the dynamic process model (7), consider a nonlinear reduced-order observer of the following form,
dy xˆ˙ R ) fR(xˆ R,y) + L(xˆ R,y) fM(xˆ R,y) dt
)
(8)
where xˆ R ∈ Rn-m is the state estimate. The above reduced-order observer has a state-dependent gain L(xR,y), which can be designed according to
L(xR,y) )
[
∂T (xˆ ,y) ∂xR R
]
-1
∂T (xˆ ,y) ∂xM R
(9)
where w ) T(x): Rn f Rn-m is a solution of the following system of linear first-order PDEs,
[ ]
∂w f(x) ) Aw + B ∂x
h1(x) l hm(x)
∂w ∂w f (x) + f (x) ) Aw + BxM ∂xR R ∂xM M
(10)
(11)
with A and B being constant matrices of appropriate dimensions. Under the above choice of the nonlinear gain, the reduced-order observer (8) induces the error dynamics
d (T(xˆ R,y) - T(xR,y)) ) A(T(xˆ R,y) - T(xR,y)) dt
(12)
and therefore, if A is chosen to be Hurwitz, its eigenvalues regulate the exponential rate of decay of the error (T(xˆ R,y) - T(xR,y)). Notice that invertibility of the matrix (∂T/∂xR)(xˆ R,y) implies that the state estimate xˆ R asymptotically approaches the actual state xR. Remark 1. Notice that, in the linear case, the fullorder observer (3) and the reduced-order observer (8) become the full-order and the reduced-order Luenberger observer respectively (Luenberger, 1963; Kazantzis and Kravaris, 1997, 1998). Indeed, in the linear case, where f(x) ) Fx and h(x) ) Hx, the problem of solving the system of PDEs (5) or (11) reduces to the problem of solving the following matrix equation: TF - AT ) BH. In particular, the corresponding system of PDEs (5) or (11) admits a unique solution: w ) Tx, with T being an invertible solution of the above matix equation. In this case, the proposed observer possesses a constant gain, L ) T-1b, and it simply becomes a Luenberger observer (Luenberger, 1963). Remark 2. It is possible to show that the same error dynamics for the full-order or the reduced-order observer can be obtained if w ) T(x) satisfies the more general system of PDEs:
∂w f(x) ) Aw + G(h1(x), ..., hm(x)) ∂x
x˘ R ) fR(xR,xM)
(
or equivalently
(13)
where G is a possibly nonlinear vector function of appropriate dimensions (“output injection” term) (Kazantzis and Kravaris, 1997, 1998). To ensure that it is indeed feasible to design a fullorder or reduced-order observer of the form (3) and (8), respectively, one needs to first derive a set of conditions under which the system of linear first-order PDEs (5) or (10) and (11) admits a unique and invertible solution. This would guarantee that the nonlinear observers (3) and (8) possess the desirable convergence properties. Moreover, to be able to make practical use of the proposed nonlinear observer design method, a solution method for the system of PDEs (5) or (10) and (11) needs to be developed as well. This is the subject of the following section. 3. Solution Method for the System of PDEs Let us now consider the following classification of chemical processes in accordance with their operational mode: batch and continuous. It will be seen that, under the above process classification, a fundamentally different mathematical treatment as well as solution method will be needed for the system of PDEs (5) or (10) and (11). For simplicity reasons, the system of PDEs (5) for the full-order observer case is considered in the sequel. Similar arguments apply to the system of PDEs (10) or (11) in the reduced-order observer case.
Ind. Eng. Chem. Res., Vol. 39, No. 2, 2000 411
Notice that the set of first-order PDEs has a common principal part (Courant and Hilbert, 1962) that consists of the components fi(x), (i ) 1, ..., n) of the vector function f(x). Moreover, the origin is a characteristic point for the above system of PDEs (5) because the principal part vanishes at x ) 0 (Courant and Hilbert, 1962). To solve the above system of PDEs (5), we have to distinguish between the following two cases. 3.1. Case 1: Batch Processes. If a solution of (5) is sought in a region of state space that does not contain the characteristic point x ) 0, the existence and uniqueness conditions of the Cauchy-Kovalevskaya theorem are satisfied (Courant and Hilbert, 1962). This is indeed the case when the inherently transient behavior of a batch process that will inevitably prevent the trajectories of the dynamic system to reach the x ) 0 characteristic point in any finite time interval is considered. Therefore, the well-known method of characteristics can be safely applied to the system of PDEs (5) as a solution method (Courant and Hilbert, 1962). According to this method, let us consider an arbitrary (n-1)-dimensional noncharacteristic Cauchy surface S in Rn with a parametric representation: xi ) δi(s), (i ) 1, ..., n) and upon which the unknown solution of (5) attains given values (Cauchy data): w(x)|S ) Ψ(s). Letting Ai and Bi (i ) 1, ..., n) be the rows of the A and B matrices, respectively, and because the above system of PDEs (5) has a common principal part, the characteristic system of ordinary differential equations (ODEs) of (5) attains the following form (Courant and Hilbert, 1962):
dxi ) fi(x) dt dwj ) Ajw + Bjh(x) dt
Condition 1. The Jacobian matrix F of the f(x) vector function evaluated at x ) 0, F ) (∂f/∂x)(0), has eigenvalues ki (i ) 1, ..., n), with real parts of the same sign. The above condition essentially implies that the system (1) can be either locally asymptotically stable or totally unstable at the origin. Condition 2. The following mn × n matrix O
[ ]
H HF O) l HFn-1
(15)
has rank n. Condition 2 states that the linearization of (1) around the origin x ) 0 is observable. Condition 3. The pair {A,B} is chosen to be controllable. It can be shown that conditions 2 and 3 are crucial to ensure local invertibility of the unknown solution w ) T(x) of (5) (Kazantzis and Kravaris, 1997, 1998). Condition 4. The eigenvalues ki (i ) 1, ..., n) of F are not related to the eigenvalues λi (i ) 1, ..., n) of A through any equation of the type n
miki ) λj ∑ i)1
(16)
(j ) 1, ..., n), where all the mi are nonnegative integers that satisfy the condition n
mi > 0 ∑ i)1
(17)
(14)
with initial conditions xi(0) ) δi(s) and w(0) ) Ψ(s), respectively (i ) 1, ..., n; j ) 1, ..., n). The integration of the system of ODEs (14) provides the family of integral curves of (5) that generates the appropriate integral surface in accordance with the general method of characteristics (Courant and Hilbert, 1962). In particular, the solution to the system of PDEs (5) is obtained by eliminating (t,s) from the solution {x(t,s),w(t,s)} of (14). Notice that, from a practical point of view, the numerical integration of the system of ODEs (14) would be suggested. However, addressing issues such as the choice of the arbitrary Cauchy surface S and Cauchy data Ψ(s) is not a trivial task and certainly problemdependent. Finally, it should also be pointed out that local invertibility of the unknown solution w ) T(x) of (5), which is crucial for the viability of the proposed nonlinear observer design method, is ensured by the theory related to the method of characteristics (Courant and Hilbert, 1962). 3.2. Case 2: Continuous Processes. In the case of continuous processes, a solution of the system of PDEs (5) is sought in a neighborhood of the reference equilibrium point x ) 0, where the system of PDEs (5) becomes singular and the conditions of the CauchyKovalevskaya theorem are not satisfied (Courant and Hilbert, 1962). However, it can be proven that, under the following set of conditions, the system of linear firstorder singular PDEs (5) admits a unique locally analytical and invertible solution, w ) T(x) (Kazantzis and Kravaris, 1997, 1998):
Conditions 1 and 4 are necessary for the existence and uniqueness of the unknown solution w ) T(x) of (5) (Kazantzis and Kravaris, 1997, 1998). Notice that condition 4 does not pose any considerable restriction to the proposed design method because A is a design parameter that can be chosen so that conditions (16) and (17) are avoided. To be able to make practical use of the proposed nonlinear observer design methodology in the case of continuous processes, one must provide a solution scheme for the associated system of first-order linear PDEs (5). Notice that the method of characteristics is not applicable because the aforementioned system of PDEs (5) is singular (Courant and Hilbert, 1962). However, because f(x), hi(x) and the solution T(x) are locally analytic around the origin, it is possible to calculate the solution T(x) in the form of a multivariate Taylor series around the origin. The method involves expanding f(x), hi(x) and the unknown T(x) in a Taylor series and equating the Taylor coefficients of both sides of the PDEs (5). This procedure leads to recursion formulas, through which one can calculate the Nth order Taylor coefficients of T(x), given the Taylor coefficients of T(x) up to the order N - 1. In the derivation of the recursion formulas, it is convenient to use the following tensorial notation: (a) The entries of a constant matrix A are represented as aji, where the subscript i refers to the corresponding row and the superscript j to the corresponding column of the matrix.
412
Ind. Eng. Chem. Res., Vol. 39, No. 2, 2000
(b) The partial derivatives of the µ component fµ(x) of a vector field f(x) at x ) 0 are denoted as follows:
fiµ ) fijµ ) fijk µ )
∂fµ (0) ∂xi
∂2fµ (0) ∂xi∂xj
∂3fµ (0) ∂xi∂xj∂xk
AfB
1 1 Tl(x) ) Til1xi1 + Til1i2xi1xi2 + ... + 1! 2! 1 i1i2...iN T xi1xi2...xiN + ... (19) N! l Similarly, one expands the components of the vector function f(x) and the scalar functions hi(x) in multivariate Taylor series. Substituting the expansions of T(x), f(x), and hi(x) into (5) and matching the Taylor coefficients, the following relation for the Nth order terms can be obtained (Kazantzis and Kravaris, 1997, 1998): N-1
1
()
L
L+1...iN
) aµl Tiµ1...iN + bµl hiµ1...iN
(21)
(18)
etc. (c) The standard summation convention where repeated upper and lower tensorial indices are summed up is used. With this notation, the lth component Tl(x) of the unknown solution T(x) is expanded in a multivariate Taylor series as follows:
...i i Tµi fµ ∑ ∑ l L)0
attributed to the fact that the number of the active sites on the catalytic surface available for the reaction could be significantly reduced by various mechanisms, such as sintering, aging, or poisoning. Empirical laws that quantify the decay of the catalyst activity in the form of simple dynamic models are also available in the relevant literature (Fogler, 1992). The example chosen deals with a heterogeneous chemical reaction:
(20)
N L
where aµl and bµl are the (l,µ) entries of the A and B matrices, respectively, and i1, ..., iN ) 1, ..., n and l ) 1, ..., n. Note that the second summation symbol in (20) indicates summing up of the relevant quantities over N possible combinations of the indices (i1, ..., iN). the L Equations 20 represent a set of linear algebraic equations in the unknown coefficients Tiµ1,...,iN. It should be pointed out that the series solution of the PDEs (5) may be accomplished in an automatic fashion, by exploiting the computational capabilities and commands of MAPLE (Kazantzis, 1997). In particular, a simple MAPLE code was developed to automatically generate the various coefficients of the multivariate Taylor series expansion of the unknown solution of (5) (Kazantzis, 1997). In the next section the main design and computational aspects of the proposed method will be illustrated in two chemical-engineering examples where both the batch and the continuous process cases are considered.
()
subject to catalyst deactivation that takes place in a batch reactor. In particular, we consider second-order chemical kinetics, coupled with a second-order decay rate of the catalyst activity:
dcA ) -kacA2 dt da ) -kda2cA dt
where cA is the concentration of the reactant A, k is the reaction rate constant, a is the catalyst activity, and kd is the specific decay constant. Models of that type can be met in cases where poisoning molecules become irreversibly chemisorbed to active sites of the catalytic surface (Fogler, 1992). The objective is to estimate the catalyst activity aˆ (t) at any time, while measuring the concentration of the reactant A. This type of monitoring is firmly motivated by cases where the process engineer is interested in estimating the proper time of replacing the catalyst in the batch reactor. For the state estimation problem under consideration, a reduced-order observer may be designed, in accordance with the previously delineated method. If we denote a ) x, the state to be reconstructed by the observer, and cA ) y the measured output, the PDE that needs to be solved is
∂T ∂T (-kdx2y) + (-kxy2) ) -RT + y-(1+(kd/k)) ∂x ∂y
R - (kd + k)xy -(1+(kd/k)) y + R2
{(
exp 4.1. Catalytic Batch Reactor. The serious problem of catalyst deactivation inevitably arises in a wide variety of chemical processes. It is now well-understood that, for almost any heterogeneous reaction scheme that takes place in a chemical reactor, a loss of catalytic activity always occurs. This loss of catalytic activity is
(23)
where R is a positive number that adjusts the rate of the decay of the error dynamics and G(y) ) y-(1+(kd/k)) an output injection term that was appropriately chosen to facilitate the analytical solution of (23). Notice that the singular point (0,0) cannot be reached in any finite time, because of the transient operation of the batch reactor. Therefore, the method of characteristics may then be safely employed to provide a solution for (23) that is valid in a state-space region which does not contain (0,0). For the specific case considered, the method of characteristics offers a solution for (24) in closed form. Indeed, it was found that
T(x,y) ) 4. Examples
(22)
)}
R 1 kd + k xy
(24)
is a solution of (23). As was mentioned in sections 2 and 3, the design of a reduced-order observer to reconstruct the catalyst activity xˆ (t) ) aˆ (t) at any time, while measuring the concentration of A is feasible, resulting
Ind. Eng. Chem. Res., Vol. 39, No. 2, 2000 413 Table 1. Process Parameter Values process parameters
values
Fs V Tin UA F cP (-∆H)R k0 E R Tj cA,in
20 L/s 100 L 275 K 20000 J/(s K) 1000 g/L 4.2 J/(g K) 596619 J/mol 6.85E+11 L/(s mol) 76534.704 J/mol 8.314 J/(mol K) 250 K 1 mol/L
the chemical compounds Na2S2O3, H2O2, Na2S3O6, Na2SO4, and H2O in (27), respectively. The reaction kinetic law is reported in the literature to be (Vejtasa and Schmitz, 1970) Figure 1. Catalyst activity estimation.
in the following dynamic equation for the proposed observer:
dy xˆ˙ ) -kdxˆ 2y + L(xˆ ,y) -kxˆ y2 dt
(
)
(25)
with a nonlinear gain L(xˆ ,y): -1
L(xˆ ,y) )
[∂T∂xˆ ]
)
(
∂T (xˆ ,y) ∂y
(xˆ ,y)
)
R xˆ y(kd/k)e-(R/(kd+k))(1/xˆ y) kd + k + kd + k 2 2 R (1+(kd/k)) -(R/kd+k)(1/xˆ y) y e xˆ y kd + k R2 kd 1 2 2 kd (kd + k)xˆ y - R 1 + xˆ R k k (26) k +k 2 2 R d (1+(kd/k)) -(R/(kd+k))(1/xy) y e xˆ y kd + k R2
( )
() (
( )
(
( ) ))
( )
In Figure 1, simulation results are presented for the case where aˆ (0) ) xˆ (0) ) 1, a(0) ) x(0) ) 0.7, cA(0) ) y(0) ) 2 mol dm-3, R ) 1 s-1, k ) 0.01 dm3 mol-1 s-1, and kd ) 0.005 dm3 mol-1 s-1. The proposed nonlinear reduced-order observer (25) is initialized at a value 42% larger than the actual initial value of the catalyst activity a(0) ) x(0). In Figure 1 the estimated aˆ ) xˆ and the actual catalyst activity a ) x are compared, illustrating the satisfactory convergence properties of the proposed reduced-order observer (25). 4.2. A Continuous-Stirred Tank Reactor with Steady-State Multiplicity. To illustrate the main aspects of the proposed observer-based monitoring scheme, a representative chemical reactor example with steady-state multiplicity is considered next. In particular, we consider an ideal continuous-stirred tank reactor (CSTR) in nonisothermal operation, where the following exothermic irreversible reaction between sodium thiosulfate and hydrogen peroxide is taking place (Vejtasa and Schmitz, 1970; Fogler, 1992):
2Na2S2O3 + 4H2O2 f Na2S3O6 + Na2SO4 + 4H2O (27) By using the capital letters A, B, C, D, and E, we denote
E -rA ) k(T)cAcB ) k0 exp c c RT A B
(
)
(28)
where k(T) is the reaction rate constant, k0 is the reaction frequency factor, E is the reaction activation energy, R is the gas constant, T is the temperature, and cA and cB, are the concentrations of species A and B, respectively. Assuming stoichiometric proportion of species A and B in the feed stream for all times, it is implied that cB(t) ) 2cA(t). Moreover, under standard assumptions, a mole balance on species A and an overall energy balance lead to the following nonlinear dynamic process model:
dcA F ) (cA,in - cA) - 2k(T)cA2 dt V dT ) dt (-∆H)R UA F k(T)cA2 (T - Tj) (29) (Tin - T) + 2 V FcP VFcP where F is the feed flow rate, V the reactor volume, cA,in the inlet concentration, Tin the inlet temperature, F the density of the reacting mixture, cP the heat capacity of the reacting mixture, U the overall heat-transfer coefficient, and A the heat-exhange area. The process parameter values that can be found in Table 1 have been obtained from the pertinent literature (Vejtasa and Schmitz, 1970). Moreover, experimental investigations in (Vejtasa and Schmitz, 1970) clearly demonstrated the multiplicity of steady states that the specific reaction system exhibits (Figure 2). An elementary stability analysis using Lyapunov’s first method implies that the upper and lower steady states are stable ones, whereas the middle one is unstable. In this case study, it will be assumed that the reactor must operate at the middle unstable steady state where cA,s ) 0.666 mol/L, Ts ) 308.489 K, and Fs ) 20 L/s. In fact, while an acceptable level of yield is maintained at the middle unstable steady state, the temperature is not considered to be excessively high or operationally hazardous (as at the upper stable steady state), in terms of causing potential safety problems or excite other unmodeled side chemical reactions. For the purpose of operating the reactor at the unstable middle steady state, a simple PI controller is used, which manipulates the inlet flow rate F, with
414
Ind. Eng. Chem. Res., Vol. 39, No. 2, 2000
Figure 2. Pattern of steady-state multiplicity.
the following state-space representation:
as well as the heat released by the reaction:
Q ) (-∆H)RVk(T)cA2
deI ) Ts - T dt F ) -Kc(Ts - T) -
Kc e τI I
(30)
where eI is the controller state and Kc and τI are the controller parameters. Therefore, the closed-loop system dynamics or the controlled process dynamics can be given by
dcA ) f1(cA,T,eI) ) dt
(
-Kc(Ts - T) -
dT ) f2(cA,T,eI) ) dt
(
V
x2 ) T s - T
(cA,in - cA) - 2k(T)cA2
-Kc(Ts - T) -
)
Kc e τI I
(Tin - T) + V (-∆H)R UA k(T)cA2 (T - Tj) 2 FcP VFcP
deI ) f3(cA,T,eI) ) Ts - T dt
(31)
where T and eI are now the measured outputs and cA is the unmeasurable process state to be accurately reconstructed by the proposed nonlinear observer. For processmonitoring purposes (as will become clear in the sequel) one would also be particularly interested in estimating both the conversion
cA,in - cA X) cA,in
Notice that both of the above quantities are directly associated with reactor safety and product quality, and therefore, their on-line estimation becomes a very important problem from a process-monitoring point of view. Finally, a simple “tuning” of the PI controller resulted in the following choice for the above parameters: Kc ) 10 and τI ) 1. For simplicity reasons, let us now define deviation variables relative to the unstable steady state of interest
x1 ) cA,s - cA
)
Kc e τI I
(33)
(32)
x 3 ) eI
(34)
and denote hfi(x1,x2,x3) ) fi(cA,s - x1,Ts - x2,eI) (i ) 1, 2, 3). According to the nonlinear observer design methodology presented in section 2, the following reduced-order observer can de designed to accurately reconstruct x1:
( (
) )
dx2 dxˆ 1 ) hf 1(xˆ 1,x2,x3) + L1(xˆ 1,x2,x3) - hf 2(xˆ 1,x2,x3) + dt dt dx3 L2(xˆ 1,x2,x3) - hf 3(xˆ 1,x2,x3) (35) dt with the state-dependent gains L1 and L2 given by
( ) ( )
L1(x1,x2,x3) ) -
∂w ∂x1
-1 ∂w
L2(x1,x2,x3) ) -
∂w ∂x1
-1 ∂w
∂x2 ∂x3
(36)
where w(x1,x2,x3) is the solution of the following first-
Ind. Eng. Chem. Res., Vol. 39, No. 2, 2000 415 Table 2. MAPLE Code MAPLE commands > readlib(mtaylor): > readlib(coeftayl): > f1:)-13.7*10∧11*exp(-9205.51/(x2+308.49))*(x1+0.67)∧2\ > +0.2*(0.33-x1)+(0.1*x2+0.1*x3)*(0.33-x1): > f2:)1.95*(10∧14*exp(-9205.51/(x2+308.49))*(x1+0.67)∧2\ > -0.005*(x2+58.49)+0.2*(-33.49-x2)+(0.1*x2+0.1*x3)*(-33.49-x2): > f3:)x2: > x10:)0: > x20:)0: > x30:)0: > a:)-3.5: > b:)1: > h:)x2: > N:)4: > w:)mtaylor(T(x1,x2,x3)-T(x10,x20,x30),[x1)x10,x2)x20,x3)x30],N): > d:){}: > q(0):){}: > for k from 1 to N-1 do > for i from 0 to k do > for j from 0 to k-i do > p[i,j,k-i-j]:)(i!*j!*(k-i-j)!)*coeftayl(w,[x1,x2,x3])[x10,x20,x30],[i,j,k-i-j]): > q(k):)q(k-1) union p[i,j,k-i-j]: > d:)d union q(k): > od: > od: > od: > pde:)mtaylor(diff(w,x1)*f1+diff(w,x2)*f2+diff(w,x3)*f3-a*w-b*h,[x1)x10,x2)x20,x3)x30],N): > c:){}: > r(0):){}: > for k from 1 to N-1 do > for i from 0 to k do > for j from 0 to k-i do > t[i,j,k-i-j]:)coeftayl(pde,[x1,x2,x3])[x10,x20,x30],[i,j,k-i-j]): > r(k):)r(k-1) union t[i,j,k-i-j]: > c:)c union r(k): > od: > od: > od: > solve(c,d); Table 3. Third-Order Taylor Polynomial Approximation of the Solution w(x1,x2,x3) of the PDE (37) for λob ) -2.5 w[3](x1,x2,x3) ) -13.8809x1 + 1.02421x2 + 1.5569x3 -5.6689x12 - 0.5035x1x2 + 2.5441x1x3 - 0.2824x2x3 -0.1231x22 - 0.4123x32 + 10.7853x13 + 0.0049x23 -0.0111x33 - 0.1744x12x2 - 7.3087x12x3 +0.1610x1x22 + 1.2022x1x32 + 0.0007x22x3 +0.0037x2x32 + 0.5636x1x2x3
w[3](x1,x2,x3) ) -5.6813x1 + 0.6184x2 + 0.6462x3 +27.6129x12 - 3.1092x1x2 - 6.3670x1x3 + 0.2423x2x3 +0.0667x22 + 0.2926x32 - 303.6250x13 - 0.0117x23 +0.056x33 + 27.1568x12x2 + 78.3665x12x3 -0.7715x1x22 - 5.2059x1x32 - 0.0263x22x3 -0.0147x2x32 - 3.1909x1x2x3
order linear singular PDE: 3
∂w
hf i(x1,x2,x3) ) λobw(x1,x2,x3) + b1x2 + b2x3 ∑ i)1 ∂x
Table 4. Third-Order Taylor Polynomial Approximation of the Solution w(x1,x2,x3) of the PDE (37) for λob ) -3.5
(37)
i
λob is the observer eigenvalue which directly influences the rate of convergence of the state estimate xˆ 1 to the actual unmeasurable state x1, and b1 and b2 design parameters that are kept fixed throughout the ensuing simulation studies, b1 ) 1 and b2 ) 0. A series solution of the above PDE (37) is sought around the equilibrium point (steady state) of interest (x1,x2,x3) ) (0,0,0). The Taylor coefficients of the unknown solution w(x1,x2,x3) can be automatically computed by using a simple MAPLE code (Table 2). Tables 3 and 4 contain the third-order Taylor polynomial approximation w[3](x1,x2,x3) of the actual solution w(x1,x2,x3) of the PDE (37) for an observer eigenvalue λob ) -2.5 and λob ) -3.5, respectively. Figures 3-6 show the response of the closed-loop system and the convergence properties of the proposed observer (35) to a perturbation in the process away from
the steady-state conditions. In these simulations, the reactor temperature T was perturbed by 2 °C and the concentration cA was increased by 0.2 mol/L. In Figure 3, the satisfactory convergence properties of the proposed observer (35) are depicted, as the state estimate approaches the actual process state for observer eigenvalues of λob ) -2.5 and λob ) -3.5. The second part of Figure 3 shows the convergence properties of the proposed nonlinear observer (35) in the presence of noise in the process and the sensor. In particular, white noise was added to the following variables with the corresponding standard deviations: cA,in-0.05 mol/L, Tin0.1 °C, Tj-0.1 °C, and the temperature measurement signal T, 0.1 °C. Figure 3 demonstrates the effect of the choice of the observer eigenvalue on the speed of convergence and shows that the process controller and observer are reasonably tuned in the presence of process noise. In Figure 4 the transformed z state is graphically presented, where the effect of the choice of the observer eigenvalue on the speed of convergence becomes more transparent, in accordance with the proposed design method. In Figure 5 additional simulation results are provided, where white noise with a larger standard
416
Ind. Eng. Chem. Res., Vol. 39, No. 2, 2000
Figure 5. Effect of the observer eigenvalue λob on the proposed observer’s convergence properties with higher level noise on the output measurement signal.
Figure 3. Effect of the observer eigenvalue λob on the proposed observer’s convergence properties.
Figure 4. Effect of the observer eigenvalue λob on the proposed observer’s convergence properties using the transformed z state.
Figure 6. Comparison of the convergence properties of the nonlinear observer with the linear observer (λob ) -3.5).
deviation is considered for the temperature measurement signal (T-0.2 °C), while the same level of white noise is retained for the process parameters as those in Figure 3. The simulation results obtained show the satisfactory convergence properties of the proposed observer for the cases considered. However, larger in magnitude observer eigenvalues might adversely affect the observer’s performance, especially under conditions
where the sensor noise “dominates” the one associated with the process model. The proposed nonlinear observer is also compared to a linear observer with eigenvalue λob ) -3.5 in Figure 6. The same perturbations and noise levels are used as those in Figure 3. The nonlinear observer clearly converges to the true state quicker and with less overshoot than the linear observer. In Figure 7 both the state estimate and the
Ind. Eng. Chem. Res., Vol. 39, No. 2, 2000 417
Figure 8. Reactor temperature profile.
Figure 7. State estimates in the presence of modeling error in the inlet concentration cA,in.
actual state are depicted when model uncertainty is introduced in the value of one of the process parameters such as the inlet concentration. Under these conditions and as in any other observer design method, an offset between the state estimate and the actual state will inevitably occur, one that can also be viewed as a measure of model inaccuracy from a process-monitoring point of view (Patton et al., 1989). Notice that the effect of such an offset can be eliminated once the proposed observer is incorporated into an output feedback control structure with integral action. In the case considered, the measured output variable T is brought back to the original steady state because the presence of the PI controller (Figure 7). A somewhat more realistic simulation of process operation is given in Figures 8-11. In Figure 8 the temperature deviation from steady state is shown over a period of time. With the noise on the process and the controller in operation, it is not clear from this signal that anything in the process has changed at all. The flow rate F, which is the output of the controller, is shown in Figure 9. From this signal it is clear that something has happened to the process. The controller needed to increase the flow rate F by more than 40% from its initial steady-state value to keep the temperature under control. Later, the flow rate returned to the desirable steady-state value. Notice that it would be particularly difficult to determine the impact of this disturbance on process safety and product quality from
Figure 9. PI controller output-flow rate profile.
Figure 10. Heat released by the reaction estimate.
these signals alone. However, using the proposed nonlinear observer, the state cA can be estimated on-line and quantities that are more directly related to process safety and product quality, such as conversion and heat released by the reaction, can be calculated. In Figure 10, the heat released by the reaction is calculated from the on-line estimate of cA offered by the proposed reduced-order observer (35). For comparison purposes, the true heat generation rate is also shown in Figure
418
Ind. Eng. Chem. Res., Vol. 39, No. 2, 2000
Literature Cited
Figure 11. Conversion estimate.
10. Having this quantity available on-line where it could be compared to a known maximum heat removal rate of the reactor’s cooling system would be an immediate indication of whether the process was approaching safety constraints. It would therefore be possible to detect such problems earlier before a serious and possibly hazardous condition arises. The overall conversion is also calculated from the same on-line estimate of cA, as shown in Figure 11. Notice that depending on the product specifications for this process, this could be a good measure of resulting product quality. Furthermore, it could also be a direct indication of disturbances which are headed to processes that are located further downstream. As a final comment, notice that the actual disturbance shown in Figures 8-11 is a pulse change in cA,in of magnitude 0.05 mol/L. For many processes, this is the type of disturbance that could not be detected prior to its entry in the reactor. Without an observer, the only information available to operations personnel would be Figures 8 and 9. But through the use of the proposed nonlinear observer, much improved information is available on-line, for both operations personnel as well as automated response systems. 5. Conclusions A new nonlinear observer design framework for process monitoring was presented. In the design of a model-based nonlinear observer that directly utilizes the available information coming from the process output measurements, the objective was to accurately monitor key process variables that are directly associated with process safety or product quality. The nonlinear observer possesses a state-dependent gain which is computed from the solution of a system of first-order linear partial differential equations (PDEs). Depending on whether the process operates in continuous or batch mode, a different mathematical treatment and solution scheme for the system of PDEs is needed. Within the proposed design framework, both full-order and reducedorder observers were studied. Finally, the performance of the proposed observer design method was evaluated in a catalytic batch reactor as well as an exothermic CSTR example, and its satisfactory convergence properties were demonstrated through simulation studies. Acknowledgment Financial support from the National Science Foundation through the Grant CTS-9403432 is gratefully acknowledged by the first two authors.
(1) Adebekun, D. K.; Schork, F. J. Continuous Solution Polymerization Reactor Control. 2. Estimation and Nonlinear Reference Control during Methyl Methacrylate Polymerization. Ind. Eng. Chem. Res. 1989, 28, 1846. (2) Appelhaus, P.; Engell, S. Extended Observers for the Polymerization of Poly Ethylene Terephthalate. Proceedings of the IFAC World Congress, San Francisco, CA, 1996; p 175. (3) Bastin, G.; Dochain, D. Online Estimation and Adaptive Control of Bioreactors; Elsevier: New York, 1990. (4) Bestle, D.; Zeitz, M. Canonical Form Observer Design for Nonlinear Time Variable Systems. Int. J. Control 1983, 38, 419. (5) Chen, C. T. Linear System Theory and Design; Holt, Rinehart and Winston: New York, 1984. (6) Ciccarela, G.; Dalla Mora, M.; Germani, A. A Luenbergerlike Observer for Nonlinear Systems. Int. J. Control 1993, 57, 537. (7) Courant, R.; Hilbert, D. Methods of Mathematical Physics, Volume II; John Wiley & Sons: New York, 1962. (8) Ding, X.; Frank, P.; Guo, L. Nonlinear Observer Design via an Extended Observer Canonical Form. Syst. Control. Lett. 1990, 15, 313. (9) Dochain, D.; Perrier, M.; Ydstie, B. E. Asymptotic Observers for Stirred Tank Reactors. Chem. Eng. Sci. 1992, 47, 4167. (10) Doyle, F. J., III. Nonlinear Inferential Control for Process Applications. J. Process. Control. 1998, 8, 339. (11) Fogler, H. S. Elements of Chemical Reaction Engineering; Prentice Hall: Englewood Cliffs, NJ, 1992. (12) Gauthier, J. P.; Hammouri, H.; Othman, S. A Simple Observer for Nonlinear Systems: Applications to Bioreactors. IEEE Trans. Automat. Control. 1992, 37, 875. (13) Gelb, A. Applied Optimal Estimation; MIT Press: Cambridge, MA, 1974. (14) Gibon-Fargeot, A. M.; Hammouri, H.; Celle, F. Nonlinear Observers for Chemical Reactors. Chem. Eng. Sci. 1994, 49, 2287. (15) Isidori, A. Nonlinear Control Systems; Springer-Verlag: Berlin, Germany, 1989. (16) Kantor, J. C. A Finite Dimensional Nonlinear Observer for an Exothermic Stirred-Tank Reactor. Chem. Eng. Sci. 1989, 44, 1503. (17) Kazantzis, N. Lie and Lyapunov Methods in the Analysis and Synthesis of Nonlinear Process Control Systems. Ph.D. Thesis, The University of Michigan, Michigan, 1997. (18) Kazantzis, N.; Kravaris, C. Nonlinear Observer Design Using Lyapunov’s Auxiliary Theorem. System Control Lett. 1998, 34, 241. Kazantzis, N.; Kravaris, C. Proceedings, 36th IEEE Conference on Decision and Control, San Diego, CA, 1997; p. 4802. (19) Kim, K. J.; Choi, K. Y. On-line Estimation and Control of a Continuous Stirred Tank Polymerization Reactor. J. Process Control 1991, 1, 96. (20) Kozub, D.; MacGregor, J. F. State Estimation for Semibatch Polymerization Reactors. Chem. Eng. Sci. 1992, 47, 1047. (21) Krener, A. J.; Isidori, A. Linearization by Output Injection and Nonlinear Observers. System. Control. Lett. 1983, 3, 47. (22) Krener, A. J.; Respondek, W. Nonlinear Observers with Linearizable Error Dynamics. SIAM J. Control Optim. 1985, 23, 197. (23) Kurtz, M. J.; Henson, M. A. State and Disturbance Estimation for Nonlinear Systems Affine in the Unmeasured Variables. Comput. Chem. Eng. 1998, 22, 1441. (24) Luenberger, D. G. Observing the State of a Linear System. IEEE Trans. Milit. Electron. 1963, 8, 74. (25) Lyapunov, A. M. The General Problem of the Stability of Motion. Lyapunov Centenary Issue, Int. J. Control. 1992 (English Translation), 55, 521. (26) Ogunnaike, B. A. On-line Modeling and Predictive Control of an Industrial Terpolymerization Reactor. Int. J. Control 1994, 59, 711. (27) Patton, R. J.; Frank, P. M.; Clark, R. N. Fault Diagnosis in Dynamic Systems: Theory and Applications; Prentice Hall: Englewood Cliffs, NJ, 1989. (28) Quintero-Marmol, E.; Luyben, W. L.; Georgakis, C. Application of an Extended Luenberger Observer to the Control of Multicomponent Batch Distillation. Ind. Eng. Chem. Res. 1991, 30, 1870. (29) Robertson, D. G.; Kesavan, P.; Lee, J. H. Detection and Estimation of Randomly Occurring Deterministic Disturbances. Proceedings, ACC, Seattle, WA, 1995; p 4453.
Ind. Eng. Chem. Res., Vol. 39, No. 2, 2000 419 (30) Soroush, M. Nonlinear State-Observer Design with Application to Reactors. Chem. Eng. Sci. 1997, 52, 387. (31) Soroush, M. State and Parameter Estimations and Their Applications in Process Control. Comput. Chem. Eng. 1998, 23, 229. (32) Tatiraju, S.; Soroush, M. Nonlinear State Estimation in a Polymerization Reactor. Ind. Eng. Chem. Res. 1997, 36, 2679. (33) Tsinias, J. Observer Design for Nonlinear Systems. System Control Lett. 1989, 13, 135. (34) Tsinias, J. Further Results on the Observer Design Problem. System Control Lett. 1990, 14, 411. (35) Valluri, S.; Soroush, M. Nonlinear State Estimation in the Presence of Multiple Steady States. Ind. Eng. Chem. Res. 1996, 35, 2645.
(36) Vejtasa, S. A.; Schmitz, R. A. An Experimental Study of Steady-State Multiplicity and Stability in an Adiabatic Stirred Reactor. AIChE J. 1970, 3, 410. (37) Xia, X.; Gao, W. Nonlinear Observer Design by Observer Error Linearization. SIAM J. Control Optim. 1989, 27, 199. (38) Zeitz, M. The Extended Luenberger Observer for Nonlinear Systems. System Control Lett. 1987, 9, 149.
Received for review May 5, 1999 Revised manuscript received September 30, 1999 Accepted October 13, 1999 IE990321N