Abstract
For nonlinear, strongly coupled, underdriven quadcopters in the context of modeling complexity and demanding performance requirements for the controller, this paper proposes a strategy based on an improved genetic algorithm to optimize the active disturbance rejection control (ADRC) controller. To make the quadcopter continue to fly stably in a complex environment, the dynamics model of the quadcopter was firstly established, the mathematical model was simplified according to the real world, and the ADRC controller of the quadcopter was designed. Given a large number of ADRC controller parameters, the difficulty of manual tuning and obtaining the optimal control effect, and the shortcomings of the genetic algorithm in solving the problem of local optimal and precocious convergence, a control strategy based on improved genetic algorithm to optimize ADRC’s parameters is proposed to improve the genetic diversity in the population and enhance the adaptability of individuals to the environment, ITAE (Integral-of-Time-multiple Absolute Error) evaluation index is selected as the fitness value. Finally, the model of the control system is built according to the real aircraft. The application results prove that the altitude, attitude of the quadcopter are controlled stably, and it is verified that the control strategy based on the improved genetic algorithm optimizing ADRC has faster rapidity, stronger tracking performance, and robustness in altitude, attitude control of the quadcopter, which has greater practical application value.
Keywords
Introduction
Due to their low cost and high mobility, quadcopters have been widely used in many applications in recent years, such as radar localization, forest detection, geological exploration, search and rescue, aerial photography, and ground object tracking.1,2 The quadcopter flight control system acts as the vehicle’s control hub, because the airframe is nonlinear, strongly coupled, and under-driven, it is challenging to accurately mathematically model it and is susceptible to outside interference. 3 As a result, how to efficiently control and optimize the quadcopter’s design is a hot topic and challenging area of research in the current global multi-rotor flight control field. 4
At this stage, there are certain research results in the altitude, attitude control of quadcopters. For these circumstances, a cascaded PID controller is proposed to solve the given trajectory tracking task of the quadcopters. 5 Alkamachi and Erçelebi 6 considered both the fast response and stability of the system in the objective function, and used the genetic algorithm to optimize the parameters of the proposed cascaded PID controller, which proves the effectiveness of the proposed strategy in achieving the best performance in tracking error, settling time, and peak time. Sarhan and Qin 7 proposed a robust adaptive PID controller combining fuzzy method and neural network to improve the processing ability of external wind disturbances and quadcopters parametric uncertainty. The PID control strategy is to design the corresponding PID control strategy separately after independent multiple channels of the control system, which has the advantages of simple principle, mature control technology and easy to realize, but it has the shortcomings such as poor portability and weak stability, which leads to the difficulty of obtaining the ideal control effect of the quadrotor. The quadcopter controller based on Backstepping decomposes the system into subsystems that do not exceed the order of the system, and then designs the Lyapunov function for each subsystem to obtain the control rate, which has the advantages of low overshoot and fast adjustment. Liu et al. 8 proposed a robust cascaded trajectory tracking controller based on the backstepping method and robust compensation theory, which uses adaptive sliding mode control to deal with the time delay. The proposed control approach effectively reduces the influence of uncertainty disturbance and time delay. Vahdanipour and Khodabandeh 9 proposed a fractional sliding mode controller based on the backstepping method to attenuate the effects of wind disturbances and changes in load and inertial momentum. Zhang et al. 10 proposed a predictive sliding mode cascade control method to solve the modeling uncertainty and external disturbance problem of cross-domain motion of coaxial hybrid aerial underwater vehicle (HAUV). In addition, some scholars have focused on the fault-tolerant formation control of a group of quadrotors.11,12 A variety of control strategies for the flight motion system of quadrotors. Although the linear control strategies such as PID and LQR are simple, it is difficult to meet the requirements of interference sensitivity and non-equilibrium point stability, and the control effect is not good as expected. Dynamic inverse control and sliding mode control are nonlinear control strategies. Among them, the effect of dynamic inverse control is highly dependent on the mathematical model of the controlled object, and the adaptability to the uncertainty of the model parameters is poor. Although sliding mode control does not rely on accurate mathematical models, it can cause problems with the jitter of the system. 13 Therefore, for the flight motion control of quadrotors, it is necessary to adopt a control method that can effectively suppress uncertainty and external interference. ADRC controller is a robust control method for solving uncertainty, which estimates and compensates for external disturbance, is independent of the model of the controlled object, and is not sensitive to changes in system parameters. As one of the robust control methods used to address uncertainty, the ADRC was first proposed in 1998.14,15 Based on the disturbance observer, a boundary anti-disturbance control strategy was developed,16–18 which effectively suppressed the vibration and improved the accuracy of the manipulator system. To improve the immunity of the vehicle, scholars have started to use ADRC technique to design rotor controllers. Yang et al. 19 proposed a set of attitude solution algorithm based on ADRC control, which solves the strong coupling of the vehicle and the error problem generated by modeling, and has strong immunity and high control efficiency under the premise of fast response and no overshoot. Ahmed et al. 20 developed a quadcopter tracking control scheme combining standard sliding mode control and disturbance observer, which introduced a matrix related to disturbance in the system model, considered matching and mismatched disturbance, and effectively improved the anti-disturbance performance of the system. Wu et al. 21 proposed an ADRC control strategy based on PSO algorithm to solve the problem of difficulty in setting ADRC parameters. This strategy improves the disturbance rejection ability and the control accuracy of aircraft in dynamic environment. An ADRC parameter tuning method based on genetic algorithm is proposed22,23 and experimental results show that the strategy effectively improves the stability accuracy and robustness of the system in multi-source disturbance environment. In addition, Abadi et al. 24 designed a feedback controller in the ADRC controller to eliminate unknown external disturbances and ensure accurate trajectory tracking in the quadcopter system. In order to obtain the best control effect and solve the problem of difficult tuning, this paper proposes a strategy to improve the genetic algorithm to optimize the parameters of the ADRC controller, which not only improves the altitude, attitude control accuracy of the quadcopter, but also solves the problem that the traditional genetic algorithm is easy to fall into the local optimization.
Compared with the existing research results, the main contributions of this paper are threefold: (1) when the quadcopter encounters unknown disturbances during flight, the trajectory tracking performance is inaccurate. Therefore, we designed a second-order nonlinear ADRC controller. (2) In view of the difficulty of parameter tuning of the ADRC controller, we propose an improved genetic algorithm, which solves the problem that the traditional algorithm is easy to fall into local optimization and premature convergence to a certain extent, and can improve the control accuracy while improving the system immunity performance. (3) The ADRC strategy based on the improved genetic algorithm has been applied and verified in the tracking and disturbance rejection experiments of quadcopters, showing excellent tracking performance and disturbance rejection performance, which proves the effectiveness of the proposed strategy.
This article is organized as follows. In section 2, a dynamic model of the quadcopter is established. In section 3, a second-order nonlinear ADRC controller for altitude, attitude control of quadcopters is developed. In section 4, an improved genetic algorithm is proposed and applied to the parameter tuning of the ADRC controller. The application validation and discussion of ADRC control strategy based on improved genetic algorithm for quadcopters is carried out in section 5 followed by a conclusion in section 6.
Dynamic modeling
To realize the position attitude control of the quadcopter, it is necessary to establish the mathematical model for each flight state first. The quadcopter is a device with four independently controlled motors driving corresponding propellers to provide all the power of the vehicle, four rigid cantilevers and four propellers in a “Cruciform” or “X” shape. 5 In this paper, we choose the “Cruciform” structure to build the vehicle dynamics model. To facilitate the analysis of the attitude, position, velocity and acceleration of the quadrotor in space, the inertial OXYZ and airframe coordinate systems OBXBYBZB are established as shown in Figure 1.

Inertial coordinate system and airframe coordinate system: (a) inertial coordinate system and (b) airframe coordinate system.
The starting position of the quadcopter is the coordinate origin O of the inertial coordinate system, the pointing of the nose is the positive direction of the X-axis, the direction of the horizontal movement of the vehicle to the left is the positive direction of the Y-axis, and the vertical movement of the vehicle is the positive direction of the Z-axis; the body coordinate system OBXBYBZB is a coordinate system fixed on the body of the vehicle that remains unchanged: the direction from the center point to rotor 1 is the positive direction of the XB-axis, the direction from the center point to rotor 2 is the positive direction of the YB-axis, the positive direction of the ZB-axis is perpendicular to the OBXBYB plane and is determined by the right-hand rule. The spatial description of the three attitude angles determined in the airframe coordinate system is shown in Figure 2.

Schematic diagram of attitude angle and attitude motion: (a) rolling motion, (b) pitching motion, and (c) yawing motion.
The quadcopter is a 6-degree of freedom system with 4 inputs and 6 outputs. The inputs for a quadrotor are four rotor speeds, and the outputs are 3 attitude angles and 3 positions in 3D coordinate system. The motion of quadcopter includes: vertical flight, pitch, roll and yaw motion, according to the division of its motion, the corresponding four basic control methods are: vertical flight control, pitch control, roll control and yaw control.
Establishing a reasonably accurate dynamics model of the quadcopter is the primary prerequisite for the attitude control of the flight position. Therefore, it is usually necessary to make some reasonable assumptions about the vehicle: (1) the gravitational acceleration is constant during the flight and the four motors of the vehicle are identical; (2) the mass of the quadcopter remains constant during the flight; (3) the quadcopter is considered as a rigid body with constant size and shape during the motion and force; 4)the quadcopter is “dec” structure is absolutely symmetrical, the mass distribution is uniform, the center of gravity of the body and the far point of the body coordinate system coincide, and the center of mass is located in the center of the vehicle. Based on the above assumptions, the nonlinear dynamic model of the quadcopter is4,6:
Where:
Where:
ADRC controller
Controller structure
The control quantity of the second-order ADRC controller takes the form of u = (u0−z3)/b0. The controller input is v, the output is u, and the feedback is the controlled object output y. The tracking differentiator TD, the expansive state observer ESO, and the nonlinear state error feedback NLSEF are described in (3), (4), and (5). 22
In (3), the
Altitude – Attitude control
z,
Controller parameter setting
The adjustable parameters of the second-order tracking differentiator are the speed factor
ADRC controller based on improved genetic algorithm
ADRC controller based on genetic algorithm
Genetic algorithm (GA) originated from computer simulation studies on biological systems and is a stochastic global search and optimization method developed to mimic the evolutionary mechanisms of living organisms in nature. In this paper, a genetic algorithm is used to rectify
First of all, we have to determine the upper and lower limits of the parameters to be rectified, by the observer gain
Determining the fitness function, the comprehensive evaluation index of the controller’s rectification performance effect uses the time times absolute error integral ITAE index, and the form of the fitness function is:
The symbol

GA optimized ADRC block diagram.
The height, roll angle, pitch angle and yaw angle controllers are rectified respectively, all need to rectify 5 parameters, so the initialized population individuals are 5-dimensional, and the genetic algorithm model parameters are given below: the population size is 30, which is recorded as
Improved genetic algorithm
In the basic genetic algorithm, the population size and the number of evolutionary iterations set values to facilitate the calculation and obtain high-quality results in a short period of time, and if the population size and the number of iterations are dynamically changing, it may lead to a continuous expansion or contraction of the population, resulting in early convergence or falling into a local optimum.
Early convergence is the emergence of super individuals in the population early in the genetic algorithm, which refer to as “super babies” in this study. The fitness value of the super babies far exceeds the fitness value of other existing individuals in the population, which makes the superbaby find an absolute proportion in the population and always survive and even reproduce super or sub-super offspring after many iterations. Caught in the local optimum that is, if the population size is small, although a larger fitness individual is finally found, it is not the global optimal solution, which also makes the model not have the feature of searching for the global optimum.
The choice of crossover probability and genetic variation probability is crucial to the behavior and performance of the algorithm, which directly affects the convergence of the algorithm. If the crossover probability is too large, individuals with high fitness values will be easily destroyed, but too small will lead to slow population renewal and stagnation. The value of variation probability is also very delicate, taking too large a value, the genetic algorithm is not essentially different from the random search algorithm; on the contrary, taking too small a value, it is not easy to generate new individual institutions. Combined with the above mentioned analysis, this paper proposes a new parameter setting method that sets the genetic variation probability as a dynamic parameter, the higher the fitness of the individual, the higher the probability of genetic variation, and it is different from the genetic algorithm proposed 22 and the design scheme of the swarm optimization algorithms proposed.26,27
In theory, the higher the rate of variation, the higher the degree of adaptation, and the greater the coefficient of variation of an organism, the more genetic diversity it has and the more adaptable it is to its environment. The probability of genetic variation is
Application validation
The model parameters of the quadcopter in this study are shown in Table 1, and the structure of the control system model is shown in Figure 4.
Quadcopter parameters.

The structure diagram of the control system model.
In Figure 4, v-input is the set value, that is, the system input; u-output is the output of the controller; and y-fbk is the feedback of the system, that is, the output of the controlled object. The traditional genetic algorithm, the genetic algorithms proposed in different literatures, and the genetic algorithm proposed in this article are used to tunning the ADRC altitude, attitude controllers, respectively. The controller parameters for each channel under the four ADRC controller tunning strategies are shown in Tables 2 and 3.
Table of ADRC controller parameters for altitude and roll channels based on different genetic algorithms.
Table of ADRC controller parameters for PITCH and YAW channels based on different genetic algorithms.
In Table 5, GA-ADRC is the ADRC controller based on genetic algorithm. GA-ADRC-2222 and GA-ADRC-2626 are genetic algorithms proposed in literatures. IGA-ADRC is the ADRC controller based on improved genetic algorithm, and “I” is Improved.
In this work, the PID controller is used for comparison reference, and the time domain is:
Where
parameters of each channel PID controller.
Response experiment
The initial and expected values of attitude angle and altitude are 0 and 1, respectively. Figure 5 shows the step response curves under the PID control strategy and the four ADRC control strategies. The system response performance indicators are shown in Table 5. There are mainly overshoot

Response experiment curves.
Step response performance index of each channel under three control strategies.
The results are analyzed in conjunction with Figure 5 and Table 5. For altitude channel control of quadrotor, the overshoot under PID control is very large, and the long transition process time and peak time make the system response slow and unsatisfactory control. The fitness value performs poorly under GA-ADRC, and the analysis of the cause of this may be caused by falling into the local optimum. The system overshoots under the IGA-ADRC control strategy proposed in this article are both better than GA-ADRC and GA-ADRC-26, while slightly higher than GA-ADRC-22. However, the transition process time of the proposed strategy in this article is better than that of GA-ADRC-22. For roll channel control, the strategy proposed by GA-ADRC-22 exhibits superior system response speed, but the transition process time is longer. The strategy proposed in this paper also shows some fast system response capability.GA-ADRC-26 is slightly better than GA-ADRC. For pitch and yaw channel control, IGA-ADRC shows excellent response capability with zero overshoot and has shorter transition process time and peak time. Both GA-ADRC and GA-ADRC-22 have overshoots in yaw channel control, and the overshoot is smaller under GA-ADRC-22. Although GA-ADRC-22 and GA-ADRC-26 may perform better in one performance metric in the control of a particular channel, the IGA-ADRC strategy, which calculates the ITAE metrics for individual fitness, is considered globally and has a smaller
Altitude attitude tracking experiment
The initial values of altitude, traverse angle, pitch angle and yaw angle are set as

Tracking experiment curves.
From the application results, the tracking curve overshoot for attitude, altitude control of the quadcopter using ADRC controller is very small or basically no overshoot. In terms of altitude control, the transition time is greatly reduced by GA-ADRC compared with PID control, and the control effect is slightly improved by IGA-ADRC compared with GA-ADRC-22 and GA-ADRC-26. In terms of attitude control, the attitude tracking signal under PID control also has nearly zero overshoot, but the advantages of GA-ADRC-22 and GA-ADRC-26 in tracking rapidity are more obvious and IGA-ADRC is slightly improved. According to Figure 6, the roll and yaw channels need to controlled better controller parameters with the help of improved genetic algorithm to obtain better controller parameters. The improved genetic algorithm has more significant performance improvement compared to GA-ADRC, and IGA-ADRC has a slight improvement in rapidity compared to GA-ADRC-22 and GA-ADRC-26.
Disturbance rejection experiment
The quadcopter works in a complex environment where external disturbances are always present, including air resistance, free wind, etc. To simulate the actual operation of the quadrotor and to consider the sudden changes in external disturbances, the disturbance rejection experiments are conducted.
A square wave signal with amplitude 2, period 1 s, and duty cycle 50% is added before each channel, and the action starts at 1 s with an action time of 4 s. The attitude angle, initial value of altitude, and target expectation values of the quadrotor are as described in the response experiment. The system output curve results are as Figure 7.

Disturbance rejection experiment curves.
The disturbance rejection experiments show that the ADRC controller can reduce the effect of perturbations on the system to a very low range compared to the PID controller. In the altitude and pitch channels, IGA-ADRC and GA-ADRC-22 have very significant improvement in disturbance rejection performance compared to GA-ADRC and GA-ADRC-26, while IGA-ADRC has a more significant advantage. In addition, in the traverse and yaw channels, the ADRC control strategies of the two improved genetic algorithms are similar to the strategy proposed in this paper, without too significant improvement, instead, GA-ADRC performs less effectively in the yaw channel. However, if the external influence is large, it can be inferred that the ADRC controller with better parameters must have a greater advantage in disturbance rejection. The experimental results show that the IGA-ADRC has more superior disturbance rejection performance against external uncertainty perturbations. What makes ADRC more advantageous in the convenience of disturbance rejection performance is that the extended state observer of this controller has the ability of disturbance observation and compensation.
Conclusion
In this article, an altitude, attitude ADRC control strategy for a quadcopter is proposed. The ADRC controller is able to realize more accurate tracking. In addition, to address the problem that the ADRC controller has many parameters, which are difficult to be adjusted manually and difficult to get the optimal control effect, as well as the shortcomings of the traditional genetic algorithm in early convergence and falling into the problem of local optimization, an improved genetic algorithm-based method for adjusting the parameters of ADRC controller is proposed in order to improve the genetic diversity in the population and the adaptability of the individuals to the environment.
The experimental results show that the ADRC control strategy is able to realize the accurate control of the quadcopter, and although the ADRC controller has cumbersome parameter rectification, its ability to compensate for the perturbation is very outstanding, and it has superior robustness and control response compared with other control strategies or schemes. The improved genetic algorithm proposed in the article can effectively solve the problems of premature convergence and falling into local optimum. In addition, the control strategy is also verified in tracking and perturbation suppression experiments to have faster rapidity, stronger tracking performance and robustness in altitude, attitude control of quadrotor, validating the effectiveness of the proposed strategy. Our future work includes the development of machine learning or reinforcement learning schemes for the ADRC controller to maximize the adaptability of the system in complex environments, as well as the improvement of the internal modular structure of the second-order nonlinear ADRC controller to make it more robust and fast-response.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
Data availability statement
Data sharing not applicable to this article as no datasets were generated or analyzed during the current study.
