<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Buenos Aires, Argentina
" odiaz@ieee.org (O. D. Díaz-Castillo); andrespuertolara@gmail.com (A. E. Puerto-Lara);
jasaenzl@ucompensar.edu.co (J. A. Sáenz-Leguizamón); vladimirduconsosa@gmail.com (V. Ducón-Sosa)</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Prediction of electrical energy consumption through recurrent neural networks</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Oscar Daniel Díaz-Castillo</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrés Esteban Puerto-Lara</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Javier Alejandro Sáenz-Leguizamón</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vladimir Ducón-Sosa</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Wavelet S.A.S.</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Bogotá</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Colombia</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Compensar Fundación Universitaria</institution>
          ,
          <addr-line>Bogotá</addr-line>
          ,
          <country country="CO">Colombia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>It is almost unthinkable to conceive the modern world without the use of electricity; every day around the world demand for electric energy is increasing, not only for society development but also to reduce the fossil fuel consumption and CO2 emissions to combat climate change, as recommended in the UN Sustainable Development Goals (SDGs). One approach to improve energy eficiency related to electricity consumption is the use information and communication technologies (ICT) integrated with the electrical systems to model and predict electricity consumption. This article presents a prediction model based on recurrent neural networks (RNN) for the prediction of electricity consumption, verifying its validity with real data taken from a local company. The model is compared to an ARIMA model and to real data to verify its prediction capacity, the results showed a 95% similarity using the Deep learning model while ARIMA yields 40% of similarity.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;RNN</kwd>
        <kwd>Forecasting</kwd>
        <kwd>electrical consumption</kwd>
        <kwd>ARIMA</kwd>
        <kwd>Correlation coeficient</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Electricity is one of the fundamental energy resources for the development of society. A large
part of current technologies works with electrical energy and is therefore necessary for the
development of civilization [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. This dependence on society has a major impact on economic,
social and environmental aspects.
      </p>
      <p>
        In 2015, the UN approved the Agenda 2030 on Sustainable Development, with the development
of the Sustainable Development Goals (SDGs), in which goal 7 (afordable, secure, sustainable
and modern energy) and 13 (urgent action to combat climate change and its efects) involve the
generation, transmission and distribution systems of electric power [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        Because of this, research focused on both modeling and optimizing electrical systems is
of great importance, in particular one of the most relevant topics are energy consumption
prediction studies [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        On the other hand, deep learning techniques have enabled interesting developments in
diferent areas of technology, with applications in very diverse sectors: from sound and visual
pattern recognition, through facial recognition, mobile communications, genomic analysis, and
even data prediction systems [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>Among the diferent deep learning techniques, Recurrent Neural Networks (RNN) allow
handling the time dependence of the data, which is not fully taken into account with other deep
learning techniques.</p>
      <p>
        These networks incorporate feedback loops, which allow them to maintain a certain
persistence of information, similar to a long-term memory, in order to model aspects and behaviors
that depend on time [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>Compared to an artificial neural network, the general equation governing a neuron in a
recurrent neural network is described by the equation 1.</p>
      <p>() =  (Wx() + Uy( − 1) + )
(1)</p>
      <p>
        Where two matrices are defined: the weight matrix W of the previous layer of the network,
and the weight matrix U that introduces the influence of the network at a previous time instant
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>This paper presents a prediction model based on RNN for electricity consumption prediction,
verifying its validity with real data taken from a local company. The model is compared with
respect to an ARIMA model and real data to verify its predictive capability.</p>
      <p>The background section presents a review of some of the techniques used for electricity
consumption prediction, the prediction model section presents the architecture and details of
the model, the results section presents the details of the model training and its comparison
with an ARIMA reference model and with real data, and finally the last section presents the
conclusions and future work.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Background</title>
      <p>
        The prediction of electricity consumption in various energy systems has had significant eforts.
In [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] it is presented a review of models to evaluate and predict energy eficiency in buildings,
taking into account not only the electrical systems but all their associated systems (e.g. HVAC
systems), to obtain the overall building eficiency and equivalent CO 2 emissions. It highlights
the use of system modeling techniques, statistical methods, “gray” models (where the system
information is limited) and models based on artificial intelligence: neural networks and support
vector machines.
      </p>
      <p>
        A review of artificial intelligence-based techniques used to predict energy consumption (both
electrical and from other sources such as fossil fuels) is given in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. It highlights the use of
hybrid techniques that include physical models based on thermodynamics with models based
on autonomous learning such as multiple linear regression, artificial neural networks, support
vector machines, and ensemble forecasting.
      </p>
      <p>
        ARIMA (Auto Regressive Integrated Moving Average) models are also used to model time
series, which are widely used in statistics and econometrics [
        <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
        ]. Due to its characteristics for
modeling time-regular behaviors, this model has also been used for electric power consumption
prediction [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>
        The use of deep learning techniques have been applied in diferent research, such as in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ],
which describes the application of neural networks in the long-term prediction of electricity
consumption in Greece.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] it is proposed the use of artificial neural networks together with other techniques
(particle cloud optimization, principal component analysis and genetic algorithms), for the
prediction of electricity consumption in buildings in China.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] it is proposed a framework based on LSTM (Long Short-Term Memory) and recurrent
neural networks for consumption prediction in residential environments, comparing their
results with data obtained from smart meters.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Prediction model</title>
      <p>The model architecture (Figure 1) is based of an RNN with an input of the time series existing at
the time, an output with the prediction for time  + 1 and a set of 120 neurons for the hidden
layer.</p>
      <p>The size of the hidden layer was chosen to strike a balance between best fitting and
computational resources usage.</p>
      <p>This network uses a window of 20 observations per iteration with a total of 200000 iterations
per training time. Data input consists of a current consumption secuence of samples evenly
spaced in time.</p>
      <p>To train the RNN a time series was used that relates the daily electricity consumption of an
undisclosed company in the city of Tunja in Colombia between June 22, 2019 and July 1 of the
same year, the data were provided by the company Wavelet S.A.S.</p>
      <p>In this company the measurement data was taken from a single ofice in a ofice building,
with lighting loads, computers and small ofice appliances. Average current in this ofice was
around 2.5 A(RMS). Test data is shown in Figure 2.</p>
      <p>This time series consists of 2200 data samples where 2000 were used for training (90%) and
the remaining (10%) was used to test the generalization capacity of the network. Data separation
was done sequentially, that is, the first data samples were used for training, and the last data
samples were used for test.</p>
      <p>The training time is determined by the learning rate set at each stage. In this study 4 diferent
learning rates (0.005, 0.001, 0.0001 and 0.01) were used, the training result is evidenced in Figure
3.</p>
      <p>
        Network implementation was done using the Nvidia Jetson Nano [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] (Figure 4) and the open
source Tensorflow library [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ].
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. Results</title>
      <p>To determine the generalization capacity of each model due to each learning rate, a graph was
constructed with the correlation coeficient between the real output and the output estimated
by the network vs. each learning rate (Figure 6).</p>
      <p>The image shows that the learning rate that generates the highest correlation coeficient is
0.005, on the other hand the other rates generate a considerable amount of noise reaching a
maximum of 0.85 in the coeficient unlike the rate mentioned that achieves a value close to 0.95
of similarity with the original signal.</p>
      <p>On the other hand, an ARIMA model was used to predict the power consumption and to
compare it with the result of the RNN as can be seen in Figure 7.</p>
      <p>The comparison of the diferent trained models with respect to the real output of the power
consumption signal can be seen in Figure 8, highlighting the degree of similarity between
the diferent predictions given by each of the models based on recurrent neural networks and
ARIMA.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusions</title>
      <p>The RNN is a model capable of making predictions with a higher degree of accuracy than
the ARIMA model, taking into account a relatively lower amount of training data than those
usually used by deep learning models. On the other hand, the correlation value of the ARIMA
model with respect to the original consumption signal reached a value of 39% while the lowest
correlation value reached by the RNN was 55% ( = 0.001), highlighting in the same way the
highest value obtained of 95% ( = 0.005) with the RNN of better performance. On the other
hand and according to the Figure 6 it is evident that as the learning rate decreases it does not
mean that the generalization capacity of the RNN is increasing, this is largely due to the fact
that the network is incurring in overfitting problems with the training data. However, the same
graph shows the problem of bias when the learning rate decreases.</p>
      <p>This type of predictive models are very useful for issues related to energy eficiency,
carbon footprint reduction and cost projection in companies and institutions whose electricity
consumption may represent a significant monetary investment.
J. Dean, M. Devin, S. Ghemawat, I. Goodfellow, A. Harp, G. Irving, M. Isard, Y. Jia, R.
Jozefowicz, L. Kaiser, M. Kudlur, J. Levenberg, D. Mané, R. Monga, S. Moore, D. Murray,
C. Olah, M. Schuster, J. Shlens, B. Steiner, I. Sutskever, K. Talwar, P. Tucker, V.
Vanhoucke, V. Vasudevan, F. Viégas, O. Vinyals, P. Warden, M. Wattenberg, M. Wicke, Y. Yu,
X. Zheng, TensorFlow: Large-scale machine learning on heterogeneous systems, 2015.
URL: https://www.tensorflow.org/.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.</given-names>
            <surname>Camargo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Sáenz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. F.</given-names>
            <surname>Rosas</surname>
          </string-name>
          , Implementación de un sistema
          <article-title>de seguridad en medidores inteligentes (Smart Grids)</article-title>
          ,
          <source>Ingenium</source>
          <volume>15</volume>
          (
          <year>2014</year>
          )
          <fpage>28</fpage>
          -
          <lpage>38</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>G.</given-names>
            <surname>Assembly</surname>
          </string-name>
          , Sustainable Development goals,
          <source>SDGs)</source>
          ,
          <source>Transforming our world: the 2030</source>
          (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>K.</given-names>
            <surname>Amasyali</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. M.</given-names>
            <surname>El-Gohary</surname>
          </string-name>
          ,
          <article-title>A review of data-driven building energy consumption prediction studies</article-title>
          ,
          <source>Renewable and Sustainable Energy Reviews</source>
          <volume>81</volume>
          (
          <year>2018</year>
          )
          <fpage>1192</fpage>
          -
          <lpage>1205</lpage>
          . URL: http://www.sciencedirect.com/science/article/pii/S1364032117306093. doi:
          <volume>10</volume>
          .1016/ j.rser.
          <year>2017</year>
          .
          <volume>04</volume>
          .095.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>I.</given-names>
            <surname>Goodfellow</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Bengio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Courville</surname>
          </string-name>
          , Deep Learning, MIT Press,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>W.</given-names>
            <surname>Zaremba</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Sutskever</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Vinyals</surname>
          </string-name>
          , Recurrent Neural Network Regularization, arXiv:
          <fpage>1409</fpage>
          .2329 [cs] (
          <year>2015</year>
          ). URL: http://arxiv.org/abs/1409.2329. arXiv:
          <volume>1409</volume>
          .
          <fpage>2329</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>F. M.</given-names>
            <surname>Bianchi</surname>
          </string-name>
          , E. Maiorino,
          <string-name>
            <given-names>M. C.</given-names>
            <surname>Kampfmeyer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rizzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Jenssen</surname>
          </string-name>
          ,
          <article-title>Recurrent Neural Networks for Short-Term Load Forecasting: An Overview</article-title>
          and
          <string-name>
            <given-names>Comparative</given-names>
            <surname>Analysis</surname>
          </string-name>
          , Springer,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7] H.
          <article-title>-x.</article-title>
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Magoulès</surname>
          </string-name>
          ,
          <article-title>A review on the prediction of building energy consumption</article-title>
          ,
          <source>Renewable and Sustainable Energy Reviews</source>
          <volume>16</volume>
          (
          <year>2012</year>
          )
          <fpage>3586</fpage>
          -
          <lpage>3592</lpage>
          . URL: http: //www.sciencedirect.com/science/article/pii/S1364032112001438. doi:
          <volume>10</volume>
          .1016/j.rser.
          <year>2012</year>
          .
          <volume>02</volume>
          .049.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. S.</given-names>
            <surname>Srinivasan</surname>
          </string-name>
          ,
          <article-title>A review of artificial intelligence based building energy use prediction: Contrasting the capabilities of single and ensemble prediction models</article-title>
          ,
          <source>Renewable and Sustainable Energy Reviews</source>
          <volume>75</volume>
          (
          <year>2017</year>
          )
          <fpage>796</fpage>
          -
          <lpage>808</lpage>
          . URL: http://www.sciencedirect.com/ science/article/pii/S1364032116307420. doi:
          <volume>10</volume>
          .1016/j.rser.
          <year>2016</year>
          .
          <volume>10</volume>
          .079.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>S. L.</given-names>
            <surname>Ho</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Xie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. N.</given-names>
            <surname>Goh</surname>
          </string-name>
          ,
          <article-title>A comparative study of neural network and Box-Jenkins ARIMA modeling in time series prediction</article-title>
          ,
          <source>Computers &amp; Industrial Engineering</source>
          <volume>42</volume>
          (
          <year>2002</year>
          )
          <fpage>371</fpage>
          -
          <lpage>375</lpage>
          . URL: http://www.sciencedirect.com/science/article/pii/S0360835202000360. doi:
          <volume>10</volume>
          .1016/S0360-
          <volume>8352</volume>
          (
          <issue>02</issue>
          )
          <fpage>00036</fpage>
          -
          <lpage>0</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>G. P.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <article-title>Time series forecasting using a hybrid ARIMA and neural network model</article-title>
          ,
          <source>Neurocomputing</source>
          <volume>50</volume>
          (
          <year>2003</year>
          )
          <fpage>159</fpage>
          -
          <lpage>175</lpage>
          . URL: http://www.sciencedirect.com/science/article/ pii/S0925231201007020. doi:
          <volume>10</volume>
          .1016/S0925-
          <volume>2312</volume>
          (
          <issue>01</issue>
          )
          <fpage>00702</fpage>
          -
          <lpage>0</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>L.</given-names>
            <surname>Ekonomou</surname>
          </string-name>
          ,
          <article-title>Greek long-term energy consumption prediction using artificial neural networks</article-title>
          ,
          <source>Energy</source>
          <volume>35</volume>
          (
          <year>2010</year>
          )
          <fpage>512</fpage>
          -
          <lpage>517</lpage>
          . URL: http://www.sciencedirect.com/science/article/ pii/S0360544209004514. doi:
          <volume>10</volume>
          .1016/j.energy.
          <year>2009</year>
          .
          <volume>10</volume>
          .018.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>K.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Hu</surname>
          </string-name>
          , G. Liu, W. Xue,
          <article-title>Building's electricity consumption prediction using optimized artificial neural networks and principal component analysis</article-title>
          ,
          <source>Energy and Buildings</source>
          <volume>108</volume>
          (
          <year>2015</year>
          )
          <fpage>106</fpage>
          -
          <lpage>113</lpage>
          . URL: http://www.sciencedirect.com/science/article/pii/S0378778815302437. doi:
          <volume>10</volume>
          .1016/j.enbuild.
          <year>2015</year>
          .
          <volume>09</volume>
          .002.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>W.</given-names>
            <surname>Kong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z. Y.</given-names>
            <surname>Dong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Jia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. J.</given-names>
            <surname>Hill</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , Short-Term
          <source>Residential Load Forecasting Based on LSTM Recurrent Neural Network, IEEE Transactions on Smart Grid</source>
          <volume>10</volume>
          (
          <year>2019</year>
          )
          <fpage>841</fpage>
          -
          <lpage>851</lpage>
          . doi:
          <volume>10</volume>
          .1109/TSG.
          <year>2017</year>
          .
          <volume>2753802</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>NVIDIA</surname>
          </string-name>
          , Jetson Nano Developer Kit,
          <year>2019</year>
          . URL: https://developer.nvidia.com/embedded/ jetson-nano
          <article-title>-developer-kit.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>M.</given-names>
            <surname>Abadi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Agarwal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Barham</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Brevdo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Citro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. S.</given-names>
            <surname>Corrado</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Davis,
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>