Abstract

The internal uncertainty and external disturbance of the quadrotor will have a significant impact on flight control. Therefore, to improve the control system’s dynamic performance and robustness, the attitude active disturbance rejection controller (ADRC) of the quadrotor is established. Simultaneously, an adaptive genetic algorithm-particle swarm optimization (AGA-PSO) is used to optimize the controller parameters to solve the problem that the controller parameters are difficult to tune. The performance of the proposed ADRC is compared with that of the sliding mode controller (SMC). The simulations revealed that the dynamic performance and robustness of the ADRC is better than that of the SMC.

1. Introduction

A quadrotor aircraft is a kind of multirotor helicopter which can realize vertical take-off and landing. It can complete the mission in various harsh environments and is widely used in military and civil fields. With the increase of application fields, the requirements for quadrotor aircraft’s actual control effect are higher and higher. There are always internal uncertainty (unmodeled dynamic or parameter uncertainty) and external uncertainty (unknown disturbance of external environment) in quadrotor aircraft, which will lead to a large error between the mathematical model and the actual flight, so the accuracy of attitude control cannot be guaranteed in the real plane, which makes the design of flight controllers more difficult. Early researchers used the Proportional Integral Differential (PID) algorithm to design the flight control system of quadrotor aircraft [13]. The structure is simple and easy to implement, but the antidisturbance ability is weak, and the control effect is general. Researchers have recently turned their attention to intelligent control, such as the fuzzy control [46] and neural network [79]. Although good results have been achieved, it still has the disadvantages of weak robustness and difficulty in improving system performance.

Active disturbance rejection control (ADRC) [1014] is a new control technology that does not depend on the system model. It can estimate and compensate for the sum disturbance caused by various external disturbances and internal disturbances determined by the system’s mechanism in real time. Combined with the exceptional nonlinear state error feedback, excellent control quality can be obtained. ADRC has small overshoot characteristics, fast response speed, high control precision, strong antidisturbance ability, and simple structure [15, 16]. Reference [17] designed an ADRC based on an improved extended state observer for multiple-input multiple-output systems and achieved good control results. Reference [18] designed four improved ADRC for the nonlinear model of a 6-DOF quadrotor system for height and attitude stabilization and compared the PID controller’s performance. The simulation results showed that the improved ADRC is stable and can offset external disturbance and system uncertainty, which is better than the PID controller.

The defect of ADRC is that there are many controller parameters, so it is difficult to tune the controller parameters. The particle swarm optimization (PSO) algorithm is widely used in the optimization of controller parameters. This method integrates the idea of “individual learning” by simulating the foraging activities of natural creatures. The algorithm is simple and has a memory function, and it also has the characteristics of rapid convergence [1921]. Reference [22] used the PSO algorithm to optimize the parameters of the ADRC and achieved good results. However, the PSO algorithm’s global search ability is low, the search accuracy is not high, and it is easy to fall into the optimal local solution [23]. The genetic algorithm (GA) is a natural optimization algorithm with a diverse population and strong global search ability [24]. Reference [25] used GA to optimize the ADRC’s parameters and achieved good results. Because of this, this paper proposes an adaptive genetic algorithm-particle swarm optimization (AGA-PSO), which combines the excellent global search ability of AGA to avoid particles falling into the local extremum prematurely, thus increasing the rate of obtaining optimal global solution and accelerating the convergence speed of the algorithm.

Aiming at the quadrotor’s attitude control problem, this paper designs an ADRC strategy by analyzing the mathematical model of the quadrotor and considering the uncertain internal disturbance and external disturbance of the system. Aiming at the problem that the ADRC’s parameters are difficult to tune, a parameter tuning method of the ADRC based on the AGA-PSO hybrid optimization algorithm is designed. Its effect is verified through simulation experiments. Finally, the quadrotor’s attitude control with disturbance is simulated, which demonstrates the robustness and antidisturbance of the ADRC.

2. ADRC for Quadrotor Attitude Control

2.1. Flight Dynamic Model

The quadrotor model shown in Figure 1 is a typical nonlinear controlled plant. Four-rotor systems generate control forces and control moments and form attitude motion under control forces and control moments. Therefore, the controlled plant of the quadrotor is a multiple-input multiple-output nonlinear system. The specific parameters of the quadrotor are shown in Table 1. The figure shows two sets of coordinate systems, namely, the North-East-Earth navigation coordinate system (indicated by , the origin is at the take-off point, the coordinate axis points north, points east, and is perpendicular to the ground down) and the aircraft body coordinate system (represented by , the origin is at the center of mass of the body, the coordinate axis is parallel to the plane of the paddle and points forward, is parallel to the plane of the paddle and points to the right, and is perpendicular to the plane of the paddle and points downward).

Assuming that the quadrotor is a uniformly symmetrical rigid body, and ignoring factors such as the rotor gyro effect, References [26, 27] obtain the quadrotor attitude mathematical model as follows. where , , and are the yaw angle, pitch angle, and roll angle, respectively; , , , and are the voltage of the 4 rotor motors; is the distance from the rotor axis to the center of mass of the quadrotor; , , and are the moment of inertia of the pitch, roll, and yaw axes, respectively; is the propeller lift coefficient; is the clockwise torque coefficient of the rotor; and is the counterclockwise torque coefficient of the rotor.

The attitude angle dynamic equations are second-order nonlinear coupled equations, so that the unknown nonlinear function of each attitude angle dynamic equation is the unknown disturbance quantity is , , and , and the virtual control quantity is recorded as ; then, the three-axis attitude angle dynamic equation is expressed as and the dynamic coupling of the internal and external disturbances is estimated by ESO through state expansion and is dynamically compensated as the feedback signal of the control law. The system becomes a linear integrator series control system. The system output after dynamic compensation linearization is .

The actual control quantity of the four motors of the quadrotor is obtained by transforming the virtual control quantity, namely,

2.2. ADRC Features

ADRC consists of the tracking differentiator (TD), extended state observer (ESO), and state error nonlinear control law (SENCL), as shown in Figure 2. TD is used to quickly obtain the tracking signal and its derivative signal of the input signal. ESO estimates the extended state formed by the state quantity, internal uncertainty, and external disturbances. Then, the nonlinear combination of the state quantity’s error is used as the control quantity of the system to realize the effective control of the quadrotor.

2.2.1. TD

Taking the second-order system as an example, a discrete form of the nonlinear tracking differentiator is designed as follows:

The output state variable is the fast tracking signal of the input signal , and the state variable is its differential signal. It not only overcomes the influence of noise signal amplification but also eliminates the phenomenon of origin flutter. In the formula, is expressed as the -th moment of signal sampling, is the discrete sampling time step, is the speed factor, and the and parameters are adjustable, which determine the speed of the output signal tracking.

2.2.2. Simulation Verification of TD

Given the input signal , as shown in Figure 3, the discrete sampling period is , the velocity factor is , and the noise signal is the random white noise of amplitude 2.

When a classic differentiator implemented with a short time constant inertia link performs signal differentiation processing, the differentiator’s signal amplification effect is noticeable. Equation (15) is the classic differentiator processing formula.

Record the output of the second inertia link as ; then, when the input signal changes slowly and the time constant is small, there is

Obviously, the smaller the time constant , the closer the output is to the derivative .

The tracking signal and differential signal simulation results of the classical differentiator and tracking differentiator are shown in Figure 4. The noise amplification effect of the products shown in Figure 4(a) is noticeable. As shown in Figure 4(b), the noise suppression effect of the results is noticeable.

2.2.3. ESO

Suppose the nonlinear uncertain plant with external disturbance is

Let be the new expanded state variable, and contains its own uncertainties and external disturbances; let , and the system (17) expands into a new control system, namely, where and are the input and output signals of the system; is the unknown nonlinear system function; is the disturbance; and represent the corresponding derivative of ; and is the compensation coefficient.

Design the following ESO for the extended system (18) of the system (17). where (), () is the gain coefficient, is the step size, and is the saturation nonlinear function; the output variable of ESO (19) can track the state variable of the system (18), namely,

The estimated value of the expanded state variable is used as a compensation value for the unknown plant and external disturbance, which linearizes the controlled system and can effectively suppress the interference signal in the state variable.

The control signal of the system (17) is designed as ; then,

Under the extended state estimation value compensation, the system becomes linear controlled plants, namely, that is, the dynamic compensation linearization processing of the nonlinear controlled plant.

The essence of the system (18) is to regard the series part of the system (17) which is different from the standard integral series type as the total disturbance (including internal disturbance and external disturbance). ESO estimates the total disturbance by using the input and output information of the system and compensates for the total disturbance by designing a control law, thus transforming the system into a standard integral series structure.

2.2.4. SENCL

Taking the second-order system as an example, a SENCL algorithm using a combination of functions is where and are the tracking signal and differential signal of TD, respectively; and are the adjustable control gain; and function can effectively suppress the occurrence of signal chattering and has a good signal filtering effect.

2.2.5. ADRC Simulation Verification Example

Given the second-order controlled plant system model, where represents an unknown function, represents a disturbance, and .

After discretizing the abovementioned continuous domain controlled plant, simulation is performed with a square wave signal with an amplitude of 2. TD is designed according to Section 2.2.1, ESO is designed according to Section 2.2.3, and SENCL is designed according to Section 2.2.4; the relevant parameters are shown in Table 2.

The simulation results are shown in Figure 5. , , and are the state estimates of ESO that respond to the process curve; , , and are the response curves of the system (25) state variables and expansion state. It can be seen from the figure that the output estimation value of ESO can track the state variables of the system well, including the extended state variables of the internal disturbance and external disturbance of the system.

Figure 6 shows the results of the square wave input control response under the action of SENCL, including the white noise to measure the interference signal. It can be seen that the control has no overshoot and can quickly enter a stable state, indicating that the controller has strong robustness.

3. Controller Parameter Tuning

3.1. Parameter Tuning Principle

Different parameters have different effects on the performance of the ADRC. Table 3 lists the parameters and functions of the ADRC that need to be tuned. It can be seen that the ADRC needs to tune 9 parameters, of which and are predetermined according to the characteristics of the controlled plant and do not need to be changed within a certain range. For this reason, the following AGA-PSO algorithm only sets 7 parameters.

3.2. AGA-PSO

The core idea of the AGA-PSO algorithm is to use the PSO algorithm to quickly find the neighborhood of the global optimal solution to form a new population, in which the AGA is used to obtain the optimal global solution. Its advantage is to avoid the blindness of the initial stage of the AGA and shorten the global convergence time. The advantages of the two algorithms complement each other to achieve rapid acquisition of the optimal global solution. Figure 7 shows the relationship between the two algorithms.

Suppose that a population is composed of particles, a single particle is composed of a -dimensional space, and its position and velocity are described as

The particle velocity determines the search direction of the particle, and the position of each particle is a potential solution to the target problem. The optimal position found by a single particle individual is the individual optimal, denoted as

The optimal position found by all the particles in the population is the global optimal, denoted as

The particle individual optimization search velocity and position update formulas are where and are random numbers between , and are learning factors, is the inertia weight, is the particle velocity, and is the particle position.

Inertia weight determines the influence of the previous velocity on the current velocity. A large is good for the particles to jump out of the optimal local solution, which is suitable for global search, and a small is good for accurate local search. Taking into account the convergence of the algorithm and the balance between the algorithm’s global search and local improvement, the following nonlinear adaptive law is used to modify the inertia weight coefficient, namely, where and are the minimum and maximum values of , respectively; is the current fitness of particles; and are the average fitness and minimum fitness of all particles, respectively. The integral time absolute error (ITAE) criterion is used to calculate the particle fitness of a single control loop. where is the absolute value of the difference between the input and the actual output of the control system. The smaller the fitness value is, the better the solution is. The fitness calculation formula of the whole control system is where is the number of channels in the control system and represents the channel input signal, so as to ensure that the influence weight of each channel error on the fitness value is the same, that is, normalization processing.

The process of the PSO algorithm is as follows: (1)The particle swarm is randomly initialized, including the number of particles and the position and velocity of each particle. The dimension of each particle depends on the number of parameters of the ADRC. The position of each particle in the particle swarm is the potential solution of the controller parameters(2)The particle position as a potential solution is substituted into the ADRC system for control simulation, and the fitness of each solution is calculated(3)The velocity and position of particles are updated iteratively according to formulas (30) and (31)(4)Analyze and determine the optimal solution of the current individual particle and the optimal global solution of the particle swarm, and update and (5)Judge whether it has reached the number of iteration steps; if it is satisfied, output the final and the corresponding fitness value, jump out of this algorithm, and enter the subsequent process; otherwise, return to (2)

The parameters of the ADRC obtain the global optimal neighborhood solution through the PSO algorithm. Then, through the iterative operation of selection, crossover, and mutation of the AGA, the target problem gradually approaches the optimal global. The process is as follows: (1)Coding. Use real number codes to initialize population genes.(2)Selection. Take out a certain number of individuals from the population, select them according to their fitness, and enter the progeny population to reproduce until the new population size is the same as the original population size.(3)Crossover. As a core operation of the genetic algorithm, new individuals can be obtained, that is, new possible solutions. If the crossover probability is too large, the randomness of the algorithm is too strong, and the convergence speed of the algorithm is too slow to effectively suppress premature maturity. The adaptive crossover probability operation as shown below will benefit parameter optimization:where is the larger fitness of the cross individuals; is the average fitness of the population; and generally, and .

Randomly select two chromosomes from the population for crossover. First, determine the crossover probability by formula (35) and then generate a random number in the range . When the random number is more significant than , use the arithmetic crossover to develop a new chromosome. Otherwise, no crossover will be formed. The specific operation of the cross is as follows: where is the chromosome before crossing, is the chromosome after crossing, and is a constant. When two chromosomes are crossed, two chromosomes are randomly selected for crossover operation again until the crossing times reach the set number. (4)Mutation. As another core operation of the genetic algorithm, it can also obtain new individuals, that is, new possible solutions. If the mutation probability is too large, it will weaken the inheritance of excellent genes. If it is too small, it will easily fall into the local optimum, which cannot optimize the parameters. The following adaptive mutation probability operation is beneficial to parameter optimization:where is the fitness of the variant individual; is the maximum fitness of the population; and generally, and .

A chromosome is randomly selected from the population to mutate. Firstly, the mutation probability is determined by formula (39), and then a random number in the range of is generated. When the random number is greater than , the polynomial mutation method is used to mutate; otherwise, no mutation will be carried out. The specific operation of mutation is as follows: where is the quasimutated gene, is the mutated gene, is a random number between , is the distribution index, and is the maximum allowable disturbance range. After the chromosome mutation is completed, a chromosome is randomly selected for mutation operation again until the mutation number reaches the set number.

In summary, the schematic diagram of the combination of the AGA-PSO algorithm and the ADRC system is shown in Figure 8. The flow of the AGA-PSO algorithm is shown in Figure 9. The process is as follows: (1)Initialize the AGA-PSO algorithm parameters, including , , , and of PSO, maximum evolution algebra NG, and other parameters(2)Generate a population randomly and then enter the PSO algorithm flow(3)Judge whether the solution result of the PSO algorithm has reached the global optimal solution condition (the minimum fitness value is less than the set value). If the result is satisfied, the result will be directly output as the controller optimization parameter. Otherwise, the global optimal neighborhood solution obtained by the PSO algorithm will be substituted into the AGA for encoding, selecting, crossover, and mutation operations to seek the optimal global solution(4)Individuals of the new population enter the ADRC system simulation and calculate the fitness value to determine whether the number of iteration steps is reached (the minimum population fitness is less than the set value, or the number of iteration steps is reached). Then, it is determined whether the termination condition is met (the minimum population fitness is less than the set value). If it is satisfied, the optimization result will be output, and the controller optimization parameters will be obtained. Otherwise, it will return to the PSO algorithm flow

3.3. AGA-PSO Algorithm Verification

Figure 10 shows the control structure block diagram of the three-axis attitude ADRC, which is composed of three control loops: yaw angle, pitch angle, and roll angle.

Each attitude loop needs to tune 7 parameters, and three loops need to tune a total of 21 parameters. The specific parameters of AGA-PSO and PSO are shown in Table 4. Given a step and square wave signal with an amplitude of 5°, Figures 11 and 12 show the attitude response and convergence curves of the unoptimized PSO and AGA-PSO algorithms, respectively. It can be seen that the AGA-PSO algorithm has a shorter adjustment time for the three attitude loops than the PSO algorithm, and the overshoot is smaller, indicating that the AGA-PSO algorithm is feasible.

4. Simulation Verification of Attitude Control

The initial condition of simulation is as follows: set the yaw angle, pitch angle, and roll angle as 3°, and the simulation time is 30 s. The expected input of each loop is a square wave signal with an amplitude of 3°. The sliding mode controller (SMC) and the ADRC with the same control structure are selected. The AGA-PSO algorithm tuning ADRC parameters is shown in Table 5. The SMC is designed according to the literature [28], and the specific parameters are shown in Table 5.

Figure 13 shows the simulation results of the ADRC and SMC attitude angle control loops. It can be seen that the ADRC can track the set values of the three attitude loops more quickly without evident overshoot and steady-state error, which indicates that the ADRC attitude loop has better system performance.

To verify the ability of ADRC to overcome the model uncertainty (internal uncertainty), the ADRC and SMC parameters shown in Table 5 are kept unchanged, while the model parameter values are reduced by about 20%, as shown in Table 6. The simulation result is shown in Figure 14. It can be seen that the control performance of ADRC has little change, while the control performance of SMC has dropped sharply, and the three attitude angles can no longer be effectively controlled. This experiment shows that even if the internal parameters of the quadrotor change greatly, the ADRC can still maintain stable control performance.

In order to verify the resistance of ADRC to external disturbances, a step signal with an amplitude of 4° is given and a white noise with a peak value of 3° is added as an external disturbance in the attitude loops. The ADRC and SMC parameters are shown in Table 7. The simulation results shown in Figure 15 are obtained. It can be seen that the SMC has obvious oscillation in three attitude loops. However, the ADRC still keeps a good control effect, which shows that the ADRC designed in this paper has good response ability of tracking step input, and the control system also has better antidisturbance performance.

5. Conclusion

In this paper, the ADRC for attitude loops is designed by analyzing the quadrotor’s dynamic attitude model. At the same time, the AGA-PSO algorithm is used to optimize the parameters of ADRC. Finally, the simulation results show the following: (1)The AGA-PSO algorithm combines the global convergence of the AGA and the fast convergence of the PSO algorithm. Compared with the unmodified PSO algorithm, the AGA-PSO algorithm’s performance is much improved, and a better controller parameter optimization effect is achieved(2)Each loop of ADRC has better dynamic tracking performance, small steady-state error, short adjustment time, strong disturbance rejection, and better robustness than that of SMC(3)The ADRC can effectively suppress disturbance by observing and compensating the internal uncertainty and external disturbance of the system

Data Availability

The data is simulated by MATLAB. All of the used data can be verified and replicated by reading the manuscript and simulation.

Conflicts of Interest

The authors declare that there is no conflict of interest regarding the publication of this paper.

Acknowledgments

This work was supported by the National Key Laboratory of Rotorcraft Aeromechanics Fund Program of China (9140C400504130C4148) and supported by the Priority Academic Program Development of Jiangsu Higher Education Institutions of China.