An unmanned aerial vehicle path planning method and system based on adaptive multi-subgroup optimization
Patent Information
- Application Number
- CN202611498448.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-11-03
AI Technical Summary
Existing UAV path planning methods are crude in handling obstacle safety boundaries, resulting in excessive compression of narrow passages. Furthermore, multi-subgroup particle swarm optimization algorithms have insufficient convergence and are strongly constrained by the initial path topology, making it difficult to optimize path quality and speed.
An adaptive multi-subgroup optimization method is adopted, which optimizes the path node position by determining the relative orientation of obstacles and selecting candidate vertices, combined with an improved particle swarm algorithm that incorporates three-subgroup differential search, dynamic switching of node-level search domain, and the Arctic puffin search mechanism.
It improves the quality and convergence efficiency of path optimization, enhances the global search capability of the algorithm, reduces the probability of the particle swarm getting trapped in local optima, and achieves better path planning.
Smart Images

Figure CN123028611A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) path planning technology, and in particular to a UAV path planning method and system based on adaptive multi-subgroup optimization. Background Technology
[0002] Existing UAV path planning methods typically include graph search methods and particle swarm optimization methods. Graph search methods can construct a path graph based on obstacle vertices, path start points, and path end points in the environment, and quickly obtain an initial feasible path through a shortest path search algorithm; particle swarm optimization algorithms can further improve indicators such as path length, safety distance, and turning angles by adjusting the positions of path nodes.
[0003] Current hybrid path planning methods first use graph search algorithms such as Dijkstra's algorithm to obtain an initial path, and then use particle swarm optimization (PSO) to optimize the nodes in the initial path. This type of method can combine the determinism of graph search algorithms with the global search capability of PSO.
[0004] However, the above methods still have problems in practical applications. For example, existing methods handle obstacle safety boundaries in a coarse manner, typically using a uniform safety distance to expand all obstacles as a whole to ensure a safe distance between the path and obstacles. However, this approach does not distinguish the relative positional relationship between obstacles and the path, and also unnecessarily expands the boundaries of obstacle areas unrelated to the planned path. This can easily cause narrow passages that originally met the conditions for safe passage to be over-compressed, or even become impassable areas, thus compressing the search space for feasible paths and resulting in insufficient passage in narrow passages.
[0005] Furthermore, existing multi-subgroup particle swarm optimization (PSO) algorithms typically exchange optimal information on a per-particle or per-subgroup basis. This makes it difficult to adjust the local search regions corresponding to individual path nodes based on the optimization results of the entire path. This can lead to some nodes being confined to unsuitable search directions for extended periods, affecting the algorithm's convergence speed and path optimization quality. Especially after obtaining the initial path using a graph search algorithm, if the PSO algorithm only updates within a fixed line segment, fixed neighborhood, or a single search direction corresponding to the initial path nodes, the topology and local node positions of the initial path will strongly constrain subsequent optimization results. When the initial search region does not cover better obstacle avoidance directions, the PSO algorithm may iterate within the current local region for a long time, making it difficult to obtain a path with a lower overall path cost. Summary of the Invention
[0006] To address the technical problems of coarse obstacle safety boundary processing, insufficient convergence of multi-subgroup particle swarm optimization, and strong initial path constraints in existing technologies, this invention provides a UAV path planning method based on adaptive multi-subgroup optimization. On the one hand, it achieves refined obstacle safety processing through two-level screening of relative obstacle orientation and candidate vertices, avoiding excessive safety boundary processing for all obstacles. On the other hand, it overcomes the initial path topological constraints and solves the premature convergence problem by integrating a three-subgroup differentiated search, dynamic switching of node-level search domain, and the Arctic Puffin search mechanism into an improved particle swarm algorithm.
[0007] On the one hand, a method for UAV path planning based on adaptive multi-subgroup optimization is provided, including: Acquire two-dimensional horizontal plane operational environment information of the UAV; Based on the coordinates of the four vertices and center point of any two rectangular obstacles, determine the relative orientation of the first obstacle and the second obstacle; based on the relative orientation, lateral width, and preset minimum safety distance, determine the prohibited obstacle vertex pairs; based on the prohibited obstacle vertex pairs and the path graph node set, generate a weighted undirected obstacle vertex path graph; In the weighted undirected obstacle vertex path graph, Dijkstra's algorithm is run to obtain the initial shortest path from the path start point to the path end point; the set of obstacle vertices traversed on the initial shortest path is merged with the set of neighboring threatening obstacle vertices around the initial path as a candidate optimized vertex set. An improved particle swarm optimization algorithm is used to initialize and iteratively optimize the path nodes around the candidate optimization vertex set until the iteration termination condition is met, and the optimal path is output.
[0008] Preferably, an improved particle swarm optimization algorithm is used to initialize and iteratively optimize the path around each path node corresponding to the candidate optimization vertex set until the iteration termination condition is met, and the optimal path is output; specifically: Step 1: Initialize candidate optimization vertex positions using tri-subgroup differential search, and assign different search domains and initial velocities; Step 2: Calculate the fitness value of the candidate path corresponding to each particle using the comprehensive fitness evaluation function, determine the initial position of each particle as the initial individual optimal position of the particle, and select the particle with the smallest fitness value in each subgroup as the initial global optimal particle of the subgroup. Step 3: During the iteration, the velocity and position of each particle are updated using the velocity update formula that incorporates the Arctic Puffin search mechanism; Step 4: Based on the globally optimal particles of the three subgroups, select and combine them node by node according to probability weighting to form a hybrid optimal particle; select the subgroup with the largest fitness value of the globally optimal particle. If its fitness value is greater than the fitness value of the hybrid optimal particle, switch the corresponding search domain for the subgroup; for the subgroup with the switched search domain, retain the particle nodes in the subgroup whose search domain is the same as the node corresponding to the hybrid optimal particle; for all corresponding nodes of the subgroup whose search domain is different from the node of the hybrid particle, reinitialize all corresponding nodes of the subgroup according to the search domain of the hybrid particle; re-evaluate the fitness of all particles of the subgroup with the changed search domain, take the hybrid optimal particle as its globally optimal particle, and compare whether the current particle fitness of the subgroup is lower than the individual's historical best fitness. If it is lower, update the individual particle's historical best position. Step 5: Each subgroup adaptively scales the search domain based on the coordinate difference between the path node of its best particle and the corresponding obstacle vertex, and removes the particle with the highest fitness from all subgroups. Each subgroup introduces a new particle and initializes its position and velocity to evaluate the particle's fitness. Repeat steps 3-5 until the iteration termination condition is met or the global optimal fitness value of the population no longer changes, and output the path represented by the historical best particle of the population.
[0009] Preferably, the comprehensive fitness evaluation function consists of path length cost, collision threat cost, and path corner cost; the improved particle swarm algorithm is obtained by fusing three-subgroup differentiated search, node-level search domain dynamic switching, and the Arctic puffin search mechanism.
[0010] Preferably, the relative positions of the first obstacle and the second obstacle are determined based on the coordinates of the four vertices and the center point of any two rectangular obstacles; this includes: determining the relative positions of the first obstacle with respect to the second obstacle based on the signs of the differences in the abscissa and ordinate of the center points of the first and second obstacles of any two rectangular obstacles.
[0011] Preferably, based on the relative orientation, lateral width, and preset minimum safety distance, a pair of prohibited obstacle vertices is determined; specifically: when the difference between the center coordinates of the first obstacle and the center coordinates of the second obstacle is (negative, positive), that is, when the first obstacle is located to the upper left of the second obstacle: if the difference between the x-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the first constraint condition, and the difference between the y-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the third constraint condition, then the first prohibition case and the second prohibition case are executed; If the difference between the x-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the second constraint condition, and the difference between the y-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the third constraint condition, then the first prohibited case, the second prohibited case, and the fourth prohibited case are executed. If the difference between the x-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the second constraint condition, and the difference between the y-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the fourth constraint condition, then the first forbidden case and the fourth forbidden case are executed.
[0012] Preferably, the specific construction process of the weighted undirected obstacle vertex path graph is as follows: Based on any two different nodes in the path graph node set, determine the candidate path edge connecting the two nodes; when the candidate path edge does not pass through the interior of any rectangular obstacle, does not coincide with the boundary line segment of the obstacle, and the candidate path segment is not used as a prohibited path edge, establish a path edge between the two obstacle vertices; for any established path edge, use the Euclidean distance between the two path graph nodes connected by the path edge as the weight of the path edge, and the path graph nodes, the path edges that satisfy the connection conditions, and the weights corresponding to each path edge constitute the weighted undirected obstacle vertex path graph.
[0013] Preferably, in the weighted undirected obstacle vertex path graph, Dijkstra's algorithm is run to obtain the initial shortest path from the path start point to the path end point; the set of obstacle vertices traversed on the initial shortest path is merged with the set of neighboring threatening obstacle vertices around the initial path to form a candidate optimized vertex set; specifically: In a weighted undirected obstacle vertex path graph, Dijkstra's algorithm is run with the path start point as the search start point and the path end point as the search end point to obtain the initial shortest path from the path start point to the path end point. The vertices of obstacles traversed by the initial shortest path are used to form the first candidate set of optimized vertices; The obstacle vertex whose shortest distance from the target obstacle vertex to the initial path segment is less than the preset minimum safe distance is identified as the path-adjacent threat vertex; all path-adjacent threat vertices are combined into a second candidate optimized vertex set; and the first candidate optimized vertex set and the second candidate optimized vertex set are merged to obtain the candidate optimized vertex set.
[0014] On the other hand, an UAV path planning system based on adaptive multi-subgroup optimization is provided, including: The information acquisition module acquires two-dimensional horizontal plane operating environment information of the UAV; The path graph construction module determines the relative orientation of the first obstacle and the second obstacle based on the coordinates of the four vertices and the center point of any two rectangular obstacles; it determines the prohibited obstacle vertex pairs based on the relative orientation, the lateral width, and the preset minimum safety distance; and it generates a weighted undirected obstacle vertex path graph based on the prohibited obstacle vertex pairs and the path graph node set. The filtering module runs Dijkstra's algorithm in the weighted undirected obstacle vertex path graph to obtain the initial shortest path from the path start point to the path end point; the set of obstacle vertices traversed on the initial shortest path is merged with the set of neighboring threatening obstacle vertices around the initial path as a candidate optimized vertex set. The iterative optimization module uses an improved particle swarm optimization algorithm to initialize and iteratively optimize the path nodes around the candidate optimization vertex set until the iteration termination condition is met, and then outputs the optimal path.
[0015] Furthermore, an electronic device is also provided, including: Memory, used for non-transitory storage of computer-readable instructions; and Processor, for executing the computer-readable instructions, When the computer-readable instructions are executed by the processor, they perform the method described in the first aspect above.
[0016] In another aspect, a storage medium is also provided for non-transitory storage of computer-readable instructions, wherein when the non-transitory computer-readable instructions are executed by a computer, the method described in the first aspect is performed.
[0017] The above technical solution has the following advantages or beneficial effects: This invention employs an improved particle swarm optimization (PSO) algorithm that integrates the search mechanism of the Arctic Puffin optimization algorithm, three-subgroup differential search, and dynamic search domain switching mechanism to continuously iteratively optimize the path node positions corresponding to candidate optimization vertices. By performing differential searches in search domains with different orientations, the global search capability of the algorithm can be enhanced, reducing the probability of the PSO algorithm getting trapped in local optima.
[0018] This invention introduces the Arctic Puffin search mechanism to guide particle velocity updates during the particle update process, and combines individual optimality, global optimality and random perturbation for velocity and position updates, which can enhance the ability of particles to escape local extreme value regions and improve the search diversity and convergence performance of the path optimization process.
[0019] This invention generates a hybrid optimal particle by combining nodes in a probability-weighted manner based on the fitness value of the optimal particle in each subgroup after each iteration. When the hybrid optimal particle outperforms the optimal particle in a subgroup, a search space migration and particle node reinitialization are performed. This mechanism enables the sharing of superior search information between different subgroups, improving the collaborative optimization effect among multiple subgroups. Attached Figure Description
[0020] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0021] Figure 1 This is an overall method flowchart of this method embodiment; Figure 2 This is a flowchart illustrating the overall algorithm of this method embodiment; Figure 3 This is a flowchart of the improved particle swarm optimization algorithm in an embodiment of the method. Figure 4 This is a diagram showing the distribution of obstacle vertices in an embodiment of the method. Figure 5 Assign initial search domains to different vertices in this method embodiment; Figure 6 This is a path planning result diagram of this method embodiment; Figure 7 This is a schematic diagram of the first obstacle and the second obstacle in an embodiment of the method; Figure 8 This is a comparison chart of optimal fitness convergence in this embodiment of the method. Detailed Implementation
[0022] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0023] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments of the invention. The terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0024] In this embodiment of the invention, "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of this invention, "multiple" refers to two or more.
[0025] Furthermore, to facilitate a clear description of the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0026] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0027] Example 1 While some existing hybrid path planning methods can combine the determinism of graph search algorithms with the global search capability of particle swarm optimization (PSO), they still suffer from the following problems during optimization, especially the core defects of existing multi-subgroup PSO algorithms: (1) Information exchange granularity is too coarse: the optimal information is usually exchanged on the basis of the whole particle or the whole subgroup. It is difficult to adjust the local search area corresponding to a single path node according to the optimization results of the whole path. This may result in some nodes being restricted to an unsuitable search direction for a long time, affecting the convergence speed of the algorithm and the quality of path optimization.
[0028] (2) Premature convergence is likely to occur: During the iteration process, the position update of each particle is usually guided by the individual optimal position and the global optimal position of the population. As the iteration progresses, particles in the population are likely to quickly gather near the current optimal particle, resulting in a decrease in population diversity. When the path corresponding to the current optimal particle is only a local optimal path, the other particles are difficult to jump out of the local search area, thus falling into premature convergence. (3) Strong constraints from the initial path topology: In the hybrid scheme combining graph search algorithm, particle swarm algorithm usually only updates within the fixed line segment and fixed neighborhood corresponding to the initial path node. The topology of the initial path and the position of local nodes will have a strong constraint on the subsequent optimization results. When the initial search area does not cover a better obstacle bypass direction, the particle swarm algorithm may iterate in the current local area for a long time, making it difficult to obtain a path with a lower overall path cost.
[0029] The technical problem this invention aims to solve is that existing path planning methods, when applying a uniform safety distance to all obstacles as a fixed boundary, may unnecessarily expand obstacle regions unrelated to the current path, and excessively compress narrow passages that originally met safe passage conditions. Furthermore, if particle nodes are only taken from the initial path during subsequent iterations, they may deviate from the optimal search domain. Therefore, the technical problem to be solved is how to accurately determine the obstacle vertices affecting the optimized path while avoiding excessive safety boundary processing of all obstacles, and how to ensure that the number of particle nodes in the particle swarm optimization algorithm does not solely depend on the number of nodes in the initial path, so that each path planning iteration can always update within the optimal search domain.
[0030] To solve the above problems, such as Figure 1-2 As shown, this invention proposes a UAV path planning method based on adaptive multi-subgroup optimization, comprising: Step S1: Obtain the two-dimensional horizontal working environment information of the UAV; The two-dimensional horizontal plane operation environment information includes the drone's path start point, path end point, and the projection area of multiple static obstacles on the two-dimensional horizontal plane.
[0031] The projected areas of each static obstacle on a two-dimensional horizontal plane are represented as axis-aligned rectangular obstacles. Two opposite sides of each obstacle are parallel to the horizontal axis of the two-dimensional rectangular coordinate system, and the other two opposite sides are parallel to the vertical axis of the two-dimensional rectangular coordinate system. During a path planning process, the position, size, and boundaries of each obstacle remain unchanged.
[0032] The path start and end points are both located outside each obstacle, and the minimum distance between the path start and end points and the boundary of any obstacle is not less than the preset minimum safety distance. Preset minimum safe distance The minimum safe distance is the minimum distance that should be maintained between the drone's horizontal flight path and the obstacle boundary. The preset minimum safe distance takes into account the size of the drone in the horizontal plane and the reserved safety margin.
[0033] This invention abstracts the operating environment of a UAV at a preset fixed flight altitude into a two-dimensional horizontal plane, and uniformly represents the projection area of static obstacles as rectangular obstacles. By uniformly modeling the vertices and center points of obstacles, as well as the start and end points of paths, the geometric expression of the UAV path planning problem can be simplified, the complexity of environmental modeling can be reduced, and subsequent path graph construction and path safety assessment can be facilitated.
[0034] Before constructing the path map, this invention comprehensively considers the UAV's size and safety margin to set a preset minimum safety distance. It also determines whether narrow areas that do not meet safe passage requirements are formed between obstacles based on their relative positions, size, and safety distances. This allows for the early elimination of candidate path edges with potential safety hazards, reducing the risk of the UAV traversing narrow obstacle gaps and improving the safety and reliability of the path planning results.
[0035] Step S2: Determine the relative orientation of the first obstacle and the second obstacle based on the coordinates of the four vertices and the center point of any two rectangular obstacles; determine the prohibited obstacle vertex pairs based on the relative orientation, the lateral width and the preset minimum safety distance; generate a weighted undirected obstacle vertex path graph based on the prohibited obstacle vertex pairs and the path graph node set.
[0036] Based on the location information of each obstacle, determine the four vertices of each obstacle. For any obstacle, label the four vertices as the first vertex, second vertex, third vertex, and fourth vertex in the order of top left, top right, bottom left, and bottom right, respectively. Figure 4 As shown.
[0037] The vertex of the i-th rectangular obstacle is represented as: The midpoint of the i-th obstacle The center coordinates can be represented as:
[0038] in, , These correspond to the x and y coordinates of the midpoint of the obstacle, respectively, where m is the number of obstacles; This represents the x-coordinate of the first vertex of the i-th rectangular obstacle; This represents the x-coordinate of the second vertex of the i-th rectangular obstacle; This represents the y-coordinate of the first vertex of the i-th rectangular obstacle; This represents the y-coordinate of the third vertex of the i-th rectangular obstacle.
[0039] For all obstacles in the environment, determine the relative positions of each pair of obstacles until the relative positions of all obstacles are determined, such as... Figure 7 As shown; any two different obstacles whose relative positions are being determined are referred to hereafter as the first obstacle and the second obstacle; the relative position of the first obstacle relative to the second obstacle is determined based on the signs of the differences in the x-coordinates and y-coordinates of the center points of the first obstacle and the second obstacle. Relative positions include upper left, lower left, upper right, and lower right; when the sign is (negative, positive), the first obstacle is located to the upper left of the second obstacle; when the sign is (negative, negative), the first obstacle is located to the lower left of the second obstacle; when the sign is (positive, positive), the first obstacle is located to the upper right of the second obstacle; when the sign is (positive, negative), the first obstacle is located to the lower right of the second obstacle.
[0040] For example, if the center point coordinates of the first obstacle are (5, 8) and the center point coordinates of the second obstacle are (10, 3), then the difference in the x-coordinates and y-coordinates of the center points of the first and second obstacles is (negative, positive), which means that the first obstacle is located to the upper left of the second obstacle.
[0041] Based on the relative orientation, lateral width, and preset minimum safe distance of the first and second obstacles, it is determined whether a narrow area that does not meet the requirements for safe passage of the drone is formed between the first and second obstacles, and obstacle vertex pairs that are prohibited from forming candidate path edges are obtained.
[0042] The lateral width of the first obstacle is represented as: The lateral width of the second obstacle is expressed as... Specifically:
[0043] in, This is represented as the x-coordinate of the first vertex of the i-th obstacle; This is represented as the x-coordinate of the second vertex of the i-th obstacle; This is represented as the x-coordinate of the first vertex of the j-th obstacle; It is represented as the x-coordinate of the second vertex of the j-th obstacle.
[0044] Based on the relative orientation, lateral width, and preset minimum safety distance, prohibited obstacle vertex pairs are determined; thus, obstacle vertex pairs that are prohibited from forming candidate path edges are obtained; specifically: (1) When the difference between the center coordinates of the first obstacle and the center coordinates of the second obstacle is (negative, positive), that is, when the first obstacle is located to the upper left of the second obstacle: If the absolute value of the difference between the x-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the first constraint condition, and the difference between the y-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the third constraint condition, then the first forbidden case and the second forbidden case shall be executed. If the absolute value of the difference between the x-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the second constraint condition, and the difference between the y-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the third constraint condition, then the first prohibited case, the second prohibited case, and the fourth prohibited case are executed. If the absolute value of the difference between the x-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the second constraint condition, and the difference between the y-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the fourth constraint condition, then the first forbidden case and the fourth forbidden case are executed.
[0045] (2) When the difference between the center coordinates of the first obstacle and the center coordinates of the second obstacle is (negative, negative), that is, when the first obstacle is located to the lower left of the second obstacle: if the absolute value of the difference between the x coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the first constraint condition, and the difference between the y coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the fifth constraint condition, then the third prohibition case and the fourth prohibition case shall be executed. If the absolute value of the difference between the x-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the second constraint condition, and the difference between the y-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the sixth constraint condition, then the first prohibited case, the third prohibited case, and the fourth prohibited case are executed. If the absolute value of the difference between the x-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the second constraint condition, and the difference between the y-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the seventh constraint condition, then the first forbidden case and the fourth forbidden case are executed.
[0046] (3) When the difference between the center coordinates of the first obstacle and the center coordinates of the second obstacle is (positive, positive), that is, when the first obstacle is located to the upper right of the second obstacle: if the absolute value of the difference between the x coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the first constraint condition, and the difference between the y coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the third constraint condition, then the first prohibition case and the second prohibition case are executed. If the absolute value of the difference between the x-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the second constraint condition, and the difference between the y-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the fourth constraint condition, then the second prohibition case and the third prohibition case are executed. If the absolute value of the difference between the x-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the second constraint condition, and the difference between the y-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the third constraint condition, then the first prohibited case, the second prohibited case, and the third prohibited case are executed. (4) When the difference between the center coordinates of the first obstacle and the center coordinates of the second obstacle is (positive, negative), that is, when the first obstacle is located to the lower right of the second obstacle: if the difference between the y coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the fifth constraint condition, and the absolute value of the difference between the x coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the first constraint condition, then the third prohibition case and the fourth prohibition case are executed. If the difference between the y-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the sixth constraint condition, and the absolute value of the difference between the x-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the second constraint condition, then the second forbidden case, the third forbidden case, and the fourth forbidden case are executed. If the difference between the y-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the seventh constraint condition, and the difference between the x-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the second constraint condition, then the second prohibition case and the third prohibition case are executed. The constraints are shown in Table 2. The first constraint is that the width of the obstacle must be less than the sum of the lateral widths of the first and second obstacles. The second constraint is that it is greater than the sum of the lateral widths of the first obstacle and the second obstacle, and less than the sum of the lateral widths of the first obstacle, the lateral widths of the second obstacle, and the preset minimum safe distance; The third constraint is that the distance is less than the preset minimum safe distance and greater than zero. The fourth constraint is less than zero; The fifth constraint is that it is greater than the negative preset minimum safe distance. ); The sixth constraint is that it is greater than the negative preset minimum safe distance and less than zero; The seventh constraint is greater than zero.
[0047] Furthermore, the prohibited conditions are those that prohibit the formation of candidate path edges between pairs of obstacle vertices, as shown in Table 3: The first prohibited condition is that the formation of candidate path edges between the fourth vertex of the first obstacle and the first vertex of the second obstacle is prohibited. The second prohibited condition is: it is prohibited to form a candidate path edge between the third vertex of the first obstacle and the second vertex of the second obstacle; The third prohibited situation is: it is prohibited to form a candidate path edge between the first vertex of the first obstacle and the fourth vertex of the second obstacle; The fourth prohibited condition is: it is prohibited to form a candidate path edge between the second vertex of the first obstacle and the third vertex of the second obstacle; Determine whether a narrow area that does not meet the requirements for safe passage of drones is formed between the first obstacle and the second obstacle, specifically: Table 1. Determining whether a narrow area exists between two obstacles that does not meet the requirements for safe passage of drones.
[0048] in, , Let x and y be the coordinates of the first vertex of obstacle i. , Let x and y be the coordinates of the fourth vertex of obstacle i. , Let x and y be the coordinates of the first vertex of obstacle j. , Let x and y be the coordinates of the fourth vertex of obstacle j.
[0049] Table 2 Constraints
[0050] Table 3. Prohibition of Candidate Path Edges Between Pairs of Obstacle Vertices Under Different Circumstances
[0051] When a candidate path edge connecting two vertices belonging to two different obstacles passes through the region between the two obstacles, and the candidate path edge cannot simultaneously maintain a minimum safe distance from the boundaries of two axis-aligned rectangular obstacles, the path edge is not less than a preset minimum safe distance. When there is an interval, connecting these two obstacle vertices will be prohibited as candidate path edges.
[0052] Construct a path graph node set by taking the path start point, path end point, and all vertices of the axis-aligned rectangular obstacles as path graph nodes:
[0053] in, , These represent the starting point and ending point of the path.
[0054] Both candidate path edges and particle path segments used for fitness evaluation in the improved particle swarm optimization algorithm can be abstracted as a path segment to be detected consisting of two path points. The path segment to be detected will be used uniformly below. This indicates that the system uses an obstacle crossing determination method to determine whether it has crossed or collided with a rectangular obstacle. The obstacle crossing determination method is as follows: First, determine The coordinates of the midpoint are as follows:
[0055] in, , The x and y coordinates of the midpoint of the path segment formed by two adjacent path nodes I and J; , , , These are the x and y coordinates of the two path nodes I and J, respectively.
[0056] Determine if there are other obstacles whose vertices are inside the circle constructed by the midpoint coordinates:
[0057] in, Indicates the vertex of the obstacle to be judged; It is represented as the coordinates of the midpoint of the path segment formed by two adjacent path nodes I and J.
[0058] If the vertices of the obstacles need to be determined If it is inside the circle, then continue with the following judgment:
[0059] in, , These are the positioning parameters for the vertical and horizontal coordinates, and These represent the x and y coordinates of the vertex of the obstacle to be judged.
[0060] like or If any value is between [0, 1], then the following values are considered:
[0061] in, Represented as the ordinate of the intersection point of the vertical boundaries; It is represented as the x-coordinate of the intersection point of the horizontal boundaries.
[0062] If satisfied or If the path segment passes through an obstacle, it is prohibited. Form candidate path edges or The obstacle avoidance cost function is infinite.
[0063] Furthermore, the specific construction process of the weighted undirected obstacle vertex path graph is as follows: Based on any two distinct nodes in the path graph node set, candidate path edges connecting these two nodes are determined. A path edge is established between the two obstacle vertices if the candidate path edge does not pass through the interior of any rectangular obstacle, does not coincide with the boundary segment of the obstacle, and is not designated as a prohibited path edge. For any established path edge, the Euclidean distance between the two path graph nodes connected by the path edge is used as the weight of the path edge. A weighted undirected obstacle vertex path graph is constructed from the path graph nodes, the path edges satisfying the connection conditions, and the weights corresponding to each path edge.
[0064] This invention employs a method for determining whether a path segment crosses a rectangular obstacle, whether it coincides with the obstacle's boundary, and whether it meets safe passage conditions. This method effectively avoids generating path segments that collide with or are too close to obstacles, thereby improving the effectiveness of the candidate path map.
[0065] This invention uses the path start point, path end point, and vertices of each rectangular obstacle as nodes in the path graph, and constructs a weighted undirected obstacle vertex path graph by using the path edges that satisfy the connection conditions and their Euclidean distances as weights. Based on this, the Dijkstra algorithm is used to obtain the initial shortest path, which can quickly obtain the optimal search domain information adapted to the current obstacle distribution, providing a reference for subsequent iterative optimization.
[0066] S3: In the weighted undirected obstacle vertex path graph, run Dijkstra's algorithm to obtain the initial shortest path from the path start point to the path end point; merge the set of obstacle vertices traversed on the initial shortest path with the set of neighboring threatening obstacle vertices around the initial path as a candidate optimized vertex set.
[0067] In a weighted undirected obstacle vertex path graph, starting from the path origin... Starting point of the search, ending point of the path To find the destination, run Dijkstra's algorithm to obtain the initial shortest path from the starting point to the ending point of the path.
[0068] The initial shortest path is represented as:
[0069] in, These are the vertices of obstacles that the initial shortest path passes through in sequence. This represents the number of obstacle vertices traversed by the initial shortest path.
[0070] The vertices of obstacles traversed by the initial shortest path are used to form the first candidate set of optimized vertices:
[0071] Dijkstra's algorithm is used to identify obstacle vertices directly related to the initial path. Subsequent particle swarm optimization does not change the position or size of the obstacles themselves; instead, it performs local safe offset optimization on the path node positions corresponding to the candidate optimization vertices.
[0072] For each obstacle vertex not included in the first candidate optimized vertex set, calculate the distance from the obstacle vertex to the path segment that constitutes the initial path.
[0073] Let the two endpoints of the initial path segment be... and , Let be the midpoint, and if there are other obstacle vertices besides those included in the initial path. ,satisfy:
[0074] Then calculate the path segment from the obstacle vertex to the initial path segment. The distance is calculated using the following formula:
[0075] When the apex of the obstacle The distance D to any initial path segment is less than the minimum safe distance. When the obstacle vertex is identified as a path-near threat vertex, repeat this step until all path segments in the initial path have been identified as having path-near threat vertices.
[0076] All path-near threat vertices are combined into a second candidate optimization vertex set. Then, the first and second candidate optimized vertex sets are merged to obtain a candidate optimized vertex set. The order of merging the first and second candidate optimized vertex sets is as follows: the path-nearest threat vertices corresponding to the path segments constructed from two adjacent path points in the first candidate optimized vertex set are inserted into the endpoints of the path segment in ascending order of their Euclidean distance from the endpoints of the path segment that are closer to the path start point in the first candidate optimized vertex set; specifically as follows:
[0077] Where z is the total number of candidate optimized vertices. Optimize the second candidate vertex set Number of vertices in the middle. If the same obstacle vertex simultaneously satisfies the threat judgment conditions of multiple initial path segments, the obstacle vertex is added to the candidate optimization vertex set only once.
[0078] This invention does not perform indiscriminate optimization on all obstacle vertices. Instead, it determines a first set of candidate optimized vertices based on Dijkstra's initial path, and further filters out path-adjacent threat vertices whose distance from the initial path segment is less than a preset minimum safe distance, forming a candidate optimized vertex set. This method can reduce the participation of irrelevant vertices in optimization, reduce particle dimensions and search space size, thereby improving optimization efficiency.
[0079] Optimization based solely on the initial path vertices suffers from insufficient safety redundancy and susceptibility to topological constraints of the initial path. Therefore, this invention incorporates neighboring threat vertices. This ensures that the optimized path maintains safe distances from obstacles throughout the entire process, expands the optimization search space, reduces the constraints of the initial path on the optimization results, and enhances global optimization capabilities.
[0080] S4: Utilize an improved particle swarm optimization algorithm to initialize and iteratively optimize the path around each path node corresponding to the candidate optimization vertex set until the iteration termination condition is met, then output the optimal path. This includes: Step 1: Initialize candidate optimization vertex positions using tri-subgroup differential search, and assign different search domains and initial velocities; Step 2: Calculate the fitness value of the candidate path corresponding to each particle using the comprehensive fitness evaluation function, determine the initial position of each particle as the initial individual optimal position of the particle, and select the particle with the smallest fitness value in each subgroup as the initial global optimal particle of the subgroup. Step 3: During the iteration, the velocity and position of each particle are updated using the velocity update formula that incorporates the Arctic Puffin search mechanism; Step 4: Based on the globally optimal particles of the three subgroups, select and combine them node by node according to probability weighting to form a hybrid optimal particle; select the subgroup with the largest fitness value of the globally optimal particle. If its fitness value is greater than the fitness value of the hybrid optimal particle, switch the corresponding search domain for the subgroup; for the subgroup with the switched search domain, retain the particle nodes in the subgroup whose search domain is the same as the node corresponding to the hybrid optimal particle; for all corresponding nodes of the subgroup whose search domain is different from the node of the hybrid particle, reinitialize all corresponding nodes of the subgroup according to the search domain of the hybrid particle; re-evaluate the fitness of all particles of the subgroup with the changed search domain, take the hybrid optimal particle as its globally optimal particle, and compare whether the current particle fitness of the subgroup is lower than the individual's historical best fitness. If it is lower, update the individual particle's historical best position. Step 5: Each subgroup adaptively scales the search domain based on the coordinate difference between the path node of its best particle and the corresponding obstacle vertex, and removes the particle with the highest fitness from all subgroups. Each subgroup introduces a new particle and initializes its position and velocity to evaluate the particle's fitness. Repeat steps 3-5 until the iteration termination condition is met or the global optimal fitness no longer changes, and output the path represented by the historical best particle.
[0081] After using Dijkstra's algorithm to filter candidate vertices and determine their order, an improved particle swarm optimization algorithm that integrates the Arctic Puffin search mechanism, the three-subgroup differential search, and the dynamic switching mechanism of the search domain is adopted to continuously optimize the path node positions corresponding to each candidate vertex in the candidate optimized vertex set.
[0082] The particles in each subgroup at the t-th iteration are represented as follows:
[0083] in, This indicates that at the t-th iteration, the subgroup 1's th iteration... The position of each particle. This indicates that at the t-th iteration, the subgroup 2's th iteration... The position of each particle. This indicates that at the t-th iteration, the th subgroup 3... The position of each particle. , , These represent the population sizes of the three subgroups.
[0084] Furthermore, to comprehensively evaluate the merits of the candidate paths represented by each particle, this invention also constructs a comprehensive fitness evaluation function composed of path length cost, collision threat cost, and path turning angle cost. The objective is to minimize the comprehensive fitness evaluation function; the smaller the function value, the better the overall performance of the corresponding candidate path.
[0085] 1) The path length cost can be expressed as:
[0086] Where z+1 is the total number of path segments. The length of the h-th path segment that makes up the path is represented as:
[0087] in, This represents the th iteration of subgroup f. The coordinates of the c-th node of a particle, where z is the total number of nodes for each particle. This represents the th iteration of subgroup f. The coordinates of the first node of each particle; This represents the th iteration of subgroup f. The coordinates of the c-th node of a particle; This represents the th iteration of subgroup f. The coordinates of the z-th node of each particle; This represents the th iteration of subgroup f. The coordinates of the (c-1)th node of a particle.
[0088] 2) Collision threat cost: Before this, the obstacle crossing determination method is used to determine whether the path segment crosses an obstacle; if it does, the cost is infinite. The specific collision threat cost is as follows:
[0089] in, This represents the collision cost of the h-th path segment in the flight path of each particle. The calculation process is as follows:
[0090] 3) The specific cost of path cornering is as follows:
[0091] in, This represents the turning cost of the h-th path segment in the flight path formed by each particle. The calculation process is as follows:
[0092] 4) The comprehensive fitness evaluation function is as follows:
[0093] Where α, β, and γ are weighting coefficients.
[0094] This invention constructs a comprehensive fitness evaluation function consisting of path length cost, collision threat cost, and path turning angle cost, simultaneously considering path distance, safe obstacle avoidance, and flight turning smoothness during the optimization process. The resulting UAV flight path not only avoids obstacles but also takes into account changes in path length and turning angle, which helps improve the stability and practical feasibility of the UAV flight process.
[0095] The candidate vertex positions are initialized using an improved particle swarm optimization algorithm, and iterative optimization is performed until the optimal path is obtained; for example... Figure 3 As shown, specifically: First, the three subgroups initialize the candidate optimization vertex positions and assign different search domains and initial velocities. For example... Figure 5 As shown, the three subgroups initialize their positions in three different orientation search domains outside the candidate vertex. For the f-th subgroup, the position of the first vertex is... The initialization strategy for the x and y coordinates of the c-th node of a particle is as follows:
[0096] in, , These are the x and y directional symbols, determined by the position of the particle's corresponding node at the vertices of the obstacle. , To extend the increment, the initial directional symbols and extension increments for the three subgroups are:
[0097] in, , and , These are the initial minimum and maximum differences between the particle node and the relevant vertices of the obstacle. , =0, , for .
[0098] The initial velocity can be randomly generated within a preset velocity range:
[0099] in, This is the preset maximum speed.
[0100] Next, the fitness value of the candidate path corresponding to each particle is calculated using the comprehensive fitness evaluation function constructed in this invention. The initial position of each particle is determined as its initial individual optimal position, and the particle with the smallest fitness value within each subgroup is selected as the initial global optimal particle for that subgroup. The optimal fitness convergence comparison is as follows: Figure 8 As shown.
[0101] Then, in the t-th iteration, the velocity of each particle is updated using the velocity update formula of the fused Arctic Puffin search mechanism, and the search domain is dynamically switched and scaled.
[0102] The velocity formula is:
[0103] in, Particles of subgroup f The velocity at the t-th iteration; w, c1, and c2 are the inertia factor, individual learning factor, and social learning factor, respectively; c3 is the influence weight of the Arctic Puffin optimization algorithm. Let be the individual historical best particle at the t-th iteration; Let be the individual historical global optimal particle at the t-th iteration; For the optimization algorithm of Arctic Puffin in subgroup f of particles The guiding displacement at the t-th iteration is calculated using the following formula:
[0104] in, , , , Let f represent random individuals in subgroup f that are distinct from each other and not the same as the current particle in each iteration. Let R be the Lévy flight step size factor, and R be the random disturbance term during the flight process. C is the behavior switching factor, and C is the behavior switching threshold. The value is a random number ranging from (0,1), and T is the cooperative foraging factor in the underwater foraging phase of the Arctic puffin optimization algorithm. The calculation process for the above parameters is as follows:
[0105]
[0106]
[0107]
[0108] in, , For random numbers that follow a normal distribution, For random variables standard deviation A random number between (0, 1) These are random numbers that follow a standard normal distribution.
[0109] The particle position is updated using the following formula:
[0110] After each iteration, the globally optimal particles of each subgroup are combined into a new mixed optimal particle according to the probability formula:
[0111] in, Let be the fitness value of the optimal particle in each iteration of subgroup f. To prevent extremely small positive numbers with a denominator of 0.
[0112] For the c-th path node of the optimal mixed particles, generate a random number. Select the node source according to the following formula:
[0113]
[0114] in, For subgroups The coordinates of the path node c corresponding to the globally optimal particle at the t-th iteration.
[0115] If the fitness value of the mixed optimal particle is lower than that of the optimal particle in a subgroup, the search space of that subgroup is switched to the mixed optimal particle search space, and the mixed optimal particle is retained in that subgroup. The corresponding particle node is reinitialized in the search domain after migration, and the fitness of the subgroup particles is evaluated to determine the current global optimal particle. If the fitness of the particles in the subgroup whose search domain has changed is not lower than the fitness of the original individual's historical optimal position, the original individual's historical optimal position will still be used to guide the velocity update in the next iteration; otherwise, the individual's historical optimal position will be updated.
[0116] An adaptive scaling mechanism for the subgroup particle node search domain is used to scale the search domain. This mechanism determines whether to scale the domain based on the coordinate difference between the optimal particle of each subgroup and the corresponding obstacle vertex after each iteration. , Specifically:
[0117]
[0118] in, , Let c be the absolute value of the coordinate difference between the path node c of the optimal particle in each subgroup and the relevant obstacle vertex. After the search domain is scaled, the particle with the largest fitness value is removed from each subgroup, and a new particle is introduced. This particle is initialized in the search space after scaling, and then the fitness value of the particle is evaluated and it participates in subsequent iterations.
[0119] Repeat the above process until the iteration termination condition is met or the global optimal fitness no longer changes, and output the path represented by the particle with the lowest fitness value in the three subgroups.
[0120] The specific process of the algorithm is as follows: (1) The three subgroups initialize the positions and velocities of all particles in the 0th generation around the candidate optimization vertex; (2) The fitness of all particles is evaluated using a comprehensive fitness evaluation function. The initial individual's historical best position is the current particle position, and the initial global best particle is the particle with the lowest fitness in the current subgroup. (3) Update the velocity and position of all first-generation particles according to the velocity update formula, evaluate the fitness value of all first-generation particles using the comprehensive fitness evaluation function, and compare whether the current particle fitness value is lower than the individual's historical best fitness value; if it is lower, update the individual's historical best position, and the global best particle is the particle with the lowest fitness value in the current subgroup; select the mixed best particle based on the global best particle of each subgroup; if the fitness value of the mixed best particle is lower than the global best particle of a certain subgroup, the corresponding search domain is switched; for the subgroup that switches the search domain, retain the particle nodes in the subgroup that are in the same search domain as the node corresponding to the mixed best particle, and for all the corresponding nodes of the subgroup that are in a different search domain from the node of the mixed particle, reinitialize all the corresponding nodes of the subgroup according to the search domain of the mixed particle; for the subgroup whose search domain has changed, re-evaluate the fitness values of all its particles, take the mixed best particle as its global best particle, and compare whether the current particle fitness value of the subgroup is lower than the individual's historical best fitness value; if it is lower, update the individual's historical best position. Each subgroup adaptively scales the search domain based on the coordinate difference between the path node of its best particle and the corresponding obstacle vertex, and removes the particle with the highest fitness value from all subgroups. Each subgroup introduces a new particle and initializes its position and velocity to evaluate the particle's fitness value.
[0121] (4) Repeat the update operation in (3) until the maximum number of iterations is reached.
[0122] The final path planning diagram of this invention is as follows: Figure 6 As shown.
[0123] This invention employs an improved particle swarm optimization (PSO) algorithm that integrates the Arctic puffin search mechanism, three-subgroup differentiated search, and dynamic search domain switching mechanism to continuously optimize the path node positions corresponding to candidate optimization vertices. By performing differentiated searches in different orientation search domains using three subgroups, the algorithm's global search capability is enhanced, reducing the probability of the PSO algorithm getting trapped in local optima.
[0124] This invention introduces the Arctic Puffin search mechanism to guide particle velocity updates during the particle update process, and combines individual optimality and global optimality for velocity and position updates, which can enhance the ability of particles to escape local extreme value regions and improve the search diversity and convergence performance of the path optimization process.
[0125] This invention generates a hybrid optimal particle based on the fitness value of the optimal particle in each subgroup after each iteration, and performs search space migration and particle node reinitialization when the hybrid optimal particle is superior to the optimal particle in a subgroup. This mechanism enables the sharing of excellent search information between different subgroups and improves the collaborative optimization effect among multiple subgroups.
[0126] This invention adaptively scales the particle node search domain based on the coordinate difference between the optimal particle in the subgroup and the corresponding obstacle vertex, eliminating particles with high fitness values and introducing new particles to participate in subsequent iterations. This method maintains a large search range in the early stages of the search and gradually refines the search area in the later stages, thus balancing global exploration capability and local optimization accuracy.
[0127] To address the issues of rapid population diversity decline and susceptibility to local optima in traditional multi-subgroup particle swarm optimization (PSO) algorithms, this invention employs a three-subgroup differentiated search strategy. Three subgroups explore in parallel within independent search domains at different locations around candidate vertices, maintaining spatial diversity of the population from the initial iteration stage and preventing particles from rapidly converging to a single region. Simultaneously, the Arctic Puffin search mechanism is integrated into the particle velocity update, introducing the Levy flight step size and random behavior switching characteristics to enhance the particles' long-distance jumping ability and random exploration, helping them escape local extreme regions. The synergistic effect of these two mechanisms significantly improves the algorithm's global search capability and effectively reduces the probability of premature convergence.
[0128] Example 2 This embodiment provides a UAV path planning system based on adaptive multi-subgroup optimization, including: The information acquisition module acquires two-dimensional horizontal plane operating environment information of the UAV; The path graph construction module determines the relative orientation of the first obstacle and the second obstacle based on the coordinates of the four vertices and the center point of any two rectangular obstacles; it determines the prohibited obstacle vertex pairs based on the relative orientation, the lateral width, and the preset minimum safety distance; and it generates a weighted undirected obstacle vertex path graph based on the prohibited obstacle vertex pairs and the path graph node set. The filtering module runs Dijkstra's algorithm in the weighted undirected obstacle vertex path graph to obtain the initial shortest path from the path start point to the path end point; the set of obstacle vertices traversed on the initial shortest path is merged with the set of neighboring threatening obstacle vertices around the initial path to form a candidate optimization vertex set; the iterative optimization module uses an improved particle swarm optimization algorithm to initialize and iteratively optimize the path nodes corresponding to the candidate optimization vertex set until the iteration termination condition is met, and outputs the optimal path.
[0129] Example 3 This embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein, the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory to cause the electronic device to perform the method described in Embodiment 1.
[0130] Example 4 This embodiment also provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the method described in Embodiment 1.
[0131] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A UAV path planning method based on adaptive multi-subgroup optimization, characterized in that, include: Acquire two-dimensional horizontal plane operational environment information of the UAV; Determine the relative positions of the first obstacle and the second obstacle based on the coordinates of the four vertices and the center point of any two rectangular obstacles; Based on the relative orientation, lateral width, and preset minimum safety distance, determine the prohibited obstacle vertex pairs; Based on the prohibited obstacle vertex pairs and the path graph node set, a weighted undirected obstacle vertex path graph is generated; In the weighted undirected obstacle vertex path graph, run Dijkstra's algorithm to obtain the initial shortest path from the path start point to the path end point; The set of obstacle vertices traversed on the initial shortest path is merged with the set of neighboring threatening obstacle vertices around the initial path to form a candidate set of optimized vertices. An improved particle swarm optimization algorithm is used to initialize and iteratively optimize the path nodes around the candidate optimization vertex set until the iteration termination condition is met, and the optimal path is output.
2. The UAV path planning method based on adaptive multi-subgroup optimization according to claim 1, characterized in that, An improved particle swarm optimization algorithm is used to initialize and iteratively optimize the path around each path node corresponding to the candidate optimization vertex set until the iteration termination condition is met, and the optimal path is output; specifically: Step 1: Initialize candidate optimization vertex positions using tri-subgroup differential search, and assign different search domains and initial velocities; Step 2: Calculate the fitness value of the candidate path corresponding to each particle using the comprehensive fitness evaluation function, determine the initial position of each particle as the initial individual optimal position of the particle, and select the particle with the smallest fitness value in each subgroup as the initial global optimal particle of the subgroup. Step 3: During the iteration, the velocity and position of each particle are updated using the velocity update formula that incorporates the Arctic Puffin search mechanism; Step 4: Based on the globally optimal particles of the three subgroups, select and combine them node by node according to probability weighting to form a hybrid optimal particle; select the subgroup with the largest fitness value of the globally optimal particle. If its fitness value is greater than the fitness value of the hybrid optimal particle, switch the corresponding search domain for the subgroup. For the subgroup with the switched search domain, retain the particle nodes in the subgroup whose search domain is the same as the node corresponding to the hybrid optimal particle. For all corresponding nodes of the subgroup that are different from the search domain of the hybrid particle node, reinitialize all corresponding nodes of the subgroup according to the search domain of the hybrid particle. For the subgroup with the changed search domain, re-evaluate the fitness of all its particles, take the hybrid optimal particle as its globally optimal particle, and compare whether the current particle fitness of the subgroup is lower than the individual's historical optimal fitness. If it is lower, update the individual particle's historical optimal position. Step 5: Each subgroup adaptively scales the search domain based on the coordinate difference between the path node of its best particle and the corresponding obstacle vertex, and removes the particle with the highest fitness from all subgroups. Each subgroup introduces a new particle and initializes its position and velocity to evaluate the particle's fitness. Repeat steps 3-5 until the iteration termination condition is met or the global optimal fitness value of the population no longer changes, and output the path represented by the historical best particle of the population.
3. The UAV path planning method based on adaptive multi-subgroup optimization according to claim 2, characterized in that, The comprehensive fitness evaluation function consists of path length cost, collision threat cost, and path corner cost; the improved particle swarm algorithm is obtained by fusing three-subgroup differentiated search, node-level dynamic switching of search domain, and Arctic puffin search mechanism.
4. The UAV path planning method based on adaptive multi-subgroup optimization according to claim 1, characterized in that, Determine the relative positions of the first and second obstacles based on the coordinates of the four vertices and the center point of any two rectangular obstacles; including: The relative position of the first obstacle with respect to the second obstacle is determined based on the signs of the differences in the x-coordinates and y-coordinates of the center points of the first and second rectangular obstacles.
5. The UAV path planning method based on adaptive multi-subgroup optimization according to claim 1, characterized in that, Based on the relative orientation, lateral width, and preset minimum safety distance, the prohibited obstacle vertex pairs are determined as follows: When the difference between the center coordinates of the first obstacle and the center coordinates of the second obstacle is (negative, positive), that is, when the first obstacle is located to the upper left of the second obstacle: if the absolute value of the difference between the x-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the first constraint condition, and the difference between the y-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the third constraint condition, then the first prohibition case and the second prohibition case are executed. If the absolute value of the difference between the x-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the second constraint condition, and the difference between the y-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the third constraint condition, then the first prohibited case, the second prohibited case, and the fourth prohibited case are executed. If the absolute value of the difference between the x-coordinates of the first vertex of the first obstacle and the fourth vertex of the second obstacle satisfies the second constraint condition, and the difference between the y-coordinates of the fourth vertex of the first obstacle and the first vertex of the second obstacle satisfies the fourth constraint condition, then the first forbidden case and the fourth forbidden case are executed.
6. The UAV path planning method based on adaptive multi-subgroup optimization according to claim 1, characterized in that, The specific construction process of the weighted undirected obstacle vertex path graph is as follows: Based on any two different nodes in the path graph node set, determine the candidate path edge connecting the two nodes; when the candidate path edge does not pass through the interior of any rectangular obstacle, does not coincide with the boundary line segment of the obstacle, and the candidate path segment is not used as a prohibited path edge, establish a path edge between the two obstacle vertices; for any established path edge, use the Euclidean distance between the two path graph nodes connected by the path edge as the weight of the path edge, and the path graph nodes, the path edges that satisfy the connection conditions, and the weights corresponding to each path edge constitute the weighted undirected obstacle vertex path graph.
7. The UAV path planning method based on adaptive multi-subgroup optimization according to claim 1, characterized in that, In the weighted undirected obstacle vertex path graph, run Dijkstra's algorithm to obtain the initial shortest path from the path start point to the path end point; The set of obstacle vertices traversed on the initial shortest path is merged with the set of neighboring threatening obstacle vertices around the initial path to form a candidate set of optimized vertices. Specifically: In a weighted undirected obstacle vertex path graph, Dijkstra's algorithm is run with the path start point as the search start point and the path end point as the search end point to obtain the initial shortest path from the path start point to the path end point. The vertices of obstacles traversed by the initial shortest path are used to form the first candidate set of optimized vertices; The vertices of obstacles whose shortest distance from the vertices of the obstacle to be judged to the initial path segment is less than the preset minimum safe distance are identified as path-adjacent threat vertices. All path-adjacent threat vertices are combined into a second candidate optimized vertex set; Then, the first set of candidate optimized vertices and the second set of candidate optimized vertices are merged to obtain the set of candidate optimized vertices.
8. A UAV path planning system based on adaptive multi-subgroup optimization, characterized in that, include: The information acquisition module acquires two-dimensional horizontal plane operating environment information of the UAV; The path map construction module determines the relative positions of the first obstacle and the second obstacle based on the coordinates of the four vertices and the center point of any two rectangular obstacles; Based on the relative orientation, lateral width, and preset minimum safety distance, determine the prohibited obstacle vertex pairs; Based on the prohibited obstacle vertex pairs and the path graph node set, a weighted undirected obstacle vertex path graph is generated; The filtering module runs Dijkstra's algorithm in the weighted undirected obstacle vertex path graph to obtain the initial shortest path from the path start point to the path end point. The set of obstacle vertices traversed on the initial shortest path is merged with the set of neighboring threatening obstacle vertices around the initial path to form a candidate set of optimized vertices. The iterative optimization module uses an improved particle swarm optimization algorithm to initialize and iteratively optimize the path nodes around the candidate optimization vertex set until the iteration termination condition is met, and then outputs the optimal path.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1-7.
10. A computer device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in any one of claims 1-7.
