An Unmanned Aerial Vehicle Path Planning Method Based on Hierarchical Particle Swarm Optimization Algorithm and Its Application

The drone path planning is optimized through the layered particle swarm algorithm, combined with the initialization of the midpoint information of obstacles and the update of the layered particle swarm algorithm, the local optimal and time complexity problems of the drone's path planning in complex environments are solved, and efficient and accurate path planning is achieved.

CN115357050BActive Publication Date: 2025-08-01ANHUI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211138201.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-19
Publication Date
2025-08-01
Estimated Expiration
2042-09-19

AI Technical Summary

Technical Problem

The existing drone path planning algorithms are difficult to find high-quality approximate optimal solutions in complex environments, especially when there are many obstacles, and there are problems such as local optimality and high time complexity.

Method used

The layered particle swarm algorithm is adopted to optimize the path length, threat cost, high cost and smooth cost by constructing the objective function, and initialize the population with the obstacle midpoint information, and the layered particle swarm algorithm updates the population to improve search accuracy and diversity.

Benefits of technology

It improves the convergence speed and accuracy of drone path planning, and can quickly plan short and safe flight paths in complex environments, which are suitable for three-dimensional path planning problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115357050B_ABST
    Figure CN115357050B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for unmanned aerial vehicle path planning based on a hierarchical particle swarm optimization algorithm and its application. The method includes: 1) constructing a path planning model for the unmanned aerial vehicle; 2) using the midpoint information of obstacles to initialize the population, so that individuals in the population can find multiple feasible paths during initialization; 3) improving the implementation of the particle swarm optimization algorithm, dividing the population individuals into three layers according to the fitness value, and updating each layer according to different update formulas. The present invention can be applied to complex scenarios and can find an approximately optimal path planning scheme at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of UAV path planning, and specifically, it is a hierarchical particle swarm algorithm based on obstacle midpoint information initialization to solve the UAV path planning problem. Background Art

[0002] In the past few decades, UAVs have expanded from the military field to agriculture, express delivery, power systems, communications, image recognition and other fields. For example, UAVs are used to spray pesticides, deliver packages, and conduct power inspections. UAV path planning has become one of the key technologies in UAV missions. At the same time, as a practical optimization problem, it has been widely studied by scholars at home and abroad. UAV path planning can be regarded as a complex optimization problem. The main goal is to obtain the minimum comprehensive cost while meeting the UAV performance requirements. The UAV needs to design a smooth and approximately optimal path that meets the task requirements from the given starting position to the target position without colliding with obstacles. Because the UAV has to avoid obstacles such as mountains, trees, and buildings, it is difficult for the UAV to complete the task efficiently. Therefore, the UAV path planning problem requires an efficient algorithm to solve. The existing methods for solving the path planning problem include Voronoi diagrams, probabilistic roadmap (PRM), A* algorithm, artificial potential field method (APF), rapidly exploring random tree (RRT). However, most of these methods have problems such as being easily trapped in local optima and having high time complexity.

[0003] In recent years, meta-heuristic algorithms have been widely studied by researchers for their more flexible and effective characteristics. To solve the UAV path planning problem, a series of improved meta-heuristic algorithms have been proposed, such as genetic algorithm (GA), differential evolution algorithm (DE), particle swarm algorithm (PSO), ant colony algorithm (ACO), artificial bee colony algorithm (ABC), grey wolf optimization algorithm (GWO), etc. Although these methods have achieved some path planning results, further improvement is still needed to find higher-quality approximate optimal solutions in complex scenarios with many obstacles. Summary of the Invention

[0004] In order to overcome the deficiencies of the prior art, the present invention provides a new UAV path planning method based on a hierarchical particle swarm algorithm and its application, in order to solve the UAV path planning problem in a more complex environment, so as to be able to provide an optimal path flight plan.

[0005] In order to achieve the above invention purpose, the present invention adopts the following technical solutions:

[0006] A UAV path planning method based on a hierarchical particle swarm algorithm according to the present invention is characterized in that it is carried out according to the following steps:

[0007] Step 1: Obtain a target area. Take a vertex of the circumscribed rectangle of the target area as the origin, use the two sides connected to the origin as the x-axis and y-axis respectively, and use the direction perpendicular to the oxy horizontal plane as the z-axis to establish a three-dimensional coordinate system. Let P j represent the j-th path point of the UAV, and the coordinates of P j are (x j , y j , z j ). Let the coordinates of the starting point S be (x1, y1, z1), and let the coordinates of the ending point E be (x N , y N , z N );

[0008] Step 2: Construct the objective function:

[0009] Step 2.1: Minimize the path length:

[0010] Use Equation (1) to construct the path length f1 that minimizes the flight distance of the UAV from the starting point S to the ending point E, and use it as the first objective function:

[0011]

[0012] In Equation (1), l j represents the Euclidean distance from the j-th path point P j to the (j + 1)-th path point P j+1 . N is the number of path points, and N - 1 is the number of path segments;

[0013] Step 2.2: Minimize the threat cost function:

[0014] Use Equation (2) and Equation (3) to construct the threat cost f2 of the UAV flight, and use it as the second objective function:

[0015]

[0016]

[0017] In Equation (2) and Equation (3), K is the number of obstacles, R k is the radius of the k-th obstacle, S is the dangerous distance of the collision area, D is the diameter of the UAV, represents the vector formed by the j-th path point P ij to the (j + 1)-th path point P j+1 , d jk represents the distance between the path segment and the center of the k-th obstacle; T k (·) represents the threat cost of the k-th obstacle;

[0018] Step 2.3. Minimize the altitude cost:

[0019] Construct the altitude cost f3 of the UAV during flight using Equations (4) and (5), and use it as the third objective function:

[0020]

[0021]

[0022] In Equations (4) and (5), h j represents the flight altitude of the UAV relative to the ground at the j-th path point P j , h min and h max are the minimum and maximum altitudes of the UAV flight respectively, and H j represents the altitude cost of the UAV at the j-th path point P j ;

[0023] Step 2.4. Minimize the smoothness cost:

[0024] Calculate the turning angle Φ and between two consecutive path segments using Equation (6): j :

[0025]

[0026] In Equation (6), P' j represents the projection point of the j-th path point P j on the oxy horizontal plane, and P' j+1 represents the projection point of the (j + 1)-th path point P j+1 on the oxy horizontal plane. represents the projection on the oxy horizontal plane of the vector formed by pointing from the j-th path point P j to the (j + 1)-th path point P j+1 . represents the projection on the oxy horizontal plane of the vector formed by pointing from the (j + 1)-th path point P j+1 to the (j + 2)-th path point P j+2 ;

[0027] Calculate the climb angle ψ between the UAV on the path segment and its projection j on the oxy horizontal plane using Equation (7):

[0028]

[0029] In Equation (7), z j represents at the j-th path point Pj The z-axis coordinate, z j+1 represents the z-axis coordinate at the (j + 1)-th path point P j+1 ;

[0030] Construct the smooth cost f4 of the UAV using Equation (8) and use it as the fourth objective function:

[0031]

[0032] In Equation (8), a1 and a2 are the penalty coefficients for the turning angle Φ j and the climbing angle ψ j respectively; represents the vector formed from the (j - 1)-th path point P ij to the j-th path point P j+1 ; represents the projection of the vector pointing from the (j - 1)-th path point P j to the j-th path point P j+1 on the oxy horizontal plane, ψ j-1 represents the climbing angle between the UAV on the path segment and its projection on the oxy horizontal plane ;

[0033] Construct the UAV path planning model using Equation (9):

[0034]

[0035] In Equation (9), J is the objective function of the UAV path, and b s is the weight coefficient of the s-th objective function f s ;

[0036] Step 3. Solve the UAV path planning model based on the improved hierarchical particle swarm algorithm:

[0037] Step 3.1. Initialize the population according to the obstacle information:

[0038] Step 3.1.1. Define the number of obstacles as K, define k1, k2, and k3 as the numbers of the obstacles, and initialize k1 = 1, k2 = k1 + 1, k3 = 1;

[0039] Step 3.1.2. Define the center of the k1-th obstacle as Define the center of the k2-th obstacle as Define the center of the k3-th obstacle as Define the radius of the k3-th obstacle as

[0040] Step 3.1.3: Determine whether k3 = k1 or k3 = k2 holds. If it holds, execute Step 3.1.5; otherwise, execute Step 3.1.4.

[0041] Step 3.1.4: Determine whether the perpendicular distance from the center of the k3-th obstacle to the line formed by the centers of the k1-th and k2-th obstacles is less than the radius of the k3-th obstacle If so, execute Step 3.1.7; otherwise, execute Step 3.1.5.

[0042] Step 3.1.5: Assign k3 + 1 to k3, and determine whether k3 ≤ K holds. If it holds, execute Step 3.1.3; otherwise, execute Step 3.1.6.

[0043] Step 3.1.6: Calculate the midpoint coordinates of the center of the k1-th obstacle and the center of the adjacent k2-th obstacle as

[0044] Step 3.1.7: After assigning k2 + 1 to k2, initialize k3 = 1, and determine whether k2 ≤ K holds. If it holds, execute Step 3.1.3; otherwise, execute Step 3.1.8.

[0045] Step 3.1.8: After assigning k1 + 1 to k1 and then k1 + 1 to k2, determine whether k1 ≤ K holds. If it holds, execute Step 3.1.3; otherwise, it means that all the midpoints between adjacent obstacles have been obtained and a midpoint list is formed. Denote the number of midpoints between all adjacent obstacles in the midpoint list as G, and execute Step 3.1.9.

[0046] Step 3.1.9: Add the end point E to the midpoint list, define g1 and g2 as the numbers of midpoints, and initialize g1 = 0 and g2 = 1.

[0047] Step 3.1.10: Define k as the number of the obstacle and initialize k = 1.

[0048] Step 3.1.11: Define the center of the k-th obstacle as Define the radius of the k-th obstacle as r k ;

[0049] Step 3.1.12: When g1 = 0, establish a line between the starting point S and the midpoint coordinates Otherwise, establish a line between the midpoint and the midpoint and the midpoint as

[0050] Step 3.1.13, determine or Whether it holds. If it holds, it means that the x-axis coordinate of the midpoint is increased relative to the x-axis coordinate of the midpoint . Execute Step 3.1.14; otherwise, execute Step 3.1.18;

[0051] Step 3.1.14, determine and Whether it holds. If it holds, it means that the y-axis coordinate of the midpoint is increased relative to the y-axis coordinate of the midpoint . Execute Step 3.1.15; otherwise, execute Step 3.1.18; where ε represents a fixed value;

[0052] Step 3.1.15, determine whether the perpendicular distance from the center of the k-th obstacle to the line is less than the radius r of the k-th obstacle k . If so, execute Step 3.1.18; otherwise, execute Step 3.1.16;

[0053] Step 3.1.16, assign k + 1 to k, and determine whether k ≤ K holds. If it holds, execute Step 3.1.12; otherwise, execute Step 3.1.17;

[0054] Step 3.1.17, when g1 = 0, record the midpoint coordinates as the reachable point of the starting point S. Otherwise, record the midpoint as the next reachable point of the midpoint ;

[0055] Step 3.1.18, assign g2 + 1 to g2, initialize k = 1, and determine whether g2 ≤ G + 1 holds. If it holds, execute Step 3.1.12; otherwise, execute Step 3.1.19;

[0056] Step 3.1.19, assign g1 + 1 to g1, initialize g2 = 1, and determine whether g1 ≤ G holds. If it holds, execute Step 3.1.12; otherwise, it means obtaining the reachable point list of the starting point S and each midpoint;

[0057] Step 3.1.20, define t as the current iteration number, let t max be the maximum iteration number, and initialize t = 1;

[0058] Step 3.1.21, define and initialize the population size as M, define i as the particle number, and initialize i = 1;

[0059] Step 3.1.22: Define and initialize the total number of path points as N, and initialize j = 1;

[0060] Define the velocity of the i-th particle in the (t - 1)-th generation population as and initialize it as a zero vector; where, represents the velocity of the j-th path point of the i-th particle in the (t - 1)-th generation;

[0061] Define the position of the i-th particle in the (t - 1)-th generation population as where, represents the position of the j-th path point of the i-th particle in the (t - 1)-th generation population;

[0062] Define the local optimal solution of the i-th particle in the (t - 1)-th generation population as where, represents the local optimal solution of the j-th path point of the i-th particle in the (t - 1)-th generation;

[0063] Define the global optimal solution of the (t - 1)-th generation population as where, represents the global optimal solution of the j-th path point of the (t - 1)-th generation population;

[0064] Step 3.1.23: When j = 1, let the starting point S be the j-th path point of the i-th particle in the (t - 1)-th generation population

[0065] Assume there exists a path point If there are L reachable points, the l-th reachable point of the j-th path point of the i-th particle in the (t - 1)-th generation is denoted as where, l = 1, 2,..., L;

[0066] Step 3.1.24: Calculate the distance between the j-th path point of the i-th particle in the (t - 1)-th generation population and its l-th reachable point as Thus, use Equation (10) to calculate the selection probability of the l-th reachable point of the j-th path point of the i-th particle in the (t - 1)-th generation

[0067]

[0068] Step 3.1.25: Let the randomly selected probability be a random number r between (0, 1). When , select the midpoint as the next reachable point of the j-th path point of the i-th particle in the (t - 1)-th generation population ;

[0069] When 2 ≤ l ≤ L - 1 and When select the midpoint as the next reachable point of the j-th path point of the i-th particle in the (t - 1)-th generation population;

[0070] When select the midpoint as the next reachable point of the j-th path point of the i-th particle in the (t - 1)-th generation population; thus obtaining the (j + 1)-th path point of the i-th particle in the (t - 1)-th generation population

[0071] Step 3.1.26, Assign j + 1 to j, and determine whether the j-th path point of the i-th particle in the (t - 1)-th generation population

[0072] is the end point. If so, it means a path from the starting point S to the end point E is found, and execute Step 3.1.28; otherwise, execute Step 3.1.27;

[0073] Step 3.1.27, Determine whether j < N holds. If it holds, execute Step 3.1.23; otherwise, a path from the starting point S to the end point E is not found. Let j = 1 and re - execute Step 3.1.23;

[0074]

[0075]

[0076]

[0077]

[0076] Step 3.1.30, Calculate the fitness value of the i-th particle in the (t - 1)-th generation using Equation (9); Step 3.1.31, Initialize the local optimal solution of the i-th particle in the (t - 1)-th generation

[0077] Step 3.1.32: Assign i + 1 to i, initialize j = 1, and determine whether i ≤ M holds. If it holds, execute Step 3.1.23; otherwise, it indicates that the iteration of the (t - 1)-th generation population is completed, and the initial global optimal solution of the (t - 1)-th generation population is obtained as

[0078] Step 3.2: Update the population using the hierarchical particle swarm algorithm;

[0079] Step 3.2.1: Obtain the inertia weight w for the t-th iteration according to Equation (11) t :

[0080]

[0081] In Equation (11), w 0 represents the initial value of the inertia weight;

[0082] Step 3.2.2: Define the first learning factor for the t-th iteration as and initialize it to a fixed value. Calculate the four learning factors for the t-th iteration according to Equations (12) - (14) and

[0083]

[0084]

[0085]

[0086] In Equations (12) and (13), c min is the minimum value of the learning factor, and c max is the maximum value of the learning factor;

[0087] Step 3.2.3: Calculate the fitness values of the t-th generation population using Equation (9), and sort the particles in the t-th generation population in ascending order according to the fitness values to obtain the sorted t-th generation population;

[0088] Step 3.2.4: Divide the sorted t-th generation population into three layers according to the fitness values, and divide the number of particles M in the t-th generation population into and Thus, calculate the number of particles in the first layer of the sorted t-th generation population according to Equations (15) - (17) The number of particles in the second layer and the number of particles in the third layer

[0089]

[0090]

[0091]

[0092] In equations (15)-(17), floor() is rounding down, ceil() is rounding up, and the parameters a1, a2, a3, and a4 take fixed values and satisfy a1 + a2 + a3 = 1;

[0093] Step 3.2.5. Initialize i = 1;

[0094] Step 3.2.6. Initialize j = 1;

[0095] Step 3.2.7. When i < n1, update the velocity of the i-th particle in the first layer of the t-th generation sorted population using equation (18)

[0096] When i < n1 + n2, update the velocity of the i-th particle in the second layer of the t-th generation sorted population using equation (19)

[0097] Otherwise, update the velocity of the i-th particle in the third layer of the t-th generation sorted population using equation (20)

[0098]

[0099]

[0100]

[0101] In equations (18)-(20), represents the position of the j-th path point of the i-th particle in the (t - 1)-th generation, α1 represents the serial number of the particle randomly selected from the first layer, represents the position of the j-th path point of the α1-th particle in the t-th generation, α2 represents the serial number of the particle randomly selected from the second layer, represents the position of the j-th path point of the α2-th particle in the t-th generation, represents the velocity of the j-th path point of the i-th particle in the (t - 1)-th generation, represents the velocity of the j-th path point of the i-th particle in the t-th generation, [ ] represents the local optimal solution of the j-th path point of the i-th particle in the (t - 1)-th generation, represents the global optimal solution of the j-th path point in the (t - 1)-th generation, w t represents the inertia weight of the t-th generation population, and are random numbers between (0, 1) for the t-th iteration;

[0102] Step 3.2.8: Calculate the new position of the $i$-th particle in the $t$-th generation using Equation (21).

[0103]

[0104] In Equation (21), represents the position of the $j$-th path point of the $i$-th particle in the sorted $t$-th generation population;

[0105] Step 3.2.9: Assign $j + 1$ to $j$, and determine whether $j\leq N$ holds. If it holds, execute Step 3.2.7; otherwise, it means the iteration of the $i$-th particle in the sorted $t$-th generation population is completed.

[0106] Step 3.2.10: Calculate the fitness value of the $i$-th particle in the $t$-th generation using Equation (9).

[0107] Step 3.2.11: Compare the fitness values of the $i$-th particle in the $t$-th generation population and the $(t - 1)$-th generation population, and select the position of the $i$-th particle with the smaller fitness value as the local optimal solution of the $i$-th particle in the $t$-th generation population.

[0108] Step 3.2.12: Assign $i + 1$ to $i$, and determine whether $i\leq M$ holds. If it holds, execute Step 3.2.6; otherwise, it means the iteration of the sorted $t$-th generation population is completed, and the global optimal solution of the $t$-th generation population is obtained as

[0109] Step 3.2.13: Assign $t + 1$ to $t$, and determine whether $t\leq t$ max holds. If it holds, execute Step 3.2.1; otherwise, it means the global optimal solution of the $t$ max -th generation population is obtained. And the path corresponding to the global optimal solution is the best path.

[0110] An electronic device according to the present invention includes a memory and a processor, characterized in that the memory is used to store a program for supporting the processor to execute the unmanned aerial vehicle path planning method described above, and the processor is configured to execute the program stored in the memory.

[0111] A computer-readable storage medium according to the present invention has a computer program stored thereon, characterized in that the computer program, when run by a processor, executes the steps of the unmanned aerial vehicle path planning method.

[0112] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0113] 1. The present invention proposes a method for initializing a population in path planning problems. By using the midpoint information of obstacles to initialize the population, individuals in the population can find multiple feasible paths during initialization, improving the diversity of the population and solving the drawback that only one or no feasible path can be found in the random initialization method.

[0114] 2. The present invention proposes a UAV path planning method based on a hierarchical particle swarm algorithm, which can improve the convergence speed of the algorithm, has good robustness, improves the accuracy and diversity of population search, enables the UAV to quickly plan a shorter path, and has more significant performance in solving the UAV three-dimensional path planning problem. At the same time, it is applicable to more complex UAV path planning problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0115] Figure 1 is a flowchart of the hierarchical particle swarm algorithm of the present invention;

[0116] Figure 2 is a schematic diagram of UAV path planning of the present invention;

[0117] Figure 3 is a schematic diagram of threat cost of the present invention;

[0118] Figure 4 is a schematic diagram of the calculation of turning angle and climbing angle of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0119] In an embodiment, a UAV path planning method based on a hierarchical particle swarm algorithm aims at the flight scenario of the UAV to find a path planning scheme that minimizes the path length, threat cost, altitude cost, and smoothness cost, enabling the UAV to avoid all obstacles and generate a high-quality near-optimal flight path from the starting point to the ending point. Specifically, as Figure 1 shown, the method is carried out according to the following steps:

[0120] Step 1: Obtain a target area, take a vertex of the circumscribed rectangle of the target area as the origin, take the two sides connected to the origin as the x-axis and y-axis respectively, and take the direction perpendicular to the oxy horizontal plane as the z-axis to establish a three-dimensional coordinate system. Specifically, as Figure 2 shown. Let P j represent the j-th path point of the UAV, and the coordinates of P j are (x j , y j , z j ). Let the coordinates of the starting point S be (x1, y1, z1), and let the coordinates of the ending point E be (x N , y N , z N );

[0121] Step 2: Construct the objective function:

[0122] Step 2.1, minimize the path length:

[0123] The first objective function is to minimize the flight distance of the UAV from the starting point to the end point. Generally speaking, the shorter the UAV path, the less time and fuel consumption required for flight. Using formula (1), we construct the path length f1 that minimizes the flight distance of the UAV from the starting point S to the end point E and use it as the first objective function:

[0124]

[0125] In formula (1), l j Indicates the path from the jth point P j To the j+1th path point P j+1 The Euclidean distance, N is the number of path points, N-1 is the number of path segments;

[0126] Step 2.2, minimize the threat cost function:

[0127] In addition to optimizing the path length, the drone also needs to avoid obstacles during flight to ensure safe flight. Assume that each threat is represented by a cylinder. Specifically, Figure 3 As shown in the figure, the threat cost f2 of drone flight is constructed using equations (2) and (3) and used as the second objective function:

[0128]

[0129]

[0130] In formula (2) and formula (3), K is the number of obstacles, R k is the radius of the kth obstacle, S is the danger distance of the collision zone, D is the diameter of the UAV, the diameter D is determined by the size of the UAV, and the distance S depends on several factors such as application, operating environment and positioning accuracy; Indicates the path from the jth point P ij To the j+1th path point P j+1 The vector d jk Represents a path segment The distance to the center of the k-th obstacle; T k (·) represents the threat cost of the k-th obstacle;

[0131] Step 2.3, minimize the height cost:

[0132] During the flight of the UAV, the flight altitude is often restricted between a given minimum altitude and maximum altitude. The altitude cost f3 of the UAV during flight is constructed using Equations (4) and (5) and used as the third objective function:

[0133]

[0134]

[0135] In Equations (4) and (5), h j represents the flight altitude of the UAV relative to the ground at the j-th path point P j , h min and h max are the minimum and maximum altitudes of the UAV flight respectively, and H j represents the altitude cost of the UAV at the j-th path point P j . This objective keeps the UAV at an average altitude and penalizes values outside the range.

[0136] Step 2.4. Minimize the smoothing cost:

[0137] The angle of the UAV is restricted due to its physical limitations and should not exceed the set maximum angle. The smoothing cost is used to evaluate the turning and climbing angles, which are necessary for generating a feasible path. Specifically, as Figure 4 shown, the turning angle Φ between two consecutive path segments and j is calculated using Equation (6):

[0138]

[0139] In Equation (6), P' j represents the projection point of the j-th path point P j on the oxy horizontal plane, and P' j+1 represents the projection point of the (j + 1)-th path point P j+1 on the oxy horizontal plane. represents the projection on the oxy horizontal plane of the vector formed by pointing from the j-th path point P j to the (j + 1)-th path point P j+1 , and represents the projection on the oxy horizontal plane of the vector formed by pointing from the (j + 1)-th path point P j+1 to the (j + 2)-th path point P j+2 ;

[0140] The climbing angle ψ between the UAV on the path segment and its projection j on the oxy horizontal plane is calculated using Equation (7):

[0141]

[0142] In Equation (7), z j represents the z-axis coordinate at the j-th path point P j , and z j+1 represents the z-axis coordinate at the (j + 1)-th path point P j+1 ;

[0143] Construct the smooth cost f4 of the UAV using Equation (8) and use it as the fourth objective function:

[0144]

[0145] In Equation (8), a1 and a2 are the penalty coefficients for the turning angle Φ j and the climbing angle ψ j respectively; represents the vector formed from the (j - 1)-th path point P ij to the j-th path point P j+1 , represents the projection of the vector pointing from the (j - 1)-th path point P j to the j-th path point P j+1 on the oxy horizontal plane, and ψ j-1 represents the climbing angle between the UAV on the path segment and its projection on the oxy horizontal plane ;

[0146] Model the UAV path planning problem as a minimization problem defined by a set of optimization criteria and constraints. The cost function of the UAV path is defined as the weighted sum of four objective functions. Use Equation (9) to construct the UAV path planning model:

[0147]

[0148] In Equation (9), J is the objective function of the UAV path, and b s is the weight coefficient of the s-th objective function f s , and f1 to f4 are the costs related to path length, threat, flight altitude, and smoothness respectively;

[0149] Step 3. Solve the UAV path planning model based on the improved hierarchical particle swarm optimization algorithm. The particle swarm optimization algorithm is an intelligent optimization algorithm. In the present invention, the particles are mainly divided into three layers to improve the search accuracy and diversity, so that the hierarchical particle swarm optimization algorithm can better solve the UAV path planning problem. The hierarchical particle swarm optimization algorithm is carried out according to the following steps:

[0150] Step 3.1. Initialize the population according to the obstacle information:

[0151] Step 3.1.1: Define the number of obstacles as K, define k1, k2, and k3 as the numbers of the obstacles, and initialize k1 = 1, k2 = k1 + 1, and k3 = 1;

[0152] Step 3.1.2: Define the center of the k1-th obstacle as Define the center of the k2-th obstacle as Define the center of the k3-th obstacle as Define the radius of the k3-th obstacle as

[0153] Step 3.1.3: Determine whether k3 = k1 or k3 = k2 holds. If it holds, execute Step 3.1.5; otherwise, execute Step 3.1.4;

[0154] Step 3.1.4: Determine whether the perpendicular distance from the center of the k3-th obstacle to the line formed by the centers of the k1-th and k2-th obstacles is less than the radius of the k3-th obstacle If so, execute Step 3.1.7; otherwise, execute Step 3.1.5;

[0155] Step 3.1.5: Assign k3 + 1 to k3, and determine whether k3 ≤ K holds. If it holds, execute Step 3.1.3; otherwise, execute Step 3.1.6;

[0156] Step 3.1.6: Calculate the midpoint coordinates of the center of the k1-th obstacle and the center of its adjacent k2-th obstacle

[0157] as Step 3.1.7: After assigning k2 + 1 to k2, initialize k3 = 1, and determine whether k2 ≤ K holds. If it holds, execute Step 3.1.3; otherwise, execute Step 3.1.8;

[0158] Step 3.1.8: After assigning k1 + 1 to k1 and k1 + 1 to k2, determine whether k1 ≤ K holds. If it holds, execute Step 3.1.3; otherwise, it means that all the midpoints between adjacent obstacles are obtained and a midpoint list is formed, and the number of midpoints between all adjacent obstacles in the midpoint list is denoted as G, then execute Step 3.1.9;

[0159] Step 3.1.9: Add the end point E to the end of the midpoint list, define g1 and g2 as the numbers of the midpoints, and initialize g1 = 0 and g2 = 1;

[0160] Step 3.1.10, define k as the number of the obstacle and initialize k = 1;

[0161] Step 3.1.11. Define the center of the k-th obstacle as Define the radius of the kth obstacle as r k ;

[0162] Step 3.1.12: When g1=0, establish the coordinates of the starting point S and the midpoint The straight line between Otherwise, establish the midpoint coordinates and midpoint coordinates The straight line between

[0163] Step 3.1.13, judgment or Is it true? If true, it indicates the midpoint The x-axis coordinate is relative to the midpoint If the x-axis coordinate is increasing or decreasing in a small range, proceed to step 3.1.14; otherwise, proceed to step 3.1.18;

[0164] Step 3.1.14, judgment and Is it true? If true, it indicates the midpoint The y-axis coordinate relative to the midpoint If the y-axis coordinate is increasing or decreasing in a small range, execute step 3.1.15; otherwise, execute step 3.1.18; where ε represents a relatively small fixed value;

[0165] Step 3.1.15: Determine the center of the kth obstacle To the straight line Is the vertical distance less than the radius r of the kth obstacle? k If yes, go to step 3.1.18; otherwise, go to step 3.1.16;

[0166] Step 3.1.16. Assign k + 1 to k and determine whether k ≤ K. If so, proceed to step 3.1.12; otherwise, proceed to step 3.1.17.

[0167] Step 3.1.17: When g1 = 0, record the midpoint coordinates is the reachable point of the starting point S, otherwise, the midpoint midpoint The next reachable point; the midpoint and midpoint If the line connecting the two points does not touch any obstacle, it is called the midpoint. for reachable point.

[0168] Step 3.1.18: Assign \(g2 + 1\) to \(g2\), initialize \(k = 1\), and determine whether \(g2\leq G + 1\) holds. If it holds, execute Step 3.1.12; otherwise, execute Step 3.1.19;

[0169] Step 3.1.19: Assign \(g1 + 1\) to \(g1\), initialize \(g2 = 1\), and determine whether \(g1\leq G\) holds. If it holds, execute Step 3.1.12; otherwise, it means that the reachable point list of the starting point S and each midpoint is obtained;

[0170] Step 3.1.20: Define \(t\) as the current iteration number, let \(t\) max be the maximum number of iterations, and initialize \(t = 1\);

[0171] Step 3.1.21: Define and initialize the population size as \(M\), define \(i\) as the particle number, and initialize \(i = 1\);

[0172] Step 3.1.22: Define and initialize the total number of path points as \(N\), and initialize \(j = 1\);

[0173] Define the velocity of the \(i\)-th particle in the \((t - 1)\)-th generation population as and initialize it as a zero vector; where, [[ID=2,3]]represents the velocity of the \(j\)-th path point of the \(i\)-th particle in the \((t - 1)\)-th generation;[[ID=2,4]] [[ID=2,5]]

[0174] [[ID=2,6]]Define the position of the \(i\)-th particle in the \((t - 1)\)-th generation population as [[ID=2,7]] [[ID=2,8]] [[ID=2,9]]where, [[ID=2,10]] [[ID=2,11]]represents the position of the \(j\)-th path point of the \(i\)-th particle in the \((t - 1)\)-th generation population;[[ID=2,12]] [[ID=2,13]]

[0175] [[ID=2,14]]Define the local optimal solution of the \(i\)-th particle in the \((t - 1)\)-th generation population as [[ID=2,15]] [[ID=2,16]]where, [[ID=2,17]] [[ID=2,18]]represents the local optimal solution of the \(j\)-th path point of the \(i\)-th particle in the \((t - 1)\)-th generation;[[ID=2,19]] [[ID=2,20]]

[0176] [[ID=2,21]]Define the global optimal solution of the \((t - 1)\)-th generation population as [[ID=2,22]] [[ID=2,23]]where, [[ID=2,24]] [[ID=2,25]]represents the global optimal solution of the \(j\)-th path point of the \((t - 1)\)-th generation population;[[ID=2,26]] [[ID=2,27]]

[0177] [[ID=2,28]]Step 3.1.23: When \(j = 1\), the starting point S is the \(j\)-th path point of the \(i\)-th particle in the \((t - 1)\)-th generation population [[ID=2,29]] [[ID=2,30]] [[ID=2,31]]

[0178] [[ID=2,32]]Assume there is a path point [[ID=2,33]] [[ID=2,34]]If there are \(L\) reachable points, the \(l\)-th reachable point of the \(j\)-th path point of the \(i\)-th particle in the \((t - 1)\)-th generation is denoted as [[ID=2,35]] [[ID=2,36]]where \(l = 1, 2,\cdots, L\);

[0179] Step 3.1.24, Calculate the distance between the j-th path point of the i-th particle in the (t-1)-th generation population and its l-th reachable point as For multiple reachable points, try to select the point with a shorter distance. The shorter the distance, the greater the probability of being selected. Use Equation (10) to calculate the selection probability of the l-th reachable point of the j-th path point of the i-th particle in the (t-1)-th generation

[0180]

[0181] Step 3.1.25, Let the randomly selected probability be a random number r between (0, 1). When , select the midpoint as the next reachable point of the j-th path point of the i-th particle in the (t-1)-th generation population ;

[0182] When 2 ≤ l ≤ L - 1 and , select the midpoint as the next reachable point of the j-th path point of the i-th particle in the (t-1)-th generation population ;

[0183] When , select the midpoint as the next reachable point of the j-th path point of the i-th particle in the (t-1)-th generation population ; thus obtaining the (j + 1)-th path point of the i-th particle in the (t-1)-th generation population

[0184] Step 3.1.26, Assign j + 1 to j, and determine whether the j-th path point of the i-th particle in the (t-1)-th generation population is the end point. If so, it means that a path from the starting point to the end point is found, and execute Step 3.1.28; otherwise, execute Step 3.1.27;

[0185] Step 3.1.27, Determine whether j < N holds. If it holds, execute Step 3.1.23; otherwise, it means that the number of found path points reaches N, and no path from the starting point to the end point is found. Let j = 1 and re-execute Step 3.1.23;

[0186] Step 3.1.28, Determine whether j < N holds. If it holds, it means that the number of found path points is less than N, and execute Step 3.1.29; otherwise, it means that the iteration of the i-th particle in the (t-1)-th generation population is completed, and the initial position of the i-th particle in the (t-1)-th generation population is obtained and execute Step 3.1.30;

[0187] Step 3.1.29: Divide the last path segment into N - j + 1 segments to obtain N - j points, which are used as the remaining N - j path points; thus, the iteration of the i-th particle in the (t - 1)-th generation of the population is completed, and the initial position of the i-th particle in the (t - 1)-th generation of the population is obtained

[0188] Step 3.1.30: Calculate the fitness value of the i-th particle in the (t - 1)-th generation using Equation (9);

[0189] Step 3.1.31: Initialize the local optimal solution of the i-th particle in the (t - 1)-th generation as the initial position of the i-th particle in the (t - 1)-th generation of the population

[0190] Step 3.1.32: Assign i + 1 to i, initialize j = 1, and determine whether i ≤ M holds. If it holds, execute Step 3.1.23; otherwise, it means that the iteration of the (t - 1)-th generation of the population is completed, and the initial global optimal solution of the (t - 1)-th generation of the population is

[0191] Step 3.2: Update the population using the hierarchical particle swarm optimization algorithm;

[0192] Step 3.2.1: w t Adopts an exponential form and changes dynamically and non-linearly. The inertia weight for the t-th iteration is obtained according to Equation (11) as w t :

[0193]

[0194] In Equation (11), w 0 represents the initial value of the inertia weight;

[0195] Step 3.2.2: Define the first learning factor for the t-th iteration as and initialize it to a fixed value. Calculate the four learning factors for the t-th iteration according to Equations (12) - (14) and

[0196]

[0197]

[0198]

[0199] In Equations (12) and (13), c min is the minimum value of the learning factor, and c max is the maximum value of the learning factor; At the minimum value cmin and the maximum value c max decreases with the increase of the number of iterations between them, and increases between the minimum value c min and the maximum value c max with the increase of the number of iterations;

[0200] Step 3.2.3: Calculate the fitness value of the t-th generation population using Equation (9), and sort the particles in the t-th generation population in ascending order according to the fitness value to obtain the sorted t-th generation population;

[0201] Step 3.2.4: Divide the sorted t-th generation population into three layers according to the fitness value, and divide the number of particles M in the t-th generation population into and Thus, calculate the number of particles in the first layer of the sorted t-th generation population, the number of particles in the second layer, and the number of particles in the third layer according to Equations (15)-(17) respectively the number of particles in the second layer and the number of particles in the third layer

[0202]

[0203]

[0204]

[0205] In Equations (15)-(17), floor() is rounding down, ceil() is rounding up, the parameters a1, a2, a3, and a4 take fixed parameters, and satisfy a1 + a2 + a3 = 1; n1 and n3 change with the number of iterations, and n2 remains fixed during the iteration. At the beginning of the iteration, it is necessary to improve the diversity of the particles, so n1 is set relatively small and n3 is relatively large. At the later stage of the iteration, the particles need to improve the search accuracy, so n1 is relatively large and n3 is relatively small. n1 slowly increases with the number of iterations, and n3 slowly decreases with the number of iterations.

[0206] Step 3.2.5: Initialize i = 1;

[0207] Step 3.2.6: Initialize j = 1;

[0208] Step 3.2.7: When i < n1, update the velocity of particle i in the first layer of the sorted t-th generation population using Equation (18)

[0209] When i < n1 + n2, update the velocity of particle i in the second layer of the sorted t-th generation population using Equation (19)

[0210] Otherwise, update the velocity of the third - layer particle \(i\) of the \(t\) - th generation sorted population using Equation (20).

[0211]

[0212]

[0213]

[0214] In Equations (18) - (20), represents the position of the \(j\) - th path point of the \(i\) - th particle in the \((t - 1)\) - th generation, \(\alpha_1\) represents the serial number of the particle randomly selected from the first layer, represents the position of the \(j\) - th path point of the \(\alpha_1\) - th particle in the \(t\) - th generation, \(\alpha_2\) represents the serial number of the particle randomly selected from the second layer, represents the position of the \(j\) - th path point of the \(\alpha_2\) - th particle in the \(t\) - th generation, represents the velocity of the \(j\) - th path point of the \(i\) - th particle in the \((t - 1)\) - th generation, represents the velocity of the \(j\) - th path point of the \(i\) - th particle in the \(t\) - th generation, represents the local optimal solution of the \(j\) - th path point of the \(i\) - th particle in the \((t - 1)\) - th generation, represents the global optimal solution of the \(j\) - th path point in the \((t - 1)\) - th generation, \(w\) t represents the inertia weight of the \(t\) - th generation population, and are random numbers between \((0,1)\) for the \(t\) - th iteration;

[0215] The first layer consists of particles with better fitness. The particles in this layer mainly perform global search, learn from the global optimal solution, and improve the search accuracy. The fitness values of the particles in the second layer are moderate. They learn from both the global optimal solution and the local optimal solution at the same time. The fitness values of the particles in the third layer are poor. The particles in this layer randomly select two individuals from the first and second layers to guide the current individual, mainly to increase the diversity of the particles.

[0216] Step 3.2.8: Calculate the new position of the \(i\) - th particle in the \(t\) - th generation using Equation (21)

[0217]

[0218] In Equation (21), represents the position of the \(j\) - th path point of the \(i\) - th particle in the \(t\) - th generation sorted population;

[0219] Step 3.2.9: Assign \(j + 1\) to \(j\), and judge whether \(j\leq N\) holds. If it holds, execute Step 3.2.7; otherwise, it means that the iteration of the \(i\) - th particle in the \(t\) - th generation sorted population is completed.

[0220] Step 3.2.10: Calculate the fitness value of the \(i\)-th particle in the \(t\)-th generation population using Equation (9);

[0221] Step 3.2.11: Compare the fitness values of the \(i\)-th particle in the \(t\)-th generation population and the \((t - 1)\)-th generation population, and select the position of the \(i\)-th particle with the smaller fitness value as the local optimal solution of the \(i\)-th particle in the \(t\)-th generation population

[0222] Step 3.2.12: Assign \(i + 1\) to \(i\), and determine whether \(i\leq M\) holds. If it holds, execute Step 3.2.6; otherwise, it means that the iteration of the sorted \(t\)-th generation population is completed, and the global optimal solution of the \(t\)-th generation population is obtained as

[0223] Step 3.2.13: Assign \(t + 1\) to \(t\), and determine whether \(t\leq t\) max holds. If it holds, execute Step 3.2.1; otherwise, it means that the global optimal solution of the \(t\)-th generation population is obtained max and the path corresponding to the global optimal solution is the best path. and use the global optimal solution as the best path.

[0224] In this embodiment, an electronic device includes a memory and a processor. The memory is used to store a program that supports the processor to execute the UAV path planning method, and the processor is configured to execute the program stored in the memory.

[0225] In this embodiment, a computer-readable storage medium stores a computer program, and when the computer program is run by a processor, it executes the steps of the UAV path planning method.

Claims

1. An unmanned aerial vehicle path planning method based on a hierarchical particle swarm algorithm, characterized in that, It is carried out according to the following steps: Step 1: Obtain a target area, and establish a three-dimensional coordinate system with a vertex of the circumscribed rectangle of the target area as the origin, the two sides connected to the origin as the x-axis and y-axis respectively, and the direction perpendicular to the oxy horizontal plane as the z-axis; let represent the th path point of the drone, the coordinates of which are , let the coordinates of the starting point S be , and let the coordinates of the ending point E be ; Step 2: Construct the objective function: Step 2.1: Minimize the path length: Construct the path length that minimizes the flight distance of the UAV from the starting point S to the ending point E using Equation (1) , and use it as the first objective function: (1) In formula (1), represents the Euclidean distance from the th path point to the th path point , is the number of path points, is the number of path segments; Step 2.2: Minimize the threat cost function: Construct the threat cost of UAV flight using Equation (2) and Equation (3) , and use it as the second objective function: (2) (3) In formulas (2) and (3), is the number of obstacles, is the radius of the th obstacle, is the dangerous distance of the collision area, and D is the diameter of the UAV, represents the vector formed from the th path point to the th path point ; represents the path segment to the distance between the centers of the th obstacle; represents the threat cost of the th obstacle. Step 2.3: Minimize the height cost: Construct the altitude cost of the UAV during flight using Equation (4) and Equation (5) , and use it as the third objective function: (4) (5) In Equations (4) and (5), represents the flight altitude of the UAV relative to the ground at the th waypoint, and and are the minimum and maximum altitudes of the UAV flight respectively, represents the altitude cost of the UAV at the th waypoint, ; Step 2.4: Minimize the smoothness cost: Calculate the turning angle between two consecutive path segments using Equation (6) and :​ (6) In formula (6), represents the projection point of the th path point on the oxy horizontal plane, represents the projection point of the th path point on the oxy horizontal plane, represents the projection on the oxy horizontal plane of the vector formed by the th path point pointing to the th path point ; represents the projection on the oxy horizontal plane of the vector formed by the th path point pointing to the th path point ; Calculate the climb angle of the drone in the path segment using Equation (7) and its projection on the oxy horizontal plane between : (7) In formula (7), represents the axis coordinate of the th path point , and represents the axis coordinate of the th path point ; Construct the smooth cost of the UAV using Equation (8) , and use it as the fourth objective function: (8) In Equation (8), and are the penalty coefficients of the turning angle and the climbing angle respectively; denotes the vector formed from the th path point to the th path point ; denotes the projection of the vector pointing from the th path point to the th path point on the oxy horizontal plane; denotes the climbing angle between the UAV on the path segment and its projection on the oxy horizontal plane; Use Equation (9) to construct the UAV path planning model: (9) In formula (9), is the objective function of the UAV path, is the th objective function 's weight coefficient; Step 3: Solve the UAV path planning model based on the improved hierarchical particle swarm optimization algorithm: Step 3.1: Initialize the population according to the obstacle information: Step 3.1.1: Define the number of obstacles as , define , , as the numbers of the obstacles, and initialize , , ; Step 3.1.2, define the center of the th obstacle as , define the center of the th obstacle as , define the center of the th obstacle as , define the radius of the th obstacle as ; Step 3.1.3, determine or is established. If it is established, execute Step 3.1.5; otherwise, execute Step 3.1.4; Step 3.1.4, according to the line formed by the center of the th obstacle to the center of the th obstacle ; Determine whether the perpendicular distance from the center of the th obstacle to the line is less than the radius of the th obstacle , if so, execute Step 3.1.7; otherwise, execute Step 3.1.5; Step 3.1.5, assign to , and judge whether holds. If it holds, execute Step 3.1.3; Otherwise, execute Step 3.1.6; Step 3.1.6, calculate the center of the nth obstacle, and the midpoint coordinate of the center of the adjacent (n + 1)th obstacle is Step 3.1.7, after assigning to , initialize , and determine whether holds. If it holds, execute Step 3.1.3; Otherwise, execute Step 3.1.8; Step 3.1.8, after assigning to , assign to , and determine whether holds. If it holds, execute Step 3.1.3; otherwise, it means that the midpoints between all adjacent obstacles are obtained and a midpoint list is formed, and the number of midpoints between all adjacent obstacles in the midpoint list is denoted as , and execute Step 3.1.9; Step 3.1.9: Add the end point E to the midpoint list, define , as the number of the midpoint, and initialize , ; Step 3.1.10, Define as the number of the obstacle and initialize ; Step 3.1.11, define the center of the th obstacle as , and define the radius of the th obstacle as ; Step 3.1.12, when , establish a straight line between the starting point S and the midpoint coordinates . Otherwise, establish a straight line between the midpoint and the midpoint ; [[ID=!2]]; Step 3.1.13, determine or is established. If it is established, it means that the of the axis coordinate relative to the midpoint of the axis coordinate is increasing, execute Step 3.1.14; otherwise, execute Step 3.1.18; Step 3.1.14, determine and hold. If so, it means that the abscissa of the midpoint relative to the midpoint ordinate is increasing, then execute Step 3.1.15; otherwise, execute Step 3.1.18; where represents a fixed value; Step 3.1.15, determine whether the vertical distance from the center of the th obstacle to the straight line is less than the radius of the th obstacle . If so, execute Step 3.1.18; otherwise, execute Step 3.1.16; Step 3.1.16, assign to , and determine whether holds. If it holds, execute Step 3.1.12; otherwise, execute Step 3.1.17; Step 3.1.17, when occurs, record the midpoint coordinates as the reachable point of the starting point S; otherwise, record the midpoint as the midpoint 's next reachable point; Step 3.1.18, assign to , initialize , and determine whether holds. If it holds, execute Step 3.1.12; otherwise, execute Step 3.1.19; Step 3.1.

19. Assign to , initialize , and determine whether holds. If it holds, execute Step 3.1.12; otherwise, it means that the starting point S and the reachable point list of each midpoint are obtained. Step 3.1.20, Define as the current iteration number, and let be the maximum iteration number, and initialize ; Step 3.1.21, define and initialize the population size as , define as the particle number, and initialize ; Step 3.1.22, define and initialize the total number of path points as , and initialize ; Define the velocity of the th particle in the th generation population as and initialize it as a zero vector; where represents the th particle in the th generation and the th velocity of the th path point; Define the position of the th particle in the th generation population as ; where represents the position of the th path point of the th particle in the th generation population. Define the local optimal solution of the ith particle in the th generation population as ; where represents the th local optimal solution of the th path point of the ith particle in the th generation population; Define the global optimal solution of the generation population as ; where represents the global optimal solution of the -th path point of the -th generation population; Step 3.1.23, when occurs, let the starting point S be the th generation population's th particle's th path point ; Assume there are path points There are reachable points, then the generation, the th particle, the th path point, and the th reachable point is denoted as , where ; Step 3.1.24, calculate the distance between the th particle of the th generation population and its th reachable point as ; then use Equation (10) to calculate the selection probability of the th reachable point of the th particle of the th generation: :​ (10) Step 3.1.25, let the probability of random selection be a random number between , when , select the midpoint as the next reachable point of the th generation population's th particle's th path point . When and select the midpoint as the next reachable point of the th particle of the th generation population ; When select the midpoint as the next reachable point of the th path point of the th particle in the generation population; thus obtaining the th path point of the th particle in the generation population ; Step 3.1.26, assign to , and determine whether the -th particle of the -th generation population reaches the -th path point which is the end point. If so, it means that a path from the start point S to the end point E is found, and step 3.1.28 is executed; otherwise, step 3.1.27 is executed. Step 3.1.27, determine whether it holds. If it holds, execute Step 3.1.23; otherwise, no path from the starting point S to the ending point E is found. Let , and execute Step 3.1.23 again; Step 3.1.28, determine whether it holds. If it holds, it means that the number of path points found is less than N, and step 3.1.29 is executed; otherwise, it means that the iteration of the th generation population for the th particle is completed, and the initial position of the th generation population for the th particle is obtained , and step 3.1.30 is executed; Step 3.1.29, divide the last path segment into segments to obtain points, and use them as the remaining path points; thus completing the iteration of the generation population's th particle, and obtaining the initial position of the generation population's th particle ; Step 3.1.30, calculate the fitness value of the th generation and the th particle using Equation (9); Step 3.1.31, initialize the local optimal solution of the th particle of the generation as the initial position of the th particle of the population of the generation ; Step 3.1.32, assign to , initialize , and determine whether holds. If it holds, execute Step 3.1.23; otherwise, it means that the iteration of the th generation population is completed, and the initial global optimal solution of the th generation population is ; Step 3.2: Update the population using the hierarchical particle swarm optimization algorithm; Step 3.2.

1. Obtain the inertial weight for the th iteration according to Equation (11) as : (11) In formula (11), represents the initial value of the inertia weight; Step 3.2.2, define the first learning factor for the th iteration as and initialize it to a fixed value. Calculate the four learning factors for the th iteration according to Equations (12)-(14): , , and : (12) (13) (14) In formulas (12) and (13), is the minimum value of the learning factor, is the maximum value of the learning factor; Step 3.2.3: Calculate the fitness values of the -th generation population using Equation (9), and perform ascending sorting on the particles in the -th generation population according to the fitness values to obtain the sorted -th generation population; Step 3.2.

4. Divide the sorted -th generation population into three layers according to the fitness value, and divide the number of particles in the -th generation population into , and . Then, calculate the number of particles in the first layer , the number of particles in the second layer and the number of particles in the third layer of the sorted -th generation population respectively according to Equations (15)-(17); (15) (16) (17) In Formula (15) - Formula (17), is floor function, is ceiling function, and the parameters , , and take fixed parameters and satisfy ; Step 3.2.5, Initialization ; Step 3.2.6, Initialization ; Step 3.2.7, when occurs, update the velocity of the first-layer particles of the th-generation population after sorting using Equation (18) ; When , update the velocity of the second-layer particles of the th generation population after sorting using Equation (19) ; ​ Otherwise, update the velocity of the third-layer particles of the generation population after sorting using Equation (20) ; ​ (18) (19) (20) In formulas (18)-(20), represents the position of the th path point of the th particle, represents the serial number of the particle randomly selected from the first layer, represents the position of the th path point of the th particle, represents the serial number of the particle randomly selected from the second layer, represents the position of the th path point of the th particle, represents the speed of the th path point of the th particle, [[ID= (37)]] represents the speed of the th path point of the th particle, represents the local optimal solution of the th path point of the th particle, represents the global optimal solution of the th path point of the th generation, represents the inertial weight of the , , , and are random numbers between the th iteration ; Step 3.2.8, calculate the new position of the -th particle using Equation (21) ; (21) In formula (21), represents the th generation of the sorted th particle's th path point position; Step 3.2.9, assign to , and judge whether holds. If it holds, execute Step 3.2.7; otherwise, it means that the iteration of the th generation of the population for the th particle is completed. Step 3.2.10, calculate the fitness value of the th particle in the th generation population using Equation (9); Step 3.2.

11. Compare the fitness values of the -th generation population and the -th generation population for the -th particle, and select the position of the -th particle with the smaller fitness value as the local optimal solution of the -th generation population for the -th particle ; Step 3.2.

12. Assign to , and determine whether holds. If it holds, execute Step 3.2.6; otherwise, it means that the iteration of the th generation population after sorting is completed, and the global optimal solution of the th generation population is . Step 3.2.

13. Assign to , and determine whether holds. If it holds, execute Step 3.2.1; otherwise, it means obtaining the global optimal solution of the generation population , and take the path corresponding to the global optimal solution as the best path.

2. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor to execute the UAV path planning method described in Claim 1, and the processor is configured to execute the program stored in the memory.

3. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run by the processor, it executes the steps of the UAV path planning method described in Claim 1.

Citation Information

Patent Citations

  • Engineering machinery entering path planning method and path planning apparatus

    CN103017757A

  • Underwater robot path planning method

    CN110906936A