Research on Obstacle Avoidance of UAV for Optical Cable Route Inspection

Firstly, UAV is proposed to be used in optical cable route inspection, which is the main promotion direction of optical cable route inspection in the future. Then, an improved ant colony algorithm is proposed to solve the path planning problem of UAV, and the feasibility is verified by simulation.

CISAT 2020 Journal of Physics: Conference Series 1634 (2020) 012059 IOP Publishing doi:10.1088/1742-6596/1634/1/012059 2 The global planning method is to obtain information details in the environment first, and then give the UAV intelligent search for the optimal or suboptimal path in this environment. This method is divided into offline and online, which belongs to the offline planning method. The accuracy of obtaining environmental information determines the accuracy of planning path. Generally, this method can get the optimal path planned by the algorithm, but the premise is that the environmental information should be mastered accurately and the calculation amount is very large; the local method is to obtain the environmental information of the current UAV first, which is local, that is, the size, specific shape, spatial position and other relevant information of the obstacles, so that the UAV can avoid collision better. Because the information obtained by local planning method is only obtained by sensor induction. And when the environment changes, it will change in real time, so most navigation control usually uses the local method. Compared with the global method, the biggest characteristic of the local method is real-time, and the biggest defect is that it can only rely on the obtained local information for planning, which often results in the local optimal solution, so the pre planned path will lose significance, making the UAV unable to reach the destination as expected. The method based on graph theory is widely used in the field of UAV path planning, but most of these methods are sampling the planning space, so the performance of the route obtained is limited by the degree of sampling. It is suitable for small and medium-sized track planning. The evolutionary algorithm can solve the problem with large space scale, but it also has low efficiency. Ant colony algorithm is a simulation of the foraging mechanism of real ant colony in nature. By introducing heuristic information and pheromone update mechanism based on positive feedback mechanism [5] , the efficiency of the algorithm is improved.

Principle of ant colony algorithm
In the process of finding the path, ants will leave a special substance on the way they pass. The substance here is called pheromone in ant colony algorithm. Ants perceive the intensity of this substance, and use this substance concentration to guide their movement direction. The direction with high pheromone concentration is the first direction for ants to choose to move. In the same time, the information concentration with short path length will volatilize more slowly, and more ants will choose this path. Ants use pheromones as a medium for indirect information exchange, and determine the best path from the cave to the food place.
The search of artificial ants mainly includes three kinds of behaviors： Ants use pheromones to communicate with each other: ants will release a kind of pheromone substance on the selected path. When other ants choose the path, they will choose according to the pheromone concentration on the path, so that pheromones become the communication medium between ants.
Memory behavior of ants: the path searched by an ant is no longer selected by the ant in the next search, so a promotion table is established in the ant colony algorithm for simulation.
Colony activity of ants: it is difficult to reach the food source through the movement of one ant, but the whole ant colony is totally different. When more and more ants pass through some paths, the number of pheromones left on the path will increase, resulting in the increase of pheromone intensity, and the probability of ants choosing the path will increase, thus further increasing the pheromone intensity of the path, and the pheromones on the path passing through less ants will volatilize with the passage of time, thus becoming less and less.
Ant colony algorithm not only uses the principle of positive feedback, which can speed up the evolution process to a certain extent, but also is an essentially parallel algorithm. The continuous information exchange and transmission between individuals is conducive to finding better solutions.

Environmental model based on grid method
The method of using grid to represent the working environment of UAV originated from the University of Carnegie Mellon (CMU). In essence, UAV environment modeling is based on the information around the environment, which can be known or unknown, and then extracted and distinguished by analyzing the relevant environmental features. Finally, the information can be transformed into machine feature language space that can be understood by multiple UAV Systems. Since the selection of environment modeling method is closely related to the path planning algorithm, the reasonable selection of environment modeling method can effectively reduce the amount of search and operation time in the process of path planning. The grid method used in this paper can well meet the above requirements. Through this method, the environment of UAV is described in detail, and the two-dimensional grid is used to replace the actual working environment. In order to facilitate the description of the environment space, the established grid environment is sequentially coded from bottom to top, from left to right.
For UAV, a corresponding matrix should be established according to the environment map to represent the state of each grid. In this work environment matrix, 0 is the free grid and 1 is the obstacle grid. Each obstacle can occupy a grid and store it in the obstacle array, of course, it can also occupy multiple grids, and those less than one grid are also represented by one grid.

The flow of obstacle avoidance control algorithm based on ant colony algorithm
Step1 The grid method is used to establish the environment model and the map matrix corresponding to the environment map. Initialize basic parameters. Set the time t = 0, the number of ants m=50, the number of cycles Nc =0, the maximum number of cycles Nc-max =50, set the tabu table as empty, put m ants at the starting point, and then add the starting point to the tabu table.
Step2 Initialize the amount of information in each direction, input the initial pheromone matrix, select the initial point and the end point, and set various parameters.
Step3 Select the next node that can be reached from the initial point, and calculate the probability of going to each node according to the pheromone of each node. The next initial point is selected by using the wheel algorithm.
Step4 Update path and route length.
Step5 Repeat steps 3 and 4 until the ant reaches the destination or has no way to go.
Step6 Repeat 3-5 until the iteration of a generation of M ants ends.
Step7 Update the pheromone matrix, in which the ants not arriving are not included.
Step8 Repeat 3-7 until the iteration of the nth generation ant is over.

Simulation and Conclusions
The characteristics of ant colony algorithm are distributed and robust. After summarizing the rules of ant search, it is easy to get the basic ideas of UAV formation search: first, move in the direction of the target point, obstacles may be encountered on the road, and then the UAV formation will choose a direction to avoid obstacles; second, in the process of movement, it must follow the established rules, avoid obstacles, and then continue to follow the direction of the target point Motion: according to the above way of thinking, we can usually get a collision free path from the starting point and the target point, and then optimize the collision free path to find the shortest path. During the operation, there will be some obstacles between the starting point and the destination point. Suppose a database records all the free grid sets and obstacle grid sets, and finds the collision free path under the guidance of ant colony algorithm according to the rules in advance, until the destination location is found, the program ends. Matlab 2017 software is used in the simulation. UAV plans and codes in the environment space with grid dimension of 20 * 20. Black indicates obstacles, and white indicates feasible grid. Only free grid can be selected in the process of path optimization. It can be seen from the simulation results that the UAV successfully avoids all obstacles in the process of reaching the target point.