A Parameter Estimation Method for a Photovoltaic Power Generation System Based on a Two-Diode Model

: This study presents a parameter estimation method that uses an enhanced gray wolf optimizer (EGWO) to optimize the parameters for a two-diode photovoltaic (PV) power generation system. The proposed method consists of three stages. The ﬁrst stage converts seven parameters for the two-diode model into 17 parameters for different environmental conditions, which provides more precise parameter estimation for the PV model. A PV power generation model is then established to represent the nonlinear relationship between inputs and outputs. The second stage involves a parameter sensitivity analysis and uses the overall effect method to remove the parameters that have smaller effect on the output. The ﬁnal stage uses an enhanced GWO that is associated with measurement data to optimally estimate the parameters that are selected in the second stage. When the parameters are estimated, the predicted value for the PV power output is calculated for speciﬁc values of solar irradiation and module temperature. The proposed method is veriﬁed on a 200 kWp PV power generation system. To conﬁrm the feasibility of the proposed method, the parameter estimation before and after optimization are compared, and these results are compared with other optimization algorithms, as well as those for a single-diode PV model.


Introduction
Photovoltaic (PV) power output is changeable and unpredictable, since it is only generated during the day and not at night.For a large power grid, PV power generation is an uncontrollable power source, therefore there is restricted dispatching.However, the power output from a PV has less inertia than that from traditional units.When an accident occurs in the system, the frequency response decreases as there is a decrease in the inertia of the system, which becomes unstable.Accurately estimating PV power output gives an accurate reference for auxiliary services, such as frequency modulation and rapid response of backup capacity, but the random nature of the output makes estimation difficult.
Estimating parameters for PV power generation involves statistical methods and physical methods.Statistical methods use a black-box model to establish a nonlinear relationship between inputs and outputs.The inputs that are used are the historical PV power output, irradiance, and weather information, and the output is the estimated value for PV power generation.This method uses either indirect or direct forecasting.Indirect prediction [1][2][3] predicts future irradiance using historical irradiance data and other weather variables, and uses a conversion formula to convert irradiance into PV power output.The curves for irradiance and PV power output are quite similar, thus this method usually accurately estimates PV power output if the irradiance prediction is accurate.Direct prediction [4][5][6][7][8][9][10] uses the historical PV power output and weather variables (including irradiance) as input variables, and the prediction results for PV power generation are the output.This method requires an accurate weather forecast to produce good forecast results.
Physical methods establish a physical model for PV power generation between the input and output to convert environmental variables, such as irradiance and temperature, into a power output.Physical model involves either an ideal model [11], a simple power model [12], an experimental model [13], a single-diode model [14 -24], a two-diode model [22][23][24][25][26][27], or a three-diode model [28,29].The single-diode model with five parameters has a simpler architecture, and has been widely used to simulate the electrical behavior of solar cells.To produce more accurate estimate, the two-diode model with seven parameters is developed to enhance the simulation performance in low irradiance.The three-diode model adds another diode to improve the defects of the recombination process in twodiode model [28].However, the addition of a diode makes the model more complicated.Considering the accuracy and complexity, this study uses a two-diode model to simulate the electrical behavior of solar cells.When the PV power generation model is created, it is difficult to estimate parameters because there is a nonlinear relationship between these parameters.In addition, after a period of operation, the PV module parameters that are provided by the manufacturer change due to aging and deterioration of the solar cell, therefore these must be corrected.
Some parameters affect the output only slightly and will be eliminated in the parameter selection process.When the parameters that affect the output are selected, an optimization tool is used to accurately estimate the parameters.Several optimization algorithms have been used to estimate the parameters of solar cells, such as the hybrid charged system search algorithm [15], the particle swarm optimization (PSO) method [18], the differential evolution algorithm (DE) [19], the chaos-embedded gravitational search algorithm [21], the bonobo optimizer [22], the improved cuckoo search algorithm [23], the chaotic improved artificial bee colony algorithm [24], the ranking-based whale optimizer (WO) [28], and the grasshopper optimization algorithm [29].As mentioned above, most studies use different optimization tools to solve the parameter estimation problem.The estimation accuracy depends heavily on the chosen optimization algorithm.In addition, the five-parameter and seven-parameter methods, which are respectively used for single-diode and two-diode models, are still imprecise.To solve this problem, a novel approach is proposed in this study.The proposed method consists of three stages.The first stage converts seven parameters for the two-diode model into 17 parameters and establish a PV power generation model in the MATLAB/SIMULINK environment.The second stage combines sensitivity analysis and the overall effect method to remove the parameters that have a smaller effect on the output.The final stage uses an EGWO to optimally estimate the parameters.
The differences compared to the previous studies and the contributions of this study are highlighted as follows:

•
A PV power generation system based on a two-diode model is established in the MATLAB/SIMULINK environment, which can be used for parameter estimation of PV power plants of different types and scales.

•
Converting the seven parameters of the two-diode model into 17 parameters according to different environmental conditions provides more precise parameter estimates for the PV model.

•
A parameter elimination technique that combines parameter sensitivity analysis and the overall effect method is used to remove the parameters that have little effect on the output.

•
To enhance the global search ability of GWO, a dynamic crowding distance (DCD) algorithm is used to eliminate the agents with higher density region in the optimization process.
The remainder of this paper is organized as follows.Section 2 details the PV power generation models.Section 3 describes the proposed parameter estimation method.Section 4 presents the simulation results for a 200 kWp PV power generation system and conclusions are offered in Section V.

The PV Power Generation Models 2.1. Single-Diode Model
Figure 1 shows the circuit of a single-diode model which is composed of a photo current source, a diode, a shunt resistance, and a series resistance.The output current of the model is expressed as [14,15]: where I is the output current for the solar cell, I L is the photo current, R sh is the parallel resistance, R s is the series resistance, I o is the saturation currents for the diode, V t is the thermal voltage, and n I is the ideal factor.Since exp V+IR s n I V t 1, Equation (1) can be simplified as [16]: Figure 1.The circuit of a single-diode model.

Two-Diode Model
For a two-diode model, the saturation current is generated by two diodes.Figure 2 shows the circuit of a two-diode model.The output current for this model is expressed as [25][26][27]: where I o1 and I o2 are the saturation currents for the two diodes, V t1 and V t2 are the thermal voltage, and n I1 and n I2 are the ideal factors.In Equation (3), I o2 is used to compensate for the compound loss in the depleted area.This model produces more accurate estimates than a single-diode model if there is low irradiance or shading, but the addition of a diode makes the model more complicated.Equation (3) shows that seven parameters must be estimated for the two-diode model: I L , I o1 , I o2 , n I1 , n I2 , R s , and R sh .These parameters change for different irradiance and temperature values as [17,[25][26][27]: where G is the solar irradiance (kW/m 2 ), G ref is the solar irradiance under standard test condition (STC), T is the surface temperature of the solar cell (K), T ref is the surface temperature under STC, α I mp is the temperature coefficient at the maximum power point, and E g,ref (eV) is the gap energy for the material under STC.STC defines a test environment with 1000 (W/m 2 ) irradiance, a temperature of 298 (K) and a 1.5 air mass.Under any environmental conditions, the short-circuit current I sc and the open-circuit voltage V oc are expressed as [17,[25][26][27]: At the maximum power operating point, the current I mp and the voltage V mp are expressed as [17,[25][26][27]: where α I sc is the temperature coefficient at short-circuit current, and β oc is the temperature coefficient at open-circuit voltage.
Combining Equation (4) to Equation ( 14), the nonlinear relationship between the seven parameters and the related parameters is briefly expressed as: where . As shown in Equation ( 14), the seven parameters in Y are controlled by the 17 parameters in X, which are optimized to provide a more accurate estimation of parameters.

The Proposed Method
The proposed parameter estimation method establishes a PV power generation model, selects parameters using a sensitivity analysis, and the overall effect method and optimizes parameters using an EGWO. Figure 3 shows a schematic diagram of the proposed method.

Establishment of PV Power Generation Model
Using the two-diode equivalent circuit, the PV power generation model is established using Matlab/Simulink software.The model inputs are the solar irradiance and the module temperature, and the outputs are the current and power generated.Figure 4 shows the establishment of a PV power generation model, where subsystem1 is used to calculate seven parameters, including I L , I o1 , I o2 , n I1 , n I2 , R s and R sh, and subsystem2 is used to calculate the current and power output.

Parameter Selection
To allow more accurate parameter estimation, the original seven parameters in the PV model are converted into 17 parameters for this study.The parameters that are provided by the manufacturer change due to natural degradation of the solar cell.Some parameters have little effect on the output, and can be removed from the model.Parameters are selected to reduce the calculation time for the optimization process.
The parameter selection method for this study uses a parameter-output sensitivity matrix at a specific steady-state operating point.A principal component analysis (PCA) [30] is then used to evaluate the effect on the overall outputs.The magnitude of the parameter effect is evaluated by the sensitivity coefficient S ij [30]: where θ j is the jth parameter, and y i is the ith output.In Equation ( 6), j = 1, 2, . . ., Q, Q is the number of parameters.
There is a disturbance on the jth parameter, such that ∆θ = θ j − θ j , the ith output changes (i.e., ∆y i = y i − y i ) and the sensitivity coefficient is approximated as [30]: Equation ( 17) is a dimensionless sensitivity matrix that expresses the relationship of each parameter with respect to each output.The parameters that have smaller effect on the output are removed in the first step, and the PCA is then used to evaluate the effect of each parameter on the overall outputs.
Combining Equations ( 16) and ( 17), the overall effect of the jth parameter is expressed as: where E e f f ,j ∈ [0, 1] is the effect of the jth parameter on the overall variables, λ i is the eigenvalue for the ith output, P ij represents the degree of contribution for the jth parameter on the ith output, and n o is the number of outputs.The parameters with a larger value of E e f f are then optimized using an EGWO algorithm.

Enhanced Gray Wolf Optimizer (EGWO)
The GWO was proposed by Mirjalili and Lewis [31].Wolves have very strict social behaviors, which are roughly classified into four categories: α, β, δ, and Ω in order of fitness value.The Ω is the lowest gray wolf, which is dominated by other wolves.The GWO uses surrounding prey, attacking prey, and searching for other prey strategies to model the social behavior of wolves.To enhance the global search ability of GWO, a dynamic crowding distance (DCD) [32] algorithm is used to eliminate the agents with higher density region in the optimization process.Figure 5 shows the pseudocode for the EGWO to optimize the parameters [33], which is described as follows.

Surrounding Prey
The wolves usually use surrounding strategy to hunt prey, which is expressed as [31]: where t is the present iteration step,

→
A and → C are coefficients, and → X and → X p denote the location of wolves and the location of the prey, respectively.In Equations ( 19) and (20), a decreases linearly from 2 to 0 along the optimization process, and → r ∈ [0, 1] is a random vector.

Attacking Prey
After the surrounding is finished, the wolves stop moving and start attacking their prey.In this stage, Ω wolves change their location based on the best location of α, β, and δ as [31]: → where → P is the location of the wolves, and → P α , → P β and → P δ denote the respective locations of the α, β, and δ wolves.

Search for Other Prey
To achieve a global search, GWO allows → A to set randomly greater than 1 or less than −1.This forces an exploratory search and allows the agents to search for the other prey so that the optimization process can run away the local minimum values.

Dynamic Crowding Distance (DCD)
DCD [32] is a diversity maintenance strategy for retaining a certain number of solutions uniformly distributed in the space of feasible solution.In this paper, DCD is employed to eliminate adjacent feasible solutions as follows [32]: where fit i is the fitness value of the ith feasible agent, fit j is the fitness value of the jth feasible agent, C is the number of feasible agents, and fit max and fit min are the maximum and minimum fitness values, respectively.Equation (24) states that if the value of d i is small, the ith feasible agent is in a higher density area and has a higher probability to be eliminated.The deprecated agents will be replaced by randomly generated agents.
In Equation ( 24), the fitness value is calculated as: Where O j,est is the estimated value of the jth agent, and O j,mea is the measured value of the jth agent.The feasible agent with lower fitness value is better in the iteration process.

Numerical Results
The proposed method was tested using a 200 kWp PV power generation system.The data were collected from January 2019 to December 2019, which consists of the hourly historical PV power output and the associated irradiance and module temperature.Due to sunshine, the data in summer season (from June to September) were collected from 06:00 a.m. to 19:00 p.m. at a total of 14 points; in the non-summer season, data were collected at a total of 12 points from 06:00 a.m. to 17:00 p.m.To verify the feasibility of the proposed method, the proposed EGWO was compared with the other swarm optimization algorithms such as PSO and WO.To evaluate the accuracy of the forecast, the mean relative error (MRE) is used as follows [15]: where P fore is the estimated value, P true is the actual value, P cap is the capacity of the PV power generation, and N is the number of data points.As shown in Equation ( 26), the MRE is calculated by dividing the estimation error by the capacity of PV power generation in order to reduce the weight of the lower power generation to the error percentage.

Establishment of PV Power Generation Model
Table 1 indicates the reference values for the 17 parameters under STC.These parameter values are obtained by the manufacturer or by experience.A PV power generation model is then created using the 17 parameters in the MATLAB/SIMULINK environment.Figure 6 shows the current-voltage (I-V) and power-voltage (P-V) characteristic curves for diverse irradiance values.The higher the irradiance, the larger is the output current and power, but the effect on the maximum voltage is small.Figure 7 shows the I-V and P-V curves under different temperatures.The greater the module temperature, the less is the output current and power, and there is a significant effect on the maximum voltage.As observed in Figures 6 and 7, irradiance affects current and power output more than module temperature.

Parameter Selection for Optimization
To determine the effect of individual parameters on the outputs, a parameter sensitivity analysis with ±5% disturbance is used, and the results are shown in

Parameter Optimization
This paper uses an EGWO to optimize the 12 parameters that are selected in the parameter selection stage.Table 3 shows the reference parameters and the parameters after optimization.The ranges for parameters are set in terms of operator experience.In total, four different weather types, including sunny, rainy, cloudy, and slightly cloudy, are used to study the estimation results.Table 4 shows a comparison of the estimation results before and after parameter optimization for different weather types.An optimized parameter gives a smaller value for MRE than one that is not optimized.To verify the performance of the proposed EGWO method, the similar swarm optimization algorithms, such as PSO [18,34] and WO [28,35], are also used to optimize the 12 parameters.The numerical results are shown in Table 5.The proposed EGWO outperforms PSO and WO for different weather types.This table also shows that optimized estimates produce more accurate results than the parameters that are not optimized.The average computation time of the PSO and WO methods through 10 different runs is 12.5 min.and 10.5 min., respectively, while the proposed EGWO takes approximately 9.1 min.

Slightly cloudy day
Before optimization 1.9742 PSO [18,34] WO [28,35] EGWO [31,33] 1.7452 1.7545 1.7337 Table 6 shows the estimation results for different PV models using EGWO.The singlediode model with nine parameters produces lower MRE than the single-diode model with five parameters.Similarly, the proposed two-diode model with 12 parameters allows better estimate than the two-diode model with seven parameters.The results in this table show that using Equation (15) to convert the original model to a more refined model according to different environmental conditions can provide more accurate parameter estimation.7 compares the estimation performance of the two models for different time periods.The two-diode model gives better estimation results in the morning and afternoon periods if irradiance is low.The two models give similar results for the higher irradiance period at noon.The average error for the two-diode model shows that it gives better estimation results than the single-diode model.

Discussion
The following observations are yield from the above results: • A photovoltaic power generation system based on a two-diode model is established in the MATLAB/SIMULINK environment, which can be applied to PV power plants of different types and scales only by changing the number of modules in series and parallel.

•
As observed in Tables 4 and 5, the proposed algorithm combining GWO and DCD allows better global search ability and lower estimation error than the PSO and WO methods.

•
As shown in Table 6, whether a single-diode model or a two-diode model is used, it is more accurate to convert the original model to a more refined model with more parameters according to different environmental conditions.

•
Although the proposed EGWO takes approximately 9 min to complete the parameter optimization, it only needs to be executed offline, and usually needs to be performed once a month or when a new PV array is installed.

Conclusions
This study creates a PV power generation system based on a two-diode model in the MATLAB/SIMULINK environment.A sensitivity analysis and the overall effect are then used to eliminate the parameters that have a smaller effect on the outputs.An enhanced GWO algorithm is employed to optimize the 12 parameters that are selected from the original 17 parameters.Testing on a 200 kWp PV power generation system shows that optimized parameters produce better estimation results than parameters that are not optimized for four different weather types.When compared with PSO and WO algorithms, the proposed EGWO allows for better optimization performance in terms of estimation error and computation time.Whether a single-diode model or a two-diode model is used, it is more accurate to convert the original model to a more refined model with more parameters according to different environmental conditions.Furthermore, a two-diode model gives better estimation results than a single-diode model in the morning and afternoon when irradiance is lower.The two modes give similar results during the high irradiance period at noon.The average error values show that the two-diode model gives better estimation results.Although the proposed method allows more accurate estimate than previous works, the estimation error caused by the shading effect is still unsolved, which is the limitation of the proposed method.A future work to improve the estimation error due to shading is under study.In addition, the weather information, such as wind speed and wind direction, which affect heat dissipation from the PV module, can be considered as input to increase the estimation accuracy.

Figure 2 .
Figure 2. The circuit of a two-diode model.

Figure 3 .
Figure 3.The schematic diagram of the proposed method.

Figure 4 .
Figure 4. Establishment of a PV power generation model.

Figure 5 .
Figure 5.The pseudocode for the EGWO to optimize the parameters[33].

Figure 6 .
Figure 6.The (a) I-V and (b) P-V characteristic curves for different irradiance values.

Figure 7 .
Figure 7.The (a) I-V and (b) P-V characteristic curves for different temperatures.

Figures 8 -
respectively show a comparison of the estimation results for a two-diode model and a single-diode model for sunny, rainy, cloudy, and slightly cloudy days.In total, nine parameters are optimized for the single-diode model, which are selected from the original 13 parameters.The curves show that the two-diode model produces better estimation results than the results for a single-diode model.Table7compares the estimation performance of the two models for different time periods.The two-diode model gives better estimation results in the morning and afternoon periods if irradiance is low.The two models give similar results for the higher irradiance period at noon.The average error for the two-diode model shows that it gives better estimation results than the single-diode model.

Table 1 .
The reference values for related parameters under STC.

Table 2 .
The results for the overall effect value show that parametersI L,ref , V oc,ref , I sc,ref , V mp,ref , I mp,ref , G ref , T ref , R s,ref , R sh,ref , n I1,ref , α I mp ,and β oc have a greater effect on the output, parameters I o1,ref , I o2,ref , α I sc , and E g,ref have little effect on the output.Furthermore, n I2,ref = n I1,ref , therefore n I2,ref can be removed.Obtained from this table that in the optimization process, the five parameters I o1,ref , I o2,ref , α I sc , n I2,ref, and E g,ref will remain unchanged, and only 12 parameters are used for optimization.

Table 2 .
Parameter sensitivity matrix and overall effect value for individual parameters for a ±5% disturbance.

Table 3 .
Reference parameters and optimized values using EGWO.

Table 4 .
Estimation results before and after parameter optimization using EGWO.

Table 5 .
Estimation results using different optimization algorithm.

Table 7 .
Comparison results of single-diode and two-diode models for different time periods.
Estimated value of the jth agent O j,meaMeasured value of the jth agent