In order to estimate the parameters of the control plant, an estimation procedure is needed. The Recursive Least Squares Method is most often used in such systems where a computer can easily implement the discrete-time description.

The RLSM procedure minimizes the sum of the error squared, where the error is the difference between the outputs of the control plant, and the model. The application of the RLSM to this system requires that a transfer function model be assumed so that the estimation can provide the parameters to that model.

It has been assumed that the control plant transfer function model is second order of the form

Y(s)/X(s) = K/(s^{2} + as + b).

Using a backward difference approach, the difference equation to describe the plant is

Y(i) = a_{1}X(i) + a_{2}Y(i-1) + a_{3}Y(i-2),

where a_{1} = k*dt^{2} /(1+a*dt+b*dt^{2}),

a_{2} = (2+a*dt)/(1+a*dt+b*dt^{2}), and

a_{3} = -1 /(1+a*dt+b*dt^{2}).

Since the RSLM provides estimates for a_{1}, a_{2}, and a_{3}, the reverse of these equations are needed to provide k, a, and b from the estimates. These equations when solved are

ESTa = -(a_{2}/a_{3} + 2) / dt

ESTk = - a_{1}/(a_{3}*dt^{2})

ESTb = -1/(a_{3}*dt^{2})-1/(dt^{2})-ESTa/dt.

Now that the description equation is defined for both continuous and discrete time, the RLSM can be applied.

The formulation of the RLSM procedure is as presented in EE508, Introduction To Process Controls_{16}.

The plant model can be described by

Ym(i) = A*X,

where A is the vector of parameter estimates, and X is the model input vector. Thus, the input vector X must be defined as

X = [x1 Y(i-1) Y(i-2)]

for a second order system where x1 is the data input to the control plant.

The estimates A, are found by minimizing the sum of the error squared for the number of observations defined. This process leads to the well known LSM equation

A = (X_{T}X)^{-1}X_{T}Y,

or in recursive form, the RLSM procedure is

1. Calculate Kalman gain

K = P*X*(ff+X_{T}*P*X)^{-1},

2. Update parameter estimates

A = A + K * (Y(i) - A*X ),

3. Update covariance matrix

P = (I-K*X_{T})*P/ff, where ff is the forgetting factor.

The forgetting factor determines the number of data points observed by the RLSM procedure by

N = 1/(1-ff).

It was observed that the RLSM converges faster if the forgetting factor is calculated from the number of observations until that number of points exceeds N. For example,

if i<N, ff=1-1/i; else, ff=1-1/N; end

where i is the loop counter

reduces the memory of the RLSM to only the number of observations until the desired number of points have been observed.

In the recursive form, the estimate A is used with the new system input vector X to test the projected output Ym=A*X against the measured output Y. The difference is multiplied by the Kalman gain to adjust the estimates of the parameters. The forgetting factor is used to weight the adjustment determined through the Kalman gain.

Since the goal of this thesis is to detect drifting parameters and project them ahead, a forgetting factor of less than 1 seems appropriate. However, according to the student's t distribution, and the number of parameters estimated, N should be greater than 54. For this experiment, N was set to 100.

The RLSM procedure is started with an initial value for P. The initial value determines the rate of convergence for the procedure. If P is too small, the procedure will take too long to converge. If P is too big, the procedure could become unstable. Larger values of P make the procedure converge faster than smaller values of P. In this case, the highest reliable value of P was .1*I where I is a 3x3 identity. The .1 value worked in all cases where the LSM estimation procedure was applied, including the estimation stage of the prediction procedure.

To simulate an on-line parameter estimation system it is necessary to simulate the plant performance and deterioration. Then estimated plant parameters can be compared to the known plant parameters used in the plant simulator.

Appendix 1 contains the program code written in Matlab.

There are three routines which work together to simulate on-line parameter estimation. These are

1. The Constant Generator, const.m,

2. The Input Generator Routine, xy.m,

3. The LSM Routine, LSM.m.

The Constant Generator just sets up the input constants needed by the other routines.

The Input Generator Routine simulates the control plant with a drifting pole. It is assumed that on-line software will declare a fault when a estimated pole goes below a set threshold. With a predictive filter attached to the results of the LSM, the results of the LSM must still be tested against a threshold because a fault can occur suddenly and thus not be predicted.

The LSM routine performs the parameter estimation. From the estimated parameters, the LSM routine calculates the continuous plant parameters k, a, b, p1, and p2. Figure 8 shows the comparison between the dominant pole used in the control plant model, and the estimate.

Figure 8, Dominant Pole vs LSM Estimate

Figure 9 shows the configuration of the LSM estimation system. Since the system transfer function model is second order, there are two delay lines to provide the inputs to the RLSM.

Figure 9, RLSM System Configuration

Chapter 4 - Trend Analysis and Failure Prediction

Abstract - Fault Prediction With Regression Models