Neural Network-Based Active Fault-Tolerant Control Design for Unmanned Helicopter with Additive Faults

: A novel adaptive neural network-based fault-tolerant control scheme is proposed for six degree-of-freedom nonlinear helicopter dynamic. The proposed approach can detect and mitigate actuators and sensors’ faults in real time. An adaptive observer-based on neural network (NN) and extended Kalman ﬁlter (EKF) is designed, which incorporates the helicopter’s dynamic model to detect faults in the actuators and navigation sensors. Based on the detected faults, an active fault-tolerant controller, including three loops of dynamic inversion, is designed to compensate for the occurred faults in real time. The simulation results showed that the proposed approach is able to detect and mitigate different types of faults on the helicopter actuators, and the helicopter tracks the desired trajectory without any interruption.


Introduction
In recent years, unmanned aerial vehicles (UAVs), especially unmanned helicopters, have achieved significant improvement because of their remarkable vertical landing and take-off capabilities, hovering, and maneuverability.The unmanned helicopters have a complex and inherently unstable nonlinear dynamic system [1].Therefore, they require an efficient flight control mechanism to ensure a successful mission, such as fire suppression, urban traffic control, mapping, and surveillance.To this, the proper application of sensors in a UAV has a significant role.Sensor fusion is a solution to reduce the uncertainty in the measurement of the UAV parameters [2].However, UAVs' nonlinear characteristic implies the importance of mitigating any possible disturbance in the sensors' application.Conventional controllers employ linearization methods to deal with the nonlinear characteristics of the dynamic flight model [3,4].Since the linearized model is an approximate estimation of the nonlinear system, it cannot cover most of the nonlinear characteristics of helicopter dynamics; thus, the derived control system is vulnerable against the inherent uncertainties and nonlinearities in the helicopter behavior.
In the last decade, due to the striking development in computing power and technology, more efficient strategies for designing helicopter flight control based on the nonlinear dynamic model of systems have been introduced, such as differential programming method [5,6].Basically, a helicopter's dynamic system is a multiple-input and multiple-output (MIMO) subject to considerable external uncertainties [7].Recently, many studies have been applied on helicopter dynamics, e.g., a study by Abbaspour et al. focuses on nonlinear optimized adaptive control of helicopter [8].In their study, a six degree-of-freedom (DoF) model of a helicopter is controlled using three time-scale separation architecture through nonlinear dynamic inversion (NDI).Their study leveraged a neural network (NN) algorithm whose gains were tuned using an offline optimization algorithm.Dalamakidis et al. studied nonlinear model predictive optimization for small unmanned helicopters, which presents a predictive controller improved by a recurrent neural network (RNN) applying a nonlinear optimization [9].Their algorithm could control an unmanned helicopter that uses an objective function programmed to reduce the risk of fatalities to humans on the ground.But, in their study, due to the significance of the UAV application that is human safety, the algorithm's accuracy requires to be improved to prevent probable failure.In [10], a fuzzy gain-scheduler is applied to control an APID-MK3 unmanned helicopter attitude in the whole range of the angles and tracking a given trajectory at the highest possible velocity.Their controller consists of a realistic nonlinear MIMO model that could show its stability concerning external disturbances.
Faults in the sensors directly impact the controller's performance due to their role in providing system feedback to the controller [11].This problem attracts more attention for inherently unstable systems like helicopters that need constant control and supervision.In order to increase the system's reliability, redundancy is a solution for replacing faulty sensors.However, it increases the UAV's cost and weight, which could be a notable drawback in the application of small-scale UAVs.Another approach to tackle the probable faults in a UAV is the concept of active fault-tolerant control (AFTC) [12][13][14].AFTC techniques use fault detection data to compensate faults based on the occurred fault; however, passive FTC performance is not dependent on fault detection and isolation (FDI) information and acts regardless of fault information.Park et al. applied a secure AFTC air transportation system design under the disrupt attacks through the satellite-based navigation system [15].Park's method applied a detection and defense technique using the Doppler/received signal strength.Their method included an AFTC to detect and damp the attacks.Also, the AFTC algorithm's evaluation shows a sustainable detection and correction mechanism even in intentional data sabotaging.Rudin et al. introduced a method to control a nonlinear dynamic system with imperfect fault detection information by employing the AFTC [16].Their proposed FDI system could identify the faulty actuator; however, it was unable to recognize the fault's size and type.Their method was successfully tested on a UAV experimental setup in the presence of aileron and flap faults.This work proposes a new control design for an unmanned helicopter by introducing an AFTC design that uses an artificial neural network (ANN) FDI system to detect faults and false data injection attacks.An extended Kalman filter (EKF) is incorporated to update the ANN weights and improve the algorithm's accuracy and response time.This algorithm is implemented on a six DoF model of Yamaha R-50 unmanned helicopter to evaluate the proposed controller's efficiency.Most of the previous works focused on 3 DoF models of helicopters where they could not cover all the nonlinear behavior of helicopters motion.Therefore, using 6 DoF in designing the helicopter will lead to obtaining an accurate controller which covers most of the nonlinear behavior helicopter that is robust against uncertainties.The complexity of controlling a naturally unstable system requires a massive amount of calculation.Moreover, the UAV's control design must be reliable enough to ensure a successful function during significant missions such as rescue missions.The proposed neural network-based active fault-tolerant controller is applied to a small-scale helicopter to improve its capability in controlling the attitudes in the presence of faults and false data injection attacks on the navigation sensors.In this method, based on the FDI system's data, the algorithm compensates the injected fault by the proposed AFTC design, consisting of the proposed FDI and the nonlinear dynamic inversion (NDI) controller.The main contribution of this paper can be summarized as follows.
1) Introducing a novel design to detect and isolate possible faults and false data injected attacks in a nonlinear six DoF model of the helicopter's navigation sensors.
2) Designing a new AFTC system based on a three-loop NDI to compensate for the occurred faults/false data in real-time.
3) Using six DoF models to design the FDI and AFTC system, which makes the controller performance robust against nonlinearities and uncertainties in simplified and linear models.
In the following, Section II presents the nonlinear dynamic model of unmanned helicopters.Section III explains the proposed algorithm, and Section IV is the implementation of this algorithm on the UAV.Finally, Section V provides the conclusion.

Helicopter nonlinear dynamic model
In this section, a precise flight dynamic model has been presented for a small-scale UAV called Yamaha R-50 [8].To achieve the best attitude approximation of the helicopter, a six DoF rigid-body dynamic model is employed.Based on Fig. 1, the state space equations of the helicopter model is described below where O, J, and K are the rolling, pitching, and yawing moments, respectively.The states of this dynamic model p, q, and r are roll, pitch, and yaw rates related to the body-fixed frame.The parameter I indicates the moments of inertia.In addition, the states describing the associated angles with the roll, pitch, and yaw are defined as follows where α, β, and γ are the angle of the roll, pitch, and yaw, respectively.In this model, θ and φ are known as lateral and longitudinal flapping angles, respectively, which can be defined as where n is the blade lock number which explains the aerodynamic forces and the blade inertia moments rate.The rotational speed of the rotor is indicated by m.This helicopter is supposed to be controlled by a remote controller.Regarding Equation (10), the control vector of this remote controller consists of four inputs.
UAVs have four main control inputs, which are lateral cyclic (L lat ), longitudinal cyclic (L long ), collective cyclic (L col ), and the collective pedal input of tail rotor (L ped ) used to control yawing moment.In this paper, to indicate the relation between the remote controller vector, v, and the moments of UAV, a simplified model of the rotor aerodynamics during hovering situation is employed [17] and described as where o lat , j lat , and k lat relate the lateral moment to the lateral remote controller input, L lat .Also, o long , j long , and k long relate the longitudinal moment to the longitudinal remote controller input L lat .Also, o ped , j ped and k ped are related to the pedal collective remote controller input L ped .The initial momentum values are shown as o 0 , j 0 , and k 0 .Considering the rotor aerodynamics model for a hovered UAV, not only the cost of data collecting is decreased, but also the accuracy of moments measurement is boosted [18].

Neural network, EKF adaptive approach
Active fault-tolerant control algorithms are based on an online fault detection and diagnostic (FDI) method employed to update the controlling system.This method is responsible for distinguishing faults by analyzing the system's data.This paper presents an FDI strategy based on a neural network algorithm updating EKF algorithm.The neural network adaptive structure is used to control the proposed helicopter dynamic model.

Neural Network Adaptive Structure
In complex nonlinear and naturally unstable dynamic systems such as helicopters, any probable fault can significantly impact the desired performance, leading to a system failure.Moreover, considering the random nature of nonlinear faults, it is challenging to predict them.In the last decades, remarkable methods are introduced in the field of fault detection [19][20][21][22][23]. Regarding these methods, the adaptive neural network algorithm shows a powerful capability in estimating the fault behavior [24][25][26].The neural network adaptive structure (NNAS) detects faults based on the nonlinear observer output.In contrast, the adaptive neural network (ANN) tries to predict the behavior of the nonlinear system [27].Equation (12) describes the state space equation of a nonlinear system with additive noise and adaptive neural network as follows where ŷ is the observer's output vector, x(t) indicates the state space vector of the nonlinear observer, and ζ(t) presents the neural network observer as where ζ i (t) is the i th vector of ζ(t).M i (t), and N i (t) are presenting the weights of i th output of the neural network algorithm.τ is the observer step size that is defined as the sampling period.Also, Equation ( 14) defines the N i (t)λ i (t) value as where a and b are the weight parameters in the neural network algorithm tuning the algorithm's accuracy and calculation time.More values of a and b lead to more accuracy in the neural network algorithm [28].Although increasing the neural network weights ensures the method's convergence, the calculation time will be increased due to more required computation.Therefore, optimizing the neural network algorithm's weight parameters should be based on the required accuracy and response time.

EKF and neural network weight update
The extended Kalman filter is an estimation method that can be employed to optimize the weight parameters in the neural network algorithm.Employing the EKF for tuning the weights parameters helps decrease the neural network computation time.This could make it possible to apply this algorithm in a real-time problem.To apply the EKF, an update parameter should be considered as [29] where E i (k) indicates the EKF updating parameters for the k th sampling instant and the i th element of the neural network adaptive structure algorithm.To calculate each updated parameter for the k th sample, E i (k) can be reformulated as where l i is the learning coefficient and K i (k) shows the Kalman gain in the EKF algorithm.The Kalman gain is calculated as below where C e i (k) is the state estimation error covariance matrix, C b i (k) is the estimated noise covariance matrix, and K i (k) indicates Kalman gain.In order to calculate the covariance matrices, a recursive approach is employed [30] Considering Equations ( 13) and ( 17), D i (k) can be computed as below

Fault detection and diagnostic design for actuator
The actuator in the dynamic system of a helicopter plays a critical role in the control of its attitude.This component requires the fastest response to the operator commands.Therefore, the fault detection and controlling procedure should be processed in a required amount of time to maintain the actuator performance successfully.To indicate the motion equations of the helicopter angular rate with actuator disturbances, we have where ω(t) is the actuator fault, f (x) and g(x) can be derived from Equations ( 1) to (3) as Finally, considering the above equations, fault detection and isolation design for the helicopter actuators can be described as where u ob and u e are the nonlinear observer model of the actuator and the error in the fault detection procedure, respectively.Also, u is defined in Equation (28).ζ i updated by the sampling period can be formulated as To explain the updating process of the proposed method, Fig. 2 shows the flowchart of updating the NN parameters.

Active fault tolerant control strategy
In the control design of a UAV attitude, an accurate and fast fault detection method is essential, but a reliable controller is required to filter the detected faults.In this paper, the proposed controller is divided into two main feedbacks.The first feedback controller, known as nonlinear dynamic inversion controller, consists of two inner and outer loops.The second feedback is the adaptive fault compensation controller.

First feedback controller: nonlinear dynamic inversion
Nonlinear dynamic inversion can control the helicopter attitude by feedback linearization technique [12].This method consists of two control loops, which have to be completely different in frequency bandwidth to prevent any probable interaction [31].Hence, the state dynamics should be controlled by inner and outer control loops that have faster and slower responses, respectively.In the helicopter control system, the six DoF controller model can be formulated as [32] where x and ẋ are state variables and f is the invertible mapping function, which transforms control variable κ to the state variables.f presents an analytical model for the helicopter dynamics.Therefore, the helicopter control system can be described as where Γ is the inversion error.

Inner control loop
In the helicopter dynamic model, the fastest states are attitude rates p, q, and r.Also, the control variables which control the actuator are angular rates L lat , L long , and L ped .Referring to Equations (1) to ( 3) and ( 20) to (22), the inner loop dynamics can be described as where f p , f q , f r , and g in (x) are presented in Equations ( 20) to (22).Considering the desired angular rates, the inner loop controller can be defined as where ṗd , qd , ṙd are desired angular rates.p r , q r , r r are the received angular rate from the outer loop.ω p , ω q , ω r are the inner loop gains selected by the designer to reach the desired goal.To guarantee the stability of the of g in (x) and its inverse matrix g in (x), innerloop gains should be chosen sufficiently large [33].In this way, we can guarantee that the determinant of g(x) will never merge to zero and it's inverse will be stabilized and bounded.

Outer control loop
To control the slow states of the helicopter, α, β, and γ, the outer loop receives input commands α i , β i , and γ i from the guidance system and sends the outputs p r , q r , and r i as the reference commands to the inner-loop controller.The assumption of the time scale separation between the inner-loop and the outer-loop controllers ensures that the deflections of the control surfaces L lat , L long , and L ped have no interaction with the outerloop states.Considering Equations ( 5) to (7), the outer-loop states can be described as where the concept of functions f , and g are defined in Equations ( 21) and (22).In order to obtain the desired slow states, the outer-loop controller is defined as below where ω α , ω β , ω γ are the outer-loop gains selecting by the designer to reach the desired goal.

Adaptive fault compensator design
Disturbances in the dynamic system of a helicopter can be detected and controlled by the proposed controller.Moreover, to compensate for the system's error, this controller, including a nonlinear dynamic inversion and an adaptive neural network structure, employs a real-time feedback command.This fault-tolerant control design can be formulated as where ω(t) is the actuator fault and f a (t) indicates the neural network compensator for the system disturbances.Figure 3 illustrates the framework of the proposed method.This figure indicates the interconnection between the FDI system and the active FTC.

Implementation of the proposed method on helicopter
The helicopter can be affected by noises in the part of sensor measurements.In order to test the neural network's reliability, the EKF adaptive algorithm, the rolling, pitching, and yawing rates of the helicopter are affected by three separated abrupt, incipient, and intermittent faults.

Faults description
Sensors used in unmanned helicopters can be affected in various methods.Some faults can occur in various sensors, while others would affect a particular sensor [34].In this paper, the following faults are considered.

Abrupt faults
During the helicopter's operation, a parameter value may shift faster than the nominal dynamic process due to electrical or communication problems.These problems can result from the helicopter vibrations, short circuits, or metal flake separating.

Incipient faults
Incipient faults are complicated to be detected, and they could cause severe problems leading to system failure.Detection of incipient faults requires an advanced fault detection and diagnosis (FDD) algorithm [35].A partial sensor failure is typically the primary cause of an incipient fault [28].This fault can be mathematically modeled [36] by Equation (35) as below Fault(t − τ) = 1 − e −w(t−τ) f or t τ (35) where w shows an unknown fault evaluation rate.A small amount of w leads to a slightly increasing slope called incipient faults, while a large amount of w results in a step shape fault known as a sudden fault.

Intermittent faults
Intermittent faults are not easily repeatable because of their complicated behavioral patterns but can affect the system due to any sensors malfunction at irregular intervals.This kind of fault is notoriously difficult to identify since it occurs for a short period of time.

Numerical simulation
In this paper, the test-bed is the model of the Yamaha R-50 small-scale unmanned helicopter.The neural network EKF adaptive algorithm is applied to this model to show the proposed method's reliability during operation.The following assumptions are made to achieve the most optimized outcome.
1) The helicopter blade is twisted along the length of the blade due to the unbalanced lift compensation.
2) The helicopter rotors are assumed as teetering rotors.This means the blades flap without any curve.
3) Since the wind speed is presumed to be zero and the air density is constant, there is no external force on the helicopter body.
4) Table 2 shows the used parameters for the rotor aerodynamics in the helicopter model simulation.
Three different faults explained in the previous subsection are injected into the rolling rate (p), pitching rate (q), and yawing rate (r) of the unmanned helicopter sensors.The simulation results shown in Figures 4 to 6   0.044 j 0 -0.47 k 0 0.73 detect a wide range of possible system faults.The obtained results prove that the algorithm is reliable enough to be applied for the proposed active FTC design and to guarantee an unmanned helicopter's performance during hovering in the presence of faults.In order to prove the fault tolerance capability of the proposed FTC design, a circular trajectory, as shown in Fig. 7, is implemented to the helicopter.The abrupt fault is injected into the rolling, pitching, and yawing rates for 20 seconds of the simulation, as shown in Fig. 4. The result of the proposed FTC design is compared with a nonlinear dynamic inversion controller.As Fig. 7 shows, the proposed controller is able to mitigate the injected fault and track the commanded trajectory with sufficient accuracy.

Conclusion
This paper introduced a novel technique for detecting and mitigating fault and false data injected attacks in the sensors of an unmanned helicopter using NN and EKF.In the proposed algorithm, a combination of a model-based observer and an adaptive NN is used to detect and isolate faults.This combination is used due to its independence to training data and robustness against uncertainties in the model-based observer.To further improve the detection system's accuracy, the EKF is introduced to tune the neural network weights.In order to test the efficiency of this algorithm, a nonlinear dynamic model of a small unmanned helicopter named Yamaha R-50 is employed.The simulation results show that this method can appropriately identify three distinct faults.These three fault categories are abrupt, incipient, and intermittent faults, which cover the most significant potential analytical faults in the navigation sensors during a helicopter flight domain.Then, based on the designed detection system, an active fault-tolerant control system is designed to mitigate the detected faults/false data.The effectiveness of the proposed design has been tested and evaluated through the different simulation scenarios.The proposed algorithm improves the reliability and safety of unmanned systems and prevents catastrophic incidents caused by faulty sensors.
In the future study, the proposed FTC method could be applied to a real UAV to evaluate its application in real-life.Also, the application of this method can be applied to other UAVs such as drones to investigate its reliability on similar nonlinear dynamic systems.Moreover, while in this study the EKF is used to regulate the NN weights, it is possible to use other algorithms in this regard, such as the unscented Kalman filter (UKF).

)Figure 1 .
Figure 1.Description of roll, pitch, and yaw in the dynamic helicopter model.

Figure 3 .
Figure 3. Proposed united framework for AFTC diagram of a helicopter.
(a) Abrupt fault detection in rolling rate measurement.(b) Abrupt fault detection in pitching rate measurement.(c) Abrupt fault detection in yawing rate measurement.

Table 1 :
The helicopter model parameters definition moment of inertia around xz plane