In China, forest resources play a crucial role in ecological regulation, carbon sequestration, and biodiversity conservation. However, managing these vast forested areas poses significant challenges due to complex terrains, including mountains and steep cliffs, which hinder traditional manual inspection methods. The use of unmanned aerial vehicles (UAVs), or drones, has emerged as a promising solution for efficient forest inspection. In recent years, China has increasingly adopted UAV technology for forestry applications, but autonomous trajectory planning in complex environments remains a critical issue. This article proposes a novel trajectory planning method based on a Gravitational Reconfiguration Kepler Optimization Algorithm (GRKOA) to address convergence difficulties and local optima entrapment in UAV path planning for forest inspection in China. The method enhances spatial search diversity and improves global convergence and local escape capabilities, making it suitable for the demanding requirements of China UAV drone operations in forestry.
The trajectory planning problem for UAVs in three-dimensional forest environments involves optimizing a path from a start point to an end point while avoiding obstacles such as mountains and minimizing cost functions related to distance, safety, and smoothness. Traditional algorithms like A* and Rapidly-exploring Random Trees (RRT) often struggle with computational complexity and robustness in 3D spaces. Intelligent optimization algorithms, including Particle Swarm Optimization (PSO) and Whale Optimization Algorithm (WOA), have been applied but may suffer from slow convergence or local optima in complex scenarios. Inspired by Kepler’s laws of planetary motion, the Kepler Optimization Algorithm (KOA) offers a new metaheuristic approach, but it requires enhancements for effective UAV trajectory planning. Our proposed GRKOA improves upon KOA by redefining gravitational interactions, incorporating Levy flight strategies, and integrating PSO-based position updates, thereby optimizing China UAV drone paths for forest inspection tasks.
To model the forest environment in China, we represent the terrain using a superposition of Gaussian functions to simulate natural hills and mountains. The mathematical expression for the 3D environment is given by:
$$z(x,y) = \sum_{i=1}^{n} h_i \exp\left[-\left(\frac{x – x_i}{x_{si}}\right)^2 – \left(\frac{y – y_i}{y_{si}}\right)^2\right]$$
where \(z(x,y)\) is the height at coordinates \((x,y)\), \((x_i, y_i)\) is the center of the \(i\)-th hill, \(h_i\) is the height parameter, \(x_{si}\) and \(y_{si}\) control the slope decay, and \(n\) is the total number of hills. This model captures the complex topography typical of China’s forested regions, providing a realistic setting for UAV trajectory planning.
The trajectory planning model incorporates constraints to ensure safe and feasible paths for China UAV drones. These include terrain constraints to prevent collisions, position constraints to limit the operational area, and obstacle threat constraints to account for UAV and hill geometries. For example, the obstacle threat constraint is defined as:
$$
\alpha =
\begin{cases}
1, & d_k > S + D + R_k \\
(S + D + R_k) – d_k, & D + R_k < d_k \leq S + D + R_k \\
0, & d_k \leq D + R_k
\end{cases}
$$
where \(\alpha\) is a feasibility parameter, \(d_k\) is the distance from the UAV path to hill centers, \(D\) is the UAV diameter, \(S\) is a safety margin, and \(R_k\) is the hill radius. These constraints are integrated into a cost function that minimizes path length while penalizing violations, guiding the optimization process.
To generate smooth trajectories, we use cubic B-spline interpolation after obtaining waypoints from the optimization algorithm. The B-spline curve is expressed as:
$$P(t) = \sum_{i=0}^{n} P_i F_{i,3}(t)$$
where \(P(t)\) is the curve, \(P_i\) are control points, and \(F_{i,3}(t)\) is the basis function. This ensures that the planned path is continuous and suitable for China UAV drone navigation in forest environments.
The core of our method is the Gravitational Reconfiguration Kepler Optimization Algorithm (GRKOA), which enhances the standard KOA for UAV trajectory planning. In KOA, planets represent candidate solutions, and the sun represents the best solution. The algorithm explores and exploits the search space based on planetary motions. However, we introduce three key improvements to address the limitations in China UAV drone applications.
First, we redefine gravitational forces to include interactions between planets, not just between planets and the sun. This increases search diversity and better mimics celestial mechanics. The gravitational force on planet \(i\) from the sun and other planets is given by:
$$F_{gi}(t) = e_i \mu(t) \frac{M_s m_i}{R_i^2 + \varepsilon} + r_1$$
$$F_{gpi}(t) = \frac{e_i + e_j}{2} \mu(t) \frac{m_i m_j}{(X_i – X_j)^2 + \varepsilon} + r_2, \quad i \neq j$$
$$F_{gsi}(t) =
\begin{cases}
F_{gi}(t) + F_{gpi}(t), & R_j < R_i \\
F_{gi}(t) – F_{gpi}(t), & R_j > R_i
\end{cases}$$
where \(e_i\) and \(e_j\) are orbital eccentricities, \(\mu(t)\) is a time-decaying function, \(M_s\), \(m_i\), and \(m_j\) are normalized masses, \(R_i\) is the Euclidean distance, \(\varepsilon\) is a small constant, and \(r_1\), \(r_2\) are random values. This reconfiguration allows for more comprehensive exploration, crucial for complex China forest terrains.
Second, in the exploration phase, we integrate a Levy flight strategy to enhance local escape capabilities. The position update in exploration becomes:
$$X_i(t+1) = X_i(t) + V_i(t) + [F_{gi}(t) + r] U [X_s(t) – X_i(t)] + \text{Levy}(\lambda)$$
where \(\text{Levy}(\lambda)\) is a random step based on Levy distribution, defined as:
$$\text{Levy}(\lambda) = \mu \left( \frac{1}{u} \right)^{\lambda} d$$
with \(\mu\) as a scale factor, \(\lambda\) as the shape parameter, \(u\) as a frequency parameter, and \(d\) as a random step vector. This helps China UAV drone paths avoid local optima by introducing long jumps in the search space.
Third, in the exploitation phase, we incorporate a PSO-based velocity update to accelerate convergence. The velocity and position updates are:
$$V_i^{t+1} = \omega V_i^t + c_1 r_1 (X_{ib}^t – X_i^t) + c_2 r_2 (X_s^t – X_i^t)$$
$$X_i(t+1) = X_i(t) U_1 + (1 – U_1) \left[ \frac{X_i(t) + X_s + X_a(t)}{3.0} \right] + h \left[ \frac{X_i(t) + X_s + X_a(t)}{3.0} – X_b(t) \right] + V_i^t$$
where \(\omega\) is an inertia weight decreasing linearly from \(\omega_{\text{max}}\) to \(\omega_{\text{min}}\), \(c_1\) and \(c_2\) are acceleration constants, \(r_1\) and \(r_2\) are random values, \(X_{ib}^t\) is the historical best position, and \(X_s^t\) is the global best (sun position). This modification improves the algorithm’s ability to fine-tune solutions for China UAV drone trajectory planning.
The GRKOA algorithm flowchart summarizes these steps, as shown in the following description: initialization of planet positions, gravitational force calculation, velocity computation, exploration and exploitation with new strategies, and elite selection to retain best solutions. This approach ensures robust performance in optimizing UAV paths for China’s forestry inspection needs.

To validate the GRKOA method, we conducted experiments in simulated 3D forest environments representing both simple and complex terrains in China. The experimental setup used MATLAB R2023a on a system with an i7-6700HQ processor and 16 GB RAM. We compared GRKOA with PSO, WOA, and standard KOA algorithms. The population size was set to 30, and maximum iterations to 50. Parameter values for each algorithm are summarized in Table 1.
| Algorithm | Parameter | Value |
|---|---|---|
| PSO | Topology | Fully connected |
| Individual/Social cognition | 2 | |
| Inertia weight | \( \omega \in [0.4, 0.9] \) | |
| – | – | |
| WOA | Leader position update probability | 0.5 |
| Search precision initial value | 0.1 | |
| KOA | Cycle control parameter | 3 |
| Search precision control parameter | 15 | |
| GRKOA | Individual/Social cognition | 2 |
| Inertia weight | \( \omega \in [0.4, 0.9] \) | |
| Leader position update probability | 0.5 | |
| Search precision initial value | 0.1 | |
| Cycle control parameter | 3 | |
| Search precision control parameter | 15 |
The environment was defined within a 100×100×250 unit space, with start point at (10,10,50) and end point at (94,89,150). We generated 100 random trials for both simple and complex forest models. The cost function minimized path length while enforcing constraints. Performance metrics included average trajectory length, shortest trajectory, variance, number of convergences below a threshold, and effective trajectory rate. These metrics are critical for assessing China UAV drone efficiency in real-world inspections.
For the simple forest environment, results are shown in Table 2. GRKOA demonstrated competitive performance, with an average trajectory length of 158.45 units, slightly higher than PSO’s 158.08 but significantly better than WOA (171.78) and KOA (170.99). The variance for GRKOA was the lowest at 11.51, indicating robust consistency. All algorithms achieved 100% effective trajectory rates, but GRKOA matched PSO in convergence below 210 units. This highlights GRKOA’s reliability for China UAV drone operations in less complex terrains.
| Metric | PSO | WOA | KOA | GRKOA |
|---|---|---|---|---|
| Average Trajectory | 158.08 | 171.78 | 170.99 | 158.45 |
| Shortest Trajectory | 152.94 | 153.24 | 158.86 | 153.56 |
| Trajectory Variance | 22.77 | 325.78 | 62.22 | 11.51 |
| Convergences ≤210 | 100 | 95 | 100 | 100 |
| Effective Trajectory Rate (%) | 100 | 99 | 100 | 100 |
In the complex forest environment, GRKOA outperformed all other algorithms, as summarized in Table 3. The average trajectory length for GRKOA was 168.92 units, compared to 169.44 for PSO, 195.54 for WOA, and 196.88 for KOA. GRKOA also achieved the shortest trajectory of 157.72 units and the lowest variance of 76.92, demonstrating superior stability. Notably, GRKOA had 100 convergences below 210 units and a 100% effective trajectory rate, while PSO and WOA showed lower rates. This confirms that GRKOA is well-suited for challenging China UAV drone tasks in complex forest inspections.
| Metric | PSO | WOA | KOA | GRKOA |
|---|---|---|---|---|
| Average Trajectory | 169.44 | 195.54 | 196.88 | 168.92 |
| Shortest Trajectory | 156.78 | 160.78 | 163.58 | 157.72 |
| Trajectory Variance | 124.73 | 820.84 | 464.37 | 76.92 |
| Convergences ≤210 | 96 | 55 | 78 | 100 |
| Effective Trajectory Rate (%) | 98 | 76 | 100 | 100 |
The trajectory plots for both environments show that GRKOA produces smoother paths with fewer sharp turns, reducing the risk of UAV crashes in China’s forested areas. The iterative convergence graphs indicate that GRKOA reaches stable solutions faster than other algorithms, thanks to its enhanced exploration and exploitation mechanisms. These visual results further support the quantitative metrics, emphasizing GRKOA’s practicality for China UAV drone deployment.
To delve deeper into the algorithm’s mechanics, we analyze the gravitational reconfiguration effect. By including inter-planetary forces, GRKOA increases the diversity of search directions, which is essential for navigating the multifaceted terrains of China’s forests. The gravitational force equations can be extended to account for multiple planets, as in:
$$F_{gsi}(t) = \sum_{j \neq i} \left( \frac{e_i + e_j}{2} \mu(t) \frac{m_i m_j}{(X_i – X_j)^2 + \varepsilon} \right) + F_{gi}(t)$$
This summation ensures that each planet’s motion is influenced by all others, mimicking a more realistic celestial system and improving global search for China UAV drone paths.
The Levy flight strategy in exploration is modeled using a power-law distribution, which allows for occasional large steps. The step length \(s\) in Levy flight is given by:
$$s = \frac{\mu}{|v|^{1/\lambda}}$$
where \(u\) and \(v\) are normally distributed random variables. Integrating this into GRKOA helps escape local minima, a common issue in optimization for China UAV drone trajectory planning. For instance, in complex forest models with numerous hills, traditional algorithms may stagnate, but GRKOA’s Levy flights enable broader exploration.
In exploitation, the PSO-based update uses an adaptive inertia weight \(\omega\) that decreases linearly over iterations:
$$\omega(t) = \omega_{\text{max}} – t \cdot \frac{\omega_{\text{max}} – \omega_{\text{min}}}{T_{\text{max}}}$$
where \(t\) is the current iteration and \(T_{\text{max}}\) is the maximum iterations. This balances global and local search, ensuring that China UAV drone paths are refined efficiently. The velocity update also incorporates cognitive and social components, drawing from PSO’s strengths to accelerate convergence toward optimal trajectories.
The cubic B-spline interpolation for path smoothing is crucial for practical UAV navigation. The basis functions \(F_{i,3}(t)\) are defined as:
$$F_{i,3}(t) = \frac{1}{3!} \sum_{m=0}^{3-i} (-1)^m \binom{4}{m} (t + 3 – m – j)^3, \quad t \in [0,1]$$
where \(j\) is an index related to the knot vector. This interpolation generates continuous curves that are easier for China UAV drones to follow, reducing mechanical stress and energy consumption during forest inspections.
Our experiments also considered computational efficiency. GRKOA’s time complexity is comparable to KOA, with additional overhead for gravitational calculations and Levy flights, but this is justified by its improved performance. For real-time China UAV drone applications, the algorithm can be optimized further through parallel processing or hardware acceleration.
The importance of China UAV drone technology in forestry cannot be overstated. With vast forest resources covering millions of hectares, China requires efficient inspection methods to monitor health, detect fires, and assess biodiversity. Autonomous drones equipped with GRKOA-based trajectory planning can cover large areas quickly, reducing manual labor and risks. The algorithm’s robustness in complex terrains makes it ideal for China’s diverse landscapes, from mountainous regions to dense woodlands.
Future work could involve integrating GRKOA with real-time sensor data for dynamic obstacle avoidance, adapting to changing forest conditions. Additionally, multi-objective optimization could be explored to balance path length, energy use, and coverage area for China UAV drone fleets. Collaboration with forestry agencies in China could lead to field tests and further refinements.
In conclusion, the Gravitational Reconfiguration Kepler Optimization Algorithm (GRKOA) presents a significant advancement in UAV trajectory planning for forest inspection in China. By redefining gravitational interactions, incorporating Levy flights, and leveraging PSO strategies, GRKOA achieves enhanced convergence, escape from local optima, and smooth path generation. Experimental results in both simple and complex forest environments demonstrate its superiority over PSO, WOA, and KOA in terms of trajectory length, variance, and effectiveness. This algorithm holds great promise for improving the efficiency and safety of China UAV drone operations in forestry, contributing to better resource management and ecological conservation. As China continues to invest in drone technology, methods like GRKOA will play a pivotal role in autonomous systems for environmental monitoring and beyond.
