Three Tank System Sensors and Actuators Faults Detection Employing Unscented Kalman Filter

Fault detection is critical for industrial applications to maintain a stable operation and to reduce maintenance costs. Many fault detection techniques have been introduced recently to cope with the increasing demand for more safe operations. One of the most promising fault detection algorithms is the Unscented Kalman Filter (UKF). UKF is a model-based algorithm that could be used to detect different fault types for a given system. On the other hand, the three-tank system is a well-known benchmark that simulates many industrial applications. The fault detection of the three-tank system is quite challenging as it is a Multi-Input Multi-Output (MIMO) nonlinear system. Therefore, UKF will be employed as a fault detection strategy for this system to detect sensor and actuator faults. The performance of the UKF will be investigated under different operating and fault conditions to show its merits for the given case study.


I. In t r o d u c t i o n
Fault detection and tolerance are gaining more interest recently especially for industrial dynamic systems. This is primarily because of the increasing demand for improved control system performance, in addition to higher safety and reliability standards [1]. Faults can originate from the main process elements such as sensors or actuators [2]. This can be noticed as an error in the accuracy of level, temperature, or flow measurements. Also, it could be represented by uncalibrated or defective actuators such as motors and valves [3], [4].
Fault detection is roughly categorized into model-based and model-free methods. As the name suggests, model-free methods do not require the mathematical model of the process. However, a state-space model is usually used for the model-based methods or the transfer function model in some cases [5]. The model parameters are required to be well identified and known. Unfortunately, some of the system parameters could be either unknown or it is hard to be identified. It is necessary to have a comprehensive knowledge of these parameters to describe and analyze the system's dynamics. The unavailable system parameters can disturb the control system performance, the diagnostic algorithms, and degrade the overall system reliability and safety. Such abnormalities when occurred occasionally make the system faults occur [6].
The interest of this paper is using a model-based method, which can be sub-divided into state vs parameter estimation approaches. Although the parameters are of great importance as stated above, obtaining an exact value can be quite challenging. Therefore, one of the approaches is to formulate the parameter estimation as a state estimation problem by defining the fault parameter as an additional state. In the traditional Kalman Filter (KF) approach, the states are estimated through two distinct steps. First, the healthy state model is developed, then the faulty state one. The fault is estimated by analyzing the plant model mismatch [7], however, the parameters estimation errors increase with the system uncertainty. So, the Unscented Kalman Filter (UKF) is introduced as a modified version of the KF such that the mathematical state-space model is used to get a precise estimation of the fault parameters [8]. Therefore using UKF can overcome some of the EKFs weaknesses, such as the requirement of differentiable state dynamics, and sensitivity to bias or divergence in the state estimates [9].
A three-tank system is used as a case study for this paper. it represents a typical system in the process industry, such as the fuel management system of airplanes and flight vehicles as well as applications in chemical and petrochemical industries. It is considered a valuable experimental setup for studying multivariable feedback control as well as fault diagnosis [10]- [12]. Some of the main parameters of this system such as the viscosity coefficients are uncertain due to the change in the liquid characteristics, aging effects, other environmental reasons as corrosion, scaling, and changing operating conditions. Some techniques have been previously proposed such as neural, fuzzy [13], [14], non-linear observers [15], the generalized likelihood ratio-based system [16], and the multiple model-based approaches [17]. Nevertheless, these approaches are unable to estimate the fault if the noise in the system is higher than the fault magnitude. The proposed UKF can estimate the faults with low magnitude compared to the presented noise in the system. Additionally, UKF utilizes the method of the direct nonlinear model as an alternative to linearizing it [9]. This eliminates the need to calculate Jacobian or Hessian. Also, it has a further advantage of a lower computational burden.
The paper structure is as follows: the three-tank system state-space model is given in Section II. Section III is devoted to the adaptation of the three-tank system model by the UKF approach. Results are presented in Section IV for sensor and actuator faults considering the noise effect and tunning the covariance and weighting matrices. The performance is evaluated at different operating conditions to test the system's robustness. Finally, the conclusions are highlighted in Section V.

II. Th r e e Ta n k s y s t e m Ma t h e m a t i c a l Mo d e l
The three-tank system is illustrated in Fig. 1. It includes similar cylinder-shaped tanks with a cross-section area A t . The tanks are linked through two cylindrical tubes of crosssection area Ap with similar outflow coefficients p13 and p32. The outflow is placed at the second tank with a crosssection area Ap with an outflow coefficient p2o. Two pumps supply the first and second tanks, while the third tank affects their levels. q1 and q2 are the flow rates of the pumps with a maximum value of Qmax. The system could be described by the following flow balance equations (1)-(3) [18], [19]: where qmn are the flow rate from tank m to tank n (m, n =1, 2, 3 and m ^ n), , L2, and L3 are the three-tank levels.
Based on Torricelli law the flow rate equals (4): where r(x(i))~Q where g is the gravity constant. Consequently, the flow rate for the three tanks will be (5)- (7): Thus, the flow balance equations for the first tank will be (8) and (9): for the second tank the flow balance equation is written as (10) and (11): If the presence of sensors' fault is considered, the sensor measurement does not equal the actual value, consequently, the output of the state space model will be: L' 1, L2 and L3 are the measured values from the sensors and ALt ALt and ALt are the differences between the actual and measured values.
In the case of the actuator faults, the fault appears in the input flow rates of the system pumps flow rates q^t) and q2 (t). The change in the flow rates could be represented in the added values to the nominal ones Aqt and Aq2. The state equation will be: where At T 0 and for the third tank rewritten as (12) and (13):

III. Un s c e n t e d Ka l m a n Fil t e r Pr o c e d u r e s
In the same framework, the procedures for implementing the UKF are presented in this section.

a) The System Model Extending
As a result, the three-tank system model could be written as: To estimate the fault in the three-tank system using UKF, the model states should be extended by the required unknown parameters, which is hard to be measured or determined by sen so rs. In particular, th e states o f th e three-tan k sy stem w ill b e ex ten d ed b y fiv e param eters:

1) Sensors ' fault
In such a scenario, the sensor faults are represented in adding an amount to the level measurement, which is undetermined by the utilized sensor. At t = 250 s, a decrease in the first tank level by 0.03 m is applied. The sensor still has the same reading without any change. The UKF estimates the actual level L1 as one of the estimated states in the process as shown in Fig. 2. Consequently, the UKF calculates the difference between both readings AL1, which in this case is 0.03 m as shown in Fig. 3. The same scenario is applied for the second tank but as an increase in the actual level value of 0.04 m. This amount is not considered by the sensor reading L2 as shown in Fig. 4. The UKF obtains the value of AL2 and it is equal to -0.04 m as shown in Fig. 5. The estimation response is very fast for both cases of sensor faults, it takes 4 s to reach the steady-state, and the values of the estimated parameters are error-free.

2) Actuators' fault
In this case, the actual value of the level sensors L' n is equal to the measured value Ln in all three-tank level measurements and the fault will occur at the feeding pumps of the system. The impact of the fault will appear in the input flow rates values of the system. An increase at the flow rate Q1 by 50 % of its nominal value at t = 250 s will be imposed. The applied closed-loop control for the system will maintain the first tank level to its reference value as shown in Fig. 6. Consequently, The UKF estimates the added values to the flowrate difference Aq-L as shown in Fig. 7. Another test is executed by reducing the flowrate Q2 by 20 % at t = 250 s as shown in Fig. 8. The UKF evaluates the value of Aq2 which causes a reduction in the flow rate Q2 as presented in Fig. 9. The estimation response for both cases of actuator faults takes 8 s to reach steady-state and values of the estimated parameters are without error as it is a noise-free case.     UKF estimation response considering the system noise of the estimation tolerance is around 0.05 m. In this case, the mean value of the calculated error from the estimated signal for 1000 data points, which represents 100 s, is 1 %. The fault is repeated at various values for different tank levels and they have the same response as shown in Table III.

2) Actuators ' fault
Similarly, at the same noise condition, an increase in the flow rate Q1 by 50% of the operating point is occurred, the UKF estimates the value of Aq1 after 125 s, and the estimation tolerance is around the added value as shown in Fig. 11. The percentage of the mean value of the calculated error from the estimated signal for 1000 data points is 7 %. The fault is repeated for flow rate Q2 with different values of Aq , and the estimation of the UKF shows the same response as shown in Table IV. In order to simulate the real operating conditions, a white measurement noise with a standard deviation of 0.01 is added to the measured signal from the level sensors. In this case, the estimation response is affected by the added noise and the weighting matrices, Qk and Rk , is very important for the estimation response performance. The tuning of the weighting matrices depends on the expected values of the measurements and output noise in the system. Thus, for the proposed case, the evaluation time constant ft is chosen to be 100 s to deliver a suitable estimation response.   (3.5 X 10"6) 4.7 X 10"6 10% X q 2 (3.75 X 10"6) 5.02 X 10"6 2 20% X Qt (7 X 10"6) 8.212 X 10"6 20% X Q2 (7.5 X 10"6) 8.8 X 10"6 3 30% X Qt (10.5 X 10"6) 11.71 X 10"6 30% X Q2 (11.2 X 10"6) 12.6 X 10"6 4 40% X Qt (14 X 10"6) 15.21 X 10"6 40% X Q2 (15 X 10"6) 16.3 X 10"6 5 50% X Qi (17.5 X 10"6) 18.71 X 10"6 50% X Q2 (18.7 X 10"6) 20 X 10"6 [AQn/Qn] (%)

1) Sensors ' fault
3) The weighting matrices tuning The change in the weighting matrices, Qk and Rfc, affect both the estimation time response and the percentage of the estimation error. Fig. 12 shows the effect of changing the evaluation time constant ft in the estimation response. It is noticed that the increase in ft of the estimated parameters is followed by a decrease in the parameters estimation error percentage as shown in Fig. 13 and Fig. 14. However, the estimation time response increases with the increase of ft as illustrated in Fig. 15. The estimation error and time in the case of sensors' fault is less than the actuators' fault case due to the difference in the values of the estimated parameters.

C) UKF estimation response with multi-operating points
To assure the successful operation of the studied technique in various operating conditions, the first tank level reference is step changed every 500 s without noise in the presence of a sensor false reading of AL1 = -0.03 m applied at t = 250 s as shown in Fig. 16a. The UKF shows constant estimation response with the change of the operating point as shown in Fig. 16b. Likewise, the UKF has a constant estimation response for the level and flow rate difference in the case of the first pump fault of Aq1 = 17.5 X 10"6 as illustrated in Fig. 17.