Design of an Artificial Neural Network-Based Model for Prediction Solar
Radiation Utilizing Measured Weather Datasets
GARYBEH MOHAMMAD, ALSMADI OTHMAN
Electrical Engineering Department
The University of Jordan
Amman
JORDAN
Abstract: - Forecasting solar radiation plays an important role in the field of energy meteorology, as it provides the
energy value expected to be produced by the solar plants on a specific day and time of the year. In this paper, a
new and reliable artificial intelligence-based model for solar radiation prediction is presented using Artificial
Neural Network (ANN). The proposed model is built utilizing real atmospheric affecting measured values
according to their locational weather station. In the training process, the Levenberg–Marquardt (LM), Bayesian
Regularization (BR), and Scaled Conjugate Gradient (SCG) are used. The mean absolute error (MAE) and the root
mean square error (RMSE) are used to evaluate the model accuracy. Results of the investigation show that the
proposed model provides the lowest error rate when using the (BR) training algorithm for predicting the average
daily solar radiation.
Key-Words: -Hourly solar radiation, Artificial neural network, Backpropagation algorithms.
Received: April 28, 2021. Revised: April 23, 2022. Accepted: May 27, 2022. Published: June 28, 2022.
1 Introduction
Nowadays, solar energy is globally considered
as one of the most expanding resources of energy,
due to its economic and environmental advantages
as an alternative resource of energy [1]. It has
shown to be one of the leading fields through its
wide increase of financial spending for investment
in this field, which directly impacts the growth of
gross domestic product [2]. Solar energy increases
the diversity of energy sources, helps in enhancing
the reliability of electrical systems, and reduces the
voltage difference between busbars [3]. Prediction
of solar irradiance and energy has become one of
the most recent important topics, as to increase the
solar energy reliability [4].
Forecasting has attracted many researchers and
became their main interest of search. Recent
researches suggested different models for
predicting solar production utilizing atmospheric
parameters using ANN. Gihan Amarasinghe, s. K.
Abeygunawardane proposed an ANN model to
predict solar power and compared their results
with the smart persistence model at Sri Lanka
investigating the (temperature and humidity)
weather parameters. It was found that their ANN
model was more accurate for solar power
prediction at clear and overcast conditions. In
addition to that, they found that their prediction
errors can be improved when increasing the
number of inputs for their suggested model [5].
Gilles Notton, et, proposed two ANN models to
estimate the global horizontal irradiation (GHI)
and the direct normal irradiance (DNI) as a
function of time for one and six hours ahead using
temperature, wind speed, and humidity. It was
found that their models have errors (RMSE) from
22.57% ( for one hour ) to 34.85% ( for six hours )
for the GHI and from 38.23% ( for one hour ) to
61.88% ( for six hours ) for the DNI [6]. Donghun
Lee and Kwanho Kim Suggested three models for
studying the relation between PV output power
prediction and meteorological information. Their
proposed methods were ANN, deep neural
network (DNN), and long and short-term memory
(LSTM). Using temperature, humidity, cloudiness,
and solar irradiance, they concluded that the
LSTM was more accurate in solar prediction than
the ANN and DNN, where the LSTM successfully
performs better by more than 50% [7]. K.Ranjith
Kumara and M.Surya Kalavathib investigated two
models (ANN and Adaptive Neuro-Fuzzy
inference System) for the solar prediction problem.
Using their solar irradiance and production data,
they concluded that the ANN model provided
better results than the ANFIS in forecasting based
on the RMSE errors [8]. Jiaojiao Feng,
WeizhenWang, and Jing Li developed back-
propagation neural network method with
Levenberg-Marquardt algorithm to simulate
monthly radiation using clouds, aerosols, and
perceptible water vapor. Their proposed method
WSEAS TRANSACTIONS on POWER SYSTEMS
10.37394/232016.2022.17.14
Garybeh Mohammad, Alsmadi Othman
E-ISSN: 2224-350X
132
Volume 17, 2022
was able to predicate monthly solar radiation
efficiently[9]. Tanawat Laopaiboon, Weerakorn
Ongsakul, Pragya Panyainkaew, Nikhil Sasidharan
proposed back propagation ANN model to predict
hour PV irradiation using solar irradiation, average
temperature, humidity The model is better to
predict solar irradiance by lower error[10].
Graeme Vanderstar, Petr Musilek, Alexandre
Nassif forecasting solar energy via sunlight
intensity and solar position by ANN model using
at none zero solar global horizontal irradiation for
temperature, wind speed, and relative humidity.
Their model was able to achieve satisfying result
with a low error percentage [11]. Premalatha
Neelamegama and Valan Arasu Amirtham explain
that the quantity of the dataset is affected by the
output of ANN. They suggested an ANN model
that forecasts monthly solar energy using
temperature, humidity, and wind speed [12].
Even though, numerous research models have
been proposed on solar radiation prediction, there
is a space for result enhancement and
improvement. Therefore, in this paper we propose
a new ANN model that takes into account all
affecting system parameters for prediction daily
solar irradiance utilizing real atmospheric
datasets. The model will be evaluated using the
training algorithms; Levenberg–Marquardt (LM),
Bayesian Regularization (BR), Scaled Conjugate
Gradient (SCG). The maximum and minimum
temperature, relative humidity, maximum,
minimum, and average wind speed were used in
predicting the solar radiation for a specific
location. All of the data were considered for the
day light period, while excluding all night periods.
The ANN model with the best training algorithm
were selected based on the minimum mean
absolute error (MAE) and minimum root mean
square error (RMSE).
2 Artificial Neural Network
Artificial Intelligent techniques (AI) have the
potential for making quicker, better, and more
accurate predictions for numerous problems.
Artificial neural network is superior to traditional
methods for prediction, curve fitting and
regression [13]. Neural networks operate as a
black box, consists of three layers: an input layer
that collects data, an output layer that computes
data, and one or more hidden layers that link the
input and the output layer. A neuron is a
fundamental processing unit in a Neural Network
(NN) that consists of two parts: receiving inputs
and creating output. As illustrated in Figure 1 (as
well known), each input is multiplied with a
weight then is passed through an activation
function to create an output. The strength of the
connection between neurons is represented by
weights, which determine how much influence a
specific input will have on the neuron's output.
The input vector is represented by[14]:
 󰇟󰇠
(1)
The weight row vector is represented by:
 󰇟󰇠
(2)
The summation of dot product for input vector and
weight vector is described in Equation (3), where
(i) is the number of inputs, (j) is the number of
hidden layers, and (b1) represents the bias value
used to change the output, as well as the weighted
sum of the neuron's inputs. Therefore, bias is a
constant that assists the model in fitting the data as
best it can.


(3)
At the hidden layer, the activation function is a
sigmoid function which can be expressed as
follows in Equation (4) to produce the output
layer.
󰇛󰇜

(4)
The dot product of the hidden layer function ()
and output weight (W2) is summed to the output
layer bias (b2) as expressed in equation (5).


(5)
The activation function of the output layer is
purelin of (h2) described in Equation (6).
󰇛󰇜
(6)
The ANN is trained to find the best fitting value
of weights according to optimization algorithms.
In this paper, Levenberg–Marquardt (LM),
Bayesian Regularization (BR), and Scaled
Conjugate Gradient (SCG) are used to train the
proposed model for daily solar irradiance
prediction.
3 Proposed Methodology
As shown in Figure 2 the prediction methodology
is divided into several steps, in order to produce
the optimal model with the lowest possible error.
WSEAS TRANSACTIONS on POWER SYSTEMS
10.37394/232016.2022.17.14
Garybeh Mohammad, Alsmadi Othman
E-ISSN: 2224-350X
133
Volume 17, 2022
Figure 1: ANN General Architecture Diagram
Figure 2: Overall methodology flowchart
WSEAS TRANSACTIONS on POWER SYSTEMS
10.37394/232016.2022.17.14
Garybeh Mohammad, Alsmadi Othman
E-ISSN: 2224-350X
134
Volume 17, 2022
3.1 Datasets Collection
The data from the weather station located at the
Hashemite University, in Jordan, was used to
develop the present based model. The data was
about 2196 readings from 1/1/2021 to 31/12/2021,
which includes date, average wind speed of a day,
wind direction, maximum temperature, specific
humidity, and relative humidity. The location of
the university has a latitude of 32.102865 and a
longitude of 36.181057 with 566-meter altitude.
3.2 Normalization
The dataset for the proposed ANN model was pre-
identified as discussed in the previous section.
The selection data describe various values with
different ranges. Hence, it was required that the
data be normalized, as in Equation (7) (common
scale), to fit the presented ANN model. As a result
the input and output data sets were normalized to
the range between 1 and -1, as normally used for
the tan sigmoid activation function [15].
 

(7)
Where:
XN: normalized value.
XR: value to be normalized.
XMAX: maximum value among all values for
related variable.
XMIN: minimum value among all values for a
related variable.
3.3 ANN model Implementation
The proposed ANN model consists of three layers,
as shown below in Figure 3. The input layer
consists of the data previously featured, multi
hidden layers which connect the inputs, and the
output layer by specific weights were determined
to reach the result with minimal errors.
As mentioned in the previous section three
training algorithms were used to estimate the
output values utilizing the atmospheric data
obtained by the weather station. The present ANN
model was developed using MATLAB, version
R2020a and ANN fitting toolbox.
3.4 Training, Validation and testing
processes
The training process was iteratively performed, in
which the network was supplied with the training
datasets one by one, and the weight values were
modified each time. During this phase, the ANN
should have learnt to predict the proper output,
with the aim of generalizing the prediction to new
data sets. The process of evaluating the trained
model, using a testing dataset, was referred to as
model validation. In conjunction with model
training, the model was validated trying to
discover an ideal model with the best
performance. The data was divided into three
categories; training, validation, and testing
specified as 70%, 15%, and 15% respectively. The
testing dataset was a subset of the dataset that the
training dataset was produced from. The objective
of that was to see how well the trained model can
be generalized.
3.5 number of hidden layers
The Regression Factor (R), which describes the
relationship between the inputs and the outputs for
evaluating the model and calculating the optimal
number of neurons in the hidden layer. To
evaluate the model for predicting acceptable
outputs and to obtain minimum RMSE errors, the
number of hidden layers must be fit to the data
used to prevent overfitting and underfitting issues.
The optimal number of hidden layers is an
important issue that has to be considered. Two
approaches exist to find the optimal number of the
hidden layers, which can be classified as
constructive and pruning approaches. The
constructive method starts with under sizing the
number of layers and increasing that number each
time to get the fit number of hidden layers. On the
other hand, the pruning approach starts with
oversizing the number of layers and then
decreasing that to obtain the optimal number of
hidden layers[16].In this paper, the constructive
method was used to determine the number of
hidden layers for each training algorithms. Based
on the analysis shown in Figure 4, it was found
that the BR training algorithm provides the best
suboptimal value of the regression performance at
16 hidden layers.
WSEAS TRANSACTIONS on POWER SYSTEMS
10.37394/232016.2022.17.14
Garybeh Mohammad, Alsmadi Othman
E-ISSN: 2224-350X
135
Volume 17, 2022
Figure 3: Schematic diagram of the proposed model
Figure 4: The linear correlation coefficient value
for each training algorithm
4 Results
4.1 Data set selection
As known by now that the main objective of the
proposed ANN model was to predict the average
daily radiation values utilizing different measured
weather datasets, the input and output datasets
were collected from the Hashemite University, for
the period 01/01/2021 to 31/12/2021. The selected
datasets were trained and tested for the day,
excluding all night periods to avoid the zero-
radiation data in order to improve the result and
reach lower error rates. The proposed model was
designed using six input layers, as mentioned
earlier, and one output layer, which includes the
solar radiation according to the historical datasets.
The model was trained utilizing three
backpropagation algorithms Levenberg–
Marquardt (LM), Bayesian Regularization (BR),
and Scaled Conjugate Gradient (SCG) to
determine the most efficient model.
4.2 Model evalouation
Using the BR training algorithm, sixteen hidden
layers were found to represent the most efficient
model. The performance of this model was
evaluated using the mean absolute error (MAE)
and the root mean square error (RMSE) [17]. The
MAE and RMSE were expressed as follows in
equations.
MSE =

(8)
And
RMSE =
󰇛󰇜

(9)
where:
N: total amount of data.
0
0,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
NUMBER OF HIDDEN LAYER
Regression Performance
LevenbergMarquardt
Bayesian Regularization
WSEAS TRANSACTIONS on POWER SYSTEMS
10.37394/232016.2022.17.14
Garybeh Mohammad, Alsmadi Othman
E-ISSN: 2224-350X
136
Volume 17, 2022
Xi: average daily solar radiation from historical
data.
Yi: average daily solar radiation from the ANN
model.
To evaluate the proposed model, results of the
different training algorithms will be compared
based on the (MAE) and the (RMSE) at the
optimal hidden layers, which ensures obtaining
the highest linear regression factor (R). The
proposed ANN is presented as shown in Figure 5.
Figure 5: An overview of the proposed ANN
model.
Table 1 shows the correlation coefficient (R),
(MAE) and (RMSE) for the Levenberg–
Marquardt (LM), Bayesian Regularization (BR),
Scaled Conjugate Gradient (SCG) training
algorithms. In this table, it is shown that
depending on the magnitude of the mean absolute
error and root mean square error, the BR training
approach presents the most efficient model.
Therefore, the BR algorithm is considered as to
provide the lowest linear regression coefficient
factor compared with the LM and SCG algorithms
at 16 hidden layers. The best network
performance is obtained after 468 iterations.
Table 1 Performance of proposed ANN model for
each training algorithms at 16 hidden layers
Training
method
Correlation
Coefficient
(R)
MAE
RMSE
LM
0.9347
1.864
2.65
BR
0.9855
0.692
1.376
SCG
0.8422
2.94
3.89
The performance of the BR model expresses the
relationship between the observation values and
predicted values; as shown in Figures 6-8, by
comparing the results with all datasets. Thus, an
observed, the values produced by the proposed
model are almost identical to the previously
measured values. Therefore, the BR is more
efficient than the other algorithms.
The linear regression coefficient factor for the BR
model is (0.9855), whereas it is (0.93475) and
(0.84222) for the LM and SCG algorithms,
respectively. As shown in Figure 9, the correlation
coefficients for training and testing were found to
be (0.98922) and (0.96213), respectively, where
the R value above each plot represents the
coefficient of correlation.
Figure 6: Performance of the ANN SCG model
Figure 7: Performance of the ANN LM model
WSEAS TRANSACTIONS on POWER SYSTEMS
10.37394/232016.2022.17.14
Garybeh Mohammad, Alsmadi Othman
E-ISSN: 2224-350X
137
Volume 17, 2022
Figure 8: Performance of the ANN BR model
Figure 9: Regression plot for the BR model
The best training performance validation for the
BR model, as shown in Figure 10, occurs at epoch
163, as indicated by the vertical dash line. which
represents the process of training the neural
network with all training data for one cycle. As
shown both the training and testing curves have
comparable properties. The network is producing
best results according to the minimum MSE.
Hence, by increasing the number of epochs, the
MSE was reduced to a minimum by reaching
epoch 163.
Figure 10: Performance plot for the Bayesian
Regularization model
The histogram plot, as shown in Figure 11,
emphasizes the accuracy of the network
performance to evaluate the variance performance
(whether it is appropriately distributed equally
around zero), and explain the discrepancies
between the target and the predicted values after
training the neural network. As shown, most of
the data falls around the zero-error line, while the
maximum bars fall significantly lower to this.
Figure 11: Error histogram plot showing the target
and predicted error values
Table 2 represents a comparison of the published
studies on similar research using ANN and other
approaches. It is clearly seen that the proposed
model has the minimum MAE, RMSE, and Mean
Absolute Percentage Error (MAPE) in comparison
with other similar studies, and thus, the developed
model indeed provides superior predictions.
WSEAS TRANSACTIONS on POWER SYSTEMS
10.37394/232016.2022.17.14
Garybeh Mohammad, Alsmadi Othman
E-ISSN: 2224-350X
138
Volume 17, 2022
Table 2 Error comparison of similar studies
Model
MAE
RMSE
MAPE %
Sözen et al.
[18]
-
-
6.78
Koca et al.
[19]
-
5.26
-
Neelamegam
and Amirtham
[12]
-
-
4.24
Mohamed [20]
-
2.051
4.982
Notton et al.
[6]
2.41
3.21
Present model
0.692
1.376
1.01
5 Conclusion
This paper presents an ANN-based model
prediction for the daily solar radiation according
to historical data collected by a weather station
located at the Hashemite University (in Jordan)
for the period 01/01/2021 to 31/12/2021. The
proposed model was trained using three different
algorithms, Levenberg–Marquardt (LM),
Bayesian Regularization (BR), and Scaled
Conjugate Gradient (SCG). The selected data
were categorized into three classes: training,
validation, and testing for 70%, 15%, and 15%,
respectively. The number of hidden layers were
optimized according to the maximum linear
correlation coefficient (R) value. Accordingly, it
was concluded that the ANN trained by the BR
approach achieved the lowest MSE and RMSE
values. Meanwhile, the ANN trained by LM
attained low MSE and RMSE values, however
relatively larger compared to the BR. Whereas the
SCG-trained ANN had the highest error rates,
which was regarded as the weakest in terms of
forecasting when compared to the previous two
models.
References:
[1] A. Al-Helal, Solar Energy as an Alternative
Energy than the Conventional Means of
Electricity Generation in Iraq, Int. J. Inven.
Eng. Sci., no. 2, pp. 2319–9598, 2015.
[2] D. N. Sahlian and A. F. Popa, Does the
Increase in Renewable Energy Influence GDP
Growth? An EU-28 Analysis, Energies, vol.
14, 2021, doi: 10.3390/en14164762.
[3] A. M. Eltamaly, Y. Sayed Mohamed, A. H. M.
El-Sayed, M. A. Mohamed, and A. Nasr A.
Elghaffar, Power Quality and Reliability
Considerations of Photovoltaic Distributed
Generation, Technol. Econ. Smart Grids
Sustain. Energy, vol. 5, no. 1, 2020, doi:
10.1007/s40866-020-00096-2.
[4] J. F. Bermejo, J. F. G. Fernández, F. O. Polo,
and A. C. Márquez, A review of the use of
artificial neural network models for energy and
reliability prediction. A study of the solar PV,
hydraulic and wind energy sources, Appl. Sci.,
vol. 9, no. 9, 2019, doi: 10.3390/app9091844.
[5] G. Amarasinghe, An artificial neural network
for solar power generation forecasting using
weather parameters, no. January, 2019.
[6] G. Notton, C. Voyant, A. Fouilloy, J. L.
Duchaud, and M. L. Nivet, Some applications
of ANN to solar radiation estimation and
forecasting for energy applications, Appl. Sci.,
vol. 9, no. 1, 2019, doi: 10.3390/app9010209.
[7] D. Lee and K. Kim, Recurrent neural network-
based hourly prediction of photovoltaic power
output using meteorological information,
Energies, vol. 12, no. 2, 2019, doi:
10.3390/en12020215.
[8] K. R. Kumar and M. S. Kalavathi, Artificial
intelligence based forecast models for
predicting solar power generation, Mater.
Today Proc., vol. 5, no. 1, pp. 796–802, 2018,
doi: 10.1016/j.matpr.2017.11.149.
[9] J. Feng, W. Wang, and J. Li, An LM-BP neural
network approach to estimate monthly-mean
daily global solar radiation using MODIS
atmospheric products, Energies, vol. 11, no. 12,
pp. 1–14, 2018, doi: 10.3390/en11123510.
[10] T. Laopaiboon, W. Ongsakul, P. Panyainkaew,
and N. Sasidharan, Hour-Ahead Solar
Forecasting Program Using Back Propagation
Artificial Neural Network, Proc. Conf. Ind.
Commer. Use Energy, ICUE, vol. 2018-Octob,
no. 1, pp. 1–7, 2019, doi: 10.23919/ICUE-
GESD.2018.8635756.
[11] G. Vanderstar, P. Musilek, and A. Nassif, Solar
Forecasting Using Remote Solar Monitoring
Stations and Artificial Neural Networks, Can.
Conf. Electr. Comput. Eng., vol. 2018-May, pp.
1–4, 2018, doi:
10.1109/CCECE.2018.8447636.
[12] N. Premalatha and A. Valan Arasu, Prediction
of solar radiation for solar systems by using
ANN models with different back propagation
algorithms, J. Appl. Res. Technol., vol. 14, no.
3, pp. 206–214, 2016, doi:
10.1016/j.jart.2016.05.001.
WSEAS TRANSACTIONS on POWER SYSTEMS
10.37394/232016.2022.17.14
Garybeh Mohammad, Alsmadi Othman
E-ISSN: 2224-350X
139
Volume 17, 2022
[13] C. A. Mitrea, C. K. M. Lee, and Z. Wu, A
comparison between neural networks and
traditional forecasting methods: A case study,
Int. J. Eng. Bus. Manag., vol. 1, no. 2, pp. 19–
24, 2009, doi: 10.5772/6777.
[14] J. Zurada, Introduction to artificial neural
systems. 1992.
[15] O. Solmaz and M. Ozgoren, Prediction of
Hourly Solar Radiation in Six Provinces in
Turkey by Artificial Neural Networks, J.
Energy Eng., vol. 138, no. 4, pp. 194–204,
2012, doi: 10.1061/(asce)ey.1943-
7897.0000080.
[16] K. G. Sheela and S. N. Deepa, Review on
methods to fix number of hidden neurons in
neural networks, Math. Probl. Eng., vol. 2013,
2013, doi: 10.1155/2013/425740.
[17] W. Wang and Y. Lu, Analysis of the Mean
Absolute Error (MAE) and the Root Mean
Square Error (RMSE) in Assessing Rounding
Model, IOP Conf. Ser. Mater. Sci. Eng., vol.
324, no. 1, 2018, doi: 10.1088/1757-
899X/324/1/012049.
[18] A. Sözen, E. Arcaklioǧlu, M. Özalp, and N.
Çaǧlar, Forecasting based on neural network
approach of solar potential in Turkey, Renew.
Energy, vol. 30, no. 7, pp. 1075–1090, 2005,
doi: 10.1016/j.renene.2004.09.020.
[19] A. Koca, H. F. Oztop, Y. Varol, and G. O.
Koca, Estimation of solar radiation using
artificial neural networks with different input
parameters for Mediterranean region of
Anatolia in Turkey, Expert Syst. Appl., vol. 38,
no. 7, pp. 8756–8762, 2011, doi:
10.1016/j.eswa.2011.01.085.
[20] Z. E. Mohamed, Using the artificial neural
networks for prediction and validating solar
radiation, J. Egypt. Math. Soc., vol. 27, no. 1,
2019, doi: 10.1186/s42787-019-0043-8.
Creative Commons Attribution License 4.0
(Attribution 4.0 International, CC BY 4.0)
This article is published under the terms of the Creative
Commons Attribution License 4.0
https://creativecommons.org/licenses/by/4.0/deed.en_US
WSEAS TRANSACTIONS on POWER SYSTEMS
10.37394/232016.2022.17.14
Garybeh Mohammad, Alsmadi Othman
E-ISSN: 2224-350X
140
Volume 17, 2022