Fault parameter estimation

Page 1

Fault Parameter Estimation Steve Rogers

Parameter estimation for fault detection is appropriate if process faults may be associated with model parameter changes and if process models are available. The general procedure1 is shown below.

Recursive Least Squares (RLS) The recursive least squares (RLS) algorithm is a commonly used parameter estimation method. If applied to an ARMA model, as shown below: y ( t )=a1 y ( t−1 )+ ⋯ +a n y ( t −n a ) +b 1 u ( t−n k ) + ⋯ +b n u ( t−n b−nk ) a

b

The RLS equations for a single input single output (SISO) system are given below. k (t)=

P ( t−1 ) φ ( t ) 1+φ (t )P ( t−1 ) φ ( t ) T

P ( t )= P ( t−1 )−k (t) φT ( t) P ( t−1 )


ε ( t )= y ( t ) −φT (t) θ (t −1) θ ( t )=θ ( t−1 ) + k ( t) ε ( t ) φ ( t ) =[− y ( t−1 ) , ⋯− y ( t−n a ) , u ( t−nk ) , ⋯ u ( t −n b−n k ) ] θ=[ a1 , ⋯ , a n , b1 , ⋯ , b n ] a

T

T

b

Note that the algorithm needs initial values for P(t) and θ, which are obtained by knowledge of the system or calculated from an initial data set. The RLS 1 with a forgetting factor λ (usual range [.98-.995]) is k (t)=

P ( t−1 ) φ ( t ) λ+φT (t) P ( t−1 ) φ ( t )

P ( t )=

1 ( P ( t−1 )−k (t )φT (t )P ( t−1 ) ) λ

ε ( t )= y ( t ) −φT (t) θ (t −1) θ ( t )=θ ( t−1 ) + k ( t) ε ( t )

The forgetting factor λ makes the algorithm more susceptible to noise, but allows faster convergence. A variable forgetting factor can be adjusted according to the error. As the error increases the forgetting factor decreases, causing the data to be ‘forgotten’ faster. As the error reduces the forgetting factor increases, causing the data to be ‘remembered’. The approach is shown below1. 1. Prediction

̂y ( t )=φT (t−1) θ̂ (t−1)

2. Error ε ( t )= y ( t ) −̂y (t) 3. Gain

k (t)=

4. Forgetting 5. Covariance

P (t−1)φ(t ) 1+φ (t ) P (t−1)φ(t) T

λ ( t )=1−( 1−φT (t −1) ) ε ( t)2 /σ 0 P ( t )=

Note: if

1 ( P ( t−1 )−k (t)φT (t ) P( t−1)) λ (t)

λ(t)<́ε min then

λ ( t )=́ε min


Kalman Filter Parameter estimation may be applied to a Kalman filter or an H∞ filter by formulating the state space equations as y ( t )=φT ( t ) x ( t )+ e (t) x ( t+1 ) =x ( t ) +v ( t ) ; E {v (t)v T (s) }=Rt δ t , s

‘e’ and ‘v’ are process and measurement noise respectively. If we replace the state vector x with θ we have the Kalman filter equations shown below. k (t)=

P (t−1)φ(t ) 1+φ (t )P (t−1) φ(t) T

P ( t )=( P ( t−1 )−k (t) φT (t) P (t−1) ) + R1 ε ( t )= y ( t ) −φT (t−1) θ̂ (t−1) θ̂ ( t )=θ̂ ( t−1 ) +k (t) ε (t) Sliding window parameter estimators 3 may likely improve stable convergence. If we consider the above Kalman filter approach to parameter estimation we can modify it to incorporate a sliding window: y ( t )=φ ( t ) θ ( t ) , y ( t +1 )=φ ( t+1 ) θ ( t ) ⋯ y ( t + k )=φ ( t + k ) θ ( t ) T

T

T

where k is the length of the sliding window. Note that it is assumed the parameter vector θ(t) does not change. Thus, we can construct a matrix:

[ y (t)

y (t + k ) ]=[ φ ( t )

⋯ φ ( t+ k ) ] θ (t ) .

T

T

We can now proceed with the Kalman filter as follows: K ( t )=

P ( t−1 ) [ φ ( t ) ⋯ 1+ [ φ ( t )

T

φ(t + k )]

⋯ φ ( t +k ) ] P ( t−1 ) [ φ ( t ) ⋯ φ ( t +k ) ] T

{

, P ( t )= P ( t−1 )−K ( t ) [ φ ( t )

where K(t), P, R1, and ε(t) are of appropriate dimensions.

T

⋯ φ ( t+ k ) ] P ( t−1 ) T


Continuous Stirred Tank Reactor Example To illustrate parameter estimation for fault detection, consider a continuous stirred tank reactor model: (−∆ H ) q −E q −E UA Ć a = ( C af −C a )−k0 exp C a , T́ = ( T f −T ) + k0 exp Ca+ ( T −T ) V RT V ρCp RT V ρC p f

( )

( )

,

where Ca is reactor concentration, Caf is feed concentration, T is reactor temperature, Tc is the coolant temperature, Tf is the feed temperature, and q is the feed flowrate. We can then reformulate the above equations as: (−∆ H ) ́ q −E q q UA Ć a − ( C af −C a )=k0 exp C a , T́ − ( T f −T )= C a − ( C af −C a ) + ( T −T ) V RT V ρC p V V ρCp f

( )

(

)

. Thus, from the 2nd equation we have two fault estimation (−∆ H ) UA nd ρC p V ρC p , the 2 of which indicates heat transfer degradation.

[

parameters

]

This is a highly nonlinear system; however, it can be controlled by using PID controllers. The following matlab script shows the controller design approach. opts = pidtuneOptions('PhaseMargin',80,'CrossoverFrequency',0.33); k = 0.5;tc = 5;td = 2; [C_pid,info] = pidtune(tf(k,[tc 1],'InputDelay',td),'pid',opts);

kp = C_pid.Kp;Ki = C_pid.Ki;kd = C_pid.Kd;

The Simulink block diagram is shown below. The PID is implemented as shown in the Simulink block diagram following the plots. It is in the standard parallel form. The parameter estimates are shown in the next plot along with the estimation error. The fault detection is centered on estimation of the UA parameter, as it determines the heat exchanger effectiveness. The UA parameter will normally degrade over time due to fouling, corrosion, wear, aging, etc. Consequently, fault detection should indicate heat exchanger performance degradation.


estimation error

0.02 0

param1

-0.02

0

200

400

600

800

1000

0

200

400

600

800

1000

0

200

400

600

800

1000

0

200

400

600

800

1000

0

200

400

600

800

1000

800

1000

200 199.8

UA param

700 650

estimation error

600

0.02 0 -0.02

param1

200 180 160 140 120

UA param

700 600 est actual 500

0

200

400

600

Following a period of convergence good tracking may be observed in the plot above. The Simulink block below shows the layout of the plant controller and parameter estimation.


1.0 CafSP

Interpreted MATLAB Fcn

1 s

cstr

Integrator

PID(s) UA

PID Tcf Tf q

1/239

1.02

Gain

Caf

Interpreted MAT LAB Fcn cstrEst

Dat1

The parameter estimation Kalman filter is outlined in the following code and is performed in the interpreted matlab function block. function out = KF_est_cstr(in) Ca = in(1);T1 = in(2);Tcf = in(3);Tf = in(4);q = in(5);Caf = in(6); dCa = in(7);dT1 = in(8); V = 100; persistent X if isempty(X) X.P = 0*eye(2); X.phi = [-dCa+q*(Caf-Ca)/V (Tcf-T1)/V]'; X.Y = dT1-q*(Tf-T1)/V; X.param = 1e-2*ones(2,1); end [X.param,X.P,err] = KalmanF(X.param,X.P,X.Y,X.phi); X.phi = [-dCa+q*(Caf-Ca)/V (Tcf-T1)/V]'; X.Y = dT1-q*(Tf-T1)/V; out = [err;X.param]; function [param,P,err] = KalmanF(param,P,y,x) niter = 1;lamb = 0.995; Q = 1e-3*eye(length(param)); for i = 1:niter err = y - x'*param; k = P*x/(1 + x'*P*x); P = (eye(size(P)) - k*x')*P/lamb + Q; param = param + k*err; end;

References 1. Escobet, T., and Trave-Massuyes, L., ‘Parameter Estimation Methods for Fault Detection and Isolation,’ doi=10.1.1.112.1681&rep=rep1&type=pdf.

http://citeseerx.ist.psu.edu/viewdoc/download?


2. Wikipedia, ‘low-pass filter’. 3. Pouliezos, A., Stavrakakis, G. Real Time Fault Monitoring of Industrial Processes, Kluwer Academic Publishers, 1994, ISBN 0-7923-2737-3.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.