Neuroevolution: Methods and ApplicationsView this Special Issue
Improved Sparrow Search Algorithm Based on Iterative Local Search
This paper solves the shortcomings of sparrow search algorithm in poor utilization to the current individual and lack of effective search, improves its search performance, achieves good results on 23 basic benchmark functions and CEC 2017, and effectively improves the problem that the algorithm falls into local optimal solution and has low search accuracy. This paper proposes an improved sparrow search algorithm based on iterative local search (ISSA). In the global search phase of the followers, the variable helix factor is introduced, which makes full use of the individual’s opposite solution about the origin, reduces the number of individuals beyond the boundary, and ensures the algorithm has a detailed and flexible search ability. In the local search phase of the followers, an improved iterative local search strategy is adopted to increase the search accuracy and prevent the omission of the optimal solution. By adding the dimension by dimension lens learning strategy to scouters, the search range is more flexible and helps jump out of the local optimal solution by changing the focusing ability of the lens and the dynamic boundary of each dimension. Finally, the boundary control is improved to effectively utilize the individuals beyond the boundary while retaining the randomness of the individuals. The ISSA is compared with PSO, SCA, GWO, WOA, MWOA, SSA, BSSA, CSSA, and LSSA on 23 basic functions to verify the optimization performance of the algorithm. In addition, in order to further verify the optimization performance of the algorithm when the optimal solution is not 0, the above algorithms are compared in CEC 2017 test function. The simulation results show that the ISSA has good universality. Finally, this paper applies ISSA to PID parameter tuning and robot path planning, and the results show that the algorithm has good practicability and effect.
With the continuous emergence of various optimization problems, various algorithms and improved algorithms are emerging [1–4]. The emergence of swarm intelligence algorithm provides new ideas for solving various optimization problems. The swarm intelligence optimization algorithm is a meta-heuristic optimization algorithm that imitates the behavior of biological populations or biological behaviors and natural phenomena in the natural world. As the optimization effect of swarm intelligence algorithms is recognized by the public, swarm intelligence algorithms develop continuously, and more and more new swarm intelligence algorithms are proposed, such as firefly algorithm (FA) , ant lion optimizer (ALO) , whale optimization algorithm (WOA) , sine cosine algorithm (SCA) , crow search algorithm (CSA) , Harris hawks optimization algorithm (HHO) , slime mould algorithm (SMA) , hunger games search (HGS) , Runge–Kutta method (RUN) , and colony predation algorithm (CPA) .
Sparrow search algorithm (SSA) is a new group intelligence optimization algorithm proposed by Xue and Shen  in 2020. Inspired by sparrow foraging behavior, the algorithm has obvious advantages over traditional intelligent optimization algorithms, such as grey wolf Optimizer (GWO) , particle swarm optimization (PSO) , and genetic algorithm , with high stability, good search accuracy, and fast convergence . Despite its fast convergence rate, the algorithm is prone to fall into local optimum and the results of optimization are random. To overcome this shortcoming, many scholars have proposed improved algorithms based on different strategies for the sparrow search algorithm and successfully solved many engineering problems. Based on the principle and model of sparrow search algorithm, Lv et al. proposed a fusion algorithm of bird swarm algorithm and sparrow search algorithm  and a chaotic sparrow search algorithm . The former uses the search mechanism of bird swarm algorithm to add to the discoverers and followers of the sparrow search algorithm, which changes the update strategy of “full dimension reduction,” effectively breaks through the local restriction of search, and strengthens the global search ability; and the latter uses tent chaotic map to initialize the population, which makes the population more uniform. After one iteration, the second iteration of chaotic disturbance and Gaussian variation is carried out according to individual fitness and average fitness, which prevents local aggregation in the optimization process, enhances its ability to jump out of local optimization, and achieves good results in the application of image segmentation. A chaotic sparrow algorithm based on cubic mapping and elite reverse learning to initialize population is presented by Tang et al. . At the same time, the sinusoidal algorithm is introduced, which balances the development and exploring ability of the algorithm. At the same time, when the algorithm comes to a standstill, the Gauss Walk strategy is used to jump out of the standstill, and its optimization performance is verified in 15 benchmark functions. Finally, the UAV track planning simulation is carried out in the case of threat. Compared with other optimization algorithms, the algorithm obtains the safe and feasible track with the best cost and meets the constraints. Ouyang et al. proposed a learning sparrow algorithm  adding lens reverse learning during the discoverer search phase makes the search more flexible and increases the diversity of the population. A spiral guidance mechanism is introduced to make the discoverer search more precise. Then, a local search mechanism is added to prevent the omission of high-quality solutions, and compared with other swarm intelligence algorithms in 12 basic test functions and CEC 2017 test sets, this shows good optimization ability. Finally, the improved sparrow search algorithm is validated in the robot path planning, and a stable and safe optimal path is planned.
The above algorithms have made some improvements on the basis of sparrow algorithm, but there are still some shortcomings:(1)There is still some randomness in the improved method of population initialization, which does not guarantee absolute uniformity of the population each time it is initialized.(2)The selected improved search strategy is subject to regional limitations, is easy to exceed the boundaries, and fails to perform effective global search in the whole space, resulting in a large number of individuals exceeding the boundaries and still trapped in local optimum.(3)By jumping directly to the discoverer, it is easy to miss the optimal solution. The improvement of local search accuracy is not significant, and there can be more improvement in search accuracy.(4)In terms of boundary control, the strategy of updating to boundary is adopted for individuals beyond the boundary, which does not make good use of the individual location and reduces the diversity of the population.
In order to solve the above problems, the sparrow search algorithm based on iterative local search is proposed in this paper. By variable helix factor and improved iterative local search, the effective utilization and search of individuals are improved. By adding a dimension by dimension lens learning strategy and change the focusing ability of the lens, the algorithm converges faster while helping to jump out of the local optimum, and improving the boundary strategy, the population diversity is increased. To verify the optimization performance of the algorithm, ISSA PSO, SCA, GWO , WOA, MWOA , SSA, BSSA, CSSA, and LSSA are tested and analyzed on 23 basic functions. To further verify the universality of the algorithm, the above algorithms are tested and analyzed in CEC 2017 test function [25,26]. Finally, ISSA is applied to PID parameter tuning . The accuracy and convergence speed of the tuned results are improved compared with the SSA, which shows that the algorithm has good practicability. The main contributions of this paper are as follows:(1)In order to improve the effective use and search of individuals, a variable helix factor strategy is proposed and boundary control is improved(2)An improved iterative local search strategy is presented to improve the problem of low accuracy and missing better solutions in the search process(3)In order to improve the ability of the algorithm to jump out of local optimization, a dimension by dimension lens learning method is proposed to change the lens focusing ability(4)The versatility and flexibility of the algorithm using benchmark functions and CEC 2017 functions are validated(5)ISSA is used to optimize PID parameters to help quickly complete PID parameter tuning(6)ISSA is used to optimize the robot path planning problem and help get fast and stable results
The main work arrangement of this paper is as follows: Section 2 introduces the basic sparrow algorithm. Section 3 introduces and analyses the ISSA. Section 4 compares and analyzes the algorithm on the basic test function. Section 5 compares and analyzes the algorithm on CEC 2017. Section 6 applies the algorithm to PID parameter tuning. Section 7 applies the algorithm to robot path planning. Section 8 discusses and provides future research directions.
2. Sparrow Search Algorithm
In the process of sparrow foraging, there are two behavioral strategies: discoverer and follower. The individuals with better positions in the sparrow population generally take 10%–20% of the total population as discoverers, while the remaining individuals take part in the process. At the same time, 10%–20% of individuals are randomly assigned as scouters. The discoverer is responsible for leading the population in search direction and finding food, while the follower follows the discoverer to obtain food, and the scouter is alert to environmental threats and warns the sparrow population to move closer to a safe area.
In order to describe the process of sparrow foraging through mathematical models, it is necessary to formulate rules to simplify various behaviors of sparrows. The specific rules are as follows:(1)The individual energy of sparrow population depends on individual fitness evaluation, and the individual energy of discoverer is higher than that of discovers.(2)Once the scouters in the sparrow population find the threat of the external environment, they begin to send out an alarm signal. When the alert value is greater than the security threshold, the discoverers direct the population to the security zone.(3)Sparrows have flexible individual behavior strategies and can switch between discoverers and followers. As long as the individual energy reaches a certain degree, they can become discoverers, but the proportion between discoverers and followers in the population remains unchanged.(4)Sparrows with low energy may fly to other places for feeding in order to obtain higher energy.(5)When there is an external environmental threat, the sparrows at the edge of the population will quickly move to the safe area, and the sparrows in the middle of the population will immediately swim away to get close to other sparrows.
The discoverer is responsible for guiding the population to forage or to the location of the safe zone. The location update is described below:
Among them, t represents the current number of iterations, and M is the maximum number of iterations. Xi,j represents the current position of the i-th sparrow in the j-th dimension. α ∈ [0, 1] and is a random number. R2 represents an early warning value, ST is the security threshold, and R2 ∈ [0, 1], ST ∈ [0.5, 1]. Q represents a random number that follows a normal distribution. L represents a 1 × d matrix with all elements 1. When R2 < ST, this indicates that the population environment is safe at this time, no predators are found around them, and the discoverers can conduct extensive searches to guide the population to higher energy levels. When R2 ≥ ST, this indicates that an individual within a population has discovered a predator and issued an alert, and that the discoverer quickly adjusts the search strategy to flee the current location, leading the population to a safe location.
In order to obtain high-quality food, followers follow the discoverer or forage alone, so the location of followers is updated as follows:
Among them, Xp is the best position currently occupied by the discoverer, and Xworst represents the worst position currently. A is a 1 × d matrix with only 1 or −1 elements, where A+ = AT (AAT)−1. When i > n/2, this indicates that the less adaptable 1st participant is not getting food, is very hungry, and needs to fly elsewhere to get more energy; when i < n/2, followers monitor the finder and compete for food with the finder with a higher predator, thereby increasing their energy.
When aware of the danger, the sparrow population will make antipredation behavior, and its mathematical expression is as followswhere Xbest represents the current global optimal position. β is the control step parameter and is a normally distributed random number with a mean value of 0 and a variance of 1. K is a random number belonging to [−1, 1], which controls the direction of the sparrow’s movement as well as the step. fi represents the fitness value of the current sparrow individual. and are the current optimal and worst fitness values, respectively. ε is a very small real number that prevents the denominator from being zero. When fi ≠ , this indicates that the current sparrow is at the edge of the population and that an individual is vulnerable to predators, and it is necessary to approach other individuals in the population center to reduce the risk of predation. When fi = , this indicates that individuals in the center of the population are aware of the danger and need to flee from their current location in order to avoid it.
3. Sparrow Search Algorithm Based on Iterative Local Search (ISSA)
3.1. Variable Helix Factor
Followers occupy the majority of individuals in the population. When , they have a unique update mechanism that draw closer to the discoverers quickly; it results in a fast convergence rate. When , they have the ability to search globally. However, the global search ability is not strong, limited by the boundary of the search area, which tends to cause aggregation at the boundary in the early stage, resulting in loss of population diversity, easy to fall into the local extreme phenomenon, and poor ability to jump out of the local optimal.
The location update method of follower adopts the random coefficient that obeys the normal distribution. Without considering the boundary, the coefficient has strong global search ability. However, when considering the boundary, this mechanism is detrimental to the individuals who are at or near the boundary. Many absolute coefficients exceed 1. When the boundary is exceeded, it causes the population individuals to aggregate at the boundary, does not make full use of the current location, and results in a significant decrease in population diversity and overall algorithm performance. Based on this, a variable helix factor is proposed to reduce the number of individuals beyond the boundary, control the search step and direction, make full use of the whole population space, the space for early search is large, maintain the diversity of the population, and help jump out of the trap of local optimum. Later local search is more detailed, which greatly improves the search ability of the algorithm, as shown in Figure 1.
The formula for the variable helix factor works as follows:
H is a variable helix factor, a is a parameter used to control the helix, with a value of 1 in the earlier period and a decreasing number of iterations in the later period; is a parameter representing the helix cycle, in general; and l is a parameter that decreases linearly from 1 to −1 in terms of the number of iterations.
In this paper, we select a high-dimensional test function, step function, and a low-dimensional test function, Shekel function, to test the original model and the improved model for individuals beyond the boundary, as shown in Figure 2. Set the population individual as 30 and the number of iterations as 500, run each for 10 times, and take the average value. The test results are shown in Table 1.
According to Table 1, when the followers conduct extensive search, the number beyond the boundary accounts for the vast majority of the total number beyond the boundary of the sparrow population, resulting in the loss of a large number of individuals. Therefore, it is necessary to restrict the extensive search scope of the followers; based on the variable helix factor, the number of times the followers exceeding the boundary is greatly reduced to 0, which fully retains the favorable position information of the current individual.
Improvements to the extensive search of the followers make it possible for the followers to make full use of the whole search space, get rid of the attraction of the local optimal solution more easily, strengthen the search for the whole space, maintain the diversity of the population, enhance the ability of algorithm exploration in the early stage, and enhance the ability of algorithm development in the later stage. Based on this, the formula is updated as follows:
3.2. Improved Iterative Local Search
When , the followers have a unique update mechanism that quickly closes to the discoverer’s optimal solution, which results in fast convergence of the algorithm. The followers jump directly to the neighborhood of the discoverer’s optimal solution. Although they have some development ability near the current optimal solution, they do not make enough use of the current solution and have poor stability. They cannot guarantee the quality and accuracy of the solution and have poor local development ability. Once trapped and unable to jump out of the local extreme state, the overall performance of the algorithm will be limited. Inspired by [28–30], this paper presents an improved iterative local search.
Local search algorithm  is a simple greedy search algorithm that is improved from the hill-climbing method. Local search starts from an initial solution, then searches the neighborhood of the solution, and updates the solution if there is a better solution or returns to the current solution. Iterative local search is an exploratory method that adds perturbation to the local optimal solution obtained by local search and then re-searches the local solution.
The improved iterative local search first performs a local search near the initial solution, then disturbs the initial solution by updating the location of the followers closer to the discoverer, and then searches the updated location again. It makes full use of the location information of the current individual and the location information of the current optimal solution to make the search more flexible. The first modification uses the mechanism by which the follower approaches the discoverer to disturb, so that the individual jumps near the current global optimal position to jump out of the local optimal position; the second modification uses the local search to obtain stable optimization results and improve the accuracy of the local search; and the third modification uses the local search result to obtain the optimal local search result to ensure the quality of the solution, as shown in Figure 3.
At the same time, two cases are illustrated in this paper. Figure 3(a) indicates that after individual disturbance, a better solution can be found near the current global optimal solution; and Figure 3(b) indicates that an individual can find a better solution using his own favorable position, both of which help to jump out of the local optimal solution. This paper has not been replaced by the current global optimal solution to maintain population diversity and prevent premature convergence.
3.2.1. The First Modification (SSA Method)
The improved iterative local search strategy is more suitable for this algorithm than the original iterative local search. It works by first disturbing the initial solution to get an intermediate solution (when i < n/2, the followers of the SSA are disturbed by a unique update mechanism that closes quickly to the finder’s optimal solution). The initial and intermediate solutions are then searched again for a better solution. The first modification is used to solve the problem that the SSA is easy to fall into local optimal solution. The algorithm flow is as follows:
Step 1. The initial solution is perturbed by the current optimal solution to obtain the intermediate solution . The perturbation formula is as follows:The formula for the original followers is as follows: is , which is the best position the discoverer currently occupies; is , which is the current position; , which is the updated location.
3.2.2. The Second Modification (ILS Algorithm)
The second modification solves the problem of unstable and inaccurate optimization results of the SSA. The ILS algorithm here represents the local search stage in the ILS algorithm. It works by searching the initial and intermediate solutions locally to get a better solution and effectively utilizes the current position of the initial solution to prevent the individual from missing the better solution in the process of jumping directly to the current optimal solution. At the same time, local search near the current optimal solution helps to improve the accuracy of the solution and jump out of the local optimum in a small range. The algorithm flow is as follows:
Step 2. Initial solution starts local search, and the formula is as follows: is a random number between 0 and 1.
Step 3. Intermediate solution starts local search, and the formula is as follows:
3.2.3. The Third Modification
The third modification is to optimize the local search results to ensure the quality of the solution. The working principle is to use greedy strategy to compare the local search results of the initial and intermediate solutions and select the better value as the final solution X. The algorithm flow is as follows:
Step 4. Calculate fitness of .
Step 5. Calculate fitness of
Step 6. Compare and to select the best individuals for location updates; that is, If = else = endBased on the SSA and the three modifications above, the formula of the follower (i < N/2) in the SSA is updated as follows:
3.3. Dimension by Dimension Lens Imaging Learning
Swarm intelligence algorithms have the disadvantage of easily falling into local optimum. In this regard, relevant scholars have proposed the method of adding reverse learning to swarm intelligence algorithm [32–34]. The solution after reverse learning can be closer to the optimal solution. Generally, reverse learning can only search for the optimal solution in a certain space, but it still has monotonicity and the possibility of falling into local optimum. Lens learning [35, 36] has better optimization ability than general direction learning and can continuously converge to the optimal solution in a certain space. However, once there is no optimal solution in the selected space, it will still lead to local optimization in the end. At the same time, scouters have antipredator behavior to help the population to jump out of the local optimum, but their ability to jump out of the local optimum is unstable, resulting in sometimes unable to jump out of the local optimum. In view of this phenomenon, this paper proposes a dimension by dimension lens imaging learning strategy to change the focusing ability of the lens, which is used to strengthen the scouters’ ability to jump out of the local optimum, lens learning for each dimension, and reduce the mutual interference between the dimensions. In the early stage, the lens with poor focusing ability is selected for reverse learning. At this time, the imaging is divergent and far away from the lens, which can help jump out of the local optimum, as shown in Figure 4(a); in the later stage, the lens with strong focusing ability is selected for reverse learning. The imaging is concentrated and close to the lens, which can accelerate the convergence, as shown in Figure 4(b). Comparison of three kinds of reverse learning is shown in Table 2.
The principle of lens imaging is as follows:
As shown in Figure 4, taking one-dimensional space as an example, it is assumed that there is an individual with a height of at the position. Under the action of the lens, it forms an image with a height of at the position . is the boundary, and the lens position is the midpoint of . According to the principle of lens imaging and triangle similarity principle:
By transforming the above formula, we can getk is used to indicate the focusing ability of the lens, that is, the imaging size. When k = 1, it can be simplified as follows:
This is the general reverse learning strategy. It can be seen that the general reverse learning strategy is a special case of lens imaging. The general reverse learning strategy k is fixed, and the obtained individuals are also fixed. Lens learning can change the position of individuals by adjusting k, so as to further enhance the diversity of groups. Generally, it takes a constant that is not equal to 1. This paper proposes a strategy of linearly increasing K according to the number of iterations, that iswhere a is a small constant to prevent the previous iterative imaging from being too large, which is taken as 0.1 in this paper. The early k is small, and the imaging is large; in the later stage, k is near 1, and the imaging is slightly smaller, which can help convergence.
At the same time, lens imaging is extended to each dimension, and lens imaging reverse learning is performed for each dimension. The formula is extended as follows:where j is the current dimension, is the lower bound of the j-th dimension, and is the upper bound of the j-th dimension. At the same time, this paper adopts dynamic boundary:where is the minimum value of the j-th dimension in all individuals, and is the maximum value of the j-th dimension in all individuals. Because and do not represent the boundary of the whole search space, when the imaging exceeds the boundary [, ], it may not exceed the boundary of the whole search space. Therefore, when k is small in the current period, the imaging will exceed the boundary of the current j-th dimension, which helps to expand the search range, reduces the possibility of premature stagnation in the early stage, and helps to jump out of the local optimum. Finally, the greedy strategy is adopted. If the fitness value of the reverse solution is small and better than the original solution, the solution is updated and applied to the algorithm as follows:
3.3.1. Verify the Ability to Jump Out of Local Optimization
In this paper, the Shekel function mentioned above is selected as an example to draw the individual distribution diagram between the improved algorithm and the original algorithm to verify the ability of the above strategy to jump out of local optimization. The function image is shown in Figure 2. The selected population is 100, and the maximum number of iterations is 20. The individual distribution of the two algorithms are shown in Figures 5 and 6.
As can be seen from Figure 5, most individuals in the original algorithm have local aggregation and fall into local optimization. As can be seen from Figure 6, the improved algorithm has a larger search space, and most individuals converge near the optimal solution, effectively jumping out of the local optimal solution.
3.3.2. Proof of Convergence of Dimension by Dimension Lens Imaging Learning
The proof of convergence of general refraction reverse learning swarm intelligence algorithm is given in reference . Here, its conclusion is introduced to prove the convergence of the ISSA for dimensional lens back learning. It should be pointed out that the proof of convergence does not necessarily ensure that the algorithm converges to the global optimal solution. Since the SSA is also a swarm intelligence search algorithm, there are the following theorems:
Theorem 1. If the SSA algorithm based on general back learning converges, the ISSA algorithm also converges.
Proof. Let and be the current solution and reverse solution of generation t, and be the values of and in the j-th dimension, respectively, and the global optimal solution is . From Theorem 1, Extended to the j-th dimension:Due to , , we getIn the t-th generation, the current solution generated by the reverse learning strategy based on the lens imaging principle isWhen , from the above formula, we getReturn to the whole dimension:It can be seen that when converges to , the inverse solution generated by lens learning also converges to . Therefore, if the SSA based on general reverse learning converges, the ISSA also converges.
3.4. Improved Boundary Control
In the standard SSA, when an individual in the optimization process exceeds the boundary, the boundary control will be carried out for the individual. The principle is as follows:
Ub and Lb are the upper and lower bounds of space, respectively. In this method, the strategy of turning the individuals beyond the boundary into the boundary will lead to the aggregation of individuals at the boundary and reduce the diversity of the population. It can be seen from Table 1 that although the improved strategy reduces the number of individuals beyond the boundary, some individuals still exceed the boundary and gather at the boundary. Literature  adopts the strategy of the current optimal solution for individuals beyond the boundary, which will be difficult to get rid of the local optimization. Therefore, this paper proposes a simple boundary treatment method, namely,
In this method, the individuals beyond the boundary are randomly assigned to the search space, which makes more effective use of the population individuals and increases the diversity of the population more than that of the original algorithm.
3.5. Improved Sparrow Search Algorithm Flow
In this paper, an improved sparrow search algorithm based on iterative local search is proposed. Firstly, the variable helix factor is used to improve the extensive search of followers, which reduces the individuals beyond the boundary and speeds up the convergence speed in the later stage. Secondly, the improved iterative local search is used to improve the local search of the followers. The initial solution is subject to local search and iterative local search after disturbance, which makes full use of the current position information to prevent premature convergence and improve the quality and accuracy of understanding. Then, the lens with changed focusing ability is used to carry out dimension by dimension lens imaging learning for the scouter, and it increases the search space and helps the population jump out of the local optimum. Finally, the boundary control strategy is improved to reduce the aggregation of individuals at the boundary and increase the diversity of the population. The introduction of various strategies makes the algorithm more flexible in the optimization ability, makes the population more diverse, strengthens its ability to get rid of local optimization, balances the global search ability and local search ability of the algorithm, and is conducive to finding reliable solutions. The specific algorithm flow is shown in Figure 7. The specific pseudo code is as follows:
3.6. Time Complexity Analysis
Time complexity is an important index to measure the performance of the algorithm, which is used to measure the running time of the algorithm. Assuming that the population size of the algorithm is P, the maximum number of iterations is M and the dimension is D, and the time complexity of the sparrow search algorithm is O (P·M·D). From a macro point of view, the improved sparrow search algorithm does not change the structure and cycle times of the algorithm, so its time complexity is also O (P·M·D), which is consistent with the original algorithm. From the microscopic point of view, the greedy strategy is adopted for iterative local search and dimension by dimension lens learning, which increases the algorithm complexity of some followers and all scouters to a certain extent, but the introduction of the improved strategy does not improve the order of magnitude of the algorithm, so the time complexity is still O (P·M·D).
4. Benchmark Function Test
In order to better verify the performance of ISSA, this paper selects 23 common basic test functions for verification and tests and compares them with 10 algorithms including PSO, SCA, GWO, WOA, MWOA, SSA, BSSA, CSSA, and LSSA. The specific parameter settings are shown in Table 3, and the test function information is shown in Table 4. F1–F7 is the high-dimensional single-peak benchmark function, F8–F13 is the high-dimensional multipeak benchmark function, and F14–F23 is the low-dimensional multipeak benchmark function. F1–F13 is tested in 100 dimensions to verify the performance of the algorithm in higher dimensions. For the sake of fairness, the population size and maximum number of iterations of each algorithm are 30 and 500, respectively, and each algorithm is run independently for 30 times to calculate its best value (best), worst value (worst), average value (AVE), and standard deviation (STD), and the optimal value of each index is processed in bold. Finally, each algorithm will be ranked according to the average value of the algorithm in the function. When the average values of the two algorithms are equal, the standard deviation will be compared. For performance evaluation, simulations are performed on Windows 10 Matlab 2016a, AMD Ryzen 7 4800U with Radeon Graphics @1.80 GHz with 16 GB RAM.
ISSA ranks first in most functions, and its average ranking is better than that of other algorithms. It can be seen from Tables 5 and 6 that, compared with other algorithms, ISSA has found the theoretical optimal value except F7, F10, F12, F13, and F15 and has found the optimal value in all algorithms in the above five functions. It can be seen that the ISSA has good ability to find the optimal solution. Among them, only the ISSA in F5 finds the theoretical optimal value, and only SSA and ISSA in F6 find the optimal value. The optimization accuracy of ISSA in F12 and F13 is a large number of orders of magnitude higher than that of other algorithms. When the dimension increases to 100, the optimization performance of ISSA is still very stable, while PSO, SCA, WOA, GOA, and SSA have a great impact on the optimization ability. It is worth mentioning that in F6 and F12, ISSA is only better than SSA and SSA improved the algorithm in terms of optimal value, but other indicators are better than other swarm intelligence algorithms. In F1–F13 function, ISSA finds a better solution than or the same solution as SSA, indicating that ISSA does not reduce the optimization ability of the algorithm. In the fixed dimension F14–F23, ISSA algorithm has good stability and the ability to jump out of the local optimum. It can find the solution close to the theoretical optimum almost every time.
In order to better describe the optimization ability, difference, and convergence speed of the algorithm with other algorithms, the Wilcoxon rank sum test results with other algorithms is given in Table 7 according to ISSA, and the convergence diagram of each algorithm is given in Figure 8. At the same time, in order to test the contribution of the four strategies to the algorithm, this paper selects a basic function to test the four components of the improved algorithm, as shown in the first figure in Figure 8. The above is based on the test results of 23 benchmark functions.
In this paper, the four strategies and the original SSA and ISSA are tested in the F1 function of the basic test function, as shown in the first figure in Figure 8. ISSA1, ISSA2, ISSA3, and ISSA4 represent the algorithms improved separately by the four improved strategies proposed before. Among them, ISSA2, ISSA3, and ISSA have found the theoretical optimal value. Compared with the original SSA, ISSA2 has significantly improved the convergence speed, reflecting its excellent search ability; ISSA3 suddenly converges to the theoretical optimal value in the middle of the iteration, indicating its excellent ability to jump out of the local optimal. Compared with the original SSA algorithm, the optimization results and convergence speed of ISSA1 and ISSA4 are improved by dozens of orders of magnitude, which can improve to a certain extent. It can be seen that improved iterative local search and dimension by dimension lens imaging learning play a more critical role in improving the ability of the algorithm. The combination of the above four strategies enables us to obtain an ISSA with faster convergence speed, more accurate results, and more stability.
In the Wilcoxon rank sum test, when the value is less than 0.05, it can be considered that there is a significant difference between the two. In Table 7, NaN indicates that their performance is equivalent and cannot be compared. It can be seen that most values are less than 0.05, indicating that the optimization performance of ISSA is significantly different from other algorithms, among which the difference between ISSA and CSSA is the smallest, followed by LSSA, BSSA, and SSA. As shown in Figure 8, the ISSA shows excellent optimization speed and convergence accuracy, and the convergence speed is fastest in most functions. The ISSA converges faster in the single-peak benchmark function and has better ability to resist the attraction local optimum in the multipeak benchmark function.
5. CEC 2017 Function Test
In order to better illustrate the generality and effectiveness of the algorithm and avoid that the ISSA is only applicable to the case where the optimal value is 0, the algorithm is tested on the CEC 2017 test function. The evaluation times are , the number of population individuals is 30, the dimension is 30, SD is set to 0.6, and other parameters remain unchanged. In this paper, the above algorithms are run independently for 30 times, and five indexes of each algorithm are calculated according to the results, namely, the best value (Best), the worst value (Worst), the median (Med), the average value (Ave), and the standard deviation (Std). Finally, each algorithm will be ranked according to the average value of the algorithm in the function. The optimal value of each index is treated in bold. Due to the defects of F2 function, it will not be tested in this paper. The specific test results are shown in Table 8. At the same time, six functions F4, F7, F14, F17, F24, and F27 are selected to draw the box diagram of the results, as shown in Figure 9.
It can be seen from the data in Table 8 that, in the 29 functions, ISSA ranks first in most functions and its average ranking is better than other algorithms. ISSA has good optimization effect and can be close to the theoretical optimal value of each function. In F1, F3, F6, F7, F8, F13,F14, F18, and F29, each index of ISSA is the best in the algorithm. Among the 20 functions, ISSA finds the optimal value of all algorithms, which shows that ISSA has strong optimization ability. When the optimal solution is not 0, ISSA shows better optimization performance than SSA, and PSO and CSSA also show good performance.
As can be seen from the box diagram in Figure 9, the ISSA has strong search ability and is closest to the theoretical optimal value among all algorithms. And ISSA’s box graph has shorter length and stronger stability than other algorithms. Among them, the realization of SSA is poor because the individual in the SSA is directly jumping when approaching the current optimal solution, rather than moving to the current optimal solution like PSO. This problem leads to the rapid convergence of SSA, but it is easy to miss the high-quality solution and fall into local optimization. The ISSA uses the improved strategy to make up for this disadvantage, makes full use of the current solution, ensures the convergence speed, and increases its ability to jump out of the local optimum. But overall, the ISSA has better optimization performance than other algorithms, has good universality and effectiveness, and can adapt to some complex optimization problems.
6. PID Parameter Tuning
A PID controller is the most widely used controller in the industry (accounting for about 90% of the controller). The PID controller is composed of three basic gain parameters to control the controlled object. It is mainly applicable to the system whose basic linear and dynamic characteristics do not change with time. Its structure is shown in Figure 10. When the proportional parameter increases, the rise time and steady-state error decrease. When the integral parameter increases, the rise time is smaller, but the stability time and overshoot increase. The negative effect of the increase can be overcome by adjusting the differential parameter . The relationship between output and input of the PID controller is as follows:
Manual PID parameter tuning is a time-consuming process. Generally, it is tried through the experience and skills of engineers and the intelligent algorithm can complete the parameter tuning in a short time. In order to verify the practicability of ISSA, this paper uses ISSA to optimize PID parameters, simulates under unit step response and sinusoidal input response respectively, and tests with SSA to prove its optimization performance.
In this paper, the objective function  is set as follows: is the error between the input value and the output value. Considering the dynamic characteristics of the iterative process, the integral of its absolute value is adopted; is the control value, which is added to avoid excessive control range; and are weights, and the value range is [0, 1]. In addition, measures shall be taken to prevent overshoot, that is, when overshoot occurs, an additional overshoot item shall be introduced into the objective function. At this time, the settings are as follows:where is the weight and . Generally, . Therefore, the goal of ISSA is to find a set of PID parameters to minimize the error of objective function. In this paper, the number of individuals and the number of iterations of the population are set to be 30 and 50, respectively. Other parameters are consistent with those of Table 2. The test is carried out under the condition of unit leap forward and sinusoidal input respectively and run independently for 10 times. The test results are shown in Figure 11, and the optimization results are shown in Table 9.
Since the results of 10 independent runs are consistent, only one is shown here. It can be seen from Figure 11 and Table 9 that in the unit step response, ISSA can complete the parameter setting in a very short time, and the convergence speed and accuracy are better than SSA. In the sinusoidal input response, ISSA can almost coincide with rin, and the tracking effect is significant. The tracking effect of SSA is slightly inferior. At the same time, the convergence speed and accuracy of ISSA are slightly better than SSA. The above results verify that ISSA has good algorithm performance, can quickly and accurately complete the PID parameter tuning, and help the system have shorter response time, higher system control accuracy, and better robustness. So far, the practicability has been proved.
7. Robot Path Planning
In PID parameter tuning, the dimension of the practical application is low. Therefore, this paper selects the discrete problem of more complex path planning to further verify the practicability of ISSA and makes a comparative experiment with SSA. In path planning, each sparrow is a feasible path. The environment modeling adopts the grid method, and the obstacles at the equivalent position are calculated according to the grid value. Grid number 0 is defined as feasible area and 1 as obstacle area. Then, the robot can plan the path on the grid specified as 0, and dimension D is the column number of the grid map. The cost function of the path length of the i-th sparrow is shown in
In equation (31), j is the j-th dimension of a sparrow. Set each algorithm at 15 × 15, and the best path is shown in Figure 12. In order to eliminate the contingency, each algorithm is tested for 10 times, the optimal value, worst value, average value, and standard deviation of the fitness value of each algorithm are calculated, and these four indexes are used to measure the stability and feasibility of each algorithm. The optimization statistics of each algorithm are shown in Table 10.
It can be seen from the Table 10 and Figure 12, the minimum cost of ISSA planning is 19.7990, while the minimum cost of SSA is 22.6274. It can be seen that ISSA has strong path planning ability. According to other indicators, it can be seen that the path planned by ISSA has good stability. Therefore, ISSA has a good effect in more complex robot path planning and can plan a more stable and safer path.
This paper proposes an improved sparrow search algorithm based on iterative local search strategy, which introduces four strategies: variable helix factor, improved iterative local search, the lens imaging with changing focusing ability, and improved boundary control. ISSA overcomes the shortcomings of poor utilization of current individuals and lack of effective search and effectively improves the problems of falling into local optimal solution and low optimization accuracy. The test function results show that ISSA has good optimization performance and universality. The results of PID parameter tuning and robot path planning show that ISSA algorithm has good practicability.
The improved ISSA has good optimization performance, but it also has some shortcomings. For example, it can only find the optimal value in some functions, and other performance indicators are poor and unstable; a certain amount of work is added, resulting in a longer consumption time of the algorithm; and it did not improve the search scope of discoverers. In view of the shortcomings, we still need to do some work in the future: first, how to improve the stability of the algorithm; second, how to improve the search ability of followers; third, how to balance the time and optimization ability of the algorithm; and fourth, how to improve the search ability of discoverers on the basis of discoverers.
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. 61703411).
W. L. Liu, Y. J. Gong, W. N. Chen, Z. Liu, H. Wang, and J. Zhang, “Coordinated charging scheduling of electric vehicles: a mixed-variable differential evolution approach,” IEEE Transactions on Intelligent Transportation Systems, vol. 21, no. 12, pp. 5094–5109, 2019.View at: Google Scholar
S. Zhou, L. Xing, X. Zheng, N. Du, L. Wang, and Q. Zhang, “A self-adaptive differential evolution algorithm for scheduling a single batch-processing machine with arbitrary job sizes and release times,” IEEE Transactions on Cybernetics, vol. 51, pp. 1430–1442, 2019.View at: Google Scholar
F. Zhao, R. Ma, and L. Wang, “A self-learning discrete jaya algorithm for multiobjective energy-efficient distributed no-idle flow-shop scheduling problem in heterogeneous factory system,” IEEE Transactions on Cybernetics, 2021.View at: Publisher Site | Google Scholar
F. Zhao, X. He, and L. Wang, “A two-stage cooperative evolutionary algorithm with problem-specific knowledge for energy-efficient scheduling of no-wait flow-shop problem,” IEEE Transactions on Cybernetics, vol. 51, pp. 5291–5303, 2020.View at: Google Scholar
X.-S. Yang, “Firefly algorithms for multimodal optimization,” in Proceedings of the 2009 International Symposium on Stochastic Algorithms, Sapporo, Japan, 2009.View at: Publisher Site | Google Scholar
S. Mirjalili, “The ant lion optimizer,” Advances in Engineering Software, vol. 83, pp. 80–98, 2015.View at: Publisher Site | Google Scholar
S. Mirjalili and A. Lewis, “The whale optimization algorithm,” Advances in Engineering Software, vol. 95, pp. 51–67, 2016.View at: Publisher Site | Google Scholar
S. Mirjalili, “SCA: a sine cosine algorithm for solving optimization problems,” Knowledge-Based Systems, vol. 96, pp. 120–133, 2016.View at: Publisher Site | Google Scholar
A. Askarzadeh, “A novel metaheuristic method for solving constrained engineering optimization problems: crow search algorithm,” Computers & Structures, vol. 169, pp. 1–12, 2016.View at: Publisher Site | Google Scholar
A. A. Heidari, S. Mirjalili, H. Faris, I. Aljarah, M. Mafarja, and H. Chen, “Harris hawks optimization: algorithm and applications,” Future Generation Computer Systems, vol. 97, pp. 849–872, 2019.View at: Publisher Site | Google Scholar
R.-E. Precup, R.-C. David, R.-C. Roman, E. M. Petriu, and A.-I. Szedlak-Stinean, “Slime mould algorithm-based tuning of cost-effective fuzzy controllers for servo systems,” International Journal of Computational Intelligence Systems, vol. 14, no. 1, pp. 1042–1052, 2021.View at: Publisher Site | Google Scholar
Y. Yang, H. Chen, A. A. Heidari, and A. H. Gandomi, “Hunger games search: visions, conception, implementation, deep analysis, perspectives, and towards performance shifts,” Expert Systems with Applications, vol. 177, Article ID 114864, 2021.View at: Publisher Site | Google Scholar
I. Ahmadianfar, A. A. Heidari, A. H. Gandomi, X. Chu, and H. Chen, “RUN beyond the metaphor: an efficient optimization algorithm based on Runge Kutta method,” Expert Systems with Applications, vol. 181, Article ID 115079, 2021.View at: Publisher Site | Google Scholar
J. Tu, H. Chen, M. Wang, and A. H. Gandomi, “The colony predation algorithm,” Journal of Bionic Engineering, vol. 18, no. 3, pp. 674–710, 2021.View at: Publisher Site | Google Scholar
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
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
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, vol. 5, Orlando, FL, USA, 1997.View at: Google Scholar
C. R. Houck, J. Joines, and M. G. Kay, A Genetic Algorithm for Function Optimization: A Matlab Implementation, NCSU, Raleigh, NC, USA, 1995.
Y. Li, S. Wang, Q. Chen, and X. Wang, “Comparative study on some new swarm intelligence optimization algorithms,” Computer Engineering and Application, vol. 56, no. 22, pp. 1–12, 2020.View at: Google Scholar
X. Lv, X. Mu, and J. Zhang, “Multi-threshold image segmentation based on improved sparrow search algorithm,” Systems Engineering and Electronics, vol. 43, no. 2, pp. 318–327, 2021.View at: Google Scholar
X. Lv, X. Mu, J. Zhang, and Z. Wang, “Chaos sparrow search optimization algorithm,” Journal of Beijing University of Aeronautics and Astronautics, vol. 8, pp. 1712–1720, 2021.View at: Publisher Site | Google Scholar
A. Tang, T. Han, D. Xu, and L. Xie, “UAV track planning method based on chaotic sparrow search algorithm,” Computer Applications, vol. 41, no. 7, pp. 2128–2136, 2021.View at: Google Scholar
C. Ouyang, D. Zhu, and F. Wang, “A learning sparrow search algorithm,” Computational Intelligence and Neuroscience, vol. 2021, Article ID 3946958, 23 pages, 2021.View at: Publisher Site | Google Scholar
D. Zhang, H. Xu, Y. Wang, T. Song, and L. Wang, “Whale optimization algorithm embedded in circle mapping and dimensional keyhole imaging reverse learning,” Control and Decision Making, vol. 36, no. 5, pp. 1173–1180, 2021.View at: Google Scholar
G. Wu, R. Mallipeddi, and P. N. Suganthan, Problem Definitions and Evaluation Criteria for the CEC 2017 Competition on Constrained Real-Parameter Optimization, National University of Defense Technology, Changsha, China, 2017.
N. H. Awad, M. Z. Ali, J. J. Liang, B. Y. Qu, and P. N. Suganthan, “Problem definitions and evaluation criteria for the CEC 2017 special session and competition on single objective real-parameter numerical optimization,” Tech. Rep., Zhengzhou University, Zhengzhou, China, 2016, Technical report.View at: Google Scholar
Y. Chen, Y. Ma, and W. Yun, “Application of improved genetic algorithm in PID controller parameters optimization,” Telkomnika, vol. 11, no. 3, pp. 1524–1530, 2013.View at: Publisher Site | Google Scholar
C. Gan, W. Cao, M. Wu, and X. Chen, “A new bat algorithm based on iterative local search and stochastic inertia weight,” Expert Systems with Applications, vol. 104, pp. 202–212, 2018.View at: Publisher Site | Google Scholar
X.-S. Yang, “A new metaheuristic bat-inspired algorithm,” Nature Inspired Cooperative Strategies for Optimization (NICSO 2010), Springer, Berlin, Germany, 2010.View at: Publisher Site | Google Scholar
D. Molina, A. LaTorre, and F. Herrera, “SHADE with iterative local search for large-scale global optimization,” in Proceedings of the 2018 IEEE Congress on Evolutionary Computation (CEC), IEEE, Rio de Janeiro, Brazil, 2018.View at: Publisher Site | Google Scholar
H. Ishibuchi and T. Murata, “A multi-objective genetic local search algorithm and its application to flowshop scheduling,” IEEE Transactions on Systems, Man and Cybernetics, Part C (Applications and Reviews), vol. 28, no. 3, pp. 392–403, 1998.View at: Publisher Site | Google Scholar
X. Xia, J. Liu, and Y. Li, “Particle swarm optimization algorithm with reverse-learning and local-learning behavior,” Journal of Software, vol. 9, no. 2, pp. 350–357, 2014.View at: Publisher Site | Google Scholar
J. He, Z. Peng, D. Cui, and Q. Li, “A teaching and learning optimization algorithm based on multi-inverse learning,” Engineering Science and Technology, vol. 51, no. 6, pp. 159–167, 2019.View at: Google Scholar
S. Rahnamayan, H. R. Tizhoosh, and M. M. A. Salama, “Opposition-based differential evolution,” IEEE Transactions on Evolutionary Computation, vol. 12, no. 1, pp. 64–79, 2008.View at: Publisher Site | Google Scholar
L. Wen, T. Wu, M. Tang, M. Xu, and S. Cai, “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
C. Ouyang, D. Zhu, and Y. Qiu, “Lens learning sparrow search algorithm,” Mathematical Problems in Engineering, vol. 2021, Article ID 9935090, 17 pages, 2021.View at: Publisher Site | Google Scholar
S. Peng, Z. Wu, X. Zhou, and C. Deng, “Improved particle swarm algorithm based on the reverse learning model of refraction principle,” Journal of Electronics, vol. 43, no. 11, pp. 2137–2144, 2015.View at: Google Scholar
Q. Liang, B. Chen, H. Wu, C. Ma, and S. Li, “A novel modified sparrow search algorithm with application in side lobe level reduction of linear antenna array,” Wireless Communications and Mobile Computing, vol. 2021, Article ID 9915420, 25 pages, 2021.View at: Publisher Site | Google Scholar
S. He, Z. Cao, and S. Yu, “PID parameter optimization based on pollination algorithm,” Computer Engineering and Applications, vol. 52, no. 17, pp. 59–62, 2016.View at: Google Scholar