A NEURAL-FUZZY APPROACH FOR FAULT DIAGNOSIS OF HYBRID DYNAMICAL SYSTEMS: DEMONSTRATION ON THREE-TANK SYSTEM

: This work is part of the diagnostic field of hybrid dynamic systems (HDS) whose objective is to ensure proper operation of industrial facilities. The study is initially oriented to the modelling approach dedicated to hybrid dynamical systems (HDS). The objective is to look for an adequate model encompassing both aspects (continuous and event). Then, fault diagnosis technique is synthesised using artificial intelligence (AI) techniques. The idea is to introduce a hybrid version combining neural networks and fuzzy logic for residual generation and evaluation. The proposed approach is then validated on three tank system. The modelling and diagnosis approaches are developed using MATLAB/Simulink environment


INTRODUCTION
Due to the rapid and significant development of the industrial world, the automation of industrial systems has become increasingly complex and the interaction between digital systems and continuous physical processes has given rise to a new class of so-called hybrid dynamic systems (HDS). The notion of the hybrid system refers to the set of dynamic systems in which both phenomena of a continuous and event nature interact.
The study of HDS has expanded rapidly in recent decades and has been the subject of several research works concerning the modelling, simulation, verification and synthesis of control laws (Sayed-Mouchaweh, 2018; Achbi & Kechida, 2017a; Favela Contreras, 1999). Monitoring of this class of systems has become a necessity, not only to mitigate the consequences of catastrophic failures (of different nature), but also to improve system performance and productivity (MI Rahal, 2018; Antsaklis & Koutsoukos, 1997; Tsuda et al., 2001).
In the literature, many diagnosis approaches have been developed for continuous and discrete event systems (Van Gorp, 2013; Zouaghi et al., 2011;Daher, 2018). Most of the work consists of either extending the existing techniques from continuous systems or discrete event systems to hybrid systems. In both cases, from a structural point of view, the diagnosis can only be partial. On the other hand, there is a scarcity of papers in the literature that consider both continuous and discrete dynamics (Belkhiat et al., 2011). Existing works can be divided into two categories according to whether the evolution of modes is known or not. In the case where the modes evolution of the system is unknown, the diagnosis of such system begins with the implementation of methods to know the active operating mode at any time.
In Cocquempot et al. (2004), the principle of parity space di-agnosis is extended to a class of hybrid system (switching system). Another approach based on causal reasoning has been proposed in Karsai et al. (2003). This approach is based, firstly, on the modelling of the system by a hybrid bond-graph model and then the generation of a fault propagation graph, which makes it possible to describe the causal and temporal relations between the different modes of defaults, on the one hand, and the associated observations on the other. Alternatively, several researchers have opted for observer-based methods. For example, an active diagnosis, based on the predictive control theory associated with an observer's bench, is proposed in Tabatabaeipour Zouaghi et al. (2011), the authors present the Modified Particle Petri nets approach, which combines Petri nets and particle filtering applied to model and monitor a mobile robot.
More currently, artificial intelligence (AI) appeared as an alternative strategy for the monitoring of HDSs. Tools of AI are introduced either in modelling of system when the latter is complex or DOI 10.2478/ama-2021-0001 A Neural-Fuzzy Approach for Fault Diagnosis of Hybrid Dynamical Systems: Demonstration on Three-Tank System 2 in mechanism of residual generation and evaluation. These tools, such as Neural network, fuzzy logic or the hybrid version (neurofuzzy), are generally associated with classical approaches and usage of their complementarities to improve performance of diagnosis system.
In Pislaru et al. (2006), the paper details a monitoring methodology to diagnose machine faults in complex industrial processes using neuro-fuzzy system. Later, Subbaraj and Kannapiran develop Adaptive Network-based Fuzzy Inference System (AN-FIS) approach for fault detection and diagnosis of a pneumatic valve used in cooler water spray system in cement industry (Subbaraj & Kannapiran, 2011). Then, the authors provide survey on applications of Neuro-Fuzzy system for diagnosis techniques and measurement (Viharos & Kis, 2015).
As for diagnosis methodologies based on hybrid automaton In this paper, we propose a new diagnosis approach based on a combination of HA and ANFIS model. The latter is known by its capacities to solve the nonlinearity problems of a complex system (Mahmoud, 2018;Achbi & Kechida, 2017).
The main objective of this study is determining an adequate model for hybrid (and nonlinear) system, and then to look for a procedure of fault diagnosis through a method based on the Neural networks and fuzzy inference systems.
For modelling, the continuous dynamics is generated by a set of ANFIS models while the discrete dynamics is described by the evolution of HA modes. As for diagnosis part, fault indicators are generated through ANFIS models, and then evaluated using fuzzy reasoning to identify operating mode of process and classify faults.
The rest of this paper is organised in five sections. The second section exhibits a brief outline of Neural-fuzzy approach for fault diagnosis followed by modelling of hybrid dynamical systems used in this work (Section 3). The subsequent section is devoted to the application and discussion results. The final section concludes the paper and suggests some directions for future works.

NEURAL/FUZZY FAULT DIAGNOSIS
Generally, diagnosis is a very complex task and conventional analytical techniques often cannot provide acceptable solutions to diagnosis problems. This explains why AI techniques such as Neural networks and fuzzy logic are becoming increasingly popular in industrial diagnostic applications. The use of these techniques provides interpretable results and provides useful information for the decision phase.
The diagnosis task consists of two stages: residual generation and decision making. The generation of the residues makes it possible, from the available inputs and outputs of the system, to generate fault indicators. The generation process is based on a comparison between the observed behaviour of the system and the expected reference behaviour (predicted by a model). On the other hand, the decision-making step consists in evaluating the residues in order to classify the detected defects.
The residue should be close to zero under normal conditions (no defects). On the contrary, in the fault occurrence, the value of this residue deviates from zero.

Residual generation using Neural-fuzzy system
Neural-fuzzy networks result from the association of Neural networks with fuzzy logic, so as to benefit advantages of each of these two techniques. The main characteristic of Neural-fuzzy models for industrial diagnostics is the ability to model non-linear processes and to process in a single tool the digital and symbolic knowledge of a system (Uppal et al., 2002). Diagnosis applications include mainly hybrid Neural-fuzzy models, for which Neural networks and fuzzy systems are homogeneously combined.

Fig. 1. Residuals generation and evaluation using Neural-fuzzy networks
Neural-fuzzy networks appear to be powerful tools combining large approximation capabilities for the modelling of nonlinear dynamical systems. To develop a diagnostic system using Neuralfuzzy models, several methods are available; nevertheless, they have some disadvantages (Achbi & Kechida, 2017). At the design level, it is necessary to have a priori sufficient knowledge of the system to diagnose to determine input variables, membership functions, and rules. So, it would be interesting to have clarification on the possibility of performing an online diagnosis.
Most of the applications encountered are based on the establishment of a diagnosis from the classification of residues, so they need to be able to establish a model of the system. In addition, they require a network by residues that make the system relatively complex and allow diagnosing only a limited number of defects. It will therefore be interesting to use these techniques, given their capabilities, by completely avoiding a model of the system to diagnose.
Hierarchical Neural-fuzzy networks can be used to solve the dimensionality problem by decomposition the system into a series of MISO systems and/or SISO systems called hierarchical systems. The criteria on which a Neural-fuzzy model is built are based on the requirements of the fault diagnosis model and the characteristics of the system. The residuals are obtained by comparing the outputs of the process and the outputs of the model. In normal operation, the residual value fluctuates around zero.

Adaptive Network-based Fuzzy Inference System (ANFIS)
The ANFIS may be the first integrated Neural-fuzzy system; it becomes more widespread, especially in approaches concerning fault diagnosis. Consequent to its capacities, it allows description of the behaviour of a complex system (Jang, 1992).
The ANFIS implements a fuzzy inference system of the Takagi Sugeno (TS) type and comprises five layers.
The first hidden layer is responsible for input variable mapping relative to each of the membership functions, i.e. this input layer is a layer that allows the 'fuzzification' of the variables. The Tstandard operator is applied in the hidden second layer to compute the history of the rules. The third hidden layer normalises the results provided by the previous layer, followed by the fourth hidden layer where the consequent rules are determined. The output layer calculates the overall output as the sum of all the signals that arrive at that layer.
ANFIS uses back propagation learning to determine input membership function parameters and the least mean squares method to determine the consequent parameters. Each step of the iterative learning algorithm has two parts. In the first part, the back-propagation is used to update the antecedent parameters and the least mean squares to update the consequent parameters, while the antecedent parameters are considered to be fixed. In the second part, the input models are propagated again, and at each iteration, the back propagation learning algorithm is used to modify the parameters of the antecedents, while the consequents remain fixed. For more details, the readers can refer to Subbaraj and Kannapiran (2011).

Residual evaluation based on fuzzy model
The most common use of fuzzy logic in FDI methods is residual evaluation. There are three main approaches in the decisionmaking process: fuzzy adaptive threshold, fuzzy classification, and fuzzy reasoning.

Fuzzy reasoning
The main advantage of fuzzy reasoning is that it can mainly introduce heuristic information into the analysis scheme. Fuzzy reasoning schemes are also easy to understand. The basic idea behind the use of fuzzy inference for residual analysis is that each residue is zero, positive or negative compared to a certain degree. A fuzzy scheme has three steps:

Fuzzification
This is the transformation of raw data values into fuzzy input values. For this, we determine for each input and output its fuzzy membership function.

Inference
This step makes the determination of the basis of the rules that are formed to determine the conditions under which the defect exists and under which the system is non-defective.
If the rules do not reflect the experience of an operator, then they can be difficult to validate.

Defuzzification
It is the step of constructing raw output values from the inference sets. The output of the logical decision procedure is a value that gives the degree to which a fault is present in the system, rather than a simple statement of default/non-default. This degree can be an indication of the size of the present defect, than the certainty with which a defect is present in the system. Such an output is given for each defect considered. The absence of formal methods of design represents one of the major drawbacks to realise FDI schemes.

MODELLING HYBRID DYNAMIC SYSTEM FOR DIAGNOSIS
When continuous and discrete dynamics coexist and interact with each other, it is important to develop models which exactly describe the dynamic behaviour of such dynamic systems, i.e. which model not only the continuous and discrete aspects but also their interactions (KECHIDA, 2007). For modelling HDS (Branicky, 1995), there are several approaches; the common point between them is that continuous evolution is affected by discrete events.
One of the most used modelling tools is the HA (Alur et al., 1992) which presents a more simplistic representation of Hybrid Systems (Fig. 2).

Hybrid Automata (HA)
HA were introduced in the study of hybrid systems in the early 1990s; they are the generalised version of a classical finite state automaton. HA provide a general modelling formalism for the analysis of hybrid systems, which combines transitions (defined by invariants and guards) for capturing discrete evolution and a set of equations for capturing continuous behaviour.
The syntax of HA is defined as follows: where: Σ is the set of system events; is a finite set of continuous variables describing the continuous dynamics of the system; : × →< is a function characterising the continuous dynamic evolution of in each state q; and : × Σ → is the state transition function of the system.

Fault diagnosis through Neural-fuzzy and HA
The goal is to design a diagnoser to analyse, detect and locate a class of fault affecting a system. The mixed method is based on the use of HA, a tool for modelling The goal is to design a diagnoser to analyse, detect and locate a class of fault affecting a system. The mixed method is based on the use of HA, a tool for modelling and monitoring methodology, combined with Neural-fuzzy models. Fig. 3 illustrates the overall diagram of the diagnose design. This diagnosis strategy is applied to the hydraulic/thermal system. Two pumps provide the same inlet flow Q 1 and Q 2 in each tank. The nominal system outlet flow is located at Tank 3. Two valves V 13 and V 23 allow the evacuation of the liquid in the third tank, which serves to mix the liquid and then evacuates the mixture through a valve V 3 . The liquid temperature in the third tank is adjusted by an electrical resistance P 3 .
The measurements are the temperature T 3 in third tank and the liquid levels (h 1 , h 2 , h 3 ) in each tank. The tanks are supposed to be perfectly insulated and their thermal capacities are negligible. The main goal is to keep the liquid level in tanks between 0.4 m and 0.6 m and the temperature in the third tank between 30 °C and 40 °C.
By carrying out the volume balance and the calorimetric balance, we obtain the nonlinear representation of the system: 3  3  13  1  3  23  2  3  3   1 . . . .

P T Q T T Q T T S h w c
with c being the specific heat of the fluid; and w its volumetric mass density. The physical system is a nonlinear multivariable system composed of three actuators and six sensors. The control signals are P 3 , the power delivered by the resistance; and Q 1 , Q 2 , the flow rates provided by the two pumps. The measurements are the temperatures (T 1 , T 2 , T 3 ) and the liquid levels (h 1 , h 2 , h 3 ) in each tank. Fig. 5 illustrates the physical decomposition of the system.

Development of HA ANFIS Model for fault diagnosis
This hydraulic/thermal process explicitly and simultaneously involves models with continuous dynamics and event dynamics (discrete). The event part involves the notion of mode where each mode is associated with its own continuous dynamic. The set of modes characterises the complete operation of the system. An automaton generates the change from one mode to another by means of the measurements and taking into account all the controlled (opening and closing of valves and on/off of the resistance) and spontaneous events (dependencies of liquid level in tanks) generated by the system.
The goal is to design a diagnoser to analyse, detect and locate a class of fault affecting a system. The mixed method is based on the use of HA, a tool for modelling and monitoring methodology, combined with Neural-fuzzy models.
The numerical values, considered in this study, of the various parameters are: Depending on the operation and the architecture of the system and on the basis of the input and output relation of a system, the nonlinear system can be expressed by a model composed of four ANFIS: The normal behaviour of the process is depicted by HA. Fig. 6 describes the trajectories corresponding to the system configurations in normal operating. Each configuration is defined by the mode of the discrete state (valves status

Fig. 6. Hybrid Automata
The goal is to design a diagnoser to analyse, detect and locate a class of fault affecting a system. The mixed method is based on the use of HA, a tool for modelling and monitoring methodology, combined with Neural-fuzzy models. Each configuration is defined by the mode of the discrete state (valves status V i and T 3 ), by the continuous evolution associated with this configuration (described by ANFIS models) and the domain of validity (constraints defined previously). The switching from one mode to another is conditioned by the level of the liquid h 3 and/or its temperature. It should be noted that the model thus designed represents a reduced version of the overall behaviour of the system.
The modes evolution (discrete evolution) is illustrated by Fig.  8. It is clearly perceptible from Fig. 8 that the ANFIS models provide the same behaviour as real evolution described by nonlinear equations. The goal is to design a diagnoser to analyse, detect and locate a class of fault affecting a system. The mixed method is based on the use of HA, a tool for modelling and monitoring methodology, combined with Neural-fuzzy models.
A consistency test carried out between the observations taken and the evolution in normal mode is illustrated by the behaviour of 6 the residues (Fig. 7) where we can observe their convergences towards zero, thus indicating the absence of any anomaly in the system.

Diagnosis strategy
After the modelling step and the residual generation step, we proceed to residual evaluation. In this section, we consider faulty operation (with default), and we apply a fuzzy reasoning to classify 'intermittent' faults and specify the modes evolution of the system.
To illustrate the proposed method and to verify the efficiency and reliability of the diagnostic system, we consider fault scenarios, noted f, consisting of losses of efficiency valves 1 , 2 and power loss of the heating resistor of Tank 3.
In fact, the fault of 1 i.e. loss of efficiency of 5% signify that 1 is not entirely opened (it is partially opened). [800 -900] 50% Figs. 9-11 depict dynamical evolution of three levels in presence of faults while Fig. 12 displays the temperature behaviour in Tank 3. Fig. 12 shows the effect of different faults on behaviour The sensibility of generated residuals is shown in Fig. 14 where we clearly observe the corresponding default signature.

Fig. 14. Residuals behaviour
To evaluate these residuals, we apply the reasoning fuzzy to identify failures.

CONCLUSION
In this work, we have tackled a methodology for monitoring HDS using a combination of HA and AI techniques. The study has enabled us to confirm the advantages of AI techniques for the fault diagnosis of HDS. Also, the obtained results show detection efficiency and isolation ability in solving problems of diagnosis.
As future work, we propose to extend the proposed approach to diagnose the system in presence of simultaneous actuators and sensors faults. We plan also to study mastery of propagation of defects in a hybrid dynamic system.