An AGV path planning method based on improved ant colony algorithm
By improving the pheromone distribution, heuristic information and angle heuristic function of the ant colony algorithm, the problems of blindness in early search and slow convergence speed in AGV path planning are solved, and faster convergence speed and fewer path turns are achieved, improving The efficiency of AGV path planning.
Patent Information
- Application Number
- CN202210850677.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-20
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-07-20
AI Technical Summary
The existing ant colony algorithm has problems such as strong initial search blindness, slow convergence speed, frequent path turn times, and large calculation volume in AGV path planning, resulting in low computing efficiency.
By improving the ant colony algorithm, differentiated distribution of pheromones and countdown Euro-eucid distances are used as heuristic information, angle heuristic functions are introduced, and global pheromone update rules are improved to form new transfer probability and pheromone update formulas, and the algorithm is improved globality and convergence speed.
The search speed and convergence speed of AGV path planning are improved, the number of path turns is reduced, the stability and computing efficiency of the algorithm are improved, and the optimal path solution is obtained.
Smart Images

Figure CN115220453B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of intelligent robot path planning and relates to an AGV path planning method based on an improved ant colony algorithm. Background Art
[0002] In recent years, with the rapid development of artificial intelligence, AGV has been widely studied and applied in the fields of manufacturing, medical services and intelligent logistics. At the same time, navigation technology has become the core of AGV-related technology research, which defines how AGV perceives the environment, how to locate in the environment, and how to plan paths in a known map. Path planning is the most important part of navigation technology. It refers to the process of placing the AGV in a working environment with obstacles, setting the starting point and end point of the AGV in this working environment, and enabling the AGV to find a collision-free optimal path from the starting point to the end point. Path planning includes local path planning and global path planning. Local path planning is a path search performed in a dynamic environment, and global path planning is a path search performed in a static environment.
[0003] At present, domestic and foreign researchers have proposed many algorithms for AGV path planning. Traditional algorithms include A* algorithm, artificial potential field, etc. Intelligent optimization algorithms include ant colony algorithm, genetic algorithm, particle swarm algorithm, etc. Each algorithm has different advantages and disadvantages according to different performance indicators. Ant colony algorithm is an optimization algorithm based on intelligent bionic computing. It has good application prospects in AGV path planning and unmanned driving. Although ant colony algorithm has good robustness, strong adaptability, good solution ability and other advantages, it still has the following disadvantages: ① Ant colony algorithm has strong blindness in the initial search, slow algorithm convergence speed and long search time; ② Ant colony algorithm uses the Euclidean distance between the current position and the next position of the ant as the heuristic information function, which makes the ant easy to stagnate in the search process and fall into the local optimal solution; ③ The path searched by the ant colony algorithm has too many turns and does not use the actual walking of AGV; ④ In addition, the ant colony algorithm also has the disadvantages of large calculation amount and low calculation efficiency. Therefore, it is necessary to further improve the ant colony algorithm to obtain an ant colony algorithm that is more suitable for AGV path planning. Summary of the invention
[0004] In order to solve the limitations and defects of the prior art, the present invention proposes an AGV path planning method based on an improved ant colony algorithm, comprising the following steps:
[0005] Step 1: A grid map of AGV movement is formed according to the grid method, where one grid represents one location node and the grid is encoded;
[0006] Step 2: Set the AGV starting point S and end point E, and initialize the basic parameters of the improved ant colony algorithm;
[0007] Step 3: Initialize pheromones with differentiated distribution according to the starting point S and end point E of the AGV and obstacle information;
[0008] Step 4: Place m ants at the starting point S and start this iteration;
[0009] Step 5, forming expected heuristic information based on the next candidate grid j of the ant and the end point E;
[0010] Step 6, forming a transition probability according to the pheromone, the expected heuristic information and the corner heuristic function, wherein the initial value of the pheromone is the initialization pheromone;
[0011] Step 7, combining the transition probability of step 6, randomly select the next candidate grid j;
[0012] Step 8, determine whether all m ants have reached the end point E; if so, end this iteration, update the global pheromone according to the global pheromone update formula, and jump to step 9; otherwise, jump to step 5;
[0013] Step 9, updating the local pheromone according to the local pheromone formula;
[0014] Step 10: Determine whether the number of iterations N is equal to N max ; If so, terminate the algorithm and output the optimal AGV path L gbest ; Otherwise, increase the number of iterations N by 1 and jump to step 4.
[0015] Furthermore, the encoding of the grid in step 1 is specifically as follows:
[0016] Encoding is performed from left to right and from bottom to top. The calculation formula for the sequence encoding of the AGV in the grid map is:
[0017]
[0018] Among them, the coordinates of AGV are (x i ,y i ); X is the number of rows of the grid map; Y is the number of columns of the grid map; a is the side length of a grid; % is the redundant operator symbol; is the round-up symbol; i is the grid code number occupied by the AGV in the grid map.
[0019] Furthermore, the basic parameters of the initialization improved ant colony algorithm described in step 2 include the total amount of pheromone Q released by ants in one cycle, the pheromone factor α, the heuristic factor β, the global pheromone volatility factor adjustment coefficient κ, the number of ants m, and the maximum number of iterations N. max , local pheromone volatile factor A constant λ related to the size of the grid map.
[0020] Furthermore, the calculation formula for initializing pheromone in step 3 is:
[0021]
[0022] Among them, τ' ij (0) is the pheromone at time 0, i.e., the initialization pheromone; d is the distance from the next candidate grid j of the ant to the line connecting the starting point S and the end point E; λ is a constant related to the size of the grid map, and its value is In the range of , W is the maximum length or width of the grid map size; τ0 is the initial pheromone of the environment; d m It represents the comprehensive evaluation value of the grid map environment, and the calculation formula is as follows:
[0023]
[0024] Wherein, ν is the obstacle ratio in the grid map, which is the ratio of obstacle grids to the total number of grids; l is the diagonal length of the grid map.
[0025] Furthermore, the expected heuristic information η in step 5 is ij (t) is calculated as:
[0026]
[0027] Among them, η ij (t) is the heuristic information from the current grid i where the ant is located at time t to the next selected grid j; (x j (t),y j (t)) is the coordinate of the next selected grid j at time t; (x E ,y E ) are the coordinates of the end point E.
[0028] Furthermore, the transition probability in step 6 is The calculation formula is:
[0029]
[0030] Among them, τ' ij (t) is the pheromone at time t, η ij (t) is the expected heuristic information, w ij is the corner heuristic function, j is the next candidate grid selected by the ant; allowed k is the grid set to be selected by ants; is the probability that the mth ant selects the next candidate grid j from the current grid i at time t.
[0031] Furthermore, the corner heuristic function w in step 6ij The calculation formula is:
[0032]
[0033]
[0034] Furthermore, step 7 specifically adopts the betting method to allocate the area occupied by all the next grids to be selected in the betting disk according to the result of the transfer probability, and randomly selects the next grid to be selected j.
[0035] Furthermore, the global pheromone update formula in step 8 is:
[0036]
[0037]
[0038] The pheromone of the best traversal path is enhanced, and the pheromone of the worst traversal path is weakened. gbest is the length of the current global optimal path; J best is the optimal path length in this iteration; J worst is the worst path length in this iteration; p bs is the grid node information of the optimal path of the current iteration; p ws is the grid node information of the worst path in the current iteration; τ' ij (t) is the pheromone at time t, τ' ij (t+1) is the pheromone at time t+1; ρ is the global pheromone volatility factor, which ranges from [0,1], κ is the adjustment coefficient, which is a positive number less than 1. SE is the Euclidean distance from the starting point S to the end point E.
[0039] Furthermore, the local pheromone update formula in step 9 is:
[0040]
[0041] Among them, τ' ij (t) is the pheromone at time t; τ' ij (t+1) is the pheromone at time t+1; is the local pheromone volatility factor, which ranges from [0,1].
[0042] Beneficial effects of the present invention:
[0043] The present invention makes the initial pheromone present differentiated distribution, avoids the initial blind search of ants, and improves the early search speed and convergence speed of the ant colony algorithm.
[0044] The present invention improves the heuristic function and uses the inverse of the Euclidean distance between the candidate grid J and the end point E as heuristic information, so that the ant colony algorithm has better globality.
[0045] The present invention converts the corner heuristic function w ij By introducing it into the transition probability, the path planned by the ant colony algorithm can avoid unnecessary turns, improve the stability of AGV movement and reduce the energy consumption of AGV when turning.
[0046] The present invention improves the global pheromone update rule, and improves the convergence speed and search quality of the ant colony algorithm by enhancing the best traversal path pheromone and weakening the worst traversal path pheromone.
[0047] The present invention makes the global pheromone volatilization factor adaptive, and further improves the globality and convergence speed of the ant colony algorithm.
[0048] In summary, the present invention proposes an AGV path planning method based on an improved ant colony algorithm, which forms a grid map of AGV movement according to the grid method, forms differentially distributed initial pheromones according to the starting and ending points of the AGV and obstacle information, forms a new expected heuristic function according to the next selected grid and the end point of the ant, forms a new transfer probability according to the pheromone, heuristic information and corner heuristic function, updates the global pheromone according to the new global pheromone update formula, updates the local pheromone according to the local pheromone formula, and adaptively adjusts the global pheromone volatility factor. The technical solution provided in this embodiment can obtain a better optimal path solution, with a faster convergence speed and fewer turns in the optimal path. In addition, this embodiment proves through simulation experiments that the above technical solution is feasible and effective. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 :A flow chart of an AGV path planning method based on an improved ant colony algorithm in the present invention.
[0050] Figure 2 : Schematic diagram of the grid map model provided in Example 1 of the present invention.
[0051] Figure 3 : Optimal path trajectory diagram under the method of the present invention.
[0052] Figure 4 : Convergence curve diagram of ant colony algorithm under the method of the present invention.
[0053] Figure 5 A: Path planning results under the ACO algorithm.
[0054] Figure 5 B: Path planning result diagram under AS algorithm.
[0055] Figure 5 C: Path planning results under the EAS algorithm.
[0056] Figure 5 D: Path planning result diagram under RAS algorithm.
[0057] Figure 6 : Algorithm convergence curve diagram in the comparative experiment provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0058] The following is a detailed description of an AGV path planning method based on an improved ant colony algorithm proposed by the present invention in conjunction with the accompanying drawings.
[0059] Embodiment 1
[0060] This embodiment studies the global path planning problem in a static environment. This embodiment proposes an AGV path planning method based on an improved ant colony algorithm. This embodiment abbreviates the improved ant colony algorithm in the present invention as IAACS, and the AGV can only move in four directions: up, down, left, and right in the grid map. The main flow chart is as follows: Figure 1 As shown, the specific steps are as follows:
[0061] Step 1: Form a grid map of AGV movement according to the grid method, such as Figure 2 As shown. The white grid represents the feasible area of the robot, and the black grid represents the obstacle (the area that the AGV cannot pass through). During the walking process of the AGV, the obstacle is in a stationary state and the size is fixed. A Cartesian coordinate system is established in the grid map. One grid represents a position node, and the grid is encoded from left to right and from bottom to top. The calculation formula for the sequence encoding of the AGV in the grid map is:
[0062]
[0063] Among them, the coordinates of AGV are (x i ,y i ); X is the number of rows of the grid map; Y is the number of columns of the grid map; a is the side length of a grid, and in this embodiment, the side length of the grid is 1; % is a redundant operation symbol; is the round-up symbol; i is the grid code number occupied by the AGV in the grid map.
[0064] Step 2: Set the AGV starting point S and end point E, and initialize the basic parameters of the improved ant colony algorithm, including the total amount of pheromone Q released by ants in one cycle, pheromone factor α, heuristic factor β, global pheromone volatility factor adjustment coefficient κ, number of ants m, and maximum number of iterations N. max , local pheromone volatile factor The constant λ related to the grid map size is shown in Table 1.
[0065] Table 1 Basic parameter initialization
[0066]
[0067] Step 3: Form differentiated distribution of initialization pheromones according to the starting point S and end point E of the AGV and obstacle information. The calculation formula of the initialization pheromone is:
[0068]
[0069] Among them, τ' ij (0) is the pheromone at time 0, i.e., the initialization pheromone; d is the distance from the next candidate grid j of the ant to the line connecting the starting point S and the end point E; λ is a constant related to the size of the grid map, and its value is In the range of , W is the maximum length or width of the grid map size; τ0 is the initial pheromone of the environment; d m Represents the comprehensive evaluation value of the grid map environment.
[0070] Step 4: Place m ants at the starting point S and start this iteration.
[0071] Step 5: Form new expected heuristic information based on the next selected grid j of the ant and the end point E. The calculation formula of the expected heuristic information is:
[0072]
[0073] Among them, η ij (t) is the heuristic information from the current grid i where the ant is located at time t to the next selected grid j; (x j (t),y j (t)) is the coordinate of the next selected grid j at time t; (x E ,y E ) are the coordinates of the end point E.
[0074] Step 6: According to the pheromone τ' at time t ij (t), expected heuristic information η ij (t) and the corner heuristic function w ij A new transition probability is formed, and the transition probability calculation formula is:
[0075]
[0076] Among them, j is the next candidate grid selected by the ant; allowed k is the grid set to be selected by ants; is the probability that the mth ant selects the next candidate grid j from the current grid i at time t.
[0077] Step 7, use the betting method to select the next position, that is, The probability result distributes the area occupied by all the next grids to be selected in the betting disk, rotates the betting disk, and randomly selects the next grid to be selected j.
[0078] Step 8, determine whether all m ants have reached the end point E; if so, end this iteration, update the global pheromone according to the new global pheromone update formula, and jump to step 8; otherwise, jump to step 5. The global pheromone update formula is:
[0079]
[0080]
[0081] Formula (6) is used to enhance the pheromone of the optimal traversal path, and formula (7) is used to weaken the pheromone of the worst traversal path. gbest is the length of the current global optimal path; J best is the optimal path length in this iteration; J worst is the worst path length in this iteration; p bs is the grid node information of the optimal path of the current iteration; p ws is the grid node information of the worst path in the current iteration; τ' ij (t) is the pheromone at time t, τ' ij (t+1) is the pheromone at time t+1; ρ is the global pheromone volatility factor, which ranges from [0,1];
[0082] Step 9, updating the local pheromone according to the local pheromone formula, the local pheromone update formula is:
[0083]
[0084] Among them, τ' ij (t) is the pheromone at time t; τ' ij (t+1) is the pheromone at time t+1; is the local pheromone volatility factor, which ranges from [0,1].
[0085] Step 10: Determine whether the number of iterations N is equal to N max ; If so, terminate the algorithm and output the optimal path L gbest ,like Figure 3 As shown, the convergence curve is Figure 4 As shown; otherwise, increase the number of iterations N by 1 and jump to step 4.
[0086] Furthermore, the grid map environment comprehensive evaluation value d in step 3 m The calculation formula is as follows:
[0087]
[0088] Wherein, ξ is the obstacle ratio in the grid map, which is the ratio of obstacle grids to the total number of grids; l is the diagonal length of the grid map.
[0089] Furthermore, the corner heuristic function w in step 6 ij The calculation formula is:
[0090]
[0091]
[0092] Furthermore, the global adaptive pheromone volatilization factor formula in step 8 is:
[0093]
[0094] Among them, L SE is the Euclidean distance from the starting point S to the end point E.
[0095] To further illustrate the effectiveness of the technical solution of the present invention, this example conducted a comparative experiment with traditional ant colony algorithms such as AS, ACO, EAS and RAS under the same parameters, and the experimental results are shown in Table 2. The AGV path planning results under the method proposed in this embodiment are shown in Table 2. Figure 3 As shown; the AGV path planning results under the ACO algorithm are as follows Figure 5 As shown in A; the AGV path planning result under the AS algorithm is as follows Figure 5 B; the AGV path planning result under the EAS algorithm is as follows Figure 5 C; the AGV path planning result under the RAS algorithm is as follows Figure 5 D. The algorithm convergence curve is shown in Figure 6 As shown in the figure, it can be seen from the comparison that the improved ant colony algorithm provided by the present invention can obtain better optimal path solutions, faster convergence speed, and fewer optimal path turns in AGV path planning compared with the other four algorithms.
[0096] Table 2 Experimental results of five algorithms
[0097]
[0098] The above description in conjunction with the accompanying drawings describes in detail the specific embodiments of the present invention, but the present invention is not limited to the above embodiments. Various modifications and improvements can be made within the knowledge scope of ordinary technicians in the field without departing from the purpose of the present invention. These modifications and improvements are also regarded as the protection scope of the present invention.
Claims
1. An AGV path planning method based on an improved ant colony algorithm, characterized in that: The following steps are involved: Step 1: A grid map of AGV movement is formed according to the grid method, where one grid represents one location node and the grid is encoded; Step 2: Set the AGV starting point S and end point E, and initialize the basic parameters of the improved ant colony algorithm; Step 3: Initialize pheromones with differentiated distribution according to the starting point S and end point E of the AGV and obstacle information; Step 4: Place m ants at the starting point S and start this iteration; Step 5: Form expected heuristic information based on the next selected grid j of the ant and the end point E; the expected heuristic information η ij (t) is calculated as: Among them, η ij (t) is the heuristic information from the current grid i where the ant is located at time t to the next selected grid j; (x j (t),y j (t)) is the coordinate of the grid j to be selected by the ant at time t; (x E ,y E ) is the coordinate of the end point E; Step 6, forming a transition probability according to the pheromone, the expected heuristic information and the corner heuristic function, wherein the initial value of the pheromone is the initialization pheromone; the corner heuristic function w ij The calculation formula is: The transition probability The calculation formula is: Among them, τ' ij (t) is the pheromone at time t, η ij (t) is the expected heuristic information, w ij is the corner heuristic function, j is the next candidate grid selected by the ant; allowed k is the grid set to be selected by ants; is the probability that the mth ant selects the next candidate grid j from the current grid i at time t; Step 7, combining the transition probability of step 6, randomly select the next candidate grid j; Step 8, determine whether all m ants have reached the end point E; if so, end this iteration, update the global pheromone according to the global pheromone update formula, and jump to step 9; otherwise, jump to step 5; the global pheromone update formula is: Among them, J gbest is the length of the current global optimal path; J best is the optimal path length in this iteration; J worst is the worst path length in this iteration; p bs is the grid node information of the optimal path of the current iteration; p ws is the grid node information of the worst path in the current iteration; τ′ ij (t) is the pheromone at time t, τ′ ij (t+1) is the pheromone at time t+1; ρ is the global pheromone volatility factor, which ranges from [0, 1], κ is the adjustment coefficient, which is a positive number less than 1. SE is the Euclidean distance from the starting point S to the end point E; Step 9, updating the local pheromone according to the local pheromone formula; the local pheromone update formula is: Among them, τ′ ij (t) is the pheromone at time t; τ′ ij (t+1) is the pheromone at time t+1; is the local pheromone volatility factor, which ranges from [0, 1]; Step 10: Determine whether the number of iterations N is equal to N max ; If so, terminate the algorithm and output the optimal AGV path L gbest ; Otherwise, increase the number of iterations N by 1 and jump to step 4.
2. The AGV path planning method based on the improved ant colony algorithm according to claim 1 is characterized in that: The encoding of the grid described in step 1 is specifically as follows: Encoding is performed from left to right and from bottom to top. The calculation formula for the sequence encoding of the AGV in the grid map is: Among them, the coordinates of AGV are (x i ,y i ); X is the number of rows of the grid map; Y is the number of columns of the grid map; a is the side length of a grid; % is the redundant operator symbol; is the round-up symbol; i is the grid code number occupied by the AGV in the grid map.
3. The AGV path planning method based on improved ant colony algorithm according to claim 1, characterized in that: The basic parameters of the initialization improved ant colony algorithm described in step 2 include the total amount of pheromone Q released by ants in one cycle, pheromone factor α, heuristic factor β, global pheromone volatility factor adjustment coefficient κ, number of ants m, maximum number of iterations N max , local pheromone volatile factor A constant λ related to the size of the grid map.
4. The AGV path planning method based on improved ant colony algorithm according to claim 1, characterized in that: The calculation formula for initializing pheromone in step 3 is: Among them, τ′ ij (O) is the pheromone at time 0, i.e., the initialization pheromone; d is the distance from the next selected grid j of the ant to the line connecting the starting point S and the end point E; λ is a constant related to the size of the grid map, and its value is In the range of , W is the maximum length or width of the grid map size; τ0 is the initial pheromone of the environment; d m It represents the comprehensive evaluation value of the grid map environment, and the calculation formula is as follows: Wherein, ξ is the obstacle ratio in the grid map, which is the ratio of obstacle grids to the total number of grids; l is the diagonal length of the grid map.
5. The AGV path planning method based on improved ant colony algorithm according to claim 1, characterized in that: Step 7 specifically adopts the betting method to allocate the area occupied by all the next grids to be selected in the betting disk according to the result of the transfer probability, and randomly selects the next grid to be selected j.
Citation Information
Patent Citations
Dangerous rescue robot path planning method
CN109144062A
AGV path planning method based on improved ant colony algorithm
CN113093724A
