Open Access Paper
28 December 2022 Fractional order PID control of quadrotor UAV based on SA-PSO algorithm
Keyong Shao, Jiaxin Liu, Mingxue Li
Author Affiliations +
Proceedings Volume 12506, Third International Conference on Computer Science and Communication Technology (ICCSCT 2022); 125060C (2022) https://doi.org/10.1117/12.2662180
Event: International Conference on Computer Science and Communication Technology (ICCSCT 2022), 2022, Beijing, China
Abstract
The stability control of quadrotor UAV system is a challenging problem due to its nonlinearity, strong coupling and underactuation characteristics. In this paper, a fractional order PID control strategy (FOPID) is proposed to realize the high-precision control of UAV system by utilizing the multi-degree of freedom characteristic of FOPID, SA-PSO is used to tune the parameters of FOPID. Compared with the standard PSO optimization process, the convergence speed is faster and the accuracy is higher. Simulation results show that the proposed PSO parameter optimization based on SA algorithm makes FOPID controller have better performance than traditional integer order PID controller.

1.

INTRODUCTION

Quadrotor unmanned aerial vehicle (UAV) carries an important role in the field of military and civilian drone, which has become the most commonly used type of multi-rotor UAV because of its strong stability, high maneuverability, small size, portability and other characteristics, quadrotor UAV has a complex dynamics model with six degrees of freedom and four control variables. It is also a nonlinear control system with strong coupling and underactuation, so it is particularly important to realize its stability control.

At present, various control methods can realize the stability control of quadrotor UAV, the most commonly used is the classical PID control, PID attitude controller is designed in Reference1, and the IAE index is used to optimize the controller parameters. As for aspect of controller parameters optimization, the control effects of PID, LQR, LQR-PID and other controllers on the height subsystem are compared in Reference2, there are also control schemes combined nonlinear control and PID control. The parameters of PID controller are tuned by fuzzy controller in Reference3, which has superior dynamic performance of system. A method based on combination of RBF neural network and PID control is proposed in Reference4, which has become an extension of PID controller design and achieved good control effects.

Podlubny5 proposed a fractional order PID controller (FOPID) in 1999. Compared with integer order PID controller, FOPID controller has two extra adjustable parameters, which makes the system more superior6,7. The fractional control system has achieved good results in the control of subway trains and the adjustment control of water wheels, so it has also been applied to the control of UAV8,9. A fractional order PID controller was designed in Reference10, which applied to the trajectory tracking of quadrotor UAV, and the performance of the controller was verified. Parameter tuning of fractional order PID controller is relatively difficult due to the large number of designed parameters, which needs optimization algorithm to optimize. The stability control of quadrotor UAV is achieved by using genetic algorithm to tune fractional order PID parameters in Reference11. NSGA algorithm was used to tune FOPID parameters in Reference12, which also achieved good control of quadrotor UAV.

In this paper, particle swarm optimization (PSO) with simple structure and easy expression is combined with simulated annealing algorithm (SA) with strong local search ability to optimize FOPID parameters, and achieve better control of the quadrotor UAV system further.

2.

PROBLEM DESCRIPTION

2.1

Dynamics model of quadrotor UAV

The dynamics model of quadrotor UAV12 is established in the following equation:

00042_PSISDG12506_125060C_page_2_1.jpg
00042_PSISDG12506_125060C_page_2_2.jpg

In the last equation, x, y, z represent the spatial coordinates of the three directions of the quadrotor; φ, θ, ψ represent pitch, roll, yaw three attitude angles; m is the total mass of the quadrotor body, Ix, Iy, Iz are moment of inertia of the body rotating about the x, y, z axis; d is the distance between the quadrotor body’s center of mass and its rotor axis; g is the acceleration of gravity at the earth’s surface; U1, U2, U3, U4are virtual control quantity in the control process.

2.2

Fractional order PID controller

The definition of fractional derivative mainly has two following formations.

The fractional derivative of Caputo13 is defined as:

00042_PSISDG12506_125060C_page_2_3.jpg

where α is the fractional order, n – 1 ≤ α < n, n 𝜖 N. Г(nα)is Gamma function.

The fractional integral of Riemann-Liouville13 is defined as:

00042_PSISDG12506_125060C_page_2_4.jpg

where α is the fractional order, 0 ≤ α < 1.

The calculation of fractional calculus has the following properties:

00042_PSISDG12506_125060C_page_2_5.jpg

In 1999, Podlubny proposed a fractional order PID controller (FOPID) in the form of ΡΙλDμ. The transfer function has the following form:

00042_PSISDG12506_125060C_page_2_6.jpg

where Kp is proportional gain, Ki is the integral gain, Kd is differential gain, λ is the order of integration, μ is the differential order, and 0 ≤ λ, μ ≤ 2. When λ, μ are both 1, equation is the traditional integer order PID controller. The structure of FOPID controller and integer order PID controller is roughly the same, but the introduction of λ, μ adds two adjustable parameters, which makes the controller design more flexible and has better system performance.

Based on the advantages of fractional order PID with multiple degrees of freedom and the nonlinear and strong coupling characteristics of quadrotor UAV system, the fractional order PID control strategy above is adopted to achieve more accurate and more stable control.

3.

CONTROLLER DESIGN

In this paper, the fractional order PID double closed-loop structure is used to control the quadrotor UAV, the inner ring is attitude ring, and the outer ring is position ring. According to the dynamic model of quadrotor UAV established in Section 1, the expected values of three directions and three attitude angles of spatial coordinates are given, at the same time, four virtual control variables U1, U2, U3, U4are introduced to jointly control the position and attitude of UAV system, as shown in Figure 1.

Figure 1.

Control block diagram.

00042_PSISDG12506_125060C_page_3_1.jpg

3.1

Position controller design

From equation (1) we can observe that the position subsystem is an underactuation system with output of x, y, z, a virtual control quantity U1is used to control the position quantity in three directions, in order to control the underactuation system at this position, control quantities ux, uy, uz, in three directions of the position are defined, as shown in equation (7):

00042_PSISDG12506_125060C_page_3_2.jpg

The expected values given in three directions are xd, yd, zd respectively, the position tracking error in the three directions is set as:

00042_PSISDG12506_125060C_page_3_3.jpg

Therefore, the design of location subsystem FOPID is as follows:

00042_PSISDG12506_125060C_page_3_4.jpg

where, Kp, Ki, Kd are proportional coefficient, integral coefficient and differential coefficient of the FOPID controller of the position subsystem, λ is the order of integration, μ is the differential order.

3.2

Attitude controller design

It can be easily concluded from equation (2) that the expected input of the attitude controller of the inner ring is determined by the output of the position controller, the output of the position controller is the position control quantity ux, uy, uzin the three directions set in the previous section. Where the expected value of yaw angle 𝜓d is given directly from the outside, therefore, the expected values of roll angle and pitch angle can be calculated from position control quantities ux, uy, uz,which is given by equation (1):

00042_PSISDG12506_125060C_page_4_1.jpg

The tracking errors of the three attitude angles are as follows:

00042_PSISDG12506_125060C_page_4_2.jpg

Therefore, the attitude subsystem FOPID controller is designed as:

00042_PSISDG12506_125060C_page_4_3.jpg

where Kp, Ki, Kd are proportional coefficient, integration coefficient, differential coefficient of attitude subsystem FOPID controller, λ is the order of integration, μ is the order of differential.

3.3

The tuning of FOPID parameters

Due to huge amount of FOPID controller parameters, the selection of controller parameters directly affects the control effect. If the trial-and-error method is used to select FOPID controller parameters, it has great limitations and precision control is difficult. Therefore, it is particularly important to select an appropriate intelligent optimization algorithm for parameter tuning. Particle swarm optimization (PSO) algorithm is a commonly used optimization algorithm. It simulates the biological mechanism of nature and uses each individual in the population to cooperate with each other to search for the best solution. Compared with genetic algorithm (GA), PSO algorithm has no complex operations such as crossover and variation, and is easier to express and implement.

For the quadrotor UAV control system in this paper, the specific implementation steps of the algorithm are as follows:

  • (1) Initialization of PSO algorithm

    Algorithm parameters are set, including the number of individuals in the population, iteration times, learning factors, etc.

  • (2) Selection of the fitness function and calculate the fitness of each particle

    For the quadrotor UAV system in this paper, the requirements of small overshoot and short response time should be met. The following adaptive value function is selected:

    00042_PSISDG12506_125060C_page_4_4.jpg

    where a, b represent the controller’s emphasis on tracking error and response time respectively, and 0 < a, b < 1, J is adaptive value, for e(t) and tr, taking the height subsystem as an example, in the above formula, e(t) is the height system deviation, tr is the rise time, u(t) is the controller output of the height subsystem, which is:

    00042_PSISDG12506_125060C_page_5_1.jpg

    where Kp, Ki, Kd, λ, μ are the proportional coefficient, integral coefficient, differential coefficient, integral order and differential order to be optimized in FOPID controller respectively.

  • (3) Comparison of the fitness calculated in the previous step and selection of the local and global optimal values of the particle

  • (4) Update of the velocity and position of particles

    The velocity and position of the particle are updated by the following formula:

    00042_PSISDG12506_125060C_page_5_2.jpg
    00042_PSISDG12506_125060C_page_5_3.jpg

    where w, c are inertia weight and learning factor respectively, r is the random number between 0 to 1, v, x represent the velocity and position of the particle respectively, P, G respectively represent the optimal location of a single particle and the entire particle swarm, which are local optimal value and the global optimal value found in the search process up to now.

  • (5) Calculation and optimization of performance indicators

    This paper adopts Matlab script file and Simulink parallel simulation method to optimize the FOPID controller of the quadrotor UAV system, which improves the simulation efficiency of the system.

    The parameters Kp, Ki, Kd, λ, μ of FOPID controller are assigned by the particle in sequence, run the Simulink model in batches to obtain the performance indicators corresponding to the control parameters of this group, and judge whether the performance indicators meet the end condition of the algorithm (reaching the maximum number of iterations), if the conditions are met, exit; Otherwise, return to Step (2) for the next loop.

    In the standard PSO above, as a result of the movement of each particle in the particle swarm is not selective, makes the particle fitness function value of the next position is very poor, and in the later operation, the particle diversity decreased, easy to fall into local optimum and slow down the convergence speed, which shows that the PSO algorithm in local search ability is poor. If the PSO algorithm combined with simulated annealing (SA) algorithm, each particle has a high probability to accept the non-optimal solution when the initial temperature is high under the algorithm, lead to jump out of local optimal solution, and converge to the global optimal later at lower temperature, accurately locate the global optimal solution, which greatly improved the local optimization ability of the standard PSO algorithm, it has better optimization effect.

Based on the above ideas, the simulated annealing strategy and compression factor are added on the basis of the standard PSO algorithm. The main steps are as follows:

  • (1) The position of a particle in a particle swarm is randomly initialized, and the fitness value of each particle is calculated.

  • (2) The initial temperature T0 is set.

    00042_PSISDG12506_125060C_page_5_4.jpg

  • (3) The probability value of each particle at the current temperature is calculated by using the Metropolis criterion.

    00042_PSISDG12506_125060C_page_5_5.jpg

    where pi is the local optimal value, pg is the global optimal value, N is the number of population, the t is current temperature.

  • (4) A global optimal alternative value from all particles is determined by using the roulette strategy, and then the velocity and position of each particle is updated. The updated velocity and position are calculated by the following formula:

    00042_PSISDG12506_125060C_page_6_1.jpg
    00042_PSISDG12506_125060C_page_6_2.jpg

    The specific meaning of each quantity in the above formula has been given in the steps of the above standard PSO algorithm.

  • (5) The fitness value of the updated particle is calculated.

  • (6) Temperature reduction operation is carried out, T = 0.9 * T0.

  • (7) We determine whether the algorithm stop condition is met, if the conditions are met, the search ends and Kp, Ki, Kd, λ, μ are output, otherwise we proceed to Step (4).

4.

SIMULATION ANALYSIS

The basic parameters of quadrotor UAV are set as follows: Ix, Iy, Iz are 0.1745, 0.1745, 0.3175, total fuselage mass m is 1.5, d is 0.225. In order to verify the superiority of the FOPID control strategy and the optimization algorithm in the stability control of the quadrotor UAV, Simulink simulation experiments are conducted on the above basic parameters.

4.1

Standard PSO algorithm

The initial parameters of particle swarm optimization are as follows: Number of populations N is 100, the spatial dimension d is 5, maximum iteration M is 100, self-learning factor c1 is 1.5, group learning factor c2is 1.5, for a, b in the fitness function, considering that quadrotor UAV should not only ensure small tracking error, but also ensure small control energy and fast response speed in the realistic flight process, the weight of tracking error a and rise time b are respectively 0.6 and 0.4, and c is 0.5. The reference values of both horizontal and vertical directions are 5. Running the algorithm, the obtained IOPID parameters and FOPID parameters are shown in Table 1, and simulation results are shown in Figures 2-5.

Figure 2.

Convergence process.

00042_PSISDG12506_125060C_page_7_1.jpg

Figure 3.

Horizontal response curve.

00042_PSISDG12506_125060C_page_7_2.jpg

Figure 4.

Vertical response curve.

00042_PSISDG12506_125060C_page_7_3.jpg

Figure 5.

Loop tracking.

00042_PSISDG12506_125060C_page_7_4.jpg

Table 1.

IOPID and FOPID parameters based on PSO tuning.

ControllerSubsystemKpKiKdλμ
IOPIDHorizontal0.05320.00690.3202**
Vertical0.05060.00320.3301**
FOPIDHorizontal0.08420.00590.50830.21470.8613
Vertical2.20150.00533.50270.18560.9261

Note: “*” means no value.

Figure 2 is the PSO optimization convergence process curve, and from the figure it can be seen that the algorithm completes convergence during the 46th iteration. Figure 3 is the horizontal response process of the quadrotor UAV, the dotted line is the traditional integer order PID control, and the solid line is the fractional order PID control. It can be seen from the response curve that the quadrotor UAV controlled by the integer order PID has a large overshoot obviously in the horizontal control. However, the quadrotor UAV system controlled by fractional order PID has an obvious improvement in overshoot. In the vertical direction, FOPID is superior to IOPID in response speed, as shown in Figure 4. Figure 5 shows threedimensional annular trajectory tracking, indicating that the quadrotor UAV system controlled by FOPID can complete the trajectory tracking test stably and has better control effect than the traditional integer order PID.

4.2

SA-PSO algorithm

According to the algorithm combined with the strategy in Section 3, running the SA-PSO algorithm, the new FOPID parameters obtained are shown in Table 2. The system is simulated again, and the convergence process and simulation results are shown in Figures 6-9 by compared with FOPID control optimized by standard PSO in Section 4.1.

Figure 6.

Convergence process.

00042_PSISDG12506_125060C_page_8_1.jpg

Figure 7.

Horizontal response curve.

00042_PSISDG12506_125060C_page_8_2.jpg

Figure 8.

Vertical response curve.

00042_PSISDG12506_125060C_page_8_3.jpg

Figure 9.

Loop tracking.

00042_PSISDG12506_125060C_page_8_4.jpg

Table 2.

FOPID parameters based on SA-PSO tuning.

ControllerSubsystemKpKiKdλμ
SA-PSO-FOPIDHorizontal3.34890.00543.25960.24360.8505
Vertical3.62720.00863.56980.15360.9372

The simulation image show that the PSO based on simulated annealing algorithm greatly reduces the convergence time, and the accuracy is better, specifically embodies in quadrotor UAV system improved the response speed further under the condition of less overshoot, and improved the dynamic performance of the system again, so the simulated annealing PSO in the field of quadrotor UAV system control is worthy of application.

5.

CONCLUSION

In this paper, the dynamic model of the quadrotor UAV is firstly calculated according to the Kinematic law, and the fractional PID algorithm is proposed to control the quadrotor UAV system. Since the introduction of calculus order increased controller parameters, which is difficult to tune, the PSO algorithm is adopted to tune parameters in this paper. The results show that the fractional order PID has better control effect on quadrotor UAV than the traditional integer order PID. However, due to the limited advantages of the standard PSO algorithm, it is easy to fall into the local optimal solution in the process of optimization, and the convergence speed is slow. Therefore, the effective combination of simulated annealing algorithm and PSO greatly improves the efficiency of the algorithm, and the precision of parameter tuning is improved to a certain extent, which has better control effect of the quadrotor UAV system.

REFERENCES

[1] 

Bolandi, H., Rezaei, M. and Mohsenopour, R., “Attitude control of a quadrotor with optimized PID controller,” Intelligent Control and Automation, 4 (3), 342 –349 (2013). https://doi.org/10.4236/ica.2013.43040 Google Scholar

[2] 

Argentim, L. M., Rezende, W. C. and Santos, P. E., “PID, LQR and LQR-PID on a quadcopter platform,” in 2013 International Conference on Informatics, Electronics and Vision, 1 –6 (2013). Google Scholar

[3] 

Kuantama, E., Vesselenyi, T. and Dzitac, S., “PID and Fuzzy-PID control model for quadcopter attitude with disturbance parameter,” International Journal of Computers Communications & Control, 12 (4), 519 –532 (2017). https://doi.org/10.15837/ijccc.2017.4 Google Scholar

[4] 

Li, Y. N., Li, T. L. and Jiang, Y., “Adaptive PID control of quadrotor based on RBF neural network,” Control Engineering of China, 23 (3), 378 –382 (2016). Google Scholar

[5] 

Podlubny, I., “Fractional-order systems and PID JUI-controllers,” IEEE Transactions on Automatic Control, 44 (1), 208 –214 (1999). https://doi.org/10.1109/9.739144 Google Scholar

[6] 

Shan, P., “Review of fractional PID controller,” Mechatronics, 38 29 –41 (2016). https://doi.org/10.1016/j.mechatronics.2016.06.005 Google Scholar

[7] 

Zhu, C. X. and Zou, Y., “Summary of research on fractional-order control,” Control and Decision, 24 (2), 161 –169 (2009). Google Scholar

[8] 

Zhang, C., Tan, N. L. and Zhou, T., “Research on optimal control of metro trainbased on fractional order PID controller,” Journal of the China Railway Society, 40 (10), 8 –14 (2018). Google Scholar

[9] 

Chen, Z., Yuan, X. and Ji, B., “Design of a fractional order PID controller for hydraulic turbine regulating system using chaotic non-dominated sorting genetic algorithm Ⅱ,” Energy Conversion and Management, 84 390 –404 (2014). https://doi.org/10.1016/j.enconman.2014.04.052 Google Scholar

[10] 

Maurya, H. L., Behera, L. and Verma, N. K., “Trajectory tracking of quad-rotor UAV using fractional order PID controller,” Computational Intelligence: Theories, Applications and Future Directions, I –171186 (2019). Google Scholar

[11] 

Mohammed, R., “Quadrotor control using fractional-order PID control,” Journal of Advances in Computer Engineering and Technology, 5 (1), 1 –10 (2019). Google Scholar

[12] 

Liu, T., “Research on Fractional-Order PID Control of Quadrotor UAV,” Wuhan University of Science and Technology, Master’s Thesis, (2021). Google Scholar

[13] 

Pazooki, M. and Mazinan, A. H., “Hybrid fuzzy-based sliding-mode control approach, optimized by genetic algorithm for quadrotor unmanned aerial vehicles,” Complex & Intelligent Systems, 4 (2), 79 –93 (2018). https://doi.org/10.1007/s40747-017-0051-y Google Scholar
© (2022) COPYRIGHT Society of Photo-Optical Instrumentation Engineers (SPIE). Downloading of the abstract is permitted for personal use only.
Keyong Shao, Jiaxin Liu, and Mingxue Li "Fractional order PID control of quadrotor UAV based on SA-PSO algorithm", Proc. SPIE 12506, Third International Conference on Computer Science and Communication Technology (ICCSCT 2022), 125060C (28 December 2022); https://doi.org/10.1117/12.2662180
Advertisement
Advertisement
RIGHTS & PERMISSIONS
Get copyright permission  Get copyright permission on Copyright Marketplace
KEYWORDS
Control systems

Optimization (mathematics)

Device simulation

Algorithms

Computer simulations

Electrical engineering

Back to Top