Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Solar Power Output Forecasting Using Artificial

Neural Network

Abdelkader El Kounni, Hassan Radoine, Hicham Mastouri, Hicham Bahi Abdelkader Outzourhit
School of Architecture, Planning & Design Cadi Ayyad University,
Mohammed VI Polytechnic University,Ben Guerir, Morocco Marrakesh, Morocco
Abdelkader.Elkounni@um6p.ma, Hassan.Radoine@um6p.ma aoutzour@uca.ma
Hicham.Mastouri@um6p.ma, Hicham.Bahi@um6p.ma

Abstract—The solar power generated by photovoltaic modules data. By this simulation, we are not only aiming to see the
depends on many parameters namely the solar radiation and the influence of external factors; our goal is to make the model
cell temperature as these variables affect the current and voltage learn the functioning modes of the power plant components
provided by the modules. In addition, cable loses, conversion
losses and cloud coverage can also affect the power output. In which includes the losses and the drops that will accrue during
this work, we propose to build a deep learning model that will operating hours.
implicitly take all these parameters into account and provide us
with a prediction of the output power generated by PV power II. C ASE OF STUDY
plants installed. The Artificial Neural Network used takes as an A. Description of the PV Power Plant
input the solar radiation, ambient temperature and modules’
temperature, and as target the solar power. The ANN model was The PV power plant is installed in a coastal region of Elkaria
trained in a first experiment to give an hourly prediction. The located between the cities of Safi and Essaouira. This region
second one provides an entire day forecast. The obtained results has an interesting irradiance level and an average annual wind
are very promising and the predicted output power profile is in
good agreement with the measured one. speed between 7 and 8 m/s [4]. The PV plant consists of
Index Terms—Solar power, Deep learning, Artificial neural 32 (Sunpower SPR-225-WHT) panels with mono-crystalline
network, Forecasting, Performance analysis silicon cells using the back contact technology. The peak
power and efficiency of each panel are respectively 225 Wp
I. I NTRODUCTION and 18.1 %. Some pertinent characteristics of the panel are
Morocco is increasingly relying on the existent natural summarized in Table 1[5].
resources to fulfill its energy demands by implementing re-
newable energy technologies and energy efficiency plans. The TABLE I. P ERTINENT PARAMETERS OF THE PV PANELS
main goal of the strategy adopted is to meet 52% of the M EASURED AT S TANDARD T EST C ONDITIONS (STC) [5].
installed capacity using renewable resources by the horizon of Solar cells 72 SunPower all back-contact monocrystalline
2030[1]. As a result of its geographic location, Morocco has
a significant solar potential; the mean annual solar radiation Efficiency 18.10%
reaches 2600 kW h/m2 /year [2]. This makes the country Peak power 225 W
very attractive for solar thermal and solar Photo voltaic Rated voltage 41 V
projects. It is well known that the power produced by these
technologies is highly influenced by weather variations. For Rated current 5.49 A
example, an increase in solar radiation can lead the power Open circuit voltage 48.5 V
to rise [3]. However, intense solar radiation can cause PV Short circuit current 5.87 A
modules overheating thus a drop in the output voltage and
the efficiency of the conversion. In this work, we will try to
forecast the power output of a power plant located in Morocco III. P OWER P LANT C ONFIGURATION
using an artificial neural network that takes on-site measured
parameters as inputs. The obtained results were then compared As Fig.1 shows, the off-grid power plant contains two
with the actual measured ones. In the first phase we built a generation units composed of 2 PV strings of 8 panels each,
regressive model for short term forecasts, then we extended connected to a 3.8 kW PV-inverter(Sunny Boy 3800, SMA,
the model to one-day full forecast based on the measured Germany). The two bidirectional inverters (Sunny Island) and
the battery bank are the grid forming unit. The Plane-of-array
solar radiation, ambient temperature and module temperature
are collected data used to train our model. In this case, the
modeling is describing the functioning of inverters used in
this power plant with no storage. More details about the power
plant can be found in the work of El Fathi et al [4].

Figure 2. Solar Radiation Histogram.

Figure 1. Power plant configuration.

IV. C OLLECTED DATA Figure 3. Ambient Temperature Histogram.


As reported the previous work[5] the data was collected in 5
minutes intervals. The recorded parameters include the output
power (Pac), voltage (Vac), current (Iac) of the inverter, the Where Tc is the cell(module) temperature, Ta is the ambient
voltage (Vpv) and current (Ipv) provided by the modules, the temperature, G is the instant solar radiation, and NOCT is the
solar radiation (global solar irradiance W/m2 ), ambient tem- nominal operating cell temperature[6]. As presented, the inputs
perature (°C),modules temperature (°C) and the wind speed have different ranges so a range normalization in required to
(m/s). This case of study is interested in building a predictive have them vary in the same domain. This will also serve to
model of the output power (Pac) based only on solar radiation reduce the size of the inputs and make the training process
intensity and both ambient and modules temperature, using the faster. Note that a logarithmic transformation was used on the
data collected during one month. The size of the data set is output to reduce its variations. Fig5,6 shows the correlation
3648 samples per parameter. between the input parameters (solar radiation Gint , ambient
temperature Tamb , modules temperature TM dl ) and the output
V. DATA R ANGES (power Pac ).
Using histogram plots on the data sets will help us to see the As we can see all the inputs exhibit an independent
abundance of the measured samples and the dominant values correlation with the target. Both the two temperature-power
in each observation. The resulting graphs reflects a clear idea correlations are very close to each other and share a profile
on the ranges of the measured values and the measurement similitude, the only difference resides in the slope as suggested
intervals.
As shown in Fig 2,3,4, our input variables exhibit a non-
normal distribution. Indeed, it can be observed that that we
have 900 irradiance samples that are ranging from 0 to 100
W/m2 and over 200 samples that are in the range from 900
to 1000 W/m2 . For the ambient temperature, the samples are
ranging from 20 to 25 °C. The temperature of the modules,
always greater than the ambient temperature during operating
hours, reaches 40 °C because of the conversion process and
the exposure to solar radiation. As usual, the temperature of
the modules is related to the ambient temperature and the
irradiation through equation (1):
G Figure 4. Modules Temperature Histogram.
Tc = Ta + (N OCT − 20◦ C) (1)
800
These configurations found to be compatible with the studied
phenomenon. Other training methods were previously used
such as conjugate gradient with Powell/Bealle Restarts, yet
the error was significantly larger.

A. Error Evaluation
By randomly dividing the DATA into 70% training, 15%
validation and 15% testing parts, we obtained the RMSE val-
ues for both validation and training sets. These two parameters
will help us to evaluate the fitness of the model.
As Fig.7 shows, if the RMSE of the training is greater than
the RMSE of the validation the ANN generates a model that
is under fitting the data. In other words, the model doesn’t
describe the relationship between the inputs and the target.
However,if the RMSE of the validation is greater than that
Figure 5. Target and inputs correlation before normalization.
of the training, the model tend to overfit. A model with
high variance will not interpolate well the data. The best
scenario is when both errors are low, then the algorithm yields
good prediction and interpolation of the given data. For a

Figure 6. Target-inputs correlation after normalization and


output log transformation.

Figure 7. RMSE of validation and training for one hidden layer


by equation (1). Interestingly, the correlation between the solar neural network.
and the delivered power is a quasi linear equation with and
a null intercept. The scatter (Fig 5) may be attributed to single layer neural network, we have calculated the RMSE
many factors such as conversion losses, cable losses, inverter to determine how many neurons we need in that model to
efficiency, and the energy management by the bidirectional get a good fit. The optimal number of neurons, as explained
inverter . before, is reached only when both training and validation
errors are low. A network with a high number of neurons
VI. M ETHODOLOGY
will end up being too complicated while a network with a
In our case study, we decided to test the fitness of the model lower count of neurons would be too simple to describe the
with two experiments: one in which the model is loaded with a studied phenomenon. As the number of hidden layers is raised
month worth of observations then the root mean square error is from one to two, the dimension of the RMSE increases from
calculated to evaluate the ANN performance. This experiment being a vector containing measurements of the error associated
is intended to give hourly prediction. Another experiment is with the numbers of neurons for one hidden layer to becoming
done by feeding the model with data collected over a day and an array containing in each element an associated error with
we train the model in different iterations. The model corre- a combination of neurons count in the first and the second
sponding to the minimum value of RMSE is preserved and hidden layers. To evaluate the fitness of the model in these
used to predict an entire day of production. hourly prediction. cases we plotted the RMSE of training as function of the
For the training specifications, we used Levenberg-Marquardt RMSE of the validation, as a result we obtain a number
back propagation as the performance ration was set to 0.5 of points that have as coordinates both errors. Subsequently,
with 1000 epochs, and the activation function(log-sigmoid). the euclidean norm was evaluated to determine the closest
couple to zero. By using this method, the smallest error
of both training and validation sets can be determined. The
index of one of these elements refers to the combination of
neurons that gave the smallest error value. Fig.8 shows the
plot obtained after training the model with one month data.
The values of the RMSE in this case where relatively large
as it was ranging from 270 to 700 W. This was caused by
loading the algorithm with one month worth of observations.
In this case, as stated before, some other factors need to be
taken into consideration such as the shading of the modules,
dust, energy management by the battery inverter.. etc. These
effects can be, and especially the energy management of the (a)
plant, clearly seen in days where the solar radiation is high
yet the production is low. This happens when the battery is
fully charged and the demand is lower than the production as
described in details in our previous works [elfathi]. The PV
inveter will reduce its output to meet the demand. Such effects
will be included in future models.

(b)

Figure 8. RMSE of validation and training for two hidden


layers neural network.
(c)
Even if the error of the training and validation in this
experiment was respectively 277 W and 273.2 W. During
the training, as Fig.9(a) maps, the ANN was trained using
2450 samples. In this phase, the results are showing a good
profile pattern resembling the actual values. The model gives
a good prediction of the power production over the day as
Fig.9 (b,c) below shows. As it can be clearly seen, 12 hours
of solar power forecasting has followed the same progression
as the observation for a short term forecast. The obtained
function was interpolating very well the target based only on
the inputs values. Note that the inputs given to the model in (d)
this cases where not introduced in the training/validation set
there completely new and still the ANN was able to follow the Figure 9. (a) Model fitness during the training/validation
measured values. Fig. 9 (d) shows how the forecasted values phase.(orange presents the model output, blue for the actual
are correlating with the observed values for both training and value) (b) Shows the predicted values against the observation
validation. If the error was smaller agreement would be much of the power (W). Blue line represent the output power
closer. observation over June and the orange line represent the output
of the model for 12 hours (c) it a zoom of the forecasted values
B. ANN Architecture in (d) the observed/forecasted correlation for both training (◦)
After training the model several times and for different data and validation (?).
sets the optimal combination found in our case of study is a
network with two hidden layers in the first layer we have 9
neurons and in the second layer we have 12 neurons. This
architecture (Fig.10 ) leads to a low value of error for both
training and validation stages as it goes down from 200 to 20
W as we will see in the next section.

Figure 11. 5 hours forecasting using ANN the orange line


represent the fit during the training and validation phase the
stars (?) represent the prediction given by the model based
only on exterior parameters.
Figure 10. Final obtained architecture with 3 inputs and one
output.

VII. R ESULTS
A. Short Term Forecast
In the first phases of ANN training, the modules measured
temperatures and solar radiation over a certain day (2) are used
as inputs. For example predicting 5 hours of production during
one day using 167 samples, then training the model with 70
samples of which 15 samples for validation and 15 samples
for testing. The model was familiar with 100 samples and
we kept 67 observations equivalent in time to 5 hours of PV
power production. These observations were used to evaluate
the accuracy of ANN during training and at the prediction
phase.
Pac = AN N (Gint , Tamb , Tmdl ) (2) Figure 12. Forecast/observation correlation for both training
As Fig.11 illustrates, the obtained neural network is yields a and validation for 5 hours prediction.
good fit to the targeted values as it interpolates the observed
values with an acceptable marge of RMSE around 20 W.
Also the predictions of the output were very similar to the depending on external parameters such as solar radiation and
actual measured values as they follows the same progression ambient temperature which affect the production. On the other
as the measured output. Fig.12 shows that both training and hand, the module temperature depends on these parameters as
validation sets were very close to the observations as all point well as the module’s characteristics and its operation point and
are very close to the identity line which indicates a good level mode. Using the measured PV output as a target, the model
of fitness. didn’t only learn about the influence of exterior parameters
but started to emulate the losses that are occurring in the
B. Full Day Forecasting power plant configuration with all specific details. Everything
To give a full day forecast of PV power production we that characterizes this configuration is embedded in a machine
decided to take the following approach:the model is trained learning algorithm even the notion of time was taken into
several time choosing a random day and then in each simu- consideration as the solar radiation and temperature vary with
lation the RMSE is evaluated. The trained ANN that has the time. The ANN has also retained this property and started to
lowest error for the given day is selected and used to forecast give completely similar profiles to the real case distribution.
progression of the PV power of a given day. The study con- A good proof of this is the following test in which we
cerned is a regression problem which justifies why the notion took two random days of observation; one was used to train
of time is barley mentioned; we decided to make the ANN the model and the other one used to check how good is
learn the patterns independently from time while strongly the forecast. As we can see in Fig.13, both days have no
similarities in the distribution of their factors. The variance of
the recorded temperature on the 25th of May was much higher
than that of the 18th of June and both temperature peaks were
in different periods. In addition, for the solar radiation there
is no direct link between the two profiles.

Figure 14. PV output forecasting over 18th of June in com-


parison with the measured values .
(a)

(b)
Figure 13. (a) A comparison between the measured values for
both ambient and module’s temperature during 25th of May
and 18th of June (b) Solar radiation comparison in both days.

The final obtained results were very promising as the ANN


Figure 15. Forecast/observation correlation for both training
was able to give a good estimation of the output power for the
and validation for one day.
18th of June as the measured error was very low. As Fig.14
shows, the algorithm was able to simulate the functionality
of the power plant during the same conditions recorded on
the same day. Again not only on short term prediction the based only on solar radiation and the measured temperatures,
ANN was performing well but also on one day period. Fig.15 the ANN learned the functioning modes of an entire plant
shows how the model was correlating during the training and that happened to be composed of many elements such as solar
validation phase as we can see that observations and forecasts panels, cables, protection, PV inverters, bidirectional inverters,
are very close to one another which indicates again suitability etc. Each element has its characteristics and its influence on
of our model. the power, but the model was able to take all these factors
VIII. C ONCLUSION implicitly through evaluating the output power as a target.
In this work we have built a regression model based on For future work, our goal is to optimize this model to
an Artificial Neural Network to forecast the output power reduce the marge of error even more by increasing the
provided by one of the existing small PV power plants in number of inputs to encompasses all the major reasonable
Morocco. The model was tested through different training factors responsible for production fluctuations.This will help
patterns and we were able to prove the accuracy of forecasting us study the behavior of power plants all over the country
by examining the output power provided by the algorithm in for different climatic conditions, different configurations and
short term forecast (5 hours) and also in forecasting an entire different technologies. Other section in this power plant were
day of production. The obtained results show that the error of not introduced in this work such as storage system as we were
the forecast was reduced as we went down from 200 W to only interested on one of the PV inverters outputs. Next work
20 W for both training and validation. We have shown that will include forecasting of stored energy and energy demand.
R EFERENCES
[1] Azeroual, Mohamed, et al. ”Renewable Energy Potential and Available
Capacity for Wind and Solar Power in Morocco Towards 2030.” Journal
of Engineering Science & Technology Review 11.1 (2018).
[2] El Mghouchi, Y., T. Ajzoul, and A. El Bouardi. ”Prediction of daily solar
radiation intensity by day of the year in twenty-four cities of Morocco.”
Renewable and Sustainable Energy Reviews 53 (2016): 823-831.
[3] Karafil, Akif, Harun Ozbay, and Metin Kesler. ”Temperature and solar
radiation effects on photovoltaic panel power.” Journal of New Results
in Science 5 (2016): 48-58.
[4] El Fathi, Amine, et al. ”Performance parameters of a standalone PV
plant.” Energy conversion and management 86 (2014): 490-495.
[5] Fathi, Amine Akhsassi, Mohamed Bennouna, Amin Outzourhit, Ab-
delkader. (2017). A Comparative Study of Two Models for Evaluating
the Power of Photovoltaic Modules in a Standalone Power Plant.
[6] Mohamed, Azah, and Tamer Khatib. ”Correlation for estimating solar
cell temperature based on a tropical field operation of a photovoltaic
system.” 2014 IEEE PES T&D Conference and Exposition. IEEE, 2014.
[7] Gensler, Andr´e, et al. ”Deep Learning for solar power forecasting—An
approach using AutoEncoder and LSTM Neural Networks.” 2016 IEEE
international conference on systems, man, and cybernetics (SMC). IEEE,
2016.
[8] Sun, Yuchi, Vignesh Venugopal, and Adam R. Brandt. ”Short-term solar
power forecast with deep learning: Exploring optimal input and output
configuration.” Solar Energy 188 (2019): 730-741.
[9] Konstantinou, Maria, Stefani Peratikou, and Alexandros G. Charalam-
bides. ”Solar Photovoltaic Forecasting of Power Output Using LSTM
Networks.” Atmosphere 12.1 (2021): 124.
[10] Dairi, Abdelkader, et al. ”Short-term forecasting of photovoltaic solar
power production using variational auto-encoder driven deep learning
approach.” Applied Sciences 10.23 (2020): 8400.
[11] Luo, Xing, Dongxiao Zhang, and Xu Zhu. ”Deep learning based
forecasting of photovoltaic power generation by incorporating domain
knowledge.” Energy 225 (2021): 120240.

You might also like