Elsevier

Energy and Buildings

Volume 216, 1 June 2020, 109952
Energy and Buildings

A long short-term memory artificial neural network to predict daily HVAC consumption in buildings

https://doi.org/10.1016/j.enbuild.2020.109952Get rights and content

Highlights

  • Several HVAC system power consumption prediction systems are designed and implemented.

  • Long short-term memory neural networks to predict the next day of power consumption.

  • The systems implements low errors and optimal Pearson correlation coefficients between the predictions and the real consumption values.

  • Daily consumption predictions provide a powerful tool for Demand-Side Management techniques.

Abstract

In this paper, the design and implementation process of an artificial neural network based predictor to forecast a day ahead of the power consumption of a building HVAC system is presented. The featured HVAC system is situated at MagicBox, a real self-sufficient solar house with a monitoring system. Day ahead prediction of HVAC power consumption will remarkably enhance the Demand Side Management techniques based on appliance scheduling to reach defined goals. Several multi step prediction models, based on LSTM neural networks, are proposed. In addition, suitable data preprocessing and arrangement techniques are set to adapt the raw dataset. Considering the targeted prediction horizon, the models provide outstanding results in terms of test errors (NRMSE of 0.13) and correlation, between the temporal behavior of the predictions and test time series to be forecasted, of 0.797. Moreover, these results are compared to the simplified one hour ahead prediction that reaches nearly optimal test NRMSE of 0.052 and Pearson correlation coefficient of 0.972. These results provide an encouraging perspective for real-time energy consumption prediction in buildings.

Introduction

Nowadays, there is an increasing concern in the society for the correct consumption and use of energy. This phenomenon has motivated the development of new technologies turning into real scientific challenges. One of the main problems in this context is to find a suitable equilibrium between the energy consumption and its generation. Unlike the ideal scenario of constant daily demand, the existence of load peaks of aggregated consumption in the activity hours and valleys with scarce demand (such as the night) produce undesired demand curves that fits badly with the energy generation. In short, valleys produce energy leaks (although it can be reduced with the use of storage strategies) because of the low demand. On the other hand, load peaks provoke unstable scenarios where demand surpasses instantaneous generation capabilities.

To solve these problems, Demand Side Management (DSM) strategies [1], [2] have been studied and applied. Furthermore, in the recent years, Smart Grids [3], [4] have emerged to aid the DSM purposes among other utilities. While the electrical grid was only meant to transport energy from producers to consumers, the Smart Grid focuses on analyzing users behavior and allows DSM techniques in conventional and distributed electric networks. Diverse DSM algorithms that harness the smart grid capabilities have been proposed. Most of them act as appliance controllers by means of operation scheduling with the aim to optimize one or several objectives, such as Peak-to-Average Ratio reduction, cost minimization or peak shaving. In [5], the authors propose a Generic DSM model, based on genetic algorithms, for residential users to reduce the Peak-to-Average Ratio, the total energy cost, and the waiting time of appliances. In addition, several residential load controlling techniques are described in [6]. It is based on the scheduling and time shifting of the operation of the loads in order to smooth the energy demand curve. It was shown how those methods reduce the energy consumption cost and the Peak-to-Average Ratio. Furthermore, in [7], the authors present simulated and real experiments integrating battery energy storage system (BESS) and Photovoltaic (PV) generation along with Active Demand-Side Management (ADSM) in a grid connected self sufficient house to maximize the PV energy self consumption. Finally, in [8], DSM techniques implemented by means of swarm intelligence are proposed.

However, the problem described above is too wide to be treated globally in detail. This paper focuses on the consumption of heating, ventilation and air-conditioning (HVAC) systems. In the USA, these systems represent more than 50% of the energy consumption in residential buildings and in China, a sample of 30 buildings exposed a 68% of residential consumption in average [9], [10]. Moreover, knowing the future local consumption of the HVAC could allow demand response actions in grid connected systems or self-consumption actions if local generation is available. Nonetheless, the HVAC behaviour can be treated as a time series with certain periodicity. Therefore, to approach the time series prediction, different algorithms have been applied. For instance, linear regression models [11], autoregressive, moving average and autoregressive integrated moving average models [12], support vector machines [13], [14] and artificial neural networks [15], [16], [17], [18], among others.

In [11], a predictor of the power consumption of an HVAC system was implemented to aid the operation of two control strategies. These strategies aim to increase the PV self-consumption and grid-peak shaving respectively and were developed and assessed in the frame of a self-sufficient solar house, MagicBox, with integrated BESS, PV generation and monitoring systems. The HVAC predictor was based on a linear regression model and, as stated by the authors, the design of more accurate forecasting techniques was left as future research. The current paper can be seen as a continuation in that direction. Indeed, in this research, a more complex prediction system of the HVAC power consumption is designed, implemented and assessed under the same self sufficient house.

In order to design and implement a time series prediction model, two main factors should be taken into consideration: the algorithm that suitably fits the precise time series forecasting problem and the horizon of the predictions. Traditionally, the former task was mainly faced by means of linear regression [11] and time series analysis techniques. Regarding the latter approach, in [12], the authors compared autoregressive, moving average and autoregressive integrated moving average for short term load forecasting. Alternatively, machine learning algorithms have recently gained popularity due to the increase of the fitness of the results and their generalization capabilities (among many other advantages). Support vector machines are an example of a machine learning technique harnessed to address the time series prediction problem [13], [14], [19]. Additionally, artificial neural networks (ANN) have been used in [15], [16]. Moreover, the use of recurrent neural networks (RNN) is strongly recommended because they are able to retain and consider the temporal variations of the time series throughout their feedback connections. More precisely, HVAC power consumption time series denote high periodicity, mainly because of the daily and seasonal periodic nature of ambient variables and human habits. This fact justifies the use of RNN as the prediction model in the context of HVAC power consumption forecasting. In [17], the authors take advantage of RNNs to develop a model to forecast hourly energy consumption. Finally, in [20], a wavelet packet decomposition is applied to a wind speed time series. Afterwards, a one dimension convolutional neural network (non recurrent) is used to predict the higher frequency components and a convolutional neural network placed before a Long-Short Term Memory (LSTM) [18] neural network forecasts the lower frequency variations. The predictions for one step to three steps ahead are compared with other predictors. Additionally, in [21], the authors use an LSTM neural network for petroleum production forecasting. In the research presented in this manuscript, LSTM neural networks are used.

Subsequently, the horizon of the predictions has to be chosen according to the problem requirements. Short and long term predictions are the most known time horizons. As aforementioned, the predictor designed here is thought to aid the DSM techniques such as scheduling loads. Therefore short term forecasting is the desirable time horizon for this application. In [22], [23], the authors compare different prediction models to forecast short term load consumption. In addition, the authors of [24] addressed the HVAC load short-term prediction problem by means of support vector regression and ANN. The model was preceded by a preprocessing stage based on correlation analysis, principal component analysis and wavelet decomposition of the data. Moreover, in [25] a support vector regression trained by means of a genetic algorithm (GA-SVR) with wavelet decomposition is established to address short term and ultra short term in a similar HVAC load prediction context. However, as the prediction models in [24], [25] are not dynamic, they do not consider the periodicity of the forecasted time series. The usage of systems with memory states could enhance the accuracy of the predictions. In contrast, when the application requires larger prediction horizons, long term forecasts should be considered. An example of long term forecasting is studied in [26] with the use of an encoder–decoder based LTSM ANN.

The LSTM neural networks proposed in this paper have been trained using the backpropagation through time algorithm [27]. Moreover, the Adam optimizer [28] is proposed as the learning wrapper that remarkably enhances the training process. Adam optimizer has been widely used in the literature when dealing with deep learning architectures [20], [26] due to its fast convergence, little hyper-parameter tuning and adaptive learning rates for each parameter using the first and second moment estimates of the gradient.

The main contribution of this paper is the development and verification of several models to perform short term forecasts of the power consumption of HVAC systems in buildings. The predictor model consists of a stacked LSTM ANN trained by several data obtained from the aforementioned self-sufficient solar house MagicBox. The models will output the next day consumption prediction based on the previous day behaviour, being able to retain its temporal dependencies by means of the dynamic nature of the LSTM ANN. This leads to an enhancement in the precision of the predictions. More precisely, the three presented models show strong performance results highlighting test Pearson correlation coefficients around 0.797 and normalized root mean square error (NRMSE) of 0.13 for the most accurate model. Additionally, one hour ahead predictions are separately performed and compared to those mentioned before. The prediction of the next hour of power consumption leads to outstanding Pearson correlation coefficient of 0.972 and NRMSE of 0.052 at the cost of reducing the horizon of the forecasts. These results provide an encouraging perspective for real-time energy consumption prediction in buildings.

The remainder of this paper is as follows: Section 2 exposes the theoretical preliminaries on recurrent neural networks that will be used throughout this paper. Section 3 is devoted to the design process. The nature of the utilized dataset is commented, and the aforementioned self-sufficient house, where the data was measured, is introduced. Afterwards, the preprocessing and arrangement techniques for the data set are described. Finally, the main architecture of the RNN models and the three multi step prediction ahead architectures are presented and analyzed. Section 4 deals with the implementation environment and the predictor hyper-parameter optimization. In Section 5 the assessment of the designed models is performed. Finally, Section 6 concludes the paper.

Section snippets

Theoretical preliminaries

The main tools utilized in the paper approach are artificial neural networks (see [29], [30], [31]). Indeed, as it is a time series prediction problem, recurrent neural networks (RNN) [32] are selected; note that this sort of networks excels when the treated problem involves input and output data with sequential nature.

Within this scenario, let xk and hk(m) be the input and output vectors at time step k, and let hk1(m) be the output vector at the previous instant. In addition, let Φ(m) be the

Data acquisition system

In order to develop the training process of the ANN through the backpropagation algorithm, a dataset, containing the power consumption records, and several inputs with a remarkable correlation with the consumption, is required. To assess this task, a dataset was extracted from a real solar house called http://www.magicbox.etsit.upm.es/ MagicBox.

The MagicBox is a self-sufficient solar house (see Fig. 2) that integrates sustainable elements based on renewable energies, self-sufficiency energetic

Implementation environment and predictor hyper-parameter optimization

In order to implement the designed models, a programming environment and a hyper-parameter selection process has been fixed. With respect to the programming environment, all the models were implemented, trained and tested using the Python’s library Pytorch [43]. The code related to the paper was uploaded to a Github repository1.

The chosen hyper-parameters to be studied have been: the number of units and the learning rate α. These are some of the most

Results

This section is devoted to the performance evaluation analysis of the proposed models. For this purpose, several metric comparisons will be studied. Moreover, different figures will be displayed to illustrate the accuracy of the estimations. The training and testing process of the models use the hyper-parameters highlighted in Table 1. Moreover, a downsampling of 15 min is carried out by following the guidelines described in Section 3. Firstly, the LSTM architectures were trained in order to

Conclusion and future lines

The forecast of the power consumed by an HVAC system located in a self sufficient solar house was the addressed problem. The house, called http://www.magicbox.etsit.upm.es/ MagicBox and located at the Escuela Técnica Superior de Ingenieros de Telecomunicación (ETSIT) of the Universidad Politécnica de Madrid (UPM), is equipped with a monitoring system to acquire the data. The main goal was to predict the next day of the power time series given the previous day to feed a future demand-side

Declaration of Competing Interest

We wish to draw the attention of the Editor to the following facts which may be considered as potential conflicts of interest and to significant financial contributions to this work. [OR] We wish to confirm that there are no known conflicts of interest associated with this publication and there has been no significant financial support for this work that could have influenced its outcome.

We confirm that the manuscript has been read and approved by all named authors and that there are no other

Acknowledgments

This work was partially supported by the “DEMS: Sistema Distribuido de Gestión de Energía en Redes Eléctricas Inteligentes”, funded by the Programa Estatal de Investigación Desarrollo e Innovación orientada a los retos de la sociedad of the Spanish Ministerio de Economía y Competitividad (TEC2015-66126-R). Rafael Sendra acknowledges support from the Spanish Ministry of Education, culture and sports under Collaboration grant.

References (44)

  • A. Sagheer et al.

    Time series forecasting of petroleum production using deep LSTM recurrent networks

    Neurocomputing

    (2019)
  • P. Lusis et al.

    Short-term residential load forecasting: impact of calendar effects and forecast granularity

    Appl. Energy

    (2017)
  • K. Gajowniczek et al.

    Short term electricity forecasting using individual smart meter data

    Procedia Comput. Sci.

    (2014)
  • Y. Ding et al.

    Model input selection for building heating load prediction: a case study for an office building in Tianjin

    Energy Build.

    (2018)
  • Y. Ding et al.

    Research on short-term and ultra-short-term cooling load prediction models for office buildings

    Energy Build.

    (2017)
  • A. Rahman et al.

    Predicting electricity consumption for commercial and residential buildings using deep recurrent neural networks

    Appl. Energy

    (2018)
  • E. Caamamartn et al.

    Spanish participation in the solar decathlon 2005 competition: new proposals for zero-energy houses

    Proceedings of the 20th European Photovoltaic Solar Energy Conference

    (2005)
  • P. Palensky et al.

    Demand side management: demand response, intelligent energy systems, and smart loads

    IEEE Trans. Ind. Inf.

    (2011)
  • K.M. Asghar et al.

    A generic demand side management model for smart grid

    Int. J. Energy Res.

    (2015)
  • M.N. Ullah et al.

    Residential energy consumption controlling techniques to enable autonomous demand side management in future smart grid communications

    2013 Eighth International Conference on Broadband and Wireless Computing, Communication and Applications

    (2013)
  • M. Castillo-Cagigal et al.

    Swarmgrid: demand-side management with distributed energy resources based on multifrequency agent coordination

    Energies

    (2018)
  • J. Deng et al.

    Short-term load forecasting using time series analysis: a case study for singapore

    2010 IEEE Conference on Cybernetics and Intelligent Systems

    (2010)
  • Cited by (85)

    View all citing articles on Scopus
    View full text