UAV 3D route planning is currently an important exploration and research element in the field of autonomous controlled flight.Unlike the planning problem in twodimensional space,3D route planning is more complex and has more constraints.Therefore,the difficulty of route planning is to search for an actual flyable route that satisfies the constraints with minimum cost.In this paper,the UAV route planning is studied and simulated in the context of power inspection.A two-step optimization strategy of global route planning and local online replanning is used,and the main contents of the paper are as follows:According to the requirements of UAV power inspection,the planning task is determined as the inspection of power equipment in the hard-to-reach areas of personnel in complex environments.Simplify the motion mathematical model,analyze and determine the two major constraints for UAV route planning: external environment constraints,and UAV physical performance constraints.The 3D digital elevation model is used to mathematically model the planning area and abstract the actual environment.An improved particle swarm algorithm is used for global route planning of UAVs in the planning space.The characteristics of the traditional particle swarm algorithm are analyzed,and the particle swarm dispersal operation is added to address its defects of easily falling into local optimum and premature maturity.The fitness function of the route planning is obtained by combining the constraints,and the spatial hierarchical idea is used to solve the problem.Simulation and comparison experiments show that the improved algorithm can significantly improve the problem that the traditional particle swarm algorithm is prone to fall into local optimum and cannot reach the global optimum solution,and can significantly improve the stability and efficiency of the algorithm,and the route is more in line with the planning requirements.Finally,a uniform B-sample curve is used to smooth the planned route,and the sharp corners of the route are eliminated to make the route more flyable.The improved RRT method is used for local track replanning.The problems of the traditional RRT method are analyzed,and the improvement strategy of improving the node selection expansion method,adjusting the node search probability,and dynamically selecting the step value improves the algorithm search efficiency and realtime performance.After the completion of obstacle avoidance,it can continue to return to the original route to fly normally and finally reach the end point,and finally the total route is smoothed.The MATLAB simulation shows that the improved RRT method solves the problems of slow search speed,poor adaptability and poor dynamic obstacle avoidance performance of the traditional RRT algorithm,and combines the global route information to smoothly return to the global route after obstacle avoidance. |