0% found this document useful (0 votes)
48 views9 pages

1 s2.0 S2352484723011228 Main

This study compares six machine learning algorithms for forecasting solar energy production from a solar power plant in Morocco: support vector regression, artificial neural network, decision tree, random forest, generalized additive model, and extreme gradient boosting. The artificial neural network model achieved the best performance according to the evaluation metrics of root mean squared error, mean absolute error, mean absolute scaled error, and R-squared.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views9 pages

1 s2.0 S2352484723011228 Main

This study compares six machine learning algorithms for forecasting solar energy production from a solar power plant in Morocco: support vector regression, artificial neural network, decision tree, random forest, generalized additive model, and extreme gradient boosting. The artificial neural network model achieved the best performance according to the evaluation metrics of root mean squared error, mean absolute error, mean absolute scaled error, and R-squared.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Energy Reports 10 (2023) 1004–1012

Contents lists available at ScienceDirect

Energy Reports
journal homepage: www.elsevier.com/locate/egyr

Research paper

Forecasting solar energy production: A comparative study of machine


learning algorithms

Younes Ledmaoui a , , Adila El Maghraoui b , Mohamed El Aroussi a , Rachid Saadane a ,
Ahmed Chebak b , Abdellah Chehri c
a
Laboratory Engineering system-SIRC-(LaGeS), Hassania School of Public Works (EHTP), Casablanca, 8108, Morocco
b
Green Tech Institute (GTI), Mohammed VI Polytechnic University (UM6P), Benguerir, 43150, Morocco
c
Department of Mathematics and Computer Science, Royal Military College of Canada, Kingston, ON K7K 7B4, Canada

article info a b s t r a c t

Article history: The use of solar energy has been rapidly expanding as a clean and renewable energy source,
Received 12 March 2023 with the installation of photovoltaic panels on homes, businesses, and large-scale solar farms. The
Received in revised form 30 June 2023 increasing demand for sustainable energy sources has pushed the growth of the solar industry,
Accepted 22 July 2023
as well as advancements in technology, making solar panels more efficient and cost-effective. The
Available online 4 August 2023
implementation of solar energy not only reduces our reliance on non-renewable fossil fuels but also
Keywords: helps to mitigate the effects of climate change by reducing carbon emissions. This paper presents a
Solar energy complete and comparative study of solar energy production forecasting in Morocco using six machine
Machine learning learning (ML) algorithms : Support Vector Regression (SVR), Artificial Neural Network (ANN), Decision
Energy forecasting Tree (DT), Random Forest (RF), Generalized Additive Model (GAM) and Extreme Gradient Boosting
Energy production (XGBOOST), based on Solar Power Plant daily data installed in Benguerir city of Morocco between
January and December 2022. The models were trained, tested, and then evaluated. In order to assess
the models performance four metrics were used in this study, namely root mean squared error (RMSE),
mean absolute error (MAE), mean absolute scaled error (MASE)and R-squared (R2 ). The performance
of the models reveals ANN to be the most effective predictive model for energy forecasting in similar
cases with the lowest value of RMSE, MSAE and the highest value of R-squared, which are accepted as
one of the most important performance criteria by the ANN model. The findings of this study not only
validate the effectiveness of the ANN algorithm but also offer the appropriate parameters for achieving
the best results in predicting solar energy production. By identifying the optimal configuration of the
ANN algorithm, we provide valuable insights that can be directly applied in real-world applications,
thereby enhancing the optimization of solar energy systems and contributing to a sustainable future,
particularly the integration of these results in an edge device for the predictive maintenance of
photovoltaic power plants.
© 2023 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND
license (http://creativecommons.org/licenses/by-nc-nd/4.0/).

1. Introduction a process called solar thermal. It is considered a clean energy


source as it does not produce greenhouse gas emissions or other
Solar energy is energy generated from the sun through solar pollutants during the generation of electricity. Solar energy has
panels, which convert the sun’s energy into electricity. This is a become one of the most demanded sources of energy, in fact,
form of renewable energy, as the sun is a virtually limitless source several sectors use solar energy, such as domestic, industrial, and
of power. Photovoltaic systems (PV) are used to convert solar commercial applications. Furthermore, sustainable energy is a key
radiation into electrical power that could be used as a source of source of preserving the environment. Predicting solar energy
electricity to drive electrical loads, they can be used for a wide manually involves traditional methods that rely on manual calcu-
range of applications, including powering homes and businesses lations, empirical formulas, and simplified assumptions based on
and can be stored in batteries for use when the sun is not historical data and meteorological parameters. These approaches
shining. Additionally, solar energy can also be used to heat water often require significant human effort and expertise to analyze
and generate steam, to power turbines, to generate electricity in and interpret the data, which can be time-consuming and prone
to errors. Manual prediction methods may struggle to capture the
∗ Corresponding author. complex relationships inherent in solar energy production, lead-
E-mail address: [email protected] (Y. Ledmaoui). ing to less accurate forecasts (Lucchi et al., 2023; Lucchi, 2023).

https://doi.org/10.1016/j.egyr.2023.07.042
2352-4847/© 2023 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-
nc-nd/4.0/).
Y. Ledmaoui, A. El Maghraoui, M. El Aroussi et al. Energy Reports 10 (2023) 1004–1012

such as Artificial Neural Networks (ANN) and Time series Models


Nomenclature can be used for the prediction of solar energy production (Ven-
nila et al., 2022), or deep learning to explore the effectiveness,
List of Abbreviations efficiency, and application of solar energy potential (Wang et al.,
2019). These models are trained on historical data and can pro-
3D : Three-Dimensional
vide more accurate predictions in comparison to other methods.
AC : Alternating Current
The aim of this work is to establish a comprehensive study of
ANN : Artificial Neural Network
forecasting the energy production of solar panels, Hence we will
DIF : Diffuse Horizontal Irradiation train, test, and compare six well-known ML models and evaluate
DNI : Direct Normal Irradiation their performance to conclude which one of them is suitable for
DT : Decision Tree predicting the energy in similar scenarios. This paper is organized
ELE : Elevation into four sections. In the first section, we present the related
GAM : Generalized Additive Model works to this topic. The second section gives the simulation steps
GHI : Global Horizontal Irradiation using Global Solar Atlas Website (GSA), and we validate the study
GMT : Greenwich Mean Time with the real data supervised from the inverter. In the third
GSA : Global Solar Atlas section, we shed light on the results of the comparison of the six
algorithms used, and the last section provides a conclusion with
GTI : Global Tilted Irradiation at optimum
projection of future perspectives.
angle
IoT : Internet of Things
2. Related works
KW : Kilowatt
KWh : Kilowatt hours Time series forecasting has been the subject of several studies,
MAE : Mean Absolute Error and many successful applications and methods have shown its
MASE : Mean Absolute Scaled Error value in fields like forecasting solar energy based on Random For-
ML : Machine Learning est Regressor Model. Alaraj et al. (2021), construct the proposed
MWh : Megawatt hours method using MATLAB software in the Simulink environment,
NumPy : Numerical Python based on the Decision Tree model with Meteorological Parame-
OPTA : Optimum Tilt of PV modules ters. Aler et al. (2015) looked at Support Vector Regression (SVR)
P .M : Post Meridiem and Gradient Boosted Regression (GBR) using Numerical Weather
Models to predict Energy production. The effectiveness of 68
PC : Power Consumption
ML algorithms was assessed by Yagli et al. (2019) for three sky
PU : Power Unit panel
conditions, seven locations, and six different climate zones. For
PV : Photovoltaic a fair comparison, all algorithms were implemented without any
R2 : R-Squared alterations. In their work, El Maghraoui et al. (2022) looked at
RF : Random Forest using machine learning algorithms to predict energy consump-
RMSE : Root Mean Squared Error tion in open-pit mines. The study compares the performance
SciPy : Scientific Python of four ML algorithms, Artificial Neural Network (ANN), Support
Sklearn : Scikit-learn Vector Regression (SVR), Decision Tree (DT), and Random Forest
SMA : System Mess and Anlagentechnik (RF). The models were evaluated and the results showed that the
SVR : Support Vector Regression Random Forest algorithm was the most effective model for energy
forecasting in this particular case. In another study conducted
TEMP : Temperature
in the same context (Maghraoui et al., 2022), the authors aim
XGBOOST : Extreme Gradient Boosting
to provide different machine learning algorithms for predicting
the electrical energy consumption of hotel buildings, using a case
study of a hotel in Shanghai. The algorithms studied include
Support Vector Machine (SVM), Artificial Neural Network (ANN),
On the other hand, the utilization of machine learning algorithms
Decision Tree (DT), and Random Forest (RF). The study compares
revolutionizes solar energy prediction by leveraging advanced
these algorithms and finds the best-fit one. These algorithms
computational techniques. Machine learning algorithms can auto-
can be used in simulation software or by energy managers to
matically learn and adapt from large volumes of data, identifying
estimate energy consumption and costs, helping to find better
patterns, trends, and complex relationships that may not be ap-
parent to human analysts. By training on historical solar energy solutions for reducing energy usage and integrating Distributed
production data along with relevant meteorological variables, Energy Resources (DER). In one of their studies (Laayati et al.,
these algorithms can uncover hidden insights and improve the 2022) focus on the use of machine learning for predicting energy
accuracy of predictions. Machine learning models are capable of consumption in open-pit mines and improving the energy effi-
capturing dynamic interactions between variables, and adjusting ciency in the industry. The design of a monitoring and peak load
to changing conditions, resulting in more precise and reliable forecasting system was proposed and tested in an experimental
solar energy forecasts. The application of machine learning algo- open-pit mine, with the aim of minimizing energy consumption,
rithms in solar energy prediction offers several advantages over improving the industry’s efficiency, and easing decision-making
manual methods, including enhanced accuracy, scalability, and for maintenance and energy managers. The study includes the de-
efficiency. By harnessing the power of automated data analysis sign of a hardware, software, and data processing infrastructure,
and pattern recognition, machine learning algorithms can unlock with the use of artificial intelligence to give insights into energy
the full potential of solar energy forecasting, enabling better consumption and electrical grid quality. With the extension of
resource management, optimal system sizing, and improved inte- solar energy use in different domains, authors in paper Ledmaoui
gration of solar energy into the grid. Nevertheless, Predicting solar et al. (2022) present the design and modeling of a 7.4 kW AC-
energy production is a complex task involving considering vari- type solar charging station for electric vehicles in a public area in
ous factors such as weather conditions. Machine learning models Paris, France. The design includes an analysis of the solar resource
1005
Y. Ledmaoui, A. El Maghraoui, M. El Aroussi et al. Energy Reports 10 (2023) 1004–1012

Fig. 1. Configuration of the solar system.

at the location, the selection of components using simulation Table 1


software, and the development of a data logger to monitor energy Meteorological data of the site.

production. The data is stored in a cloud and displayed on a Direct normal DNI 5.821
irradiation KWh/m2 /Day
web interface. The final design is created using blender software.
Global horizontal GHI 5.530
The aim is to reduce reliance on fossil fuels and combat climate
irradiation KWh/m2 /Day
change by promoting the use of solar power and electric ve-
Diffuse horizontal DIF 1.907
hicles. The evaluation of various edge-based anomaly detection
irradiation KWh/m2 /Day
system implementations was described by authors in paper Sajun
Global tilted GTI 6.278
et al. (2022) based on the ANN algorithm, besides, authors in
irradiation at KWh/m2 /Day
paper Janarthanan et al. (2021) focus on the ANN and type 2 fuzzy optimum angle
logic system to detect the anomaly of the PV. In this context, Optimum tilt of OPTA 31/180
not too many papers have treated solar energy forecasting with PV modules
monitoring of energy production and simulation. Our work pro- Air temperature TEMP 18.9 ◦ C
vides a solution to this issue using theoretical methodology with
Terrain elevation ELE 464 m
simulation to evaluate the obtained results.

3. Materials and methods


Pc is the total power generated by the plant in Kw and Pu is
3.1. Required power and energy output the nominal power for one module in KW. So the site will need
56 photovoltaic panels of 430 Wp, the current and voltage at
The first step of this study is to determine, by simulation, the maximum power point are respectively 11.82 A and 38.03 V.
the energy to be produced in the site located in the geograph- Thus, the power of the real photovoltaic generator is 24,080 Wp.
ical coordinates 32◦ 14′ 23", -007◦ 56′ 52", and the elevation is Table 1 represents the meteorological data of the site.
464 m, the tool used to do this simulation is a free website
which is Global Solar Atlas (GSA). The On-Grid system is sized
to reduce the energy bill of an agricultural facility, Fig. 1 shows 3.3. Installation and monitoring of energy from the inverter
the configuration of the described system.
After installing our system and monitoring the daily produc-
3.2. Calculation of PV modules tion for one year from 01/01/2022 until 31/12/2022, we were able
to acquire a database of our site that contains the daily energy
The number of panels to be installed on the site is calculated
(KWh), total energy (MWh), irradiation (KWh/m2 /day) and the
based on the following equation (Ledmaoui et al., 2023; Luo,
temperature (◦ C). The monitoring takes place every day at 1 p.m
2011):
GMT, the time of maximum sunshine in the region. Fig. 2 shows
N = Pc /Pu (1) a 3D design of our installation using Sketchup software.
1006
Y. Ledmaoui, A. El Maghraoui, M. El Aroussi et al. Energy Reports 10 (2023) 1004–1012

Fig. 2. 3D design of the installation.

includes data mining and data analysis tools that are easy to
use and effective based on Matplotlib, SciPy, and NumPy. This
tool is a popular Python machine-learning library that can be
used for predictive maintenance as well as solar panel production
forecasting.

3.4.3. GridSearchCV
GridSearchCV is a feature of the Scikit-learn library in Python
to find the best hyper-parameters for a machine learning model
(Brownlee, 2022; Shirzadi et al., 2021). Hyper-parameters are
tuning parameters that can be adjusted to optimize the perfor-
mance of a model. GridSearchCV proposes each hyper-parameter
combination using cross-validation and returns the
hyper-parameter combination that produces the best perfor-
mance on the validation data. for our work, we used this tool to
find the optimal parameters giving the best prediction results
Fig. 3. Energy Production on the Studied Site in 2022.
3.4.4. Artificial neural network
Artificial neural networks (ANNs) are comprised of a node
layers, containing an input layer, one or more hidden layers,
3.4. Energy production forecasting
and an output layer. Each node, or artificial neuron, connects
to another and has an associated weight and threshold. If the
An outline of the suggested approach is provided below. After output of any individual node is above the specified threshold
monitoring the solar site data from the inverter, the acquired value, that node is activated, sending data to the next layer of
dataset was cleaned from corrupted and missing values. Then the network. Otherwise, no data is passed along to the next layer
we split our main dataset into training, testing, and validation of the network. They rely on training data to learn and improve
sets. The scikit-learn library was used to run the datasets through their accuracy over time (Uhrig, 1995).
six machine-learning algorithms (SVR, ANN, DT, GAM, RF, and
XGboost). The predicted energy was evaluated and assessed based 3.4.5. Extreme gradient boosting
on four metrics: Root mean squared error (RMSE), mean absolute XGBoost is a distributed gradient-boosting library that has
error (MAE), mean absolute scaled error (MASE) and R-squared been developed to be very effective, adaptable, and portable. It
(R2 ). The following sections describe the dataset and the different uses the Gradient Boosting framework to implement machine
ML models that were leveraged in this study. learning algorithms. It offers a parallel tree boosting to quickly
and accurately address a variety of data science challenges. Gradient-
3.4.1. Data description boosted decision trees (GBDT) have an extension called XGBoost,
The SMA inverter provides monitoring of the daily energy which was created specifically to increase speed and effective-
generation from the solar panels. In order to supervise the tem- ness. XGBoost algorithm was deployed to successfully predict
perature and the irradiance we used a data logger. The data of solar power with minimal error (Cai et al., 2020; Obiora et al.,
these two parameters are used to train the algorithms of machine 2021; Sauer et al., 2022; Fan et al., 2022), the studies results
learning used in this study. Fig. 3 depicts the energy production showed that the XGBoost algorithm outperformed other machine
behavior during 1 year based on the data collected from the SMA learning techniques.
inverter.
3.4.6. Support vector regression
3.4.2. Scikit-learn Support Vector Regression (SVR) is a supervised machine
Scikit-learn is a well-known Python package for machine learning algorithm used for regression problems, in this con-
learning (Sklearn). It offers a variety of tools for data analysis and text (Sharifzadeh et al., 2019; Wang, 2022). The objective of
machine learning methods, including, among others, dimensional the SVR algorithm is to find a hyperplane in an N-dimensional
reduction, clustering, regression, and classification. Scikit-learn space that distinctly classifies the data points. The dimension of
1007
Y. Ledmaoui, A. El Maghraoui, M. El Aroussi et al. Energy Reports 10 (2023) 1004–1012

the hyperplane depends upon the number of features. In our 3.4.12. Mean absolute scaled error
study, we have two features: irradiation and temperature, so The MASE is a statistic metric to evaluate the accuracy of a
the hyperplane is just a line. The study Ahmad et al. (2018) forecasting model. It measures the mean absolute error of the
demonstrates the effectiveness of support vector regression for forecasts relative to the mean absolute error of a naive forecast,
predicting solar thermal energy production, and highlights the which is typically based on a simple method like the historical
importance of selecting the appropriate input features and hyper- average. A lower value is generally considered better because
parameters to obtain the best performance. The findings of this a lower MSAE indicates that the forecasting model has lower
study can be useful for improving the accuracy of solar thermal average absolute errors compared to the baseline or reference
energy production forecasting models. forecast. It suggests that the model’s predictions are closer to the
actual values, reflecting higher accuracy. It is expressed as a ratio
determined by the subsequent formula:
3.4.7. Generalized additive model n
A Generalized Additive Model (GAM) is a statistical model 1 ∑ y − ŷ
MASE = · | | (4)
that expands on the idea of linear regression by allowing for n MAE
i=1
non-linear connections between the response variable and the
predictor variables. When the relationship between the response 3.4.13. R-Squared
and predictors is complex and cannot be fully described by linear R2 is a metric that represents the effectiveness of fit of a
models, GAMs are very helpful. It can be used for solar energy regression model. The optimal value for r-square is 1, so the
production forecasting (Matsumoto and Yamada, 2021). In a GAM, better the model is fitted, the closer the value of r-square to 1.
the response variable is described as the sum of smooth functions ∑
(y − ŷ)2
2
of the predictor variables, with each smooth function denoting a R =1− ∑ (5)
(y − y′ )2
non-linear connection. Splines, which are adaptable curve-fitting
algorithms, are frequently used to depict the smooth functions. ŷ is the predicted value of y while y′ is the mean value of y.
Additionally, the model has elements for handling linear terms,
categorical variables, and interaction effects. 3.4.14. Internet of Things
The Internet of Things (IoT) plays a significant role in enabling
smarter and more efficient solar energy systems. By integrating
3.4.8. Random forest
IoT technologies with solar energy infrastructure, various devices,
Random Forest is a powerful and versatile supervised machine and components can communicate and exchange data, leading to
learning algorithm that grows and combines multiple decision enhanced monitoring, control, and optimization of solar energy
trees to create a ‘‘forest’’. It can be used for both classification and generation and consumption (Ledmaoui et al., 2022; Bhau et al.,
regression problems (Fan et al., 2022). The results of the study Liu 2023; Liu and Sun, 2019). IoT-enabled sensors can be deployed
and Sun (2019), Chahboun and Maaroufi (2021) showed that in solar panels, inverters, and other components to collect real-
random forest outperformed other machine learning techniques time data on factors such as solar irradiance, panel temperature,
in predicting solar energy production. The authors also found and energy production. This data can be transmitted and ana-
that the accuracy of the models improved when additional input lyzed in real-time, allowing for proactive maintenance, early fault
features, such as the solar irradiance and the temperature, were detection, and improved system performance. Furthermore, IoT
included in the model, It grows multiple decision trees which are devices can facilitate the integration of solar energy systems with
merged together for a more accurate prediction. other smart devices and grids. For instance, by connecting solar
panels to smart home systems, homeowners can monitor their
energy production and consumption, optimize energy usage, and
3.4.9. Performance indicators
even sell excess energy back to the grid. Additionally, IoT-based
The effectiveness of trained ML models is based on hold- communication between solar farms and utility companies en-
out data by analyzing the discrepancy between predicted and ables better grid management, load balancing, and integration of
observed labels using a variety of measures. The prediction per- renewable energy sources into the existing power infrastructure.
formance of the suggested model is deducted from the following
indicators: Root mean squared error (RMSE), mean absolute error 4. Results
(MAE), Mean absolute scaled error (MASE) and R-squared (R2 ).
This study was designed to determine the optimum SVR, ANN,
3.4.10. Root mean square error RF, DT, GAM and XGBOOST models for energy generation in
similar situations using data collected from 24 KWc solar plants
Root Mean Square Error (RMSE) is a standard way to measure
during one year. The ANN model gave the best results among
the error of a model in predicting quantitative data (Mulani,
the six models, with the best values for all assessment mea-
2020). Formally it is defined as follows:
sures, based on visualizations, and performance metrics. The six
models’ performance metrics RMSE, MAE, MASE and R2 are sum-

 n
1 ∑
RMSE = √ · (ŷ − y)2 (2) marized in Table 2 and Fig. 4. The best energy performance
n forecasting is obtained by the Artificial Neural Network algorithm,
i=1
followed by the XGboost algorithm. GridSearchCV is a crucial
tool for choosing a machine learning model since it makes it
3.4.11. Mean absolute error easy to quickly compare the hyper-parameters of many mod-
Mean absolute error is a metric that gives the mean of the els. Table 3 presents the hyper-parameters for each algorithm
absolute difference between model prediction and target value. obtained through GridSearchCV. These parameters were imple-
The MAE is determined by using the following formula: mented using the Scikit-learn library, a widely used machine
n learning framework in Python. The table includes several key
1 ∑ parameters that are essential for configuring and training the
MAE = · |y − ŷ| (3)
n models. The results obtained allow us to validate that the ANN
i=1

1008
Y. Ledmaoui, A. El Maghraoui, M. El Aroussi et al. Energy Reports 10 (2023) 1004–1012

Table 2 Table 3
Performance results. Summary of the hyper-parameters for the six algorithms.
Model Metric Validation set Model Hyper-parameter Value
SVR RMSE 179.094 SVR Kernel Rbf
MAE 8.825 Gamma Auto
MASE 0.427 Degree 3
R2 0.496 C 10
Epsilon 0.2
ANN RMSE 2.6e−08
MAE 0.00013 ANN Activation Identity
MASE 0.29 Alpha 1e−5
R2 0.99 Hidden-layer-size 100
Learning-rate adaptive
DT RMSE 185.199
Solver Lbfgs
MAE 9.93
validation-fraction 0.1
MASE 0.478
Max-iteration 1000
R2 0.479
DT Criterion Friedman-mse
RF RMSE 168.87
Max-depth 10
MAE 9.17
Min-samples-leaf 1
MASE 0.449
Min-samples-split 5
R2 0.525
Splitter Random
XGBOOST RMSE 167.26
RF Criterion Squared-error
MAE 9.27
Max-depth 70
MASE 0.448
Max-features Auto
R2 0.529
Min-samples-split 10
GAM RMSE 368.37 n-estimators 400
MAE 16.22
XGBOOST Objective Reg:Linear
MASE 0.78
Learning-rate 0.05
R2 0.03
Max-depth 7
Min-child-weight 4
n-estimators 100
GAM n-splines 10
algorithm may be the most suitable for solar power plants in Lam 0.6
these regions of North Africa, with the optimal parameters ob- Tol 1e−6
tained from the GridSearchCV function: activation: ‘‘identity’’, Max-iteration 100
alpha: 1e-05, hidden-layer-sizes: 100, learning-rate: ‘‘adaptive’’,
max-iteration: 1000, solver: ‘‘lbfgs’’, validation-fraction: 0.1.
As a hint to future work perspectives, an interesting direction
would be to extend the application of the proposed model to
forecast solar energy production by incorporating a connected
IoT-based device that communicates with the cloud. This would
enable the prediction of key parameters that influence solar
energy production, providing valuable insights for optimizing
energy generation. Furthermore, the developed model can be
implemented in an Edge Device, as depicted in Fig. 5, to de-
tect anomalies in solar power plants with real-time monitoring
and analysis, enabling the development of an alert system for
predictive maintenance. This system would proactively identify
potential issues or malfunctions in the solar power plants, al-
lowing for timely intervention and maintenance activities. Such
an approach would not only enhance the overall performance
and reliability of the solar energy systems but also contribute
to minimizing downtime and maximizing energy production.
Fig. 4. Ranking of the six algorithms.
The implementation of this edge-based anomaly detection and
predictive maintenance system brings several notable benefits:

• Lower expenses for component repair and replacement 5. Discussion


• Decreased revenue loss from downtime
• Dedicated Maintenance operation work The findings of this study highlight the superiority of the Ar-
• Improved inventory control tificial Neural Network (ANN) model for energy generation fore-
• Improved life-cycle management. casting in a 24 KWc solar plant. The ANN model demonstrated the
• Enhanced safety and reliability. best results across various assessment measures, visualizations,
• Improved sustainable operations. and performance metrics compared to Support Vector Regres-
• Improved asset management. sion (SVR), Random Forest (RF), Decision Tree (DT), and XGBoost
models. The research heavily relied on the data collected from
Fig. 6 illustrates the prediction results of the energy produc- the 24 KWc solar plant over a one-year period. The performance
tion by the solar site of each algorithm. Performance for the ANN and accuracy of the models were evaluated based on this spe-
model confirms the studies (Rahman et al., 2021; Abuella and cific dataset. The optimal parameters for the ANN model were
Chowdhury, 2015; Al-Dahidi et al., 2019; Dumitru et al., 2016; determined using the GridSearchCV function, which was specif-
Vennila et al., 2022; Du et al., 2022; Geetha et al., 2022). ically applied to the collected data. Therefore, the findings and
1009
Y. Ledmaoui, A. El Maghraoui, M. El Aroussi et al. Energy Reports 10 (2023) 1004–1012

Fig. 5. Proposed system architecture.

conclusions drawn from this research are primarily influenced need for accurate energy production forecasting and monitoring
by the characteristics and patterns observed in this particular in a solar installation of 24 KWc. Through the utilization of ma-
dataset. When it comes to applying the methodology to other chine learning algorithms, including SVR, ANN, DT, RF, GAM and
situations with different datasets, certain considerations should XGBoost, we evaluated their performance in predicting energy
be taken into account. The effectiveness of the developed research production. Based on our analysis, the ANN algorithm emerged
methodology may depend on the similarity of the new datasets as the most accurate model for energy predictions in our specific
to the one used in this study. If the new datasets exhibit similar scenario. These findings have significant implications for energy
patterns and characteristics as the original dataset, it is likely producers and stakeholders. By implementing the ANN algo-
that the developed methodology can be easily applied and yield rithm for forecasting solar energy production, operators can make
reliable results. However, if the datasets differ significantly in informed decisions regarding resource allocation and optimize
terms of solar plant configurations, environmental conditions, or energy utilization. The high accuracy of the ANN model enhances
other relevant factors, the methodology may need to be adjusted the ability to plan for energy demand, reducing waste and re-
or fine-tuned. It is important to note that the performance and liance on non-renewable sources. Furthermore, our study high-
accuracy of machine learning models are highly dependent on the lights the importance of real-time monitoring using specialized
quality and representativeness of the data used for training and sensors. Monitoring solar panel performance, irradiation levels,
testing. Therefore, if the new datasets differ significantly from the and temperature enables prompt identification of potential is-
original dataset, additional data collection, preprocessing, feature sues or inefficiencies. This information can guide decision-making
engineering, or model adaptation may be necessary to achieve processes, such as scheduling maintenance activities and im-
reliable results. This study takes into account two crucial parame- proving overall system performance. Moving forward, our future
work aims to integrate the ANN algorithm into an edge device
ters: temperature and irradiance. Temperature plays a significant
IoT-based solution. This integration will enable continuous moni-
role in solar energy production as it affects the performance
toring of plant performance and facilitate predictive maintenance.
and efficiency of photovoltaic panels. Higher temperatures can
By leveraging the power of edge computing, we can enhance
lead to decreased panel efficiency and, consequently, reduced
the efficiency and reliability of solar energy production while
energy generation. On the other hand, irradiance refers to the
minimizing downtime. In conclusion, our study demonstrates the
amount of solar radiation received by the panels and directly
significance of accurate energy production forecasting and real-
impacts the energy output In summary, while the findings of this
time monitoring in maximizing the potential of solar energy.
research are based on the data collected from a specific solar
The adoption of the ANN algorithm and the implementation of
plant, the methodology used can provide valuable insights and
monitoring systems can lead to optimized energy utilization, re-
serve as a foundation for similar studies in situations where the duced reliance on non-renewable sources, and a more sustainable
datasets share similar characteristics with both temperature and energy future.
irradiance factors. However, careful consideration and potential
modifications are required when applying the methodology to CRediT authorship contribution statement
new situations with different datasets.
Younes Ledmaoui: Conceptualization, Methodology, Data cu-
6. Conclusion ration, Software, Writing – original draft. Adila El Maghraoui:
Writing – review & editing. Mohamed El Aroussi: Supervision,
The forecasting and monitoring of solar energy production Project administration. Rachid Saadane: Validation, Formal anal-
play a crucial role in maximizing the efficient use of this re- ysis. Ahmed Chebak: Resources, Funding acquisition. Abdellah
newable energy source. In this study, we aimed to address the Chehri: Visualization, Investigation.
1010
Y. Ledmaoui, A. El Maghraoui, M. El Aroussi et al. Energy Reports 10 (2023) 1004–1012

Fig. 6. Forecasting solar energy production results.

Declaration of competing interest Alaraj, M., Kumar, A., Alsaidan, I., Rizwan, M., Jamil, M., 2021. Energy pro-
duction forecasting from solar photovoltaic plants based on meteorological
parameters for qassim region, Saudi Arabia. IEEE Access 9, 83241–83251.
The authors declare that they have no known competing finan-
http://dx.doi.org/10.1109/ACCESS.2021.3087345, Conference Name: IEEE
cial interests or personal relationships that could have appeared Access.
to influence the work reported in this paper. Aler, R., Martín, R., Valls, J.M., Galván, I.M., 2015. A study of machine learn-
ing techniques for daily solar energy forecasting using numerical weather
Data availability models. In: Camacho, D., Braubach, L., Venticinque, S., Badica, C. (Eds.), Intel-
ligent Distributed Computing VIII. In: Studies in Computational Intelligence,
Springer International Publishing, Cham, pp. 269–278. http://dx.doi.org/10.
Data will be made available on request. 1007/978-3-319-10422-5_29.
Bhau, G.V., Deshmukh, R.G., kumar, T.R., Chowdhury, S., Sesharao, Y., Abilmazhi-
References nov, Y., 2023. IoT based solar energy monitoring system. Mater. Today Proc.
80, 3697–3701. http://dx.doi.org/10.1016/j.matpr.2021.07.364, URL https://
Abuella, M., Chowdhury, B., 2015. Solar power forecasting using artificial neural www.sciencedirect.com/science/article/pii/S2214785321052238.
networks. In: 2015 North American Power Symposium. NAPS, pp. 1–5. Brownlee, J., 2022. How to grid search hyperparameters for deep learning models
Ahmad, M.W., Reynolds, J., Rezgui, Y., 2018. Predictive modelling for solar in python with keras.
thermal energy systems: A comparison of support vector regression, random Cai, R., Xie, S., Wang, B., Yang, R., Xu, D., He, Y., 2020. Wind speed forecasting
forest, extra trees and regression trees. J. Clean. Prod. 203, 810–821. http: based on extreme gradient boosting. IEEE Access 8, 175063–175069. http:
//dx.doi.org/10.1016/j.jclepro.2018.08.207. //dx.doi.org/10.1109/ACCESS.2020.3025967, Conference Name: IEEE Access.
Al-Dahidi, S., Ayadi, O., Adeeb, J., Louzazni, M., 2019. Assessment of artificial neu- Chahboun, S., Maaroufi, M., 2021. Performance comparison of support vector
ral networks learning algorithms and training datasets for solar photovoltaic regression, random forest and multiple linear regression to forecast the
power production prediction. Front. Energy Res. 7. power of photovoltaic panels. In: 2021 9th International Renewable and

1011
Y. Ledmaoui, A. El Maghraoui, M. El Aroussi et al. Energy Reports 10 (2023) 1004–1012

Sustainable Energy Conference. IRSEC, (ISSN: 2380-7393) pp. 1–4. http: Maghraoui, A.E., Hammouch, F.-E., Ledmaoui, Y., Chebak, A., 2022. Smart energy
//dx.doi.org/10.1109/IRSEC53969.2021.9741154. management system: A comparative study of energy consumption predic-
Du, B., Lund, P.D., Du, B., Lund, P.D., 2022. Application of Artificial Neural tion algorithms for a hotel building. In: 2022 4th Global Power, Energy
Network in Solar Energy. Artificial Neural Networks - Recent Advances, and Communication Conference. GPECOM, pp. 529–534. http://dx.doi.org/10.
New Perspectives and Applications, IntechOpen, http://dx.doi.org/10.5772/ 1109/GPECOM55404.2022.9815807.
intechopen.106977, Publication Title. Matsumoto, T., Yamada, Y., 2021. Comprehensive and comparative analy-
Dumitru, C.-D., Gligor, A., Enachescu, C., 2016. Solar photovoltaic energy pro- sis of GAM-based PV power forecasting models using multidimensional
duction forecast using neural networks. Proc. Technol. 22, 808–815. http: tensor product splines against machine learning techniques. Energies 14
//dx.doi.org/10.1016/j.protcy.2016.01.053. (21), 7146. http://dx.doi.org/10.3390/en14217146, URL https://www.mdpi.
El Maghraoui, A., Ledmaoui, Y., Laayati, O., El Hadraoui, H., Chebak, A., 2022. com/1996-1073/14/21/7146, Number: 21 Publisher: Multidisciplinary Digital
Smart energy management: A comparative study of energy consumption Publishing Institute.
forecasting algorithms for an experimental open-pit mine. Energies 15 Mulani, S., 2020. RMSE - root mean square error in python - AskPython. Section:
(13), 4569. http://dx.doi.org/10.3390/en15134569, Number: 13 Publisher: Python Programming Examples.
Multidisciplinary Digital Publishing Institute. Obiora, C.N., Ali, A., Hasan, A.N., 2021. Implementing extreme gradient boost-
Fan, G.-F., Zhang, L.-Z., Yu, M., Hong, W.-C., Dong, S.-Q., 2022. Applications ing (xgboost) algorithm in predicting solar irradiance. In: 2021 IEEE
of random forest in multivariable response surface for short-term load PES/IAS PowerAfrica. pp. 1–5. http://dx.doi.org/10.1109/PowerAfrica52236.
forecasting. Int. J. Electr. Power Energy Syst. 139, 108073. http://dx.doi.org/ 2021.9543159.
10.1016/j.ijepes.2022.108073. Rahman, M.M., Shakeri, M., Tiong, S.K., Khatun, F., Amin, N., Pasupuleti, J.,
Geetha, A., Santhakumar, J., Sundaram, K.M., Usha, S., Thentral, T.M.T., Hasan, M.K., 2021. Prospective methodologies in hybrid renewable energy
Boopathi, C.S., Ramya, R., Sathyamurthy, R., 2022. Prediction of hourly solar systems for energy prediction using artificial neural networks. Sustainability
radiation in Tamil Nadu using ANN model with different learning algorithms. 13 (4), 2393. http://dx.doi.org/10.3390/su13042393, Number: 4 Publisher:
Energy Rep. 8, 664–671. http://dx.doi.org/10.1016/j.egyr.2021.11.190. Multidisciplinary Digital Publishing Institute.
Janarthanan, R., Maheshwari, R., Shukla, P., Shukla, P., Mirjalili, S., Kumar, M., Sajun, A.R., Shapsough, S., Zualkernan, I., Dhaouadi, R., 2022. Edge-based individ-
2021. Intelligent detection of the PV faults based on artificial neural network ualized anomaly detection in large-scale distributed solar farms. ICT Express
and type 2 fuzzy systems. Energies 14, 6584. http://dx.doi.org/10.3390/ 8 (2), 174–178. http://dx.doi.org/10.1016/j.icte.2021.12.011.
en14206584. Sauer, J., Mariani, V.C., dos Santos Coelho, L., Ribeiro, M.H.D.M., Rampazzo, M.,
Laayati, O., Bouzi, M., Chebak, A., 2022. Smart energy management system: 2022. Extreme gradient boosting model based on improved Jaya optimizer
Design of a monitoring and peak load forecasting system for an exper- applied to forecasting energy consumption in residential buildings. Evol. Syst.
imental open-pit mine. Appl. Syst. Innov. 5 (1), 18. http://dx.doi.org/10. 13 (4), 577–588. http://dx.doi.org/10.1007/s12530-021-09404-2.
3390/asi5010018, Number: 1 Publisher: Multidisciplinary Digital Publishing Sharifzadeh, M., Sikinioti-Lock, A., Shah, N., 2019. Machine-learning methods for
Institute. integrated renewable power generation: A comparative study of artificial
Ledmaoui, Y., Maghraoui, A.E., Chebak, A., 2022. Solar charging station for electric neural networks, support vector regression, and Gaussian process regression.
vehicles with IoT solution for monitoring energy production. In: Hamlich, M., Renew. Sustain. Energy Rev. 108, 513–538. http://dx.doi.org/10.1016/j.rser.
Bellatreche, L., Siadat, A., Ventura, S. (Eds.), Smart Applications and Data 2019.03.040.
Analysis. In: Communications in Computer and Information Science, Springer Shirzadi, N., Nizami, A., Khazen, M., Nik-Bakht, M., 2021. Medium-term regional
International Publishing, Cham, pp. 63–77. http://dx.doi.org/10.1007/978-3- electricity load forecasting through machine learning and deep learning.
031-20490-6_6. Designs 5 (2), 27. http://dx.doi.org/10.3390/designs5020027, Number: 2
Ledmaoui, Y., Maghraoui, A., Chebak, A., 2023. Solar Charging Station for Electric Publisher: Multidisciplinary Digital Publishing Institute.
Vehicles with IoT Solution for Monitoring Energy Production. pp. 63–77. Uhrig, R., 1995. Introduction to artificial neural networks. In: Proceedings of
http://dx.doi.org/10.1007/978-3-031-20490-6_6. IECON ’95 - 21st Annual Conference on IEEE Industrial Electronics, Vol. 1.
Liu, D., Sun, K., 2019. Random forest solar power forecast based on classification pp. 33–37. http://dx.doi.org/10.1109/IECON.1995.483329.
optimization. Energy 187, 115940. http://dx.doi.org/10.1016/j.energy.2019. Vennila, C., Titus, A., Sudha, T.S., Sreenivasulu, U., Reddy, N.P.R., Jamal, K.,
115940. Lakshmaiah, D., Jagadeesh, P., Belay, A., 2022. Forecasting solar energy
Lucchi, E., 2023. Renewable energies and architectural heritage: Advanced production using machine learning. Int. J. Photoenergy 2022, e7797488.
solutions and future perspectives. Buildings 13 (3), 631. http://dx.doi.org/10. http://dx.doi.org/10.1155/2022/7797488, Publisher: Hindawi.
3390/buildings13030631, URL https://www.mdpi.com/2075-5309/13/3/631, Wang, Q., 2022. Support vector machine algorithm in machine learning. In:
Number: 3 Publisher: Multidisciplinary Digital Publishing Institute. 2022 IEEE International Conference on Artificial Intelligence and Computer
Lucchi, E., Adami, J., Peluchetti, A., Camilo Mahecha Zambrano, J., 2023. Photo- Applications (ICAICA). pp. 750–756. http://dx.doi.org/10.1109/ICAICA54878.
voltaic potential estimation of natural and architectural sensitive land areas 2022.9844516.
to balance heritage protection and energy production. Energy Build. 290, Wang, H., Lei, Z., Zhang, X., Zhou, B., Peng, J., 2019. A review of deep learning
113107. http://dx.doi.org/10.1016/j.enbuild.2023.113107, URL https://www. for renewable energy forecasting. Energy Convers. Manage. 198, 111799.
sciencedirect.com/science/article/pii/S0378778823003377. http://dx.doi.org/10.1016/j.enconman.2019.111799.
Luo, F.L., 2011. Design of solar-panel energy system. In: 2011 6th IEEE Con- Yagli, G.M., Yang, D., Srinivasan, D., 2019. Automatic hourly solar forecasting
ference on Industrial Electronics and Applications. (ISSN: 2158-2297) pp. using machine learning models. Renew. Sustain. Energy Rev. 105, 487–498.
2304–2309. http://dx.doi.org/10.1109/ICIEA.2011.5975976. http://dx.doi.org/10.1016/j.rser.2019.02.006.

1012

You might also like