Unmanned aerial vehicle path planning method based on global-local equilibrium whale optimization algorithm
By introducing bubble network attack enhancement strategies, failure parameter verification mutation mechanism and stochastic gradient-assisted optimization method into the whale optimization algorithm, global-local equilibrium optimization of the drone path planning algorithm in complex environments, solving the problem of insufficient performance of existing algorithms under multi-constraint conditions, and improving the accuracy and efficiency of path planning.
Patent Information
- Application Number
- CN202411659621.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-20
AI Technical Summary
Existing UAV path planning algorithms are difficult to meet the optimal value search accuracy and coordination between global and local development capabilities in complex environments, resulting in poor path planning under multi-constraint conditions.
A global-local equalization whale optimization algorithm is proposed. By designing bubble network attack enhancement strategies, introducing failure parameter testing mutation mechanisms and stochastic gradient-assisted optimization methods, the algorithm's global search ability and local exploration ability are improved.
It effectively improves the performance of the UAV path planning algorithm in complex environments, achieves faster convergence speed and higher convergence accuracy, and ensures the safety and efficiency of the path.
Smart Images

Figure CN119690092A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of unmanned aerial vehicle path planning, and relates to a unmanned aerial vehicle path planning method based on a global-local equilibrium whale optimization algorithm. Background Art
[0002] With the rapid development of drone technology, its applications in military, agriculture, environmental monitoring and other fields are becoming more and more extensive, especially in emergency rescue and logistics distribution. However, planning safe routes for drones in complex environments is a very challenging task. Such environments not only include geographical obstacles such as rugged mountainous terrain, urban high-rise buildings, and river waterfalls, but are also affected by dynamic factors such as weather changes and traffic conditions. Therefore, designing efficient, safe and feasible flight paths for drones under these complex conditions has become an important issue that needs to be solved urgently.
[0003] At present, the mainstream solution for drone path planning is usually to convert the environmental model into a mathematical model, and use the algorithm to plan a safe, feasible and smooth flight trajectory from the starting point to the end point under specific constraints. Intelligent algorithms for autonomous path planning of drones are divided into three categories: traditional optimization algorithms, intelligent optimization algorithms and machine learning algorithms. At present, traditional optimization algorithms have been widely used in path planning. Among them, the A* algorithm, as a classic heuristic search algorithm, has been widely used due to its simplicity of implementation. However, when applied to large-scale and high-dimensional spaces, the search efficiency of the algorithm often decreases significantly, which limits its ability to solve trajectory planning problems with multiple constraints. The RRT algorithm is a typical path planning method based on spatial sampling. It does not require discretization of the flight environment, so it has a faster search speed, but this method is difficult to obtain the optimal trajectory. The artificial potential field method is favored in path planning for its fast calculation speed and good real-time performance, but in large-scale and high-dimensional spatial environments, it may encounter local oscillations and local minimum problems, resulting in the generated path being unsuitable. This shows that traditional optimization algorithms cannot simultaneously meet accuracy and time efficiency in solving multi-constrained path planning problems, and there are certain limitations.
[0004] In recent years, many scholars have drawn inspiration from biological behaviors or mathematical function principles in nature, studied and designed intelligent optimization algorithms, and applied them to the problem of UAV path planning. These algorithms include SSA, GWO, BWO, SCA, BOA, etc. These algorithms can quickly determine the optimal path by applying a variety of search strategies and performing multiple rounds of iterations. However, most intelligent optimization algorithms are probability-based random search algorithms, which have strong randomness when solving specific engineering problems, and the coordination between global optimization and local optimization is weak. Therefore, how to avoid the algorithm from falling into the local optimal solution and maximize the global convergence speed of the algorithm is the main problem faced by many intelligent algorithms.
[0005] WOA is an optimization algorithm proposed by Mirjalili S et al. in 2016. It is a meta-heuristic optimization algorithm that simulates the predation behavior of humpback whales. It finds the optimal solution by simulating three predation strategies of humpback whales: surrounding prey, bubble net predation and searching prey. It has the characteristics of strong search ability and stable calculation. Jiang R et al. proposed the whale army optimization algorithm, introduced the armed force program, and adjusted the establishment of key parameters and basic principles of the original whale algorithm. Compared with the traditional whale optimization algorithm and other high-performance swarm intelligence algorithms, the algorithm has a faster convergence speed at a lower computational complexity. Huang Y et al. proposed a whale optimization algorithm using segmented learning and adaptive operator selection strategy for the path planning problem of autonomous underwater vehicles, used dynamic partitioning strategy and weighted mean scheme to construct virtual individuals, and incorporated virtual individuals into the whale optimization algorithm to construct an evolution pool to improve the algorithm's optimization performance. The simulation results show that the proposed algorithm has stronger robustness and search ability than other comparison algorithms. Guo W et al. proposed an improved whale optimization algorithm based on wavelet mutation strategy and social learning, designed a new linear incremental probability to improve the global development ability, introduced an adaptive neighborhood learning strategy to promote information exchange between individuals, and integrated the Morlet wavelet mutation mechanism to avoid the algorithm from falling into the local optimum. Based on the whale optimization algorithm, Wang C et al. proposed an adaptive adjustment mechanism to dynamically modify the search during the iteration process, added controllable variables and applied the evolutionary strategy of differential mutation, effectively coordinated the global optimum and local optimum of the algorithm, and finally applied the algorithm to the path planning problem. Compared with the original whale algorithm and the other six high-performance intelligent optimization algorithms, it showed faster convergence speed and higher convergence accuracy, and had a significant improvement in stability. Dai Y et al. proposed a new whale optimization algorithm (NWOA) for the robot path planning problem in a highly complex dynamic environment, adopted an adaptive scheme to accelerate the convergence of the algorithm, set virtual obstacles to improve the ability of the algorithm to escape the local optimum, and finally introduced the potential field factor to improve the robot's obstacle avoidance performance. The superiority of the proposed algorithm was demonstrated through simulation comparison. Yin S et al. proposed an enhanced whale optimization algorithm to realize path planning for UAV meteorological detection tasks in complex environments. They introduced real-time boundary processing, quasi-opposition-based learning, and enhanced search mechanism into the standard whale optimization algorithm, which improved the convergence speed and global optimization ability of the algorithm. Simulation experiments showed that the path planning solution given by the algorithm is of higher quality than other improved algorithms.
[0006] In addition, as key technologies in the field of machine learning continue to make progress, some researchers have begun to explore the application of these technologies to path planning problems. Therefore, developing more efficient path planning algorithms has become a topic worthy of in-depth research.
[0007] Although the above studies have improved the convergence speed and accuracy of the whale optimization algorithm by introducing various strategies, the algorithm still has shortcomings in terms of optimal value search accuracy and the ability to coordinate global and local development. New research is urgently needed to solve this problem. Summary of the invention
[0008] The purpose of the present invention is to propose a global and local balanced whale optimization algorithm to solve the problems that the prior art is still insufficient in terms of accuracy of optimal value search and in the ability to coordinate global and local development.
[0009] The algorithm mainly includes the following three improvement strategies: (1) Design a bubble net attack enhancement strategy so that individuals have corresponding abilities to jump out of the current position at different stages, thereby increasing the probability of the algorithm jumping out of the local optimum. (2) Introduce a failure parameter test mutation mechanism, that is, preset trigger conditions. When the algorithm falls into the local optimum or progresses slowly, the trigger mutation operation can significantly improve the algorithm's global search ability and ability to jump out of the local optimum. (3) In order to enhance the algorithm's exploration ability, a stochastic gradient-assisted optimization method is proposed, which integrates the gradient into the standard whale optimization algorithm to improve the algorithm's optimization performance. At the same time, an energy reduction scheme is introduced to enhance its local exploration ability.
[0010] In order to achieve the above object, the present invention adopts the following technical solution:
[0011] A UAV path planning method based on a global-local equilibrium whale optimization algorithm comprises the following steps:
[0012] Step 1, initialize the algorithm parameters and the position of individuals in the population; initialize the leader position, leader score, and convergence curve; traverse all individuals in the population, calculate the fitness value of each individual, and store it in the fitness array, and set the maximum number of no improvements;
[0013] Step 2, obtaining loop iteration parameters, including: (1) coefficient vector A = 2a·r1-a; where s is the number of iterations; S is the maximum number of iterations; (2) coefficient vector C = 2·r2; r1 and r2 are random numbers in the range [0,1]; (3) b is a constant that changes the shape of the spiral and is set to 1; (4) l is a random number between [-1,1]; (5) P is a random number in [0,1]; (6) rand is a random number in the range [0,1];
[0014] Step 3, determine whether P < 0.5, if yes, go to step 4, otherwise go to step 5;
[0015] Step 4, determine whether |A| < 1, if yes, search for prey, update the position of the individual whale according to the following two formulas, and then go to step 6;
[0016] D=|C·X * (t)-X(t)|
[0017] X(t+1)=X * (t)-A·D
[0018] Where t is the current time; D represents the bracketing step, A and C are coefficient vectors; X * (t) is the current leader position; X(t) is the current whale individual position; X(t+1) is the updated whale individual position;
[0019] Otherwise, the prey is captured and the position of the individual whale is updated according to the following two formulas; then go to step 6;
[0020] D=|C·X rand (t)-X(t)|
[0021] X(t+1)=X rand (t)-A·D
[0022] Among them, t is the current time; D represents the encirclement step length, X rand (t) is the position of a whale selected randomly from the current population; X(t) is the current position of the whale; X(t+1) is the updated position of the whale;
[0023] Step 5, determine whether rand>0.6, if yes, then the bubble net attacks and surrounds the prey, updates the position of the individual whale according to the following two formulas, and then goes to step 6;
[0024] D′=|X * (t)-X(t)|
[0025] X(t+1)=D′·e bl cos(2πl)+X * (t)
[0026] Otherwise, the bubble attack is enhanced, and the mutation operation is performed according to the following formula, and then step 6 is entered;
[0027] X(t+1)=X(t)+r5·(X * (txt))
[0028] Among them, X * (t) is the current leader position; r5 is a random number, X(t) is the current position of the individual whale; X(t+1) is the updated position of the individual whale;
[0029] Step 6, perform boundary check on the updated whale individual positions obtained in step 4 or step 5, retain the position values of those whale individuals within the boundary, and set the position values beyond the boundary to 0; traverse the positions of all current whale individuals, calculate the fitness value of each whale individual, and store it in the fitness array; for each whale individual, if its fitness value is less than the score of the current leader, use the fitness value and its corresponding individual position to update the leader's score and position respectively, and reset the no-improvement count counter; otherwise, it means that no better solution has been found, and the no-improvement count is set to +1; go to step 7;
[0030] Step 7, determine whether the preset conditions are met. If yes, trigger the mutation operation and perform boundary check. Keep the position values of individuals within the boundary, and set the position values beyond the boundary to 0; calculate the fitness value of each whale individual and compare it with the score of the current leader. If the fitness value of the current individual is less than the score of the current leader, the objective function value and position of the current individual will be used to update the score and position of the leader respectively, and enter step 8; if the preset conditions are not met, directly enter step 8;
[0031] Step 8, set the step size, and obtain the new leader position X_new according to the step size and the current leader position;
[0032] Go to step 9;
[0033] Step 9, calculate the fitness value of the new leader position X_new. If it is less than the current leader score, use the new position X_new to update the current leader position and go to step 10; otherwise, go directly to step 10;
[0034] Step 10, determine whether s<S, if yes, set s=s+1, and return to step 2; otherwise, output the current leader score, that is, the optimal solution of the objective function, which is a comprehensive cost function; wherein the formula of the comprehensive cost function is as follows:
[0035]
[0036] Among them, F1 to F4 represent the voyage length cost, obstacle threat cost, navigation altitude cost and path smoothing cost respectively, w α is the weight coefficient corresponding to different costs.
[0037] Compared with the prior art, the present invention has the following technical effects:
[0038] The present invention realizes the path planning of UAV in complex mountainous terrain through the global-local equilibrium whale optimization algorithm. In order to prevent the population from entering the aggregation state, the present invention designs a bubble net attack enhancement strategy, and improves the early convergence phenomenon by adding mutation operations at different stages of the algorithm. Secondly, a failed parameter test mutation mechanism is introduced, and the termination rule is preset to avoid excessive calculation of the algorithm, and the convergence speed of the algorithm is accelerated by triggering mutation operations. Finally, a stochastic gradient-assisted optimization method is designed. After determining the negative gradient direction in each iteration, a suitable step size is selected to enhance the algorithm's exploration ability for the optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is the cylindrical obstacle threat cost;
[0040] Figure 2 Altitude cost explanation
[0041] Figure 3 Turning and climbing angle calculation (turning and climbing angle calculation);
[0042] Figure 4 is the path planning terrain environment model, where (a) is terrain environment model 1, and (b) is terrain environment model 2;
[0043] Figure 5 is the average convergence curve of the CEC2017 test function; where (1) to (30) are Function1 to Function30 respectively.
[0044] Figure 6 This is the path planning in the simple obstacle scene of terrain 1, where (a) is the top view, (b) is the side view, (c) is the 3D obstacle avoidance map, and (d) is the algorithm convergence map.
[0045] Figure 7 This is the path planning in the complex obstacle scene of terrain 1, where (a) is the top view, (b) is the side view, (c) is the 3D obstacle avoidance map, and (d) is the algorithm convergence map.
[0046] Figure 8 This is the path planning in the simple obstacle scene of terrain 2, where (a) is the top view, (b) is the side view, (c) is the 3D obstacle avoidance map, and (d) is the algorithm convergence map.
[0047] Fig. 9 It is the path planning in the scene with complex obstacles in terrain 2, where (a) is the top view, (b) is the side view, (c) is the 3D obstacle avoidance map, and (d) is the algorithm convergence map.
[0048] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. DETAILED DESCRIPTION
[0049] 1. Problem Description of UAV Path Planning
[0050] In the present invention, the UAV path planning problem is solved by considering multiple constraints, assigning different weights to different constraints to formulate a comprehensive cost function, and finding the minimum value to represent the optimal trajectory.
[0051] 1. Conditional constraints
[0052] When a drone performs a mission, it gives priority to the flight length. A shorter flight distance can greatly reduce fuel consumption and improve endurance. The drone is usually controlled by a ground control station to fly along the n flight points planned by the search map in sequence to form a flight path X. i , each journey point is a path node searched in a known map, and its coordinates are set to M ij =(x ij ,y ij , z ij ). By accumulating the Euclidean distance between every two nodes, the flight length cost function F1 can be obtained:
[0053]
[0054] In addition to the flight length, the threats caused by obstacles during the flight must also be considered. The planned path must ensure that the UAV can bypass obstacles during the flight to achieve safe operation. Let α be the set of all threats. Assume that the threat caused by obstacles is a cylinder with a projection center coordinate of O. α , with a radius of R α , the diameter of the drone is D, the length of the safety buffer is S, and the path formed between every two flight points of the drone during flight The distance from the center coordinate is d α , such as Figure 1 As shown, considering the above conditions, the threat cost function F2 is:
[0055]
[0056] In some cases, such as aerial photography and experimental tasks, drones need to operate in specific airspaces. Flying too high will affect the resolution of aerial photography, while flying too low will cause unnecessary danger to people or animals and plants on the ground and affect the shooting field of view. Therefore, the flight altitude is usually limited to two given extreme values, such as Figure 2As shown, this helps to reasonably allocate and use airspace resources and avoid conflicts and interference. During flight, the actual altitude is the terrain altitude plus the set altitude. The altitude cost calculation rules for setting the route point are as follows:
[0057]
[0058] This rule restricts the drone to fly at the average level of the two extreme values, and stipulates that the flight cost will increase accordingly as the distance from the average level altitude increases, thus forming the altitude cost function F3:
[0059]
[0060] In drone path planning, smoothing cost is an important consideration. It is the cost introduced to ensure that the drone's flight path is as smooth as possible, avoiding sharp turns or altitude changes that increase the difficulty of controlling the aircraft and accelerate fuel consumption. Figure 3 As shown, the smoothing cost is set to include the body turning cost and the climbing cost, where θ ij is the climb angle at route point j on path i, θ i,j-1 is the climb angle at the j-1th leg of path i; ψ ij is the turning angle between two adjacent path segments on path i. Let Z be the unit vector in the direction of the Z coordinate axis, then the climbing angle θ ij It can be expressed as:
[0061]
[0062] Steering angle ψ ij It is expressed as:
[0063]
[0064] The smoothing cost can be expressed as:
[0065]
[0066] Among them, σ1 and σ2 represent the cost coefficients of the steering angle and the climbing angle respectively, and both are 1 in the path planning experiment.
[0067] 2. Comprehensive cost function
[0068] In order to make the UAV reach the target safely and efficiently, the planned path needs to guide the UAV to achieve collision-free flight while considering the total flight length cost, threat cost, height cost and smoothness cost. The comprehensive cost function can be expressed as:
[0069]
[0070] Where F1 to F4 represent the cost of flight length, obstacle threat, navigation altitude and path smoothing, respectively, and w α is the weight coefficient corresponding to different costs.
[0071] 3. Environmental Model
[0072] The scenarios used for path planning are two scenarios with different terrain structures on Christmas Island, Australia, such as Figure 4 (a) and (b) are real digital elevation model maps (DEM) collected by LiDAR sensors. Each benchmark scene is divided into simple and complex scenes according to the number of obstacles. The number of cylindrical obstacles in the simple scene is set to 3, and the number of cylindrical obstacles in the complex scene is set to 6 or 9 according to different terrain structures to test the path planning performance of the algorithm in different environments.
[0073] 2. Design of global-local equilibrium whale optimization algorithm Whale optimization algorithm
[0074] Among the numerous swarm intelligence algorithms, the whale optimization algorithm has the characteristics of few parameters and simple structure, but it is still insufficient in solving the complex optimization problem of UAV path planning. Therefore, this paper selects the whale optimization algorithm for analysis and research. After analyzing the standard whale optimization algorithm, this section improves the global and local balanced whale optimization algorithm by integrating multiple strategies, so that it can more efficiently find the optimal path in the UAV path planning task in complex terrain environment.
[0075] 1. Standard whale optimization algorithm
[0076] The whale optimization algorithm imitates the unique hunting behavior of humpback whales. According to the predation characteristics of whales, the predation behavior of whales is divided into three stages: shrinking and surrounding predation, bubble net attack, and random search. The specific analysis is described as follows:
[0077] (1) Constriction and encirclement stage
[0078] In nature, whales can find the location of prey and surround them for prey. The algorithm assumes that the best individual in the current population is the prey. Other whales in the population surround the best whale position to update their own positions. Their positions are updated by formulas (9) and (10):
[0079] D=|C·X * (t)-X(t)| (9)
[0080] X(t+1)=X * (t)-A·D (10)
[0081] Where t is the current time; D is the bracketing step size; A and C are coefficient vectors; X *(t) is the optimal position vector of the current population, i.e., the leader position; X(t) is the current position of the individual whale; X(t+1) is the updated position of the individual whale; where r1 and r2 are random numbers in the range [0,1];
[0082] A=2a·r1-a (11)
[0083] C=2·r2 (12)
[0084] Among them, r1 and r2 are random numbers in the range of [0,1]; the value of a decreases linearly from 2 to 0, expressed as:
[0085]
[0086] T Max is the maximum number of iterations.
[0087] (2) Bubble Net Attack Phase
[0088] When hunting, humpback whales swim towards their prey in a spiral motion. In the whale optimization algorithm, individual whales update their positions using formulas (14) and (15):
[0089] D′=|X * (t)-X(t)| (14)
[0090] X(t+1)=D′·e bl cos(2πl)+X * (t) (15)
[0091] Among them, b is a constant that changes the shape of the spiral, usually set to 1; l is a random number between [-1,1].
[0092] The development phase of the whale optimization algorithm includes two phases: shrinking encirclement and bubble net attack. When |A|<1, since the whale swims along a spiral trajectory around the prey in a shrinking encirclement, the whale has a 50% chance of choosing to encircle the prey and a 50% chance of choosing to attack with a bubble net. This process is obtained by formula (16):
[0093]
[0094] Here, p is a random number between [0,1].
[0095] (3) Random search and predation phase
[0096] When |A|≥1, the whale searches and preys randomly according to its position. In WOA, the whale updates its position through formulas (17) and (18):
[0097] D=|C·X rand(t)-X(t)| (17)
[0098] X(t+1)=X rand (t)-A·D (18)
[0099] Where D represents the encirclement step length, X rand (t) is the position of a whale individual randomly selected from the current population; X(t) is the current position of the whale individual; X(t+1) is the updated position of the whale individual.
[0100] 2. Global-local balancing whale optimization algorithm
[0101] After initializing the population, WOA conducts global exploration through a random search strategy, but this method may lead to insufficient global search capabilities. As the algorithm proceeds, local search is achieved through the encirclement predation and spiral update stages, but due to the linear decrease of the convergence factor, it will cause an imbalance between global and local searches, which will easily lead to local optimal solutions in the later stages of the algorithm. In view of the above shortcomings, the present invention proposes a global local balanced whale optimization algorithm. A bubble net attack enhancement strategy is designed to prevent the algorithm from falling into the local optimum, and a failed parameter test mutation mechanism is introduced to improve the global search capability of the algorithm. In the later stage of the algorithm, a random gradient assisted optimization strategy is used to improve the optimization performance of the algorithm. The following will explain the three improvement strategies in turn.
[0102] (1) Bubble Net Attack Enhancement Strategy
[0103] In the development phase, all individuals in the standard whale optimization algorithm use the same spiral attack and shrinking method to update their positions, but this does not take into account that the ability required for individuals to jump out of their current positions is different at different stages. If only the above two identical position update modes are used, when the algorithm is trapped in a local optimum, it will be difficult to escape due to the lack of changes in position updates. Therefore, in order to prevent the population from entering a clustered state and causing WOA to fall into a local optimum, a mutation method that enhances the bubble net attack is proposed. When the original update method remains unchanged, when the random number is less than or equal to 0.6, a new mutation operation is used to update the position of the optimal whale individual. The mutation formula is shown in (19).
[0104] X(t+1)=X(t)+r5·(X * (t)-X(t)) (19)
[0105] Among them, X * (t) is the current leader position; r5 is a random number, X(t) is the current position of the individual whale; X(t+1) is the updated position of the individual whale.
[0106] (2) Failure parameter test variation mechanism
[0107] In the optimization algorithm, the termination criteria determines when to stop the iteration of the algorithm. Therefore, choosing an appropriate termination criteria can avoid over-computation and ensure that the algorithm finds a satisfactory solution within a reasonable time. Based on the above analysis, in order to improve the performance of the algorithm, a failure parameter test mutation mechanism is proposed, which triggers the mutation operation by setting the following algorithm termination conditions:
[0108] A better fitness value is not found after multiple consecutive iterations. In this embodiment, when the algorithm runs for five consecutive iterations without finding a better fitness value, a mutation operation is triggered.
[0109] The specific formula for mutation operation is as follows:
[0110] Calculate the variable step length based on the current iteration number s and the maximum iteration number S:
[0111]
[0112] Calculate the mutation vector and apply to the whale's position:
[0113]
[0114] Among them, m is the mutation vector; β = 1.5; rand(1, dim) generates a random number matrix with 1 row and dim columns.
[0115] Apply the mutation vector to the current whale's position and perform a bounds check.
[0116] X(t+1)=X(t)+m (22)
[0117] The purpose of introducing the above mutation operation is to increase the diversity of the population and avoid falling into the local optimal solution, thereby improving the global search ability and convergence speed of the algorithm.
[0118] (3) Stochastic Gradient Assisted Optimization Method
[0119] The standard whale optimization algorithm may have incomplete local exploration when running. The gradient is integrated into the swarm intelligence algorithm to form a hybrid algorithm, which aims to combine the advantages of the two and improve the algorithm's optimization performance. The independent variable changes along the direction of the gradient vector, which can maximize the change of the function value. In the algorithm, the objective function is the optimization target. Based on the above analysis, a stochastic gradient-assisted optimization method is proposed. After determining the negative gradient direction in each iteration, the appropriate step size is selected. t+1 , so that the objective function value can be minimized to enhance the algorithm's ability to explore the optimal solution. The specific operations are as follows:
[0120]
[0121] in, Represents the gradient at the current leader position; step t+1 is the updated step size; the gradient at the current leader position is shown in formula (24):
[0122]
[0123] Among them, f is the objective function (specifically in the UAV path planning method, the objective function is the comprehensive cost function); is a set of unit orthogonal vectors, Dim represents the dimension of the optimization problem to be solved; is the current individual whale position in the i-th dimension; Dim represents the dimension of the optimization problem to be solved. is a set of unit orthogonal vectors. In order to enhance the ability of swarm intelligence algorithm to solve optimization problems and enable the hybrid algorithm to solve problems independently of the mathematical properties of the problem, the gradient is approximated by the forward difference formula as the definition derivative. The calculation formula is shown in (25):
[0124]
[0125] in, is the leader position of the current i-th dimension; ε is a small positive number, set to 10 -6 The step length along the negative gradient direction in formula (23) is obtained by the line search method, as shown in formula (26):
[0126]
[0127] in, is a scale factor, Set to 1.8. t is the current step length; step t+1 is the updated step length; new variables X1 and X2 used to represent the updated position of the individual are calculated by formula (27) and formula (28), and the fitness values of X1 and X2 are calculated respectively to obtain f1 and f2.
[0128]
[0129]
[0130] Based on the above, a global local balanced whale optimization algorithm (GLBWOA) is designed. First, the original population initialization and random search strategy are adopted. Then, in the bubble net predation stage, a bubble attack enhancement strategy is designed. Under the condition that the original spiral update method remains unchanged, a mutation method is introduced to improve the ability to jump out of the local optimum. After that, a failure parameter test mutation mechanism is introduced, and the conditions that trigger the termination of the algorithm are set to avoid over-calculation. By adding mutation operations, the global search ability is improved and the algorithm convergence speed is accelerated. Finally, stochastic gradient-assisted optimization is used to enable the algorithm to search for the global optimal value as much as possible, balancing the global and local exploration capabilities of the algorithm. The designed global local balanced whale optimization algorithm is used for drone path planning.
[0131] 3. UAV path planning method based on global-local equilibrium whale optimization algorithm
[0132] The UAV path planning method based on the global-local equilibrium whale optimization algorithm provided by the present invention comprises the following steps:
[0133] Step 1: Initialize the algorithm parameters and the position of individuals in the population; initialize the leader position, leader score, and convergence curve; traverse all individuals in the population, calculate the fitness value of each individual, and store it in the fitness array, and set the maximum number of no improvements. The details are as follows:
[0134] Call the initialization function to initialize the positions of individuals in the population according to the given upper bound ub, lower bound lb, number of individuals in the population N, and dimension dim;
[0135] Set the initial value of the leader position Leader_pos to an all-zero vector with dimension dim; set the initial value of the leader score Leader_score to infinity (for minimization problems); create a zero vector GLBWOA_Convergence_curve (i.e., convergence curve) of length iter;
[0136] Traverse all individuals, for each individual, use the fobj function to calculate its fitness value and store it in the i-th element of the fitness array. Use Positions(i,:) to represent the position of the i-th individual. Set the maximum number of no improvements to 5 and initialize the no improvement counter to 0.
[0137] Step 2, obtain loop iteration parameters, including:
[0138] (1) Coefficient vector A = 2a·r1-a; s is the number of iterations; S is the maximum number of iterations;
[0139] (2) Coefficient vector C = 2·r2; r1 and r2 are random numbers in the range [0,1];
[0140] (3) b is the constant that changes the spiral shape and is set to 1;
[0141] (4) l is a random number between [-1,1];
[0142] (5) P is a random number in [0,1];
[0143] (6) rand is a random number in the range [0,1].
[0144] Step 3, determine whether P < 0.5, if yes, go to step 4, otherwise go to step 5;
[0145] Step 4, determine whether |A| < 1, if yes, search for prey, update the position of the individual whale according to the following two formulas, and then go to step 6;
[0146] D=|C·X * (t)-X(t)|
[0147] X(t+1)=X * (t)-A·D
[0148] Where t is the current time; D represents the bracketing step, A and C are coefficient vectors; X * (t) is the current leader position; X(t) is the current whale individual position; X(t+1) is the updated whale individual position;
[0149] Otherwise, the prey is captured and the position of the individual whale is updated according to the following two formulas; then go to step 6.
[0150] D=|C·X rand (t)-X(t)|
[0151] X(t+1)=X rand (t)-A·D
[0152] Among them, t is the current time; D represents the encirclement step length, X rand (t) is the position of a whale selected randomly from the current population; X(t) is the current position of the whale; X(t+1) is the updated position of the whale;
[0153] Step 5, determine whether rand>0.6, if yes, then the bubble net attacks and surrounds the prey, updates the position of the individual whale according to the following two formulas, and then goes to step 6;
[0154] D′=|X * (t)-X(t)|
[0155] X(t+1)=D′·e bl cos(2πl)+X * (t)
[0156] Otherwise, the bubble attack is enhanced, and the mutation operation is performed according to the following formula, and then step 6 is entered;
[0157] X(t+1)=X(t)+r5·(X * (txt))
[0158] Among them, X * (t) is the current leader position; r5 is a random number, X(t) is the current position of the individual whale; X(t+1) is the updated position of the individual whale.
[0159] Step 6, perform boundary check on the updated whale individual positions obtained in step 4 or step 5, retain the position values of those individuals within the boundary (i.e., within the upper and lower bounds set in step 1), and set the position values outside the boundary to 0. Traverse the positions of all current whale individuals, calculate the fitness value of each individual, and store it in the fitness array. For each individual, if its fitness value is less than the score of the current leader, use the fitness value and its corresponding individual position to update the leader's score and position respectively, and reset the no-improvement count counter (i.e., set the no-improvement count to 0); otherwise, it means that no better solution has been found, and the no-improvement count is set to +1; go to step 7.
[0160] Step 7, determine whether the preset conditions are met (the number of no improvements obtained by multiple consecutive iterations is not less than the maximum number of no improvements). If so, the mutation operation is triggered and a boundary check is performed to retain the position values of those individuals within the boundary, and the position values outside the boundary are set to 0; calculate the fitness value of each whale individual and compare it with the score of the current leader. If the fitness value of the current individual is less than the score of the current leader, the objective function value and position of the current individual will be used to update the score and position of the leader respectively, and enter step 8; if the preset conditions are not met, go directly to step 8.
[0161] Specifically, the mutation operation is triggered according to the preset conditions, including:
[0162] After multiple consecutive iterations, the number of no improvements is not less than the maximum number of no improvements, that is, no better fitness value is found. In this embodiment, when the algorithm runs for 5 consecutive iterations without finding a better fitness value, a mutation operation is triggered.
[0163] Specifically, the mutation operations include:
[0164] The variable step length is calculated based on the current iteration number s and the maximum iteration number S. The formula is as follows:
[0165]
[0166] Calculate the mutation vector, the formula is as follows:
[0167]
[0168] Among them, m is the mutation vector; β=1.5; rand(1,dim) generates a random number matrix with 1 row and dim columns.
[0169] The mutation vector is applied to update the position of individual whales, and the formula is as follows:
[0170] X(t+1)=X(t)+m.
[0171] Step 8, set the step size, and obtain the new leader position X_new according to the step size and the current leader position;
[0172] Go to step 9. Step 8 includes the following sub-steps:
[0173] Step 81, randomly generate a step size in the range [0, 0.01], and calculate the gradient at the current leader's position according to the following formula:
[0174]
[0175] in, represents the gradient at the current leader's position; f is the objective function (specifically, in the UAV path planning method, the objective function is the comprehensive cost function); is a set of unit orthogonal vectors, Dim represents the dimension of the optimization problem to be solved; is the current individual whale position in the i-th dimension;
[0176]
[0177] in, is the leader position of the current i-th dimension; ε is a small positive number, set to 10 -6 .
[0178] Step 82, calculate new variables X1 and X2 for representing the updated position of the individual by the following two formulas, and calculate the fitness values f1 and f2 of X1 and X2 respectively;
[0179]
[0180]
[0181] The updated step length is obtained according to the fitness values f1 and f2, and the formula is as follows:
[0182]
[0183] in, is a scale factor. In this embodiment, Set to 1.8; step t is the current step length; step t+1 is the updated step size;
[0184] Step 83, calculate the new leader position X_new using the following formula according to the updated step length and the current leader position; go to step 9.
[0185]
[0186] Step 9, calculate the fitness value of the new position X_new. If it is less than the current leader score, use the new position X_new to update the current leader position and go to step 10; otherwise, go directly to step 10;
[0187] Step 10, determine whether s<S, if yes, set s=s+1, and return to step 2; otherwise, output the current leader score, that is, the optimal solution of the objective function, which is a comprehensive cost function.
[0188] Among them, the formula of the comprehensive cost function is as follows:
[0189]
[0190] Among them, F1 to F4 represent the cost of flight length, obstacle threat, navigation altitude and path smoothing respectively, and w α are the weight coefficients corresponding to different costs. In the path planning experiment, w1=10, w2=100, w3=10, and w4=50 are set.
[0191] 1) Flight length cost function F1:
[0192]
[0193] Among them, M ij =(x ij ,y ij , z ij ) is the coordinate of the route point; n is the number of the route points;
[0194] 2) Threat cost function F2:
[0195]
[0196] Among them, α is the set of all threats, the threat caused by obstacles is a cylinder, and its projection center coordinate is O α , with a radius of R α, D is the diameter of the drone, S is the length of the safety buffer zone, and the path formed directly between every two flight points of the drone during flight The distance from the center coordinate is d α ;
[0197] 3) Altitude cost function F3:
[0198]
[0199]
[0200] Among them, h ij is the jth flight point of path i, h max The maximum flight altitude is set to 200. min The minimum flight height for the restriction is set to 100 in the experiment.
[0201] 4) Smoothing cost F4:
[0202]
[0203] Among them, σ1 and σ2 represent the cost coefficients of the turning angle and the climbing angle respectively; θ ij is the climb angle at route point j on path i, θ i,j-1 is the climb angle at the j-1th leg of path i; ψ ij is the turning angle of two adjacent path segments on path i; take Z as the unit vector in the direction of the Z coordinate axis, then θ ij It is expressed as:
[0204]
[0205] in, is the path vector The path formed;
[0206]
[0207] Among them, M′ ij is the coordinates of the route point M ij The projection point on the plane formed by the x-axis and the y-axis, M′ i,j+1 It is M i,j+1 The projection point on the plane formed by the x-axis and the y-axis, It is M′ ij and M′ i,j+1 The path vector formed by the two points, M′ i,j+2 It is M i,j+2 The x-axis and y-axis form a projection point on the plane. It is M′ i,j+1 and M′ i,j+2 The path vector formed by the two points.
[0208] 4. Algorithm time complexity analysis and simulation experiments
[0209] Assume that the population size is N, the search space dimension is D, the maximum number of iterations is T, and the time complexity of the basic WOA algorithm is O(NDT). The GLBWOA proposed in the present invention is improved by introducing three different strategies based on WOA, among which the time complexity of the bubble net attack enhancement strategy is O(NDT), the time complexity of the failure parameter test mutation mechanism and the stochastic gradient assisted optimization method is also O(NDT). Compared with the basic WOA algorithm, the time complexity of GLBWOA has not increased, and the algorithm execution efficiency has not decreased. The superiority of the algorithm proposed in the present invention will be illustrated by performance testing and path planning experiments.
[0210] Path planning is essentially a complex optimization problem. This section will use a test function to test the optimization ability of the algorithm proposed in this invention, find the optimal path in the actual elevation map, and compare it with other mainstream high-performance metaheuristic algorithms. The excellence of GLBWOA is demonstrated through numerical experimental comparison. All experiments in this study were conducted on a Windows 11 platform equipped with a 13thGen Intel Core(TM) i9-13900HX@2.20GHz, and MATLAB 2024a software was used for simulation experiments.
[0211] (1) Optimization performance test
[0212] The IEEE CEC2017 function is used to test the optimization performance of GLBWOA. In addition to comparing with the basic WOA algorithm, three high-performance intelligent optimization algorithms BWO, SCA, and BOA are added for comparison. The dimension in the experiment is set to 30. In order to ensure fair comparison, the maximum evaluation time is set to 10,000 times the dimension, the population size is set to 30, and the maximum number of iterations is set to 500. In this study, each algorithm runs independently 100 times, and the best value, worst value, average value, median value, and standard deviation are recorded to evaluate the optimization performance of the algorithm. In order to more intuitively show the difference between the algorithm proposed in this invention and other algorithms, the Wilcoxon rank sum test is used with a significance level of 5%. When the value of the rank sum test is less than 5%, it means that there is a significant difference between the two samples, otherwise there is no significant difference. The test results are shown in Table 1. It can be observed from Table 1 that among the 30 test functions of CEC2017, except that the stability is slightly worse than that of other algorithms in individual function tests, GLBWOA has excellent numerical performance in each indicator.
[0213] Table 1 Test results of each algorithm in CEC2017 (significant values are in bold)
[0214]
[0215]
[0216]
[0217]
[0218]
[0219] The ultimate goal of improving the algorithm is to find the optimal solution in the shortest time, such as Figure 7 The average convergence curve of the function test is shown. It can be observed that compared with the other four high-performance intelligent optimization algorithms, GLBWOA has stronger global search capabilities and the ability to jump out of local optimality. It can achieve fast convergence to find the optimal value in 30 optimization functions, indicating that it can quickly find a better path in a shorter time in path planning problems.
[0220] In summary, in the CEC2017 function test set, GLBWOA can find the optimal value in 30 functions, and has a faster convergence speed than BWO, SCA, BOA and standard WOA. Except for functions F1, F2, F3, F4, F5, F18, F19, F26 and F30, which need to be iterated for 100 generations before finding the optimal value, the algorithm can reach the convergence speed within 100 generations of iteration for the remaining functions, and GLBWOA performs well in various indicators, reflecting its universality. It can be seen that the algorithm GLBWOA designed by the present invention has good optimization performance, and its ability to find the optimal track in a real complex environment will be tested in the actual elevation map below.
[0221] (2) Path planning experiment
[0222] The experiment was conducted in two environments with different topographic structures on Christmas Island, Australia. Figure 1 The range is 1045×879×Z m, Figure 2 The range is 450×450×Z m. According to the number and position of threat cylinders, the scenarios are divided into simple and complex scenarios, and the waypoints are set to n=10. In order to make a fair comparison, all algorithm parameters are unified, with the population size set to 30 and the maximum number of iterations set to 200. Due to the randomness of the metaheuristic algorithm, in order to better illustrate the algorithm performance and ensure the reliability of the results, each algorithm is independently repeated 30 times, and the total cost F is calculated. cost (Path i) is used as the main performance indicator of path planning. According to the actual flight requirements, the weight coefficients of each cost function are set to w1=10, w2=100, w3=10, and w4=50. The constraint parameters of the simulation experiment are shown in Table 2.
[0223] Table 2 Constraint parameter settings
[0224]
[0225] The obstacle parameters of the simple scene of terrain 1 are shown in Table 3. Assuming that the starting point of the path is (200, 100, 150) and the end point is (800, 800, 150), plan the best path between the two points. Figure 8 The path planning effect in a simple scene of terrain 1 is shown. Figure 8 (a) Top view and Figure 8 From the side view of (b), we can see that all algorithms can generate feasible paths that meet the four constraints of path length, obstacle threat, height limit, climbing angle and turning angle. In order to more intuitively observe the path avoiding obstacles, we choose to hide the terrain structure for observation, such as Figure 8 As shown in (c), it can be seen that the generated path can effectively avoid collisions, and the path is relatively smooth, which meets the needs of actual flight.
[0226] Table 3 Parameter settings for terrain 1 simple obstacle scene
[0227]
[0228] According to the distribution of terrain peaks, the complex environment obstacles of terrain 1 are set as shown in Table 4, and the starting and ending points are the same as above. Fig. 9 The path planning effect under the complex scene of terrain 1 is demonstrated. With the increase of obstacles, the complexity of path solving increases, and the difficulty of the algorithm to solve the optimal path increases. It can be seen that all algorithms have generated paths that can guide the UAV to fly safely without collision, but the paths generated by different algorithms are quite different. Among them, the path generated by BWO has more sharp turns and is more difficult to fly in practice. The average total cost of BOA's planning is the highest, and the optimal path has not been found. In comparison, the paths generated by SCA, WOA, and GLBWOA are more suitable for the actual flight of UAVs. Among the three, GLBWOA converges the fastest and can find the optimal path in about 10 iterations. The average total cost is the lowest, the same as WOA, reflecting the superiority of the algorithm proposed in the present invention.
[0229] Table 4 Terrain 1 complex scene obstacle parameter settings
[0230]
[0231] The path planning experiment is continued under terrain 2 to further test the path planning capability of the algorithm proposed in the present invention. The starting point of the path is set to (10, 10, 200), the end point is set to (400, 400, 150), and the simple scene obstacle settings are as shown in Table 5. The solution path is as follows: Figure 8 As shown, it can be observed from (a) and (b) that the path generated by GLBWOA changes more smoothly without sudden changes, which is better than the other four algorithms. From (c), it can be seen that algorithms BOA and BWO fall into local optimality at the beginning of the algorithm, which eventually leads to premature convergence and plans a path with a higher total cost, while GLBWOA quickly escapes after falling into a local extreme value and continuously searches for the global optimal path, showing better optimization performance. From (d), it can be seen that the algorithm proposed in the present invention can quickly jump out when it falls into the local optimality in the early stage of the algorithm, while other algorithms fall into the local optimality for a long time during iteration, indicating that the introduction of the bubble network attack enhancement strategy has a stronger ability to jump out of the local optimality. Carefully observing the average convergence curve of GLBWOA iterations from 0 to 50 generations, it can be seen that after falling into the local optimality for a short time, the algorithm triggers the mutation mechanism to quickly find the global optimal value, indicating the effectiveness of introducing the failure parameter verification mechanism, which can greatly improve the global search ability of the algorithm.
[0232] Table 5 Parameter settings for terrain 2 simple obstacle scene
[0233]
[0234] Solve the safe flight path in the complex obstacle scene of terrain 2. The starting point and end point are the same as above. The obstacle parameters are set as shown in Table 6. The results are as follows Fig. 9 As shown in the figure, it can be seen that the relevant algorithms all give their own path planning results and the planned paths avoid the mountains and threat sources in the environment. It can be observed that although GLBWOA sacrifices the path length cost to plan the path, its planned path effectively reduces the altitude change and steering adjustment of the UAV during flight, reduces the altitude cost and smoothing cost, and effectively avoids obstacles, reduces the threat cost, and thus reduces the total cost. The average total cost planned among the five algorithms is the lowest. As can be seen from Figure (d), the BWO and WOA algorithms gradually begin to converge after about 30 iterations, but GLBWOA is still searching for the global optimal path, showing that the algorithm has strong local exploration capabilities and global exploration performance, indicating that the introduction of the gradient kinetic energy strategy in the algorithm can escape the local minimum point, and the design of the step update method can effectively prevent the algorithm from missing the global optimal solution.
[0235] Table 6 Parameter settings for terrain 2 complex obstacle scene
[0236]
[0237] The average total flight cost data of path planning under the four benchmark scenarios are shown in Table 7. It can be observed that GLBWOA, like the other algorithms, can generate paths to guide the UAV to achieve collision-free flight. Except for the simple obstacle scenario in terrain 1, which has the same total flight cost as the standard WOA algorithm, the total flight cost of the other three benchmark scenarios is reduced by 19%, 10.6% and 24.9% respectively compared with the standard WOA, and there is a certain improvement in convergence speed, convergence accuracy and stability, indicating the effectiveness of the improved strategy designed by the present invention.
[0238] Table 7. Path planning experimental results. Significant values are in bold.
[0239]
[0240]
[0241] The present invention solves the problem of UAV path planning in complex environments based on a new global-local balanced whale optimization algorithm. A three-dimensional spatial model is constructed using DEM, and a total cost function is constructed in combination with task requirements and constraints. For the standard WOA, a bubble net attack enhancement scheme is proposed. Considering that the ability required for an individual to jump out of the current position is different at different stages, the ability to escape the local optimum is improved through a mutation operation with preset conditions. Secondly, a failure parameter test mutation mechanism is designed to accelerate the convergence speed of the algorithm. In the later stage of the algorithm, a random gradient-assisted optimization strategy is used to improve the global search ability of the algorithm. The optimization performance of GLBWOA is tested by the CEC2017 function test set. The performance of each indicator is better than that of the other four high-performance algorithms, indicating that the three proposed strategies can effectively balance the global and local search capabilities of the algorithm. The quality of the algorithm-generated path is tested in four benchmark scenarios. GLBWOA performs well in all four scenarios. Under the condition that the algorithm parameters are set consistently, the average total cost of the flight is lower, the algorithm convergence accuracy is higher and the convergence speed is faster. In order to better test the performance of the algorithm, subsequent research can further consider the different effects of various complex situations such as moving obstacles and weather changes on the solution of the UAV path planning problem. And the focus will be on deploying the algorithm in a real UAV to perform path planning in a real environment to verify the effectiveness of the algorithm.
Claims
1. A UAV path planning method based on a global-local equilibrium whale optimization algorithm, comprising: Step 1, initialize the algorithm parameters, the position of individuals in the population; initialize the leader position, leader score, and convergence curve; Traverse all individuals in the population, calculate the fitness value of each individual, store it in the fitness array, and set the maximum number of no improvements; It is characterized by further comprising the following steps: Step 2, obtain loop iteration parameters, including: (1) Coefficient vector A = 2a·r1-a; s is the number of iterations; S is the maximum number of iterations; (2) Coefficient vector C = 2·r2; r1 and r2 are random numbers in the range [0,1]; (3) b is the constant that changes the spiral shape and is set to 1; (4) l is a random number between [-1,1]; (5) P is a random number in [0,1]; (6) rand is a random number in the range [0,1]; Step 3, determine whether P < 0.5, if yes, go to step 4, otherwise go to step 5; Step 4, determine whether |A| < 1, if yes, search for prey, update the position of the individual whale according to the following two formulas, and then go to step 6; D=|C·X * (t)-X(t)| X(t+1)=X * (t)-A·D Where t is the current time; D represents the bracketing step, A and C are coefficient vectors; X * (t) is the current leader position; X(t) is the current whale individual position; X(t+1) is the updated whale individual position; Otherwise, the prey is captured and the position of the individual whale is updated according to the following two formulas; then go to step 6; D=|C·X rand (t)-X(t)| X(t+1)=X rand (t)-A·D Among them, t is the current time; D represents the encirclement step length, X rand (t) is the position of a whale selected randomly from the current population; X(t) is the current position of the whale; X(t+1) is the updated position of the whale; Step 5, determine whether rand>0.6, if yes, then the bubble net attacks and surrounds the prey, updates the position of the individual whale according to the following two formulas, and then goes to step 6; D′=|X * (t)-X(t)| X(t+1)=D′·e bl cos(2πl)+X * (t) Otherwise, the bubble attack is enhanced, and the mutation operation is performed according to the following formula, and then step 6 is entered; X(t+1)=X(t)+r5·(X * (t)-X(t)) Among them, X * (t) is the current leader position; r5 is a random number, X(t) is the current position of the individual whale; X(t+1) is the updated position of the individual whale; Step 6, perform boundary check on the updated whale individual positions obtained in step 4 or step 5, retain the position values of those whale individuals within the boundary, and set the position values beyond the boundary to 0; traverse the positions of all current whale individuals, calculate the fitness value of each whale individual, and store it in the fitness array; for each whale individual, if its fitness value is less than the score of the current leader, use the fitness value and its corresponding individual position to update the leader's score and position respectively, and reset the no-improvement count counter; otherwise, it means that no better solution has been found, and the no-improvement count is set to +1; go to step 7; Step 7, determine whether the preset conditions are met. If yes, trigger the mutation operation and perform boundary check. Keep the position values of individuals within the boundary, and set the position values beyond the boundary to 0; calculate the fitness value of each whale individual and compare it with the score of the current leader. If the fitness value of the current individual is less than the score of the current leader, the objective function value and position of the current individual will be used to update the score and position of the leader respectively, and enter step 8; if the preset conditions are not met, directly enter step 8; Step 8, set the step size, and obtain the new leader position X_new according to the step size and the current leader position; Go to step 9; Step 9, calculate the fitness value of the new leader position X_new. If it is less than the current leader score, use the new position X_new to update the current leader position and go to step 10; otherwise, go directly to step 10; Step 10, determine whether s<S, if yes, set s=s+1, and return to step 2; otherwise, output the current leader score, that is, the optimal solution of the objective function, which is a comprehensive cost function; The formula of the comprehensive cost function is as follows: Among them, F1 to F4 represent the voyage length cost, obstacle threat cost, navigation altitude cost and path smoothing cost respectively, w α It is the weight coefficient corresponding to different costs.
2. The UAV path planning method based on the global-local equilibrium whale optimization algorithm according to claim 1 is characterized in that: Step 1 is as follows: Call the initialization function to initialize the positions of individuals in the population according to the given upper bound ub, lower bound lb, number of individuals in the population N, and dimension dim; Set the initial value of the leader position Leader_pos to an all-zero vector with dimension dim; set the initial value of the leader score Leader_score to infinity; create a zero vector GLBWOA_Convergence_curve with length iter; Traverse all individuals, for each individual, use the fobj function to calculate its fitness value and store it in the i-th element of the fitness array; use Positions(i,:) to represent the position of the i-th individual; set the maximum number of no improvements to 5, and initialize the no improvement counter to 0.
3. The UAV path planning method based on the global-local equilibrium whale optimization algorithm according to claim 1 is characterized in that: In step 7, the mutation operation includes: The variable step length is calculated based on the current iteration number s and the maximum iteration number S. The formula is as follows: Calculate the mutation vector, the formula is as follows: Where m is the mutation vector; β = 1.5; rand(1, dim) generates a random number matrix with 1 row and dim columns; The mutation vector is applied to update the position of individual whales, and the formula is as follows: X(t+1)=X(t)+m.
4. The UAV path planning method based on the global-local equilibrium whale optimization algorithm according to claim 1 is characterized in that: Step 8 includes the following sub-steps: Step 81, randomly generate a step size in the range [0, 0.01], and calculate the gradient at the current leader's position according to the following formula: in, represents the gradient at the current leader position; f is the objective function; is a set of unit orthogonal vectors, Dim represents the dimension of the optimization problem to be solved; is the current individual whale position in the i-th dimension; in, is the leader position of the current i-th dimension; ε is a small positive number, set to 10 -6 ; Step 82, calculate new variables X1 and X2 for representing the updated position of the individual by the following two formulas, and calculate the fitness values f1 and f2 of X1 and X2 respectively; The updated step length is obtained according to the fitness values f1 and f2, and the formula is as follows: in, is a scale factor, set to 1.8; step t is the current step length; step t+1 is the updated step size; Step 83, according to the updated step length and the current leader position, the new leader position X_new is calculated using the following formula; go to step 9; 5. The UAV path planning method based on the global-local equilibrium whale optimization algorithm according to claim 1 is characterized in that: In step 10, w1=10, w2=100, w3=10, w4=50.
6. The UAV path planning method based on the global-local equilibrium whale optimization algorithm according to claim 1 is characterized in that: In step 10: 1) Flight length cost function F1: Among them, M ij =(x ij ,y ij , z ij ) is the coordinate of the route point; n is the number of the route points; 2) Threat cost function F2: Among them, α is the set of all threats, the threat caused by obstacles is a cylinder, and its projection center coordinate is O α , with a radius of R α , D is the diameter of the drone, S is the length of the safety buffer zone, and the path formed directly between every two flight points of the drone during flight The distance from the center coordinate is d α ; 3) Altitude cost function F3: Among them, h ij is the jth flight point of path i, h max is the maximum flight altitude, h min The minimum flight altitude is restricted; 4) Smoothing cost F4: Among them, σ1 and σ2 represent the cost coefficients of the turning angle and the climbing angle respectively; θ ij is the climb angle at route point j on path i, θ i,j-1 is the climb angle at the j-1th leg of path i; ψ ij is the turning angle of two adjacent path segments on path i; take Z as the unit vector in the direction of the Z coordinate axis, then θ ij It is expressed as: in, is the path vector The path formed; Among them, M′ ij is the coordinates of the route point M ij The projection point on the plane formed by the x-axis and the y-axis, M′ i,j+1 It is M i,j+1 The projection point on the plane formed by the x-axis and the y-axis, It is M′ ij and M′ i,j+1 The path vector formed by the two points, M′ i,j+2 It is M i,j+2 The x-axis and y-axis form a projection point on the plane. It is M′ i,j+1 and M′ i,j+2 The path vector formed by the two points.
7. The UAV path planning method based on the global-local equilibrium whale optimization algorithm according to claim 6 is characterized in that: h max Set to 200, h min Set to 100.
Citation Information
Patent Citations
Array element failure correction method based on improved whale optimization algorithm
CN111695233A
Power distribution network fault positioning method based on whale optimization algorithm improved by multiple strategies
CN114330630A
Multi-unmanned aerial vehicle path planning method based on whale optimization algorithm
CN115686057A
Well track optimization method and system based on improved whale algorithm
CN116663286A
UUV search path design method based on improved whale algorithm
CN117787517A
Cited By
Unmanned aerial vehicle path planning method and system capable of resisting environmental disturbance
CN120803032A
Urban logistics distribution-oriented unmanned aerial vehicle cluster collaborative path planning method
CN121115883A