Application of Extended Kalman Filters

download Application of Extended Kalman Filters

of 11

Transcript of Application of Extended Kalman Filters

  • 7/28/2019 Application of Extended Kalman Filters

    1/11

    898 Ind. Eng. Chem. Res. 1991, 30,898-908Fault Detection and Diagnosis in a Closed-Loop Nonlinear DistillationProcess: Application of Extended Kalman Filters

    Ruokang L i and J onH. Olson*Department of Chemical Engineering, University of Delaware, N ewark, Delaware 19716A strategy for faul t detection and diagnosis in a closed-loop nonlinear system is described. Anextended K alman fi lter (EKF) s applied inside the control loop. T he EK F recovers informationfrom noisy measurement signals, providing estimates of state variables and unknown parametersof the process. Thestate estimates produced by theEKF are the inputs to the controller. Sincethe noise in the measurements is reduced significantly, the control quality is much better than thatachieved with application of exponential fi lters. The estimates of unknownprocess parameters, wherethe deviations from normal values are considered faults, are the basis to make alarm decisions. TheEK F successfully tracks and distinguishes faults occurring simultaneously. T he influences ofcorrelated noises, a special issue of estimation in closed-loop systems, model errors, and numberof measurements have been studied. The proposed strategy is applied to a 30-stage binary distillationcolumn with a partial condenser and a reboiler. The simulation results are presented to show theeffectiveness of the approach.

    1. IntroductionFault detection and diagnosis are receiving substantialtechnical interest as a method for increasing reliability andsafety in chemical plants. A fault implies a certain deg-radation of performanceor some type of process deviation.Failure, on the other hand, referstocomplete inoperabili tyof equipment or the process. Faults can occur in theprocess, the sensors, the actuators, and the controllers andmay lead to failure of the whole process. The task of faultdetection is to determine the existence of faults in thesystems, while that of fault diagnosis is to find the rootcauses of the faults. In most plants, fault detection anddiagnosis are left to the process operators. With the in-creasing complexity of plants and the growing popularityof computers, it is desirable and feasible to utilize com-puter-based fault detection and diagnosis.Past efforts of fault detection and diagnosis can be di-

    vided into two categories: qualitative and quantitativeapproaches. The qualitative approaches involve fault trees(L ees, 1983), signed directed graph (K ramer and Palowitch,1987), unctional decomposition (Finch and Kramer, 1988),fuzzy logic (Vaija, 1985), neural networks (V enkatasu-bramanian and Chan, 1989),and expert systems (Dhurjatiet al., 1987). The quantitative approaches are basicallymodeling, filtering, and estimation methods. A wide va-riety of methods and applications have been reviewed byWillsky (1976), sermann (1984),and Himmelblau (1986).The quantitative approaches include state and parameterestimation, generalized likelihood ratio, x 2 test, and otherprobability ratios (e.g., Narasimhan and M ah, 1988), andanalytical redundancy (Tylee, 1983).Many estimation techniques are available (L jung, 1987;Sinha and Kuszta, 1983; Willsky, 1976; Isermann, 1984),and a special issueof Automatica (Vol. 17, J anuary 1981)focused on estimation. Two of the most frequently usedmethods are the Kalman filter and the extended K almanfi lter (E K F) (Gelb, 1974; Catlin, 1989). Though notguaranteed to converge in nonlinear filtering problems(Y oshimura et al., 1980), the EK F has been found toyieldaccurate estimates in a number of important practicalapplications. Some examples in the chemical engineeringarea follow. Park and Himmelblau (1983) appliedanEK Fto detect and diagnose faults in a CSTR coupled with aheat exchanger. Dalle Molle and Himmelblau (1987) also

    *Author to whom correspondence should beaddressed.0888-5885/91/2630-0898~02.50/0

    applied an EK F in a single-stage evaporator and showedhow to adjust the tuning parameters in the filter. Wa-tanabe and Himmelblau (1983a,b,1984) proposed a two-level identification strategy for fault detection and diag-nosis of a chemical reactor. The states were reconstructedby an observer, and then parameters were estimated byan EK F. The process models they used were nonlinearbut had some restriction in the form. I t was claimed thatthis two-level strategy gave more accurate estimates thana straightforward usage of an EK F. Morari and Stepha-nopoulos (1980) demonstrated the superiorityof a K almanfilter employing a nonstationary noise model to representpersistent disturbances commonly occurring in the chem-ical engineering environment. Their method can onlydetect the existence of faults but cannot discriminatedif ferent sources of faults. Nonlinear and adaptive Kal-man filter was used to estimate catalyst activity andheat-transfer coefficient for a tubular reactor assumed inpseudosteady state (Rutzler, 1987). Recently Griffin etal. (1988) presented an example of industrial use of aKalman filter on a reagent analyzer. It should be pointedout that all the systems mentioned in this paragraph areopen-loop systems.Most chemical engineering processes operate as a partof a control configuration, and the control action willcorrect small changes of the states caused by faults. Hencethe changes of some output variables may not be notice-able. Though there are a few papers dealing with closed-loop systems, i t is not clear whether fault detection anddiagnosis can be successfully performed based on closed-loop performance. Hamilton et al. (1973) applied theK alman fil ter for state estimation in a closed-loop pilotplant evaporator. The filter estimates were sensitive tounmeasured process disturbances (faults), since they werenot accounted for by the linear process model. Gilles(1986) used the EK F to estimate unmeasured states inseveral closed-loop systems, including a fixed-bed reactor,a polymerization reactor, and an extractive distillationcolumn. The experiments were successful except for abiased estimate (see Figure 32 of his paper).The purpose of this work is to evaluate the effectivenessof the EK F for fault detection and diagnosis in closed-loopsystems. A distillation column is used to illustrate theprocedure. The following questions are to be investigated1. What is the structure of the whole system?2. Is the colored noise important to the performance ofthe filter?

    0 1991American Chemical Society

  • 7/28/2019 Application of Extended Kalman Filters

    2/11

    Ind. Eng. Chem. Res., Vol. 30, No. 5, 1991 899

    II

    Table I . Summary of T est Pr oblem of a DistillationColumn

    k D lI Top-Comp. I

    I I

    number of componentsrelative volatility ( a)feed composition (X, )feed enthalpy ( q )feed rate ( F)reflux ratiodistil late/feed ratiocondenserrectification traysstripping traysreboilerholdupscondensereach trayreboilercompositiondistillate ( XD)bottom product (X, )

    dController

    21.60.5-0.550.5-0.624.0 kmol/h- 4-0.5equilibrium1515equilibrium0.50 kmol0.25kmol1.00 kmol0.960. 05

    3. What is the impact of modeling errors?4. How many measurements are needed?The strategy for fault detection and diagnosis in theclosed-loop system is described in section 2. The processmodels and dynamic analysis of accuracy of the modelsare presented in section 3. In section 4, the implementa-tion of E K F is briefly described. Simulation results insection 5 show that two faults occurring simultaneouslyin the closed-loop system can be successfully detected anddiagnosed and that reduction of measurement noise by thefi lter leads to better process control. Finally, the conclu-sions from this work are presented in section 6.2. Strategy of F aul t Detection and ProcessControl

    A binary distil lation columnused byStewartet al. (1985)and Benallou et al. (1986) is chosen in our study. Thissystem, involving a rectification module, a strippingmodule, a condenser, and a reboiler, islisted in Table I.Figure 1shows the basic idea of applying the EK F tofault detection and diagnosis as well as process control inthe closed-loop distil lation process. The functions of everyblock are briefly presented below.The full-order model attempts to simulate the actualdynamic behavior of the binary distillation process. T hetotal order of the model is32. Perfect level control and100% tray efficiency are assumed, and tray hydraulics andenergy dynamics are neglected. The feed rate, F, is as-sumed known or measurable. The faults, or disturbances,are abrupt changes in the feed composition, X F , nd thefeed enthalpy, q. They were chosen for clarity and easeof implementation. The ratio of distil late rate to vaporrate in the rectification section, D/VR, and the ratio ofvapor rate in the stripping section to the bottom-productflow, Vs/B,are two manipulated variables controlled bytwo composition controllers. Four or five states (dependingon the order of the reduced model used in the EK F) of the32-order model, compositions of the distillate, the bottomproduct, and two or three stages in between are definedas a vector X. The measurement variable, Z, is part orwhole of X plus measurement noise, v.Z and the control signalsD/ VRand Vs/Bare the inputsto the EK F. The process model in the fi lter is a re-duced-order model which attempts to represent the be-havior of X. Using the process model, the EK F recoversthe information provided by Z, D/VR, and Vs/B. Thefilter serves two purposes-estimation of unknown time-variant parameters, the feed composition X F and the en-thalpy 6, and furnishing the controllers with more preciseinformation about the composition of distillate XDand

    ControllerDNR

    ExtendedKalman Filter

    xs II I Ivs/B 1 I Bottom-Comp. I I

  • 7/28/2019 Application of Extended Kalman Filters

    3/11

    900 Ind. Eng. Chem. Res., Vol. 30, No. 5, 1991

    -5 -4 -3 -20

    -5 -4 -3 - 2log 10 rad&--igure2. Bode diagram of transfer functions XD/ (D/VR) for thefourth and fifth compartmental and full order models.by Horton et al. (1986), and experimentally evaluated byK umar et al. (1985). This modeling approach describesthe dynamics of astaged separation process with fewerdifferential equations than does the stage-to-stage model.This low-order modeling technique was chosen because ithas some attractive features that are required by faultdetection and diagnosis. They are as follows:1. I t is guaranteed that the steady-state of this modelis identical with the full-order model.2. All the state variables and parameters are physicallysignificant.Besides the assumptions made in the full-order model,further postulations are made:1. All the stages including condenser and reboiler canbe arbitrarily grouped into a number of compartments.2. T he dynamic behavior of a compartment can berepresented by that of one of its stages, the sensitive stage,with the holdup of this compartment equal to the sum ofholdup of individual stages in this compartment.3. The composition of inlets and outlets of a compart-ment can be related to the sensitive stage and the top orbottom compositions via steady-state balances. This re-lationship is defined as separation functions.The selection of the order of the compartmental modelisa trade-off between accuracy and computation load. Thehigher the order, the more accurate the model but theheavier the computation load. A fourth- and a modifiedfifth-order (for simplicity, it is called fifth-order in theremainder of this work) models, tested by Benallou et al.(1986) and Horton et al. (1986) separately, are considered.Table 11shows the parameters of these models. Thesensitive stages of the first and the last compartments arethe condenser and the reboiler, respectively.Thus the reduced-order distillation model is describedby the nonlinear differential equation (see Appendix fordetails) x =f(X@,U) (1)

    Table 11. Stage Numbers (from Top Down) and theSensitive Stage (in Parentheses) of the CompartmentalM odelsfourth order fifth order

    compartment 1 1 (1) 1-3 (1)compartment 2 2-16 (9) 4-16 (9)compartment 3 17-31 (24) 17-22 (21)compartment 4 32 (32) 23-29 (27)compartment 5 30-32 (32)where the vector X of length 4 or 5 is the compositions ofthe compartment sensitive stages. The feed compositionXF and the feed enthalpy q are the unmeasurable faultparameters e=(XF,q)T (2)

    u = (D/VR,Vs/mT (3)The input variables are the output of the controllersThe object of the rest of this section is to investigate themodeling error of the fourth and the fi fth models withrespect to the full-order model and select an appropriateone. First the nonlinear model, ( l ), s linearized, and thenthe analysis is applied both in frequency domain and intime domain. This analysis is inspired by the work ofBonvin et al. (1989) and De Vall iere and Bonvin (1989),who used the techniques to validate accuracy of a calo-rimeter model and todetermine the sensitivity frequencyregion for estimation.L inearizing the distil lation model (1)yields

    X =AX +BU +De (4)where the superscript denotes the changeinthe variablefrom the linearization point, and the constant matricesA,B, andDare evaluated at the linearization point.The frequency response of the transfer function =(D/VR) s shown in Figure 2. (T he Bode diagrams ofother functions have similar results andare omitted here.)Both the fourth and the fifth models areingood agreementat low frequencies with the full-order model, which showsthe preservation of steady state by the compartmentalmodel. The ampli tude ratio (AR) of the compartmentalmodels diverges from the full-order model at frequency 7X lo4 rad/s (Figure 2a), and the phase shif t diverges at2 X rad/s (Figure 2b). Hence the compartmentalmodels are accurate up tofrequency of 2 X 1V rad/s. Forthe purpose of controller specification, this accuracy is notsufficient. However, in fault detection and diagnosis, thisaccuracy may be acceptable since the fault model used inestimation is relatively slow (see the next section). Whenthe frequency is larger than 2 X rad/s, the absolutevalueof phase shift for the reduced models is smaller thanthat for the full model. Consequently, a lead in the es-timation is anticipated. I t is expected that as the orderof the model increases, the frequency-response curveswllapproach to the full-order model.The eigenvalues of matrix A serve as another cri terionof the system dynamics. Table I11 listsal l the eigenvaluesof the reduced-order models and part of the eigenvaluesof the full-order model that are larger than -0.0500. Theomitted eigenvalues of the full-order model are in between-0.2693 and -0.0579. From T able 111, one can see that,except for two eigenvalues of the fif th-order model thatare located near the real axis,all the eigenvalues are real.Sinceal the eigenvalues are on the left side of the s-plane,the reduced models as well as the full model are stable.The largest eigenvalue of the full model is -0.0003, cor-respondingtothe time constant of the distillation column.

  • 7/28/2019 Application of Extended Kalman Filters

    4/11

    Ind. Eng. Chem. Res., Vol. 30, No. 5, 1991 901Examination of the linearized full-order model alsoshows that, if the linearized model represents the processcorrectly, the distillation process is controllable and ob-servable.In this section we have examined the model errors infrequency domain and time domain and found that thefifth model is superiortothe fourth in that the former doesnot have inverse response and the latter does. Unlessindicated otherwise, the fifth-order model is used as theprocess model in EK F in the remainder of this paper.

    4. Extended K alman Filtersummarized and its features are discussed.In this section the EK F algorithm (Gelb, 1974) s brieflyThe stochastic partner of (1) sx =f(x,e,u)+w (5)wherew is a white noise with covariance matrix Q. TheEK F attempts to estimate the stateX from the sampledmeasurements of the form

    =hk(X(tk))+Vk, k =1,2, ... (6)where v k s a white noise with covariance matrix, Rk, and,in our problem, hk s a linear function. Equations 5 and6 represent a nonlinear estimation problem where theprocess is continuous and the measurement is discrete.The process model in our work takes the form as sameas (5)and (6) except that parameters 0 first are assumedknown (this assumption will be released later). For sim-plicity, (5) is rewritten as follows:

    (7)It is assuqed that the measurement Zk-l and the cor-responding X(tk-,) have been obtained. The recursivealgorithm of the filter involves two phases:1. Propagation of stateestimation and error covariance.Integration of (8) and (9) in the sampling interval timesI t

  • 7/28/2019 Application of Extended Kalman Filters

    5/11

    902 Ind. Eng. Chem. Res., Vol. 30, No. 5, 1991components involved in the fault information. Since thenature of the time variation of fault parameters cannot beknown exactly, it is usually assumed that the time devia-tion of unknown parameters changes more slowly than thesystem and is driven by random noiseThen the statesX and parameters 8 are combined intoan augmented-state vector, and hence the EK F can beapplied to estimate both the state variables and unknownparameters.In this work, the noise covariance matrices Q andRk,the measure of uncertainty in the model and measure-ments, were assumed diagonal and were properly adjustedvia simulations.5. Results and DiscussionsThis section investigates the impact of colored noise,compares two different designs for the EKF,examines theeffects of model mismatch, and determines the trade-offfor reducing the number of input sensors for the system.5.1. Colored Noise. In this subsection the concept ofthe whiteness of noise is briefly introduced, the reason whythe noise becomes colored in closed-loop systems is ex-plained, and the simulation results are presented.

    White noise is defined as a random process with a meanof zero and with constant power spectral density (Fried-land, 1986). Though only a theoretical abstraction, theconcept of whitenoise has provedto bevery useful inmanyapplications. The correlated noise is called colored. TheWhitenessof a stationary random discrete series ( [ (k ) ,k =0,f l , 2, ...Iwith mean,m, s measured quantitativelyby the normalized autocorrelation function

    e(t)=w&t) (15)

    1 Nlim - - C [ f ( k+ l ) -m][ [(l )m]lim -X [ [ (k+ l ) - m][[(k+l) m]

    N--.. N1~1 (16)1 Nr,(k) =N--

    When r,(k,k#O) from-1 to1. r,(O alwaysequals1.Whenr, (k,k#O) is 0,[ s totally uncorrelated, or white. WhenI r,(k,k#O)l is 1,[ s totally correlated. When I r,(k,kfO)lis in between 0 and 1, 6 is somewhat correlated. If N in(16) is sufficiently large instead of infinity, the estimateof r,(k),?,(k), s obtained.The appearance of colored noise is one of the problemsof identification in a closed-loop system. In open-loopsystems the assumption of white noise isusually valid. I nfact whiteness of the innovation, the difference betweenan observed output and the predicted output based on thesystem model and previous observations, s even one of thetypical tests to determine the existence of faults (H im-melblau, 1986; Narasimhan and Mah,1988). In closed-loopsystems, the input noise to the filter is the combinationof the measurement noise, which may be white, and thesystem noise caused by the noise in the control signalwhich, in turn, is affected by the input noise of the filter.Thus the input noise of the filter becomes somewhatcolorful. For example, when in Figure 1 he measure-ment noise, v, is white at a noise level of 0.01, which isdefined as the ratio of the standard deviation of noise tothe expectation value of measurement, the whiteness ofthe filter input, Z, becomes about 0.5due to the feedbackof the control signal.In the model of EK F, (5)and (61, i t is assumed that theprocess noise, w, and the measurement noise, vk, areperfectly white. If the noises are nonwhite (colored), theyare usually modeled as output of a linear filter driven bywhite noise. This either leads to the requirement of

    t Controller +

    (a) Exponentia Filter+EKF1 measurement noiseProcess

    Controller-2knowledge of the fi lter or anadditional computation loadwhen the state vectors are augmented with the noisevariables (Sorenson, 1985).In order to investigate the effect of the whiteness of thenoise on the behavior of the filter, the two control loopswere removed and the measurement noise level was keptconstant (0.01). The EK F had four measurements, i.e., thecompositions of stages1 distillate), 9,27, and 32 (bottomproduct). The disturbances (faults), occurring simulta-neously, are a step change in the feed composition from0.50to0.55at time 100oOsand a ramp change in the feedenthalpy from 0.5to 0.6 during the time interval 10000-12OOO s. Unless indicated otherwise, the noise level (0.01),the four measurements, and the faults just specified areused in the remainder of this work. Two simulations fordifferent noises were examined, the first being perfectlywhite and the whiteness (r,) of the second being 0.5,whichwas obtained by passing white noise through an expo-nential fi lter. The differences of the estimation resultsbetween the two simulations are so small it isnot necessaryto show them here.Because of the minimal effects of the colored noise onfilter performance, which is in agreement with the obser-vation by L itchfield et al. (1979) and by Goldmann andSargent (19711, in the following tests no special measuresare taken to deal with them.

    5.2. Reductionof Measurement Noise. This sub-section presents two ways of using the EK F, i.e., EK Foutside or inside the control loop. Then the stabil ity anddynamics of the later system are discussed. Finally theperformance of the two systems is compared.The first design, called structure A and shown on Figure3a, places the EK F outside the control looptomonitor theunknown process parameters. This system also uses anexponential filter in the control loop to reduce the effectof sensor and system noise on the control system and theestimator. One of the key difficulties in using the EK Fis that the filter may beunstable (see the following stabilityanalysis). However, structure A excludes the possibleunstability from the control loop. This is the reason whythe EK F is not used in the feedback loop even though i t

  • 7/28/2019 Application of Extended Kalman Filters

    6/11

    Ind. Eng. Chem. Res., Vol. 30, No. 5, 1991 903

    00.93 . ,

    is already in the system. The exponential filter equationisi(k+1) =@Z(k+l)+ (1 - P ) i ( k ) (17)

    where2 and2are the measurement and the estimatedvalue, respectively, and /3 is a weighting constant normallyassigned a value between zero and one. A lower value of/3 increases the filtering function but also increases thephase lag introduced by the fi lter. Hence choosing thefilter constant involves a trade-off between noisetransmitted and dynamic lag introduced. In this work0is chosen as 0.5.An alternative, the one emphasized in this work, placesthe EK F in the control loop. This system is structure Bon Figure3b. The EK F inside the control loop providesthe controllers with information of the control variablesas well as estimation of unknown parameters. The issueof the combined stabil ity and dynamics of the wholesystemwill bediscussed before comparing the performanceof the two systems.The stability of the control system of the configurationas shown in Figure3bcan be determined by the separationtheorem (Safonov,1980). The separation theorem showsthat nondivergent estimates can, unconditionally, besubstituted for true values in otherwise stable feedbacksystems without ever causing instabil ity. In other words,stable output feedback controllers can be designed, evenfor nonlinear multiloop feedback systems, by designingseparately (1) a stable state feedback controller and (2)a nondivergent fi lter. Safonov further proves that thestability and the nondivergence can be ensured if the thegain of the EK F is constant and the EK F incorporates anaccurate internal model of the nonlinear process dynamics.Though there are always modeling errors in practice andthe convergence of the EK F cannot be guaranteed(Y oshimura et al., 1980),the separation theorem does giveus some guidelines: the controller and the fi lter do notinteract with each other in terms of stabil ity and thereforethese components can be designed separately.

    Because of the nonlinearity of the plant and the fi lterand the time-variant gain matrix of the filter, the analysisof the dynamics of the closed-loop system is difficult.Some approximation must be made. If it is assumed thatthe dynamics of EK F can be represented by the dynamicsof the linear, constant-gain K alman filter, the results ofthe linear quadratic Gaussian (LQG; see Astrom andWittenmark, 1984) control can be used in analyzing theproperties of the closed-loop system.The LQG consists of two parts: one linear Kalman filter,which gives estimates from the measurements, and onelinear-feedback law from the estimated states. The designof LQG is based on the discretized linear model:X(k+l) =@X(k)+ l'U(k) +w(k) (18)

    Z(k) =CX(k) +v(k) (19)The dynamics of the closed-loop system are determinedby the matrix

    . .0.48

    (20)whereL is the control law. The eigenvalues of M are theeigenvalues of the matrices @ - 'L and @ - K C. Noticethat the eigenvalues of @ - 'L are the desired closed-looppoles obtained by designing the controller without con-sidering the Kalman filter and the eigenvalues of @ - KCare the poles of the filter. In other words, the controllerand the K alman fi lter can be designed separately. Thepoles of the resulting system are simply the poles of the

    Top C omposition Feed Composition0.99, , 0.56,

    0. 95p0 oo "8 oo o o 0 1 0 . 5 0 p0 . 9 3 1 . 1

    5 10 15 20 5 10 15 20( b) (d )

    Time ( ks) Time ( k s)

    Figure 4. Effect of structuresA and B on quality of control andestimation: the true, measured, and estimated values of the topcomposition for (a) structure A and (b) structureB and the true andestimated valuesof the feed composition for (C) tructure A and (d)structureB. -, true value; + estimated by the exponential filter;X, estimated by the EKF; 0,measured.closed-loop poles assigned by designing the controller andthe poles of the filter. The controllers have been designedthrough pole-placement method. The poles are placed at0.75 f 0.31i on the z-plane. If i t is assumed that thedynamics of EK F can be represented by the dynamics ofthe linear K alman fil ter and that the gain matrix is fixed,the poles of the EK F can then be obtained. The eigen-values of @ - K C are0.0075,0.0202,0.2689,and 0.1338f0.2223i. Thusall poles of M are inside the unit circle, andthe closed-loop system is stable. Further, all the poles arein the region that corresponds to modes with sufficientdamping ( ktrom and Wittenmark, 1984) and the dynam-ics of the whole system are adequate. These results area specific example of the separation theorem.Having established the details of the two configurations,the effectiveness of the design was compared by simulation.A portion of these results are given on Figure 4. Theupper row is for structureA, and the lower is for structureB. The left column is the distil late composition, one ofthe controlled variables. The right column is for feedcomposition, one of the estimated forcing functions. Inboth systems the EK F's were tuned properly.Figure 4a shows the behavior of the distillate whenstructure A was used. Three items are shown on thisgraph, the true signal as a heavy line, the measurementincluding noise, and the output of the exponential filter,which is the input to the controller and to the EK F esti-mator. The figure shows that the overhead compositionmeanders about the 0.96 set point. Figure 4b parallelsFigure 4a in structure except that the EK F was used inthe control loops both as a noise fi lter and as an estimator.I t shows that the feed disturbances produce a small blipin the overhead composition. Structure B follows thischange very closely even though the raw signal (open dots)shows no structure. There is a large reduction in thestandard deviation of the signal as well. Using the EK Fthe noise is reduced by 50 times, compared to 1.7 timesusing the exponential fi lter. Better estimation leads tobetter process control. Comparison of (a) and (b) of Figure4 indicates a substantial improvement in the system whenthe EK F is included in the control loop. The standard

  • 7/28/2019 Application of Extended Kalman Filters

    7/11

    904 Ind. Eng. Chem. Res., Vol. 30, No. 5, 1991deviation of the true value of the top composition by usingthe EK F is almost zero (O oooO), comparedto0.0040 usingthe exponential filter. Placing the K h a n ilter inside thecontrol loop clearly leads to better control. Comparisonof the bottom behavior gives the same conclusion and isomitted here.Figure 4c,d shows the disturbance of feed compositionand its estimate by EK F. Comparison of these figuresreveals a vast improvement in the tracking of the dis-turbances and a large reduction in the background noisewhen structure B is used. The standard deviation of theestimate in structure B is 4 times lower than that instructure A , even though the input noise in structure Bis higher than that in structure A. (Recall that the inputof structureB is directly from the measurements while instructureA the input is from the exponential fi lter.) Thereare two reasons to explain this phenomenon. First, thelower noise reduction by the exponential filter yieldsgreater fluctuations of the outputs of the controllers, whichin turn are the inputs to the plant. These fluctuations,though measurable, affect the estimates of the states andthe unknown parameters. Second, the dynamics of theexponential fi lterswas not considered in the process modelof EK F and poorer performance results. Inclusion of thedynamics of the exponential filters will substantially in-crease the order of the EK F and is less feasible and de-sirable.This subsection has shown that prudent design wouldinclude the EK F in the control loop even when the majorfunction of the EK F code is to estimate feed compositionand enthalpy. In addition, this configuration (structureA) not only reduces the measurement noise but also re-covers unmeasurable states from noisy measurements (seesection 5.4).

    5.3. M odel Mismatch. In section 3, the fourth- andthe fifth-order models have been compared with thefull-order model in both frequency domain and time do-main. Here, the effect of modeling errors on the per-formance of the EK F isinvestigated by simulations. Threemodels, the fourth, the fifth and the full, were used in theEK F. The number of measurements in all the cases wasfour. The measurements were the compositions in stages1,9, 24, and 32 for the four and the fifth models and instages 1,9,27, and 32 for the fifth model. Other conditionswere as same as those mentioned before.Results are shown in Figure 5 (state variables) andFigure 6 (parameters). In Figure5, the left column is forthe distillate composition and the right for the bottomcomposition. The rows from top down are the fourth, thefifth, and the full models. For the top composition,a l themodels work equally well in the steady state (in a statisticalsense). In the disturbance period, thanks to the smallerphase shift of both reduced models (section 31, the reducedmodels lead in estimation (cross marks), and hence theovershootand the settling timeof the true value (solid ine)for these models are smaller than those of the full model.A lthough in this special case it seems that the modelingerrors improve the control quality, due to the unpredict-able behavior under other disturbances, one still wants themodeling errors as small as possible. Examining theright-hand column of Figure5, specifically for the bottomcomposition at steady state, shows the fluctuation of truevalue and estimate decreaseas the model order increases.A great improvement can be seen as the model order in-creased from fourth to fi fth. The true values of the bottomcomposition for the fi fth and the full models have a peakduring the disturbance period, while no observablestructure is seen for the fourth model. Thi s result probably

    0

    Top Composition Bottom Composition0 00

    0

    0I n I I . 010.951 0 oo "8 0 0 o O 0 P

    5t h0 00

    0 0 0

    0 0 . 0 4 8 10 99 10 15 10 15 201

    0

    5 10 15 20 5 10 15 20Figure 5. Effect of model order on process s t a t e s : the top (leftcolumn) and the bottom (right column) compositions of the fourth(fir st row), the fifth (second row), and the full (third row) models.-, true value; X, estimated; 0,measured.

    Time (k s) Time (k s)

    Feed Composition Feed Enthalpy1 I 1 I

    0 05 10 15 20 5 10 15 20I

    1...' I0.55 0.60

    0.53 0.5632nd

    0. 51 0. 52

    0.49 0. 48Time (k s)

    5 10 15 20 5 10 15 20Time (k s)Figure 6. Effect of model error on parameter estimations: estimatesof the feed composition (left column) and the feed enthalpy (r ightcolumn) with the fourth (first row), the fifth (second row),and thefull (third row) models. -, true value; X, estimated.canbe explained as follows: Owingtothe inverse responseof the fourth model and the small phase shif t, the bottom

  • 7/28/2019 Application of Extended Kalman Filters

    8/11

    Ind. Eng. Chem. Res., Vol. 30, No. 5, 1991 905Top Composition Bottom Composition099 , 0.058,

    0o 0.054

    0 000.99, 0.0585 10 15 20 5

    0.97. 0.054.E

    . a . . .. =,27a ' ...95. 0.050

    0.93, . . . , . 0.0460.995 10 15 20 10 15 20

    0

    27,32,9, 0 . 9 7 k .054

    0.95 o o o 0 0.0500 0

    0

    5 10 15 20 5 10 15 20Figure 7. Effect of number of measurements on the procesa states:the top (left column) and the bottom (right column) compositionswith two direct measurements(firstrow), two indirect measurements(second row), and four measurements (third row). -, true value; X,estimated; 0,measured.composition is so overestimated and the lead of estimationis so large that the peak of the true value caused by dis-turbances disappears.Figure 6 shows the true values and the estimates of thefeed composition (left column) and the feed enthalpy (rightcolumn). The vertical structure is as same as in Figure 5.I t is clear that as the model order increases, the effect ofnoise on the estimation decreases and the fluctuations inthe estimates are smaller. Except for the undershoot ofthe feed enthalpy (obviously caused by the model mis-match of the high-frequency components of the disturb-ances), the estimation with the reduced models satisfac-torily tracks and distinguishes the two faults, while theperformance of the ful l model is perfect. Further simu-lations show that while a seventh-order model with fourmeasurements improves the estimation overshoot of feedenthalpy a little, it substantially increases the computationtime.In summary, model mismatch has considerable effectson the performance of the system. More accurate modelswithin the restriction of computation capacity still are indemand.5.4. Number of M easurements. Any combinationsof the state variables in the filter can be chosen as mea-surements. Intuitively, the more measurements there are,the more information and the greater accuracy of the es-timates. However, it is technically feasible and desirabletohave a small set of measurements. The questions arise,then, of how many measurements are sufficient and whichmeasurements will result in the best estimates possible.In the fi fth-order model there are up to five measure-ments, Le., the compositions on the stages 1(distillate),9,21, 27, and 32 (bottom product). Four simulations wererun to investigate the impact of the number of measure-ments on the performance of the filter. In the first,all five

    Time (k s) Time (k s)

    Feed Composition Feed Enthalpy05 10 15 20 5 10 15 20-Y05 ,/;._. 1 *E . 0.559,270.52 . .. I .I . .....0.48 0.455 10 15 20 5 10 15 20

    0.56

    0 05 10 15 20 5 10 15 20

    F igure 8. Effect of number of measurements on the parameterestimations: the estimates of the feed composition (left column) andthe feed enthalpy (right column) with two direct measurements (firstrow), two indirect measurements (second row), and four measure-ments (third row). -, true value; X, estimated.measurements were used. In the second, the four mea-surements were on stages l , 9,27, and 32. In the third andfourth, only two measurements were used. The third iscalled direct measurements since the top and bottomcompositions (stages 1and 32) were directly measured,while the fourth is called indirect measurements since theinformation on two middle trays (9 and 27) was used toestimate the top and bottom compositions as well as thefaults.The simulation results are shown in Figures 7 and 8.Figure 7 compares the true values, the measurements(where applicable), and the estimates of the top and thebottom compositions for the direct (firstrow in the figure),the indirect (second row), and the four (last row) mea-surements. Figure 8shows the true values and the esti-mates of the two faults, namely, the feed composition andthe feed enthalpy. The vertical structure in this figure isas sameas that in Figure 7. Comparing these experimentresults, one observes the following:

    1. As the number of measurements increases, the qualityof estimates of the top and bottom compositions mprovesand so does the quality of the control.2. As the number of measurements increases, the es-timates of the two unknown parameters (faults) becomebetter with the smaller fluctuations and the shorter lag.3. When the number of measurements increases fromfour to five, the improvement is less significant (not shownhere), since there is less new information in the additionalmeasurement (J oseph and Brosilow, 1978).4. The indirect measurements provide more accurateestimates of the state variables and the unknown param-eters than do the direct measurements. The reason whythe middle trays are more sensitiveto the faults occurringin the feed can be explained as follows. During the dis-

    Time (k s) Time (k s)

  • 7/28/2019 Application of Extended Kalman Filters

    9/11

    906 Ind. Eng. Chem. Res., Vol. 30, No. 5, 1991'I5 -4 -3 -2 -1

    -5 -4 -3 -2 -1log 10 w radis ---igure9. Bode diagram of four transfer functions: XI'JXF),X,lJ

    X i , X,'fq', andXi fq ' , whereX, andXz orrespond to the compo-sitions on stages 1and 9, respectively.turbance period, the response of the middle trays is largerthan that of the top and bottom products. In addition,after the faults are overcome by regulators, the top andbottom compositions remain unchanged while the com-positions of the two middle trays transit to new steadystates.

    The frequency analysis of the sensitivity also supportsthese arguments. We begin with the linearized model, (4).The transfer function matrix

    --- --

    relates the state variable to the disturbances, or faults.Figure 9 shows ampli tude ratio (upper part) and the phaseshif t (lower part) of the Bode diagram of four transferfunctions, X l'IXF', X i/X F', X l'/q', and X i /q', whereX1andX2 orrespond to the compositions on stages1and 9,respectively. The ampli tude ratios of tray 9 are about 6times larger than those of the top. The phase shift curvesfor stages 1and 9 coincide with each other at low fre-quencies and diverge at 1 X rad/s, the natural fre-quency of the column. Beyond this frequency, the phaseshift of tray 9 issmaller (absolute value) than that of thetop because tray 9 is closer to the fault source.In summary, measuring four of the five states is ade-quate to guarantee the performance of the filter and thewhole system. When only two measurements are allowed,the indirect method (conventional sensor placement) is thebetter choice.6. Conclusions

    In this paper we have proposed and examined thestrategy for fault detection and diagnosis in a closed-loopdistillation system with random measurement noise. Thecontrollers use the more accurate state variables recon-structed by the EK F as their inputs. The whole system

    ------ --

    is less sensitive to high-frequency noises. Consequently,both the control quality and the estimation of unknownparameters have approved considerably. From the analysisand simulations the following conclusions are reached:1. Inclusion of the EK F in the control loop will sig-nif icantly reduce the effects of the measurement noise onthe control system. This strategy in turn results in betterestimation of the unknown parameters.2. The effects of the colored noise, caused by the in-teraction in the closed-loop system, are small, at least inthis distillation example.3. A fi fth-order compartmental model gives satisfactoryestimation of the process states and unknown parameters.However, a more precise process model will give loweredsensitivity to measurement noise and better estimation ofunknown parameters.4. The EK F successfully tracks the varying parametersclosely, which makes itpossible to detect the occurrenceof the faults and diagnose the causes of the faults.5. Measuring four of the five states gets enough infor-mation from the distillation process. The middle trays aremore sensitive to the feed faults than are the top andbottom stages.This approach can be applied to detect and diagnosemore realistic faults in distillation system, for instance, thedecreasing heat-transfer coefficients of the reboiler causedby fouling and the internal reflux ratio. Due to the com-putation limitation and the measurements available, thenumber of faults selected to monitor is restricted. Hencethe filtering techniques for fault diagnosis can only beeffective at the unit level. I t is too complex to apply thefi ltering techniques togroups of units or at the plant levelwhere there are hundreds of possible faults. Furthermore,the filtering techniques cannot distinguish unmodeleddisturbances from those included in the model. A hier-archical approach with fi ltering techniques at lower levelsand artif icial intelligence techniques at higher levels maybe more suitable for fault detection and diagnosis in largeor complex processes.AcknowledgmentUniversity of Delaware.NomenclatureA =coefficient matrix in the linearized model, (4)AR =function defined in (A4)As =function defined in (A6)B =coefficient matrix in the linearized model, (4)B =bottom flow rateBR =function defined in (A4)Bs =function defined in (A6)C =coefficient matrix in the discrete model, (19)D =coefficient matrix in the linearized model, (4)D =distillate flow rateDR=function defined in (A4)Ds =function defined in (A6)ER=function defined in (A4)Es =function defined in (A6)F =Jacobian matrix of fF =feed flow ratef =process functionf i =separation function for the first stage of compartmentG =transfer function matrix defined in (21)gi =separation function for the last stage of compartmentH=Jacobian matrix of hh =measurement functioni =imaginary number

    We acknowledge financial support provided by the

    i

  • 7/28/2019 Application of Extended Kalman Filters

    10/11

    Ind. Eng. Chem. Res., Vol. 30, NO.5, 1991 907where thetota holdup ( MJ of compartment is the sumof holdup of individual stages in this compartment, 6 isthe K ronecker delta, and f i andgi are separation functions.The separation function for the vapor stream leaving thecompartment i in the rectification section is

    aXri (A2)=1+(a- l)xriwhere

    K =gain matrix of the Kalman filterk =number of compartmentsL =matrix of the LQG-control lawL =liquid flow rate in the distillation columnM=dynamic matrix of the LQG-control lawM cj =holdup of compartment jm =meanN =total number of stagesP =estimation error covariance matrixQ =process noise covariance matrixq =feed enthalpyR =measurement noise matrixra=normalized autocorrelation functionri =number of the first stage in compartment is =Laplace transform variablesi =number of the sensitive stage in compartmentt =timet i =number of the last stage in compartment iU =measured input vectoru =manipulated variableV =vapor flow rate in the distillation columnv =measurement noisew=process noiseX =state variable vectorX =liquid compositionZ =measurement vector2=a scalar variable in (17)Greek Lettersa=relative volatility/3 =weighting constant of the exponential f ilterr =coefficient matrix in the discrete model, (18)6 =Kronecker delta8 =nonmeasurable parameter vectorE =stationary random discrete seriesQP . =coefficient matrix in the discrete model, (18)Superscripts=estimation- =Laplace transfer- =differentiation with respect to time'=variable change from the linearization point

    SubscriptsB =bottomD =distillateF =feedf =feed stagek =at time tkR =rectification sectionS =stripping section0 =parameterAppendix: Compartmental Disti llation M odelT he mathematical development of the compartmentalmodel that is presented here follows the methods of Be-nallou et al. (1986). The following assumptions are made:(1)binary system, (2) equimolal overflow, (3) constantmolar holdup, (4)constant relative volatility, and (5)100%stage efficiency. Extensions to complex multicomponentcolumns have been reported by Benallou (1982).By the compartmental concept, the N-stage (includingcondenser and reboiler) column is divided into K com-partments. A set of dif ferential equations are obtainedfrom dynamic material balance around every compartmentand from the steady-state relationship among the distillateor bottom product and the first, the last, and the sensitivestages of every compartment.

    (13)and

    1BR =-a - 11ER =~{ A RBR +[(AR - BR)'+ 4&]'/') (A4)

    The separation function for the liquid stream leavingcompartment i in the rectification section isgi(Xi) E Xti

    The separation functions for the stripping section areobtained from replacing AR, BR,DR, ER,and XI in (A2),(A3), and (A5) by

    12s =-(As - Bs +[ (As- BS)2+4 0 ~ ] ~ / ~ )A6)and xk, where Xk is the bottom product composition.L iterature CitedAstrom, K . J .; Wittenmark, B. Computer Controlled Systems:Theory and Design; Prentice-Hall: Englewood Cliffs, NJ , 1984.Benallou, A. Dynamic Modeling and Bilinear Control Strategies forDistillation Columns. Ph.D. Thesis, University of Cali fornia,Santa Barbara, 1982.Benallou, A.; Seborg, D. E.; Mellichamp, D. A. Dynamic Compart-mental Model for Separation Processes. AZChE J . 1986,32, 1067.Bonvin, D.; De Valliere, P.; Rippin, D. W. T. Application of Esti-mation Techniques to Batch Reactor-I. Modelling ThermalEffects. Comput. Chem. Eng. 1989, 13, 1.Catlin, D. E. Estimation, Control, and the Discrete Kalman Fi lter;Springer-Verlag: New Y ork, 1989.

  • 7/28/2019 Application of Extended Kalman Filters

    11/11

    908 Ind. Eng. Chem. Res.,Vol. 30, No. 5, 1991Dalle Molle, D. T.; Himmelblau, D. M. Fault Detection in a Single-Stage Evaporator via Parameter Estimation Using the K almanFilter. Znd. Eng. Chem. Res. 1987, 26, 2482.De Valliere, P.; Bonvin, D. Application of Estimation Techniques toBatch Reactor-11. Experimental Studies in Stateand ParameterEstimation. Comput. Chem. Eng. 1989, 13, 11.Dhurjati, P.; L amb, D. E.; Chester, D. C. Experience in the Deuel-opment of an Expert System for Fault Diagnosis in a Commer-cial Scale Chemical P rocess, Foundations of Computer AidedProcess Operations; CA CHE Publication, E lsevier Science Pub-lishers: New Y ork, 1987; pp 589-625.Finch, F. E.; K ramer, M. A. Narrowing Diagnostic Focus Using

    Functional Decomposition. AIChE J . 1988, 34, 25.Friedland, B. Control Systems Design: An I ntroduction t o State-Space Methods; McGraw-Hill: New Y ork, 1986.Gelb, A., Ed. Applied Optimal Estimation;M IT Press: Cambridge,MA, 1974.Gilles, E. D. Some New Approaches for Controll ing Complex Pro-cesses in Chemical Engineering. Chemical Process Control-CPCIII; Morari, M., McAvoy, T. J ., Eds.; Elsevier: New Y ork,1986.Goldmann, S.F.; Sargent, R. W. H. Application of L inear EstimationTheory to Chemical Processes: A Feasibility Study. Chem. Eng.Sci. 1971, 26, 1535.Griffin, C. D.; Croson, D. V.; Feeley, J . J . Kalman Fi ltering Appliedto a Reagent Feed System. Chem. Eng. Prog. 1988,84 (Oct),45.Hamilton, J . C.; Seborg, D. E.; Fisher, D. G. An ExperimentalEvaluation of K alman Filtering. AIChE J . 1973, 19, 901.Himmelblau, D. M. Fault Detection and Diagnosis-Today andTomorrow; Kyoto Meeting International Federation AutomaticControl, October 1986.Horton, R . R.; Bequette, B. W.; Edgar, T.F. Improvements in Com-partmental Modeling for Distillation. Proceedings of the 1986American Control Conference; American Automatic ControlCouncil: New Y ork, 1986; pp 651-657.Isermann, R. Process Fault Detection Based on M odeling and Es-timation Methods. Automatica 1984, 20, 387.J oseph, B.; Brosilow, C. B. Inferential Control of Processes, Part I.AZChE J . 1978,24,485.Kramer, M. A.; Palowitch,B. L., J r. A Rule-Based Approach toFaultDiagnosis Using the Signed Directed Graph. AIChE J .1987,33,1067.K umar, S.;Taylor, P.A,; Wright, J .D. Experimental Evaluation ofCompartmental and Bil inear Models of an Extractive Distill a-tion Column. Presented at the AIChE Annual Meeting, Chicago,IL , November 1985.

    Lees, F. P. Process Computer A larm and Disturbance Analysis:Review of the State of theArt. Comput. Chem. Eng. 1983,7,669.Litchfield, R. J.; Campbell, K. S.; Locke, A. The Application ofSeveral Kalman filters to the Control of a Real Chemical Reactor.Trans. Znst. Chem. Eng. 1979,57, 113.

    Ljung, L., System I dentifi cation: Theory for the User; Prentice-Hall: Englewood Cli ffs, N J , 1987.Morari, M.; Stephanopoulos, G.Measurements Within the Frame-work of StateEstimation in the Presence of Persistent UnknownDisturbances. AZChE J . 1980,26, 247.Narasimhan, S.; Mah, R. S. H. Generalized Likelihood Ratios forGross Error I dentification in Dynamic Processes. AZChE J . 1988,34, 1321.Park, S.; Himmelblau, D. M. Fault Detection and Diagnosis viaParameter Estimation in Lumped Dynamic Systems. Znd. Eng.Chem. Process Des. Dev. 1983,22,482.Rutzler, W. Nonlinear and Adaptative Parameter E stimationMethods for Tubular Reactors. Znd. E ng. Chem. Res. 1987,26,325.Safonov, M. G. Stabil ity and Robustness of Multivariable FeedbackSystems; M IT Pres: Cambridge, MA, 1980.Shinskey, F.G. Distil lation Control: For Productivity and EnergyConseruation;McGraw-Hill: New Y ork, 1984.Sinha, N. K.; Kuszta, B.Modeling and Identif ication of DynamicSystems; Van Nostrand Reinhold: New Y ork, 1983.Sorenson, H. W., Ed. Kalman F iltering: Theory and Application;I EEE Press: New Y ork, 1985.Stewart, W. E.; Levien, K. L .; Morari, M . Simulation of Fractiona-tion by Orthogonal Collocation. Chem. E ng. Sci. 1985, 40, 409.Tylee, J . L. On-Line Failure Detection in Nuclear Power Pl ant In-strumentation. ZEEE Trans. Autom. Control 1983,AC-28,406.Vaija, P.; J arvelainen, M.; Dohnal, M. Multilevel Failure DetectionSystem. Comput. Znd. 1985, 6, 253.Venkatasubramanian, V.; Chan, K . A Neural Network Methodologyfor Process Fault Diagnosis. AZChE J . 1989, 12, 1993.Waller, K. V.; Finnerman, D. H.; Sandelin, P. M.; Haggblom, K . E.;Gustafsson, S. E. An Experimental Comparison of Four ControlStructures for Two-Point Control of Distil lation. Znd. Eng. Chem.Res. 1988, 27, 624.Watanabe, K .; Himmelblau, D. M . Fault Diagnosis in NonlinearChemical Process (Part 1). AIChE J . 1983a, 29, 243.Watanabe, K.; Himmelblau, D. M. Fault Diagnosis in NonlinearChemical Process (Part 2). AIChE J . 1983b,29, 250.Watanabe, K.; Himmelblau, D. M. Incipient Fault Diagnosis ofNonlinear Processes with Multiple Causes of Faults. Chem. Eng.Sci. 1984, 39, 491.Willsky,A. S. A Survey of Design Methods for Failure Detection inDynamic Systems. Automatica 1976, 12, 601.Y oshimura, T.; Konishi, K.; Kiyozumi, R.; Soeda,T. Identificationof Unknown Parameters in Linear Discrete-T ime Systems byModified Extended K alman Fil ter. Znt. J .SystemSci. 1980,11,97. Receiued for reuiew February 23, 1990Reuised manuscript received August 2, 1990Accepted A ugust 9, 1990