Forecasting Day-Ahead Electricity Metrics with Artificial Neural Networks
Abstract
:1. Introduction
- Production cost models, which simulate agents operating in the market, with the goal to satisfy their demands at minimum cost.
- Game theory approaches, creating equilibrium models to build the price processes.
- Fundamental methods, which map the important physical and economic factors and their influence on the price of electricity market metrics.
- Econometric models, which work with statistical properties of the market metrics over time, to help make decisions in risk management and derivatives evaluation.
- Statistical approaches, implementing statistical and econometric models for forecasting (e.g., similar day, exponential smoothing…)
- Artificial intelligence techniques, which create non-parametric models based on computational intelligence such as fuzzy logic, support vector machines or artificial neural networks.
2. Materials and Methods
2.1. Datasets
2.2. Software and Data Windowing
- Given the total of 336 hourly day-ahead prices on the HUPX market for 14 consecutive days, forecast the 24 day-ahead hourly prices for the next day.
- Given the total of 336 hourly load values for 14 consecutive days, forecast the load for 24 h of the next day.
2.3. Objective Function, Evaluation and Comparison
- MAPE measured in EUR or MW, described as above, with denominators between −1 and 1 being replaced by 1 to increase numerical stability.
- MAE (mean average error) measured in standard deviations, and EUR or MW.
- MAE represented as a percentage of the mean value (MAE%) to give another description of the model precision.
2.4. ANN Architectures Tested
- A traditional neural network, with densely (fully) connected layers.
- A recurrent neural network (RNN) using LSTM cells, as a commonly used architecture for time series prediction, because of the ability of RNN to capture nonlinear short-term time dependencies [21].
2.4.1. Densely Connected Layers
2.4.2. Temporal Convolutional Layers
- The exact number of an hour in a day and a day in a week greatly influence the value to be predicted, which makes the pooling steps (such as max pooling), common to the convolutional networks, harder to model.
- On the other hand, a “similar day method”, looking through historical data to find the most similar day to today’s, to predict tomorrow as the day that followed that earlier day, has shown very good results in this field [1,5,6,26]. The pragmatic principle that guides this method underscores that the fact that two days are similar in this way convolutes many factors that contribute to this similarity but were not a part of the dataset.
2.4.3. RNN Layer with LSTM Cells
2.5. Benchmark Values: Naive Model and Linear Regression
3. Results
3.1. Electricity Price Prediction
3.2. Electricity Load Prediction
4. Discussion
- Creating more complete datasets, as stated above. When it comes to price prediction, it includes more complete weather data for countries participating in the market, weather forecast, supply and demand forecast, holiday and pre-holiday markers, and market prices of energy sources. When it comes to the consumption dataset, it mostly includes more complete weather data, weather forecasting, and better marking of pre-holidays and holidays.
- Exploring the potential increase in accuracy when using GRU (gated recurrent unit) instead of LSTM cells in RNN architectures. Research performed by Ugurlu and Oksuz [33] has shown the GRU achieving better accuracy when predicting electricity prices on the Turkish day-ahead market. Their experiments have shown that three-layer GRU structures display a statistically significant improvement in performance compared to other neural networks and statistical techniques for the Turkish market.
- Testing the effects of choosing Huber loss [20] as the objective function (instead of MSE) or introducing momentum or Nesterov momentum [36] into the gradient descent. Huber loss has been shown to be more robust than MSE when used on datasets with common anomalous spikes and dips, and the price dataset fits this description. Introducing momentum may increase training speed, which can be of great use in the future creation, testing, and comparison of algorithms.
- Re-training entire models on the unified training and validation set, or the entire set (training, validation, and test). This may lead to an increase in accuracy. Though not in line with the best practices of machine learning, training on the complete dataset may be of crucial importance to some time-series where the most recent data hide the most important conclusions [37]. The fact that user habits, regulation, and market conditions important for electricity trading often change may point to the most recent data in these especially important datasets, and training in this way significantly improves accuracy, though proving the existence of that improvement in the environment where test data were used for training becomes a problem of its own.
- Alternatively, instead of training on the entire dataset, roll-forward partitioning can be used [38] as an iterative method for training on almost the entire dataset while preserving the validation capabilities.
- Participants in market trading, as a tool to help plan and (partially or fully) automate trading process [39].
- Reversible plant operators, to optimally plan the accumulation and production of electricity [40].
- Operators of hydro and other power plants with accumulation [41], as a tool to achieve optimal performance and maximize profit.
- Smart house owners, to plan and automate the optimal work of devices [42].
- Owners of electric cars and house batteries (such as Tesla PowerWall), in order to plan for accumulation when the electricity price is low and usage (or returning to the grid for profit) when the price is high [17].
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Shahidehpour, M.; Yamin, H.; Li, Z. Market Operations in Electric Power Systems: Forecasting, Scheduling, and Risk Management; John Wiley & Sons: Hoboken, NJ, USA, 2003. [Google Scholar]
- Pavićević, M.; Popović, T. Forecasting Day-Ahead Electricity Price with Artificial Neural Networks: A Comparison of Architectures. In Proceedings of the 11th IEEE International Conference on Intelligent Data Acquisition and Advanced Computing Systems: Technology and Applications (IDAACS), Cracow, Poland, 22–25 September 2021; pp. 1083–1088. [Google Scholar]
- Graves, A.; Liwicki, M.; Fernández, S.; Bertolami, R.; Bunke, H.; Schmidhuber, J. A Novel Connectionist System for Unconstrained Handwriting Recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2009, 31, 855–868. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Yan, J.; Mu, L.; Wang, L.; Ranjan, R.; Zomaya, A.Y. Temporal Convolutional Networks for the Advance Prediction of ENSO. Sci. Rep. 2020, 10, 8055. [Google Scholar] [CrossRef] [PubMed]
- Weron, R. Modeling and Forecasting Electricity Loads and Prices: A Statistical Approach; John Wiley & Sons: Hoboken, NJ, USA, 2007. [Google Scholar]
- Weron, R. Electricity price forecasting: A review of the state-of-the-art with a look into the future. Int. J. Forecast. 2014, 30, 1030–1081. [Google Scholar] [CrossRef] [Green Version]
- Aggarwal, S.K.; Saini, L.M.; Kumar, A. Short term price forecasting in deregulated electricity markets: A review of statistical models and key issues. Int. J. Energy Sect. Manag. IJESM 2009, 3, 333–358. [Google Scholar] [CrossRef]
- Hewage, P.; Behera, A.; Trovati, M.; Pereira, E.; Ghahremani, M.; Palmieri, F.; Liu, Y. Temporal convolutional neural (TCN) network for an effective weather forecasting using time-series data from the local weather station. Soft Comput. 2020, 24, 16453–16482. [Google Scholar] [CrossRef] [Green Version]
- Hungarian Power Exchange. Available online: https://hupx.hu/en/# (accessed on 27 December 2021).
- ENTSO-E Transparency Platform. Available online: https://transparency.entsoe.eu/ (accessed on 27 December 2021).
- Keras: The Python Deep Learning API. Available online: https://keras.io/ (accessed on 27 December 2021).
- TensorFlow. Available online: https://www.tensorflow.org/ (accessed on 27 December 2021).
- Pandas—Python Data Analysis Library. Available online: https://pandas.pydata.org/ (accessed on 27 December 2021).
- NumPy. Available online: https://numpy.org/ (accessed on 27 December 2021).
- Brownlee, J. Deep Learning for Time Series Forecasting—Predict the Future with MLPs, CNNs and LSTMs in Python; 1.3; Machine Learning Mastery: San Francisco, CA, USA, 2018. [Google Scholar]
- Nielsen, M.A. Neural Networks and Deep Learning; Determination Press: San Francisco, CA, USA, 2015. [Google Scholar]
- Bouley, C. Recurrent Neural Networks for Electricity Price Prediction, Time-Series Analysis with Exogenous Variables; VTT Technical Research Centre of Finland: Espoo, Finland, 2020. [Google Scholar]
- Klešić, I. Prognoza Cijene Električne Energije; Sveučilište Josipa Jurja Strossmayera u Osijeku: Osijek, Croatia, 2018. [Google Scholar]
- Wagner, A.; Schnürch, S. Electricity Price Forecasting with Neural Networks on EPEX Order Books. Appl. Math. Financ. 2020, 27, 189–206. [Google Scholar]
- Grover, P. 5 Regression Loss Functions All Machine Learners Should Know. Available online: https://heartbeat.fritz.ai/5-regression-loss-functions-all-machine-learners-should-know-4fb140e9d4b0 (accessed on 20 July 2021).
- Lindemann, B.; Müller, T.; Vietz, H.; Jazdi, N.; Weyrich, M. A survey on long short-term memory networks for time series prediction. Procedia CIRP 2021, 99, 650–655. [Google Scholar] [CrossRef]
- Bai, S.; Kolter, J.Z.; Koltun, V. An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling. arXiv 2018, arXiv:1803.01271. [Google Scholar]
- Brownlee, J. A Gentle Introduction to the Rectified Linear Unit (ReLU). Available online: https://machinelearningmastery.com/rectified-linear-activation-function-for-deep-learning-neural-networks/ (accessed on 25 July 2021).
- Pedamonti, D. Comparison of non-linear activation functions for deep neural networks on MNIST classification task. arXiv 2018, arXiv:1804.02763. [Google Scholar]
- Srivastava, N.; Hinton, G.; Krizhevsky, A.; Sutskever, I.; Salakhutdinov, R. Dropout: A Simple Way to Prevent Neural Networks from Overfitting. J. Mach. Learn. Res. 2014, 15, 1929–1958. [Google Scholar]
- Bierbrauer, M.; Menn, C.; Rachev, S.T.; Trück, S. Spot and derivative pricing in the EEX power market. J. Bank. Financ. 2007, 31, 3462–3485. [Google Scholar] [CrossRef]
- Beigaitė, R.; Krilavičius, T. Electricity Price Forecasting for Nord Pool Data; IEEE: Kaunas, Lithuania, 2017; pp. 37–42. [Google Scholar]
- Ruiz, L.G.B.; Rueda, R.; Cuéllar, M.P.; Pegalajar, M.C. Energy consumption forecasting based on Elman neural networks with evolutive optimization. Expert Syst. Appl. 2018, 92, 380–389. [Google Scholar] [CrossRef]
- Abiodun, O.I.; Jantan, A.; Omolara, A.E.; Dada, K.V.; Mohamed, N.A.; Arshad, H. State-of-the-art in artificial neural network applications: A survey. Heliyon 2018, 4, e00938. [Google Scholar] [CrossRef] [Green Version]
- Brownlee, J. A Gentle Introduction to Long Short-Term Memory Networks by the Experts; Machine Learning Mastery: San Francisco, CA, USA, 2017. [Google Scholar]
- Gers, F.A.; Schmidhuber, J.; Cummins, F. Learning to Forget: Continual Prediction with LSTM. Neural Comput. 2000, 12, 2451–2471. [Google Scholar] [CrossRef] [PubMed]
- Olah, C. Understanding LSTM Networks. Available online: https://colah.github.io/posts/2015-08-Understanding-LSTMs/ (accessed on 25 July 2021).
- Ugurlu, U.; Oksuz, I. Electricity Price Forecasting Using Recurrent Neural Networks. Energies 2018, 11, 1255. [Google Scholar] [CrossRef] [Green Version]
- Ziel, F.; Steinert, R. Electricity price forecasting using sale and purchase curves: The X-Model. Energy Econ. 2016, 59, 435–454. [Google Scholar] [CrossRef] [Green Version]
- Nateghi, S.M.R. A Data-Driven Approach to Assessing Supply Inadequacy Risks Due to Climate-Induced Shifts in Electricity Demand. Risk Anal. 2019, 39, 673–694. [Google Scholar]
- Sutskever, I.; Martens, J.; Dahl, G.; Hinton, G. On the Importance of Initialization and Momentum in Deep Learning. In Proceedings of the 30th International Conference on Machine Learning, PMLR 28(3), Atlanta, GA, USA, 17–19 June 2013; pp. 1139–1147. [Google Scholar]
- Géron, A. Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, 2nd ed.; O’Reilly Media, Inc.: Sebastopol, CA, USA, 2019; ISBN 9781492032649. [Google Scholar]
- Cochrane, C. Time Series Nested Cross-Validation. Available online: https://towardsdatascience.com/time-series-nested-cross-validation-76adba623eb9 (accessed on 20 July 2021).
- Bayram, I.S.; Shakir, M.Z.; Abdallah, M.; Qaraqe, K. A Survey on Energy Trading in Smart Grid. In Proceedings of the 2014 IEEE Global Conference on Signal and Information Processing (GlobalSIP), Atlanta, GA, USA, 3–5 December 2014; pp. 258–262. [Google Scholar] [CrossRef] [Green Version]
- Čabarkapa, R.; Komatina, D.; Ćirović, G.; Petrović, D.; Vulić, M. Analysis of Day-Ahead Electricity Price Fluctuations in the Regional Market and the Perspectives of the Pumped Storage Hydro Power Plant “bistrica”; JP Elektroprivreda Srbije: Belgrade, Serbia, 2014. [Google Scholar]
- Dunn, R.I.; Hearps, P.J.; Wright, M.N. Molten-salt power towers: Newly commercial concentrating solar storage. Proc. IEEE 2012, 100, 504–515. [Google Scholar] [CrossRef]
- Morrison Sara Texas Heat Wave Overloads Power Grid, Causing Companies to Adjust Thermostats Remotely—Vox. Available online: https://www.vox.com/recode/22543678/smart-thermostat-air-conditioner-texas-heatwave (accessed on 1 August 2021).
- Danandeh Mehr, A.; Bagheri, F.; Safari, M.J.S. Electrical energy demand prediction: A comparison between genetic programming and decision tree. Gazi Univ. J. Sci. 2020, 33, 62–72. [Google Scholar] [CrossRef]
- Guo, J.J.; Luh, P.B. Improving market clearing price prediction by using a committee machine of neural networks. IEEE Trans. Power Syst. 2004, 19, 1867–1876. [Google Scholar] [CrossRef]
Mean | STD | Min | 50% | Max | |
---|---|---|---|---|---|
Price (EUR) | 46.408 | 20.453 | −113.67 | 44.59 | 300.1 |
Precipitation (mm) | 0.0726 | 0.1792 | 0 | 0.006 | 4.03 |
Temperature (C) | 11.528 | 10.0697 | −16.777 | 11.426 | 39.128 |
Snowfall (cm) | 0.0065 | 0.0388 | 0 | 0 | 1.5869 |
Snow mass (cm) | 0.9443 | 2.6921 | 0 | 0 | 25.074 |
Cloud cover % | 0.5228 | 0.3223 | 0 | 0.541 | 0.9988 |
Air density (kg/m3) | 1.2176 | 0.045 | 1.1108 | 1.2137 | 1.3662 |
Mean | STD | Min | 50% | Max | |
---|---|---|---|---|---|
Actual Load | 378.17 | 77.69 | 0.0 | 384.0 | 838 |
Forecasted Load | 386.32 | 78.06 | 0.0 | 373.0 | 629 |
Model | MSE (Std) | MAE (EUR) | MAE (Std) | MAPE | MAE (%) |
---|---|---|---|---|---|
naïve | 1.6676 | 18.03013 | 0.8815 | 50.0480 | 38.85116 |
Linear | 0.2688 | 7.74385 | 0.3786 | 21.2923 | 16.68639 |
Dense | 0.2199 | 6.96251 | 0.3404 | 20.1414 | 15.00276 |
TCN | 0.2186 | 7.10978 | 0.3476 | 20.6052 | 15.32010 |
TCN_dense | 0.2115 | 6.83161 | 0.3340 | 19.450 | 14.72069 |
LSTM | 0.2390 | 7.06683 | 0.3455 | 19.9769 | 15.22754 |
Dense_LSTM_dense | 0.2177 | 6.70070 | 0.3276 | 19.5300 | 14.43862 |
AR LSTM | 0.2423 | 7.21818 | 0.3529 | 21.2600 | 15.55369 |
Model | MSE (Std) | MAE (Std) | MAE (MW) | MAPE | MAE(%) | MAE% Δ Off. |
---|---|---|---|---|---|---|
Naive | 2.0300 | 1.0459 | 81.1417 | 24.3706 | 21.4539 | 14.8974 |
Linear | 0.1344 | 0.2813 | 21.8234 | 6.1125 | 5.7699 | −0.7859 |
Dense | 0.1017 | 0.2472 | 19.1779 | 5.5690 | 5.0705 | −1.4854 |
TCN | 0.0628 | 0.1921 | 14.9032 | 4.2585 | 3.9403 | −2.6156 |
TCN_dense | 0.0648 | 0.1906 | 14.7869 | 4.1269 | 3.9095 | −2.6463 |
LSTM | 0.0684 | 0.1989 | 15.4308 | 4.4730 | 4.0798 | −2.4761 |
Dense_LSTM_dense | 0.0651 | 0.1927 | 14.9498 | 4.2285 | 3.9526 | −2.6033 |
AR LSTM | 0.0789 | 0.2198 | 17.0522 | 5.01 | 4.5085 | −2.0474 |
Official | 0.1617 | 0.3196 | 24.7961 | 7.8306 | 6.5559 | / |
Official Prediction | MSE (Std) | MAE (Std) | MAE (MW) | MAPE | MAE% |
---|---|---|---|---|---|
Full dataset | 0.0834 | 0.2114 | 16.4026 | 4.7091 | 4.3367 |
Test dataset | 0.1617 | 0.3196 | 24.7961 | 7.8306 | 6.5559 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 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/).
Share and Cite
Pavićević, M.; Popović, T. Forecasting Day-Ahead Electricity Metrics with Artificial Neural Networks. Sensors 2022, 22, 1051. https://doi.org/10.3390/s22031051
Pavićević M, Popović T. Forecasting Day-Ahead Electricity Metrics with Artificial Neural Networks. Sensors. 2022; 22(3):1051. https://doi.org/10.3390/s22031051
Chicago/Turabian StylePavićević, Milutin, and Tomo Popović. 2022. "Forecasting Day-Ahead Electricity Metrics with Artificial Neural Networks" Sensors 22, no. 3: 1051. https://doi.org/10.3390/s22031051
APA StylePavićević, M., & Popović, T. (2022). Forecasting Day-Ahead Electricity Metrics with Artificial Neural Networks. Sensors, 22(3), 1051. https://doi.org/10.3390/s22031051