Unmanned aerial vehicle path planning method based on Heman state optimization particle swarm algorithm
By introducing the Hippo state mechanism to optimize the particle swarm algorithm in the UAV path planning, dynamically adjusting the parameters, combining the global path optimization function and Bezier curve smoothing, the local optimal problem of the particle swarm algorithm is solved, and shorter and safer are generated The drone path improves the accuracy and efficiency of path planning.
Patent Information
- Application Number
- CN202411435599.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-10-15
AI Technical Summary
The existing particle swarm algorithms are prone to fall into local optimal solutions in UAV path planning, resulting in the planned path not being globally optimal, and the drone has a long flight distance, which affects mission efficiency and energy consumption.
The Hippo state mechanism optimization particle swarm algorithm is introduced, and the particles are dynamically adjusted by dynamically adjusting the inertia weight and acceleration constant, combined with the global path optimization function, the optimal path is generated, and the path is smoothed through the Bezier curve to ensure continuity and nature.
It improves the accuracy and efficiency of path planning, short paths generated, avoid obstacle collisions, is suitable for the actual flight needs of drones, and meets the requirements of high real-time path planning.
Smart Images

Figure CN119311022A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle path planning, and in particular to a method for unmanned aerial vehicle path planning based on a hippopotamus state optimized particle swarm algorithm. Background Art
[0002] With the increasing application of drones in military, agriculture, logistics, environmental monitoring, disaster relief and other fields, autonomous path planning for drones has become a key research topic. Path planning aims to find an optimal path from the starting point to the end point for the drone, so that it can avoid obstacles, reduce energy consumption, shorten flight time, and ensure flight safety. The current technologies used for drone path planning mainly include classical algorithms such as A* algorithm, Dijkstra algorithm and D* algorithm, which determine the optimal path through graph search and path optimization; intelligent optimization algorithms such as genetic algorithm, ant colony algorithm and particle swarm algorithm, which search for the optimal solution by simulating evolution and group behavior in nature.
[0003] Among these intelligent optimization algorithms, the particle swarm algorithm is an optimization algorithm based on swarm intelligence, which is inspired by the group behavior of bird flocks or fish schools in nature. The basic idea of the particle swarm algorithm is to use the movement of a group of particles in the search space to represent the solution space of the optimization problem. Each particle represents a possible solution, and gradually approaches the optimal solution by adjusting the speed and position. The particle speed update depends on its own historical best position and the historical best position of the group, and is also affected by the inertia weight and learning factor. As the iteration proceeds, the particle swarm gradually converges to the optimal solution under the guidance of the global best position. However, there are still some problems in the application of the particle swarm algorithm in drone path planning. Specifically, the particle swarm algorithm is prone to fall into the local optimal solution, resulting in the planned path not being the global optimal, and the drone has a long flight distance, which affects the mission efficiency and energy consumption. Summary of the invention
[0004] In view of this, the present invention provides a UAV path planning method based on Hippo state optimized particle swarm algorithm to solve the problems existing in the prior art.
[0005] The present invention provides a UAV path planning method based on a Hippo state optimized particle swarm algorithm, comprising:
[0006] Obtain the coordinates of static obstacles and perform environment modeling using the grid method;
[0007] Initialize the particle swarm and establish a global path optimization function with the goal of shortest driving path without collision with obstacles;
[0008] The particle swarm algorithm is optimized by the Hippo state mechanism to obtain an improved particle swarm algorithm. The global path optimization function is solved by the improved particle swarm algorithm to obtain the global planning path.
[0009] Preferably, obtaining the coordinates of the static obstacles and performing environment modeling by the grid method comprises the following steps:
[0010] Collect all static obstacle information in the flight environment through sensors or pre-drawn maps, and record the coordinates of each obstacle;
[0011] The entire map is divided into a uniform grid, each grid cell represents an independent spatial area, and a two-dimensional array representing the map is created, with all initial values set to 0. Then, each grid cell in the map is traversed to check whether the grid cell contains an obstacle. If it contains an obstacle, it is marked as 1, otherwise it is marked as 0.
[0012] Further preferably, initialization of the particle swarm includes randomly generating initial positions and velocities of particles, and each particle in the particle swarm represents a possible path solution.
[0013] Further preferably, the global path optimization function is as follows:
[0014]
[0015] Among them, L path is the total length of the path; P smoothness is the path smoothness penalty; n B is the number of nodes passing through obstacles in the path; E(1) and E(2) represent the number of rows and columns of the map respectively;
[0016] Among them, n B The calculation formula is as follows:
[0017]
[0018] In the formula, is the indicator function, when the node (x i ,y i ) is within an obstacle, otherwise n represents the total number of nodes in the path;
[0019] L path The calculation formula is as follows:
[0020]
[0021] In the formula, x i Represents the coordinate of the i-th node in the path on the x-axis, y irepresents the coordinate of the i-th node in the path on the y-axis, and n represents the total number of nodes in the path;
[0022] P smoothness The calculation formula is as follows:
[0023]
[0024] In the formula, θ i is the direction angle of the i-th segment in the path, calculated as: θ i =atan2(y i+1 -y i ,x i+1 -x i ), n represents the total number of nodes in the path.
[0025] Further preferably, the particle swarm algorithm is optimized by the hippo state mechanism to obtain an improved particle swarm algorithm, and the global path optimization function is solved by the improved particle swarm algorithm to obtain the global planning path, which includes the following steps:
[0026] The path quality of each particle is evaluated through the global path optimization function, and the fitness value is calculated;
[0027] According to the fitness value of the particles, the Hippo state mechanism is used to divide the particles into three states, and the inertia weight and acceleration constant of the particles in each state are dynamically adjusted. The three states are in water, on the shore, and on land.
[0028] The velocity and position of the particle are iteratively updated according to the inertia weight and acceleration constant adjusted by the Hippo mechanism to obtain the global optimal path.
[0029] Further preferably, the inertia weight and acceleration constant of the particle in each state are as follows:
[0030] In water:
[0031] w=w max ;
[0032] c1=c 1max ;
[0033] c2=c 2max ;
[0034] On the shore:
[0035]
[0036] On land:
[0037] w=w min ;
[0038] c1=c 1min ;
[0039] c2=c 2min ;
[0040] Where w represents the adjusted inertia weight, c1 and c2 represent the adjusted acceleration constants, and w max and w min Respectively represent the maximum and minimum values of inertia weight; c 1max and c 1min Respectively represent the maximum and minimum values of the individual acceleration constant; c 2max and c 2min represent the maximum and minimum values of the population acceleration constant, respectively.
[0041] Further preferably, the particle position update formula is as follows:
[0042]
[0043] in, represents the velocity of particle i at time t+1; w represents the inertia weight; represents the velocity of particle i at time t; c1 and c2 represent acceleration constants; v1 and v2 represent random numbers in the range [0,1]; p i represents the individual optimal position of particle i; x i (t) represents the position of particle i at time t; g represents the global optimal position; represents the position of particle i at time t+1; represents the position of particle i at time t.
[0044] Further preferably, in each iteration, the particle position is processed by the following formula:
[0045] p i,j =max(min(p i,j ,U bj ),L bj );
[0046] Among them, p(i,j) is the coordinate component of particle i in the jth dimension; U bj is the upper boundary of the j-th dimension; L bj is the lower bound of the j-th dimension.
[0047] Further preferably, during the path generation process, a Bezier curve is used to further smooth the path to ensure the naturalness and continuity of the path.
[0048] The UAV path planning method based on the Hippo state optimization particle swarm algorithm provided by the present invention introduces the Hippo state mechanism to improve the particle swarm algorithm, and combines the mechanism with the global path optimization function, so as to obtain the optimal path suitable for the UAV flight on the basis of overcoming the improper parameter selection and poor path planning effect of the traditional particle swarm algorithm; through the Hippo state mechanism, the inertia weight and the acceleration constant are dynamically adjusted according to the fitness value of the particles, and the parameter adaptive adjustment is realized, so that the algorithm can be dynamically optimized under different states, and the accuracy and efficiency of the path planning are improved; the planned path has a shorter driving distance, avoids collision with obstacles, is suitable for the actual flight of the UAV, and can meet the high real-time requirements of the UAV path planning.
[0049] The UAV path planning method based on the Hippo state optimized particle swarm algorithm provided by the present invention improves the particle swarm algorithm by introducing the Hippo state mechanism, realizes the adaptive adjustment of the path planning parameters, and improves the search efficiency and convergence speed; combined with the global path optimization function, the algorithm can dynamically optimize the path, avoid obstacles, generate the shortest and safest path, meet the actual flight needs of the UAV, and has significant technical advantages and effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0051] Figure 1 It is a flow chart of a UAV path planning method based on a Hippo state optimized particle swarm algorithm provided by the present invention;
[0052] Figure 2a It is the final roadmap of the improved particle swarm algorithm in the embodiment of the present invention;
[0053] Figure 2b It is the final roadmap of the traditional particle swarm algorithm in the embodiment of the present invention. DETAILED DESCRIPTION
[0054] The present invention will be further described below in conjunction with specific embodiments.
[0055] like Figure 1 As shown, the present invention provides a UAV path planning method based on a Hippo state optimized particle swarm algorithm, comprising the following steps:
[0056] S1. Obtain the coordinates of static obstacles and perform environment modeling using the grid method;
[0057] The specific steps are as follows:
[0058] First, all static obstacle information in the flight environment is collected through sensors (such as lidar, camera) or pre-drawn maps, and the coordinates and shape parameters of each obstacle are recorded. For example, for a rectangular obstacle, its vertex coordinates are recorded;
[0059] Next, the entire flight area is divided into uniform grid cells, each grid cell represents an independent spatial area, and a two-dimensional array G representing the map is created. The initial values are all set to 0, indicating that all areas are passable areas. Then, each grid cell in the map is traversed to check whether the cell contains an obstacle. If the grid cell contains an obstacle, it is marked as 1, indicating that the area is an inaccessible area, otherwise it is marked as 0.
[0060] S2, initialize the particle swarm and establish a global path optimization function with the goal of shortest driving path and no collision with obstacles;
[0061] In the improved particle swarm algorithm, the particle swarm needs to be initialized first. The particle swarm initialization process includes randomly generating the initial position and velocity of the particles. The position of each particle is initialized within the boundary range of the search space. By randomly generating the position of the particles, the particles can cover different areas of the search space, thereby ensuring the diversity of the path optimization process. For each particle position x i , randomly generate its initial coordinates in two-dimensional space (x i ,y i ), the initial velocity of these particles v i will also be randomly assigned, and the initialized particle swarm will provide the basis for the subsequent path optimization process.
[0062] The position of each particle represents a possible path, and path generation and optimization are completed through the position update of the particles with each iteration. Specifically, the position of the particle will be adjusted in each iteration, tending to a better solution (i.e. a shorter path and a path that avoids obstacles). Each particle generates a path by updating its position, and the fitness function of the particle is evaluated based on the path length, obstacle avoidance ability, and smoothness. After multiple iterations, the position of the particle will be continuously adjusted until the global optimal path is found.
[0063] The following is the process of building a global path optimization function.
[0064] Traverse each node x in the path i , check each node x i Is it located within an obstacle? Specifically, for each node x i , if (x i ,y i) is located within the obstacle (i.e. the corresponding position value of map G is 1), then the node is recorded as passing through the obstacle. Count the number of nodes n that pass through the obstacle in the path B , the number of nodes passing obstacles in the path n B The calculation formula is as follows:
[0065]
[0066] Among them, Ⅱ is the indicator function, when the node (x i ,y i ) is located within the obstacle, II = 1, otherwise II = 0, and n represents the total number of nodes in the path.
[0067] For paths without obstacles, a smooth continuous path is generated and the total length of the path is calculated so that shorter and safer paths can be given priority during path optimization. The total path length calculation formula is as follows:
[0068]
[0069] Among them, x i Represents the coordinate of the i-th node in the path on the x-axis, y i Represents the coordinate of the i-th node in the path on the y-axis.
[0070] The path smoothness penalty is calculated by the angle change between adjacent path segments. A larger angle change indicates a sharp turn. The path smoothness penalty is calculated as follows:
[0071]
[0072] Among them, θ i is the direction angle of the i-th segment in the path, calculated as: θ i =atan2(y i+1 -y i ,x i+1 -x i );
[0073] For paths that pass through obstacles, a larger fitness value is set as a penalty to avoid selecting these paths during path optimization. The specific formula is:
[0074] f x =E(1)×E(2)×n B ;
[0075] Where E(1) and E(2) represent the number of rows and columns of the map, respectively. B is the number of nodes in the path that pass through obstacles.
[0076] The final global path optimization function f is obtained by combining the two situations of not passing through obstacles and passing through obstacles. x :
[0077]
[0078] Among them, L path is the length of the path; P smoothness is the path smoothness penalty; n B is the number of nodes that pass through obstacles in the path; E(1) and E(2) represent the number of rows and columns of the map, respectively, which are used to severely penalize paths that cross obstacles.
[0079] S3, optimizing the particle swarm algorithm through the hippo state mechanism to obtain an improved particle swarm algorithm, solving the global path optimization function through the improved particle swarm algorithm to obtain the global planning path;
[0080] First, the quality of each particle's path is evaluated through the global path optimization function, and the fitness value is calculated to guide the search direction of the particle swarm;
[0081] The inertia weight w and acceleration constants c1 and c2 are dynamically adjusted according to the fitness value of the particle. The specific steps are as follows:
[0082] The Hippo state mechanism divides particles into three states according to their fitness values and dynamically adjusts the inertia weight w and acceleration constants c1 and c2 of the particles in each state to improve the algorithm's search efficiency and convergence speed. The three states are: in water, on the shore, and on land. For particles with lower fitness values (in water), their inertia weight and acceleration constant are set to larger values to increase their search range and randomness; for particles with medium fitness values (on the shore), the inertia weight and acceleration constant are set to medium values to balance global and local searches; for particles with higher fitness values (on land), the inertia weight and acceleration constant are set to smaller values for detailed local searches. The specific adjustment formula is as follows:
[0083] In water (particles with lower fitness values, more randomness):
[0084]
[0085] On the shore (particles with medium fitness values, moderate randomness):
[0086]
[0087] On land (particles with higher fitness values have less randomness):
[0088] w=w min ;
[0089]
[0090]
[0091] Among them, w max and w min Respectively represent the maximum and minimum values of inertia weight; c 1max and c 1min Respectively represent the maximum and minimum values of the individual acceleration constant; c 2max and c 2min represent the maximum and minimum values of the population acceleration constant, respectively.
[0092] In each iteration, the particle's position and velocity will be updated according to the inertia weight and acceleration constant adjusted by the Hippo mechanism. The particle position update formula is as follows:
[0093]
[0094] in, represents the speed of particle i at time t+1; w represents the inertia weight, which is used to balance the search ability and convergence ability of the particle; represents the velocity of particle i at time t; c1 and c2 represent acceleration constants, which are used to adjust the acceleration of particles moving to the individual optimal position and the global optimal position; v1 and v2 represent random numbers in the range of [0,1], which increase the randomness and diversity of the algorithm; p i represents the individual optimal position of particle i; x i (t) represents the position of particle i at time t; g represents the global optimal position. represents the position of particle i at time t+1; represents the position of particle i at time t.
[0095] In order to ensure that the updated particle position is within the set boundary range, it is necessary to use the boundary processing formula to constrain the particle position. The boundary processing formula is as follows:
[0096] p i,j =max(min(p i,j ,U bj ),L bj );
[0097] Among them, p(i,j) is the coordinate component of particle i in the jth dimension; U bj is the upper boundary of the j-th dimension; L bj is the lower bound of the j-th dimension.
[0098] During the path generation process, in order to improve the smoothness and continuity of the path, the generated path is further optimized. Specifically, by checking whether the connection between adjacent nodes is free, if there is an obstacle between adjacent nodes, a new intermediate node is inserted into the path to avoid the obstacle. Then the Bezier curve is used to further smooth the path to ensure the naturalness and continuity of the path. During the Bezier curve generation process, the control points p0 and p1 are used to calculate the Bezier curve. The specific formula is as follows:
[0099] bezierCurve(t)=(1-t)·p0+t·p1;
[0100] Where t is a parameter, ranging from [0,1]; p0 and p1 are the coordinates of two control points. The generated Bezier curve calculates the corresponding coordinates at each value of t to form a smooth curve.
[0101] Through multiple iterations, the speed and position of the particles are continuously updated, the path is optimized, and the optimal solution is gradually approached. In order to ensure that the algorithm can converge within a reasonable time, the maximum number of iterations and the threshold of fitness value change are set as termination conditions. When the preset number of iterations is reached or the fitness value change amplitude is lower than the set threshold, the algorithm terminates and outputs the current optimal path.
[0102] When the present invention is implemented, completing the task means finding a path with the shortest driving path and no collision with obstacles as the goal. The above steps can realize the UAV path planning based on the improved particle swarm algorithm.
[0103] In a grid map with 27% obstacles, the path planning effects of the traditional particle swarm algorithm and the improved particle swarm algorithm are compared. The number of swarms participating in the algorithm is set to 50, and the number of iterations is also set to 200. The initial position of the drone and the position of the end point are given, and then the optimal path of each step is continuously calculated by the method described in the present invention, and finally a path with the shortest driving path and no collision with obstacles is found. The improved particle swarm algorithm has the same settings as the traditional particle swarm algorithm. After multiple simulation experiments, the simulation results are compared. Figure 2a , Figure 2b In complex environments, the optimal path length searched by the traditional particle swarm algorithm is 40.9, while the optimal path length searched by the improved particle swarm algorithm is 32.6, and the optimal path length is shortened by 20.2%. Compared with the paths planned by the traditional particle swarm algorithm and the improved particle swarm algorithm, the search efficiency of the algorithm is improved, indicating that the improved particle swarm algorithm has obvious advantages in convergence speed and optimization ability.
[0104] It should be noted that the purpose of publishing the embodiments is to help further understand the present invention, but those skilled in the art can understand that various substitutions and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the contents disclosed in the embodiments, and the scope of protection claimed by the present invention shall be subject to the scope defined in the claims.
Claims
1. A UAV path planning method based on Hippo state optimization particle swarm algorithm, characterized in that: include: Obtain the coordinates of static obstacles and perform environment modeling using the grid method; Initialize the particle swarm and establish a global path optimization function with the goal of shortest driving path without collision with obstacles; The particle swarm algorithm is optimized by the Hippo state mechanism to obtain an improved particle swarm algorithm. The global path optimization function is solved by the improved particle swarm algorithm to obtain the global planning path.
2. The UAV path planning method based on the Hippo state optimized particle swarm algorithm according to claim 1 is characterized in that: Obtaining the coordinates of static obstacles and modeling the environment using the grid method includes the following steps: Collect all static obstacle information in the flight environment through sensors or pre-drawn maps, and record the coordinates of each obstacle; The entire map is divided into a uniform grid, each grid cell represents an independent spatial area, and a two-dimensional array representing the map is created, with all initial values set to 0. Then, each grid cell in the map is traversed to check whether the grid cell contains an obstacle. If it contains an obstacle, it is marked as 1, otherwise it is marked as 0.
3. The UAV path planning method based on Hippo state optimization particle swarm algorithm according to claim 1 is characterized in that: The initialization of the particle swarm includes randomly generating the initial position and velocity of the particles, and each particle in the particle swarm represents a possible path solution.
4. The UAV path planning method based on Hippo state optimization particle swarm algorithm according to claim 1 is characterized in that: The global path optimization function is as follows: Among them, L path is the total length of the path; P smoothness is the path smoothness penalty; n B is the number of nodes passing through obstacles in the path; E(1) and E(2) represent the number of rows and columns of the map respectively; Among them, n B The calculation formula is as follows: In the formula, is the indicator function, when the node (x i ,y i ) is within an obstacle, otherwise n represents the total number of nodes in the path; L path The calculation formula is as follows: In the formula, x i Represents the coordinate of the i-th node in the path on the x-axis, y i represents the coordinate of the i-th node in the path on the y-axis, and n represents the total number of nodes in the path; P smoothness The calculation formula is as follows: In the formula, θ i is the direction angle of the i-th segment in the path, calculated as: θ i =atan2(y i+1 -y i ,x i+1 -x i ), n represents the total number of nodes in the path.
5. The UAV path planning method based on Hippo state optimization particle swarm algorithm according to claim 1 is characterized in that: The particle swarm algorithm is optimized by the hippo state mechanism to obtain an improved particle swarm algorithm. The global path optimization function is solved by the improved particle swarm algorithm to obtain the global planning path, which includes the following steps: The path quality of each particle is evaluated through the global path optimization function, and the fitness value is calculated; According to the fitness value of the particles, the Hippo state mechanism is used to divide the particles into three states, and the inertia weight and acceleration constant of the particles in each state are dynamically adjusted. The three states are in water, on the shore, and on land. The velocity and position of the particle are iteratively updated according to the inertia weight and acceleration constant adjusted by the Hippo mechanism to obtain the global optimal path.
6. The UAV path planning method based on Hippo state optimization particle swarm algorithm according to claim 5 is characterized in that: The inertia weight and acceleration constant of the particle in each state are as follows: In water: in=in max ; On the shore: On land: in=in min ; Where w represents the adjusted inertia weight, c1 and c2 represent the adjusted acceleration constants, and w max and w min Respectively represent the maximum and minimum values of inertia weight; c 1max and c 1min Respectively represent the maximum and minimum values of the individual acceleration constant; c 2max and c 2min represent the maximum and minimum values of the population acceleration constant, respectively.
7. The UAV path planning method based on Hippo state optimization particle swarm algorithm according to claim 5 is characterized in that: The particle position update formula is as follows: in, represents the velocity of particle i at time t+1; w represents the inertia weight; represents the velocity of particle i at time t; c1 and c2 represent acceleration constants; v1 and v2 represent random numbers in the range [0,1]; p i represents the individual optimal position of particle i; x i (t) represents the position of particle i at time t; g represents the global optimal position; represents the position of particle i at time t+1; represents the position of particle i at time t.
8. The UAV path planning method based on Hippo state optimization particle swarm algorithm according to claim 5 is characterized in that: In each iteration, the particle position is processed by the following formula: p i,j =max(min(p i,j ,U bj ),L bj ); Among them, p(i,j) is the coordinate component of particle i in the jth dimension; U bj is the upper boundary of the j-th dimension; L bj is the lower boundary of the j-th dimension.
9. The UAV path planning method based on Hippo state optimization particle swarm algorithm according to claim 5 is characterized in that: During the path generation process, Bezier curves are used to further smooth the path to ensure the naturalness and continuity of the path.
Citation Information
Patent Citations
Two-dimensional space multi-route planning method based on niche particle swarms
CN102855387A
Global smooth path planning method for mobile robot
CN109799822A
Group unmanned aerial vehicle multi-target search cooperation method based on three-dimensional simplified virtual model
CN111487995A
Robot path planning method based on adaptive chaotic particle swarm algorithm
CN115933693A
Multi-aircraft path planning method based on PSO-MPC algorithm under satellite cooperation
CN117891263A
Cited By
Three-dimensional path planning method for low-altitude unmanned aerial vehicle
CN119828752A
Space-ground integrated load balancing method based on improved particle swarm and Hereum algorithm
CN119854219A
Unmanned aerial vehicle cluster flight path visual simulation method based on Unity3D
CN120044813A