Unmanned aerial vehicle path planning method based on improved snake optimization algorithm
By improving the snake optimization algorithm and using different strategies in different iterations to enhance the search capability, the problems of slow convergence speed and easy getting trapped in local optima in UAV path planning of the snake optimization algorithm are solved, and efficient and safe path planning is achieved.
Patent Information
- Application Number
- CN202610069700.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-20
- Publication Date
- 2026-02-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The snake optimization algorithm suffers from slow convergence speed and susceptibility to local optima in UAV path planning, making it difficult to find the global optimum efficiently in complex environments.
The improved snake optimization algorithm is divided into a first half-iteration period and a second half-iteration period. In the first half-iteration period, an adaptive random perturbation factor based on a sine function and an development mechanism are introduced to enhance the randomness of position updates. In the second half-iteration period, an adaptive Lévy flight strategy based on a proportional factor and the leader and an adaptive position update strategy based on elite leadership and Brownian motion are introduced to improve global and local search capabilities.
It improves the search efficiency of UAV path planning, finds low-cost, high-safety, and short-arrival-time paths, optimizes path length, flight time, and energy consumption, and improves the execution efficiency of 3D UAV missions.
Smart Images

Figure CN121541663A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of UAV path planning technology, specifically a UAV path planning method and UAV path planning based on an improved snake optimization algorithm. Background Technology
[0002] With the maturity and widespread adoption of drone technology, a core issue has gradually emerged—course planning. Effective course planning not only affects the operational efficiency of drones but also directly impacts flight safety and mission success rates.
[0003] Metaheuristic algorithms, as a class of nondeterministic search strategies, have demonstrated unparalleled potential in solving the complex optimization problem of UAV trajectory planning due to their flexibility and wide applicability. These algorithms can effectively handle multi-objective and multi-constraint optimization challenges, providing innovative solutions for UAV path planning by simulating intelligent behaviors in natural and social phenomena. Currently, the research and application of metaheuristic algorithms are advancing at an unprecedented pace, not only promoting the iterative upgrade of the algorithms themselves but also opening new paths for expanding the boundaries of UAV technology, demonstrating strong adaptability and optimization potential, and providing new perspectives and methods for solving path planning problems in complex environments. The application of metaheuristic algorithms in UAV trajectory planning has greatly improved the efficiency and accuracy of path planning. Researchers have used these algorithms to optimize UAV paths and achieved significant results in solving complex challenges. However, no single algorithm can exhibit optimal performance on all problems. Therefore, in specific applications, designing dedicated metaheuristic algorithms tailored to the characteristics and needs of specific problems becomes particularly important to ensure that the algorithm achieves the best optimization results.
[0004] The snake optimization algorithm, an incremental optimization algorithm proposed by Hashim et al. by simulating the living habits of snakes, suffers from slow convergence and susceptibility to local optima. Metaheuristic algorithms are gradually maturing in the field of UAV trajectory planning. Through continuous algorithm innovation and optimization, they can not only address increasingly complex flight mission requirements but also open up new directions for the future development of UAV technology. However, continuously exploring and developing more efficient and intelligent metaheuristic algorithms to meet constantly changing environmental and mission requirements remains one of the major challenges facing this field. Summary of the Invention
[0005] The purpose of this invention is to provide a UAV path planning method based on an improved snake optimization algorithm to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a UAV path planning method based on an improved snake optimization algorithm, characterized in that the method includes:
[0007] S1: Construct the flight space based on the drone's starting point and ending point, and plan the drone's flight path based on the obstacle set in the flight space and the comprehensive cost function of drone path planning;
[0008] S2: An improved snake optimization algorithm is adopted, where an individual in the population represents a path, food represents the current optimal path, and the position of the individual is iteratively updated and substituted into the comprehensive cost function to output the optimal path; wherein, the optimal path satisfies the condition of minimizing the comprehensive cost function of UAV path planning; the improved snake optimization algorithm includes:
[0009] S21: Determine the initial population, temperature, food, and maximum number of iterations for the snake optimization algorithm. Divide the iteration period into the first half and the second half. The first half is when the current number of iterations is less than the maximum number of iterations / 2, and the second half is when the current number of iterations is greater than or equal to the maximum number of iterations / 2.
[0010] S22: In the first half of the iteration, an adaptive random perturbation factor based on a sine function is introduced to improve the exploration mechanism in the exploration phase and the development mechanism in the development phase. This dynamically enhances the randomness of position updates during the search process and locates the global optimal solution. In the second half of the iteration, an adaptive Levy flight strategy based on a proportional factor and the leader is introduced to improve the development mechanism in the development phase. This grants male snake leaders flight capabilities, enhances global exploration capabilities, and improves search efficiency. An adaptive position update strategy combining elite leadership and Brownian motion is introduced to improve the development mechanism in the development phase. This grants female snake leaders Brownian motion capabilities and enhances local search capabilities.
[0011] S3: Adjust the drone's flight path according to the optimal path.
[0012] Furthermore, the expression for the initial population generation method is:
[0013]
[0014] in, Indicates the first The location of the snake, It is a random number between 0 and 1. and These represent the upper and lower bounds, respectively.
[0015] The initial population is divided equally into male and female populations, calculated as follows:
[0016]
[0017]
[0018] in, Indicates population size, Indicates the number of male snakes. Indicates the number of female snakes;
[0019] The formulas for calculating food and temperature are as follows:
[0020]
[0021]
[0022] in, Indicates temperature. Indicates food, Indicates the current iteration number. Indicates the maximum number of iterations. Represents a constant.
[0023] Furthermore, in the exploration mechanism of the improved exploration phase based on the adaptive random perturbation factor of the sine function, when food is insufficient, i.e. During this process, the snake swarm will randomly select locations in the search space to update their positions in search of food. The exploration phase can be modeled as follows:
[0024]
[0025]
[0026] in, and They represent the first The locations of the male and female snakes, and These represent the positions of a random male and female snake, respectively. It is a constant. Represents a random number between 0 and 1. and These represent the upper and lower bounds, respectively. The novel perturbation factor based on the sine function is calculated using the following formula:
[0027]
[0028] in, Indicates the current iteration number. Indicates the maximum number of iterations;
[0029] and These represent the foraging abilities of male and female snakes, respectively, calculated using the following formula:
[0030]
[0031]
[0032] in, and They represent and fitness value, and They represent the first Fitness values for male and female snakes.
[0033] Furthermore, in the development mechanism of the adaptive random perturbation factor improvement development stage based on the sine function:
[0034] When food and temperature are sufficient, that is At this time, the snake only moves towards the food, as expressed in the following expression:
[0035]
[0036] in, Indicates the location of an individual male or female snake. This indicates the position of the optimal individual. Represents a constant;
[0037] When food is plentiful but the temperature is insufficient, that is... At this time, the snake will enter either battle mode or mating mode;
[0038] The expression for battle mode is:
[0039]
[0040]
[0041] in, and These represent the positions of the best individuals in the female and male snake populations, respectively. and These represent the fighting abilities of the male and female snakes, respectively, calculated using the following formula:
[0042]
[0043]
[0044] in, and These represent the fitness values of the best individuals in the female and male snake populations, respectively. This represents the fitness value of an individual;
[0045] The expression for mating pattern is:
[0046]
[0047]
[0048] in, and These represent the mating abilities of male and female snakes, respectively, and the calculation formula is as follows:
[0049]
[0050]
[0051] in, and They represent the first Fitness values for individual female and male snakes;
[0052] After mating, if the snake eggs successfully hatch, the new individuals replace the worst male and female individuals in the population, as expressed in the following formula:
[0053]
[0054]
[0055] in, and These represent the worst individuals in the male and female populations, respectively.
[0056] Furthermore, in the development mechanism of the adaptive Levy flight strategy improvement development phase based on the scaling factor and leader, when food is plentiful and the temperature is suitable, the expression for the male snake to update its position is:
[0057]
[0058] in, Indicates the location of the male snake. This indicates the position of the optimal individual. The scaling factor is expressed by the following formula:
[0059]
[0060] in, Indicates the current iteration number. Indicates the maximum number of iterations;
[0061] A weighted Levy flight factor is defined and calculated using the following formula:
[0062]
[0063] in, Representing dimensional space, The Lévy flight distribution function is expressed by the following formula:
[0064]
[0065] in, Represents a random number between 0 and 1. and Represented as a constant, The calculation formula is as follows:
[0066]
[0067] in, Represents the gamma function. The value range is [0, 2].
[0068] Furthermore, the development mechanism in the improved development phase based on the adaptive position update strategy using elite leadership and Brownian motion, when food is plentiful and the temperature is suitable, the expression for the female snake updating its position is:
[0069]
[0070] in, Indicates the location of the female snake. A weighted Brownian motion factor is defined and calculated using the following formula:
[0071]
[0072] in, The Brownian motion function is expressed by the following formula:
[0073]
[0074] in, Indicates the current position. It is the average value. Let variance be denoted by . and .
[0075] Furthermore, in the later stages of iteration, the positions of male or female snakes updated in the exploration mechanism of the exploration phase based on the adaptive random perturbation factor of the sine function, the positions of new individuals generated after mating, the positions of male snakes updated in the development mechanism of the development phase based on the adaptive Levy flight strategy of the proportional factor and the leader, and the positions of female snakes updated in the development mechanism of the development phase based on the adaptive position update strategy of the elite leader and Brownian motion are compared, and the male or female snake with the best position is selected as the optimal individual.
[0076] Furthermore, in step S1, the obstacle set is represented as:
[0077]
[0078] in, It is a set of obstacles in flight space; It is the X-axis coordinate of the obstacle. It is the Y-axis coordinate of the obstacle.
[0079] Furthermore, in step S1, the calculation process of the comprehensive cost function for UAV path planning is as follows:
[0080] The path length cost function is calculated using the following formula:
[0081]
[0082] in, Indicating the path planning of drones The coordinates of the point It is the distance in Euclidean distance. This represents the total number of points along the drone's path.
[0083] The flight altitude cost function is calculated using the following formula:
[0084]
[0085] in, Indicates that drones are in The coordinates of the point on the Z-axis It is the average height of all points along the path. Indicates the drone's first One waypoint;
[0086] The smoothness cost function of the path is calculated using the following formula:
[0087]
[0088] in, = ,express The turning angle of the point;
[0089] The comprehensive cost function for UAV path planning is calculated using the following formula:
[0090]
[0091] in, ( The weights of each cost are calculated using the following formula:
[0092]
[0093] The UAV plans its flight path based on the obstacle set in the flight space and the comprehensive cost function of UAV path planning, using the following model:
[0094]
[0095] in, Indicates the flight path, and They represent the ground and obstacles, respectively.
[0096] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention applies an improved snake optimization algorithm to UAV path planning. To overcome the problems of slow convergence speed and easy getting trapped in local optima in the snake optimization algorithm, the improved snake optimization algorithm introduces an adaptive random perturbation factor based on a sine function in the first half of the iteration to improve the exploration mechanism in the exploration phase and the development mechanism in the development phase. This dynamically enhances the randomness of position updates during the search process, reduces the risk of getting trapped in local optima, and locates the global optimum. In the second half of the iteration, an adaptive Levy flight strategy based on a scaling factor and the leader is introduced to improve the development mechanism in the development phase. This gives the male snake leader flight capabilities, enhances global exploration capabilities, and makes it easier for the algorithm to escape local optima and find the global optimum, improving search efficiency. An adaptive position update strategy combining elite leadership and Brownian motion is introduced to improve the development mechanism in the development phase, giving the female snake leader Brownian motion capabilities. This effectively accelerates the convergence speed while ensuring accuracy and enhances local search capabilities. This invention achieves significant improvements in the length of the optimized path, flight time, and energy consumption. It can quickly find low-cost, high-safety paths with short arrival times, improving the efficiency of 3D UAV mission execution. Attached Figure Description
[0097] Figure 1 Flowchart of the snake optimization algorithm;
[0098] Figure 2 This is a flowchart of the improved snake optimization algorithm based on the present invention;
[0099] Figure 3 A graph showing the results of the exploration and development analysis of MISO and CEC2022 (20 dimensions);
[0100] Figure 4 The graph shows the population diversity analysis results of MISO and SO on CEC2022 (20 dimensions);
[0101] Figure 5-1 The convergence rate graphs of MISO and other algorithms during the optimization process on the CEC2022 test set are shown.
[0102] Figure 5-2 The convergence rate graphs of MISO and other algorithms during the optimization process on the CEC2022 test set are shown.
[0103] Figure 6 Friedman ranking plot of MISO and other algorithms on the CEC2022 test set;
[0104] Figure 7 Box plots comparing MISO with other algorithms across four functions in three dimensions on the CEC2022 test set;
[0105] Figure 8 Convergence curves of MISO and other algorithms for 12 functions in CEC2022 (20-dimensional);
[0106] Figure 9 Convergence curves of MISO and other algorithms in UAV path planning;
[0107] Figure 10-1 This provides the optimal path graph for MISO and other algorithms in UAV path planning.
[0108] Figure 10-2 This provides the optimal path graph for MISO and other algorithms in UAV path planning.
[0109] Figure 10-3 This provides the optimal path graph for MISO and other algorithms in UAV path planning.
[0110] Figure 10-4 This provides the optimal path graph for MISO and other algorithms in UAV path planning.
[0111] Figure 10-5 This provides the optimal path graph for MISO and other algorithms in UAV path planning.
[0112] Figure 10-6 This is the optimal path graph for MISO and other algorithms in UAV path planning. Detailed Implementation
[0113] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0114] To facilitate understanding of this invention, the snake optimization algorithm is described below: The unique mating patterns of snakes are influenced by various factors, with mating behavior between male and female snakes typically occurring in late spring and early summer. The mating process depends not only on temperature but also on food availability. When the temperature is suitable and food is plentiful, male snakes attract the attention of female snakes through fighting. After successful mating, the female snake lays eggs in the nest and immediately leaves. Inspired by snake mating behavior, the snake optimization algorithm divides its search process into two phases: an exploration phase and a development phase. In the exploration phase, the snake group seeks comfortable areas with abundant food and a suitable environment; in the development phase, there are multiple transitional periods—if food is plentiful but the temperature is high, the snake group focuses only on acquiring existing food; if food is plentiful and the temperature is suitable, the mating process is triggered. This mating process includes two modes: a fighting mode and a mating mode. Ultimately, the female snake may lay eggs and hatch new snakes. For ease of comparison and recording, this is denoted as the SO algorithm. The mathematical model of the SO algorithm is described below:
[0115] 1. Initialize the population size, dimension, maximum number of iterations, and initial population. The expression for generating the initial population is:
[0116]
[0117] in, Indicates the first The location of the snake, It is a random number between 0 and 1. and These represent the upper and lower bounds, respectively.
[0118] The initial population is divided equally into male and female populations, calculated as follows:
[0119]
[0120]
[0121] in, Indicates population size, Indicates the number of male snakes. Indicates the number of female snakes;
[0122] The formulas for calculating food and temperature are as follows:
[0123]
[0124]
[0125] in, Indicates temperature. Indicates food, Indicates the current iteration number. Indicates the maximum number of iterations. In this embodiment, the constant is represented. .
[0126] 2. Exploration Phase
[0127] When food is insufficient, During this process, the snake swarm randomly selects locations in the search space to update their positions in search of food. Modeling this exploration phase, the expressions for updating the positions of male and female snakes are as follows:
[0128]
[0129] (6)
[0130] in, and They represent the first The locations of the male and female snakes, and These represent the positions of a random male and female snake, respectively. As a constant, in this embodiment, , Represents a random number between 0 and 1. and These represent the upper and lower bounds, respectively. and These represent the foraging abilities of male and female snakes, respectively, calculated using the following formula:
[0131]
[0132] (7)
[0133] in, and They represent and fitness value, and They represent the first Fitness values for male and female snakes.
[0134] Otherwise, find a suitable environment;
[0135] 3. Development Phase
[0136] When food is plentiful and the temperature is adequate, that is... At this time, the snake only moves towards the food, as expressed in the following expression:
[0137]
[0138] in, Indicates the location of an individual male or female snake. This indicates the position of the optimal individual. In this embodiment, the constant is represented. ;
[0139] If the temperature is insufficient, i.e. At this time, the snake will enter either battle mode or mating mode;
[0140] The expression for battle mode is:
[0141]
[0142] (9)
[0143] in, and These represent the positions of the best individuals in the female and male snake populations, respectively. and These represent the fighting abilities of the male and female snakes, respectively, calculated using the following formula:
[0144]
[0145] (10)
[0146] in, and These represent the fitness values of the best individuals in the female and male snake populations, respectively. This represents the fitness value of an individual;
[0147] The expression for mating pattern is:
[0148]
[0149] (11)
[0150] in, and These represent the mating abilities of male and female snakes, respectively, and the calculation formula is as follows:
[0151]
[0152] (12)
[0153] in, and They represent the first Fitness values for individual female and male snakes;
[0154] After mating, if the snake eggs successfully hatch, the new individuals replace the worst male and female individuals in the population, as expressed in the following formula:
[0155]
[0156] (13)
[0157] in, and These represent the worst individuals in the male and female populations, respectively.
[0158] when Enter battle mode if you want to enter battle mode, otherwise enter mating mode.
[0159] In summary, the SO algorithm process is as follows: Figure 1 As shown.
[0160] However, the SO algorithm suffers from slow convergence speed and susceptibility to local optima. To address these issues, this embodiment provides an improved snake optimization algorithm, denoted as the MISO algorithm, which includes the following computational steps:
[0161] S21: Determine the initial population, temperature, food, and maximum number of iterations for the snake optimization algorithm;
[0162] S22: In the first half of the iteration, an adaptive random perturbation factor based on a sine function is introduced to improve the exploration mechanism in the exploration phase and the development mechanism in the development phase. This dynamically enhances the randomness of position updates during the search process and locates the global optimal solution. In the second half of the iteration, an adaptive Levy flight strategy based on a proportional factor and the leader is introduced to improve the development mechanism in the development phase. This grants the male snake leader flight ability, enhances global exploration capabilities, and improves search efficiency. An adaptive position update strategy combining elite leadership and Brownian motion is introduced to improve the development mechanism in the development phase. This grants the female snake leader Brownian motion capabilities and enhances local search capabilities.
[0163] Specifically, the initial population is generated according to formula (1), and the initial population is divided into male and female populations according to formulas (2) and (3). Food and temperature are calculated according to formulas (4) and (5). The iteration period is divided into the first half of the iteration period and the second half of the iteration period. This is the first half of the iteration period. This is the second half of the iteration period;
[0164] In the first half of the iteration period, to address the problem that SO is prone to getting trapped in local minima during the iteration process, a new perturbation factor based on the sine function is introduced. The sine function exhibits oscillatory characteristics on the coordinate axis, which can help the optimizer escape local optima more effectively throughout the search process. Its calculation formula is shown in formula (14):
[0165]
[0166] in, Indicates the current iteration number. Indicates the maximum number of iterations;
[0167] By utilizing Due to the fluctuating characteristics of the snake, the optimizer can effectively locate the global optimum during the search process. An adaptive random perturbation factor based on a sine function is introduced to improve the exploration mechanism in the exploration phase and the development mechanism in the development phase, updating the snake's position:
[0168] When food is insufficient, During the exploration phase, the snake swarm will randomly select locations in the search space to update their positions in search of food. The update expression is:
[0169]
[0170] (15)
[0171] in, and They represent the first The locations of the male and female snakes, and These represent the positions of a random male and female snake, respectively. The constant is used in this embodiment. , Represents a random number between 0 and 1. and These represent the upper and lower bounds of the search space, respectively. The novel perturbation factor based on the sine function is calculated using formula (14). and These represent the ability of male and female snakes to find food, respectively, and are calculated using formula (7);
[0172] When food is plentiful, that is At that time, it was in the development stage.
[0173] Among these, when food and temperature are sufficient, that is... At this time, the snake only moves towards the food, and the updated expression is:
[0174]
[0175] in, Indicates the location of an individual male or female snake. This indicates the position of the optimal individual. Represents a constant. ;
[0176] When food is plentiful but the temperature is insufficient, that is... At this time, the snake will enter either battle mode or mating mode;
[0177] The expression for battle mode is:
[0178]
[0179] (17)
[0180] in, and These represent the positions of the best individuals in the female and male snake populations, respectively. and The combat abilities of the male and female snakes are respectively represented by formula (10);
[0181] The expression for mating pattern is:
[0182]
[0183] (18)
[0184] in, and These represent the mating abilities of male and female snakes, respectively, and are calculated using formula (12);
[0185] After mating, if the snake eggs successfully hatch, the new individuals replace the worst male and female individuals in the population, as expressed in the following formula:
[0186]
[0187] (13)
[0188] in, and These represent the worst individuals in the male and female populations, respectively.
[0189] In the latter half of the iteration, due to insufficient snake diversity during the random search process, the search engine (SO) is prone to getting trapped in local optima in the later stages of iteration, leading to premature convergence. To address this issue, an adaptive Lévy flight strategy based on a scaling factor and a leader is proposed to enhance the optimizer's global search capability, reduce the risk of SO getting trapped in local optima, and improve the algorithm's convergence accuracy. Lévy flight is a random movement strategy characterized by a mixture of continuous small-step movements and occasional long-distance jumps within short time intervals. This strategy can be analogized to giving snakes the ability to fly, thereby enhancing their exploration of the search space. Long-distance jumps help the algorithm to conduct global exploration within the search space, while small-step movements are beneficial for improving optimization accuracy.
[0190] Considering the characteristics of Levi's flight, an adaptive Levi's flight strategy based on a scaling factor and the leader is introduced during the development phase of SO to improve the development mechanism. This grants the male snake leader flight ability to enhance search efficiency. When food is plentiful and the temperature is suitable, the expression for the male snake updating its position is:
[0191]
[0192] in, Indicates the location of the male snake. This indicates the position of the optimal individual. The scaling factor is expressed by the following formula:
[0193]
[0194] in, Indicates the current iteration number. Indicates the maximum number of iterations;
[0195] A weighted Levy flight factor is defined and calculated using the following formula:
[0196]
[0197] in, Representing dimensional space, The Lévy flight distribution function is expressed by the following formula:
[0198]
[0199] in, Represents a random number between 0 and 1. and Represented as a constant, The calculation formula is as follows:
[0200]
[0201] in, Represents the gamma function. The value range of is [0,2]. In this embodiment, .
[0202] To mitigate the risk of search engines (SOs) getting trapped in local optima, a novel position update strategy combining elite leadership and Brownian motion is proposed to enhance the optimizer's local search capabilities. Brownian motion is a continuous stochastic motion model characterized by particles continuously undergoing irregular motion in a random manner over a short period. The stochasticity of this strategy allows the search agent to diffuse irregularly in local regions, thereby enhancing the exploration of the local search space. Brownian motion, in turn, can explore a wider search space and reduce the risk of getting trapped in local optima.
[0203] Based on the characteristics of Brownian motion, a novel update method is proposed. During the development phase of the snake leader (SO), an adaptive position update strategy combining elite leadership and Brownian motion is introduced to improve the development mechanism. This endows the female snake leader with Brownian motion capabilities. When food is plentiful and the temperature is suitable, the expression for the female snake's position update is:
[0204]
[0205] in, Indicates the location of the female snake. A weighted Brownian motion factor is defined and calculated using the following formula:
[0206]
[0207] in, The Brownian motion function is expressed by the following formula:
[0208]
[0209] in, Indicates the current position. It is the average value. Let variance be denoted by . and .
[0210] Compare the positions of male or female snakes updated in the exploration mechanism of the exploration phase based on the adaptive random perturbation factor of the sine function, the positions of new individuals generated after mating, the positions of male snakes updated in the development mechanism of the development phase based on the adaptive Levy flight strategy of the proportional factor and the leader, and the positions of female snakes updated in the development mechanism of the development phase based on the adaptive position update strategy of the elite leader and Brownian motion. Select the male or female snake with the best position as the optimal individual until the termination condition is met, and output the optimal individual found.
[0211] In summary, the flowchart of the MISO algorithm is as follows: Figure 2 As shown, the following simulation experiments analyze the MISO algorithm. To verify the effectiveness of MISO, experiments are conducted to evaluate its exploration and development capabilities, population diversity, and the impact of improvement strategies, and it is compared with 11 other advanced algorithms. Subsequently, two nonparametric tests, the nonparametric rank-sum test and the nonparametric Friedman mean rank test, are used to analyze the significant differences between different algorithms and their overall performance. All experiments were completed on a laptop equipped with an Intel Core i7-12700F 2.10 GHz CPU and 16 GB RAM, based on the MATLAB 2022b platform.
[0212] Experiment 1: Benchmark Function
[0213] Benchmark functions are crucial for evaluating the feasibility of algorithms. These functions provide a platform for evaluating and testing various optimization methods. To verify MISO's ability to solve complex problems, its performance was analyzed using the CEC2022 test set with a dimension (Dim) of 20. Specific function details are shown in Table 1.
[0214] Table 1 CEC2022 Test Functions
[0215]
[0216] Experiment Example 2: Comparison of Algorithm Parameter Settings
[0217] MISO was compared with 11 other well-known optimizers, including the Grey Wolf Optimization Algorithm (GWO), Sine-Cosine Algorithm (SCA), Whale Optimization Algorithm (WOA), Harris Eagle Optimization Algorithm (HHO), Moth to a Flame Optimization Algorithm (MFO), African Vulture Optimization Algorithm (AVOA), Crow Search Algorithm (CSA), Hybrid Particle Swarm Optimization Gravity Search Algorithm (CPSOGSA), Eagle Optimization Algorithm (AO), Dung Beetle Optimization Algorithm (DBO), and SO. The parameter settings for these algorithms are shown in Table 2. The maximum number of iterations and the population size were set to 500 and 30, respectively, and each algorithm was run independently 30 times. The standard deviation (Std) and mean (Ave) were recorded, with the best result highlighted in bold. The mean reflects the speed at which an algorithm finds the optimal solution within a specific number of iterations; a smaller value indicates faster convergence and the ability to find a result closer to the optimal solution in fewer iterations. Standard deviation measures the stability of algorithm performance, that is, the consistency of results in multiple independent runs. The smaller the standard deviation, the better the robustness of the algorithm and the lower its sensitivity to different initial conditions and random disturbances.
[0218] Table 2 Comparison of Algorithm Parameter Settings
[0219]
[0220] Experiment Example 3: Qualitative Analysis
[0221] Three experiments were designed to conduct a qualitative analysis of MISO: population diversity analysis and exploration and development capability test.
[0222] 3.1 Exploration and Development Analysis
[0223] Swarm intelligence algorithms are characterized by dividing the search process into two phases: exploration and development. Exploration aims to search for new solutions in the unknown space to find better solutions in undiscovered regions; development, on the other hand, explores local regions to discover better fitness values within the known solution space. Achieving a balance between exploration and development can improve optimizer efficiency and prevent premature convergence. To this end, the proportions of exploration and development are calculated using formulas (27) and (28), respectively. The dimension representing diversity is calculated as shown in (29). Indicates the first The individual in the first The position of the dimension This represents the maximum diversity value during the entire iteration process. Indicates the first The central position of all individuals in the entire population across all dimensions.
[0224]
[0225]
[0226]
[0227] Figure 3 The experimental results of MISO on the CEC2022 (20-dimensional) test set are presented. The horizontal axis represents the number of iterations, and the vertical axis represents the ratio of exploration to exploitation during the iteration process. The intersection of the exploration and exploitation ratios in MISO mainly occurs in the middle of the iteration: the algorithm exhibits a higher exploration ratio in the early stages of iteration, indicating its excellent exploration ability; while in the later stages of iteration, it maintains a higher exploitation ratio, which helps to improve the convergence speed and accuracy of problem solving. The exploration and exploitation of the MISO algorithm basically maintain a dynamic balance during the iteration process, thus it has outstanding advantages in avoiding local optima and premature convergence.
[0228] 3.2 Population Diversity Analysis
[0229] Population diversity plays a crucial role in swarm intelligence algorithms. High population diversity enables broader exploration in the search space and prevents premature convergence to local optima. To compare the population size differences between SO and MISO, a population diversity experiment was performed on the CEC2022 (20-dimensional) test set. Population diversity is influenced by rotational inertia. The calculation is as described in formula (30), where Indicates the population relative to its centroid. The degree of dispersion in each update, centroid Defined by formula (31). Wherein Indicates the first During the nth iteration The agent in the first The value of the dimension.
[0230]
[0231]
[0232] Experimental results are as follows Figure 4 As shown, MISO clearly exhibits higher population diversity than SO throughout the entire iteration process. This indicates that the improved optimizer can explore the search space more extensively, effectively avoiding premature convergence and local stagnation. Therefore, MISO has a stronger potential to obtain the global optimum.
[0233] Experiment Example 4: Quantitative Analysis: Evaluating the Effectiveness of MISO Using the CEC2022 Test Set
[0234] Using the latest CEC2022 test set, MISO was evaluated against various competing algorithms under 20-dimensional conditions. The experimental results are recorded in Table 3. Statistical results show that MISO achieved 9 best results in 12 test functions without any failure cases, revealing MISO's good robustness. Figure 5-1 and Figure 5-2 The convergence rates of different competing algorithms during the optimization process are shown, demonstrating that MISO has strong convergence performance. Figure 6 The Friedman rankings of MISO and other optimizers on the test set are presented using stacked histograms; MISO consistently achieved the most first-place rankings. To compare algorithm stability, Figure 7 The results of the 12 algorithms on the CEC2022 test set are presented in box plot form, showing that MISO has the most stable performance. In conclusion, MISO exhibits the best overall performance among all test functions and competing algorithms.
[0235] Table 3 Performance test results of functions in 20 dimensions using the CEC2022 test set.
[0236]
[0237] Experiment Example 5: Statistical Analysis
[0238] Nonparametric rank-sum test and nonparametric Friedman mean rank test were used to statistically analyze the experimental results of MISO and other algorithms to identify whether there are significant differences.
[0239] 5.1 Nonparametric rank sum test (Wilcoxon rank sum test)
[0240] Nonparametric rank-sum tests were used to compare MISO with other algorithms, and the results are shown in Tables 4 and 5. When the p-value is less than 0.05, there is a significant difference between the competing algorithms and MISO; otherwise, there is no significant difference, and results with no difference are marked in bold. The symbols "+ / - / =" indicate that MISO is superior to, inferior to, or equivalent to the competing algorithms, respectively. As can be seen from the experimental results in Table 6, the gap between the MISO algorithm and other algorithms gradually widens as the problem dimension increases. In summary, the analysis above shows that MISO has significant differences from other competing algorithms, and its overall performance is the most outstanding.
[0241] Table 4 Comparison of MISO with other algorithms using nonparametric rank-sum tests
[0242]
[0243] Table 5 Comparison of MISO with other algorithms using nonparametric rank-sum tests
[0244]
[0245] Table 6 Comparison of MISO with other algorithms using nonparametric rank-sum tests
[0246]
[0247] 5.2 Nonparametric Friedman mean rank test
[0248] The experimental results of MISO and other algorithms on the CEC2022 test set were ranked using the nonparametric Friedman mean rank test, and the results are shown in Table 7. Clearly, MISO consistently ranked first, indicating that the proposed optimizer outperformed other competing algorithms on the considered test set.
[0249] Table 7 ranks the experimental results of MISO and other algorithms on the CEC2022 test set.
[0250]
[0251] Experiment Example 6: Analysis of the Impact of the Strategy
[0252] To verify the effectiveness of the three proposed improvement strategies in SO, the usability of the strategies was evaluated using the CEC2022 (20-dimensional) test set. The test methods included SO, MISO, DSO, LSO, and BSO. Experimental results are as follows: Figure 8 As shown, the unimodal function curves clearly demonstrate that these methods effectively improve the original SO and are practical; however, for multimodal functions, the effect of a single enhancement strategy is limited, and only the MISO algorithm, which combines the three improvement techniques, outperforms SO in avoiding local optima and premature convergence. In conclusion, the combined use of the three strategies has proven to be an effective SO improvement scheme.
[0253] Experiment Example 7: Time Complexity Analysis of MISO and SO
[0254] To obtain a high-performance metaheuristic algorithm, its time complexity should be minimized to reduce computational overhead. The experimental results above show that the proposed MISO algorithm outperforms SO. However, despite MISO's superior performance, its time complexity is expected not to exceed that of SO. Therefore, this section tests the time complexity of MISO and SO. In Table 8, with the population size set to 30 and the maximum number of iterations set to 500, SO and MISO were run independently 30 times, and the time required was recorded. The table shows that, under the same settings, MISO's computation time is lower than SO's. In conclusion, the proposed MISO algorithm not only improves the performance of the SO algorithm but also reduces its time complexity.
[0255] Table 8. Time record of 30 independent runs of SO and MISO
[0256]
[0257] This embodiment also provides a UAV path planning method based on an improved snake optimization algorithm, the method comprising the following steps:
[0258] S1: Construct the flight space based on the drone's starting point and ending point, and plan the drone's flight path based on the obstacle set in the flight space and the comprehensive cost function of drone path planning;
[0259] S2: An improved snake optimization algorithm is adopted, where an individual in the population represents a path, food represents the current optimal path, and the position of the individual is iteratively updated and substituted into the comprehensive cost function to output the optimal path; wherein, the optimal path satisfies the minimum comprehensive cost function of UAV path planning;
[0260] S3: Adjust the drone's flight path according to the optimal path.
[0261] Specifically, let the starting point of the drone be ( ), the destination is ( A smooth curve is generated through cubic spline interpolation, and its discrete point sequence is ( ), ( ), ( ), ( This curve can be represented as a discrete point sequence. Composed of, in which point It is any point in the trajectory, and its coordinates are ( ),
[0262] Based on the starting and ending points, the flight space is planned, and an obstacle set in the flight space is established in combination with the on-site terrain. The obstacle set is then modeled according to the following formula:
[0263]
[0264] in, It is the ground set of obstacles in flight space; y is the X-axis coordinate of the obstacle, and y is the Y-axis coordinate of the obstacle;
[0265] Calculate the comprehensive cost function for UAV path planning, where,
[0266] Under normal circumstances, drone flights should save time and reduce costs as much as possible while ensuring safety. Therefore, path length is crucial in path planning. The path length cost function is calculated using the following formula:
[0267]
[0268] in, Indicating the path planning of drones The coordinates of the point It is the distance in Euclidean distance. This represents the total number of points along the drone's path.
[0269] Furthermore, the flight altitude of a drone has a significant impact on the control system and safety, therefore this factor needs to be fully considered. The flight altitude cost function is calculated using the following formula:
[0270]
[0271] in, Indicates that drones are in The coordinates of the point on the Z-axis It is the average height of all points along the path. Indicates the drone's first One waypoint;
[0272] Finally, the impact of the drone's turning must also be considered. The smoothness cost function of the path is calculated using the following formula:
[0273]
[0274] in, = ,express The turning angle of the point;
[0275] The comprehensive cost function for UAV path planning is calculated using the following formula:
[0276]
[0277] in, ( The weights of each cost (e.g., 1, 2, 3) are calculated using the following formula:
[0278]
[0279] The UAV plans its flight path based on the ground set of obstacles in the flight space and the comprehensive cost function of UAV path planning, using the following model:
[0280]
[0281] in, Indicates the flight path, and They represent the ground and obstacles, respectively.
[0282] The positions of rime particles will be obtained through a UAV path planning method based on an improved snake optimization algorithm. The coordinate values are substituted into the comprehensive cost function of the UAV flight to calculate and output the optimal path; the flight path of the UAV is adjusted according to the optimal path.
[0283] Experiment Example 8: Unmanned Aerial Vehicle (UAV) Path Planning Experiment
[0284] The drone's starting point is set to ( The endpoint is set to (). By combining cubic spline interpolation with multiple optimization methods, a feasible and smooth path was successfully obtained. The experimental parameters remained consistent with those described above, and the results were obtained based on 30 independent runs of each of the 12 optimizers, as shown in Table 9. Compared with other optimization techniques, MISO exhibited superior performance, while SCA performed the worst. The convergence curves are shown below. Figure 9 As shown, the faster convergence speed of MISO is clearly demonstrated. Meanwhile, Figures 10-1 to 10-6The path planning results of 12 algorithms are presented. Experimental results show that the curve generated by the MISO algorithm is smoother, which further verifies the algorithm's potential to solve practical problems.
[0285] Table 9. Record of UAV trajectory planning experiment
[0286]
[0287] This invention applies an improved snake optimization algorithm to UAV path planning. To overcome the slow convergence speed and susceptibility to local optima in the snake optimization algorithm, the improved algorithm introduces an adaptive random perturbation factor based on a sine function in the first half of the iteration to improve the exploration and development mechanisms. This dynamically enhances the randomness of position updates during the search process, reducing the risk of getting trapped in local optima and locating the global optimum. In the second half of the iteration, an adaptive Levy flight strategy based on a scaling factor and the leader is introduced to improve the development mechanism in the development phase. This grants the male snake leader flight capabilities, enhancing global exploration capabilities and making it easier for the algorithm to escape local optima and find the global optimum, thus improving search efficiency. Furthermore, an adaptive position update strategy combining elite leadership and Brownian motion is introduced to improve the development mechanism in the development phase, granting the female snake leader Brownian motion capabilities. This effectively accelerates convergence speed while maintaining accuracy and enhancing local search capabilities. This invention achieves significant improvements in path length, flight time, and energy consumption, enabling the rapid discovery of low-cost, high-safety paths with shorter arrival times, thereby improving the efficiency of 3D UAV mission execution.
[0288] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for UAV path planning based on an improved snake optimization algorithm, characterized in that, The method includes: S1: Construct the flight space based on the drone's starting point and ending point, and plan the drone's flight path based on the obstacle set in the flight space and the comprehensive cost function of drone path planning; S2: An improved snake optimization algorithm is adopted, where an individual in the population represents a path, food represents the current optimal path, and the position of the individual is iteratively updated and substituted into the comprehensive cost function to output the optimal path; wherein, the optimal path satisfies the condition of minimizing the comprehensive cost function of UAV path planning; the improved snake optimization algorithm includes: S21: Determine the initial population, temperature, food, and maximum number of iterations for the snake optimization algorithm. Divide the iteration period into the first half and the second half. The first half is when the current number of iterations is less than the maximum number of iterations / 2, and the second half is when the current number of iterations is greater than or equal to the maximum number of iterations / 2. S22: In the first half of the iteration, an adaptive random perturbation factor based on a sine function is introduced to improve the exploration mechanism in the exploration phase and the development mechanism in the development phase. This dynamically enhances the randomness of position updates during the search process and locates the global optimal solution. In the second half of the iteration, an adaptive Levy flight strategy based on a proportional factor and the leader is introduced to improve the development mechanism in the development phase. This grants male snake leaders flight capabilities, enhances global exploration capabilities, and improves search efficiency. An adaptive position update strategy combining elite leadership and Brownian motion is introduced to improve the development mechanism in the development phase. This grants female snake leaders Brownian motion capabilities and enhances local search capabilities. S3: Adjust the drone's flight path according to the optimal path.
2. The UAV path planning method based on the improved snake optimization algorithm according to claim 1, characterized in that: The expression for the initial population generation method is: ; in, Indicates the first The location of the snake, It is a random number between 0 and 1. and These represent the upper and lower bounds, respectively. The initial population is divided equally into male and female populations, calculated as follows: ; ; in, Indicates population size, Indicates the number of male snakes. Indicates the number of female snakes; The formulas for calculating food and temperature are as follows: ; ; in, Indicates temperature. Indicates food, Indicates the current iteration number. Indicates the maximum number of iterations. Represents a constant.
3. The UAV path planning method based on the improved snake optimization algorithm according to claim 1, characterized in that: In the exploration mechanism of the improved exploration phase based on the adaptive random perturbation factor of the sine function, when food is insufficient, i.e. During this process, the snake swarm will randomly select locations in the search space to update their positions in search of food. The exploration phase can be modeled as follows: ; ; in, and They represent the first The locations of the male and female snakes, and These represent the positions of a random male and female snake, respectively. It is a constant. Represents a random number between 0 and 1. and These represent the upper and lower bounds, respectively. A novel perturbation factor based on a sine function is defined and calculated using the following formula: ; in, Indicates the current iteration number. Indicates the maximum number of iterations; and These represent the foraging abilities of male and female snakes, respectively, calculated using the following formula: ; ; in, and They represent and fitness value, and They represent the first Fitness values for male and female snakes.
4. The UAV path planning method based on the improved snake optimization algorithm according to claim 3, characterized in that, In the development mechanism of the adaptive random perturbation factor improvement development stage based on the sine function: When food and temperature are sufficient, that is At this time, the snake only moves towards the food, as expressed in the following expression: ; in, Indicates the location of an individual male or female snake. This indicates the position of the optimal individual. Represents a constant; When food is plentiful but the temperature is insufficient, that is... At this time, the snake will enter either battle mode or mating mode; The expression for battle mode is: ; ; in, and These represent the positions of the best individuals in the female and male snake populations, respectively. and These represent the fighting abilities of the male and female snakes, respectively, calculated using the following formula: ; ; in, and These represent the fitness values of the best individuals in the female and male snake populations, respectively. This represents the fitness value of an individual; The expression for mating pattern is: ; ; in, and These represent the mating abilities of male and female snakes, respectively, and the calculation formula is as follows: ; ; in, and They represent the first Fitness values for individual female and male snakes; After mating, if the snake eggs successfully hatch, the new individuals replace the worst male and female individuals in the population, as expressed in the following formula: ; ; in, and These represent the worst individuals in the male and female populations, respectively.
5. The UAV path planning method based on the improved snake optimization algorithm according to claim 1, characterized in that: In the development mechanism of the adaptive Levy flight strategy improvement development phase based on the scaling factor and leader, when food is plentiful and the temperature is suitable, the expression for the male snake to update its position is: ; in, Indicates the location of the male snake. This indicates the position of the optimal individual. A nonlinear convergence factor is defined and calculated as follows: ; in, Indicates the current iteration number. Indicates the maximum number of iterations; A weighted Levy flight factor is defined and calculated using the following formula: ; in, Representing dimensional space, The Lévy flight distribution function is expressed by the following formula: ; in, Represents a random number between 0 and 1. and Represented as a constant, The calculation formula is as follows: ; in, Represents the gamma function. The value range is [0, 2].
6. The UAV path planning method based on the improved snake optimization algorithm according to claim 5, characterized in that: The improved development mechanism in the development phase, which combines elite leadership with Brownian motion adaptive position update strategy, uses the following expression to describe the female snake's position update when food is plentiful and temperature is suitable: ; in, Indicates the location of the female snake. A weighted Brownian motion factor is defined and calculated using the following formula: ; in, The Brownian motion function is expressed by the following formula: ; in, Indicates the current position. It is the average value. Let variance be denoted by . and .
7. The UAV path planning method based on the improved snake optimization algorithm according to claim 6, characterized in that: In the later stages of iteration, the positions of male or female snakes updated in the exploration mechanism of the exploration phase based on the adaptive random perturbation factor of the sine function, the positions of new individuals generated after mating, the positions of male snakes updated in the development mechanism of the development phase based on the adaptive Levy flight strategy of the proportional factor and the leader, and the positions of female snakes updated in the development mechanism of the development phase based on the adaptive position update strategy of the elite leader and Brownian motion are compared, and the male or female snake with the best position is selected as the optimal individual.
8. The UAV path planning method based on the improved snake optimization algorithm according to claim 1, characterized in that, In step S1, the obstacle set is represented as: ; in, It is a set of obstacles in flight space; It is the X-axis coordinate of the obstacle. It is the Y-axis coordinate of the obstacle.
9. The UAV path planning method based on the improved snake optimization algorithm according to claim 8, characterized in that, In step S1, the calculation process of the comprehensive cost function for UAV path planning is as follows: The path length cost function is calculated using the following formula: ; in, Indicating the path planning of drones The coordinates of the point It is the distance in Euclidean distance. This represents the total number of points along the drone's path. The flight altitude cost function is calculated using the following formula: ; in, Indicates that drones are in The coordinates of the point on the Z-axis It is the average height of all points along the path. Indicates the drone's first One waypoint; The smoothness cost function of the path is calculated using the following formula: ; in, = ,express The turning angle of the point; The comprehensive cost function for UAV path planning is calculated using the following formula: ; in, ( The weights of each cost are calculated using the following formula: ; The UAV plans its flight path based on the obstacle set in the flight space and the comprehensive cost function of UAV path planning, using the following model: ; in, Indicates the flight path, and They represent the ground and obstacles, respectively.
Citation Information
Cited By
Unmanned aerial vehicle three-dimensional flight path planning method based on improved snake optimization algorithm
CN121898437A