Robot Path Planning Using Improved Ant Colony Algorithm in the Environment of Internet of Things

It is a research topic of practical signiﬁcance to study the path planning technology of mobile robot navigation technology. Aiming at the problems of slow convergence speed, redundant planning path, and easy to fall into local optimal value of ant colony algorithm in a complex environment, a robot path planning based on improved ant colony algorithm is proposed. First, the grid method is used to model the path environment, which marks each grid to make the ant colony move from the initial grid to the target grid for path search. Second, the ant colony is divided according to diﬀerent planning tasks. Let some ants explore the way ﬁrst, and carry out basic optimization planning for the map environment. The antecedent ants mark the basic advantage on a target value of the path with pheromone concentration so as to guide the subsequent route-ﬁnding operation of the main ant colony. Finally, in order to avoid the individual ants falling into a deadlock state in the early search, the obstacle avoidance factor is increased, the transition probability is improved, and the amount of information on each path is dynamically adjusted according to the local path information, so as to avoid the excessive concentration of pheromones. Experimental results show that the algorithm has high global search ability, signiﬁcantly speeds up the convergence speed, and can eﬀectively improve the eﬃciency of mobile robot in path planning.


Introduction
Nowadays, with the continuous integration of informatization and industrialization, the intelligent industry represented by robot technology is booming, which is also the key development field of scientific and technological innovation in various countries [1][2][3][4].
Mobile robots can be divided into three types: remote control, semiautonomy, and autonomy. Autonomous mobile robots have the ability to perceive, make decisions, and adapt to the environment, so they can meet a wider range of task requirements [5]. At present, the focus and difficulty of mobile robot research are how to make the robot complete a predetermined task autonomously in a complex environment. e process of a mobile robot completing a predetermined task autonomously is called mobile robot navigation [6][7][8]. e navigation of mobile robot refers to "based on the surrounding environment information perceived by the sensors carried by the mobile robot and the state information of the mobile robot, the target-oriented motion of the mobile robot can be realized safely in the environment containing a limited number of obstacles." Only when the mobile robot accurately grasps its own position and the position of obstacles in its environment, can it safely realize the target-oriented movement and complete the navigation task [9][10][11]. erefore, the research on path planning technology in mobile robot navigation technology is a research topic with practical significance.
After decades of development, researchers have proposed many effective path planning methods, such as a * algorithm, genetic algorithm, and fuzzy logic algorithm [9,[12][13][14][15]. Ant colony algorithm has fast convergence speed, but it also has some problems, such as algorithm search stagnation, and is easy to fall into local optimization. In order to solve these problems, researchers have proposed many improvement strategies [16][17][18][19]. Reference [20] analyzed the influence of pheromone Volatilization Coefficient on the optimization ability of ant colony algorithm and proposed an adaptive pheromone Volatilization Coefficient to improve the global searchability. In order to avoid falling into local optimization, [21] considered the path length and time of each ant and proposed an adaptive ant colony optimization algorithm to balance the optimal path and planning time. Reference [22] proposed a free step ant colony algorithm and designed the corresponding local pheromone update rules. e simulation showed that the path found by this algorithm is shorter and the convergence is better. Reference [23] designed a path planner composed of heterogeneous ant colonies. Different kinds of ant colonies have different visual ranges and motion speeds and modified the state transition rules and pheromone update method. Reference [24] uses the genetic algorithm to generate the initial path to reduce the blindness of the ant colony algorithm in the initial search and then uses the ant colony algorithm to further optimize the initial path. Reference [25] obtained a series of suboptimal solutions by roughly searching the initial pheromone distribution of the ant colony algorithm and then obtained the optimal solution by the ant colony algorithm. Reference [26] studied the updating strategy of residual pheromone and proposed an improved ant colony algorithm to solve the time-dependent road network planning problem. Reference [27] used the search mode of the visual field to limit the search range, adopted the deadlock-free mechanism for the deadlock problem, and proposed an improved pheromone update algorithm. Reference [28] introduced the evaluation function and bending suppression operator of a * algorithm, improved the heuristic information of the ant colony algorithm, and speeded up the convergence speed. e results showed that the improved ant colony algorithm is more efficient. Most of the above improved algorithms are committed to improving the search efficiency of the ant colony algorithm and getting the shortest search path possible, but they have not studied other optimal factors of the path.
Based on the above analysis, aiming at the problems of slow convergence speed and path redundancy of ant colony algorithm, a robot path planning method based on an improved ant colony algorithm is proposed. In the proposed method, the working area of the mobile robot is modeled by the grid method, and each grid is marked to make the ant colony move from the initial grid to the target grid for path search. e contribution of the proposed method is summarized as follows: (1) An adaptive strategy of ant population division is proposed, which divides the ant population according to different planning tasks, allows some ants to explore the way first, and makes basic optimization planning for the map environment so that the mobile robot can quickly find the optimal path.
(2) By increasing the obstacle avoidance factor and improving the transition probability, it greatly avoids the individual ant falling into a deadlock state in the early search. By dynamically adjusting the amount of information on each path according to the local path information, the excessive concentration of pheromones is avoided, which speeds up the speed of path planning.

Introduction to Problem Model
When the robot performs a task, its working area is divided into grids. In size 30 × 30 grid map as an example. e robot can pass through the white area normally, and black is an obstacle. When the robot does not encounter obstacles, it can move in any direction at its current position and cannot return. Grid coordinates are as follows: where N is the number of rows and columns of the grid map and i is the grid sequence number, as shown in Figure 1.
In order to ensure that the mobile robot can effectively avoid obstacles, the obstacles are expanded according to the physical size. e expanded size of the obstacles is the sum of the radius of the mobile robot and the safe reserved distance so the mobile robot can be regarded as a particle. If there are irregular obstacles in the working environment, when it fills one or more grids, the additional part is still recorded as a grid.

Global Path Planning Based on Improved Ant Colony Algorithm
Ant colony algorithm is easy to fall into local optimization and slow convergence. In order to find the optimal path and avoid blind search, a global path planning method based on an improved ant colony algorithm is proposed in this article.

Ant Population Adaptive Strategy.
In the classical ant colony algorithm, the task of each ant is roughly the same. In addition to the sharing of information, the behavior of ants is relatively independent. is method has brought many benefits in the single-objective programming problem, but it is insufficient if still used in the multiobjective programming problem. In the way of independent action, ant individual needs to measure multiple target values to release pheromones independently, so it needs to obtain an overall evaluation value in one way, which is the standard to release the corresponding concentration of pheromones. In this way, the advantages and disadvantages of various target values in the information left for subsequent ants are mixed together, and the information is relatively vague. It is unable to give the different advantages and disadvantages of the path in the two target values, which is not conducive to the distinction and selection of subsequent ants and reduces the diversity of understanding to some extent. At the same time, there is such a situation that in a map, the distribution of path cost is uneven, the cost values between different regions are very different, but the difference between the path lengths of different sections is almost the same. At this time, if one set of criteria is used to determine the distribution of pheromones, it will inevitably lose its adaptability. erefore, in order to adapt to multiple target values, an adaptive strategy for ant population division is proposed. By dividing the ant population according to different planning tasks, let some ants explore the way first, carry out basic optimization planning for the map environment, and then let the main ant group carry out pathfinding operation based on the planning results obtained by the previous ant group. In other words, let the antecedent ants mark the basic advantage of a target value of the path with pheromone concentration so as to bring planning guidance to the subsequent pathfinding operation of the main ant group. As mentioned above, the proposed improved algorithm splits the ant colony as follows: AntNum pre Antecedent ant colony AntNum − pre Main pathfinding ant colony , where pre is the number of antecedent ant groups. e antecedent ant group will optimize according to the target value of path traffic cost to obtain the result of global cost planning. en, based on the cost planning results, the main pathfinding ant group optimizes the path by comprehensive indicators. In this way, multiple target values have obvious advantages in their respective target fields, which can better reflect the advantages and disadvantages of different paths. erefore, the pathfinding process of the algorithm is generally divided into two steps, as shown in Figure 2.

Transition Probability Improvement.
Due to the limitation of the algorithm tabu table, ants can only move forward and cannot go back in the process of finding the path, which makes a large number of ants fall into a locked state in the early search, and finally "lose," that is, stop the search without reaching the end. As shown in Figure 3, for the three paths A, B, and C, because the ants fall into deadlock and stay at the last searched path node, they do not reach the target point safely and correctly, and the path search efficiency is low. Especially when the environment scale becomes larger and the terrain is complex, the deadlock phenomenon of the ant colony algorithm is more serious.
In the t-th iteration, the state transition probability of the ant k selecting the next node j from the current node i is as follows: where C k represents the set of all reachable path nodes in the next step and α is the information heuristic factor. e larger the value α, the stronger the guiding role of the pheromone. β is the expected heuristic factor. τ ij is the pheromone concentration of the path and n ij is the heuristic function. Deadlock ants are inevitable in the ant colony algorithm. e fundamental reason is that when searching the path, ants will inevitably encounter the situation that the surrounding nodes have passed or there are obstacles. Ants cannot pass through and can only stay in place. erefore, the obstacle avoidance strategy is adopted at the initial stage of search, and the obstacle avoidance factor s j is introduced as follows: where O j is the total number of grids adjacent to the node j and with obstacles and L j refers to the total number of grids adjacent to the node j and restricted by the tabu table. A j is the total number of grids adjacent to the node j and ε is the obstacle avoidance coefficient, which takes a small positive number. By adding the obstacle avoidance strategy, the ants avoid the surrounding obstacles as much as possible every time they iterate to search the path, and the number of deadlock ants is significantly reduced. Parameter adaptive pseudorandom transfer strategy is adopted as follows: where N max is the maximum number of iterations, N m is the current number of iterations, and δ is the adjustment coefficient, the value range of which is (0.5, 1).

Pheromone Update.
In the standard ant colony optimization algorithm, set τ ij (0) � C, where C is a constant. In order to accelerate the early convergence speed of the algorithm, this article changes the method of selecting τ ij (0) as a constant and proposes an initialization allocation of τ ij according to the proportion of the local path length d ij in the lengths of all connected paths between points i and j.
where d ij represents the distance between two nodes i and j, average i,j∈n d ij represents the average distance of all paths directly connected to nodes i and j, and M j represents the number of paths connected to node j. e initialization allocation method of τ ij comprehensively considers the ratio Z of the length of a path to the average length of the paths in the local region and the number of paths M j that ants can choose next. Figure 4 shows the path diagram of two points connected. e more the paths to be selected, the greater the diversity of algorithm solutions. e calculation formula of average i,j∈n d ij is as follows: It is called an iterative process that all ants in the ant colony with population W move once. After n iterative processes, all ants complete a cycle. At this time, the pheromone on each path that the ants pass through needs to be adjusted. After the ants complete a cycle, it will produce an optimal solution l Best and the worst solution l Worst in the current cycle: After determining the path that meets the update conditions, update the pheromone of each path according to formula (10). ρ is pheromone residue operator and Δτ ij represents the amount of pheromone left by ants on the path i ⟶ j: Among them, If the ant passes the path i ⟶ j, 0, else, where d ij represents the distance between nodes i and j, d min j represents the shortest path distance among all paths connected to node j, M i represents the number of paths connected to node i, M j represents the number of paths connected to node j, andM i and M j do not include path i ⟶ j. Formula (12) updates the pheromone of each path according to different conditions by using the local path information of the area around each path. It can be seen that this algorithm only allows some ants to find relatively short paths to update pheromones. According to the path length obtained by ants in this cycle, select to increase the amount of information of some better paths and dynamically adjust the amount of information on each path according to the local path information so as to avoid the excessive concentration of pheromones. is algorithm accelerates the convergence speed and optimization ability of the algorithm and avoids premature convergence of the algorithm.

Specific Implementation Steps of Improved Algorithm.
e improved ant colony algorithm divides the ant colony into two parts. Each part has its own planning task. On the whole, the steps of the algorithm are as follows: Step 1: Set the corresponding parameters required by the algorithm and read the grid map information, including the grid map scale and some content information. e required parameters include the following: grid size, number of ant populations, number of antecedent ant populations, number of iterations, initial amount of pheromone, and pheromone weight.
Step 2: Initialize all ants, including the ant taboo table, path table, path length, total traffic cost, and initial position of ants.
Step 3: e cycle iteration starts, and the antecedent ant group starts planning tasks.
Step 4: e antecedent ants calculate the transfer probability according to the formula, then select the walking node, and update the path table, path length, total communication cost, and other information. If the ant reaches the destination, the pheromone concentration on the path is updated and volatilized according to the pheromone update and volatilization rules.
Step 5: If all the antecedent ant groups reach the destination, continue the planning task of the main ant group; otherwise, turn to Step 4 to continue to find the way.
Step 6: e main ant colony carries out the planning task. According to the pheromone concentration left by the antecedent ant, the transfer probability is calculated according to formula (4). e path is selected by combining the two target values, and the relevant information table and variables are updated after selecting the next node. If the ant reaches the destination, the pheromone concentration on the path is updated and volatilized according to the pheromone update and volatilization rules.
Step 7: If all ants complete the planning task, retain the global optimal path information, compare the obtained paths, and give corresponding rewards and punishments according to the advantages and disadvantages of the paths.
Step 8: If all the iteration cycle has been completed at this time, the planning result is output and the algorithm ends. Otherwise, turn to Step 3, reset the ant information and continue the iteration.

Simulation Environment Setting and Parameter Selection.
In this article, MATLAB R2016a simulation software is used to simulate the path planning process of the mobile robot on the ground with obstacles. Because Roulette is used in the simulation process of the ant colony algorithm, the results will be different each time. In the simulation, the method of averaging multiple experiments is adopted. e simulation Journal of Robotics 5 environment is Windows 10 64-bit operating system, Intel Core I5-3210m CPU @ 2.50 GHz processor, 8 GB memory. At present, there is no perfect theoretical method for the parameter selection of the ant colony algorithm. e usual method is to take values according to experience and compare them through experiments to obtain better parameter values. In this article, the parameter selection experiment is carried out on a 30m × 30 m map. Because the main parameters of the ant colony algorithm are α and β, this article only shows the value selection process of α and β. e values of other parameters are shown in Table 1 according to experience and experimental simulation comparison.
Change α and β based on the above values. α reflects the importance of the inspiration of the previous ant colony to the current ant, and β reflects the importance of the inspiration of the current local environment to the ant. e values of the two are relative, so they must be combined to change. In order to facilitate the experiment, let α � 1, so the value of β/α equals the value of β. e simulation results show that when α is large and β is small, the ant search path is chaotic, many ants are entering the dead end, and the number of ants moving towards the target grid is small, so the algorithm is easy to fall into local optimization. When the value of β/α is about 10, the algorithm has a wide search range and obtains better results, as shown in Figure 5. When the value of β/α continues to increase, the convergence speed of the algorithm slows down, and it is easy to fall into the local optimal situation only under the guidance of local heuristic information. erefore, take α � 1, β � 10.

Comparison of Simulation
Results. At 30m × 30 m complex environment, the proposed algorithm, ant colony algorithm, the algorithm in literature [26], and the algorithm in literature [28] are compared and analyzed. Set the grid size to 1 m × 1 m; the average speed of the mobile robot is 0.5 m/s. Considering safety factors, set the deceleration of the mobile robot to 0.1 m/s when reaching each node. In addition, the turning time is set to 1 s at each node. e  Figure 5: β/α variation curve. experimental data are shown in Table 2. e basic ant colony algorithm finds the global optimal value of 44.623 m in the 40th iteration. In [26], the algorithm converged to 42.569 m in the 23rd iteration, and in [28], the algorithm converged to 42.357 m in the 20th iteration. e proposed algorithm converged in the 8th iteration and found the global optimal value of 41.248 m. Compared with [26] and [28], the number of iterations of the algorithm is reduced by 65.22% and 60.00%, respectively, the number of turns is reduced by 25.00% and 18.18%, respectively, the path length is reduced by 3.10% and 2.62%, respectively, and the driving time of mobile robot is reduced by 5.35% and 4.30%, respectively [29]. Figure 6 shows the path planning diagram of the improved algorithm, Figure 7 shows the comparison of the convergence curves of the four algorithms, and Figure 8 shows the comparison of the number of high-quality solutions of the three algorithms. rough comparison, it can be seen that the improved algorithm in this article still achieves good results in improving deadlock ants in complex environment and greatly reduces the number of deadlock ants. is shows the superiority of this algorithm, which still has high global performance and fast convergence in complex environment. Due to the reduction of turning times and driving time, the energy consumption of mobile robot is most likely to be reduced. e larger the environmental scale is, the more complex the terrain is, and the more obvious the advantages are.

Conclusion
In order to solve the problems of slow convergence speed and easy to fall into local optimal value in path planning, a robot path planning method based on an improved ant colony algorithm is proposed. e main improvements are as follows: the grid method is used for modeling, and each grid is marked. Let the antecedent ants mark the basic advantage on a target value of the path with pheromone concentration so as to guide the subsequent pathfinding operation of the main ant group. e obstacle avoidance factor is added to improve the transition probability, and the amount of information on each path is dynamically adjusted according to the local path information to avoid the excessive concentration of pheromones. Experiments show that compared with the comparative references, the iteration times of the proposed algorithm are reduced by 65.22% and 60.00%, respectively, and the travel time of the mobile robot is reduced by 5.35% and 4.30%, respectively, which can effectively improve the work efficiency of the mobile robot in path planning.
In the future research, we will study how to complete efficient and high-quality path planning tasks in a dynamic environment. Moreover, a neural network can be used to dynamically calculate various parameters and weights to make the planning more intelligent.

Data Availability
e data used to support the findings of this study are included within the article.