Metaheuristic Algorithm for Photovoltaic Parameters : Comparative Study and Prediction with a Firefly Algorithm

In this paper, a Firefly algorithm is proposed for identification and comparative study of five, seven and eight parameters of a single and double diode solar cell and photovoltaic module under different solar irradiation and temperature. Further, a metaheuristic algorithm is proposed in order to predict the electrical parameters of three different solar cell technologies. The first is a commercial RTC mono-crystalline silicon solar cell with single and double diodes at 33 °C and 1000 W/m2. The second, is a flexible hydrogenated amorphous silicon a-Si:H solar cell single diode. The third is a commercial photovoltaic module (Photowatt-PWP 201) in which 36 polycrystalline silicon cells are connected in series, single diode, at 25 °C and 1000 W/m2 from experimental currentvoltage. The proposed constrained objective function is adapted to minimize the absolute errors between experimental and predicted values of voltage and current in two zones. Finally, for performance validation, the parameters obtained through the Firefly algorithm are compared with recent research papers reporting metaheuristic optimization algorithms and analytical methods. The presented results confirm the validity and reliability of the Firefly algorithm in extracting the optimal parameters of the photovoltaic solar cell.


Introduction
The use of renewable energy sources is rapidly developing, and the application of solar energy focusing on photovoltaic systems is becoming increasingly popular [1,2].The major challenge in photovoltaics system is posed by the instability, nonlinearity and complexity of the current-voltage and power-voltage characteristics equation.The relation between photovoltaic current and voltage is both implicit and nonlinear [3][4][5][6] and it depends on several factors such as module temperature, solar radiation and its distribution, spectrum, cable losses, dust accumulation, shading and soiling [7,8].Therefore, it is vital to produce a more accurate mathematical model that can better reveal the Appl.Sci.2018, 8, 339 2 of 22 actual behavior and represent the relationship between current and voltage.In this context, many mathematical models have been developed in the literature to describe the electric, dynamic and thermal behavior of photovoltaic cell/module with a different level of complexity.In particular, the solar cell can be modelled as a static model for DC/DC (direct current), or as a dynamic model for DC/AC (alternating current) with capacitance and parallel dynamic resistance, with diode and photocurrent as proposed in [9][10][11].They can be classified globally into two categories: implicit and explicit models [12,13].The former [5,[14][15][16] need iterative numerical methods to solve the nonlinear current-voltage equation.On the other hand, the latter models are based on simple analytical expressions [4,[17][18][19][20][21][22].Different physical models were compared on photovoltaic power output prediction in [23] and available models of solar cell are presented in [24].A different photovoltaic model used for 24-hour-ahead forecasting using neural network is presented in [25], while a comparison between physical and hybrid methods is given in [26] and artificial neural network models are employed in [27].These models differ mainly by the number of diodes, the presence or absence of a shunt resistor, and by the numerical methods used to determine the unknown parameters.Further, the two diodes model is known as the most accurate model for representing the equivalent electrical circuit.While the single diode model is the most commonly used of the two types; in the simplified four-parameter model neglecting shunt resistance by assuming it as infinite value, and in five-parameter models by maintaining the effect of the shunt resistance.The five and seven parameters models evaluate the photocurrent, the saturation current, the series and shunt resistors and the quality factor of the diode.The eight parameters model adds build-in voltage, thickness, average mobility-lifetime.
The exponential non-linearity of current-voltage equations causes many difficulties in prediction and extraction of the electric, dynamic or thermal parameters [28] while, the implicit models are not capable of determining the behavior of the photovoltaic cell/module under many effects.Furthermore, solar cell models have multi-modal objective functions and model parameters vary with operational conditions such as temperature and irradiance.The main problem is to identify the optimal parameter values such as photo-generated current, diode saturation current, series resistance, and diode quality factor.Over the years, various papers have been presented and developed different techniques to identify the optimal values of the electric parameters to describe the behavior of the characteristics.These can be categorized into analytical methods, numerical methods and metaheuristic methods.There are several analytical and numerical (generally gradient-based) methods, as described in Table 1.
Table 1.A list of analytical and numerical methods employed in the literature.

Optimization Method Reference
Least squares and Newton-Raphson method [29] Iterative curve fitting [30] Lambert W-functions [20,[31][32][33][34][35] Integral-based linear least square identification method [36,37] Linear interpolation/extrapolation [38] Chebyshev polynomials [39] Taylor's series expansion [40] Padé approximants [41] Symbolic function [42] Analytical mathematical method [43][44][45] Simple methods based on measured points [46] Metaheuristic methods are powerful in local searches, but they tend to get trapped in locally optimal values and depend on the photovoltaic module's manufacturer's data such as open circuit, short circuit, and maximum power points.Since the photovoltaic cell has triple non-linearity in current-voltage, power-voltage and in intrinsic parameters, deterministic methods cannot extract parameters accurately based on current, voltage and current derivatives with respect to the voltage at short circuit current, maximum power and open circuit voltage.The derivation imposes several model Appl.Sci.2018, 8, 339 3 of 22 restrictions such as convexity, continuity and differentiability conditions; moreover, the approximations also reduce accuracy.Due to their great potential in modern global optimization resolution for nonlinear and complex systems, the use of metaheuristic bioinspired optimization algorithms to carry out minimizing procedures has received considerable attention.Metaheuristic methods are stochastic methods inspired by various natural phenomenon, as listed in Table 2.They have been proven to be a promising alternative to deterministic methods applied to the parameter identification of solar/photovoltaic models.[61] However, the cited algorithms are usually trapped at local optima and they have large error values [62].In fact, the performance of these algorithms highly depends on the settings of specific parameters, such as, for instance, the mutation probability, crossover probability, and the selection operator in the genetic algorithm, as well as the inertia weight, and social and cognitive parameters in particle swarm optimization.Therefore, researchers are still searching for powerful algorithms capable of predicting the optimal parameters of different technology under various conditions with less errors.
Metaheuristic bioinspired algorithms have been suggested for parameter extraction and have become an important part of modern optimization.Most metaheuristic algorithms are based on natural or artificial swarm intelligence.Particle swarm optimization is a good example, it mimics the swarming behavior of bees and birds [62].Recently, a new metaheuristic search algorithm called the firefly algorithm (FA) has been proposed and developed by X. Yang [63].The FA is a nature-inspired stochastic optimization algorithm based on the flashing patterns and behavior of swarming fireflies [64].The FA has become an increasingly valuable tool of swarm intelligence that has been applied in almost all areas of optimization, as well as in engineering practice [65].It uses a kind of randomization by searching for set solutions, inspired by the flashing lights of fireflies in nature.This algorithm differs from many swarm intelligence techniques [65] for these two features:

•
the first is the so-called local attraction, since the light intensity decreases with distance (the attractions of fireflies can be local or global and depend on the absorbing coefficient); • the second is related to the subdivision of fireflies and their regrouping into subgroups because a neighboring attraction is stronger than a long-distance attraction, and each subgroup will swarm around a local mode, making the firefly algorithm suitable for multimodal global optimization problems [66].
In [67] the authors provide a detailed background and analysis of the firefly algorithm and test it in a wide range of problems to solve multi-objective dispatch problems.
In this paper, the authors propose a comparison among bioinspired algorithms for the prediction of solar cell and photovoltaic module parameters.The goal is to minimize the multi-objective functions adapted to minimize the absolute errors between experimental and calculated current-voltage data under inequality constraint functions.Three different cases are examined as follows: single and double diode models of a commercial mono-crystalline silicon solar cell (R.T.C France company) at 33 • C, based on current-voltage experimental data recorded in [29]; (ii) flexible dual junction amorphous hydrogenated silicon a-Si:H solar cell under standard sunlight, based on data obtained in a light intensity of 1000 W/m 2 and at a temperature of 300 K [54]; (iii) a Photowatt-PWP 201 photovoltaic module which 36 polycrystalline silicon cells are connected in series and the data is measured at an irradiance of 1000 W/m 2 , and a temperature of 25 • C [29].To verify the performance of the proposed approach and the quality of the obtained results, statistical analyses are carried out to measure the accuracy of the calculated parameters and model suitability.The results obtained are compared with recent techniques such as the Biogeography-Based Optimization algorithm with Mutation strategies (BBO-M) [68], Levenberg-Marquardt algorithm combined with Simulated Annealing (LMSA) [47], Artificial Bee Swarm Optimization algorithm [48], Artificial Bee Colony optimization (ABC) [49], hybrid Nelder-Mead and Modified Particle Swarm Optimization (NM-MPSO) [50], Repaired Adaptive Differential Evolution (RADE) [59], Chaotic Asexual Reproduction Optimization (CARO) [69] for solar cell single and double diodes.For organic flexible hydrogenated amorphous silicon, a-Si:H solar cell will be compared with the Quasi-Newton (Q-N) method and Self-Organizing Migrating Algorithm (SOMA) [54].The optimal parameters of Photowatt-PWP 201 are compared with the Newton-Raphson [29] Pattern Search (PS) [55], Genetic algorithm (GA) [56] and Simulated Annealing algorithm (SA) [58].The obtained results are in accordance with experimental data, there is good agreement for most of the extracted parameters and the proposed algorithm outperformed the compared techniques.

Presentation and Modelling of the Solar Cell
The electrical behavior of the solar cell is modelled by its outputs current versus voltage characteristic.Further, a solar cell is mathematically modelled in two common methods [24,70], single diode (SDM) and double diode (DDM), with consider parasitic phenomena by series and shunt resistances.Moreover, the flexible hydrogenated amorphous silicon a-Si:H solar cell with loss current I rec is paralleled with the original photo-generated current source and the current sink representing the recombination current in the i-layer of a P-I-N solar cell [71][72][73][74][75].The two models are given in Figure 1.
Appl.Sci.2018, 8, 339 4 of 22 voltage data under inequality constraint functions.Three different cases are examined as follows: single and double diode models of a commercial mono-crystalline silicon solar cell (R.T.C France company) at 33 °C, based on current-voltage experimental data recorded in [29]; (ii) flexible dual junction amorphous hydrogenated silicon a-Si:H solar cell under standard sunlight, based on data obtained in a light intensity of 1000 W/m 2 and at a temperature of 300 K [54]; (iii) a Photowatt-PWP 201 photovoltaic module which 36 polycrystalline silicon cells are connected in series and the data is measured at an irradiance of 1000 W/m 2 , and a temperature of 25 °C [29].To verify the performance of the proposed approach and the quality of the obtained results, statistical analyses are carried out to measure the accuracy of the calculated parameters and model suitability.The results obtained are compared with recent techniques such as the Biogeography-Based Optimization algorithm with Mutation strategies (BBO-M) [68], Levenberg-Marquardt algorithm combined with Simulated Annealing (LMSA) [47], Artificial Bee Swarm Optimization algorithm [48], Artificial Bee Colony optimization (ABC) [49], hybrid Nelder-Mead and Modified Particle Swarm Optimization (NM-MPSO) [50], Repaired Adaptive Differential Evolution (RADE) [59], Chaotic Asexual Reproduction Optimization (CARO) [69] for solar cell single and double diodes.For organic flexible hydrogenated amorphous silicon, a-Si:H solar cell will be compared with the Quasi-Newton (Q-N) method and Self-Organizing Migrating Algorithm (SOMA) [54].The optimal parameters of Photowatt-PWP 201 are compared with the Newton-Raphson [29] Pattern Search (PS) [55], Genetic algorithm (GA) [56] and Simulated Annealing algorithm (SA) [58].The obtained results are in accordance with experimental data, there is good agreement for most of the extracted parameters and the proposed algorithm outperformed the compared techniques.

Presentation and Modelling of the Solar Cell
The electrical behavior of the solar cell is modelled by its outputs current versus voltage characteristic.Further, a solar cell is mathematically modelled in two common methods [24,70], single diode (SDM) and double diode (DDM), with consider parasitic phenomena by series and shunt resistances.Moreover, the flexible hydrogenated amorphous silicon a-Si:H solar cell with loss current rec I is paralleled with the original photo-generated current source and the current sink representing the recombination current in the i-layer of a P-I-N solar cell [71][72][73][74][75].The two models are given in Figure 1.The current-voltage behavior of a solar cell is described according to the electrical intrinsic parameters and nonlinear implicit equation, for a given illumination and temperature.
where, Iph is the photocurrent, ISD1 and ISD2 are the saturation currents,  1 and  2 are the diffusion and recombination diode quality factors; Rs and Rp are the resistances in series and parallel, respectively,   is the thermal voltage (which will be defined in the followings), and: The current-voltage behavior of a solar cell is described according to the electrical intrinsic parameters and nonlinear implicit equation, for a given illumination and temperature.
where, I ph is the photocurrent, I SD1 and I SD2 are the saturation currents, a 1 and a 2 are the diffusion and recombination diode quality factors; R s and R p are the resistances in series and parallel, respectively, V T is the thermal voltage (which will be defined in the followings), and: Appl.Sci.2018, 8, 339 The current-voltage characteristic of a flexible solar cell is: where, the voltage V bi represents the built-in field voltage over the i-layer, in single junction amorphous silicon solar cells, and in [76] it has been determined to be in the range 0.9 V; d i represents the thickness of the i-layer, the effective µτ-product (µτ) eff represents average mobility-lifetime product for election and hole, and quantifies the quality of the active layer in terms of recombination of photo-generated carriers.The thermal voltage is V T = KT/q where K is Boltzmann's constant, T is the cell absolute temperature in Kelvin and q is the electronic charge, a is the diode quality factor.The photocurrent I ph describes the irradiation dependent recombination in i-layer and reduced by the recombination current, as follows: where, I rec is the current sink and it represents the recombination current in the i-layer of a P-I-N; the current through the diode represents the diffusion process of charge carriers and the last term represents the shunt leakage current I p and is modelled as a space charge limited current [77,78].
In Equations ( 1) and (3), the five, seven and eight parameters which define the current versus voltage relation of solar cell and photovoltaic module, vary in accordance with solar irradiance, cell temperature and depend on reference values reported on datasheet.

Problem Formulation
The solar cell can be modelled by using the single diode model, double diode or multi-diode models.The objective function is defined from Equations (1) and (3), several research papers use different functions, for example, [48][49][50]59,68,69] use the root mean square error (RMSE), [47] use the sum of squared error (SSE).In [55,58] the individual absolute error (IAE) is used and [79] use the mean absolute errors (MAE).However, the objective function was used to minimize the vertical distance between the experimental points and the theoretical curve.In this paper, we use separate fitting for different regions in the current-voltage characteristics (Figure 2), because the current error is more important for small voltages due to the strongly varying slope of the curve, while the voltage error is more important for large voltages approaching an open circuit.
During the optimization process, each i-th solution is defined by a vector X i , where X is a candidate set of parameters defined as follows: • for a single diode: X = x 1 = I ph I SD a R S R P ; • for a double diode: X = x 2 = I ph I SD1 I SD2 a 1 a 2 R S R P ; • for a flexible solar cell: The objective functions must be minimized with respect to the limits of parameters x 1 , x 2 and x 3 .The Equations (1) and (3) is rewritten in the following homogeneous equations.
For a single and double diode: For flexible hydrogenated amorphous silicon, a-Si:H: The cost function of current error ε 1 near the short circuit (zone 1) is: Appl.Sci.2018, 8, 339 6 of 22 The cost function of current error  1 near the short circuit (zone 1) is: The cost function of voltage error  2 is the horizontal distance between the experimental point and calculated curve; it is defined near the open circuit (zone 2) as: ,, Where m is the number of experimental data, i V and i I are the i-th simulated and experimental current and voltage value, respectively.The overall objective function, i.e., the global error  in the two zones, is the sum of current and voltage errors and is defined as: The objective function constraints for each model are presented in the following equations.For a single and double diode: While, for flexible hydrogenated amorphous silicon, a-Si:H: The cost function of voltage error ε 2 is the horizontal distance between the experimental point and calculated curve; it is defined near the open circuit (zone 2) as: Where m is the number of experimental data, V i and I i are the i-th simulated and experimental current and voltage value, respectively.The overall objective function, i.e., the global error ε in the two zones, is the sum of current and voltage errors and is defined as: The objective function constraints for each model are presented in the following equations.For a single and double diode: While, for flexible hydrogenated amorphous silicon, a-Si:H:

Firefly Optimization Algorithm
The Firefly algorithm is a swarm intelligence algorithm for optimization problems.It was introduced in 2009 at Cambridge University by Yang [64], and it is inspired by the flashing patterns and behavior of tropical fireflies at night, and it is flexible and easy to implement.The Firefly algorithm is a bio-inspired metaheuristic algorithm and a random optimization, which is capable of converging to a global solution of an optimization problem.It uses the following three idealized rules [63][64][65][66][67]: No sex distinctions, i.e., fireflies are attracted to other fireflies regardless of their sex.

2.
The degree of the attractiveness of a firefly is proportional to its brightness, thus for any two flashing fireflies, the less bright one will move towards the brighter one; the more brightness, the less the distance between two fireflies.If there is no brighter firefly, it will move randomly.

3.
The brightness of a firefly is determined by the value of the objective function.
The basic rules of this algorithm were designed to primarily solve continuous problems.To design the Firefly algorithm properly, two critical issues need to be defined: the attractiveness and the variation of the light intensity.

Attractiveness
In the Firefly algorithm, the variation of the light intensity and the formulation of the attractiveness play a vital role.The intensity of light or brightness I r ij is inversely proportional to the square of the distance r ij [64,66] and the relative brightness of each firefly is expressed in the following Gaussian form: where, I r ij is the light intensity at a distance r ij , I 0 is the maximum brightness (the absolute brightness at the source point r ij = 0) which is related to the objective function value.The higher value of the objective function is the higher I 0 is and λ is the light absorption coefficient, which is set to reflect that brightness increases gradually with the increase in distance and the absorption of the medium r ij is the Euclidean distance between firefly i and firefly j.The attractiveness of each firefly [56] is expressed in the form where, β 0 is the maximum attractiveness (the attractiveness at r ij = 0, the largest value of the firefly to attract another, is typically set to 1).However, computationally, computing 1/ 1 + λr 2 ij is easier than e −λr 2 ij [64] and the intensity can be written as: Similarly, the attractiveness of a firefly can be approximated as follows:

Distance and movement
We suppose a firefly located at x i = x i 1 , x i 2 . . .x i k is brighter than another firefly located at x j = x j 1 , x j 2 . . .x j k , the firefly located at x i will move towards x j .The distance between any two fireflies i and j at x i and x j is the Euclidean distance given by [64,66] as follows: where, d is the dimension, x i,k is the k-th component of the spatial coordinate x i of i-th firefly the movement of a firefly i is attracted to another more attractive firefly j and the update location is determined by The first term is the current position of a firefly [66], the second term is used for considering a firefly's attractiveness to light intensity seen by adjacent fireflies and the third term is used for the random movement of a firefly in case there are not any brighter ones.The coefficient α is a randomization parameter determined by the problem of interest, while rand is a random-number drawn from a Gaussian distribution or uniform distribution at time t, if β 0 = 0, it becomes a simple random walk.In the implementation of the algorithm we will use β 0 = 0, α = 0.25 and the attractiveness or absorption coefficient λ = 1 which guarantees a quick convergence of the algorithm to the optimal solution.The concept of the firefly-based algorithm is presented in Figure 3.Moreover, Figure 4 shows the here considered implementation of FA for the specific problem and cost function given in Equation ( 9), as defined in Section 3.
Similarly, the attractiveness of a firefly can be approximated as follows:

Distance and movement
We suppose a firefly located at where, d is the dimension, , ik x is the k-th component of the spatial coordinate i x of -th firefly the movement of a firefly i is attracted to another more attractive firefly j and the update location is determined by The first term is the current position of a firefly [66], the second term is used for considering a firefly's attractiveness to light intensity seen by adjacent fireflies and the third term is used for the random movement of a firefly in case there are not any brighter ones.The coefficient α is a randomization parameter determined by the problem of interest, while rand is a random-number drawn from a Gaussian distribution or uniform distribution at time t, if  0 = 0, it becomes a simple random walk.In the implementation of the algorithm we will use  0 = 0 ,  = 0.25 and the attractiveness or absorption coefficient λ = 1 which guarantees a quick convergence of the algorithm to the optimal solution.The concept of the firefly-based algorithm is presented in Figure 3.Moreover, Figure 4 shows the here considered implementation of FA for the specific problem and cost function given in Equation ( 9), as defined in Section 3.

Results, Discussions and Comparison
In order to evaluate the efficiency of the Firefly algorithm in the estimation of the solar cell, the photovoltaic module and the array parameter extraction, the results are compared with analytical methods, numerical methods and metaheuristic algorithm to validate the effectiveness of the algorithm.In order, to compare it with other algorithms, a benchmark commercial solar cell and benchmark photovoltaic module are selected in single diode, double diode and photovoltaic module models are considered.The study test cases are designated as follows:

•
Test scenario 1: Apply to commercial solar cell for both single diode and double model under standard irradiance level with relevant example comparisons to other methods.

•
Test scenario 2: Apply to a flexible hydrogenated amorphous silicon a-Si:H photovoltaic cell using single diode module.

•
Test scenario 3: Apply to a commercial photovoltaic array using the single diode model, with 36 solar cells connected in series.
The current-voltage measurements are collected from [29,54] and have been widely used by different papers to test electric circuit models, modelling or translate the current versus voltage and technique for parameter extraction.Furthermore, statistical analyses are carried out to measure the accuracy of the estimated parameters and model suitability.

Case 1: Single and Double Diode Model (RTC France Company)
The proposed algorithm is applied first to extract the electrical intrinsic parameters values for single and double diode models of a 57-mm-diameter commercial (RTC France) silicon solar cell under 1000 W/m 2 at 33 °C.The extracted parameters are compared with those found by: Biogeography-Based Optimization algorithm with Mutation strategies (BBO-M) [68], Levenberg-Marquardt algorithm combined with Simulated Annealing (LMSA) [47], Artificial Bee Swarm Optimization algorithm [48], Artificial Bee Colony optimization (ABC) [49], hybrid Nelder-Mead and Modified Particle Swarm Optimization (NM-MPSO) [50], Repaired Adaptive Differential Evolution (RADE) [59], Chaotic Asexual Reproduction Optimization (CARO) [69], and the results for each model are reported in Tables 3 and 4.

Results, Discussions and Comparison
In order to evaluate the efficiency of the Firefly algorithm in the estimation of the solar cell, the photovoltaic module and the array parameter extraction, the results are compared with analytical methods, numerical methods and metaheuristic algorithm to validate the effectiveness of the algorithm.In order, to compare it with other algorithms, a benchmark commercial solar cell and benchmark photovoltaic module are selected in single diode, double diode and photovoltaic module models are considered.The study test cases are designated as follows:

•
Test scenario 1: Apply to commercial solar cell for both single diode and double model under standard irradiance level with relevant example comparisons to other methods.

•
Test scenario 2: Apply to a flexible hydrogenated amorphous silicon a-Si:H photovoltaic cell using single diode module.

•
Test scenario 3: Apply to a commercial photovoltaic array using the single diode model, with 36 solar cells connected in series.
The current-voltage measurements are collected from [29,54] and have been widely used by different papers to test electric circuit models, modelling or translate the current versus voltage and technique for parameter extraction.Furthermore, statistical analyses are carried out to measure the accuracy of the estimated parameters and model suitability.

Case 1: Single and Double Diode Model (RTC France Company)
The proposed algorithm is applied first to extract the electrical intrinsic parameters values for single and double diode models of a 57-mm-diameter commercial (RTC France) silicon solar cell under 1000 W/m 2 at 33 • C. The extracted parameters are compared with those found by: Biogeography-Based Optimization algorithm with Mutation strategies (BBO-M) [68], Levenberg-Marquardt algorithm combined with Simulated Annealing (LMSA) [47], Artificial Bee Swarm Optimization algorithm [48], Artificial Bee Colony optimization (ABC) [49], hybrid Nelder-Mead and Modified Particle Swarm Optimization (NM-MPSO) [50], Repaired Adaptive Differential Evolution (RADE) [59], Chaotic Asexual Reproduction Optimization (CARO) [69], and the results for each model are reported in Tables 3 and 4. To confirm the accuracy of the extracted optimal values found by the Firefly algorithm, the calculated currents for the single and double diode model by optimized parameters are summarized in Tables 5 and 6 compared with individual absolute error (IAE).Furthermore, to understand the quality of the curve fit between Firefly algorithm values and experimental data, the results are compared to other algorithms.The compared statistical analysis for each model is presented in Tables 7 and 8.The compared statistical criteria indicates that the Firefly algorithm ranks the overall lowest values for relative error (RE), median absolute error (MAE), residual sum of squares (SSE), and root mean square error (RMSE).The statistical errors are used to show the performance with the definitions as follows:  From Tables 7 and 8, we observe that the five and seven electrical parameters identified by the Firefly algorithm are close and more accurate than those found by all other compared algorithms.The performance of the proposed algorithm provides the lowest values for the statistical criteria, IAE, RMSE, SSE and MAE when compared to the other methods.Therefore, the Firefly algorithm is ranked first in achieving the lowest IAE, RMSE, SSE and MAE, while the Repaired Adaptive Differential Evolution algorithm and hybrid Nelder-Mead and Modified Particle Swarm Optimization (NM-MPSO) are ranked second and third, respectively.Therefore, the optimal parameters identified by the proposed Firefly Algorithm are very accurate because they are close to the real parameters of the system.The individual absolute error (IAE) and the relative error RE for each measurement using optimal values founded by the Firefly algorithm are illustrated in Figures 5 and 6, respectively.The Firefly algorithm performs better than the reported methods.From Tables 7 and 8, we observe that the five and seven electrical parameters identified by the Firefly algorithm are close and more accurate than those found by all other compared algorithms.The performance of the proposed algorithm provides the lowest values for the statistical criteria, IAE, RMSE, SSE and MAE when compared to the other methods.Therefore, the Firefly algorithm is ranked first in achieving the lowest IAE, RMSE, SSE and MAE, while the Repaired Adaptive Differential Evolution algorithm and hybrid Nelder-Mead and Modified Particle Swarm Optimization (NM-MPSO) are ranked second and third, respectively.Therefore, the optimal parameters identified by the proposed Firefly Algorithm are very accurate because they are close to the real parameters of the system.The individual absolute error (IAE) and the relative error RE for each measurement using optimal values founded by the Firefly algorithm are illustrated in Figures 5 and 6, respectively.The Firefly algorithm performs better than the reported methods.The current-voltage and power-voltage characteristics resulting from extracted parameters by the Firefly algorithm along with experimental data are compared to estimated data to investigate the quality of the identified parameters.This is illustrated in Figures 7 and 8.The two figures show the reconstructed single diode model is in good agreement with experimental data and are very close to each other.The current-voltage and power-voltage characteristics resulting from extracted parameters by the Firefly algorithm along with experimental data are compared to estimated data to investigate the quality of the identified parameters.This is illustrated in Figures 7 and 8 The current-voltage and power-voltage characteristics resulting from extracted parameters by the Firefly algorithm along with experimental data are compared to estimated data to investigate the quality of the identified parameters.This is illustrated in Figures 7 and 8.The two figures show the reconstructed single diode model is in good agreement with experimental data and are very close to each other.The current-voltage and power-voltage characteristics resulting from extracted parameters by the Firefly algorithm along with experimental data are compared to estimated data to investigate the quality of the identified parameters.This is illustrated in Figures 7 and 8.The two figures show the reconstructed single diode model is in good agreement with experimental data and are very close to each other.

Case 2: Organic Flexible Hydrogenated Amorphous Silicon a-Si:H Solar Cell
The Firefly algorithm, based on a parameter estimation method is used to extract the eight optimal parameters of flexible dual junction amorphous silicon solar cell under standard sunlight, based on data obtained in light intensity of 1000 W/m 2 and at a temperature of 300 K.The experimental data are used from [48]; only the open circuit voltage Voc and short circuit current Isc are obtained.Moreover, the optimal parameters are compared with several other techniques based on the same experimental data.The extracted optimal parameters by Firefly algorithm have been reported in Table 9, compared with the Quasi-Newton method and Self-Organizing Migrating Algorithm.Since it is difficult to extract the flexible amorphous silicon solar cell circuit model parameters and the research is still comparatively rare, the Quasi-Newton (Q-N) method and Self-Organizing Migrating Algorithm (SOMA) [48] have been chosen for comparison because in [29,48] they were demonstrated to provide good results for parameter extractions.To verify and validate the performance of the quality of the results, statistical analyses were carried out to measure the accuracy of the estimated parameters.The estimated current values are compared to experimental current by means of the following statistical errors: the individual absolute error (IAE), Standard deviation (SD), residual sum of squares (SSE), the root mean square error (RMSE) and the mean bias error (MBE) of the solar cell for each measurement, respectively.The statistical errors are used to compare term by term, the difference between estimated and experimental electric current.Generally, the lower these parameters, the more the efficiency of the model.Table 10 presents the current calculated for the Firefly algorithm and the individual absolute error, Table 11 summarizes the statistical errors for each measurement using the optimal values of x found by the Quasi-Newton method and Self-Organizing Migrating algorithm [48] compared with Firefly algorithm.

Case 2: Organic Flexible Hydrogenated Amorphous Silicon a-Si:H Solar Cell
The Firefly algorithm, based on a parameter estimation method is used to extract the eight optimal parameters of flexible dual junction amorphous silicon solar cell under standard sunlight, based on data obtained in light intensity of 1000 W/m 2 and at a temperature of 300 K.The experimental data are used from [48]; only the open circuit voltage V oc and short circuit current I sc are obtained.Moreover, the optimal parameters are compared with several other techniques based on the same experimental data.The extracted optimal parameters by Firefly algorithm have been reported in Table 9, compared with the Quasi-Newton method and Self-Organizing Migrating Algorithm.Since it is difficult to extract the flexible amorphous silicon solar cell circuit model parameters and the research is still comparatively rare, the Quasi-Newton (Q-N) method and Self-Organizing Migrating Algorithm (SOMA) [48] have been chosen for comparison because in [29,48] they were demonstrated to provide good results for parameter extractions.To verify and validate the performance of the quality of the results, statistical analyses were carried out to measure the accuracy of the estimated parameters.The estimated current values are compared to experimental current by means of the following statistical errors: the individual absolute error (IAE), Standard deviation (SD), residual sum of squares (SSE), the root mean square error (RMSE) and the mean bias error (MBE) of the solar cell for each measurement, respectively.The statistical errors are used to compare term by term, the difference between estimated and experimental electric current.Generally, the lower these parameters, the more the efficiency of the model.Table 10 presents the current calculated for the Firefly algorithm and the individual absolute error, Table 11 summarizes the statistical errors for each measurement using the optimal values of x found by the Quasi-Newton method and Self-Organizing Migrating algorithm [48] compared with Firefly algorithm.Figure 10 presents the compared individual absolute error of each measurement used for current and power of optimal value x found by Firefly algorithm compared with the Quasi-Newton method and Self-Organizing Migrating Algorithm.From Figure 10, Tables 10 and 11 we know that the Firefly algorithm and Self-Organizing Migration Algorithm have the lowest SD, RMSE, SSE and MBE values among these three compared methods.Furthermore, the Firefly algorithm has better performance than the Quasi-Newton method and Self-Organizing Migration presented in [48].In order to illustrate the quality of the extracted optimal values x 3 found by the Firefly algorithm, the extracted values of I ph , d i , µτ, V bi , R s , I 0 , a and R sh are put into Equation (3), then the current-voltage and power-voltage characteristics of this model is reconstructed with 16 pairs of current-voltage.The current-voltage and power-voltage characteristics resulting from the extracted parameters by Firefly algorithm along with experimental data have been illustrated in Figure 11  The comparative statistical error used in this paper compare the difference between estimated and experimental electric parameters, term by term.The mean bias error (MBE) provides information on the overestimation or underestimation of the solar cell performance.Therefore, the obtained results are more accurate than those found by Q-N and SOMA, can better reveal the actual behavior of solar cells and the model is efficient.Generally, the lower these parameters are, the more the model is efficient.

Case 3: Commercial Silicon Photovoltaic Module Photowatt-PWP 201
The prototype of the Photowatt-PWP 201 photovoltaic module has six solar panels, two are connected in series and three photovoltaic panels are connected in parallel.The measured voltage and current are taken under 25 °C and 1000W/m 2 .In this case, 26-pair current-voltage measured values are the same as [29], which are derived from 36 polycrystalline silicon cells which are connected in series.The extracted optimal parameters values for the photovoltaic module by Firefly algorithm have been reported in Table 12.Moreover, the optimal parameters are compared with several other techniques: Newton-Raphson [29] Pattern Search (PS) [55], Genetic Algorithm (GA) [56] and Simulated Annealing algorithm (SA) [58] based on the same experimental data.The purpose of comparison is to validate the accuracy of the Firefly algorithm in the parameter extraction process with a short time of convergence.The quality of the results in the extracted parameters are used to calculate the theoretical current values and to experimental measurements as show in Table 13.The comparative statistical error used in this paper compare the difference between estimated and experimental electric parameters, term by term.The mean bias error (MBE) provides information on the overestimation or underestimation of the solar cell performance.Therefore, the obtained results are more accurate than those found by Q-N and SOMA, can better reveal the actual behavior of solar cells and the model is efficient.Generally, the lower these parameters are, the more the model is efficient.

Case 3: Commercial Silicon Photovoltaic Module Photowatt-PWP 201
The prototype of the Photowatt-PWP 201 photovoltaic module has six solar panels, two are connected in series and three photovoltaic panels are connected in parallel.The measured voltage and current are taken under 25 • C and 1000 W/m 2 .In this case, 26-pair current-voltage measured values are the same as [29], which are derived from 36 polycrystalline silicon cells which are connected in series.The extracted optimal parameters values for the photovoltaic module by Firefly algorithm have been reported in Table 12.Moreover, the optimal parameters are compared with several other techniques: Newton-Raphson [29] Pattern Search (PS) [55], Genetic Algorithm (GA) [56] and Simulated Annealing algorithm (SA) [58] based on the same experimental data.The purpose of comparison is to validate the accuracy of the Firefly algorithm in the parameter extraction process with a short time of convergence.The quality of the results in the extracted parameters are used to calculate the theoretical current values and compared to experimental measurements as show in Table 13.
The optimal value of the following statistical errors: individual absolute error (IAE), relative error (RE), root means square error (RMSE) and residual sum of squares (SSE), for each measurement using the Firefly algorithm and other parameter extraction techniques are given in Table 14.The comparison between Newton-Raphson, Pattern Search (PS), Genetic Algorithm (GA) and Simulated Annealing algorithm (SA) and the proposed algorithm, with the optimal value of IAE for each measurement, is illustrated in Figure 12.This Figure shows that the FA algorithm has better performance than the other parameter extraction algorithms.The total IAE values for each measurement is also calculated and listed in Table 14.The total IAE value shown in Table 14 highlights that the FA has the lowest total IAE compared to other algorithms for the photovoltaic module.In order to validate the optimal values ph I , 0 I , a , s R and p R extracted by the Firefly algorithm, they are substituted into Equation (1) to reconstruct the current-voltage and powervoltage of the photovoltaic module.Figure 13 illustrates the current-voltage characteristics of the optimal values extracted by FA along with the experimental data.From the results, it can be observed that the values extracted by FA for the considered photovoltaic module fit the experimental data very well.From these two cases for the solar cell, the single diode and double diode models, the Firefly algorithm showed the lowest statistical criteria: IAE, RMSE, SSE and MAE values among the compared techniques.We observed that the proposed algorithm is able to extract the intrinsic electrical parameters at the entire range of irradiance and temperature and performance, as compared to other recent techniques.

Conclusions
The paper presents the application of the Firefly algorithm in order to provide an accurate model of solar cells, single and double, and photovoltaic modules.The data required for testing the effectiveness of the Firefly algorithm optimization technique is based on the results in previous literature, experimental data and the nonlinear function of solar cell/photovoltaic characteristics.From the results and the statistical analyses, it can be observed that the proposed Firefly algorithm achieves the least root mean square error (RMSE), residual sum of squares (SSE) and mean absolute In order to validate the optimal values I ph , I 0 , a, R s and R p extracted by the Firefly algorithm, they are substituted into Equation (1) to reconstruct the current-voltage and power-voltage of the photovoltaic module.Figure 13 illustrates the current-voltage characteristics of the optimal values extracted by FA along with the experimental data.From the results, it can be observed that the values extracted by FA for the considered photovoltaic module fit the experimental data very well.In order to validate the optimal values ph I , 0 I , a , s R and p R extracted by the Firefly algorithm, they are substituted into Equation (1) to reconstruct the current-voltage and powervoltage of the photovoltaic module.Figure 13 illustrates the current-voltage characteristics of the optimal values extracted by FA along with the experimental data.From the results, it can be observed that the values extracted by FA for the considered photovoltaic module fit the experimental data very well.From these two cases for the solar cell, the single diode and double diode models, the Firefly algorithm showed the lowest statistical criteria: IAE, RMSE, SSE and MAE values among the compared techniques.We observed that the proposed algorithm is able to extract the intrinsic electrical parameters at the entire range of irradiance and temperature and performance, as compared to other recent techniques.

Conclusions
The paper presents the application of the Firefly algorithm in order to provide an accurate model of solar cells, single and double, and photovoltaic modules.The data required for testing the effectiveness of the Firefly algorithm optimization technique is based on the results in previous literature, experimental data and the nonlinear function of solar cell/photovoltaic characteristics.From the results and the statistical analyses, it can be observed that the proposed Firefly algorithm achieves the least root mean square error (RMSE), residual sum of squares (SSE) and mean absolute From these two cases for the solar cell, the single diode and double diode models, the Firefly algorithm showed the lowest statistical criteria: IAE, RMSE, SSE and MAE values among the compared techniques.We observed that the proposed algorithm is able extract the intrinsic electrical parameters at the entire range of irradiance and temperature and performance, as compared to other recent techniques.

Conclusions
The paper presents the application of the Firefly algorithm in order to provide an accurate model of solar cells, single and double, and photovoltaic modules.The data required for testing the effectiveness of the Firefly algorithm optimization technique is based on the results in previous literature, experimental data and the nonlinear function of solar cell/photovoltaic characteristics.From the results and the statistical analyses, it can be observed that the proposed Firefly algorithm achieves the least root mean square error (RMSE), residual sum of squares (SSE) and mean absolute error (MAE) comparing the estimated and experimental data.Furthermore, the reproduction of current-voltage characteristics predicted using the parameters extracted by the Firefly algorithm are very close to those based on the experimental data.Moreover, the Firefly algorithm can extract the optimal parameters at all ranges of irradiance and temperature, especially at low irradiance.

Figure 1 .
Figure 1.Equivalent circuit solar cell model: (a) single and double diode, (b) flexible hydrogenated amorphous silicon a-Si:H.

Figure 1 .
Figure 1.Equivalent circuit solar cell model: (a) single and double diode, (b) flexible hydrogenated amorphous silicon a-Si:H.

Figure 2 .
Figure 2. The characteristic current-voltage division in two zones.

Figure 2 .
Figure 2. The characteristic current-voltage division in two zones.

Figure 3 .
Figure 3.A conceptual view of the firefly algorithm relationships, including locations , distance , brightness (), and attractiveness ().Figure 3. A conceptual view of the firefly algorithm relationships, including locations x, distance r, brightness I(r), and attractiveness β(r).

Figure 3 .
Figure 3.A conceptual view of the firefly algorithm relationships, including locations , distance , brightness (), and attractiveness ().Figure 3. A conceptual view of the firefly algorithm relationships, including locations x, distance r, brightness I(r), and attractiveness β(r).

Figure 4 .
Figure 4.A pseudocode for the considered firefly algorithm implementation.

Figure 4 .
Figure 4.A pseudocode for the considered firefly algorithm implementation.

Figure 5 .
Figure 5. Individual absolute error (IAE) plots for single and double diode for Mono-crystalline silicon solar cell, RTC France Company.

Figure 5 .
Figure 5. Individual absolute error (IAE) plots for single and double diode for Mono-crystalline silicon solar cell, RTC France Company.

Figure 6 .
Figure 6.Relative Error (RE) plots for single and double diode for Mono-crystalline silicon solar cell, RTC France Company.

Figure 7 .
Figure 7. Experimental current-voltage data compared with estimated data of the ono-crystalline silicon solar cell single diode, RTC France Company.

Figure 8 .
Figure 8. Experimental power-voltage data compared with estimated data of the mono-crystalline silicon solar cell single double diode, RTC France Company.

Figure 9
Figure9shows the compared extracted current-voltage characteristics of the mono-crystalline for single and double diode, RTC France Company.The calculated current by extracted parameters

Figure 6 .
Figure 6.Relative Error (RE) plots for single and double diode for Mono-crystalline silicon solar cell, RTC France Company.

22 Figure 6 .
Figure 6.Relative Error (RE) plots for single and double diode for Mono-crystalline silicon solar cell, RTC France Company.

Figure 7 .
Figure 7. Experimental current-voltage data compared with estimated data of the ono-crystalline silicon solar cell single diode, RTC France Company.

Figure 8 .
Figure 8. Experimental power-voltage data compared with estimated data of the mono-crystalline silicon solar cell single double diode, RTC France Company.

Figure 9
Figure9shows the compared extracted current-voltage characteristics of the mono-crystalline for single and double diode, RTC France Company.The calculated current by extracted parameters

Figure 7 . 22 Figure 6 .
Figure 7. Experimental current-voltage data compared with estimated data of the ono-crystalline silicon solar cell single diode, RTC France Company.

Figure 7 .
Figure 7. Experimental current-voltage data compared with estimated data of the ono-crystalline silicon solar cell single diode, RTC France Company.

Figure 8 .
Figure 8. Experimental power-voltage data compared with estimated data of the mono-crystalline silicon solar cell single double diode, RTC France Company.

Figure 9
Figure9shows the compared extracted current-voltage characteristics of the mono-crystalline for single and double diode, RTC France Company.The calculated current by extracted parameters

Figure 8 .
Figure 8. Experimental power-voltage data compared with estimated data of the mono-crystalline silicon solar cell single double diode, RTC France Company.

Figure 9
Figure9shows the compared extracted current-voltage characteristics of the mono-crystalline for single and double diode, RTC France Company.The calculated current by extracted parameters

Figure 9 .
Figure 9. Compared experimental current-voltage and power-voltage of the mono-crystalline single diode silicon solar cell, RTC France Company.

Figure 9 .
Figure 9. Compared experimental current-voltage and power-voltage of the mono-crystalline single diode silicon solar cell, RTC France Company.

Figure 10 presentsRFigure 10 .
Figure10presents the compared individual absolute error of each measurement used for current and power of optimal value x found by Firefly algorithm compared with the Quasi-Newton method and Self-Organizing Migrating Algorithm.From Figure10, Tables10 and 11we know that the Firefly algorithm and Self-Organizing Migration Algorithm have the lowest SD, RMSE, SSE and MBE values among these three compared methods.Furthermore, the Firefly algorithm has better performance than the Quasi-Newton method and Self-Organizing Migration presented in[48].In order to illustrate the quality of the extracted optimal values x3 found by the Firefly algorithm, the extracted values of ph I , i d ,  , bi V , s R , 0 I , a and sh R are put into Equation (3), then the current-voltage and power-voltage characteristics of this model is reconstructed with 16 pairs of current-voltage.The current-voltage and power-voltage characteristics resulting from the extracted parameters by Firefly algorithm along with experimental data have been illustrated in Figure 11.The Figures show the reconstructed model is in good agreement with experimental data.

Figure 10 .
Figure 10.Individual absolute error compared to, (a) I-V and (b) P-V for each current measurement by different algorithms.
. The Figures show the reconstructed model is in good agreement with the experimental data.

Figure 11 .
Figure 11.Comparison between, (a) I-V and (b) P-V characteristics resulting from the experimental data, Q-N, Soma and FA.

Figure 11 .
Figure 11.Comparison between, (a) I-V and (b) P-V characteristics resulting from the experimental data, Q-N, Soma and FA.

Figure 12 .
Figure 12.Comparison between, (a) IAE and (b) RE using the extracted parameters by FA and Newton-Raphson, PS, GA and SA for photovoltaic module Photowatt-PWP 201.

Figure 13 .
Figure 13.Comparison of (a) I-V and (b) P-V curve between experimentally recorded data for photovoltaic module Photowatt-PWP 201 and the estimated results by FA.

Figure 12 .
Figure 12.Comparison between, (a) IAE and (b) RE using the extracted parameters by FA and Newton-Raphson, PS, GA and SA for photovoltaic module Photowatt-PWP 201.

Figure 12 .
Figure 12.Comparison between, (a) IAE and (b) RE using the extracted parameters by FA and Newton-Raphson, PS, GA and SA for photovoltaic module Photowatt-PWP 201.

Figure 13 .
Figure 13.Comparison of (a) I-V and (b) P-V curve between experimentally recorded data for photovoltaic module Photowatt-PWP 201 and the estimated results by FA.

Figure 13 .
Figure 13.Comparison of (a) I-V and (b) P-V curve between experimentally recorded data for photovoltaic module Photowatt-PWP 201 and the estimated results by FA.

Table 2 .
A list of metaheuristic methods employed in the literature.

Table 4 .
Comparison of various parameter identification techniques for a double diode model (RTC France Company).

Table 5 .
Calculated current and compared IAE for single diode (RTC France Company).

Table 6 .
Calculated current and compared IAE for double diode (RTC France Company).

Table 7 .
Statistical result for single diode model (RTC France Company).
IAE: Individual Absolut Error, RMSE: Root Mean Square Error, SSE: Sum of Squares Error, MAE: Mean Absolute Error.

Table 8 .
Statistical result for double diode model (RTC France Company).

Table 7 .
Statistical result for single diode model (RTC France Company).
IAE: Individual Absolut Error, RMSE: Root Mean Square Error, SSE: Sum of Squares Error, MAE: Mean Absolute Error.

Table 9 .
Comparison among different parameter extraction of flexile silicon a-Si:H solar cell.

Table 9 .
Comparison among different parameter extraction of flexile silicon a-Si:H solar cell.

Table 10 .
Comparison between the calculate results of flexile silicon a-Si:H solar cell.

Table 11 .
Performance indexes of flexile silicon a-Si:H solar cell.

Table 11 .
Performance indexes of flexile silicon a-Si:H solar cell.

Table 12 .
Optimal parameter values identified by FA for Photowatt-PWP 201 polycrystalline photovoltaic module single diode compared with other methods.

Table 12 .
Optimal parameter values identified by FA for Photowatt-PWP 201 polycrystalline photovoltaic module single diode compared with other methods.

Table 13 .
Measured and calculated current of photovoltaic module Photowatt-PWP 201 at 25 different working conditions compared with SA and PS.

Table 14
proves that the Firefly algorithm has the lowest IAE, RMSE, SSE and MAE compared to other parameter extraction techniques such as, Newton-Raphson, Pattern Search (PS), Genetic Algorithm (GA) and Simulated Annealing algorithm (SA), since the Firefly algorithm found the minimum value of statistical analysis in parameter extraction for the photovoltaic module.

Table 14 and
Figure 12 indicate that FA outperforms the compared algorithms for this parameter extraction problem.module.Table 14 and Figure 12 indicate that FA outperforms the compared algorithms for this parameter extraction problem.