1. Introduction
Solar technologies are the most efficient resources of energy and have been extensively utilized for power generation worldwide in the last decades. About 48TW of energy is available daily on earth, which can easily be harvested using photovoltaic (PV) panels to generate electricity [
1]. However, before installing any solar plant, investors need to know the plant’s performance and efficiency. The estimation of generated power from photovoltaic (PV) microgrids is important for energy management to balance generation as per demand in small townships/higher education institutions.
The main aim of this study was to develop a new model to predict power generation by roof top microgrids for reliable energy management using metaheuristic algorithms. Several techniques were used to estimate the power generation of photovoltaic microgrids. Solar cell modeling, in combination with metaheuristic algorithms, can effectively be used for accurate power generation extraction. A solar cell can be represented by single (SDM)-, double (DDM)-, or triple (TDM)-diode models with several parameters. The modeling accuracy is highly dependent on solar cell parameters. However, all these parameters are not provided by the manufacturing industry. Single-diode models (SDM) are usually used in the literature due to their simple structure and efficient identification [
2]. Modeling solar cells is vital for different applications, such as power generation estimation [
3], maximum power point tracking [
4], and degradation analysis [
5]. Therefore, it is important to determine the modeling parameters accurately.
Analytical methods, which are used to solve this problem, depend significantly on some key points on the characteristic curves of the module such as the open circuit voltage and short circuit current. Thus, analytical methods are not very reliable and provide unsatisfactory results in most cases when many local minima points exist. Therefore, numerical methods are implemented to overcome this issue by considering all points. Some studies are carried out to solve this problem mathematically [
6,
7], which are also complex, slow, and based on assumptions. However, metaheuristic algorithms are mostly used due to their efficiency and accuracy. Zagrouba et al. [
8] used a genetic algorithm (GA) to find the solar cell parameters values and the maximum power point (MPP) and found that GA is accurate and suitable with high efficiency. In refs. [
9,
10], the simulated annealing (SA) algorithm was compared with other techniques for SDM and DDM, and it was found to be much accurate and promising for two different experimental data. Mono-crystalline, multi-crystalline, and thin-film technologies were studied in ref. [
11], wherein particle swarm optimization (PSO) with inverse barrier constraint was used to estimate the missing parameters of the modules. Another PSO algorithm was proposed in ref. [
12] for physical systems’ parameters extraction considering the Spectral Richness in the fast Fourier transform of the signals, which was found to reduce the variability of the estimates. A modified teaching-learning based optimization technique was used in ref. [
13] to optimize the parameters of SDM and DDM for four different PV modules. Whippy Harris Hawks Optimization (WHHO) [
14] is also used to find the optimal values of the solar models for three commercial modules under different conditions. Many other techniques are used in the literature for the same purpose, such as flexible PSO [
15], Bacterial foraging algorithm [
16], pattern search [
17], Tree Growth-Based Optimization Algorithm [
18], Coyote optimization algorithm [
19], improved equilibrium optimizer [
20], and enhanced ant lion optimizer [
21]. A Firefly algorithm was proposed in ref. [
22] for five, seven, and eight-parameter estimation for three types of modules, namely, R.T.C. France, flexible hydrogenated amorphous silicon a-Si:H, and a 36-cell module called PWP-201 and compared to other methods from the literature. For nine-parameter estimation, an Artificial Ecosystem-based Optimizer was proposed in ref. [
23] and compared to other algorithms by testing on three commercial modules. An integration of the guaranteed convergence arithmetic optimization algorithm and Levenberg−Marquardt with the adaptive damping nonlinear parameter method was proposed for TDM in ref. [
24] and was found to reduce the error to zero.
Machine learning techniques are data-driven techniques that require more datasets, tuning, and careful inputs selection [
25]. They are also used for power generation and solar radiation forecasting and found to be effective to deal with big systems with a huge amount of uncertainty [
26,
27]. In these types of techniques, there is no need to define what circuit or parameters to use; rather, the algorithm will find the best relation between the inputs and outputs.
The performance of solar cells changes under different solar radiation and temperature conditions [
28]. Therefore, the characteristics of any module are required to be drawn in order to analyze and estimate its performance. This can be completed by varying the voltage/current between certain values to obtain the I-V\P-V curves, but this requires experimental data, which require expensive setups and a lot of time, resources, and effort [
29]. Therefore, this study proposed a new model to estimate the models’ parameters using the manufacturing datasheets instead.
The novelty of this study is as follows:
In the present study, a new model was proposed to estimate solar cell parameters using metaheuristic techniques requiring only manufacturer data instead of experimental data.
The present model is more efficient as compared with other models in terms of accuracy, computational cost, and data required, whereas numerical methods are complex, slow, and based on assumptions. In addition, machine learning techniques require big datasets, more tuning, and careful input selection. Our model requires only three data points, which is even lesser than the requirements of solar cell modeling using experimental datasets.
The three data points used from the manufacturer data sheet of PV modules were short circuit current , open circuit voltage , and the maximum power point current and voltage ,.
Two different types of solar modules, a single-cell module called R.T.C. France and a 36-cell module called PWP-201, were used for validation.
A comparison of two metaheuristic algorithms, namely, genetic algorithm and particle swarm algorithm was presented.
The results of the proposed model were further validated under varying solar irradiance conditions and compared to the same model using experimental datasets from the literature.
This paper is organized as follows In
Section 2, the materials and methods are described; the results and discussion are exhibited in
Section 3, and the conclusions and follow-up research are finally described in
Section 4.
2. Materials and Methods
This study discussed the benefit of using PV module manufacturer datasheets for parameter estimation in order to model any given PV module. In this scenario, GA, PSO algorithms were used to solve the non-linear equation of a single-diode five parameters model for two types of modules: a single-cell module called R.T.C. France and a 36-cell module called PWP-201. Experimental datasets from the literature were collected to validate the proposed models, and a comparison of the measured data with the predicted ones was carried out. In addition, the algorithms used in this study were compared to other algorithms from the literature.
Figure 1 depicts the methodology proposed in this study.
2.1. Single-Diode Five Parameters Model
Using SDM with five parameters is sufficient to model these types of modules [
30]. The SDM contains a photocurrent source connected to one diode and one parallel resistor called a shunt resistor,
, in addition to the
resistor, which was connected in series as demonstrated in
Figure 2.
The current generated from the SDM was calculated using Equations (1) and (2) considering only one cell.
where,
are the cell current and voltage, the reverse saturation current is
,
is the ideality factor, and the thermal voltage was calculated by the formula
, where,
is the operating temperature of the cell,
is the Boltzmann constant, and
is the electron charge.
where
is the photocurrent of the cell at the standard test conditions (which are usually equal to 25 °C and 1000 W/m
2),
is the temperature coefficient of
,
is the reference temperature of the cell,
is the reference irradiance, and
is the irradiance in W/m
2.
Solar cells were combined in series and parallel circuits in order to increase the generated power, since a single solar cell generates very low power. Therefore, the aforementioned equations can be modified to include the number of series cells
Ns and parallel cells
Np used to form photovoltaic modules. The equation was derived from these equations as follows
In this study, the value of was considered to be 1 as no cells were connected in parallel. Therefore, by considering Equations (1)–(4), the values of the 5 parameters (, , , n, ) can be derived using optimization techniques and the proper objective function and data points.
2.2. Objective Function
Minimizing the difference between the predicted current and the current, which is actually measured, is the main objective of modeling. Root Mean Square Error (RMSE) is commonly used for evaluating such problems, and it can be formulated as in Equation (5):
where the number of data points is
, the measured current is
, and
is the predicted current using Equation (4).
2.3. Modeling Using MATLAB/Simulink
Simulink was used to model the circuit of single-diode models in order to assess the performance of the solar cells used in this study by drawing the I-V and P-V curves. MATLAB provides very useful tools to deal with such plots and compares them easily. The powerful features of Simulink make it easy to implement SDM and simulate the performance under different conditions. The entire block diagram of the model is given in
Figure 3 and the sub-systems are given in
Figure 4 and
Figure 5.
2.4. Genetic Algorithm
GA is a well-known optimization method belonging to the metaheuristic techniques. It imitates the rule “survival of the fittest” of natural evolution. GA can be implemented as shown in
Figure 6 [
31,
32].
Selection of the main GA parameters, which are the size of the initial population, the number of maximum generations that can be reached, and the crossover and mutation probabilities.
Random initialization of the population. Generate matrix (X) representing (, , , n, )
Calculation of the fitness using Equation (5) f(X)
Selection of the best population
Reproduce the selected individuals using variation operators considering the chosen probability, such as Crossover and Mutation, to generate new offsprings.
where,
is the gauss error function,
xi is the offspring I,
is a random value between [0, 1],
and
are children of the parents
and
, and
is calculated in (Equation (8)) by considering
, the constant which decides the range constraint of the offsprings and
r, which is a random number
Compare the fitness of each individual and determine which ones will survive from the offsprings and the parents
Stop criteria identification
In this manner, GA proved to be more applicable for complex and real-world problems when multiple local minima occur. GA is adaptive to its environment, as this type of method is a platform which appears in a changing environment.
Figure 6.
Genetic algorithm flow chart.
Figure 6.
Genetic algorithm flow chart.
2.5. Particle Swarm Optimization
PSO is inspired by the swarm theory and the observation of the social behavior of animals. PSO can be implemented as follows (
Figure 7) [
33,
34].
Choosing the main parameters, such as the number of particles, the velocity, and the positions;
Initialization of the population. Generate matrix (X) representing (, , , n, );
Calculate the fitness of each particle using Equation (5);
Compare each particle with other particles based on the fitness and choose the best position to be the global point;
Update the particles’ velocities using (Equation (9)) and send them to new positions:
Move the particles to new positions:
Check the stopping criteria.
Where, is the velocity of the particle/agent i, is the inertia weight, is the cognitive constant, and are random numbers, is the social constant, is personal best, and is global best.
This makes PSO fast, computationally effective, and applicable for this kind of problem.
Figure 7.
Particle swarm optimization algorithm.
Figure 7.
Particle swarm optimization algorithm.
2.6. The New Approach
In general, researchers take experimental measurements to feed the optimization techniques and find the parameters’ optimal values. However, in some cases it is difficult to obtain such data, as it requires a set-up environment, particular tools, and time, and in some cases it is not worth it. Therefore, this study tried to solve this issue while maintaining a similar accuracy. This can be achieved by only taking the data available for all solar PV modules in the manufacturing datasheet.
Two PV panels were chosen in this study: R.T.C. France solar cell (which has a single cell) and PWP-201 PV module (which has 36 cells), to validate the proposed methodology results. The manufacturing values of the two panels are given in
Table 1, which were taken under the standard condition of each module, and these values were used in the proposed methodology to find the five parameters with the help of Equations (1)–(4). Additionally, so were the experimental datasets which were taken from ref. [
14].
PSO and GA were used in this study, as these algorithms are mature enough and well-studied in the literature where their efficiency to solve non-linear problems has been proven in various domains. Moreover, there are many stable and open-source libraries available for both of them. In this study, MATLAB libraries were used for the implementation of these algorithms.
Both PSO and GA algorithms were used for parameter optimization using Equation (4) and the objective function given in Equation (5). The upper and lower limits of the parameters given in
Table 2 for each PV panel were taken as suggested in refs. [
14,
35,
36,
37,
38,
39,
40,
41] in order to compare the proposed model with other models in the literature. However, changing the limits will result in changing the complexity and search time of the algorithms, which may or may not change the results as the used algorithms are known for their stability and accuracy; besides, one needs to follow the same used limits in order to compare and validate the results. These constraints are based on the maximum generation by one solar cell, cell number, and the material used.
The obtained values by using the entire dataset were used as the global optimum solution for the modules, which are also compared by the values obtained in literature. Therefore, the models which use these global optimum values were considered as reference models.
After finding the optimum values using only three data points, the predicted output current was compared to the actual measurements and the error was also compared with the results achieved by the reference models.
3. Results and Discussion
The experimental data of R.T.C. France cells and PWP-201 module are given in Tables 4 and 6. The first step is to use the experimental data to find the optimal solutions of the five parameters and to compare them with the other studies; then, these values were considered as the optimal values and used as a reference to evaluate the proposed methodology.
First of all, R.T.C France data were used for validating the proposed methods. The optimization results of PSO were (0.3218 × 10
−6, 0.0364, 53.4489, 1.4808, and 0.7608) for the parameters (
,
,
, n, and
), respectively, with an RMSE equal to 9.8636 × 10
−4. This was achieved by PSO using five swarms and the algorithm converged within 0.605784 s. However, GA estimated the values (0.3231, 0.0364, 53.7378, 1.4812, and 0.7608) for the same parameters, respectively, with an RMSE equal to 9.8602 × 10
−4. This was achieved by GA using a population size equal to 20 and the algorithm converged within 1.035257 s. A comparison of these results with previous studies, as shown in
Table 3, showed similar values have been estimated in the literature. Indeed, GA provides more accurate results than PSO, but requires more time to converge.
As shown in
Table 3, the estimated parameters of all techniques were almost equal with minor variations in some cases. Therefore, based on these values, a baseline model was considered as a reference and the proposed methodology was validated by comparing the performance of the new model to the baseline model.
After that, both PSO and GA were used to do the same, but considering only three data points given by the manufacturing datasheet, which are the short circuit current
, where the output of the circuit is shorted and the voltage is equal to zero, the open-circuit voltage
, where the output of the circuit is open and the current is equal to zero, and, finally the maximum power point. These three points are available for all PV panels, in contrast to the measured data. The results, as shown in
Table 3, showed that PSO achieved better accuracy, 9.6481 × 10
−8, than GA. Note that the values of
and
were slightly different from the reference model due to using only three points and due to setting a wide range of constraints for these two parameters while optimizing. Moreover, the RMSE was lower as compared with the reference model due to using fewer points for evaluation. Therefore, in order to validate the models accurately, further assessment for PSO using the experimental values was carried out.
The results of the proposed PSO using three data points were compared with the outputs of PSO using all data and the result of the WHHO algorithm [
14], ABC [
36], and BMO [
38] in
Table 4, where
is the estimated current. The results showed close results of the proposed model to other models with slightly more error in the range of 10–4, which makes it reasonable.
Moreover, the proposed model output current was compared to the outputs of the reference model and other models from the literature, and the proposed model showed similar behavior as compared to the other models. The boxplot in
Figure 8 shows the variation of the current for the models, which were similar in all models.
Figure 9 represents the boxplot of the variation in the error for each model. The figure shows that the BMO model was more stable than other models; however, the proposed model was still able to achieve accurate results with a slight difference.
For further validation, the proposed model was compared with the reference model, by comparing both I-V and P-V characteristic curves using Simulink. As indicated in
Figure 10, the I-V and P-V curves of the reference model and the proposed model were identical, with a difference of only 7.6212 × 10
−4 RMSE between the I-V lines under the standard conditions. This implies that the proposed model is just as accurate as the reference model.
Moreover, the models were compared under different solar radiation values, as shown in
Figure 11,
Figure 12,
Figure 13 and
Figure 14; it is clear from these curves that under all conditions the proposed model followed the pattern of the reference model with very little error. The I-V lines of the proposed and the reference models were compared under different conditions using RMSE, which was found to be equal to 0.0012, 0.0017, 0.0025, and 0.0032 under 800, 600, 400, and 200 W/m
2 solar radiations, respectively. Therefore, it can be noticed that the error increased when the radiation decreased; however, it is still a reasonable range of error.
The comparison between the reference model and the proposed model was also carried out using Taylor graph,
Figure 15, which represents how both models are close to the reference value, being the actual measurements. Moreover, the mean bias error (MBE) and mean absolute error (MAE) of the proposed model were calculated and found to be 0.001213 and 0.00014, respectively. In addition, the correlation between the predictions and the actual measurements is plotted in
Figure 16, where the R value was very close to 1.
To make sure that this methodology does not work only with single-cell modules, another module, the PWM201 PV module, with 36 solar cells was used and the manufacturing data of the module are shown in
Table 1. The same objective function was used, and the constraints are given in
Table 2. Both PSO and GA were applied for this module as well. The results, given in
Table 5, showed that both techniques had similar accuracy when using the full dataset for training. However, PSO (1.9172 × 10
−8) showed less error compared with GA (1.2167 × 10
−7) when using only three points.
To ensure that the proposed models using PSO and GA with three data points have reasonable behavior compared to the reference one, both models were tested using the experimental dataset and the output is shown in
Table 6 and compared to the reference model, in addition to WHHO [
14], JAYA [
43], and EHHO [
42] from the literature. RMSE for all methods were compared and it was found that PSO achieved better accuracy (0.0093) than GA (0.0196); however, it had a lower accuracy compared with the reference model, which was trained using the full dataset points (0.0024) where the difference was in the range of 10–3, which makes it reasonable for applications where such an error does not matter.
For further comparison, the proposed model output current was compared to the outputs of the reference model and other models from the literature, as shown in
Figure 17 and
Figure 18, and the proposed model showed similar behavior as compared to the other models. The boxplot in
Figure 17 shows the variation of the output current of the models and it was similar for all with a slight difference in the negative current.
Figure 18 represents the boxplot of the variation in the error for each model. The figure shows that WHHO model was more accurate than other models; however, the proposed model was still able to achieve accurate results with a slight difference.
The comparison between the reference model and the proposed model was also carried out using a Taylor graph,
Figure 19, which represents that the proposed model slightly differed from the actual measurements. Moreover, the MBE and MAE of the proposed model were found to be 0.01256 and −0.00156, respectively. In addition, the correlation between the predictions and the actual measurements is plotted in
Figure 20, where the R value was very close to 1.
As the proposed model works efficiently for both R.T.C France solar cell and PWP201 modules, it will work for other types of modules and can be further experimented with in future studies. However, these two types of solar cells/modules were selected due to the availability of the experimental data for validation only, whereas the proposed method does not require any experimental data, which is promising for commercial modules for which no experimental datasets are available.