Smooth Path Planning of Mobile Robot Based on Improved Ant Colony Algorithm

Aiming at the problems of slow convergence, easy to fall into local optimum, and poor smoothness of traditional ant colony algorithm in mobile robot path planning, an improved ant colony algorithm based on path smoothing factor was proposed. Firstly, the environment map was constructed based on the grid method, and each grid was marked to make the ant colony move from the initial grid to the target grid for path search. Then, the heuristic information is improved by referring to the direction information of the starting point and the end point and combining with the turning angle. By improving the heuristic information, the direction of the search is increased and the turning angle of the robot is reduced. Finally, the pheromone updating rules were improved, the smoothness of the two-dimensional path was considered, the turning times of the robot were reduced, and a new path evaluation function was introduced to enhance the pheromone diﬀerentiation of the eﬀective path. At the same time, the Max-Min Ant System (MMAS) algorithm was used to limit the pheromone concentration to avoid being trapped in the local optimum path. The simulation results show that the improved ant colony algorithm can search the optimal path length and plan a smoother and safer path with fast convergence speed, which eﬀectively solves the global path planning problem of mobile robot.


Introduction
With the rapid development of mobile robots, path planning has become the foundation and core of the research field of mobile robots. e path planning technology of mobile robot is to find an optimal or suboptimal collision-free path from the beginning to the end in a complex environment according to certain evaluation criteria, such as the shortest route, the least turning, the least energy consumption, etc. [1]. e traditional algorithms to solve the path planning problem mainly include artificial potential field algorithm [2], Dijkstra algorithm [3], and A * algorithm [4]. In recent years, some researchers have adopted bionic intelligent optimization algorithms to solve the problem of path planning. ese bionic intelligent optimization algorithms mainly include ant colony algorithm [5], genetic algorithm [6], particle swarm optimization algorithm [7], immune algorithm [8], simulated annealing algorithm [9], and the combined optimization algorithm among the algorithms [10][11][12].
Among the above path planning methods, ant colony algorithm has strong robustness and search ability, which was first proposed by the famous Italian scholar Dorigo in 1992 [13]. As a heuristic algorithm, it simulates the foraging process of the ant colony and obtains the solution path jointly planned by the ants. It has the characteristics of positive feedback, parallel computation, and easy fusion. However, there are still problems such as slow convergence rate and easy to fall into local optimum in robot path planning. Many scholars have improved the traditional ant colony algorithm. Cao et al. proposed to build an initial pheromone model to avoid blind search and improve the convergence speed of the traditional ant colony algorithm [14]. Bai et al. designed ant colony algorithm with a negative feedback mechanism to avoid falling into the local optimal solution [15]. Zhang et al. proposed to construct a new heuristic function to make the pheromone volatile factor adapt to change and to ensure rapid convergence of ants even when searching the path comprehensively [16]. Ma and Mei integrated the search strategy of ant colony algorithm and hop search algorithm, introduced the decrease coefficient of potential field resultant force, introduced the simplified hop search algorithm to update the initial pheromone, and proposed the ant colony algorithm based on potential field hop [17].
Most of the above improved ant colony algorithms are devoted to optimizing the path length and improving the efficiency of pathfinding. Few scholars consider the problems such as too large turning angle and too many turning times of the whole path, leading to the increase of robot running time and energy consumption when looking for the next mobile node. In view of this, this paper proposes an improved ant colony algorithm based on two-dimensional path smoothing factor for mobile robot path planning.

Environmental Modeling and Basic Ant
Colony Algorithm

Environmental
Modeling. e commonly used robot environment modeling methods include grid method, viewable space method, free space method, geometric information method, and topological map method [18]. In this paper, the grid method is selected to model the two-dimensional motion space of the mobile robot, as shown in Figure 1.
In order to ensure that the mobile robot does not collide with the edge of the obstacle during the movement and ensure the smooth progress of each turn, the size of the obstacle is properly expanded in this paper, and then a certain safe distance is reserved. e safe distance is the radius of the mobile robot, and the robot can be simplified as a particle to deal with [19]. e grid number is used to represent the specific positions of robots and obstacles, in which the white grid is the free grid, representing the passable area, while the black grid is the obstacle area, which is impassable for mobile robots. e movement of the robot can be regarded as the transfer from the center of the current grid to the center of the next grid. e transferable grid is the grid of eight directions adjacent to the current grid. e eight adjacent grid steering labels are shown in Figure 2.
In the grid environment, it is assumed that grid S and grid G are the starting point and end point of robot motion, respectively. e problem to be solved in path planning is to search a series of ordered free grid nodes from S to G. In order to simplify the construction of the path search algorithm, the following provisions are made for the grid environment as shown in Figure 1. (1) (2) Taking the lower-left corner of the grid map as the coordinate origin, the x-axis positive direction is defined as from left to right, and the y-axis positive direction is defined as from bottom to top. At this time, the corresponding coordinates of the grid are called the origin coordinates of the grid. Assuming that the number of rows on the grid map is M, the mapping relationship between the origin coordinates (x, y) and the grid coordinates (i, j) is expressed as follows:

Basic Ant Colony
Algorithm. Ant colony algorithm is to simulate the process of ant population from the starting point to find the target point to obtain food. In the process of searching for food, ants will release a certain amount of pheromones in their path, and the ant colony uses these pheromones to communicate with each other. When more and more ants pass through a certain path, the pheromone concentration of this path will be higher, and other ants will have a greater probability to choose this path, which plays a positive feedback role, but it is also easy to lead to the occurrence of local optimum or deadlock [20]. If there are multiple unvisited grids, the probability of an ant choosing the next grid from the current grid is determined by the distance between them and the pheromone concentration [21,22]. e state transition probability is  Journal of Robotics where τ ij (t) is represents the pheromone concentration from grid i to grid j at time t; η ij (t) is the heuristic information from grid i to grid j, indicating the degree of expectation of ants from grid i to grid j; it is usually the reciprocal of the distance between two grids, η ij (t) � 1/d ij . α is the pheromone factor and β is the heuristic factor, respectively, indicating the concentration of pheromone and the relative importance of heuristic information. allowed k represents the grid set that can be selected by ant k in the next step at t time.
When all ants complete a traversal, the pheromone concentration on the path will be updated by evaporating the original pheromone and increasing the pheromone accumulated by ants. e pheromone updating formula is where ρ is the pheromone volatility coefficient, ρ ∈ (0, 1). Δτ ij represents the increment of the pheromone from grid i to grid j in this iteration. Δτ k ij represents the amount of pheromone released by the ant k from grid i to grid j in this iteration. Q represents the intensity of pheromone, which is a constant. L k represents the path length of the ant k in this iteration.

Improved Ant Colony Algorithm for Path Planning
In the traditional ant colony algorithm, the initial pheromone values of each grid are the same, and there is no obvious difference between the heuristic values, so the search time is often long, the algorithm convergence speed is slow, and it is difficult to find the global optimal solution [23]. At the same time, in the grid map, the path planned by the basic ant colony algorithm may have more turns, poor smoothness of the path, and consume a lot of energy of the robot. In order to improve the performance of the original ant colony algorithm and overcome its defects, the following improvements were made in this paper.

Improve Heuristic Information.
In the traditional ant colony algorithm, the heuristic information η ij (t) is the reciprocal of the distance between adjacent grids, so the heuristic weight difference of ants in adjacent grids is not obvious, which makes the heuristic function does not play an obvious role in the ant transfer decision, making the search efficiency of the algorithm relatively low. In addition, when the robot passes through a group of obstacles, if only the shortest path is regarded as the main factor, it will cause the turning angle of the robot to be too large and easy to deviate from the punctuation, which will greatly increase the time and energy consumption. erefore, this paper adds the steering angle to the heuristic information of ant colony algorithm and combines the direction information of the starting point and the target point to improve the heuristic information, so that the mobile robot can move to the target point and choose a path with smaller turning angle as far as possible. By improving the heuristic function, the purpose of ant colony search is increased, and the probability of falling into the local optimal solution is reduced. e improved heuristic information is as follows: where φ m ij (t) represents the direction information of the ant m from grid i to grid j at time t and guides the ant to move to the adjacent grid in the direction of the end point, 0 < ϕ ≤ 1. d ij indicates the distance from the current grid i to the next grid j, d jg indicates the distance from the current grid j to the end grid g. c m ij (t) represents the turning angle of the ant m from grid i to grid j at time t, guiding the ant to choose the path with small turning angle, 1/8 ≤ c ≤ 1. N m pi (t) represents the turn label of the ant from the previous grid p to the Journal of Robotics current grid i, and N m ij (t) indicates the turning label of the ant from the current grid i to the next grid j. When ϕ � 1, c � 1, the heuristic information is the largest, which indicates that the robot does not turn and moves to the terminal with the optimal path.

Improve Pheromone Update Rule
3.2.1. Improve Pheromone Increment. When the traditional ant colony algorithm is used to solve the problem of robot path planning, it usually takes the path length as the only reference to evaluate the path quality. However, in the actual scene of robot walking, in order to improve the flexibility and safety of robot walking, not only the length of the path, but also the turning times of the robot in the whole path should be considered. In addition, when the obstacles in a certain area are densely distributed, the frequent turning of the robot in a short time should be avoided. erefore, considering the smoothness of the two-dimensional path of the robot, a new path evaluation function was introduced to enhance the pheromone differentiation of the effective path, so as to improve the smoothness of the search path, improve the security of the robot, and reduce the energy consumption.
where S k is the evaluation function of the path traveled by the ant k, and the pheromone is allocated according to the evaluation function. e smaller the evaluation function is, the better the path is, and the more pheromone is released on this path, attracting more ants to search for this path. L k is the path length of the ant k. T k is the turning times of the ant k on the path, representing the smoothness of the path; the smaller the T k , the better the smoothness of the path. Where x is the path length adjustment coefficient and y is the times of turns adjustment coefficient, which are appropriately valued according to the required path properties.

Pheromone Restriction.
After several iterations, the value of pheromone on one path may be much larger than or much smaller than other paths, which makes the search unable to continue and leads to premature convergence. In order to prevent this extreme situation, the value range of the pheromone is limited to τ min to τ max by referring to the MMAS algorithm [24,25].

Application of Improved Ant Colony Algorithm in Path Planning
e improved ant colony algorithm is applied to path planning. e specific steps are as follows: Step 1. Environment modeling: e moving space environment of the robot was modeled by the grid method. e starting point, ending point, and obstacle position of the robot were represented by grid coordinates, and all ants were placed at the starting point of the robot.
Step 2. Initialize the parameters. e starting position S, the target position G, the number of ants m, the maximum number of iterations NC max , the current number of iterations NC, the pheromone importance factor α, the heuristic information importance factor β, the pheromone volatility coefficient ρ, the strength of the pheromone Q, the path length adjustment coefficient x, and the turning times adjustment coefficient y.
Step 3. Calculate heuristic information. According to the current position of the ant, the heuristic information is calculated according to equation (6), combining with the information of turning angle and direction.
Step 4. Select path. Calculate the probability of ants moving from the current grid to the non-tabu grid according to equation (3), select the next grid by roulette method, and update the tabu table.
Step 5. Determine whether all ants have reached the target grid. If so, record each ant's path, length of the path, and times of turns. Otherwise, return to Step 3.
Step 6. Calculate pheromone increments. e path evaluation function is calculated according to formula (9), and the pheromone increment is calculated according to formula (8).
Step 7. Update the pheromone. e pheromone is updated according to equation (5), and the amount of pheromone is limited by equation (10).
Step 8. Record all the information of the ant's path. Compare the optimal path of each iteration to find the current global optimal path.
Step 9. Determine whether the algorithm reaches the maximum number of iterations; then the algorithm terminates and outputs the optimal path; otherwise, repeat Steps 3 to 8. e flowchart of the improved ant colony algorithm path planning is shown in Figure 3.

Experimental Results and Analysis
In order to verify the effectiveness of the improved ant colony algorithm (IACA), in this paper, the simulation experiment is carried out in MATLAB R2016A. e computer operating system is Windows10, AMD processor, the main frequency is 2.0 GHz, and 8G memory. e moving environments of mobile robots are 20 × 20, 30 × 30, and 50 × 50 grid maps, respectively. At the same time, in order to 4 Journal of Robotics verify the superiority of the proposed algorithm, the results obtained by the proposed algorithm are compared with those obtained by Ant System algorithm (AS) [13] and Ant Colony System algorithm (ACS) [26][27][28] in the same environment. In addition, in order to verify the stability of the improved ant colony algorithm, the three algorithms are simulated for 10 times and the experimental results are shown in Table 1. e relative parameters were set as follows:  Figure 4.
In the experiment, it is found that in the 20 × 20 grid environment, all the three algorithms can search the shortest feasible path in the running process, so that the mobile robot can move safely from the starting point to the end point. However, the path planned by AS algorithm and ACS algorithm has a large number of turns and poor smoothness of the path, leading to multiple turns when the robot moves a short distance, and frequent turns in a short time are not conducive to the safety of the robot. e improved algorithm has obvious advantages in the number of turns, the planned path is smoother, and the convergence speed is fast.

30 × 30 Grid Environment.
In order to further verify the reliability of the improved algorithm in this paper, the grid map was expanded to 30 × 30 with more obstacles, and the simulation was carried out again. e simulation results of the three algorithms in the path planning research are shown in Figure 5.
It can be seen from Figure 5 that when the scale of the grid map expands and the obstacles increases, the AS algorithm and the ACS algorithm cannot adapt well to the global path planning of this kind of relatively complex environment and the optimal path lengths planned are 50.8 and 51.2, respectively. However, the algorithm in this paper can still perform well, and the optimal path found is 49.6, which effectively shortens the path length compared with the former two algorithms. Figure 5(c) shows the convergence curve about the three algorithms (30 × 30); it can be seen that the algorithm in this paper converges faster and has the shortest path length when the environment is complicated. Figure 5(b) shows the turns times curve about the three algorithms (30 × 30); it can be seen that the turn times of the optimal path of the algorithm in this paper are significantly lower than that of the AS algorithm and the ACS algorithm.

50 × 50 Grid Environment.
In order to further verify the adaptability of the improved algorithm in the large-scale grid map (50 × 50), the three algorithms were simulated in this scale map. e path planning is shown in Figure 6.
It can be seen from Figure 6(c) that in large-scale grid map, the time consumption of all three algorithms increases, the AS algorithm and ACS algorithm are easy to fall into the local optimum. As can be seen from Figure 6(b), in the grid map with many obstacles, AS algorithm and ACS algorithm make a lot of turns when searching the optimal path. It can be seen from Figure 6(a) that the improved algorithm has obvious advantages, which not only reduces the number of turns and increases the smoothness of the path, but also has faster convergence speed than AS algorithm and ACS algorithm and can find the optimal path.
It can be seen from the data in Table 1 that the path length planned by the improved ant colony algorithm is shorter in the environment of large scale, more obstacles and relatively complex (50 × 50). Compared with AS algorithm, the number of iterations required to converge to the optimal solution is reduced by about 61. Moreover, the times of turns in the optimal path is reduced from 37 in AS algorithm and 53 in ACS algorithm to 4. e smoothness of the path is   significantly improved and effectively avoids large-scale turns of the robot behavior. In summary, when the environment becomes relatively complex, the search path of traditional algorithms becomes more tortuous, the optimization ability is not ideal, and it is easy to fall into a local optimal solution. ere are certain limitations in path planning in a complex environment. e improved algorithm can quickly and effectively find the optimal path even in a complex environment, and the planned path has fewer turns and better path smoothness.
e effectiveness and superiority of the algorithm have been further proved.

Conclusion
Path planning is a key technology for robots to move in complex environments. As a bionic algorithm, ant colony algorithm can effectively realize the path planning of robot.
Aiming at the problems of slow convergence speed, low search efficiency, and poor path smoothness of traditional ant colony algorithm in path planning, this paper improves the ant colony algorithm by improving the heuristic information, introducing a new path evaluation function, considering the smoothness of two-dimensional path, and updating the effective path with pheromone differentiation. e simulation results of path planning in three different grid environments show that the improved algorithm has better path planning, faster convergence speed, fewer turns, and smoother path, which reduces the energy loss of mobile robot and makes it move to the target point safely and quickly. It effectively proves the effectiveness and adaptability of the algorithm in complex environment.
Microfluidics is a technology that integrates the basic operation units such as sample preparation, reaction, separation, and detection in the process of biological, chemical,  Journal of Robotics and medical analysis into a micron-scale chip to automatically complete the whole process of analysis [29,30]. Digital microfluidic biochip (DMFB) takes discrete microdroplets as the unit and realizes a variety of basic manipulation or processing of droplets, such as generation, transportation, merging, mixing, separation, storage, and detection, through a droplet driving mode. Droplet path planning is one of the core steps of advanced synthesis of DMFB. It aims to plan the moving path of a group of droplets and requires droplets to correctly perform the reaction process of biochemical detection and analysis. Each droplet is interpreted as a point robot moving in a discrete two-dimensional configuration space. Under this assumption, path planning of the droplets becomes a motion planning problem with multiple moving robots [31][32][33][34]. erefore, in the future research, we will further try to use ant colony algorithm to solve the droplet path planning and scheduling problem of DMFB.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.