A Novel Strategy for Optimal PSO Control Parameters Determination for PV Energy Systems

: This study introduces a novel strategy that can determine the optimal values of control parameters of a PSO. These optimal control parameters will be very valuable to all the online optimization problems where the convergence time and the failure convergence rate are vital concerns. The newly proposed strategy uses two nested PSO (NESTPSO) searching loops; the inner one contained the original objective function, and the outer one used the inner PSO as a ﬁtness function. The control parameters and the swarm size acted as the optimization variables for the outer loop. These variables were optimized for the lowest premature convergence rate, the lowest number of iterations, and the lowest swarm size. The new proposed strategy can be used for all the swarm optimization techniques as well. The results showed the superiority of the proposed NESTPSO control parameter determination when compared with several state of the art PSO strategies.


Introduction
Swarm optimization techniques have displayed highly effective tracking of the optimal solutions in various applications. These techniques send searching agents to determine the values of fitness functions and use this information to move these agents toward the optimal value. The first metaheuristic technique was proposed by Tillman (1969) [1]. Particle swarm optimization (PSO) is one of the most popular metaheuristic optimization techniques of the last two decades, owing to its simplicity and reliability, with its usage increasing every day [2]. The PSO technique introduced by Kennedy and Eberhart (1995) [3] is inspired by the behavior of the flocks of fish, birds, swarms, and shoals searching for food, and it is used to determine the optimal solutions for multi-dimensional problems. This technique uses several particles to search for the optimal solution in the search space of the optimization problem. In the consecutive iterations (movements), the PSO collects the information gained from the particles to guide them in the next movement to the global optima. The new movement of each particle depends on the experience gained from the previous movements, the information gained from the best position of the particle itself (cognitive or self-experience), and the information gained from the global optimum (social experience). The confidence of capturing the global peak and the convergence speed are highly affected by the choice of PSO control parameters (acceleration parameters cl and c g , and inertia weight ω) that are affected considerably by the fitness function. The equations governing the performance of the PSO technique are expressed as shown in (1) and (2) [4]. The acceleration parameters cl and cg are also called the self-confidence and the swarm-confidence parameters, respectively. Increasing the value of c g affects the attraction of particles toward the best individual. Additionally, increasing the value of cl enhances the self-confidence search and vice versa. The inertia weight ω is used to enhance the stability of the particles, and its value affects the performance of the PSO searching behavior such that a high value of ω enhances the social search and reduces the cognitive search, and vice versa. The first usage of the ω in PSO was reported in [4]. The definitions of these symbols are listed in the list of symbols shown in the Abbreviations.
The performance of the PSO in its journey to capture the global optima is governed by the values of ω, c l , and c g . While evaluating the performance of the PSO, the premature convergence rate (PCR) and the speed of convergence are the major concerns. The PCR is used to measure the number of times the PSO failed to capture the global optima or was trapped in one of the local peaks divided by the total number of attempts, which can be obtained from (3). The convergence time consumed to reach the final convergence is proportional to the number of iterations N, multiplied by SS, as shown in Equation (4). The factor N SS is used to count the number of attempts to hit the fitness function, through the optimization process, which can represent the convergence time.
where N PCR is the number of occurrences of premature convergence and N av is the total number of experimental occurrences.
The purpose of any strategy used to modify the performance of the PSO is to reduce the two factors PCR and N SS . These two factors are such that for a low PCR, a large N SS is expected and vice versa. These two factors are vital to be minimized, especially in online applications where the confidence and the convergence time are crucial issues and the focus of this study. Many strategies have been suggested in the literature to minimize these two factors. There are two major modification strategies, the first one is the mutation of the particles' positions [5][6][7] and the second one is the tuning of PSO control parameters (ω, c l , and c g ) [8][9][10][11][12][13][14][15]. Some researchers used these two improvement strategies together to improve the performance of PSO [16,17]. The mutation strategy of the PSO changes the position of the particles based on many stochastic strategies without changing the velocity of the particles. Adjusting the next movement helps the particles to escape from convergence at one of the local optimal solutions. An adaptive mutation strategy was introduced in [18] to adjust the particle movement distance automatically. A Gaussian mutation algorithm (GPSO) was introduced in [6] that uses neighbor heuristics and the Gaussian cloud learning PSO algorithm. Cauchy mutation strategy uses a scaling factor on the Cauchy mutation to control the distance the particle moves [7]. A detailed review with the evaluation of the mutation strategies is introduced in [5]. The mutation strategies slightly improve the premature convergence rate; however, they increase the convergence time and add complexity to the PSO strategy. Therefore, they have not been discussed further in this study.
The second improvement in the PSO is achieved by fine-tuning the PSO control parameters ω, c l , and c g , which considerably improves the performance of the PSO without adding extra complexity to the conventional PSO technique. Numerous studies have introduced different strategies to estimate the best values of the PSO control parameters [8][9][10][11][12][13][14][15]. Most of these strategies include tuning these parameters to improve the performance of the PSO using the trial-and-error mechanism or using the empirical formulas. Few strategies have shown successful results in certain applications; however, they have failed in some other applications. Thus, there is a need for fine-tuning the PSO control parameters for different applications. Two strategies were used for this purpose, the first one depends on using fixed values of the PSO control parameters, which can be determined using the Sustainability 2021, 13, 1008 3 of 28 different strategies suggested in [8][9][10][11][12][13][14][15][19][20][21][22][23][24][25][26][27][28][29], the other strategy is called the online strategy, where the values of PSO control parameters are changing during the execution of the code. Fixed control parameters are fixed during the entire iterations of the searching space. Therefore, these PSO control parameters should be known before running the PSO code to search for the optimal solution. Most of these studies have used the recommended values of these parameters based on the previous studies or after fine-tuning these parameters to be more effective in a certain application. Some researchers introduced empirical formulas to assist in choosing the PSO control parameters [16,19]. Some studies introduced a mathematical derivation for obtaining the optimal values of the PSO parameters [20,21], considering the effects of these parameters on the behavior of the PSO. Kennedy et al. [3] introduced the first study on the effect of the PSO control parameters values on its searching performance; they recommended the values of c g , c l , and ω as 2, 2, and 1, respectively. Another study discussed the effect of ω and other PSO parameters, c g and c l , on the performance of PSO using the trial-and-error mechanism [30] and concluded that it is beneficial to use the linearly decreasing inertia weight, as will be discussed later. Eberhart [20] introduced a modified strategy considering the relation between the PSO control parameters called the constriction factor, as expressed in (5) and (6). This strategy introduced the values of control parameters that may work well with a certain application; however, they were not suitable for other applications, as shown in the experimental results of this study.
Clerck [9] concluded that the most suitable value of φ was 4.1, which showed many positive results. Therefore, from (5) and (6), ω = 0.729, and the author assumed c g = c l = 1.49445 [9]. Additionally, an empirical formula was introduced in [16] to examine the performance of the PSO search with the varying PSO control parameters. The main inference from this study was that the balance between the acceleration parameters, c g and c l , does influence the regions of the parameter space that leads to approximately optimal performance. The relation between c g , c l , and ω is defined in (5). Additionally, this strategy introduced a relation between ω and (c g + c l ); however, the deterministic values of these parameters that can fit with all optimization problems were not introduced. It was checked with the optimal values of control parameters that show the highest performance; however, it was not compatible with this condition, as shown in [16].
Additional empirical formulas that can assist in determining or introducing the boundary values of the PSO control parameters were introduced in [10,17,22,23]. Additionally, all these empirical formulas were tested, and it was found that they might be suitable for a certain application, but not suitable for all optimization problems. The authors of [10] recommended the values ω = 0.715 and c g = c l = 1.7, and concluded that the most suitable values of the PSO control parameters depended on the experimental findings. Nevertheless, this strategy was tested, and it was found that it was not suitable for all the optimization problems, as shown in the results of this study. Most of the recommended and popular strategies estimating the control parameters [8][9][10][11][12][13][14][15][19][20][21][22][23][24][25][26][27][28][29] were tested with the final recommendations of this study. This study concludes that all these strategies may work well for a certain application; however, they will not work well in all the optimization problems.
Another strategy is the online strategy; it changes the values of the PSO parameters during the search progress to enhance the social search at the beginning of the search operation to capture the global best (GB) and not fall in one of the local best (LB). Additionally, it enhances the cognitive search to capture the GB accurately and with the least oscillations around it [31]. Most of the online PSO parameter variations were examined and compared Sustainability 2021, 13, 1008 4 of 28 in [32,33]. An online strategy can be subclassified into two types, namely, the dynamic strategies [30,[34][35][36] and the adaptive strategies [32]. A dynamic strategy uses certain formulas to change the values of the PSO parameters with iterations. The dynamic strategy enhances the social search at the beginning of the iterations by increasing the values of the inertia weight parameter. Subsequently, it enhances the cognitive search by reducing the values of the inertia weight parameter with increasing the number of iterations. Meanwhile, the adaptive strategy adapts the PSO control parameters, depending on the progress achieved during the search based on the online results from the search progress. Reference [37] introduced a formula for dynamic variation equations for the acceleration parameters besides the inertia weight. This strategy requires the introduction of optimal dynamic equations for PSO control parameters.
Based on the previous discussion, it was concluded that the performance of PSO techniques is highly affected by the values of PSO control parameters, especially in online applications where the confidence of capturing the GB and the convergence time are the crucial factors. The previous strategies used recommended or tuned values of PSO control parameters.
The proposed strategy introduced in this study focuses on the determination of the optimal fixed control parameters, and therefore, the dynamic variation in the PSO control parameters has not be further discussed. This is a pioneer study that has introduced a strategy to determine the optimal PSO control parameters in the metaheuristic techniques for minimum PCR and the shortest convergence time that suits all the applications. This new proposed strategy uses two nested PSO loops and is called NESTPSO. The inner one is to get the optimal solution of the fitness function and the outer one optimizes the PSO control parameters of the inner loop to get the lowest PCR and N SS for the inner loop. Thus, the control parameters of the inner PSO are used as optimization variables in the outer PSO loop. The fitness function to be minimized in the outer loop is a multiobjective function containing the PCR and the N SS of the inner PSO loop. The stunning results obtained from using the NESTPSO in the optimization of many benchmark functions with different levels of complexity and the real-world application show a substantial reduction in convergence time and PCR compared to 10 state-of-the-art strategies. This improvement gained from NESTPSO allows the use of the PSO in the online applications that need very fast and reliable convergence, such as the maximum power point tracker (MPPT) of the PV systems. Moreover, NESTPSO can determine the optimal swarm size for optimal optimization performance. The author has ambition in this strategy to open a new way of optimally determining the control parameters of all swarm optimization techniques in the engineering optimization field.
The rest of the paper is designed thus: Section 2 explains the proposed strategy and its logic. Section 3 introduces the experimental results of the proposed strategy compared to the state-of-the-art strategies with four benchmark mathematical functions. Section 4 shows the application of NESTPSO as an MPPT of PV energy system compared to state-of-the-art strategies. Section 5 shows the conclusions of the study and introduced future work.

Proposed Strategy
The concept proposed in this study can be applied to all the PSO parameter estimation strategies, where it can be used with fixed PSO parameters, dynamic PSO, and adaptive PSO parameter variations. Moreover, this strategy can be used to determine the optimal parameters for all metaheuristic techniques. The proposed strategy for PSO control parameter (ω, c l , and c g ) determination is called the nested PSO (NESTPSO). The term nested PSO has been introduced in many researches [38][39][40][41][42][43][44] to handle certain functions. However, it has been used in this paper to determine the control parameters of PSO or any other metaheuristic techniques. All the previous studies depended on non-autonomous strategies to estimate the control parameters of the PSO. Two nested PSO searching loops are used, where the inner PSO loop contains the fitness function required to be optimized. The outer PSO loop uses the inner PSO as a fitness function to minimize the PCR and N SS . The PSO parameters of the inner loop (ω i , c li , and c gi ) and swarm size (SS i ) are used as the variables to be optimized in the outer loop. The outer PSO loop control parameters' values are given in [20], where ω e = 0.729, and c le = c ge = 1.49445. The swarm size of the outer loop is chosen to be equal to 50 particles. A block diagram showing the logic used to determine the optimal values of control parameters in the NESTPSO is shown in Figures 1 and 2 for the outer and inner PSO loops, respectively. At the beginning of the iteration process, the outer PSO loop initiated random values for the control parameters and the swarm size of the inner PSO loop. These values are applied to the inner PSO loop to minimize the benchmark mathematical functions used in this study. To avoid the effect of the random nature inherent in the inner PSO loop, the function is minimized for a certain number of iterations, N av , to obtain the average results. After performing N av iterations for the inner loop, the times the inner loop is trapped in the local optima are counted as a variable N PCR and the PCR is determined from (3). The number of average iterations in the inner loop, N i , is determined and used to determine the average value of N SS, as shown in (4). The multi-objective function is determined in terms of PCR and N SS, as shown in (8), to get the optimal PSO parameters of the inner function for minimum PCR and N SS . These two parameters displayed opposite performance, which means to get minimum PCR, N SS had to be increased, and vice versa. Therefore, the multi-objective function shown in (8) is introduced to achieve a trade-off between these two factors.
where M is a weighting value to be multiplied with the PCR to express the importance of PCR compared to the N SS . A detailed study to determine the value of M is shown in the experimental results.
Sustainability 2021, 13, x FOR PEER REVIEW 6 of 30 where M is a weighting value to be multiplied with the PCR to express the importance of PCR compared to the NSS. A detailed study to determine the value of M is shown in the experimental results.
Minimizing the objective function, F in the outer PSO loop guaranteed optimal PSO control parameters and swarm size of the inner loop for minimum PCR and NSS. The optimal values of the control parameters of the inner loop are obtained as the optimal solutions for the outer loop. The detailed pseudo-code explaining this new strategy (NESTPSO) for obtaining the optimal values of the PSO control parameters is shown in Figures 3 and 4 for the outer and inner loops, respectively. It is clear that the control parameters and the swarm size of the inner PSO loop are fed from the outer PSO loop as optimized variables. The concept of using the NESTPSO in the determination of the parameters of metaheuristic techniques has not been reported in the literature before. The proposed strategy can be used as an on-shelf optimal parameter estimation for any metaheuristic technique, which will assist researchers and designers to use their proposed metaheuristic techniques with optimal performance. This new strategy ensures fast and reliable convergence for any fitness function used with any metaheuristic technique. The proposed strategy will open a new way for the optimal determination of metaheuristic techniques parameters estimation and other applications. Minimizing the objective function, F in the outer PSO loop guaranteed optimal PSO control parameters and swarm size of the inner loop for minimum PCR and N SS . The optimal values of the control parameters of the inner loop are obtained as the optimal solutions for the outer loop. The detailed pseudo-code explaining this new strategy (NESTPSO) for obtaining the optimal values of the PSO control parameters is shown in Figures 3 and 4 for the outer and inner loops, respectively. It is clear that the control parameters and the swarm size of the inner PSO loop are fed from the outer PSO loop as optimized variables. The concept of using the NESTPSO in the determination of the parameters of metaheuristic techniques has not been reported in the literature before. The proposed strategy can be used as an on-shelf optimal parameter estimation for any metaheuristic technique, which will assist researchers and designers to use their proposed metaheuristic techniques with optimal performance. This new strategy ensures fast and reliable convergence for any fitness function used with any metaheuristic technique. The proposed strategy will open a new way for the optimal determination of metaheuristic techniques parameters estimation and other applications.
%to update the particle best LB(k)=F(k); %to update the particle best value % to get the global best value and position Stopping criteria end %to update the particle best LB(k)=F(k); %to update the particle best value % to get the global best value and position Stopping criteria end

Benchmark Mathematical Functions
The four selected benchmark mathematical functions have zero minimum value. These benchmark functions are shown in the following Equations (9)- (12). The order of these benchmark functions is set at D = 10. These function are drawn in Figure 5 for two dimensional order (D = 2).
where x = [X1, X2, …, XD], and D denotes the variables that determines the order of fitness function.
The second benchmark function is the generalized Rastrigrin function, which is described by the following equation: The third benchmark function is the De Jong function, which is described by the following equation: The fourth benchmark function is the Alpine function, which is described by the following equation:

Stopping Criterion
The stopping criterion is a condition used to terminate the execution of the code when the convergence occurred with a certain value. Many stopping criteria are introduced in the literature [45] to decide to stop the execution of the code, such as: a. Generation Number: The execution of the code is to stop when the iteration number equals the predefined number of iterations. b. Best Fitness Threshold: This condition stops the execution of the code when the value of the fitness function reached predefined value. c. Population Convergence: This condition stops the execution of the code when the difference between the maximum and minimum values of all particles' position in the population is less than the predefined tolerance. This idea also can be achieved by using the standard deviation of the particle position of private best is less than predefined tolerance, which has been used in this study for the first time based on the knowledge of the author of this research. d. Fitness Convergence: This stops the iteration when the difference between the maximum and minimum values of objective function during one iteration is less than the predefined tolerance.
In this study, the generation number and population convergence stopping criteria have been used to stop the execution of the logic in the inner and outer loops. Regarding The first benchmark function, the sphere function is shown in the following equation: where x = [X 1 , X 2 , . . . , X D ], and D denotes the variables that determines the order of fitness function.
The second benchmark function is the generalized Rastrigrin function, which is described by the following equation: Sustainability 2021, 13, 1008 9 of 28 The third benchmark function is the De Jong function, which is described by the following equation: The fourth benchmark function is the Alpine function, which is described by the following equation:

Stopping Criterion
The stopping criterion is a condition used to terminate the execution of the code when the convergence occurred with a certain value. Many stopping criteria are introduced in the literature [45] to decide to stop the execution of the code, such as: a.
Generation Number: The execution of the code is to stop when the iteration number equals the predefined number of iterations. b.
Best Fitness Threshold: This condition stops the execution of the code when the value of the fitness function reached predefined value. c.
Population Convergence: This condition stops the execution of the code when the difference between the maximum and minimum values of all particles' position in the population is less than the predefined tolerance. This idea also can be achieved by using the standard deviation of the particle position of private best is less than predefined tolerance, which has been used in this study for the first time based on the knowledge of the author of this research. d.
Fitness Convergence: This stops the iteration when the difference between the maximum and minimum values of objective function during one iteration is less than the predefined tolerance.
In this study, the generation number and population convergence stopping criteria have been used to stop the execution of the logic in the inner and outer loops. Regarding the generation number, the stopping criterion has been used in the inner and outer loops by setting the maximum number of iterations to 200 iterations for inner and outer PSO loops. Regarding the population convergence of the inner loop, it is assumed that the complete convergence occurs when the maximum value of standard deviation (std) for all variables' values of private particles' best positions is lower than the predefined tolerance value, ε. The value of ε is chosen here by 0.001, as shown in the following Equation (13). This condition ensures that all the particles are concentrated near to each other, and the standard deviation of their position value is lower than 0.001. This criterion will reduce the convergences time, but it will not highly affect the final results. The value of the predefined tolerance ε is depending on the values of the optimal solutions of variables of the fitness function, which needs a careful selection of ε.
where P best (i) is the values of particle best positions of the inner loop, and ε is the acceptable values of the standard deviation of the particle best positions. The above criteria used in the inner PSO loop will not work with the outer one, because the variables in the outer one are composed of different values of PSO control parameters ω, c l , c g , and SS. The fitness convergence stopping criterion is used to stop the outer PSO loop. This is accomplished by stopping the iterations of the outer PSO loop when the difference between the maximum and minimum values of the fitness function during one iteration is less than 1*10 −5 . This value has been chosen empirically after studying the performance of the convergence of the outer loop.

Premature Convergence Rate Determination
The premature convergence occurred when the particles of PSO are all trapped in one of the local optima to the end of the convergence iteration. It is not easy to deduce a generalized formula to be used to judge if the GB is the right global optima (theoretical optima), GO, or is one of the local optima, LO. To have a fair evaluation between all of these strategies, the absolute difference between the GB and GO is higher than 0.01 will be counted as premature convergence occurrence. The PSO searching strategy will be performed 1000 times to reduce the random nature inherent in the PSO technique. The PCR or sometimes called failure rate can be obtained from (3). Where the PCR equals the ratio of the total occurrence of premature convergence, N PCR divided by the total number of searching occurrences (N av ), as shown in Equation (3). This value used to judge may be varied from one fitness function to another, but this value performed very well in all the benchmark functions (9)-(12) as well as the MPPT of the PV system.
The boundaries for the inner loop variables are set −5 to 5 for all benchmark functions understudy. Regarding the variables of the outer PSO loop that will be used as input to the inner PSO loop, the boundaries of these PSO control parameters (c g , c l , and ω) are set in between −5 and +5; meanwhile, the swarm size boundary is selected between 2 to 100.

Selecting of Multi-Objective Function Weighting Value
Two main studies are introduced here in this paper. The first one is introduced to show the variations of PCR and N SS for different values of objective function weight parameter, M, for the four benchmark functions under study. The second one is introduced to compare the results obtained from NESTPSO with the recommended values of control parameters introduced in the literature [8][9][10][11][12][13][14][15][19][20][21][22][23][24][25][26][27][28][29].
The objective of the first study is introduced to select the most suitable value of M to achieve the lowest acceptable value of PCR and the lowest number of hitting the fitness function N SS . As discussed above, the experiment of the benchmark mathematical functions is performed 1000 times to overcome the random nature inherent in the PSO   [8][9][10][11][12][13][14][15] to show the superiority of NESTPSO. The difference between these two cases is that Case 2 required an additional 820 hitting the fitness function to reduce the PCR from 4.5% to 0.98%.         The experimental work for the De Jong benchmark function is performed in the be ginning to determine the weight of the multi-objective function, M. The variation in M with the control parameters of the inner loop (ωi, cli, and cgi), PCR, and NSS are shown i Figure 10 and These two cases are further compared to the state-of-the-art strategies to show the supe riority of NESTPSO. The difference between these two cases is that Case 6 required a extra 319 hitting the fitness function to reduce the PCR from 4.496% to 0.9936%. The result of this experiment are shown in Table 3. Negative values of cli are observed for the firs time in the literature. Figure 11 shows the variation in SSi, Ni, and NSS along with PCR.        The variation of M, with the control parameters of the inner loop (ω i , cl i , and c gi ), PCR, and N SS are shown in Figure 6 and Table 1. The objective of this section is to determine the optimal value of M shown in Equation (8). It is clear from Figure 6 and Table 1 that the maximum value of PCR is 7.34 at M = 70. However, this value is lower than the best value obtained from the state-of-the-art strategies [8][9][10][11][12][13][14][15], as shown in Table 5. Additionally, it is clear that the value of M is inversely proportional to the PCR and directly proportional to the N SS in the lower values of M; meanwhile, it shows a saturated relation with the higher values of M. The variation of SS i , N i , and N SS with the value of PCR is shown in Figure 7. For best operating performance, the PSO should have the minimum value of PCR and N SS . Here the PCR is inversely proportional to M, and N SS is directly proportional to M. Therefore, a trade-off between these two values is required. The value of M is selected based on the acceptable lowest value of PCR, where, if PCR <= 5% (Case 1) is the acceptable value, the selected value of M = 90, and the values of ω i , c li , c gi , SS i , PCR, and N SS are 0.8216, 0.0140, 0.803, 36, 4.5%, and 3342, respectively, as shown in Figure 6, Figure 7, and Table 1. Meanwhile, if PCR <=1% (Case 2) is the acceptable value, the selected value of M is equal to 190; the values of ω i , c li , c gi , SS i , PCR, and N SS are 0.8484, 0.0506, 0.6538, 44, 0.98%, and 4162, respectively. These two cases are further compared to the state-of-the-art strategies [8][9][10][11][12][13][14][15] to show the superiority of NESTPSO. The difference between these two cases is that Case 2 required an additional 820 hitting the fitness function to reduce the PCR from 4.5% to 0.98%.

Multi-Objective Weighting Value for the Generalized Rastrigrin Function
The experimental work for the generalized Rastrigrin benchmark function is performed similarly to the Sphere function. The variation of M with the control parameters of the inner loop (ω i , c li , and c gi ), PCR, and N SS are shown in Figure 8 and Table 2 Table 5. If the acceptable value of PCR <= 1% (Case 4), the value of M = 300 is selected from Figure 9 and Table 2; the values of ω i , c li , c gi , SS i , PCR, and N SS are 0.7795, 0.5717, 0.409, 0.99%, and 2857, respectively. These two cases are further compared to the state-of-the-art strategies [8][9][10][11][12][13][14][15] to show the superiority of the NESTPSO strategy. The difference between these two cases is that Case 4 required an extra 730 hitting the fitness function to reduce the PCR from 4.5% to 0.99%. The variation in SS i , N i , and N SS with PCR for the Rastrigrin is shown in Figure 9 0.7838, 0.018, 0947, 42, 0.9936%, and 2210, respectively. These two cases are further compared to the state-of-the-art strategies to show the superiority of NESTPSO. The difference between these two cases is that Case 6 required an extra 319 hitting the fitness function to reduce the PCR from 4.496% to 0.9936%. The results of this experiment are shown in Table 3. Negative values of c li are observed for the first time in the literature. Figure 11 shows the variation in SS i , N i , and N SS along with PCR.

Multi-Objective Weighting Value for the Alpine Benchmark Function
The experimental work for the Alpine Benchmark function is performed to determine the weight of the multi-objective function, M. The variation of the control parameters of the inner loop (ω i , c li , and c gi ), PCR, and N SS, along with M are shown in Figure 12, Figure 13, and Table 4 The difference between these two cases is that Case 8 needs an extra 2875 hitting the fitness function to reduce the PCR from 4.33% to 0.92%. This implies that Case 7 is faster than Case 8, but with a higher PCR (failure rate).

Comparison of NESTPSO to State-of-the-Art PSO Strategies
After studying the performance of the NESTPSO with the variation of M in the previous section, two values of M are selected for further study and comparison in each benchmark function under study. The selection of M depends on the allowed PCR, as has been discussed. The PSO control parameters of state-of-the-art strategies have been used to determine the PCR and the N SS, to be compared to the values obtained in Cases 1-8, as discussed in Section 3.4. The following list is summarizing the different cases understudy: The experimental work is performed 1000 times to achieve the average value that reduces the dependency of the output results on the stochastic nature of the PSO. Ten popular strategies are selected to be compared to the NESTPSO, as shown in Table 5 [8][9][10][11][12][13][14][15]. The results shown are the PCR and the N SS . All state-of-the-art strategies [8][9][10][11][12][13][14][15] understudy had SS i = 50; however, SS i of the proposed strategy is the optimization variable determined from the NESTPSO. This implies that the proposed simulation program is optimizing the PSO control parameters and SS i to achieve the lowest possible PCR and the lowest N SS .
Increasing the value of M gives more weight to the PCR than the N SS and vice versa. Therefore, it depends on the user's requirements to give more weight to PCR or N SS . The comparisons between the results obtained from the state-of-the-art strategies and the results obtained from the NESTPSO for the four benchmark mathematical functions are shown in the following subsections: 3.5.1. Comparison of NESTPSO with the State-of-the-Art PSO Strategies for the Sphere Function The NESTPSO experimental work for the Sphere function is introduced in Table 1 and Figures 6 and 7. Case 1 (PCR <= 5%, M = 90) and Case 2 (PCR <= 1%, M = 190) are selected to be further compared with the results obtained from the state-of-the-art strategies shown in Table 5.
The results of state-of-the-art strategies shown in Table 5 for the Sphere benchmark function show that the lowest PCR is 8.63% with N SS = 6190 corresponding to strategy S5 [11]. This means that this strategy loses the global minimum by 8.63% of the total try for the Sphere function; meanwhile, it needs 6190 hits to the fitness function to converge. Meanwhile, the fastest convergence strategy is S8 [14] that needs 1682 hits to the fitness function to converge; however, it has the highest PCR at 95.34%, which indicates that it loses the GB by 95.34%, showing low-performance results. The average value of PCR in all state-of-the-art strategies is 29.91% and the average value of hitting the fitness function during the searching criterion is 5987. These results show the importance of the control parameters of PSO on the performance of searching in terms of PCR and N SS . The NESTPSO is used to determine the optimal value of the control parameters of PSO to get the best performance in terms of PCR and N SS . The results of NESTPSO show that, in Case 1, the nearest value for PCR <= 5% is achieved at M = 90 with PCR = 4.5% and N SS = 3342. These values of PCR and N SS from NESTPSO are almost half the best value obtained from the best state-of-the-art strategies (S5 [11]) and are much lower than the average value obtained from the state-of-the-art strategies (S1-S10). In Case 2, the value of PCR is 0.98%, which is lower than the value achieved in Case 1 and state-of-the-art strategies. This reduction in PCR is at the expense of increasing the value of N SS , where the value of N SS became 4162 in Case 2 instead of 3342 in Case 1 but still less than the fastest state-of-the-art strategy, S8 [14].
Finally, the two cases achieved using NESTPSO displayed better results than all stateof-the-art strategies shown in Table 5. The convergence of Case 1 and Case 2 compared to the 10 state-of-the-art strategies (S1-S10) for the Sphere benchmark function is shown in Figure 14. All Figures 14-17 are showing the average results for 1000 runs. It is clear from Figure 14 that these cases are faster and get better convergence compared to the state-of-the-art strategies shown in Table 5. This confirms the superiority of the NESTPSO. became 4162 in Case 2 instead of 3342 in Case 1 but still less than the fastest state-of-theart strategy, S8 [14]. Finally, the two cases achieved using NESTPSO displayed better results than all stateof-the-art strategies shown in Table 5. The convergence of Case 1 and Case 2 compared to the 10 state-of-the-art strategies (S1-S10) for the Sphere benchmark function is shown in Figure 14. All Figures 14-17 are showing the average results for 1000 runs. It is clear from Figure 14 that these cases are faster and get better convergence compared to the state-ofthe-art strategies shown in Table 5. This confirms the superiority of the NESTPSO.

Comparison of NESTPSO with State-of-the-Art PSO Strategies for the Generalized Rastrigrin Function
Results similar to the Sphere function can be obtained for the generalized Rastrigrin function, where Case 3 and Case 4 correspond to PCR <= 5% and 1%, respectively. These two cases are compared to the state-of-the-art strategies shown in Table 5, from where it is clear that the best PCR obtained from the state-of-the-art strategies is for S7 [13], where PCR = 0.2% with NSS = 4759. Notably, this strategy gives the lowest PCR value compared to the other state-of-the-art strategies, and therefore is the best strategy to be used with the generalized Rastrigrin function compared to the other state-of-the-art strategies. Case 3 and Case 4 obtained from NESTPSO gave better results than the state-of-the-art strategies, where their PCRs and NSS are, 4.5%, 2127, and 0.99%, 2857, for Case 3 and Case 4, respectively. These values are considerably lower than the values obtained from the stateof-the-art strategies. These results prove the superiority of NESTPSO in determining the optimal control parameter for the generalized Rastrigrin Function. The variation of the fitness function values in state-of-the-art strategies compared to the results obtained from NESTPSO for the generalized Rastrigrin function are shown in Figure 15. This figure shows the superior performance of the results obtained from NESTPSO strategy compared to the state-of-the-art strategies.

Comparison of NESTPSO with State-of-the-Art PSO Strategies for the De Jong Function
A similar experimental study is performed for the De Jong function to compare th performance of the state-of-the-art strategies with the NESTPSO strategy as shown in Ta ble 5. The best PCR from the state-of-the-art strategies is from S5, where PCR = 2.4% with NSS = 3707. Meanwhile, the maximum value of PCR is achieved with S8, where PCR 62.2% with NSS = 1707. Meanwhile with NESTPSO, as discussed before in Case 5 and Cas 6, the values of PCR are reduced to 4.496% and 0.994% with NSS = 1891 and 2210, respec tively. It is clear from the results shown in Table 5 that the control parameters obtained from the NESTPSO substantially improved the performance of the PSO for the De Jon function compared to the state-of-the-art strategies in terms of the PCR and NSS. Thi proves the superiority of the NESTPSO strategy in determining the control parameters o PSO for the De Jong function. The variation of the fitness function values in all state-of the-art strategies compared to the results obtained from the NESTPSO for the generalized De Jong function are shown in Figure 16. This figure shows the superior performance o the results obtained from NESTPSO strategy compared to the state-of-the-art strategie [8][9][10][11][12][13][14][15].

Comparison of NESTPSO with State-of-the-Art PSO Strategies for the Alpine Func tion
The last benchmark function tested to prove the superiority of NESTPSO is the Alpin function. Ten state-of-the-art strategies are used with this function and the results com pared to the results obtained from NESTPSO, as shown in Table 5. The first notable resul is that the difference in the PCR values obtained from one of the state-of-the-art strategie is extremely high. For S5, PCR = 13.68% with NSS = 7148, and for S8, PCR = 95.54% with NS = 1702. As mentioned before, NESTPSO determines the values of the control parameter for any level of complexity or for any strange behavior of the fitness function, which proves the superiority of the NESTPSO strategy. The PCR values for the Alpine function are 4.33% and 0.92% for Case 7 and Case 8, respectively, which are substantially lowe  Figure 17. This figur the superior performance of the results obtained from NESTPSO strategy compar state-of-the-art strategies [8][9][10][11][12][13][14][15].

Real-World Application
The MPPT of the PV system under partial shading conditions was the motive for developing the new NESTED PSO technique. The PV system shown in Figure 18 is show ing PV arrays having five series groups of PV modules, connected to boost converter, and three-phase pulse width modulation (PWM) inverter to be interconnected with the electric utility. Each group of the PV array contains 300 modules placed in 60 parallel branches

Comparison of NESTPSO with State-of-the-Art PSO Strategies for the Generalized Rastrigrin Function
Results similar to the Sphere function can be obtained for the generalized Rastrigrin function, where Case 3 and Case 4 correspond to PCR <= 5% and 1%, respectively. These two cases are compared to the state-of-the-art strategies shown in Table 5, from where it is clear that the best PCR obtained from the state-of-the-art strategies is for S7 [13], where PCR = 0.2% with N SS = 4759. Notably, this strategy gives the lowest PCR value compared to the other state-of-the-art strategies, and therefore is the best strategy to be used with the generalized Rastrigrin function compared to the other state-of-the-art strategies. Case 3 and Case 4 obtained from NESTPSO gave better results than the state-of-the-art strategies, where their PCRs and N SS are, 4.5%, 2127, and 0.99%, 2857, for Case 3 and Case 4, respectively. These values are considerably lower than the values obtained from the state-of-the-art strategies. These results prove the superiority of NESTPSO in determining the optimal control parameter for the generalized Rastrigrin Function. The variation of the fitness function values in state-of-the-art strategies compared to the results obtained from NESTPSO for the generalized Rastrigrin function are shown in Figure 15. This figure shows the superior performance of the results obtained from NESTPSO strategy compared to the state-of-the-art strategies.

Comparison of NESTPSO with State-of-the-Art PSO Strategies for the De Jong Function
A similar experimental study is performed for the De Jong function to compare the performance of the state-of-the-art strategies with the NESTPSO strategy as shown in Table 5. The best PCR from the state-of-the-art strategies is from S5, where PCR = 2.4% with N SS = 3707. Meanwhile, the maximum value of PCR is achieved with S8, where PCR = 62.2% with N SS = 1707. Meanwhile with NESTPSO, as discussed before in Case 5 and Case 6, the values of PCR are reduced to 4.496% and 0.994% with N SS = 1891 and 2210, respectively. It is clear from the results shown in Table 5 that the control parameters obtained from the NESTPSO substantially improved the performance of the PSO for the De Jong function compared to the state-of-the-art strategies in terms of the PCR and N SS.
This proves the superiority of the NESTPSO strategy in determining the control parameters of PSO for the De Jong function. The variation of the fitness function values in all state-ofthe-art strategies compared to the results obtained from the NESTPSO for the generalized De Jong function are shown in Figure 16. This figure shows the superior performance of the results obtained from NESTPSO strategy compared to the state-of-the-art strategies [8][9][10][11][12][13][14][15] The last benchmark function tested to prove the superiority of NESTPSO is the Alpine function. Ten state-of-the-art strategies are used with this function and the results compared to the results obtained from NESTPSO, as shown in Table 5. The first notable result is that the difference in the PCR values obtained from one of the state-of-the-art strategies is extremely high. For S5, PCR = 13.68% with N SS = 7148, and for S8, PCR = 95.54% with N SS = 1702. As mentioned before, NESTPSO determines the values of the control parameters for any level of complexity or for any strange behavior of the fitness function, which proves the superiority of the NESTPSO strategy. The PCR values for the Alpine function are 4.33% and 0.92% for Case 7 and Case 8, respectively, which are substantially lower than the similar values obtained from the state-of-the-art strategies [8][9][10][11][12][13][14][15]. The variation of the fitness function values of all state-of-the-art strategies compared to the results obtained from NESTPSO for the Alpine function are shown in Figure 17. This figure shows the superior performance of the results obtained from NESTPSO strategy compared to the state-of-the-art strategies [8][9][10][11][12][13][14][15].

Real-World Application
The MPPT of the PV system under partial shading conditions was the motive for developing the new NESTED PSO technique. The PV system shown in Figure 18 is showing PV arrays having five series groups of PV modules, connected to boost converter, and three-phase pulse width modulation (PWM) inverter to be interconnected with the electric utility. Each group of the PV array contains 300 modules placed in 60 parallel branches with five modules in series in each branch. The irradiance on each group is assumed to be the same within the modules of each group; meanwhile, each group is exposed to different irradiance than the others. The inductance and capacitance of the boost converter are L = 0.5 mH and C = 200 µF. The PV module used in this simulation is (Sunperfect Solar CRM185S156P-54) [46], and its specifications are that maximum power per module is 185. 22  strategy is 2.7672 s, which is less than half the convergence time of the best state-of-theart strategy shown in Table 6. This reduction in convergence time shows the superiority of using the NESTPSO in many online optimization applications where the fast response of this strategy allows the PSO to work effectively with the fast-changing weather conditions.  The relation between the PV power from the PV arrays and the duty ratio of the boost converter is shown in Figure 19 for uniform irradiance and partial shading conditions (PSC). For uniform irradiance as shown in SP0 of Figure 19, there is only one peak in the P-V characteristics of PV array. Meanwhile, in the case of PSC, many peaks are generated in the P-V characteristics of the PV array, as shown in SP1-SP3 of Figure 18. Shading patterns based on PSC (SP1-SP3) are having one global peak (GP) and many local peaks (LPs) in each curve. A conventional technique like hill-climbing [47] or perturb and observe [48] are effective in tracking the MPPT of the PV system in uniform irradiance, because there is only one peak. Meanwhile, these techniques may stick at one of the LPs in the case of PSC. For this reason, swarm techniques like the PSO have been used as an MPPT of the PV systems [49][50][51][52][53][54][55][56][57][58][59]. Although these techniques, especially the PSO, showed great improvement; meanwhile, they are suffering from two shortcomings, which are the sluggish convergence and premature convergence possibilities. The main reason for these two shortcomings was the improper selection of the PSO control parameters, which was the main motive to propose a new technique to determine the optimal values of these parameters. The two shortcomings can be measured using the N SS and PCR. The actual convergence rate of the boost converter is equal to the value of N SS times the sampling time or switching signal period t S . The sampling period is chosen in this study to be 0.05 s. The PV system is simulated in Simulink, and the Matlab code of the PSO is simulated in Matlab code. The simulation is carried out for the PV system shown in Figure 18 1000 times to avoid the random nature of PSO. The swarm size is selected to be equal to the maximum number of peaks in the P-V characteristics, which is recommended in the literature [46,50]. For this reason, the swarm size is chosen to be equal to five. Random initialization for the values of duty ratios of boost converter prolongs the convergence rate and increases the value of PCR, and for this reason, the initialization of duty ratios can be obtained from (14). As an example, if SS = 5, then the initial values of duty ratios are [0.166 0.333 0.5 0.667 0.833]. The boundaries for the inner loop variables (duty ratio of boost converter) are set between 0.02 to 0.98. Regarding the variables of the outer PSO loop variables that will be used as input to the inner PSO loop, the boundaries of these PSO control parameters are selected as the same for the benchmark function.
where, k is the counter representing the particles of the swarm, k = 1, 2, . . . SS, and SS is the swarm size. The simulation is performed for the same strategies shown in Table 5 compared to the results obtained from NESTPSO, and the results are shown in Table 6. The multiobjective function is as shown in (8), where M is chosen to be equal to 1000. It is clear from the results obtained that the PCR is equal to zero for all strategies under study thanks to initialization from Equation (14), and the evaluation of these strategies will be based on the convergence time t C . It is clear from the results shown in Table 6 that the longest convergence time is 15.0175 s for S3 [10] strategy. Meanwhile, the shortest convergence time is 5.171175 s for S8 [14] strategy. The simulation used to determine the optimal PSO control parameter values using the NESTPSO is started in the beginning using the same logic discussed above. The values of the control parameter obtained from the NESTPSO are used online to see the convergence time for online control where random radiations are chosen for the 5 PV module groups are used. The convergence time with the NESTPSO strategy is 2.7672 s, which is less than half the convergence time of the best state-of-the-art strategy shown in Table 6. This reduction in convergence time shows the superiority of using the NESTPSO in many online optimization applications where the fast response of this strategy allows the PSO to work effectively with the fast-changing weather conditions.     To show the superiority of performance of the NESTPSO in MPPT of the PV system, it will be compared to the longest convergence (S3 [10]) and shortest convergence (S8 [14]) time strategies. Figure 20 shows the performance of the PV system with the longest convergence time (S3 [10]) state-of-the-art strategy. It is clear from this figure that the PSO captured the GP after 15.02 s convergence time. Figure 21 shows the performance of the PV system with the shortest convergence time (S8 [14]) state-of-the-art strategy. It is clear from this figure that the PSO captured the GP after 5.17 s convergence time. Figure 22 shows the performance of the PV system with the control parameters obtained from NESTPSO. It is clear from this figure that the NESTPSO strategy captured the GP with 2.76 s, which is substantially lower than the convergence time from all state-of-the-art strategies, which proved the superiority of the NESTPSO in determining the control parameters of the PSO when it is used as an MPPT of the PV energy systems. This reduction in convergence time will enable the PSO and other swarm optimization techniques to work in online tracking of MPPT with very fast performance. captured the GP after 15.02 s convergence time. Figure 21 shows the performance of the PV system with the shortest convergence time (S8 [14]) state-of-the-art strategy. It is clear from this figure that the PSO captured the GP after 5.17 s convergence time. Figure 22 shows the performance of the PV system with the control parameters obtained from NESTPSO. It is clear from this figure that the NESTPSO strategy captured the GP with 2.76 s, which is substantially lower than the convergence time from all state-of-the-art strategies, which proved the superiority of the NESTPSO in determining the control parameters of the PSO when it is used as an MPPT of the PV energy systems. This reduction in convergence time will enable the PSO and other swarm optimization techniques to work in online tracking of MPPT with very fast performance.   Table 6. Performance of PSO MPPT of the PV system with the parameter of S8 [14] as shown in Table 6. Figure 22. Performance of PV energy system using NESTPSO as an MPPT strategy.

Conclusions and Recommendations
Applying the PSO to search for the optimal conditions in any optimization needs high confidence in getting the global optimal solution and a fast convergence rate, espe- Figure 21. Performance of PSO MPPT of the PV system with the parameter of S8 [14] as shown in Table 6. Performance of PSO MPPT of the PV system with the parameter of S8 [14] as shown in Table 6. Figure 22. Performance of PV energy system using NESTPSO as an MPPT strategy.

Conclusions and Recommendations
Applying the PSO to search for the optimal conditions in any optimization needs high confidence in getting the global optimal solution and a fast convergence rate, espe- Figure 22. Performance of PV energy system using NESTPSO as an MPPT strategy.

Conclusions and Recommendations
Applying the PSO to search for the optimal conditions in any optimization needs high confidence in getting the global optimal solution and a fast convergence rate, especially in the online applications of the PSO. The high confidence of getting the global optimal solution can be achieved by minimizing the PCR and the convergence time. Therefore, the PCR and convergence time are the key issues to evaluate the performance of the PSO or any other metaheuristic technique. These two factors should be minimized for the high performance of the PSO. These two factors are affected considerably by the control parameters of the PSO. Therefore, these two factors are minimized by varying the control parameters of the PSO that can be achieved by using the new proposed strategy (NESTPSO). It comprises of two nested PSO loops. The NESTPSO has been introduced in this study to determine the optimal PSO control parameters offline, and they will be used in online applications. The NESTPSO is performed with four popular benchmark functions to compare it with the existing PSO strategies. The NESTPSO strategy showed a considerable improvement in the performance of the PSO in terms of reduction in the values of the PCR and convergence time. This improvement in the performance of the PSO will further encourage the researchers, designers, and operators to use the PSO and all the metaheuristic optimization techniques in the optimization of many online problems where the inferior performance of these techniques was a barrier in the online applications in the past. With the superior results obtained from the NESTPSO, the metaheuristic techniques will have big support to surpass any other optimization techniques, especially in online applications. In the future, the NESTPSO can be applied to many applications to achieve the optimal values of control parameters of the PSO to improve their performance. The practical applications in real life or engineering optimization issues such as the MPPT of PV energy system shows the superior of the NESTPSO in terms of the convergence time, where it reduced the convergence time from 442.7% to 86.9% compared to the convergence time of state-of-the-art strategies when they are used in the MPPT of the PV systems.
Major conclusions from this study can be summarized in the following points: • The control parameters have a great effect on the performance of a PSO technique.

•
Desired values of control parameters of PSO for a certain fitness function do not guarantee the same for other fitness functions. This means that every fitness function has different values of optimal PSO control parameters for an optimal PSO performance, and it is not recommended to use fixed values of these parameters in all the applications.

•
Tuning the PSO parameters needs high expertise designers, and there is no guarantee that these tuned parameters are the best choice. The NESTPSO provides a guarantee that its results of control parameters display the highest performance.

•
The proposed strategy exhibits a rapid convergence to reach the optimal solution compared to the time required by the state-of-the-art strategies.

•
The optimal value of inertia weight is approximately constant for all the applications and varies from 0.7536 to 0.8764. Meanwhile, the acceleration parameters have widely different values from one fitness function to another.

•
The values of PCR and N SS reduced considerably for all the benchmark functions with NESTPSO, compared to the state-of-the-art strategies.

•
The private PSO parameter c l is sometimes going to a negative value, which is not shown before in the literature.
Suggested applications of NESTPSO in the future are: • Determining the control parameters for the dynamic variation control parameters in the PSO strategies.

•
Determining the control parameters of other metaheuristic techniques. Definitions ω i Inertia weight, suffix i is standing for the inner loop ω e Inertia weight, suffix e is standing for the outer loop c l and c g Acceleration parameters or the self-confidence and the swarm-confidence parameters c li and c gi Acceleration parameters for inner PSO loop c le and c ge Acceleration parameters for outer PSO loop V i k The speed for particle i at k iteration. Acceptable values of the standard deviation of the particle's best positions.

P best
Particles private best