Enhancing peak electricity demand forecasting for commercial buildings using novel LSTM loss functions

Heidi S. Nygård*, Sigurd Grøtan, Kjersti Rustad Kvisberg, Leonardo Rydin Gorjão, Thomas Martinsen

*Corresponding author for this work

Research output: Contribution to journalArticleAcademicpeer-review

Abstract

The increasing integration of variable renewable energy necessitates new measures for grid balancing and cost optimization. Consumers can contribute through demand response, provided accurate predictions, particularly during peak periods. This study aims to enhance electricity demand forecasting using a Long Short-Term Memory (LSTM) neural network with two novel loss functions: Weighted Mean Squared Error (WMSE) and Negative Log Likelihood (NLL). WMSE emphasizes high-demand periods, while NLL captures prediction uncertainty. The model, trained on two years of hourly data for Oslo Airport Gardermoen (Norway), incorporates temporal features, historical demand, passenger numbers, and outdoor air temperature. Optimal model architecture is determined through grid search and cross-validation. Results reveal that top-performing model configurations have minimal architecture, suggesting that a simple model is sufficient for capturing temporal and seasonal demand variations. Models trained with WMSE and NLL demonstrate reliable peak predictions and valuable uncertainty estimations, with the top performing model achieving a Mean Absolute Percentage Error (MAPE) of 5.54 ± 1.00 %. Visual inspections confirm reproducible daily demand patterns, including characteristic dual peaks and weekday-weekend distinctions. This research demonstrates that LSTM models are effective and easy to use for electricity demand forecasts, empowering consumers in making informed decisions about flexibility management and demand response strategies.
Original languageEnglish
Article number111722
JournalElectric Power Systems Research
Volume246
DOIs
Publication statusPublished - Sept 2025
Externally publishedYes

Fingerprint

Dive into the research topics of 'Enhancing peak electricity demand forecasting for commercial buildings using novel LSTM loss functions'. Together they form a unique fingerprint.

Cite this