{'fraction_non_alphanumeric': 0.021289773167144074, 'fraction_numerical': 0.007819153054114732, 'mean_word_length': 4.853194381513367, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
UAV Path Planning of Combining Ant Colony and Beetle Antennae Algorithm Using Intelligent Wireless Communication

In order to settle the problem of UAV path planning under mountain, an algorithm which based on the combination of ant colony algorithm and beetle antennae algorithm is proposed. Three dimensional environment model is established and objective function is constructed. It used ant colony algorithm to initialize the search path and the particle coordinates of all the next steps are updated by the beetle antennae algorithm. The improved algorithm adopted a new step update rule to speed up the convergence of the algorithm and used third-order B-spline interpolation method to smooth the path. Simulation results show that improved fusion algorithm has faster convergence speed and high stability by comparing with other algorithms under the same conditions, which verifies its effectiveness.


Introduction
Due to the emergence of various emerging technologies, UAV is widely used in post disaster rescue, material transportation, pollution monitoring and so on [1]. The main problem to be solved when UAV performs flight mission is how to plan the path in a complex three-dimensional environment [2]. Path planning actually refers to the process that UAV plans the path that can directly reach the destination according to the flight mission and consider the threat of obstacles and its own performance constraints, so as to achieve the optimal performance of the specified target [3]. In order to make the UAV better find the optimal path, some scholars have proposed some algorithms, such as ant colony algorithm, beetle antennae algorithm, genetic algorithm, bat algorithm, particle swarm optimization algorithm and so on [4].However, the proposed algorithm has some defects, such as slow convergence speed and easy to fall into local optimization [5]. Therefore, in recent years, there have been many improved and integrated intelligent algorithms [6].
This paper presents a UAV path planning algorithm which combines ant colony algorithm and improved beetle antennae algorithm [7]. Firstly, the initial solution is obtained by ant colony algorithm, and the search of the optimal solution is realized by virtue of the advantages of less calculation and strong development ability of beetle antennae algorithm [8].
At the same time, the third-order B-spline interpolation method is used to smooth the planned path to make it more consistent with the motion characteristics of UAV in reality. Finally, ant colony 2. UAV path planning model

Environmental model
The establishment of environmental model is the premise of path planning, which can directly affect the result and quality of path planning. The environment model of this study is shown in Figure 1. The whole mountain environment model is composed of mountain terrain, no fly zone and threat zone. In addition, sphere S represents the starting point and sphere E represents the end point.
(1) Mountain terrain Firstly, the planning space is divided according to the number of path nodes, and the space is divided into three-dimensional grids of the same size to obtain a sparse three-dimensional grid map. A two-dimensional matrix is used to store the height values corresponding to all grid intersections on the grid graph. The value of each element in the matrix represents the height value of the corresponding intersection. Secondly, the cubic interpolation method is used to add 3D point data to the sparse 3D grid map, so as to obtain the dense 3D grid map. After smoothing, the final terrain model can be obtained.
(2) No fly zone Because there are military jurisdiction areas and other no fly areas in the real mountainous geographical environment, the corresponding no fly area model must be established. For the convenience of research, the no fly zone model is simplified into a cylinder model in this study, and its height is a fixed value. Cylinder A in Figure 1 represents the no fly zone.
(3) Threat zone In the real geographical environment, in addition to the no fly zone, there are threat areas with dense buildings, so it is also necessary to establish the threat area model. The threat zone model is similar to the no fly zone model and is also simplified as a cylinder model, except that the dot coordinates, radius and height are different. Cylinder B in figure 1 represents the threat zone.

Objective function
Path planning refers to finding the optimal path that can avoid the threat area under constraints. In the established model, the UAV needs to find all ordered path nodes from the starting point in the x y z represents the coordinates of the current path node; -1 -1 -1 ( , , ) x y z represents the coordinates of the previous path node. n represents the number of path nodes, and L represents the total distance of path planning.

Ant colony algorithm
Ant colony algorithm is an optimization algorithm that simulates ant colony foraging. Ants will leave pheromones on the path of looking for food. There is a certain functional relationship between the distance of the path and the pheromone concentration. They will choose the path with high concentration of pheromones. Using the positive feedback mechanism, ants can find the optimal path [10].

Algorithm principle.
Beetle antennae algorithm is an algorithm developed according to beetle foraging principle [11]. Food odour can be expressed as a function. Beetles look for food according to the value of the function and the point with the largest value of the function is the location of the food. Beetle uses its antennae to detect the odour concentration. When flying, it will turn to the direction of high concentration odour until beetle finds the point with the largest global odour value.
The specific process of beetle antennae algorithm can be represented by the following steps.
Step 1: is used to represent the orientation of right whisker to left whisker. After normalization, dir can be obtained, and its expression is as follows: Step 2: According to the coordinates of the centre of mass, the coordinates of the left and right antennae can be expressed as: x represent the coordinates of the left and right antennae of longicorn beetles respectively; t x is the coordinate of the centroid of the longicorn at time t; d represents the distance between the two antennae.
Step 3: The fitness values of the left and right antennae are calculated through the fitness function and the particle coordinates of the next step are determined according to the iterative expression of the particle coordinates of the beetle. The iterative expression of particle coordinates of beetle is as follows: 1 t x + represents the coordinates of the particle of the beetle for time 1 t + .s refers to the step size of the beetle; () sign is a symbolic function.
Step 4: Judge whether the iteration results meet the conditions. If not, Step 2 recalculates until the end conditions are met.

Algorithm improvement.
Although the beetle antennae algorithm has the advantages of simple principle, few parameters and small amount of calculation, it also has some problems in UAV path planning. For example, when the step size of the beetle antennae algorithm is fixed, the algorithm cannot converge to the best point. In view of the above problems, this study has made the following improvements to the algorithm: appropriately adjust the step size and reduce the step size in a certain proportion at each iteration. The representative formula of step length iteration is as follows: In equation (10), K is the step attenuation coefficient.

Path smoothing.
When the path search is completed, the flight path of UAV that the flight path is composed of a series of path nodes will be given, However, due to the flight path does not conform to the motion characteristics of UAV in the actual flight environment, it is necessary to smooth the discrete path nodes to make them more in line with the actual motion characteristics of UAV. In this paper, the turning point is processed by using the third-order B-spline interpolation method to obtain the smooth path of UAV motion. The third-order B-spline interpolation equation is as follows:

Improved fusion algorithm
Ant colony algorithm can perform distributed computation and has strong robustness, but it is prone to stagnation when looking for the optimal solution in complex three-dimensional environment. Therefore, combining the improved beetle antennae algorithm for global path planning to improve the convergence speed of the algorithm can be applied to large-scale scenes.
The specific planning process of the improved fusion algorithm can be divided into the following steps.
Step 1: The complex geographical environment is modelled, including terrain, no fly zone and threat zone models.
Step 2: According to the task requirements, the starting point and end point of path planning are selected, and the initial coordinates of all ants are randomly generated.
Step 3: Initializing the population number, pheromone volatilization rate, information heuristic factor and expected heuristic factor in ant colony algorithm, as well as the initial step size, step attenuation coefficient and other parameters in longicorn whisker search algorithm. Step 4: Start to search the path, update the pheromone concentration on all path nodes and use the heuristic function to calculate the coordinates of the next path node of all ants.
Step 5: After all ants perform a path search, they get the updated coordinates of all path nodes.
Step 6: Take the updated coordinates of all path nodes as the particle coordinates of each longicorn, randomly generate the directions of all beetle antennae. Then calculate the left and right antennae and calculate the fitness values of the two whiskers according to the fitness function.
Step 7: The position iteration formula of the beetle antennae algorithm is used to update the next position of each longicorn and the algorithm step size is updated.
Step 8: Judge whether the iteration results meet the conditions. If not, Step 6 recalculates until the end conditions are met.

Simulation experiment
In order to verify the effectiveness of the improved planning algorithm, ant colony algorithm, beetle antennae algorithm and the improved fusion algorithm are simulated, in which the planning space is 500m × 500m × 200m, the central coordinates of the no fly zone and threat zone are (225m, 200m), (400m, 100m), the radius is 10m and 15m, and the height is 200m and 180m respectively. Set the take off point coordinates as (25m, 250m, 80m) and the terminal coordinates as (500m, 200m, 100m).
The algorithm parameter settings in this paper are shown in table 1. In this study, ant colony algorithm and beetle antennae algorithm are compared with the improved fusion algorithm, which are executed 20 times respectively to calculate the optimal path, the worst path and the average path in all paths.
In figure 2, the dotted line is the planned path of ant colony algorithm and the solid line is the planned path of the improved fusion algorithm. The convergence curves of the ant colony algorithm and the improved fusion algorithm are shown in figure 3.  It can be seen from table 2 that under the same planning space and the same obstacles, the path length and iteration times planned by the improved fusion algorithm are better than ant colony algorithm. From the results of 20 simulations, it can be seen that the improved fusion algorithm has better stability.   It can be seen from table 3 that under the same planning space and the same obstacles, the improved fusion algorithm has better path length and iteration times than beetle antennae algorithm, especially from the results of 20 simulations, the improved fusion algorithm has better convergence.

Conclusions
For the path planning problem of UAV in mountainous environment, a path planning algorithm combining ant colony algorithm and improved beetle antennae algorithm is proposed in this paper. The planning space is modelled, the ant colony algorithm is used to initialize the search path, and then the improved beetle antennae search algorithm is used for path planning. In addition, the third-order B-spline interpolation method is used to smooth the planned path to make it more consistent with the motion characteristics of UAV. The simulation results show that the improved fusion algorithm proposed in this paper can not only improve the search efficiency and accelerate the convergence speed, but also improve the stability of finding the optimal solution. At the same time, this algorithm is compared with the other two algorithms in the same environment, which proves that this algorithm is effective and reliable. This paper mainly aims at the global path planning in the static threedimensional environment without considering the dynamic obstacles, which is also the focus of follow-up research.