Active Fault-Tolerant Control of a Quadcopter against Time-Varying Actuator Faults and Saturations Using Sliding Mode Backstepping Approach

: Fault-tolerant control is becoming an interesting topic because of its reliability and safety. This paper reports an active fault-tolerant control method for a quadcopter unmanned aerial vehicle (UAV) to handle actuator faults, disturbances, and input constraints. A robust fault diagnosis based on the H ∞ scheme was designed to estimate the magnitude of a time-varying fault in the presence of disturbances with unknown upper bounds. Once the fault estimation was complete, a fault-tolerant control scheme was proposed for the attitude system, using adaptive sliding mode backstepping control to accommodate the actuator faults, despite actuator saturation limitation and disturbances. The Lyapunov theory was applied to prove the robustness and stability of the closed-loop system under faulty operation. Simulation results show the e ﬀ ectiveness of the fault diagnosis scheme and proposed controller for handling actuator faults.


Introduction
The quadcopter unmanned aerial vehicles (UAVs) have drawn attention for their potential use in a wide range of technologies and applications due to their reliability, agility, mechanical simplicity, and ability to operate in narrow and dangerous spaces both in outdoor and indoor environments. This adaptability and reliability promote its universality over other UAV systems. Therefore, quadcopter UAVs have been investigated and applied in different technologies, including precision landing [1,2], formation flight [3,4], fault-tolerant control [5,6] and trajectory tracking [7,8].
Currently, the vertical and horizontal movements of a quadcopter are controlled by a pilot with a remote-control system, whereas angular movement is automatically controlled by an onboard flight controller. The attitude controller is more crucial for maintaining the quadcopter at an appropriate coordinate, because it not only allows the quadcopter to achieve the desired attitude, but also avoids crashing when the pilot operates the desired vertical and horizontal movements [9]. During operation, one critical issue with the attitude controller is the uncertainties of the model and the disturbances that the quadcopter encounters. Previous studies have proposed various control schemes, such as backstepping control [10,11], fuzzy control [12,13], sliding mode control [14,15], and neural network technique [16,17], to handle this problem. When faults occur, solving the control problem to guarantee the stability of the quadcopter becomes a greater challenge [18], because this control problem could lead to a flight failure. Therefore, fault-tolerant control (FTC) is an important factor that should be examined intensively while designing the attitude controller.
Recently, the study of FTC has enabled researchers to reinforce the safety and reliability of systems. Generally, the types of faults examined in FTC systems are process, actuator, and sensor faults. The actuator is a crucial element in obtaining a specific rotation for translation, because it can connect to the control signals. Therefore, the actuator faults were investigated in this work. There are two methods to handle this kind of faults: Passive FTC (PFTC) and active FTC (AFTC). Previous studies have focused on PFTC approaches to accommodate the actuator faults using a robust controller that does not depend on robust fault detection and the fault estimation scheme. Different methods have been proposed based on adaptive control, feedback linearization, and H ∞ adaptive control [19][20][21]. These methods are good for fault compensation, but they are not sufficiently robust for disturbances and uncertainties if the system matrices are not accurate. To overcome this problem, several nonlinear techniques have been proposed based on sliding mode control, adaptive sliding mode control, neural network control, fuzzy control, and backstepping control [22][23][24][25][26][27][28][29][30][31]. These studies present robust controllers for fault accommodation. The above-mentioned PFTC methods can address faults in fault-free and faulty operations. However, in PFTC schemes, the magnitude of faults is designed in a given boundary.
To handle the large magnitude of faults, AFTC using a fault detection and identification unit, has been proposed [32]. Various approaches based on sliding mode control for the quadcopter have been investigated. For instance, several authors have proposed a sliding mode control based on active and passive FTC [33]. In this work, the PFTC mode in fault-free operation was switched over to AFTC when a fault was detected. The experimental results on Qball-X4 showed that the AFTC method can compensate better than PFTC during tracking. When faults occur in an actuator, both methods can successfully drive the quadrotor. This work also compared the merits and demerits of each approach. An on-line FTC method is also proposed based on the control allocation technique and sliding mode control [34]. When faults occur in an actuator, the control allocation scheme uses the effectiveness level of the actuator to redistribute the control signals to the remaining fault-free actuators. In another famous study using a sliding mode fault-tolerant controller, a fault detection unit was generated from a linear observer [18]. When a fault was detected, a reconfiguration technique was used by scarifying the yaw control. The simulation results showed that the reconfiguration scheme could conduct a good tracking operation in the presence of partial loss in nominal thrust. The advantage of this method is that it was able to reject disturbances and uncertainties in fault-free operation. Another study proposed the sliding mode observer and sliding mode control for the AFTC scheme [35]. In this work, the fault estimation from the sliding mode observer was injected into the sliding mode controller for reconfiguration. The results show the effectiveness of this method in the presence of disturbances and uncertainties. Recently, there was a study on tracking control for a quadrotor using sliding mode and backstepping control [15]. The results showed that the proposed method could handle the chattering phenomenon and uncertainties, but this approach was complicated because it used the fuzzy method, which is a trial and error method. Moreover, that work did not focus on an actuator fault in a quadcopter model, which is what motivates us to conduct this study. An active FTC method for actuator fault control in the presence of disturbances and uncertainties is proposed in this paper. This method offers robust control for time-varying actuator faults and saturation, which was limited in previous studies. The main contributions of this study, over the previous ones, can be summarized as follows: • The fault diagnosis based on H ∞ technique [36] is introduced to estimate the time-varying faults.

•
The AFTC based adaptive sliding mode backstepping [15] was improved here to ensure that the tracking performance converges to zero in spite of time-varying, actuator faults and disturbances. • A modified AFTC is proposed to handle the input saturation. • Stability analysis in presented to verify the robustness of the proposed controller.
The remaining article is organized as follows. Section 2 introduces the quadcopter dynamics. The active fault-tolerant control based on adaptive sliding mode backstepping control and H ∞ technique Appl. Sci. 2019, 9, 4010 3 of 19 for attitude system is discussed in Section 3. Section 4 presents the simulation results. The conclusions and recommendations for future work are provided in Section 5.

Quadcopter Modeling
A quadcopter is subjected to torques and forces ( Figure 1). Quadcopter dynamics are examined in an inertial frame, B and an earth frame, E. The quadcopter model consisted of two counterclockwise and two clockwise rotating motors. The arm length is denoted by L. The dynamics of the quadcopter can be described as follows [37][38][39][40][41][42][43][44]: where I x , I y , I z are the moments of inertia along the x, y, z directions, respectively; K 1 , K 2 , K 3 , K 4 , K 5 and K 6 are drag terms; J m is the moment of inertia of an individual motor, and with ω i being the rotational speed produced by the ith motor; m is the total mass; φ, θ, and ψ are the Euler angles including roll, pitch, and yaw, respectively; x, y, and z denote the position of the quadcopter; and the four control inputs can be presented as: where τ i = dω 2 i and F i = bω 2 i represent the torques and thrust forces, respectively, induced by the ith motor; b and d are positive constants, and U T is the total thrust; U φ , U θ and U ψ are the torques in the roll, pitch, and yaw directions. The remaining article is organized as follows. Section 2 introduces the quadcopter dynamics. The active fault-tolerant control based on adaptive sliding mode backstepping control and H ∞ technique for attitude system is discussed in Section 3. Section 4 presents the simulation results. The conclusions and recommendations for future work are provided in Section 5.

Quadcopter Modeling
A quadcopter is subjected to torques and forces ( Figure 1). Quadcopter dynamics are examined in an inertial frame, B and an earth frame, E. The quadcopter model consisted of two counterclockwise and two clockwise rotating motors. The arm length is denoted by L. The dynamics of the quadcopter can be described as follows [37][38][39][40][41][42][43][44]:  x y and z denote the position of the quadcopter; and the four control inputs can be presented as:   The relationship between thrust force and control inputs (Equation (2)) can be rewritten as: The bound of control inputs can be calculated as: where ω max is the maximum velocity of each actuator.

Active Fault-Tolerant Control System Design
The active fault-tolerant control scheme is presented in this section. The control structure is shown in Figure 2. First, a fault diagnosis unit is proposed to estimate the magnitude of actuator faults. Then, a modified adaptive sliding mode backstepping (MASMBC) control is designed to tolerate actuator faults by combining the fault estimation and adaptive sliding mode back stepping control (ASMBC).
Appl. Sci. 2019, 9, x FOR PEER REVIEW 4 of 19 The relationship between thrust force and control inputs (Equation (2)) can be rewritten as: The bound of control inputs can be calculated as: where max ω is the maximum velocity of each actuator.

Active Fault-Tolerant Control System Design
The active fault-tolerant control scheme is presented in this section. The control structure is shown in Figure 2. First, a fault diagnosis unit is proposed to estimate the magnitude of actuator faults. Then, a modified adaptive sliding mode backstepping (MASMBC) control is designed to tolerate actuator faults by combining the fault estimation and adaptive sliding mode back stepping control (ASMBC).

Fault Diagnosis Scheme
In this section, the designing of a fault estimation scheme through an adaptive observer in the presence of actuator faults and external disturbances is presented. This information is used for controller design, which is presented in Section 3.2.

By defining
as the control force vector, and      as the output vector, and using linearization technique for z − direction and attitude system at hovering point [37], Equation (1) can be rewritten in a state-space form as:

Fault Diagnosis Scheme
In this section, the designing of a fault estimation scheme through an adaptive observer in the presence of actuator faults and external disturbances is presented. This information is used for controller design, which is presented in Section 3.2.
By defining z as the output vector, and using linearization technique for z-direction and attitude system at hovering point [37], Equation (1) can be rewritten in a state-space form as: .
Appl. Sci. 2019, 9, 4010 When a fault occurs in the actuator, Equation (5) becomes [37]: . where ; ϑ i (t) = 0 and ϑ i (t) = 1 means that the ith actuator is completely healthy or fully damaged, respectively. The state space model (Equation (6)) can be rewritten as: . where Before designing the adaptive observer, the following assumptions and lemmas are proposed.
Lemma 1. For a given matrix P = P T ≥ 0 and scalar ρ > 0, the following inequality must be satisfied: If all the above-mentioned assumptions and lemmas hold, then the adaptive observer can be constructed as: Theorem 1. For a given observer gain, L, constant ε > 0, if there exist the matrices P = P T > 0, Appl. Sci. 2019, 9, 4010 , and I p is the unitary matrix with appropriate dimension, then, the fault estimation law can be presented as: Stability Let then the error dynamics can be obtained from Equations (7) and (9) as: .
From Lemma 1, Assumption 1, and Theorem 1, we obtain: where λ max is the maximum eigenvalue of the associated matrix.
The H ∞ tracking index function is chosen to ensure that the adaptive observer is robust against the external disturbance as: Appl. Sci. 2019, 9, 4010 7 of 19 With the initial conditions (V(0) = 0, V(∞) > 0), we obtain: From Equation (19), the integral term can be described as: where If the following inequality holds: when we have N < nI n and thus can obtain J < η. (10) and (11) simultaneously, the linear matrix inequalities (LMI) technique was applied to relax these conditions. Equation (11) was modified according to previous study [5].

Adaptive Sliding Mode Fault-Tolerant Controller Design
In this part, the ASMBC is proposed in Section 3.2.1 to handle fault disturbances and time-varying actuator faults in attitude systems through adaptive law and fault estimation as seen in Section 3.1. Then, a modified ASMBC is designed to address the input constraints, which is presented in Section 3.2.2.
where U φ , U θ , U ψ , U T are the control inputs for faulty operation denoted by: Let ∆ϑ i = ϑ i −θ i be the estimation error, the actuator fault model can be written as: From Equations (24)-(26), we obtain: ..
and the uncertainties from estimation errors: Appl. Sci. 2019, 9, 4010 9 of 19 By defining the state vector as T and the control inputs vector as U = U φ U θ U ψ = v 1 v 2 v 3 , the rotational movement equations of the quadcopter become: Let us define the desired attitude as x d i . The control goal is to find a control law, u i , such that x 2i−1 (t) → x d i as t → ∞ , with i = 1, 2, 3. If we define the control error as: Then the first sliding surface can be described as: where k i is the positive constant.
Let us now choose the Lyapunov function: The time derivative is given by: The virtual control input can be defined as: Substituting the virtual control value of x 2i , Equation (34) becomes: then, e i = 0 is globally asymptotically stable. The second sliding surface has a form as: From Equations (30), (31), and (37), . s 2i can be written as: With the sliding surface in Equations (31) and (37), the fault-tolerant control law can be expressed as: and updated by [44]: where β i is a positive constant, and sign(.) denotes the sign function. By considering the Lyapunov candidate as: where Assumption 2. There exits an unknown parameter, Γ i > 0, such that the uncertainties are assumed to be bounded |ζ i | ≤ Γ i .
From Assumption 2, it is clear that .
V 2i ≤ 0. Therefore, the adaptive sliding mode backstepping control law in Equation (39) will asymptotically stabilize the system.

Remark 2.
To avoid the chattering phenomenon, a saturation function is introduced to replace the sign function as:

Adaptive Sliding Mode Controller Design with Input Saturations
In real applications, the controller presented in Equation (39) might not be implementable because of the saturation limit. Let us denote v max > 0, v min > 0 as the maximum and minimum control inputs. Then, the rotation movement in Equation (30) can be rewritten in presence of actuator saturation as: where v i f is designed as the same as Equation (39), and δ i > 0, then the close loop system can global asymptotically track the desired trajectory in presence of saturation limit, disturbances, and actuator faults. (45), we obtain

Proof. With the proposed control law in Equation
Considering the Lyapunov function in Equations (41) and (45), we obtain: The function sat(δ i s 2i − v i f ) + v i f can be evaluated as: Substituting Equation (48) into Equation (47), we have: According to Assumption 2, it can be shown that . V 2i ≤ 0. Therefore, MASMBC in Equation (45) will asymptotically stabilize the system.  (12), the adaptive sliding mode backstepping control is designed to address actuator faults, disturbances, and chattering problem through Equations (39), (40), and (43). Finally, with the control law in Equation (45), the saturation problem can be eliminated by tuning the parameter δ i .

Fault Diagnosis Results
The parameter of the quadcopter was chosen as shown in Table 1. The matrices and parameters were chosen for fault diagnosis scheme as follows: Aerodynamic term 0.01 The system matrices A, B, C, H, E d were presented in Section 3.1, and the observer gain matrix was chosen as L = 200I 8×8 . The parameters were chosen for adaptive sliding mode controller as follows: k 1 = k 2 = k 3 = 0.9; A 1 = A 2 = A 3 = 10; β 1 = β 2 = β 3 = 100; δ 1 = δ 2 = δ 3 = 50.
The sampling time T = 0.001 s was chosen for the simulation. The system disturbance was chosen as white noise with the power of 0.005. The trajectory performance of attitude control and altitude control in fault-free operation are shown in Figure 3, where the initial values are φ 0 = 0.1 rad ( ≈ 5.7 • ), θ 0 = 0.1 rad ( ≈ 5.7 • ), ψ 0 = 0.1 rad ( ≈ 5.7 • ), and z = 1 m. It can be shown that the attitude angles and altitude can converge quickly to the original position.
To test the performance of fault estimation in Equation (12), the initial values were chosen as φ 0 = 0 rad, θ 0 = 0 rad, ψ 0 = 0 rad, and z = 0.5 m. The time-varying fault offsets were created for motors 1 and 2 as follows:  The results show that the estimation value converges quickly to time-varying fault offset values with high precision (Figure 4). Figure 5 shows the loss of control effectiveness (LoCE) in each actuator, while Figures 6 and 7 show system states and control inputs. It can be shown that the attitude angles maintain their states in the presence of faults. It is clear that when fault occurs, the roll and pitch motion has more influence than the yaw motion. Therefore, after fault occurs, the altitude is increased to the desired value, although there is a decrease in altitude at the beginning time of fault occurrence.   The results show that the estimation value converges quickly to time-varying fault offset values with high precision (Figure 4). Figure 5 shows the loss of control effectiveness (LoCE) in each actuator, while Figures 6 and 7 show system states and control inputs. It can be shown that the attitude angles maintain their states in the presence of faults. It is clear that when fault occurs, the roll and pitch motion has more influence than the yaw motion. Therefore, after fault occurs, the altitude is increased to the desired value, although there is a decrease in altitude at the beginning time of fault occurrence.  The results show that the estimation value converges quickly to time-varying fault offset values with high precision (Figure 4). Figure 5 shows the loss of control effectiveness (LoCE) in each actuator, while Figures 6 and 7 show system states and control inputs. It can be shown that the attitude angles maintain their states in the presence of faults. It is clear that when fault occurs, the roll and pitch motion has more influence than the yaw motion. Therefore, after fault occurs, the altitude is increased to the desired value, although there is a decrease in altitude at the beginning time of fault occurrence.

Active Fault-Tolerant Control Results
The proposed method was compared with the previously proposed robust backstepping sliding mode control (BSMC) [15] and adaptive sliding mode control [44]. In this case, the motion of the quadcopter was designed to converge to the desired roll angle d φ in the presence of an actuator fault. The desired roll angle was generated through a filter following Wang et al. [24].
where φ starts from 0°, reaches 5° at 5 s, reduces to 0° at 10 s, decreases to 5°− at 15 s, and goes back to 0° at 20 s, and finally, remains at 0° for the remaining time.
To demonstrate the effectiveness of MASMBC, a large time-varying fault was injected into actuator 2 with almost 40% LoCE at 14 s as follows: From the initial time to 14 s, Figures 8 and 9 indicate that all control methods can use the same control torque value and make a good tracking in roll angle and error. In all figures, , , , and BSM C φ represent the desired roll angle, actual roll angle using MASMBC, actual roll angle using ASMC, and actual roll angle using BSMC, respectively. When time-varying fault is injected to almost 40% LoCE at 14 s (Equation (53)), the BSMC presents an oscillating performance at the beginning and a low compensation to converge to the desired roll angle. In contrast, MASMBC shows a very good tracking response after a small overshoot at the beginning. The ASMC has a smaller oscillating performance than BSMC, but this method still cannot converge to the desired value. The MASMBC uses less control effort than ASMC and BSMC when a fault occurs, and there is a similar trend for all controllers after 15 s. Figure 8a indicates that MASMBC offers a quicker compensation in tracking performance than ASMC and BSMC.

Active Fault-Tolerant Control Results
The proposed method was compared with the previously proposed robust backstepping sliding mode control (BSMC) [15] and adaptive sliding mode control [44]. In this case, the motion of the quadcopter was designed to converge to the desired roll angle φ d in the presence of an actuator fault. The desired roll angle was generated through a filter following Wang et al. [24].
where φ starts from 0 • , reaches 5 • at 5 s, reduces to 0 • at 10 s, decreases to −5 • at 15 s, and goes back to 0 • at 20 s, and finally, remains at 0 • for the remaining time.
To demonstrate the effectiveness of MASMBC, a large time-varying fault was injected into actuator 2 with almost 40% LoCE at 14 s as follows: From the initial time to 14 s, Figures 8 and 9 indicate that all control methods can use the same control torque value and make a good tracking in roll angle and error. In all figures, φ d , φ P , φ ASMC , and φ BSMC represent the desired roll angle, actual roll angle using MASMBC, actual roll angle using ASMC, and actual roll angle using BSMC, respectively. When time-varying fault is injected to almost 40% LoCE at 14 s (Equation (53)), the BSMC presents an oscillating performance at the beginning and a low compensation to converge to the desired roll angle. In contrast, MASMBC shows a very good tracking response after a small overshoot at the beginning. The ASMC has a smaller oscillating performance than BSMC, but this method still cannot converge to the desired value.
The MASMBC uses less control effort than ASMC and BSMC when a fault occurs, and there is a similar trend for all controllers after 15 s. Figure 8a indicates that MASMBC offers a quicker compensation in tracking performance than ASMC and BSMC.
It should be noted that by using MASMBC scheme, the tracking error in roll angle can converge quickly to zero after fault occurs (Figure 8b). MASMBC can accommodate faults automatically through fault estimation unit.
The corresponding fault estimation in each actuator is shown in Figure 10. As can be seen, when a fault occurs in actuator 2, the paring actuator 4 is also affected. Moreover, there are some small estimation errors in actuator 1 and 3 when faults occur at 14 s. After 16 s, the fault estimation values converge to zero in actuators 1, 3, and 4. It should be noted that by using MASMBC scheme, the tracking error in roll angle can converge quickly to zero after fault occurs (Figure 8b). MASMBC can accommodate faults automatically through fault estimation unit.
The corresponding fault estimation in each actuator is shown in Figure 10. As can be seen, when a fault occurs in actuator 2, the paring actuator 4 is also affected. Moreover, there are some small estimation errors in actuator 1 and 3 when faults occur at 14 s. After 16 s, the fault estimation values converge to zero in actuators 1, 3, and 4.  It should be noted that by using MASMBC scheme, the tracking error in roll angle can converge quickly to zero after fault occurs (Figure 8b). MASMBC can accommodate faults automatically through fault estimation unit.
The corresponding fault estimation in each actuator is shown in Figure 10. As can be seen, when a fault occurs in actuator 2, the paring actuator 4 is also affected. Moreover, there are some small estimation errors in actuator 1 and 3 when faults occur at 14 s. After 16 s, the fault estimation values converge to zero in actuators 1, 3, and 4.

Conclusions
The present study explores the dynamic model of a quadcopter with disturbances and actuator faults. A fault diagnosis scheme is proposed to estimate the magnitude of actuator fault under disturbances. From the fault estimation information, an ASMBC was designed to accommodate the faults and the chattering phenomenon. Then, MASMBC was improved from ASMBC to overcome the input saturations. The results show that MASMBC can offer better tracking performance and quicker compensation than BSMC and ASMC. However, the drawback of this study is that the proposed MASMBC was not verified experimentally. Future work should implement the proposed method on real flight control.

Conclusions
The present study explores the dynamic model of a quadcopter with disturbances and actuator faults. A fault diagnosis scheme is proposed to estimate the magnitude of actuator fault under disturbances. From the fault estimation information, an ASMBC was designed to accommodate the faults and the chattering phenomenon. Then, MASMBC was improved from ASMBC to overcome the input saturations. The results show that MASMBC can offer better tracking performance and quicker compensation than BSMC and ASMC. However, the drawback of this study is that the proposed MASMBC was not verified experimentally. Future work should implement the proposed method on real flight control.