Citation: Cebekhulu, E.; Onumanyi,
A.J.; Isaac, S.J. Performance Analysis
of Machine Learning Algorithms for
Energy Demand–Supply Prediction
in Smart Grids. Sustainability 2022, 14,
2546. https://doi.org/10.3390/
su14052546
Academic Editors: Luis
Hernández-Callejo, Sergio
Nesmachnow and Sara
Gallardo Saavedra
Received: 22 December 2021
Accepted: 27 January 2022
Published: 22 February 2022
Publisher’s Note: MDPI stays neutral
with regard to jurisdictional claims in
published maps and institutional affil-
iations.
Copyright: © 2022 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license (https://
creativecommons.org/licenses/by/
4.0/).
Article
Performance Analysis of Machine Learning Algorithms for
Energy Demand–Supply Prediction in Smart Grids
Eric Cebekhulu
†
, Adeiza James Onumanyi *
,†
and Sherrin John Isaac
†
Advanced Internet of Things, Next Generation Enterprises and Institutions,
Council for Scientific and Industrial Research, Pretoria 0001, South Africa; ecebekhulu@csir.co.za (E.C.);
sisaac@csir.co.za (S.J.I.)
* Correspondence: aonumanyi@csir.co.za
† These authors contributed equally to this work.
Abstract:
The use of machine learning (ML) algorithms for power demand and supply prediction
is becoming increasingly popular in smart grid systems. Due to the fact that there exist many
simple ML algorithms/models in the literature, the question arises as to whether there is any
significant advantage(s) among these different ML algorithms, particularly as it pertains to power
demand/supply prediction use cases. Toward answering this question, we examined six well-known
ML algorithms for power prediction in smart grid systems, including the artificial neural network,
Gaussian regression (GR), k-nearest neighbor, linear regression, random forest, and support vector
machine (SVM). First, fairness was ensured by undertaking a thorough hyperparameter tuning
exercise of the models under consideration. As a second step, power demand and supply statistics
from the Eskom database were selected for day-ahead forecasting purposes. These datasets were
based on system hourly demand as well as renewable generation sources. Hence, when their
hyperparameters were properly tuned, the results obtained within the boundaries of the datasets
utilized showed that there was little/no significant difference in the quantitative and qualitative
performance of the different ML algorithms. As compared to photovoltaic (PV) power generation,
we observed that these algorithms performed poorly in predicting wind power output. This could be
related to the unpredictable wind-generated power obtained within the time range of the datasets
employed. Furthermore, while the SVM algorithm achieved the slightly quickest empirical processing
time, statistical tests revealed that there was no significant difference in the timing performance of
the various algorithms, except for the GR algorithm. As a result, our preliminary findings suggest
that using a variety of existing ML algorithms for power demand/supply prediction may not always
yield statistically significant comparative prediction results, particularly for sources with regular
patterns, such as solar PV or daily consumption rates, provided that the hyperparameters of such
algorithms are properly fine tuned.
Keywords: Eskom; forecasting; hyperparameter; machine learning; tuning; wind
1. Introduction
Accurate forecasting of the power being generated and consumed in smart grid
systems is crucial to ensuring grid sustainability [
1
]. Consequently, power demand/supply
forecasting continues to be an area of contemporary research, and for this reason, machine
learning (ML) algorithms have become key instruments for such forecasting obligations [
2
].
However, it remains unclear as to which ML algorithm performs best for power
demand/supply forecasting in smart grid (SG) systems. Some specific reasons for such un-
certainties are well documented in many review articles [
3
,
4
], with a few noted
as follows
:
•
It is noted that the number of simple and complex ML algorithms/models in the
literature has grown exponentially, thus making it almost impossible to compare all
available models [3].
Sustainability 2022, 14, 2546. https://doi.org/10.3390/su14052546 https://www.mdpi.com/journal/sustainability