Design of Active Fault Tolerant Control System for Air Fuel Ratio Control of Internal Combustion Engines Using Artificial Neural Networks

Fault tolerant control systems can be used in the process machines such as Internal Combustion (IC) engines to achieve greater reliability and stability in the fault conditions. Thus, costly loss of production due to the unusual and unexpected shutdown of these machines can be avoided. The Air Fuel Ratio (AFR) control system is an important system in IC engines and faults in the sensors of this system will cause its shutdown creating costly production loss, therefore, fault tolerance is necessary for them. In this paper, an Active Fault Tolerant Control System (AFTCS) based on Artificial Neural Networks (ANN) has been proposed for the AFR control system of a Spark Ignition (SI) IC engine to increase its reliability. In the proposed AFTCS, a nonlinear ANN-based observer is used in the Fault Detection and Isolation (FDI) unit for the highly nonlinear sensors of the AFR system for analytical redundancy. The Lyapunov stability analysis has been utilized to design a stable system in normal and faulty conditions. The system has been implemented in MATLAB/Simulink environment to test its performance. The simulation experimental results demonstrate that the suggested system stays reliable maintaining the stability well in the fault conditions of sensors with little degradation in AFR. A comparison with the existing works demonstrates the superior performance of the proposed AFTCS for the highly nonlinear sensors of the AFR control system. The technique suggested is very effective in terms of fault robustness and is more specifically based on the nonlinear behavior of the MAP sensor compared to the existing works.


I. INTRODUCTION
A fault in a system is described as the variation of the parameter from the actual value. Fault tolerance is described as the ability of the system to maintain operation under faulty conditions. Faults in any actual system are possible and reduce the system's stability and efficiency. In the references [1]- [3], detailed descriptions and applications of fault tolerant control (FTC) are provided. In critical production processes such as oil and gas facilities, and fertilizers, FTC techniques are now being applied where production losses cannot be tolerated and continuous system performance is compulsory [4]- [6]. The description of all the abbreviations used in the paper is shown in Table 1. The nomenclature of all the symbols is shown in Table 2.
The associate editor coordinating the review of this manuscript and approving it for publication was Shen Yin. The core function for detecting, locating, and isolating defective components is carried out in an active fault tolerant system (AFTCS) by a dedicated Fault Detection and Isolation (FDI) unit. The algorithm operates on the observer principle such that the plant parameter is compared with an estimated value generated by the observer to produce a residual [7].
No fault is declared by the control system if the residual is within limits. If the residual is determined to have surpassed the specified limit, the FDI unit declares it as a faulty condition. The controller is then reconfigured to meet new operational requirements. Degradation of performance can occur due to defective components in AFTCS, but system stability is guaranteed [8]- [10].
The AFTCS working can be demonstrated in state-space in the analysis by Wang et al. [11] to explain the architecture of observer:ẋ L is feedback gain, e x = (A − LC) e x (11) (ȳ − y) = Ce x (12) No fault is declared by the FDI unit when the residual ''e x '' goes to zero. If the residual is greater than the threshold, an error will be declared and the faulty value will be replaced by the FDI unit with the estimated value obtained from the observer. AFTCS' complex structure and sluggish reaction due to excessive computations reflect its major disadvantage [12].
In a passive fault tolerant control system (PFTCS), no FDI unit is inserted and all failure conditions are anticipated in the design process. The PFTCS operates with this offline programming and due to fewer computations, has a quicker response than AFTCS [13]. However, only certain faults considered in the design process can be tolerated by this system [5], [2].
The hybrid features of these two techniques are sometimes utilized called a hybrid fault tolerant control system (HFTCS). In the HFTCS, the system can react quickly to defects using the PFTCS feature in safety applications and then optimize using the AFTCS property later in post-fault condition [14], [15].
For sensor and actuator combined faults, ANN was used in the detection and location of faults [16]. In the Li and Tong analysis, fuzzy logic was employed for the nonlinear feature estimation, and the adaptive control for the actuator failures was applied. Tang et al. used the average dwell approach with neural networks [17]. PFTCS was reported in Patel and Shah [18], with a single tank level unit, using the fluid, proportional integral derivative (PI) controller, on a system defect and process disturbance.
In process conditions, FTC played a vital role to design a stable control strategy even in faulty conditions [19]. FTC becomes an integral component to preserve system reliability and stability for actuator and sensor failures [20]. The NASA aircraft LPV system is used to set up multilevel reconfiguration for actuators and sensors in [21]. NASA has used FTC, in the current design of the drone control system [22]. A multi-controller approach without an FDI decision-making unit was proposed in [23]. A hybrid solution was proposed in [24] to guarantee reliability in case of sensor failure by restoration with simulated sensor values. FTC for simultaneous sensor and actuator faults was discussed for markovian jump systems in [25].
In the estimation and identification of nonlinear systems, the ability of the ANN makes it an appropriate candidate for FDI [26]- [28]. The use of ANN as an active fault compensator in FTC design is limited to compensate the actuator/sensor error analytically based upon the observer-based system error principle [29]- [31]. The neural FTC design for failures in actuators of three degrees of freedom (DoF) helicopter was introduced in [32]. In its architecture, the ANN observer was designed to observe and redefine the error in the system with a radial basis function. Related ANN VOLUME 9, 2021 observer-based methods have been implemented in various applications [33].

II. ARTIFICIAL NEURAL NETWORK
The most intelligent and up-to-date solution for data-driven problems is the Artificial Neural Network that includes the idea of artificial intelligence, the goal of empowering systems to decide and learn from experience. The Artificial Neural Networks (ANN) simulate and use this control technique in systems or machines [34]- [36]. Figure 1 illustrates the architecture of ANN. In FTC, ANN can be used for non-linear systems because of the useful features they provide. In [37], the back-stepping strategy is proposed for underwater vessels with a thruster fault dependent on the neural network strategy. FTC architecture for MIMO systems in combination with adaptive neural networks is proposed in [38]. In [39], a nonlinear, time-delayed, and unmolded dynamic adaptive NN solution is suggested. In [17], the NN-based AFTCS is represented with the RCL circuit implementation using the average dwell time approach for nonlinear control techniques.
The equation for a neural network is obtained as follows: a l j=σ k w l jk a l−1 k +b l j (13) where the total is k in (l − 1) th layer for all neurons. We define a weight matrix w l for each layer to rearrange this expression in a matrix form l. The weight matrix inputs w l are just those weights that connect to the l th neuron layer. In other words, the input in row j th and column k th are w l jk . We also describe a vector of bias b l j for each layer l. The bias vector components are the values b l j , just one component for each neuron in the l th layer. Finally, we describe a vector of activation a l with the activation elements a l j .

III. AFR CONTROL OF IC ENGINE
An internal combustion (IC) engine is a heat engine, in which air is required to combust fuel in the combustion chamber.
In industrial processes, IC engines are commonly used as prime movers. Those engines transform the chemical energy into the mechanical rotation and then drive compressors and alternators. There are two types of IC engines: Compression Ignition (CI) and Spark Ignition (SI). In CI engines, the combustion takes place with compression, while in the SI engines spark plugs are used in the combustion process. The architecture of an internal combustion engine is illustrated in Figure 2.
Proper mixing of air and fuel in the combustion process in a definite ratio is termed as Air Fuel Ratio (AFR) and is very important for increased engine efficiency, fuel energy savings, and lower emissions. The mathematical equation of AFR is: The chemical equation is given as: The AFR according to this equation is termed as stoichiometric ratio and its value for the gasoline is 14.6:1. AFR can vary from 6:1 to 20:1 during the combustion of gasoline. A mixture with a lesser value compared to the stoichiometric ratio is known as a rich mixture and a mixture with a greater value than this ratio is known as a lean mixture. For instance, the 16.5:1 AFR is lean and the 13.7:1 AFR is rich in gasoline fuel. Both rich and lean mixtures are considered to be harmful to the engine because it damages the catalyst as well as decreases engine efficiency and fuel economy. For various kinds of fuels, the value of AFR is distinct, for example, the value for methanol amounts to 6.47:1, ethanol to 9:1, and hydrogen to 34.3:1. Four sensors play a major role in maintaining AFR control of the SI IC engines: Manifold Absolute Pressure (MAP) Sensor: It provides an accurate pressure value of suction air to the controller.
Throttle Sensor: It gives an air throttle position to the controller.
Exhaust Gas Oxygen (EGO) Sensor: It measures the exhaust-gas concentration of oxygen and controls fuel supply for optimum combustion.
Speed Sensor: It measures the speed of the engine crankshaft.
Faults in these sensors cause a shutdown of the engine, therefore, fault tolerance is necessary for them. Since the system is highly non-linear, we have used the ANN-based estimation technique in the design of AFTCS.
In this paper, our contribution is the development of an AFTCS based on ANN for the highly nonlinear sensors of the AFR control system of SI IC engines. In the proposed AFTCS, a nonlinear ANN-based observer is used in the FDI unit for analytical redundancy. The Lyapunov stability analysis has been utilized to design a stable system in normal and faulty conditions. The system has been implemented in MATLAB/Simulink environment. The simulation experiment results demonstrate that the suggested system stays stable in the fault conditions of sensors with little degradation of AFR. A comparison with the existing works demonstrates the superior performance of the proposed AFTCS for the highly nonlinear AFR control system. The technique suggested is very effective in terms of fault robustness and is more specifically based on the nonlinear behavior of the MAP sensor compared to the existing works.
The following is the remaining structure of this paper. Section IV comprises of research methodology. Results and discussions are elaborated in section V. In section VI, a comparison with the existing works is discussed and finally, the conclusion is provided in the last section.

IV. RESEARCH METHODOLOGY
The proposed AFTCS was implemented in MATLAB/ Simulink using the available AFR model of the IC gasoline engine [40]. This model has been further modified according to the proper AFTCS architecture with ANN-based FDI unit and its findings are presented. A fault is introduced in each sensor one by one keeping other sensors at normal condition. For this study, the engine speed is set to 300 rpm as per the design speed of the MATLAB model and the same value is given to the controller by the FDI unit when the speed sensor becomes faulty. The MAP and throttle sensor data are extracted from the MATLAB model lookup tables (LTs) for 300 r/min [41]. The neural network technique is applied to data to obtain nonlinear relations between MAP and throttle. The FDI unit uses such nonlinear relationships to estimate the value of the defective sensors.

A. SYSTEM MODELLING
The air-fuel ratio control is classified into various dynamics: fuel dynamics, air dynamics, and the sensor model [42].

1) AIR DYNAMICS
The air intake dynamics are defined in the following terms using the theory of mass conservation and the ideal air gas hypothesis: where T in is input temperature, P in is manifold pressure, and v in is input volume;ṁ th is the mass flow through the valve;ṁ Cyt is the mass flow into cylinders; R is the gas constant; N e is the engine speed and φ th is the throttle opening position. The time derivative of the intake temperature is considered to be zero. Then, the differential equation (16) becomes: The air mass flow through the valve is [43]: C d the coefficient of discharge. The variable P id is the overhead loading pressure and the load ratio P r is defined as P r = P in P id . S es (φ th ) is the throttle opening area. The product C d S es (φ th ) is specified as an effective opening throttle area. This variable is represented as: where g (P r ) is considered to a non-linear term as: With: γ =1.4 the specific heat ratio of the air.

2) FUEL DYNAMICS
The dynamics of fuel is demonstrated as: where τ f is the fuel vapor process at constant time [s],ṁ fi (t) the fuel flow injection [kg/s],ṁ f (t) the fuel flow in the cylinders [kg/],ṁ fv the vapor fuel flow [kg/s], andm ff (t) the liquid mass fuel flow [kg/s], it is possible to include as a vector depending on the throttle opening or engine rpm N e , to achieve a more detailed model [44]. The second solution has been chosen in our case: The air-fuel ratio is then obtained:

3) SENOR MODEL
The lambda sensor model is given by: with the constant time delay τ λ = 0.1s. An engine speed N e (t)with time delay τ is shown in equation 29 : τ (N e (t)) = 60 N e (t) 1 + 1 n cyl (28) VOLUME 9, 2021

B. CONTROLLER DESIGN
The description is briefly listed below for mathematical fault modeling and observer configuration. The types of sensor faults are generally classified as noise, drift, bias, gain, and hard fault. State-space representation is used to design AFTCS to minimize the effects of these faults. The statespace representation of the IC engine has been illustrated in [45] and given below: where x 1 and x 2 are state variables, and u, y, and y d denote the inputs, actual outputs, and desired output of the system respectively. α and β are the parameters of the engine which are calculated through engine speed N e . Using state observers, we get: wherex 1 andx 2 are the estimated values of observer design. A gradient descent algorithm is used to estimate the states in this ANN observer. The root mean square error is used to design an observer that precisely predicts the actual output y. The root mean square error is demonstrated as, whereȳ shows the estimated output, E represents the root mean square error and last but not least actual output is y.
The predicted output is presented as, In a steady-state, the desired output y d must be equal to the predicted output. So, The error function can be defined in the previous equation, so its partial derivative is The state variables are changed when we utilize a gradient descent algorithm, wherex 1 andx 2 are the predicted values, at (k) and (k + 1) are cycles and η is the learning rate. After putting the values of equations (42), and (43) into the (44), and (45) we get, where learning rate provides low settling time, low percentage overshoot, and better stability. Substituting the value of η in the (46), and (45) equations: We check the stability of the controller with the help of Lyapunov proof to make sure that it works properly.

C. LYAPUNOV STABILITY ANALYSIS
The stability of the control system needs to be maintained for practical operation. A direct Lyapunov approach is used with this neural network-based control method to prove the system's stability. The Lyapunov function is: If actual output y is equal to the desired output y d then V (x (k)) is equal to 0. Put the values of actual and desired outputs in the Lyapunov function as discussed earlier: The state estimation errors are presented below after solving the previous equation, So the Lyapunov function is, If we change (t) cycle into (t + 1) cycle then the equation is, where,x Inserting the values of estimated state variables (49), and (50) into the (57), and (58) as follows, Similarly, if we take the difference between actual and predicted (desired) (because they both are the same in steady-state as stated earlier) output, Substituting the values of state estimation errors (53), and (54) into the (61) equation, Now again put the values of difference equation (62) into (59) and (60), As we discuss earlier, Again substituting the values of equations (53), and (54) into previous equations (67) and (68) we get, The Lyapunov function can be written as, After solving this equation, we have, So, the difference between (k) cycle and (k + 1) cycle of Lyapunov function is, ∴ V (x (k)) = (y d − y) 2 as discussed earlier in equation (51), put this in equation (73) V This shows that the difference between the k cycle and the (k + 1) cycle of the Lyapunov function is negative definite. Lemma: Let the equation for the observer design for a nonlinear system would be as follows: where, A, B, and C are matrixes and g is a function of x, u, and y, and finally,L is a feedback gain for the nonlinear observer.
Let e x (t) be the error, The error equation for nonlinear system observer is: The error e x (k) approaches to zero asymptotically if there exists a matrix R, X, and scalar µ such that R = R T > 0 and µ > 0 to satisfy the following linear matrix inequality (LMI): where R is the reliability of each sensor. The observer gain matrix can be selected as follows: To prove it, consider the following Lyapunov function to prove its derivative to be zero: Now we will checkV (x) < 0∀x D − {0}as described below: Substituting observer gain equation into the above equation to get: If the following inequality holds, e x converges asymptotically to zero.
The last equation becomes equivalent to the first equation which completes the proof. The working of the proposed AFTCS is shown in Figure 3. Firstly, the system checks the sensor values and computes the threshold between the sensor and observer value. If there is no fault, the engine works in an appropriate way. On the other hand, if any single sensor fault is occurred, the error signal becomes out of threshold. The FDI unit replaces the faulty sensor value with the estimated value obtained from the observer model based on ANN and it is fed to the Engine Control Unit (ECU). The production of the estimated virtual value of the faulty sensor provides the analytical redundancy in the model.
In this model, the engine is assumed to operate at a constant speed of 300 r/min as per the design speed of the MATLAB model used in the study. The time in the switching and reconfiguration process has also been assumed zero seconds. Practically, a certain delay will occur in the controller computations. The limitations of the work are that only complete failure type faults are considered for the sensors without considering partial faults which will be covered in future works.

V. RESULTS AND DISCUSSION
The implementation of the proposed AFTCS in the MATLAB IC Engine model is illustrated in Figure 4. Four sensors (throttle, MAP, EGO, speed) have been used in this model. The fault is injected in the system manually by supplying fail low value through the fault injection unit. The estimated value is generated by the ANN-based observer using the values from other healthy sensors in the FDI unit and is supplied to the controller.
The FDI block is designed to locate, isolate, and reconfigure the faulty value parameter. The FDI block contains a reconfiguration and estimation block as shown in Figure 5.
The schematic for the internal block of the estimation block and reconfiguration block are shown in figures 6 and 7.
The reconfiguration unit is designed to calculate the residual and determine its bound. If the value of the sensor remains within bounds, no fault is registered. In the case of a fault, the sensor value exceeds its residual value, and is replaced by the estimated value obtained from the estimation unit.
All the estimations have been designed through an artificial neural network-based observer. The fault estimate unit is constructed using an advanced ANN approach based on the data  obtained from the model's lookup tables. Table 3 provides MAP sensor data set for 300 r/min.
The equation for a neural network for the MAP and throttle is obtained as by the following expression: The regression plot for the MAP estimator is shown in Figure 8. The regression line indicates the individual network outcomes in terms of the corresponding targets. If the network has learned to match the data correctly, it should overlap the left and right upper corners of the plot. If not, further training or learning would be advisable for a network of more unknown neurons. The neural network training plot is shown in Figure 9. The first graph in Figure 9 shows the gradient descent of the proposed observer. 7e-12 shows that we find local minima after 6 iterations. Secondly, mu is a momentum update that is      mu is between 0 and 1. Lastly, validation errors have been monitored, if any error in the dataset then validation checks are equal to the number of errors but in our case, no error has appeared, therefore, the validation checks are equal to zero. The throttle sensor data at 300 r/min are shown in Table 4.
And their corresponding regression (line fit) and train state plots are shown in Figures 10 and 11.
The regression line indicates the individual network outcomes in terms of the corresponding targets. If the network has learned to match the data correctly, it should overlap the left and right upper corners of the plot similarly with the linear fit for this output objective relationship. If not, further training or learning would be advisable for a network of more unknown neurons. The neural network training plot is shown in Figure 11.
The first graph in Figure 11 shows the gradient descent of the proposed observer. 3e-09 shows that we find local minima after 7 iterations. Secondly, mu is a momentum update that is included in the weight update expression to avoid the  problem of local minima. The range of mu is between 0 and 1. Lastly, validation errors have been monitored, if any error in the dataset then validation checks are equal to the number of errors but in our case, no error has appeared, therefore, validation checks become zero.
The performance of the proposed AFTCS in normal and faulty conditions is shown in Figure 12.
The fault is injected in each sensor one by one keeping others in a healthy state. The mixture AFR ratio is maintained at 14.6 in normal conditions and drops to 11.7 (rich mixture) in the faulty condition. However, the stability of the system is ensured despite degraded performance in the faulty conditions achieving the purpose of fault tolerance.

VI. COMPARISON WITH THE EXISTING WORKS
In this section, a comparison of the proposed work with existing works is carried out. In this work, we have developed a proper AFTCS architecture with a dedicated ANNbased FDI unit. Previously the work was done only for linear systems using Kalman filter, Linear regression, and lookup tables. It was limited to the linear range of the MAP sensor. In this paper, we have utilized the ANN technique to cover the entire nonlinear range of MAP sensor that also has less computational cost than lookup tables and hence, preferable.  ANN approach is now becoming a preferable approach in fault diagnostics due to its useful functions of learning, self-organization, and non-linear modeling capabilities. A comparison of ANN estimation performance is shown in Tables 5 and 6. These tables show the estimated values of throttle and MAP sensors and their corresponding mean square errors (MSE) that are much lower with ANN.

VII. CONCLUSION
In this paper, a novel AFTCS based on ANN for the highly nonlinear sensors of the AFR control system of SI IC engines was developed. In the proposed AFTCS, a nonlinear ANNbased observer was used in the FDI unit for analytical redundancy. The Lyapunov stability analysis was utilized to design a stable system in normal and faulty conditions. The system was implemented in MATLAB/Simulink environment. The simulation experiment results demonstrate that the suggested system stays stable with slightly degraded AFR in the fault conditions of sensors. A comparison with the existing works demonstrates the superior performance of the proposed AFTCS for the highly nonlinear sensors. The technique suggested is very effective in terms of fault robustness and is more specifically based on the nonlinear behavior of the MAP sensor compared to the existing works.
Future research work may include the use of advanced analytical redundancy such as recurrent neural networks (RNN) and convergence theory to support experimental results. The nodes of each RNN layer, unlike conventional ANNs, are interconnected. This self-connection allows RNNs to memorize more data from a sequence over time.

FUNDING
The author(s) received no financial support for the research, authorship, and/or publication of this article.