1. Introduction
With the rapid development of the low-altitude economy, the application of Unmanned Aerial Vehicles [
1] (UAVs)—a core technology in this sector—has garnered significant attention in low-altitude airway planning. UAVs possess autonomous control, high flexibility, and safety, demonstrating immense potential across various fields. Their applications in low-altitude economic scenarios include urban mapping, logistics and transportation, urban monitoring, crop monitoring, environmental protection, and emergency rescue. As smart cities and intelligent transportation systems evolve, the role of UAVs has expanded beyond traditional surveying and monitoring tasks to include scenarios that demand high timeliness and accuracy, such as urban logistics, distribution, emergency medical supply transport, and disaster monitoring and response.
The booming low-altitude economy has catalyzed rapid advancements in UAV technology, particularly in innovations related to intelligence, autonomy, and collaboration. Trajectory planning, a critical aspect of Unmanned Aircraft Systems (UASs), significantly influences the efficiency and safety of mission execution. To navigate the complexities of low-altitude environments and diverse mission requirements, trajectory planning must rapidly calculate collision-free and threat-free paths, while considering multiple factors, including flight path smoothness, mission execution costs, fuel consumption, and flight duration. These demands impose rigorous technical requirements on UAV applications, particularly in complex environments like logistics and distribution within densely populated urban areas and emergency medical rescues. AV path planning must not only avoid static terrain obstacles, but also adapt to dynamic conditions such as weather changes and moving obstacles encountered during flight.
In the field of UAV low-altitude path planning, numerous heuristic search algorithms have been widely applied. For example, the Ant Colony Algorithm [
2] enhances UAV obstacle avoidance and path optimization in complex environments by introducing a dynamic pheromone-updating mechanism. The Particle Swarm Optimization (PSO) Algorithm [
3], when combined with the Simulated Annealing algorithm, forms a hybrid method that significantly improves path planning accuracy and convergence speed in dynamic environments. Similarly, adaptations of the Grey Wolf Optimization (GWO) Algorithm [
4] have optimized its predation and tracking strategies to better suit UAV path planning in 3D environments. Classical algorithms such as A* [
5,
6], the whale optimization algorithm (WOA) [
7], and Dijkstra’s Algorithm [
8] are also widely used in UAV trajectory planning. Recent studies have focused on addressing path planning challenges under specialized conditions. For instance, Zhang et al. [
9] proposed an improved Slap Swarm Algorithm to model UAV trajectory planning for rotary-wing UAVs. Their model considers patrol efficiency, trajectory penalties, and power consumption to overcome issues like low search efficiency and unsmooth paths in open-air warehouse environments. Cherif et al. [
10] formulated the cargo–UAV mission as a multi-objective problem aimed at minimizing energy consumption, reducing handoff events, and ensuring cellular connectivity and reliability along the flight path. Yuan et al. [
11] applied an enhanced PSO algorithm to optimize UAV path planning under terrain constraints, generating new constraint–altitude waypoints based on altitude and terrain resolution data. While these algorithms aim to find optimal or near-optimal paths by simulating natural group behaviors and other heuristic mechanisms, they often encounter practical challenges. Specifically, in complex 3D environments with dynamic obstacles, traditional algorithms are sensitive to initial conditions, parameter settings, and local optimum, which can limit their efficiency and accuracy in real-world applications.
To address this issue, this paper presents an improved whale optimization algorithm that incorporates a reverse learning mechanism and a nonlinear convergence factor to enhance the algorithm’s global search capability and prevent it from falling into local optimum. Experimental validation demonstrates that the improved whale optimization algorithm significantly enhances convergence accuracy and computational efficiency. It is better suited for navigating complex three-dimensional environments, effectively improving the overall performance of UAVs in low-altitude route planning and providing reliable and efficient technical support for low-altitude economic applications. As technology continues to innovate, UAVs are poised to play an increasingly critical role in various low-altitude economic scenarios, including smart cities, precision agriculture, and emergency response. Furthermore, efficient and intelligent route planning algorithms will be key drivers of breakthroughs in UAV technology.
4. Improving the Whale Optimization Algorithm
This section is organized with subheadings and provides a concise description of the experimental results, their interpretation, and the conclusions drawn from the experiments.
The WOA [
14] features a straightforward structure with minimal parameters to adjust, making it suitable for both continuous and discrete optimization problems. However, in some complex high-dimensional scenarios—particularly those involving spatially intricate and multi-peaked landscapes—the WOA’s convergence can be slow. Even after numerous iterations, it may still succumb to a local optimum. In this paper, we propose an IWOA. The IWOA enhances the original algorithm by incorporating reverse learning to increase the diversity of the initial population, transitioning the convergence factor from a linear to a nonlinear decrease, and integrating a random number generation mechanism into the iterative process to balance the algorithm’s global search and local development capabilities. The coordination of global search and local development is a key feature of the IWOA [
15]. The IWOA flowchart is shown in
Figure 4.
4.1. Reverse Learning Initialization
Inverse learning is a commonly used global optimization strategy that is currently proven and applied in many swarm intelligence algorithms [
16]. The idea of reverse learning is to use the current solution and its inverse solution to improve the search efficiency. In the study, it is assumed that the dimension of the search space is D; the population size is N; and the upper and lower bounds of the search space are, respectively,
and
. The initial population is
, where each individual is
, and the inverse solution of the population is
, where each individual of the initial population is
. The formula is as follows:
where
is the reverse learning factor, where
is the random number.
At this point, is the population after calculating the fitness update.
4.2. Nonlinear Convergence Factors
In the WOA,
is the convergence factor [
17], which decreases linearly from 2 to 0, as formulated in Equation (19). At
approaching 2, due to the complexity of the space, the step size of its searching agent decreases rapidly as a result, which makes the exploration range of the global searching phase shrink rapidly, resulting in missing some potential globally optimal regions. The convergence of
in the algorithm from global search to local search can also lead to a premature shift from global search to local search, resulting in local optimums. The convergence of the algorithm from global search to local search can also involve a premature shift, resulting in local optimum. The algorithm converges to a local optimum as
approaches 0. The linearly decreasing convergence property slows down the change in its value, making the step size of the local search less significant and weakening the ability to search around the local optimal solution. To address the above issues, this paper proposes a nonlinear convergence factor with the following specific formula:
In order to ensure that the time is close to 2, at time, is close to 0, and , The . As a result, there is a smaller value of t in the early stages when the need to decline is slow, with little change in the numerator denominator, which results in having less variation in the early stage and the global search capability is improved. In the middle stage, the algorithm’s ability to balance between global and local search is improved because the convergence factor varies nonlinearly. In the late stage, when fast descent is required, a larger value of t makes the rapid descent in the later stages and enhances the local exploitation capability.
4.3. Random Number Generation Mechanism
In population intelligence algorithms, it is common to generate random numbers to improve the algorithm’s global and local search capabilities [
18]. In this paper, the random number generation mechanism is used to optimize the algorithm during individual initialization and position updates. During individual initialization, the random number
is used to determine the prey action to be selected when the individual is updated. For position updates, the random number
is used to determine the predator action to be selected during the individual update. The random number
and parameters
and
are shown in Equations (21) and (22); the index of the individual is selected by the random number. For the calculation of the nonlinear convergence factor, the random number
ensures that
has randomness, as shown in Equation (28), so that different spiral trajectories can be produced and the algorithm can avoid falling into a local optimum.
4.4. Pseudo-Code
In summary, the pseudo-code of the IWOA part of the algorithm flow is shown in Algorithm 2.
Algorithm 2 WOA pseudo-code |
Input: initialized parameters Output: optimal solution |
01: Set the population size N and the maximum number of iterations T 02: Initialize the population by using Equations (28)–(30) and calculate fitness for each individual to determine the best individual 03: While t (t < T), 04: For each search agent, 05: Update 06: Modify the position of the current search agent to ensure it is within bounds 07: Update using Equation (31) 08: Generate p for current agent 09: For each dimension j = 1 to dim 10: Generate random values r1 = rand(), r2 = rand() 11: If , 12: If , 13: Use Equation (19) to update the position of the current search agent 14: Else, 15: Use Equation (25) to update the position of the current search agent 16: End If 17: Else, 18: Use Equation (24) to update the position of the current search agent 19: End If 20: End For 21: Check if any search agent goes beyond the bounds and amend it using constrains 22: Calculate the fitness of each search agent 23: Update 24: t = t + 1 25: End While |
As shown in pseudo-code table line 02, the reverse learning mechanism is incorporated during the initialization phase. By generating new candidate solutions across the solution space via reverse learning, this mechanism effectively broadens the initial population’s coverage, enhancing diversity and reducing the risk of early convergence to local optimum. In code table line 07, the second enhancement focuses on adjusting the convergence behavior of vector . By optimizing the nonlinear convergence factor, the search strategy transitions from exploration to exploitation, enabling the algorithm to converge more rapidly towards known optimal solutions. Code table lines 08–10 illustrate the third improvement, namely the inclusion of a random number generation mechanism. This mechanism independently generates a random value in each iteration and applies independent random variables to each dimension within the inner loop, increasing the probability of discovering globally optimal solutions and reducing early convergence risks. Finally, as shown in code table line 21, rather than confining search agents to the boundary when they exceed it, this study introduces a constraint-handling strategy. For individuals that surpass the boundary, a random position near the boundary is assigned, allowing search agents to explore the boundary region, which increases the likelihood of finding improved solutions.
5. Simulation Verification and Result Analysis
In this study, the 3D space is planned as a 100 × 100 × 100 grid, and 30 sittings of peaks are randomly generated, as shown in
Figure 5.
No-fly zones are also planned in space, which are non-flyable cylinders with base coordinates and radii, as shown in
Table 1.
5.1. Simulation Results
As mentioned earlier, the whale optimization algorithm was modified to study UAV trajectories. Both algorithms used the same start and end points in a 3D Cartesian coordinate system; the value of
is set as the height of the surface on which the given starting point or ending point lies plus ten. The computation was set to three times, the population size was set to 80, and each computation was iterated 500 times for a total of six experiments. The performance information of the two algorithms for six test cases is shown in
Table 2; the simulation results are shown in
Figure 6; and the convergence results are shown in
Figure 7.
The IWOA employs a reverse learning strategy during the initialization phase to generate a set of solutions relative to the initial solution. This approach effectively broadens the distribution of solutions and enhances the algorithm’s exploration capabilities, allowing it to achieve a better balance between global and local search throughout the optimization process. The accompanying figure illustrates that the IWOA curve declines more rapidly and smoothly, indicating that the algorithm quickly approaches the optimal solution in the early stages, while maintaining stable convergence in the later stages. In contrast, the traditional WOA tends to focus more on exploration during the initial phase and shifts to exploitation later. However, it sometimes loses the ability to adequately explore the local optimum. This is evident from the figure, which shows that the WOA curve declines more slowly and exhibits significant fluctuations around 150 iterations, suggesting that the algorithm may become trapped in local optimum.
5.2. Results Analysis
The simulation results of both algorithms in a unified environment are presented in
Figure 6. When addressing the 3D trajectory planning problem, both algorithms successfully plan smooth trajectories between the starting and ending points, effectively avoiding collisions with mountains and no-fly zones. From the front view in
Figure 6(a1–a6), it is evident that the IWOA selects a shorter route to circumvent the mountain, resulting in a more efficient trajectory. Additionally, the top view in
Figure 6(b1–b6) shows that the IWOA generates a smoother path while avoiding the mountain and no-fly zones, which significantly enhances the UAV’s flight safety. This improvement can be attributed to the WOA’s tendency to enter the local search too early, leading to local optimum. Moreover, the data in
Table 2 indicate that the IWOA improves the fitness value by approximately 7.00%, reduces the optimal distance by about 10.05%, and decreases the standard deviation by roughly 28.73% compared to the WOA. The relevant data are shown in
Table 2.
Table 2.
Algorithm performance information.
Table 2.
Algorithm performance information.
Number | Location | Algorithm |
---|
Start | End | WOA | IWOA |
---|
Optimal Fitness | Optimal Distance | Variance | Optimal Fitness | Optimal Distance | Variance |
---|
1 | (35, 2, 10.69) | (75, 80, 38.48) | 87.37 | 129.02 | 99.89 | 44.84 | 99.46 | 42.05 |
2 | (12,10,75.54) | (65, 80, 57.47) | 70.28 | 99.74 | 81.24 | 70.02 | 97.63 | 66.67 |
3 | (5, 5, 19.71) | (90, 90, 144.64) | 168.09 | 194.49 | 123.47 | 162.01 | 190.27 | 100.08 |
4 | (60, 95, 11.20) | (95, 10, 42.75) | 92.02 | 149.80 | 64.49 | 88.48 | 135.07 | 41.39 |
5 | (40, 1, 10.07) | (99, 80, 33.07) | 387.3 | 176.39 | 125.78 | 369.6 | 163.68 | 95.53 |
6 | (1, 1, 11.20) | (90, 70, 35.14) | 532.29 | 295.43 | 197.11 | 508.75 | 253.71 | 147.39 |
A comprehensive analysis reveals that the incorporation of improved methods—such as reverse learning, a nonlinear convergence factor, and a random number generation mechanism—effectively optimizes the algorithm. The IWOA demonstrates enhanced global and local search capabilities, allowing it to achieve lower total penalties, shorter paths, and smoother trajectories in three-dimensional trajectory planning problems compared to the WOA.
Four common optimization algorithms were selected—PSO: Particle Swarm Optimization [
19]; SWO: spider wasp optimization algorithm; GRO: Gold rush optimizer [
20]; and KOA: Keplerian Optimization Algorithm [
21]—to verify the performance of the IWOA. In the comparison test, the populations of the IWO algorithm and WOA proposed in this paper, along with the remaining six algorithms, are set to 50, and the maximum number of iterations is set to 100; the test results are shown in
Figure 8 and
Figure 9.
In this paper, the time complexity and space complexity of the algorithms are computed using the tic, toc, and memory functions. The population is set to 30 and the maximum number of iterations is 100. The data obtained under the same conditions are shown in the table below. From
Table 3, it is clear that the IWOA takes the least amount of time to compute, followed by the KOA, PSO, GRO, and ACO. The KOA takes up the most storage space, particularly the ACO, GRO, PSO, and IWOA.
6. Conclusions
In this paper, we introduce the IWOA, an enhancement of the conventional WOA that incorporates inverse learning, nonlinear convergence factors, and a random number generation mechanism. Inverse learning functions as an effective initialization and search strategy; it generates both regular solutions and their corresponding inverse solutions. This dual-solution generation method enables the initial and inverse solutions to cover distinct regions of the search space, as the inverse solutions are created according to specific rules that differentiate them from regular solutions in terms of value and position. Consequently, this approach mitigates the problem of over-concentration in solution distribution and assists the algorithm in avoiding local optimum.
Traditional optimization algorithms typically use linear convergence factors to manage the transition between the exploration and exploitation phases. In contrast, nonlinear convergence strategies offer a smoother and more flexible exploration and exploitation process through more sophisticated control mechanisms. For instance, a nonlinear convergence factor may adjust its value based on a complex function related to the iteration number or the current solution quality, allowing the algorithm to adaptively modify the search step size compared to a simple linear decrease. Additionally, random number generation plays a crucial role in optimization algorithms by enhancing diversity and preventing convergence to local optima.
With these enhancements, the inverse whale optimization algorithm (IWOA) significantly outperforms traditional methods such as the conventional whale optimization algorithm (WOA), Particle Swarm Optimization (PSO), and other similar algorithms. As a result, the IWOA is particularly well suited for UAV trajectory planning under various constraints in simulation experiments. The improvements effectively address the issue of local optimum, enhance the algorithm’s capability to manage individual boundary constraints, and ensure its applicability across a range of optimization problems. Future research will focus on exploring additional influencing factors to enrich the model and will also focus on UAV trajectory planning in dynamic environments.