# Modelling and Prediction of Photovoltaic Power Output Using Artificial Neural Networks

Authors: Aminmohammad Saberian; H. Hizam; M. A. M. Radzi; M. Z. A. Ab Kadir; Maryam Mirzaei
Journal: International Journal of Photoenergy
 (2014)

---

## Abstract

This paper presents a solar power modelling method using artificial neural networks (ANNs). Two neural network structures, namely, general regression neural network (GRNN) feedforward back propagation (FFBP), have been used to model a photovoltaic panel output power and approximate the generated power. Both neural networks have four inputs and one output. The inputs are maximum temperature, minimum temperature, mean temperature, and irradiance; the output is the power. The data used in this paper started from January 1, 2006, until December 31, 2010. The five years of data were split into two parts:  2006–2008 and 2009-2010; the first part was used for training and the second part was used for testing the neural networks. A mathematical equation is used to estimate the generated power. At the end, both of these networks have shown good modelling performance; however, FFBP has shown a better performance comparing with GRNN.


---

## Body

## 1. Introduction

The sun is one of the primary sources of energy for most of the natural processes such as heat, wind, and rain. The most effective conversion of sunlight into chemical energy can be seen in photosynthesis procedure. Currently human kind is using fossil fuels as their primary energy source but the fossil fuels are not an appropriate source of energy. This leads to the usage of sunlight as a renewable source of energy to produce electricity, called solar power. Moreover, solar energy is green energy and it is environmentally friendly. Photovoltaic panel and solar thermal are the main sources for electricity generation from solar energy. The prediction of power generation from solar energy is gaining considerable attention due to the increment of power generation from solar energy [1]. Numerical models have been developed to forecast weather and solar power; however, they require a powerful computing system [2, 3].An artificial neural network assimilates human brain learning system and is able to find an input-output relationship for linear and nonlinear systems with less computational effort. This leads to the wide usage of artificial neural networks to forecast various criteria such as irradiance and temperature [4, 5]. In general, neural networks are universal approximators [6]. The original of ANN was introduced by McCulloch and Pitts [7]. Although there has been research into the prediction of some parameters such as temperature and solar radiation, there has not been comprehensive research into the power prediction. A forecasting method using ANN has been proposed for solar radiation in [8]. The power generation of photovoltaic panels depends on solar radiation, temperature, humidity, and so on [9–13]. These parameters are naturally variable and nonschedulable; thus, the amount of generated power is generally unknown. Feedforward back propagation (FFBP) and the general regression neural network (GRNN) have been affirmed as two effective methods in modelling and prediction by previous researchers [14]. These two models are employed for the prediction of PV output power in this research since they have shown their effectiveness compared to statistical and autoregression approaches. [15]. PV plant modelling has become an active research field in the last few years, with the development of new models based on artificial intelligence techniques [16]. Also, solar radiation forecasting methods are presented in [4, 17] and a method for solar power forecasting is discussed in [18]. On the other hand, power planning is necessary for cost efficiency of power generation in which power forecasting is an essential part [14, 19]. Some data is required in order to predict a solar panel generated power. However, sometimes such data is not available due to the lack of related databases [8]. Therefore, forecasting is required for sizing and meteorological data prediction [19, 20] to achieve an increase in the efficiency [21] and to schedule the operation of the system [18]. The artificial neural network (ANN) is widely used for solar data prediction in previous research work. AbdulAzeez [17] evaluated an artificial neural network for global solar radiation in Nigeria. Chen et al. [18] improved the neural network to forecast the power of PV panels. They mentioned that this method is accurate and efficient in the operation of a PV system. Linares-Rodríguez et al. [20] explained a multilayer perceptron feedforward neural network. These authors applied a trial process to find a suitable number of hidden layers for the prediction of daily global solar radiation. They concluded that although there are small changes in the results for a different number of hidden layers, the cost of computing is different and 25 neurons in the hidden layers is assumed as the best number. Paoli et al. [21] used a MLP to develop a methodology for solar radiation prediction. The author emphasized that the ability of an ANN for prediction is high. The application of ANN has some advantages such as the following: the mapping function in neural network is very flexible and neural network have the ability of generalizing form a limit set of data points and giving a good results at new data points [22]. Only a few describe forecasting models used to predict directly the daily energy production of the PV plant [23].


## 2. Background of Research

ANN [18, 21] and its related models such as FFBP [4, 18, 19, 24] and GRNN [8] are shown to be popular methods among authors. ANN is a model based on interconnected neurons to create an output by processing information based on the input. The relationship between the input and the output is based on the weight of the neurons and the input data for which the neurons have to be trained to the system [8]. Naini [25] discussed the application of three different neural networks structures such as radial basis function network, FFBP, and GRNN for prediction of the characteristics of the scour hole geometry. Vigneswaran and Dhivya [26] applied five accurate neural network models including FFBP and GRNN and concluded that GRNN has better results. The work discussed in [27] considered wind speed forecasting by using FFBP. In another work [28], the authors used FFBP to predict the velocity of crude oil. In [29] the authors applied FFBP for temperature forecasting and concluded that this model had the proper potential for complex modelling of the relation between various factors. The authors in [30] mentioned that FFBP is the best model of neural network for real-time forecasting due to least training time and fast response. In [31] the authors stated that FFBP is one of the most popular configurations of an ANN. The authors in [14] undertook load forecasting using FFBP. Zhao et al. [32] employed GRNN as one of the models employed to forecast wind power density. Some researchers have used many types of ANN for comparison and analysis of issues related to solar panels. Khatib et al. [8] applied four types of ANN for forecasting solar radiation forecasting. Their research was based on GRNN, FFNN, cascade forward back propagation neural network (CFNN), and Elman back propagation (ELMNN) scheme. Based on their research, the GRNN is better than the other models with a high level of accuracy and efficiency. One of the major advantages of a GRNN is defined as the effective relation of the model and the input [33].


## 3. Artificial Neural Network

### 3.1. Feedforward Back Propagation (FFBP)

Among the different forms of ANN, feedforward back propagation and general regression neural networks are proposed in this research. A feedforward neural network is defined as a simple type of neural network in which the information flow is in the forward direction. Corani   [34] utilized a feedforward neural network (FFNN) for air prediction in Milan. He described the structure of the FFNN in different three layers. An input layer was used for data collection, a hidden layer for data processing by neurons and the output layer for the results. Back propagation (BP) is assumed as a popular learning technique for feedforward  [12] neural networks. Therefore the FFBP is defined as a model for forecasting parameters and the diagram of prediction using FFBP shown in Figure 1.Figure 1
Diagram of prediction using FFBP.The FFNN is defined as a type of MLP network with special input values. These values that are multiplied by their weight are led to the hidden layer by neurons. In separate work, Khatib et al. [35] developed an artificial neural network for solar prediction in Malaysia. He provided a feedforward multilayer perception model with four inputs for the calculation. The training process for the back propagation algorithm includes a few steps. First, the weights are initialized for the neurons and the measured output is compared with the desired value to calculate the error. In the second step the weights are changed based on the error. In this way, the error is propagated backward to update the weights of the previous layers [19]. Kumari et al. [15] used a neural network for temperature prediction in India.Mellit and Pavan [4] provided a feedforward neural network for solar radiance forecasting in Italy. They proposed a multilayer perceptron (MLP) model with a back propagation training algorithm. Therefore, the 24-hour solar irradiance can be forecasted by using a MLP neural network. Ahmed and Adam [24] explored a prediction model for solar radiation by use of an artificial neural network. The ANN in that study was a feedforward back propagation model. The results proved that this method is precise and suitable for forecasting solar radiation.


### 3.2. General Regression Neural Network (GRNN)

A GRNN is defined as a probabilistic neural network that is definitely useful for prediction and performance comparison. GRNN is a new kind of neural network that Specht put forward in 1991 [36]. The network of a GRNN is the same as an FFNN with input, hidden, and output layers. The values from the hidden layer are led to a pattern layer. The pattern layer works as a summation layer with denominator summation and numerator summation neurons. The values of the hidden neurons are added by the denominator summation part and the values from the multiplication of the weights of the actual values of the hidden neurons are added by the numerator summation part. The output will be the division of the values from these two parts as shown in Figure 2.Figure 2
Architecture of GRNN.


## 3.1. Feedforward Back Propagation (FFBP)

Among the different forms of ANN, feedforward back propagation and general regression neural networks are proposed in this research. A feedforward neural network is defined as a simple type of neural network in which the information flow is in the forward direction. Corani   [34] utilized a feedforward neural network (FFNN) for air prediction in Milan. He described the structure of the FFNN in different three layers. An input layer was used for data collection, a hidden layer for data processing by neurons and the output layer for the results. Back propagation (BP) is assumed as a popular learning technique for feedforward  [12] neural networks. Therefore the FFBP is defined as a model for forecasting parameters and the diagram of prediction using FFBP shown in Figure 1.Figure 1
Diagram of prediction using FFBP.The FFNN is defined as a type of MLP network with special input values. These values that are multiplied by their weight are led to the hidden layer by neurons. In separate work, Khatib et al. [35] developed an artificial neural network for solar prediction in Malaysia. He provided a feedforward multilayer perception model with four inputs for the calculation. The training process for the back propagation algorithm includes a few steps. First, the weights are initialized for the neurons and the measured output is compared with the desired value to calculate the error. In the second step the weights are changed based on the error. In this way, the error is propagated backward to update the weights of the previous layers [19]. Kumari et al. [15] used a neural network for temperature prediction in India.Mellit and Pavan [4] provided a feedforward neural network for solar radiance forecasting in Italy. They proposed a multilayer perceptron (MLP) model with a back propagation training algorithm. Therefore, the 24-hour solar irradiance can be forecasted by using a MLP neural network. Ahmed and Adam [24] explored a prediction model for solar radiation by use of an artificial neural network. The ANN in that study was a feedforward back propagation model. The results proved that this method is precise and suitable for forecasting solar radiation.


## 3.2. General Regression Neural Network (GRNN)

A GRNN is defined as a probabilistic neural network that is definitely useful for prediction and performance comparison. GRNN is a new kind of neural network that Specht put forward in 1991 [36]. The network of a GRNN is the same as an FFNN with input, hidden, and output layers. The values from the hidden layer are led to a pattern layer. The pattern layer works as a summation layer with denominator summation and numerator summation neurons. The values of the hidden neurons are added by the denominator summation part and the values from the multiplication of the weights of the actual values of the hidden neurons are added by the numerator summation part. The output will be the division of the values from these two parts as shown in Figure 2.Figure 2
Architecture of GRNN.


## 4. Methodology

Meteorological data such as the temperature and solar irradiance were collected from the Malaysian Meteorological Department (MMD) that includes the daily minimum, mean average, and maximum temperature and solar irradiance starting from January 1, 2006, to December 31, 2010. All data was collected from the Kuala Lumpur International Airport (KLIA) station and the sample data for modelling of PV is shown in Table4. However, a solar panel was not placed at this center and therefore the generated power data is not available. The solar irradiance measured is presented in units of MJ
/
m
2. The most commonly used unit for solar irradiation in photovoltaic system calculations is W
/
m
2. Thus, these data are converted according to the following equation:
(1)
MJ
m
2
×
1000000
60
×
60
=
Wh
m
2
.
In order to convert the Wh
/
m
2 to W
/
m
2 the data values should be divided by the hours (h). In this case h is considered to be the time in which the solar irradiance is available. In other words, the day length (DL) is required to be substituted by h in the calculation where DL can be calculated as [8]
(2)
DL
=
2
15
cos
⁡
-
1
⁡
(
-
tan
⁡
l
*
tan
⁡
δ
)
,
where l is the latitude and δ is defined as the declination angle. The value δ is given by [8]
(3)
δ
=
23.45
sin
⁡
[
360
(
284
+
N
)
365
]
.
In (3), N is the number of days and for the first day of January (N
=
1), the solar day is considered to be 284.The next step is to calculate the two important parameters of solar panel which are the open circuit voltage (V
oc) and the short circuit current [37]. Both of these essential parameters are a function of the solar irradiance and temperature. However, in the datasheet of the solar panel [38] which is used in this research, the V
oc and I
sc are given at two certain points of (Irradiance
=
1000
W
/
m
2
,
Temperature
=
25
°
C) and (Irradiance
=
800
W
/
m
2
,
Temperature
=
20
°
C). However, in modelling calculations V
oc and I
sc at different irradiance and temperatures are needed. In other words, the mathematical relation between these two parameters and the environmental factors of temperature and irradiance is required for solar panel modelling.Accordingly the maximum power point voltage at the operating temperature and irradiance is calculated as follows:(4)
V
mpp
=
(
V
oc
×
N
T
100
)
×
0.78
,
where V
mpp is the voltage at the maximum power point and N
T is the normal thermal coefficient.The value of 0.78 is an estimated coefficient. It is estimated that the maximum power point voltage can be considered as 0.78 of the open circuit voltage at a different working point. This value is the average ratio ofV
mpp  to the V
oc that is calculated based on the available data in the cell data sheet. Table 1 shows the cell open circuit voltage and maximum power point voltage at different irradiance.Table 1
Cell open circuit voltage and maximum power point voltage at different irradiance.
Irr (W/m2)
V
oc (v)
V
mpp (v)
V
mpp/V
oc
1000
30
23.8
0.793
800
29
22.9
0.789
600
28.56
22.27
0.78
400
27.75
21.6
0.778
200
27
20.8
0.77Finally, the power can be estimated as in the following equation:(5)
P
=
V
mpp
×
I
2
.
Therefore the power for the minimum, maximum, and mean temperature can be estimated based on (5).


### 4.1. FFBP Method

The feedforward back propagation method is used as a first neural network model for this study. The applied flowchart of FFBP is shown in Figure3.Figure 3
Flowchart of FFBP method.As shown in Figure3, the prediction results are based on reading the testing and training data and using FFBP.Before the training process, all the data must be normalized. Various normalization methods are used for neural networks to increase the reliability of the trained network [39]. The Min-Max normalization is applied in this research as follows:
(6)
a
=
(
b
-
b
min
⁡
)
[
a
max
⁡
-
a
min
⁡
b
max
⁡
-
b
min
⁡
]
+
a
min
⁡
,
where a is the normalized value and b is a nonnormalized value. For this work, a
max
⁡
=
1 and a
min
⁡
=
-
1.After obtaining the result, the normalized values must become normal by using the following formula:(7)
b
=
(
a
-
a
min
⁡
)
[
b
max
⁡
-
b
min
⁡
a
max
⁡
-
a
min
⁡
]
+
b
min
⁡
.
The mean squared error (MSE) is used for evaluation of predictive power as follows [15]:
(8)
MSE
=
1
N
∑
t
=
1
N
(
Z
t
-
Z
t
-
)
2
,
Where  Z
t
- is a vector of the N prediction and Z
t is the vector of the real values.


### 4.2. GRNN Method

GRNN as a probabilistic model can perform classification and regression for definite and continuous targets [8]. For the purpose of normalization, (6) and (7) are used in this model with some differences.The valuesa
max
⁡
=
1anda
min
⁡
=
0 are applied in (6) and (7). The error calculation is the same as in Section 4.1 and (8).


## 4.1. FFBP Method

The feedforward back propagation method is used as a first neural network model for this study. The applied flowchart of FFBP is shown in Figure3.Figure 3
Flowchart of FFBP method.As shown in Figure3, the prediction results are based on reading the testing and training data and using FFBP.Before the training process, all the data must be normalized. Various normalization methods are used for neural networks to increase the reliability of the trained network [39]. The Min-Max normalization is applied in this research as follows:
(6)
a
=
(
b
-
b
min
⁡
)
[
a
max
⁡
-
a
min
⁡
b
max
⁡
-
b
min
⁡
]
+
a
min
⁡
,
where a is the normalized value and b is a nonnormalized value. For this work, a
max
⁡
=
1 and a
min
⁡
=
-
1.After obtaining the result, the normalized values must become normal by using the following formula:(7)
b
=
(
a
-
a
min
⁡
)
[
b
max
⁡
-
b
min
⁡
a
max
⁡
-
a
min
⁡
]
+
b
min
⁡
.
The mean squared error (MSE) is used for evaluation of predictive power as follows [15]:
(8)
MSE
=
1
N
∑
t
=
1
N
(
Z
t
-
Z
t
-
)
2
,
Where  Z
t
- is a vector of the N prediction and Z
t is the vector of the real values.


## 4.2. GRNN Method

GRNN as a probabilistic model can perform classification and regression for definite and continuous targets [8]. For the purpose of normalization, (6) and (7) are used in this model with some differences.The valuesa
max
⁡
=
1anda
min
⁡
=
0 are applied in (6) and (7). The error calculation is the same as in Section 4.1 and (8).


## 5. Result and Discussion

A trial for investigation of the number of nodes in the hidden layer is evaluated to find the MSE of the FFBP neural network. Table2 represents the training MSE, testing MSE, and regression value for different numbers of hidden nodes for FFBP. In addition, a graphical visualization of MSE and regression based on the number of nodes in the hidden layer is shown in Figure 4.Table 2
MSE for FFBP.
Number of neurons in hidden layer
MSE train
MSE test
Regression
3
0.00019
0.000232
0.999157
4
0.000322
0.000278
0.999005
5
0.000364
0.000343
0.998773
6
0.000155
0.000156
0.999427
7
0.000164
0.000187
0.999328
8
0.000136
0.000162
0.999405
9
0.000137
0.000162
0.999408
10
0.000104
0.000141
0.999482Figure 4
MSE with the number of nodes in hidden layer.The comparison between the simulated results of the FFBP and the real data for the power of the solar panel in 2010 is provided in Figures5, 6, and 7. These figures illustrate these comparisons for January, February, and March of 2010.Figure 5
Results for real data and FFBP for January 2010.Figure 6
Results for real data and FFBP for February 2010.Figure 7
Results for real data and FFBP for March 2010.The results for these three months demonstrate that the results are accurate for the FFBP model. The hidden neurons and the number of epochs in this calculation are 10 and 1000, respectively. The same comparison for one year (2010) is provided in Figure8 with six hidden neurons and 1000 epochs.Figure 8
Results for real data and FFBP for 2010 with 6 hidden neurons and 1000 epochs.Figure8 shows that the differences of predicted power and real power are very low and a high level of accuracy is achieved by using FFBP. A number of hidden neurons and the number of epochs are changed to examine the result as shown in Figure 9.Figure 9
Results for real data and FFBP for 2010 with 10 hidden neurons.Although the number of hidden layers is increased from 6 hidden neurons to 10 hidden neurons in Figure9, the level of accuracy is very close by considering Figures 8 and 9. Figure 10 presents the regression of calculating data and the real data. As shown in this figure, the measured error is very low.Figure 10
FFBP regression of error.According to Figure11 the best validation performance is 4.4514
×
10
-
7 at epoch 199.Figure 11
The training performance for FFBP with 10 neurons.GRNN network has only one free parameter as spread which is the distance of an input from a neuron’s weight [40]. Different spread values have been examined to find the best fit as shown in Table 3. The monthly measured testing data are presented in Figures 12, 13, and 14 based on a spread of 0.04.Table 3
The GRNN comparison for different spreads.
Spread
MSE train
MSE test
Regression
0.01
5.16 × 10−8
0.00072
0.98948
0.02
4.15 × 10−6
0.00054
0.99238
0.03
2.23 × 10−5
0.0004
0.99476
0.04
6.80 × 10−5
0.00039
0.99559
0.05
0.00015
0.00049
0.99505
0.06
0.00029
0.00068
0.99362
0.07
0.00048
0.00094
0.99151
0.08
0.00072
0.00126
0.98882
0.09
0.001
0.00162
0.98575
0.1
0.00131
0.00201
0.98243Table 4
Sample data for modelling of PV.
Year
Month
Day
N
Total solar KW/m2
V
oc
at  IR at 25°C
V
mpp
at IR at Max temp.
Output power
2006
1
1
1
0.274841223
27.181649
0.058270974
42.6518
2006
1
2
2
0.203071904
26.6355684
0.042189698
30.7373
2006
1
3
3
0.384548966
27.8008342
0.0833881
61.5857
2006
1
4
4
0.365065203
27.7040672
0.078887569
57.9466
2006
1
5
5
0.352615893
27.6396815
0.07602029
55.6912
2006
1
6
6
0.299843763
27.3408209
0.063944202
46.9139
2006
1
7
7
0.197615363
26.5869615
0.040981138
29.8238
2006
1
8
8
0.121888679
25.7392373
0.024471109
13.5845
2006
1
9
9
0.175552495
26.376727
0.036117902
18.5403
2006
1
10
10
0.255924153
27.051971
0.054001371
39.564
2006
1
11
11
0.252152139
27.0250476
0.053152504
38.9175
2006
1
12
12
0.301336286
27.3499262
0.064283897
47.1211
2006
1
13
13
0.412130472
27.9302742
0.089785153
66.1377
2006
1
14
14
0.474875137
28.1969664
0.104442299
76.9622
2006
1
15
15
0.198878834
26.5983269
0.041260785
30.0045
2006
1
16
16
0.400291667
27.8757359
0.087035713
64.3705
2006
1
17
17
0.283381772
27.2374867
0.060205136
44.1317
2006
1
18
18
0.395752595
27.8544257
0.085982998
63.4632
2006
1
19
19
0.417949979
27.9565494
0.091138626
66.9412
2006
1
20
20
0.425391254
27.9896541
0.092871122
68.2328
2006
1
21
21
0.335214455
27.5460362
0.07202387
52.8023
2006
1
22
22
0.393920428
27.8457593
0.085558305
62.935
2006
1
23
23
0.325532825
27.491952
0.069806356
51.3257
2006
1
24
24
0.287815825
27.26586
0.061210859
44.8429
2006
1
25
25
0.429558971
28.0079601
0.09384235
69.3494
2006
1
26
26
0.430434611
28.0117851
0.094046486
69.4158
2006
1
27
27
0.37166462
27.737372
0.080410199
59.241
2006
1
28
28
0.468196434
28.1701967
0.102875648
75.6425
2006
1
29
29
0.438430519
28.0463815
0.095911839
70.5903
2006
1
30
30
0.356302403
27.6589657
0.076868656
56.5022
2006
1
31
31
0.413284534
27.9355122
0.090053458
66.2356Figure 12
Results of real data and GRNN for January 2010.Figure 13
Results of real data and GRNN for February 2010.Figure 14
Results of real data and GRNN for March 2010.Comparing the results of FFBP and GRNN shows that FFBP is more accurate compared with GRNN.Figure15 demonstrates that the applied methodology and process have been right. There are a few changes between measured and predicted power. The prediction of power using FFBP was more accurate compared to GRNN. Figure 16 provides information about variation of measured data and predicted values. The predicted values are around the real one and show the level of accuracy.Figure 15
Overall results for real data and GRNN for 2010.Figure 16
Comparison between measured and predicted data.


## 6. Conclusion

Power prediction for photovoltaic panels is needed for accurate power planning. In this paper, the generated power of a solar panel has been estimated using mathematical equations. Afterward, the meteorological data and estimated power have been used for training GRNN and FFBP. Both of these neural networks have shown good modelling performance; however, FFBP has shown a better performance compared to GRNN.



---

*Source: 469701-2014-04-06.xml*