Attitude Control of Quadrotor UAV Using Improved Active Disturbance Rejection Control

: The quadrotor UAV has complex aerodynamics, unstable altitude, and easy to be disturbed by internal and external uncertainties during flight, so good attitude control becomes a challenge, this paper improves the active disturbance rejection controller to improve the system's anti-jamming ability and response speed in response to the above problems. Firstly, a quadrotor UAV dynamics model is established; then the Ifal function is constructed, which solves the problems that the inflection point of the fal function is not smooth, which is easy to cause the system jitter and the system gain is large when the error is large, and finally the performance is verified by using MATLAB/Simulink simulation software. The simulation results show that the constructed Ifal function is smoother and has better convergence, and compared with the traditional active disturbance rejection control, the improved active disturbance rejection control system has faster response speed, stronger anti-jamming ability and robustness in the attitude control of quadrotor UAV.


Introduction
In recent years quadrotors have been widely used in education, agriculture, and military due to their advantages of simple structure and low production cost [1][2][3][4].Given that a quadrotor UAV is a nonlinear, strongly coupled, underdriven and complex system, which is difficult to model accurately, and at the same time the flight of a quadrotor UAV is unstable under the influence of external disturbances and model uncertainty, designing fast and stable control algorithms is the basis for the wide application of quadrotor UAVs.
Traditional flight control methods for quadrotor UAVs mainly include PID control, sliding film control, backstepping, etc. Kara [5] combined linear and nonlinear controllers, and the proposed control scheme combines the simplicity of the PID controller and the robustness of the sliding film control (SMC), and then proved that the PID-SMC has good robustness under system uncertainty and Boussad Abci [6] proposed an improved sliding mode control algorithm based on Lyapunov function theory to improve the robustness of the controller against external disturbances.Mei Wu [7] used backstepping method to decompose the system into subsystems not exceeding the order of the system, and then designed the Lyapunov function for each subsystem to obtain the control law, which has the advantages of low overshooting This method has the advantages of low overshooting and fast regulation time, but this method generally needs to meet the strict feedback control system, all the limitations are high.With the development of modern control theory, there are more and more control methods, but the most used in engineering applications is still PID control.
ADRC considers the external perturbation and the internal uncertainty of the system as a total perturbation, which is estimated and compensated, and retains the advantages of PID control that does not depend on the accurate model of the control object while solving the contradiction between rapidity and overshoot in PID control by arranging the transition process.Existing ADRC control research focuses on the improvement of the macro level, the working mechanism of ADRC has not been improved, X. Y. Qiao [8] improves the fal nonlinear function into the faln function and uses it to improve the ESO, and the experiments show that the improved ADRC in the quadrotor system can make the quadrotor system more resistant to the strong external disturbances.Yang [9] designed galn function based on normal distribution function and used it to improve ESO, and the simulation results show that the improved ESO has better error following performance and better observation performance.Liu and Chen [10][11] also applied the improved fal function to ESO and nonlinear state error feedback law (NLSEF) to obtain the improved ADRC, and verified that it has better speed, interference resistance and robustness than the traditional ADRC, but the function is too complicated.
This paper firstly establishes a quadrotor UAV dynamics model and constructs an improved fal nonlinear curve function (Ifal) based on the trigonometric function, and finally verifies the anti-jamming ability of the improved ADRC in this paper by designing multiple sets of jamming experiments through simulation and the results are compared with the traditional ADRC control effects, confirming the enhanced disturbance resistance of the improved ADRC proposed in this paper.

Working Principle of Quadrotor
A quadrotor UAV controls the position and attitude of the quadrotor by adjusting the rotational speeds of the four motors to achieve changes in lift, and there are common quadrotors with "+" type layout and "×" type layout.Because the "×" layout allows more rotors to participate in the pitch and roll attitude control, which provides better maneuverability, this paper adopts the "×" layout quadrotor UAV, which achieves the pitch and roll attitude control by controlling the rotational speeds of different motors, and the symmetrical arrangement of the motors can also balance the reversing torque, which is the best way to control the position and attitude.The symmetrical arrangement of the motors can also balance the reversal torque to keep the quadrotor flying stably.
In order to sort out the individual channel variables more intuitively, the earth solid-link coordinate system e(O e X e Y e Z e ) and the airframe coordinate system b(o b x b y b z b ) are defined, and the quadrotor coordinates are converted into attitude through the three attitude angles, namely, the roll angle φ, the pitch angle θ, and the yaw angle ψ [12], and the relationship between the airframe coordinate system and the earth solidlink coordinate system is shown in Figure . 1.
Where R x (φ) denotes the rotation matrix of φ angle around the x-axis, R y (θ) denotes the rotation matrix of θ angle around the y-axis, and R z (ψ) denotes the rotation matrix of ψ angle around the z-axis.The coordinate system transformation usually adopts the sequence of "pitch-roll-yaw", i.e., rotating according to the sequence of z-y-x axes, then the rotation matrix R b e from the airframe coordinate system to the earth fixed coordinate system is shown in equation ( 4).
Where c denotes cosine, s denotes sine.

Quadcopter UAV Modelling
The following assumptions are usually made during modelling to simplify the quadrotor UAV dynamics model [13]: 1. the quadrotor is a uniformly symmetric rigid body; 2. the mass and moment of inertia of the quadrotor do not change; 3. the geometric center of the quadrotor is coincident with its center of gravity; 4. the quadrotor is subject only to gravity and propeller pull.Modelled in the Earth solid-linked coordinate system, the quadrotor UAV is modelled as.
In equation.( 5): m is the mass of the quadrotor UAV; g is the acceleration of gravity; I x , I y , and I z are the rotational inertia of the x, y, and z axes, respectively, l is the distance from the center of the rotational axis of the quadrotor UAV to the center of the fuselage, U 1 is the amount of the quadrotor UAV's lifting force control, and U 2 , U 3 , and U 4 are the amount of the control of the tumbling angle, the pitching angle, and the yawing angle.
where C m is the propeller moment coefficient, C t is the propeller tension coefficient, and Ω i is the ith propeller speed.

Improved Active Disturbance
Rejection Control

ADRC Controller Basic Structure
ADRC controller evolved from the classical PID controller, because the traditional PID controller directly takes the difference between the reference given and the output feedback as the control signal, which leads to the contradiction between response rapidity and overshooting.ADRC algorithm is a nonlinear control algorithm proposed by researcher Han Jingqing [14] in response to the shortcomings of the PID control algorithm, which adopts the core concept of PID error feedback control, and on the basis of the basic idea of the PID control algorithm, the nonlinear feedback control law (NLSEF), the expansion state observer (ESO) and the tracking differentiator (TD) link are added.Among them, the tracking differentiator arranges the transition process of the closed-loop system according to the differential output and the most rapid synthesis function, reasonably extracts the continuous signals (tracking given) and differential signals, gives reasonable control signals, and solves the contradiction between response speed and overshooting.The extended state observer designs an extended state quantity to track the influence of unknown parts of the model and unknown external perturbations, and gives the control quantity to compensate these perturbations, making it an ordinary integral series type control object.The nonlinear error feedback control law gives the control strategy of the controlled object, and the basic framework of ADRC is shown in Figure .2.

Improved Tracking Differentials
The traditional structure and basic properties of nonlinear tracking differentiators are investigated in Researcher Kyung-Ching Han's book.A second-order nonlinear tracking differentiator based on a second-order bang-bang switching system is proposed.
where x 1 is the desired trajectory and x 2 is its derivative.Note that the parameter r is application-dependent and is set to speed up or slow down the transient profile accordingly.Denote 2 as the "trace differentiator" of v(t).

Improvement of the Expansion State Observer
ESO is the heart of the ADRC controller, which improves the performance of the system by transforming all uncertain and nonlinear perturbations, both internal and external, into a deterministic and linear form by determinizing and linearizing the perturbations.The system controlled in this paper is of second order, so the ESO expands the total perturbation to a third order system state.Its expression is given below.
In equation ( 8): e is the observation error; y is the system output; z 1 is the system output observation; z 2 is the output differential observation; z 3 is the perturbation observation; β 01 , β 02 , and β 03 are the observer filter coefficients; b 0 is the controller gain; α 1 , α 2 , and δ are the adjustable parameters; and the fal function is as follows.The selection of nonlinear function follows the principle of "small error, large gain, large error, small gain", and its curve has good continuity, convergence, smoothness.The derivation of equation ( 9) can be obtained [15].
Its characteristics directly affect the observation performance, which in turn affects the performance of the control system.From equation ( 9) and ( 10), it can be seen that the fal function is not smooth and conductible although it is continuous in the domain of definition, and the sudden change of the derivative affects the performance of the system and leads to oscillations in the system.
To overcome this phenomenon, the fal function needs to be improved.Given that the trigonometric function has better continuity and smoothness near the far point, in order to avoid the inflection point, the trigonometric function is used to fit the function and finally an Ifal function is constructed in the form shown below.
To satisfy that the function is continuous and derivable when |e|=δ, The improved Ifal function is as follows.
From Figures 3 and 4, it can be seen that the Ifal function can avoid the problem that the slope of the fal function is too large near the origin and there is an inflection point, and it is smoother near the origin.Ifal function in |e| <= δ, the function gain is larger, and there is no sudden increase, the gain control effect will be better.

Attitude Control Based on Active Disturbance Rejection Control
For the three channels of pitch, yaw and roll, both internal and external disturbances are regarded as total disturbances, and the total disturbances of each channel are independently estimated and compensated in real time using the expanded state observer, so as to achieve the goal of decoupling.The structure of the system is shown in Figure .5, and the system is divided into four independent loops, namely, altitude control loop, pitch control loop, roll control loop and yaw control loop, and the ADRC controller is applied to each of the four loops.In order to verify the control effect of the improved ADRC above, the mathematical model of the quadrotor UAV is built in MATLAB/Simulink according to the control structure and compared with the traditional ADRC control.The parameters of the unmanned helicopter are shown in Table 1, and the parameters of the improved ADRC are shown in Table 2.In order to ensure the rigor of the experiment, the traditional ADRC control parameters are set the same as the improved ADRC parameters.b), it can be seen that for pitch angle, both control schemes have small-amplitude errors in tracking the sinusoidal signal, but the improved control system has a faster dynamic response and smaller tracking errors.

Simulation and Analysis of Results
A quadrotor UAV often encounters external wind disturbances during flight, which causes a large deviation of its actual pitch angle.In order to verify the anti-jamming capability using the improved ADRC, the random sudden wind disturbance received during the flight of the quadrotor UAV is simulated with white noise at 3 seconds.The dynamic response curves of the UAV pitch angle channel controller in the presence of random mutant wind disturbances are given in Fig. 7 when the step input r(t) = 0.2 and the time-varying input r(t) = 0.2sin(2t)., it can be seen that the UAV pitch angle tracking curve shows some fluctuations under the white noise interference, and the control system designed in this paper demonstrates a stronger anti-interference ability to effectively suppress the disturbance when the quadrotor UAV is subjected to a stronger random wind interference in the flight process.

Conclusion
In this paper, a quadrotor UAV dynamics model is established, and the fal function is improved by combining the trigonometric function to address the problems that the fal function is not smooth and conductible, and the sudden change of the derivative affects the performance of the system.
The improved fal function is applied to the ADRC controller.Through MATLAB/Simulink simulation, the fastness, overshoot and anti-jamming performance of the improved ADRC in quadrotor UAV attitude control are better than that of the traditional ADRC.

Figure 1 . 6 -
Figure 1.6-DOF quadrotor system The rotation matrix from the quadrotor coordinate system b(o b x b y b z b ) to the Earth solid link coordinate system e(O e X e Y e Z e ) is as follows. 1 0 0 ( ) 0 cos sin 0 sin cos c c s s c c c c s c s s c s s s s c c c s c s c s s c c c

Figure 3 . 4 .
Figure 3. Enlargement of the function curve origin Figure 4. Gain diagram of function curve error

Figure 5 .
Figure 5. Quadrotor UAV control system parameters established in the controller model, UAV attitude simulation experiments were conducted in this study.The dynamic response curves of each controller for the UAV pitch angle channel when the step input r(t) = 0.2 and the time-varying input r(t) = 0.2sin(2t) are given in Figure.6 in the absence of the internal model and external environmental disturbances.

Figure 6 .
Figure 6.Dynamic response of controllers without interference

Figure 7 .
Figure 7. Dynamic response of controllers with external environmental interference From Figure.7(a) and (b), it can be seen that the UAV pitch angle tracking curve shows some fluctuations under the white noise interference, and the control system designed in this paper demonstrates a stronger anti-interference ability to effectively suppress the disturbance when the quadrotor UAV is subjected to a stronger random wind interference in the flight process.

Table 1 .
Three Scheme comparing

Table 2 .
Three Scheme comparing