You are on page 1of 6

2020 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC 2020).

Ixtapa, Mexico

ADAPTIVE RNA MODEL FOR VERY SHORT


ENERGY FORECAST VALIDATED IN THE NEW
CORONAVIRUS PANDEMIC CONTEXT
P. A. J. COUTO; C. A. F. ROCHA; M. E. L. TOSTES; U. H. BEZERRA
F. P. MONTEIRO; S. C. A. MONTEIRO Federal University of Para
Federal University of Western Para CEAMAZON/PPGEE/UFPA
Campus Oriximina tostes@ufpa.br
flavia.monteiro@ufopa.edu.br
L. S. SOARES; E. C. S. SILVA
Equatorial Energia Para
lazaro.filho@celpa.com.br

Abstract​—Between problems in the power grid expansions, and regular monitoring by energy regulatory agencies,
distributed generation, energy market customers migrations, avoiding accidents in the entire system, such as rationing.
commercial losses and other problems, power distribution
companies seek to improve both energy quality and costs Despite the complexity of correlating all factors required,
reductions, enhancing profitability. A basic and crucial point for there are several studies to improve energy forecast models,
any energy company is how much energy to buy. That is, aiming to approximate the amounts of generation and
determining the amount of energy to be purchased as close as consumption of users. According to [1], the forecast is not an
possible to that needed to serve its customers, avoiding financial end itself, but only a means for a consequent decision making
losses by consuming more or less than they have. However, this is by providing information, aiming at certain objectives. And
not a trivial problem, as energy consumption depends on several [2] complements the idea, remembering that forecasts are
exogenous and endogenous factors, such as all the problems estimates of how the demanding market will behave in the
previously mentioned, in addition to economic, social, climatic, future, these coming from speculations about the market's
political and cultural aspects, among others. Thus, energy potential for purchase.
forecasts are realized with aid of both statistical analyzes and
computational techniques. This article exposes a very short and Most of the forecasting methods proposed in the last
short term energy forecast model using Neural Networks and decades relate and, therefore, depend on the historical data of
feedback, applied in the new global context: the new coronavirus the energy consumption time series since the modeling stage,
pandemic and its implications for energy consumption. The dividing into two main categories: statistical methods and
method was implemented with a real consumption dataset intelligence methods artificial [3]. In general, artificial
provided by the Brazilian energy company Equatorial from Para intelligence methods can obtain more accurate results in most
State and from Maranhao State. Very short term energy real-world applications and have been widely applied to the
forecasts results reached a MAPE of around 1.2% in a 15-day
prediction of energy consumption [4].
window for both States, Para and Maranhao. For short term
energy forecasts, results for both States were 3 possible scenarios Therefore, in this article, machine learning is used to
in a window from June to December 2020, due to the perform injected energy forecasting in the very short term
unpredictability of the pandemic, especially in Brazil, which so using artificial neural network methods. The data used were
far has shown no signs of reducing the contagion curve. provided by the Equatorial Energia concessionaire, which
represents actual consumption information from customers.
Keywords—Energy Forecast; Energy Market; Neural
The very short-term forecasts were made in 15-day and
Networks; Coronavirus Pandemic.
6-month short-term to both dataset: Equatorial Para and
I. I​NTRODUCTION Equatorial Maranhao.
From generation to consumption, electricity goes through Furthermore, with the arrival of COVID-19, a series of
several phases: generation, transmission and distribution. actions were taken to control social distance, in which the
Considering each of these phases impacts on energy blocking or closing of several companies and sectors, resulting
consumption, operators and energy companies' concern is in a profile change of these companies energy consumption
accurately monitoring consumption and making it compatible [5]. Schools, restaurants, offices were forced to stop or reduce
with generation, because the amount of energy in question is working hours for a common good. In this atypical scenario, it
too high for battery banks. This is the main motivation for an was necessary to reinvent our routines, adapting to new habits,
adequate energy purchase planning by each energy company since no one was prepared for a global pandemic. Small and

© IEEE 2020. This article is free to access and download, along with rights for full text and data mining, re-use and analysis
Authorized licensed use limited to: IEEE Xplore. Downloaded on October 03,2023 at 00:13:49 UTC from IEEE Xplore. Restrictions apply.
2020 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC 2020). Ixtapa, Mexico

Large companies had to cut expenses, reducing the number of In relation to costs, in addition to the emergency purchase
employees. So, aiming to help the consumer in such a difficult of energy at much more expensive prices to cover the deficit, a
time, the National Electric Energy Agency in Brazil (ANEEL) penalty is imposed on the concessionaire who contracts a
suspended the power cut by energy companies for 90 days. demand that is less than the amount actually realized. On the
other hand, the opposite also implies financial losses for the
The proposed model includes this bias between energy
concessionaire in case of resale of the surplus at a price below
consumption and possible environmental and economic
that previously paid.
impacts, so it is suitable for predicting energy in different
scenarios using deep neural network techniques.
III - D​EEP​ N​EURAL​ N​ETWORKS
II. T​HE​ B​RAZILIAN​ E​NERGY​ M​ARKET According to [9], neural networks reproduce the behavior
of the human nervous system in a computational format, from
Traditionally, the various agents in the power sector make mathematical equations, whose main block is the neuron,
their decisions based on the demand projection made by the shown in Figure 1 in biological and artificial form.
Energy Research Company (EPE - Empresa de Pesquisa
Energética), and following the market projection methodology
available in Technical Note 292/2008-SRE/ANEEL. Time
series analyzes are performed, considering the extrapolation of
past trends to estimate future behaviors [6]. EPE studies
usually contemplate the projection of energy demand over a
10-year horizon, serving as a reference for market planning.
EPE studies present premises for determining the dynamics of
energy consumption, such as demographic, macroeconomic
and sectoral data that provide energy efficiency and
self-production actions [7].
The frequent and quantity of exits of consumers to the free (a)
energy market [6], use of diesel generators or renewable
sources, mainly photovoltaic, should also be included in the
calculation of the forecast of future energy, given the growth
of these services in the current energy market.
The consumption and performance of the economy are
closely interdependent, so that the analysis of the electricity
market is initiated from the construction of macroeconomic
scenarios and the possible growth paths of the economy. In
addition to demographic scenarios and sectorial assumptions
to constitute market arguments, other conditions such as
climatic and cultural conditions are responsible for creating
the different consumption scenarios in the time horizon of
interest. (b)
Planning takes place on a monthly basis and, from there,
on an annual basis, forming the short-term horizon, which can
Figure 1. (a) Biological Neuron[9] And (b) Artificial
be extended to estimate correspondences in the medium and
Neuron [10].
long term horizons [8]. However, the estimation must start at
the distribution boundaries of each concessionaire, considering In this representation of an artificial neuron, the electrical
all the conditions and growth possibilities of the region served impulses from other neurons, figured in terms of ‘x’ which in
with precision, but maintaining the robustness to attend, even, addition to being input signals, it is also the data that feeds the
occasional events. model. The neuron acquires one or more signals for input and
delivers only one output signal, which can be shared as an
As part of the control of the agencies responsible for the
output signal from the network or input signal to the next
planning of the National Interconnected System and power
neurons in the next layer[10].
generating plants, demand values are expected at peak and
off-peak times every three years in the connections of the Axons and dendrites are figured in terms of ‘Wm’, which
energy distribution system of all concessionaires in operation mathematically demonstrate only the synapses, where the
in Brazil. In the execution of the three-year projection, with intensity of the connection occurs and sets up the so-called
the exception of the first, all other years are subject to change. synaptic weight, represented in terms of ‘W’. The entries will
be shown to the neuron. The inputs will be shown to the
neuron, then they will be multiplied by the corresponding

Authorized licensed use limited to: IEEE Xplore. Downloaded on October 03,2023 at 00:13:49 UTC from IEEE Xplore. Restrictions apply.
2020 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC 2020). Ixtapa, Mexico

synaptic weights, creating moderate inputs, rather, the first each state carries out its consolidation of its energy
input X multiplies by the first input W, so on, feeding the measurements.
model [10]. Even though the data was obtained directly from the
Afterwards we have the linear combiner, figured by ‘∑’, company's database, outliers were identified in the
which must group the totality of input signals already pre-processing stage, which were properly treated with the
moderated with the synaptic weights in order to generate an help of the company's technical team.
activation potential. The Bias ‘B​k​’ input signal is called the The stage of data transformation was also essential for the
activation threshold which must determine the appropriate success of the projection model, as it was necessary to apply
level so that a certain value is generated by the activation
several transformations to improve the learning of deep neural
trigger with the product from the linear combiner.
networks. The first was using the week ID and weekday ID,
Soon after, the result of the difference between linear instead of simply using the day and month as input attributes.
combiner and activation threshold is represented by the ‘U’ as Another entry attribute used to improve assertiveness was to
activation potential, with two possible cases: if the value of U inform if the day to be projected is a holiday. Also in this
is greater than 0, an excitatory potential will be produced; if KDD stage, as shown in Figure 2, the attributes that carry
the first statement is not satisfied, the potential will be information about temporal resolution are encoded using the
inhibitory. Subsequently, there is the activation function One-hot vector technique. Also for the purpose of facilitating
figured by the φ(.) where the output of a neuron should be
the learning of deep neural networks.
delimited in a space of values. Finally, the output signal e will
be used as an input input for other neurons that are Continuing with the definitions of the input attributes for
sequentially interconnected [10]. the model, the injected energy measurements were organized
in two ways and were named annual window and daily
According to [11], the technique used for the expected window. As the name suggests, it is possible to train the model
projection is Deep Learning, a type of machine learning. An
with different numbers of measurements according to the
advantage of using Deep Learning is its ability to learn from
number of years and days that the specialist wants. As the
large amounts of data and unsupervised, thus being a valuable
tool for Big Data, where most of the data is of this nature, also model uses hourly resolution, and the number of attributes
called unstructured data. In addition, Deep Learning related to temporal resolution is fixed (60 = 52 + 7 + 1). The
algorithms present an innovative approach, since they total number of attributes ​A is calculated, considering that ​A​w
dispense with much of the pre-processing by automatically represents the annual window and ​Dw​ corresponds to the daily
generating invariant properties in their hierarchical window, as follows: ​A =​ (​Aw​ ​ + ​Dw​ ​) × 24 + 60.
representation layers. The values of selected injected energy measurements also
need a standardization process called ​StandartScaler​, available
in the ​Scikit-learning library [18]. In the modeling stage, after
III. P​ROPOSED​ M​ETHOD​ ​AND​ ​RESULTS exhaustive tests, the following parameters were defined:

The entire process of designing the prediction model was


Cconfiguration parameters
guided by the steps of KDD, Knowledge Discovery in
Databases. This methodology basically consists of five stages: Parameter Value

data selection/acquisition, pre-processing, data transformation, kernel_initializer he_normal


data mining and evaluation/interpretation of results [12].
Number of hidden layers 7
The dataset used for training and validation of the
prediction model relies on actual injected energy data in MWh Number of neurons in 200
obtained by the distribution frontier, in an acquisition time of each hidden layer
15 minutes, which are aggregated in each hour and grouped by relu
regional (for example, WEST regional of Para) or by the entire Hidden layer activator
ANN
chosen state (Para or Maranhao). What makes this dynamic Adam
Optimizer
possible was the direct access to the Equatorial company
database. Learning rate 0.0001
For the training of the models, the period selected was
Number of neurons in the 24
from January 2009 to April 2020, for Maranhão forecast, and
output layer
from January 2012 to April 2020 for Pará. For the very short
Output Layer Activator relu
term process, different periods were also used for each State,
from May 1st to 24th for Maranhao, and from May 1st to May Dropout in the output 2%
31st for Para. This difference both in the selection of training layer
samples and in the validation of samples is due to the time that

Authorized licensed use limited to: IEEE Xplore. Downloaded on October 03,2023 at 00:13:49 UTC from IEEE Xplore. Restrictions apply.
2020 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC 2020). Ixtapa, Mexico

horizons as is the case that will be presented in the graphs of


Both Brazilian States, Para and Maranhao, followed the the following figures.
same parameter settings. To implement deep neural networks, For the projection of the short-term horizon, the specialist
the ​Tensorflow library [17] was used, as it has several tools is allowed to interfere in the projection process and enter the
and resources that facilitate the development and creation of adjustment that was planned for a certain period.
models. Python [16] was used, which, in addition to the This adjustment was very important in times of pandemic
libraries already mentioned, has ​NumPy [18] and ​Pandas [18], of the new coronavirus, and it is proving to be assertive, as can
which improve performance in relation to vectors, matrices be seen in the results of the forecasts.
and data in general. The results can be divided by state, according to Figures 3
In the model's output layer, 24 output attributes are used, and 4.
each representing a projected time of day. When the validation
are depleted samples, the outputs become the new inputs of
the model, thus allowing to carry out the projection in more

Figure 2. Modeling of the Deep Artificial Neural Network

Figure 3. Results - Equatorial Para

Authorized licensed use limited to: IEEE Xplore. Downloaded on October 03,2023 at 00:13:49 UTC from IEEE Xplore. Restrictions apply.
2020 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC 2020). Ixtapa, Mexico

Figure 4. Results - Equatorial Maranhao


It is observed that the results found by the proposed model The method also showed consistent results in the short term,
were very close to the real ones, in green. The green star that is, from June to December 2020. As a result for this case,
symbolizes which of the scenarios the actual injected energy the method presented three possible scenarios, one pessimistic,
followed in the months after validation. In the case of Pará, in with a low level of injected energy by the end of 2020, one
the very short term, the MAPE was 1.17% and that of with a moderate or medium profile, and an optimistic scenario,
Maranhão was 2.2%. Both found satisfactory results with the with the return of activities starting in July, which really
proposed method, with the aid of RNA and feedback. happened in these two states of Brazil.
It is important to highlight that the developers group is In addition, it is important to stress the importance of energy
already working on implementing improvements in the projection, as prediction errors directly affect the company's
method through the use of genetic algorithms. earnings and impact the entire National Interconnected
System. Validated in the context of the new coronavirus
pandemic, the proposed method presents itself as an
IV. C​ONCLUSION alternative in the decision to purchase energy in the very short
term (15 days), since it gives the concessionaire a way to have
The objective of the presented work was to use the method of a pre-panorama of what will need to be injected energy into its
deep neural networks in conjunction with the feedback distribution network, according to the scenario expected by the
concept to predict the energy injected by the energy company.
distribution frontier in a very short and short term, thus aiming
to assist the companies Equatorial Pará and Equatorial
R​EFERENCES
Maranhão future energy purchases in the context of the impact
of the new coronavirus pandemic.
[1] B., A. N. P. ; Oliveira, F. S. G. ; Rosa, J. L. A. . Utilização de
It is important to mention that the profile of energy Ferramenta de KDD para Integração de Aprendizagem e Tecnologia em
consumption in the pandemic has completely changed, with no Busca da Gestão Estratégica do Conhecimento na Empresa. Anais do
period with similar characteristics. This is because many Simpósio de Excelência em Gestão e Tecnologia, v. 1, p. 123-132, 2007;
companies, schools, restaurants and industries have reduced or [2] Data Science Academy. Deep Learning Book, 2019. Disponível em:
even stopped their operation completely. Thus, the proposed <http://www.deeplearningbook.com.br/>. Acesso em: 08 de Janeiro de
2020. Capítulo 4;
method proved to be robust enough to predict the amount of
[3] Daut, M.A.M.; Hassan, M.Y.; Abdullah, H.; Rahman, H.A.;
energy to be injected at the distribution frontier with a MAPE ABDULLAH, M.P.; HUSSIN, F. "Building electrical energy
of 1.2% for both cases analyzed, both for the city of Belém, in consumption forecasting analysis using conventional and artificial
Pará, and in São Luis, in Maranhão. intelligence methods: A review". Renew. Sustain. Energy Rev, 70,
1108–1118, 2017, p. 1-2;

Authorized licensed use limited to: IEEE Xplore. Downloaded on October 03,2023 at 00:13:49 UTC from IEEE Xplore. Restrictions apply.
2020 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC 2020). Ixtapa, Mexico

[4] LI, C., Ding, Z., Zhao, D., YI, J., Zhang, G. "Building Energy Busca da Gestão Estratégica do Conhecimento na Empresa. Anais do
Consumption Prediction: An Extreme Deep Learning Approach". Simpósio de Excelência em Gestão e Tecnologia, v. 1, p. 123-132, 2007;
Energies 2017, 10(10), 1525; doi:10.3390/en10101525, 2017, p.1-3; [13] F., Usama; P., Gregory; S., Padhraic. From Data Mining to Knowledge
[5] F., Carlo; F., Valeria. Real Time Estimation of the Short Run Impact of discovery. American Association for Artificial Intelligence. 1996, p. 4-5;
COVID 19 on Economic Activity Using Electricity Market Data; [14] T., Daniel. Página inicial. Disponível em:
[6] ANEEL, Nota Técnica n°292/2008-SRE/ANEEL. Metodologia de <https://danielteofilo.wordpress.com/>. Acesso em: 12 de Janeiro de
Análise de Projeção de Mercado. Disponível em: www.aneel.gov.br. 2020;
Acessado em: 15/12/2019, p. 4; [15] Michie, D.; Spiegelhalter, D.; Taylor, C. Machine Learning, Neural and
[7] Empresa de Pesquisa Energética (EPE). Nota Técnica DEA 001/17 - Statistical Classifications. Ellis Horwood, 1994, p. 67-72;
Projeção da demanda de energia elétrica para os próximos 10 anos [16] PYTHON. Página inicial. Disponível em: <https://www.python.org/>.
(2017-2026). Rio de Janeiro, RJ, 2017, p. 1-3; Acesso em: 07 de Janeiro de 2020;
[8] C B., A. C. G. O. Projeção de Demanda de Energia Elétrica. Dissertação [17] TENSORFLOW. Página inicial. Disponível em:
(Mestrado em Regulação da Indústria de Energia). Dissertação <https://www.tensorflow.org/>. Acesso em: 07 de Janeiro de 2020;
(Mestrado) - Universidade de Salvador. Programa de Pós-Graduação em
[18] Grus, Joel. Data Science do Zero. Rio de Janeiro: Alta Books Editora,
Engenharia, Salvador, 2003, p. 34;
2016, pág. 300;
[9] F., Katti; L., Ana Carolina; G., João; C., André Carlos Ponce de Leon
[19] MATPLOTLIB. Página inicial. Disponível em:
Ferreira de. Inteligência artificial: uma abordagem de aprendizado de
<https://matplotlib.org/>. Acesso em: 06 de Janeiro de 2020;
máquina. Rio de Janeiro: Editora LTC, 2011, pág. 109-111;
[20] Portal Inmet. Instituto Nacional de Meteorología. Disponível em:
[10] Data Science Academy. Deep Learning Book, 2019. Disponível em:
<​https://portal.inmet.gov.br/​> Acesso em: 06 de março de 2020;
<http://www.deeplearningbook.com.br/>. Acesso em: 08 de Janeiro de
2020. Capítulo 4; [21] Data-Driven Innovation Lab. Artificial Intelligence for Innovation.
Disponível em: <​https://ddi.sutd.edu.sg/​> Acesso em: 07 de março de
[11] Marino, D. L., Amarasinghe, K., Milos Manic, M. "Building energy load
2020;
forecasting using Deep Neural Networks". IECON 2016 - 42nd Annual
Conference of the IEEE Industrial Electronics Society,
10.1109/IECON.2016.7793413, 23-26 Oct. 2016. p. 1-4;
[12] B., A. N. P. ; Oliveira, F. S. G. ; Rosa, J. L. A. . Utilização de
Ferramenta de KDD para Integração de Aprendizagem e Tecnologia em

Authorized licensed use limited to: IEEE Xplore. Downloaded on October 03,2023 at 00:13:49 UTC from IEEE Xplore. Restrictions apply.

You might also like