# Path Planning of Multirotor UAV Based on the Improved Ant Colony Algorithm

Authors: Duo Qi; Zhihao Zhang; Qirui Zhang
Journal: Journal of Robotics
 (2022)

---

## Abstract

Path planning is an important part of the unmanned aerial vehicle (UAV) to realize its autonomous capabilities. Aiming at the shortcomings of the traditional ant colony algorithm-based trajectory planning method, which has slow convergence speed and easy to fall into the local optimum, a path planning method based on the improved ant colony algorithm is proposed. First, a dynamic adjusting factor is added into the heuristic function to improve the directivity of path selection and search speed. Then, the state transition strategy is improved to solve the problem of slow convergence in the initial stage and easy to fall into local optimum in the later stage. Finally, the path inflection point is smoothly optimized through the cubic B-spline curve. Simulation results show that the improved ant colony algorithm can quickly converge to the optimal path and well adapt to the flight requirements of multirotor UAV.


---

## Body

## 1. Introduction

With the continuous progress of science and technology, especially the continuous development of microelectronic technology and microelectromechanical technology, UAV has been widely used in military and civil fields. Compared with large UAVs, small UAVs have a broader application space in the fields of police, rescue and disaster relief, traffic management, news media, aerial photography, geological survey, environmental evaluation, pipeline inspection, and so on. Among them, the multirotor small UAV, as a typical representative, has developed particularly rapidly in recent years and received the focus of researchers.Path planning is one of the key technologies for UAV to realize autonomous flight. A large number of scholars have done research on it and achieved a lot of results. In fact, path planning is to find an optimal flight path from initial point to target point under certain constraints. Common planning methods include classical algorithms such as theA∗ (A-star) algorithm [1, 2], artificial potential field method [3, 4], and optimal control method [5, 6], as well as intelligent algorithms such as the genetic algorithm [7, 8], ant colony algorithm [9, 10], and particle swarm optimization algorithm [11].The classical algorithm is generally only suitable for simple spatial path planning. In the face of complex problems, the difficulty of solving them increases exponentially with the increase of dimension, which has certain limitations. With the development of computer and big data technology, intelligent algorithms have more and more obvious advantages of good robustness, positive feedback mechanism, and self-organization. Taking the ant colony algorithm as an example, theoretically, it can find the optimal solution of the path, which is suitable for path planning in complex environment. However, in practice, we must consider the problems of how to shorten search time, speed up convergence, and jump out of local optimal. Li et al. [12] introduced a weight factor into the probability transfer function and improved the updating way of information. The simulation results showed that the convergence speed of the improved algorithm is improved, and the optimal path is shorter, but the search results are not stable. Wu et al. [13] adopted the method of integrating the current optimal track pheromone and the historical optimal track update, introduced the pheromone rollback clearing mechanism, and carried out offline calculation, which improved the search efficiency, but did not significantly reduce the number of iterations. Wang et al. [14] used the artificial potential field method to improve the heuristic function of the ant colony algorithm, allocated pheromones reasonably when the algorithm is not running, and improved the volatilization coefficient to find the optimal path of the algorithm.It can be seen that many research studies are all based on the traditional ant colony algorithm and have achieved certain results. However, the traditional ant colony algorithm has the shortcomings of slow convergence speed and easy to fall into local optimum, which is not applicable to the real flight environment. Aiming at the defects of the basic ant colony algorithm, an improved ant colony algorithm is proposed in this study to make it suitable for path planning of multirotor UAV. First, a dynamic adjusting factor is added into the heuristic function to improve the directivity of path selection and search speed. Then, the state transition strategy is improved to solve the problem of slow convergence in the initial stage and easy to fall into local optimum in the later stage. At the same time, combined with the existing pheromone volatilization factor update strategy, the overall performance of the algorithm is improved. Finally, the path inflection point is smoothly optimized through the cubic B-spline curve, so that the path planning of multirotor UAV is more in line with the flight reality.The study is organized as follows: Section2 describes the environment in which the UAV performs its mission. Section 3 introduces the basic principle and deficiency of the ant colony algorithm. Section 4 improves the shortcomings of the ant colony algorithm and proposes the UAV track planning method and smoothing method. In Section 5, the proposed algorithm is simulated and analyzed, which verifies the effectiveness of the proposed algorithm. Finally, the full text work is summarized and the next research direction is pointed out.


## 2. Environmental Model

In order to accurately describe the path planning process of UAV, its two-dimensional environment map [15, 16] needs to be modeled. The conventional environment modeling methods include the grid method [17, 18], geometric information method, and view method. Considering that the grid method has the advantages of simple drawing, clear data structure, and easy implementation, we select the grid method to complete the UAV flight environment modeling. The grid method decomposes the plane map into a series of grids to facilitate the analysis of map information. The grid map is composed of 0 and 1 matrices with binary values. In the matrix, 0 stands for free grid, in which the UAV can enter and exit freely, represented by white grid, and 1 stands for obstacle grid, in which the UAV needs to move around, and represented by black grid. The grid environment and the electronic map are shown in Figure 1. The map is numbered from left to right and top to bottom. The grid serial number corresponds to coordinates one by one, and the expression of the relationship between them is shown in equation (1). The result obtained is the center point of the grid.(1)xi=r×modi,R−0.5,yi=r×R+0.5−ceili,R−0.5,where r is the grid size, i represents the number of the grid, R is the number of rows of the grid matrix, mod () is the remainder operation function, and ceil () is the rounding up operation function.Figure 1
Grid map and electronic map.In order to prevent the collision between UAV and obstacles, when the obstacle is less than one grid, it is filled into a complete grid. At this time, the UAV is treated as a particle.The flight rules of UAV are as follows: it can only appear in the white grid and cannot pass through the black grid, but it can pass through the four corners of the black grid; it is forbidden to repeat the same grid; and in unit time, it can only move between two adjacent grids. We use Euclidean distance to measure the length of the flight path. For example, if moving up, down, left, and right, the path length is 1 unit and if moving to the four corners of the grid, the path length is 1.41 units.


## 3. Basic Ant Colony Algorithm

Ant colony algorithms are inspired by the foraging behavior of ant populations, in which each ant in the colony leaves pheromones in its movement path to communicate information to the colony. The shorter the moving path is, the higher the pheromone concentration is, and the probability that the path is selected by ants, which forms the positive feedback mechanism for ants to find the shortest path. The basic principle of the ant colony algorithm is as follows.Ants select paths according to pheromone concentration and heuristic function, and the probability of antk moving from grid i to grid j can be expressed as(2)Pijk=τijαtηijβt/∑s∈Akτisαtηisβt,s∈Ak,0,s∉Ak,where α is the pheromone heuristic factor and β is the distance expectation function factor, which affect the importance of pheromone and distance heuristic function, respectively, Ak indicates the next destinations ants can reach, τijt is the pheromone concentration on the moving path at time t, and ηijt represents the distance heuristic function. Here,(3)ηijt=1dij,dij=xi−xj2+yi−yj2.Each ant will leave a certain amount of pheromone when moving. Therefore, when the algorithm iterates continuously, the pheromone content in the path gradually accumulates and volatilizes at the same time. When all ants in the population complete each round of iteration, the pheromone content on the path will be updated according to the following rules:(4)τijt+1=1−ρτijt+Δτijt,τijt=∑k=1mΔτijkt,Δτijk=Q/Lk,0,where ρ is the pheromone volatilization coefficient, Δτijrepresents the sum of pheromones released on the path between the two nodes, Δτijk denotes the pheromone increment, Lk is the path length of ant k, and Q is the pheromone enhancement coefficient.


## 4. The Improved Ant Colony Algorithm

### 4.1. The Improved Heuristic Function

When using the basic algorithm to plan the path, the ant colony has not left pheromone in the initial stage. At this time, the pheromone on the path is scarce. The ant cannot select the next grid according to the pheromone concentration. The search has no purpose and cannot quickly search the feasible path. On the basis of the heuristic function in [19], we add a dynamic regulation factor ξ. The new expressions of heuristic function and ξ are shown as(5)nij=1dij+djE2∗ξ,ξ=exp−5∗iter/itermax,iter≠itermax,1/itermax,iter=itermax,where djE is the Euclidean distance between j and the target point, iter is the current number of iterations, and itermax is maximum number of iterations.


### 4.2. The Improved State Transition Rule

In the basic ant colony algorithm, ants mainly rely on the probability function to select the next node. However, in the early stage of the algorithm, the difference between the pheromone concentrations of the path is very small, which cannot effectively guide the ant to choose the path. Based on the initial transition probability, the convergence speed of the algorithm is guaranteed by introducing pseudorandom rules. The ant will select the next nodej according to the following formula.(6)Pijkt=maxτisα∗ηjEβ,q<q0,Pijk,q≥q0,where q represents a random number between (0, 1), and q0 is a design parameter, which is usually determined by previous experience and repeated experiments. Its value determines the path selection mode. If the value of q0 is too large, the path shift is more likely to be a deterministic pattern, and the convergence speed is faster, but the global search capability is reduced. On the contrary, if the value of q0 is very small, the path shift is more inclined to the roulette mode, which not only increases the randomness of the global search but also reduces the convergence speed. Therefore, setting a reasonable value of q0 has an important influence on the convergence process. In order to better improve the problem of slow convergence in the initial stage and easy to fall into local optimization in the later stage, we designed it as a dynamical parameter adjusted with the number of iterations. The details expression is as follows:(7)q0=0.25∗exp−1iter−1.


### 4.3. Pheromone Volatilization Factor Update Strategy

Due to the particularity of path planning, different volatilization coefficients are required in different stages: ifρ is too large, ants cannot complete path search according to the pheromone information, resulting in slow convergence speed; if ρ is too small, the pheromone will accumulate excessively, easily make the path search fall into local optimization. Referring to the research ideas of [19], the adaptive updating strategies of pheromone volatile factors are designed as follows:(8)ρt+1=itermaxitermax+iter∗1exp1−ρt.In order to search as many paths as possible, the pheromone content should be controlled at a low level at the initial stage of algorithm optimization. Therefore, the value of the initial volatile factorρ should not be too small. At this time, pheromone concentration has little interference in the process of path exploration, and ants can search more possible paths. With algorithm iteration step by step, the value of ρ gradually decreases, and the negative feedback effect is weakened. The pheromone content on the moving path is increased, and the guiding effect of pheromone concentration on ant colony is enhanced. When the number of iterations increases to a certain number, ant colony will converge to the path with a higher pheromone content. Therefore, the improved algorithm can expand the searching range of ant colony and improve the convergence speed. The changing curve of ρ is shown in Figure 2 (initial ρ = 0.8).Figure 2
Changing curve ofρ.


### 4.4. Path Smoothing Method

The optimal path generated by the improved ant colony algorithm is not smooth enough and has sharp inflection point. Therefore, cubicB-spline smoothing is introduced to optimize the path at the inflection point. The total equation of the B-spline curve is [20, 21](9)Pt=∑i=0nPiFi,kt.The basis function in cubicB-spline curve equation is(10)Fi,kt=1k!∑m=0k−i−1mmk+1t+k−m−jk.Furthermore, the mathematical expression of the basis function of cubicB-spline curve is(11)F0,3t=161−t3,F1,3t=163t3−6t2+4,F2,3t=16−3t3+3t2−3t+1,F3,3t=16t3.The cubicB-spline curve equation can be converted by bringing the basis function into the general equation:(12)Pt=P0∗F0,3t+P1∗F1,3t+P2∗F2,3t+P3∗F3,3t.Based on the above cubicB-spline curve equation, the flight path can be smoothed. Figure 3 shows the simulation of local path smoothing results. The red line is the path to be smoothed, and the blue dotted line is the smoothing result. The goal of this strategy is to replace the broken line with a curve near the inflection point, so that the obtained path is smoother and more in line with the reality of UAV flight.Figure 3
Simulation of local path smoothing results.The flow of the improved ant colony algorithm is shown in Figure4.Figure 4
Improved ant colony algorithm flow.


## 4.1. The Improved Heuristic Function

When using the basic algorithm to plan the path, the ant colony has not left pheromone in the initial stage. At this time, the pheromone on the path is scarce. The ant cannot select the next grid according to the pheromone concentration. The search has no purpose and cannot quickly search the feasible path. On the basis of the heuristic function in [19], we add a dynamic regulation factor ξ. The new expressions of heuristic function and ξ are shown as(5)nij=1dij+djE2∗ξ,ξ=exp−5∗iter/itermax,iter≠itermax,1/itermax,iter=itermax,where djE is the Euclidean distance between j and the target point, iter is the current number of iterations, and itermax is maximum number of iterations.


## 4.2. The Improved State Transition Rule

In the basic ant colony algorithm, ants mainly rely on the probability function to select the next node. However, in the early stage of the algorithm, the difference between the pheromone concentrations of the path is very small, which cannot effectively guide the ant to choose the path. Based on the initial transition probability, the convergence speed of the algorithm is guaranteed by introducing pseudorandom rules. The ant will select the next nodej according to the following formula.(6)Pijkt=maxτisα∗ηjEβ,q<q0,Pijk,q≥q0,where q represents a random number between (0, 1), and q0 is a design parameter, which is usually determined by previous experience and repeated experiments. Its value determines the path selection mode. If the value of q0 is too large, the path shift is more likely to be a deterministic pattern, and the convergence speed is faster, but the global search capability is reduced. On the contrary, if the value of q0 is very small, the path shift is more inclined to the roulette mode, which not only increases the randomness of the global search but also reduces the convergence speed. Therefore, setting a reasonable value of q0 has an important influence on the convergence process. In order to better improve the problem of slow convergence in the initial stage and easy to fall into local optimization in the later stage, we designed it as a dynamical parameter adjusted with the number of iterations. The details expression is as follows:(7)q0=0.25∗exp−1iter−1.


## 4.3. Pheromone Volatilization Factor Update Strategy

Due to the particularity of path planning, different volatilization coefficients are required in different stages: ifρ is too large, ants cannot complete path search according to the pheromone information, resulting in slow convergence speed; if ρ is too small, the pheromone will accumulate excessively, easily make the path search fall into local optimization. Referring to the research ideas of [19], the adaptive updating strategies of pheromone volatile factors are designed as follows:(8)ρt+1=itermaxitermax+iter∗1exp1−ρt.In order to search as many paths as possible, the pheromone content should be controlled at a low level at the initial stage of algorithm optimization. Therefore, the value of the initial volatile factorρ should not be too small. At this time, pheromone concentration has little interference in the process of path exploration, and ants can search more possible paths. With algorithm iteration step by step, the value of ρ gradually decreases, and the negative feedback effect is weakened. The pheromone content on the moving path is increased, and the guiding effect of pheromone concentration on ant colony is enhanced. When the number of iterations increases to a certain number, ant colony will converge to the path with a higher pheromone content. Therefore, the improved algorithm can expand the searching range of ant colony and improve the convergence speed. The changing curve of ρ is shown in Figure 2 (initial ρ = 0.8).Figure 2
Changing curve ofρ.


## 4.4. Path Smoothing Method

The optimal path generated by the improved ant colony algorithm is not smooth enough and has sharp inflection point. Therefore, cubicB-spline smoothing is introduced to optimize the path at the inflection point. The total equation of the B-spline curve is [20, 21](9)Pt=∑i=0nPiFi,kt.The basis function in cubicB-spline curve equation is(10)Fi,kt=1k!∑m=0k−i−1mmk+1t+k−m−jk.Furthermore, the mathematical expression of the basis function of cubicB-spline curve is(11)F0,3t=161−t3,F1,3t=163t3−6t2+4,F2,3t=16−3t3+3t2−3t+1,F3,3t=16t3.The cubicB-spline curve equation can be converted by bringing the basis function into the general equation:(12)Pt=P0∗F0,3t+P1∗F1,3t+P2∗F2,3t+P3∗F3,3t.Based on the above cubicB-spline curve equation, the flight path can be smoothed. Figure 3 shows the simulation of local path smoothing results. The red line is the path to be smoothed, and the blue dotted line is the smoothing result. The goal of this strategy is to replace the broken line with a curve near the inflection point, so that the obtained path is smoother and more in line with the reality of UAV flight.Figure 3
Simulation of local path smoothing results.The flow of the improved ant colony algorithm is shown in Figure4.Figure 4
Improved ant colony algorithm flow.


## 5. Simulation Analysis

The simulation hardware environment is the Huawei MateBook Pro laptop equipped with Intel Core I7-8565U processor. Software environment is the Win10 operating system, installed with MATLAB 2017B simulation test environment. BACA, GA (genetic algorithm), and IACA algorithms are implemented in the simulation tests. The basic parameter settings of three algorithms are given in Tables1 and 2.Table 1
Basic parameter settings of BACA and IACA.
Parameter nameNumber of ants (m)Pheromone heuristic factor (α)Expectation function factor (β)Strength of the pheromone (Q)Value50171Table 2
Basic parameter settings of GA.
Parameter nameNumber of swarmsCrossover probabilityVariation probabilityNumber of terminative iterationsValue500.60.001100


### 5.1. Performance Test

In order to verify the optimization ability of the improved ant colony algorithm in this study, first, the typical single-mode test function Sphere and multimode test function Alpine are used for the optimization comparison test. The dimension value of the two functions is 30, the value range of Sphere is [−100, 100], the value range of Alpine is [−10, 10], and the theoretically achievable minimum value of both functions is 0. The two function expressions are as follows, respectively:(13)f1x=∑i=1nxi2,f2x=∑i=1nxisinxi+0.1xi.The basic ant colony algorithm (BACA) and the improved ant colony algorithm (IACA) are independently run for 20 times on each test function, and the common parameters of the algorithm remained consistent. The results are given in Table3.According to the test results in the above table, the IACA algorithm proposed in this study has a good optimization effect. The theoretical global optimal value can be obtained by searching for Sphere function and Alpine function.


### 5.2. Comparison Test of Path Planning

In order to verify the effectiveness of IACA in UAV path planning, BACA and GA (genetic algorithm) are used as a comparison to conduct simulation comparison tests in 20 × 20 and 30 × 30 environment maps.Table 3
Comparison of test functions for optimization results.
Function nameAlgorithm nameAverage valueWorst valueBest valueSphereBACA2.43E−62.98E −57.92E −14IACA7.64E −826.49E −690AlpineBACA5.43E −21.21E −19.84E −3IACA6.99E −792.14E −660


#### 5.2.1. 20 × 20 Simulation Environment

The simulation test is first carried out in a 20 × 20 grid map, with the starting point at the upper left corner of the map and the target point at the lower right corner. BACA, GA, and IACA proposed in this study are used to plan the flight path of UAV, respectively, with the maximum iteration times of 100. Path planning diagram and iterative convergence curve are shown in Figures5–7. The experimental results are given in Table 4.Figure 5
Path planning of BACA. (a) Optimal path. (b) Convergence curve.
(a)(b)Figure 6
Path planning of GA. (a) Optimal path. (b) Convergence curve.
(a)(b)Figure 7
Path planning of IACA. (a) Optimal path. (b) Convergence curve.
(a)(b)Table 4
Comparison tests of 20 × 20 simulation environment.
Algorithm nameLength of the pathTime consumingNumber of path gridNumber of convergent iterationsBACA36.044.623262GA39.454.653070IACA30.473.972646It can be seen from the above table that the shortest path length obtained by applying the IACA algorithm proposed in this study is 15.4% shorter than that obtained by applying the BACA algorithm, and the running time is reduced by 14.1%. Compared with GA, IACA is 22.8% shorter, and the running time is reduced by 14.6%.


#### 5.2.2. 30 × 30 Simulation Environment

When the flight environment is large and obstacles are densely distributed, the 100 iteration times of 20 × 20 map cannot be effectively converged to the shortest path. We increase the maximum iteration times to 300. Path planning diagram and iterative convergence curve are shown in Figures8–10. As given in Table 5, the shortest path obtained by IACA is 14.2% shorter than that obtained by BACA, and the system running time is reduced by 8.7%, respectively. Compared with GA, though the system running time is added by 6.4%, the shortest path obtained by IACA is 13.8% shorter than that obtained by GA.Figure 8
Path planning of BACA. (a) Optimal path. (b) Convergence curve.
(a)(b)Figure 9
Path planning of GA. (a) Optimal path. (b) Convergence curve.
(a)(b)Figure 10
Path planning of IACA. (a) Optimal path. (b) Convergence curve.
(a)(b)Table 5
Comparison tests of 30 × 30 simulation environment.
Algorithm nameLength of the pathTime consumingNumber of path gridNumber of convergent iterationsBACA53.1964.1543211GA51.9462.3146161IACA45.6258.5938170


## 5.1. Performance Test

In order to verify the optimization ability of the improved ant colony algorithm in this study, first, the typical single-mode test function Sphere and multimode test function Alpine are used for the optimization comparison test. The dimension value of the two functions is 30, the value range of Sphere is [−100, 100], the value range of Alpine is [−10, 10], and the theoretically achievable minimum value of both functions is 0. The two function expressions are as follows, respectively:(13)f1x=∑i=1nxi2,f2x=∑i=1nxisinxi+0.1xi.The basic ant colony algorithm (BACA) and the improved ant colony algorithm (IACA) are independently run for 20 times on each test function, and the common parameters of the algorithm remained consistent. The results are given in Table3.According to the test results in the above table, the IACA algorithm proposed in this study has a good optimization effect. The theoretical global optimal value can be obtained by searching for Sphere function and Alpine function.


## 5.2. Comparison Test of Path Planning

In order to verify the effectiveness of IACA in UAV path planning, BACA and GA (genetic algorithm) are used as a comparison to conduct simulation comparison tests in 20 × 20 and 30 × 30 environment maps.Table 3
Comparison of test functions for optimization results.
Function nameAlgorithm nameAverage valueWorst valueBest valueSphereBACA2.43E−62.98E −57.92E −14IACA7.64E −826.49E −690AlpineBACA5.43E −21.21E −19.84E −3IACA6.99E −792.14E −660


### 5.2.1. 20 × 20 Simulation Environment

The simulation test is first carried out in a 20 × 20 grid map, with the starting point at the upper left corner of the map and the target point at the lower right corner. BACA, GA, and IACA proposed in this study are used to plan the flight path of UAV, respectively, with the maximum iteration times of 100. Path planning diagram and iterative convergence curve are shown in Figures5–7. The experimental results are given in Table 4.Figure 5
Path planning of BACA. (a) Optimal path. (b) Convergence curve.
(a)(b)Figure 6
Path planning of GA. (a) Optimal path. (b) Convergence curve.
(a)(b)Figure 7
Path planning of IACA. (a) Optimal path. (b) Convergence curve.
(a)(b)Table 4
Comparison tests of 20 × 20 simulation environment.
Algorithm nameLength of the pathTime consumingNumber of path gridNumber of convergent iterationsBACA36.044.623262GA39.454.653070IACA30.473.972646It can be seen from the above table that the shortest path length obtained by applying the IACA algorithm proposed in this study is 15.4% shorter than that obtained by applying the BACA algorithm, and the running time is reduced by 14.1%. Compared with GA, IACA is 22.8% shorter, and the running time is reduced by 14.6%.


### 5.2.2. 30 × 30 Simulation Environment

When the flight environment is large and obstacles are densely distributed, the 100 iteration times of 20 × 20 map cannot be effectively converged to the shortest path. We increase the maximum iteration times to 300. Path planning diagram and iterative convergence curve are shown in Figures8–10. As given in Table 5, the shortest path obtained by IACA is 14.2% shorter than that obtained by BACA, and the system running time is reduced by 8.7%, respectively. Compared with GA, though the system running time is added by 6.4%, the shortest path obtained by IACA is 13.8% shorter than that obtained by GA.Figure 8
Path planning of BACA. (a) Optimal path. (b) Convergence curve.
(a)(b)Figure 9
Path planning of GA. (a) Optimal path. (b) Convergence curve.
(a)(b)Figure 10
Path planning of IACA. (a) Optimal path. (b) Convergence curve.
(a)(b)Table 5
Comparison tests of 30 × 30 simulation environment.
Algorithm nameLength of the pathTime consumingNumber of path gridNumber of convergent iterationsBACA53.1964.1543211GA51.9462.3146161IACA45.6258.5938170


## 5.2.1. 20 × 20 Simulation Environment

The simulation test is first carried out in a 20 × 20 grid map, with the starting point at the upper left corner of the map and the target point at the lower right corner. BACA, GA, and IACA proposed in this study are used to plan the flight path of UAV, respectively, with the maximum iteration times of 100. Path planning diagram and iterative convergence curve are shown in Figures5–7. The experimental results are given in Table 4.Figure 5
Path planning of BACA. (a) Optimal path. (b) Convergence curve.
(a)(b)Figure 6
Path planning of GA. (a) Optimal path. (b) Convergence curve.
(a)(b)Figure 7
Path planning of IACA. (a) Optimal path. (b) Convergence curve.
(a)(b)Table 4
Comparison tests of 20 × 20 simulation environment.
Algorithm nameLength of the pathTime consumingNumber of path gridNumber of convergent iterationsBACA36.044.623262GA39.454.653070IACA30.473.972646It can be seen from the above table that the shortest path length obtained by applying the IACA algorithm proposed in this study is 15.4% shorter than that obtained by applying the BACA algorithm, and the running time is reduced by 14.1%. Compared with GA, IACA is 22.8% shorter, and the running time is reduced by 14.6%.


## 5.2.2. 30 × 30 Simulation Environment

When the flight environment is large and obstacles are densely distributed, the 100 iteration times of 20 × 20 map cannot be effectively converged to the shortest path. We increase the maximum iteration times to 300. Path planning diagram and iterative convergence curve are shown in Figures8–10. As given in Table 5, the shortest path obtained by IACA is 14.2% shorter than that obtained by BACA, and the system running time is reduced by 8.7%, respectively. Compared with GA, though the system running time is added by 6.4%, the shortest path obtained by IACA is 13.8% shorter than that obtained by GA.Figure 8
Path planning of BACA. (a) Optimal path. (b) Convergence curve.
(a)(b)Figure 9
Path planning of GA. (a) Optimal path. (b) Convergence curve.
(a)(b)Figure 10
Path planning of IACA. (a) Optimal path. (b) Convergence curve.
(a)(b)Table 5
Comparison tests of 30 × 30 simulation environment.
Algorithm nameLength of the pathTime consumingNumber of path gridNumber of convergent iterationsBACA53.1964.1543211GA51.9462.3146161IACA45.6258.5938170


## 6. Conclusion

In this study, we proposed an improved ant colony algorithm for multirotor UAV path planning. By redesigning the heuristic function of the ant colony algorithm and improving the state transition matrix, the running time of the algorithm and the distance of the optimal moving path are effectively shortened. At last, we smoothed the final moving path to make it more in line with the flight reality of UAV.Through the comparison of MATLAB simulation experiments, it can be seen that the improved algorithm has more advantages than the basic algorithm in the optimization effect and reflects the effectiveness of the algorithm in the operation time and the shortest path.In practical applications, UAVs usually perform tasks in a swarm. Therefore, how to complete the coordinated trajectory planning of UAV swarms on the basis of this study will become the focus of our next research.



---

*Source: 2168964-2022-06-09.xml*