Implementation of a sensor fault reconstruction

0 downloads 0 Views 371KB Size Report
However, if left undetected for a long time, these faults could ... ˙ˆx(t)=(A − LC1)ˆx(t)+(B − LD1)u(t) + Ly1(t) (5) where ˆx ∈ R n .... arms are mounted in such a way that they can swing freely only in the ... keep the pendulum at the upright position, by only controlling the ... where u is the input force in Newtons, l is the length of.
Implementation of a sensor fault reconstruction scheme on an inverted pendulum Chee Pin Tan† and Maki K. Habib‡ School of Engineering and Science Monash University Malaysia 2 Jalan Kolej 46150 Petaling Jaya Selangor Malaysia email: † [email protected][email protected] Abstract This paper presents a robust sensor fault reconstruction scheme, using an unknown input observer, applied to an inverted pendulum. The scheme is adapted from existing work in the literature. A suitable interface between the pendulum and a computer enabled the application. Very good results were obtained.

1 Introduction Fault detection and isolation (FDI) is a very important area. A fault is deemed to have occurred when the system experiences an abnormal behaviour, such as a malfunction [2]. Faults, if not detected (and thence rectified) soon enough, could have catastrophic consequences such as loss of human life, environmental pollution, or economic losses. For cases in which the consequences of a fault are not so severe, the early detection of a fault can help improve efficiency, productivity, reliability, and generate financial savings. There is therefore, a need for effective fault detection and isolation. The fundamental purpose of an FDI scheme is to generate an alarm when a fault occurs (detection), and then to determine the location of the fault (isolation), so that corrective action or preventive measures can be taken to eliminate or minimize the effect of the fault. Overviews of work done in fault detection are available in [2, 8, 15, 14, 6, 9, 19, 7]. In the literature, faults can occur at two places - the actuators and sensors. Actuator faults are faults that act on the system, resulting in the deviation of the process variables. An example of actuator faults might be damage to a control surface on an aircraft, resulting in the rudder being inoperable. The result is the com-

mand (control) signal sent to this device has no effect. Sensor faults are faults that act on the sensors that measure the system variables, and do not directly affect the process. The source of these faults could be wear and tear of the sensor leading to inaccurate readings, or a total failure of the sensor. These faults will affect the process if the output measurements are used to generate the input control signal. A fault, apart from being classified into location of occurence, can also be classified into two other categories: abrupt (quickly varying) and incipient (slowly varying). The effect of abrupt faults are usually obvious; the system will exhibit a sudden unexpected change (and could cause the entire system to fail). In the case of sensor faults, an example would be when the sensor experiences a total failure, yielding a measurement reading of zero. Incipient faults are more subtle, and the effects are not so obvious, sometimes even negligible. This situation results usually from wear and tear on the components, possibly due to frequent use without calibration. In the short term, at worst they cause the efficiency of the system to be degraded. However, if left undetected for a long time, these faults could prove catastrophic and disastrous. It is therefore in the best interest of all to detect these incipient faults as soon as possible. Observer-based methods are commonly used as a basis for FDI schemes. Residual generation approaches, using linear observers, have been widely used, where the difference between the system output and observer output is processed to form so-called residuals. Ideally, these will be zero during fault-free operation but will give a specific response when a certain fault occurs. Residual generation techniques have been demonstrated in [20, 13, 3, 18]. In this paper, instead of generating residuals, the FDI

scheme attempts to reconstruct the fault [16, 5, 17, 4]. Fault reconstruction is different from the majority of FDI methods described previously in the sense that it not only detects and isolates the fault, but provides an estimate of the fault. This approach is very useful for incipient faults and slow drifts, which are very difficult to detect. This paper presents a robust sensor fault reconstruction scheme, using an unknown input observer (UIO), applied to an inverted pendulum. An inverted pendulum is an unstable system with fast dynamics, and any corruption to its sensors could prove catastrophic if not detected on time. The pendulum is interfaced to a computer using the Real Time Workshop [12] in the Matlab and Simulink environment, where the fault reconstruction scheme is. The fault reconstruction scheme is an adaption from the unknown input observer work of Hou & Muller [11]. Then a design method is implemented to design the observer so that the fault reconstruction will be robust to system uncertainties and nonlinearities, using the Bounded Real Lemma [1], similar to the method by Tan & Edwards [17]. In this paper, an incipient fault will be injected to the angle sensor, and the fault reconstruction scheme will attempt to reconstruct it. Very good results were obtained.

where y1 ∈ Rp−q and C1 , C2 , D1 , D2 are appropriate partitions. The output vector has now been partitioned into non-faulty (y1 ) and faulty (y2 ) components. Notice now that systems (1) and (3) make up a faultfree system. Consider an observer for the fault-free system defined by (1) and (3) x(t) + (B − LD1 )u(t) + Ly1 (t) (5) x ˆ˙ (t) = (A − LC1 )ˆ where x ˆ ∈ Rn is an estimate for the state x, and L ∈ n×(p−q) R is a design matrix. Define e := x − x ˆ

(6)

as the state estimation error and combine equations (1), (3) and (5) to yield e(t) ˙ = (A − LC1 )e(t) + Qξ(t, x, u)

3 Robustly reconstructing the sensor fault Define a (measurable) reconstruction for the sensor fault f (t) ˆ(t) − Du(t)) fˆ(t) = W Tr (y(t) − C x

2 The observer

where

The work in this section is an adaptation from the work of Hou & Muller [11]. Consider a system subject to sensor faults as well as uncertainty at the input x(t) ˙ = y(t) =

Ax(t) + Bu(t) + Qξ(t, x, u) Cx(t) + Du(t) + F f (t)

(1) (2)

where x ∈ Rn are the states, y ∈ Rp are the measured outputs, u ∈ Rm are the inputs, f ∈ Rq are the sensor faults. The vector ξ ∈ Rk encapsulates the uncertainty present in the system. For how to let the vector ξ encapsulate the uncertainty, see Chapter 5 of [2]. Assume without a loss of generality that rank(C) = p, rank(F ) = q and assume p ≥ q. Let Tr ∈ Rp×p be an orthogonal matrix such that   0 Tr F = F2 where F2 ∈ Rq×q is nonsingular. The matrix Tr can be computed by a simple QR decomposition on the matrix F . Scaling the output vector y by Tr , and then partitioning appropriately would yield y1 (t) = y2 (t) =

C1 x(t) + D1 u(t) C2 x(t) + D2 u(t) + F2 f (t)

(3) (4)

(7)

W =



W1

F2−1



(8)

(9)

with W1 ∈ Rq×(p−q) being a design matrix. Substituting for x ˆ from (6) into (8) will yield fˆ(t) = W Tr (y(t) − Cx(t) − Du(t) + Ce(t))

(10)

Equation (2) will cause (10) to be fˆ(t) = W Tr F f (t) + W Tr Ce(t)

(11)

From the definition of W in (9) as well as the effect of Tr on F , and define ef := f − fˆ as the error in fault reconstruction, equation (11) will become (12) ef (t) = −W Tr Ce(t) Equations (7) and (12) show the effect of the uncertainty ξ on the quality of the fault reconstruction. The objective now would be to minimize the effect of ξ on the reconstruction error ef . This can be achieved using the Bounded Real Lemma [1]. In the absence of uncertainty, ξ = 0, and the state estimate x ˆ will asymptotically tend towards x, resulting in the fault reconstruction tending towards a perfect reconstruction, fˆ → f .

From the Bounded Real Lemma, if there exists a symmetric positive definite matrix P ∈ Rn×n that satisfies the following inequality ⎤ ⎡ P (A − LC1 ) + (A − LC1 )T P P Q (W Tr C)T ⎦< 0 ⎣ QT P −γIk 0 0 −γIq W Tr C (13) then the L2 gain from ξ to ef will not exceed γ, where γ is a positive scalar. 3.1 Existence condition The condition for this method to be feasible would be the existence of the observer described in equation (5), which in turn would depend on the detectability of the pair (A, C1 ). If the system is open loop stable, then the pair (A, C1 ) is detectable. If there are any open loop unstable modes, then the detectability will depend on C1 . The matrix C1 is dependent on Tr , which is in turn dependent on F . The greater the number of faulty sensors q (rank of F ), the less the rank of C1 , and the greater the possibility the sensor fault reconstruction scheme described in §3 will fail. For further details on this, see [17].

4 Designing the observer

freely only in the vertical plane. It is manufactured by Feedback Ltd. UK. Examples of such an application are rockets during take-off, and humanoid robots. The cart is drive by a traction belt, which is in turn driven by a DC motor. The objective of the system is to keep the pendulum at the upright position, by only controlling the linear movement of the cart. There are 4 outputs and 1 input to the system. The outputs are cart position x, pendulum angle θ (measured from the upright vertical), cart velocity x, ˙ and pendulum velocity θ˙ while the input is the voltage V to drive the DC motor. The derivative outputs x˙ and θ˙ are obtained by passing the original outputs x and θ through a wash-out filter with the transfer function 104 s s2 + 70.7s + 104 The system is interfaced with Matlab using Real-TimeWorkshop Toolbox [12], where outputs are fed into Matlab for processing to generate the control input signal. 5.1 Modelling the inverted pendulum The inverted pendulum can be modelled by the following mathematical equations ˙ a(u − fc x˙ − µθ˙2 sin θ) + l cos θ(µg sin θ − f θ) (17) J + µl sin2 θ˙ l cos θ(u − fc x˙ − µθ˙2 sin θ) + µg sin θ − f θ˙ θ˙ = (18) J + µl sin2 θ

x˙ = In this paper, the observer will be designed as follows: minimize γ subject to the following inequalities ⎤ ⎡ P A + AT P − 2C1T V −1 C1 P Q (W Tr C)T ⎦< 0 (14) ⎣ QT P −γIk 0 0 −γIq W Tr C P >0

(15)

where V ∈ R(p−q)×(p−q) are symmetric positive definite design matrix and P ∈ Rn×n is symmetric. This problem can be easily implemented using the LMI Control Toolbox [10]. The solver will return values for P, γ, W1 . Then, calculate the gain L by L = P −1 C1T V −1

(16)

Inequality (14) is simply the special case for (13) where L is constrained as in (16). The reason for this is to incorporate the design variable V to influence the ‘size’ of the gain L.

5 Implementation on the inverted pendulum The inverted pendulum is a single input multi output system. It consists of a cart moving on an elevated track with two free swinging arms attached to it. The arms are mounted in such a way that they can swing

where u is the input force in Newtons, l is the length of the pendulum stick, f is the friction coefficient of pole rotation, fc is the friction coefficient of the cart, g is gravitational acceleration, J is the moment of inertia of the pendulum cart system with respect to the centre of mass, and they have the values of l = 0.402m, g = 9.81ms−2 , mc = 1.12kg, fp ≈ 0 mp = 0.11kg, fc = 0.05N sm−1 , J = 0.0136kgm2 The other constants are a = l2 +

J , µ = l(mc + m) mc + m

In order to get a linear model, some approximations were done on equations (17) - (18). The equations were linearized about the operating condition of θ and θ˙ being very small. In addition, a modification was made to the input distribution matrix, because the control input for the Simulink model is the motor voltage, while the control input for the equations (17) - (18) above is the force acting on the cart. From the data sheet provided by Feedback Ltd., the maximum motor voltage is 2.5 V, and it corresponds to a maximum force of 17.463 Newtons. Therefore, whatever model obtained

from equations (17) - (18) would need to be multiplied 2.5 by a factor of 17.463 . After linearizing the equations, the following statespace model was obtained ⎡ ⎤ ⎡ ⎤⎡ ⎤ 0 0 1 0 x(t) x(t) ⎥ ⎢ ⎢ ⎥ 0 0 1 ⎥ d ⎢ ⎢ θ(t) ⎥ = ⎢ 0 lµg ⎥ ⎢ θ(t) ⎥ afc lf ⎦ ⎣ ⎣ ⎦ ⎣ ⎦ ˙ x(t) ˙ 0 J − J −J dt x(t) µg lfc f ˙θ(t) ˙ θ(t) 0 J − −J J   A

⎤ 0 ⎢ 0 ⎥ 2.5 ⎥ +⎢ ⎣ a ⎦ 17.463 u(t) ⎡



J l J

B

x

(19)



Since all states were available and there is no direct feedthrough from the input to output, ⎡ ⎤ ⎡ ⎤ 0 1 0 0 0 ⎢ 0 1 0 0 ⎥ ⎢ 0 ⎥ ⎥ ⎢ ⎥ C=⎢ ⎣ 0 0 1 0 ⎦, D = ⎣ 0 ⎦ 0 0 0 1 0 5.2 A stabilizing controller Feedback Ltd. had provided a controller to stabilize the pendulum in its upright position. Denote ˙ respecy1 , y2 , y3 , y4 as the measurements of x, θ, x, ˙ θ, tively, and rx as the reference signal for the cart displacement x. The reference signals for the other quantities are set to zero. Let e1 , e2 , e3 , e4 denote rx − y1 , −y2 , −y3 , −y4 respectively (the error signals). The controller that Feedback Ltd. has provided is such that the control input is u = −7e1 + 50e2 − 4e3 + 3.5e4 − 0.35|e3 | 5.3 Designing the observer In this paper, the fault of interest would be the fault on the angle θ sensor, because it could destabilize the system from its upright vertical position if its magnitude is large enough and left undetected. Since the fourth output θ˙ is obtained from the measurement of θ, it would also be fault-prone. However, in this paper, only slowly varying incipient faults are considered, hence the fault on the θ˙ output can be negligible. Therefore the fault distribution matrix F in (2) is ⎡ ⎤ 0 ⎢ 1 ⎥ ⎥ F =⎢ ⎣ 0 ⎦ 0 In the modelling of the system in §5.1, it was assumed that the relationship between the motor voltage and force on cart was just a scaling. It is well known however, that the relationship is a second order system,

therefore it is clear that those dynamics have been neglected. Those unmodelled dynamics could corrupt the fault reconstruction, therefore it is desired to make the reconstruction robust towards them. Hence, the matrix Q in (1) was chosen to be B. The design matrix V in §4 was chosen to be ⎡ ⎤ 100000 0 0 0 10000 0 ⎦ V =⎣ 0 0 1 Implementing the design method 4 yielded the following gains ⎤ ⎡ −0.0169 0.0068 −9.6501 ⎢ 0.5626 −0.2242 287.7205 ⎥ ⎥ L=⎢ ⎣ −0.1318 0.0527 −68.2467 ⎦ 3.3061 −1.3176 1690.9356   W1 = −0.1761 −0.1675 −0.1698 as well as a value of γ = 0.0147. 5.4 Results: Fault-free test A fault-free test was first performed, and the results are shown below. 0.04

0.03

0.02

0.01

0

−0.01

−0.02

−0.03

−0.04

0

10

20

30

40

50

60

70

80

90

Figure 1: The fault reconstruction in the fault-free situation.

Figure 1 shows the reconstruction of the fault, and in the absence of faults, it’s almost zero. Figure 2 shows the cart displacement, and as can be seen, it does not move, as there is no reference demand signal for it. 5.5 Results: Faulty test A fault was then applied to the angle θ sensor, and the results are shown below. Figure 3 shows the fault that is applied to the angle sensor. Figure 4 shows the reconstruction. It can be seen that the shape of the fault is underlying the noisy reconstruction. Figure 5 shows the position of the cart. It can be seen that there is movement even though there is no reference signal. This is due to the control input, which has received faulty information from the sensors.

0.2

0.04

0.15

0.03

0.1

0.02

0.05

0.01

0

0

−0.05

−0.01

−0.1

−0.02

−0.15

−0.03

−0.2

0

10

20

30

40

50

60

70

80

90

Figure 2: The cart displacement in the fault-free situa-

−0.04

0

10

20

30

40

50

60

70

80

90

Figure 4: The reconstruction of the applied fault signal.

tion. 0.25 0.04 0.2 0.03

0.15 0.1

0.02

0.05

0.01

0 0 −0.05 −0.01

−0.1 −0.15

−0.02

−0.2

−0.03

−0.25 −0.04

0

10

20

30

40

50

60

70

80

0

10

20

30

40

50

60

70

80

90

90

Figure 3: The fault signal applied to the angle sensor.

Figure 5: The position of the cart. The unit is metres.

The unit is radians.

6 Conclusion 5.6 Results: Faulty test with cart position reference A further test was done with the same fault as in §5.5. This time, the cart is set to follow a certain reference signal as shown in Figure 6. Figure 6 shows the reference signal that the cart is supposed to follow. Figure 7 shows the fault reconstruction. In this case, it is still very close to the actual fault. Figure 8 shows the position of the cart. It does not follow the reference position, because of the faulty sensor. In fact, if the reference position is subtracted away, the remainder will be exactly as in Figure 5.

This paper has presented a robust sensor fault reconstruction scheme, using an unknown input observer, applied to an inverted pendulum. The software ‘RealTime Windows Target’ interfaced the pendulum to a computer. The results show that the observer reconstructs very well the fault, and that the method is successful.

References

From the results obtained in §5.4, 5.5 and 5.6, it can be seen that

[1] S.P. Boyd, L. El-Ghaoui, E. Feron, and V. Balakrishnan. Linear Matrix Inequalities in Systems and Control Theory. SIAM: Philadelphia, 1994.

1. The fault reconstruction is nearly zero (zero mean white noise) in the fault-free situation.

[2] J. Chen and R.J. Patton. Robust model-based fault diagnosis for dynamic systems. Kluwer Academic Publishers, 1999.

2. The fault reconstruction scheme reconstructs the fault perfectly when a fault is injected. 3. The fault reconstruction scheme reconstructs the fault very well even though a reference position signal is applied to the cart.

[3] R.K. Douglas and J.L. Speyer. Robust fault detection filter design. Proceedings of the American Control Conference, Seattle, Washington, pages 91–96, 1995. [4] C. Edwards and S.K. Spurgeon. A sliding mode

0.25

0.25

0.2

0.2

0.15

0.15

0.1

0.1

0.05

0.05

0

0

−0.05

−0.05

−0.1

0

10

20

30

40

50

60

70

80

90

Figure 6: The reference signal for the cart positon, rx .

−0.1

0

10

20

30

40

50

60

70

80

90

Figure 8: The position of the cart.

0.04

linear systems with unknown inputs. IEEE Transactions on Automatic Control, 37:871–875, 1992.

0.03

0.02

[12] The MathWorks Inc. Real-Time Workshop - For Use with Simulink. The MathsWorks Inc., 2000.

0.01

[13] J.F. Magni and P. Mouyon. On residual generation by observer and parity space approaches. IEEE Transactions on Automatic Control, 39:441– 447, 1994.

0

−0.01

−0.02

−0.03

−0.04

0

10

20

30

40

50

60

70

80

90

Figure 7: The reconstruction of the applied fault signal observer based FDI scheme for the ship benchmark. European Journal of Control, 6:341–356, 2000. [5] C. Edwards, S.K. Spurgeon, and R.J. Patton. Sliding mode observers for fault detection and isolation. Automatica, 36:541–553, 2000. [6] P.M. Frank. Fault diagnosis in dynamic systems using analytical and knowledge based redundancy a survey and some new results. Automatica, 26:459– 474, 1990. [7] P.M. Frank. Enhancement of robustness in observer-based fault detection. International Journal of Control, 59:955–981, 1994. [8] P.M. Frank. Analytical and qualitative model-based fault diagnosis - a survey and some new results. European Journal of Control, 2:6–28, 1996. [9] P.M. Frank and X. Ding. Survey of robust residual generation and evaluation methods in observerbased fault detection systems. Journal of Process Control, 7:403–424, 1997. [10] P. Gahinet, A. Nemirovski, A.J. Laub, and M. Chilali. LMI Control Toolbox, Users Guide. The MathWorks, Inc., 1995. [11] M. Hou and P.C. Muller. Design of observers for

[14] R.J. Patton and J. Chen. A survey of robustness problems in quantitative model-based fault diagnosis. Applied Maths and Computer Science, 3:339– 416, 1993. [15] R.J. Patton, P.M. Frank, and R.N. Clark. Fault Diagnosis in Dynamic Systems: Theory and Application. Prentice Hall, New York, 1989. [16] C.P. Tan and C. Edwards. Sliding mode observers for detection and reconstruction of sensor faults. Automatica, 38:1815–1821, 2002. [17] C.P. Tan and C. Edwards. Sliding mode observers for robust detection and reconstruction of actuator and sensor faults. International Journal of Robust and Nonlinear Control, 13:443–463, 2003. [18] J.E. White and J.L. Speyer. Detection filter design: spectral theory and algorithms. IEEE Transactions on Automatic Control, 32:593–603, 1987. [19] A.S. Willsky. A survey of design methods for failure detection in dynamic systems. Automatica, 12:601–611, 1976. [20] Q. Zhang, M. Basseville, and A. Benveniste. Fault detection and isolation in nonlinear dynamic systems: a combined input-output and local approach. Automatica, 34:1359–1373, 1998.

Suggest Documents