Design of the UAV Trajectory Tracking System Based on the Adaptive Neural Network - ADRC Method

In order to solve the problems of internal uncertainty and external disturbance of an unmanned aerial vehicle (UAV), this paper proposes the active disturbance rejection controller (ADRC) based on the adaptive radial basis function (RBF) neural network. Firstly, the dynamic model of a quadrotor with disturbance is analyzed and the controller is designed based on the ADRC method. Secondly, the RBF network is used to estimate the unknown parameter b of the system and the Lyapunov function is constructed to prove the stability of the closed-loop system. Finally, simulation results of a spiral ascent and a climbing maneuver ﬂ ight illustrate that the controller proposed in this paper has high tracking accuracy and strong robustness under di ﬀ erent ﬂ ight scenarios; the average tracking error of the outdoor ﬂ ight experiment is about 0.22m, which further veri ﬁ es the e ﬀ ectiveness of the proposed controller.

1. Introduction 1.1. Motivation. In recent years, quadrotors have gradually become a popular research topic. Quadrotors have many advantages, such as a simple structure, good flexibility, and vertical take-off and landing. Quadrotors not only play the important role in the military field [1,2] but also have been widely used in the civil field [3][4][5][6]. Quadrotors have the characteristics of nonlinearity, strong coupling, and sensitivity to disturbance [7,8]. During flight, quadrotors are generally affected by body vibration and external air flow. Moreover, a mathematical model of the UAV is difficult to accurately establish, so it is difficult to control a quadrotor UAV for position trajectory tracking.
1.2. Related Work. In controller design, it is necessary to simultaneously take into account the amount of algorithm calculation and the control effect. In the past few years, researchers worldwide have proposed many controllers for UAVs. As a classical controller, proportional integral derivative (PID) controllers have been widely used recently [9][10][11]. However, PID parameter tuning is difficult and it is sensitive to disturbances. In [12], a robust nonlinear controller that combines sliding mode control with backstepping control to improve the antidisturbance ability of the system was proposed. In [13], a new asymptotic tracking controller was proposed, adopting the robust integral of the signum of the error method and an immersion and invariance-based adaptive control methodology. In [14], a robust linear parameter-varying observer was designed, and then, a comparator integrator was used to design the feedback controller. In addition, there are many other methods that have been proposed, such as those involving a linear quadratic regulator [15], sliding mode control [16], and H∞ control [17]. Although the above methods can achieve good anti-interference effect, they are too reliant on the system model. When the model is not accurate, the effect of the controller is greatly reduced. At the same time, many scholars use intelligent control in the design of controllers. In [18], a radial basis function neural network (RBFNN) was used to approximate the unknown system function. To simplify the model design, an adaptive network is used to approximate unknown nonlinear dynamics in [19]. In [20], reinforcement learning was used to train a quadrotor controller to complete the hovering and trajectory tracking tasks. However, intelligent control requires a large amount of computation. The onboard CPU usually has a limited amount of computation and does not have the capability of real-time control.
Based on the advantages and disadvantages of the above methods, Han [21] proposed an active disturbance rejection controller (ADRC), which is a new type of control strategy. This controller incorporates the essence of the PID controller and solves the problem that the modern control theory is too reliant on object mathematical models. In addition, it also has the advantages of good real-time performance and strong anti-interference ability. Gao [22] linearized the design of the controller, used the bandwidth to set the parameters, and proposed a linear ADRC. At present, the ADRC has been adopted by Texas Instruments, Freescale Semiconductors, and other companies [23][24][25].
1.3. Contribution. ADRC still has some unsolved problems, such as compensation factor b cannot be accurately estimated, which is usually trial-and-error by manual experience method. Its stability theoretical analysis needs to be improved. At present, it has not been fully applied to the actual flight of the UAV. Aiming at the above problems, this paper designs an active disturbance rejection control system of the UAV based on the RBFNN. Our contributions are summarized as follows.
(i) The RBFNN is used to estimate the unknown compensation factor b in real time, which reduces a lot of the manual trial work (ii) We analyze the convergence of the extended state observer (ESO) and prove the stability of the closedloop system by constructing the Lyapunov function (iii) We verify the effectiveness of the algorithm through simulation and further carry out a UAV antiinterference flight experiment by building a physical experimental platform The remaining sections of this paper are organized as follows. In Section 2, the UAV dynamic model is established and the detailed problem is described. Section 3 describes the control scheme of trajectory tracking. Section 4 analyzes the convergence of ESO and proves the stability of the system. The results of simulation experiments and actual flight are provided in Section 5. Finally, the conclusion is drawn in Section 6.

Problem Statement
2.1. Quadrotor Dynamic Model. As shown in Figure 1, O b = f x b y b z b g is the body fixed frame and O e = fx e y e z e g is the inertial frame with respect to the Earth. Define χ = ½x e , y e , z e T as the UAV distance on the x y z axis, η = ½ϕ, θ, ψ T as the roll angle, pitch angle, and yaw angle of the UAV, V = ½u, v, w T as the linear velocity vector, and Ω = ½p, q, r T as the angular velocity vector of the quadrotor in the body frame O b = fx b y b z b g. The relationship between V and Ω is expressed as follows: where The UAV moves by changing the motor speed around the body, and its movement contains two parts: spatial translation motion and rotation motion. The mathematical model of the quadrotor UAV flight system can be obtained by the Euler equation and Newton's law, which can be described as follows: where I x , I y , I z are the rotational inertia of the x-axis, y-axis, and z-axis, respectively, l is the length between the center of the aircraft and the rotor, and m and g are the mass of the UAV and gravitational acceleration, respectively. D i ði = 1, 2 , 3, 4, 5, 6Þ represents the unknown total disturbances and the uncertain parts of the model. The input control ðU 1 U 2 U 3 U 4 Þ values are expressed as follows: where K F and K M are the lift coefficient and reverse torque coefficient, respectively, and ω i ði = 1, 2, 3, 4Þ is the speed of the ith rotor.

Problem Description.
The UAV dynamics equation is obtained by the above analysis. The UAV is an underactuated system with four input channels and six output channels, and there is a strong coupling relationship between its position state and attitude state. The horizontal motion of the UAV is affected by the roll angle and pitch angle at the same time.
Problem 1. The dynamic model of the UAV (3) can be rewritten as follows: where s i ð·Þ is the uncertainty of the system, ϖ i ð·Þ is the total disturbance of the system, b i ð·Þ is the compensation factor, and u i ð·Þ is the control input.
Then, (5) can be rewritten as follows: The key is how to estimate the total disturbance f and the compensation factor b in real time, and then, (6) becomes a cascade integrator as shown in (7), so that the design of the controller becomes simple.
2.2.1. Approach. ADRC technology has low dependence on the accuracy of the system model, can estimate and dynamically compensate the internal and external disturbances of the system, and can improve the robustness of the system. This system consists of three parts: the tracking differentiator (TD), extended state observer (ESO), and state error control law (SECL) [21]. The structure of an ADRC is shown in Figure 2. ν, u, and y represent the desired signal, control input, and output signal. D is the external disturbance on the system. The roll angle ϕ is taken as an example to illustrate the specific process of the ADRC control law design, where the design of other channel controllers is similar.

Tracking Differentiator
A TD arranges a transition process for the attitude angle command and obtains its differential signal. Assuming that the desired roll angle is ϕ d , the TD is expressed as follows: where r is the speed factor and h is the filtering factor. r and h can affect the speed of signal tracking. v 1 is the tracking signal for ϕ d and v 2 is the differential signal of v 1 . The optimal synthetic rapid control function fhan ð·Þ is shown as follows: 3.1. Extended State Observer. The extended state observer is the core part of the ADRC. Its basic idea is to add the total disturbance f into system (6) as a new unknown state variable x 3 , and then, system (6) can be written as follows: where x 3 is the expansion state, including the total disturbance of the system. The extended state observer is established for the attitude channel as follows: where β 1 , β 2 , β 3 are observer gains. Then, the output variables of the extended state observer (11) can track the state variables of system (10), namely, 3.2. RBF-Based State Error control Law. First, considering system (6), the output error of the system is as follows: where y d is the command signal.
The ideal control rate is designed as follows: where E = ½e, _ e T and K = ½k p , k d T . Make all roots of the polynomial on the left half plane of the complex plane (14) by designing K. Then, _ eðtÞ ⟶ 0, eðtÞ ⟶ 0 when t ⟶ ∞.
In this paper, the total disturbance x 3 is estimated based on z 3 and b is estimated by the RBFNN.
The RBFNN has the advantages of a strong generalization ability and simple network structure and can approximate any nonlinear function. Therefore, the RBFNN is used to estimate the unknown variable b of the system. As shown in Figure 3. The designed RBFNN is a threelayer neural network composed of two input parameters, five hidden layer neurons, and one output parameter. The expression of the network output is as follows: where x = ½e _ , e T is the input vector,Ŵ is the weight vector, and h is the excitation function of the hidden layer: where c is the center of the basis function and b is the width of the Gaussian function. Finally, the control law can be rewritten as follows:

System Stability Analysis
The mathematical model of UAVs consists of three position channels and three attitude channels. Each channel can be written as the same state equation; then, (10) is rewritten as follows: Figure 3: RBF network structure.
The extended state observer of (18) can be constructed as follows: where L = ½β 1 β 2 β 3 T are observer gain parameters.

Convergence Analysis of ESO.
First, combining (18) and (20), the error equation is constructed and can be written as follows: where E i ðtÞ = x i ðtÞ − z i ðtÞ, i = 1, 2, 3; let ζ i ðtÞ = E i ðtÞ/ω i−1 0 , i = 1, 2, 3 and (21) can be rewritten as follows: Then, (21) can be written as the following state equation: According to the bandwidth parameterization method proposed in [22], if the ESO eigenvalues are all configured at −ω 0 (observer bandwidth) of the left half plane of S, then, Ā is the Hurwitz matrix and the Hurwitz characteristic equation of the error system is as follows: Solving (25), the observer gain matrix L can be obtained: Then (22) can be expressed as follows: where H = Proof. Solving (27), the following result can be obtained: According to j f j ≤ dðd > 0Þ, then,

System Stability Analysis.
The adaptive law of the weight value in the RBFNN is designed as follows: where γ is a positive constant and P is a positive definite matrix and satisfies the Lyapunov equation.
Combining (6) and (17), According to Lemma 1, by adjusting the bandwidth ω 0 of the observer, ðz 3 − x 3 Þ ⟶ 0, (42) can be simplified as follows: Let Equation (43) can be expressed as follows: The optimal parameter is defined as follows: where Ω is a set of W.
The neural network approximation error is defined as follows: Equation (45) can be written as follows: Wireless Communications and Mobile Computing The Lyapunov function is defined as follows: where P satisfies the Lyapunov equation: Define M = BððŴ − W * Þ T hðxÞ + εÞu, V 1 = 1/2E T PE, and V 2 = ð1/2γÞðŴ − W * Þ T ðŴ − W * Þ; then, the time derivative of V 1 is as follows: Substituting M into (51) gets as follows:

Wireless Communications and Mobile Computing
The derivative of V 2 is as follows: Therefore, the derivative of the Lyapunov function V is obtained as follows: Substituting the adaptive law (41) into the above equation can be obtained as follows: Due to −1/2E T QE ≤ 0, the RBFNN can be designed to make the error ε ⟶ 0, such that _ V ≤ 0.

Simulation Result.
In this section, the proposed controller is simulated and compared with the classical ADRC controller for scenarios involving external disturbance and model uncertainty (internal disturbance) to verify the effectiveness of the control scheme. Set the initial position coordinates of the quadrotor as ½0, 0, 0 while the initial attitude is ½0, 0, 0. The parameters of the quadrotor model are shown in Table 1.
Case 1. In this case, the rounded desired trajectory is set as follows. When 0 < t < 5s, x d = 0 ; y d = 0 ; z d = t ; ψ d = 0, and when t > 5, x d = cos ð2tÞ ; y d = sin ð2tÞ ; z d = 5 ; ψ d = 0. The tracking result of the quadrotor is shown in Figure 4. The estimated curve of the system unknown parameter b by the RBF neural is shown in Figure 5. It can be seen that the estimated value of the neural network converges to a small bounded range in a very short period of time. This method saves a lot of time than manual adjustment of parameters.
Case 2. In this case, set the desired climbing trajectory as follows: x d = 6 × sin ðt/3Þ ; y d = −6 × sin ðt/3Þ cos ðt/3Þ ; z d = 0:8t; to verify the resistance of the UAV to external disturbance, during the flight of the quadrotor UAV, white noise with a peak value of 6 is added to the UAV as an external disturbance. Figure 6 shows the trajectory tracking results; in this figure, it is clear that the RBF-ADRC can well overcome external disturbances and track the desired trajectory. Moreover, the ADRC controller is affected by external disturbances and there are many oscillations that deviate from the reference trajectory.  Table 1 are reduced by 30%. The tracking result of the UAV is shown in Figure 7, demonstrating that the RBF-ADRC controller can still ensure good trajectory tracking accuracy. Moreover, the ADRC controller is clearly affected by the change in model parameters and the tracking error becomes larger. The simulation results show that when the UAV model parameters change, the RBF-ADRC also has good robustness and high tracking accuracy. In order to simulate the state of the quadrotor UAV under unknown disturbance, A 550 ml bottle containing 300 ml water is attached to the arm of the UAV (as shown in Figure 8). The rope tied to the bottle will swing and the water in the bottle will shake. At the same time, considering the influence of the wind in the outdoor environment, the quadrotor UAV is finally strongly disturbed and the disturbance is  Figure 9, it can be seen that the UAV can still be positioned near the origin (0,0) and the position swing amplitude is small. The average value of tracking error is about 0.22 m. The test results show that the quadrotor UAV can still maintain its stability under the influence of external interference with variable amplitude, frequency, and direction.

Conclusion
This paper proposes the method that combines ADRC and the neural network to solve the problem of stable flight of the UAV under multiple disturbances. The method uses the RBF neural network to estimate the unknown parameters of the system, and it can converge to a smaller range in a short time.
Finally, not only the effectiveness of the method in various scenarios is shown by numerical simulations but also the robustness of the algorithm is further verified by real flight experiments in complex outdoor environments. This paper provides an effective link between the control theory and practical applications. In the future, we will extend the research to the multi-UAV cooperative control system. In the flight process, there exist problems such as air flow disturbance and load swing among multiple UAVs, which brings great challenges to the design of the multi-UAV System. Therefore, the method proposed in this paper will be helpful to solve the problem.

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 they have no conflicts of interest.