Mathematical Problems in Engineering

Mathematical Problems in Engineering / 2021 / Article

Research Article | Open Access

Volume 2021 |Article ID 9935090 |

Chengtian Ouyang, Donglin Zhu, Yaxian Qiu, "Lens Learning Sparrow Search Algorithm", Mathematical Problems in Engineering, vol. 2021, Article ID 9935090, 17 pages, 2021.

Lens Learning Sparrow Search Algorithm

Academic Editor: Haopeng Zhang
Received18 Mar 2021
Revised19 Apr 2021
Accepted24 Apr 2021
Published10 May 2021


In this paper, a lens learning sparrow search algorithm (LLSSA) is proposed to improve the defects of the new sparrow search algorithm, which is random and easy to fall into local optimum. The algorithm has achieved good results in function optimization and has planned a safer and less costly path to the three-dimensional UAV path planning. In the discoverer stage, the algorithm introduces the reverse learning strategy based on the lens principle to improve the search range of sparrow individuals and then proposes a variable spiral search strategy to make the follower's search more detailed and flexible. Finally, it combines the simulated annealing algorithm to judge and obtain the optimal solution. Through 15 standard test functions, it is verified that the improved algorithm has strong search ability and mining ability. At the same time, the improved algorithm is applied to the path planning of 3D complex terrain, and a clear, simple, and safe route is found, which verifies the effectiveness and practicability of the improved algorithm.

1. Introduction

In recent decades, swarm intelligence algorithms have been gradually explored by researchers. The main principles of these algorithms are mostly to solve some optimization problems by simulating or revealing some natural phenomena or processes, such as Particle Swarm optimization (PSO) [1], Grey Wolf Optimizer (GWO) [2], Beetle Swarm Optimization (BSO) [3]. The sparrow search algorithm (SSA) is a group of intelligence algorithms proposed by Xue and Shen [4] in 2020 to simulate the feeding process of sparrows. It has few parameters, simple principles, and easy implementation and is superior to other algorithms in many optimization functions. However, for some complex optimization problems, the algorithm has some problems, such as low search accuracy and slow convergence rate. After the sparrow search algorithm was put forward, many scholars studied and applied it carefully and made improvements. Xin et al. [5] proposed a chaotic sparrow search algorithm (CSSA), which uses tent mapping based on random variables to initialize the population, so as to make the individual position of sparrows more evenly distributed and improve the diversity of the population; in the process of optimization, disturbance and mutation mechanism are used to prevent the algorithm from falling into the local extremum state and improve the global search performance of the algorithm. The effectiveness and feasibility of the algorithm are verified by 12 test functions and image segmentation problems. In addition, they also proposed an improved sparrow search algorithm for image segmentation [6]. Bird swarm algorithm (BSA) [7] is used to optimize the sparrow search algorithm. The benchmark function and multithreshold image segmentation based on interclass variance and Kapur’s entropy verify that the improved algorithm has strong search ability and development ability. Mao et al. [8] proposed an improved sparrow search algorithm which combined Cauchy mutation and reverse learning. At first, a sin chaotic mechanism with infinite folding times is used to initialize the population, and the global optimal solution of the previous generation is introduced into the position updating formula, which speeds up the information exchange of the algorithm. At the same time, the adaptive weight strategy is introduced to coordinate the local and global search ability. Then, the fusion of Cauchy mutation and reverse learning strategy is introduced to make disturbance mutation in the optimal position to produce new solutions with higher quality, which improves the ability of the algorithm to jump out of the local optimum. Eight test functions are used to verify that the algorithm has been greatly improved in global optimization. Liu et al. [9] proposed a modified sparrow search algorithm with application for 3D route planning for UAV. Chaos strategy is introduced to enhance the diversity of the population, and adaptive inertia weight is used to balance the convergence speed and exploration ability of the algorithm. Finally, Cauchy Gauss mutation strategy is used to get rid of the stagnation ability of the later algorithm. Through the comparison of several algorithms in 3D path planning, the improved sparrow search algorithm has strong search ability and the planned route is relatively safe.

Currently, research on sparrow search algorithm has been proposed successively, but the proposed algorithms lack a global improvement mechanism. Although the mapping mechanism is uniform, it is not stable under the sparrow search algorithm with good global results, and it increases the workload of the population. Therefore, a search mechanism with global vision and flexibility is needed to improve the search ability of the sparrow search algorithm. For the above analysis, a lens learning sparrow search algorithm (LLSSA) is proposed. This algorithm uses a reverse learning strategy based on lens learning strategy in the discoverer location update formula to improve the algorithm's vision in the optimal space. A variable spiral search strategy is proposed to enable followers to search in more detail and flexibility. Finally, the current solution is refined by fusing simulated annealing algorithm to find a higher quality solution. Through 15 standard test functions, the effectiveness of LLSSA is verified, and a distinct, simple, and satisfying route is found in the complex three-dimensional path planning.

2. Sparrow Search Algorithm

During the food search process, the sparrow population is divided into two roles: discoverer and follower, which conduct behavioral strategies separately. Discoverers are generally 0.2 of the population size and are the guides of the individual population, leading other individuals in the search for things, so the role of the discoverer is crucial in the population. They have a wide search range. The location update formula for the discoverer is as follows:

In formula (1), represents the current number of iterations and is the maximum number of iterations. denotes the current position of the i-th sparrow in the j-th dimension. is a random number between 0 and 1. is a random number from a normal distribution. L represents a 1 × D matrix with all elements 1. and respectively represent warning and safety values, and , . When , this indicates that the community environment is in a safe state at this time, no predators are found around, and the discoverers can search for food on a wide scale. When is greater than or equal to , this indicates that the individuals within the cluster have found a predator and issued an alarm so that all individuals of the population will make antipredation behavior and the discoverer will lead the follower to a safe location.

To obtain good quality food, the followers would closely follow the discoverers. Some of these followers oversee the discoverers and those discoverers with high rates of predation for food, thus increasing their own nutrition. The positional update for the followers is described below:

In (2), is the optimal position currently occupied by the discoverer, and denotes the current worst position. is a matrix of 1 × D in which an element is only 1 or - 1, with . When , it indicates that the sparrow population is aware of danger, at which point they make antipredation behavior, and the mathematical expression is as follows:

In (3), is the current global optimum. is the control step size parameter and is a random number obeying a normal distribution with mean 0 and variance 1. is a random number, and K represents the direction in which the sparrow moves while also controlling the moving step size. indicates the fitness value of the current sparrow individuals. and are the optimal and worst fitness values within the current search scope, respectively. is the smallest real number, preventing the occurrence of 0 in the denominator. When indicates that the current sparrow is at the boundary of the population and vulnerable to predator attack, the location needs to be adjusted. , which indicates that individual sparrow in the interior of the population is aware of the danger and need to be close to other sparrows to avoid the danger.

3. Inverse Learning Strategy Based on Lens Imaging

It is because of the broad search range and flexible search methods that discoverers can lead the group to find good food. Once the discoverer is trapped in the local optimum, the performance of the overall algorithm will be degraded, so improving the search horizon of the discoverer is particularly important. General learning strategies have achieved good results in some optimization algorithms, but have little effect on the performance of the algorithm, because the general learning strategies carry out reverse solutions in local space, which enriches the diversity of the population, but the search scope is narrow and loses flexibility. In order to improve the searching ability of the discoverer, a reverse learning strategy based on lens imaging [10] is proposed and applied to the individual update position formula of the discoverer. The application of this strategy allows new individuals to be acquired for each iteration, resolving the problems left over from previous general learning strategies. The principle is described as follows.

Definition 1. (reverse point). Set as a point in D-dimensional space, and ; then, the reverse point of is , and .

Definition 2. (base point). Suppose there are several points , for any point with its reverse point to . Euclidean distances are and , so and and is called the base point of and when .
Using one-dimensional space as an example, assume that an individual with a height of is projected as (the globally optimal individual) on the coordinate axis, and a lens with a focal length of is placed at the base position (the midpoint of [a, b] in the figure). An image with a height of can be obtained through the lens imaging process, and its projection on the coordinate axis is . At this time, is such that gives rise to new individuals through a back learning strategy based on the principles of lens imaging. The diagram is shown in Figure 1.
As shown in Figure 1, the globally optimal individual is giving its corresponding reversal point , obtained from the principle of lens imaging:Let , k be the scaling factor, and the inverse point obtained upon transformation isIt follows that when k = 1,Form (6) is called general reverse learning strategy. From the above formulas, it can be seen that general learning strategy is only a specific case of lens imaging learning strategy, and the new individuals obtained by general reverse learning strategy are fixed each time. In high-dimensional complex functions, new individuals with fixed ranges are also likely to fall into local optimum with monotonicity; by adjusting the parameter k, new individuals based on lenses imaging learning strategies are dynamic, which improves population diversity. Extending the formula to D-dimensional space is available:In (7), versus are the j-th dimension components of versus , and and represent the j-th dimension components at the upper and lower bounds of the decision variable, respectively.

4. Variable Spiral Search Strategy

While it is convenient for followers to follow the discoverer in updating their location, it is easy for followers to search blindly and singularly. Inspired by the rotation of the whale algorithm, this paper introduces a variable spiral location update strategy, which allows followers to have a variety of search paths to better update the location, while balancing the global and local search of the algorithm. The spiral search diagram is shown in Figure 2.

In the follower location update process, the helix parameter cannot be a fixed shape, which results in monotonous search methods and the possibility of falling into local optimum, thus weakening the search ability of the algorithm. The parameter is designed as an adaptive variable to dynamically adjust the spiral shape of follower search, which expands the follower’s ability to explore unknown areas, makes the algorithm search more efficient, and improves the algorithm's global search performance. The formula for the variable spiral position update strategy is as follows:

The parameter Z changes according to the number of iterations. The change of Z is determined by the exponential function based on in formula (8), and the size and amplitude of the helix are dynamically adjusted according to the nature of cos function. is the coefficient of change, which is 5 in this paper. Here, L is a uniformly distributed random number of [−1, 1]. Follower location updates range from large to small, find more quality solutions in the early stage, reduce the increase of search useless work in the later stage, and improve the global optimal search performance of the algorithm. At the same time, according to the spiral characteristics, the optimization accuracy of the algorithm is improved.

5. Simulated Annealing Algorithm

Simulated annealing algorithm, derived from the principle of solid annealing, is a probability-based algorithm and a stochastic global optimization algorithm proposed by Metropolis et al. [11]. The simulated annealing algorithm is a classical algorithm and has been studied extensively. Its principle is not described here. The simulated annealing algorithm combines with the improved sparrow algorithm. The simulated annealing algorithm is used to refine the solution found by the sparrow search algorithm each time. It uses the sudden jump of the simulated annealing to get rid of the interference of local optimum and extracts the solution each time. The algorithm has good judgment ability and improves the quality of each solution and tends to be global.

6. Lens Learning Sparrow Search Algorithm

Sparrow search algorithm has deficiencies in the case of multidimensional complex functions. Therefore, this paper presents a lens learning sparrow search algorithm. This algorithm applies the reverse learning strategy based on the principle of lenses to the discoverer stage of sparrow search, improving the diversity of the population and expanding the search range of individual sparrows. In the follower search phase, a variable spiral search strategy is introduced, which makes the follower search more detailed and flexible. Finally, this algorithm is combined with the simulated annealing algorithm, and the previously found solutions are filtered again to obtain the optimal solution. The algorithm works as follows.(1)Initialize the population location, number, and number of iterations.(2)Calculate the fitness function of each group to get the corresponding maximum and minimum values to determine the best and worst position.(3)Calculate the alert value and update the location of the discoverer based on the alert value.(4)Use Levy flight to update the location of the discoverer.(5)Update the position of followers.(6)Perform another sine-cosine search of the follower's location and update the location.(7)Update the locations of sparrows that are aware of danger.(8)Perform simulated annealing operation, as follows:(9)Determine the of each particle at the current temperature , and the formula is as follows:(10)Determine a new global optimal value from the current sparrow individual .(11)Determine whether the termination condition is met or not; if not, return to step (2). If so, proceed to the next step.(12)Output best position and minimum cost. The specific pseudocode is as follows (Algorithm 1).

M: the maximum iterations
PD: the number of producers
SD: the number of sparrows who perceive the danger
R2: the alarm value
N: the number of sparrows
λ: attenuation parameter
Initialize a population of N sparrows and define its relevant
Output: ,
Initialize the population according to equation (5)
t = 1;
While (t < M)
Rank the fitness values and find the current best individual and the current worst individual.
R2 = rand(1)
For i = 1: PD
Using equation (7) and equation (8) update the finder's location;
End for
For i = (PD + 1) : N
Using equation (13) update the follower's location;
End for
For l = 1 : SD
Updating the position of a sparrow individual who is aware of danger according to equation (3);
End for
Perform simulated annealing
Get the current new location;
If the new location is better than before, update it.
t = t + 1
End while
Return: ,

7. Effectiveness Analysis

In order to better see the advantages of the improved strategy, the SPHEREFUNCTION function is taken as an example to analyze the effectiveness of the strategy of the LLSSA algorithm. Let the number of populations and the number of iterations be 50 and 10, respectively, and the individual distribution map after 10 iterations of each algorithm is obtained. The specific distribution maps are shown in Figures 3 and 4.

It can be seen from Figures 3 and 4 that the particles of LLSSA converge faster, most of the individuals are close to the optimal value, and the search range is wider, which is beneficial to jump out of the local optimum, while the particles of SSA converge slower, and the search range is smaller, which is easy to fall into the local optimum state in the high-dimensional complex function. This shows that LLSSA has flexibility in the optimization mechanism and verifies the effectiveness of the three strategies.

8. Time Complexity Analysis

For an algorithm, time complexity is an important consideration, and it is also an important means of judging the amount of calculations of an algorithm. Suppose the population size of the algorithm is P, the maximum number of iterations is M, and the dimension of the problem is D. From a macro point of view, the SSA algorithm is the same as other intelligent optimization algorithms, with a time complexity of O ( × M × D), while the LLSSA algorithm does not add extra cycles in the optimization process, so in the entire algorithm, time complexity did not increase.

From a micropoint of view, suppose the ratio of discoverers is r, the calculation time of introducing reverse learning based on the lens principle is t1, the calculation time of the variable spiral search strategy is t2, and the calculation time of using the simulated annealing algorithm to update the optimal solution is t3. It can be seen from the pseudocode of the algorithm that the LLSSA algorithm adds O (M ×  × r × t1 × D) in the discoverer phase and O (M × (1 − r) ×  × t2 × D) in the follower position update phase. O (M × t3) is added in the update stage of the optimal solution. It can be seen that the LLSSA algorithm has increased O (M × ( × D(r(t1 − t2) + t2)) + t3) compared with the SSA algorithm. However, it has not been improved in the order of magnitude, and the optimization efficiency and accuracy of the algorithm can be effectively improved. Therefore, the increased time complexity is significant and worthwhile.

9. Performance Testing

In order to further verify the feasibility and effectiveness of the improved sparrow search algorithm, this paper selects 15 standard test functions to verify its optimization performance. The specific information is shown in Table 1. In order to ensure the fairness of the experiment, all the algorithms are run on the computer with MATLAB 2018b, Windows 10 operating system, and 8g memory. The number of iterations of each algorithm is 200 and the number of population is 50. The initial temperature is t = 50, λ = 0.75, and the parameters of PSO algorithm are C1 = C2 = 2,  = 0.729.


30[−100, 100]0
30[−10, 10]0
30[−100, 100]0
30[−100, 100]0
30[−30, 30]0
30[−5, 10]0
30[−100, 100]d0
30[−1.28, 1.28]0
30[−500, 500]−418.9829n
30[−500, 500]0
30[−50, 50]0
2[−10, 10]0
2[−4.5, 4.5]0
4[−10, 10]0
2[−65.536. 65.536]0.998

At the same time, in order to exclude the contingency of each algorithm and enhance persuasion, the three indexes of optimal value, average value, and standard deviation of each algorithm's search result are counted, and the three indexes are used to judge the optimization ability and stability of each algorithm.

As can be seen from Table 2, the LLSSA algorithm has the best search performance in F1–7, F10-11, F15 and has better search ability than other algorithms. In the F9 function, BSO is the best. In F13-14, BSO can find the best one, but its stability is poor, and the optimization results on other functions are extremely poor. Therefore, BSO has some limitations in function optimization. LLSSA achieves good results on many function problems. It is inferior only to BSO in F9, which shows that LLSSA has strong optimization ability. Other algorithms have achieved poor optimization results. Therefore, the introduction and fusion of simulated annealing make the sparrow search algorithm have strong local judgment ability, balance the local and global search, and improve the search ability of the algorithm.


SSA05.192E − 2510
GWO1.5739E − 364.5232E − 347.3785E − 34
PSO3.8599E − 123.0697E − 112.7076E − 11

CSSA03.8973E − 1602.1346E − 159
SSA02.2022E − 1448.4437E − 144
GWO1.6295E − 252.9050E − 234.4358E − 23
PSO8.9056E − 082.5055E − 071.4584E − 07

CSSA04.2858E − 1920
SSA07.7137E − 2100
GWO2.2250E − 040.0294310.070791

F4(X)LLSSA01.008E − 1630
CSSA04.1077E − 1412.2499E − 140
SSA4.0636E − 141.9036E − 072.9266E − 07
GWO2.4178E − 066.4757E − 062.1850E − 06
PSO8.1218E − 146.9044E − 137.0838E − 13

F5(X)LLSSA2.2981E − 132.3943E − 053.8273E − 05
CSSA1.3357E − 082.6062E − 040.0015114
SSA4.7653E − 090.000283250.00049636

CSSA02.6949E − 1531.476E − 152
SSA06.9176E − 1393.7889E − 138
GWO1.1787E − 062.2057E − 052.7228E − 05

BSO7.8221E − 462.0384E − 393.2288E − 39
CSSA06.07E − 953.3246E − 94
SSA08.7599E − 974.798E − 96
GWO09.7069E − 2510
PSO1.6341E − 296.6714E − 241.2043E − 23

F8(X)LLSSA8.0687E − 060.00015610.00012633
CSSA9.9226E − 060.000260620.00016246
SSA5.318E − 050.000295820.00025735



F11(X)LLSSA1.04486E − 134.06779E − 109.93488E − 10
CSSA1.09657E − 121.93721E − 083.43612E − 08
SSA2.36977E − 122.78963E − 095.17661E − 09
GWO9.22011E − 060.0198388390.013634913
PSO2.35982E − 060.0416702270.078731524

F12(X)LLSSA1.3498E − 311.3498E − 310
BSO1.3498E − 311.3498E − 310
CSSA1.4730E − 312.3043E − 293.9261E − 29
SSA1.3498E − 313.9049E − 295.2232E − 29
GWO1.0606E − 088.9305E − 077.8567E − 07
PSO1.30489E − 234.7707E − 216.0171E − 21

F13(X)LLSSA6.2457E − 271.1032E − 203.5156E − 20
CSSA4.3789E − 213.2277E − 161.5937E − 15
SSA2.7959E − 211.2661E − 162.7684E − 16
GWO1.2267E − 084.0761E − 074.2024E − 07
PSO1.1013E − 228.1661E − 201.7949E − 19

F14(X)LLSSA6.47687E − 149.70058E − 091.93534E − 08
CSSA1.2546E − 145.2214E − 071.3653E − 06
SSA9.50199E − 131.02709E − 062.50633E − 06


To describe the convergence of each algorithm in each function, the average convergence of each algorithm in each function is counted, and the specific convergence effect is shown in Figure 5. From Figure 5, it can be clearly seen that LLSSA has excellent convergence performance in F1-5, F8, F11-12, F14 functions, which all have advantages in accuracy and speed. However, among F6-7, F9-10, F15 functions, the convergence accuracy is high and the speed is slow, while it has advantages in other functions, but it is not significant. Generally speaking, LLSSA overcomes the limitations of the original algorithm search mechanism, has a reliable optimization scheme, and has greater advantages in speed and accuracy.

Comparing algorithms based on mean and standard deviation alone is not enough. To be more persuasive, statistical tests are needed to verify that the proposed improved algorithm has significant improvement advantages over other existing algorithms. To determine whether each result of LLSSA is statistically significantly different from the best results of other algorithms, the Wilcoxon rank sum test was used at the 5% significance level. The values calculated in the Wilcoxon rank sum test between LLSSA and other algorithms are given in Table 3 for all the benchmark functions. When , the HO hypothesis can be considered rejected, indicating a significant difference between the two algorithms. When , it can be assumed that the HO hypothesis is accepted, indicating that the difference between the two algorithms is not obvious; that is, the optimization performance of the two algorithms is equal. Therefore, an algorithm with equivalent performance in each function is marked as N/A, indicating that it is not applicable. The algorithm differences table is shown in Table 3.


F1 (X)3.0731e − 13N/AN/A3.0731e − 133.0731e − 13
F2 (X)3.0229e − 125.0460e − 060.00336.6628e − 123.0229e − 12
F3 (X)3.0731e − 13N/AN/A3.0731e − 135.0518e − 13
F4 (X)3.0229e − 125.3855e − 061.9198e − 066.6628e − 126.6628e − 12
F5 (X)3.0229e − 123.6614e − 060.00296.6628e − 126.6628e − 12
F6 (X)5.6836e − 130.01784.1170e − 049.8825e − 139.8825e − 13
F7 (X)3.0731e − 132.5775e − 071.0038e − 075.0518e − 136.9262e − 12
F8 (X)3.0229e − 120.00500.00236.6628e − 128.0397e − 12
F9 (X)8.1616e − 042.6075e − 086.3487e − 101.2362e − 101.4748e − 10
F10 (X)N/A3.2490e − 083.2972e − 106.6628e − 126.6628e − 12
F11 (X)3.0229e − 122.2047e − 070.00713.0229e − 123.0229e − 12
F12 (X)N/A4.1939e − 132.1521e − 114.2371e − 137.1756e − 13
F13 (X)0.02442.8131e − 111.8152e − 116.4913e − 076.6628e − 12
F14 (X)1.1648e − 061.9492e − 056.3524e − 063.0229e − 123.0229e − 12
F15 (X)3.5009e − 060.00680.02320.01934.9256e − 10

From Table 3, there is a big difference between each algorithm and LLSSA as a whole. Only on the first two unimodal functions, the basic SSA itself can find the optimal value. Therefore, there is no significant difference between LLSSA, SSA, and CSSA, but only on the F10 function, the value is greater than 0.05. The experimental results show that BSO has better optimization ability on this function.

10. Application and Analysis

The proposal and improvement of an algorithm are ultimately to be implemented in the actual project. Since the development of intelligent optimization algorithms, the improvement of multiple algorithms has been successfully applied to specific applications; for example: literature [12] proposed a novel metaheuristic based on integrating chaotic maps into a Henry gas solubility optimization algorithm, which achieved good results in welding beams and cantilever beams. Reference [13] proposed an adaptive metaheuristic algorithm based on decomposition in order to solve the multitarget complex problem in UAV flight. The above authors have all proposed suitable algorithms in actual problems. Therefore, this paper applies the LLSSA algorithm to the UAV path planning of three-dimensional complex terrain to verify the feasibility and practicability of the LLSSA algorithm.

In recent years, the problem of UAV path planning has been widely favored by researchers. UAV path planning is also one of the problems of automatic control. Common path planning methods include genetic algorithm [14], particle swarm and ant colony algorithm [15], artificial potential field method [16], and gray wolf algorithm, but for complex high-dimensional problems such as path planning, the functions of these algorithms are limited. Many factors considered are difficult for each algorithm. For complex path planning problems, the algorithm is very easy to meet the current minimum cost and give up the overall plan, lack of autonomous learning. Therefore, researchers have made different improvement measures for the deficiencies of each algorithm to make the optimized path more ideal. Aiming at the problem of path planning in three-dimensional complex terrain, this paper proposes to integrate the improved sparrow search algorithm with the simulated annealing algorithm, so that the algorithm avoids the local optimal solution in the solving process and finds a clear and simple path with the smallest cost function.

10.1. Cost Function Design

Cost function is an indispensable part of route planning. The more reasonable the cost function is set, the closer it is to the real demand. The cost function designed in this paper is as follows: represents the total cost of the path, and , , and represent the total length cost, total height cost, and smoothness cost of the path, respectively. , , and are the corresponding weights. In this paper, , , .

The cost function can be used to evaluate the quality of the generated path, which is the basis of iterative evolution of algorithm population. The performance of cost function determines the efficiency and quality of algorithm implementation, and it is also the performance index of path planning. In order to better evaluate the path quality, this paper constructs the fitness function [1719] by comprehensively considering the height cost, length cost, and smoothness cost of the path. Suppose each path is composed of points. x, y are the point coordinates of the terrain projected on the horizontal plane, and z is the height corresponding to the point coordinates on the horizontal plane.

10.2. Path Length Cost

Path length is one of the most important indicators to evaluate the quality of a path. The shorter the path is, the less energy and time consumption the UAV will take to fly. The cost of introducing path length is as follows:

10.3. High Cost

The stable flight height of the UAV is also an important part of the UAV track planning process. For most aircraft, the flight height should not change much. Stable flight height helps to reduce the burden on the control system and save more fuel. Therefore, the cost of introducing track elevation is

10.4. Smoothness Cost

When an UAV is making a turn, it needs to consume some energy due to the air resistance and at the same time exerts some pressure on the body. The smaller the turning angle, the greater the pressure generated and the more energy consumed, making the flight inefficient. Therefore, the smoothness of flight is also a key factor in the cost of flight. represents the degree of deviation between the previous position and this position, and describes the cumulative sum of the degree of deviation of the connected nodes in the entire path. It is used to simulate the turbulence during the flight of the UAV. The smaller the turbulence, the higher the safety inside and outside the UAV.

11. Simulation Experiment and Analysis

In order to verify the feasibility and practicability of the fusion algorithm to optimize the effect of UAV, it is compared with SAPSO, PSO, SSA, and CSSA. The parameters of each algorithm are set as follows: the number of population is 100, the number of iterations is 400, the initial temperature T is 25, λ = 0.99, and the specific experimental model parameters are shown in Table 4. In order to enhance the persuasion of the experiment and reduce the interference of accidental events, each algorithm runs 10 times independently and counts the minimum value, average value, and the worst value of each planned route. The optimal roadmap of each algorithm is shown in Figure 6, the performance index of each algorithm is shown in Table 5, and the average cost function convergence diagram is shown in Figure 7.

NameCoordinateHeight (radius)

Start point(5, 90)
End point(45, 15)8
Obstacle 1(15, 70)4
Obstacle 2(20, 60)3
Obstacle 3(30, 30)4
Obstacle 4(40, 45)3

AlgorithmMINAVERWorst value


As you can see from Figures 6 and 7 and Table 4, the LLSSA and SAPSO algorithms optimize the UAV's path to be the simplest and clearest. The CSSA, SSA, and PSO optimization routes appear to be distorted, obviously falling into a local optimal state. From the performance index table of each algorithm, LLSSA has better convergence accuracy and stability than SAPSO, and other algorithms have poorer stability, with the worst cost value exceeding 50. From the average cost convergence graph, it can be seen that the LLSSA algorithm has extremely fast convergence speed and accuracy. It found a path with the least cost before 50 iterations. The route found by the SSA algorithm is poor, complex, and costly, indicating that the SSA algorithm has limitations in solving such complex multidimensional functions. At the same time, it also shows that in complex path planning problems, the algorithm will meet the current minimum cost and fall into a local optimal state. Therefore, a flexible and judging search mechanism is needed to make the algorithm get rid of the constraints of the complex environment.


LLSSAN/A0.00221.5540e − 041.5540e − 041.5540e − 04
SAPSO0.0022N/A9.3240e − 041.5540e − 041.5540e − 04
CSSA1.5540e − 049.3240e − 04N/A0.0042N/A
SSA1.5540e − 041.5540e − 040.0042N/A9.3240e − 04
PSO1.5540e − 041.5540e − 04N/A9.3240e − 04N/A

Similarly, in order to further verify the feasibility and significance of the algorithm on the UAV route, Wilcoxon test as described above is conducted among the algorithms, and the rank sum test results are shown in Table 6.

It can be seen from Table 6 and the above comprehensive situation that the algorithm that introduces the simulated annealing strategy has a greater advantage in route planning. The performance of the PSO algorithm and the CSSA algorithm is equivalent, and the SSA algorithm is the worst. Applicable to SSA algorithm, a flexible search mechanism and judgment strategy should be added to make the improved SSA algorithm stand out.

12. Conclusion

In this paper, aiming at the problem that the sparrow search algorithm falls into the local optimum and depends on the initial population in the optimization process, the reverse learning strategy based on the lens principle and the variable cosine search strategy are introduced, which are applied to the stage of discoverer and follower, respectively, making the search method more flexible and careful. Then the simulated annealing algorithm is fused to extract the optimal solution. Through the test of standard test function, it can be seen that LLSSA has good optimization ability and convergence effect. It is applied to the path planning of UAV in three-dimensional complex terrain. Through the comparison of CSSA, SSA, SAPSO, and PSO optimization UAV route planning, it shows that LLSSA optimization UAV path is the simplest and clearest, and the cost is the least. Through the planning route index table and the average cost function convergence diagram, it shows that LLSSA has good stability, so its application in UAV path planning has high reliability. It can be seen that in the process of sparrow optimization, if the leading discoverer is limited, the whole algorithm will be paralyzed, and the solution found each time is not necessarily reliable. Therefore, it is extremely important to effectively improve the discoverer's search mechanism and judgment ability. It can be seen from the above experiments that LLSSA relies on the judgment ability of simulated annealing algorithm in complex terrain path planning problems. Although this method can improve the quality of route optimization, it does not necessarily have a good effect in simple path planning problems, and it increases the calculation time, which is still a challenge in multiple complex environments. In the next step, we apply it to the path planning of multimission UAV.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.


This work was financially supported by the Regional Foundation of the National Natural Science Foundation of China (no. 61561024).


  1. J. Kennedy and R. C. Eberhart, “A discrete binary version of the particle swarm algorithm,” in Proceedings of the 1997 IEEE International Conference on Systems, Man, and Cybernetics. Computational Cybernetics and Simulation, vol. 5, IEEE, Orlando, FL, USA, October 1997. View at: Google Scholar
  2. S. Mirjalili, S. M. Mirjalili, and A. Lewis, “Grey wolf optimizer,” Advances in Engineering Software, vol. 69, pp. 46–61, 2014. View at: Publisher Site | Google Scholar
  3. T. Wang and L. Yang, “Beetle swarm optimization algorithm: theory and application,” 2018, View at: Google Scholar
  4. J. Xue and B. Shen, “A novel swarm intelligence optimization approach: sparrow search algorithm,” Systems Science & Control Engineering, vol. 8, no. 1, pp. 22–34, 2020. View at: Publisher Site | Google Scholar
  5. X. Lu, X. Mu, J. Zhang, and Z. Wang, “Chaos sparrow search optimization algorithm,” Journal of Beijing University of Aeronautics and Astronautics, vol. 1–10, 2021. View at: Publisher Site | Google Scholar
  6. X. Lu, X. Mu, and J. Zhang, “Multi threshold image segmentation based on improved sparrow search algorithm,” Systems Engineering and Electronic Technology, vol. 43, no. 2, pp. 318–327, 2021. View at: Google Scholar
  7. X.-B. Meng, X. Z. Gao, L. Lu, Y. Liu, and H. Zhang, “A new bio-inspired optimisation algorithm: bird swarm algorithm,” Journal of Experimental & Theoretical Artificial Intelligence, vol. 28, no. 4, pp. 673–687, 2016. View at: Publisher Site | Google Scholar
  8. T. Mao and Q. Zhang, “Improved sparrow algorithm combining Cauchy mutation and reverse learning,” Computer Science and Exploration, pp. 1–12, 2021. View at: Google Scholar
  9. G. Liu, C. Shu, Z. Liang, B. Peng, and L. Cheng, “A modified sparrow search algorithm with application in 3d route planning for UAV,” Sensors, vol. 21, no. 4, p. 1224, 2021. View at: Publisher Site | Google Scholar
  10. L. Wen, t. Wu, M. Tang et al., “Gray wolf optimization algorithm based on lens imaging learning strategy,” Acta Automatica Sinica, vol. 46, no. 10, pp. 2148–2164, 2020. View at: Google Scholar
  11. P. J. M. Van Laarhoven and E. H. L. Aarts, “Simulated annealing,” Simulated Annealing: Theory and Applications, Springer, Dordrecht, The Netherlands, 1987. View at: Google Scholar
  12. B. S. Yıldız, N. Pholdee, N. Panagant et al., “A novel chaotic Henry gas solubility optimization algorithm for solving real-world engineering problems,” Engineering with Computers, pp. 1–13, 2021. View at: Google Scholar
  13. P. Champasak, N. Panagant, N. Pholdee, S. Bureerat, and A. R. Yildiz, “Self-adaptive many-objective meta-heuristic based on decomposition for many-objective conceptual design of a fixed wing unmanned aerial vehicle,” Aerospace Science and Technology, vol. 100, Article ID 105783, 2020. View at: Publisher Site | Google Scholar
  14. D. Whitley, “A genetic algorithm tutorial,” Statistics and Computing, vol. 4, no. 2, pp. 65–85, 1994. View at: Publisher Site | Google Scholar
  15. M. Dorigo, M. Birattari, and T. Stutzle, “Ant colony optimization,” IEEE Computational Intelligence Magazine, vol. 1, no. 4, pp. 28–39, 2006. View at: Publisher Site | Google Scholar
  16. Y.-b. Chen, G.-c. Luo, Y.-s. Mei, J.-q. Yu, and X.-l. Su, “UAV path planning using artificial potential field method updated by optimal control theory,” International Journal of Systems Science, vol. 47, no. 6, pp. 1407–1420, 2016. View at: Publisher Site | Google Scholar
  17. C. YongBo, M. YueSong, Y. JianQiao, S. XiaoLong, and X. Nuo, “Three-dimensional unmanned aerial vehicle path planning using modified wolf pack search algorithm,” Neurocomputing, vol. 266, pp. 445–457, 2017. View at: Publisher Site | Google Scholar
  18. X. Zhang, X. Lu, S. Jia, and X. Li, “A novel phase angle-encoded fruit fly optimization algorithm with mutation adaptation mechanism applied to UAV path planning,” Applied Soft Computing, vol. 70, pp. 371–388, 2018. View at: Publisher Site | Google Scholar
  19. P. Pandey, A. Shukla, and R. Tiwari, “Three-dimensional path planning for unmanned aerial vehicles using glowworm swarm optimization algorithm,” International Journal of System Assurance Engineering and Management, vol. 9, no. 4, pp. 836–852, 2018. View at: Publisher Site | Google Scholar

Copyright © 2021 Chengtian Ouyang et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Related articles

No related content is available yet for this article.
 PDF Download Citation Citation
 Download other formatsMore
 Order printed copiesOrder

Related articles

No related content is available yet for this article.

Article of the Year Award: Outstanding research contributions of 2021, as selected by our Chief Editors. Read the winning articles.