An efficient Equilibrium Optimizer for parameters identification of photovoltaic modules

The use of solar photovoltaic systems (PVs) is increasing as a clean and affordable source of electric energy. The Pv cell is the main component of the PV system. To improve the performance, control, and evaluation of the PV system, it is necessary to provide accurate design and to define the intrinsic parameters of the solar cells. There are many methods for optimizing the parameters of the solar cells. The first class of methods is called the analytical methods that provide the model parameters using datasheet information or I–V curve data. The second class of methods is the optimization-based methods that define the problem as an optimization problem. The optimization problem objective is to minimize the error metrics and it is solved using metaheuristic optimization algorithms. The third class of methods is composed of a hybrid of both the analytical and the metaheuristic approaches, some parameters are computed by the analytical approach and the rest are found using metaheuristic optimization algorithms. Research in this area faces two challenges; (1) finding an optimal model for the parameters of the solar cells and (2) the lack of data about the photovoltaic cells. This paper proposes an optimization-based algorithm for accurately estimating the parameters of solar cells. It is using the Improved Equilibrium Optimizer algorithm (IEO). This algorithm is improved using the Opposition Based Learning (OBL) at the initialization phase of EO to improve its population diversity in the search space. Opposition-based Learning (OBL) is a new concept in machine learning inspired by the opposite relationship among entities. There are two common models for solar cells; the single diode model (SDM) and double diode model (DDM) have been used to demonstrate the capabilities of IEO in estimating the parameters of solar cells. The proposed methodology can find accurate solutions while reducing the computational cost. Compared to other existing techniques, the proposed algorithm yields less mean absolute error. The results were compared with seven optimization algorithms using data of different solar cells and PV panels. The experimental results revealed that IEO is superior to the most competitive algorithms in terms of the accuracy of the final solutions.


INTRODUCTION
A major drawback of the use of fossil fuel is its negative environmental effects; therefore, alternative renewable energy sources (RESs) are used as an alternative clean and affordable energy source. There are seven types of RESs namely, biomass (López et al., 2008), geothermal (Houssein, 2019), wind (Osama et al., 2017), solar (Hocaoglu, 2011;Munshi & Yasser, 2017), hydroelectric (Bagher et al., 2015), hydrogen (Dunn, 2002), and tide (Egbert & Ray, 2000). Solar energy is considered one of the most important sources of renewable energy, as the sun plays a significant role in it's generation. A PV system uses solar cells (SCs) to convert the sunlight into electricity (AbdElminaam, Said & Houssein, 2021).
PV SCs are a type of RES that is clean (i.e., generates no pollution), has a long life, has a simple design and easy to install. However, solar energy has several drawbacks compared with other RES. The main disadvantages of PV solar energy systems are the high initial exploitation and low capacity of SCs (Navabi et al., 2015). An open research topic is optimizing the efficiency of SCs. Because PV modules are installed outdoors, the weather conditions affect the generated energy, which results in a high maintenance cost and difficulty in control.
PV modules contain SCs, which consist of a semiconductor of monocrystalline material (KC200GT) (Park et al., 2014), monocrystalline (SM55) (Salam, Ishaque & Taheri, 2010), and thin film (ST40) (Alam, Yousri & Eteiba, 2015). The global settings of a SC depend on a circuit to examine the performance of the cell under various conditions, such as temperature and solar irradiance. A SC can be described by the following two popular models: the single-diode model (SDM) and the double-diode model (DDM) (Lim et al., 2015;Humada et al., 2016;Ismaeel et al., 2021). The SDM is similar to the DDM, and the variation in cellular performance is imperceptible. The SDM is more common than the DDM. The SDM model includes five unknown parameters, while the DDM has seven unknown parameters. Accurate determination of the unknown variables plays an important role in optimizing the SC and it's internal parameters.
The PV module manufacturer's data sheet contains the parameters of the open circuit voltage (Voc), voltage and current at the point of maximum power (Vmpp and Impp), short-circuit current (Isc), maximum power (Pmpp), voltage temperature and current temperature coefficients (Kv and Ki). These parameters can also be obtained experimentally. The SDM, however, requires other parameters, such as the reverse saturation current (Io), photogenerated current (Ipv), nonphysical ideality factor of the diode (a), shunt resistance (Rp), and series resistance (Rs). However, these parameters are not provided in the data sheet. Therefore, determining these parameters is a major research challenge.
There are three types of approaches for solving the parameter estimation problem: traditional methods (analytical methods) (Easwarakhanthan et al., 1986), metaheuristic methods (AlRashidi et al., 2011) and hybrid methods. Traditional methods use a modified nonlinear least squares estimation approach based on Newton's method. Traditional approaches depend on the starting point of the iterative method, which is a key problem.
As a result, these methods tend to be trapped in local solutions. An example of this type of techniques is presented in Chan, Phillips & Phang (1986). Several features, such as convexity, continuity, and differentiability, are required for usability. The drawbacks of these methods include high demand of computational resources, sensitivity to initial conditions, and the tendency to provide sub-optimal solutions.
Unlike conventional methods, metaheuristic approaches have been proposed to increase the probability of obtaining the global solution in a reasonable time. In the literature, the problem of determining the parameters of the SC has been solved using genetic algorithms (GA) (Ismail, Moghavvemi & Mahlia, 2013), particle swarm optimization (PSO) (Wei et al., 2011), and simulated annealing (SA) . Although these metaheuristic algorithms produce better solutions than conventional algorithms, they have some limitations (Dai, Chen & Zhu, 2009). The third approach for solving this problem is using hybrid methods which use a combination of the analytical and the metaheuristic approaches. A review of the methods of the parameter estimation of the SCs is presented in Oliva et al. (2019).
An interesting approach to solve the problem of solar PV parameter estimation is based on the flower pollination algorithm (FPA) (Alam, Yousri & Eteiba, 2015). The FPA mimics flower pollination behavior. However, its results are inaccurate. The multi-verse optimizer has also been used to extract the parameters of the PV system. But, this algorithm also generates results far from the optimal solution (Ali et al., 2016). An optimization algorithm for artificial swarms of bees identifies parameters of the SC models and is inspired by the intelligent behaviors of the bees, such as collecting and processing nectar (Askarzadeh & Rezazadeh, 2013a). The simplified swarm optimization algorithm (MSSO) has been applied to both the SDM and DDM to minimize the square error between the experimental and calculated data. However, this minimization was not efficient 9.8607E −04 (Lin et al., 2017a). The improved chaotic whale optimization algorithm has also been used to estimate the parameters of the PV. However, it is complex and difficult to apply (Oliva, El Aziz & Hassanien, 2017). The most recent typologies in the literature are listed in Table 1.
The above methods use metaheuristic algorithms that require large computational time and lead to high error rate between the experimental and the calculated data. Therefore, this work proposes an efficient algorithm called the improved equilibrium optimizer (IEO) algorithm to estimate the optimal parameters of the PV system. IEO was validated by comparing its results with those of a mathematical method and other approaches. Using the IEO, the minimum error between the estimated and the experimental data and the minimum convergence time for the optimal parameters and the best curve fit (I-V) was obtained. An accurate PV model based on IEO algorithm can play an important role in increasing the overall efficiency of a PV system. It guarantees the optimal use of the available solar energy, which results in reducing the costs of the PV system. To the best of our knowledge, the IEO is a new optimization algorithm whose potential has not yet been extensively applied in real problems. The motivation of this paper is to propose a parameter estimation technique for efficiently and accurately extracting the parameters of the SCs and PV modules. The major contributions of this work are as follows: 1. Proposing the Improved Equilibrium Optimizer (IEO) algorithm, which is inspired by the control, volume, mass, and balance models for estimating the photovoltaic (PV) parameters. The remainder of this paper is organized as follows: 'Mathematical Model of Photovoltaic Cell/Module' offers a depiction of the mathematical model of the PV cell/ module. Equilibrium optimizer (EO) and Improved Equilibrium Optimizer (IEO) are presented in 'Equilibrium Optimizer (EO) Algorithm' and 'Improved Equilibrium Optimizer (IEO) Algorithm', respectively. The modified objective function is introduced in 'Objective Function'. In 'Simulation Results and Analysis' and 'Results of Comparing the Effeciency of the Ieowith other Metaheuristic Algorithms' analysis and Comparative study of the proposed algorithm with other meta-heuristics algorithms are provided. Finally, the conclusions and future work are presented in 'Conclusions and Future Work'.

MATHEMATICAL MODEL OF PHOTOVOLTAIC CELL/ MODULE
This section presents the mathematical model of the PV unit (Biswas et al., 2019) that can be obtained by the SDM (El-Arini, Othman & Fathy, 2013) and DDM (Chin et al., 2011). Figure 1 displays the equipollent circuit diagram of a typical PV cell. The current (I) of this cell is as follows: where, I PV,Cell is the PV current and I D is the diode current.
where, I O,Cell is the reverse saturation current of the diode, q (1.60217646 × 10 −19 (C)) is the charge of an electron, k (1.38064852 × 10 −23 J/K) is the Boltzmann constant, T is the temperature (in Kelvin) of the diode junction, and a is the ideal factor of the diode. Therefore, Eq. (1) can be rewritten to obtain the I-V characteristic of a typical cell as follows: PV cells can be linked either in parallel or in series to form a PV system. Here, N c represents the number of cells that are linked in series.

Single diode model
In the SDM, five unknown parameters must be obtained. These parameters are the photon current (I pv ), reverse saturation current of the diode (I o ), the ideality factor (a), and the series and parallel resistances (R s and R p ). Figure 2 presents the SDM of a PV cell with N C series-connected cells.
Therefore, the I−V characteristics of the SDM of the PV are represented as: At the point of the open circuit, we find that (V = V OC ) and (I = 0) (opinion); thereafter, from Eq. (4), we obtain; Thus; At the point of the short circuit (I = I SC ) and (V = 0) (opinion); thereafter, from Eq. (4) we obtain; Therefore; From Eqs. (6) and (8) we have; Substituting Eq. (9) into Eq. (6) yields; At the maximum power point (V = V MPP ) and (I = I MPP ) (say), from Eq. (4) we have;

Double-diode model
In the DDM in Fig. 3, seven unknown parameters must be obtained. These parameters are the photon current (I pv ), reverse saturation current of the first diode (I O1 ), reverse saturation current of second diode (I O2 ) , ideality factors of the first and second diodes (a 1 ) and a 2 , and the PV cell series and parallel resistances (R S and R P ). Therefore, the I-V characteristics of the DDM are as follows: i:e:; At the point of the open circuit, I = 0 and V = V OC ; thus, from Eq. (13) we obtain; Therefore; At the point of the short circuit, V = 0 and I = I SC ; thus, from Eq. (13) we obtain; From Eqs. (15) and (17) we have; Substituting Eq. (18) into Eq. (15) yields; At the maximum power point, V = V MPP and I = I MPP (say); then, from Eq. (13) we obtain;

EQUILIBRIUM OPTIMIZER (EO) ALGORITHM
In this section, we discuss the exploratory and exploitative phases of EO, inspired by the general mass balance equation for a control volume (Faramarzi et al., 2020).

Initialization and evaluation of functions
Like many metaheuristic algorithms, the EO uses the initial population for beginning the optimization process. The processing in this method is divided into two phases: the first phase is the "teacher phase," which means learning from the teacher, and the second phase is the "learner phase," which means learning by interacting with other learners.
These phases are consequently iterated to produce better results until convergence is achieved. In EO, each particle (solution) with its concentration (position) acts as a search agent. Some solutions and their dimensions experience mutation, defined by a function, and selected by a parameter such as mutation probability and percentage The initial concentration is structured according to the particle number and dimensions, with normal initialization appearing as follows: is the initial condensation of the ith particle, C max and C min are the maximum and minimum of the dimensions, respectively, and rand i is in the domain [0, 1] so that n is the particle number representing a population. Particles are examined and thereafter classified as candidates.

Equilibrium pool and candidates C eq
The equilibrium case takes into consideration the last case of convergence of the algorithm, which should be the global optimum. At the beginning of the optimization algorithm, the equilibrium state is unknown, and it is only determined by the candidate that the equilibrium data creates a research model for particles. Depending on various factors, these candidates are identified, four particles specific to the optimization, and the condensation of others particle is the arithmetic mean of those. The number of candidates is random and depends on the nature of the problem. For example, the GWO uses the three best candidates (β, γ and α wolves) to change place with other wolves. More than four candidates can positively impact these five particles and are used as candidates for balancing to build a vector that is the equilibrium set in Eq. (22): C eq;pool ¼ fC eqð1Þ ;C eqð2Þ ;C eqð3Þ ;C eqðaveÞ g (22) Every particle at every repetition changes its condensation to select randomly from the candidate's selection with the same prospect.

Exponential term (F)
The following exponential expression (F) contributes to the rule of changing condensation. A precise introduction of this expression leads to the balance of exploration and exploitation. The fluctuation range can change over time in an actual dominance volume, and should be a vector in the domain of [0, 1] as in Eq. (23): Thus, time, t, known as the task of iteration (Iter), reduces the repetition number of Eq. (24): where, Max_iter and Iter represent the maximum number of iterations and the current, respectively, and a2 is a constant utilized to administer the capacity of use. To warranty concourse and improve the exploration and exploitation capacity of the EO, this is given as; Here, a 1 is a constant that controls the exploration capacity, while a 2 is a constant that controls the exploitation ability. Furthermore, r is a vector in the range [0-1] selected randomly. Sign(r − 0.5) impacts the direction of exploration and exploitation. a 1 and a 2 are two and one, respectively, for all problems. The derived form of Eq. (23) with the substitution Eq. (25) is represented in Eq. (26) as follows:

Generation rate (G)
G is another key expression of the proposed technique for providing the precise solution by enhancing exploitation. For example, a multipurpose model that characterizes G as the top-order exponential decomposition operation is as follows: where, G o is the initial value and k represents the attenuation constant. For restricting the random variables, suppose that K = λ, and utilize the formerly derived exponential expression. The conclusive set of G is as follows: where :G o ¼GCPðC eq ÀCÞ (29) Here, GCP is the control parameter for the generation rate that contains the potential of the generation expression assistance for the update procedure. In addition, r 1 and r 2 are random vectors in [0, 1]. Finally, the EO update rule is as in Eq. (31): where, F is presented in Eq. (26), and V is a unit. To summarize all the aforementioned steps, a framework for EO is drawn in Fig. 4. It displays a conceptual sketch of the cooperation of all candidates for balance in a set of sample particles and how they sequentially affect the concentration update in the proposed algorithm. Since the topological positions of the equilibrium candidates are different in the initial iteration, and the exponential term generates large random numbers, this step-by-step update process helps particles that cover the entire area of the research. In the latter case, the opposite scenario occurs iterations when candidates circle the sweet stop with similar attitudes.
To this sometimes the exponential term generates small random numbers, which helps in refining the solutions. Providing smaller step sizes. This concept can also be extended to higher dimensions such as hyperspace in which the concentration is updated with the movement of the particle in n-dimensional space. The EO algorithm has been tested for three known engineering design problems. A simple method of constraint management, the static penalty, is used here to punish the objective function with high score when constraints are violated at any level from their defined limits. The penalty coefficient must be large enough to correctly punish the objective function under the conditions of equality/inequality. Note that all technical test problems ran with the same number of iterations (500) and particles (30) according to the math functions described above.

IMPROVED EQUILIBRIUM OPTIMIZER (IEO) ALGORITHM
We improved the Equilibrium Optimizer algorithm to give the best result that is closest to the global optimum. The improvement has been done by using opposition-based learning (OBL). The Equilibrium Optimizer algorithm with OBL gave better values to the unknown parameters of PV than Equilibrium optimizer without improvement.

Opposition based learning (OBL)
The basic concept of Opposition-Based Learning (OBL) was originally introduced by Tizhoosh (2005). The basic aim of this algorithm is optimization, to find the best candidate solution, the simultaneous consideration of an estimate and its corresponding opposite estimate which is closer to the global optimum. This has been achieved in a very short time and it has been used in various areas of soft computing. Opposition-based Learning (OBL), which has been used for improving convergence of the metaheuristic techniques for finding the global solution of the optimization problem. OBL theory has been applied to solve many real-world problems such as optimization and estimation of photovoltaic parameters. In general, any metaheuristic algorithm begins with creating an initial population as an attempt for finding the optimum solution(s), these initial solutions are generated randomly or based on a specific search range.
Opposite number x is defined as a real number over the domain x 2 ½lb; ub. The opposite of x is represented by x and to identified as: where ub and lb are the upper and lower bound of the search space. Eq. (32) can be generalized to be used in a search area with multi-dimensions. Therefore, to generalize it, every search-agent position and its opposite position will be introduced as the following: x = [x 1 ; x 2 ; x 3 ; x 4 ; ……:; x D and x ¼ ½ x 1 ; x 2 ; x 3 ; x 4 ; ……:; x D The values of all parameters in x will be estimated as:

Opposition based learning
In this optimization strategy if the fitness function f ðxÞ of its original solution, then x = x; otherwise x = x.

OBJECTIVE FUNCTION
The major purpose of estimating the parameters for SDM and DDM is to detect the parameter values that reduce the differences between the measured and calculated current that can be determined with an objective function.  (6)) is; The error at the short circuit (from Eq. (8)) is; The error at the maximum power point (from Eq. (11)) is; The same applies for the error values of the DDM, which can be derived using Eqs. (15), (17) and (20) at these three points. The goal of optimization is considered the sum of the quadratic errors:

SIMULATION RESULTS AND ANALYSIS
To verify the accuracy, reliability, and robustness of the IEO algorithm, we evaluate the performance of the IEO algorithm for estimating the parameters of a PV cell, namely, the SDM and DDM. For every SDM and DDM for all SC types (polycrystalline, thin-film, and monocrystalline), the IEO were run separately 30 times. A MATLAB model was developed for testing the algorithms presented above. In addition, variables such as open-circuit voltage (V OC ), short circuit current (I SC ), maximum power point voltage (V MP ), maximum power point current (I MP ), voltage temperature coefficient (K V ), and current temperature coefficient (K i ) were provided in the manufacturer's data sheet. All characteristics passed through three specified points are illustrated in Table 3  The algorithm was run on the MATLAB R2010a platform on a system with 4 GB RAM and an i3 processor. Improved code of equilibrium optimization using opposition-based learning is available in supplemental Source_Code file. Code to generated datasets used to test the code is available inside supplemental Datasets File. After improved Equilibrium optimization by opposition-based learning, we found the algorithm found best error than before.

Numerical data
This study examined three types of SCs: polycrystalline, thin-film, and monocrystalline. Exemplary data supplied by the industries are displayed in Table 3. This table illustrates which current and voltage data at the three main points are explicitly specified at standard test conditions, such as irradiance of 1,000 w/m2 and temperature of 25°C. Additional details of the parameters measured by the aforementioned equations are listed in Table 4.

Results of the single diode model
Every group of the optimal variables was estimated by several runs led to zero error at the three main I-V points. There were three types of SCs: Polycrystalline cell Kyocera KC200GT, monocrystalline cell Shell SQ85, and thin film ST40. The run of each type is presented in this subsection. Table 5 presents the optimal parameters of the SDM for the polycrystalline cell Kyocera KC200GT using the IEO. Table 5 also presents the accuracy of the IEO in generating the PV parameters. The results of the best run of the  Table 6. Table 7 presents the results obtained by the run of the thin-film PV cell (Shell ST40) using the IEO. Tables 5-7 reveal a small difference in the values of series resistance R S for both multicrystalline and monocrystalline. The I-V curve is strongly affected by the series resistance. According to the results, lower values of Rs lead the I-V characteristics to move farther from the axis with respect to the maximum point, while higher values of Rs lead the I-V characteristics to move closer to the axis as in Fig. 5. This tendency occurs naturally with the IEO parameter values. The difference between I-V characteristics can be attributed not only to different values of R S and R P , but also to ideality factor of the diode, a. It is demonstrated that the values of all variables change significantly. However, every optimal solution can arrive at zero error for the three major points. All prior studies displayed one I-V characteristic that passed across the three main points. However, a PV cell characteristic was observed that is not normal when the designer concentrated on the three major points. For each cell, there is an operating point on the characteristic in which the performance is greatest. These points are referred as the major points. The algorithm arrived at the global optimal  solution after 0.10 s with an error of zero value. This algorithm took less time to run compared to other metaheuristic algorithms. A scatter plot of the optimal values (30 points) of these three parameters is provided in Figs. 6-8. It is showing that the value of each parameter changes significantly. This demonstrates that under the same parameter values I PV ; I O ; a; R S eandeR P , the IEO algorithm has the highest efficiency for the experimental I-V data for every module.
As displayed in the previous figures, every curve passes through the three known points. A plot of the optimal solution is presented in Fig. 9. A difference in (a) is present approximately between 0.2 and 1.7, while that of (R p ) is approximately between 80 and 175 ohms. Results of the double diode model Using the (same parameter values) I ph , I o1 , I o2 , a 1 , a 2 , R S , and R P , IEO is more consistent with the experimental I-V data of all types of modules. The estimation of the parameters of SCs based on the DDM has high precision, and the optimization of parameters is implemented for the DDM of different types. A total of five parameters are optimized for the DDM (a 1 , a 2 , R S , R P , I O1 ), while two sustainable parameters are calculated (IO2, IPV) for their relation with the optimized parameters. The optimized parameters in various runs of the IEO algorithm for the DDM polycrystalline, KC200GT cell are listed in  Table 8, SQ85 monocrystalline dish are listed in Table 9 and thin cells, shell ST40 are displayed in Table 10. For the SDM, the optimized parameters resulted in zero error at the three main points. The 30 I-V characteristics resulting from various combinations of the variables are presented in Fig. 9. A plot of the optimal solution is presented in Fig. 10. All the curves passed through the open circuit, short circuit, and maximum power points. To easily analyze the optimized variables, standardized parameter values are presented in a parallel coordinate graph in Fig. 11. The value of R P differs widely. However, I O1 ranges from approximately 0.01 to 0.9p.u. The final value of the diode saturation current is very low, with an average of only lA To summarize, regardless of the type of the PV cell or the PV parameter extraction model used, we cannot obtain one I-V characteristic with details of short circuits, maximum power, and open circuit points. A total of three point optimizations can reveal various characteristics in several tests. 'Simulation Results and Analysis' confirms the effectiveness of the IEO algorithm in estimating the parameters of the SC, taking into account the SDM and DDM. In addition, the SDM used three types of PV modules to estimate the parameters of the PV model.

The single diode model
This subsection presents a comparison between the solutions generated by the IEO algorithm and other algorithms that have been applied under the same conditions. The optimal error values obtained by the IEO was zero, as presented in Table 11. The IEO achieves the best results among all the six algorithms tested, followed by SCA, while the GA achieves the poorest results.

The double diode model
This subsection provides a comparison between the solutions generated by the IEO algorithm and other algorithms for the DDM. Table 12 indicates that the best error values obtained by the IEO were zero. The IEO thus achieved the best results of the six algorithms tested, followed by SCA. Whereas, GA achieved the poorest results.
To sum up the obtained results, Tables 11 and 12 indicate that PSO produces better results than GA. In addition, GWO generates fewer errors than PSO, GA, WOA, SCA, and   MVO. However, the IEO results are superior to those of all other approaches. Fig. 12 presents a comparison between the optimal results for the SDM of the KC200GT cell using different methods.

CONCLUSIONS AND FUTURE WORK
Developing an accurate model of the PV system is an important and challenging task. To obtain an accurate model, it is necessary to determine the optimal parameters for the PV model using an effective optimization technique. The IEO algorithm is a recent optimization technique that is used for parameter extraction of the PV modules for the SDM and DDM. The IEO algorithm has various advantages, such as solution accuracy, convergence speed, and balance between analysis and exploitation. In this paper, the PV generator is modeled using the SDM and DDM, and the parameters of each model were optimally determined using the IEO algorithm. The IEO has been compared to the following six metaheuristic algorithms: GA, PSO, SCA, WOA, MVO, and GWO. The results achieved using the IEO are accurate than those achieved by the other methods. The IEO could be a good candidate for solving the optimization problem of the SC systems. In future work, the IEO can be applied to identify the PV parameters for the multi-dimension diode and multi-diode models. Moreover, it can also be used for calculating the current-voltage characteristic of the multi-diode models.

Data Availability
The following information was supplied regarding data availability: The improved code for equilibrium optimization using opposition-based learning and the code to generate simulated datasets used to test the code is available in the Supplemental Files.