A novel A* method fusing bio-inspired algorithm for mobile robot path planning

The path planning of mobile robot is to find an optimal collision-free path in time distance or space from the starting point to the target point in a given environment. With the popularization and application of mobile robots, if the efficiency of mobile robots path is not high, the working quality will be seriously affected. How to quickly plan an effective safe path is of great research significance and practical application value. Therefore, we propose a novel A* algorithm based on Bio-inspired algorithm for mobile robot path planning. Firstly, the synchronous bidirectional A* algorithm is used to optimize the pheromone of ant colony algorithm, and the transition probability and pheromone update mechanism of ant colony algorithm are improved, so that the global optimization speed of the algorithm is faster and the path length of mobile robot is shortened. Furthermore, the static path is used to initialize the pigeon algorithm. Then, the improved pigeon algorithm is utilized to plan the local path of the mobile robot, and the simulated annealing criterion is introduced to solve the local optimal problem. The logarithmic S-type transfer function is adopted to optimize the step size of the pigeon number, so that the collision with the dynamic obstacles can be better avoided. Finally, a modified B-spline curve is used to smooth and re-plan the path. The simulation results show that the proposed method can realize path planning more effectively in complex dynamic environment.


Introduction
Due to the characteristics of autonomous operation and flexible movement, mobile robots have a broad prospect of development and utilization in important fields such as national defense science and technology, life service, production and construction [1,2].The path planning of mobile robot mainly realizes the followings: (1) make the robot arrive at the predetermined target point from the starting point; (2) Obtain the collision-free safe path; (3) Obtain the optimal or sub-optimal distance path and optimize the path at the same time.In general, path planning is divided into global path planning [3,4] and local path planning based on completely known, completely unknown or partially known environmental information.In the static known environment, there are some methods such as Theta* [5], Lazy Theta* [6], etc., and in the dynamic unknown environment, there are some methods such as Field D* [7], etc,.Field D* algorithm uses path interpolation to smooth the path, but it has the problems of large amount of computation and resource consumption.On the other hand, Theta* introduces sight line algorithm on the basis of A* algorithm, which greatly optimizes the path obtained by A* algorithm, and further proposes Lazy Theta* algorithm, which reduces the calculation consumption time on the basis of Theta*, thus obtaining the path with faster calculation and shorter path length.
Existing path planning mainly focuses on global path planning [8].However, when sudden threats are found in the movement of mobile robots, it is also urgent to solve the problems to plan local paths, reduce the path length and evaluation function value to improve the path performance.Researchers have done a lot of work in this field.Common path planning algorithms include ant colony algorithm, A* algorithm (2) and artificial potential field method, etc,.Corno [9] proposed a hop-point search method to improve algorithm A*, reduced the search of unnecessary nodes and improved the search efficiency.Wang [10] proposed to introduce the weight of exponential decay into the heuristic function of algorithm A*, so as to reduce the number of search nodes and improve the search efficiency of the algorithm.Hu [11] introduced the adaptive weight coefficient into the map operator part of the pigeon swarm algorithm to improve the search efficiency of the pigeon swarm algorithm.Huang [12] reduced the search range of A* algorithm through constraint function and improved the efficiency of the algorithm.Du [13] used the probability selection mechanism to distinguish map operator and landmark operator, which improved the global search ability of the algorithm.Although the above algorithm solves the problems of slow convergence speed and easily falling into local optimal solution to a certain extent, there are still problems such as uneven path and failure to consider unexpected obstacles.
Grid method is a classic method in environment modeling.The working environment of mobile robots is cut into different grids with the same size and connected with each other, and each grid corresponds to the corresponding position information.In reference [14], the improved A* algorithm was successfully used to realize path planning in static environment.Djkstral algorithm is a breadth-first search algorithm.Tan [15] adopted the improved Dijkstra algorithm to realize global path planning, but its local path search was slow.It was difficult to quickly plan a smooth and safe optimal path.Wang [16] adopted improved ant colony algorithm to realize global path search, but the data storage capacity in the search process was large.Qu [17] successfully expanded the search neighborhood and realized collisionfree trajectory planning quickly.References [18,19] introduced an improved multi-order B-spline curve for path smoothing processing, but this method could not complete the smoothing processing of dynamic path, and the running process was cumbersome and inefficient.When the environment changes or it is affected by other external factors, the established path will be invalid.Therefore, it is urgent to enhance the timeliness of path and solve the problem of path planning in dynamic environment.Literature [20] proposed a multi-level hybrid algorithm combining A* algorithm and artificial potential field method to realize the path planning in dynamic environment.However, the artificial potential field method could not well plan the local shortest path in the application of local path planning, which reduced the overall operating efficiency [21,22].
The advantages of ant colony algorithm with positive feedback and parallelism make it more suitable for robot path planning and other problems [23].The pigeons swarm algorithm is favored by researchers because of its excellent ability in UAV route planning and other problems.This paper presents a new A* algorithm for robot path planning based on the combination of improved ant colony(ACO) and improved pigeon-inspired optimization (PIO).Firstly, the improved A*-ACO algorithm is used for global static path planning.Secondly, the global static path is applied to the initialization process of the PIO, so that the algorithm can obtain more initial information.On the basis of the global path, the improved PIO is used for local dynamic obstacle avoidance, so that the mobile robot can bypass the dynamic obstacle for local path planning.Finally, a modified B-spline curve is used to smooth and re-plan the path.
This paper is organized as follows.In section 2, the global planning algorithm with improved ACO is introduced.Section 3 illustrates the local planning algorithm with improved PIO.We give the analysis for the experiment in section 4. The conclusion is given in section 5.

Improved A* algorithm
A* algorithm was used by reference [24].It is a heuristic path planning algorithm.In this paper, the improved A* algorithm is used to optimize the initial pheromone of the ant colony algorithm and reduce the search time, as shown in figure 1. e is searched by the node 3 s in the forward search as the target node.This ensures that the target nodes searched in both directions are updated simultaneously.In order to effectively improve the efficiency of the algorithm, the obtained optimized path is denoted as R, and its initial pheromone is set as: Where k is the coefficient greater than 1.C represents the initial pheromone on the other path.

Direction evaluation-based heuristic information
In this paper, direction evaluation is introduced into heuristic information based on the improved A* algorithm.Before using the evaluation function is used to screen the extended nodes, and the nodes searching toward the target point are retained, and the nodes searching away from the target point are discarded to improve the search speed.In here, the direction evaluation function is: Where ) (n D is the direction evaluation function of the extended node N. θ is the angle between the vector formed by the extension node and its parent node and the vector formed by the target point and the starting point.In this case, the coordinates of the starting point and the target point are known.Let ) , ( 22 y x is the coordinate of the vector formed by the extension node and its parent node.Then the angle between two vectors can be expressed as: In this paper, an eight-neighborhood node extension is adopted, when 0 ) ( ≥ n D , these nodes will be retained and added to the OPEN table for subsequent calculation.When 0 ) ( < n D , these nodes are ignored to speed up the search.

Improved ant colony algorithm
The traditional ant colony algorithm conducts search operation through pheromone guidance [25].In this paper, random selection mechanism is introduced to increase the diversity of solutions based on the transition probability of traditional ant colony algorithm.Let 0 q be the random selection factor.
q q ≤ , after eliminating the obstacle nodes, it randomly selects any node around the current node as a feasible node; Otherwise, the feasible nodes are selected according to the probability transfer formula.The details are as follows: Where α is the pheromone heuristic factor.β is the heuristic information factor.) ( k allowed rand means to randomly select the next node in a set of grids that are allowed to be selected.
To avoid the ant colony algorithm falling into local optimum affected by the non-optimal path pheromone interference.In this paper, we introduce reward and penalty factors into pheromone updating strategy.That is, the optimal path b L after the current iteration is enhanced with its pheromone concentration.The pheromone concentration of the worst path w L after the current iteration is reduced.Moreover, the local optimum should be jumped out at the beginning of iteration.In the later iteration, the influence of reward and punishment factors should be gradually reduced, so the trigonometric function is introduced as the coefficient.The updated formula after the above improved operation is as follows: Where b is the reward and punishment factor.ρ is pheromone volatile factor.
) ( is the pheromone increment on edges i and j. m is colony size.a is the adjustable coefficient, and the weight of reward and punishment factors can be adjusted according to the actual situation.c N is the maximum number of iterations.Q is the pheromone intensity coefficient.k L is the path length of the k-th ant in this iteration.

Path evaluation function
The evaluation function of the robot path is as follows: f . 1 f is the threat evaluation function of the robot, and the road sections are divided into 10 parts.Five symbolic points on the road section are taken to represent the threat cost of the path in this section, then the threat cost of the road section i is:

Initialization of Pigeon Algorithm
Based on the special navigation behavior of pigeons in the homing process, Duan et al. [26] proposed a bionic swarm intelligent optimization algorithm (pigeon swarm optimization algorithm).Pigeon algorithm is mainly used in UAV route planning and other fields.However, the existing Pigeon algorithm does not initialize the initial path during route planning, which leads to the low execution efficiency of the final algorithm.Based on the excellent ability of pigeon algorithm, this paper applies the improved pigeon algorithm to the path planning of robot.The path obtained in the static planning stage can be regarded as a relatively excellent solution set, which can be used as the initial population of the pigeon algorithm to improve the execution efficiency of the algorithm.
When a dynamic obstacle is detected, the static path between the local starting point and the local target point is set in the static stage to initialize the pigeon swarm algorithm.The details are shown in figure 2.

Figure 2. Schematic diagram of initialization
In the actual calculation, this paper simplifies the calculation by fixing the abscissa.Point O and point A in figure 2 are local starting points and local target points respectively, and OA is divided into n equal parts along the horizontal direction.a~d represents n-1 bisectors.Through the above operation, the initial population of the pigeon algorithm is composed of initial data with normal distribution centered on the static path.The initial population does not lose randomness, and the overall quality is improved, which can speed up the searching speed.

The global optimum location based on simulated annealing criterion
The initial stage of the pigeon swarm algorithm uses the map operator to search path.In each iteration, the pigeons will get a new position and speed.In the velocity iteration formula of map operator, Rt e − is a decreasing exponential function, which will approach to zero in the later iteration.Therefore, the map operator is very dependent on the global optimal position g x′ .In this paper, the global optimal position is improved, and the improved geomagnetic operator update formula is as follows: Where ) (t v i is the speed of the i-th pigeon after the t- th iteration.) (t x i is the position of the i-th pigeon after the t-th iteration.R is the map factor.rand is a random number of [0, 1].g x′ is the improved global optimal position in the iteration.
In this paper, Gaussian perturbation is introduced to the original global optimal position to avoid trapping the local optimal position with the pigeons colony algorithm and improve the diversity of the entire population.The details are as follows: is the original global optimal position.) (t x G is the position of the global optimal position after Gaussian G is a Gaussian distribution with a mean of 0 and a variance of 1, and its probability density function is as follows: In addition, in the search process, the poor solution should be accepted with a certain probability, which can effectively avoid falling into local optimum in the iterative search process.In this paper, simulated annealing algorithm is introduced to solve this problem.Let the fitness value of the original global optimal position g x before g x perturbation be ) ( g x f and the fitness value of the global optimal position G x after Gaussian perturbation be , or the formula ( 13) is correct, then the disturbed position G x is taken as the improved global optimal position g x′ .
Otherwise, the original perturbation global optimal position g x is still used as the improved global optimal position g x′ , as follows: In the formula, K is Boltzmann constant.µ is the attenuation factor.T(t) is the current iteration annealing temperature, which decreases gradually with the iteration increasing.

The pigeon number with adaptive step length
In the landmark operator, the population quantity is too small in the later iteration period, which affects the optimization of the algorithm.In the stage of landmark operator, the population size can be slightly larger at the beginning of iteration [27][28][29], but it should gradually decrease as the iteration number increases.Logsig function has the characteristics of nonlinear reduction from 1 to 0, so Logsig function is introduced in this paper as the adaptive step of the pigeon number, and the improved landmark operator update formula is shown as follows:   )) ( ( t x f i is the fitness function of the i-th pigeon.After the improvement, the population size shows a nonlinear decreasing trend, and its value decreases gradually, which ensures the diversity of the population.

Path smoothing and replanning
In actual process, the path should be smoothed as much as possible.In this paper, Lagrange curve is used to smooth the path.A schematic diagram of smoothing curves is shown in figure 3.After smoothing, if a part of the path enters the inside of the obstacle, the intersecting collision part of the path can be reprogrammed to make the path closer to the original curve [30].The specific operation is as follows.
As shown in figure 4, when the smoothed path enters the inside of the obstacle, but the original path does not enter the inside of the obstacle, the new path points are selected from the midpoint of the three sides formed by the four points for smoothing, and the above process is repeated until the collision is eliminated.According to the above improved scheme, the overall steps of this paper are as follows: 1) Establish the map model with the grid method, and set the parameters of the global static stage, including the ant colony number m , pheromone heuristic factor α , heuristic information factor β , pheromone volatility factor ρ , pheromone intensity coefficient Q , iteration times c N , etc,.
2) Using the improved A* ant colony algorithm to plan a static offline path, and smooth the path.

Experimental results and analysis
The performance of the proposed algorithm is simulated from both static and dynamic aspects.
Based on the grid method, the modeling and simulation analysis is carried out under Windows 10 system, MATLAB 2017b platform.

Global static obstacle avoidance
In order to verify the performance of the proposed algorithm in the process of global static obstacle avoidance, simulation comparisons are made under different environments, it requires that the path should not collide with the edge of the obstacle.In the global static obstacle avoidance stage, the number of ant colony m=20, the number of iterations Nc=30, the pheromone heuristic factor α =1, the pheromone heuristic factor β =12, the pheromone volatile factor ρ =0.2, and the pheromone intensity coefficient Q=10.

Simulation comparison in environment 1.
In environment 1, the traditional ant colony algorithm and the proposed algorithm are compared and analyzed.The starting point coordinate is (5.4,5.4) and the target point coordinate is (28.1,28.1). Figure 6(a) is the optimal path planned by the traditional ant colony algorithm, and Figure 6(b) is the optimal path planned by the proposed algorithm in this paper.In the static environment, the performance indexes of the proposed algorithm and the traditional ant colony algorithm in environment 1 and environment 2 are compared and analyzed.Table 1 and table 2 present the 10 times path planning results with the traditional ant colony algorithm and the proposed algorithm in the two environments.It can be seen that the traditional ant colony algorithm finds the optimal path 52.527 km for two times in environment 1 and 71.452 km for 3 times in environment 2. The proposed algorithm in this paper find the optimal path 49.937 km for 10 times in environment 1 and 66.280 km for 4 times in environment 2. In the two environments, the mean values of proposed algorithm are reduced by 2.977km and 5.078km than the traditional ant colony algorithm, respectively.The average execution time of the proposed algorithm in environment 1 is 2.501s, which is reduced by 7.71% than that of the traditional ant colony algorithm (2.710s).The average execution time of the proposed algorithm in environment 2 is 4.870s, which is reduced by 6.38% than that of the traditional ant colony algorithm (5.202s).Overall, the proposed algorithm in this paper has better performance.

Simulation comparison in environment 1.
In environment 1, the path of the obstacle and the mobile robot partially overlaps, as shown in figure 8.As can be seen from Figure 8(a), the path performance obtained by the traditional pigeon swarm algorithm is poor, and the obstacle cannot be completely avoided.It will still collide with the edge of the obstacle.In figure 8(b), the path obtained by the proposed algorithm in this paper keeps a certain distance from the obstacle, and the length of the path is shorter and smoother.

Simulation comparison in environment 2.
In order to further verify the performance of the algorithm in the dynamic obstacle avoidance stage, simulation comparison is conducted in environment 2. That is, in the complex environment, where a large number of sudden dynamic obstacles are randomly generated in the planned space, as shown in Fig. 9. Point S represents the initial point of planning, point E represents the target point of planning, and the circular area represents the dynamic obstacle after expansion.As can be seen from Figure 9, the traditional pigeon algorithm cannot completely avoid obstacles when confronted with a large number of sudden obstacles.The path obtained by the proposed algorithm in this paper has a shorter path length and is smoother, which can achieve complete obstacle avoidance.A novel A* method fusing bio-inspired algorithm for mobile robot path planning In the dynamic environment, the performance indexes of the proposed algorithm and the traditional pigeon algorithm are compared and analyzed in environment 1 and environment 2. Table 3  It can be seen from the above results, under the same environment, the proposed algorithm in this paper can plan a path with shorter length, smaller evaluation function value and better performance, so it has stronger optimization ability.

Conclusion
The convergence speed of traditional ant colony algorithm is slow and it is easy to fall into the local optimal solution, so it is difficult to find the global optimal solution when applied to robot path planning.In this paper, an improved bidirectional A* algorithm is introduced to the traditional ant colony algorithm.The transition probability and pheromone updating mechanism of ant colony algorithm are improved.Compared with the traditional ant colony algorithm, the global static path algorithm in this paper can obtain a better static path.In view of the dynamic obstacles in the process of movement, this paper proposes an improved pigeon algorithm to achieve local dynamic obstacle avoidance.By improving the map and landmark operator of the traditional pigeon algorithm, the improved local dynamic obstacle avoidance algorithm can achieve better obstacle avoidance compared with the traditional Yang Sun and Haipeng Wang pigeon algorithm.Finally, this paper introduces cubic Bspline curve to smooth the whole path to make the path more realistic.

Figure 1 .
Figure 1.Flow chart of searching In practice, the previous node of the current node in both directions is used as the target node for the opposite searching direction.For example, the current node 3 s in of the vector composed of the target point and the starting point.
concentration connecting vertex i and j at the beginning of the t-th iteration.) (t ij η is heuristic information.
f represents the evaluation function.1 f represents threat evaluation function.2

L 2 f
is the length of the road section.k t is the threat factor, representing the influence degree of obstacles.N is the number of obstacles.is the path evaluation function received by the mobile robot, which is improved by referring to the evaluation function in algorithm A* as follows: number of iterations in the landmark operator stage.k is the slope of the logsig function.
t-th generation group.

Figure 6 . 1 .Figure 7 .
Figure 6.Comparison of traditional ant colony algorithm and the proposed algorithm under static environment 1.
In order to verify the performance of the proposed algorithm in the process of local dynamic obstacle avoidance, simulation comparisons are made under different environments.The number of pigeons in the local dynamic obstacle avoidance stage is initial annealing temperature is T(0)=100, the attenuation factor is µ =0.99, and the slope of logsig function is k=5.
Point P in the figure is the grid point before the collision point is detected, and point M is the next grid point after the obstacle leaves the trajectory of the mobile robot.In other words, the obstacle at this time only moves between point P and point M. P and M are local starting points and local target points, and the coordinates are (9.5, 15.5) and(17.5, 23.5), respectively.

Figure 8 .
Figure 8.Comparison of traditional ant colony algorithm and the proposed algorithm under dynamic environment 1

Figure 9 .
Figure 9.Comparison of traditional ant colony algorithm and the proposed algorithm under dynamic environment 2

Table 1 .
Performance comparison between traditional ant colony algorithm and the proposed algorithm under environment 1

Table 2 .
Performance comparison between traditional ant colony algorithm and the proposed algorithm under environment 2 4.2.Local dynamic obstacle avoidance

Table 3 .
and table 4 are the performance index comparison table of 10 experiments conducted in environment 1 and environment 2 between the traditional pigeon colony algorithm and the proposed algorithm.It can be seen that in environment 1, the average path length of the proposed algorithm in 10 experiments is 51.269km, it is reduced by 0.133km than that of the traditional pigeon algorithm, and the average value of the proposed algorithm is 2.619, which is reduced by 0.171 than that of the traditional pigeon colony algorithm(2.791).Performance comparison between traditional PIO and the proposed algorithm under environment 1

Table 4 .
Performance comparison between traditional PIO and the proposed algorithm under environment 2