#### Abstract

In this paper, we presented a strategy for accurate trajectory tracking control of a quadrotor with unknown disturbances. To guarantee that the tracking errors of all system state variables converge to zero in finite time and eliminate the chattering phenomenon caused by the switching control action, a control strategy that combines linear prediction model of disturbances and fuzzy sliding mode control (SMC) based on logical framework with side conditions (LFSC) was designed. LFSC was applied for both position and attitude tracking of the quadrotor. Firstly, a linear prediction method was devised to minimize the effects of external disturbances. Secondly, a new fuzzy law was implemented to eliminate the chattering phenomenon. In addition, the stabilities of position and attitude were demonstrated by using Lyapunov theory, respectively. Simulation results and comprehensive comparisons demonstrated the superior performance and robustness of the proposed LFSC scheme in the case of external disturbances.

#### 1. Introduction

The quadrotor, a typical unmanned aerial vehicle consisting of four symmetric propellers, has received much attention recently due to its low cost, easy maintenance, and potential for deployment in difficult environments [1]. The quadrotor design is the preferred choice for aerial robots, as quadrotor vehicles have vertical takeoff and landing capabilities and can hover at low speed [2]. As such, the quadrotor has been applied in many fields, including photography, education, transportation, and agriculture [3, 4]. The quadrotor is a highly nonlinear, underactuated, and strongly coupled system; therefore, designing an effective control system for the quadrotor is a challenging task. However, the ability to minimize the effects of external disturbances is a bigger challenge [5].

Over the past several years, a number of advanced control strategies have been proposed to address the quadrotor trajectory tracking control problem [6]. Linear control strategies, including proportional integral derivative [7, 8], proportional derivative [9, 10], and linear quadratic [11] methods, have been applied successfully to improve stability; however, they are only effective over a small range around the operating point. If the quadrotor is subjected to greater external disturbances as it moves away from its control domain, system stability cannot be guaranteed [12]. Nonlinear control strategies can overcome the drawbacks of linear control methods to achieve good performance, even in harsh environments [13].

Sliding mode control (SMC) [14, 15] and backstepping control [16, 17] are the two among most widely used nonlinear control methods. Backstepping control is an efficient method for dealing with the trajectory tracking problem of the quadrotor via a nonlinear adaptive controller. However, backstepping control only provides sufficient stability when the disturbances are relatively constant or vary slowly over time. SMC utilizes a high-frequency switching control signal to enforce the system trajectories on the sliding surface, which has been studied for control of different underactuated systems [18–21]. The main properties of SMC are the proper transient performance and superior robust operation with the presence of model uncertainties and disturbances [22, 23]. Zhang et al. [24] adopted the adaptive recursive integral terminal sliding mode control to guarantee the convergence performance of the actual angle and the yaw rate with strong robustness and fast convergence rate. Zhou et al. [25] utilized deep learning method to compensate the uncertainties of the system without requirement of their upper bounds, which makes the designed switching gain much smaller. Song et al. [26] proposed a novel nonsingular fast-terminal sliding mode control method to facilitate the stabilization of nonlinear underactuated systems under disturbances. Gu et al. [27] utilized neural networks to approximate the lumped unknown dynamic model and designed a fast-terminal sliding mode control strategy to achieve the finite-time consensus tracking. Chen et al. [28] proposed a nonsingular terminal sliding mode control algorithm to implement accurate and robust body position trajectory tracking of six-legged robots. Xiong et al. [29] constructed a novel integral sliding mode surface to guarantee the synchronization error convergence to zero in finite time. However, the traditional SMC has the problem of chattering in the control signal which is undesirable [30]. Wang et al. [31] used adaptive integral SMC, backstepping, and terminal SMC to solve the trajectory problem; however, reducing chattering in the control input within the context of a hybrid finite-time control strategy is difficult to implement in practice. Mallavalli and Fekih [32] used SMC to solve the fault tolerance problem of the quadrotor; in this case, the gain of the switch function, , was a constant, resulting in substantial chattering. Wang et al. [33] proposed a terminal SMC, and Xinghuo Yu and Man Zhihong [34] proposed a fast-terminal SMC; however, the gain of the switch function, , was constant.

The traditional SMC has the problem of chattering which makes the SMC method hard to apply in practice. In addition, improving the accuracy and robustness of the control system is very important for the flight of the quadrotor in complex external environment. Considering that chattering phenomenon is caused by the gain of the switch function , which is generally designed to be a constant, here we propose to replace the constant with a time-varying function. The motivation of this study is to design a fuzzy SMC strategy based on logical framework with side conditions (LFSC) to allow the quadrotor to achieve an accurate trajectory without chattering. The main contributions are summarized as follows:(1)The proposed LFSC scheme can guarantee that the tracking errors of all system state variables converge to zero in finite time.(2)The high-frequency chattering phenomenon caused by the switching control action does not appear using the proposed LFSC scheme.(3)Simulation results demonstrate the superior performance and robustness of the proposed LFSC scheme in the case of external disturbances.

The rest of this paper is organized as follows: in Section 2, a dynamic model of the quadrotor is presented, and the underactuated problem is solved. In Section 3, the proposed control strategy is described in detail. In Section 4, the simulation results and discussion are provided to show the superiority of the proposed control strategy. In Section 5, conclusions are presented.

#### 2. Model

##### 2.1. Description of the Quadrotor Model

A schematic diagram of a quadrotor UAV is shown in Figure 1, the earth-fixed coordinate system is defined as the E-frame , and the body-fixed system is defined as the B-frame . The main frame of the quadrotor is assumed to be a rigid body. The four propellers are installed in two vertical directions: propellers 1 and 3 rotate in the counterclockwise direction, while propellers 2 and 4 rotate in the clockwise direction to generate a lift force and balance the yaw torque as needed. Changing all four rotor speeds by the same amount changes the lift force, thus affecting the altitude of the quadrotor. Pitch rotation can be obtained by varying the speeds of propellers 1 and 3 in opposite directions. Roll rotation can be generated in a similar way by changing the speeds of propellers 2 and 4. The quadrotor has six degrees of freedom, including translational motions and three rotational motions, with only four independent inputs generated by increasing or decreasing the speeds of the four propellers [35]. The thrusts generated by the four rotors are denoted by , respectively.

##### 2.2. Kinematic Model

As shown in Figure 1, two reference frames are defined to describe the quadrotor kinematics model: the E-frame and the B-frame . In the B-frame , this paper assumes that the origin of the body coordinate system is located at the center of the quadrotor; and point toward rotors 1 and 2, respectively. Then, according to the right-hand rule, points upwards. The E-frame is used to define the absolute position of the quadrotor according to and Euler angles , where denote the roll angle, pitch, and yaw, respectively. and denote the linear and angular velocities of the quadrotor, respectively. In this context, the quadrotor can be modelled by [36]where rotation matrices are given byand where and denote and , respectively. Equations (1)–(3) are used to calculate the actual position and attitude of the quadrotor.

##### 2.3. Dynamic Model

The dynamic model is built in consideration of model uncertainties and disturbances. It must be noted that ground and gyro effects were not taken into account because the purpose of this research was to design a control system for the model; therefore, the model was kept as simple as possible, with only the main effects being taken into account [37].

*Assumption 1. *The main frame of the quadrotor is symmetrical and rigid.

*Assumption 2. *The origin of the quadrotor’s body coordinate system is located at the center of mass of the quadrotor.

*Assumption 3. *The aerodynamic parameters of the rotors and propellers are the same.

*Assumption 4. *Ground and gyro effects can be ignored (in this case, compared to the brushless motor, the propeller is very light; thus, the moment of inertia due to the propeller is ignored here).

According to Newton’s laws of motion and Euler’s formula, a simplified dynamic model of the quadrotor is given below [38, 39]where *m* is the mass of the quadrotor, is the acceleration of gravity, are the drag coefficients for the system, and are the principal moments of inertia.

When the quadrotor is flying at low speed indoors, the control inputs represent the lift torque, roll torque, pitch torque, and yaw torque of the quadrotor, respectively. are as follows:Equation (5) can be rearranged in matrix form as follows:where is the linear distance from the center of the rotor to the center of gravity.where *b* is the thrust coefficient, which depends on the blade rotor characteristics; is the force to moment scaling factor [38], and is the angular speed of the *i*th propeller of the quadrotor.

From equation (4), the quadrotor dynamics presented in E-frame in the presence of external disturbances is given bywhere are the unknown disturbances that contain system uncertainties and other unknowns.

The control objective is to design the input control so that the quadrotor tracks the time-varying desired trajectory . However, in the dynamic model of the quadrotor from equation (8), there are only four control inputs, but six outputs to control. To deal with the underactuated problem, we consider three virtual control inputs , as follows [35]:Applying the three virtual control inputs to (8), the dynamic model can be rewritten asBy setting the desired yaw angle and using equation (9), the input control , roll angle , and pitch angle are given byTherefore, the trajectory tracking control objective can be described as follows: given the desired trajectory , the idea is to design the control laws and , such that the tracking errors converge to zero asymptotically.

#### 3. Controller Design and Stability Analysis

In this section, the proposed controller was divided into an inner loop (attitude) controller and an outer loop (position) controller. For the inner and outer loops, a novel fuzzy sliding mode controller based on LFSC was first developed. The proposed controller guaranteed that the reference position and attitude could be accurately tracked. Using equation (10), the reference attitude could also be accurately tracked. Finally, the entire closed-loop system could quickly track the reference signals. The overall control structure of the quadrotor is shown in Figure 2.

##### 3.1. Outer Loop Controller Design

The position could be extracted from equation (10) as follows:where , , , , and . Let be the desired trajectory. Defined the position tracking error aswhere . Then, the LFSC manifold was given bywhere were positive constants. Parameter was related to the rate of approaching the sliding mode surface, the larger the parameter , the faster the approaching rate, while the greater the overshoot. Parameter is related to retain the system states on the sliding mode surface. . Then, the derivative of with respect to time was

Consider the tracking error (13) and the LFSC manifold (14). The virtual control law for the outer loop was as follows:where was a positive constant. Parameter was related to retain the control system stability. , , and were the parameters obtained by the fuzzy controller. To reduce the impact of external disturbances and attenuate chattering, *d*_{o} at the next moment must be predicted. was the linear prediction of disturbances *d*_{o} and could be obtained based on the value and derivative of *d*_{o} at the last moment:where *t* was time and *T* was the sampling interval of time.

The Lyapunov function was chosen as follows:

Then, the derivative of with respect to time was given by

Substituting the virtual control law (16) into (20), we obtained the derivative of :

To guarantee , the appropriate parameters of must be selected, such that was sufficiently large to balance the error in the prediction of the disturbances, expressed as

The combination of (21) and (22) implied that the LFSC manifold designed in (14) was feasible. To ensure that (22) is true, a fuzzy controller could be constructed to obtain . The fuzzy controller in this paper has two parameters, , , as the input; was the only output. The fuzzy rules are shown in Table 1. The rules of the controllers are expressed in Table 1, for all possible combinations. Based on the control experience of the quadrotor, the fuzzy rules were established according to and to adjust parameter . The membership function of the fuzzy controller is shown in Figure 3.

**(a)**

**(b)**

**(c)**

From Table 1, there were two cases: (i) When , the Lyapunov function and parameter would decrease to attenuate chattering in the control input. (ii) When , parameter could not eliminate the effects of disturbance *d*_{o}. Thus, would increase to the point of eliminating the effect of disturbance *d*_{1}, such that and the Lyapunov function . Based on the Lyapunov method, the system was asymptotically stable:

The proof process of and were similar to that of . A block diagram of the LFSC method is shown in Figure 4.

##### 3.2. Inner Loop Controller Design

The attitude could be extracted from equation (10) as follows:where , , , , and . Defined tracking error as

The LFSC manifold was given bywhere were positive constants. The meaning of were similar to respectively. Then, the derivative of with respect to time was as follows:

Consider the tracking error (25) and the LFSC manifold (26). In this case, control law *u* was designed aswhere was a positive constant, the meaning of was similar to . Then, the meaning of , , and , , were similar to and in Section 3.1, respectively.

The Lyapunov function was as follows:

The derivative of with respect to time was given by

Substitute the control law (28) into (30). Then, the derivative of was given by

To guarantee , appropriate parameters of must be selected, such that was sufficient to balance the error in the prediction of interference, which could be expressed as

The combination of (31) and (32) implied that the sliding manifold design described in (26) was feasible.

The proof process of equation (32) was similar to equation (22) in Section 3.1, in which , and the Lyapunov function could be guaranteed. Based on the Lyapunov method, the system was asymptotically stable:

The proof process of and were similar to that of .

#### 4. Results and Discussion

In this section, several trajectory tracking simulation experiments were performed in the MATLAB R2016b/Simulink, which was equipped in a computer consisting of a 2.60 GHz CPU with 8 GB of RAM and a 256 GB solid-state disk drive. The control performance obtained by the proposed LFSC scheme was compared to SMC [40] and fuzzy SMC [41] schemes, to demonstrate the superiority of the proposed LFSC strategy.

The parameters of the quadrotor used in the simulation studies are shown in Table 2. The external disturbances considered in all of the simulation studies, to validate the robustness of the proposed LFSC control strategy, were time-varying.

*Case 1. *In this case, the desired trajectory of the position and yaw angle was given byThe initial position and yaw angle of the quadrotor were [1.9, 2.9, 0.5, 0.001]. The Gaussian function and white noise functions which were imposed on the quadrotor were given byIn order to achieve appropriate control performance, appropriate parameters , , , , , and were designed according to reference [38]. The parameters for the proposed LFSC controllers were shown in Table 3.

Simulation results are shown in Figures 5–11. To demonstrate the superiority of the proposed LFSC scheme, simulation experiments of traditional SMC and fuzzy SMC were conducted, more details of the SMC and the fuzzy SMC methods for a quadrotor UAV have been introduced in [40, 41], respectively. The trajectory tracking results in 3D space are shown in Figure 5. The position tracking errors are shown in Figure 6. The following results can be observed from Figure 6: (1) It could be seen that starting from an initial position far from the desired trajectory, the proposed LFSC method successfully forces state variables to their desired trajectory. (2) The proposed LFSC method successfully forces position tracking errors to converge to zero in finite time, while the SMC and fuzzy SMC methods force position tracking errors to converge to small bounded fields around zero. (3) Moreover, when disturbed by the wind gust, time is about 15 s, the performance of the proposed LFSC controller was much better than that achieved by SMC or fuzzy SMC controllers in terms of settle time, overshoot, and robustness. It was clearly seen that the proposed LFSC method was able to make the quadrotor follow the desired position trajectory with strong robustness and the highest accuracy. Due to the linear prediction and the fuzzy controller, disturbances were well compensated.

The attitude tracking errors are shown in Figure 7. The following results can be observed from Figure 7: (1) The proposed LFSC method successfully forces attitude tracking errors to converge to zero in finite time, while the SMC and fuzzy SMC methods force attitude tracking errors to converge to small bounded fields around zero. (2) The performance of the proposed LFSC method was much better than that achieved by the SMC or fuzzy SMC method in terms of tracking accuracy and robustness. It could be seen that the time-variant disturbances were not well compensated with traditional SMC or fuzzy SMC method. By introducing the linear prediction and new fuzzy controller, the LFSC method achieved good attitude tracking performance.

The response curves of virtual control input under the three control methods are displayed in Figures 8–10, respectively. By observing these figures, the high-frequency chattering phenomenon caused by the switching control action are shown in Figures 8 and 9. While in Figure 10, chattering was considerably reduced by adopting the proposed LFSC control law. In Figure 10, the changes in three LFSC virtual control inputs were shown, whereby the virtual control input was around 19.6 N, which was equal to the gravity force of the quadrotor. In addition, three virtual control inputs showed huge fluctuations around 15 s, which is caused by the wind gust.

In Figure 11, the changes in four control inputs are shown, whereby the control input was 19.71 N, which was slightly greater than the gravity force of the quadrotor. Compared with the results given in [40, 41], the amplitudes of the proposed LFSC controllers were greatly decreased in the presence of external disturbances.

**(a)**

**(b)**

**(c)**

**(a)**

**(b)**

**(c)**

**(a)**

**(b)**

**(c)**

**(a)**

**(b)**

**(c)**

**(a)**

**(b)**

**(c)**

**(a)**

**(b)**

**(c)**

**(d)**

*Case 2. *In order to further evaluate the performance of the proposed LFSC control strategy, the disturbances were simulated by white noise functions with standard deviation of 2. In this case, the desired trajectory of the position and yaw angle was given byThe initial position and yaw angle of the quadrotor were [0.5, 4.5, 0.5, 0.5]. The disturbances which were imposed on the quadrotor were given bySimulation results are shown in Figures 12–18. The trajectory tracking results in 3D space are shown in Figure 12. The position tracking errors are shown in Figure 13. When the disturbance is introduced at , the null steady-state error could not be reached with both SMC method and fuzzy SMC method. In contrast, the proposed LFSC control strategy is able to force the quadrotor follow the desired trajectory with the highest accuracy and null steady-state error. Due to the linear prediction and the fuzzy controller, disturbances were well compensated.

The attitude tracking errors are shown in Figure 14. It could be seen that the time-variant disturbances were not well compensated with both SMC method and fuzzy SMC method when the time was up to 15 seconds. By introducing the linear prediction and the fuzzy controller, the LFSC method achieves good attitude tracking performance.

The response curves of virtual control input under the three control methods are displayed in Figures 15–18, respectively. By observing these figures, the high-frequency chattering phenomenon caused by the switching control action are shown in Figures 15 and 16. While in Figures 17 and 18, due to the linear prediction and the fuzzy controller, the chattering problems was considerably reduced by adopting the proposed LFSC control law.

**(a)**

**(b)**

**(c)**

**(a)**

**(b)**

**(c)**

**(a)**

**(b)**

**(c)**

**(a)**

**(b)**

**(c)**

**(a)**

**(b)**

**(c)**

**(a)**

**(b)**

**(c)**

**(d)**

#### 5. Conclusions

In this paper, an LFSC scheme was presented to guarantee that the tracking errors of all system state variables converge to zero in finite time and eliminate the chattering phenomenon caused by the switching control action, in the presence of external disturbances and uncertainties. Firstly, a linear prediction method was devised to minimize the effects of external disturbances. Secondly, a new fuzzy law was implemented to eliminate the chattering phenomenon. In addition, the stabilities of position and attitude were demonstrated by Lyapunov theory, respectively. Finally, several quadrotor trajectory tracking simulation examples were presented. The control performances obtained using traditional SMC and fuzzy SMC schemes were compared to demonstrate the superior performance of the proposed LFSC scheme.

The main conclusions are summarized as follows.(1)The proposed LFSC scheme can guarantee that the tracking errors of all system state variables converge to zero in finite time.(2)The high-frequency chattering phenomenon caused by the switching control action does not appear using the proposed LFSC scheme.(3)Simulation results demonstrate the superior performance and robustness of the proposed LFSC scheme in the case of external disturbances.(4)Compared with [42, 43], simulations demonstrate the accuracy and superiority of the proposed LFSC method.

The simplicity of the approach, and the use of continuous control signals, makes it readily applicable to a real quadrotor. Advantages of the proposed LFSC method are accuracy, robustness, state variables converge to zero in finite time, and no chattering phenomenon. Therefore, the quadrotor with the LFSC method can be applied to the emergency mission, disaster relief mission, and special military mission. Further work will focus on utilizing the deep learning method to compensate the uncertainties of the system without requirement of their upper bounds and utilizing software ANSYS to research disturbances caused by complex external environments.

#### Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

#### Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

#### Acknowledgments

This work was supported by National Key R&D Program of China (Grant no. 2017YFC0602000) and Science and Technology Development Project of Jilin Province (Grant no. 20190303061SF).