A novel hybrid algorithm based on rat swarm optimization and pattern search for parameter extraction of solar photovoltaic models

Parameter extraction of photovoltaic (PV) models based on measured current–voltage data plays an important role in the control, simulation, and optimization of PV systems. Despite the fact that various parameter extraction strategies have been dedicated to solving this problem, they may have certain drawbacks. In this paper, an effective hybrid optimization method based on adaptive rat swarm optimization (ARSO) and pattern search (PS) is presented for effectively and consistently extracting PV parameters. The proposed method employs the global search ability of ARSO and the local search ability of PS. The performance of the new algorithm is investigated using a set of benchmark test functions, and the results are compared with those of the standard RSO and some other methods from the literature. The extraction of parameters from several PV models, such as single‐diode, double‐diode, and PV modules, confirms the performance of the suggested method. Simulation results show that the proposed method surpasses other state‐of‐the‐art procedures in terms of accuracy, reliability, and convergence speed.


INTRODUCTION
Extreme weather disasters have become more common in recent years. One of the major causes of these catastrophes is environmental degradation caused by the burning of fossil fuels. Furthermore, fossil fuel reserves are finite and unrecoverable. Given the drawbacks of fossil fuels, discovering renewable energy sources (RESs) is a pressing human concern. Due to its lack of noise, low pollution, and widespread distribution, solar energy appears to be the most promising RES. 1 Severe environmental degradation, such as deforestation and air pollution, 2 as well as rapid depletion of nonrenewable resources such as traditional fossil fuels, 3 is jeopardizing the world's long-term development. 4 A long-term energy revolution and transformation are now required to deal with a wide range of environmental problems before they turn into more serious crises. 5 Meanwhile, to satisfy the rising energy demand, 6 the research and use of renewable energy technologies, 7 such as solar 8 and wind, 9 is critical. Solar energy is one of the most promising and efficient alternatives, 10 and it has already found widespread use due to its ease of installation and lack of emissions. Solar energy, for example, is a common and important choice in hybrid energy systems to improve power supply reliability and efficiency, 11 and it has been successfully integrated with hydrogen, 12 battery storage, 13 diesel technologies, 14 and other technologies. Due to the exponential development of energy consumption, RESs are critical for global energy systems. Solar power is a key RES for electrical energy generation. Furthermore, because of their benefits over conventional fossil fuels, RESs have grown popular for electrical power generation. 15 When compared to fossil fuels, the cost of RES for energy is zero, and the cost of maintenance is quite cheap. Furthermore, unlike fossil fuels, the accompanying CO 2 emissions are zero. Studies have concentrated on increasing new methods to transform solar energy into electrical energy as a result of these factors.
Solar photovoltaic (PV) cells serve as a conversion medium for solar energy to electrical energy. Because such systems demand more initial capital, defined studies are required to create a PV system for best utilization. To analyze and regulate a PV module (PVM), accurate PV system modeling is required. 16 The precise calculation of PVM parameters is a milestone in PV system exact modeling. Depending on the level of accuracy required, a solar PVM can be represented by one, two, or more diodes. A typical PVM contains several PV cells joined in series and parallel configurations. 17 A PV cell exhibits nonlinear I-V characteristics and this curve pattern tend to vary with the variations in environmental conditions such as temperature (T in°C ) and irradiance (G in W/m 2 ). Manufacturers of PV systems provide information such as open-circuit voltage (V oc ), short circuit current (I sc ), voltage (V MPP ), and current (I MPP ) at the maximum power point (MPP) and peak power MPP under standard test condition (STC), that is, G of 1000 W/m 2 at 1.5 air mass spectral distributions and T of 25°C. In general, the operating environment is different from STC. In view of this, to get a better understanding of I-V curves as it will be helpful to estimate optimum power generation capacity from PV systems, several lumped parameter circuit models have been proposed in the literature. In practice, two popular equivalent circuit models are used known as a singlediode model (SDM) and double-diode models (DDM). SDM contains five parameters: photovoltaic current (I ph ), diode saturation current (I s ), series resistance (R s ), shunt resistance (R sh ), and diode ideality factor (n). Whereas DDM has an extra diode that is used to account for the space charge recombination current. Due to this, DDM has two additional parameters such as "I s " and "n" of the second diode. SDM is more convenient in the case of outdoor and intermittent weather conditions, and DDM is preferable for normal weather conditions. 18 An accurate and precise determination of parameters of the equivalent circuit model of PV cell at a given operating temperature and irradiance is termed parameter estimation of PV cell.
Several strategies for extracting parameters of lumped electrical circuit models of PV cells based on datasheet information or observed I-V data are widely accessible. 19 The PV cells have nonlinear I-V curves, and the modeling equations are transcendental equations. Analytical approaches, numerical methods, and evolutionary algorithms are three types of methods for resolving nonlinear equations that have been documented in the literature. 20 Analytical methods can swiftly solve linear equations, but they may fail to solve nonlinear equations with multiple unknowns because complex problems demand more acceptable assumptions. 21 When there are several unknowns, analytical procedures produce erroneous results. To discover the unknown parameters in analytical approaches, it is necessary to manipulate model equations mathematically. 22 For solving nonlinear equations, numerical methods need the manufacturer's datasheet values along with some assumptions. Nonlinear equations are solved by utilizing iterative strategies in these methods. The most difficult aspect of such methods is estimating the beginning value, which has an impact on the solution's convergence rate. To solve nonlinear equations, the Gauss-Seidel and Newton-Raphson (NR) methods are commonly utilized. 23 The NR method's convergence rate is quadratic in nature, and it has the highest convergence rate with the fewest iterations. Numerical methods are, in general, local search methodologies. As a result, the accuracy of parameter estimates using numerical approaches is determined by the fitting algorithm used, the objective function provided by the user, and the initial guess. 24 Despite the fact that numerical approaches can yield PV cell parameters with more accuracy than analytical methods, there are some inherent limitations. First, numerical approaches' convergence is highly dependent on the initial solution guess. Second, using gradient operations complicates the solution process, and the singularity condition may arise during this approach. However, it is very challenging to obtain the optimal model parameters since the objective function is nonlinear, complex, implicit, multimodal, and transcendental. 25 Optimization has been a prominent research subject and a cost-effective approach to find an optimal solution to complicated issues in recent years. Based on the nature of inspiration, the optimization techniques have been categorized into four groups (see Figure 1). Swarm-based algorithms are the first type, and they consist of a population of simple agents interacting locally with one another and with their environment. Some examples of swarm-based algorithms include particle swarm optimization (PSO), 26 firefly algorithm (FFA), 27 bat algorithm, 28 salp swarm algorithm, 29 ant colony optimization (ACO), 30 artificial bee colony, 31 gray wolf optimization (GWO), 32 krill herd, 33 whale optimization algorithm, 34 moth-flame optimization (MFO), 35 tunicate swarm algorithm (TSA), 36 African vulture optimization, 37 gorilla troops optimizer (GTO), 38 grasshopper optimization algorithm (GOA) 39 and rat swarm optimization (RSO). 40 The second group is evolutionary algorithms, which are efficient heuristic search methods based on Darwinian evolution with powerful characteristics of robustness and flexibility to capture global solutions to complex optimization problems. Genetic algorithm, 41  biogeography-based optimizer, 44 evolutionary programming, 45 differential evolution (DE), 46 virulence optimization algorithm, 47 and tree seed algorithm (TSA) 48 are some of these algorithms. The third category is physics-based algorithms inspired by natural phenomena and imitating physical and biological processes of nature, such as simulated annealing, 49 gravitational search algorithm (GSA), 50 black hole algorithm, 51 curved space optimization algorithm, 52 multiverse optimization, 53 ray optimization, 54 Lichtenberg algorithm 55 and gradient-based optimizer (GBO). 48 The fourth category is humanbased algorithms that allow humans to contribute solution suggestions to the evolutionary process, such as harmony search (HS), 56 teaching learning-based optimization (TLBO), 57 imperialist competitive algorithm, 58 exchanged market algorithm, 59 thermal exchange optimization 60 and Tabu search (TS). 61 There are other algorithms that are a combination or modification of algorithms in these four categories. 62,63 Some of them are: modified PSO, 64 modified HS algorithm, 65 modified GSA, 66 modified ACO, 67 and hybrid sine-cosine algorithm (SCA). 68,69 Recently, metaheuristic optimization methods have been widely used to estimate the parameters of PV cells to overcome the limitations orf numerical methodologies. Improved convergence, immunity from an initial guess, lack of singularity condition, and examination of all I-V data points rather than crucial places on the I-V curve are all advantages of metaheuristic optimization techniques. 70 The various metaheuristic optimization techniques have been utilized in the literature to acquire PV cell parameters. Some of these techniques include: TLBO, 71 WOA, 72 FFA, 73 GSA, 74 GWO, 75 SSA, 76 MFO, 77 TSA, 78 GTO, 79 TS algorithm, 80 DE, 81 GBO, 82 and GOA. 83 The rate of convergence, precision, and implementation complexity are all important factors to consider when choosing these optimization approaches. Although all of these methods have been shown to be accurate for parameter estimates, they each have their own sets of limitations, such as the number of essential parameters that must be established, the complexity of the implementation, and the computational time necessary to complete the estimation. Research is underway to develop efficient algorithms to predict parameters of PV cells under different environmental conditions in the hunt for simple and faster techniques. Despite the fact that metaheuristic algorithms can produce acceptable results, no algorithm can outperform others in solving all optimization issues. As a result, various studies have been conducted to increase the performance and efficiency of the original metaheuristic algorithms and adapt them to a specific application.
One of the most recent bio-inspired populationcreated metaheuristic algorithms for complex optimization problems is the RSO. 84 The RSO algorithm mimics the following and attacking performances of rats in nature. Like the other population-based techniques, RSO, without any information about the solution, utilizes random initialization to generate the candidate. Compared to the other metaheuristics, RSO possesses several advantages. It has a very simple structure, and a fast convergence rate, and can be easily understood and utilized. However, like other metaheuristic algorithms, RSO commonly suffers from getting trapped in local minima when the objective function is complex and includes a rather large number of variables.
To overcome this drawback, a hybrid algorithm has been developed based on a combination of an adaptive version of RSO (ARSO) and a pattern search (PS) method called hybrid ARSO with PS (hARS-PS). The proposed hybrid algorithm utilizes the exploration ability of ARSO and the exploitation ability of PS, which can significantly improve the finding results. ARSO and PS offer complementary benefits, and combining these two techniques can result in a faster and more reliable algorithm. In the ARSO, both the initial random solutions and their opposites are evaluated in the first iteration of the algorithm, and if the opposite solution's fitness is lower than the random one, the opposite solution will be selected. As a result, the algorithm begins with better solutions instead of random ones. Furthermore, the new algorithm replaces the worst solution with a better one at each iteration to improve the algorithm's exploration capabilities as well as its performance and convergence rate. To authenticate the robustness of the suggested ARSO, a set of benchmark functions from the literature are employed. The numerical findings reveal that the hARS-PS converges faster and significantly outperforms the RSO and some well-known optimization algorithms. To demonstrate the superior performance of hARS-PS, the results are compared of the proposed method with seven well-established algorithms for extracting the parameters of three different PV models, that is, SDM, DDM, and PVM. The experimental results show that the proposed method can achieve highly competitive performance and can reliably and accurately extract the parameters of the three different PV models.
The main contributions of this study can be summarized as follows: 1. An efficient hybrid optimization algorithm, hARS-PS, is proposed for numerical function optimization and parameter estimation of solar cell SDM, DDM, and PVM models.
2. The proposed hybrid algorithm utilizes the exploration ability of ARSO and the exploitation ability of PS, which can significantly improve the finding results. 3. Compared with the original RSO and six state-of-theart algorithms for the parameter estimation problem of PV models, hARS-PS shows its advantages in the aspects of accuracy, convergence speed, and stability.
The rest of the paper is organized as follows: Section 2 introduces the PV models used in this study. Also, the mathematical equation formulation for parameter evaluation of PV models is presented. Section 3 explains the proposed hybrid optimization algorithm. Section 4 exhibits the experimental results and discussion. Section 5 discusses the conclusion and future work.

MATHEMATICAL MODELING AND PROBLEM STATEMENT OF PV
Many models exist in the relevant publications to describe the physical PV cell's features. The SDM and the DDM are two of the most commonly used equivalent circuit mathematical models to define the nonlinear features of PV systems. The mathematical formulas for the three different PV models (SDM, DDM, and PVM), as seen in Figure 2, are described in this section. This section also covers the objective function. 85

Single-diode model
Because of its simple form and precision, the SDM is frequently used to illustrate the static features of solar cells. The SDM is made up of a diode, a current source, a shunt resistor, and a series resistor, as shown in Figure 1A. It is worth mentioning that the shunt and series resistors are used to indicate leakage current and load current loss, respectively. To account for the contact resistance between silicon and electrode surfaces, electrode resistance, and current flow resistances, they are all modeled as R s . In addition, R sh is used to account for the leakage current of a P-N junction diode. As a result, the SDM has five parameters: I ph , I sd n, R s , and R sh . The SDM's I-V characteristics are given by Equation (1). 21 where I sd denotes the diode's saturation current; and V L and I L denote the measured I-V data acquired from the PV cell. R s denotes series resistance; q and k denote electron charge (1.60217646 × 10 −19 C) and Boltzmann constant (1.3806503 × 10 −23 J/K), respectively; n denotes diode ideal factor; T denotes cell temperature (K); R sh stands for shunt resistance. The PV effect causes current to flow through the P-N junction, which is referred to as I ph , in the presence of irradiance. It can be seen that there are five unknown parameters in SDM that need to be retrieved (I ph , I sd , n, R s , and R sh ).

Double-diode model
The effect of recombination current loss in the depletion area has been integrated into DDM to improve the accuracy of the PV cell circuit model offered in SDM. A second diode is added to represent a current loss in the depletion area. As a result, at low irradiance levels, the DDM model is more accurate. This extra diode, however, adds two new parameters: n and I sd . The DDM's circuit model is shown in Figure 1B. Equation (2) can be used to obtain the DDM's I-V characteristics.
where I s1 and n 1 stand for diffusion current and ideality factor, respectively; n 2 and I s2 stand for composite diode ideality factor and saturation current, respectively. As a result, the DDM model comprises seven parameters that must be precisely extracted: I ph , I sd1 , n 1 , I sd2 , n 2 , R s , and R sh .

PV module
To form a PVM, PV cells are linked in series or parallel, depending on the voltage and current requirements. Figure 1C shows the comparable circuit schematic for the single-diode PVM. Formula (3) can be used to compute the output current of this model. 86,87 where N s and N p denote the number of solar cells connected in series or parallel, respectively. N p is set to 1 because the PVM used in this study are all in series. As a result, Equation (3) can be written as follows: There are five unknown parameters for the PVM (I ph , I sd , n, R s , and R sh ) that must be extracted.

Problem formulation
The parameter identification problem must identify the minimal error value by measuring and simulating I-V data under various lighting temperatures and other environmental circumstances to find the ideal parameter value. To make use of optimization algorithms, parameter extraction issues are typically turned into a class of optimization problems. In the table's last row, the root mean square error (RMSE) is the objective function used to evaluate the overall difference between measured and simulated current data. The RMSE is employed as the objective function in this study, as it is in the study by Ma et al., 20 and it is defined as follows: X is a vector that concludes the unknown parameters to be retrieved, and M is the number of measured I-V data. As a result, the error function values X f V I ( , , ) L L of SDM, DDM and PVM for various PV models can be represented as follows: • For SDM: • For SDM: • For PVM:

PROPOSED HYBRID ALGORITHM
The proposed hybrid method hARS-PS will be described in this section after a brief overview of RSO and PS methods.

Rat swarm optimization
RSO is a new metaheuristic algorithm inspired by rats' following and attacking behavior. 53 Rats are a type of regional animal that lives in swarms of males and females. In certain circumstances, rats' behavior is extremely aggressive, resulting in the deaths of several animals. Rats' following and aggressive actions are mathematically simulated in this manner to accomplish optimization. 53 The RSO, like other population-based optimization methods, starts with a collection of random solutions that reflect the rat's position in the search space. An objective function evaluates this random set regularly and improves it based on the following and aggressive actions of rats. The initial positions of eligible solutions (rats' positions) are determined randomly in the search space in the original version of the RSO technique: where x i min and x i max are the lower and upper bounds for the ith variable, respectively, and N is the total number of agents. Generally, rats follow the bait in a group through their socially painful behavior. Mathematically, to describe the performance of rats, it is assumed that, the greatest search agent has the knowledge of bait placement. Therefore, the other search agents can inform their locations with respect to the greatest search agent obtained until now. The following equation has been suggested to present the attacking process of rats using bait and produce the updated next position of rat 84 : where P t ⃗ ( + 1) i defines the updated positions of ith rats, and P t ⃗ ( ) r is the best optimal solution found so far. In the above equation, P ⃗ can be obtained using Equation (11).
where P t ⃗ ( ) i defines the positions of ith rats, and parameters A and C are calculated as follows: The parameters R is a random number between [1,5], C is a random number between [0, 2]. 84 t is the current iteration of the optimization process and Iter max is the maximum number of iterations. Equation (10) updates the locations of search agents and saves the best solution.

Adaptive RSO
Even though RSO outperforms other evolutionary algorithms in terms of identifying global optima, such as MFO, GWO, and GSA, 53 the algorithm may have difficulty discovering superior results when investigating complex functions.
To increase the efficiency and global search ability of RSO, this study introduces an adaptive version of the algorithm using the idea of opposition-based learning. As mentioned before, RSO, as a member of a populationbased optimization algorithm, starts with a set of initial solutions and tries to improve performance toward the best solution. In the absence of a priori knowledge about the solution, the random initialization method is used to generate candidate solutions (initial rat's position) based on Equation (9). Obviously, the performance and convergence speed are directly related to the distance between the initial solutions and the best solution. In other words, the algorithm has better performance if the randomly generated solutions have a lower value of the objective function. According to this idea, and to improve the convergence speed and chance of finding the global optima of the standard RSO, this paper proposes an adaptive version of the algorithm (ARSO). In the new ARSO, in the first iteration of the algorithm, after generating the initial random solutions (i.e., the rats' positions) using Equation (9), the opposite positions of each solution will be generated based on the concept of the opposite number. To describe the new population initialization, it is necessary to define the concept of the opposite number. Let us consider the N-dimensional vector X as follows: where Then, the opposite point of x i , which is denoted by x̅ i , is defined by: To apply the concept of the opposite number in the population initialization of the ARSO, consider x i to be a randomly generated solution in N-dimensional problems space (i.e., candidate solution). For this random solution, its opposite will be generated using Equation (15) and denoted by x̅ i . Then, both solutions (i.e., x i and x̅ i ) will be evaluated by the objective function f (.). Therefore, if f (x̅ i ) is better than f (x i ) (i.e., f (x̅ i ) < f (x i )), the agent x i will be replaced by x̅ i ; otherwise, continue with x i . Hence, in the first iteration, the initial solution and its opposite are evaluated simultaneously to continue with better (fitter) starting agents.
Although the ARSO is capable of outperforming the standard algorithm in terms of efficiency, it still suffers from the problem of becoming trapped in local optima and is not suitable for highly complex problems. In other words, during the search process, occasionally some agents fall into a local minimum and do not move for several iterations. To overcome these weaknesses and to increase the exploration and search capability, in the proposed ARSO, at each iteration, the worst solution yielding the largest fitness value (in minimization problems) will be replaced by a new solution according to the following equation: where, x worst is the solution with the maximum value of the objective function,rand 1 ,rand 2 andrand 3 are random numbers between 0 and 1. The new approach exchanges the position vector of a least ranked rat with its opposite or based on the best solution found so far in each generation. This process efforts to modify the result, by keeping diversity in the population and exploring new regions across the problem search space.
In summary, the two phases of the proposed ARSO algorithm are implemented as follows: first, the initial random solutions and their opposites are generated, and then these solutions are evaluated according to the objective function to start the algorithm with fitter (better) solutions. Second, the population updating phase is conducted by updating the current solutions, and then these solutions are evaluated again to replace the worst solution with a new one. The pseudocode of the proposed ARSO is presented in Algorithm 1.

Pattern search
PS is a derivative-free algorithm that can be simply implemented to fine-tune the local search. The PS algorithm generates a set of points that may or may not be close to the optimum. 88 To begin, a mesh (a collection of points) is created around an existing point. If a new point in the mesh has a lower value of the objective function, it becomes the current point in the following iteration. The PS starts the search with an initial point X 0 defined by the user. At the first iteration, the mesh size is considered equal to 1 and the pattern vectors (or direction vectors) are constructed as [0 1] + X 0 , [1 0] + X 0 , [−1 0] + X 0 and [0 −1] + X 0 , and new mesh points are added as presented in Figure 3. Then, the objective function is calculated for produced trial points until a value smaller than X 0 is found. If there is such a point (f (X 1 ) < f (X 0 )), the poll is successful and the algorithm sets this point as a source point. The method multiplies the current mesh size by 2 (called the expansion factor) after a successful poll and moves on to iteration 2 with the following new points: 2 × [0 1] + X 1 , 2 × [1 0] + X 1 , 2 × [−1 0] + X 1 and 2 × [0 −1] + X 1 . If a value lesser than X 1 creates, X 2 is defined, the mesh size is improved by two and iterations continue. The current point is not modified if the poll is unsuccessful at any stage (i.e., no point has an objective function lesser than the greatest latest rate) and the mesh size is reduced by multiplying by a reduction factor. This process is repeated until the minimum is found or a terminating condition is met. The steps of the PS method are presented in Algorithm 2.

Hybrid ARSO and PS
The adaptive RSO approach achieves outstanding global optimal results and is simple to escape from local minima. Increasing the number of ARSO iterations can theoretically improve search accuracy. ARSO, on the other hand, is unable to improve precision for some complex optimization issues when the number of iterations is large enough. As a result, ARSO's local search capacity remains unsatisfactory. PS is a method of local optimization, and the starting point has a big influence on the algorithm's output. PS, on the other hand, is a simple and effective method if a decent beginning point is picked. In this study, the ARSO's benefits as global optimization and the PS's benefits as local optimization are combined to identify the best answer. Because the PS is sensitive to the initial solution, the suggested hybrid approach starts with the ARSO. The ARSO is used to continue the search for a set number of iterations. The PS is then turned on to perform a local search using ARSO's most recent best solution as a starting point. The ARSO's powerful global searching capability and the PS's strong local searching capability may be combined in the hybrid algorithm. The flowchart for the proposed hARS-PS algorithm is shown in Figure 4.

Comparative time complexity analysis
Computational cost and complexity analysis can be conducted to evaluate the overall performance of a new optimization algorithm from different points of view. In computer sciences, the "Big O notation" is a mathematical notation that represents the required running time and memory space of an algorithm by considering the growth rate when dealing with different inputs.
For the presented hARS-PS algorithm, the random selection process in the initialization phase of the algorithm has a computational complexity of O (n d × ) where n denotes the population size and d denotes the dimensions of the problem. The computational complexity of the objective function evaluation in the initialization phase of the algorithm is calculated as O (n C × obj ) in which C obj represents the cost of the objective function. After the initialization phase, the main loop of the algorithm is started based on the previously determined maximum number of function evaluations (Max_Fun_Eval). Therefore, the total time complexity of the hARS-PS can be calculated by O (Max_Fun_Eval × (n d n C × + × obj )).

Hypotheses in the hARS-PS algorithm
Exploring the search space is ensured by the global search ability of ARSO.
Exploiting the most promising region within a converged search space is ensured by the local search ability of PS.
The hARS-PS algorithm has very few parameters to adjust.
[−500, 500] n 428.9829 × n 30   The hARS-PS algorithm is a gradient-free algorithm that considers the problem as a black box.
The hARS-PS algorithm may be successfully applied for parameter extraction of solar PV models.
In the following sections, several sets of test functions and real problems are used to evaluate and validate the performance of the wild horse optimizer algorithm in solving optimization problems.

RESULTS AND ANALYSIS
The obtained results of the hARS-PS algorithm for numerical function optimization and parameter extraction of PV models will be evaluated and compared with other optimization methods in the following subsections to verify the effectiveness of the proposed method.

Proposed method for benchmark test functions
The effectiveness of the proposed hybrid approach will be investigated in this section. On a set of benchmark test functions from the literature, the performance of hARS-PS is compared to that of the standard version of the algorithm as well as some well-known metaheuristic algorithms. These are all minimization tasks that can be used to test new optimization algorithms' robustness and search efficiency. The mathematical formulation and characteristics of these test functions are shown in Table 1.
The suggested hARS-PS is compared to the original RSO as well as other well-known optimization algorithms such as SCA, 69 GWO, 32 MFO, 35 GSA, 50 TSA, 36 and PSO. 89 The size of solutions (N) is equivalent to 50 for both hARS-PS and RSO. Because the suggested technique necessitated additional function evaluation, using the same maximum number of iterations may result in an unfair comparison. As a result, to make a fair comparison between the algorithms, all trials use the same amount of function evaluations, which is 50,000. Because metaheuristics are stochastic, a single run's results may be incorrect, and the algorithms may uncover better or worse solutions than those previously obtained. As a result, statistical analysis should be performed to provide a fair comparison and assess the effectiveness of the algorithms. To address this problem, 30 different runs using the stated algorithms are performed, with statistical results collected and reported in Table 2. Abbreviations: GSA, gravitational search algorithm; GWO, gray wolf optimization; hARS-PS, hybrid adaptive rat swarm optimization with pattern search; MFO, moth-flame optimization; PSO, particle swarm optimization; RSO, rat swarm optimization; SCA, sine-cosine algorithm. Table 2 shows that, when compared to the original RSO and other optimization methods, hARS-PS might deliver better solutions in terms of the best and mean value of the objective functions for all functions. The results show that hARS-PS is a more stable approach than the other methods in terms of standard deviation, which indicates the algorithm's stability. Based on the findings, it can be inferred that hARS-PS outperforms the standard algorithm as well as alternative optimization methods.

Proposed method for parameter extraction of PV models
In this subsection, three different solar PV models (SDM, DDM, and PVM) parameter extraction problems are solved using hARS-PS to further examine the effectiveness of the proposed hARS-PS. The SDM, DDM, and polycrystalline Photowatt-PWP201 modules are the three models in the issue. The 57-mm diameter commercial silicon R.T.C is used to obtain the I-V data of the SDM and DDM. 90 At a temperature of 33°C and an irradiance of 1000 W/m 2 , a silicon solar cell from France works. In addition, the Photowatt-PWP201 is used as a PVM to evaluate the hARS-PS and determine the associated parameters. 91 The Photowatt-PWP201, in particular, includes 36 silicon cells with a series conductivity of less than 1000 W/m 2 at 45°C. The parameter search ranges for the three PV models are provided in Table 3. 92 From the manufacturer's datasheet, short circuit current I sc , open-circuit voltage V oc , and MPP (V mpp , I mpp ) are the important parameters to be noted. Table 4 shows the values of these parameters for both PVMs considered in this study.
RSO, SCA, GWO, MFO, GSA, TSA, and PSO are seven well-known metaheuristic algorithms that are examined to validate the competitive performance of hARS-PS. On each PV model, all of the compared methods were run 30 times in a row. The maximum number of evaluations for the comparative methods is set to 50,000 for each execution. Furthermore, the accuracy of the eight analyzed approaches was demonstrated by comparing their best RMSE values. Through the study of data results and convergence curves, their resilience and convergence speed were also assessed. To ensure the fairness of the experiments, the accuracy of the results is assessed using the absolute error of current (IAE), max, min, mean, and standard deviation (Std). Table 5 shows the ideal parameters extracted and the RMSE values for the SDM, with the best results shown in boldface when the RMSE is at its minimum. Table 5 shows that among the eight algorithms, the hARS-PS and RSO have the best RMSE values (9.84E−04 and 9.91E −04, respectively); also, the MFO has the second-best RMSE value (9.95E−04), followed by GWO, GSA, PSO, TSA, and SCA. Because correct parameter values are not accessible, the RMSE is used to indicate the accuracy of experimental results. Despite the small difference between the best and second-best RMSE values, in the objective function, reducing the disparity between the true and estimated parameter values is crucial. Because the RMSE of the objective value is smaller, the estimated parameters are more accurate. In addition, the best parameters retrieved from hARS-PS are used to plot I-V and P-V curves. The SDM's I-V and P-V characteristic curves in Figure 5 reveal that the computed data provided by hARS-PS closely matches the actual data, implying that the suggested technique is more accurate than conventional SDM algorithms. Also, the detailed I-V data are arranged in Table 6, where IAE is defined as the absolute value of the difference between the measured and the simulated current values. From Figure 4 and Table 6, the high agreement between the model and the measured data can be observed. At each measured voltage point, the difference between the  Abbreviations: GSA, gravitational search algorithm; GWO, gray wolf optimization; hARS-PS, hybrid adaptive rat swarm optimization with pattern search; MFO, moth-flame optimization; PSO, particle swarm optimization; RSO, rat swarm optimization; SCA, sine-cosine algorithm; SDM, single-diode model.

F I G U R E 5
The measured data and simulated data obtained by hybrid adaptive rat swarm optimization with pattern search on a singlediode model T A B L E 6 Comparison between the experimental data and the best SDM obtained by hARS-PS

Results of the DDM
In comparison to the SDM, the DDM requires the identification of seven parameters. Although the number of parameters to be retrieved rises, it is thought to be more precise since the influence of the model's recombination current loss is taken into account. The retrieved parameters and RMSE values of the compared algorithms are shown in Table 7. Table 7 shows that among the eight algorithms, only hARS-PS produced the best result (9.82E−04). The DDM's ideal RMSE value (9.82E−04) is obviously smaller than the SDM's RMSE | 2705 value (9.84E−04), confirming the DDM's accuracy. This also implies that as the number of factors increases, the performance of many algorithms to discover the best solution begins to deteriorate. Figure 6 shows a comparison of the simulated and measured current and power values, similar to the SDM. The simulated current data agrees well with the measured current data, as shown in Figure 6A. The simulated power data and the measured power data in Figure 6B support the same conclusion, indicating that hARS-PS continues to outperform the DDM. Also, the detailed data in Table 8 reveals that the obtained DDM coincides with the experimental data very well. At each data point, the difference between the output current of the model and the actual current is very small.

Results of the PVM model
There are five parameters that must be estimated for the PVM. For each of the eight examined approaches, Table 9 shows the best RMSE and the five extracted parameter values based on 30 tests. Table 9 shows that hARS-PS has the lowest RMSE value (2.42E−03), whereas the RSO has the highest RMSE value (2.42E −03) (2.44E−03). Table 9. There is a comparison among different algorithms on the PVM model. Furthermore, Figure 7 indicates that the calculated parameters by hARS-PS have good I-V and P-V curve features that match the experimental values. Using this data, hARS-PS can extract parameters with high accuracy. Figure 7 shows that the simulated current (power) data provided by the proposed method is extremely F I G U R E 7 The measured data and simulated data were obtained by hybrid adaptive rat swarm optimization with pattern search on photovoltaic module model compatible with the measured current (power) data, regardless of which modules are used. Also, Table 10 shows the comparison between the experimental data and the best Photowatt-PWP201 obtained by hARS-PS for the PVM model.

Statistical results and convergence capability
In this section, the solutions obtained by hARS-PS and the reported algorithms for the considered models are compared. The compared algorithms include RSO, SCA, GWO, MFO, GSA, TSA, and PSO. The best value (Best), worst value (Worst), average value (Mean), and standard deviation (Std) of the method's RMSE value are also utilized to evaluate the overall performance of the proposed algorithm, in addition to the optimal parameters listed in the preceding subsection. A full comparison of the preceding algorithms is made in this subsection, and the statistical results are provided in Table 11, where some conclusions can be drawn.  Table 11 shows that the hARS-PS algorithm outperforms the other eight algorithms in terms of model dependability and average accuracy. RSO has the second-best average accuracy and dependability for three models (SDM, DDM, and PVM). Furthermore, the results of the Wilcoxon signed-rank test show that hARS-PS outperforms all of the compared approaches on all three models. From Table 11, the proposed method has a smaller mean and standard deviation than other algorithms. According to the result, hARS-PS is superior to RSO, SCA, GWO, MFO, GSA, TSA, and PSO on Best, Mean, Worst, and Std. Figure 8 presents the convergence curves obtained by the proposed algorithms for three different PV models. From Figure 8, hARS-PS can find better solutions with faster speeds than the compared algorithms for all considered PV models, which fully demonstrates the strong ability of hARS-PS to escape from the local optima. Note that SCA and TSA perform the worst in terms of convergence performance and are very easy to premature convergence. In addition, according to Figure 8A,B, although RSO, MFO, GSA, PSO, and GWO, show better convergence performance than SCA and TSA, they still show the tendency to trap into premature with an increasing the number of function evaluations.
The parameter P is employed in this paper to choose one of two update procedures for each rat at each iteration. As a result, choosing an appropriate P number for balancing local exploitation and global exploration skills is critical. The effects of different P values on hARS-PS performance are investigated in this part by comparing the precision and reliability of the three distinct PV models while extracting the parameters. In each run, the maximum number of evaluations is set to 50,000, and the moth population size and number of sub-swarms are set to 100 and 4, respectively. The hARS-PS is evaluated using three distinct P values: 0.4, 0.5, and 0.6. In addition, each model's hARS-PS is run 30 times individually with each different P value. Table 12 indicates that, based on all criteria, P = 0.4 offers the best results for all three PV models. This suggests that when calculating the parameters of the three models, P = 0.4 has the best accuracy and dependability.

DISCUSSION
In the previous sections, the superiority of the proposed method has been verified by comparing it with seven state-of-the-art methods for parameter extraction of different PV models. Based on the simulation results under three different models, it can be observed that hARS-PS can obtain the most satisfactory performance compared to its competitors. The analysis results show that the proposed algorithm is very effective, converges faster than other methods, and could find a smaller RMSE value for all models. As per the results and findings, the proposed hARS-PS can jump out of the local optimum and search in a more feasible area because of the effective improvement of the RSO (ARSO). In addition, the local search ability of the PS method increases the accuracy of the results obtained by hARS-PS. As far as the overall effect is concerned, these improvements (i.e., the powerful global search capability of ARSO and the PS's strong local search capability) are very promising for parameter extraction of other complex PV models.

CONCLUSION
In the optimization of PV systems, parameter extraction is crucial. This paper introduces hARS-PS, a hybrid optimization technique to retrieve parameters from PV models based on ARSO and PS. hARS-PS is used to extract parameters from three PV models to test the performance of the suggested method. The experimental results show that the suggested hARS-PS outperforms the original RSO in terms of accuracy and reliability, especially when compared to recent publications in the literature. Furthermore, the purpose of extracting PV model parameters is to improve the optimization and control of practical solar systems. The performance of the proposed method has been assessed using parameter extraction problems from several PV models. The mean