IFAC
Copyright (:> IFAC On-Line Fault Detection and Supervision in the Chemical Process Industries, Jejudo Island, Korea, 2001
\:) Publications www.elsevier.comllocatelifac
DETECTING SENSOR FAULTS FOR A CHEMICAL REACTOR D.L. Yu, J.B. Gomm, D. W. Yu and D. Wi//iams Control Systems Research Group, School ofEngineering Liverpool John Moores University, Byrom Street, Liverpool L3 3AF, UK E-mail:
[email protected]
Abstract: For time-varying processes a fixed neural network (NN) model trained off-line cannot be used for on-line fault detection, as the NN cannot model the process dynamics change and therefore the modelling error will increase. When sensor faults are detected, a parallel model should be used for multi-step ahead predictiQn. In this case the time-varying effects will result in modelling error diverging. An on-line fault detectio~ strategy using adaptive parallel radial basis function network (RBFN) is proposed in this paper. The RBFN is trained on-line using the recursive orthogonal least squares (ROLS) algorithm until a fault is detected. An error index is formulated to distinguish the dynamics change from the faults. The method is applied to a three-input three-output chemical process to detect the simulated faults on the real data. The results indicate the feasibility of the method and the applicability to the real dynamic processes. Copyright©
2001IFAC Keywords: fault detection and isolation, ROLS algorithm, RBF networks, sensor fault, chemical processes.
1. INTRODUcnON
the network as the residual is nearly zero when no fault occurring. The network is also trained such that different faults can be isolated, provided the data for these faults are available. The hybrid structure of this method utilizes the system information provided by the quantitative method and therefore the structure of the neural network used could be much simpler and the training the network is easier. The third is using a neural network model to predict the system output and the prediction error is used for the residual, another network is then used to isolate faults (Patton, et al., 1994; Benkhedda and Patton, 1996). This paper presents a study of the third scheme applied to a real chemical reactor process.
The potential of neural networks for nonlinear system modelling, control and fault detection has been investigated in recent years. The advantage of neural network approach over others is that it is applicable to systems for which first principle mathematical models are difficult to formulate. Applications of neural networks in fault diagnosis can be broadly represented in three categories. The first is using networks to classify different faults from the normal condition and from one another according to different fault patterns represented in the measured system input-output data, either by off-line training (Sorsa et al., 1991; Leonard and Kramer, 1991) or by on-line learning of the fault patterns by an adaptive network (Gomm, 1996). The second is a hybrid scheme which uses neural networks to isolate faults based on a residual generated by a quantitative model-based method (Yu et al., 1996). In this method, a linearised model of the non-linear process is supposed to be known, or the structure is known and the parameters can then be estimated using system measurements. The model uncertainty and the non-linear error are approximately represented by a term in the linear equation model which is commonly known as unknown input. Then a robust parity space approach is applied to generate the residual which is insensitive with respect to the unknown input. The modelling error is further compensated using a neural network in the whole operating space so that the output of
When a neural network (NN) model is used to detect and isolate sensor faults for a multivariable process without full knowledge of its mathematical model, a series-parallel model defined in (Narendra and Parthasarathy, 1990) is generally incapable of generating a significant residual. This issue has been experimentally investigated and theoretically analysed in (Yu et al., 1999). To enhance the sensitivity of the residual with respect to the fault, a parallel model also defined in (Narendra and Parthasarathy, 1990) was suggested and has been investigated in (Yu et al. 1999). Since real processes
291
The concentration of NH 40H is constant but the flow rate is adjustable by a servo-pump to regulate the pH value in the tank. The air flow rate is also adjustable by a mass flow-meter connected to a compressing air network to regulate the percentage of the dissolved oxygen (p02) in the liquid in the tank. The tank is also equipped with an electric heating system to adjust the liquid temperature. The liquid in the tank is stirred continuously to make sure the pH value, the dissolved oxygen and the temperature are consistent throughout the tank. All three variables, temperature, pH value and the dissolved oxygen are measured and displayed. A personal computer with analogue UO is connected to the process to sample the measurements and issue the control outputs.
have considerable unmodelled uncertainties, a parallel model is generally difficult to train for these processes and a reset technique was used in (Yu et al., 1999) to reduce the modelling error. In modelling a non-linear dynamic system, a neural network, typically configured in a non-linear autoregressive with exogenous inputs (NARX) model structure, is developed to model the system dynamics. The developed neural model is then usually implemented in parallel with the system, where the past system outputs instead of the model outputs are used as part of model input. This kind of model performs a one-step ahead prediction of the system output and is referred to as a series-parallel model. It cannot operate independently from the system. The opposite of this is an independent model in which the model outputs are fed back into the network and therefore is refereed as parallel model. In this way, the model is operated independent of the system and can, therefore, be used to simulate the system to obtain longrange predictions. However, accurate independent models are very difficult to develop, due to the recurrence of operation and the accumulation of the modelling error as a result of the feedback. This problem was observed in our previous research and investigated in (Yu et al, 1999) when sensor faults in a chemical reactor are diagnosed. The insensitivity of the residual generated by a series-parallel model to the sensor faults was overcome by using a semiindependent NN model. For the details see (Yu et al, 1999).
--
pH
p02
Fig.l The chemical reactor process
Some dynamic processes have time-varying nature and for these processes sensor fault detection is turned out to be more difficult. An adaptive RBFN model with on-line training using the ROLS algorithm (Yu et al., 1997) is proposed in this paper. The model is on-line trained until a fault is reported. An error index is formulated as the residual tolerance to distinguish the time varying dynamics from the sensor faults to be identified. The ROLS algorithm is used to get rid of the effects of data ill-conditioning on the modelling error and insure the on-line modelling of the process dynamics change. This novel method is applied to a three-input three-output chemical reactor to detect simulated sensor faults. The three sensor faults are superimposed on the process real data to obtain industrial environment. It is believed that the faulty data simulated in this way is the same as real faulty data collected from the process under sensor fault conditions. The simulation results demonstrated in the paper indicate the feasibility of the proposed method and the applicability of the method to real multivariable processes.
2.
With the three inputs, heating power, flow rate of ammonium hydroxide and flow rate of air, and the three outputs, liquid temperature, pH and percentage of dissolved oxygen, the process constitutes a MIMO, non-linear dynamic system. It has been shown in the experiments that the coupling between variables is very significant. The rate of absorption of oxygen into the liquid and the reaction of the sodium sulphite, for example, significantly depend on the liquid temperature. The process also suffers from many external disturbances, apart from those introduced manually, such as changes in the room temperature, perturbations in the concentrations of the inflow chemical solutions and air pressure in the compressing air network. different concentrations of H+ and OH- ions in the liquid at different times. In addition, the response times for the three variables are significantly different. The rise time for the temperature is very long due to the available heating power whereas the dissolved oxygen is quite short. All these effects cause the process to be non-linear in both dynamic and static behaviour, time-varying and uncertain in parameters, multivariable with significant coupling; complex without a known mathematical model; suffering from unpredictable large disturbances.
THE CHEMICAL REACTOR
The reactor used in this research is a pilot system established in the laboratory to generally represent the dynamic behaviour of real chemical processes in industry. The schematic of the chemical reactor is shown in Fig.l. It consists of a continuously stirred tank (15 litres) to which the chemical solutions, NH4 0H, CH3 COOH and N a2 S03 , and air are added. The liquid level in the tank is maintained at a pre-specified constant level by an outflow pump system. The concentrations and the flow rates of solutions CH3 COOH and N a2 S03 are constant except for some manual changes to mimic process disturbances.
Process inputs and outputs are chosen as
U
=
f~l' f~1 fa
y
=
(1)
p0 2
where Q, f b and fa denote the heating powl:(' the flow rate of the base and the flow rate of air respectively.
292
3.
interpolation property and good generalization. A modified random amplitude sequence (RAS) can be designed such that after the signal amplitude changes to a new value, it stays at this value for several sampling intervals. Alternatively, closed-loop data can be used when the modified RAS cannot excite the entire system operating space in open-loop. This data is sampled when a simple closed-loop control is applied to the system and the modified RAS is applied to the control set point. Training data should be normalized such that all the data are weighted to have the same power in the computation. In this research both the input and output training data are normalised to have zero mean and unit variance.
ADAPTIVE RBFN MODEL
The process can be represented by the multivariable NARX model of the following form,
yet) = f(y(t -1), ... ,y(t - n y
),
(2)
u(t-I-d),···,u(t-n u -d»+e(t) where
yet) =
r
Yl(t)~ : ,u(t) = [Ul(t)] : ,e(t) = rel(t)~ : Y p (t)
u m (t)
To configure a parallel RBF network as the NARX model in eq.(I), the network input vector is composed of the past values of the model output and system input. The model orders and time-delays are chosen using the method proposed by the authors in (Yu, et aI., 2000), resulting in a network input vector:
e p (t)
are the process output, input and noise respectively; p and m are the number of outputs and inputs respectively; n y and nil are the maximum lags in the outputs and inputs respectively; d is the maximum time delay in the inputs; and f (*) is a vector-valued, non-linear function. When neural networks are used to model the process, the measurements of the process at different sample times can be taken as the input of the network, while the network implements the non-linear transformation f (*) in (2).
x(t) = [fr (t -I), pH(t -I), p02 (t -I), i r (t - 2), pH(t- 2),P0 2(t-2),Q(t-22),fb(t-I), fa{t -I)f (5) Note that T.. pH and p02 in x(t) are RBFN model output, so this model is a parallel neural model. The Gausian basis function was chosen for the RBF network model which is suggested for dynamic system modelling (Chen et al., 1990):
A RBF network is adopted to model the chemical reactor as it has the advantages over the multi-layer perceptron (MLP) network with short training time and converging to the global minimum when the least squares (LS) type algorithms are used.
2
x E 9t N ~ YE 9t
via the transformation,
(4)
y
and x are the network output and input vectors
respectively; WE 9t nll Xm is the weighting matrix with element Wy denoting the weight connecting the ,ollr hidden node output to the JoIlr network output; Cl> E 9t nll denotes the output vector of the non-linear basis functions in the hidden layer,
tP i
is the ,ollr element of cI»; ci E
~ N denotes the
(6)
The weighting matrix of a RBF network can be updated using a LS algorithm since the weights are linearly related to the output. For the training data from a real system, illconditioning can appear in the data set and cause a reduction in the modelling accuracy. In this paper, a recursive orthogonal least squares (ROLS) algorithm for MIMO systems, developed by the authors (Yu et al., 1997; Gomm and Vu, 2000) is used instead of the standard LS algorithm, as a numerically robust method for determining the weights with limited computer memory requirements. This algorithm is used on-line and is described as follows.
(3)
where
i = I, ... ,nh
Before the training, the RBF network centres were chosen using the standard k-means clustering method.
A standard RBF network performs a non-linear mapping m
2
41i =41i(d i)=exp(-di lai )
The least squares problem is formed as follows. Considering (3) for a set of N input-output training data, we have
,ollr
centre vector; and nil is the number of nodes in the hidden layer. In developing a neural model for a non-linear system, consideration needs to be given to determining the input vector x, updating the weighting matrix W such that the model prediction error is minimized, and exciting the system to obtain the training data. The techniques used to address these problems are described below.
m
Y=Y+E=~W+E
YE 9t Nxp
where
i
E
9t Nxp
~ E ~ Nxn
is A
is
is
the the
the
desired
output
matrix,
neural
network
output
matrix,
layer
output
matrix,
hidden
E E 9t Nxp is the error matrix and
= (y(l), y(N)], iT = [y(I), cl»T =[4'(1), "', 4'(N)], ET =[e(I), yT
The excitation signal should be designed such that the training data has the persistently exciting property and should span over the entire network input space in every dimension, which can provide a good network model
2Ql
y(N)] e(N)].
The residual is designed as the difference between the real system output and the neural model output:
Equation (2) can be solved for W(/) using the recursive MIMO least squares algorithm to minimise the following time-varying cost function, J(/)
=[,ty~~ .-1)] _[,tcl>~~.-I)]W(/J yT (I)
where
"A"~
the
F-norm
=trace(A
T
A)
and
a
,t < 1
(8)
matrix
is
defined
as
is used to introduce
exponential forgetting to the past data. It has been shown (Bobrow and Murray, 1993; Vu, el al., 1997) that minimising (8) is equivalent to minimising the following cost function, J(/) =
J,tY~~~I)]_[AR~~~ I)]W(/) yT (I)
~
(9)
I/JT (I)
Q(/{~~~)] , 0
I/JT (I)
Y(/)]f,tY(t...-I)] ... -Q (I
l
T
1] T (I)
5.
(10)
yT (I)
Y(/) - R(/)W
f
...
(/)~ (11)
1] T(I)
Ir
T
(/)IIF'
The RBF network used in the modelling is as described in eqs (3) and (4), with 9 inputs, 18 neurons in the hidden layer and 3 outputs. The centres were chosen before on-line use by the K-means clustering algorithm. The forgetting factor in the ROLS algorithm was chosen as A 0.99 and the summed sample number in equation (15) was chosen as
W(/) can be easily solved from (12) by backward substitution. The decomposition in (10) can be achieved efficiently by applying Givens rotations to an extended matrix to obtain the following transformation (Bobrow and Murray, 1993),
,tY(1 -1)] ~ [R(/) Y(/)] yT (I)
0
=
=
(13)
1]T (I)
(13), then solve W(/) in (12). Initial values for R(/) and
}'(/) can be assigned as R(O) =al and },(O) = 0, where is a small positive number.
2
M=5. The tolerance is calculated by Tol 1.2 mM for the normalised data, where m is the number of the process output. The simulation results are shown in Fig.2, where the process measurement and the model output are displayed in one graph for each output The residuals are displayed in Fig.3. It can be clearly seen that the residual response to the fault with a considerable amplitude and therefore the faults can be detected, although the process variables, especially the dissolved oxygen, have time-varying nature.
The procedure of the ROLS algorithm is therefore the following: at stage I, calculate R(/) and }'(I) according to
4.
SIMULAnON RESULTS
The three sensor faults were simulated to occur during sample instants t=I40Q-1410. Therefore, faulty sensor data used in the simulation was the real data being superimposing with a 20% change of the measured values.
Since R(/) is an upper triangular matrix and therefore
AR(I -I) [ I/JT (I)
(15)
(i)
F
which gives the straightforward optimal solution of W(/) to be solved from R(/)W(/) = Y(/) (12) and leaves the residual at stage t as
2
To simulate the real process environment when it is under closed-loop control, a set of closed-loop data with 1800 samples was collected. The data sample interval was determined based on examining the rise times for different variables. From step input responses, approximate rise times were recognized as 25 mins for T., 45 mins for pH, 5 mins for p02 when temperature is 30°C and 2 mins for p02 at 50°C. Thus, a suitable sample time for all variables was selected to be 10 secs.
where Q is an orthogonal matrix. Combining (9) and (10) and considering that F-norm is preserved by orthogonal transformations, the following revised cost function is obtained, J(/) =
LE
Here M is the pre-specified sample period and can be determined in the experiment. When the error index is found greater than the tolerance, the on-line training stops and the weights at last sample time will be remained for the use during fault condition. If there is no fault being detected, the past model output used in the model input will be replaced by the process output at the same sample instant, to avoid the multi-step ahead prediction error.
where R , an nh xnh upper triangular matrix, and }' are computed by an orthogonal decomposition as follows, =
M
=
i:t-M+i
F
[ AR~~~ I)]
(14)
The RBFN model is trained on-line to follow any process dynamics change. When a fault occurs the on-line training will stop so that the fault will not be learned. Occurrence of a fault is determined by checking an error index to see if it is greater than a pre-specified tolerance. The error index is formulated as a summed squared residual of a certain period of sample time using multi-step prediction of the parallel RBFN model.
IF
'PT (I)
of
E(t) = y(t)- y(t)
a
Isolation of the sensor faults is naturally achieved as each element of the residual vector can be evaluated ~arately and indicates the corresponding sensor fault.
FAULT DETECfION
294
6.
CONCLUSIONS
Patton. RJ., Chen, J. and Siew, T.M., 1994. Fault diagnosis in non-linear dynamic systems via neural networks. Proc. lEE Int. Con! Contro/'94, 21-24 March, Coventry, U.K., Vo!.2, pp 1346-1351. Sorsa, T., Koivisto, H. and Koivo, RN., 1991. Neural networks in process fault diagnosis, IEEE Trans. Systems, Man and Cybernetics, Vo!. 21, pp. 815-825. Vu, D.L., Shields, D.N. and Daley, S., 1996. A hybrid fault diagnosis approach using neural networks. Neural Computing and Applications, YoU, No.4, pp 21-26. Vu, D.L., Gomm, J.B. and Williams, D., 1997. A recursive orthogonal least squares algorithm for training RBF networks, Neural Processing Letters, Vo!.5, No.3, pp 167-176.
A fault detection method is proposed for multivariable nonlinear time-varying processes to detect sensor faults. The process dynamics change is modelled by the RBFN with on-line training using the ROLS algorithm. A novel error index is fonnulated in the method to identify the occurrence of a fault so that the on-line learning can be stopped. Integration of several techniques enables the process without first principle model to be detected for sensor faults, which is proved to be very difficult using traditional model based method. Real data simulation on a three inputs three outputs chemical reactor shown promising results and indicates the feasibility of the method for the sensor fault detection of real processes. The on-line centre adaptation in the RBFN model may improve multi-step ahead prediction accuracy and this is under investigation currently.
Vu, D.L., Gomm, J.B. and Williams, D. 1999, Sensor fault diagnosis in a chemical process via RBF neural networks, Control Engineering Practice, Vo1.7, No.!, pp. 49-55. Vu, D.L., Gomm. J.B. and Williams, D. 2000, An input structure selection method for neural modelling and its application to a chemical process, Engineering Application of Artificial Intelligence, Vol. 13, No.l, pp. 15-23.
ACKNOWLEDGMENTS This work is funded by the EPSRC, UK under Grant No. GRIN 18697.
REFERENCES Benkhedda, H. and Patton, R.J., 1996. Fault diagnosis using quantitative and qualitative knowledge integration. Proc. UKACC Int. Conf. Contro/'96, 2-5 Sept., Exter, U.K., Vo!.2, pp 849-854. Bobrow,J.E. and Murray, W, 1993. An algorithm for RLS identification of parameters that vary quickly with time", IEEE Trans. Automatic Control, Vo!.38, No.2, pp. 351-354. Chen, S., Billings, SA, Cowan, C.F.N. and Grant, P.M., 1990. Practical identification of NARMAX models using radial basis functions, Int. J. Control, Vo!. 52, pp. 1327-1350. Gomm, 1.B., 1996. On-line learning for fault classification using an adaptive neuro-fuzzy network. Proc. I fh IFAC World Congress, 30 June - 5 July, San Francisco, USA, Vo!.N, pp 175-180.
Gomm, J.B. and Vu, D.L. 1998, Order and delay selection for neural network modelling by identification of linearised models, Int .J. Systems Science, Vo1.31, No. 10, pp. 1273-1283. Leonard, J.A. and Kramer, M.A., 1991. Radial basis function networks for classifying process faults. IEEE Control System Magazine, No.4, pp 31-38.
Narendra, K..S. and Parthasarathy, K.., 1990, Identification and Control of dynamic systems using neural networks, IEEE Trans. Neural Networks, VoU, pp 4-27.
295
55 50
6
CL 45
i='
40 35 0
200
400
600
800
1000
1200
1400
1600
1800
0
200
400
600
800
1000
1200
1400
1600
1800
0
200
400
600
800
1000
1200
1400
1600
1800
8 7 J:
0.
6 5
100
~ ~'"
0
0.
0
sample time
Fig.2 The RBFN model output and process measurement
1.5
10
1'\
[\
5
--
?-
ID
0.5
!!?
!!?
0 0
-0.5
-5 0
50
100
150
0
200
50
100
150
200
sample lime
sample lime
30
20
:J, 10
'" !!?
0
-10 0
50
100
150
200
sample lime
Fig.3 Three residuals for three output variables ~
296