A method for planning flight path of unmanned aerial vehicle

Through the improved double-layer ant colony algorithm and pheromone update mechanism, the problem of slow convergence speed and easy to fall into local optimality in drone flight path planning is solved, and more efficient path planning and smoother paths are achieved.

CN119148747BActive Publication Date: 2025-05-06NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411643131.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-05-06
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

The existing drone flight path planning methods have problems such as slow convergence speed and easy to fall into local optimality and premature convergence.

Method used

The improved double-layer ant colony algorithm is used to plan the UAV flight path, and the flight area is modeled through the raster method. In the early stage, the suboptimal path was obtained using the A* method and the pheromone was not uniformly distributed. The two-layer search mode was designed. The guide layer and optimization layer ants were respectively path-finding and optimization. The pheromone update added the idea of ​​evolutionary algorithms to enhance diversity, and the bidirectional redundant nodes were deleted after the path planning.

Benefits of technology

It improves the efficiency of drone flight path planning, reduces planning time, and smoother paths and better results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119148747B_ABST
    Figure CN119148747B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for planning a flight path for an unmanned aerial vehicle, comprising the following steps: (1) using a grid method to model a flight area and initialize basic parameters; (2) planning the flight path of the unmanned aerial vehicle based on an improved double-layer ant colony algorithm; (3) outputting an optimal planned path; the present invention improves the efficiency of planning the flight path of the unmanned aerial vehicle, reduces the planning time, and makes the planned path smoother and the result better.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unmanned aerial vehicle (UAV) flight path planning, and in particular to a UAV flight path planning method. Background Art

[0002] As an important part of the intelligent process of drones, the flight path planning technology of drones has been widely studied by researchers at home and abroad. The current path planning methods mainly include classical algorithms, evolutionary algorithms, and swarm intelligence algorithms. Among them, the classical algorithms include A* algorithm, Dijkstra algorithm, Floyd algorithm, artificial potential field method, etc. Evolutionary algorithms include simulated annealing algorithm, genetic algorithm, etc. In addition, intelligent algorithms such as ant colony algorithm, particle swarm algorithm, artificial fish swarm algorithm, firefly optimization algorithm, etc. have also been gradually applied to the research of path planning. The above methods have their own advantages and disadvantages in the process of path planning. Among them, the A* algorithm is easy to quickly plan a path when the obstacle density is low, but it is easy to fall into a dead zone when searching in a high-density environment. The genetic algorithm has strong global search ability and weak local search ability, and can often only get suboptimal solutions instead of optimal solutions. The ant colony method is a swarm intelligence optimization method, which is inspired by the foraging behavior of ants in nature. In the process of pathfinding, ants are guided by pheromones based on the map and finally find the path. Compared with other methods, it is more robust and has good environmental adaptability, and is easy to take advantage of parallel computing. However, it still has disadvantages such as slow convergence, easy to fall into local optimality, and premature convergence. Summary of the invention

[0003] Purpose of the invention: The purpose of the present invention is to provide a UAV flight path planning method to solve the problems of slow convergence, easy falling into local optimum and premature convergence.

[0004] Technical solution: A method for planning a flight path of an unmanned aerial vehicle according to the present invention comprises the following steps:

[0005] (1) Use the grid method to model the flight area and initialize the basic parameters;

[0006] (2) The flight path planning of UAV is carried out based on the improved two-layer ant colony algorithm, which includes the following steps:

[0007] (21) Place m ants at the starting node and add the starting node to the taboo table;

[0008] (22) Calculate the guiding layer ant heuristic function and select the next node; record the path taken by the ants and update the taboo table;

[0009] (23) If the number of ants is not greater than m / 2, go to step (22) again to search for the guiding layer ants, otherwise go to step (24);

[0010] (24) Constructing the optimization layer search area;

[0011] (25) Calculate the optimization layer ant heuristic function and corner factor;

[0012] (26) Calculate the next node of the ant in the optimization layer; record the path taken by the ant and update the taboo table;

[0013] (27) If the number of ants is not greater than m, go to step (25) again to search for ants in the optimization layer, otherwise go to step (28);

[0014] (28) For the individuals in the population that have reached the target node, a crossover mutation operation is performed and the pheromone is updated;

[0015] (29) Determine whether the maximum number of iterations has been reached. If it has not been reached, return to step (22). If it has been reached, delete the bidirectional redundant nodes on the path.

[0016] (3) Output the optimal planning path.

[0017] Furthermore, step (2) also includes: (20) initializing pheromone, using A * The method plans the path between the starting point and the target point, strengthens the pheromone concentration on the path, and decrements the initialization pheromone of other grid nodes.

[0018] Furthermore, the heuristic function formula of step (22) is as follows:

[0019] ;

[0020] ;

[0021] Among them, i represents the current node, j represents the node to be selected, represents the Euclidean distance between the current node i and the candidate node j, represents the Euclidean distance between the candidate node j and the target node e; represents the angle between ji and je, w is a constant; jx represents the horizontal coordinate of node j, ix represents the horizontal coordinate of node i, and ex represents the horizontal coordinate of node e; jy represents the vertical coordinate of node j, iy represents the vertical coordinate of node i, and ey represents the vertical coordinate of node e; dis(i,j) represents the distance between nodes i and j, and dis(i,e) represents the distance between nodes i and e; is the adaptive adjustment factor of the heuristic function, and the formula is as follows:

[0022] ;

[0023] in, represents the maximum number of iterations, Indicates the current iteration number.

[0024] Furthermore, step (22) selects the next node j, and the formula is as follows:

[0025] ;

[0026] Among them, C represents the set of nodes that ant k can choose when it is at node i. Represents the path at time t<i,j> pheromone concentration on; is the heuristic function at time t; Represents the path at time t<i,s> pheromone concentration on; is time t s Heuristic function of the point; is the weight of pheromone concentration; is the weight of the heuristic function.

[0027] Furthermore, in step (25), the heuristic function formula of the optimization layer is as follows:

[0028] ;

[0029] in, , and Represents the Euclidean distance between the candidate node j, the target node e and the starting node s.

[0030] Furthermore, in step (25), the rotation factor formula is as follows:

[0031] ;

[0032] in, is the rotation factor, Represents the angle between the vector from the previous node i-1 to the current node i and the vector from the current node i to the node j.

[0033] Furthermore, in step (26), according to the rotation factor, the optimization layer ant uses the following formula to select the next node:

[0034] ;

[0035] in, is the weight of the node rotation factor.

[0036] Furthermore, step (28) is as follows: according to the fitness values ​​of different individuals, the probability of crossover and mutation of ant individuals is changed. The fitness value formula is as follows:

[0037] ;

[0038] Among them, w 1 、w 2 They represent the weights of path length and path smoothness respectively; L(p) and b(p) are path length and path smoothness respectively; the calculation formula of b(p) is:

[0039] ;

[0040] in, , Respectively represent the coefficients of the number of turns and the total turning angle, and satisfy ; N turn is the number of turns;

[0041] The pheromone update formula is as follows:

[0042] ;

[0043] ;

[0044] in, is the pheromone volatility coefficient, Q is the fitness weight, is the pheromone enhancement and weakening factor, the formula is as follows:

[0045] ;

[0046] in, Represents the historical optimal fitness, and u is a constant that controls the strength of the enhancement and weakening factors.

[0047] An electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, any one of the methods for planning a flight path for a drone is implemented.

[0048] A storage medium described in the present invention stores a computer program, and when the computer program is executed by a processor, it implements any one of the methods for planning a flight path for an unmanned aerial vehicle.

[0049] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: In the initial search stage, the A* method is used to obtain a suboptimal path, and the pheromone is non-uniformly distributed on the path. A double-layer search mode is designed, and the heuristic functions of the two layers of ants are designed separately. The basic layer finds the path, and the optimization layer further finds the optimized path; the idea of ​​evolutionary algorithm is added to the process of pheromone update to improve the diversity of the ant population. The pheromone update method adds pheromone enhancement and weakening factors to enhance the positive feedback mechanism of the method. Finally, redundant nodes are deleted from the planned path in both directions. The present invention improves the efficiency of drone flight path planning, reduces planning time, and plans a smoother path with better results. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a schematic diagram of the ant movement direction and the angle of the angular guide of the present invention;

[0051] Figure 2 It is the optimization layer search environment space construction diagram of the present invention;

[0052] Figure 3 It is a schematic diagram of deleting a bidirectional redundant node according to the present invention;

[0053] Figure 4 This is a 20*20 grid experiment comparison diagram of the present invention; wherein, Figure 4 (a) is the basic ant colony algorithm; Figure 4 (b) is the improved ant colony algorithm 1; Figure 4 (c) is the improved ant colony algorithm 2; Figure 4 (d) is the improved ant colony algorithm of the present invention. DETAILED DESCRIPTION

[0054] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0055] like Figure 1 As shown, an embodiment of the present invention provides a method for planning a flight path of an unmanned aerial vehicle, comprising the following steps:

[0056] Step 1: Use the grid method to model the flight area and initialize the basic parameters. Use the grid method to model the flight area in two dimensions and construct the UAV flight space model. Define various parameters during the method operation and initialize them; initialize pheromones, use the A* method to solve a path between the starting point and the target point, strengthen the pheromone concentration on the path, and assign decreasing values ​​to the initialized pheromones of other grid nodes.

[0057] The formula for enhancing pheromone concentration is as follows:

[0058] ;

[0059] ;

[0060] Among them, A represents the pheromone concentration constant, K is a constant representing the multiple of pheromone enhancement on the suboptimal path, d represents the Euclidean distance from node j to the nearest node on the path L planned by the A* algorithm, and D represents the maximum diffusion range; is the basic pheromone distribution value, which is a constant. The additional pheromone concentration is distributed gradually decreasingly to the path and surrounding grids.

[0061] Step 2: Place m ants at the starting node and add the starting node to the taboo table.

[0062] Step 3: Calculate the guiding layer ant heuristic function and select the next node. Record the path taken by the ants and update the taboo table.

[0063] The heuristic function is:

[0064] ;

[0065] ;

[0066] Among them, i represents the current node, j represents the node to be selected, represents the Euclidean distance between the current node i and the candidate node j, represents the Euclidean distance between the candidate node j and the target node e; represents the angle between ji and je, w is a constant; jx represents the horizontal coordinate of node j, ix represents the horizontal coordinate of node i, and ex represents the horizontal coordinate of node e; jy represents the vertical coordinate of node j, iy represents the vertical coordinate of node i, and ey represents the vertical coordinate of node e; dis(i,j) represents the distance between nodes i and j, and dis(i,e) represents the distance between nodes i and e; is the adaptive adjustment factor of the heuristic function, and the formula is as follows:

[0067] ;

[0068] in, represents the maximum number of iterations, Indicates the current iteration number.

[0069] The next node j is selected using the following formula:

[0070] ;

[0071] Among them, C represents the set of nodes that ant k can choose when it is at node i. Represents the path at time t<i,j> pheromone concentration on; is the heuristic function at time t; Represents the path at time t<i,s> pheromone concentration on; is time t s Heuristic function of a point; is the weight of pheromone concentration; is the weight of the heuristic function.

[0072] Step 4: If the number of ants is not greater than m / 2, go to step 3 again to search for ants in the guiding layer, otherwise go to step 5;

[0073] Step 5: Construct the optimization layer search area;

[0074] like Figure 2 As shown in the figure, the red path is the relatively optimal path found by the guidance layer in a certain iteration process, and the search area of ​​the optimization layer is constructed by expanding around the grid nodes occupied by the path. The area shown in the blue box is the expanded search area.

[0075] Step 6: Calculate the optimization layer ant heuristic function and the corner factor;

[0076] The heuristic function formula of the optimization layer is as follows:

[0077] ;

[0078] in, , and Represents the Euclidean distance between the candidate node j, the target node e and the starting node s.

[0079] The formula for the rotation factor is as follows:

[0080] ;

[0081] in, is the rotation factor, Represents the angle between the vector from the previous node i-1 to the current node i and the vector from the current node i to the node j.

[0082] Step 7: Calculate the next node of the ant in the optimization layer. Record the path taken by the ant and update the taboo table.

[0083] According to the rotation factor, the optimization layer ant uses the following formula to select the next node:

[0084] ;

[0085] in, is the weight of the node rotation factor.

[0086] Step 8: If the number of ants is not greater than m, go to step 6 again to search for ants in the optimization layer, otherwise go to the next step;

[0087] Step 9: Perform crossover and mutation operations on the individuals in the population that have reached the target node and update the pheromone. The details are as follows: According to the fitness values ​​of different individuals, the probability of crossover and mutation of ant individuals is changed. The fitness value formula is as follows:

[0088] ;

[0089] Among them, w 1 、w 2 They represent the weights of path length and path smoothness respectively; L(p) and b(p) are path length and path smoothness respectively; the calculation formula of b(p) is:

[0090] ;

[0091] in, , Respectively represent the coefficients of the number of turns and the total turning angle, and satisfy ; N turn is the number of turns;

[0092] The pheromone update formula is as follows:

[0093] ;

[0094] ;

[0095] in, is the pheromone volatility coefficient, Q is the fitness weight, is the pheromone enhancement and weakening factor, the formula is as follows:

[0096] ;

[0097] in, Represents the historical optimal fitness, and u is a constant that controls the strength of the enhancement and weakening factors.

[0098] Step 10: Determine whether the maximum number of iterations has been reached. If not, return to step 3. If reached, delete the bidirectional redundant nodes on the path and output the optimized path.

[0099] Bidirectional redundant node deletion Figure 3As shown. On the connection line of each node of the planned path, starting from the second to last node of the target node, determine whether there is an obstacle in the grid node through which the connection line between the two nodes before and after it passes. If there is no obstacle and the node is not on the connection line between the front and rear nodes, delete the node. If the node is on the connection line between the front and rear nodes, keep the node and continue to determine the next node until the second node is determined. After that, the processed node path is processed again from the starting point to the end point in the same way as above to reduce the length of the path and the number of turns of the path. The blue dotted line in the figure is the initial path, the red dotted line is the optimization result after the reverse deletion of redundant nodes, and the red solid line is the optimization result after the secondary forward deletion of redundant nodes.

[0100] In order to evaluate the performance of the methods, the planning results of the three methods on a 20×20 grid were compared, such as Figure 4 As shown. Figure 4 (a) Figure 4 (b) Figure 4 From the analysis of (c), we can see that the convergence speed and search direction of the path search in the initial search of the traditional ant colony method are poor and easy to fall into the local optimum. The initial search of the method is blind, and the ants are completely random in the initial search process, which leads to poor solutions that may be searched in the initial stage and relatively slow convergence speed. After comparison, it can be found that this method has a suitable convergence speed and the obtained path is relatively short. The addition of the suboptimal path enhancement strategy in the initial search strategy enhances the quality of the initial solution and accelerates the convergence speed of the initial search. After the redundant node deletion operation of the secondary planning, the number of handovers and the path length have been significantly improved. Finally, the planning effect of the method was tested in a complex environment, verifying the effectiveness of the secondary planning in reducing the path length and increasing the path smoothness. This method has certain advantages in path length and the number of turns, and the method has certain practicality.

[0101] An embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is loaded into the processor, any one of the methods for planning a flight path for a drone is implemented.

[0102] An embodiment of the present invention further provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, any one of the methods for planning a flight path for a drone is implemented.

Claims

1. A method for planning a flight path of an unmanned aerial vehicle, characterized in that: The following steps are involved: (1) Use the grid method to model the flight area and initialize the basic parameters; (2) The flight path planning of UAV is carried out based on the improved two-layer ant colony algorithm, which includes the following steps: (20) Initialize pheromone, use A * The method plans the path between the starting point and the target point, strengthens the pheromone concentration on the path, and assigns decreasing values ​​to the initialization pheromones of other grid nodes; (21) Place m ants at the starting node and add the starting node to the taboo table; (22) Calculate the guiding layer ant heuristic function and select the next node; record the path taken by the ants and update the taboo table; the heuristic function formula is as follows: ; ; Among them, i represents the current node, j represents the node to be selected, represents the Euclidean distance between the current node i and the candidate node j, represents the Euclidean distance between the candidate node j and the target node e; represents the angle between ji and je, w is a constant; jx represents the horizontal coordinate of node j, ix represents the horizontal coordinate of node i, and ex represents the horizontal coordinate of node e; jy represents the vertical coordinate of node j, iy represents the vertical coordinate of node i, and ey represents the vertical coordinate of node e; dis(i,j) represents the distance between nodes i and j, and dis(i,e) represents the distance between nodes i and e; is the adaptive adjustment factor of the heuristic function, and the formula is as follows: ; in, represents the maximum number of iterations, Indicates the current iteration number; Select the next node j, the formula is as follows: ; Among them, C represents the set of nodes that ant k can choose when it is at node i. Represents the path at time t<i,j> pheromone concentration on; is the heuristic function at time t; Represents the path at time t<i,s> pheromone concentration on; is time t s Heuristic function of the point; is the weight of pheromone concentration; is the weight of the heuristic function (23) If the number of ants is not greater than m / 2, go to step (22) again to search for the guiding layer ants, otherwise go to step (24); (24) Constructing the optimization layer search area; (25) Calculate the optimization layer ant heuristic function and the turning factor; the heuristic function formula of the optimization layer is as follows: ; in, , and Represents the Euclidean distance between the candidate node j, the target node e and the starting node s; The formula for the rotation factor is as follows: ; in, is the rotation factor, Represents the angle between the vector from the previous node i-1 to the current node i and the vector from the current node i to the node j; (26) Calculate the next node of the optimization layer ant; record the path taken by the ant and update the taboo table; according to the turning factor, the optimization layer ant uses the following formula to select the next node: ; in, is the weight of the node rotation factor (27) If the number of ants is not greater than m, go to step (25) again to search for ants in the optimization layer, otherwise go to step (28); (28) For the individuals in the population that have reached the target node, the crossover and mutation operations are performed and the pheromone is updated; specifically: according to the fitness values ​​of different individuals, the probability of crossover and mutation of the ant individuals is changed. The fitness value formula is as follows: ; Among them, w1 and w2 represent the weights of path length and path smoothness respectively; L(p) and b(p) are path length and path smoothness respectively; the calculation formula of b(p) is: ; in, , Respectively represent the coefficients of the number of turns and the total turning angle, and satisfy ; N turn is the number of turns; The pheromone update formula is as follows: ; ; in, is the pheromone volatility coefficient, Q is the fitness weight, is the pheromone enhancement and weakening factor, the formula is as follows: ; in, Represents the historical optimal fitness, and u is a constant that controls the strength of the enhancement and weakening factors. (29) Determine whether the maximum number of iterations has been reached. If it has not been reached, return to step (22). If it has been reached, delete the bidirectional redundant nodes on the path. (3) Output the optimal planning path.

2. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into the processor, the method for planning a flight path of a UAV according to claim 1 is implemented.

3. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for planning a flight path of a UAV according to claim 1 is implemented.