Longitudinal Attitude Control Decoupling Algorithm Based on the Fuzzy Sliding Mode of a Coaxial-Rotor UAV

A longitudinal attitude decoupling algorithm based on the fuzzy sliding mode control for a small coaxial rotor unmanned aerial vehicle (UAV) is presented in this paper. The attitude system of a small coaxial rotor UAV is characterized by nonlinearity, strong coupling and uncertainty, which causes difficulties pertaining to its flight control. According to its six-degree-of-freedom model and structural characteristics, the dynamic model was established, and a longitudinal attitude decoupling algorithm was proposed. A fuzzy sliding mode control was used to design the controller to adapt to the underactuated system. Compared with the uncoupled fuzzy sliding mode control, simulation results indicated that the proposed method could improve the stability of the system, presented with a better adapting ability, and could effectively suppress the modeling error and external interference of the coaxial rotor aircraft attitude system. The proposed method also has the advantages of high accuracy, good stability, and the ease of implementation.


Introduction
In recent years, due to small unmanned aerial vehicles' (UAV) characteristics regarding maneuverability, flexibility and location difficulties, research on this type of UAV has drawn wide attention.With the unprecedented development of small aircrafts, the autonomous flight control of UAVs has become a research priority in the field of aviation [1].Compared with fixed-wing aircrafts, the coaxial rotor uses a pair of coaxial reversing rotors which compensate for each other's torque, instead of balancing the yaw moment of the aircraft without the tail rotor [2].Therefore, the aircraft has a compact structure, a small radial size, and a higher power efficiency.The data indicate that it is 35-40% smaller than the single rotor structure with a tail rotor, and in the same hovering conditions, the coaxial-rotor consumes 5% less energy than the single rotor [3].In addition, with the reduction of the radial size of the aircraft along the rotor, the inertia of the aircraft decreases and its controllability and maneuverability are enhanced.The design without the tail rotor has also eliminated some hidden problems [4].Research on coaxial-rotor helicopters has already had significant achievements, but the small coaxial-rotor UAV has received special attention in recent years.The small size of the aircraft and the different maneuvering modes brings about differences in control methods.The operation mode of the coaxial vehicle is different from that of an ordinary vehicle which is also a typical underactuated system [5].For the small coaxial-rotor UAV, the six-degree-of-freedom non-linear coupling problem is prominent, and decoupling is important for stability and control of the vehicle.
The general attitude control system of the UAV coordinates and controls the longitudinal, lateral and heading channels.The design of the longitudinal channel controller is the most critical and complex of the three channels, and its control rate significantly affects the UAV's flight performance [6,7].In the literature [8], the decoupling control method is used to design the aircraft control system.Both the adaptability and control effect of the system, however, need improvement.In Reference [9], by combining the advantages of feedback linearization and variable structure control, the attitude controller of the aircraft was designed.However, it was unable to effectively weaken the sliding mode chattering of the system, and the controller parameters could not be adjusted in real time according to the disturbance, which caused poor control performance.Reference [7] proposed a control law which was designed using the adaptive backstepping method and which did not require any knowledge of aircraft aerodynamics.Simulation results showed good performance of the feedback law, but the actual implementation was complicated and difficult to achieve.In Reference [10], a fuzzy logic control of the longitudinal motion of an aircraft based on the Takagi-Sugeno modeling approach was presented, and while the stability and tracking effect were good, the problem of system coupling had not been solved well and the control precision needed improvement.There are many studies of the decoupling controls of aircraft, but few are focused specifically on coaxial aircrafts [11].
The main role of this paper is to propose a decoupling algorithm that improves the reliability of the attitude control for the longitudinal motion stability of the coaxial rotor UAV.In order to satisfy the stability requirements of a coaxial-rotor UAV's longitudinal motion [12], a suitable control algorithm and controller needed to be designed.Before this, we required a dynamic model which featured a qualified and effective vehicle longitudinal motion [13].In accordance to the lab-developed coaxial rotor UAV, a rigorous and effective non-linear mathematical model of longitudinal motion was established, and an under-actuated controller was designed using the fuzzy sliding mode.Simulation results showed that the position control performance of the aircraft was improved when the decoupling algorithm was applied to the coaxial rotor longitudinal motion control system.The position and attitude were significantly improved [14] and the method was simple and effective.
This paper is organized as follows: In Section 2, according to the self-developed coaxial vehicle, the modeling and derivation processes are given.In Section 3, the decoupling algorithm design is introduced.The controller design and stability analysis based on the fuzzy sliding mode control are described in Section 4. Finally, the simulation results and comparison with the decoupling algorithm are shown in Section 5.

Aircraft Longitudinal Flight Model
There is a large degree of coupling among the control inputs of the aircraft.The general method is to regard these coupling quantities as external disturbances, but this method introduces large errors.To solve this problem, we used the method of controlling the correlation coefficient of the input, by selecting the appropriate correlation coefficient so that coupling among the control inputs would be handled better.

Rotor System Modeling
In order to establish a simplified model that could both reflect the aerodynamic characteristics of a coaxial-rotor and be suitable for controller design, we first made the following assumptions: The blade was rigid, the blade root truncation effect was ignored, and the tip loss and the flapping hinge extension were assumed without considering the unsteady effect [15].The structure design and force analysis of the coaxial-rotor are shown in Figure 1.
Based on the blade-element theory, the integral expression of the rotor pulling force and torque could be obtained: where N b is the number of blades, R is the radius of the rotor, e is the amount of hinge extension of blade swing, ψ f is the local azimuth, r is the local radial coordinates, l and d respectively are local lift and resistance, and c v and s v are the correction terms related to the aircraft and the flying environment [16].The approximate inflow ratio of a blade-element was: where v in is the induced velocity, Ω is the rotor speed, v b is the rotor speed, is the body speed, and λ in and λ f s are the inflow ratio corresponding to the induced velocity and body velocity, respectively.
So, the single rotor thrust and torque were presented: where subscript i represents the upper rotor (u) or the lower rotor (l), i

External Force Modeling
In the steady state of hovering, the external force of the aircraft was determined by the lift 1 F , the gravity G , and the aerodynamic resistance, D F :

The Lift of the Rotor System
The lift of the designed aircraft was provided by the upper and lower rotors.Since the swash plate related to the upper rotor, the upper rotor provided both lift and lateral force, while the lower rotor only provided lift.The following could be obtained from Formulas (2) and (7): To solve the problem of interference between coaxial rotors, the Pitt-Peters dynamic inflow method was used to model the induced velocity.The specific method was to connect the dynamic variation of the induced velocity with the variation of aerodynamic parameters through a first-order linear differential equation.We could then clarify the relationship between the pull coefficient and the induced velocity through integral calculation.The method was simple and in good agreement with the experimental data.The proposed model could be well applied to the simulation and controller designs.According to the dynamic inflow model, the relationship between the induced velocity and the pull coefficient was as follows: where M, V and L are the parameter matrix of inflow dynamics, respectively, λ in = (λ 0 + λ s + λ c ) T represents the time-averaged, first-order horizontal, and vertical components of the induced inflow ratio.C = (C T + C l + λ m ) T represents the pull torque, roll torque and pitch torque coefficients of the rotors.The interaction of the induced velocity is expressed as: where i, j are the upper and lower rotors and K ji is the parameter matrix, indicating the influence of the induced velocity between the upper and lower rotors related to the distance between the rotors, airfoil, and flight state, while e 1 = 1 0 0 T .Considering that the interaction of the induced velocity mainly affected the channels of total distance and heading, the induced velocity in the plane of the propeller disk was almost unaffected.
Assuming that the induced velocity was uniformly distributed in the plane of the propeller disk, the average inflow ratio and the differential inflow ratio were defined respectively as: From the formulas above, the pull and torque coefficients could be obtained using integral calculation (τ is the rotor flapping time constant): So, the single rotor thrust and torque were presented: where subscript i represents the upper rotor (u) or the lower rotor (l), θ i is the pitch, c is the chord length of the blade, A is the paddle area, a 0 is the slope of the lift line of the airfoil, C D is the airfoil drag coefficient, ρ is the air density, and σ = (N b c)/(πR) is the real degree of the paddle.

External Force Modeling
In the steady state of hovering, the external force of the aircraft was determined by the lift F 1 and F 2 , the gravity G, and the aerodynamic resistance, F D :

The Lift of the Rotor System
The lift of the designed aircraft was provided by the upper and lower rotors.Since the swash plate related to the upper rotor, the upper rotor provided both lift and lateral force, while the lower rotor only provided lift.The following could be obtained from Formulas (2) and ( 7):

The Gravity of Aircraft
The mass of aircraft is m, and the body gravity was expressed by the body coordinate system data:

The Aerodynamic Resistance
According to the empirical formula of aerodynamics, the resistance of the fuselage in the hovering state could be expressed as: where V is the relative fly-forward speed of the aircraft, A f us is the equivalent cross-sectional area of the body, and C D f us is the resistance coefficient of the whole body.

Establishing the Longitudinal Posture Model
where x 1 (t), z 1 (t) and φ(t) are the mass center and deflection angles of aircraft, u 1 and u 2 are the control inputs, g is the gravitational acceleration, and ε 0 represents the parasitic force of lateral displacement generated by rolling torque and ε 0 = 0 [19].The system's output was:

Design of the Decoupling Algorithm
Formula ( 13) was a strong non-linear coupling model [20].In order to transform the model into the under-driven standard form, the following method was used to decouple the model [21,22].In order to eliminate the control coupling of .

Eliminate the Control Coupling of
x 2 and .z 2 , the following decoupling algorithm could be designed: where u m1 and u m2 are the control items to be designed.Next, Formula (13) could be changed:

Eliminate the Coupling of u m1 and u m2
In order to eliminate the coupling of u m1 and u m2 in ε ..
φ, the following decoupling algorithm could be designed: Electronics 2019, 8, 107 where u m3 and u m4 are the control items to be designed, then Formula ( 16) could be changed: 3.3.Eliminate the Coupling of sin φ and cos φ In order to eliminate the coupling of sin φ and cos φ, the following decoupling algorithm was designed: We took q 1 = x m , q 2 = .
q 5 , and when φ was very small, we took sin φ ≈ φ.Then we could obtain the following: ..
We took tan φ.Now, h 1 and h 2 were the control items to be designed.Then, Formula (18) could be changed as:

Transform the Control Model into an Under-Driven Standard Form
The under-driven standard form could be obtained: where , and d is the control disturbance.
In order to make ∂f 1 y 1 y 2 y 3 ∂y 3 invertible, which would be helpful for the design of the control law, we took , y 3 = q 3 q 5 , y 4 = q 4 q 6 , and

Design of the Controller
The structure of the controller [16] is shown in Figure 2.
y f y y y y .

Design of the Controller
The structure of the controller [16] is shown in Figure 2.

Design of the Control Law
In order to design the control law for Formula (21), we took y 1d as the reference instruction of y 1 , and the error variables were as follows [19]: Next, we designed the sliding surface: where c i > 0 and i = 1, 2, 3.When .s = 0, we could obtain h = u eq and c 1 .
. e 4 = 0.The equivalent switch control items could thus be obtained [23]: where where E 1 (t) is unknown interference.Both E 1 (t) and K(t) will be described in more detail in Section 4.2.
The control law could be designed as follows:
We took the Lyapunov function as V = 1 2 s T s, so: where the gain of the switching K(t) was the cause of chattering, and the control disturbance can be expressed as E(t) = ∂f 1 ∂y 3 d, which was used for ensuring that the necessary sliding mode presence conditions were met.When s = 0, we could obtain e 4 = c 1 e 1 + c 2 e 2 + c 3 e 3 .We took the following: A is the Hurwitz function, and λ represents the Eigenvalues of A, λ > 0.

T
, the error equation of the state could be written as Taking Q = Q T > 0, we could get the Lyapunov equation A T P + PA = −Q.The solution was P = P T > 0. We took the Lyapunov function as the following: .
where λ min (Q) is the minimum eigenvalue of positive definite matrix, Q.From .

Establish the Fuzzy System
The condition for the existence of sliding mode was s T .s < 0, and when the system reached the sliding surface, it would remain on the sliding surface [24].From Formula (26), we could see that in order to ensure that the system movement reached the gain of the sliding surface, K(t) needed to be sufficient to eliminate the impact of uncertainty.Then we could ensure the existence of the sliding condition.
The idea of the fuzzy rules was represented as follows: If s T .s > 0, then K(t) should increase; if s T .s < 0, then K(t) should be reduced.From the two types above, we could design the fuzzy system using s T .s and ∆K(t).In this system, s T .s is the input, and ∆K(t) is the output.The fuzzy sets of the system were defined as follows: where NB represents the negative big, N M is the negative middle, ZO is the zero, PM is the positive middle, and PB is the positive big.The input and output membership functions of the fuzzy system are shown in Figures 3 and 4. The upper bound of K(t) was estimated using the integral method: Electronics 2019, 8, 107 where G 1 is the proportion coefficient, determined according to experience.The control law was: where NB represents the negative big, NM is the negative middle, ZO is the zero, PM is the 212 positive middle, and PB is the positive big.The input and output membership functions of the fuzzy 213 system are shown in Figures 3 and 4. The upper bound of   ˆt K was estimated using the integral 214 method: 215 where 1 G is the proportion coefficient, determined according to experience.The control law was:

Simulation Analysis
The physical parameters of the system model were obtained through the three-dimensional model established in the CAD software Inventor, and the model reference coefficients were calculated in accordance to the physical parameters and the modeling results.The parameters are shown in Table 1.
Table 1.The main symbols and parameters.

Simulation Analysis
The physical parameters of the system model were obtained through the three-dimensional model established in the CAD software Inventor, and the model reference coefficients were calculated in accordance to the physical parameters and the modeling results.The parameters are shown in Table 1.For the controlled Formula ( 13), we took ε = 10 and g = 9.8, and set a predetermined track as In order to make A become the Hurwitz function, we took the control law parameters c 1 = 27, c 2 = 27, c 3 = 9 and λ = 0.10.The initial state of the controlled system was taken as 5 0 0.5 0 0.1 0 .We used the control law (Formula (25)) and saturation function method, and took the thickness of the boundary layer ∆ to be 0.10.
According to the structural characteristics of the coaxial-rotor UAV, a dynamic model of the longitudinal motion was established.The dynamic model of the aircraft was then decoupled, the fuzzy control and sliding mode controls were combined, and then a fuzzy sliding mode control based on the decoupling algorithm was designed for the coaxial-rotor.The control method was then simulated by MATLAB/Simulink.The results showed that the control method could track the command signal more quickly and efficiently compared to the method of the traditional sliding mode control.It could quickly reduce the yaw attitude angle deviation and the steady-state error could reach almost zero, and with a strong self-adaptive ability, it could achieve a better control effect.The response speed, tracking accuracy, and efficiency of the system were significantly improved.
The proposed control method could improve the stability of the system, which could effectively restrain the modeling errors and external disturbances of the aircraft's attitude system.This method had the advantages of high control precision, strong robustness, and ease of implementation in engineering.In future studies, we will focus on the design of the decoupling algorithm under the influence of more inputs and interferences, and will apply this algorithm to specific engineering practices.
Figures 5 and 6 show the performance of position tracking in the horizontal direction while the two control methods were used.The instruction given along x was a straight-line motion.The former figure indicates the position tracking with the decoupling algorithm and fuzzy control.The latter indicates the fuzzy control without the decoupling algorithm.From these figures, we could see that the performance of the control method with the decoupling algorithm and fuzzy control was faster, more accurate, and more stable than the general sliding mode control, ensuring that the aircraft would be more stable in actual movement and in improving the flight.
The proposed control method could improve the stability of the system, which could effectively restrain the modeling errors and external disturbances of the aircraft's attitude system.This method had the advantages of high control precision, strong robustness, and ease of implementation in engineering.In future studies, we will focus on the design of the decoupling algorithm under the influence of more inputs and interferences, and will apply this algorithm to specific engineering practices.restrain the modeling errors and external disturbances of the aircraft's attitude system.This method 243 had the advantages of high control precision, strong robustness, and ease of implementation in 244 engineering.In future studies, we will focus on the design of the decoupling algorithm under the 245 influence of more inputs and interferences, and will apply this algorithm to specific engineering 246 practices.247 248 Figures 7 and 8 show the performance of the position tracking in the vertical direction while the two control methods were used.The instruction given along z was a sinusoidal motion.The former figure indicates the position tracking with the decoupling algorithm and fuzzy control, and the latter indicates the general sliding mode control.From these figures we could see that the time required for the two methods to track from the initial position to the specified trajectory was almost the same, but the performance of the control method with the decoupling algorithm and fuzzy control was smoother, and the tracking error was also smaller.Thus, the flight of the aircraft would be more stable.
The angle tracking with the decoupling algorithm and fuzzy control are shown in Figure 9, and when compared with the angle tracking (Figure 10) without the decoupling algorithm and fuzzy control, it could be seen that in the former the tracking errors decreased while the response times were basically the same, and the movement accuracy and resistance to disturbances of the system improved.The system had better tracking performance.The impact of these disturbances, controller outputs chattering, external disturbances, and noise of the measurement were significantly reduced after the decoupling algorithm and fuzzy controller are added.figure indicates the position tracking with the decoupling algorithm and fuzzy control, and the latter indicates the general sliding mode control.From these figures we could see that the time required for the two methods to track from the initial position to the specified trajectory was almost the same, but the performance of the control method with the decoupling algorithm and fuzzy control was smoother, and the tracking error was also smaller.Thus, the flight of the aircraft would be more stable.The angle tracking with the decoupling algorithm and fuzzy control are shown in Figure 9, and 271 when compared with the angle tracking (Figure 10) without the decoupling algorithm and fuzzy 272 control, it could be seen that in the former the tracking errors decreased while the response times 273 were basically the same, and the movement accuracy and resistance to disturbances of the system 274 improved.The system had better tracking performance.The impact of these disturbances, controller 275 outputs chattering, external disturbances, and noise of the measurement were significantly reduced 276 after the decoupling algorithm and fuzzy controller are added.277     Figures 11-13 show the speed tracking and angular speed tracking with the decoupling algorithm and fuzzy control.It could be seen that the change trajectory was smooth, and the time required to reach a stable state from the initial state was very short.Figures 14 and 15 show the control input of the system.We could see that the control input curves were smooth and no chattering occurred.Theoretical analysis and experimental simulation results showed that the fuzzy sliding mode control based on the decoupling algorithm could improve the stability of the system, had a better self-adaptive ability, and effectively restrained the modeling errors and external disturbances of the co-rotating twin-rotor aircraft attitude system.Figures 11-13 show the speed tracking and angular speed tracking with the decoupling algorithm and fuzzy control.It could be seen that the change trajectory was smooth, and the time required to reach a stable state from the initial state was very short.Figures 14 and 15 show the control input of the system.We could see that the control input curves were smooth and no chattering occurred.Theoretical analysis and experimental simulation results showed that the fuzzy sliding mode control based on the decoupling algorithm could improve the stability of the system, had a better self-adaptive ability, and effectively restrained the modeling errors and external disturbances of the co-rotating twin-rotor aircraft attitude system.u with the decoupling algorithm.

Conclusions
According to the structural characteristics of the coaxial-rotor UAV, a dynamic model of longitudinal motion was established.The dynamic model of the aircraft was then decoupled, the fuzzy control and sliding mode controls were combined, and a fuzzy sliding mode control based on the decoupling algorithm was designed for the coaxial-rotor.The control method was then simulated by MATLAB/Simulink.The results showed that the control method could track the command signal more quickly and efficiently compared to the method of the traditional sliding mode control.It could quickly reduce the yaw attitude angle deviation and the steady-state error could reach almost zero.With a strong self-adaptive ability, it could achieve a better control effect.The response speed, tracking accuracy, and efficiency of the system had been significantly improved.
The proposed control method could improve the stability of the system, which could effectively restrain the modeling errors and external disturbances of the aircraft's attitude system.This method had the advantages of high control precision, strong robustness, and ease of implementation in engineering.In future studies, we will focus on the design of the decoupling algorithm under the

Conclusions
According to the structural characteristics of the coaxial-rotor UAV, a dynamic model of longitudinal motion was established.The dynamic model of the aircraft was then decoupled, the fuzzy control and sliding mode controls were combined, and a fuzzy sliding mode control based on the decoupling algorithm was designed for the coaxial-rotor.The control method was then simulated by MATLAB/Simulink.The results showed that the control method could track the command signal more quickly and efficiently compared to the method of the traditional sliding mode control.It could quickly reduce the yaw attitude angle deviation and the steady-state error could reach almost zero.With a strong self-adaptive ability, it could achieve a better control effect.The response speed, tracking accuracy, and efficiency of the system had been significantly improved.
The proposed control method could improve the stability of the system, which could effectively restrain the modeling errors and external disturbances of the aircraft's attitude system.This method had the advantages of high control precision, strong robustness, and ease of implementation in engineering.In future studies, we will focus on the design of the decoupling algorithm under the influence of more inputs and interferences, and will apply this algorithm to specific engineering practices.

Figure 1 .
Figure 1.(a) The structure design and (b) force analysis of the coaxial-rotor Rotorcraft.

Figure 1 .
Figure 1.(a) The structure design and (b) force analysis of the coaxial-rotor Rotorcraft.

Figure 2 .
Figure 2. The structure of the controller.

Figure 2 .
Figure 2. The structure of the controller.

Figure 3 .
Figure 3.The input membership function.Electronics 2018, 7, x FOR PEER REVIEW 11 of 18

Figure 4 .
Figure 4.The output membership function.

Figure 4 .
Figure 4.The output membership function.

Figure 5 .
Figure 5. Position tracking with the decoupling algorithm of the x-axis.

Figure 6 .
Figure 6.Position tracking without the decoupling algorithm of the x-axis.

Figure 5 .
Figure 5. Position tracking with the decoupling algorithm of the x-axis.

Figure 5 .Figure 6 .Figure 6 .
Figure 5. Position tracking with the decoupling algorithm of the x-axis.

Figure 7 .Figure 8 .
figure indicates the position tracking with the decoupling algorithm and fuzzy control, and the latter 261indicates the general sliding mode control.From these figures we could see that the time required for 262 the two methods to track from the initial position to the specified trajectory was almost the same, but 263 the performance of the control method with the decoupling algorithm and fuzzy control was 264 smoother, and the tracking error was also smaller.Thus, the flight of the aircraft would be more 265 stable.266 270

Figure 7 .
Figure 7. Position tracking with the decoupling algorithm of the z-axis.

Figure 7 .
Figure 7. Position tracking with the decoupling algorithm of the z-axis.

Figure 8 .
Figure 8. Position tracking without the decoupling algorithm of the z-axis.

Figure 8 .
Figure 8. Position tracking without the decoupling algorithm of the z-axis.

Figure 9 .
Figure 9. Angle tracking with the decoupling algorithm.

Figure 9 .
Figure 9. Angle tracking with the decoupling algorithm.

Figure 10 .
Figure 10.Angle tracking without the decoupling algorithm.

Figure 10 .
Figure 10.Angle tracking without the decoupling algorithm.

Figure 11 .
Figure 11.Speed tracking with the decoupling algorithm.

Figure 12 .
Figure 12.Speed tracking with the decoupling algorithm.

Figure 13 .
Figure 13.Position tracking with the decoupling algorithm.

Figure 14 .
Figure 14.Control input u 1 with the decoupling algorithm.

Figure 14 .
Figure 14.Control input 1 u with the decoupling algorithm.

Figure 15 .
Figure 15.Control input u 2 with the decoupling algorithm.

Table 1 .
The main symbols and parameters.