METHODOLOGY TO KNOWLEDGE DISCOVERY FOR FAULT DIAGNOSIS OF HYBRID DYNAMICAL SYSTEMS: DEMONSTRATION ON TWO TANKS SYSTEM

The work carried out in this article concerns on the implementation off a diagnostic procedure for hybrid dynamic systems (HDS) whose objective is to guarantee the proper functioning of industrial installations. In this context, the main contributions of this work are summarized into three parts: The first part is oriented to the modeling approach dedicated to HDS. The aim is to find an adequate model combining both aspects (continuous and discrete dynamics). The use of Neuro-fuzzy networks makes it possible to build a model of the system and to follow all the modes without it being necessary to identify or discern them. The second part concerns the synthesis of a fault diagnostic technique based on a fuzzy inference system. A Neuro-Fuzzy network based is used for residual generation, while for the residual evaluation, a fuzzy reasoning model is used which can mainly introduce heuristic information into the analysis scheme and takes the appropriate decision regarding the actual behaviour of the process. The proposed approach is successfully applied to monitoring faults of a non-linear three-tank system and the results confirm the effectiveness of this approach.


INTRODUCTION
The Monitoring consists of two main functions that are the detection and diagnosis. In industrial installations, Faults Diagnosis is the process which, on the basis of the symptoms observed, makes it possible to identify the causes producing the malfunctions and consequently to isolate the faulty component of the system. The main diagnosis task consists of an estimation of the operating time before failure and the risk level of each failure modes.
Hence the development and improvement of monitoring methods are essential; this is due to several raisons such as the increased complexity of systems, their specifications, customer needs... A class of developed approaches is deduced of the combination of different techniques of artificial intelligence and diagnostic methods. This combination has proved its effectiveness during its application through their results generated in industrial field. The two techniques of pattern recognition: fuzzy logic and neural networks, thus, the combination of them enables us to have a nervous haze system.
In the literature, various model-based methods have been designed for fault detection and isolation.
Among which state estimation [20], parameter estimation [11] and parity equations [8]. This class of methods is used to residuals generation. However, there are intended for linear or linearized systems and require a precise mathematical model of the system. In theory, this assumption may be difficult to satisfy in practice, since real systems are generally nonlinear, complex, and the dynamics of these systems may not be known in sufficient detail.
In addition, the most of systems have dynamic presenting double aspect in other words, behaviour of a continuous and/or discrete nature.
Furthermore another approach based on Object Differential Petri nets and extended Kalman filters was proposed in [9]. Recently many efforts have been devoted to the synthesis of control laws which improve performance and guarantee the stability of HDSs. However in the event of a breakdown these control laws become ineffective and the techniques for detecting and locating faults must be implemented to guarantee the expected performance of the systems. In this context, existing works show that Fault Detection and Isolation (FDI) techniques for hybrid dynamic systems first require the ability to identify the current mode each time Unfortunately the identification of the mode is a very difficult task which implies that all the modes are known and discernible as well as the study of all the switching sequences [10]. DIAGNOSTYKA, Vol. 21, No. 4 (2020) AChbi MS, Mhamdi L, Kechida S, Dhouibi H.: Methodology to knowledge discovery for fault diagnosis of …

116
To overcome these drawbacks this work mainly carried out around these two aspects modeling and diagnosis. The use of Neuro-Fuzzy networks makes it possible to build a model of the system and follow all the modes without it being necessary to identify or discern between them.

NONLINEAR DYNAMIC MODELING
In general and according the nature of time (continuous or discrete), a dynamic system is described by differential equations or by difference equations. In practice, it is rare that a complex system can be absolutely described by a knowledge model. Inputoutput models of the "black box" type are often used, for which no knowledge of the system is necessary, but measures on the variables governing the operation of the system are essential and in sufficient quantity. The modeling problem then becomes a nonlinear regression problem. To model a given system, we distinguish different types of non-linear models. Depending on the choice of the regression vector, different structures of the nonlinear model emerge. Each of the non-linear structures NFIR, NARX, NOE and NARMAX is a possible solution.
All these models can be expressed as follows: The NARX model makes it possible to represent nonlinear dynamic systems whose output depends on past inputs and past measured outputs. Where: , are respectively the system inputs and outputs, is the output of the model. , are respectively the inputs and outputs delays.
(. ) is the nonlinear function of the network. and ( ) is the regression vector. Particularly, the NARX structure represents the best choice when the system is deterministic or weakly noisy. As part of this application, we choose the NARX model because of its non-recursive structure and its parameters which are easy to estimate.

NEURAL-FUZZY MODEL OF SYSTEM
Generally, diagnosis is a very complex task and classical analytical techniques often cannot provide acceptable solutions to design problems. This explains why artificial intelligence techniques such as neural networks and fuzzy logic are becoming more and more popular in industrial diagnostic applications. The use of these techniques makes it possible to obtain interpretable results and provides useful information for the decision phase. The diagnosis task consists in two steps: residuals generation and decision making. The residuals are fault indicators generated from the available inputs and outputs. The generation process is based on a comparison between the observed behavior of the system and the reference behavior expected (predicted by a model). On the other hand, the decision-making step consists in evaluating the residues in order to identify and classify the detected defects. The residue should be close to zero under normal conditions (no defects). In contrast, in the faults occurrence, the value of this residue will be nonzero.

Neural-Fuzzy model based residual generation
The major drawback of the analytical methods used in the diagnostic field is the fact that the use of a precise mathematical model is necessary. The mathematical model used in traditional FDI (fault detection and isolation) methods can be very sensitive to modeling errors, parameter variation, noise and disturbance. To avoid some of the difficulties of using mathematical models, it is very important to choose FDI algorithms that are more applicable to real systems. The general concept of generating residuals remains the same as for analytical models. It consists in comparing the outputs of the process with their estimates. But in this case, the estimates are calculated by a Neuro-Fuzzy model. The residue vector ( ) is calculated by the difference between the actuator output vector ( ) and the Neuro-Fuzzy model output vector ̂( ). . This database will be divided into two, a major part will be used for learning, and the other will be necessary for validation. Once this basis has been established, a structure of the Neuro-Fuzzy network must be chosen.

Choice of the structure of model
The choice of the structure of Neuro-Fuzzy model is very important. Usually we opt for NARX structure, which is the best choice for the structure of nonlinear models if the system is deterministic or little noisy. This avoids the problem of stability of other structures such as NNARMAX, for example.

Learning
The weights and the biases are initially chosen randomly, and then adapted by a learning algorithm, so as to minimize the quadratic error. The algorithm generally used as in the context of our application is the Levenberg-Marquardt algorithm.

Validation
Once the network has been trained, the final values of the weights and biases are obtained. An evaluation step is needed to see if the network complies with the requirements set. For this, we perform several tests on the network. If, unfortunately, the network is not satisfactory, we must consider either modifying the network structure (for example: increase the orders of outputs or inputs) or increase the number of iterations of the learning phase if the network parameters have not yet converged sufficiently.

Neuro-fuzzy model based residual evaluation
The most common use of fuzzy logic in FDI methods is the evaluation of residuals. There are three main approaches in the decision process: the fuzzy adaptive threshold, the fuzzy classification and the fuzzy reasoning. In fuzzy logic, fuzzy reasoning, also called approximate reasoning, is based on fuzzy rules that are expressed in natural language using linguistic variables. A fuzzy rule will has this form: IF (x ∈ A) and (y ∈ B) THEN (z ∈ C), (5) with, A, B and C fuzzy sets.

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. Each residue is assigned membership functions which will indicate to what degree it is (or is not) affected by a failure. Generally we take as membership functions triangles or trapezoids.

Inference
This step determines the basis of the rules that are formed to determine the conditions under which the fault exists and under which the system is not faulty. For example: -IF residue1=0 and residue2=0, THEN, no failure has been detected.
-IF residue1>0 and residue2<0, THEN fault1 has been detected. If the rules do not reflect the experience of an operator, then they can be difficult to validate.

Defuzzification
This is the step of creating raw output values from the inference sets. The output of the logical decision procedure is a value that provides the degree of presence of a failure in the system, rather than a simple declaration of default/non-default. This degree can be an indication both 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 realize FDI schemes.

APPLICATION
A hydraulic system is shown in figure (2).

Fig. 2. Two tanks system.
This system is composed of two cylindrical tanks of identical section S = 0.0154 m 2 connected by pipes C 2 , C 3 placed respectively at levels 0 m and 0.5 m. The pipes C 1 and C 4 provided with valves V 1 and V 4 allow the liquid evacuation for use. Lines C 2 and C 3 are fitted with valves V 2 and V 3 . A pump P 1 is used to control the flow Q p affecting the level of tank 1 Two levels sensors measuring the levels h 1 and h 2 in the two tanks. To simplify the study, it is assumed that the valves The pump is initially on. It is stopped when ℎ 2 ≥ 0.2 . It is started when ℎ 2 ≤ 0.1 .
The valve V 4 is manual. It can be opened or closed at any time by the user. Only two discrete states are considered: the state of the pipe C 3 which can take the Empty (V) or Full (P) modes and the state of the valve V 4 which can take the Open (O) or Closed (F) modes. Four modes therefore make it possible to characterize the behavior of the system. Each of them is characterized by a discrete state modality (pipe state C 3 , valve state V 4 ), state equations and inequality constraints. The expressions of flows given by Torricelli's law are: With: The pipe sections ( = 1, … ,4), 1 = ⋯ = 4 = 3.6 × 10 −5 2 , = 9.81 2 , S= sign(h 1 (t) − h 2 (t)) 3 can be given by three expressions depending on the level of the liquid in the tanks: This system includes two types of events: Controlled events: These events are associated with the ON/OFF commands of the valves. Events 1 and 2 allow to open and close valve 4 at time t = 240 s and at time t = 380 s, respectively. Spontaneous events: These events are internal or autonomous. They are generated when ℎ 1 and ℎ 2 exceed or do not exceed the level of water in the tanks. The pump is started when ℎ 2 = ℎ 2 = 0.1 . The pump is stopped when ℎ 2 = ℎ 2 = 0.2 . The continuous dynamic is described by the behavior of the four modes.
Mode 1: Mode 2: Mode 3: Mode 4: The hybrid automata representing the system in normal operation is given by the following figure.   Fig. 3. Hybrid Automata.
In general, this system explicitly and simultaneously involves models with double dynamics continuous and event. The event part involves the mode notion where each mode is associated with its own continuous dynamic. The DIAGNOSTYKA, Vol. 21, No. 4 (2020) AChbi MS, Mhamdi L, Kechida S, Dhouibi H.: Methodology to knowledge discovery for fault diagnosis of … 119 set of modes characterizes the complete operating of the system. An automaton generates the switching from one mode to another via measurements and taking into account all the controlled and spontaneous events generated by the system.
The simulation is carried out during a total simulation time equal to 500 s, with the following initial conditions: ℎ 1,0 = 0.4 ℎ 2,0 = 0 . The levels of liquids ℎ 1 and ℎ 2 are depicted by the figure 4. The figure 5 illustrates the chronogram of the modes, in other words the evolution of the modes in normal operating.

Where
: The system input, ℎ 1 : The system output, ℎ 2 : The system output, ĥ 1 : The estimated output of ℎ 1 , ĥ 2 : The estimated output of ℎ 2 . The generated residues are given in Figure (  In normal functioning, residues fluctuate around zero, their behaviors present weak fluctuations that are due to modeling errors. Now, evaluating the residual generator in fault presence. In order to illustrate the proposed method and verify the efficiency and reliability of the diagnosis system, fault scenarios, noted are considered. It is assumed that there are two level sensors measuring the levels ℎ 1 and ℎ 2 in the two tanks. { y 1 = h 1 , y 2 = h 2 , measurement sensor of h 1 measurement sensor of h 2 (19) It is assumed that these two sensors are biased in their measurements, that is to say we consider two failures 1 and 2 affecting respectively the two DIAGNOSTYKA, Vol. 21, No. 4 (2020) AChbi MS, Mhamdi L, Kechida S, Dhouibi H.: Methodology to knowledge discovery for fault diagnosis of … 120 sensors of ℎ 1 and ℎ 2 and because of this, the measurement equations become: { y 1 = h 1 + f 1 y 2 = h 2 + f 2 (20) Another failure is considered as a loss of pump actuator efficiency. This system failure influences the differential equations.  Next, analysis of the fuzzy residues obtained previously are done using the rules of type " . . , ℎ . . . ". As example: IF 1 is 1 , Then 1 = 0. (Not faulty). It is clear from figures 11 and 12, which the residues have values almost zero until the times of faults occurrence and the diagnostic system makes a positive decision between the two instants in the case where the fault affects the system.

CONCLUSION
The aim of this work is to show that neurofuzzy models can be used for the diagnosis of hybrid dynamic systems. The behavior of real system is determined through a hybrid automaton. The idea is to introduce the neuro-fuzzy concept in the process of residual generator and involve the fuzzy logic for residue treatment and decision phase. These residues are deduced from the comparison between the outputs of the hybrid automaton and those of the neuro-fuzzy models. DIAGNOSTYKA, Vol. 21, No. 4 (2020) AChbi MS, Mhamdi L, Kechida S, Dhouibi H.: Methodology to knowledge discovery for fault diagnosis of …

121
The proposed approach is validated with a simulation example and the results obtained provide proof of the good performance of the ANFIS models. These models have been used to generate residuals and perform fault diagnosis without the need to discern the modes, to estimate the current mode or to systematically study the switching sequences.