Data-driven Insights for Informed Decision-Making: Applying LSTM Networks for Robust Electricity Forecasting in Libya

PDF (2427KB), PP.65-89

Views: 0 Downloads: 0

Author(s)

Asma Agaal 1 Mansour Essgaer 2,* Hend M. Farkash 3 Zulaiha Ali Othman 4

1. Artificial Intelligence Department, Faculty of Technical Sciences, Sabha, Libya

2. Artificial Intelligence Department, Faculty of Information Technology, Sebha University, Sabha, Libya

3. The Faculty of Electrical & Electronics Technology Benghazi, Libya

4. Research Center of Artificial Intelligent Technology, Faculty of Information Science and Technology, University Kebangsaan Malaysia, Malaysia, Selangor, Malaysia

* Corresponding author.

DOI: https://doi.org/10.5815/ijisa.2025.03.05

Received: 24 Nov. 2024 / Revised: 25 Jan. 2025 / Accepted: 1 Mar. 2025 / Published: 8 Jun. 2025

Index Terms

Time Series Analysis, Electricity Forecasting, Load Forecasting, Generation Forecasting, Deficit Forecasting, Energy Management, North Benghazi Power Plant

Abstract

Accurate electricity forecasting is vital for grid stability and effective energy management, particularly in regions like Benghazi, Libya, which face frequent load shedding, generation deficits, and aging infrastructure. This study introduces a data-driven framework to forecast electricity load, generation, and deficits for 2025 using historical data from two distinct years: 2019 (an instability year) and 2023 (a stability year). Various time series models were employed, including Autoregressive Integrated Moving Average (ARIMA), seasonal ARIMA, dynamic regression ARIMA, extreme gradient boosting, simple exponential smoothing, and Long Short-Term Memory (LSTM) neural networks. Data preprocessing steps—such as missing value imputation, outlier smoothing, and logarithmic transformation—are applied to enhance data quality. Model performance was evaluated using metrics such as mean squared error, root mean squared error, mean absolute error, and mean absolute percentage error. LSTM outperformed other models, achieving the lowest mentioned metric values for forecasting load, generation, and deficits, demonstrating its ability to handle non-stationarity, seasonality, and extreme events. The study’s key contribution is the development of an optimized LSTM framework tailored to North Benghazi’s electricity patterns, incorporating a rich dataset and exogenous factors like temperature and humidity. These findings offer actionable insights for energy policymakers and grid operators, enabling proactive resource allocation, demand-side management, and enhanced grid resilience. The research highlights the potential of advanced machine learning techniques to address energy-forecasting challenges in resource-constrained regions, paving the way for a more reliable and sustainable electricity system.

Cite This Paper

Asma Agaal, Mansour Essgaer, Hend M. Farkash, Zulaiha Ali Othman, "Data-driven Insights for Informed Decision-Making: Applying LSTM Networks for Robust Electricity Forecasting in Libya", International Journal of Intelligent Systems and Applications(IJISA), Vol.17, No.3, pp.65-89, 2025. DOI:10.5815/ijisa.2025.03.05

Reference

[1]Gallegos, J., et al., Sustainable electrification—advances and challenges in electrical-distribution networks: a review. 2024. 16(2): p. 698.
[2]Impram, S., S.V. Nese, and B.J.E.S.R. Oral, Challenges of renewable energy penetration on power system flexibility: A survey. 2020. 31: p. 100539.
[3]Dwivedi, D., P.K. Yemula, and M.J.R.E.F. Pal, Evaluating the planning and operational resilience of electrical distribution systems with distributed energy resources using complex network theory. 2023. 46: p. 156-169.
[4]Haugen, M., et al., Representation of uncertainty in market models for operational planning and forecasting in renewable power systems: a review. 2023: p. 1-36.
[5]Farkash, H.M., et al., Machine learning methods for medium-term load forecasting Study on the North Benghazi stations of the General Electricity Company in eastern Libya. 2024.
[6]Almaktar, M.A.M., A. Elbreki, and M.J.J.o.C.P. Shaaban, Revitalizing operational reliability of the electrical energy system in Libya: Feasibility analysis of solar generation in local communities. 2020. 279: p. 123647 - 123647.
[7]Farkash, H.M., et al., Medium-Term Load Forecasting for The City of Benghazi Using an Artificial Neural Network Based Time Series Approach. 2023: p. 341-347.
[8]Shamatah, H., et al., The potential of the rooftop grid-connected PV systems in Benghazi. 2017: p. 1-6.
[9]Asharaa, A.S. An Assessment of Renewable Energy Sources (RES) Potential in Libya: An Overview”. 2020.
[10]Kassem, Y., H. Çamur, and R.A.F.J.E. Aateg, Exploring Solar and Wind Energy as a Power Generation Source for Solving the Electricity Crisis in Libya. 2020. 13: p. 3708.
[11]Shmueli, G. and J. Polak, Practical time series forecasting with r: A hands-on guide. 2024: Axelrod schnall publishers.
[12]Claeys, R., et al., A novel feature set for low-voltage consumers, based on the temporal dependence of consumption and peak demands. 2020. 14(1): p. 139.
[13]Kolambe, M. and S.J.J.o.E.S. Arora, Forecasting the Future: A Comprehensive Review of Time Series Prediction Techniques. 2024. 20(2s): p. 575-586.
[14]ArunKumar, K., et al., Forecasting the dynamics of cumulative COVID-19 cases (confirmed, recovered and deaths) for top-16 countries using statistical machine learning models: Auto-Regressive Integrated Moving Average (ARIMA) and Seasonal Auto-Regressive Integrated Moving Average (SARIMA). 2021. 103: p. 107161.
[15]Sirisha, U.M., M.C. Belavagi, and G.J.I.A. Attigeri, Profit prediction using ARIMA, SARIMA and LSTM models in time series forecasting: A comparison. 2022. 10: p. 124715-124727.
[16]Goodwin, T., M. Quiroz, and R.J.a.p.a. Kohn, Dynamic linear regression models for forecasting time series with semi long memory errors. 2024.
[17]Woo, G., et al., Etsformer: Exponential smoothing transformers for time-series forecasting. 2022.
[18]Tsai, W.-C., et al., A review of state-of-the-art and short-term forecasting models for solar pv power generation. 2023. 16(14): p. 5436.
[19]Alonso, A.M., F.J. Nogales, and C.J.E. Ruiz, A single scalable LSTM model for short-term forecasting of massive electricity time series. 2020. 13(20): p. 5328.
[20]Mahmud, B.N., Z. Ferdoush, and L.T. Mim, Modelling and forecasting energy demand of Bangladesh using AI based algorithms. 2019, Brac University.
[21]Alsuwaylimi, A.A.J.I.S.L., Comparison of ARIMA, ANN and Hybrid ARIMA-ANN models for time series forecasting. 2023. 12(2): p. 1003-1016.
[22]Abdurohman, M., A.G.J.K.G.T. Putrada, Information System, Computer Network, Computing, Electronics,, and Control, Forecasting model for lighting electricity load with a limited dataset using xgboost. 2023.
[23]Mohan, D.P., M.J.R.A.i.E. Subathra, and E. Engineering, A Comprehensive Review of Various Machine Learning Techniques used in Load Forecasting. 2023. 16(3): p. 197-210.
[24]Wang, C., et al., Minute-level ultra-short-term power load forecasting based on time series data features. 2024. 372: p. 123801.
[25]Torres, J.F., et al., A deep LSTM network for the Spanish electricity consumption forecasting. 2022. 34(13): p. 10533-10545. 
[26]Azeem, A., et al., Electrical load forecasting models for different generation modalities: a review. 2021. 9: p. 142239-142263.
[27]Wazirali, R., et al., State-of-the-art review on energy and load forecasting in microgrids using artificial neural networks, machine learning, and deep learning techniques. 2023. 225: p. 109792.
[28]Avazov, N., Design and Applications of Machine Learning Algorithms for Time-Series Forecasting. 2021, ResearchSpace@ Auckland.
[29]Prodhan, F.A., et al., A review of machine learning methods for drought hazard monitoring and forecasting: Current research trends, challenges, and future research directions. 2022. 149: p. 105327.
[30]Schauberger, B., J. Jägermeyr, and C.J.E.J.o.A. Gornott, A systematic review of local to regional yield forecasting approaches and frequently used data resources. 2020. 120: p. 126153.
[31]Taylan, A.S., Automatic Time Series Forecasting using the ATA Method with STL Decomposition and Box-Cox Transformation. 2021, Dokuz Eylul Universitesi (Turkey).
[32]Bature, T.A., et al., A Study of Autoregressive and Nonlinear Models for Stationarity and Invertibility of Time Series Analysis. 2582: p. 7421.
[33]Καραγεώργου, Ε., Forecasting Spain's electricity load: a comparative analysis of classical time series, neural networks, and deep learning models. 2023.
[34]Sinha, A., et al. Forecasting Electricity Load With Hybrid Scalable Model Based on Stacked Non Linear Residual Approach. in Frontiers in Energy Research. 2021.
[35]Alves, E.P., et al., A Nonlinear Optimizated PSO-SVR Hybrid System for Time Series Forecasting with ARIMA. 2021.
[36]Rs, R., et al., Time Series Forecasting For Energy Consumption Using XGBoost and LSTM. 2024: p. 1-8.
[37]Raghuvanshi, K.P.J.I.J.f.R.i.A.S. and E. Technology, A Systematic Literature Review on The Role of LSTM Networks in Capturing Temporal Dependencies in Data Mining Algorithms. 2024.
[38]ArunKumar, K.E., et al., Comparative analysis of Gated Recurrent Units (GRU), long Short-Term memory (LSTM) cells, autoregressive Integrated moving average (ARIMA), seasonal autoregressive Integrated moving average (SARIMA) for forecasting COVID-19 trends. 2022. 61: p. 7585 - 7603.
[39]Ilhan, E., M.Y. Turali, and S.S.J.I.S.P.L. Kozat, Gradient Boosting With Moving-Average Terms for Nonlinear Sequential Regression. 2023. 30: p. 1182-1186.
[40]Chen, X. and L.J.E.S.A. Gupta, Training LSTMS with circular-shift epochs for accurate event forecasting in imbalanced time series. 2023. 238: p. 121701.
[41]Sameh, B., M.J.A.J.o.B. Elshabrawy, and O. Research, Seasonal Autoregressive Integrated Moving Average for Climate Change Time Series Forecasting. 2023.
[42]Teller, A., U. Pigorsch, and C.J.S.E.J. Pigorsch, Short- to Long-Term Realized Volatility Forecasting using Extreme Gradient Boosting. 2022.
[43]Shering, T., E. Alonso, and D.J.E. Apostolopoulou, Investigation of Load, Solar and Wind Generation as Target Variables in LSTM Time Series Forecasting, Using Exogenous Weather Variables. 2024.
[44]Wang, H., et al., A Methodology for Calculating the Contribution of Exogenous Variables to ARIMAX Predictions. 2021.
[45]Zhang, L. and D.J.E.S.w.A. Jánošík, Enhanced short-term load forecasting with hybrid machine learning models: CatBoost and XGBoost approaches. 2024. 241: p. 122686.
[46]Liu, M., et al., Handling missing values in healthcare data: A systematic review of deep learning-based imputation techniques. 2023. 142: p. 102587.
[47]Balestra, M., et al., A comparison of pre-processing approaches for remotely sensed time series classification based on functional analysis. 2023. 10: p. 33-40.
[48]Singh, V.P., et al., Time series analysis, in Hydrological Processes Modelling and Data Analysis: A Primer. 2024, Springer. p. 35-71.
[49]Elsaraiti, M., et al. Time series analysis of electricity consumption forecasting using ARIMA model. in 2021 IEEE Green technologies conference (GreenTech). 2021. IEEE.
[50]Ashraf, M., et al., Autoregressive integrated moving average (ARIMA) modeling for wind resource assessment. 2024. 8(2): p. 187-198.
[51]Aksöz, A., et al. Analysis of SARIMA Models for Forecasting Electricity Demand. in 2024 12th International Conference on Smart Grid (icSmartGrid). 2024. IEEE.
[52]Qiu, H., et al., Forecasting the incidence of mumps in Chongqing based on a SARIMA model. 2021. 21: p. 1-12.
[53]Wang, H., et al. A Methodology for Calculating the Contribution of Exogenous Variables to ARIMAX Predictions. in Canadian AI. 2021.
[54]Ramana, N., et al., Comparative assessment of Auto Regressive Integrated Moving Average with Explanatory variable (ARIMAX) and Neural Network Autoregressive models with Exogeneous inputs (NNARX) for forecasting the old-world bollworm, Helicoverpa armigera (Lepidoptera: Noctuidae) in India. 2022. 42(5): p. 3571-3580.
[55]Yazici, I., O.F. Beyca, and D.J.E.A.o.A.I. Delen, Deep-learning-based short-term electricity load forecasting: A real case application. 2022. 109: p. 104645.
[56]Kumari, P. and D.J.J.o.C.P. Toshniwal, Extreme gradient boosting and deep neural network based ensemble learning approach to forecast hourly solar irradiance. 2021. 279: p. 123285.
[57]Svetunkov, I., N. Kourentzes, and J.K.J.N.R.L. Ord, Complex exponential smoothing. 2022. 69(8): p. 1108-1123.
[58]Choudhary, A., et al., A framework for data prediction and forecasting in WSN with Auto ARIMA. 2022: p. 1-15.
[59]Zahedi, L., et al., Search algorithms for automated hyper-parameter tuning. 2021.
[60]Suleiman, M., et al., Modelling Nigeria Crude Oil Prices using ARIMA Time Series Models. 2023. 5(1).
[61]Wang, J., T. Ji, and M. Li. A combined short-term forecast model of wind power based on empirical mode decomposition and augmented dickey-fuller test. in Journal of Physics: Conference Series. 2021. IOP Publishing.
[62]Huang, X. and H.L.J.N.D. Shang, Nonlinear autocorrelation function of functional time series. 2023. 111(3): p. 2537-2554.
[63]Weiß, C.H., et al., Partial autocorrelation diagnostics for count time series. 2023. 25(1): p. 105.
[64]Katambire, V.N., et al., Forecasting the Traffic Flow by Using ARIMA and LSTM Models: Case of Muhima Junction. 2023. 5(4): p. 616-628. 
[65]Robeson, S.M. and C.J.J.P.o. Willmott, Decomposition of the mean absolute error (MAE) into systematic and unsystematic components. 2023. 18(2): p. e0279774.
[66]Xiao, R., et al., Predict stock prices with ARIMA and LSTM. 2022.
[67]Ospina, R., et al., An overview of forecast analysis with ARIMA models during the COVID-19 pandemic: Methodology and case study in Brazil. 2023. 11(14): p. 3069.
[68]Hossain, M.A., et al., Optimized forecasting model to improve the accuracy of very short-term wind power prediction. 2023. 19(10): p. 10145-10159.