Optimization method for controlling unmanned aerial vehicle for ensuring safety
By introducing mixed search of 4-neighborhood and 16-neighborhoods, obstacle risk degree and node optimization expansion strategies in the A* algorithm, combined with B-spline optimization, the mechanical energy consumption of traditional A* algorithm in drone path planning is solved. Higher search efficiency, low search efficiency and high risk of obstacle tangency, achieving safer and more efficient path planning.
Patent Information
- Application Number
- CN202411089345.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-26
AI Technical Summary
In the path planning of drone A*, traditional A* algorithms have problems such as excessive path turning points, high mechanical energy consumption, low search efficiency, high tangent risk with obstacles, and exponential growth in search time, especially in complex environments, it is difficult to ensure safety. and efficiency.
Adopt mixed searches of 4 search neighborhoods and 16 search neighborhoods, introduce obstacle hazards, optimize heuristic functions, adopt node optimization expansion strategy and B-spline optimization, adaptive weight adjustment and path smoothing processing to improve path planning safety and efficiency.
It effectively reduces the tangency between the drone and the obstacle, reduces mechanical energy consumption, improves the safety and search efficiency of path planning, reduces redundant nodes, and improves path smoothness and running time.
Smart Images

Figure SMS_1 
Figure SMS_3 
Figure SMS_4
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of drone control, and in particular to an optimization method for controlling drones to ensure safety. The present invention considers an improved A* algorithm method in drone path planning based on adaptive Technical Background
[0002] In recent years, technological innovation in the field of drone control has become a hot topic in current research and has been applied to various fields. With the support and attention of the country, my country's drone industry is developing rapidly. Path planning is the core technology of autonomous navigation of drone control. The development and innovation of path planning technology is very important in the field of drone control.
[0003] The so-called path planning technology for drone control is that the drone plans a route from the starting point to the target point based on its own sensor's perception of environmental information, and at the same time ensures that the drone will not collide with obstacles during movement. At present, the commonly used methods of path planning technology include ant colony algorithm, genetic algorithm, particle swarm algorithm, neural network algorithm, rapidly expanding random tree search (RRT) algorithm, Dijkstra algorithm, A* algorithm, etc.
[0004] The A* algorithm is a classic heuristic search algorithm, also known as a greedy algorithm. For a known static environment, it can quickly and effectively search for the optimal path. The algorithm is flexible, complete, efficient, and highly adaptable to different environments. It is widely used in global path planning problems. However, the A* algorithm also has some defects:
[0005] 1) The most common algorithm can only search 8 neighboring nodes around, and the path selection is limited. There are too many turning points on the path, and the drone needs to constantly adjust its posture. However, due to its limited mechanical properties, too many turning points will consume more energy and increase the search time, thereby reducing the path search efficiency of the drone and increasing mechanical energy consumption; it is not conducive to the drone's control to drive quickly and smoothly.
[0006] 2) Due to the existence of obstacles, the deviation between the estimated value and the true value of the algorithm's heuristic function becomes larger, which will in turn expand a large number of redundant nodes and reduce the algorithm's search efficiency. Conventional 8-neighborhood search will result in the drone control and obstacle being tangent. If the volume of the obstacle and the drone is not considered, there is a risk of collision with obstacles during the movement of the drone in a complex environment.
[0007] 3) As grid accuracy increases and map size expands, repeated search and evaluation of useless nodes will cause the A* algorithm search time to grow exponentially.
[0008] 4) The A* algorithm is a greedy algorithm. By traversing and calculating the heuristic function, the planned paths are mostly close to obstacles and the paths are tangent to obstacles. Summary of the invention
[0009] In order to solve the problems existing in the above-mentioned A* algorithm, the main purpose of the present invention is to provide a safety-based adaptive improved A* algorithm method, which can effectively solve the problems such as the drone control is close to obstacles, the drone control is tangent to obstacles, etc., improve the safety of drone control planning, search efficiency, and reduce mechanical energy consumption.
[0010] To realize the above idea, an adaptive improved A* algorithm method based on safety is proposed. In order to solve the safety problem caused by collision with obstacles when using the traditional A* algorithm for path planning, the present invention adopts a hybrid search of 4 search neighborhoods and 16 search neighborhoods, and introduces the obstacle danger degree number to optimize the safety problem. In order to solve the search efficiency problem caused by too many search nodes and the problem of uneven path, this paper optimizes the heuristic function to ensure the safe operation of path planning while ensuring the optimal path.
[0011] Furthermore, the improved algorithm adopts a node optimization expansion strategy and a B-spline curve optimization method to reduce the number of redundant nodes and ensure the smoothness of the path.
[0012] A path planning method for optimizing and controlling an unmanned aerial vehicle with guaranteed safety, characterized in that it comprises the following steps:
[0013] S1. Obtain the target position information and environmental posture information of the current area through the hardware support such as the visual system on the drone.
[0014] S2. When searching for paths with the traditional A* algorithm, there may be a situation where the drone control is tangent to obstacles. In order to improve the safety of path planning, the present invention adopts 4-neighborhood search and 16-field search adaptive switching search to ensure that the drone control avoids tangency when encountering obstacles, thereby ensuring the safety of drone control.
[0015] S3. In view of the fact that the UAV control is close to obstacles when searching for paths using the traditional A* algorithm, in order to improve the safety of path searching, the present invention introduces the obstacle risk degree number to optimize the traditional A* algorithm and ensure the safety of UAV control.
[0016] S4. Furthermore, the improved algorithm also introduces an adaptive weight coefficient to adjust the weight of the heuristic function, improve the search efficiency of the algorithm, and ensure that the planned path is in the optimal state;
[0017] S5. Adopt node optimization and expansion strategy to expand the proposed key nodes, ensure the security of the newly generated path, and shorten the path.
[0018] S6. Finally, the B-spline is used to optimize the UAV control motion path obtained by the improved A* algorithm to further improve the smoothness of the path, reduce the running time, and improve the efficiency of the algorithm.
[0019] A path planning method for optimizing and controlling a drone with guaranteed safety mainly includes the following steps:
[0020] Step 1: Create a two-dimensional grid map to determine the positions of the starting point S, the target point G, and the obstacle. Step 2: Change the 8-neighborhood search strategy in the traditional A* algorithm to an adaptive neighborhood search that switches between 4 and 16 neighborhoods to ensure that there is no tangency between the drone control and the obstacle.
[0021] Step 3: Introduce the obstacle risk coefficient R(n) to design the heuristic function of the node, improve the sensitivity of the drone control to obstacles in the environment, and effectively improve the safety of the drone control path search in complex environments; Step 4: Introduce an adaptive weight coefficient to adjust the weight of the heuristic function. In a simple environment, the weight of the heuristic function changes little in the early stage. By maintaining a high efficiency to plan the path, the search speed is accelerated and the search time is reduced. The weight of the heuristic function changes greatly in the later stage to prevent local optimality. In a complex environment, slowly change the weight of the heuristic function to ensure the safety of the drone control path planning;
[0022] Step 5: In order to further reduce the number of search nodes and ensure the safety of the path, a node optimization and expansion strategy is introduced. It uses the judgment of whether the two-point path passes through obstacles, extracts key nodes, expands node coordinates, and ensures the safety of the newly formed path.
[0023] Step 6: In order to further improve the smoothness of the path and reduce the running time, a B-spline method is proposed to optimize the path, making the motion path of the UAV control smoother and the search efficiency higher.
[0024] In order to solve the tangency problem between drone control and obstacles, the present invention modifies the original 8-neighborhood search in neighborhood search, transforming it into a 4-neighborhood search that automatically transforms when encountering obstacles and an adaptive transformation of a 16-neighborhood search.
[0025] Furthermore, when the drone is in motion, there may be situations where the drone is tangent to obstacles. The present invention proposes an obstacle risk degree R(n) based on the traditional A* algorithm to improve the sensitivity of drone control to obstacles. This effectively improves the safety of drone control path search in complex environments. i The obstacle risk coefficient for drone control is:
[0026]
[0027] Where length(i,j) represents the distance between node Ni and obstacle(j), j = 1, 2, ..., n. ξ is the mean cost.
[0028] The principle steps for selecting the mean cost are as follows:
[0029] 1. Use the traditional A* algorithm to calculate the cost of each grid and find the grid with the highest cost in the grid map.
[0030] 2. Subtract the cost of each grid from the maximum cost. Sum up all the differences and divide them by the total number of grids to get the average value.
[0031] 3. Take length as the shortest distance between the obstacle and the drone control. Use the following formula to calculate the average cost.
[0032]
[0033] Furthermore, the relevant weights are assigned according to the map environment. To a certain extent, the safety of the planned path is improved, in order to avoid the algorithm from falling into the local optimum and improve the efficiency of the algorithm. This paper introduces an adaptive dynamic coefficient w to h(n) in the heuristic function to complete the dynamic adjustment of the heuristic function weight.
[0034]
[0035] where h(n) = d×(|x 1 -x n |+|y 1 ,y n |), (x 1 ,y 1 ) is the coordinate of the node P 1 ,(x n ,y n ) is the target point P n The coordinates of , d is the weighting coefficient. λ is the obstacle rate.
[0036]
[0037] N is the number of grids of obstacles in the grid map. max is the total number of grid cells in the grid map.
[0038] Further, based on the above improvements, the improved A* algorithm proposed in the present invention provides a new calculation formula when calculating the current node cost value f(n) in step 4, as follows:
[0039]
[0040] According to the formula, we can get all the points on the straight line within the range.
[0041] 1) The line between each turning point is used to identify obstacles and determine whether the obstacle is crossed. If the straight line does not pass through the obstacle, the next node is judged. i On the obstacle, it means that the straight line between the two points at this time passes through the obstacle, called P i-1 is the key point. Select P i-1 With P 1 The set {P 1 ,P i-1}.
[0042] 2) Then P i-1 Start by repeating step 1. i ,p i+1 ,...,p n} to judge the points in the search until all the key points are found. All key points are combined into a set {P 1 ,P i-1 ,...,p n}.
[0043] 3) Considering that there may be turning points close to obstacles, which may cause collisions and other dangerous behaviors, the set of key points {P 1 ,P i-1 ,...,p n} To determine the obstacles, move the key points away from the obstacles to form new key points. 1 ,P i-1 ',...,p n}.
[0044] Note: When expanding coordinates, there may be a close contact with other obstacles, so the expanded coordinate range is limited because the distance between each grid point is 1 or So the value range of σ is (0.25, 0.75), so that the expanded point P 1 'It can only be obtained within distance 1, which also avoids the situation where the newly expanded nodes are close to other obstacles, increasing the safety of drone control.
[0045] 4) Connect the points in the new set one by one, plan a new path, and compare the path graph without node optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments;
[0047] Figure 1It is a flowchart of a method for adaptively improving the A* algorithm based on security;
[0048] Figure 2 This is a simulation diagram of the UAV control path planning results based on the traditional A* algorithm;
[0049] Figure 3 This is a simulation diagram of the UAV control path planning result based on the improved A* algorithm proposed in the present invention;
[0050] Figure 4 This is a simulation diagram of the result of the node optimization expansion strategy proposed by the present invention;
[0051] Figure 5 This is a simulation diagram of the UAV control path planning results based on the improved A* algorithm and after path optimization; DETAILED DESCRIPTION
[0052] At present, in the application of UAV control path planning, the traditional A* algorithm has the following shortcomings: the algorithm is not sensitive enough to obstacles during the path search process, and the safety performance of the search path is low; the path turning points generated by the algorithm search are too many, which increases the mechanical energy consumption of the UAV and reduces the path search efficiency of the UAV; the algorithm is inefficient and easily falls into local optimality, resulting in path search failure. Therefore, the main purpose of this application is to propose a UAV control path planning method based on an improved A* algorithm, so as to solve the problems of insufficient safety performance, tortuous search path, and low search efficiency when using the traditional A* algorithm for path planning.
[0053] To facilitate understanding of this embodiment, a UAV control path planning method based on an improved A* algorithm disclosed in an embodiment of the present invention is first introduced in detail.
[0054] An adaptive improved A* algorithm method based on safety mainly includes the following steps: Step 1: Establish a two-dimensional grid map to determine the positions of the starting point S, the target point G and the obstacle obstacle; Step 2: Change the 8-neighborhood search strategy in the traditional A* algorithm to an adaptive neighborhood search with switching searches between 4 neighborhoods and 16 neighborhoods to ensure that there is no tangency between the UAV control and the obstacle.
[0055] Step 3: Introduce the obstacle risk coefficient R(n) to design the heuristic function of the node, improve the sensitivity of the drone control to obstacles in the environment, and effectively improve the safety of the drone control path search in complex environments; Step 4: Introduce an adaptive weight coefficient to adjust the weight of the heuristic function. In a simple environment, the weight of the heuristic function changes little in the early stage. By maintaining a high efficiency to plan the path, the search speed is accelerated and the search time is reduced. The weight of the heuristic function changes greatly in the later stage to prevent local optimality. In a complex environment, slowly change the weight of the heuristic function to ensure the safety of the drone control path planning;
[0056] Step 5: In order to further reduce the number of search nodes and ensure the safety of the path, a node optimization and expansion strategy is introduced. It uses the judgment of whether the two-point path passes through obstacles, extracts key nodes, expands node coordinates, and ensures the safety of the newly formed path.
[0057] Step 6: In order to further improve the smoothness of the path and reduce the running time, a B-spline method is proposed to optimize the path, making the motion path of the UAV control smoother and the search efficiency higher.
[0058] In order to solve the tangency problem between drone control and obstacles, the present invention modifies the original 8-neighborhood search in the neighborhood search, transforming it into a 4-neighborhood search that automatically transforms when encountering obstacles and an adaptive transformation of a 16-neighborhood search.
[0059] Furthermore, when the drone is in motion, there may be situations where the drone is tangent to obstacles. The present invention proposes an obstacle risk degree R(n) based on the traditional A* algorithm to improve the sensitivity of drone control to obstacles. This effectively improves the safety of drone control path search in complex environments. i The obstacle risk coefficient for drone control is:
[0060]
[0061] Where length(i,j) represents the distance between node Ni and obstacle(j), j = 1, 2, ..., n. ξ is the mean cost.
[0062] The principle steps for selecting the mean cost are as follows:
[0063] 1. Use the traditional A* algorithm to calculate the cost of each grid and find the grid with the highest cost in the grid map.
[0064] 2. Subtract the cost of each grid from the maximum cost. Sum up all the differences and divide them by the total number of grids to get the average value.
[0065] 3. Take length as the shortest distance between the obstacle and the drone control. Use the following formula to calculate the average cost.
[0066]
[0067] Furthermore, the relevant weights are assigned according to the map environment. To a certain extent, the safety of the planned path is improved, in order to avoid the algorithm from falling into the local optimum and improve the efficiency of the algorithm. This paper introduces an adaptive dynamic coefficient w to h(n) in the heuristic function to complete the dynamic adjustment of the heuristic function weight.
[0068] where h(n) = d×(|x 1 -x n |+|y 1 ,y n |), (x 1 ,y 1 ) is the coordinate of the node P 1 ,(x n ,y n ) is the target point P n The coordinates of , d is the weighting coefficient. λ is the obstacle rate.
[0069]
[0070] N is the number of grids of obstacles in the grid map. max is the total number of grid cells in the grid map.
[0071] Further, based on the above improvements, the improved A* algorithm proposed in the present invention provides a new calculation formula when calculating the current node cost value f(n) in step 4, as follows:
[0072]
[0073] Furthermore, the nodes of the optimized path are optimized.
[0074] According to the formula, we can get all the points on the straight line within the range.
[0075] 5) The line between each turning point is used to identify obstacles and determine whether the obstacle is crossed. If the straight line does not pass through the obstacle, the next node is judged. i On the obstacle, it means that the straight line between the two points at this time passes through the obstacle, called P i-1 is the key point. Select P i-1 With P 1 The set {P 1 ,P i-1}.
[0076] 6) Then P i-1 Start by repeating step 1. i ,p i+1 ,...,p n} to judge the points in the search until all the key points are found. All key points are combined into a set {P 1 ,P i-1 ,...,p n}.
[0077] 7) Considering that there may be turning points close to obstacles, there may be dangerous behaviors such as collisions, and the set of key points {P 1 ,P i-1 ,...,p n} To determine the obstacles, move the key points away from the obstacles to form new key points. 1 ,P i-1 ',...,p n}.
[0078] When expanding coordinates, they may cling to other obstacles, so the expanded coordinate range is limited because the distance between each grid point is 1 or So the value range of σ is (0.25, 0.75), so that the expanded point P 1 'It can only be obtained within distance 1, which also avoids the situation where the newly expanded nodes are close to other obstacles, increasing the safety of drone control.
[0079] 8) Connect the points in the new set in sequence, plan a new path, and compare it with the path diagram without node optimization. Figure 5 Further, in step 6, the B-spline curve is used to smooth the UAV control motion path generated by the improved A* algorithm, and the final simulation result is shown in the attached figure. Figure 5 shown.
[0080] The following table compares the simulation results of the UAV control path planning based on the traditional A* algorithm and the improved A* algorithm proposed in the present invention.
[0081] Table 1 Comparison of UAV control path planning simulation results before and after A* algorithm improvement
[0082] algorithm Search time / s Turn times / times <![CDATA[l min / m]]> Search Node Mechanical energy consumption A* Algorithm 4.16 6 0.5 174 Larger Improved Algorithm 2..28 - 1.5 63 Smaller
[0083] Among them l minRepresents the shortest distance between the path and the obstacle. The simulation results of this embodiment show that when the algorithm in this paper performs path planning, the number of path turns is reduced by 66.67% compared with the traditional A* algorithm. The comparison shows that the improved A* algorithm proposed in the present invention greatly improves the smoothness of the search path on the basis of ensuring the successful search of the path, and effectively reduces the mechanical energy consumption of the drone control. The search nodes were reduced by 63.79%. By observing the two algorithms, the closest distance between the drone control and the obstacle during the path planning process, it can be clearly seen that the shortest distance of the improved A* algorithm during the planning process is much smaller than the shortest distance of the traditional A* algorithm, avoiding the situation where the drone control is tangent to the obstacle, and greatly enhancing the safety of the drone control during the search. The search time was reduced by an average of 42.57%. The operating efficiency is greatly improved, which further proves that the improved algorithm proposed in the present invention also has advantages in operating efficiency.
Claims
1. A path planning method for optimizing and controlling an unmanned aerial vehicle with guaranteed safety, characterized in that: The following steps are involved: S1. Obtain the target position information and environmental posture information of the current area through the hardware support such as the visual system on the drone. S2. When searching for paths with the traditional A* algorithm, there may be a situation where the drone control is tangent to obstacles. In order to improve the safety of path planning, the present invention adopts 4-neighborhood search and 16-field search adaptive switching search to ensure that the drone control avoids tangency when encountering obstacles, thereby ensuring the safety of drone control. S3. In view of the fact that the UAV control is close to obstacles when searching for paths using the traditional A* algorithm, in order to improve the safety of path searching, the present invention introduces the obstacle risk degree number to optimize the traditional A* algorithm and ensure the safety of UAV control. S4. Furthermore, the improved algorithm also introduces an adaptive weight coefficient to adjust the weight of the heuristic function, improve the search efficiency of the algorithm, and ensure that the planned path is in the optimal state; S5. Adopt node optimization and expansion strategy to expand the proposed key nodes, ensure the security of the newly generated path, and shorten the path. S6. Finally, the B-spline is used to optimize the UAV control motion path obtained by the improved A* algorithm to further improve the smoothness of the path, reduce the running time, and improve the efficiency of the algorithm.
2. A path planning method for adaptively changing the search direction, characterized in that: The improved search neighborhood algorithm process is mainly divided into two parts: 1) In the initial stage, the starting node is first placed in the OPEN list; 2) In the expansion stage, by judging the set switching trigger conditions, 8 neighborhoods or 16 neighborhoods are used for expansion. The main steps are as follows: Step 1 When expanding a child node, it is necessary to judge and mark the child nodes to be expanded in the 16 directions of the current node n. If it is judged to be an obstacle, the variable return value is true; if it is not an obstacle, the variable return value is false. Step 2 selects the search algorithm by determining the variable value. When it is true, the A* algorithm of the 4-neighborhood search algorithm is used for expansion. After expansion, it is determined whether the node is in the OPEN list, and it is further processed to find the node with the minimum cost. When it is false, the A* algorithm of the 16-neighborhood search algorithm is used for expansion. Information is obtained through the marking situation to determine whether to calculate the cost of expanding the node in 16 directions. When calculating in 16 directions, it is necessary to compare and calculate the costs of the 16 directions, determine whether the node is in the OPEN list, and select the minimum cost to determine the expansion direction: otherwise, directly judge, calculate the cost to determine the expansion direction, and then save it to the OPEN list for the next step. Step 3 returns to Step 1 and searches in a loop until the target point is found and the path is obtained.
3. A path planning method that introduces an obstacle risk assessment function, characterized by: When the drone is close to an obstacle, the risk factor will increase, forcing the drone to abandon the subnode close to the obstacle and choose other nodes when selecting the next node. The risk function expression is: length represents the distance between a node and the nearest obstacle node, and the distance formula is calculated using the Manhattan distance formula. ξ is the mean cost. is the grid average.
4. A path planning method for modifying a heuristic function, characterized in that: When the extended node is far away from the target point, the value of h(n) increases, thereby increasing the weight of the heuristic function in the cost function, improving the search speed of the mobile robot, and shortening the running time of the algorithm. When the extended node is close to the target point, the value of h(n) decreases, thereby reducing the weight of the heuristic function in the cost function, thereby reducing the algorithm search speed and avoiding premature convergence of the algorithm. Its expression is: where h(n) = d×(|x1-x n |+|y1,y n |), (x1, y1) are the coordinates of the node P1, (x n ,y n ) is the target point P n The coordinates of , d is the weighting coefficient. λ is the obstacle rate. N is the number of grids of obstacles in the grid map. max is the total number of grid cells in the grid map.
5. A node-optimized path planning method, characterized in that: The path nodes in the original plan are trimmed to remove the redundant path nodes in the path planning process, making the generated path shorter and more efficient. The specific steps are: 1) The line between each turning point is used to identify obstacles and determine whether it passes through the obstacle. If the straight line does not pass through the obstacle, the next node is judged. i On the obstacle, it means that the straight line between the two points at this time passes through the obstacle, called P i-1 is the key point. Select P i-1 Together with P1, they form a set {P1,P i-1 }. 2) Then P i-1 Start by repeating step 1. i ,p i+1 ,...,p n } to judge the points in the search until all the key points are found. All key points are combined into a set {P1,P i-1 ,...,p n }. 3) Considering that there may be turning points close to obstacles, which may cause collisions and other dangerous behaviors, the set of key points {P1,P i-1 ,...,p n } to determine the obstacles and move the key points away from the obstacles to form new key points {P1,P i-1 ',...,p n }. Note: When expanding coordinates, there may be a close contact with other obstacles, so the expanded coordinate range is limited because the distance between each grid point is 1 or Therefore, the value range of σ is (0.25, 0.75), so that the expanded point P1' can only be obtained within the distance 1. This also avoids the situation where the expanded new node is close to other obstacles, increasing the safety of drone control. 4) Connect the points in the new set one by one, plan a new path, and compare it with the path graph without node optimization.
Citation Information
Patent Citations
Efficient path planning method based on improved A* algorithm
CN114721401A
Unmanned ship dynamic path planning method and system based on improved D star algorithm
CN115390565A
Mobile robot path planning method based on improved A* algorithm
CN115562265A
Motion planning method fusing improved A* and improved DWA algorithm
CN116795101A
Unmanned ship path planning method based on improved A* and DWA fusion
CN116952239A
Cited By
Comprehensive scene map path planning method based on improved A* algorithm
CN120558239A
