Trajectory Tracking Active Disturbance Rejection Control of the Unmanned Helicopter and Its Parameters Tuning

To solve the problem that the trajectory tracking control system of the unmanned helicopter is limited by the accuracy of the physical model (parameters and dynamic characteristics) and external disturbance of the unmanned helicopter, this paper designs a trajectory tracking control system of the unmanned helicopter based on the linear/nonlinear hybrid Active Disturbance Rejection Control (ADRC). At the same time, this paper proposes a method for tuning the controller parameters based on the Bacterial Foraging Optimization-Flower Pollination Algorithm (BFO-FPA). Finally, the simulation test of spiral climb and “8”-figure climb is applied to verify the controller’s performance. The results show that the controller proposed in this paper can effectively overcome the influence of the unmanned helicopter’s internal and external disturbance, and the controller has the advantages of strong anti- disturbance ability and strong robustness. Simultaneously, the optimization algorithm can obtain the optimal global solution, and can improve the controller’s performance.


I. INTRODUCTION
The unmanned helicopter's trajectory tracking control system is a system for decoupling control of the multiinput/multi-output (MIMO) nonlinear system, challenging to design [1]. Traditional linear control methods generally rely on accurate mathematical models and the aircraft's physical parameters [2]- [4]. The internal uncertainty (parameter uncertainty or unmodeled dynamics) and external uncertainty (unknown disturbance of the external environment) of the unmanned helicopter will cause the mathematical model to be inaccurate so that the trajectory tracking accuracy cannot be guaranteed [5]. Therefore, the unmanned helicopter's flight control system needs to overcome the influence of the uncertainty disturbance. Researchers have applied adaptive control and intelligent control to the unmanned helicopter flight control systems in recent years. Kapoor and Deb et al. [6]- [9] design an adaptive controller for the single main-rotor The associate editor coordinating the review of this manuscript and approving it for publication was Dipankar Deb. helicopter and the coaxial rotor helicopter. References [10], [11] apply intelligent control methods to tilt-rotor aircraft and quadrotor aircraft. However, most of these methods only target internal disturbance or external disturbance and cannot wholly overcome uncertainty.
Han [12]- [15] regarded the sum of the system's internal and external disturbances as total disturbances and proposed Active Disturbance Rejection Control (ADRC). The extended state observer of the ADRC controller estimates the total disturbance and makes real-time compensation. ADRC does not rely on the accurate mathematical model, and ADRC can overcome internal and external disturbances' uncertainty [16]. Humaidi et al. [17] proposed two ADRC schemes for the position control of a single link flexible joint robot manipulator: Linear Active Disturbance Rejection Controller (LADRC) and Nonlinear Active Disturbance Rejection Controller (NADRC), and a comparison study in terms of transient performances, robustness characteristics and disturbance rejection capabilities has been made based on LADRC and NADRC. They selected the particle swarm VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ technique (PSO) as an optimal tuner to improve the estimation process and, thereby, to enhance the system performance. Abdul-Adheem et al. [18] designed an ADRC controller based on an improved extended state observer for MIMO systems and achieved good control results. In reference [19], Abdul-Adheem et al. proposed a Novel Active Disturbance Rejection Control (N-ADRC) strategy that replaces the Linear Extended State Observer (LESO) used in Conventional ADRC (C-ADRC) with a nested LESO. Simulations on uncertain nonlinear single-input-single-output (SISO) systems with time-varying exogenous disturbance revealed that the proposed nested LESO could successfully deal with a generalized disturbance in both noisy and noise-free environments. Focusing on the general nonlinear uncertain system, Wang et al. [20] expounded the relationship between the stability, uncertainty, and parameters of LADRC when a disturbance occurs in the control input. Zhang et al. [21] proposed a dual closed-loop LADRC control scheme for the control problems in the quadrotor system, such as nonlinearity, strong coupling, sensitivity to disturbance, etc. Guo and Zhao [22], [23] proved that the active disturbance rejection control is suitable for the SISO system and the MIMO system. Chen et al. [24], [25] obtained the stable region of LADRC and reduced-order LADRC based on the Lyapunov function and the Markus-Yamabe theorem, they also get mathematical proofs of global stability and asymptotic regulation; they also proposed an adaptive method of ADRC parameters based on Q-learning. From the above study, we can find that the ADRC technology is relatively mature and can effectively overcome internal and external disturbance, so ADRC is suitable for the unmanned helicopter. Therefore, this paper designs a trajectory tracking control system of the unmanned helicopter based on the ADRC-LADRC hybrid controller.
Although the ADRC controller's anti-disturbance performance is excellent, the ADRC controller has many parameters, and it is not easy to obtain better parameters with manual parameter tuning. Therefore, it is necessary to use optimization algorithms to tune controller parameters. In this paper, the Bacterial Foraging Optimization-Flower Pollination Algorithm (BFO-FPA) is used to optimize the ADRC-LADRC hybrid controller's parameters, which reduces the difficulty of parameter tuning.
Based on the above research background, to enhance the unmanned helicopter's anti-disturbance ability, this paper proposes a trajectory tracking control system based on the ADRC-LADRC hybrid controller, and the simulation results show that the ADRC-LADRC controller is better than the traditional LADRC controller. At the same time, this paper proposes a parameter optimization algorithm for the ADRC-LADRC hybrid controller based on the BFO-FPA algorithm. The simulation results of the unmanned helicopter's attitude control show that the BFO-FPA algorithm is superior to the traditional BFO algorithm.
The remaining chapters of this paper are as follows: The second part shows the flight dynamics model of the unmanned helicopter, as well as the design of ADRC and LADRC, and designs the trajectory tracking control system of the unmanned helicopter. The third part shows the controller parameter optimization algorithm based on the BFO-FPA algorithm. The fourth part shows the simulation results and discussions. Finally, the fifth part draws some conclusions for this paper.

II. DESIGN OF TRAJECTORY TRACKING CONTROL LAW A. FLIGHT DYNAMICS MODEL OF THE UNMANNED HELICOPTER
The flight dynamics equation of the unmanned helicopter with 6-DOF is:V where, V = [u v w] T is the linear velocity; S = [p q r] T is the angular velocity; α = [φ θ ψ] T is the Euler angle of roll, pitch and yaw; P = [X Y Z ] T is position vector in ground coordinates; m is the mass of the whole machine; F and M are the forces and moments of the components of the whole machine (rotor, tail rotor, fuselage, vertical tail, flat tail, etc., including gravity); I is the moment of inertia matrix, is the angular rate antisymmetric matrix, R EB is the conversion matrix from airframe coordinates to ground coordinates, and E is the conversion matrix from airframe angular velocity to Euler angular velocity, namely: B. ADRC CONTROL FEATURES ADRC consists of tracking differentiator (TD), extended state observer (ESO), and state error nonlinear control law (SENCL), as shown in Fig. 1. TD can quickly obtain the tracking signal and differential signal of the input signal. ESO is used to estimate the extended state formed by internal uncertainty and external disturbances. The nonlinear combination of the state error is used as the control output to realize the unmanned helicopter's effective control.

1) TRACKING DIFFERENTIATOR (TD)
The following is the discrete form of the nonlinear tracking differentiator of the second-order system [14]      where, the state variable x 1 (k) is the tracking signal of the input signal v (k), the state variable x 2 (k) is its differential signal, k is the k time of signal sampling, h is the discrete sampling time step, r is the speed factor, h and r are adjustable, which determine the speed of signal tracking.

2) EXTENDED STATE OBSERVER (ESO)
The expression of the nonlinear equation of the controlled plant affected by uncertain internal and external disturbances is as follows where, u and y are the input and output signals, f (x, w, t) is the unknown nonlinear system function including disturbance, and b(t) is a unknown function. x u is the expanded state variable, including the total disturbance of the system,ẋ 3 = g (t), then b 0 is a constant term for the controller gain. The expanded state observer of the expanded system (13) is [12][13][14] where, is the gain and ζ is the step size; fal (·) is a nonlinear function, then the output variables of the extended state observer (14) can track the state variables of the system (13), namely Extended state variable z 3 is the estimated value of the sum of the controlled plant's internal and external disturbances, and z 3 is used to compensate the control quantity, thereby effectively suppressing the disturbance's influence.
u 0 is the output of SENCL. Through the compensation of the expanded state estimate, the system becomes an integral series linear system, namely The part of the system (12) that is different from the standard integral series is regarded as the total disturbance (including internal disturbance and external disturbance), thereby forming an integral series system with disturbance (13). ESO uses the system's input and output information to estimate the total disturbance and then compensates the total disturbance through the control law, thereby transforming the system (13) into a standard integral series system (18).
Given the second-order controlled plant system model where, f (x 1 , x 2 ) = −26x 2 represents an unknown function, b 0 = 135. The value of ESO is: sampling time h = 0.01, β 1 = 100, β 2 = 350, β 3 = 1500, α 1 = 0.5, α 2 = 0.25, The input signal is sint, the simulation results are shown VOLUME 9, 2021 in Fig. 2 z 1 , z 2 , z 3 are the state estimate of ESO, x 1 , x 2 and x 3 are the state variables and expansion state of the controlled system (13). The estimated output value of ESO can well track the system's state variables and the extended state variables formed by disturbances.

3) STATE ERROR NONLINEAR CONTROL LAW (SENCL)
SENCL is formed by the nonlinear combination of state deviations corresponding to TD and ESO, namely: where, β 01 , β 02 are adjustable gains. fal function can effectively suppress the occurrence of signal chattering and has good filtering effect.

C. LADRC CONTROLLER AND ITS PARAMETERS
Construct a linear extended state observer (LESO) for the system (13), namely where, z 1 , z 2 and z 3 are the observed values of the LESO respectively; β l1 , β l2 and β l3 is selected as β l1 β l2 β l3 = 3w 0 3w 2 0 w 3 0 , w 0 is the observer bandwidth [22]. LESO (20) is expressed as followṡ and where, u = [u y] T represents the input and output of the controlled plant.
The control law is designed as follows [26] where, w c is the controller bandwidth. The LADRC controller can be constructed without TD, as shown in Fig. 3. The parameters to be tuned are simplified to w c , b 0 and w 0 . Compared with the second-order ADRC controller, the LADRC controller has fewer parameters.

D. TRAJECTORY TRACKING CONTROL LAW
The block diagram of the trajectory tracking controller for the unmanned helicopter is shown in Fig. 4. It is composed of the attitude control loop, the velocity control loop, and the position control loop from inside to outside. The order of ADRC or LADRC involved in the control loop is determined according to the relevant dynamic model's order.

1) ATTITUDE CONTROL LOOP
Equations (2) and (3) can be expressed aṡ (26) where, w is the external disturbance; U c = [ δ lon δ lat δ TR ] is the control vector composed of the longitudinal pitch, the lateral pitch and the tail rotor pitch.. Combining equations (25) and (26) can obtain the second-order system of state equations (27) where, F 3 =dF 1 /dt,F 1 ,F 2 , B is the corresponding abbreviation. The total disturbance is expressed asf α = F 3 S + F 1 (F 2 + BU c ) −B 0α U c , then the equation (27) becomes where, B 0α is the gain matrix of the attitude control. U c (the pitch, roll, and yaw loop control variables) and the α form a single input-single output relationship. The attitude control loops are all designed as a second-order LADRC control structure, as shown in Fig. 5. The command of pitch angle and roll angle is given by the velocity loop, and the command of yaw angle is given by the reference command signal. The attitude control loop's output is superimposed with the trim base offset to form the [ δ lon δ lat δ TR ] control input, which acts together with the δ col on the unmanned helicopter. The essence of the transformation from equation (27) into equation (28) is to transform the system into an integral series type with disturbance. Then the LADRC controller will compensate for the disturbance and turn the system into a standard integral series system. According to the above analysis, design the longitudinal controls δ lon in the pitch loop as follows where, θ r is the output signal of longitudinal velocity loop; θ is the pitch angle signal; δ trim θ is the longitudinal control trim; b 0θ is the control gain; β θ 1 β θ 2 β θ 3 = 3w 0 3w 2 0 w 3 0 . The design of the roll loop control δ lat and the yaw loop control δ TR are similar, and will not be repeated.

Formula (1) can be expressed aṡ
Define the disturbancef V = F 4 (α, S, V, w) −B 0V α, theṅ where, B 0V is the velocity control gain matrix, and the system (30) is a first-order dynamic system, so design the corresponding first-order ADRC controller, as shown in Fig. 6. α is the virtual control quantity, which forms a single input single output system corresponding to the longitudinal, lateral and vertical velocity V, the velocity control loop is shown in Fig. 7. The output of the position control loop is the speed command, and forms the desired commands [θ r φ r δ col ]. Design the control output θ r in the longitudinal velocity loop as follows where, v 1 is the tracking signal from TD, u r is the output of longitudinal position loop; θ trim is the bias value of longitudinal velocity; b 0u is the control gain.
The design of latitudinal velocity loop and vertical velocity loop are similar, and will not be repeated.

Equation (4) can be expressed aṡ
where, B 0P is the position control gain matrix. The system (33) is a first-order system. Design the corresponding first-order ADRC controller (as shown in Fig. 6). V is the virtual control of P. The three-position control loops also use a first-order ADRC controller to form the three-axis position control loop, as shown in Fig. 8. The position command is a preplanned trajectory input. The control output is the input of the velocity control loop [u r v r w r ]. Design the control output u r in the longitudinal position loop as follows where, X r is the tracking signal from TD, u trim is the longitudinal position bias; b 0X is the control gain.
The design of the latitudinal position loop and the vertical position loop are similar, and will not be repeated.

III. CONTROL PARAMETER TUNING A. PARAMETER TUNING PRINCIPLE
The controller parameters have different effects on the performance of ADRC and LADRC controllers. Table 1 lists the parameters and their functions.

B. BFO-FPA ALGORITHM
The Flower Pollination Algorithm (FPA) is a meta-heuristic algorithm inspired by the flower pollination phenomenon [27]. FPA adopts the Levy flight mechanism and sets the switching probability to realize better the free conversion between local search and global search. This algorithm has a few parameters and is easy to adjust, so it is widely used in controller optimization [28]. However, FPA has low global search ability and can easily fall into optimal local problems [29]. The Bacterial Foraging Optimization (BFO) algorithm imitates the foraging behavior of Escherichia coli and uses the cyclic execution of chemotaxis, duplication, and migration operators to obtain the optimal global solution [30]. The migration operator stipulates that bacteria will be migrated to any position in the search space with a certain probability after completing a fixed number of reproduction operations. Therefore, the BFO algorithm has solid global convergence, but the convergence speed and convergence accuracy are not high enough [31]. Therefore, this paper proposes the BFO-FPA algorithm. The swimming operation in the chemotaxis operator adopts the FPA algorithm, thereby improving the convergence speed of the BFO algorithm and enhancing the global search ability of the FPA algorithm. Figure 9 is a schematic diagram of the combination of the BFO-FPA algorithm and the ADRC-LADRC control system, and Figure 10 is the BFO-FPA algorithm flow.
The main steps of the BFO-FPA algorithm are as follows:

1) PARAMETER INITIALIZATION
Including migration times Ned, reproduction times Nre, chemotaxis times Nc; migration probability Ped; switching probability Pd, etc.

2) INITIALIZE THE BACTERIA's LOCATION
That is to initialize the parameters of the ADRC-LADRC controller. Formula (36) is the position initialization, and formula (37) is the calculation of bacterial fitness.
In the formula, rand is a random number between [0,1]; x min and x max are the upper and lower boundaries of the parameters; |e(t)| represents the absolute value of the difference between the expected input and actual output of the control system; H represents the number of loops of the control system; Q i (t) represents the input signal of the control loop. The smaller the fitness value, the better the solution.
where, C(i) is the step length of the selected direction; (i) is the arbitrary direction vector generated in the direction change; µ (i) is the unit step length vector selected after the direction adjustment; P (i, j, k, l) represents the space vector position of the i-th bacterium, that is, it is in the j-th chemotaxis cycle, the k-th reproduction cycle, and the l-th migration cycle.
2) Swimming: If the fitness value of bacteria decreases after flipping, swimming in the direction after flipping, otherwise swimming remains unchanged. The swimming operation adopts the FPA algorithm; the specific process is as follows 2-1) Find the optimal solution g * and its fitness value f (g * ) in the current bacteria (pollen) population.
where, x t i is the position of pollen i in j-th iterations; L is the pollination intensity, and it is a random step that obeys Levy distribution; (λ) is the standard gamma function; ε h is a random number with uniform distribution on (4) The reproduction cycle. After the chemotaxis cycle, each bacteria's fitness values were accumulated and sorted according to the fitness values. Remove bacteria with high fitness from the population, leaving half of the bacteria with low reproduction fitness.
(5) Migration cycle. After completing the replication cycle, choose a random probability rand. If rand < Ped, bacteria will migrate and initialize according to formula (36).
(6) Judge whether the algorithm meets the end conditions and output the optimization result if it meets it.

C. VERIFICATION OF BFO-FPA ALGORITHM
Taking the attitude control loop as an example to verify the BFO-FPA algorithm. Table 2 shows the BFO-FPS algorithm parameters, and Figure 11 shows the process curves of the attitude response of the BFO-FPA and BFO algorithms. The attitude commands are all 5 • step signals. Figure 12 shows the convergence process of the respective algorithms' fitness calculation, and Table 3 shows the tuning results of the two optimization algorithms. The results show that the BFO-FPA algorithm is better than the BFO algorithm alone. The BFO algorithm has obvious chattering in the pitch and roll loops, and the BFO-FPA algorithm has a shorter adjustment time in the attitude loop.

IV. TRAJECTORY TRACKING CONTROL AND SIMULATION RESULT ANALYSIS
The following will carry out the spiral ascending trajectory tracking and the ''8'' shaped ascending trajectory tracking simulation experiment. The control system selects the ADRC-LADRC controller, LADRC controller, and PID controller, respectively. Table 4 shows the parameters of the controlled device. The model includes a gust model, and   the response of the output trajectory consists of an external disturbance of Gaussian noise with an intensity of 0.003db. Table 2 shows the parameters of the BFO-FPA algorithm.

A. SPIRAL ASCENT TRACKING CONTROL
When the unmanned helicopter model has only external interference, Figures 13 and 14 show the spiral trajectory tracking control simulation results. Table 5 shows the ADRC-LADRC hybrid controller parameter values tuned by the BFO-FPA algorithm. Figure 14 is a three-dimensional trajectory diagram. The control effect of the ADRC-LADRC controller is better than that of the LADRC controller and the PID controller, with faster tracking speed and better control accuracy. Fig. 13 is the time response curve of the tracking error in the three-axis direction. The greater the curvature of the trajectory, the greater the error of the LADRC controller. The results show that the trajectory tracking and anti-disturbance effect of the ADRC-LADRC controller is better than that of the LADRC controller. It can achieve high-precision spiral trajectory tracking control.
The external interference remains unchanged, but the unmanned helicopter's parameter values in the new simulation experiment have changed. Table 6 shows the parameter values of the new unmanned helicopter. This paper uses parameter changes to represent the controlled plant's internal uncertainty and keeps the controller parameter values in Table 5 unchanged. Figure 15 is the new spiral ascending trajectory tracking control simulation. The results clearly show that the ADRC-LADRC hybrid controller and the LADRC controller can still ensure good trajectory tracking accuracy even if the controlled model changes. But, the tracking accuracy of the ADRC-LADRC is better than that of the LADRC controller. The tracking control error of the PID controller is significant. It shows that the ADRC-LADRC hybrid controller has strong anti-disturbance and robustness.

B. ''8'' SHAPE CLIMBING TRAJECTORY TRACKING CONTROL
Compared with the spiral ascent trajectory tracking control, the ''8'' type climbing trajectory tracking control is more complicated. It can better test the trajectory tracking ability of the ADRC-LADRC controller. The simulation conditions remain unchanged, and Table 7 shows the controller     parameter values. Figures 16 and 17 show the simulation results. Fig. 17 indicates that the control accuracy of the PID controller has dropped significantly. In contrast, the ADRC/LADRC controller still has higher control accuracy, and the control effect is more robust than that of the LADRC controller. Fig. 16 shows trajectory tracking response and error in X, Y, and Z. The ADRC-LADRC controller has apparent advantages. The x-axis error is in the range of −0.25 to 0.25, which is better than the LADRC controllers −0.5 to 0.4 range. The other axes are similar.
Also, in constant external disturbance, the plant model parameters are changed to simulate parameter uncertainty, shown in Table 6. The controller parameter values remain unchanged, seen in Table 7. Figure 18 shows the simulation results. Figure 18 reflects that the tracking trajec- tory of the PID controller has completely deviated from the predetermined course. In contrast, the ADRC-LADRC hybrid controller and the LADRC controller can still maintain high tracking accuracy. But, the tracking accuracy of the LADRC controller decreases more obviously. It shows that the ADRC-LADRC hybrid controller proposed in this paper has apparent advantages as a trajectory tracking controller, which can effectively overcome the internal and external interference of unmanned helicopters, has good robustness and high tracking accuracy.

V. CONCLUSION
It is difficult to predict the internal and external uncertainty when designing the unmanned helicopter's trajectory tracking control system. The design of attitude and trajectory loop control law using ADRC technology can effectively solve the above problem. The main results of this paper are as follows (1) When the unmanned helicopter changes structure parameters or is interfered with by external disturbance, the ADRC-LADRC controller has better robustness than the LADRC controller. The anti-disturbance performance of the PID controller is lower than the ADRC-LADRC controller. BFO-FPA algorithm can effectively optimize the ADRC-LADRC controller's parameters and enhance the controller's performance. Compared with the traditional BFO algorithm, BFO-FPA has better optimization ability.
(2) In the future research work, we can consider integrating adaptive neural network into ADRC to improve the adaptive ability of the controller and reduce the difficulty of parameter tuning.
SUIYUAN SHEN received the B.Sc. degree in measurement and control technology and instrument from Qingdao University, Qingdao, China, in 2017, and the M.Sc. degree in aerospace vehicle design from the Nanjing University of Aeronautics and Astronautics, Nanjing, China, in 2020, where he is currently pursuing the Ph.D. degree.
His research is focused on flight dynamics and control design of traditional and tandem helicopter and tilt-rotor aircraft.
JINFA XU received the B.Sc. and Ph.D. degrees in aerospace vehicle design from the Nanjing University of Aeronautics and Astronautics, Nanjing, China, in 1985 and 1996, respectively.
He is currently a Full Professor with the National Key Laboratory of Rotorcraft Aeromechanics, Nanjing University of Aeronautics and Astronautics. His research is focused on flight dynamics and control design of traditional helicopter. VOLUME 9, 2021