1 of 13

IX International scientific and practical conference �“Applied Information Systems and Technologies in the �Digital Society” (AISTDS-2025) Kyiv, Ukraine 01 October

1

ELECTRICITY DEMAND PREDICTION USING SARIMA A FRAMEWORK FOR SYSTEM FAILURE MANAGEMENT AND GRID STABILITY

​

​

Andrii Iatsyshyn, Hasan Uzel, Feyyaz Alpsalaz, Yıldırım Özüpak, �Andrii Iatsyshyn, Emrah Aslan

�

2 of 13

Abstract

  • This study examines the forecasting of national electricity demand (nat_demand) using a dataset of 48,046 hourly records, incorporating electricity demand, weather variables, and calendar-related features across multiple locations.
  • The Seasonal AutoRegressive Integrated Moving Average (SARIMA) model was applied to capture both linear and seasonal patterns in the time series, with performance assessed via RMSE, MAPE, and diagnostic analyses.
  • The findings reveal that SARIMA effectively modeled the seasonal behavior of electricity demand, achieving an RMSE of 173 and a MAPE of 12%. The study emphasizes the critical role of accurate forecasting in managing electricity demand and mitigating the risks of system failures, providing valuable insights into the suitability of SARIMA for enhancing grid reliability.
  • However, challenges such as incorporating real-time failure data and handling sudden nonlinear shifts persist, highlighting the need for future enhancements—such as hybrid approaches—to further improve forecasting accuracy and support robust failure management in energy systems.

3 of 13

Introduction / Motivation

  • Electricity demand forecasting is essential for sustainable energy management and grid stability.
  • Growing global demand and the integration of renewables increase forecasting complexity.
  • Traditional models often fail to capture seasonal and nonlinear behaviors in demand data.
  • SARIMA models effectively model linear and seasonal patterns, ensuring interpretability and low computational cost.
  • The study focuses on national electricity demand in Panama using 48,046 hourly records with weather and calendar variables.
  • Accurate forecasting helps prevent system failures, optimize resources, and support fault-aware grid management.

4 of 13

Dataset and Scope

  • Dataset includes 48,046 hourly records — electricity demand, temperature, humidity, precipitation, wind speed.
  • Covers three major locations: Tocumen, San Miguelito, and David.
  • Features include calendar events, holidays, and school periods.
  • Source: CND, Ministry of Education, Earthdata, “When on Earth?”Provides high temporal resolution (hourly) for forecasting studies.

Figure 1. Histogram and boxplot of national electricity demand distribution

5 of 13

Exploratory Data Analysis (EDA)

​

​

  • SARIMA Model
  • SARIMA (Seasonal AutoRegressive Integrated Moving Average) extends ARIMA to handle seasonal time-series patterns.
  • Captures both non-seasonal (p, d, q) and seasonal (P, D, Q, m) dependencies.
  • Parameters:p: autoregressive order (past observations)d: differencing order (to remove trends)q: moving average order (past forecast errors)P, D, Q: seasonal counterpartsm: seasonal period (e.g., 24 for daily cycles in hourly data)Suitable for forecasting recurring cycles like daily or weekly electricity demand.
  • Offers interpretability, computational efficiency, and robust handling of periodic behavior.

​

​

6 of 13

  • Figure 2 displays the hourly national electricity demand (nat_demand) over a 24-hour period, revealing a clear diurnal cycle with demand starting at 900 MW (00:00–06:00), peaking at 1400–1500 MW (10:00–14:00) due to industrial and commercial activity, dropping to 1200 MW by 16:00, rising again to 1300 MW (18:00–20:00) from residential evening use, and stabilizing at 1000 MW (21:00–23:00).

Figure 2. Analysis of hourly electricity demand patterns

7 of 13

    • Figure 3 shows nat_demand across the week (Saturday to Friday), with median demand remaining stable at 1200–1300 MW from Saturday to Thursday, slightly decreasing to 1100 MW on Friday due to reduced industrial load. �The interquartile ranges and outliers highlight recurring weekly patterns and occasional anomalies, reinforcing SARIMA’s strength in modeling weekly seasonal effects while maintaining robustness against moderate variability.�

Figure 3. Boxplot of national electricity demand across days of the week

​

8 of 13

Autocorrelation and Partial Autocorrelation Analysis

  • Figure 4 presents the ACF and PACF plots for the national electricity demand (nat_demand).
  • The ACF plot exhibits a strong cyclical pattern with prominent peaks at approximately every 24 lags, clearly reflecting the daily seasonal component inherent in hourly electricity demand data.
  • The gradual decay in correlations over time indicates persistent temporal dependencies, confirming the necessity of differencing (both non-seasonal and seasonal) to achieve stationarity—a fundamental requirement for the SARIMA model.

​

9 of 13

SARIMA Model Forecasting Performance Analysis

  • Figure 5 provides four diagnostic plots for the residuals of the SARIMAX model applied to the national electricity demand (nat_demand). The top-left plot displays standardized residuals over time, oscillating around zero with a notable spike around mid-2019, suggesting potential outliers. The top-right histogram with KDE overlays (HSS, KDE, N(0,1)) shows a right-skewed distribution, deviating from normality, as the residuals do not closely follow the standard normal curve.

10 of 13

Table 3. SARIMA model results for national electricity demand

Parameter

Value

Description

Dependent Variable

y

National electricity demand (denoted as y)

Model

SARIMAX(3, 0, 1)

SARIMAX model with AR(3), I(0), and MA(1) components

No. Observations

218

Total number of data points

Log Likelihood

-2205.857

Log likelihood of the model

AIC

4421.714

Akaike Information Criterion

BIC

4438.636

Bayesian Information Criterion

HQIC

4428.549

Hannan-Quinn Information Criterion

Date

Thu, 20 Mar 2025

Date of model fitting

Time

14:53:48

Time of model fitting

Sample

01-18-2015 to 03-17-2019

Time range of the data

Covariance Type

opg

Covariance type used for standard errors

Coefficients

​

​

ar.L1

1.3563

AR(1) coefficient (std err: 0.086, z: 15.827, P>

ar.L2

-0.5465

AR(2) coefficient (std err: 0.122, z: -4.484, P>

ar.L3

0.1902

AR(3) coefficient (std err: 0.089, z: 2.126, P>

ma.L1

-0.8141

MA(1) coefficient (std err: 0.068, z: -12.038, P>

sigma2

39,650,000

Variance of residuals (std err: 5.94e-10, z: 6.68e+16, P>

Diagnostics

​

​

Ljung-Box (L1) (Q)

0.05

Ljung-Box test statistic for residual autocorrelation (Prob(Q): 0.83)

Jarque-Bera (JB)

6.83

Jarque-Bera test for normality (Prob(JB): 0.03)

Heteroskedasticity (H)

0.71

Test for heteroskedasticity (Prob(H): 0.14)

Skew

-0.11

Skewness of residuals

Kurtosis

3.84

Kurtosis of residuals

11 of 13

Results and Performance Evaluation

  • SARIMA(3,0,1) model achieved strong performance in national electricity demand forecasting.
  • Statistical metrics: RMSE = 173, MAPE = 12%, indicating accurate modeling of daily and weekly cycles.
  • Diagnostic tests confirm:No residual autocorrelation (Ljung–Box p = 0.83)Minor non-normality (Jarque–Bera p = 0.03)Stable variance (Heteroskedasticity p = 0.14)Real vs.
  • predicted demand curves show high overlap; only minor peak underestimations observed.
  • SARIMA provides a transparent, computationally efficient, and interpretable forecasting approach.

12 of 13

Conclusion and Future Work

Conclusions

  • SARIMA successfully modeled seasonal and linear electricity demand patterns using hourly data.
  • Achieved RMSE = 173 and MAPE = 12%, demonstrating high accuracy and stability.
  • Effectively integrated weather and calendar variables to enhance forecasting realism.
  • Provides a transparent, computationally efficient, and interpretable approach for operational use.

Future Work

  • Incorporate real-time failure data and nonlinear event handling.Explore hybrid SARIMA + ML models to improve responsiveness.
  • Add anomaly detection and fault prediction modules for enhanced grid reliability.
  • Extend framework for real-time energy management and fault-aware forecasting.Visual:

13 of 13

Thanks for Your Attention!