CN115903808A - Robot path planning method based on combination of particle swarm, ant colony and A-Star algorithm - Google Patents

Robot path planning method based on combination of particle swarm, ant colony and A-Star algorithm Download PDF

Info

Publication number
CN115903808A
CN115903808A CN202211444605.0A CN202211444605A CN115903808A CN 115903808 A CN115903808 A CN 115903808A CN 202211444605 A CN202211444605 A CN 202211444605A CN 115903808 A CN115903808 A CN 115903808A
Authority
CN
China
Prior art keywords
particle
algorithm
robot
grid
grid map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211444605.0A
Other languages
Chinese (zh)
Inventor
王建东
沈鸿博
张志为
赵双睿
龚少田
李昌令
葛瑞崟
张渊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Institute Of Computing Technology Xi'an University Of Electronic Science And Technology
Original Assignee
Qingdao Institute Of Computing Technology Xi'an University Of Electronic Science And Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Institute Of Computing Technology Xi'an University Of Electronic Science And Technology filed Critical Qingdao Institute Of Computing Technology Xi'an University Of Electronic Science And Technology
Priority to CN202211444605.0A priority Critical patent/CN115903808A/en
Publication of CN115903808A publication Critical patent/CN115903808A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention belongs to the technical field of path planning, and discloses a robot path planning method based on combination of particle swarm optimization, ant colony optimization and A-Star algorithm, which comprises the following steps: generating a grid map, acquiring the positions of obstacles and feasible areas in the grid map, constructing an reachable distance matrix, and determining the initial position and the target position of each robot in the robot cluster in the grid map; and performing path optimization planning on the robot cluster by utilizing a particle swarm algorithm, an ant colony combination algorithm and an A-Star algorithm based on the reachable distance matrix, the initial position of the robot in the grid map and the target position to obtain an optimal path. The method combines the ideas of the ant colony algorithm, the ant colony algorithm and the simulated annealing algorithm on the basis of the particle swarm optimization to carry out optimization on the obstacle avoidance path of the robot, so that the robot can rapidly find a path from a starting point to a terminal point while avoiding obstacles.

Description

Robot path planning method based on combination of particle swarm, ant colony and A-Star algorithm
Technical Field
The invention belongs to the technical field of path planning, and particularly relates to a robot path planning method based on combination of particle swarm optimization, ant colony optimization and A-Star algorithm.
Background
Currently, a robot may be broadly defined as: mechanical equipment capable of automatically completing work according to requirements. The robot can assist or replace the work of people in daily life. With the rapid development of cloud computing, big data, internet of things and artificial intelligence in recent years, intelligence is considered as an important direction for the development of the current robot technology.
One of the most common problems in robotics design is path planning. Path planning is a major problem in robotics research. The goal is to find the lowest cost, collision-free path, avoiding all obstacles from a known starting point to a known ending point. The traditional robot path planning method is generally dijkstra algorithm (which is used as a search algorithm with a wide range to search in a wide range, the shortest path from a target point to all reachable points is calculated, the search algorithm is based on a greedy strategy, if the range to be searched is large, the efficiency of the algorithm is greatly reduced, and data invalid for moving the robot can be searched out), an artificial potential field method (when the robot is in a certain position, if the resultant force of a plurality of obstacles is equal to the attractive force of the target point in magnitude and opposite in direction, the resultant force is 0, according to the algorithm rule, the robot is not stressed any more, so that the obstacle avoidance path cannot be searched forward), an a algorithm (which causes a large amount of performance consumption when the target point is unreachable) and an ant colony algorithm (the heuristic function is usually related to the distance of the path, usually the reciprocal of the distance is taken as the heuristic function).
Through the above analysis, the problems and defects of the prior art are as follows: the existing path planning method has long planning time and low efficiency, and can easily cause the robot to enter a deadlock state, so that a path planning result cannot be obtained.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a robot path planning method based on the combination of a particle swarm, an ant colony and an A-Star algorithm.
The invention is realized in this way, a robot path planning method based on the combination of particle swarm, ant swarm and A-Star algorithm, the robot path planning method based on the combination of particle swarm, ant swarm and A-Star algorithm comprises the following steps:
generating a grid map, acquiring the positions of obstacles and feasible areas in the grid map, constructing an reachable distance matrix, and determining the initial position and the target position of each robot in the robot cluster in the grid map;
and performing path optimizing planning on the robot cluster by utilizing a particle swarm, ant colony combination algorithm and A-Star algorithm based on the reachable distance matrix, the initial position and the target position of the robot in the grid map to obtain an optimal path.
Further, the robot path planning method based on the combination of the particle swarm, the ant swarm and the A-Star algorithm comprises the following steps of:
generating a grid map, acquiring the positions of obstacles and feasible areas in the grid map, and numbering the generated grid map; establishing a two-dimensional coordinate system by taking the lower left corner of the generated grid map as the origin of the coordinate system (converting the actual problem into a graph model, and facilitating calculation);
initializing parameters of a particle swarm algorithm and an ant colony algorithm according to the grid map; calculating an reachable matrix according to the acquired grid map (data is processed in advance, so that algorithm operation calculation is facilitated);
and thirdly, performing path optimization planning on the robot cluster on the grid map by utilizing a particle swarm, ant colony combination algorithm and A-Star algorithm based on the reachable distance matrix, the initial position and the target position of the robot in the grid map to obtain an optimal path (reasonably bridging the three algorithms, adding an improved formula, and greatly improving the accuracy and the rapid convergence of the algorithms).
Further, the initializing parameters of the particle swarm algorithm and the ant colony algorithm according to the grid map comprises:
initializing parameters of a particle swarm algorithm and an ant colony algorithm according to the order of the grid map;
the parameters of the particle population include: the method comprises the following steps of (1) the scale of a particle swarm, the maximum value of an individual acceleration factor, the minimum value of the individual acceleration factor, the maximum value of a population acceleration factor, the minimum value of the population acceleration factor and the maximum iteration number of an algorithm;
the parameters of the ant colony include: the ant colony scale, the acceleration factor, the pheromone concentration important factor, the heuristic function important factor, the inertia coefficient, the pheromone volatilization factor, the pheromone concentration and the maximum iteration number.
Further, the performing of the path optimization planning on the robot cluster on the grid map by using the particle swarm, the ant colony combination algorithm and the a-Star algorithm based on the reachable distance matrix, the initial position of the robot in the grid map and the target position includes:
(1) Placing the particles at the starting point of the grid map, and controlling each particle to move according to a given moving direction;
(2) Calculating the transition probability of each reachable point of the particles, selecting a next visited target point based on the transition probability, putting the target point into a visited tabu table, judging whether all the particles reach the target point or whether all the particles are feasible points, if so, executing the step (3), otherwise, returning to the step (1) until all the particles reach the target point;
(3) Calculating and pre-estimating the minimum moving times according to the coordinates of the starting point and the target point, calculating the path length and the moving times of each particle, and recording the optimal solution and the worst solution in the current ant colony;
(4) Calculating the corresponding inertia coefficient of each particle, and judging whether to copy the path corresponding to the current optimal particle according to the inertia coefficient of each particle;
(5) And (3) updating the pheromone concentration of adjacent reachable points:
(6) And (3) judging whether the maximum iteration times or termination conditions are reached, if not, returning to the step (2), otherwise, terminating the iteration, and outputting a path planning result.
Further, the method for performing path optimization planning on the robot cluster on the grid map by using the particle swarm, the ant colony combination algorithm and the A-Star algorithm based on the reachable distance matrix, the initial position of the robot in the grid map and the target position comprises the following steps:
1) Placing each particle at the starting point of the grid, calculating the transition probability of the particle to each reachable point by using the following formula, calculating the target point of next visit of the particle by using a roulette algorithm, and placing the target point in a visited tabu table:
Figure BDA0003949635670000041
wherein the content of the first and second substances,
Figure BDA0003949635670000042
representing the probability of the particle k transitioning from grid i to grid j at time t; all k A grid set representing the deleted obstacle grid points to be visited by particle k; alpha represents an importance factor of pheromone concentration; beta represents the importance factor of the heuristic function; eta ij (t) represents an improved heuristic function of the transfer of the particle from grid i to grid j at time t,
Figure BDA0003949635670000043
j∈allow k ,l ij representing the distance from the current grid i to the feasible grid j; df is a j Representing the Euclidean distance from the feasible grid j to the target point; c. C 1 Represents an individual acceleration factor,. According to the present invention>
Figure BDA0003949635670000044
c 2 Represents a population acceleration factor, < >>
Figure BDA0003949635670000045
c 1max 、c 2max 、c 1min And c 2min Respectively representing preset acceleration factors c 1 And c 2 Maximum and minimum values of; t _ curr represents the current number of iterations, T max Representing a predetermined maximum number of iterations;
2) Repeating the step 1) until all the particles reach the target point or the current particle is a feasible point, and turning to the step 3);
3) Calculating and estimating the minimum moving times EM according to the coordinates of the starting point and the target point:
EM=min(|S x -M x |,|S y -M y |)+abs(|S x -M x |-|S y -M y |);
wherein S is x Number of abscissa indicating start point, S y A serial number of ordinate indicating a start point; m is a group of x Number of abscissa indicating target point, M y A ordinate number representing a target point;
4) Calculating the path length L of each particle k And number of moves NL k (k =1, 2...., m), recording the optimal and worst solutions in the current ant colony:
Figure BDA0003949635670000046
wherein NL k Representing the number of movements of the particle k from the starting point to the target point, ki representing the ith grid currently reached by the particle k,
Figure BDA0003949635670000051
represents the distance moved from grid i to grid j;
5) Determining whether to copy the current optimal particles according to the self inertia coefficient;
6) The pheromone concentration was updated using the following formula:
Figure BDA0003949635670000052
wherein rho (0 < rho < 1) represents an important factor of pheromone concentration and is used for representing the volatilization degree of the pheromone, and tau ij (t) indicates the magnitude of the pheromone concentration for grids i through j of the t-th iteration,
Figure BDA0003949635670000053
indicates that the kth particle released the pheromone concentration, or->
Figure BDA0003949635670000054
The calculation formula is as follows:
Figure BDA0003949635670000055
wherein EM represents the estimated minimum number of movements, Q represents the pheromone concentration constant, NL k Represents the number of times the particle k moves from the start point to the target point, and NL if the particle k does not move to the target point k =+∞;
7) Judging whether the maximum iteration times or termination conditions are reached, if so, terminating the iteration and outputting a path planning result; otherwise, returning to the step 1).
Further, the determining whether to copy the current optimal particle according to the self inertia coefficient includes:
5.1 Calculate the inertia coefficient W corresponding to the current particle k
Figure BDA0003949635670000056
Wherein, W max Representing a predetermined maximum value of the inertia coefficient, W min Representing a minimum value of a predetermined inertia coefficient, L k Indicates the total length of the path, L, that the particle k moves from the starting point to the target point curr_max Representing the maximum length of the path searched by all the ants currently;
5.2 Random number ra = rand (0, 1);
5.3 Determine the inertia coefficient W corresponding to the current particle k In relation to the magnitude of the generated random number, if ra>W k Copying the path traveled by the optimal particle in the current particle swarm by the current particle; otherwise, the current result is accepted.
Another object of the present invention is to provide a robot path planning system based on a combination of particle swarm, ant colony and a-Star algorithm, which implements the robot path planning method based on a combination of particle swarm, ant colony and a-Star algorithm, and the robot path planning system based on a combination of particle swarm, ant colony and a-Star algorithm includes:
the grid map construction processing module is used for generating a grid map, acquiring the positions of obstacles and feasible areas in the grid map, and numbering the generated grid map; establishing a two-dimensional coordinate system by taking the lower left corner of the generated grid map as an origin of the coordinate system;
the initialization module is used for initializing parameters of a particle swarm algorithm and an ant colony algorithm according to the grid map;
the reachable matrix construction module is used for calculating a reachable matrix according to the acquired grid map;
the path planning module is used for carrying out path optimizing planning on the robot cluster on the basis of the reachable distance matrix, the initial position of the robot in the grid map and the target position by utilizing the particle swarm, the ant colony combination algorithm and the A-Star algorithm on the grid map to obtain an optimal path;
and the output module is used for outputting the planned optimal path.
It is a further object of the invention to provide a computer arrangement comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the robot path planning method based on a combination of particle swarm, ant colony and a-Star algorithms.
It is a further object of the present invention to provide a computer readable storage medium, storing a computer program which, when executed by a processor, causes the processor to perform the steps of the robot path planning method based on a combination of particle swarm, ant colony and a-Star algorithms.
Another object of the present invention is to provide an information data processing terminal for implementing the robot path planning system based on a combination of particle swarm, ant colony and a-Star algorithms.
By combining the technical scheme and the technical problem to be solved, the technical scheme to be protected by the invention has the advantages and positive effects that:
first, aiming at the technical problems existing in the prior art and the difficulty in solving the problems, the technical problems to be solved by the technical scheme of the present invention are closely combined with results, data and the like in the research and development process, and some creative technical effects are brought after the problems are solved. The specific description is as follows:
the method is characterized in that path optimization planning is carried out on a robot cluster based on a particle swarm and ant colony combined algorithm, and an obstacle avoidance scheme after K iterations of the particle swarm algorithm is obtained; the robot can find an optimal path while avoiding obstacles; the invention can improve the working efficiency of the robot, reduce unnecessary loss in the moving process and achieve the effect of saving time and resources.
Meanwhile, the method has certain dynamic property, and can dynamically modify the position of the target point by modifying the function coordinate of the terminal point in the estimated minimum times, increase the iteration times of the algorithm, influence the acceleration factor and achieve the effect of dynamic path optimization.
The invention also introduces a tabu vector, so that the robot cannot walk to the barrier. The feasible region is dynamically calculated in the calculation process, and the condition that the robot moves to an obstacle cannot occur.
Secondly, considering the technical scheme as a whole or from the perspective of products, the technical effect and advantages of the technical scheme to be protected by the invention are specifically described as follows:
the method combines the ideas of the ant colony algorithm, the ant colony algorithm and the simulated annealing algorithm on the basis of the particle swarm optimization to carry out optimization on the obstacle avoidance path of the robot, so that the robot can rapidly find a path from a starting point to a terminal point while avoiding obstacles. The robot is attracted by a target point to be increased by changing heuristic functions, pheromone concentration updating strategies, acceleration factor updating strategies and the like, and the effects of high algorithm convergence speed and the like can be achieved.
Third, as inventive supplementary proof of the claims of the present invention, there are several important aspects as follows:
(1) The expected income and commercial value after the technical scheme of the invention is converted are as follows:
the method is applied to the field of robot path 2-dimensional optimization, the environment is modeled into a 2-dimensional Boolean grid matrix in advance, the storage space is small, and the storage space can be saved. After the starting point and the end point are specified, the program can quickly calculate the barrier-free path, and the time cost is reduced.
(2) The technical scheme of the invention solves the technical problems which are always desired to be solved but are not successfully achieved:
the problems that the particle swarm optimization is not easy to solve the discrete problem (the ant colony aggregation and the A-star algorithm) and the convergence speed is high and the partial optimal solution is easy to enter (the simulated annealing algorithm is combined) are solved to a certain extent.
Drawings
FIG. 1 is a schematic diagram of a robot path planning method based on a combination of particle swarm optimization, ant colony optimization and A-Star algorithm according to an embodiment of the present invention;
FIG. 2 is a flowchart of a robot path planning method based on a combination of particle swarm optimization, ant colony optimization and A-Star algorithm according to an embodiment of the present invention;
FIG. 3 is a 44 numbered grid matrix provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of the directional movement of a robot in a grid map according to an embodiment of the present invention;
fig. 5 is a diagram of a walking route for planning a robot in a given 20-step grid matrix according to an embodiment of the present invention;
fig. 6 is a diagram of a walking route for planning a robot in a given 40-step grid matrix according to an embodiment of the present invention;
FIG. 7 is a graph of the convergence of the algorithm in a given 20 th order grid matrix provided by an embodiment of the present invention;
FIG. 8 is a graph of the convergence of the algorithm in a given 40-step grid matrix provided by an embodiment of the present invention;
FIG. 9 is a flow chart of solving the minimum value of a function by combining a particle swarm algorithm and a simulated annealing algorithm according to an embodiment of the present invention;
fig. 10-13 are algorithm convergence trajectory diagrams for solving the minimum value of the given four test functions by combining the particle swarm optimization algorithm and the simulated annealing algorithm provided by the embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
1. Illustrative embodiments are explained. This section is an explanatory embodiment expanding on the claims so as to fully understand how the present invention is embodied by those skilled in the art.
As shown in fig. 1-2, a robot path planning method based on a combination of a particle swarm algorithm, an ant colony algorithm and an a-Star algorithm provided by the embodiment of the present invention includes the following steps:
s101, generating a grid map, acquiring positions of obstacles and feasible areas in the grid map, and numbering the generated grid map; establishing a two-dimensional coordinate system by taking the lower left corner of the generated grid map as an origin of the coordinate system;
s102, initializing parameters of a particle swarm algorithm and an ant colony algorithm according to a grid map; calculating a reachable matrix according to the acquired grid map;
s103, performing path optimizing planning on the robot cluster on the grid map by utilizing a particle swarm, ant colony combination algorithm and A-Star algorithm based on the reachable distance matrix, the initial position and the target position of the robot in the grid map, and obtaining an optimal path.
The robot path planning method based on the combination of the particle swarm, the ant colony and the A-Star algorithm provided by the embodiment of the invention specifically comprises the following steps:
step 1, setting a system simulation environment. First, the order number N of the grid matrix is set. The size of the generated grid matrix is N multiplied by N, and variables in the grid matrix are Boolean variables, wherein 0 represents a feasible grid and 1 represents an obstacle. Secondly, acquiring a grid map, the positions of obstacles in the grid map and the positions of feasible areas, and acquiring the initial position and the target position of the robot; generating a grid map (4 x 4 grid map is shown in fig. 3) according to the position of the obstacle and the position of the feasible region, and according to the position of the obstacle and the position of the feasible region; numbering the rule of the hypothesis number from left to right, numbering from bottom to top starting from 1, and establishing a two-dimensional coordinate system with the lower left corner as the origin of the coordinate system, thereby obtaining a transformation formula of coordinates, establishing two-dimensional coordinates for the generated grid matrix according to the following formula, numbering the rule of the hypothesis number from left to right, numbering from bottom to top starting from 1, and establishing a two-dimensional coordinate system with the lower left corner as the origin of the coordinate system:
Figure BDA0003949635670000091
where n is the number of the grid, and a represents the side length of each grid, typically taking a =1.
Step 2, setting parameters required by a particle swarm algorithm and an ant colony algorithm according to the order of the grid map; setting required parameters of the algorithm:
wherein the parameters of the particle swarm include: size of particle population Pn, maximum value of individual acceleration factor c 1max Minimum value of individual acceleration factor c 1m i n Maximum value of the population acceleration factor c 2max Minimum value of population acceleration factor c 2min The maximum number of iterations iter _ max of the algorithm.
Parameters of the ant colony include: ant colony size m, acceleration factor c 1 And c 2 Pheromone concentration important factor a and heuristic functionImportance factor beta, inertia coefficient W max And W min Pheromone volatilization factor rho, pheromone concentration Q, maximum iteration number iter _ max and the like.
And 3, calculating the reachable matrix according to the grid map. Suppose the robot performs a single step optimization according to the 8-way tree in the manner of fig. 4, i.e. the robot can move to adjacent grids in eight nearby directions during the search, and the given moving direction is as shown in the figure.
Assuming that the robot can move only one step at a time, the movable distance can only be A and
Figure BDA0003949635670000101
if grid i does not reach grid j, then the distance between them is set to + ∞. Separately calculating N in the grid matrix 2 One grid (containing no obstacles) from the other N 2 A distance of 1 grid, giving a size N 2 ×N 2 May be reached by matrix D. That is, when the size of the grid is n × n, the size of the grid matrix is n 2 ×n 2 . The grid map is shown in fig. 3.
The distance from grid 1 to the other grids is:
grid 1 to other grid distance (N stands for unreachable)
Figure BDA0003949635670000102
And 4, applying a path optimizing algorithm on the grid map:
step 4 can be divided into the following substeps:
4.1 generating a Path vector Path for each particle k k (vector size is set to N) 2 ×N 2 ) And the grid is used for storing the grids to which the particles k walk from the starting point to the end point in the current cycle. Generating a tabu vector j for each particle k k (vector size N 2 ×N 2 ) The tabu table vector is used to store the grid set that particle k has visited in this cycle. Generating an pheromone density matrix IM, the size of the matrix being N 2 ×N 2 And the value of each element in the matrix is equal and greater than 0 (equal pheromone concentration on the original path). Generate iter _ max Path vectors Path iter (vector size set to iter _ max) for saving the optimal path length found for the population in each iteration. And generating a path length vector PathZ with the length of iter _ max, wherein each element in the vector stores the minimum value of the path length found by the iter-time iteration particle swarm. Setting Path global ,PathZ global And respectively storing the optimal path found after the algorithm is finished and the length corresponding to the optimal path.
4.2 place each particle at the start of the grid (set the value of the first element of the path table for each particle as the index of the starting grid point), select the next visited grid by calculating the pheromone concentration between each grid. At the initial time, the concentration of pheromones on the connection paths between the grids is the same, i.e. τ ij (t)=τ 0 Using τ ij (t) represents the pheromone density on the connection path between grid i and grid j.
4.3 calculating the transition probability of the particle to each reachable point, calculating the next moving point of the particle with roulette algorithm until all particles reach the target point includes:
the transition probability calculation formula for transition to a feasible grid point is as follows:
Figure BDA0003949635670000111
wherein the content of the first and second substances,
Figure BDA0003949635670000112
representing the probability of the particle k transitioning from grid i to grid j at time t; eta ij (t) an improved heuristic function for the transition of particles from grid i to grid j at time t; all k Represents the set of grids to be visited by particle k (eliminating the obstacle grid points), all over time k Will gradually decrease until the target grid point is reached. I.e. indicating that the particle k has reached the target grid. Alpha represents the factor of the importance of the concentration of pheromoneThe larger the value, the larger the effect of pheromone concentration in particle transfer; beta is an importance factor of the heuristic function, and the larger the value of beta is, the larger the role of the heuristic function in the transition is.
η ij (t) the calculation formula is as follows:
Figure BDA0003949635670000121
/>
wherein, c 1 Represents an individual acceleration factor; c. C 2 Denotes the population acceleration factor,/ ij The distance of the current grid i to the feasible grid j is determined by the grid matrix D, df j All is the Euclidean distance of feasible grid j to the target point k Representing the currently movable grid set for particle k. This improvement prevents the greedy strategy from making the particles susceptible to "deadlock" conditions during initial optimization.
Setting P k The vector represents the state transition probability vector for the current particle k. State transition probability vector P k The probability summation of the current particle k transferred to each feasible grid point is shown, ra = rand (0, 1), which grid point should be selected next time by the particle k is judged according to the value of ra, and the selected grid s is used k Join to Path vector Path k In (1), grid s k Adding a tabu vector j k In (1).
c 1 、c 2 The calculation formula of (c) is as follows:
Figure BDA0003949635670000122
Figure BDA0003949635670000123
wherein c is 1max 、c 2max 、c 1min And c 2min Respectively, a predetermined acceleration factor c 1 And c 2 Maximum and minimum values of. T _ curr is the current number of iterations, T max Is a predefined maximum number of iterations. The above equation can dynamically adjust the acceleration factor c as the iteration number of the algorithm increases 1 And c 2 And (6) carrying out correction.
By adopting the scheme, the embodiment of the invention can focus on the global search solution capability and the particle search range at the beginning of the algorithm due to the randomness of the particle position, thereby enhancing the searchability of each particle and avoiding the algorithm from getting into the local optimal solution quickly due to the early maturity. The influence of the position of the optimal particle in the population on the search direction of each particle should be increased as the number of iterations increases. According to the above analysis, c 1 Should be gradually decreased and c 2 Should be gradually increased.
And repeating the process until the particle k finds the current target grid or no feasible grid, namely judging whether the current particle accesses the target grid or is a feasible point, if so, turning to the step 4.4, and otherwise, continuing to circulate.
4.4, calculating and estimating the minimum moving times EM according to the coordinates of the starting point and the target point:
EM=min(|S x -M x |,|S y -M y |)+abs(|S x -M x |-|S y -M y |)
wherein S is x Number of abscissa as starting point, S y Is the ordinate number of the starting point. M x Is the abscissa number of the target point, M y Is the ordinate serial number of the target point.
4.5 calculating the Path Length L of each particle k And number of moves NL k (k =1, 2...., m), recording the optimal and worst solutions in the current ant colony:
repeating the above process for each particle k in the particle swarm until each particle in the particle swarm completes the Path optimization, and updating the Path iter 、PathZ、Path global And PathZ global
Path length L of particle k Refers to the total length of the path, NL, that the particle k moves from the starting point to the target point k Representing the number of movements of the particle k from the starting point to the target pointNumber, determined by the following formula:
Figure BDA0003949635670000131
where ki represents the ith grid currently reached by particle k (assuming the numbering rules are left to right, bottom to top, numbering from 1),
Figure BDA0003949635670000132
NL in the above equation for the distance from grid i to grid j k Is m +1.
4.6, whether to copy the current optimal particles is determined according to the self inertia coefficient:
calculating the inertia coefficient W corresponding to the current particle k Randomly generating a random number ra = rand (0, 1) by using the idea of simulated annealing algorithm if ra>W k And rejecting the current solution, and enabling the particle to copy the path traveled by the optimal particle in the current particle swarm. Otherwise, accepting the current solution.
Inertia coefficient W corresponding to particle k k Is determined by the following formula:
Figure BDA0003949635670000133
wherein, W max Representing a maximum value of a predetermined inertia coefficient, W min Representing a minimum value of a predetermined inertia coefficient, L k Refers to the total length of the path that the particle k travels from the starting point to the target point, L curr_max Refers to the maximum length of the path currently sought by all ants.
The embodiment of the invention adopts the technical scheme and has the advantages that: each particle k corresponds to an inertia coefficient W k When the path length found by the particle k is smaller, the corresponding W k Larger, the probability of keeping self path selection is larger, otherwise, when the path length found by the ant k is larger, the corresponding W k Is smaller. The search range of the algorithm is enlarged and increased along with the increase of the iteration timesThe algorithm can converge faster.
4.7 calculating the path length of the particle k, and if the particle k does not reach the target point this time, setting the path length to be + ∞;
4.8 repeat the above process for each particle k in the particle swarm until each particle in the swarm completes the Path optimization, and update Path iter 、PathZ、Path global And PathZ global
Step 5, updating pheromone concentration:
Figure BDA0003949635670000141
wherein rho (0 < rho < 1) is an important factor of pheromone concentration and represents the volatilization degree of pheromone, and tau ij (t) is the pheromone concentration size of the t iteration grids i to j,
Figure BDA0003949635670000142
the concentration of pheromone released by the k-th particle on the connecting path of the grid i and the grid j is determined by the following formula:
Figure BDA0003949635670000143
wherein EM is estimated minimum moving times, Q is pheromone concentration constant, NL k NL is the number of movements of the particle k from the start point to the target point, if the particle k does not go to the target point k =+∞。
The embodiment of the invention adopts the scheme which has the advantages that: when the value of the important factor beta of the heuristic function is reasonable and the current particle k selects a better or optimal path, the probability that ants select the path in a plurality of iterations can be greatly increased, and meanwhile, the convergence rate of the algorithm is greatly increased by the operation.
And 6, judging whether the algorithm reaches the maximum iteration times or a termination condition, if not, returning to the step 4, otherwise, terminating the iteration and outputting a result.
2. Application examples. In order to prove the creativity and the technical value of the technical scheme of the invention, the part is the application example of the technical scheme of the claims on specific products or related technologies.
The robot path planning method based on the combination of the particle swarm, the ant colony and the A-Star algorithm provided by the embodiment of the invention is applied to function optimization, and Matlab software is used for testing, so that stronger superiority can be obtained on a two-dimensional common test function. And the algorithm is tested by Matlab software, and optimal path planning schemes (verified by Dijkstra algorithm) are obtained on 20-order and 40-order grid matrixes.
The robot path planning method based on the combination of the particle swarm, the ant colony and the A-Star algorithm is applied to computer equipment, the computer equipment comprises a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the robot path planning method based on the combination of the particle swarm, the ant colony and the A-Star algorithm.
The robot path planning method based on the combination of the particle swarm, the ant colony and the A-Star algorithm is applied to a computer-readable storage medium, a computer program is stored, and when the computer program is executed by a processor, the processor is enabled to execute the robot path planning method based on the combination of the particle swarm, the ant colony and the A-Star algorithm.
The robot path planning method based on the combination of the particle swarm, the ant colony and the A-Star algorithm is applied to the information data processing terminal.
It should be noted that the embodiments of the present invention can be realized by hardware, software, or a combination of software and hardware. The hardware portion may be implemented using dedicated logic; the software portions may be stored in a memory and executed by a suitable instruction execution system, such as a microprocessor or specially designed hardware. It will be appreciated by those skilled in the art that the apparatus and methods described above may be implemented using computer executable instructions and/or embodied in processor control code, for example such code provided on a carrier medium such as a diskette, CD-or DVD-ROM, a programmable memory such as read-only memory (firmware) or a data carrier such as an optical or electronic signal carrier. The apparatus of the present invention and its modules may be implemented by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, or software executed by various types of processors, or a combination of hardware circuits and software, e.g., firmware.
3. Evidence of the relevant effects of the examples. The embodiment of the invention achieves some positive effects in the process of research and development or use, and has great advantages compared with the prior art, and the following contents are described by combining data, diagrams and the like in the test process.
The robot path planning method based on the combination of the particle swarm, the ant colony and the A-star algorithm provided by the embodiment of the invention is tested by Matlab software, and can obtain stronger superiority on a two-dimensional common test function. And the algorithm is tested by Matlab software, and optimal path planning schemes (verified by Dijkstra algorithm) are obtained on 20-order and 40-order grid matrixes. Compared with other traditional path planning algorithms, the method has certain dynamic optimization searching (if the position of the end point needs to be changed, the horizontal and vertical coordinate values of the end point in the minimum moving times EM of the starting point and the target point in the algorithm are only needed to be modified, and the iteration times T of the algorithm are increased max Thereby modifying the acceleration factor c 1 、c 2 Achieving the effect of dynamic optimization of the algorithm). The feasible region is dynamically calculated in the calculation process, and the condition that the robot moves to an obstacle cannot occur.
One each of a 20-step grid matrix and a 40-step grid matrix is randomly generated. And respectively setting an initial point and a target point of the robot for each grid matrix. The algorithm parameters are set as follows: the number of particles Pn =70, the pheromone importance level factor a =1, the heuristic function importance level factor β =7, the initial values of the pheromone density matrix are all set to 8, the pheromone volatilization coefficient ρ =0.2, and the pheromone density Q =1,w min =0.4,W max =0.9,c 1min =0.215,c 1max =1.5,c 2min =0.75,c 2max =2.5, maximum number of iterations iter _ max =100.
Simulation content and result analysis:
and planning the robot path by adopting a particle swarm algorithm, wherein the path planning of the robot by the algorithm is shown in fig. 5 and 6. Wherein the black grid represents an obstacle, the white grid represents a feasible grid, the red solid line represents a walking path of the robot, the purple solid dots represent a starting point, and the green solid dots represent an end point. The results of the two times in the upper graph are verified by a Dijkstra algorithm, and the optimal path is found by the two times of robot walking. The convergence traces of the algorithm for solving the grid matrices of 20 th order and 40 th order are shown in fig. 7 and 8, and it can be seen that the algorithm has high convergence.
The improved particle swarm algorithm provided by the embodiment of the invention has the following solving parameters:
w max =0.9,w min =0.4,c 1max =2.75,c 1min =1.25,c 2max =2.25,c 2min =0.5, maximum speed V max Taking 10% of difference value of each dimension of search range of function to be measured and initial temperature T 0 =97,μ=0.9,iter_max=150。
Sphere function:
Figure BDA0003949635670000171
schafer function:
Figure BDA0003949635670000172
griewank function:
Figure BDA0003949635670000173
rastigrin function:
Figure BDA0003949635670000174
the four functions are solved by the algorithm provided by the embodiment of the invention and compared with the algorithms of GA, PSO, LDWPSO and S-PSO.
Simulation analysis:
as shown in fig. 10 to 13 and table 2: the average value, the variance and the standard deviation of the improved particle swarm optimization (SAPSO) provided by the embodiment of the invention, which are obtained in the optimization process of the Sphere function, the Schaffer function and the Griewank function, are smaller than those of the GA algorithm, the PSO algorithm, the LDWPSO algorithm and the S-PSO algorithm. The solving precision of the particle swarm optimization (SAPSO) based on simulated annealing is high. However, the optimization performance of the SAPSO on the rastigin function is inferior to that of the other four algorithms. The reason for analyzing the above results can be found that although 16 times of tests of the SAPSO algorithm obtain the optimal solution which is very close to 0, no optimal solution is searched in the other 14 times of tests, which indicates that the stability of the SAPSO algorithm needs to be further improved and promoted.
TABLE 2 statistical table for solving minimum values of given four test functions by particle swarm optimization combined with simulated annealing
Figure BDA0003949635670000181
The above description is only for the purpose of illustrating the present invention and the appended claims are not to be construed as limiting the scope of the invention, which is intended to cover all modifications, equivalents and improvements that are within the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A robot path planning method based on the combination of a particle swarm, an ant colony and an A-Star algorithm is characterized by comprising the following steps:
generating a grid map, acquiring the positions of obstacles and feasible areas in the grid map, constructing an reachable distance matrix, and determining the initial position and the target position of each robot in the robot cluster in the grid map;
and performing path optimization planning on the robot cluster by utilizing a particle swarm algorithm, an ant colony combination algorithm and an A-Star algorithm based on the reachable distance matrix, the initial position of the robot in the grid map and the target position to obtain an optimal path.
2. The robot path planning method based on the combination of the particle swarm, the ant swarm and the A-Star algorithm according to claim 1, characterized in that the robot path planning method based on the combination of the particle swarm, the ant swarm and the A-Star algorithm comprises the following steps:
generating a grid map, acquiring the positions of obstacles and feasible areas in the grid map, and numbering the generated grid map; establishing a two-dimensional coordinate system by taking the lower left corner of the generated grid map as an origin of the coordinate system;
initializing parameters of a particle swarm algorithm and an ant colony algorithm according to the grid map; calculating an reachable matrix according to the acquired grid map;
and thirdly, performing path optimizing planning on the robot cluster on the grid map by utilizing a particle swarm algorithm, an ant colony algorithm and an A-Star algorithm based on the reachable distance matrix, the initial position and the target position of the robot in the grid map to obtain an optimal path.
3. The method for robot path planning based on a combination of particle swarm, ant swarm and A-Star algorithms according to claim 2, wherein the initializing parameters of the particle swarm and ant swarm algorithms according to the grid map comprises:
initializing parameters of a particle swarm algorithm and an ant colony algorithm according to the order of the grid map;
the parameters of the particle population include: the method comprises the following steps of (1) the scale of a particle swarm, the maximum value of an individual acceleration factor, the minimum value of the individual acceleration factor, the maximum value of a population acceleration factor, the minimum value of the population acceleration factor and the maximum iteration number of an algorithm;
the parameters of the ant colony include: the ant colony scale, the acceleration factor, the pheromone concentration important factor, the heuristic function important factor, the inertia coefficient, the pheromone volatilization factor, the pheromone concentration and the maximum iteration number.
4. The robot path planning method based on the combination of the particle swarm, the ant colony and the A-Star algorithm according to claim 2, wherein the path optimization planning of the robot cluster on the grid map by using the particle swarm, the ant colony combination algorithm and the A-Star algorithm based on the reachable distance matrix, the starting position and the target position of the robot in the grid map comprises:
(1) Placing the particles at the starting point of the grid map, and controlling each particle to move according to a given moving direction;
(2) Calculating the transition probability of each reachable point of the particles, selecting a target point of next visit based on the transition probability, and placing the target point into a visited taboo table; judging whether all the particles reach the target point or not or whether all the particles are feasible points, if so, executing the step (3), otherwise, returning to the step (1) until all the particles reach the target point;
(3) Calculating and pre-estimating the minimum moving times according to the coordinates of the starting point and the target point, calculating the path length and the moving times of each particle, and recording the optimal solution and the worst solution in the current ant colony;
(4) Calculating the corresponding inertia coefficient of each particle, and judging whether to copy the path corresponding to the current optimal particle according to the inertia coefficient of each particle;
(5) And (3) updating the pheromone concentration of adjacent reachable points:
(6) And (3) judging whether the maximum iteration times or the termination condition is reached, if not, returning to the step (2), otherwise, terminating the iteration, and outputting a path planning result.
5. The robot path planning method based on the combination of the particle swarm, the ant colony and the A-Star algorithm according to claim 4, wherein the path optimization planning of the robot cluster on the grid map by using the particle swarm, the ant colony combination algorithm and the A-Star algorithm based on the reachable distance matrix, the starting position and the target position of the robot in the grid map comprises the following steps:
1) Placing each particle at the starting point of the grid, calculating the transition probability of the particle to each reachable point by using the following formula, calculating the target point of next visit of the particle by using a roulette algorithm, and placing the target point in a visited tabu table:
Figure FDA0003949635660000031
wherein the content of the first and second substances,
Figure FDA0003949635660000032
representing the probability of the particle k transitioning from grid i to grid j at time t; all k A grid set representing the deleted obstacle grid points to be visited by particle k; alpha represents an pheromone concentration importance factor; beta represents the importance factor of the heuristic function; eta ij (t) represents an improved heuristic function of the transfer of the particle from grid i to grid j at time t,
Figure FDA0003949635660000033
l ij representing the distance from the current grid i to the feasible grid j; df is a compound of formula j Representing the Euclidean distance from the feasible grid j to the target point; c. C 1 Represents an individual acceleration factor,. According to the present invention>
Figure FDA0003949635660000034
c 2 Represents a population acceleration factor, < >>
Figure FDA0003949635660000035
c 1max 、c 2max 、c 1min And c 2min Respectively representing preset acceleration factors c 1 And c 2 Maximum and minimum values of (a); t _ curr represents the current number of iterations, T max Representing a predetermined maximum number of iterations;
2) Repeating the step 1) until all the particles reach the target point or the current particle is a feasible point, and turning to the step 3);
3) Calculating and estimating the minimum moving times EM according to the coordinates of the starting point and the target point:
EM=min(|S x -M x |,|S y -M y |)+abs(|S x -M x |-|S y -M y |);
wherein S is x Number of abscissa indicating start point, S y A serial number of ordinate indicating a start point; m is a group of x Abscissa number, M, representing target point y A ordinate number representing a target point;
4) Calculating the path length L of each particle k And number of moves NL k (k =1, 2...., m), recording the optimal and worst solutions in the current ant colony:
Figure FDA0003949635660000036
wherein NL k Representing the number of movements of the particle k from the starting point to the target point, ki representing the ith grid currently reached by the particle k,
Figure FDA0003949635660000037
represents the distance moved from grid i to grid j;
5) Determining whether to copy the current optimal particles according to the self inertia coefficient;
6) The pheromone concentration was updated using the following formula:
Figure FDA0003949635660000041
wherein rho (0 < rho < 1) represents an important factor of pheromone concentration for characterizing the volatilization degree of pheromone, and tau ij (t) indicates the magnitude of the pheromone concentration for grids i through j of the t-th iteration,
Figure FDA0003949635660000042
indicates that the kth particle released the pheromone concentration, or->
Figure FDA0003949635660000043
The calculation formula is as follows:
Figure FDA0003949635660000044
wherein EM represents the estimated minimum number of movements, Q represents the pheromone concentration constant, NL k Represents the number of movements of the particle k from the starting point to the target point, if the particle k does not reach the target point, NL k =+∞;
7) Judging whether the maximum iteration times or termination conditions are reached, if so, terminating the iteration and outputting a path planning result; otherwise, returning to the step 1).
6. The method for robot path planning based on a combination of particle swarm optimization, ant swarm optimization and A-Star algorithm according to claim 5, wherein the deciding whether to copy the current optimal particles according to the self inertia coefficient comprises:
5.1 Calculate the inertia coefficient W corresponding to the current particle k
Figure FDA0003949635660000045
Wherein, W max Representing a maximum value of a predetermined inertia coefficient, W min Represents the minimum value of a predetermined inertia coefficient, L k Denotes the total length of the path that the particle k travels from the starting point to the target point, L curr_max Representing the maximum length of the path searched by all the ants currently;
5.2 Random number ra = rand (0, 1);
5.3 Determine the inertia coefficient W corresponding to the current particle k In relation to the magnitude of the generated random number, if ra>W k Then let the current granule copy the current granuleThe path that the optimal particles in the subgroup travel; otherwise, the current result is accepted.
7. A robot path planning system based on a combination of particle swarm, ant colony and A-Star algorithms for implementing the robot path planning method based on a combination of particle swarm, ant colony and A-Star algorithms according to any one of claims 1 to 6, wherein the robot path planning system based on a combination of particle swarm, ant colony and A-Star algorithms comprises:
the grid map construction processing module is used for generating a grid map, acquiring the positions of obstacles and feasible areas in the grid map, and numbering the generated grid map; establishing a two-dimensional coordinate system by taking the lower left corner of the generated grid map as an origin of the coordinate system;
the initialization module is used for initializing parameters of a particle swarm algorithm and an ant colony algorithm according to the grid map;
the reachable matrix construction module is used for calculating a reachable matrix according to the acquired grid map;
the path planning module is used for carrying out path optimizing planning on the robot cluster on the basis of the reachable distance matrix, the initial position of the robot in the grid map and the target position by utilizing the particle swarm, the ant colony combination algorithm and the A-Star algorithm on the grid map to obtain an optimal path;
and the output module is used for outputting the planned optimal path.
8. A computer arrangement, characterized in that the computer arrangement comprises a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of the robot path planning method based on a combination of particle swarm, ant colony and a-Star algorithms according to any of claims 1-6.
9. A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method for robot path planning based on a combination of particle swarm, ant colony, and a-Star algorithms according to any of claims 1 to 6.
10. An information data processing terminal, characterized in that the information data processing terminal is used for realizing the robot path planning system based on the combination of the particle swarm, the ant swarm and the A-Star algorithm as claimed in claim 7.
CN202211444605.0A 2022-11-18 2022-11-18 Robot path planning method based on combination of particle swarm, ant colony and A-Star algorithm Pending CN115903808A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211444605.0A CN115903808A (en) 2022-11-18 2022-11-18 Robot path planning method based on combination of particle swarm, ant colony and A-Star algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211444605.0A CN115903808A (en) 2022-11-18 2022-11-18 Robot path planning method based on combination of particle swarm, ant colony and A-Star algorithm

Publications (1)

Publication Number Publication Date
CN115903808A true CN115903808A (en) 2023-04-04

Family

ID=86477346

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211444605.0A Pending CN115903808A (en) 2022-11-18 2022-11-18 Robot path planning method based on combination of particle swarm, ant colony and A-Star algorithm

Country Status (1)

Country Link
CN (1) CN115903808A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117724495A (en) * 2023-12-18 2024-03-19 青岛哈尔滨工程大学创新发展中心 Method for distributing task areas of robot clusters facing to known boundaries

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117724495A (en) * 2023-12-18 2024-03-19 青岛哈尔滨工程大学创新发展中心 Method for distributing task areas of robot clusters facing to known boundaries
CN117724495B (en) * 2023-12-18 2024-05-17 青岛哈尔滨工程大学创新发展中心 Method for distributing task areas of robot clusters facing to known boundaries

Similar Documents

Publication Publication Date Title
CN109164810B (en) Robot self-adaptive dynamic path planning method based on ant colony-clustering algorithm
CN109947120B (en) Path planning method in warehousing system
CN109116841B (en) Path planning smooth optimization method based on ant colony algorithm
CN112650229B (en) Mobile robot path planning method based on improved ant colony algorithm
CN109163722B (en) Humanoid robot path planning method and device
CN111323016A (en) Mobile robot path planning method based on self-adaptive ant colony algorithm
Peng et al. Robot path planning based on improved A* algorithm
CN114047770B (en) Mobile robot path planning method for multi-inner-center search and improvement of wolf algorithm
CN115903808A (en) Robot path planning method based on combination of particle swarm, ant colony and A-Star algorithm
CN113296520A (en) Routing planning method for inspection robot by fusing A and improved Hui wolf algorithm
CN111649758A (en) Path planning method based on reinforcement learning algorithm in dynamic environment
Wang et al. Research on dynamic path planning of wheeled robot based on deep reinforcement learning on the slope ground
Song et al. Research on mobile robot path planning based on improved A-star algorithm
CN113467481B (en) Path planning method based on improved Sarsa algorithm
Chen et al. How to not train your dragon: Training-free embodied object goal navigation with semantic frontiers
CN115469673B (en) Unmanned vehicle route planning method based on air-ground information cooperation
Tang et al. On the use of ant colony algorithm with weighted penalty strategy to optimize path searching
CN116608855A (en) Robot path planning method based on improved Harris eagle algorithm
CN115129064A (en) Path planning method based on fusion of improved firefly algorithm and dynamic window method
Li et al. Research on AUV path planning based on improved ant colony algorithm
Chen et al. GVD-Exploration: An Efficient Autonomous Robot Exploration Framework Based on Fast Generalized Voronoi Diagram Extraction
Li et al. Comparison of Model-Free and Model-Based Learning-Informed Planning for PointGoal Navigation
Zeng et al. Optimal path planning of mobile robot based on improved ant colony algorithm
Liu et al. Path planning efficiency maximization for ball-picking robot using machine learning algorithm
Yan Research on the A Star Algorithm for Finding Shortest Path

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination