A New Hybrid Robust Fault Detection of Switching Systems by Combination of Observer and Bond Graph Method

In this paper, the problem of robust Fault Detection (FD) for continuous time switched system is tackled using a hybrid approach by combination of a switching observer and Bond Graph (BG) method. The main criteria of an FD system including the fault sensitivity and disturbance attenuation level in the presence of parametric uncertainties are considered in the proposed FD system. In the first stage, an optimal switching observer based on state space representation of the BG model is designed in which simultaneous fault sensitivity and disturbance attenuation level are satisfied using H−/H∞ index. In the second stage, the Global Analytical Redundancy Relations (GARRs) of the switching system are derived based on the output estimation error of the observer, which is called Error-based Global Analytical Redundancy Relations (EGARRs). The parametric uncertainties are included in the EGARRs, which define the adaptive thresholds on the residuals. A constant term due to the effect of disturbance is also considered in the thresholds. In fact, a two-stage FD system is proposed wherein some criteria may be considered in each stage. The efficiency of the proposed method is shown for a two-tank system.


INTRODUCTION
Fault diagnosis has become an important topic in industrial applications, which further leads to more attention in research community. Model based fault detection, isolation and identification has received much attention in the literature [1], [2], [3], [4], [5], [6].
Generally, obtaining a proper model of the system is crucial for fault diagnosis design. Presenting a proper model by considering multi physics nature and the interaction between continuous and discrete dynamics of the system is a challenging task in the model based FD system design for hybrid systems. Bond Graph (BG) method may be considered as a convenient tool for modeling and fault diagnosis of dynamic systems. Different applications of the BG method can be found in the literature for modeling [7], [8], [9], [10], [11], [12] and fault diagnosis [12], [13], [14], [15], [16] applications. Because of its efficiency in modeling and fault diagnosis of continuous dynamic systems, the BG method is developed to represent switching phenomenon in hybrid dynamic systems, which leads to numerous applications of the method for modeling and fault diagnosis of hybrid systems in the literature.
Due to the advancement of computer technology in control systems, switching systems have drawn much attention in recent years. Switching systems may be assumed as an important class of hybrid systems wherein a finite number of dynamical subsystems and a logic rule define the overall dynamic of the system. The dynamic of the subsystems and thus, the overall system may be continuous or discrete, linear or nonlinear and so on. In this current paper, the linear continuous case of the switching system with average dwell time is considered.
Fault detection of the switching systems draws much attention in recent years. In [17], fault detection problem for a class of linear switched time varying delay system is formulated as H ∞ filtering problem with ADT in LMI form. A filter based fault detection approach for continuous time switching systems with ADT is considered in [18]. Simultaneous Fault Detection and Control (SFDC) for continuous and discrete time linear switched systems with ADT based on dynamic filter is tackled in [19] wherein a fault sensitivity is achieved for a given disturbance attenuation level based on H − /H ∞ criteria. The robustness of an FD system, which is defined as the considering the effects of uncertainties, disturbances and noises in the system, may be regarded as the most important criteria in an FD system. However, it is impossible to completely removal the effects of uncertainties, disturbances and noises in an FD system. Thus, many studies are devoted to attenuate the effects of disturbances, uncertainties and noises in an FD system. In other hand, the attenuation of disturbance effects may lead to reduce the fault sensitivity in an FD system. Therefore, the fault sensitivity must also be considered in an FD system design.
The effects of uncertainties in the model may lead to missed or false alarms in the FD system. Toward this end, two approaches are proposed in the literature including active and passive approaches [20]. In active approach, the robustness of the FD system is defined in the residual generation stage, while the robustness is considered in the residual evaluation stage in the passive approach [20].
In [21], the robust fault detection filter design of continuous time switched delay systems is considered. Design of observer-based robust power system stabilizers by considering parametric uncertainties is noticed in [22]. The parametric uncertainty representation in the BG method in Linear Fractional Transformation (LFT) form is presented in [23] and noticed in thereafter studies for robust fault diagnosis [24], [25]. Robust fault diagnosis of energetic system with parameter uncertainties is tackled in [24]. The nonlinear modeling, structural analysis, residual generation with adaptive thresholds and sensitivity analysis are done using the BG method. The proposed method is then used for a boiler system. The modeling and fault diagnosis of a DC motor relying on the BG method is given in [16]. The parameters of the BG method are obtained using the real data of the system. The average values of the parameters and their standard deviations are assumed as the nominal values and uncertain parts of the parameters, respectively. In [25], the residuals and thresholds generation in presence of parameter uncertainties in LFT form is considered and is applied for mechatronic systems. Robust fault diagnosis and prognostics of a hoisting mechanism based on the BG method considering the LFT form of the parametric uncertainties is addressed in [26].
Several studies are concentrated on the fault diagnosis of switched system and robust fault diagnosis of continuous time systems as well, while there are few works on the robust fault diagnosis of switched systems. Incremental BG approach is given for hybrid systems in [27], which is an extension of the proposed method in [28] for continuous time dynamic systems. The adaptive thresholds are obtained considering the parametric uncertainties in the system, which are dependent on the modes of the hybrid system as well. In [29], a robust fault detection and isolation on the basis of pseudo BG model for hybrid systems is presented. The parametric uncertainties are given in the LFT form and are assumed 2% of their nominal values at maximum.
Robust FD systems based on the BG method may be considered as the passive approach, since some thresholds are assumed in the FD system to detect or isolate the occurred faults. In this paper, based on the BG method, a new active robust FD system is proposed in which the disturbance is attenuated, the effects of uncertainties are considered and the fault sensitivity is enhanced as well. The proposed method has the benefits of both the BG and the observer method.
In summary, the main contributions of the paper may be stated as follows: • A new robust active fault detection based on the combination of the observer and BG method for linear switched system is presented, which simultaneously attenuates disturbance level and enhances fault sensitivity.
• Error form of the GARRs is used as the residuals which is based on the output estimation error of the observer.
• The effects of disturbance and parametric uncertainties in the thresholds are considered as a fixed threshold and an adaptive threshold, respectively.
The remainder of the paper is organized as follows. The problem formulation and some lemmas and remarks based on these lemmas are given in section 2. The Research Method of the paper is given in five subsections of section 3 as disturbance attention level, enhanced fault sensitivity, simultaneous optimal fault sensitivity and disturbance attenuation level, the GARRs in error form based on the BG method and robustness of the FD system against parametric uncertainties. The simulation results and discussion for a two-tank system are given in section 4, follows by conclusion in section 5.

PROBLEM FORMULATION AND PRELIMINARIES
Consider the continuous time linear switching system state space representation in the form oḟ which can be given as Eq.
(3) -Eq.(4) based on the BG model of the switching system.
where x ∈ R n is the states, y ∈ R p is the outputs, u ∈ R k is the inputs, d ∈ R q is disturbances and f ∈ R r is faults in the switched system. A ,B and C are respectively system, input and output matrices with appropriate dimensions denote the system, input and output matrices, respectively. .
where L i is the observer gain and is dependent on the active mode of the BG model. The observer gain is designed for each mode in such a way that some criteria are satisfied.
The output estimation error, which is defined as Eq. (6), is used in the new form of the GARRs.
The asymptotical stability of the observer is investigated on the error dynamic of the observer as Eq. (7).
The output estimation error is achieved as Eq. (8).
In this paper, two criteria are considered for the output estimation error of the observer for disturbance attenuation level and fault sensitivity, which is presented in Eq.(9) and Eq.(10), respectively.
The following definitions and lemmas are used in the current paper.
Definition. Let N δ (t 1 , t 2 ) stand for the switching number of δ(t) on the interval [t 1 , t 2 ) for a given switching signal δ(t) and any t 2 > t 1 > t 0 . If Eq.(11) is satisfied for N 0 ≥ 0 and τ a > 0, then τ a is called the ADT and N 0 is chatter bound [30].
V is called the Lyapunov function. Remark 1: In order to use the Lemma 1 in this paper, the u and y are substituted by d(t) and e y (t), respectively, which indicate the disturbance attenuation level on the output estimation error of the observer.
Lemma2: For the continuous time switching system Eq.(1) and Eq. (2), let α > 0, µ ≥ 1 and β i > 0, ∀i ∈ l be constant scalars. Suppose there exists positive definite C 1 function V δ(t) : R n → R, δ ∈ l with V δ(t0) (x(t 0 )) = 0, which is called Lyapunov function, such that [32]: then the switching system is GUAS and will satisfied H − performance as Eq. (10) with index β no smaller than min(β i ) for any switching signal with ADT as Eq. (13). Remark 2: In order to use the Lemma 2 in this paper, the u and y are substituted by f (t) and e y (t), respectively, which indicate the fault sensitivity on the output estimation error of the observer.
Lemma 3 [33]: For a given m × m symmetric matrix Z ∈ S m and two matrices U and V of column dimension m, there exists matrix X that is unstructured and will satisfy Eq. (15).
if and only if the following inequalities as Eq. (16) and Eq. (17) with respect to X are satisfied.
N U and N V are arbitrary matrices that their columns are a basis for null spaces of U and V , respectively.

RESEARCH METHOD
In this section, the LMI formulation for fault detection problem of linear continuous time switched system Eq.(1)-Eq.(2) is given. The overall results are given in five subsections.

Disturbance attenuation performance in the output estimation error of the switched observer
The switching Lyapunov function for disturbance attenuation criterion of the observer is considered as Eq. (18), which its derivative must be negative definite as Eq. (19).
The switching Lyapunov function derivative may be obtained as Eq. (20) in fault free case.
which can be written as Eq. (21) for simplicity.
According to Remark 1, we need e y (t) T e y (t) for using lemma 1, which can be given as: IJECE ISSN: 2088-8708 2161 Thus, Eq.(12) may be obtained as follows using Lemma 1.
By assuming Eq. (26) as N T U ZN U , we have [32]: Thus, it can be concluded that: Therefore, U may be achieved as [A cli − I B cldi ] taking into account that N U columns are basis for the null space of U . Furthermore, according to [32], N V and V are assumed as: By using abovementioned results, Eq. (15) in Lemma 3 may be obtained as: which can be cast into one LMI as Eq. (30). where

Fault sensitivity performance in the output estimation error of the switched observer
By considering the Lyapunov function as Eq.(31) for faulty case, its derivative may be obtained as Eq. (32).
According to Remark 2, we need e y (t) T e y (t) for using lemma 1, which can be given as Eq. (33): According to Remark 2 and Lemma2, one may obtain that: which can be arranged into Eq. (35).
Thus, Z matrix may be obtained as follows.

Simultaneous Optimal Fault sensitivity and Disturbance Attenuation Level
According to Eq.(30) and Eq.(40), the disturbance attenuation level and fault sensitivity are defined in two separate LMI problems, which must be considered simultaneously in the observer design at a given disturbance attenuation level or fault sensitivity. In this paper, by defining a weighted LMI optimization problem, the optimal values of the disturbance attenuation and fault sensitivity are obtained. The theorem is given as follows.
Theorem: Consider the continuous time switched system as Eq.(1)-Eq.(2) with ADT along with the switched observer as Eq.(5). The state estimation error dynamic Eq. (7) is asymptotically stable and satisfies the performance criteria as Eq.(9) and Eq.(10) for any nonzero d(t) ∈ l 2 [0, ∞), if there be the scalars values τ > 0, µ > 0 and the matrices P i > 0 Q i > 0 X i N i such that the subsequent weighted LMI optimization problem has solution.
where 0 ≤ w ≤ 1 is the weighting factor for simultaneous fault sensitivity and disturbance attenuation performances and its value is defined by minimization of the following cost function: Lastly, the gains of the observer for different modes of the switched system, optimal disturbance attenuation level and optimal fault sensitivity of the output estimation error of the observer are achieved as:

Global Analytical Redundancy Relations in Error Form Using BG method
The generic form of a GARR may be given in Eq.(41) [34].
GARR : ψ(y (n) , . . . , y, u (m) , . . . , u, θ, a) where y, u and θ are denoted for outputs, inputs and parameters of the system, respectively. As in Eq.(3)-Eq.(4), a = [a 1 a 2 . . . a z ] is a binary vector that determine the active mode of the switched system.. The GARRs are differential equations, which their orders are dependent on the sensor locations in the system. The lower order GARRs are more efficient for monitoring of a system. The generic form of the GARRs may be presented in matrix form by maximum second order assumption of derivatives.
GARR : ψ(ÿ,ẏ, y,ü,u, u, θ, a) = M 1 (θ, a)ÿ(t) + M 2 (θ, a)ẏ(t) + M 3 (θ, a)y(t)+ The effects of disturbances, noises and parametric uncertainties on the GARRs may lead to false or missed alarms in the FD system. In this paper, a new method by combination of the BG method and observer method is proposed to overcome these problems in the FD system based on the BG method, which further leads to some benefits in the FD system.
In normal case i.e. in the case that there are no disturbances, faults, noises and uncertainties in the system, the estimated states and outputs of the observer converge to the states and outputs of the system. Therefore, the GARRs by using estimated outputs may be given as: By subtracting Eq.(43) from Eq.(42), the GARRs in the error form, which is called EGARRs, are obtained.
EGARR : M 1 (θ, a)ë y (t) + M 2 (θ, a)ė y (t) + M 3 (θ, a)e y (t) The output estimation errors in Eq.(44) come from the observer, which is designed in such a way that be more sensitive to faults and simultaneously the effect of disturbance is attenuated. Therefore, the effects of the disturbances are reduced in the GARRs, while the fault sensitivity is enhanced. ISSN: 2088-8708 Figure 1. The two-tank system

Robustness of the FD system against parametric uncertainties
The fault detection and isolation are based on the EGARRs, which are dependent on the parameters of the BG model. In order to obtain a robust FD system against parametric uncertainties, the proposed method in [23] is considered in this paper. In robust fault detection based on the BG method, a GARR can be decoupled into nominal (GARRn) and uncertain part (UGARR) as follows.
where θ n is the nominal part and δ θ is relative deviation compared to the nominal value of the parameter θ. The nominal part is the obtained GARRs, which contain the nominal values of the parameters and made the residuals. The uncertain part contains the uncertain parameters of the nominal GARRs, which further determines the upper and lower bounds of the residuals.
An EGARR may be given as Eq.(46) regarding this fact that the EGARRs are not directly dependent on the inputs and their distribution matrices. EGARR = EGARR n (a, θ n , e y ) + U EGARR(a, δ θ , e y ) The adaptive thresholds on the residuals are defined as UEGARRs, which are dependent on the parametric uncertainty (δ θ ), mode of the system (a) and the output estimation error of the observer (e y ).
As mentioned above, the proposed method is not directly dependent on the inputs and distribution matrices of the inputs (Z 1 to Z 3 ). Thus, the robustness of the proposed method may be improved.
Finally, the residual evaluation function and thresholds for fault detection are assumed as Eq.(47) and Eq.(48), respectively.
in which J L (t) is the residual evaluation function, J th is the threshold on the residual evaluation function, l 0 is the initial time, L is the window length for residual evaluation function calculations and k is the effect of parametric uncertainties on the residual, which is obtained from UEGARR. Finally, the faulty or fault free conditions are declared by comparison between the residual evaluation function and considered threshold.

RESULTS AND DISCUSSION
Consider the two-tank system in Fig.1, which involve a flow source, two output valves named as R 1 and R 2 and one interconnection valve (R 3 ). The valves could be in open or closed state, which determined the active dynamic of the switched system. Three configurations as Table I are assumed [35].
The BG models of the understudy two-tank system in integral and derivative causality in 20-sim software are shown as Fig.2 and Fig.3, respectively.
As mentioned earlier, the valves could be in open or closed state. The coefficients a 1 , a 2 and a 3 are used to show the valve states of R 1 , R 2 and R 3 , respectively, which are set to "0" in closed state and "1" in open state. IJECE ISSN: 2088-8708 2165 Table 1. Considered modes of the two-tank system In hydraulic domain, the effort and flow variables are regarded as pressure and flow, respectively. The subscript c is considered to determine the controlled junctions of the model. Three controlled junctions are assumed for three valves. In BG theory of hybrid systems, the flow variable of the connected bonds to the i th 1-type controlled junction is multiplied by a i . Two pressure sensors are used to measure pressures of the two tanks which is given as P 1 and P 2 . The state space representation of a hybrid system may be obtained in compact form using the BG model. The states of the system are considered as generalized momentum of inertia elements (p I ) and generalized displacement of capacitive elements (q C ). Hence, the state vector of the two-tank system is achieved as [q 2 q 9 ] T .
The flow through the valves is assumed laminar. This assumption leads to linear equations of the system [35]. Using the state space derivation method in [34], the governing equations in compact form are: The parameters definition and their values are given in Table II.
It is also noted that the tank capacity is defined as C T = A/g wherein g = 9.81m/s 2 is the acceleration of gravity. Thus, the system matrices for three considered modes of the two-tank system are:  Cross sectional area of tank 2 30m 2 R 1 Output pipe of tank 1 resistance 300s/m 2 R 2 Interconnection pipe resistance 300s/m 2 R 3 Output pipe of tank 1 resistance 100s/m 2 The other matrices of the system as in Eq.(1) and Eq.(2) are assumed as follows.
The GARRs of the system may be obtained using the Causality Inversion Method (CIM) in [34].
The matrices M i and Z i can be calculated as: The upper bound of parameter uncertainty is assumed as 2% of their nominal values [29]. Solving the weighted LMI optimization problem for α = 0.08, µ = 1.2 and λ = 0.9, the disturbance attenuation level and fault sensitivity versus weighting factor are given in Fig.4.
By minimization the cost function of the Theorem, we have: The disturbance attenuation level, fault sensitivity and ADT are also given as: One may obtain the following observer gains for three defined modes of the switched system. The disturbance signal in the switched system is considered as follows [32].
The switching signal is plotted in Fig.5. The EGARRs may be calculated as: Thus, the uncertain parts of the EGARRs, which are considered in the thresholds on the residuals, are obtained as: The upper bound of thresholds due to the parametric uncertainties is defined by evaluating || k || 2 for each residual.
The simulation results are obtained for the case that the uncertainties in the parameters (maximum 2 %) are included in the system, but the observer and EGARRs are based on the nominal values of the parameters. At first, the first part of the thresholds according to disturbances is obtained in fault free case. The values for the thresholds are obtained as 0.0434 and 0.0063 for r 1 and r 2 respectively. Second, the thresholds on the residual evaluation function are achieved by calculating the parametric uncertainty parts i.e. || k || 2 .
The obtained residuals and the residual evaluation function for fault free case in the presence of disturbance and parametric uncertainties are shown in Fig.6 and Fig.7, respectively.
As can be seen from the figures, the residual evaluation functions are not exceeded from their two-part thresholds (fixed and adaptive) and thus, no fault is declared.
A fault signal (f 1 ) is considered as a pulse signal with unit amplitude that occurred in 40 seconds and remains until 50 seconds for faulty situation. The residuals and residual evaluation functions are plotted in Fig.8 and Fig.9, respectively. It can be observed from the figures that the fault sensitivity is enhanced in an efficient manner and can be efficiently discriminated from disturbance. The residual evaluation function of the first residual is exceeded from the defined threshold, which declares a faulty situation in the system. It is also clear that the first residual is sensitive to f 1 fault. In comparison to the case that the parametric uncertainties are not considered in the FD system, the proposed method leads to robustness of the FD system. The method without two-term threshold may lead to false alarm, which is shown in what follows. The obtained results for the non-faulty case in the presence of disturbance and parametric uncertainties are shown in Fig.10. The considered thresholds are based on the effects of disturbances in the system and the adaptive terms due to parametric uncertainties are not included.
As can be seen from the figure, the residual are exceeded from the considered thresholds and occurrence of a fault is declared, while there is no fault in the system. The residuals for the proposed method may be given in Fig.9 in which there is no exceeding from the thresholds in this case.
According to the simulation results, the proposed FD system is robust against parametric uncertainties and simultaneously attenuates disturbance level and enhances fault sensitivity. These criteria are achieved using a two-stage FD system by combination of a robust switching observer and BG method.
The effects of the parametric uncertainties may lead to false alarm in the fault diagnosis system, as their effects are not included in the thresholds. The result in this case is shown in Fig.10, which declares a fault occurrence in comparison to the proposed method as in Fig.9. In fact, the new defined term as the effect of disturbance on the residuals will improve the robustness aspect of the FD system. The effects of disturbances are attenuated in the residuals by the switching observer in the first stage, which leads to smaller thresholds in the second stage. Smaller thresholds will also improve the efficiency of the FD system for fault detection in the case that the fault has small amplitude and small effect on the residuals consequently.

CONCLUSION
In this work, a new robust fault diagnosis system for continuous time switching system with average dwell time has been proposed based on combination of a switching observer and hybrid bond graph method, in which different criteria including fault sensitivity, disturbance attenuation and robustness against parametric uncertainties has been considered. Different criteria have been included in each stage of the two-stage proposed fault diagnosis system. In the first stage, a switching observer has been proposed that simultaneously enhances fault sensitivity and attenuates disturbance in the output estimation error of the observer in an optimal manner by defining and solving a weighted LMI optimization problem. Afterwards, the output estimation error of the observer has been used in a new form of the GARRs, which called EGARRs and are according to the output estimation error of the observer. The thresholds on the residuals contain two different parts including a fixed threshold due to the effect of disturbance and an adaptive threshold considering the parametric uncertainties of the systems in the EGARRs. A two-tank system has been considered and the simulation results have been shown the efficiency of the proposed method.