Robot path planning method based on improved ant colony algorithm
By improving the ant colony algorithm and combining multi-factor heuristic information and dynamic pheromone concentration updates, the problems of slow convergence and insufficient adaptability of the ant colony algorithm in complex environments are solved, and the robot path planning is achieved with high efficiency, energy saving and strong adaptability. solution.
Patent Information
- Application Number
- CN202410716012.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-10-01
AI Technical Summary
The existing ant colony algorithm converges slowly when dealing with large-scale or complex path planning, cannot achieve ideal optimization accuracy within limited computing resources and time, and ignores energy consumption, terrain complexity and kinematic constraints, resulting in path planning problems. Limited adaptability and feasibility, making it difficult to cope with changing environments.
An improved ant colony algorithm is used to consider multi-dimensional optimization indicators such as distance, energy consumption, and terrain adaptability through a comprehensive multi-factor heuristic information function, combined with a dynamic pheromone concentration update mechanism, to optimize the path exploration behavior of ants, and use raster maps to simulate the environment and Perform expansion processing, set the minimum turning angle and single movement distance, and adopt an eight-neighborhood search strategy.
It improves the convergence speed and optimization capabilities of the algorithm, ensures that the global optimal or approximately optimal path can be found in complex environments, enhances the adaptability and reliability of path planning, and reduces energy consumption and mechanical wear.
Smart Images

Figure CN118730108A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot path planning, and more specifically to a robot path planning method based on an improved ant colony algorithm. Background Art
[0002] In the field of robot path planning, with the rapid development of automation and intelligent technology, efficient, accurate and adaptable path planning algorithms have become the core of realizing applications such as autonomous navigation and intelligent logistics. Although the ant colony algorithm shows great potential in solving such problems due to its self-organizing and distributed characteristics, it still faces a series of challenges in practical applications.
[0003] When dealing with large-scale or highly complex path planning problems, the basic ant colony algorithm is prone to slow convergence due to the inherent characteristics of its iterative search mechanism, and sometimes even fails to achieve the ideal optimization accuracy within limited computing resources and time. This poses a major challenge to robotic applications that require fast response and high-precision navigation.
[0004] In addition, existing algorithms mainly rely on distance heuristics as the main guide, ignoring the fact that in actual path planning, in addition to distance, multiple factors such as energy consumption, terrain complexity, obstacle avoidance strategy, and robot kinematic constraints are not comprehensively considered. This often leads to limited adaptability and feasibility of path planning solutions in practical applications.
[0005] At the same time, in a constantly changing environment, such as the presence of moving obstacles or temporary restricted areas, the static planning strategy of the existing ant colony algorithm is difficult to respond effectively, lacks sufficient flexibility and instant adjustment capabilities, and reduces the reliability and effectiveness of the planning scheme.
[0006] Therefore, how to design a robot path planning method based on the improved ant colony algorithm to improve the convergence speed and optimization ability of the algorithm and ensure that the global optimal or approximately optimal path can be quickly found in a complex and changing environment is an urgent problem to be solved by those skilled in the art. Summary of the invention
[0007] In view of this, the present invention provides a robot path planning method based on an improved ant colony algorithm, which not only considers the distance factor, but also incorporates multi-dimensional optimization indicators such as energy consumption and terrain adaptability through a comprehensive multi-factor heuristic information function to adapt to a wider range of practical needs.
[0008] In order to achieve the above object, the present invention adopts the following technical solution:
[0009] A robot path planning method based on an improved ant colony algorithm, comprising:
[0010] S1, constructing a grid map to simulate the robot working environment; the grid map includes: a free grid and an obstacle grid; the obstacle grid is expanded, and the peaks function value is used to represent the height of the steep slope of the road surface;
[0011] S2. Based on the grid map, determine the search strategy and set relevant parameters; the relevant parameters include: minimum turning angle and single moving distance;
[0012] S3. After setting relevant parameters, coordinate transformation is performed on the grid map, and the path information of the optimal ant individual is outputted using the improved ant colony algorithm to obtain the optimal planning path of the robot; the improved ant colony algorithm adopts a comprehensive multi-factor heuristic information function and combines it with a dynamic pheromone concentration update mechanism.
[0013] Among them, in S2, the search strategy adopts an eight-neighborhood direction search strategy, and constructs an eight-neighborhood direction matrix to record the adjacency relationship between the current grid and the eight-neighborhood grids; the value of the eight-neighborhood direction matrix is determined by the grid state, direction and whether the non-touching edge safety rule is met.
[0014] Furthermore, in S3, the improved ant colony algorithm is used to output the location information of the optimal ant individual, including:
[0015] S31, initializing ant colony algorithm parameters; including: defining the heuristic information correlation matrix, defining the eight-neighborhood angle vector, setting the number of ants, setting the number of iterations, initializing the pheromone concentration matrix, and setting the pheromone concentration range;
[0016] S32, based on the heuristic information and the pheromone concentration, calculate the transfer probability from the current node to each optional node, and obtain the path information of each ant;
[0017] S33, based on the path information of each ant, globally updating the pheromone concentration through a dynamic pheromone concentration update mechanism;
[0018] S34, determining whether the globally updated pheromone concentration is within the preset pheromone concentration range; if so, proceeding to the next step; otherwise, outputting the path information of the optimal ant individual;
[0019] S35, determine whether the maximum number of iterations has been reached; if so, output the path information of the optimal ant individual; otherwise, return to S32.
[0020] Furthermore, the S32, based on the heuristic information and the pheromone concentration, calculates the transition probability from the current node to each optional node to obtain the path information of each ant, including:
[0021] S321, obtaining the current node of each ant; and adding the node to the taboo table;
[0022] S322, based on the current node, obtain all optional nodes through the eight-neighborhood matrix;
[0023] S323, based on the initialized pheromone concentration and combined with the heuristic information obtained by the multi-factor heuristic information function, calculating the transition probability from the current node to each optional node;
[0024] S324, based on the transfer probability, selecting the next node through roulette, and adding the next node to the taboo table;
[0025] S325, repeat the above S322 to S324 until the target node is reached or there is no way to go, and output the path information of each ant.
[0026] Furthermore, in S323, based on the initialized pheromone concentration and combined with the heuristic information obtained by the multi-factor heuristic information function, the transition probability from the current node to each optional node is calculated, including:
[0027] At time t, the transfer probability of the mth ant from node i to node j is:
[0028]
[0029] in, represents the pheromone concentration of the mth ant from node i to node j at time t, represents the heuristic information from node i to node j of the mth ant, α and β represent weight factors, allowed i Represents an optional node collection.
[0030] Furthermore, the heuristic information is obtained based on a multi-factor heuristic information function, and the multi-factor heuristic information function is:
[0031]
[0032] in, is the distance factor heuristic function to the end point, which represents the corrected distance from node j to the target node e; v(j,g) is the distance factor heuristic function to the starting and ending points, which represents the corrected distance from node j to the starting and target nodes g; ψ m (i,j) is the comprehensive energy consumption heuristic function, which represents the modified comprehensive energy consumption from node i to node j.
[0033] Furthermore, the distance factor heuristic function to the end point is:
[0034]
[0035] Among them, MAX d Indicates the maximum distance from node j to target node e, MIN d represents the minimum distance from node j to target node e, d(j,e) represents the distance from node j to target node e, eps represents the floating point relative error limit, and p represents the reference coefficient.
[0036] Furthermore, the straight-line distance factor heuristic function to the starting point and the end point is:
[0037]
[0038] Among them, MAX dl Indicates the maximum distance between node j and the straight line g between the starting node and the target node, MIN dl represents the minimum distance from node j to the straight line g between the starting node and the target node, dl(j) represents the distance from node j to the straight line g between the starting node and the target node, eps represents the floating point relative error limit, and p represents the reference coefficient.
[0039] Furthermore, the comprehensive energy consumption heuristic function is:
[0040]
[0041] Among them, MAX ω represents the maximum comprehensive energy consumption from node i to node j, MIN ω represents the minimum comprehensive energy consumption from node i to node j, ω(i,j) represents the comprehensive energy consumption from node i to node j, eps represents the floating point relative error limit, and p represents the benchmark coefficient.
[0042] Furthermore, the step S33, based on the path information of each ant, globally updating the pheromone concentration through a dynamic pheromone concentration updating mechanism, includes:
[0043]
[0044] in, represents the pheromone concentration of the mth ant from node i to node j at time t, represents the pheromone concentration of the mth ant from node i to node j at time t+1, ρ represents the dynamic volatility factor of pheromone, represents the pheromone concentration in the time period from t to t+1;
[0045] The mth ant passes through nodes i and j
[0046] Among them, S m(t) represents the comprehensive index of the mth ant finding a feasible path solution at time t, and Q is the pheromone enhancement coefficient;
[0047] S m (t) = wL m (t)+(1-w)×T m (t)
[0048] Among them, L m (t), T m (t) represents the length and total energy consumption of the path traversed by the mth ant at time t, w represents the path length weight coefficient, and (1-w) represents the energy consumption weight coefficient.
[0049] It can be seen from the above technical solution that compared with the prior art, the present invention has the following beneficial effects:
[0050] 1. The obstacle grid is expanded and the peaks function value is used to simulate the terrain height, which more accurately reflects the physical limitations of the complex environment, allowing the robot to avoid not only static obstacles, but also choose a more appropriate route according to the terrain.
[0051] 2. Setting parameters such as the minimum turning angle and single moving distance, and adopting the eight-neighborhood search strategy, while maintaining the breadth of the search space, improves the pertinence and efficiency of the search.
[0052] 3. By integrating multiple key factors to guide the exploration behavior of ants, the conventional single evaluation criterion is optimized to ensure that the planned path is not only short in distance, but also takes into account the linearity requirements and energy efficiency in actual operations, so that the algorithm can more comprehensively evaluate the pros and cons of the path.
[0053] 4. The pheromone concentration is adjusted dynamically considering the comprehensive indicators of ants finding the path. This strengthens the pheromone traces on the high-quality paths, making it easier for subsequent ants to find and follow these paths. At the same time, it also allows the pheromones on the inferior paths to gradually evaporate, accelerating the process of the algorithm converging to the global optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0055] Figure 1 A flow chart of a robot path planning method based on an improved ant colony algorithm provided in an embodiment of the present invention;
[0056] Figure 2 A grid map of size 20*20 provided in the embodiment of the present invention;
[0057] Figure 3 A schematic diagram of eight neighborhood numbering provided in an embodiment of the present invention;
[0058] Figure 4 A schematic diagram of adjacency matrix value selection provided by an embodiment of the present invention;
[0059] Figure 5 A schematic diagram of eight neighborhood angle vectors provided by an embodiment of the present invention;
[0060] Figure 6 A curve diagram showing the change of path length, energy consumption index, comprehensive index and number of ants that have reached a dead end under different benchmark coefficients provided in an embodiment of the present invention;
[0061] Figure 7 A curve diagram showing the change of path length, energy consumption index, comprehensive index and number of ants that have reached a dead end under different path length weight coefficients provided in an embodiment of the present invention;
[0062] Figure 8 A path planning diagram of different robot path planning schemes in a 20×20 grid map environment provided by an embodiment of the present invention;
[0063] Fig. 9 Path planning diagrams of different robot path planning schemes in a 100×100 grid map environment provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] Embodiment 1;
[0066] like Figure 1 As shown, this embodiment provides a robot path planning method based on an improved ant colony algorithm, comprising:
[0067] S1, constructing a grid map to simulate the robot working environment; the grid map includes: a free grid and an obstacle grid; the obstacle grid is expanded, and the peaks function value is used to represent the height of the steep slope of the road surface;
[0068] S2. Based on the grid map, determine the search strategy and set relevant parameters; the relevant parameters include: minimum turning angle and single moving distance;
[0069] S3. After setting relevant parameters, coordinate transformation is performed on the grid map, and the path information of the optimal ant individual is outputted using the improved ant colony algorithm to obtain the optimal planning path of the robot; the improved ant colony algorithm adopts a comprehensive multi-factor heuristic information function and combines it with a dynamic pheromone concentration update mechanism.
[0070] The above method lays the foundation for accurate simulation of complex environments by constructing a detailed grid map model and adopting obstacle grid expansion and height representation methods.
[0071] An improved ant colony algorithm integrating multi-objective optimization was designed, which not only considers the path length, but also integrates multi-factor heuristic strategies such as energy consumption, terrain adaptability and turning efficiency, significantly improving the practical application value of path planning. The dynamic pheromone concentration update mechanism introduced in the algorithm cleverly balances global exploration and local optimization through intelligent pheromone management, effectively avoiding the blind search in the early stage of the algorithm and the local optimal trap in the later stage, and accelerating the convergence process. The robot can perform efficient, energy-saving and adaptable path planning in complex and dynamic environments.
[0072] The following is a further detailed description of each step in the above method:
[0073] In S1, a grid map is constructed to simulate the robot's working environment. When a mobile robot is operating in a complex environment, the safety requirements are very high. The planned path must first ensure that the robot does not touch obstacles. Therefore, when performing grid modeling, the obstacle grid is expanded, that is, obstacles that do not occupy a grid are treated as one grid.
[0074] At the same time, in order to make the planned path as far away from obstacles as possible, the path passing through the grid node must not pass through the edge of the obstacle, and even the vertex cannot touch it. The actual working environment of the robot is usually three-dimensional, and the height of the grid node is used to represent the steep slope of the working environment.
[0075] like Figure 2 As shown, the specific modeling includes: constructing a map model matrix G, where 0 represents a free grid, represented by white, and 1 represents an obstacle grid node, represented by black; the height of the grid node is represented by the peaks function value, which simulates the slope change of the road surface, represented by green. The darker the color, the higher the height.
[0076] In S2, the search strategy adopts an eight-neighborhood direction search strategy to construct an eight-neighborhood direction matrix to record the adjacency relationship between the current grid and the eight-neighborhood grids; the value of the eight-neighborhood direction matrix is determined by the grid state, direction and whether the non-touching edge safety rule is met.
[0077] like Figure 3 As shown, ants can search in the grid map in the traditional eight neighborhood directions, namely east, west, south, north, southeast, northeast, southwest, and northwest, and number the eight neighborhoods. The minimum turning angle is set to 45°, and the robot's single movement distance is 1 or 1.4.
[0078] In order to facilitate the storage of feasible path information, an eight-neighborhood matrix is constructed to record the adjacency relationship between the grid and the eight-neighborhood grid. Assuming that the side length of the grid is 1, the eight-neighborhood matrix can take the following values: 1, 1.4, and infinity inf (infeasible). For adjacent grids i and j, if the states are both 0 and they are in the same horizontal or vertical direction, the adjacency matrix takes the value of 1; for adjacent grids i and j, if the states are both 0 and they are in the oblique direction, according to the safety performance requirements that the robot cannot touch the edge of the obstacle, the adjacency matrix takes the value of 1.4 only when the oblique grid and the two vertical grids perpendicular to the direction are free grids, otherwise it takes inf.
[0079] like Figure 4 As shown, the adjacency matrix value of adjacency grids 2 and 3 is 1, the adjacency matrix value of adjacency grids 2 and 5 is inf, and the adjacency matrix value of adjacency grids 3 and 8 is 1.4.
[0080] In S3, the core idea of the ant colony algorithm is derived from the foraging behavior of ants in nature. When the ant colony is looking for food, the ants will release pheromones on the path, and other ants will find the food source by tracking these pheromones. At the same time, the ants will also obtain local heuristic information based on their own environment and make self-judgments. In this process, the pheromones on shorter paths will be more concentrated, and the ants will go back and forth more frequently, thus attracting more ants. This positive feedback mechanism makes ants more inclined to choose paths with higher pheromone concentrations, that is, shorter paths.
[0081] Using the improved ant colony algorithm, the location information of the optimal ant individuals is output, including:
[0082] S31, initializing ant colony algorithm parameters; including: defining the heuristic information correlation matrix, defining the eight-neighborhood angle vector, setting the number of ants, setting the number of iterations, initializing the pheromone concentration matrix, and setting the pheromone concentration range;
[0083] S32, based on the heuristic information and the pheromone concentration, calculating the transfer probability from the current node to each optional node, and obtaining the path information of each ant; including:
[0084] S321, obtaining the current node of each ant; and adding the node to the taboo table;
[0085] S322, based on the current node, obtain all optional nodes through the eight-neighborhood matrix;
[0086] S323, based on the initialized pheromone concentration and combined with the heuristic information obtained by the multi-factor heuristic information function, calculating the transition probability from the current node to each optional node;
[0087] S324, based on the transfer probability, selecting the next node through roulette, and adding the next node to the taboo table;
[0088] S325, repeat the above S322 to S324 until the target node is reached or there is no way to go, and output the path information of each ant.
[0089] S33, based on the path information of each ant, globally updating the pheromone concentration through a dynamic pheromone concentration update mechanism;
[0090] S34, determining whether the globally updated pheromone concentration is within the preset pheromone concentration range; if so, proceeding to the next step; otherwise, outputting the path information of the optimal ant individual;
[0091] S35, determine whether the maximum number of iterations has been reached; if so, output the path information of the optimal ant individual; otherwise, return to S32.
[0092] In S323, based on the initialized pheromone concentration and combined with the heuristic information obtained by the multi-factor heuristic information function, the transition probability from the current node to each optional node is calculated, including:
[0093] At time t, the transfer probability of the mth ant from node i to node j is:
[0094]
[0095] in, represents the pheromone concentration of the mth ant from node i to node j at time t, represents the heuristic information from node i to node j of the mth ant, α and β represent weight factors, allowed i Represents an optional node collection.
[0096] The following is a further explanation of the multi-factor heuristic information function:
[0097] In this embodiment, when the mobile robot is operating in an actual environment, while ensuring safety performance, not only the requirement of the shortest path length is considered, but also the extra energy consumption caused by the height difference of the path on a rugged road and the turning of the machine is considered. Every time the robot passes through a ground with a height difference, a certain degree of bumping will occur. The greater the height difference, the more severe the bumping, and the greater the damage to the machine. Every time the robot turns, the equipment is also worn out. The greater the turning angle, the greater the wear. It is assumed that the robot travels at a constant speed throughout the entire process from the starting point to the end point. When the robot needs to climb or go downhill due to the height difference of the ground, although the speed remains unchanged, the up and down bumps will cause damage to the equipment. When the robot turns, although the machine will not stop, the turning process will also cause damage to the equipment.
[0098] Taking all these factors into consideration, the energy consumption factor is added to the heuristic function of the ant colony algorithm, and the multi-factor heuristic information function is:
[0099]
[0100] in, is the distance factor heuristic function to the end point, which represents the corrected distance from node j to the target node e; ν(j,g) is the distance factor heuristic function to the starting and ending points, which represents the corrected distance from node j to the straight line g between the starting node and the target node; ψ m (i,j) is the comprehensive energy consumption heuristic function, which represents the modified comprehensive energy consumption from node i to node j.
[0101] In the early stages of the ant colony algorithm, the concentration of pheromones on all paths is the same, usually a constant, which causes the ant colony to easily fall into confusion during the early path search, increasing the cost of the early search. How to plan the shortest distance has always been an important goal of robot path planning. According to this requirement, the influence of the distance of the end grid to the candidate grid is reasonably amplified to provide direction guidance for the ant colony in the early search of the algorithm.
[0102] The distance factor heuristic function to the end point is:
[0103]
[0104] Among them, MAX d Indicates the maximum distance from node j to target node e, MIN d represents the minimum distance from node j to target node e, d(j,e) represents the distance from node j to target node e, eps represents the floating point relative error limit, and p represents the reference coefficient.
[0105] In geometry, the shortest distance between two points is a straight line. Each node in the optimal path is located near the line between the starting point and the end point. The distance dl(j) from node j to the straight line g between the starting node and the target node can be calculated by the column vector coordinates of node j, the starting point and the end point.
[0106] According to the principle of the shortest straight-line distance between two points and the requirement of planning the shortest path, the shorter the straight-line distance between the candidate node and the starting and ending points, the greater the inspiration function. The straight-line distance factor inspiration function to the starting and ending points is:
[0107]
[0108] Among them, MAX dl Indicates the maximum distance between node j and the straight line g between the starting node and the target node, MIN dl represents the minimum distance from node j to the straight line g between the starting node and the target node, dl(j) represents the distance from node j to the straight line g between the starting node and the target node, eps represents the floating point relative error limit, and p represents the reference coefficient.
[0109] Considering that the traditional search method will lead to a large number of turns and a large turning angle in the path, the frequent turning of the robot will increase the energy consumption. It is proposed to constrain the robot path selection by turning energy consumption. The larger the turning angle from the previous node to the current node and the current node to the optional node, the greater the energy consumption, and the less likely the optional node is to be selected. On the grid map, the robot's path is an accumulation process from the current grid to the next grid, and the transferable grids are the grids in the eight directions adjacent to the current grid.
[0110] like Figure 5 As shown, let the angles of the eight domain grids be a set Angle = {3 / 4π, 1 / 2π, 1 / 4π, 0, -1 / 4π, -1 / 2π, -3 / 4π, π}. Then the calculation formula for the robot's turning angle energy consumption is:
[0111]
[0112] Among them, ω angle (i,j) represents the turning angle energy consumption from node i to node j, θ j represents the angle of transfer to node i, θ j represents the angle of transfer to node j, Represents the turning energy consumption coefficient.
[0113] In the actual working environment, a three-dimensional map is needed, and the slope energy consumption of the path must also be considered. The greater the height difference between the current grid node and the selected grid node, the steeper the slope, and the greater the loss to the robot. In order to make the robot's path as smooth as possible, the slope energy consumption constraint factor is introduced to make the robot's walking path smoother in the three-dimensional environment. The slope energy consumption function calculation formula is:
[0114]
[0115] Among them, ω Eng (i,j) represents the slope energy consumption from node i to node j, MAX h and MIN h They represent the maximum height and minimum height in the map respectively, h(i) and h(j) represent the height of node i and node j respectively, and ζ is the slope coefficient.
[0116] Taking into account the energy consumption of turning angle and slope, the comprehensive energy consumption is:
[0117] ω(i,j)=ω angle (i,j)+ω Eng (i,j)
[0118] Comprehensive energy consumption heuristic function:
[0119]
[0120] Among them, MAX ω represents the maximum comprehensive energy consumption from node i to node j, MIN ω represents the minimum comprehensive energy consumption from node i to node j, ω(i,j) represents the comprehensive energy consumption from node i to node j, eps represents the floating point relative error limit, and p represents the benchmark coefficient.
[0121] In this embodiment, by introducing a multi-factor heuristic information function into the ant colony algorithm, a comprehensive optimization and upgrade of the robot path planning is achieved, significantly enhancing the practicality and efficiency of the planning strategy. Specifically, it not only focuses on minimizing the path length, but also innovatively incorporates considerations of energy saving, terrain adaptability (including slope and flatness), and reduced number of turns, forming a multi-objective optimization framework that comprehensively considers distance, energy consumption, terrain characteristics, and robot mechanical loss. This not only reduces the robot's operating energy consumption and mechanical wear in complex environments, but also ensures the smoothness and safety of the path.
[0122] Through carefully designed heuristic functions, especially the comprehensive energy consumption heuristic function, the algorithm can effectively guide ant colony exploration in the early stage, accelerate the convergence process, and seek the optimal path on a global scale, overcoming the local optimal traps and initial search confusion that may occur in traditional methods.
[0123] In S33, based on the path information of each ant, the pheromone concentration is globally updated through a dynamic pheromone concentration update mechanism, including:
[0124] Perform pheromone restriction: As the number of iterations increases, too much pheromone will remain on a certain path, causing the pheromone on other paths to be covered, making the path search prone to local optimality. Therefore, the best ant and worst ant strategies are used to set the pheromone in a reasonable range [τ Min ,τ Max ]Inside.
[0125] When an ant finds a feasible path, it will leave pheromones on the path to guide subsequent ants to choose this path. If too many ants choose this path, there will be too much pheromone residue, which will easily lead to a local optimal solution. Therefore, the pheromone needs to be appropriately weakened.
[0126] Therefore, in addition to restricting the pheromone, after all ants complete an iteration, a global update is performed on the pheromone left on the path:
[0127]
[0128] in, represents the pheromone concentration of the mth ant from node i to node j at time t, represents the pheromone concentration of the mth ant from node i to node j at time t+1, ρ represents the dynamic volatility factor of pheromone, represents the pheromone concentration in the time period from t to t+1;
[0129] The mth ant passes through nodes i and j
[0130] Among them, S m (t) represents the comprehensive index of the mth ant finding a feasible path solution at time t, and Q is the pheromone enhancement coefficient;
[0131] S m (t) = wL m (t)+(1-w)×T m (t)
[0132] Among them, L m (t), T m (t) represents the length and total energy consumption of the path traversed by the mth ant at time t, w represents the path length weight coefficient, and (1-w) represents the energy consumption weight coefficient.
[0133] By limiting pheromones and implementing a global update strategy, we can avoid excessive pheromone residues, avoid falling into local optimality, and increase the convergence of the algorithm.
[0134] In this process, the pheromone volatilization factor ρ plays an important role. If ρ is small, the difference in pheromone volatilization is small, and the difference in pheromone concentration on the path is not large, which will improve the global search ability of the algorithm and reduce the convergence speed. If the ρ value is too large, the pheromone volatilization speed is too fast, resulting in lower information concentrations on some paths with low pheromone concentrations, and the difference in information concentrations on each path is too large, which speeds up the convergence speed, but it is easy to fall into local optimality.
[0135] Therefore, a dynamic information volatility factor strategy is adopted to set ρ to adapt to the entire iterative process of ant search. The initial value of ρ is set to 0.3, and the minimum value is set to 0.2. After each iteration, ρ is automatically adjusted to 0.95 times the original value. When ρ is less than the minimum value, it is forcibly set to the minimum value. The calculation formula is:
[0136]
[0137] By dynamically setting ρ, in the early stage of the algorithm, ρ takes a larger value to maintain the global search ability of the algorithm. In the middle and late stages of the algorithm, ρ takes a smaller value to accelerate convergence.
[0138] In this embodiment, through the dynamic pheromone concentration update mechanism and the pheromone restriction strategy, refined control of pheromone management is achieved in the ant colony algorithm, which significantly enhances the global search and local optimization capabilities of the algorithm.
[0139] The best ant and worst ant strategies combined with the dynamic pheromone volatilization factor effectively avoid the problem of excessive pheromone accumulation in path search, prevent the algorithm from falling into the local optimal solution too early, and ensure the efficient convergence of the algorithm in the entire iterative process. The dynamically adjusted pheromone volatilization factor strategy promotes global exploration in the early stage and accelerates convergence in the later stage, achieving a perfect balance between search efficiency and optimization accuracy, and improving the overall performance of path planning.
[0140] Embodiment 2;
[0141] In this embodiment, in order to verify the effectiveness and feasibility of the technical solution of the present application in mobile robot path planning, a simulation experiment was carried out using MATLAB R2021b. The hardware and software environment of the experiment was: Windows 10 Professional Edition 64-bit; the processor was 11th GenIntel(R)Core(TM) i7-11700; the main frequency was 2.50GHz; and the memory was 32GB.
[0142] In order to make a fairer experimental comparison with the existing algorithms, the initialization settings of all common basic parameters related to the simulation experiments are consistent with those of the existing algorithms.
[0143] like Figure 6 As shown in the figure, when the path length weight coefficient w=0.5 is fixed and unchanged, the value of the benchmark coefficient p is changed to {0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1} in turn, and the change curves of path length, energy consumption index, comprehensive index and the number of ants entering a dead end are obtained when p takes different values.
[0144] When p<0.6, the path length is relatively good and stable; when p<0.5, the energy consumption index and comprehensive index are relatively good and stable; when p>0.1, the number of ants trapped in dead ends increases rapidly. Based on the above, a p value of 0.1 is more appropriate.
[0145] like Figure 7 As shown in the figure, the larger the w value is, the greater the impact of path length on pheromone increment, and the smaller the w value is, the greater the impact of energy consumption index on pheromone increment. After the p value is determined, the same method is used to change the w value to {0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1} in sequence, and the change curves of path length, energy consumption index, comprehensive index and number of ants that have reached a dead end are obtained when w takes different values.
[0146] Different values of w have almost no effect on the path length and energy consumption index. The comprehensive index value increases linearly with the increase of w value, while the number of ants that walk into a dead end fluctuates. In summary, in this embodiment, the value of w is 0.5.
[0147] Meanwhile, in this embodiment, two grid map environments of different scales, 20×20 and 100×100, were selected to conduct multiple simulation experiments.
[0148] like Figure 8 As shown, in a 20×20 grid map environment, the robot path planning results based on the technical solution of the present application are compared with the robot path planning results based on the existing technical solutions of the classic ant colony algorithm and the improved ant colony algorithm.
[0149] The experimental data are shown in Table 1 below:
[0150] Table 1
[0151]
[0152] From the experimental data in Table 1, it can be seen that the solution based on the classic ant colony algorithm performs poorly in all indicators; the solution based on the improved ant colony algorithm is slightly better than the technical solution of the present application in terms of energy consumption, number of turns and height mean square error; the technical solution of the present application achieves the best results in terms of path length, energy consumption, comprehensive indicators and program running time. In terms of convergence of the optimal path length, the solution based on the classic ant colony algorithm converges slowly, and the convergence curve of the solution based on the improved ant colony algorithm is ups and downs and difficult to converge. The technical solution of the present application can quickly converge to the optimal state. It can be seen that in a relatively simple 20×20 grid map environment, the technical solution of the present application can plan a better path and is suitable for mobile robot path planning.
[0153] like Fig. 9 As shown, in a 100×100 grid map environment, the robot path planning results based on the technical solution of the present application are compared with the robot path planning results based on the existing technical solutions of the classic ant colony algorithm and the improved ant colony algorithm.
[0154] The experimental data are shown in Table 2 below:
[0155] Table 2
[0156]
[0157] From the experimental data in Table 2, it can be seen that in a large-scale grid map environment, the overall performance of the solution based on the classic ant colony algorithm is still relatively poor; the solution based on the improved ant colony algorithm performs best in terms of energy consumption and number of turns; the technical solution of the present application achieves the best results in terms of path length, comprehensive index, height mean square error, and program running time. In terms of convergence to the optimal path length, the convergence speed of the solution based on the classic ant colony algorithm is relatively slow, and the convergence curve of the solution based on the improved ant colony algorithm is ups and downs, and it is easy to converge to the local optimum. The technical solution of the present application can converge to the optimal state quickly and does not fall into the local optimum. It can be seen that the technical solution of the present application can still show good performance in a large-scale grid map environment, and is suitable for mobile robot path planning in large-scale scenarios.
[0158] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0159] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A robot path planning method based on an improved ant colony algorithm, characterized in that: include: S1, construct a grid map to simulate the robot's working environment; The grid map includes: a free grid and an obstacle grid; the obstacle grid is expanded, and the height of the steep slope of the road is represented by the peaks function value; S2. Based on the grid map, determine the search strategy and set relevant parameters; the relevant parameters include: minimum turning angle and single moving distance; S3. After setting relevant parameters, coordinate transformation is performed on the grid map, and the path information of the optimal ant individual is outputted using the improved ant colony algorithm to obtain the optimal planning path of the robot; the improved ant colony algorithm adopts a comprehensive multi-factor heuristic information function and combines it with a dynamic pheromone concentration update mechanism.
2. A robot path planning method based on improved ant colony algorithm according to claim 1, characterized in that: In S2, the search strategy adopts an eight-neighborhood direction search strategy, and constructs an eight-neighborhood direction matrix to record the adjacency relationship between the current grid and the eight-neighborhood grids; the value of the eight-neighborhood direction matrix is determined by the grid state, direction and whether the non-touching edge safety rule is met.
3. The robot path planning method based on improved ant colony algorithm according to claim 1, characterized in that: In S3, the improved ant colony algorithm is used to output the location information of the optimal ant individual, including: S31, initializing ant colony algorithm parameters; including: defining the heuristic information correlation matrix, defining the eight-neighborhood angle vector, setting the number of ants, setting the number of iterations, initializing the pheromone concentration matrix, and setting the pheromone concentration range; S32, based on the heuristic information and the pheromone concentration, calculate the transfer probability from the current node to each optional node, and obtain the path information of each ant; S33, based on the path information of each ant, globally updating the pheromone concentration through a dynamic pheromone concentration update mechanism; S34, determining whether the globally updated pheromone concentration is within the preset pheromone concentration range; if so, proceeding to the next step; otherwise, outputting the path information of the optimal ant individual; S35, determine whether the maximum number of iterations has been reached; if so, output the path information of the optimal ant individual; otherwise, return to S32.
4. The robot path planning method based on improved ant colony algorithm according to claim 3 is characterized in that: The step S32, based on the heuristic information and the pheromone concentration, calculates the transfer probability from the current node to each optional node, and obtains the path information of each ant, including: S321, obtaining the current node of each ant; and adding the node to the taboo table; S322, based on the current node, obtain all optional nodes through the eight-neighborhood matrix; S323, based on the initialized pheromone concentration and combined with the heuristic information obtained by the multi-factor heuristic information function, calculating the transition probability from the current node to each optional node; S324, based on the transfer probability, selecting the next node through roulette, and adding the next node to the taboo table; S325, repeat the above S322 to S324 until the target node is reached or there is no way to go, and output the path information of each ant.
5. The robot path planning method based on improved ant colony algorithm according to claim 4, characterized in that: In S323, based on the initialized pheromone concentration and combined with the heuristic information obtained by the multi-factor heuristic information function, the transfer probability from the current node to each optional node is calculated, including: At time t, the transfer probability of the mth ant from node i to node j is: in, represents the pheromone concentration of the mth ant from node i to node j at time t, represents the heuristic information from node i to node j of the mth ant, α and β represent weight factors, allowed i Represents an optional node collection.
6. The robot path planning method based on improved ant colony algorithm according to claim 5, characterized in that: The heuristic information is obtained based on a multi-factor heuristic information function, which is: in, is the distance factor heuristic function to the end point, which represents the corrected distance from node j to the target node e; v(j,g) is the distance factor heuristic function to the starting and ending points, which represents the corrected distance from node j to the starting and target nodes g; ψ m (i,j) is the comprehensive energy consumption heuristic function, which represents the modified comprehensive energy consumption from node i to node j.
7. The robot path planning method based on improved ant colony algorithm according to claim 6, characterized in that: The distance factor heuristic function to the end point is: Among them, MAX d Indicates the maximum distance from node j to target node e, MIN d represents the minimum distance from node j to target node e, d(j,e) represents the distance from node j to target node e, eps represents the floating point relative error limit, and p represents the reference coefficient.
8. The robot path planning method based on improved ant colony algorithm according to claim 6, characterized in that: The heuristic function of the straight-line distance factor to the starting point and the end point is: Among them, MAX dl Indicates the maximum distance between node j and the straight line g between the starting node and the target node, MIN dl represents the minimum distance from node j to the straight line g between the starting node and the target node, dl(j) represents the distance from node j to the straight line g between the starting node and the target node, eps represents the floating point relative error limit, and p represents the reference coefficient.
9. The robot path planning method based on improved ant colony algorithm according to claim 6, characterized in that: The comprehensive energy consumption heuristic function: Among them, MAX ω represents the maximum comprehensive energy consumption from node i to node j, MIN ω represents the minimum comprehensive energy consumption from node i to node j, ω(i,j) represents the comprehensive energy consumption from node i to node j, eps represents the floating point relative error limit, and p represents the benchmark coefficient.
10. The robot path planning method based on improved ant colony algorithm according to claim 1, characterized in that: The step S33, based on the path information of each ant, globally updating the pheromone concentration through a dynamic pheromone concentration updating mechanism, comprises: in, represents the pheromone concentration of the mth ant from node i to node j at time t, represents the pheromone concentration of the mth ant from node i to node j at time t+1, ρ represents the dynamic volatility factor of pheromone, represents the pheromone concentration in the time period from t to t+1; Among them, S m (t) represents the comprehensive index of the mth ant finding a feasible path solution at time t, and Q is the pheromone enhancement coefficient; S m (t)=wL m (t)+(1-w)×T m (t) Among them, L m (t), T m (t) represents the length and total energy consumption of the path traversed by the mth ant at time t, w represents the path length weight coefficient, and (1-w) represents the energy consumption weight coefficient.
Citation Information
Cited By
Desilting robot intelligent control method and system based on deep learning
CN119392782A
Welding robot welding path optimization method and system based on improved ant lion optimization algorithm
CN119457629A
Robot formation path planning method and related equipment
CN119937565A
Mobile robot path planning method based on improved ant colony algorithm
CN120252736A
Unmanned aerial vehicle cluster adaptive way-finding method and system based on bionic intelligence
CN120428736A
