Robot path planning method and system based on ant colony algorithm with dynamic update mechanism
By introducing a dynamic update mechanism into the ant colony algorithm, optimizing the pheromone volatility coefficient and heuristic function, the problem that existing ant colony algorithms are difficult to find the global optimal path in path planning, and more efficient path planning is achieved.
Patent Information
- Application Number
- CN202211109383.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-13
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2042-09-13
AI Technical Summary
The existing ant colony algorithm is difficult to find the global optimal path in robot path planning, and the process of finding the optimal path takes a long time and is less efficient.
Ant colony algorithm with a dynamic update mechanism is introduced, and the probability transfer formula is optimized to accelerate the process of finding the optimal path by adjusting the pheromone volatility coefficient, pheromone concentration and heuristic function.
It effectively reduces the attractiveness of excessively long paths to ants, improves the efficiency of path planning, and ensures that the global optimal path is found.
Smart Images

Figure BDA0003843308140000021 
Figure BDA0003843308140000023 
Figure BDA0003843308140000031
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of mobile robot path planning, and relates to a robot path planning method and system based on an ant colony algorithm with a dynamic update mechanism. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Path planning is one of the important research topics in the field of robotics. It plays a key role in logistics, medical care, aviation, military and other fields. The so-called path planning is to find an optimal or suboptimal path from the starting point to the end point in a certain environment according to the constraints. Ant colony algorithm is widely used in path planning because of its advantages such as stability and robustness. Ant colony algorithm is a bionic algorithm that imitates the foraging process of real ants. During the movement, ants can release and leave pheromones on the path they pass through. Other ants can choose the path to move forward according to the concentration of pheromones when they move. It is this positive feedback mechanism that can make the search process converge continuously and finally achieve the goal of collaborative search for the shortest path. In this process, multiple individuals perform parallel calculations, which improves computing power and operating efficiency. However, the inventors found that when using ant colony algorithm for path planning, the path obtained is not necessarily the global optimal one, and the process of finding the optimal path consumes a long time and is inefficient. Summary of the invention
[0004] In order to solve the problems existing in the above-mentioned background technology, the present invention provides a robot path planning method and system based on a dynamic update mechanism ant colony algorithm, which can quickly and accurately search for a global optimal path.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] In a first aspect, the present invention provides a robot path planning method based on an ant colony algorithm with a dynamic update mechanism.
[0007] A robot path planning method based on an ant colony algorithm with a dynamic update mechanism, comprising:
[0008] Obtain the robot's task environment, perform rasterization processing on it, obtain a raster map, and determine the information of the robot's starting node, target node, nodes that are prone to deadlock, and obstacle nodes;
[0009] Determine the node that the ant will reach next based on the probability transfer formula and pheromone concentration;
[0010] When all ants have completed an iteration, the optimal path of the current iteration is saved;
[0011] Dynamically update the pheromone volatility coefficient, pheromone concentration, and taboo list until all iterations are completed and the optimal path is obtained.
[0012] The dynamic update mechanism ant colony algorithm probability transfer formula is:
[0013]
[0014] In the above probability transfer formula, represents the probability of the kth ant moving from node i to node j at time t, γ∈(0,1) is the adjustment factor, x e ,y e represents the horizontal and vertical coordinates of the target point, x and y represent the horizontal and vertical coordinates of the current position of the robot, e represents the natural constant, τ ij (t) represents the pheromone concentration from node i to node j, α represents the pheromone concentration factor, β represents the heuristic factor, η ij (t) represents the heuristic function from node i to node j at time t.
[0015] The heuristic function η ij (t) is:
[0016]
[0017] Where D is the distance from the starting point to the target point (the distance can be Euclidean distance, Minkowski distance or Mahalanobis distance), ε represents the adjustment factor, k c Indicates the current number of iterations, k max Indicates the maximum number of iterations.
[0018] In the present invention, the pheromone concentration dynamic update mechanism is as follows:
[0019] τ ij (t+1)=(1-ρ)×τ ij (t)+Δτ ij (t)
[0020] Among them, τ ij (t+1) represents the pheromone concentration at time t+1, τ ij (t) represents the pheromone concentration at time t, ρ is the volatility coefficient of the pheromone;
[0021] Δτ ij (t) indicates the path<i,j> The added value of pheromone can be expressed as:
[0022]
[0023] Q represents the pheromone carried by each ant, and L(t) represents the length of the path traversed by the ant in this iteration.
[0024] The dynamic update mechanism of the introduced pheromone volatility coefficient ρ is as follows:
[0025]
[0026] In the formula, μ is the adjustment factor, and its value range is (0, 1), L k represents the length from the starting point to the target point of ant k in the current iteration, and D represents the distance between the starting point and the target point (the distance can be Euclidean distance, Minkowski distance or Mahalanobis distance). According to the formula, it can be seen that the volatility coefficient ρ is related to L k is proportional to L k Therefore, after multiple iterations, the above dynamic update mechanism of pheromone volatility coefficient can reduce the attraction of overly long paths to ants and speed up the process of finding the optimal path.
[0027] In a second aspect, the present invention provides a robot path planning system based on an ant colony algorithm with a dynamic update mechanism.
[0028] A robot path planning system based on an ant colony algorithm with a dynamic update mechanism, comprising:
[0029] The rasterization module is used to obtain the robot's task environment and perform rasterization processing on it to obtain a raster map, and determine the information of the robot's starting node, target node, nodes that are prone to deadlock, and obstacle nodes;
[0030] The path search module is used to calculate the heuristic function and state transition rules, and select the next node that the ant can go to according to the calculation results until it reaches the target point;
[0031] The historical path saving module is used to save the optimal path of the current iteration after all ants complete an iteration;
[0032] The pheromone parameter dynamic update module is used to dynamically update the pheromone volatility coefficient and pheromone concentration until all iterations are completed to obtain the final optimal path;
[0033] The dynamic update mechanism of the pheromone volatility coefficient is: the adjustment factor multiple of the ratio of the path length traversed by the ant in the current iteration to the distance between the starting point and the target point.
[0034] In a third aspect, the present invention provides a computer-readable storage medium.
[0035] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in the robot path planning method based on the dynamic update mechanism ant colony algorithm as described above.
[0036] In a fourth aspect, the present invention provides an electronic device.
[0037] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the robot path planning method based on the dynamic update mechanism ant colony algorithm as described above are implemented.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] In order to solve the problems that when using ant colony algorithm for path planning, the obtained path is not necessarily the global optimal one, and the process of finding the optimal path consumes a long time and has low efficiency, the present invention proposes a robot path planning method and system based on dynamic update mechanism ant colony algorithm, which introduces a dynamic update mechanism of pheromone volatility coefficient, effectively reduces the attraction of too long paths to ants, and accelerates the optimal search process; the present invention also redesigns the heuristic function to balance the global search capability and the convergence speed; finally, the probability transfer formula is optimized, the situation of obtaining the local optimal path is reduced, and the path planning efficiency is finally improved.
[0040] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0042] Figure 1 is a flow chart of a robot path planning method based on an ant colony algorithm with a dynamic update mechanism according to an embodiment of the present invention;
[0043] Figure 2 This is a grid map of an embodiment of the present invention, and the length and width of each grid are set to be 1m;
[0044] Figure 3 It is a robot path planning trajectory diagram based on the existing ant colony algorithm;
[0045] Figure 4 It is a robot path planning trajectory diagram based on a dynamic update mechanism ant colony algorithm according to an embodiment of the present invention;
[0046] Figure 5This is a comparison diagram of the convergence curves of the robot path planning based on the existing ant colony algorithm and the robot path planning according to the embodiment of the present invention;
[0047] Figure 6 It is a schematic diagram of the structure of a robot path planning system based on an ant colony algorithm with a dynamic update mechanism according to an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0049] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0050] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0051] Embodiment 1
[0052] like Figure 1 As shown, this embodiment provides a robot path planning method based on a dynamic update mechanism ant colony algorithm, which includes:
[0053] Step 1: Obtain the robot's task environment and perform rasterization processing on it to obtain a raster map, and determine the information of the robot's starting node, target node, nodes that are prone to deadlock, and obstacle nodes. The raster map is as follows: Figure 2 As shown in the figure, the black grid is an obstacle, indicating an infeasible area, represented by 1; the white grid represents the area where the robot can move freely, represented by 0;
[0054] Step 2: Determine the node that the ant will reach next based on the pheromone concentration and probability transfer formula;
[0055] Step 3: When all ants complete an iteration, save the optimal path of the current iteration;
[0056] Step 4: Dynamically update the pheromone volatility coefficient, pheromone concentration and taboo list until all iterations are completed and the final optimal path is obtained;
[0057] The dynamic update mechanism of the pheromone volatility coefficient is: the adjustment factor multiple of the ratio of the path length traversed by the ant in the current iteration to the distance between the starting point and the target point.
[0058] Specifically, the process of planning the robot's path based on the dynamic update mechanism ant colony algorithm includes:
[0059] Initialize the parameters of the ant colony algorithm and the taboo list;
[0060] Assign m ants to the starting point and add the starting point to the taboo list;
[0061] Establish a taboo list and initialize it, add the starting point, obstacle nodes, and nodes that cause deadlock to the taboo list;
[0062] When all ants complete an iteration, they save the optimal path and update the pheromone and taboo lists;
[0063] Determine the node that the ant can reach next based on the pheromone concentration and probability transfer formula, dynamically update the pheromone volatility coefficient, record and update the path, and update the taboo list;
[0064] If the ant completes all iterations, it outputs the optimal path and the number of convergence iterations. If it does not complete all iterations, it continues to the next iteration.
[0065] The transfer probability calculation formula of ants in the ant colony algorithm based on the dynamic update mechanism is as follows:
[0066]
[0067] in, represents the probability of the kth ant moving from node i to node j at time t, γ∈(0,1) is the adjustment factor, x e ,y e represents the horizontal and vertical coordinates of the target point, x and y represent the horizontal and vertical coordinates of the current position of the robot, e represents the natural constant, τ ij (t) represents the pheromone concentration from node i to node j, α represents the pheromone concentration factor, β represents the heuristic factor, η ij (t) represents the heuristic function from node i to node j at time t.
[0068] Improve the heuristic function - Since the heuristic function of the traditional ant colony algorithm only considers the distance between the current grid and the candidate grid, it will lead to poor global performance in the early stage. In order to improve the efficiency of the search, it is also necessary to consider the distance between the current grid and the target grid.
[0069] In addition, in the later stage of the algorithm, the role of the heuristic function should be weakened to balance the global search ability and convergence speed of the algorithm. The optimized heuristic function calculation method is as follows:
[0070]
[0071] Where η represents the heuristic function, D is the distance from the starting point to the target point (the distance can be Euclidean distance, Minkowski distance or Mahalanobis distance), ε represents the adjustment factor, k c Indicates the current number of iterations, k max Indicates the maximum number of iterations.
[0072] The dynamic update mechanism of pheromone concentration is as follows:
[0073] τ ij (t+1)=(1-ρ)×τ ij (t)+Δτ ij (t)
[0074] τ ij (t+1) represents the pheromone concentration at time t+1, τ ij (t) represents the pheromone concentration at time t, ρ is the volatility coefficient of the pheromone;
[0075] Δτ ij (t) indicates the path<i,j> The added value of pheromone can be expressed as:
[0076]
[0077] Q represents the pheromone carried by each ant, and L(t) represents the length of the path traversed by the ant in this iteration.
[0078] This embodiment introduces a dynamic update mechanism of the pheromone volatility coefficient ρ, as shown below:
[0079]
[0080] In the formula, μ is the adjustment factor, and its value range is (0, 1), L k represents the length from the starting point to the target point of ant k in the current iteration, and D represents the distance between the starting point and the target point (the distance can be Euclidean distance, Minkowski distance or Mahalanobis distance). According to the formula, it can be seen that the volatility coefficient ρ is related to L k is proportional to L k Therefore, after multiple iterations, the above dynamic update mechanism of pheromone volatility coefficient can reduce the attraction of overly long paths to ants and speed up the process of finding the optimal path.
[0081] The ant colony algorithm based on dynamic update mechanism in this embodiment is based on the traditional ant colony algorithm and makes several improvements, including: the present invention introduces a dynamic update mechanism of pheromone volatility coefficient, which effectively reduces the attractiveness of too long paths to ants and accelerates the optimal search process; secondly, the heuristic function is redesigned to balance the global search capability and the convergence speed; finally, the probability transfer formula is optimized to reduce the situation of obtaining the local optimal path.
[0082] This embodiment discloses a verification process, see Figure 5 , the improved ant colony algorithm of the present invention and the existing ant colony algorithm are used for comparative verification. A 20*20 grid map is established, and the length and width of each grid are set to 1m. The existing algorithm and the improved ant colony algorithm of this paper are used for path planning.
[0083] Table 1 Simulation results of two algorithms in 20*20 environment
[0084] algorithm Existing ant colony algorithm Improved ant colony algorithm of the present invention Optimal path length 38m 29.21m Iterations 51 11 Number of path turning points 14 8
[0085] Figure 3 It is a robot path planning trajectory diagram based on the existing ant colony algorithm; Figure 4 This is a robot path planning trajectory diagram based on the dynamic update mechanism ant colony algorithm of the embodiment of the present invention. By comparison, it can be found that the improved ant colony algorithm proposed in this embodiment reduces the number of inflection points to a certain extent, and converges faster, and the optimal path length found is shorter. Therefore, the improved ant colony algorithm has certain advantages.
[0086] Embodiment 2
[0087] like Figure 6 As shown, this embodiment provides a robot path planning system based on a dynamic update mechanism ant colony algorithm, which includes:
[0088] (1) A rasterization module is used to obtain the robot's task environment and perform rasterization processing on it to obtain a raster map, thereby determining the information of the robot's starting node, target node, nodes that are prone to deadlock, and obstacle nodes.
[0089] (2) Path search module, which is used to calculate the heuristic function and state transition rules, and select the next node that the ant can go to according to the calculation results until it reaches the target point;
[0090] (3) Historical path saving module: when all ants complete an iteration, the optimal path of the current iteration is saved;
[0091] (4) a pheromone parameter dynamic update module, which is used to dynamically update the pheromone volatility coefficient and pheromone concentration until all iterations are completed and the final optimal path is obtained;
[0092] The probability transfer formula in this embodiment is:
[0093]
[0094] in, represents the probability of the kth ant moving from node i to node j at time t, γ∈(0,1) is the adjustment factor, x e ,y e represents the horizontal and vertical coordinates of the target point, x and y represent the horizontal and vertical coordinates of the current position of the robot, e represents the natural constant, τ ij (t) represents the pheromone concentration from node i to node j, α represents the pheromone concentration factor, β represents the heuristic factor, η ij (t) represents the heuristic function from node i to node j at time t.
[0095] The heuristic function η from node i to node j at time t ij (t) is:
[0096]
[0097] Where D is the distance from the starting point to the target point (the distance can be Euclidean distance, Minkowski distance or Mahalanobis distance), ε represents the adjustment factor, k c Indicates the current number of iterations, k max Indicates the maximum number of iterations.
[0098] In the present invention, the pheromone dynamic update mechanism is as follows:
[0099] The dynamic update mechanism of pheromone concentration is as follows:
[0100] τ ij (t+1)=(1-ρ)×τ ij (t)+Δτ ij (t)
[0101] Among them, τ ij (t+1) represents the pheromone concentration at time t+1, τ ij (t) represents the pheromone concentration at time t, ρ is the volatility coefficient of the pheromone;
[0102] Δτ ij (t) indicates the path<i,j> The added value of pheromone can be expressed as:
[0103]
[0104] Q represents the pheromone carried by each ant, and L(t) represents the length of the path traversed by the ant in this iteration.
[0105] The present invention introduces a dynamic update mechanism of the pheromone volatility coefficient ρ, as shown below:
[0106]
[0107] In the formula, μ is the adjustment factor, and its value range is (0, 1), L k represents the length from the starting point to the target point of ant k in the current iteration, and D represents the distance between the starting point and the target point (the distance can be Euclidean distance, Minkowski distance or Mahalanobis distance). According to the formula, it can be seen that the volatility coefficient ρ is related to L k is proportional to L k Therefore, after multiple iterations, the above dynamic update mechanism of pheromone volatility coefficient can reduce the attraction of overly long paths to ants and speed up the process of finding the optimal path.
[0108] It should be noted here that the various modules in this embodiment are the same as the various steps in Embodiment 1 and will not be described in detail here.
[0109] Embodiment 3
[0110] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps in the robot path planning method based on the dynamic update mechanism ant colony algorithm as described above are implemented.
[0111] Embodiment 4
[0112] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the robot path planning method based on the dynamic update mechanism ant colony algorithm as described above are implemented.
[0113] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products of the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of the processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A robot path planning method based on a dynamic update mechanism ant colony algorithm, characterized in that: include: Obtain the robot's task environment, perform rasterization processing on it, obtain a raster map, and determine the information of the robot's starting node, target node, nodes that are prone to deadlock, and obstacle nodes; Determine the node that the ant will reach next based on the pheromone concentration and probability transfer formula; The probability transfer formula is: in, represents the probability of the kth ant moving from node i to node j at time t, γ∈(0,1) is the adjustment factor, x e ,y e represents the horizontal and vertical coordinates of the target point, x and y represent the horizontal and vertical coordinates of the current position of the robot, e represents the natural constant, τ ij (t) represents the pheromone concentration from node i to node j, α represents the pheromone concentration factor, β represents the heuristic factor, η ij (t) represents the heuristic function from node i to node j at time t; When all ants complete an iteration, the optimal path of the current iteration is saved; Dynamically update the pheromone volatility coefficient, pheromone concentration and taboo list until all iterations are completed and the final optimal path is obtained; The dynamic update mechanism of the pheromone volatility coefficient is: the adjustment factor multiple of the ratio of the path length of the ant in the current iteration to the distance between the starting point and the target point; The dynamic update mechanism of the volatility coefficient of the pheromone is: In the formula, μ is the adjustment factor, and its value range is (0,1), L k represents the length from the starting point to the target point of ant k in the current iteration, and D represents the distance between the starting point and the target point; The distance is Euclidean distance, Minkowski distance or Mahalanobis distance.
2. The robot path planning method based on the dynamic update mechanism ant colony algorithm as claimed in claim 1, characterized in that: The heuristic function η from node i to node j at time t ij (t) is: Where D is the distance from the starting point to the target point, ε is the adjustment factor, and k c Indicates the current number of iterations, k max Indicates the maximum number of iterations.
3. A robot path planning system based on a dynamic update mechanism ant colony algorithm, comprising: The rasterization module is used to obtain the robot's task environment and perform rasterization processing on it to obtain a raster map, and determine the information of the robot's starting node, target node, nodes that are prone to deadlock, and obstacle nodes; The path search module is used to calculate the heuristic function and state transition rules, and select the next node that the ant can go to according to the calculation results until it reaches the target point; The probability transfer formula is: in, represents the probability of the kth ant moving from node i to node j at time t, γ∈(0,1) is the adjustment factor, x e ,y e represents the horizontal and vertical coordinates of the target point, x and y represent the horizontal and vertical coordinates of the current position of the robot, e represents the natural constant, τ ij (t) represents the pheromone concentration from node i to node j, α represents the pheromone concentration factor, β represents the heuristic factor, η ij (t) represents the heuristic function from node i to node j at time t; The historical path saving module is used to save the optimal path of the current iteration after all ants complete an iteration; The pheromone parameter dynamic update module is used to dynamically update the pheromone volatility coefficient and pheromone concentration until all iterations are completed to obtain the final optimal path; The dynamic update mechanism of the pheromone volatility coefficient is: the adjustment factor multiple of the ratio of the path length of the ant in the current iteration to the distance between the starting point and the target point; The dynamic update mechanism of the volatility coefficient of the pheromone is: In the formula, μ is the adjustment factor, and its value range is (0,1), L k represents the length from the starting point to the target point of ant k in the current iteration, and D represents the distance between the starting point and the target point; The distance is Euclidean distance, Minkowski distance or Mahalanobis distance.
4. The robot path planning system based on the dynamic update mechanism ant colony algorithm as claimed in claim 3, characterized in that: The heuristic function η from node i to node j at time t ij (t) is: Where D is the distance from the starting point to the target point, ε is the adjustment factor, and k c Indicates the current number of iterations, k max Indicates the maximum number of iterations.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the robot path planning method based on the dynamic update mechanism ant colony algorithm as described in any one of claims 1-2 are implemented.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the robot path planning method based on the dynamic update mechanism ant colony algorithm as described in any one of claims 1 to 2 are implemented.