Four-axis unmanned aerial vehicle PID intelligent setting method based on whale optimization algorithm

Through the PID self-tuning method based on whale optimization algorithm, the PID parameters of the four-axis drone are automatically optimized, which solves the problem of manual adjustment time-consuming and easy to fall into local optimal solutions, and realizes the automatic optimization and improvement of the drone's flight performance.

CN120161710APending Publication Date: 2025-06-17CHANGCHUN UNIV OF SCI & TECH
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510444575.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-06-17

Smart Images

  • Figure QLYQS_1
    Figure QLYQS_1
  • Figure QLYQS_6
    Figure QLYQS_6
  • Figure QLYQS_7
    Figure QLYQS_7
Patent Text Reader

Abstract

The invention relates to a four-axis unmanned aerial vehicle PID parameter setting method based on a whale optimization algorithm, and belongs to the technical field of unmanned aerial vehicle control. The method aims at solving the problems that in the traditional PID parameter setting process, experience is relied on, time is consumed, and optimal parameters are difficult to obtain. According to the method, the whale optimization algorithm is introduced, and the characteristics of high global search capability and high convergence speed are utilized, so that the parameters of the four-axis unmanned aerial vehicle PID controller are automatically optimized. The method comprises the steps that firstly, a kinetic model of the four-axis unmanned aerial vehicle is established, a control target of a PID controller is determined, PID parameters serve as optimization variables, and a fitness function is defined to evaluate control performance; then, performing global search in a parameter space by using a whale optimization algorithm, and gradually optimizing PID parameters by simulating a whale predation behavior; the optimized PID parameters are applied to a flight control system of the four-axis unmanned aerial vehicle, and stable attitude, height and position control is achieved. The method has the advantages that PID parameters are automatically set through the whale optimization algorithm, the low efficiency and subjectivity of a traditional trial and error method are avoided, and the parameter setting efficiency and precision are remarkably improved; meanwhile, for an unmanned aerial vehicle control system with high nonlinearity and complexity, the WOA can adjust parameters based on actual feedback under the condition that accurate modeling of the system is not needed, and dependence on system modeling is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automatic control technology, and in particular, to a PID self-tuning method for a four-axis unmanned aerial vehicle (UAV) based on the whale optimization algorithm. Background Art

[0002] In recent years, UAV technology has experienced rapid development and has become one of the most prominent focuses in the field of technology. It is widely used in various industries such as agriculture, logistics, film production, and infrastructure inspection, greatly improving work efficiency and productivity.

[0003] The PID controller is one of the core algorithms for the flight control of a four-axis UAV. It realizes the control of the attitude, altitude, and position of the UAV by adjusting the rotor speed in real time. The performance of the PID controller directly affects the flight stability and response speed of the UAV. In practical applications, the adjustment of the PID controller mainly relies on manual adjustment, which requires a large amount of manpower and time. The whale optimization algorithm (WOA) is a new nature-inspired optimization algorithm. Its excellent global search ability and fast convergence speed make it a potential method for optimizing PID parameters. Therefore, the present invention proposes a PID self-tuning method based on an improved whale optimization algorithm, which can efficiently adjust the parameters of the PID controller, thereby improving the flight stability and control accuracy of the four-axis UAV. Summary of the Invention

[0004] The present invention proposes a method for self-tuning the PID parameters of a UAV based on the whale optimization algorithm, aiming to improve the flight stability and control accuracy of a four-axis UAV in a complex flight environment. This method optimizes the parameters of the PID controller by simulating the cooperation and exploration behaviors of a whale group during the hunting process, thereby achieving the optimization of the flight performance of the UAV. The technical principle is described as follows:

[0005] The PID controller is a classic control algorithm, which consists of three parts: proportional, integral, and derivative, and is used to adjust the system output to approach the desired value. The proportional control directly generates a control action according to the current error magnitude. The integral control eliminates the steady-state error by accumulating historical errors. The derivative control predicts future trends through the error change rate and suppresses system oscillations. By adjusting the proportional gain p, integral gain, and derivative gain, the PID controller can achieve a balance of fast response, stability, and anti-interference ability.

[0006] The Whale Optimization Algorithm (WOA) is a swarm intelligence optimization algorithm based on the behavior of whales, proposed by Mirjalili et al. in 2016. This algorithm mimics the behavior of whales, especially humpback whales during the hunting process, to solve various optimization problems. WOA mainly finds the global optimal solution by simulating the "helical update movement" and "encircling prey" strategies of whales.

[0007] This invention uses the Whale Optimization Algorithm (WOA) to find the optimal PID parameters for a quadcopter drone. By simulating the helical update and encircling prey strategies in the whale hunting behavior, WOA can explore and search for the optimal PID parameter combination in a wide search space. The algorithm first initializes the whale population to represent a set of PID parameters, and then continuously optimizes the parameters through helical movement and encircling prey to improve the control performance of the drone. Through repeated iterations, the optimal PID parameter combination is found, enabling the drone to maintain stability during flight, improve the response speed, and enhance the anti-interference ability. The advantage of WOA lies in its global search ability, which can effectively avoid the problem of local optimal solutions while maintaining a good convergence speed and stability.

[0008] The PID self-tuning method of this invention includes the following steps:

[0009] 1. Establish a mathematical model of the quadcopter drone and select a fitness function to evaluate the performance of the PID controller.

[0010] 2. Initialize the WOA algorithm: Set the initial parameters of the whale optimization algorithm, including the population size, the maximum number of iterations, and the search space range.

[0011] 3. Initialize the WOA population: Randomly generate multiple groups of initial solutions within the search space of the PID parameters, with each set of parameters corresponding to a whale individual.

[0012] 4. Evaluate the population fitness: Perform the following operations on each whale individual: Inject the current PID parameters into the drone simulation model, run the simulation, obtain the dynamic response data of the system, and calculate the fitness value of the current PID parameters according to the fitness function to evaluate its control performance.

[0013] 5. Update the WOA population: Update the position of each whale in the population, that is, the PID parameters, according to the behavior patterns of the whale optimization algorithm, including encircling, bubble net attack, and random search, to gradually approach the optimal solution.

[0014] 6. Iterative optimization: Repeat steps 4 and 5 until the termination condition is met (such as reaching the maximum number of iterations or the fitness value converges).

[0015] 7. Output the optimal PID parameters: Apply the optimized optimal PID parameters to the flight control system of the quadcopter drone to achieve stable and precise flight control.

[0016] Since the whale optimization algorithm itself has a certain degree of randomness, the convergence speed and accuracy of the algorithm may be affected to a certain extent. To improve the performance of the algorithm, it is necessary to reasonably adjust the parameters of the algorithm and select appropriate initial parameter settings. In practical applications, it is also necessary to determine the best parameter combination and optimization results through multiple experiments.

[0017] Beneficial effects

[0018] Compared with traditional PID parameter tuning, the present invention has the following beneficial effects:

[0019] 1) Automatic parameter tuning: Utilize the whale optimization algorithm to automatically search for the optimal PID parameters, avoiding the cumbersome process of traditional manual parameter tuning.

[0020] 2) Optimized performance: The PID parameters tuned by the intelligent optimization algorithm can effectively improve the dynamic response speed and accuracy of the drone attitude control system.

[0021] 3) Avoid local optimal solutions: Manually adjusting PID parameters may fall into local optimal solutions, resulting in the system performance not reaching the best. The whale optimization algorithm is a global optimization algorithm. By simulating the behavior of whales (such as spiral and surrounding searches), it can conduct extensive searches in the parameter space, reducing the risk of falling into local optimal solutions and helping the system find better global optimal solutions.

[0022] 4) Self - adaptability: For the highly nonlinear and complex drone control system, WOA can adjust parameters based on actual feedback without the need for precise system modeling, reducing the dependence on system modeling. Description of the drawings

[0023] Figure 1 is the overall structural flowchart of the present invention;

[0024] Figure 2 is the PID controller structure diagram; Detailed implementation manners

[0025] The present invention provides an embodiment: A quadcopter drone PID self - tuning method based on the whale optimization algorithm, which finds the optimal PID parameters of the quadcopter drone through the whale optimization algorithm to achieve stable and precise flight control.

[0026] The above - mentioned quadcopter drone PID self - tuning method based on the whale optimization algorithm includes the following steps:

[0027] Step 1: Establish a mathematical model of a four-axis drone.

[0028] Based on the six-degree-of-freedom model of the drone, obtain the state-space expression of the transfer function of the control system.

[0029] Step 2: Construct a PID controller

[0030] Adopt a cascade PID control system. The outer loop uses an angle PID controller to control the attitude angles (pitch angle, roll angle, yaw angle), that is, by adjusting the target attitude angles to ensure the attitude stability of the drone. The inner loop uses an angular velocity PID controller to control the angular velocities (pitch angular velocity, roll angular velocity, yaw angular velocity). The role of the inner loop PID controller is to precisely adjust the change rate of the attitude angles, thereby improving the accuracy of attitude control. Compared with a single-loop angle PID controller, this control system has stronger anti-interference ability.

[0031] Step 3: Select ITAE as the fitness function

[0032] The mathematical expression of ITAE is:

[0033] where t is time, e(t) = r(t) - y(t) is the error, r(t) is the desired reference signal, y(t) is the output of the system, and T is the simulation time.

[0034] Step 4: Apply the whale optimization algorithm

[0035] Initialize the whale population: Set the initial population of the whale optimization algorithm, including the number and positions of the whales. Each whale represents a set of PID parameters.

[0036] Evaluate the fitness of the whales: According to the fitness function, calculate the fitness value of each whale individual and evaluate the impact of its corresponding PID parameters on the system performance.

[0037] Update the positions of the whales: According to the update rules of the whale optimization algorithm, update the positions of the whales (i.e., the PID parameters) so that the fitness of all whales gradually increases.

[0038] The above-mentioned update of the positions of the whales includes simulating the encircling, bubble-net attacking, and random search behaviors of the whales.

[0039] The encircling behavior of the whales is realized by the following formula:

[0040]

[0041] where, is the current optimal solution, is the current solution, and are coefficient vectors.

[0042] The bubble net attack behavior of the whale is achieved through the following formula:

[0043]

[0044] where, b is a constant, is a random number.

[0045] The random search behavior of the whale is achieved through the following formula:

[0046]

[0047] where, is a random solution.

[0048] Select the optimal solution: After multiple generations of iteration, select the PID parameters corresponding to the whale with the smallest fitness value as the optimal controller parameters.

Claims

1. A PID intelligent tuning method for a quadcopter drone based on a whale optimization algorithm, characterized in that: The following steps are involved: The dynamic model of the quadcopter is established and the control target of the PID controller is determined. The proportional coefficient Kp, integral coefficient Ki and differential coefficient Kd of the PID controller are used as optimization variables. Define the fitness function to evaluate the control performance of the PID controller. The whale optimization algorithm is used to perform a global search in the parameter space to optimize the PID parameters. The optimized PID parameters are applied to the flight control system of the quadcopter to achieve stable control.

2. The method according to claim 1, characterized in that: The fitness function selects ITAE as the fitness function.

3. The method according to claim 1, characterized in that The optimization process of the whale optimization algorithm includes the following steps: Initialize the whale population and randomly generate a set of PID parameters as the initial solution. Calculate the fitness value of each solution and sort them according to the fitness value. Simulate the whale's encirclement, bubble net attack and random search behavior, and update the PID parameters. The optimization process is iterated until the convergence condition is met or the maximum number of iterations is reached.

4. The method according to claim 4, characterized in that The encirclement behavior of the whale is achieved by the following formula: in, is the current optimal solution, is the current solution, and is the coefficient vector.

5. The method according to claim 4, characterized in that The bubble net attack behavior of the whale is achieved by the following formula: in, b is a constant and e is a random number.

6. The method according to claim 4, characterized in that The random search behavior of the whale is implemented by the following formula: in, is a random solution.

7. A four-axis drone control system, characterized in that: The PID parameters are adjusted by using the method described in any one of claims 1 to 9 to achieve stable flight control of the UAV.

Citation Information

Cited By

  • Unmanned aerial vehicle PID parameter optimization method and system based on jellyfish optimization algorithm

    CN120742689A

  • A Method and System for Optimizing UAV PID Parameters Based on Jellyfish Optimization Algorithm

    CN120742689B

  • Self-adaptive cascade controller parameter self-tuning method, medium and computer equipment

    CN121209257A

  • Adaptive cascade controller parameter self-tuning method, medium and computer device

    CN121209257B