In the era of rapid automated warehouse logistics, the path planning of UAV drones has become a critical research topic. An efficient path planning algorithm for UAV drones should yield short trajectories, minimal flight time, safe obstacle avoidance, high scheduling efficiency, balanced payload distribution, and excellent scalability. Many classical optimization algorithms have been applied to this problem, yet they often suffer from premature convergence, poor global search capability, or high computational cost. To address these limitations, we propose an improved whale optimization algorithm (IWOA) tailored for UAV drone path planning. Our algorithm integrates Tent chaotic map initialization, nonlinear dynamic parameter adjustment, and an adaptive inertia weight factor. Extensive simulations in two‑dimensional and three‑dimensional complex environments, including a realistic warehouse scenario, demonstrate that IWOA significantly reduces path length and computation time while ensuring collision‑free and smooth trajectories. Experimental comparisons with six state‑of‑the‑art algorithms confirm the superiority of our approach.

1. Introduction
Autonomous navigation of UAV drones in complex environments requires solving a multi‑constraint optimization problem. The objectives are to minimize flight distance and time while avoiding obstacles and respecting kinematic constraints. Traditional methods such as genetic algorithms, particle swarm optimization, and ant colony optimization have been widely used, but they often exhibit slow convergence or become trapped in local optima. The whale optimization algorithm (WOA) is a recent metaheuristic that mimics the bubble‑net hunting behavior of humpback whales. Although WOA is simple and requires few parameters, its random initialization and fixed parameter settings limit its performance in UAV drone path planning. Therefore, we develop an improved version called IWOA that enhances global exploration, accelerates convergence, and avoids premature stagnation. We validate IWOA on a suite of benchmark functions and then apply it to UAV drone path planning in various obstacle layouts.
2. Standard Whale Optimization Algorithm
The standard WOA emulates three hunting phases: searching for prey, encircling prey, and bubble‑net attacking. The mathematical model is as follows.
2.1 Searching for Prey
Whales randomly search based on their mutual positions:
$$ D_1 = |C \cdot X_{\text{rand}}(t) – X(t)| $$
$$ X(t+1) = X_{\text{rand}}(t) – A \cdot D_1 $$
where \(t\) is the current iteration, \(X(t)\) the current position vector, \(X_{\text{rand}}(t)\) a randomly selected whale position, and \(A\) and \(C\) are coefficient vectors defined as:
$$ A = 2\alpha r – \alpha, \quad \alpha = 2\left(1 – \frac{t}{T}\right), \quad C = 2r $$
with \(r \in [0,1]\) and \(T\) the maximum number of iterations.
2.2 Encircling Prey
When \(|A| < 1\), whales shrink their positions toward the current best solution:
$$ D_2 = |C \cdot X^*(t) – X(t)| $$
$$ X(t+1) = X^*(t) – A \cdot D_2 $$
where \(X^*(t)\) is the best position in the current population.
2.3 Bubble‑Net Attack
This phase combines shrinking encircling with a spiral movement:
$$ D_3 = |X^*(t) – X(t)| $$
$$ X(t+1) = D_3 \cdot e^{bl} \cos(2\pi l) + X^*(t) $$
where \(b\) is a constant defining the spiral shape and \(l \in [-1,1]\). The overall update rule depends on a probability \(\rho \in [0,1]\):
$$ X(t+1) = \begin{cases}
X^*(t) – A D_2, & (\rho < 0.5) \land (|A| < 1) \\
D_3 e^{bl} \cos(2\pi l) + X^*(t), & \rho \ge 0.5 \\
X_{\text{rand}}(t) – A D_1, & (\rho < 0.5) \land (|A| \ge 1)
\end{cases} $$
3. Improved Whale Optimization Algorithm (IWOA)
Standard WOA suffers from poor diversity in initial population and unbalanced exploration‑exploitation. We introduce three modifications to overcome these drawbacks.
3.1 Tent Chaotic Map Initialization
Instead of random initialization, we use the Tent chaotic map to generate the initial population. This map provides randomness, regularity, and ergodicity, enhancing diversity and helping the algorithm escape local optima. The Tent map is defined as:
$$ x_{i+1} = \begin{cases} 2x_i, & x_i < 0.5 \\ 2(1 – x_i), & x_i \ge 0.5 \end{cases} $$
Each chaotic sequence is mapped to the solution space, producing high‑quality initial positions for the UAV drone path planning problem.
3.2 Nonlinear Dynamic Adjustment of Parameter \(C\)
In the standard WOA, \(C = 2r\) is purely random. We replace it with a nonlinear function of iteration:
$$ C = 2 – \left(\frac{t}{T}\right)^3 $$
This keeps \(C\) close to 2 in early iterations (promoting global exploration), then rapidly decreases to near 1 in later iterations (focusing on local refinement). The adjustment effectively balances the need for broad search and fine tuning throughout the UAV drone path planning process.
3.3 Nonlinear Dynamic Adjustment of Convergence Factor \(\alpha\)
The original linearly decreasing \(\alpha\) may cause premature convergence. We adopt a cosine‑based decreasing function:
$$ \alpha = \begin{cases} 2\cos\left(\frac{\pi}{2}\frac{t}{T}\right), & P_\alpha(t) \le P_\alpha \\ 2n^2\sin(\pi n), & P_\alpha(t) > P_\alpha \end{cases} $$
where \(P_\alpha\) is a probability threshold and \(n = \text{rand}(0,1)\). In early iterations, \(\alpha\) is large for fast convergence; in later iterations, it becomes small, improving precision and local search capability. This nonlinear adjustment enhances population diversity during UAV drone trajectory optimization.
3.4 Adaptive Inertia Weight
To further refine the position update, we introduce a cosine‑based adaptive weight \(\gamma\):
$$ \gamma = \cos\left(\frac{\pi}{2}\frac{t}{T}+1\right) + 1 $$
During the early phase (\(t < 0.25T\)), \(\gamma\) is high to maintain broad search. In the middle phase (\(0.25T \le t \le 0.75T\)), it gradually decreases, shifting from exploration to exploitation. In the late phase (\(t > 0.75T\)), the low weight strengthens local exploitation and accelerates convergence. The new position update rule for IWOA becomes:
$$ X(t+1) = \begin{cases}
X^*(t) – \gamma A D_2, & (\rho < 0.5) \land (|A| < 1) \\
\gamma D_3 e^{bl} \cos(2\pi l) + X^*(t), & \rho \ge 0.5 \\
X_{\text{rand}}(t) – \gamma A D_1, & (\rho < 0.5) \land (|A| \ge 1)
\end{cases} $$
3.5 Algorithm Flow
The IWOA procedure is summarized as follows:
- Set parameters: \(t\), \(T\), \(\rho\), \(b\), \(l\).
- Initialize population using Tent chaotic map (Section 3.1).
- For each whale, compute fitness and update position according to the new rule (Section 3.4).
- Compare current best with global best and update the best position.
- If termination condition not met, go to step 3; otherwise output the optimal solution.
4. Performance Evaluation on Benchmark Functions
We compare IWOA with six popular algorithms: WOA, particle swarm optimization (PSO), artificial bee colony (ABC), genetic algorithm (GA), ant colony optimization (ACO), and A* algorithm. Nine standard test functions are used: three unimodal (F1–F3) for testing convergence accuracy and speed, three multimodal (F4–F6) for evaluating ability to escape local optima, and three fixed‑dimensional multimodal (F7–F9) for robustness.
| No. | Function | Range | Optimum |
|---|---|---|---|
| F1 | \(F_1(x) = \sum_{i=1}^n x_i^2\) | [-100,100] | 0 |
| F2 | \(F_2(x) = \max_i |x_i|, 1\le i\le n\) | [-100,100] | 0 |
| F3 | \(F_3(x) = \sum_{i=1}^{n-1} [100(x_{i+1}-x_i^2)^2 + (x_i-1)^2]\) | [-30,30] | 0 |
| F4 | \(F_4(x) = \sum_{i=1}^n [x_i^2 – 10\cos(2\pi x_i) + 10]\) | [-5.12,5.12] | 0 |
| F5 | \(F_5(x) = -20\exp(-0.2\sqrt{\frac{1}{n}\sum_{i=1}^n x_i^2}) – \exp(\frac{1}{n}\sum_{i=1}^n \cos(2\pi x_i)) + 20 + e\) | [-32,32] | 0 |
| F6 | \(F_6(x) = \frac{1}{4000}\sum_{i=1}^n x_i^2 – \prod_{i=1}^n \cos(\frac{x_i}{\sqrt{i}}) + 1\) | [-600,600] | 0 |
| F7 | \(F_7(x) = \left[\frac{1}{500} + \sum_{j=1}^{25}\frac{1}{j+\sum_{i=1}^2(x_i-a_{ij})^6}\right]^{-1}\) | [-65,65] | 1 |
| F8 | \(F_8(x) = -\sum_{i=1}^4 c_i \exp\left[-\sum_{j=1}^3 a_{ij}(x_j-p_{ij})^2\right]\) | [0,1] | -3.86 |
| F9 | \(F_9(x) = -\sum_{i=1}^5 [(X-a_i)(X-a_i)^T + c_i]^{-1}\) | [0,10] | -10 |
4.1 Comparison of Weight Strategies
We evaluate three weight strategies: fixed weight, linear weight, and the proposed adaptive inertia weight. Results for unimodal, multimodal, and composite functions are shown below.
| Function type | Weight strategy | Best | Std. Dev. | Convergence iterations | EDBI |
|---|---|---|---|---|---|
| Unimodal | Fixed | 3.21E-5 | 2.1E-6 | 182 | 0.45 |
| Linear | 2.87E-5 | 1.8E-6 | 165 | 0.38 | |
| Adaptive inertia | 1.02E-6 | 5.3E-8 | 121 | 0.22 | |
| Multimodal | Fixed | 4.56E-3 | 3.2E-4 | 327 | 0.87 |
| Linear | 3.12E-3 | 2.7E-4 | 267 | 0.66 | |
| Adaptive inertia | 8.74E-4 | 9.1E-5 | 231 | 0.41 | |
| Composite | Fixed | 1.24E-2 | 1.1E-3 | 496 | 1.12 |
| Linear | 9.87E-3 | 8.4E-4 | 421 | 0.95 | |
| Adaptive inertia | 5.43E-3 | 4.7E-4 | 378 | 0.65 |
The exploration‑development balance index (EDBI) is defined as the ratio of the variance of exploration step sizes to the mean of exploitation step sizes. Lower EDBI indicates a better balance. The adaptive inertia weight consistently yields lower values, confirming its effectiveness.
4.2 Comparison with Other Algorithms
We run each algorithm 50 independent trials on every test function. The best, mean, and standard deviation of the obtained fitness values are recorded.
| Function | Metric | PSO | GA | A* | WOA | ABC | ACO | IWOA |
|---|---|---|---|---|---|---|---|---|
| F1 | Best | 8.101E+01 | 1.534E-55 | 1.460E-08 | 6.374E-23 | 3.334E-48 | 1.177E-15 | 0.000E+00 |
| Mean | -2.088E-02 | 9.755E-30 | 2.171E-06 | 4.286E-13 | 6.623E-27 | -4.385E-10 | 0.000E+00 | |
| Std. dev. | 1.671E+00 | 7.206E-29 | 2.233E-05 | 4.666E-12 | 2.611E-26 | 3.578E-09 | 0.000E+00 | |
| F2 | Best | 4.394E+00 | 1.393E-29 | 9.592E-03 | 2.485E-03 | 1.193E-22 | 2.217E-05 | 0.000E+00 |
| Mean | 4.846E-01 | -6.390E-31 | 1.351E-03 | -4.526E-04 | -1.974E-24 | 1.155E-07 | 0.000E+00 | |
| Std. dev. | 3.559E+00 | 6.449E-30 | 9.290E-03 | 1.153E-03 | 5.614E-23 | 1.880E-05 | 0.000E+00 | |
| F3 | Best | 2.981E+01 | 2.849E+01 | 2.595E+01 | 2.755E+01 | 2.876E+01 | 2.621E+01 | 1.909E+01 |
| Mean | 1.788E-02 | 1.152E-02 | 8.712E-01 | 4.861E-02 | 6.870E-03 | 7.442E-02 | 2.258E-03 | |
| Std. dev. | 1.760E-01 | 2.878E-02 | 4.737E+00 | 1.147E-01 | 3.012E-03 | 2.044E-01 | 2.321E+00 | |
| F4 | Best | 4.462E-01 | 1.927E-28 | 5.321E-24 | 4.855E-02 | 1.379E-24 | 2.149E-05 | 0.000E+00 |
| Mean | 8.138E-01 | 5.815E-29 | 9.839E-25 | 2.841E-02 | 7.915E-25 | 8.779E-06 | 1.090E-72 | |
| Std. dev. | 3.328E-01 | 7.184E-28 | 5.135E-24 | 1.001E+00 | 3.550E-24 | 1.775E-05 | 1.826E-71 | |
| F5 | Best | 4.682E-01 | 0.000E+00 | 7.238E-01 | 0.000E+00 | 3.779E-02 | 1.819E-12 | 0.000E+00 |
| Mean | 3.286E-02 | 2.704E-10 | 1.100E+00 | 4.023E-10 | 1.499E-01 | 3.234E-09 | 2.704E-10 | |
| Std. dev. | 1.265E+00 | 3.682E-09 | 4.000E-01 | 3.682E-09 | 9.297E-02 | 1.799E-08 | 4.130E-09 | |
| F6 | Best | 3.602E+00 | 0.000E+00 | 1.274E-02 | 0.000E+00 | 0.000E+00 | 1.199E-14 | 0.000E+00 |
| Mean | 1.396E+01 | 8.791E-10 | 2.401E-02 | 1.583E-09 | 1.730E-10 | 2.332E-08 | 9.786E-11 | |
| Std. dev. | 2.142E+00 | 8.683E-09 | 1.014E+00 | 1.251E-08 | 8.495E-09 | 1.157E-07 | 5.187E-09 | |
| F7 | Best | 9.980E-01 | 9.980E-01 | 9.980E-01 | 9.980E-01 | 9.980E-01 | 9.980E-01 | 9.980E-01 |
| Mean | 1.053E+00 | 1.132E+00 | 1.054E+00 | 1.331E+00 | 1.051E+00 | 1.112E+00 | 9.980E-01 | |
| Std. dev. | 4.454E-01 | 1.041E+00 | 2.860E-01 | 8.620E-01 | 4.400E-01 | 1.101E+00 | 1.185E-07 | |
| F8 | Best | -3.863E+00 | -3.854E+00 | -3.863E+00 | -3.863E+00 | -3.863E+00 | -3.863E+00 | -3.863E+00 |
| Mean | -3.863E+00 | -3.852E+00 | -3.851E+00 | -3.860E+00 | -3.851E+00 | -3.851E+00 | -3.863E+00 | |
| Std. dev. | 1.440E-03 | 6.988E-03 | 6.295E-03 | 1.461E-02 | 1.691E-02 | 8.838E-03 | 6.283E-04 | |
| F9 | Best | -1.015E+01 | -7.242E+00 | -5.095E+00 | -9.814E+00 | -1.015E+01 | -1.002E+01 | -1.015E+01 |
| Mean | -9.569E+00 | -7.004E+00 | -4.505E+00 | -9.152E+00 | -9.950E+00 | -8.035E+00 | -9.099E+00 | |
| Std. dev. | 1.922E+00 | 5.241E-02 | 1.234E+00 | 1.433E+00 | 1.116E+00 | 1.931E+00 | 5.064E-03 |
IWOA achieves the theoretical optimum on F1, F2, F4, F5, F6 (best and mean), and obtains the lowest mean and standard deviation on the remaining functions. These results confirm that IWOA possesses superior convergence accuracy, faster convergence speed, stronger stability, and higher success rate in escaping local optima compared to all six competitors.
5. Path Planning Model for UAV Drone
We formulate the UAV drone path planning problem as finding a safe and time‑optimal trajectory from a start point to a goal point in a given environment, while avoiding obstacles and satisfying kinematic constraints.
5.1 Environment Modeling
Terrain is modeled using a combination of sinusoidal and exponential functions:
$$ z(x,y) = \sin(y + a) + b’ \sin x + c \cos(d \sqrt{x^2+y^2}) + e \cos y + f \sin(f \sqrt{x^2+y^2}) + g \cos y $$
Obstacles are represented as Gaussian peaks:
$$ z(x,y) = \sum_{i’} h_{i’} \exp\left[-\left(\frac{x – y_{i’}}{x s_{i’}}\right)^2 – \left(\frac{y – x_{i’}}{y s_{i’}}\right)^2\right] $$
where \((x_{i’}, y_{i’})\) is the center of the \(i’\)-th obstacle, \(h_{i’}\) its height, and \(x s_{i’}, y s_{i’}\) its horizontal spreads.
5.2 Trajectory Generation
To ensure smoothness and feasibility, we employ cubic B‑spline interpolation on the ordered waypoints generated by the algorithm. The B‑spline curve is defined as:
$$ P(u) = \sum_{i’=0}^n d_{i’} N_{i’,k}(u) $$
where \(d_{i’}\) are control points and \(N_{i’,k}\) are basis functions of degree \(k\). The basis functions satisfy the recurrence:
$$ N_{i’,0}(u) = \begin{cases} 1, & u_{i’} \le u < u_{i’+1} \\ 0, & \text{otherwise} \end{cases} $$
$$ N_{i’,k}(u) = \frac{u – u_{i’}}{u_{i’+k} – u_{i’}} N_{i’,k-1}(u) + \frac{u_{i’+k+1} – u}{u_{i’+k+1} – u_{i’+1}} N_{i’+1,k-1}(u) $$
5.3 UAV Dynamic Model
The UAV drone is controlled by a proportional‑integral‑derivative (PID) system with a cascaded architecture consisting of an attitude loop and a position loop. Sensors (gyroscope, accelerometer) provide state feedback. The PID controller computes motor signals to achieve the desired trajectory. The position of the UAV drone in the North‑East‑Down (NED) coordinate system is described by \((P_n, P_e, h)\), and its attitude by roll angle \(\phi\), pitch angle \(\theta\), and yaw angle \(\psi\). Under IWOA, the UAV drone maintains stable attitude and smooth trajectory during obstacle avoidance.
5.4 Constraints
Flight altitude constraint:
$$ H_{\min} \le z_i \le H_{\max} $$
Turning angle constraint:
$$ \beta_i = \arccos\left(\frac{f_1}{f_2}\right) \le \beta_{\max} $$
where \(f_1 = (x_i – x_{i-1})(x_{i+1}-x_i) + (y_i – y_{i-1})(y_{i+1}-y_i)\) and \(f_2 = \sqrt{(x_i-x_{i-1})^2 + (x_{i+1}-x_i)^2} \cdot \sqrt{(y_i-y_{i-1})^2 + (y_{i+1}-y_i)^2}\).
Pitch angle constraint:
$$ \mu_i = \arccos\left(\frac{Z_i – Z_{i-1}}{\sqrt{(x_i-x_{i-1})^2 + (y_i-y_{i+1})^2}}\right) \le \mu_{\max} $$
5.5 Cost Function
The overall cost comprises three components: threat cost, path length cost, and altitude cost.
Threat cost: related to distance from obstacles:
$$ F_1 = \sum_{i=1}^T q_t, \quad q_t = \begin{cases} d_{t,t-1} \cos\left(\frac{\pi}{3 d_{\min}} d_{t,b}\right), & 0 \le d_{t,b} \le d_{\min} \\ \frac{\sqrt{3}}{3} d_{t,t-1} \cos\left(\frac{\pi}{6 d_{\min}} d_{t,b}\right), & d_{\min} \le d_{t,b} \le 3d_{\min} \\ 0, & d_{t,b} > 3d_{\min} \end{cases} $$
where \(d_{t,b}\) is the distance from the UAV drone to the nearest obstacle at waypoint \(x_t\), \(d_{\min}\) is the safe distance, and \(d_{t,t-1} = \sqrt{(x_t^1 – x_{t-1}^1)^2 + (x_t^2 – x_{t-1}^2)^2 + (x_t^3 – x_{t-1}^3)^2}\).
Path length cost:
$$ F_2 = \sum_{i=1}^T \sqrt{(x_t^1 – x_{t-1}^1)^2 + (x_t^2 – x_{t-1}^2)^2 + (x_t^3 – x_{t-1}^3)^2} $$
Altitude cost: penalizes frequent altitude changes:
$$ F_3 = \sum_{i=1}^T h_t, \quad h_t = \frac{x_{t,t-1}^2}{1 + \cos\left(\frac{2\pi (x_t^3 – H_{\min})}{H_{\max} – H_{\min}}\right)}, \quad x_{t,t-1}^3 = x_t^3 – x_{t-1}^3 $$
The global objective is to minimize the weighted sum:
$$ \min F = \alpha_1 F_1 + \alpha_2 F_2 + \alpha_3 F_3 $$
Using the analytic hierarchy process (AHP), we set \(\alpha_1 = 0.3531\), \(\alpha_2 = 0.4519\), \(\alpha_3 = 0.1950\).
6. Simulation Results
We conduct simulations in three different environments using MATLAB. The compared algorithms include WOA, A*, improved artificial bee colony (IABC), and improved genetic algorithm (IGA). All experiments share the same start and goal points and the same random obstacles.
6.1 Two‑Dimensional Environment
Random circular obstacles are placed in a 2D plane. The resulting trajectories show that IWOA, WOA, IABC, and IGA all successfully avoid obstacles and reach the goal, but the path found by IWOA is shorter and smoother. Quantitative results: Compared to WOA, IWOA reduces the distance by 9.74% and computation time by 23.96%. Compared to IABC, distance decreases by 2.59% and time by 11.82%. Compared to IGA, distance decreases by 4.2% and time by 14.04%. On average, IWOA yields a 5.51% reduction in distance and a 16.6% reduction in time across all comparisons.
6.2 Three‑Dimensional Environment
Random spherical obstacles are generated in 3D space. WOA fails to avoid all obstacles, leading to collisions. IABC and IGA circumvent the obstacles by taking detours, resulting in longer paths. In contrast, IWOA navigates through the obstacles efficiently. Compared to WOA, IWOA reduces distance by 10.07% and time by 6.88%. Compared to IABC, distance decreases by 3.49% and time by 2.72%. Compared to IGA, distance decreases by 4.61% and time by 3.86%. The average improvements are 6.06% in distance and 4.49% in time.
6.3 Warehouse Environment
To test realism, we simulate a warehouse with regularly arranged shelf‑like obstacles (cylindrical columns). WOA again collides with obstacles. IGA produces sharp turns that are impractical for real UAV drone flight. IWOA produces a trajectory that is significantly shorter and smoother than IABC. Compared to IABC, IWOA reduces distance by 7.09% and time by 8.29%. These results confirm that IWOA generates feasible, efficient, and smooth paths for UAV drone navigation in cluttered warehouse environments.
7. Conclusion
We have presented an improved whale optimization algorithm (IWOA) for UAV drone path planning. The enhancements—Tent chaotic map initialization, nonlinear dynamic adjustment of parameters \(C\) and \(\alpha\), and adaptive inertia weight—significantly boost the algorithm’s global search capability, convergence speed, and ability to escape local optima. Extensive tests on nine benchmark functions demonstrate that IWOA outperforms six popular algorithms in terms of accuracy, stability, and robustness. Simulation results in 2D, 3D, and warehouse environments show that IWOA reduces the average path length by 5.51%–7.09% and the computation time by 4.49%–16.6% relative to the compared methods, while always producing collision‑free and smooth trajectories. Future work will focus on hardware‑in‑the‑loop experiments with actual UAV drones and further adaptation of IWOA to dynamic and uncertain environments.
