Fault Detection and Isolation of Nonlinear Systems with Generalized Hamiltonian Representation Fault Detection and Isolation of Nonlinear Systems with Generalized Hamiltonian Representation

The problem of fault diagnosis in a class of nonlinear system is considered. Systems that can be written in the so-called Generalized Hamiltonian Representation (which is equivalent to an Euler-Lagrange representation) are studied, and a model-based observer approach for this class of systems is developed. The main advantage of the proposed approach is the facility to design the required observers, which take advantage of the system struc- ture given by the Hamitonian representation. In order to show the proposed schema, a model of a permanent magnet synchronous machine is revised and the fault diagnosis schema presented. Simulation results confirm the effectivity of the proposed schema.


Introduction
Safety operation and reliability of industrial processes are highly prized by the contemporary society. A key to achieve safety and reliability in industrial processes is through the use of diagnosis and fault-tolerant control algorithms. Note that a fault is understood as a change of a parameter out of the tolerance limits. Physical systems are liable to potentially harmful fault events, which could cause a negative effect on the system functionality, as well as underperformance. Faults can be originated by diverse reasons, for example, natural wear caused by common use, aging, use under stress conditions and so on. The importance of detecting and isolating the fault occurrence in a system lies in the possibility to reduce the maintenance and/ or dead-time for repairing on a production line.
There exist a lot of results related to fault diagnosis for linear systems, as it can be seen in the literature, for example, in Refs. [1][2][3][4][5][6], among others. For the case of nonlinear systems, there are also some available solutions based on diverse model structures, see, for example, Refs. [7,8]. Fault diagnosis in nonlinear systems has been considered in Ref. [9], where the solution is based on a geometric approach, and the conditions of existence are not easily satisfied. Other approaches consider Lipschitz-type nonlinear systems together with an observer-based method [10,11]. Ref. [12] is related to the problem of fault estimation for a class of switched nonlinear systems of neutral type, where the problem formulated as an H ∞ filtering is solved using a switched observer-based fault estimator. In Ref. [13], the fault diagnosis is made for a class of bilinear systems considering only the case of faults on the actuator.
In Ref. [14], an unknown input observer (UIO) for a class of nonlinear state-affine systems for fault diagnosis is proposed. By using sum-of-squares (SOS) theory and Lie geometry as the main tools, the rank constraint in the traditional UIO approach is relaxed and the design procedure simplified, especially for the case of nonlinear polynomial systems. In Ref. [15,16], an approach to fault detection and isolation for the class of nonlinear systems with linear parameter varying (LPV) systems is shown. A different idea is to use a energy index in the diagnosis process, as in Ref. [17]. In Ref. [18], an algorithm for the diagnostics of nonlinear systems is presented where the solution is based on the estimation of the system parameters using the nonlinear response. The use of a bank of high-order sliding mode observers has been proposed in Ref. [19].
From the above discussion, it is clear that even if some approaches are available to settle the fault diagnosis problem, in general there is no systematic way to design it (a model-based or an observer-based approach), because of the difficulty to design an observer for nonlinear systems even if the system is known. The available solutions consider a specific class of nonlinear systems, but each of these class of systems is more related to some mathematical (or system) properties and not necessarily to a wide class of systems from a practical point of view. Systems in Hamiltonian representation form represent a wide range of physical systems considering the relationship between Euler-Lagrange and Hamiltonian systems [20][21][22].
In this chapter, a solution to the problem of fault detection and isolation applying the observerbased residual generation method is proposed. The class of nonlinear systems considered includes all systems, which admit a generalized Hamiltonian representation. The proposed solution begins with a mathematical nonlinear model of a system with faults. A nonlinear decoupling is applied to the faulty system in order to obtain a set of subsystems with sensibility to a particular fault or group of faults. Then, each subsystem is represented in a generalized Hamiltonian form, for which, a nonlinear observer is designed. Using the nonlinear observer, the residual generator is designed for each subsystem. One contribution of this work is the systematic way for residual generator design (an observer-based approach with weak design requirements). Note that the observer-based approach is guaranteed because of the Hamiltonian representation. Fault detection and isolation follow from the residual analysis. The structure of the Hamiltonian system representation is exploited to guarantee the residual existence for each subsystem. The approach is then applied to the model of a permanent magnet synchronous machine with additive faults. The faults are detected and isolated conveniently, showing the effectiveness of the proposed approach.

Generalized Hamiltonian representation of a system
Consider a nonlinear system described in general form as follows: where x ∈ ℝ n is the state vector, u ∈ ℝ r is the input vector, y ∈ ℝ m represents the output vector, and the function f : ℝ n · ℝ r ! ℝ n associates with each value of x and u a corresponding n dimensional vector.
A special class of Generalized Hamiltonian representation is defined by Sira-Ramierez and Cruz-Hernandez [23], where x ∈ ℝ n denotes the state vector, u ∈ ℝ r is the input vector, G ∈ ℝ n · r is a constant matrix, FðxÞ ∈ ℝ n denotes a vector that contains the nonlinearities, y ∈ ℝ m denotes the output vector, and C ∈ ℝ m · n is a constant output matrix. Some nonlinear systems such as these described by Eq. (1) can be represented by Eq. (2) if satisfies the following conditions: There exists a smooth energy function HðxÞ that is positive definite in ℝ n and described by: the column gradient vector denoted by ∂HðxÞ ∂x ¼ Mx can be obtained using Eq. (3), where M ∈ ℝ n · n must be a symmetric matrix constant and positive definitive, JðxÞ ∈ ℝ n · n must be satisfied for all x ∈ ℝ n , and S ∈ ℝ n · n is a constant symmetric matrix, These conditions allow that a wide set of nonlinear systems can be brought to a generalized Hamiltonian representation, such as electromechanical systems, electric systems, mechanical systems, etc.
In the generalized Hamiltonian representation, the additive faults can be represented as in Eq. (5), where these appear as additional inputs (unknown inputs).
where NðΔf Þ ∈ ℝ n and QðΔf Þ ∈ ℝ m represent the additive faults of the system.

Fault detection and isolation
In a general sense, if the fault diagnosis consists in the detection of a fault, then it is called fault detection(FD), and similarly, if the fault diagnosis consists in the detection and isolation of a fault, then it is called fault detection and isolation (FDI). The fault detection consists in determine the occurrence of faults in the functional units of the process, which leads to undesired behavior of the system, and the fault isolation consists in to classify the detected faults. The observer based fault diagnosis technique is a scheme of the model-based fault diagnosis approach. In this technique, the idea is to replace the process model by an observer which estimates the fault-free process outputs. The difference between the measured process variables and the estimated process variables defines the residual. The fault effect is contained in the measured process variables. Thus, a residual signal includes the fault effect. Ideally, if the residual is different from zero then a fault has occurred, otherwise the process is fault free. The residual generation allows to know the occurrence of faults, and the residual evaluation is necessary to extract the fault information. Figure 1 shows a common diagnosis scheme.
In this contribution, a fault detection and isolation approach to nonlinear systems that admit a generalized Hamiltonian representation is considered. The proposed approach follows the classical procedure of fault diagnosis: First, a fault decoupling in order to get subsystems with sensibility to a specific fault is developed. Second, an observer-based residual generator for each subsystem is designed. Third, a residual analysis is performed to determine which functional unit has failed. The fault decoupling consists in to define a transformation over the system in order to get a subsystem with sensibility to a fault or a set of faults, and this subsystem is coupled with a fault and decoupled from the rest of possible faults. There are some works on the analysis and synthesis of these transformations, see, for example, Refs. [9,24,25].
For the case of the generalized Hamiltonian representation with faults, Eq. (5) considers the following nonlinear transformation It is required that and the transformation TðxÞ be selected in such a way that the resulting transformed system has the desired fault sensibility, that is, suppose NðΔf Þ ¼ ½n 1 ðΔf Þ n 2 ðΔf Þ ⋯ n l ðΔf Þ where NðΔf Þ represents the columns associated with the faults that requires no to affect a specific subsystem and NðΔf Þ are the columns related to the faults that are required to affect the subsystem. With ∂TðxÞ ∂x NðΔf Þ ¼ 0 and ∂TðxÞ ∂x NðΔf Þ 6 ¼ 0. In Ref. [24], it can be found details about the existence of this transformation. For some examples, at least, the assumption is satisfied and consequently, a systematic way to fault isolation is obtained. At the moment, we do not have a result on the characterization of the class of systems for which the assumption is satisfied. The resulting decoupled system is represented in a Hamiltonian form.
After a subsystem has been determined, the next step is to design an observer for each subsystem. From the decoupled subsystem in the generalized Hamiltonian representation Eq. (9), an observer can be designed as follows [26]: where K ∈ ℝ n · m is the observer gain,ζ ∈ ℝ n is the estimated state,ŷ ζ ∈ ℝ m is the estimated output calculated in terms ofζ, ∂HðζÞ ∂ζ ¼ Mζ is the gradient vector with M ∈ ℝ n · n as a symmetric positive definite matrix.
For this observer, the conditions design is described in the following Theorem: The state x of the nonlinear system in the generalized Hamiltonian representation Eq. (9) can be globally, exponentially, asymptotically estimated by the observer Eq. (10), if the pair (C,S) is observable or at least detectable and the matrix and ρ is a vector such that ρ ∈ ðx;ζÞ.

⋄⋄⋄
The proof of Theorem 1 is fully defined and explained in Ref. [26]. Then, for the decoupled system, a residual generator is defined as follows Theorem 2. For the decoupled nominal system (Eq. (9) with N ¼ 0). The system is a directional residual generator if the pair ðC; SÞ is observable or at least detectable and the matrix is negative definite. With Π ¼ 1 2 M ∂FðrÞ ∂ζ þ ∂FðrÞ ∂ζ T M ! and ρ is a vector such that ρ ∈ ðζ;ζÞ.

Proof:
The proof of Theorem 2 is a consequence of the proof of Theorem 1.

Application example
In this section, the results to apply in the permanent magnet synchronous machine (PMSM) the proposed approach for fault detection and isolation are presented. The closed loop system is used in the fault diagnosis analysis where any specific control law is used.
The PMSM mathematical model in the stationary reference frame dq0 (direct-quadrature-zero axes) is taken from Ref. [27] and is described by: ; where B is the viscous friction coefficient, R is the stator resistance, L is the inductance, Φ is the flux linkage, P is the pole pairs, i d and i q are the electric currents on the direct and quadrature axis, respectively, u d and u q are the voltages on the direct and quadrature axes, respectively, ω is the rotor speed, J m is the rotor inertia, and τ L is the load torque.
In the fault diagnosis analysis, it is considered that the system is operating in nominal conditions, which implies that the system is in closed loop with any controller. In this case, a backstepping nonlinear control [22] is used in the PMSM.
In order to obtain the Hamiltonian representation Eq. (2) of the PMSM described by Eq. (15), a Hamiltonian energy function is defined as follows: with a gradient vector where M is a symmetric, positive definite and constant matrix so that the Hamiltonian representation of the PMSM is as follows: An intermittent connection, signal lost or signal offset are some of the sensor faults prone to occur in electrical machines [28], the control objective is affected mainly by first and second faults. The nominal value of the load torque is known, an unknown change in this parameter is considered as an additive fault. The PMSM may occur faults on elements such as sensors, actuators and components. The following additive faults are considered in this contribution: Δω is a fault in the speed sensor, f a is a fault in the control input, and Δτ L is an unknown change in the load torque.
When these faults are considered, the Hamiltonian representation of the PMSM is as follows: Once defined the mathematical model of the PMSM with faults, the fault decoupling is done for each fault presented in the system. From this fault, decoupling analysis is obtained subsystems with sensibility to a particular fault and without sensibility for the rest.
Subsystem sensitive to the control input fault f a : For this subsystem, decoupling the output y 3 is not used to avoid the sensor fault effect. Considering the first two equations and the outputs y 1 and y 2 of the faulty system Eq. (21) a subsystem sensitive to the actuator fault is obtained, as follows: solving Eq. (23) for x 3 now replacing x 3 in Eq. (22) multiplying Eq. (26) by φ L þ x 1 and solving for Eqs. (27) and (28) are the subsystem 1 with sensitivity to the control input fault f a , where x 1 and x 2 are quantities available in measurable outputs y 1 and y 2 , respectively.
Subsystem sensitive to the load torque fault Δτ L : once more the output y 3 is not used to avoid sensitivity to the sensor fault. Subtracting Eq. (22) to Eq. (23) if a new state _ υ 2 ¼ _ x 1 À _ x 2 is defined, Eq. (29) becomes Eq. (30), this equation and the third equation of Eq. (21) define the subsystem 2, where x 2 is available in the measurable output y 2 .
Subsystem sensitive to the sensor fault Δω: since this subsystem must be sensitive to the sensor fault, the output y 3 is used. Using the transformed state _ υ 3 ¼ _ x 1 À _ x 2 , the subsystem 3 is obtained with sensibility to the sensor fault: where x 3 and x 2 are quantities available in the measurable outputs y 1 and y 2 , respectively.
Once decoupled subsystems were obtained, for the residual generator design an observer for each one for each of the decoupled subsystem is designed.
For decoupled subsystems sensitive to f a and Δω, the observer design using the proposed approach in Ref. [26] coincides with a Luenberger observer [29,30], but, however, this does not apply for decoupled subsystems sensitive to Δτ L .
The observer design and the residual generator for the decoupled subsystem sensitive to Δτ L are presented. The decoupled subsystem sensitive to Δτ L can be expressed as follows: Which can be written in the form Eq. (9) with where x a ¼ ½υ 2 x 3 T whose gradient vector is defined as follows and with For this case, the pair ðC, SÞ is observable, and thus, there exists a matrix K that satisfies both the requirements of Theorem 1 for the observer design and the requirements of Theorem 2 for the residual generator design, and thus the observer is as follows and the directional residual generator for the decoupled subsystem sensitive to Δτ L is given by For decoupled subsystem sensitive to control input f a Eqs. (27) and (28), the observer and its directional residual generator are as follows: ð40Þ y υ1 ¼υ 1 ; ð41Þ Finally, for the decoupled subsystem sensitive to the sensor fault Δω Eq. (33), the observer and its directional residual generator are as follows: ð43Þ y v3 ¼v 3 ; ð44Þ To summarize the fault sensitivity results of each residual (associated to each subsystem), see Table 1.
Where the fault affecting the residual is indicated with √, and the symbol ∅ means that there is no connection between the fault and the corresponding residual.
As can be appreciated from Table 1, there is a one-to-one relationship between faults and residuals so that perfect decoupling has been attached. One nice thing of perfect decoupling is that the occurrence of faults can be detected and isolated without problems.
The following results were obtained by computer simulation.   Table 3 shows the PMSM parameters, which were taken from Ref. [22]. Figure 3 shows the evolution of PMSM states in the time (the time scale is given in seconds), that is, the current in the direct axis i d ðtÞ, the current in the quadrature axis i q ðtÞ and the angular velocity ωðtÞ in nominal conditions (without faults). Actually, this figure represents the response of the PMSM with nominal parameters.
The evolution of the residuals when an actuator fault f a occurs is depicted in Figure 4, where both residuals 2 and 3 are equal to zero since these are insensitive to the fault f a , while residual 1 is different from zero indicating the sensitivity to control input fault f a . Note that the magnitude of the two first residuals represents deviations between nominal and measurement currents with respect to the time (time is given in seconds). The third residual represents the deviation of the nominal and measured angular velocity of the PMSM rotor. Figure 5 shows the residuals evolution when the sensor fault occurs, where residuals 1 and 3 are zero at all time due to its insensitivity to this fault, while residual 2 differs from zero due to its sensitiveness to this fault. Figure 6 shows the residuals evolution when the load torque fault occurs, where residuals 1 and 2 are null and residual 3 is different from zero, indicating the sensitivity to load torque fault. Note that the fault magnitude is of 0:14; however, the residual becomes a value around 3, that is, the effect of the fault is not directly the magnitude of this. Extra work is required in the design of the observer-based residual in order to get at the residual a more approximated value of the fault magnitude. Figure 7 shows the case when all three faults occur, even if not at the same time. The effect of the faults is manifested in the correct residual. It means that the problem of fault isolation in multiple faults can be carried out effectively.

Concluding remarks
Fault diagnosis for a wide class of nonlinear systems, the class of systems that admit a Hamiltonian representation, has been considered. An observer-based solution with weak existence conditions for the fault diagnosis has been proposed, and this approach allows the detection and isolation of additive faults. The proposed procedure follows the traditional way, namely: First, a decoupling methodology is applied to systems with Hamiltonian representation in order to obtain subsystems that preserve the Hamiltonian structure. Observer-based residual generators are designed for each subsystem so that each residual generator is sensible to a fault (or to a specific group of faults). The residual has the property of remain close to zero (or under a threshold value) if no fault is present in the system and non zero (or greater than a threshold value) when a fault affects the system. The proposed approach solves the fault isolation problem, and it permits a systematic design of the required residual generators. In contrast with other methodologies, for systems with Hamiltonian representation, an easy way to design an observer has been introduced. In addition, a wide set of nonlinear systems can be represented in the Hamiltonian structure, making the proposed solution widely applicable.