Fault Detection of Large Parameter Changes in a Wastewater Plant

Fault Detection of Large Parameter Changes in a Wastewater Plant

Copyright @IFACFault Deu:ction. Supervision and Safety for Technical Processes. Espoo. Finland. 1994 FAULT DETECTION OF LARGE PARAMETER CHANGES IN A ...

1MB Sizes 0 Downloads 33 Views

Copyright @IFACFault Deu:ction. Supervision and Safety for Technical Processes. Espoo. Finland. 1994

FAULT DETECTION OF LARGE PARAMETER CHANGES IN A WASTEW ATER PLANT

••

MJ. FUENTE , P. VEGA ,M.B. ZARROP

••

• Dept. Ingenieria de Sistemas y Automatica. Facultad de Ciencias, Universidad de Valladolid Cl Prado de la Magdalena SIN, 47011 Valladolid, SPAIN . •• Control System Centre, Department of Electrical Engineering and Electronics University of Manchester Institute of Science and Technology. Manchester M60 IQD, U.K. Abstract: This report deals with the detection and diagnosis of faults (FDD) when they develop in different parts of a wastewater treatment plant, situated in Manresa, Spain. When a fault occurs estunates . of parameters in a non-linear mathematical model of the plant change. Some methods for detectlO~ and tr~ck.ing the values of different parameters are proposed, where only large parameter changes are conSidered ill this work. The methods have a common structure with three basic elements: a basic identification algorithm , a detector of the parameter changes and an adaptive procedure for improving the tracking capability of the identifier. A set of simulation experiments are presented in order to compare them. Keywords: Fault Detection and Diagnosis, biotechnology, wastewater plant, estimation algorithms, RLS.

1.- INTRODUCTION

improve this method, different procedures for changing the identifier gain when a fault has been detected are presented. A set of simulation runs demonstrate the reliability of the RLS, and the other fault detection algorithms.

A wastewater plant is designed in order to clean the water from the effluent and return it to the river. Wastewater is a combination of watercarried wastes produced from domestic, commercial and industrial sources, called substrate. In most industrialised countries, legislation imposes limits on the quality of water discharged from the plant, where factors including public health, environmental concerns and economics are considered.

2.- PLANT DESCRIPTION The plant studied treats the wastewater from Manresa. A schematic of the plant is shown in Fig. I and a detailed description of it is given in Myatt (1992). TreaUnent comprises the steps:

Under nonnal operating conditions, the principal aim of the plant is to maintain the substrate at the output below certain reference values. To get this we need to maintain the microorganism concentration as constant as possible, in the face of variation of waste material in the input of the plant. There are certain fault conditions that make the biomass to decrease, and as consequence the process is stopped and the waste is not degrade. We need some mechanisms to detect them to improve the performance of the plant.

A pbysical-cbemical procedure that removes sand, oil and suspended solids. Aerobic treatment - activated sludge process: the stream is passed to a channel, where recycled activate sludge (RAS) is introduced and the flow is divided between six tanks, where the aerobic action of the biomass reduces the organic waste material in the water. Dissolved oxygen required is provided by aeration turbines, which mix oxygen into the water to be treated, in order to maintain the biomass in suspension and to ensure good contact between biomass, oxygen and substrate. Clarification: the effluent is fed to clarification tanks, where the activate sludge and clean water are separated. The water is discharged to the river. A good settling mixed liquor must be maintained in the tanks for effective operation of

The report begins with the description and a mathematical model of the biological part of the plant. The simulation results for different faults are presente
153

the process. This is achieved by returning enough activate sludge to facilitate the required degree of treatment. To maintain a stable biomass concentration in the tanks and a balance between the mass of microorganisms and the food available, it is necessary to remove a portion of the activate sludge (waste activate sludge WAS).

kdl is a constant. sir = ( si*qi + sr*qr) / q

(4)

where:si is the organic substrate concentration at the input of the plant and sr is the recycled organic substrate concentration

..... ..

~.

......

...

-

•.... J.AS; ...,... . . . . . . . . .

-

.. M'-,.

-- ....

oZ . ·

Fig. 2.- The aeration tank and the secondary clarifier scheme.

Fig. 1. Squematic diagram of Manresa plant.

Secondary clarifiers. The operation of the secondary clarifiers is described by mass balance equations and an expression to describe the settling of activate sludge. The model takes into account the difference in settling rate between layers of different and increasing biomass concentration (Fig.2). We consider three layers. The rate of change of biomass in the first layer is

2.1.- Mathematical Model of the Plant. We are interested only in the activate sludge and the clarification processes (Fig. 2). These two parts of the plant are modeled, (see Prada et al. 1992). The model is based on mass balance.

- Aeration tanks: Rate of change of biomass: dx

dxd ALd dt

2

s*x

x q - = I-1Y - kd - + - (xir - x) dt (ks +s) s V

The change of the biomass in the second layer is: dxb = qx + (ql- q2)xb + A(Vs(xd)+ Vs(xb» ALb d! (6)

(2)

where: q2 is the flow of activate sludge at the output of the clarifier and Lb the height of the intennediate layer

Rate of utilization of organic substrate: ds dt

x*s

x

= - 1-1* - - + kdl * -

ks + s

2

s

q ( . ) + - * slr - s

(5)

where: xd is the biomass concentration at the swface of the clarifiers, which goes out of the plant, q 1 the flow of clean water at the output of the clarifiers, xb the biomass in the intennediate layer, Vs the rate of settling of the activate sludge A the area of the clarifiers and Ld the height of the first layer.

where xi is the biomass that goes into the plant, qi the flow at the input of the plant. xr the recycled biomass and qr the recycled flow .

-

qlxd - AVs(xd)

(1)

where: x is the biomass concentration (mgll), s the organic substrate concentration, xir the inlet biomass concentration, 1-1 the specific growth rate, q the inlet flow (m 31h), V the volume of an aeration tank, y the fraction of substrate that is converted into biomass, kd a constant for any given set of operation conditions and ks the saturation constant xir = ( xi*qi + xr*qr )/q

= qlxb -

The concentration ofbiomass in the last layer is: dxr

(3)

ALr- = q2(xb - xr)+ AVs(xb) dt

V

where: sir is the inlet substrate concentration, and

(7)

The settling rate is calculated experimentally and

154

The aim is to detect the presence of faults, the time at which the fault occurs, which parameter has changed and to try to follow that change. This can be done via detection methods based on the RLS algorithm to estimate the process parameters.

the parameters are evaluated to fit a curve defined by experimental points: Vs(x) = nr

* x * exp(-ar * x)

(8)

The relations between the different flows are: q = qi + qr ql=q-q2 qr = q2 - qp

3.1.- The Recursive Least Squares Algorithm for Physical Parameter Estimation

Let us write the system model in a form which separates the known measured variables from the unknown parameters:

3.- FAULT DETECTION In this section some possible failures will be simulated It have been considered faults that can develop in the model parameters of the plant and which have a physical meaning.

yet) = 8(t-l)T cp(t) + e(t)

(9)

where yet) is the measured output from the process, cp(t) is either a vector or a matrix containing old inputs and outputs of the process, {e(t)} is a zero mean white noise sequence and 8 (t) is a parameter vector. A more detailed study of the RLS algorithm can be found in Ljung (1987) The RLS method generates the parameter vector:

a.- Change in the growth rate of the microorganisms: JL If the influent contains a high concentration of toxic metals, which kills the microorganisms. The biornass decreases suddenly and abruptly. This can be represented by: J.If=~const.

b.- Fault in the biomass settling rate in the clarifiers. We can see in Fig. 3 the curve which where E(t) is the output prediction error, k(t) is either a matrix or a vector for single output, of adjustment gains, k(t) = pet) cp(t), and pet) (the error of the estimated parameters covariance matrix).

describes the sedimentation rate under normal conditions and the straight line defining the flow recycled (a). When a fault develops the curve goes below the straight line, (c), the activate sludge does not settle, and the concentration of biornass recycled is very low. This phenomenon is called Bulking and can be described as a step in the

In our particular case, we are going to estimate the physical parameters directly. We have a set of differential equations that define our model. As we can see the substrate and biornass equations are linear respect to the J.l parameter. The xd and

parameter n r of the sedimentation rate. For fault detection and diagnosis we have to use the measured variables from the real system. In this case we suppose that all the variables: s, x, xd and xr are available. In the real plant we can have on-line measurements of all the flows. The measurements of the other variables are obtained by chemical analysis in the laboratory.

xr equations depend linearly on n r .This equation can be approximately discretised in the form dx

-d :::: t

_...

x(t + ~) - x(t) ~

= af(y(t» + g(z(t»

(11)

where ~ is the sampling interval, "a" is the parameter to be estimated and f, g are known functions of the variables of the system. This equation can be written as eq, (9) 8=a yet) = x(t + ~) - x(t) - ~ *g(z(t» cp(t) = ~* f(y(t»

•• ,11.

and the RLS is can be used as parameter estimator. Fig. 3.-Sedimentation of activate sludge curve

155

3.2.- The Recursive Least Square Algorithm for Detection and Diagnosis of Faults WD) .

ob;;

We will assume that the time instant at which the fault occurs and the nature of the fault are unknown. The requirements for a good FDD algorithms will be:

~I

1.- Rapid detection of the fault, in this case changes in the physical system parameters. 2.- Rapid convergence of the algorithm to the new values of the parameters. 3.- It must be possible to repeat the detection from the new modes of operation, i.e., when a fault has occurred and we get the new values of the parameters, this new point is the operation point at which we have to detect new faults. 4.- A change in the noise level must not disturb the detection. 5.- Low rate of false and missing alarms. 6.- It will be possible to detect different faults that occur simultaneously.

0. Il00

lt6 . 570

3)). )30

i;r!;Z~

e (t) with the RLS algorithm. 2.- To calculate the time derivative of the parameter vector: de /dt::::8 i (t+6)- 8 i (t) / 6, for

!:L ~J=C?

each component of the vector e (t), i.e., i=I, ... ,n, and 6 as the sampling time. 3.- To compare each derivative with a threshold: calculated experimentally. for any i=l, ... ,n=> A

fault in the component that has exceeded the threshold has occurred, (it is possible to detect more that one fault) . ~i

1'00. 000

1

400 000

changes in the two components ~ and n r, of e(t), when they develop simultaneously. We use two equations, one for the first component (s) and another for the second (xd). The results are presented in Fig. 5. We can see that both faults are detected separately, because the derivative of each parameter exceeds its respective threshold. We get the new values of the parameters, the first one very quickly in 2 sampling times, but the second one very slowly.

1.- To estimate the parameters vector: e (t) and 6

ii).- If de /dt <

1)) . 3]0

It has been used the multivariable RLS algorithm Soderstrom and Stoica (1989) to try to detect

When a fault develops in the system, the

i).- If d8/dt ~ ~i

• . &67

Fig 4.- The disturbances of low frequency

derivative of e changes, and when this function exceeds a threshold we can consider that a fault is detected. The FDD scheme :

~ i'

I

== . = 11

~n I~

I

~IFt

I

:1

'V i=I, ... ,n=> No fault.

::z-

J

(1 . (1)0

n . ln

I~ K .M '

100. 000 T

Ill. 110

'1&. 510

I

700. 000

t=t+ 1 and go to step 1. Fig 5.- Parameter estimation using RLS method, when two faults occurs simultaneously, and the evolution of the time derivative of e with its thresholds.

3.3.- Simulation Examples. We have carried out some experiments to validate the RLS algorithm on a wastewater plant. It has been consider that there are disturbances of low frequency and a Gaussian noise with zero mean is affecting the system. In Fig. 4 are represented the disturbances that exist in the plant, collected from the real plant.

As we can see the results of applying the classical RLS algorithm are not very good, although it can detect the faults rapidly and simultaneously, the method is very slow in reaching the new value of the parameter when the fault is detected. In order to improve the speed of convergence of the algorithm we are going to use two methods for the

156

P(t)-matrix positive definite Set t=t+ 1 and Go to Step 2.

detection of faults where the RLS algorithm will

be used as a starting point. These methods work on the basis of the detection of changes of and the detection of changes in &(t).

Hagglund (1983).

~e(t)

4.l. - Simulation Examples using the Hagglund Method 4. HAGGLUND METHOD

It has been simulated both faults simultaneously, This is based on the probabilities of the

an abrupt change in the parameters ~ and n r . The results can be seen in Fig. 6, where now we are able to detect both faults in 30 sampling times, and to get the new value of the parameters.

components of ~e(t) being positive or negative are almost the same in normal operation when no fault has occurred:

Pr[ 68 T (t )68( t - 1) > 0] '" Pr[ 68 T (t )68(

1) < 0]

t -

where Pr denotes the probability measure. When a fault has occurred, the estimated parameters will be driven towards the new values, then the following inequality holds:

Pr[ 68 T ( t )68( t - 1) > 0] > Pr[ 68 T (t )68( t - 1) < 0] The FDD algorithm is based on the implementation of these probabilities. When the fault is detected we modificate the gain in the RLS method. The algorithm:

l.- Initialise P(t) =0, and the P-matrix of the estimation algorithm: P(t) = P(t) + P(t) • I, with I, the identity matrix. 2.- Use the RLS algorithm with constant forgetting factor A., to calculate ~e ( t ) 3.- Calculate w(t) = Ylw(t -1)+ ~e(t)

0$

'Y 1$

Fig 6.- Parameter estimation using Hagglund method when two faults occurs simultaneously. The evolution of r(t) and its threshold and P(t).

1. It is a sum of the latest estimates of the increments. If a fault occurs, w(t) is an estimate of the direction of the parameter change. Calculate the test sequence T

s(t) =Sign[ ae (t)w(t

-I)].

5.-FA VIER AND ARRUDA ALGORITHM

This

sequence We consider the system (9), and the Weighted Recursive Least Squares method WRLS (Arruda et al. 1988), the algorithm is based in the changes of the &(t), and it is resumed here.

makes the test insensitive to the noise variance. Under normal operation, s(t) has approximately a symmetric two point distribution. When a fault has occurred, the distribution is no longer symmetric. Calculate r(t) = Y2 r(t-l) + (I - 'Y 2) s(t) 0

$

1.- Compute the detection criterion J(1). The fault detection method consists in comparing shorttenn and long-tenn estimates of the prediction error variance. Given any time-dependent

'Y 2

$l. 4.- Compare r(t) with a certain threshold r ' O which can be computed directly as a function of the rate offalse alarms (HAgglund 1983) ..

Ifr(t)

~ fo

quantity a(t) we define a function f(a, N s' N L)

=> a fault has occurred. Go to step 5.

1 NL f(a,N ,N ) = L a(t) s L NL-NS+lt="N s

If r(t) < fo => No fault. Set t=t+ 1, go to step 2. 5.- Modify the gain matrix P(t). Calculate a suitable P(t), which is chosen in order to keep the

157

(12)

6.- CONCLUSIONS.

Then:

Some FDD algorithms based on the RLS method have been studied. The methods have the same structure: a basic identification algorithm, a detection scheme for parameter changes and an adaptive procedure to a new situation after the change occurs. An application from a wastewater plant has been presented, where faults that develop in the physical parameters are detected. A fault is detected when certain statistics based on the parameter vector estimate, differing for each method, exceeds a threshold. A brief discussion of the results of applying each method to our system is given together with a set of simulation examples. We can realize that the Favier and Arruda algorithm is the best of them, it can detect the faults in two sampling times and can get the new value of the parameters rapidly, in four time instants, and it is possible to detect faults that occurs simultaneously.

(13)

where:

2

2

2

2

crc(t)=f(E (t),t-N 2 +1,t) cri (t)= f(E (t),t-N 2 -tau-NI +I , t-N 2 -tau)

O
and tau allows that the long-tenn estimation will be independent of the parameter changes. 2.-

Adapt

the

tracking

of the

capability

identification algorithm by tuning the value of tro as a function of the criterion value obtained in I . If 0 ::;; J(t) ~ Jmin => No detection: tro = trmin If Jmin < J(t) ::;; Jrnax => Uncertain detection :

tro

= trint

If J(t) > Jrnax=> certain detection:

tro

= trmax

7.-REFERENCES 3.- Apply the constant trace algorithm (WRLS) Favier G., Rougerie C., Bariani 1.P., do Amaral W., Gimeno L., and de Arruda L.y.R. (1988). "A comparision of Fault Detection Methods and Adaptive Identification Algorithms" . Prep. of the 8th IFAC Symp. on Ident. and System Parameter Est. Beijing, China, 757-762. Hagglund T.,(l983). "New Estimation Techniques for Adaptive Control". Doctoral Dissenation. Dept of Automatic Control, Lund University, Lund. Sweden .Ljung L.,(1987). "System Identification: a Users Guide to 1heoryw. Prentice Hall. Myatt 1.,(1992). "Applications of a Real-time Expert System for the Activate Sludge Process". Unidad de Ingenieria Qujmica. UAB. Bellaterra. Spain Prada C., Moreno R., and Lafuente 1., (1992). "Modelling, Simulation and Control of the Wastewater Treatment Plant". Internal report, Universidad Aut6noma de Barcelona. Barcelona. Spain. Soderstrom T. and Stoica P., (1989). WSystem Identification Prentice Hall. Well stead P.E. and Zarrop M.B.,(19). wSelfTuning Systems.' Control and Signal Processing

with the values of tro obtained in step 2.

5.1.- Simulation Examples with the Favier and Arruda method. Fig. 7 represents a change in the parameters

~

and n r . The algorithm tracks rapid parameter changes successfully. In the same graph it can be seen the time evolution of the detection criterion J and the thresholds. When J exceeds the upper threshold a fault is detected, this occurrs in twO sampling times. There are not false alarms.

':I~~ I~ ~

r o. OOD

W.

W

n .'"

• .• ,

~

~OIl . OGJ

1)1 .

no

JII . 11O

8.-ACKNOWLEDGMENTS

I

1OQ. 1IIXI

We would like to express our gratitude to the CICYT (Spain) for support throughout the project ROB91-1139-03-3 . The second author acknowledges the support of the SERC under grant GR\ F57809.

Fig. 7.- Parameter estimates using Favier and Arruda method. The detection criterion J(t) and its thresholds

158