Abstract
Path planning, which is needed to obtain collision-free optimal paths in complex environments, is one key step within unmanned aerial vehicle (UAV) systems with various applications, such as agricultural production, target tracking, and environmental monitoring. A new hybrid gray wolf optimization algorithm—SSGWO—is proposed to plan paths for UAVs under three-dimensional agricultural environments in this paper. A nonlinear convergence factor based on trigonometric functions is used to balance local search and global search. A new relative-distance fitness adaptation strategy is created to increase the convergence speed of the SSGWO. Integrating the simulated annealing (SA) algorithm, an alternative position update strategy based on SA is proposed to improve the search process with diverse capabilities. Finally, a B-spline curve is introduced into a smooth path to ensure the path’s feasibility. The simulation results show that the SSGWO algorithm has better convergence accuracy and stability, and can obtain higher-quality paths in a three-dimensional environment, compared with GWO, MGWO, IGWO, and SOGWO.
1. Introduction
Unmanned aerial vehicles (UAVs) can execute flight tasks autonomously without direct human control []. In applications such as disaster reconnaissance, target tracking, communications relays, aerial photography, agriculture, environmental monitoring, and mine exploration, UAVs play indispensable roles. The degree of agriculture informatization seriously affects the development of human beings. Unmanned aerial vehicles (UAVs) are becoming increasingly important in agricultural practices with numerous innovations and improvements []. Equipped with high-resolution cameras and multi-spectral sensors, UAVs can monitor farmland in a quick and accurate way. With GPS technology and intelligent control systems, UAVs have great significance in achieving the goals of precision agriculture, such as sowing, fertilizing, and fixed-point spraying.
UAV path planning in agricultural production has become a concentrated research area. However, in the complex environments of agricultural areas, UAVs will encounter diverse threats and obstacles when navigating, which bring risks to flight missions. Therefore, the implementation of effective path planning becomes crucial. This not only enhances the obstacle-avoidance capabilities of UAVs, but also serves to minimize flight costs to meet the practical requirements of agricultural tasks, considering multiple factors such as flight efficiency, obstacle avoidance, safety, and traffic laws []. The problem of path planning is inherently intricate, so it needs to be solved with a combination of mathematical modeling and computer algorithms []. With increasing mission complexity in dynamic, changing environments, UAV path planning must employ real-time, high-performance, and diversified approaches to ensure the safe and efficient completion of UAV flight missions []. Several algorithms have been proposed, including a graph search approach, the A* algorithm [], particle swarm optimization (PSO) [], a genetic algorithm (GA) [], a heuristic algorithm, and a reinforcement learning model []. However, these algorithms still have some limitations in path planning. For instance, graph search methods may encounter efficiency challenges with large search spaces or multiple goals, given their need to traverse an extensive array of potential paths. The A* algorithm is affected by the search space. When the search space is very large, the computational complexity of the algorithm will increase sharply, resulting in a long operation time []. In actual flight, the diverse constraints and performance characteristics of UAVs will result in substantial cost disparities among different path segments. This intricacy restricts the applicability of dynamic programming to actual path planning, leading to inconsistencies between the planning results and the actual situation []. At the same time, these algorithms may fall in local optima, so that the planning results are not the globally optimal paths.
Heuristic algorithms are types of computing methods used to solve complex optimization problems. Without relying on domain-specific knowledge, heuristic algorithms operate based on general heuristic principles to search the solution space for a given problem. Metaheuristic algorithms are usually more general and work similarly to heuristic behaviors in nature: for example, simulated annealing, genetic evolution, ant colony searching, etc. Typically organized as a cohort of individuals, these algorithms iteratively refine themselves to discover optimal or near-optimal solutions. Yu et al. [] proposed an innovative, adaptive, and selective variation-constrained differential evolution algorithm for UAV path planning for disasters. Combining adaptive and evolutionary strategies, this algorithm enhances adaptability to complex environments and multiple constraints. Phung et al. [] proposed a spherical vector-based SPSO algorithm tailored to path planning in complex environments. This algorithm contributed to subsequent path planning research, incorporates the unique characteristics of spherical vectors, and aims to better adapt to multi-constraint and multi-variable problems. Huang et al. [] introduced an improved quantum particle swarm optimization (QPSO) algorithm to accelerate and improve the efficiency and accuracy of UAV path planning. This algorithm incorporates the idea of quantum computing and searches for the best path by simulating the behavior of particles so as to find the best path more quickly. Chen et al. [] proposed a flower pollination algorithm based on neighborhood global learning. This provided a new idea for improving path planning, but it was not verified in a three-dimensional environment. Mirjalili et al. [] proposed a gray wolf optimization (GWO) algorithm inspired by the gray wolf group hunting mechanism. Compared with some other optimization algorithms, GWO has fewer parameters that need to be adjusted. The algorithm is relatively simple and easy to understand and implement. Although the GWO algorithm performs well in some situations, its adaptability is limited in complex environments and it can easily fall into local optimal solutions. These seriously affect the quality of path planning. In order to enhance GWO for tackling UAV path planning challenges effectively, researchers usually introduce simple adaptive mechanisms or create new combination algorithms to enhance the optimization capabilities of the algorithm. Up until now, the stability of algorithms based on GWO providing quick and accurate methods in complex environments has not been achieved yet. Considering complex agricultural environments, SSGWO—an improved algorithm based on the GWO algorithm—is proposed in this paper to solve the problem of UAV path planning in a three-dimensional agricultural environment. The main contributions of this paper are as follows:
- A new hybrid algorithm, SSGWO, is used to solve the problem of UAV path planning in a three-dimensional agricultural environment.
- An improved nonlinear convergence factor based on trigonometric functions is presented to balance global search capability and local search capabilities with better accuracy.
- A relative-distance fitness adaptation strategy is proposed to improve the solution gradually during the search process and accelerate convergence to the global optimization solution with adaptation capability.
- An alternative position-update strategy based on SA is proposed to improve the search process with diversity capability.
- Multiple benchmark functions were used to verify the performance of the SSGWO algorithm, and the convergence of the algorithm was analyzed.
- The SSGWO algorithm is used to solve the UAV path planning problem in agricultural environments. After smoothing the path with a B-spline curve, our UAV path planning method with SSGWO achieved better experimental results compared with other algorithms.
This paper is organized as follows. Section 2 presents a GWO-related review and the traditional GWO algorithm. Section 3 introduces the SSGWO algorithm in detail. Section 4 introduces flight constraints and path smoothing. Section 5 verifies the effectiveness of the SSGWO algorithm and the UAV path planning method with SSGWO. Section 6 discusses the experimental results. Section 7 summarizes the conclusions of this paper.
2. Related Work
GWO is a heuristic algorithm proposed based on the hunting behavior of gray wolf groups in nature, which is used to solve complex optimization problems. It discovers the optimal solution by simulating the social interaction of gray wolves. It has fewer parameters and stronger global search ability than other swarm intelligence algorithms []. GWO can intelligently adjust the behavior of wolves to adapt to the needs of diverse problems and environments through self-adjusting search strategies. This flexibility makes it perform well in solving diverse optimization problems and improves the convergence speed of the algorithm []. GWO has attracted widespread attention from scholars and has been used in many fields, including job shop scheduling [], parameter extraction [], feature selection [], disease classification prediction [], engineering design [], path planning [], etc. While theoretical analysis and the industrial applications of GWO have achieved fruitful results, some shortcomings still exist, including the low accuracy and slow convergence speed of unimodal functions and the local optima of multimodal functions, which hinder the further development of GWO. In practical applications, the optimization objectives of UAV path planning problems are complex and diverse. In recent years, researchers have explored various variants of GWO. When complex environmental factors and constraints are involved, the GWO algorithm easily falls into the local optimal solution resulting in low search accuracy []. Yang Zhang [] proposed MGWO, which introduced an exponential regular convergence factor strategy, an adaptive update strategy, and a dynamic weighting strategy to improve GWO’s search capabilities. Experimental results prove that its convergence speed and the algorithm’s search ability are improved effectively. Nadimi-Shahraki et al. [] proposed IGWO, an algorithm based on the dimensional learning hunting (DLH) search strategy, to enhance the information exchange between wolves and wolves in their neighborhoods. It can balance their local and global searches and preserve wolf diversity. Dhargupta et al. [] applied Spearman’s coefficient to determine opposition learning for operations on wolves. A GWO algorithm based on reverse learning was proposed, named SOGWO, and its performance was greatly improved. Research in the literature [] combined the communication mechanism and horizontal comparison strategies to propose a constrained optimization algorithm based on the gray wolf approach and applied it to the pathfinding and collision avoidance of UAVs in a three-dimensional environment. The authors of [] divided the search space into multiple dimensionality-reduction subspaces and proposed a parallel co-evolutionary GWO algorithm to overcome the local optima problem caused by the increase in dimensions in the search space.
The GWO algorithm is a swarm intelligence (SI) algorithm and has received extensive attention in recent years []. The structure of the traditional GWO is shown in Figure 1. The traditional GWO divides wolves into four ranks based on their social status and responsibilities: , , , and wolf. The wolf is first-rank, and primarily makes decisions in the hunt. The wolf dominates all other wolves and has the best information about the location of its prey. The wolf is second-rank, and helps the wolf to make decisions. The wolf follows the wolf and can command other lower-rank wolves. The wolf is third-rank. The rest are wolves, belonging to the fourth rank, which is the lowest rank. The predation process has two steps. The first step is to surround the prey. The second step is to attack the prey. The model for surrounding the prey is shown by Formulas (1) and (2):
where is the distance between the gray wolf and the prey, is the current position vector of the prey, is the current position vector of the gray wolf, and is the updated position of the current wolf. and are coefficient vectors indicating disturbances, and can be obtained as follows:
where and are random numbers ranging from 0 to 1, is the current iteration number, is the max iterations, and is a convergence factor decreasing linearly from 2 to 0 during the iteration process. When decreases from 2 to 0 over several iterations, the gray wolf completes the hunt by attacking the prey and stopping the action. controls the balance between mining and exploration. The size of the value indirectly affects the optimization performance of the GWO algorithm. contributes to random behavior in the optimization process and helps the algorithm to explore and avoid local optima.
Figure 1.
Grey wolf hierarchies.
The GWO algorithm solves the target problem by simulating the hunting behavior of wolves. The , , and wolves have more information about the prey and dominate the hunting behavior of different ranks. Other search wolves update their positions relative to them. The model of the attack process is as follows:
where , , and are the distances from wolf to the , , and wolves respectively. , , and are the positions of the , , and wolves respectively. , , , , , and are coefficient vectors. , , and are the final positions of the , , and wolves, and is the final position of the prey.
3. SSGWO Algorithm
3.1. Nonlinear Convergence Factor
Coordinating global search capability and local search capabilities helps GWO to search for optimal solutions. The role of the convergence factor is to balance the global search capability and local search capabilities of the algorithm []. During the iteration process, the convergence factor in the traditional GWO algorithm decreases linearly from 2 to 0 with the number of iterations. However, in a practical search process, the initial stage is required to converge slowly to expand the search space, and the later stage is required to accelerate convergence to improve algorithm efficiency dynamically.
Therefore, , a new nonlinear convergence factor based on trigonometric functions, is proposed, and its expression is shown in Formula (13):
where is the current iteration number and is the max iterations. Figure 2 shows the iteration image for the nonlinear convergence factor.
Figure 2.
Convergence factor curve.
As shown in Figure 2, the original convergence factor decreases linearly during the iteration process. The improved convergence factor changes slightly in the early stage of iteration and remains high for a long time. Thus, with a high value for a long time improves global search capability. In the later stage of iteration, the status of and is exactly the opposite, and local search capabilities are improved. The balance between global search and local search can be obtained with better accuracy.
3.2. Fitness Value
In the process of solving the path planning problem with the GWO algorithm, evaluating the gray wolves individually to select , , , and wolves according to fitness value is necessary []. , , and are the three best wolves. The wolf uses a search with larger strides in order to explore a wider area of the problem space. The and wolves use a moderate search strategy to optimize the solution’s quality further. The other wolves, led by the three best wolves, take smaller steps to avoid premature convergence to the local optimal solution.
In the iterative process, the fitness value proposed in this paper is proportional to adaptability. The closer the relative distance, the greater the fitness value, and the better the adaptability. This fitness adaptation strategy is shown as follows:
where is the coordinates of the current wolf, represents the coordinates of the , , and wolves, respectively, is the number of wolves, and represents the fitness values of the , , and wolves, respectively. is the distance between the current wolf and the , , and wolves, respectively. is the average distance between all gray wolf individuals and the , , and wolves, respectively. The ratio of to is used to represent the distance of the current relative position of the individual, that is, the fitness value. With stride adjustments in the search process, the GWO algorithm can maintain a certain degree of adaptation capability and accelerate convergence to the global optimal solution.
3.3. The Alternative Position Update Strategy Based on SA
In the search process, the wolf is the leader of all other wolves. The wolf is the leader of the and wolves []. The wolf is the leader of the wolves. The position update is as follows:
where , , and are the final positions of the , , and wolves; , , and are the current positions of the , , and wolves; and are the current positions of the wolf individuals, respectively; is the nonlinear coefficient factor, which decreases from 2 to 0; and are different integers in the range of 1 to the number of wolves; and is a random number in [0, 2].
The higher-ranked wolves, which have more information, have greater weights. The weights for the , , and wolves, , , and , are calculated based on the fitness value as follows:
where , , and are the positions of the , , and wolves. , , and are their fitness values, respectively. , , and are the final positions of the , , and wolves. is the final position of the prey.
The SA algorithm, inspired by physical phenomena during metal quenching, is a global optimization algorithm used to find a solution close to the global optimal solution in the search space []. In order to prevent the GWO algorithm from easily falling into local optimal solutions, the SA algorithm is introduced to get the probability of being promoted to an wolf with fitness. The probability enhances the search space of the wolf and creates an alternative position update strategy representing the diversity capability. is obtained as follows:
where represents the fitness value of the wolf in the current iteration and is the fitness value of the wolf after cooling in the current iteration, namely the fitness value of the wolf in the next iteration. represents the temperature of the current iteration and is the temperature after cooling, namely the temperature of the wolf in the next iteration. is the cooling coefficient. The global search ability is improved with this strategy.
3.4. Pseudo Code of SSGWO
SSGWO can jump out of the local optimal solution, improving the ability to search for the global optimal solution, balance global and local search capabilities, and accelerate the convergence speed effectively. Algorithm 1 is the pseudo code of the SSGWO algorithm.
| Algorithm 1 Pseudo code of SSGWO |
| Initialize the wolf population , , and |
| Calculate the fitness of all search agents the first-rank search agent = the second-rank search agent = the third-rank search agent While ( < Max number of iterations) do For each search agent ) do Calculate the weights of the three best wolves Get using Equation (24) Update the position of the agent by Equation (23) End while End for according to Equations (3), (4) and (13) Calculate the fitness of all search agents End while |
The time complexity and space complexity of SSGWO primarily depend on the iteration number and the operations performed in each search agent. The time complexity of initializing the population is O (N) and the time complexity of computing fitness is O (N). The time complexity of each iteration depends on the operations in each search agent. The total iteration time complexity is O (T × N). The space complexity mainly depends on the array storing the search agent positions; each search agent has a location, so its space complexity is O (N). T is the number of iterations. N is the number of search agents.
4. UAV Flight Constraints and Path Smoothing
4.1. Constraint Modeling
In the practical UAV flight process, some performance constraints should be considered to establish a more efficient path. In the optimization process, flight distance, flight angle, and obstacles are considered with cost functions as follows.
- Path distance cost
In the flight mission of a UAV, the limitation of energy and battery capacity is a key factor, which directly affects the flight time and flight range of the UAV []. Therefore, the flight distance of the UAV is limited, and the shortest path that satisfies the constraints should be selected. As shown in Figure 3, if there are intermediate nodes in a path, the path is divided into segments. The current node coordinate is . The path distance cost function is shown in Equation (26):
where is the distance between adjacent nodes and is the penalty coefficient of the path distance.
Figure 3.
Path distance diagram.
- 2.
- Angle change cost
UAV path planning must fully consider angle constraints. By penalizing changes in yaw angle, the path planning method is encouraged to generate smooth, coherent paths []. When the UAV is flying, the changes in yaw angle and pitch angle should be as small as possible. The cost function is as follows:
where and are the penalty values for the changes in yaw angle and pitch angle, respectively, is the number of intermediate nodes in each path; and and are the penalty coefficients for the changes in yaw angle and pitch angle, respectively. and are the current yaw angle and the previous yaw angle, respectively. represents the pitch angle of the current node, and represents the maximum pitch angle. This restriction is to ensure the maneuverability and safety of the UAV without excessive attitude changes during flight. Thus, the UAV can maintain good motion status and stability in the path planning process with quality and efficiency.
- 3.
- Obstacle cost
In complex environments, obstacles are the key factor directly affecting safety and the planning of the UAV []. In order to ensure that the UAV can avoid obstacles and maintain a safe flight, the obstacle cost function is defined by the safety constraint associated with obstacles, as shown in Formula (31):
where is the distance between the current node and an obstacle, is the number of nodes, is the number of obstacles, represents the coordinates of the current node, are the coordinates of the current obstacle, is the radius of the UAV, is the radius of the obstacle, is the safety distance, and is the obstacle penalty coefficient.
- 4.
- Path evaluation cost
Taking into account the path distance, yaw and pitch angle, and the safety constraint associated with obstacles, the path cost function used to evaluate path quality is shown in Formula (33):
where is the path distance cost function, is the yaw angle and pitch angle cost function, and is the obstacle cost function. , , and are the corresponding weight factors, respectively.
4.2. Path Smoothing
In order to ensure the feasibility and smoothness of the path, the B-spline curve strategy is introduced as shown in Figure 4 []. This curve is an interpolation curve, usually used to fit data or generate smooth curves, which can quickly calculate local curve segments without recalculating the entire curve. B-spline converts a given control point into a set of parameters and uses these parameters to calculate points on the curve. The B-spline curve is defined as shown in Formula (35):
where is the current control point. is the current -degree basis function for B-spline, as defined in Formulas (36) and (37):
Figure 4.
Path diagram smoothed by B-spline.
The basic function is determined by a non-decreasing parameter sequence, and is the current parameter node.
5. Experiment Results
5.1. SSGWO Algorithm Performance
The experiment used the 64-bit Windows 10 operating system for testing, and the experimental software used MATLAB R2020b to perform algorithmic operations. In order to verify the performance of the improved SSGWO algorithm, nine benchmark functions were selected for testing. Table 1 gives the detailed descriptions of nine functions, including function expression, number of iterations, range of values, and theoretical optimal values. In order to fully prove the feasibility and accuracy of the SSGWO algorithm and at the same time ensure the relative fairness of the algorithm’s operation results, this paper unifies the algorithm test method and the test data in the simulation experiment. The population number was set to 30, the maximum number of iterations was 500, and all experiments were run independently 50 times to prevent the influence of randomness on the algorithm’s operation results. GWO [], MGWO [], IGWO [], SOGWO [], and the improved algorithm SSGWO from this paper were selected for better optimization results. The simulation experiment compared and recorded the optimal value, average value, and standard deviation of the experimental results. Table 2 records a comparison of the average values and standard deviations of the results of 50 independent runs of the algorithm. The smaller the average value, the higher the optimization accuracy of the algorithm; the smaller the standard deviation, the more stable the algorithm.
Table 1.
Benchmark functions.
Table 2.
Results of benchmark functions.
As shown in Table 2, for the benchmark function f1, the averages and standard deviations for the SSGWO algorithm are better than for the other four algorithms, and the theoretical optimal value is close to 0. Taken together, the optimization effect of the SSGWO algorithm is better than of the other four algorithms; for function f2, the average and standard deviation of the improved algorithm are 1.1463 × 10−85 and 2.7239 × 10−86, respectively. The optimization accuracy and stability of this algorithm are significantly higher than of GWO and IGWO. On average, it is nearly 10 orders of magnitude better than other algorithms in terms of numerical accuracy; for functions f3 and f4, the IGWO algorithm has better search capabilities, but lacks the ability to converge to globally better values, because it does not incorporate an appropriate perturbation strategy. The SSGWO algorithm achieved the best optimization results, and the average value, standard deviation, and optimal value of the algorithm all reached the theoretical optimal value 0. For function f5, the solution accuracy between algorithms shows a small range of differences, with an average difference of only one order of magnitude. Although the optimal value of SSGWO is slightly lower than the accuracy of the MGWO algorithm, the mean and standard deviation are smaller than that of each compared algorithm. This shows that SSGWO has stronger algorithmic optimization capabilities in its test functions; for test function f6, the three indicators calculated by SSGWO are all better than those of the other algorithms, so the optimization accuracy and stability are outstanding; for functions f7, f8, and f9, SSGWO not only achieves the best average value, but its standard deviation is also the smallest, indicating that SSGWO has high robustness.
As shown in Table 2, for the average values among the nine benchmark functions, the average results of the SSGWO algorithm are better than those of the other algorithms, and the average values for functions f1, f4, f7, f8, and f9 all obtained the theoretical optimal value 0; for standard deviation, MGWO and SSGWO achieved the optimal value 0 for functions f7 and f9, SOGWO and SSGWO achieved the optimal value 0 for function f9, and the standard deviation results for the SSGWO algorithm were better than for the others on the benchmark test function.
Compared with the standard GWO algorithm, the SSGWO algorithm achieved better optimization results on nine functions. For function f3, the GWO and SSGWO algorithms achieved similar results; for function f6, the standard GWO algorithm achieved better results. But the mean and standard deviation for SSGWO were better than those for standard GWO.
Compared with the MGWO algorithm, SSGWO obtained better optimization results on the f1 function, and MGWO obtained better optimal values. For functions f2, f3, f5, and f6, all three indicators for SSGWO were slightly better than for MGWO; for the functions f4, f7, f8, and f9, both the mean and standard deviation of SSGWO obtained the theoretical optimal value 0.
Compared with the IGWO algorithm, for function f6, SSGWO and IGWO obtained similar average values and standard deviations; for function f3, SSGWO and IGWO obtained similar average values. For the other functions, the mean and standard deviation of SSGWO were significantly better than for IGWO.
Compared with SOGWO, for function f9, the average, standard deviation, and optimal value for the two algorithms all obtained the theoretical optimal value 0; for other functions, SOGWO achieved better optimization results, but SSGWO was better than SOGWO in that most of the test functions had a higher solution accuracy optimization effect.
The above comparison results indicate that SSGWO exhibits higher solution accuracy and stability compared with the standard GWO, MGWO, IGWO, and SOGWO algorithms across most test functions.
5.2. Path Planning
The main goal of path planning is to find optimal and collision-free trajectories. To assess the effectiveness of the SSGWO algorithm in addressing path planning challenges, the algorithm underwent comparisons with relevant algorithms through simulated examples. MATLAB R2020b software was employed to conduct the simulations.
5.2.1. Path Planning Based on Eight Obstacle Threat Areas
In order to verify the performance of the SSGWO algorithm, this study simulated the flight environment for UAVs in field vegetation areas. The SSGWO algorithm was applied to UAV path planning for verification analysis, and the path was smoothed through the B-spline curve. The size of the flight space was 800 × 800 × 20, and the starting point and end point were [0, 0, 0] and [800, 800, 15], respectively. The cylindrical obstacles and obstacle information are shown in Table 3.
Table 3.
Information 1 on the obstacles.
The GWO, MGWO, IGWO, SOGWO, and SSGWO algorithms were used for path planning and compared. The maximum number of iterations was 500, the initial number of wolves was 30, the simulation experiment was run 50 times, and the number of path nodes M was set to 30. In order to display the path effect more clearly, the three perspectives with the best results are shown in Figure 5, Figure 6 and Figure 7, with five paths in each figure, corresponding to the five different algorithms for UAV path planning under the same environmental constraints, showing a comparison of the path planning trajectories of the five algorithms in the three-dimensional environment. Figure 8 shows the path top view, and Table 4 records the flight records of the UAV, where pitch represents the average pitch angle of the M nodes on the path, yaw represents the average yaw angle difference between two adjacent nodes among the M nodes on the path, and dis-to-obs represents the average distance between the current node and the nearest obstacle among M nodes on the path.
Figure 5.
Perspective 1.
Figure 6.
Perspective 2.
Figure 7.
Perspective 3.
Figure 8.
Top view 1.
Table 4.
Navigation data 1.
As shown in Figure 5, Figure 6, Figure 7 and Figure 8, these five algorithms can effectively find feasible solutions. This fact fully proves that these algorithms have extremely high practical value for practical applications. Compared with traditional mathematical methods, these metaheuristic algorithms show more outstanding practicability in problem solving. They can effectively overcome diversity and uncertainty in complex problems. In terms of optimal results, GWO and the four GWO variants showed different performance. In terms of performance, the GWO algorithm showed relatively weak performance, mainly because it is highly dependent on the first three wolves in the optimization process, which often causes the algorithm to quickly fall into a local optimal solution. The path planned by GWO is the farthest from the obstacle, but the path is too long and is less helpful for practical applications. SSGWO has higher convergence accuracy and stability than the other algorithms. The path found by the SSWGO algorithm is better than for the other four algorithms. Although it is the closest to the obstacle, it ensures the shortest path and also meets the safe distance requirement. The minimum path distance and the average path distance are both optimal values, and in the 50 optimization processes the number of collisions was 0. The path length for SOGWO is shorter, but the planned path has too many inflection points, which affects navigation efficiency and is not conducive to the applications of UAVs.
Through comparative experiments, the SSWGO algorithm can plan feasible and safe optimal paths for UAVs to perform agricultural tasks. Its application in agricultural production can help improve production efficiency and reduce costs. By improving the limitations of the GWO algorithm, a safe and reliable path can be planned stably. This path can not only satisfy various constraints under the premise of optimal cost, but also make full use of the performance of the algorithm to ensure the effectiveness and feasibility of path planning. This improved method has wide applicability for solving practical problems and provides a more reliable and efficient solution for the application of UAV path planning.
5.2.2. Path Planning Based on Twelve Obstacle Threat Areas
In order to further prove the effectiveness of SSGWO, the number of obstacles was increased and tested in a simulation task. As the complexity of the drone flight environment increases, multi-dimensional testing is needed to analyze the performance advantages and disadvantages of various algorithms. By simulating complex environments, the performance of each algorithm can be more comprehensively evaluated and the trajectory planning path maps solved by each algorithm can be generated to test the scalability of the SSGWO algorithm for agricultural UAV path planning under the constraints of 12 obstacle threat areas. The trajectory results are shown in Figure 9 and Figure 10. The obstacle information is shown in Table 5, and Table 6 records the UAV flight records.
Figure 9.
Path planning based on 12 obstacles.
Figure 10.
Top view 2.
Table 5.
Information 2 on the obstacles.
Table 6.
Navigation data 2.
In complex environments with multiple constraints, the path planned by the SSGWO algorithm not only appears to be the shortest, but also maintains the highest level of smoothness. By observing the five algorithms in Figure 9 and Figure 10, it can be clearly seen that, as the complexity of the environment increases, only the paths planned by the two algorithms SOGWO and SSGWO show greater feasibility. In 50 experiments, the number of collisions with the SSGWO algorithm was zero, which means that its planned path is not only the shortest, but also performs best in terms of smoothness. The SSGWO algorithm shows excellent performance under complex environmental models and successfully generates safe and feasible flight paths. This demonstrates SSGWO’s strong adaptability to handle diverse threats and constraints, and proves the feasibility of SSGWO in complex environments.
5.2.3. Path Planning in Agricultural Environments
In order to further verify the adaptability of the SSGWO algorithm in agriculture, a terrain with obstacles in a three-dimensional agricultural environment was simulated. The simulation results are shown in Figure 11 and Figure 12, the obstacle information is shown in Table 7, and the flight records are shown in Table 8.
Figure 11.
Path planning in an agricultural environment.
Figure 12.
Top view 3.
Table 7.
Information 3 on the obstacles.
Table 8.
Navigation data 3.
From Figure 11 and Figure 12, among the five algorithms selected in this paper, only SSGWO and IGWO generated safe paths. However, the path planned by IGWO has some problems, including that the pitch angle is too large, the path is too long, and the path is not smooth enough. Table 8 shows that, in 50 simulation experiments, SSGWO performed well, with only one collision, and the planned path was the shortest. It also satisfied the angle change constraints and obstacle constraints. This proves that the path planned by the SSGWO algorithm is still the shortest and smoothest under the influence of various threats and constraints. This provides a reliable solution for path planning for UAVs in agricultural applications.
6. Discussion
Through simulation tests and comparative experiments, the SSGWO algorithm has good performance in terms of convergence and stability and can create feasible and safe optimal trajectory paths for UAVs when performing tasks. The advantages and disadvantages of the work done in this paper and in other literature are recorded in Table 9.
Table 9.
Comparison of advantages and disadvantages.
The MGWO proposed in [] introduces an exponential regular convergence factor strategy, an adaptive update strategy, and a dynamic weighting strategy to enhance the search performance of GWO, but there are still some potential shortcomings, and the introduction of new strategies and factors may increase the complexity of the algorithm, including the difficulty of implementing and tuning these parameters. This may make it more difficult to understand and use the algorithm.
The IGWO algorithm proposed in [] shows excellent search capabilities, but it has some shortcomings in its ability to converge to the global optimal value. This is due to the lack of appropriate perturbation strategies. This algorithm shows good flexibility and extensive exploration capabilities during the search process, but it is relatively weak in quickly converging to the global optimal solution.
SOGWO, proposed in [], applies Spearman’s coefficient to determine wolf pack operations. Spearman’s coefficient is a non-parametric statistical method that does not depend on the specific distribution of data. It is insensitive to the distribution shape of the data and is suitable for various types of data. The Spearman coefficient is highly sensitive to sorting information, which may result in an inability to accurately reflect small changes in operations. Therefore, the planned path will have more turning points.
7. Conclusions
Aiming at the path planning problem for agricultural UAVs, a new hybrid algorithm named SSGWO was proposed. In this paper, a better convergence factor was proposed; the position update equation was improved; and, combined with a suitable fitness function, the iterative process of the global optimal solution of the GWO algorithm was combined with the SA algorithm. This improves the diversity of the population, avoids falling into the local optimal solution, and enhances the search capability of the SSGWO algorithm. The SSGWO algorithm was effectively applied to solve the three-dimensional UAV path planning problem by converting it into an optimization problem. The optimal path is determined by minimizing the cost function, and, finally, the B-spline curve is used to smooth the path to improve path quality and feasibility. UAV path planning faces multiple challenges, such as energy consumption, flight distance, and safety in real-life applications. This paper considers the cost of yaw angle changes and pitch angles during the path planning process, which effectively prevents the UAV from turning too sharply during flight and improves the stability of overall path planning. The path length cost is considered to make the UAV flight path shorter and reduce energy consumption. In addition, we also considered drone and obstacle costs to ensure that the drone can avoid obstacles and follow the predetermined path. Experimental results show that the SSGWO algorithm has better performance than the GWO, MGWO, IGWO, and SOGWO algorithms. This method has achieved remarkable results in path planning and can better meet flight distance restrictions, safety constraints, and steering angle requirements. The effectiveness and significance of the SSGWO algorithm for agricultural UAV path planning problems were proved.
Although SSGWO has demonstrated notable achievements in algorithmic performance and path planning, this research also has some limitations. There are special environments in agricultural production, such as different types of farmland, climate changes in different seasons, etc., which require higher real-time performance from the algorithm. In future work, we will try to use multi-UAV systems to solve more complex agricultural tasks. Research should explore collaborative operations between UAVs, realize information sharing and collaborative operations between multiple UAVs, and improve the efficiency of agricultural production.
Author Contributions
Conceptualization, J.F. and C.S.; methodology, J.F. and C.S.; software, C.S.; validation, J.F., C.S., J.Z. and Y.D. (Yue Du); formal analysis, J.F.; investigation, J.F., C.S. and Y.D. (Yue Du); resources, C.S.; data curation, J.Z.; writing—original draft preparation, C.S.; writing—review and editing, J.F.; visualization, J.F., C.S., Z.L. and Y.D. (Yuanming Ding); supervision, J.F.; project administration, C.S.; funding acquisition, J.F. All authors have read and agreed to the published version of the manuscript.
Funding
This research was supported in part by the interdisciplinary project of Dalian University (DLUXK-2023-ZD-001).
Data Availability Statement
The data are not publicly available due to privacy restrictions.
Conflicts of Interest
The authors declare no conflict of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| Parameters | Definition |
| UAV | Unmanned aerial vehicle |
| PSO | Particle swarm optimization |
| GA | Genetic algorithm |
| QPSO | Quantum particle swarm optimization |
| GWO | Gray wolf optimization |
| MGWO | Modified grey wolf optimization algorithm for global optimization problems |
| IGWO | Improved grey wolf optimizer for solving engineering problems |
| DLH | Dimensional learning hunting |
| SOGWO | Selective-opposition-based grey wolf optimization |
| SI | Swarm intelligence |
| SSGWO | A UAV path-planning method in three-dimensional space based on the hybrid gray wolf optimization algorithm |
| SA | Simulated annealing |
| B-spline | Basis spline |
References
- Lin, H.X.; Xiang, D.; Ou, Y.J. Review of Path Planning Algorithms for Mobile Robots. Comput. Eng. Appl. 2021, 57, 38–48. [Google Scholar]
- Rahman, M.F.F.; Fan, S.; Zhang, Y.; Chen, L. A Comparative Study on Application of Unmanned Aerial Vehicle Systems in Agriculture. Agriculture 2021, 11, 22. [Google Scholar] [CrossRef]
- Bassetto, M.; Quarta, A.A.; Mengali, G. Generalized sail trajectory approximation with applications to MagSails. Aerosp. Sci. Technol. 2021, 118, 106991. [Google Scholar] [CrossRef]
- Azzabi, A.; Regaieg, M.; Adouane, L.; Nasri, O. Hybrid and multi-controller architecture for autonomous system: Application to the navigation of a mobile robot. In Proceedings of the 2014 11th International Conference on Informatics in Control, Automation and Robotics (ICINCO), Vienna, Austria, 2–4 September 2014; pp. 491–497. [Google Scholar]
- Feng, J.; Zhang, J.; Zhang, G.; Xie, S.; Ding, Y.; Liu, Z. UAV Dynamic Path Planning Based on Obstacle Position Prediction in an Unknown Environment. IEEE Access 2021, 9, 154679–154691. [Google Scholar] [CrossRef]
- Chen, J.; Tan, C.; Mo, R.; Wang, Z.; Wu, J.; Zhao, C. Path planning of mobile robot with A* algorithm based on the artificial potential field. Comput. Sci. 2021, 48, 327–333. [Google Scholar]
- Hu, Z.; Chunyi, F.; Yuan, L. Improved particle swarm optimization algorithm for mobile robot path planning. Comput. Appl. Res. 2021, 38, 3089–3092. [Google Scholar]
- Wang, H.; Zhao, X.; Yuan, X. Robot Path Planning Based on Improved Adaptive Genetic Algorithm. Electron. Optics Control 2022, 29, 72–76. [Google Scholar]
- You, S.; Diao, M.; Gao, L. Deep reinforcement learning for tar-get searching in cognitive electronic warfare. IEEE Access 2019, 7, 37432–37447. [Google Scholar] [CrossRef]
- Azar, A.; Vaidyanathan, S. Computational Intelligence Applications in Modeling and Control; Springer: Berlin/Heidelberg, Germany, 2015. [Google Scholar]
- Sun, C.; Ni, W.; Wang, X. Joint Computation Offloading and Trajectory Planning for UAV-Assisted Edge Computing. IEEE Trans. Wirel. Commun. 2021, 20, 5343–5358. [Google Scholar] [CrossRef]
- Yu, X.; Li, C.; Zhou, J.F. A constrained differential evolution algorithm to solve UAV path planning in disaster scenarios. Knowl.-Based Syst. 2020, 204, 106209. [Google Scholar] [CrossRef]
- Phung, M.D.; Ha, Q.P. Safety-enhanced UAV path planning with spherical vector-based particle swarm optimization. Appl. Soft Comput. 2021, 107, 107376. [Google Scholar] [CrossRef]
- Huang, C.; Fei, J.; Deng, W. A Novel Route Planning Method of Fixed-Wing Unmanned Aerial Vehicle Based on Improved QPSO. IEEE Access 2020, 8, 65071–65084. [Google Scholar] [CrossRef]
- Chen, Y.; Pi, D.; Xu, Y. Neighborhood global learning based flower pollination algorithm and its application to unmanned aerial vehicle path planning. Expert Syst. Appl. 2020, 170, 114505. [Google Scholar] [CrossRef]
- Mirjalili, S.; Mirjalili, S.M.; Lewis, A. Grey Wolf Optimizer. Adv. Eng. Softw. 2014, 69, 46–61. [Google Scholar] [CrossRef]
- Jarray, R.; Al-Dhaifallah, M.; Rezk, H.; Bouallègue, S. Parallel cooperative coevolutionary grey wolf optimizer for path planning problem of unmanned aerial vehicles. Sensors 2022, 22, 1826. [Google Scholar] [CrossRef] [PubMed]
- Peng, T.; Zhou, B. Hybrid bi-objective gray wolf optimization algorithm for a truck scheduling problem in the automotive industry. Appl. Soft Comput. 2019, 81, 105513. [Google Scholar] [CrossRef]
- Rao, R.V.; Savsani, V.J.; Vakharia, D.P. Teaching learning-based optimization: A novel method for constrained mechanical design optimization problems. Comput. Aided Des. 2011, 43, 305–311. [Google Scholar] [CrossRef]
- Long, W.; Cai, S.; Jiao, J.; Xu, M.; Wu, T. A new hybrid algorithm based on grey wolf optimizer and cuckoo search for parameter extraction of solar photovoltaic models. Energy Conv. Manag. 2020, 203, 112243. [Google Scholar] [CrossRef]
- Zhang, C.; Wang, W.; Pan, Y. Enhancing electronic nose performance by feature selection using an improved grey wolf optimization based algorithm. Sensors 2020, 19, 4065. [Google Scholar] [CrossRef]
- Goel, T.; Murugan, R.; Mirjalili, S.; Chakrabartty, D.K. OptCoNet: An optimized convolutional neural network for an automatic diagnosis of COVID-19. Appl. Intell. 2021, 51, 1351–1366. [Google Scholar] [CrossRef]
- Gupta, S.; Deep, K. A memory-based Grey Wolf Optimizer for global optimization tasks. Appl. Soft Comput. 2020, 93, 106367. [Google Scholar] [CrossRef]
- Shao, S.; Peng, Y.; He, C.; Du, Y. Efficient path planning for UAV formation via comprehensively improved particle swarm optimization. ISA Trans. 2020, 97, 415–430. [Google Scholar] [CrossRef] [PubMed]
- Zhang, W.; Zhang, S.; Wu, F.; Wang, Y. Path planning of UAV based on improved adaptive grey wolf optimization algorithm. IEEE Access 2021, 9, 89400–89411. [Google Scholar] [CrossRef]
- Zhang, Y. Modified grey wolf optimization algorithm for global optimization problems. J. Univ. Shanghai Sci. Techol. 2021, 43, 73–82. [Google Scholar]
- Nadimi-Shahraki, M.H.; Taghian, S.; Mirjalili, S. An improved grey wolf optimizer for solving engineering problems. Expert Syst. Appl. 2021, 166, 113917. [Google Scholar] [CrossRef]
- Dhargupta, S.; Ghosh, M.; Mirjalili, S.; Sarkar, R. Selective Opposition based Grey Wolf Optimization. Expert Syst. Appl. 2020, 151, 113389. [Google Scholar] [CrossRef]
- Jiang, W.; Lyu, Y.; Li, Y.; Guo, Y.; Zhang, W. UAV path planning and collision avoidance in 3D environments based on POMPD and improved grey wolf optimizer. Aerosp. Sci. Technol. 2022, 121, 107314. [Google Scholar] [CrossRef]
- Zhao, X. Simulated Annealing Algorithm with Adaptive Neighborhood. Appl. Soft Comput. 2011, 11, 1827–1836. [Google Scholar]
- Cao, H.; Zoldy, M. Implementing B-Spline Path Planning Method Based on Roundabout Geometry Elements. IEEE Access 2022, 10, 81434–81446. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).