Joint Multi-Horizon Forecasting of Residential Electricity Demand and Price Using an LSTM–Transformer for Smart-Grid Energy Management
Open Access
- 17 November 2026
- journal article
- research article
- Published by MDPI AG in Electronics
- Vol. 15 (22) , 5345
Abstract
Accurate day-ahead forecasts of residential electricity demand and market prices are essential for demand response, economic scheduling, and reliable smart-grid operation. However, the nonlinear, nonstationary, and volatile dynamics of these variables make accurate joint forecasting challenging. This study develops and benchmarks an LSTM–Transformer hybrid for simultaneous 24-hour-ahead residential load and electricity-price forecasting. Six architectures—CNN, LSTM, Transformer, CNN–LSTM, CNN–Transformer, and LSTM–Transformer—were trained and evaluated under identical preprocessing, optimization, and chronological out-of-sample conditions using hourly data from 20 Pecan Street households in Austin, Texas, and ERCOT LZ-AEN real-time settlement-point prices from January 2018 to December 2022. A 24 h lookback window was used to predict the following 24 h, with the data divided chronologically into training, validation, and test sets in a 70:10:20 ratio. The proposed architecture combines stacked LSTM layers for sequential-memory representation with multi-head Transformer self-attention for capturing long-range temporal dependencies. On the test set, it achieved an MAE of 0.2771 kW, RMSE of 0.3573 kW, MAPE of 5.10%, and of 0.9859 for load forecasting, and an MAE of 0.0176 $/kWh, RMSE of 0.0232 $/kWh, MAPE of 4.85%, and of 0.9819 for price forecasting. Compared with the best-performing CNN–LSTM model, the proposed approach reduced RMSE by 15.8% for load and 27.7% for price. Residual diagnostics for the proposed model indicated low bias and stable error distributions, with near-zero mean residuals, low standard deviations, skewness close to zero, kurtosis near three, while strict normality is rejected because p is less than 0.001 and outlier rates are 0.34% for load and 0.28% for price. These results demonstrate that combining sequential memory with global attention improves forecasting accuracy and residual stability. The resulting forecasts can support flexible-load scheduling, EV charging, HVAC and water-heating control, battery peak shaving and arbitrage, and demand-response participation, thereby enabling more proactive, economical, and reliable demand-side energy management in smart grids.
Keywords
Funding Information
- Qassim University (QU-APC-2026)
This publication has 21 references indexed in Scilit:
- A Comparative Study of Multi-Step Forecasting Algorithms for Real-Time Load Profiling in Smelting Plant Electricity DemandIEEE Access, 2026
- Smart Hybrid Intelligence for Day-Ahead Energy Forecasting and Demand Response in Smart Grid2026
- Distribution-based residual analysis of load forecasting for enhanced anomaly detectionInternational Journal of Electrical Power & Energy Systems, 2025
- Transformer-based forecasting with synthetic input data generation for day-ahead electricity marketsJournal of King Saud University Computer and Information Sciences, 2025
- A Transformer based approach to electricity load forecastingThe Electricity Journal, 2024
- A Method of Short-Term Load Prediction of Renewable Energy Power System Based on CNNLSTM2022
- CNN-LSTM deep learning based forecasting model for COVID-19 infection cases in Nigeria, South Africa and BotswanaHealth and Technology, 2022
- Convolutional neural networks for breast cancer detection in mammography: A surveyComputers in Biology and Medicine, 2021
- Short-Term Electric Load Forecasting of Integrated Energy System Considering Nonlinear Synergy Between Different LoadsIEEE Access, 2021
- DCNN and LDA-RF-RFE Based Short-Term Electricity Load and Price Forecasting2019