Research Article

A PyTorch-Based Long Short-Term Memory (LSTM) Model for Short-Term Electricity Load Forecasting in South Australia

Wenjun Guo*
Adelaide University

* Corresponding author: [email protected]

Abstract

Accurate electricity load forecasting is important for power system operation, energy planning and demand management. With the increasing use of data-driven methods, deep learning models have become useful tools for analysing complex electricity demand patterns. This study develops a PyTorch-based LSTM model for short-term electricity load forecasting, using South Australian electricity demand data from 2024. The original dataset consists of chronological five-minute demand records, and total electricity demand is selected as the target variable. Missing values were checked, the demand series was normalised using training-set statistics, and supervised learning samples were generated by a sliding window method. In the proposed model, the previous 24 five-minute demand observations are used to predict the next demand value. The dataset is divided into training, validation and testing subsets in chronological order. The model is trained using mean squared error loss and the Adam optimiser with a step learning-rate schedule. The results show that the LSTM model can follow the main movement of electricity demand, but the prediction curve is smoother than the actual curve and some short-term fluctuations remain difficult to capture. This limitation is mainly caused by the use of a simple univariate input, because weather, calendar, electricity price and renewable generation variables are not included. Future work should introduce multivariate features, compare LSTM against benchmark models such as GRU and ARIMA, and test longer input windows to further improve forecasting accuracy.

Keywords: Electricity load forecasting; Long Short-Term Memory (LSTM); PyTorch; Time series prediction; South Australia
Published: August 18, 2026
DOI: 10.54254/2755-2721/2026.AST36187
Volume: ACE Vol.255
pp. 69-75
Download PDF

References

  1. Australian Energy Market Operator. (2024). Aggregated price and demand data.National Electricity Market Data Portal.
  2. Akhtar, S., Ahmad, H., Khan, A., & Hassan, M. (2023). Short-term load forecasting models: A review of challenges, progress, and the road ahead.Energies, 16(10), 4060.
  3. Ullah, K., Qaisar, S. B., & Ali, M. (2024). Short-term load forecasting: A comprehensive review and simulation study with CNN-LSTM hybrids approach.IEEE Access.
  4. Abumohsen, M., Owda, A., & Owda, M. (2023). Electrical load forecasting using LSTM, GRU, and RNN algorithms.Energies, 16(5), 2283.
  5. Dong, Q., Wu, Y., & Pinson, P. (2024). Short-term electricity-load forecasting by deep learning.arXiv preprint arXiv:2408.16202.
  6. Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory.Neural Computation, 9(8), 1735–1780.
  7. Zhou, Y., Zhang, J., & Wang, L. (2024). A short-term electricity load forecasting method integrating empirical mode decomposition and long short-term memory neural network.Frontiers in Energy Research, 12.
  8. Paszke, A., et al. (2019). PyTorch: An imperative style, high-performance deep learning library. InAdvances in Neural Information Processing Systems (Volume 32).
  9. Kingma, D. P., & Ba, J. (2015). Adam: A method for stochastic optimization. InInternational Conference on Learning Representations.
  10. Sen, D., Chakraborty, I., Kundu, S., Reiman, A. P., Beil, I., & Eiden, A. (2022). KPF-AE-LSTM: A deep probabilistic model for net-load forecasting in high solar scenarios.arXiv preprint arXiv:2203.04401.
  11. Yang, W., Sparrow, S. N., & Wallom, D. C. H. (2023). A generalised multi-factor deep learning electricity load forecasting model for wildfire-prone areas.arXiv preprint arXiv:2304.10686.
  12. [1] Zhao, X., Li, Y., & Chen, H. (2025). Research on a short-term power load forecasting method based on a three-channel LSTM-CNN hybrid model.Electronics, 14(11), 2262.