Abstract:
To solve the trajectory planning problem of unmanned aerial vehicles in three-dimensional (3D) environments, a dynamic adjustment strategy based on Levy flight is proposed to improve the spherical vector-based particle swarm optimization (SPSO) algorithm, thus forming the SPSO algorithm based on Levy flight dynamic adjustment strategy (LDS-PSO). This algorithm balances the global and local search capabilities, and alleviates the problems of slow convergence speed and being trapped in local optima. First, the trajectory planning problem is transformed into a multi-constraint objective optimization problem, and a fitness objective function is constructed based on trajectory length, obstacle threat, smoothness, and height changes. Second, the PSO algorithm is analyzed based on spherical vectors. In the initial stage of the search, the algorithm needs to expand the search range to ensure population diversity. In the later stage, it needs to achieve rapid convergence and improve accuracy for inter-group collaboration. Therefore, a strategy for dynamically adjusting learning cognitive factors based on power exponent inertia weight factors and quadratic functions is proposed. Compared with the fixed learning cognitive factors of traditional PSO and SPSO algorithms, this strategy not only balances global and local search capabilities, but also improves the convergence speed. Third, when the difference between the fitness values of particles in adjacent iterations is smaller than a preset small constant, the particles are considered to be trapped in a local optimum. The Levy flight disturbance factor is introduced to prompt particles to quickly escape from local optima. Finally, the effectiveness and convergence speed of the algorithm in a 3D environment are evaluated through simulation testing. Based on the flight environment of drones, four 3D elevation environment models with different obstacle densities were established, and simulation experiments of 3D trajectory planning using the proposed algorithm were carried out in each environment. The simulation results validate the performance of the improved algorithm. The trajectory generated by this algorithm has a lower cost and higher quality while ensuring obstacle avoidance safety, and it exhibits better optimization accuracy and faster convergence speed. In scenarios with sparse obstacles, the performance of this algorithm is consistent with that of the SPSO algorithm. In scenarios with dense obstacles, there are differences in the fitness and convergence speed between this algorithm and the SPSO algorithm. The LDS-PSO algorithm has a lower fitness value, faster convergence speed, and smoother path compared with the SPSO algorithm. In dense obstacle scenarios, various algorithms were run repeatedly 20 times to reduce random errors. Compared with the traditional PSO, linearly decreasing inertia weight IPSO (Improved particle swarm optimization algorithm), and SPSO algorithms, the LDS-PSO algorithm has the best stability and the lowest trajectory cost. In the 20 tests, the average best fitness value of the LDS-PSO algorithm decreased by 22.92%, 0.51%, and 0.34% compared with the above three algorithms respectively; the average fitness value decreased by 31.18%, 6.33%, and 4.54% respectively; and the average worst fitness value decreased by 36.45%, 16.73%, and 14.77% respectively. The research results indicate that the LDS-PSO algorithm has faster convergence speed, better stability, and higher reliability in 3D trajectory planning.