Sliding Mode Fault Tolerant Control for Unmanned Aerial Vehicle with Sensor and Actuator Faults

The unmanned aerial vehicle (UAV) has been developing rapidly recently, and the safety and the reliability of the UAV are significant to the mission execution and the life of UAV. Sensor and actuator failures of a UAV are one of the most common malfunctions, threating the safety and life of the UAV. Fault-tolerant control technology is an effective method to improve the reliability and safety of UAV, which also contributes to vehicle health management (VHM). This paper deals with the sliding mode fault-tolerant control of the UAV, considering the failures of sensor and actuator. Firstly, a terminal sliding surface is designed to ensure the state of the system on the sliding mode surface throughout the control process based on the simplified coupling dynamic model. Then, the sliding mode control (SMC) method combined with the RBF neural network algorithm is used to design the parameters of the sliding mode controller, and with this, the efficiency of the design process is improved and system chattering is minimized. Finally, the Simulink simulations are carried out using a fault tolerance controller under the conditions where accelerometer sensor, gyroscope sensor or actuator failures is assumed. The results show that the proposed control strategy is quite an effective method for the control of UAVs with accelerometer sensor, gyroscope sensor or actuator failures.


Introduction
Currently, with the exploration, development and utilization of aerospace and aircraft fields increasing significantly, the low-cost unmanned aerial vehicle (UAV) has attracted more and more attention among many of the world's powers [1][2][3][4]. The UAV flies mostly in the troposphere near the earth, which implies complex weather conditions such that the complex structures, such as the sensor and actuator of the UAV system, are more likely to lead to accident. Therefore, while using UAVs to carry out various missions has attracted more and more attention and also gained satisfying results [5], the method of how to reduce the accident risk of UAV is vital to extend the application of UAV further.
Sensor and actuator, key components to sense the flight state of UAV and control UAV, respectively, are some of the components most likely to fail due to their complex structure, hostile working environment, various unknown disturbances, and uncertain factors [6,7]. Thus, the fault tolerance control method of UAV is studied to implement effective control for possible faults of sensors and actuators [8][9][10], which is a necessary means to improving the reliability and safety of UAV, reduce potential safety risks, and prevent catastrophic accidents of the system, making the vehicle health management more convenient [11,12]. Research on fault detection and isolation (FDI) [13][14][15] and  [16,17], from both theoretical and practical perspectives, has received more attention in recent years. Advanced fault-tolerant control (FTC) systems are designed to help pilots overcome abnormal situations that previously might have resulted in catastrophic events [18].
The sensor of UAV mainly includes an accelerometer and gyroscope. When it fails, a series of wrong feedbacks will be introduced, causing a lot of trouble to the accuracy of control commands [19]. The actuator failure deteriorates the control performance and affects the stability and security of UAV, even leading to catastrophic accidents. In the current papers, efforts have been made for fault-tolerant control schemes for actuator or sensor faults. Wang [20] designed an adaptive sliding mode passive fault-tolerant controller with finite time convergence for the actuator's failure of the elastic hypersonic vehicle model. For actuator stuck faults, the authors of References [21][22][23] provide direct adaptive fault-tolerant control approaches. Gao [24] investigated the robust fault tolerant tracking problem for a linearized hypersonic vehicle model with bounded external disturbance and sensor faults. M. Chadli [18] designed the FTC for a Vertical Takeoff and Landing (VTOL) aircraft subject to external disturbances and actuator faults based on a faulty T-S uncertain disturbed model. The research on accommodating actuator and sensor failures and maintaining acceptable system performance continues to attract considerable attention from control engineers and motivated us to do this study.
As a typical robust control method, sliding mode control (SMC) scheme is regarded as an effective method to cope with external disturbance and parametric uncertainties [25][26][27]. Recently, the SMC method has been widely applied for fault tolerant control of aircraft systems, spacecrafts, and so on [28,29]. Zhang [30] proposed a method combining feedback linearization (FBL) and sliding mode control for reusable launch vehicle (RLV) to minimize the impact of control effector failures or damage. In Reference [31], a fault-tolerant sliding mode controller was presented for an aircraft system, which requires the message of the effectiveness factor, while it may be difficult and expensive to obtain the actuator faults online. Nguyen and Hong [32] designed an adaptive sliding mode Fault-Tolerant Control that can handle system uncertainties and actuator faults for quadcopter UAVs on the basis of normal adaptive sliding mode control and using RBF for fault identification and reconstruction. However, the method of Nguyen and Hong is based on the traditional linear sliding surface. Zeghlache [4] designed a fault tolerant control using Radial-Based Function Neural Network (RBFNN) fuzzy sliding mode for coaxial octorotor UAV, in which RBFNN is used to approximate the unknown part of the octorotor helicopter dynamic equation. By his approach, the approximation error, disturbance and the effects of faults can be compensated by the sliding mode control. The aforementioned references could achieve the desired performance through SMC methodology, taking sensor and actuator faults into consideration. However, they all adopt a linear sliding surface which results in the system states and the errors not being able to converge to an equilibrium point asymptotically in finite time. In other words, it means that finite-time convergence is not ensured. Motivated by the above discussions, the RBF combining the terminal sliding mode control were proposed to design the fault tolerant controller with actuator and sensor failures to achieve finite-time convergence. What is more, with the assistance of RBF, the efficiency of the design process is improved and the system chattering is minimized. However, to the best of the authors' knowledge, there are few researches concentrating on using RBF to adjust parameters for the sliding mode controller.
The objective of this study is to exploit the effectiveness of the FTC law for the overload tracking problem of a UAV system such that the closed loop system can maintain stability and performances for the actuator and sensor fault case. The main contribution of this paper is that it proposes a robust sliding mode fault tolerant control approach in the presence of actuator and sensor faults. The proposed method has considered RBF, which is used to design the parameters of the sliding mode controller and to attenuate the chattering. The rest of this paper is organized as follows. In Section 2, the simplified dynamic model of UVA is established. In Section 3, the terminal Sliding Mode Controller is designed and the stability of Sliding Mode is demonstrated, then the RBF Neural Network algorithm is used to design the parameters of the sliding mode controller. Simulation results are discussed in Section 4, and the conclusions are presented in Section 5.

The Simplified Dynamics Model of UAV
A simplified dynamic model of UVA is established in the body coordinate system with the consideration of coupling effects among pitch, yaw and roll channels.
where δ z , δ y and δ x are the equivalent angle of pitch, yaw and roll rudder respectively and they are also the virtual controls in this paper.  28 , and b 12 are the dynamic coefficients of UAV [33]. J x , J y and J z are the three channel moments of inertia. The coupling among the pitch, yaw and roll channels cannot be neglected by bank-to-turn (BTT) UAV, which can be listed as follows in Table 1.

The Design of Fault-Tolerant Control
The purpose of design of the terminal sliding mode fault-tolerant controller is to improve the robustness of system and to track the command signals precisely with sensor and actuator faults and coupling effects. To realize the efficient control of the simplified coupling model, coupling is often set as the disturbance term during the UAV controller design. The pitch, yaw and roll channels are separately designed, and then the simulation is carried out using a triple-channel control algorithm. The dynamic models of the three channels are as follows: Pitch channel γdt Due to the similarity among pitch, yaw and roll channels, the pitch channel will be derived only here.

Selection of Sliding Surface
An appropriate sliding hyperplane can ensure the stability and dynamic quality of the sliding mode motion. The terminal adaptive sliding surface improved from the traditional integral sliding surface is designed to describe the error of state variables: where c 1 , c 2 , and c 3 are the design parameters less than 0 and directly influence the time that the error converges to zero. c 1 is designed by pole assignment. c 2 and c 3 are chosen and adjusted according to the dynamic characteristics of the model using numerical simulation. When p/q is less than 1 and greater than 1/2, there is no singular problem. In this paper, 5 and 7 are chosen for p and q respectively.

The Design of Control Law
The design of control law of the variable structure is indispensable in achieving the asymptotic stability of the sliding mode motion and satisfactory dynamic quality of system. This paper adopts a hyperbolic tangent function instead of a sign function to eliminate the chattering of the variable structure control. Then, the continuous reaching law is: where µ is a small number, while ρ 1 and k 1 are the design parameters of the controller which are positive, and k 1 is obtained using the RBF neural network as shown below.
Differentiating the sliding surface of Equation (2) .
When input commands are standard, namely, . ω z0 = 0, . n yc = 0, substitute Equation (1) into Equation (4): where the coefficients above are defined as follow: According to Equation (5), the control law of SMC then can be designed.
u eq = 1 l 3 l 1 n y + l 2 ω z − c 2 n y0 − n yc 5 7 + l 4 ω x ω y (7) where u mf is equivalent to control law, u vf is a nonlinear control law.

Demonstration of Stability of Sliding Mode
The system stability is close to the performance of the controller. The nonlinear and strong coupling system of UVA studied above will be proved to satisfy Lyapunov stability. Due to the similarity among pitch, yaw and roll channels, pitch channel will be proved only here. Before, a Lemma 1 is given for the convenience of later demonstration.
Lemma 1 [34]: for an arbitrary x, when σ > 0, the following non-equality exists Demonstration: The expression of the hyperbolic tangent function is Due to Finally The demonstration of lemma 1 is finished.
To prove the stability of the designed sliding mode control system, the following Lyapunov function is established: The derivative of the Lyapunov function with respect to s 1 (x) can be represented as: Substituting Equation (5) into Equation (15): Then, the derivative of the Lyapunov function can be calculated by substituting Equations (6)-(8) into Equation (16): Equation (18)  While ρ 1 and µ are positive real numbers, according to quote 1, the following non-equality exists Ultimately, the derivative of Lyapunov function . v that is equal to Equation (20) plus (21) satisfies non-equality . v ≤ 0. According to Lyapunov stability theory, asymptotic stability of the control system of the pitch channel has been proved. The demonstration of yaw channel and roll channel are similar to the pitch channel.

RBF Neural Network Algorithm
In part 3, u vf represents the nonlinear control law.
The parameter k 1 is designed using the characteristic that the RBF can accurantely approximate any continuous function accurately. At the same time, from Lyapunov stability theory, we know that if k 1 is positive, the sliding mode control satisfies Lyapunov stability.
The RBF neural network uses a three-layer forward network. The input-to-output mapping is nonlinear, while the hidden-to-output layer mapping is linear, which greatly improves the learning speed and avoids the local minimum problem. The input of the first layer is the error signal and its derivative. The second layer of the hidden layer uses the Gaussian function as the basis function; the third layer is the output layer, and the output parameter value is output. Since the three channels are independently designed, the neural network design of the parameters of the sliding mode controller of the three channels is separately designed here.
In this paper, the RBF neural network is used to adjust the gain k 1 of the nonlinear control. The neural network structure is shown in Figure 1. The neural network adopts the structure of 2-7-1.
Sensors 2019, 19 FOR PEER REVIEW 6 While ρ and μ are positive real numbers, according to quote 1, the following non-equality exists ρ s tanh μ s 0 Then ρ s tanh μ s 0 (20) k is positive, then: Ultimately, the derivative of Lyapunov function v that is equal to Equation (20) plus (21) satisfies non-equality v 0.
According to Lyapunov stability theory, asymptotic stability of the control system of the pitch channel has been proved. The demonstration of yaw channel and roll channel are similar to the pitch channel.

RBF Neural Network Algorithm
In part 3, u represents the nonlinear control law.
The parameter k is designed using the characteristic that the RBF can accurantely approximate any continuous function accurately. At the same time, from Lyapunov stability theory, we know that if k is positive, the sliding mode control satisfies Lyapunov stability.
The RBF neural network uses a three-layer forward network. The input-to-output mapping is nonlinear, while the hidden-to-output layer mapping is linear, which greatly improves the learning speed and avoids the local minimum problem. The input of the first layer is the error signal and its derivative. The second layer of the hidden layer uses the Gaussian function as the basis function; the third layer is the output layer, and the output parameter value is output. Since the three channels are independently designed, the neural network design of the parameters of the sliding mode controller of the three channels is separately designed here.
In this paper, the RBF neural network is used to adjust the gain k of the nonlinear control. The neural network structure is shown in Figure 1. The neural network adopts the structure of 2-7-1 where the center vector of the jth node of the network is C j . B = [b 1 , b 2 , · · · b 7 ] T is the node center vector and output weight is W = [w 1 , w 2 , · · · w 7 ] T . Therefore, the parameters' output after the neural network calculation are: The learning algorithm of the base width parameter, the node center and the output weight in the above neural network can be obtained according to the gradient descent method. Let the performance indicator function be a quadratic function: Then the node center change value can be described as Then the node center value is: The base width change value is described as: Then the node base width is: The output weight change can be described as: Then the output weight is: where η is the learning rate, µ is the learning factor, 0 < η < 1, 0 < µ < 1 is also satisfied.

Simulation Results and Discussion
In order to verify the fault-tolerant control law derived above, the numerical simulation has been performed using a mathematic model of a certain UAV. As a representative case, the nominal dynamics features are set at a speed of 0.8 Ma and altitude of 8000 m. The dynamic coefficients of a feature point of UAV are shown in Table 2: The control parameters used for simulation are shown in the following Table 3. The parameters k 1 , k 2 and k 3 adjusted by RBF at the above characteristic points are 2.2, 3.1 and 3.7 respectively, and all of them are greater than zero. Therefore, according to Theorem 1, the controller designed is proved to be stable.
The UAV actuator and sensor faults are simulated respectively as follows: 1. Simulation results of fault tolerance control in case of sudden failures of the actuator Pitch channel is used as an example to conduct simulations. The UAV is assumed to be cruising at a fixed altitude of 8000 m. At t = 5 s, elevator is assumed fails and the deflection of steering gear is reduced 20%. The following Figure 2 shows the simulation results:  The control parameters used for simulation are shown in the following Table 3. The parameters k , k and k adjusted by RBF at the above characteristic points are 2.2, 3.1 and 3.7 respectively, and all of them are greater than zero. Therefore, according to Theorem 1, the controller designed is proved to be stable.
The UAV actuator and sensor faults are simulated respectively as follows: 1. Simulation results of fault tolerance control in case of sudden failures of the actuator Pitch channel is used as an example to conduct simulations. The UAV is assumed to be cruising at a fixed altitude of 8000 m. At t = 5 s, elevator is assumed fails and the deflection of steering gear is reduced 20%. The following Figure 2 shows the simulation results: The control of altitude uses the classical PID and the control of overload uses the fault-tolerant control designed in this paper. From the trajectory diagram in Figure 2a, during the cruise of UAV, the longitudinal trajectory has a slight fluctuation and quickly stabilizes back to the cruise trajectory when the actuator of the elevating steering gear fails; the details can be found in Figure 2b. What is more, there is no fluctuation in the trajectory of the X axis and Z axis, namely, the failure of the The control of altitude uses the classical PID and the control of overload uses the fault-tolerant control designed in this paper. From the trajectory diagram in Figure 2a, during the cruise of UAV, the longitudinal trajectory has a slight fluctuation and quickly stabilizes back to the cruise trajectory when the actuator of the elevating steering gear fails; the details can be found in Figure 2b. What is more, there is no fluctuation in the trajectory of the X axis and Z axis, namely, the failure of the actuator of the pitch channel will not affect the trajectory of the yaw channel and the roll channel, indicating that the decoupling of three channels is realized by the fault-tolerant control law.
The altitude of UAV changed slightly after the failures of the actuator, as shown in Figure 2b, and returned to the balance point of 8000 m after a period of 20 s with a maximum fluctuation of altitude of 3.8 m. As observed in Figure 2c, the pitch overload of UAV is stabilized quickly using the fault-tolerant control, namely, the UAV's attitude is stabilized which ensures the safety of UAV while the variation of the attitude angle of UAV is shown in Figure 2d-f. Although there is a slight attitude fluctuation, it is inevitable when the fault occurs. Similarly, this situation also exists in other reports, such as Reference [35]. Compared with Reference [35], the method of the paper gives a slighter fluctuation of trajectory when the fault occurs.
In general, it is found that the angular velocity, attitude and overload of UAV gradually reach the steady state and are also not far from steady state in the process after the actuator failure at t = 5 s using the fault-tolerant controller. The results indicate that the fault tolerant control can give a satisfied control performance and ensure the system safety of UAV even when the actuator fails.

Simulations results of fault tolerance control in case of sensor faults
It is assumed that the UAV is climbing at an acceleration of 1.1 g in the longitudinal plane. The gyroscope of the roll channel, pitch channel and yaw channel emerge with a 30% measurement error at 5 s, 10 s and 15 s, respectively, while the pitch accelerometer fails at 20 s with the measurement error of −20%. The following Figures 3-5 are the simulation results: Sensors 2019, 19 FOR PEER REVIEW 10 actuator of the pitch channel will not affect the trajectory of the yaw channel and the roll channel, indicating that the decoupling of three channels is realized by the fault-tolerant control law. The altitude of UAV changed slightly after the failures of the actuator, as shown in Figure 2b, and returned to the balance point of 8000 m after a period of 20 s with a maximum fluctuation of altitude of 3.8 m. As observed in Figure 2c, the pitch overload of UAV is stabilized quickly using the fault-tolerant control, namely, the UAV's attitude is stabilized which ensures the safety of UAV while the variation of the attitude angle of UAV is shown in Figure 2d, e and f. Although there is a slight attitude fluctuation, it is inevitable when the fault occurs. Similarly, this situation also exists in other reports, such as Reference [35]. Compared with Reference [35], the method of the paper gives a slighter fluctuation of trajectory when the fault occurs.
In general, it is found that the angular velocity, attitude and overload of UAV gradually reach the steady state and are also not far from steady state in the process after the actuator failure at t = 5 s using the fault-tolerant controller. The results indicate that the fault tolerant control can give a satisfied control performance and ensure the system safety of UAV even when the actuator fails.    From Figure 3a-c, the pitch channel fails at 10 s and 20 s. Only the pitch channel is affected while there is almost no influence on the yaw channel and roll channel. The same conclusion can also be drawn to the yaw channel and roll channel, indicating that the failures of one channel sensor have little influence on the other two channels, and the decoupling of three channels is realized using the fault-tolerant control law. Figures 4a and 5a show the pitch channel's attitude. The attitude is stabilized by the pitch overload controller rapidly within 3 s after the gyroscope in the pitch channel fails at 10 s. In the case where the accelerometer fails in 20 s, the attitude returns to the steady state within 5 s. When the yaw-channel gyroscope fails at 15 s, the lateral overload fluctuates slightly and returns to the balanced state as shown in Figures 3b, 4b and 5b. The roll angle fluctuates with ±0.5 degree when the roll-channel gyroscope fails in 5s as shown in Figure 3c. As can be seen from Figure 6, the three channels' sliding surfaces are smooth with slight fluctuations and rapidly recover to 0 when the sensor fails. The fault is also considered in Reference [20] but a longer time for the vehicle to regain stability is taken when a failure occurs.
In summary, Figures 3-6 show the simulation results in the case of a sudden failure of the gyro and accelerometer. With the fault-tolerant controller, the angular velocity, attitude and overload of UAV gradually reach the steady state after sensor failures. The results indicate the fault tolerant control can give satisfied control performance of UAV even when sensor fails. It can be seen that the whole system remains steady when some sensor fails, and the fault-tolerant controller has good robustness.

Conclusions
In this paper, a sliding mode fault-tolerant controller is designed to alleviate the influence of the sensor and actuator faults of UAV. Taking the simplified model of UAV as the research object, the integrated sliding mode surface is introduced to design the terminal sliding mode control law of overload and attitude control of UAV. Then, the Lyapunov function of the system is established and its stability is proved. The sliding mode control method combined with the RBF neural network algorithm is used to design the parameters of the sliding mode controller, with which the efficiency of the design process is improved and the system chattering is minimized. The simulations of pitch, yaw and roll channels are conducted under certain sudden faults of the sensor and actuator. Results show that a good control performance of UAV is found by tracking the angular velocity, attitude angle and overload when some actuators and sensors fault, indicating that the fault-tolerant controller has good robustness which provides a guidelines for the design of FTC law of UAV with sensor and actuator Faults. Future work will focus on the controller design of the UAV's nonlinear systems and apply it to practical engineering.