A Novel Modified Sparrow Search Algorithm with Application in Side Lobe Level Reduction of Linear Antenna Array

Antenna arrays play an increasingly important role in modern wireless communication systems. However, how to effectively suppress and optimize the side lobe level (SLL) of antenna arrays is critical for communication performance and communication capabilities. To solve the antenna array optimization problem, a new intelligent optimization algorithm called sparrow search algorithm (SSA) and its modification are applied to the electromagnetics and antenna community for the first time in this paper. Firstly, aimed at the shortcomings of SSA, such as being easy to fall into local optimum and limited convergence speed, a novel modified algorithm combining a homogeneous chaotic system, adaptive inertia weight, and improved boundary constraint is proposed. Secondly, three types of benchmark test functions are calculated to verify the effectiveness of the modified algorithm. Then, the element positions and excitation amplitudes of three different design examples of the linear antenna array (LAA) are optimized. The numerical results indicate that, compared with the other six algorithms, the modified algorithm has more advantages in terms of convergence accuracy, convergence speed, and stability, whether it is calculating the benchmark test functions or reducing the maximum SLL of the LAA. Finally, the electromagnetic (EM) simulation results obtained by FEKO also show that it can achieve a satisfactory beam pattern performance in practical arrays.


Introduction
The latest development trend of wireless communication systems is to realize the antenna array system with strong directivity and maneuverability, so that it can radiate and receive energy to the maximum extent in a specific direction and reduce the waste of energy by suppressing the SLL in noninteresting directions [1]. According to the pattern multiplication theorem, the pattern of an antenna array can be obtained by multiplying the element pattern by the array factor. By adjusting the spacing, excitation amplitude, and phase of array factor, the antenna array can have the characteristics of high gain, narrow beam, low SLL, and easy electrical scanning [2]. In the field of scientific research and engineering practice, most of the problems encountered can be attributed to solving optimization problems, and the design and optimization of the antenna array are no exception [3]. With the development of computer technologies and computational electromagnetics, some intelligent optimization algorithms that simulate the behavior mechanism of biological groups or the laws of natural phenomena have begun to appear in the vision of many scholars. With its unique advantages in solving large-scale, nonlinear, and other complex optimization problems, the design and optimization technology of antenna arrays based on an intelligent optimization algorithm has always been a research hotspot in the field of EM optimization [4].
SSA is a new intelligent optimization algorithm proposed by Xue and Shen in 2020. It is mainly inspired by the foraging and antipredation behaviors of sparrows. It has the characteristics of simple implementation, few adjustment parameters, and high expansibility and has been successfully applied in many scientific research and engineering practice fields [23]. For example, [24] proposed an improved SSA to solve the path planning problem of UAV under constraint and proved that the route generated by this method is better than that by the other four algorithms in the same environment. Wang and Xianyu used SSA to solve the optimal configuration model of distributed power supply for the first time and verified the effectiveness and superiority of this method through the IEEE 33 distribution system [25]. Reference [26] established the SSA model based on empirical mode decomposition to optimize the parameters of the kernel extreme learning machine (KELM) and achieved higher prediction accuracy in blood glucose prediction. Kumaravel and Ponnusamy improved the control parameters of the power controller based on SSA to optimize the power flow management of the smart grid system, which realized the real-time energy management in the microgrid [27]. In [28], the improved model based on SSA can track the distributed maximum power point more accurately and quickly and has good robustness, thus effectively solving the problem of power mismatch loss in a photovoltaic microgrid system. Zhu and Yousefi introduced an adaptive strategy on the basis of SSA and applied it to the optimization of proton exchange membrane fuel cell (PEMFC) stack model parameters. The validity of the proposed method in determining the maximum output power and optimal operating state of the stack is verified through four cases [29]. With the help of the adaptive SSA, Liu and Rodriguez took a residential building as an example and took the energy load demand and investment cost as the optimization objectives to get the best combination scheme of the integrated sustainable energy systems, which achieved the purpose of reducing energy consumption and saving economic expenses [30].
LAA is known as the basic and one of the most practical geometric configurations of antenna array in which all elements are arranged in a straight line. Aimed at the design and optimization of LAA, a new modified SSA is proposed in this paper. The main contributions are briefly highlighted as follows: The rest of this paper is structured as follows. Section 2 describes the basic principle of SSA, introduces the improvement strategies, and gives the pseudocode of the modified algorithm. Section 3 verifies its effectiveness and convergence performance. In Section 4, the mathematical description of the LAA optimization problem is given, and the simulation results are discussed and analyzed, and then, the EM verification experiment is carried out. Finally, Section 5 draws the conclusion of this paper.

The Sparrow Search Algorithm and
Its Modification 2.1. Standard Sparrow Search Algorithm. A sparrow is an intelligent social animal, which keeps alert and stays a safe distance at all times. They also show great unity when encountering the enemy. According to their different behavior rules, sparrows can be divided into three roles: producers, scroungers, and scouters. Assuming that there are N sparrows in a D-dimensional search space, the position of the ith sparrow can be expressed as The following is an introduction of the three updating methods.
2.1.1. Producers. Producers are sparrows with better fitness values in the population. They have a wide search range and are responsible for searching and providing foraging directions for the whole population. The mathematical expression of producers is described as follows: where t represents the current iteration number and t max represents the maximum number of iterations. X i,j denotes the position of the ith sparrow in the jth dimension. α is a uniform random number in the range ð0, 1, and R 2 and ST represent the alarm value and the safety threshold respectively, where R 2 ∈ ½0, 1 and ST ∈ ½0, 1. Q is a random number with normal distribution. L is a one-dimensional matrix with all elements of 1. When R 2 < ST, it means that the surrounding environment is safe and they can search for food 2.1.2. Scroungers. Scroungers are sparrows except all the producers and keep an eye on the producers. If they find that the producers have found better food, they will immediately leave their present position to fight for food and make themselves the producers. The position of the scroungers is updated as follows: where X worst represents the global worst position of the current population and X p represents the best position occupied by the producers in the current iteration process. A is a onedimensional matrix with elements of 1 or -1, and A + = ðAA T Þ −1 . If i > N/2, it indicates that the ith scrounger with low fitness value is in an unfavorable position and needs to expand his flight range to obtain food; if i ≤ N/2, the ith scrounger will find a random place near the optimal location and perform local search.

Scouters.
The scouters are randomly generated between the producers and the scroungers and can perceive whether there is danger in the foraging area. The model of scouters can be formulated as follows: where X best represents the global optimal position of the current population, and it is also the safest location. As a step size control parameter, β is a random number subject to standard normal distribution. K ∈ ½−1, 1 indicates the direction of movement of the sparrows. F i , F g , and F w represent the fitness value of the ith sparrow, the global optimal, and the worst fitness value of the current population, respectively. ε is a minimal constant that avoids zero division error. F i > F g indicates that the sparrow is at the edge of the population, vulnerable to predators, and needs to move to a safe area. F i = F g indicates that the sparrow is in the middle of the population, but it is aware of the danger and needs to be close to other sparrows to reduce the risk of predation.

Modified Sparrow Search
Algorithm. Compared with other representative intelligent optimization algorithms in recent years, although SSA has strong competitiveness in convergence speed, accuracy, and stability [31], it is still inevitable to fall into local optimum at the later stage of iterations, resulting in insufficient convergence accuracy [32]. In order to further improve the performance of the algorithm, this paper proposes a new modified algorithm based on chaotic adaptive inertia weight and improved boundary constraint.

Homogeneous Chaotic
System. The quality of initial solution directly affects whether the algorithm can find the optimal solution. Chaos is a kind of random phenomenon with ergodicity, inherent regularity, and long-term unpredictability [33]. Within the search range of feasible solutions, chaotic sequences are widely used in population initialization of optimization algorithms; this is because they can traverse all states without repetition [34]. The research in Reference [35] shows that the homogeneous chaotic system has better random effect in variable initialization. Its function is expressed as where μ ∈ ½−73/70, 1/10 is the initialization sequence and X is completely chaotic in ½−1/2, 1/2. The formula for transforming chaotic sequence X into the solution space is as follows: where Ub and Lb, respectively, represent the upper and lower boundary values of the optimized variables.
The statistical histogram obtained from the numerical statistics of ordinary random sequences and sequences generated by the homogeneous chaotic system is shown in Figure 1. It can be seen from the figure that the chaotic system has better homogenization, that is, better randomness. Hence, when the diversity of the sparrows increases, the quality of initial solution can be improved.   Wireless Communications and Mobile Computing 2.2.2. Adaptive Inertia Weight. All intelligent optimization algorithms include two processes of global exploration and local exploitation. An efficient algorithm needs to balance the global exploration capability and the local exploitation capability [36]. From the basic principle of SSA in Section 2.1, it is not difficult to find that the producer's search ability plays a vital role in whether the algorithm can find the optimal solution. Therefore, inertia weight w is introduced to adjust it adaptively. The mathematical expression is shown in Take w max = 0:1 and w min = 0:01. The schematic diagram is illustrated in Figure 2.
As can be noticed, as the number of iterations increases, the inertia weight decreases adaptively. The update formula of the producers' position is modified as follows: By introducing the adaptive inertia weight, sparrow individuals can search favorable regions in the global range with a larger step size in the early stage of search and strengthen the ability of global exploration; in the later stage of the search, a smaller weight w can ensure sparrows to do fine search near the extreme points and strengthen the ability of local exploitation, so that the algorithm has a greater probability of converging to the global optimal value.

Improved Boundary Constraint.
In the standard SSA, the processing strategy for sparrows overstepping the boundary is generally given by Lb, X t+1 i,j < Lb: In this method, the individual that oversteps the boundary is simply assigned to the boundary value of the search range, which is equivalent to giving up the individual's search information. In the iterative process, if more individuals overstep the boundary, the positions of sparrows will accumulate more boundary values, resulting in the decrease in population diversity, which directly affects the convergence accuracy of the algorithm [37]. The strategy of improved boundary constraint handling is shown in Algorithm 1. Sparrows that overstep the boundary will randomly determine a position near the optimal position of the population, which enhances the diversity of the population and improves the global optimization ability of the algorithm to a certain extent.
The SSA modified by the above strategies is named MSSA, and the pseudocode outlining the steps of its implementation is shown in Algorithm 2.

Performance Analysis
In this section, MATLAB is used to verify and analyze the computational performance of MSSA on benchmark test functions. In order to verify the effectiveness and superiority of the modified algorithm, classical PSO and representative algorithms in recent years, including PSOGSA, WOA, GOA, and MTDE, are adopted for comparative experiments. All the parameters of these algorithms are in accordance with the original papers, as shown in Table 1.
The population size of all algorithms is set to 30, and the number of iterations is 500, for fairness. All numerical experiments are implemented on Intel(R) Core(TM) i5-9400U CPU with 2.90 GHz and 8 GB RAM.

Benchmark Test Functions.
In order to comprehensively evaluate the global and local optimization ability of the algorithm, the experiment uses three types of benchmark test functions, in which the unimodal function has only a global optimal value but no local optimal value, so it can better test the local exploitation ability of the algorithm; the multimodal function has many local optimal values, so it can test the ability of the algorithm to jump out of the local extreme value and the global exploration ability. Table 2 shows the benchmark test functions for the experiment.

Experimental Results and Analysis.
Considering the randomness of algorithm operation, 50 tests were run independently in order to make the results more convincing and universal. The best value and the worst value can show the exploration ability of the algorithm, and the mean value and standard deviation can show the accuracy and stability of the algorithm. Therefore, the best value, the worst value, and the mean value of 50 experimental results were statistically analyzed, and the standard deviation was calculated. The numerical results are shown in Table 3, where the optimal value is expressed in bold.
As can be seen from the results in Table 3, for unimodal functions F1~F3, the accuracy and stability of MSSA are greatly improved as compared to the other six algorithms, and the results of multiple optimizations can converge to the optimal value of the functions with the smallest standard deviation. For multimodal functions F4~F6, MSSA as well as SSA has excellent performance, and their ability to escape  Wireless Communications and Mobile Computing local optimal solutions and robustness are obviously better than those of the remaining algorithms. For fixeddimensional multimodal functions F7~F9, all algorithms can find the optimal value of the functions. MSSA's performance is inferior to that of MTDE for function F7, but better than that of PSOGSA, GOA, and SSA. For function F8, the standard deviation of MSSA is the smallest, and MSSA performs best for function F9.
In order to directly reflect the convergence characteristics of the modified algorithm on the benchmark test functions, the average convergence curves of the seven algorithms are presented in Figure 3. The logarithmic axis is adopted for the y-axis to make data fluctuation much clearer. It can be seen from Figure 3 that MSSA not only has higher calculation accuracy but also significantly improves the convergence speed.
Input: N (Population size), D (Dimension size), P Num (Producers size), S Num ( Scouters size), ST (Safety threshold), t (Initial iteration), t max (Maximum iterations) Output: X best (Global optimal position), F best (Fitness of global optimal position) 1: / * Initializing * / 2: Randomly generate the positions of N sparrows X i,j by homogeneous chaotic system (i=1,2,…,N, j=1,2,…,D); 3: Calculate the fitness of each sparrow F i ; 4: Find X best and F best ; 5: / * Iterating * / 6: while t < t max do 7: Sort the F i and find global worst position X worst ; 8: R 2 = rand(1); 9: for i = 1 : P Num 10: Evaluate and calculate the adaptive weight w; 11: Update the position X i,j by (7); 12: Check and adjust position that overstep the boundary by Algorithm 1; 13: end for 14: Sort the F i and find the best position of producers X p ; 15: for i = (P Num + 1) : N 16: Update the position X i,j by (2); 17: Check and adjust position that overstep the boundary by Algorithm 1; 18: end for 19: for i = 1 : S Num 20: Update the position X i,j by (3); 21: Check and adjust position that overstep the boundary by Algorithm 1; 22: end for 23: Evaluate and update X best and F best ; 24: t = t + 1; 25: end while 26: return X best and F best ; Algorithm 2: Modified sparrow search algorithm.

Wireless Communications and Mobile Computing
Aimed at observing the search process more intuitively, Figure 4 shows the search trajectories of sparrows on the three types of benchmark test functions of the MSSA. It can be seen that in the early iterations, sparrows are scattered over a large search space. As the number of iterations increases, the adaptive weight factor improves the local optimization ability of the algorithm, and precocity is avoided in the end. Consequently, most sparrows are able to gather in the optimal solution and its nearby area (red box in Figure 4).

Comparison of the Improved Factors.
Tests are conducted to observe the performance of the three introduced improved factors. The standard SSA with the modifications of the homogeneous chaotic system function and the improved boundary constraint is named CSSA, while the SSA with the modifications of adaptive inertia weight and the improved boundary constraint is named ASSA. Figure 5 shows the convergence curves of the improved factors on the three types of benchmark test functions. It can be found from the figure that MSSA has better performance by combining those improved factors. The reason may be attributed to the fact that the adaptive inertia weight can speed up the local convergence rate. Chaos initialization and the improved boundary constraint can increase the diversity of population to a certain extent, which lays a good foundation for the improvement of the convergence accuracy.
3.4. Statistical Testing. The Wilcoxon rank sum test is performed to statistically identify significant differences between the two algorithms. The best values, worst values, mean values, and standard deviations of all benchmark test functions in Table 3 are adopted as test samples. A nonparametric test is done by comparing MSSA with PSO, PSOGSA, WOA, GOA, MTDE, and SSA respectively. It is generally considered that the algorithm is significantly different from others if the p value is less than 0.05. The results from Table 4 show that all the p values are less than 0.05, except for the result of MSSA versus SSA. This indicates that there are significant differences between MSSA and most algorithms at the 5% significance level. In the calculation of the above benchmark test functions, although the performance of MSSA is better than that of SSA, there is no significant difference between them.
3.5. Algorithm Complexity. The computational cost of the intelligent optimization algorithm is mainly determined by the evaluation of fitness function. Assuming that the maximum iteration is T, the complexity of MSSA can be written as OðNTÞ since there is only one inner loop in the algorithm, where N is the population size. It can be seen that the computational complexity is linear with N and T. According to the above modifications, MSSA does not change the algorithm framework of SSA, so they have the same complexity, and the proposed algorithm does not reduce the solution efficiency.
3.6. Analysis of Asymptotic Property. For the minimization optimization problem, the fitness asymptotic property of MSSA is analyzed in this section. Suppose that the finite nonempty set S is the solution space and the optimal solution set Ω = fx * jx * ∈ S, f ðx * Þ < εg, where f is the objective function and ε is the acceptable objective function value. Let the optimal sparrow position obtained by the algorithm in the That is, Eðd t+1 Þ = Eðd t Þ − τ t+1 . Let τ = min fτ 1 , τ 2 ,⋯,τ T g, and there is Eðd t+1 Þ ≤ Eðd t Þ − τ. Therefore, the fitness asymptotic property of MSSA can be proven, which means that the algorithm asymptotically converges to the optimal solution.

Problem Formulation.
Considering the symmetry of 2N isotropic element LAA in Figure 6, the array factor can be expressed as follows: where k = 2π/λ is the wave number and I n , x n , and ψ n , respectively, represent the excitation amplitude, position, and phase of the nth element. φ symbolizes the azimuth angle, which is defined as the angle with the positive x-axis.
In this paper, the element spacing and excitation amplitude are taken as optimization variables, and the optimization objective is to suppress the maximum SLL. Therefore, the fitness function can be formulated as min fitness = max 20 log 10 AF where φ SL and φ ML represent the region of the side lobe and main lobe, respectively. φ FN1 and φ FN2 are the first nulls of the pattern. Constraints (14) and (15) 10 Wireless Communications and Mobile Computing the first null beam width to the maximum extent, for LAA with 2N of 8, 16, and 24, φ FN1 is limited to 75°, 82°, and 85°a nd φ FN2 is 105°, 98°, and 95°, respectively.

Experiments on Maximum SLL Reduction with
Optimized Element Spacing. In this section, seven algorithms are used to optimize the positions of 8-element, 16-element, and 24-element LAA, respectively. Because the median is not affected by small or large data, it can better reflect the average optimization ability of the algorithms. Therefore, the median value of 25 independent repeated experiments is presented.

8-Element LAA.
Since this is a symmetric array, the spatial dimension of solution is 4. Figure 7 shows the 3D radiation patterns of 8-element LAA before and after MSSA optimization. It can be seen intuitively from the figure that MSSA can effectively reduce the maximum SLL. Figure 8(a) shows the beam patterns obtained by different algorithms, and Figure 8(b) shows the convergence curves of different algorithms, in which conventional LAA refers to the unoptimized LAA while maintaining uniform element position distribution and uniform excitation amplitude. It can be seen from the figure that the convergence speed and convergence accuracy of MSSA have been improved. The maximum SLL optimized by different algorithms for 8-element LAA is shown in Table 5. As shown, the maximum SLL obtained by MSSA is -20.2186 dB, which is the lowermost among all algorithms. There is an improvement of 7.4214 dB using the proposed approach as compared to the conventional technique. Table 5 also gives the optimized positions of the elements obtained by different algorithms.

16-Element LAA.
In order to maintain the main lobe shape and beam width, it is necessary to impose additional constraint on the total length of the antenna array, as shown in the following formula:

12
Wireless Communications and Mobile Computing The spacing between the first two elements on both sides of the y-axis is fixed at 0:5λ, so as to ensure that one antenna pair in the antenna array meets Nyquist spatial sampling. The Nth element is fixed at x n = ð2N − 1Þd/2, where d = 0:5λ represents the default spacing of the uniform LAA, thereby suppressing the distortion of the main lobe [44]. Since the positions of the first and last elements on both sides of the antenna array are fixed, the positions of other elements are variable. Therefore, the optimized dimension is simplified to 2N − 2. Figure 9 depicts 3D radiation patterns of 16-element LAA before and after optimization by MSSA. Figure 10 Table 6. The maximum SLL obtained by MSSA is 9.5292 dB lower than that of the conventional array.

24-Element LAA.
The position constraints of the 24element LAA are the same as above; that is, the first element is fixed at 0:25λ and the 12th element is fixed at 5:75λ. Therefore, the spatial dimension of solution is simplified to 10.
The 3D radiation patterns of 24-element LAA before and after MSSA optimization are given in Figure 11. Figure 12 shows the beam patterns and convergence curves obtained by different algorithms.  Figure 13 that the maximum SLL of the optimized LAA is significantly reduced. Figure 14 shows the beam patterns and convergence curves of different algorithms. The element excitation amplitude is normalized, and the obtained amplitude is the largest at the center of 14 Wireless Communications and Mobile Computing        Figure 15 shows the 3D radiation patterns of 16-element LAA before and after MSSA      Figure 16. It can be seen from Table 9 that the maximum SLL of PSO, PSOGSA, WOA, GOA, MTDE, SSA, and MSSA are reduced by 10.6011 dB, 11.0604 dB, 9.8011 dB, 9.4704 dB, 11.2537 dB, 10.7757 dB, and 11.7211 dB, respectively. Compared with conventional LAA, MSSA has the largest reduction. In addition, Table 9 also gives the optimized excitation amplitudes obtained by different algorithms.

24-Element LAA.
The 3D radiation patterns of 24element LAA before and after MSSA optimization are depicted in Figure 17. Figure 18 is the beam patterns and convergence curves of 24-element LAA optimized by different algorithms. Table 10 shows the optimized element excitation amplitudes and maximum SLL. From the experimental results, the results of MSSA optimization are obviously better than those of the other six algorithms. This example further verifies the advantages of the modified algorithm in convergence speed as well as convergence accuracy.

Stability Test.
Due to the randomness of the intelligent optimization algorithm, the results of each run are likely to be different, so it is necessary to discuss and analyze the stability of the algorithms. Similar to the performance analysis of the modified algorithm, Tables 11-16, respectively, give the best value, the worst value, the mean value, and the standard deviation of the maximum SLL obtained by different algorithms in optimizing the element position and excitation amplitude of the 8-element, 16-element, and 24-element LAA.
In order to visually display the fluctuation of data, the standard deviation diagrams of the element position and excitation amplitude optimized by different algorithms are drawn, as shown in Figure 19. According to the results of each run, the maximum SLL obtained by different algorithms are depicted in Figure 20. It is clear that, compared with the other six algorithms, the mean value of MSSA is the lowest, which indicates that the proposed algorithm has higher solution accuracy. The best value and the worst value are smaller than those of PSO, PSOGSA, WOA, GOA, MTDE, and SSA, which shows that the algorithm has strong optimization

EM Simulation.
In practical applications, the induced current between elements will inevitably lead to mutual coupling. Conventional simulation, as a common processing mode in the most existing works on design of LAA for SLL reduction, usually assumes that array is in an ideal environment, and the effects of mutual coupling between the antenna elements are often ignored. EM simulation is an effective method to verify and evaluate the performance of different optimization algorithms in the actual environment [45].
With the help of EM simulation software Altair FEKO 2019, the actual LAA model is constructed firstly, and then, the 2D beam patterns of different antenna arrays in polar coordinates are obtained by simulation according to the above optimized element positions and excitation amplitudes. The beam patterns are shown in Figure 21. The numerical results of maximum SLL are listed in Table 17. It can be seen that the results of maximum SLL reduction are basically consistent with the above simulation results, which demonstrates that the algorithm is also effective for the practical conditions. To sum up, based on the original algorithm, MSSA can give full play to the advantages of chaotic adaptive inertia weight and improved boundary constraint and enhance the global optimization ability. However, more work can be done to further enhance the stability and robustness of this algorithm. The numerical results of this paper indicate that the modified algorithm shows promise as an effective method in solving the global optimization problems.

Conclusions
In this paper, it is the first time that SSA and its modification have been introduced and utilized to the field of EM optimization according to the existing published literature and reports. For one thing, in order to improve the shortcomings of SSA, such as being easy to fall into local optimum and slow convergence speed, a novel modified SSA combining a homogeneous chaotic system, adaptive inertia weight, and improved boundary constraint is proposed. The computational results of three types of benchmark test functions verify the effectiveness of the modified algorithm. For the other thing, with the element positions and excitation amplitude as optimization variables and the maximum SLL reduction as optimization objective, a comparison with the classical PSO and PSOGSA, WOA, GOA, and MTDE through several scenarios is conducted. Simulation results show that MSSA achieved high performance in terms of maximum SLL reduction with a greater improvement in convergence accuracy, convergence speed, and stability. Therefore, SSA, as a new beam pattern optimization method for electromagnetic community and antenna design, has a large research space. In our future work, we will continue to study the algorithm and explore its real-world applications in the field of antenna array design, such as the multiobjective antenna array design problem aimed at minimizing at least two conflicting objectives at the same time, placing deep nulls of the beam pattern in desired directions to avoid the effect of jamming and interference, and other geometric configurations of the antenna array that work in different occasions.

Data Availability
The data used to support the findings of this study are included within the article.