Short-Term Load Forecasting for Hospitals Using Transformer-Based Deep Learning with Temporal Memory and Statistics Features
Main Article Content
Abstract
Reliable electricity is vital for hospitals, where even short disruptions can affect patient safety and daily operations. This paper presents a single-hospital case study on short-term load forecasting using real half-hourly data from Mae Moh Hospital in Thailand, covering October 2023 to February 2025. To avoid future data leakage and improve model robustness, we design a leakage-aware feature-engineering pipeline that integrates time-of-day cycles, operational context (weekend, holiday, working hour), and temporal memory with statistical features. A 48-step input window (24 hours) is used to predict the next two steps (+30, +60 minutes). We evaluate several compact Transformer-based hybrids (Transformer+LSTM, Transformer+GRU, Transformer+CNN) against baseline methods. Results show that the Transformer+LSTM achieves the best performance (RMSE = 0.45426, MAE = 0.26388, R2 = 0.92571), capturing both daily cycles and fine-grained transitions in hospital demand. The proposed work flow is reproducible and practical for real-world use, enabling hospitals to improve energy planning and prepare for integration into future Virtual Power Plant (VPP) programs.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
This journal provides immediate open access to its content on the principle that making research freely available to the public supports a greater global exchange of knowledge.
- Creative Commons Copyright License
The journal allows readers to download and share all published articles as long as they properly cite such articles; however, they cannot change them or use them commercially. This is classified as CC BY-NC-ND for the creative commons license.
- Retention of Copyright and Publishing Rights
The journal allows the authors of the published articles to hold copyrights and publishing rights without restrictions.
References
K. Thampanishvong and B. Limmeechokchai, “Reviews
of low carbon scenarios, carbon neutrality,
and net zero emissions in thailand: impacts on
greenhouse gas emissions and the macroeconomy,”
Asian Economic Papers, vol. 22, no. 3, pp.
-45, 2023.
R. Lorm and B. Limmeechokchai, “Thailand net
zero emissions 2050: Analyses of decarbonized energy
system beyond the ndc.” International Energy
Journal, vol. 24, no. 2, 2024.
D. Pudjianto, C. Ramsay, and G. Strbac, “Virtual
power plant and system integration of distributed
energy resources,” IET Renewable power generation,
vol. 1, no. 1, pp. 10-16, 2007.
S. Ghavidel, L. Li, J. Aghaei, T. Yu, and J. Zhu, “A
review on the virtual power plant: Components
and operation systems,” 2016 IEEE international
conference on power system technology (POWERCON).
IEEE, 2016, pp. 1-6.
S. Abdelkader, J. Amissah, and O. AbdelRahim,
“Virtual power plants: an in-depth analysis of their
advancements and importance as crucial players in
modern power systems,” Energy, Sustainability and
Society, vol.14, no. 1, p. 52, 2024.
A. Bagnasco, F. Fresi, M. Saviozzi, F. Silvestro, and
A. Vinci, “Electrical consumption forecasting in
hospital facilities: An application case,” Energy and
Buildings, vol. 103, pp. 261-270, 2015.
L. Cao, Y. Li, J. Zhang, Y. Jiang, Y. Han, and
J. Wei, “Electrical load prediction of healthcare
buildings through single and ensemble learning,”
Energy Reports, vol. 6, pp. 2751-2767, 2020.
C. Deb, F. Zhang, J. Yang, S. E. Lee, and K. W. Shah,
“A review on time series forecasting techniques
for building energy consumption,” Renewable and
Sustainable Energy Reviews, vol. 74, pp.902-924,
A. Koç and S. U. Seçkiner, “Analysing and forecasting
the energy consumption of healthcare facilities
in the short and medium term: a case study,”
Operations Research and Decisions, vol. 34, no. 3, pp.
-192, 2024.
Y. Mizuno, Y. Tanaka, F. Kurokawa, and N. Matsui,
“A hospital grid with renewable energy system
applied to virtual power plant,” 2020 8th International
Conference on Smart Grid (icSmartGrid).
IEEE, 2020, pp. 203-207.
D. Morinigo-Sotelo, O. Duque-Perez, L. Garcia-
Escudero, M. Fernandez-Temprano, P. Fraile-
Llorente, M. Riesco-Sanz, A. Zorita-Lamadrid et al.,
“Short-term hourly load forecasting of a hospital
using an artificial neural network,” International
Conference on Renewable Energies and Power Quality,
vol. 1, 2011, p. 355.
J. W. Taylor, “Short-term electricity demand forecasting
using double seasonal exponential smoothing,”
Journal of the Operational Research Society,
vol. 54, no. 8, pp. 799-805, 2003.
J. W. Taylor, “Short-term load forecasting with exponentially
weighted methods,” IEEE transactions
on Power Systems, vol. 27, no. 1, pp. 458-464, 2011.
R. Weron, Modeling and forecasting electricity loads
and prices: A statistical approach. John Wiley &
Sons, 2006.
T. Hong and S. Fan, “Probabilistic electric load forecasting:
A tutorial review,” International Journal of
Forecasting, vol. 32, no. 3, pp. 914-938, 2016.
Y. Wei, X. Zhang, Y. Shi, L. Xia, S. Pan, J.
Wu, M. Han, and X. Zhao, “A review of datadriven
approaches for prediction and classification
of building energy consumption,” Renewable and
Sustainable Energy Reviews, vol.82, pp. 1027-1047,
M. Bourdeau, X. qiang Zhai, E. Nefzaoui, X.
Guo, and P. Chatellier, “Modeling and forecasting
building energy consumption: A review of datadriven
techniques,” Sustainable Cities and Society,
vol. 48, p. 101533, 2019.
T. A. Abd’Azeez and L. Olatomiwa, “A machine
learning-powered energy consumption prediction
system with api,” Journal of Electrical Systems and
Information Technology, vol. 12, no. 1, p. 50, 2025.
M. S. Mahmud and M. H. Chowdhury, “A smart
system for monthly electrical energy consumption
prediction using machine learning,” International
Journal of Information Engineering and Electronic
Business (IJIEEB), vol. 16, no. 6, pp.42-61, 2024.
H. S. Hippert, C. E. Pedreira, and R. C. Souza,
“Neural networks for short-term load forecasting:
A review and evaluation,” IEEE Transactions on
power systems, vol. 16, no. 1, pp. 44-55, 2002.
S. Bai, J. Z. Kolter, and V. Koltun, “An empirical
evaluation of generic convolutional and recurrent
networks for sequence modeling,” arXiv preprint
arXiv:1803.01271, 2018.
D. Salinas, V. Flunkert, J. Gasthaus, and T.
Januschowski, “Deepar: Probabilistic forecasting
with autoregressive recurrent networks,” International
journal of forecasting, vol. 36, no. 3, pp. 1181-
, 2020.
B. N. Oreshkin, D. Carpov, N. Chapados, and Y.
Bengio, “N-beats: Neural basis expansion analysis
for interpretable time series forecasting,” arXiv
preprint arXiv:1905.10437, 2019.
B. Lim, S. Ö. Ar𝚤k, N. Loeff, and T. Pfister, “Temporal
fusion transformers for interpretable multihorizon
time series forecasting,” International journal
of forecasting, vol. 37, no. 4, pp.1748-1764, 2021.
H. Zhou, S. Zhang, J. Peng, S. Zhang, J. Li,
H. Xiong, and W. Zhang, “Informer: Beyond
efficient transformer for long sequence time-series
forecasting,” Proceedings of the AAAI conference
on artificial intelligence, vol. 35, no. 12, 2021, pp.
-11115.
H. Wu, J. Xu, J. Wang, and M. Long, “Autoformer:
Decomposition transformers with autocorrelation
for long-term series forecasting,” Advances
in neural information processing systems,
vol. 34, pp. 22419-22430, 2021.
T. Zhou, Z. Ma, Q. Wen, X. Wang, L. Sun, and R.
Jin, “Fedformer: Frequency enhanced decomposed
transformer for long-term series forecasting,” International
conference on machine learning. PMLR,
, pp. 27268-27286.
Y. Nie, N. H. Nguyen, P. Sinthong, and J.
Kalagnanam, “A time series is worth 64 words:
Long-term forecasting with transformers,” arXiv
preprint arXiv:2211.14730, 2022.
X. Li, Y. Zhong, W. Shang, X. Zhang, B. Shan,
and X. Wang, “Total electricity consumption forecasting
based on transformer time series models,”
Procedia Computer Science, vol. 214, pp. 312-320,
Y. Liu, R. Zheng, M. Liu, J. Zhu, X. Zhao, and M.
Zhang, “Short-term load forecasting model based
on time series clustering and transformer in smart
grid,” Electronics, vol. 14, no. 2, p. 230, 2025.