Transformer Implementation for Short Term Electricity Load Forecasting, Case Study: Bali, Indonesia

Arionmaro Asi Simaremare, Indra A Aditya, Didit Adytia, Isman Kurniawan


Short term load forecasting is a crucial process in ensuring optimal and reliable operation of electric power system which is critical in sustaining highly technological economies. Various approaches and methods have been implemented in forecasting electricity load of a system including statistical methods such as auto regression and machine learning methods such as support vector machine and also deep learning methodology as recurrent neural network methodology which gain popularity in electricity load forecasting nowadays. In this paper, Transformer as a deep learning methodology is used to forecast hourly electricity load in Bali Area. Three lookback days scenario and ten days of forecast period are used to evaluate the performance of the Transformer models. This study suggest that although higher lookback days will give more complicated model due to increasing number of parameters involved, the best overall prediction performance are given by transformer model with 1 day of lookback period. The three model in this study also tend to have low prediction performance in predicting electricity load for weekend or holiday period. Future study using multivariate transformer model is suggested to improve the prediction performance of the transformer model in predicting electricity load in Bali area.

Full Text:



A. SS, “ Electric power is the main driving force for industrialization,†2015. (accessed Nov. 13, 2022).

A. Dedinec, S. Filiposka, A. Dedinec, and L. Kocarev, “Deep belief network based electricity load forecasting: An analysis of Macedonian case,†Energy, vol. 115, pp. 1688–1700, Nov. 2016, doi: 10.1016/J.ENERGY.2016.07.090.

A. Hussain, M. Rahman, and J. A. Memon, “Forecasting electricity consumption in Pakistan: the way forward,†Energy Policy, vol. 90, pp. 73–80, Mar. 2016, doi: 10.1016/J.ENPOL.2015.11.028.

J. Steinbuks, J. de Wit, A. Kochnakyan, and V. Foster, “Forecasting Electricity Demand,†Forecasting Electricity Demand: An Aid for Practitioners, 2017, doi: 10.1596/26189.

M. Uz Zaman, A. Islam, and N. Sultana, “Short term load forecasting based on Internet of Things (IoT),†2018, Accessed: Nov. 13, 2022. [Online]. Available:

C. Kumar and M. Veerakumari, “Load Forecasting of Andhra Pradesh Grid using PSO, DE Algorithms,†undefined, 2012.

J. Zhang, Y. M. Wei, D. Li, Z. Tan, and J. Zhou, “Short term electricity load forecasting using a hybrid model,†Energy, vol. 158, pp. 774–781, Sep. 2018, doi: 10.1016/J.ENERGY.2018.06.012.

E. A. Madrid and N. Antonio, “Short-Term Electricity Load Forecasting with Machine Learning,†Information 2021, Vol. 12, Page 50, vol. 12, no. 2, p. 50, Jan. 2021, doi: 10.3390/INFO12020050.

G. A. N. Mbamalu and M. E. El-Hawary, “Load Forecasting Via Suboptimal Seasonal Autoregressive Models and Iteratively Reweighted Least Squares Estimation,†IEEE Transactions on Power Systems, vol. 8, no. 1, pp. 343–348, 1993, doi: 10.1109/59.221222.

S. R. Huang, “Short-term load forecasting using threshold autoregressive models,†IEE Proceedings: Generation, Transmission and Distribution, vol. 144, no. 5, pp. 477–481, 1997, doi: 10.1049/IP-GTD:19971144.

J. F. Chen, W. M. Wang, and C. M. Huang, “Analysis of an adaptive time-series autoregressive moving-average (ARMA) model for short-term load forecasting,†Electric Power Systems Research, vol. 34, no. 3, pp. 187–196, Sep. 1995, doi: 10.1016/0378-7796(95)00977-1.

A. Tarsitano and I. L. Amerise, “Short-term load forecasting using a two-stage sarimax model,†Energy, vol. 133, pp. 108–114, Aug. 2017, doi: 10.1016/J.ENERGY.2017.05.126.

N. Shirzadi, A. Nizami, M. Khazen, and M. Nik-Bakht, “Medium-Term Regional Electricity Load Forecasting through Machine Learning and Deep Learning,†Designs 2021, Vol. 5, Page 27, vol. 5, no. 2, p. 27, Apr. 2021, doi: 10.3390/DESIGNS5020027.

Q. Li, P. Ren, and Q. Meng, “Prediction model of annual energy consumption of residential buildings,†2010 International Conference on Advances in Energy Engineering, ICAEE 2010, pp. 223–226, 2010, doi: 10.1109/ICAEE.2010.5557576.

R. K. Jain, K. M. Smith, P. J. Culligan, and J. E. Taylor, “Forecasting energy consumption of multi-family residential buildings using support vector regression: Investigating the impact of temporal and spatial monitoring granularity on performance accuracy,†Appl Energy, vol. 123, pp. 168–178, Jun. 2014, doi: 10.1016/J.APENERGY.2014.02.057.

M. del Carmen Ruiz-Abell n, A. Gabaldón, and A. Guillamón, “Load Forecasting for a Campus University Using Ensemble Methods Based on Regression Trees,†Energies 2018, Vol. 11, Page 2038, vol. 11, no. 8, p. 2038, Aug. 2018, doi: 10.3390/EN11082038.

S. Bouktif, A. Fiaz, A. Ouni, and M. A. Serhani, “Optimal Deep Learning LSTM Model for Electric Load Forecasting using Feature Selection and Genetic Algorithm: Comparison with Machine Learning Approaches †,†Energies 2018, Vol. 11, Page 1636, vol. 11, no. 7, p. 1636, Jun. 2018, doi: 10.3390/EN11071636.

Ksh. Nilakanta Singh and Kh. Robindro Singh, “A Review on Deep Learning Models for Short-Term Load Forecasting,†pp. 705–721, 2021, doi: 10.1007/978-981-16-3067-5_53.

M. N. Fekri, H. Patel, K. Grolinger, and V. Sharma, “Deep learning for load forecasting with smart meter data: Online Adaptive Recurrent Neural Network,†Appl Energy, vol. 282, p. 116177, Jan. 2021, doi: 10.1016/J.APENERGY.2020.116177.

Y. Tian, L. Sehovac, and K. Grolinger, “Similarity-Based Chained Transfer Learning for Energy Forecasting with Big Data,†IEEE Access, vol. 7, pp. 139895–139908, 2019, doi: 10.1109/ACCESS.2019.2943752.

L. Sehovac and K. Grolinger, “Deep Learning for Load Forecasting: Sequence to Sequence Recurrent Neural Networks with Attention,†IEEE Access, vol. 8, pp. 36411–36426, 2020, doi: 10.1109/ACCESS.2020.2975738.

C. Wang, Y. Wang, Z. Ding, T. Zheng, J. Hu, and K. Zhang, “A Transformer-Based Method of Multienergy Load Forecasting in Integrated Energy System,†IEEE Trans Smart Grid, vol. 13, no. 4, pp. 2703–2714, Jul. 2022, doi: 10.1109/TSG.2022.3166600.

A. L’heureux, K. Grolinger, and M. A. M. Capretz, “Transformer-Based Model for Electrical Load Forecasting,†Energies 2022, Vol. 15, Page 4993, vol. 15, no. 14, p. 4993, Jul. 2022, doi: 10.3390/EN15144993.

A. Vaswani et al., “Attention Is All You Need,†Adv Neural Inf Process Syst, vol. 2017-December, pp. 5999–6009, Jun. 2017, doi: 10.48550/arxiv.1706.03762.



  • There are currently no refbacks.