| Literature DB >> 35153386 |
J F Torres1, F Martínez-Álvarez1, A Troncoso1.
Abstract
Nowadays, electricity is a basic commodity necessary for the well-being of any modern society. Due to the growth in electricity consumption in recent years, mainly in large cities, electricity forecasting is key to the management of an efficient, sustainable and safe smart grid for the consumer. In this work, a deep neural network is proposed to address the electricity consumption forecasting in the short-term, namely, a long short-term memory (LSTM) network due to its ability to deal with sequential data such as time-series data. First, the optimal values for certain hyper-parameters have been obtained by a random search and a metaheuristic, called coronavirus optimization algorithm (CVOA), based on the propagation of the SARS-Cov-2 virus. Then, the optimal LSTM has been applied to predict the electricity demand with 4-h forecast horizon. Results using Spanish electricity data during nine years and half measured with 10-min frequency are presented and discussed. Finally, the performance of the proposed LSTM using random search and the LSTM using CVOA is compared, on the one hand, with that of recently published deep neural networks (such as a deep feed-forward neural network optimized with a grid search) and temporal fusion transformers optimized with a sampling algorithm, and, on the other hand, with traditional machine learning techniques, such as a linear regression, decision trees and tree-based ensemble techniques (gradient-boosted trees and random forest), achieving the smallest prediction error below 1.5%.Entities:
Keywords: Deep learning; Electricity demand; Time series forecasting
Year: 2022 PMID: 35153386 PMCID: PMC8817773 DOI: 10.1007/s00521-021-06773-2
Source DB: PubMed Journal: Neural Comput Appl ISSN: 0941-0643 Impact factor: 5.606
Fig. 1Many to many LSTM network
Fig. 2LSTM cell
Fig. 3A general overview of the proposed methodology
Distribution of data in training, validation and test sets
| Subset | From | To |
|---|---|---|
| Training | 2007-01-01 00:00 | 2012-04-23 02:30 |
| Validation | 2012-04-23 02:40 | 2013-08-19 22:40 |
| Test | 2013-08-19 22:50 | 2016-06-21 19:40 |
Hyper-parameter search space for two optimization method
| Parameter | Random | CVOA | ||||
|---|---|---|---|---|---|---|
| Min. | Max. | Step | Min. | Max. | Step | |
| Hidden layers | 1 | 10 | 1 | 1 | 12 | 1 |
| Units per layer | 50 | 300 | 25 | 25 | 300 | 25 |
| Dropout rate | 0 | 0.4 | – | 0 | 0.45 | – |
| Learning rate | 0.0001 | 0.1 | – | 0 | 0.1 | – |
Architecture of the best LSTM model using random search
| Layer (type) | Number of units | Number of parameters |
|---|---|---|
| LSTM | 75 | 23,100 |
| LSTM#1 | 200 | 220,800 |
| Dropout#1 | 200 | – |
| LSTM#2 | 275 | 523,600 |
| Dropout#2 | 275 | – |
| LSTM#3 | 225 | 450,900 |
| Dropout#3 | 225 | – |
| Dense | 24 | 5424 |
Architecture of the best LSTM model using random search
| Layer (type) | Number of units | Number of parameters |
|---|---|---|
| LSTM | 175 | 123,900 |
| LSTM#1 | 200 | 300,800 |
| LSTM#2 | 25 | 22,600 |
| LSTM#3 | 225 | 225,900 |
| LSTM#4 | 175 | 280,700 |
| LSTM#5 | 125 | 150,500 |
| LSTM#6 | 225 | 315,900 |
| LSTM#7 | 300 | 631,200 |
| Dense | 24 | 7224 |
Prediction errors obtained by the LSTM for the test set
| Metric | LSTM+Random | LSTM+CVOA |
|---|---|---|
| MAE (MW) | 398.7652 | 435.9883 |
| MAPE (%) | 1.4472 | 1.5898 |
| RMSE (MW) | 545.8998 | 585.1958 |
Fig. 4Evolution of the model training through 500 epochs
Fig. 5MAPE along with the standard deviation for each month of the test set
Fig. 6Distribution of the MAPE values for each month of the test set
Fig. 7Best daily prediction
Fig. 8Worst daily prediction
Fig. 9Hourly average of the predictions for test set
Fig. 10Monthly average of the absolute errors for the test set
MAPE obtained by the proposed LSTM, TFT, DFFN and other machine learning methods
| MAPE (%) | |
|---|---|
| LR | 7.3395 |
| DT | 2.8783 |
| GBT | 2.7190 |
| RF | 2.2005 |
| DFFN | 1.6769 |
| LSTM+CVOA | 1.5898 |
| TFT | 1.5148 |
| LSTM+Random | 1.4472 |