A Deep Learning Framework for Heat Demand Forecasting using Time-Frequency Representations of Decomposed Features
Abstract
District Heating Systems are essential infrastructure for delivering heat to consumers across a geographic region sustainably, yet efficient management relies on optimizing diverse energy sources, such as wood, gas, electricity, and solar, in response to fluctuating demand. Aligning supply with demand is critical not only for ensuring reliable heat distribution but also for minimizing carbon emissions and extending infrastructure lifespan through lower operating temperatures. However, accurate multi-step forecasting to support these goals remains challenging due to complex, non-linear usage patterns and external dependencies. In this work, we propose a novel deep learning framework for day-ahead heat demand prediction that leverages time-frequency representations of historical data. By applying Continuous Wavelet Transform to decomposed demand and external meteorological factors, our approach enables Convolutional Neural Networks to learn hierarchical temporal features that are often inaccessible to standard time domain models. We systematically evaluate this method against statistical baselines, state-of-the-art Transformers, and emerging foundation models using multi-year data from three distinct Danish districts, a Danish city, and a German city. The results show a significant advancement, reducing the Mean Absolute Error by 36% to 43% compared to the strongest baselines, achieving forecasting accuracy of up to 95% across annual test datasets. Qualitative and statistical analyses further confirm the accuracy and robustness by reliably tracking volatile demand peaks where others fail. This work contributes both a high-performance forecasting architecture and critical insights into optimal feature composition, offering a validated solution for modern energy applications.
Figures & tables
| Feature Type | Feature | Spearman Correlation Coefficient ( ) | ||
| DMA A | DMA B | DMA C | ||
| Consumption | Lag of 24 hours ( ) | 0.973 | 0.975 | 0.970 |
| Lag of 168 hours ( ) | 0.923 | 0.920 | 0.918 | |
| Weather | Temperature ( ) | -0.907 | -0.914 | -0.911 |
| Minimum temperature ( ) | -0.902 | -0.910 | -0.907 | |
| Maximum temperature ( ) | -0.921 | -0.927 | -0.924 | |
| Layer | Operator | Output Dimension | Kernel | Stride | Padding |
| Input | - | 24 24 | - | - | - |
| Convolution 1 | Conv2D + ReLU | 24 24 32 | 3 3 | 1 | 1 (Same) |
| Convolution 2 | Conv2D + ReLU | 24 24 64 | 3 3 | 1 | 1 (Same) |
| Convolution 3 | Conv2D + ReLU | 24 24 128 | 3 3 | 1 | 1 (Same) |
| Flatten | Flatten | 73728 | - | - | - |
| Dense 1 | Dense + LeakyReLU | 1024 | - | - | - |
| Feature Type | Original Vector | Decomposed Components | Decomposed Vector |
| Consumption | Seasonal, Trend, Residual | ||
| Weather | Trend, Residual |
| DMA | Features | MAE (kWh) | MAPE (%) | MSE ( kWh 2 ) |
| DMA A | ||||
| DMA B | ||||
| DMA C | ||||
| Model Features | MAE (kWh) | MAPE (%) | MSE (kWh ) |
| Model Features | MAE (kWh) | MAPE (%) | MSE (kWh ) |
| 195.2 104.3 | 5.21 2.57 | 7.22 7.43 |
| Model Features | MAE (kWh) | MAPE (%) | MSE (kWh ) |
| DMA | Features | MSE (kWh ) | MAPE (%) | MAE (kWh) | |||
| Original | Decomposed | Original | Decomposed | Original | Decomposed | ||
| DMA A | 3.58 | 2.64 | 6.41 | 5.47 | 127.0 | 106.1 | |
| 3.71 | 2.68 | 6.58 | 5.53 | 129.1 | 105.7 | ||
| 3.21 | 2.39 | 6.45 | 5.50 | 122.7 | 102.8 | ||
| 3.65 | 2.64 | 6.72 | 5.67 | 130.4 | 107.1 | ||
| 3.33 | 2.69 | 6.22 | 5.68 | 123.4 | 108.6 | ||
| DMA | Features | MSE (kWh ) | MAPE (%) | MAE (kWh) | Wilcoxon Signed-Rank Test p-value |
| DMA A | 2.45 | 5.37 | 101.7 | ||
| With Time Features ( ) | 2.44 | 5.50 | 103.0 | ||
| DMA B | 5.35 | 4.46 | 165.5 | ||
| With Time Features ( ) | 5.93 | 4.93 | 176.3 | ||
| DMA C | 4.43 | 4.65 | 152.6 | 0.035 | |
| With Time Features ( ) | 5.06 | 4.90 | 161.0 |
| DMA | Holiday Handling Method | MSE ( kWh 2 ) | MAPE (%) | MAE (kWh) |
| DMA A | ||||
| DMA B | ||||
| Architecture | DMA A | DMA B | DMA C | ||||||
| MAE | MAPE | MSE | MAE | MAPE | MSE | MAE | MAPE | MSE | |
| Preformer | |||||||||
| Autoformer | |||||||||
| Informer | |||||||||
| TTM Fine-tuned | |||||||||
| LSTM | |||||||||
| Abbreviations | |||
| AIC | Akaike Information Criterion | MAE | Mean Absolute Error |
| CNN | Convolutional Neural Network | MAPE | Mean Absolute Percentage Error |
| CWT | Continuous Wavelet Transform | ML | Machine Learning |
| DHS | District Heating Systems | MLP | Multi-Layer Perceptron |
| DL | Deep Learning | MLR | Multiple Linear Regression |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Hyperparameter | Search Space / Grid | Selected Value |
| Training Dynamics | ||
| Learning Rate ( ) | ||
| Batch Size | ||
| Feature Transformation | ||
| mexh, morl | morl (DMA A, C) gaus8 (DMA B) | |
| Mother Wavelet Candidate | gaus1-gaus8, cgau1-cgau8 |
| Dataset | Training Time (min) | Inference Latency (ms/sample) |
| DMA A | ||
| DMA B | ||
| DMA C | ||
| Average |
| Hyperparameter | Search Space | Selected Value |
| N Estimators | {200, 400, 600, 800, 1000, 1500, 2000} | 200 |
| Learning Rate | {0.1, 0.01, 0.001, 0.0001} | 0.1 |
| Maximum Depth | {2, 4, 6, 8, 10, 12, 24} | 4 |
| Subsample | [0.6, 0.7, 0.8, 0.9, 1.0] | 0.8 |
| Hyperparameter | Search Space | Selected Value |
| LSTM Layers | {1, 2, 4} | 4 |
| LSTM Hidden Units | {16, 32, 64, 128} | 32 |
| Learning Rate | {1e-4, 5e-4, 1e-3} | 1e-3 |
| Hyperparameter | Search Space | Informer | Autoformer | PatchTST | DLinear | TimesNet | TimeMixer |
| General Training Parameters | |||||||
| Learning Rate | {0.01, 0.001, 0.0001} | 0.0001 | 0.0001 | 0.0001 | 0.001 | 0.0001 | 0.001 |
| Dropout | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | |
| Common Architectural Parameters | |||||||
| {32, 64, 256, 512, 1024} | 512 | 1024 | 512 | – | 1024 | 32 | |
| {4, 6, 8, 10} | 6 | 8 | 8 | – | 8 | – | |
| Date (2019) | Day of the Week | Danish Name | English Translation |
| 2019-01-01 | Tuesday | Nytårsdag | New Year’s Day |
| 2019-04-18 | Thursday | Skærtorsdag | Maundy Thursday |
| 2019-04-19 | Friday | Langfredag | Good Friday |
| 2019-04-21 | Sunday | Påskedag | Easter Sunday |
| 2019-04-22 | Monday | Anden påskedag | Easter Monday |
| 2019-05-17 | Friday | Store bededag | Great Prayer Day |
Time Series Forecasting
Time series forecasting predicts future values from ordered observations using statistical, neural, and probabilistic models to support decisions under uncertainty.
See all 858 papers