| UAV as a kind of aircraft with autonomous flight ability,has the advantages of strong maneuverability,continuous high-intensity operation,relatively low cost,small size and so on.As a result,they are widely used in military fields such as battlefield reconnaissance and striking ground targets,as well as civilian fields such as agricultural operations,material distribution and terrain mapping.In this paper,the global path planning algorithm and local obstacle avoidance algorithm of the four-rotor UAV are studied.According to the flight characteristics of UAV,two improvement methods are proposed to optimize the performance of the algorithm and broaden the scope of the algorithm.The research content of this paper is as follows:(1)An improved ant colony algorithm based on harmonic search was proposed to solve the problems of excessive complexity and local optimal solution of ant colony algorithm in three-dimensional environment.In order to improve the efficiency and quality of the search algorithm,a series of optimization strategies are adopted.Firstly,by calculating the distance between the start point and the target point,and by initializing the pheromone,the algorithm can avoid falling into a blind state during the initial search,thus improving the search speed.Secondly,in order to reduce the influence of heuristic information on path selection,pseudo random state transition rule is used to determine the next state transition target.The local oscillation process of the harmonic search algorithm is introduced,the local random intervention is carried out on the whole path,and the optimal path is selected to enter the harmonic memory by comparing the iterative path.Then update pheromones and heuristic factors,and output the optimal path in harmonic memory after a certain number of iterations.Finally,experiments show that the proposed algorithm is superior to the existing ant colony algorithm.(2)To solve the target unreachable problem and obstacle avoidance problem of artificial potential field method in local multi-obstacle environment,a local obstacle avoidance algorithm of UAV based on improved artificial potential field method is proposed.Firstly,the calculation rules of gravitational field and influence field are improved to avoid the problem that the UAV cannot reach the target point.Predict the existing obstacles and possible moving positions in the environment and take obstacle avoidance measures.Four possible obstacle avoidance conditions are defined,and according to these conditions,the UAV is given steering force,so that it can timely change direction and avoid collision with obstacles.Secondly,it also uses deceleration force to avoid collision due to inertia.Finally,after the UAV generates obstacle avoidance behavior,the steering force is activated in time to prevent the loss of the gravity of the target point and stagnation.Experimental results show that the proposed algorithm can effectively deal with multiple obstacles in local environment and successfully reach the end point,and the performance is better than the traditional artificial potential field method. |