Oday Merzah Hamzah AL- mamoory. (1)
General Background: Electricity consumption forecasting is important for energy planning and power grid stability in growing urban areas. Specific Background: Al-Musayyib City faces increasing electricity demand caused by population growth, temperature variation, and rising subscriber numbers. Knowledge Gap: Previous studies often excluded multiple explanatory variables from forecasting models, reducing prediction accuracy. Aims: This study develops a SARIMAX model to forecast electricity consumption using population, temperature, and subscriber data. Results: Monthly data from 2010–2024 were analyzed using statistical methods and the Augmented Dickey–Fuller test. The SARIMAX model achieved accurate forecasting results with RMSE = 120, MAE = 95, and MAPE = 2.5%. Population growth, temperature changes, and subscriber increases were found to raise electricity demand. Novelty: The study integrates climatic and demographic variables within a SARIMAX framework for electricity forecasting in Al-Musayyib City. Implications: The model provides a reliable tool for energy planning, reducing losses, and improving grid management in similar cities.
Highlights:
• SARIMAX achieved low forecasting error with MAPE reaching 2.5%• Seasonal demand patterns were strongly associated with temperature variation• Subscriber growth and demographic expansion increased monthly power demand
Keywords: SARIMAX, Electricity Consumption Forecasting, Time Series Analysis, Energy Planning, Seasonal Demand Prediction
Electricity is considered one of the vital resources that support economic and social development. It forms the foundation for operating various industries, running public facilities, and improving the standard of living in modern societies. Without a continuous supply of electricity, industrial and commercial activities cease, and essential services such as hospitals, schools, and transportation are disrupted, negatively affecting both the economy and society.
Electricity plays a pivotal role in enhancing productivity and institutional efficiency. It is also regarded as an indicator of technological advancement and urban development (1). Therefore, effective planning for electricity consumption management has become a strategic necessity to support sustainable development in both cities and rural areas.
Forecasting electricity consumption helps optimize energy generation and distribution planning while reducing losses resulting from grid overload. Accurate planning contributes to minimizing unexpected power outages, improving service quality for consumers, and increasing the reliability of the electrical grid.
Population growth and seasonal climate changes pose major challenges to electricity companies. An increase in population leads to higher electricity demand, while climatic fluctuations result in varying consumption across months and seasons. This complexity makes the use of statistical analysis methods and modern forecasting models essential.
Previous studies have helped explain the relationship between electricity consumption, population density, and climatic factors. However, they often neglect integrating all influencing variables into a single model, which reduces forecasting accuracy. The use of advanced models such as SARIMAX allows the incorporation of explanatory variables to improve forecasting accuracy and reduce potential errors (2).
Forecasting results can support decision-making related to expanding the electrical grid, rationalizing energy consumption, and developing emergency plans in cases of sudden demand surges. This helps maintain grid stability and reduce economic losses.
This study focuses on Al-Musayyib City as a practical case study because the city is experiencing continuous population growth and clear seasonal fluctuations in electricity consumption. This makes the study a useful model that can be applied to other similar cities.
Additionally, the study contributes to enhancing scientific knowledge regarding the use of time series models with explanatory variables. It highlights the importance of integrating climatic and demographic data in electricity consumption analysis, opening new avenues for applied research in this field.
Overall, the importance of this study lies in providing an accurate scientific tool for decision-makers to improve electrical planning, ensure consumer needs are met, achieve high energy management efficiency, reduce losses, and mitigate the effects of climatic and population fluctuations on electricity consumption.
Al-Musayyib City is witnessing a growing increase in electricity demand that does not always align with the grid's capacity, especially during seasons characterized by high temperatures or increased economic activity.
The lack of accurate electricity consumption forecasting leads to multiple problems such as energy losses, grid stress, and power outages, negatively impacting the local economy and quality of life.
The problem is exacerbated by reliance on partial data or failure to integrate all influencing variables in forecasting, such as population changes, climatic variations, and the number of subscribers in the electricity network. The absence of modern forecasting tools reduces electricity companies' ability to engage in strategic planning and increases the likelihood of seasonal or emergency power crises.
Therefore, there is a need to use the SARIMAX model, which integrates various explanatory variables and accurately analyzes time series data to provide more reliable forecasts of future electricity consumption.
1. Develop a SARIMAX model to forecast electricity consumption in Al-Musayyib City.
2. Study the impact of explanatory variables on consumption, such as population size, temperature, and number of subscribers.
3. Provide practical recommendations to improve electrical planning and reduce energy losses.
1. How accurate is the SARIMAX model in forecasting electricity consumption?
2. What is the impact of each explanatory variable on electricity consumption?
• Time Limit: 2010–2024
• Spatial Limit: Al-Musayyib City only
• Subject Limit: Focus on electricity consumption only, excluding other energy sources.
Time series refer to a set of data collected at sequential time intervals, such as daily, monthly, or annual data, reflecting changes in a phenomenon over time. Time series analysis is a fundamental tool in economic, financial, and industrial forecasting, including electricity consumption forecasting (3).
Time series analysis helps identify hidden patterns in data, such as:
• Trend: The long-term increase or decrease in series values.
• Seasonality: Repeated changes over specific periods (e.g., summer and winter electricity consumption).
• Cyclic component: Longer-term fluctuations linked to economic or industrial changes.
• Random component: Unexpected variations due to unforeseen events.
Time series are essential tools in electricity planning, enabling future load forecasting and determining generation and distribution needs (4).
Modern studies have applied time series analysis in Arab cities. For example, Ali (2022) found that seasonal patterns in Baghdad's electricity consumption repeat annually with slight increases due to population growth. Al-Baghdadi (2023) demonstrated that time series analysis improves peak load forecasting and reduces losses.
High-quality forecasting requires accurate and reliable long-term data (5).
Several models are used depending on the characteristics of the time series:
• ARIMA Model (p,d,q): Used for non-seasonal time series.
• SARIMA Model: An extension of ARIMA that includes seasonal parameters (P, D, Q, s).
• SARIMAX Model: An advanced version allowing inclusion of explanatory (external) variables such as temperature, population, and number of subscribers (6).
Studies show that incorporating explanatory variables in SARIMAX improves forecasting accuracy by up to 15% compared to traditional ARIMA models (7).
Electricity consumption is influenced by several key factors:
• Population size: Directly increases demand (8).
• Temperature: Higher consumption in summer (cooling) and winter (heating).
• Number of subscribers: Direct indicator of total electricity demand (9).
Integrating these variables into SARIMAX significantly enhances forecasting accuracy.
Time series analysis utilizes statistical and programming tools such as Python with libraries including:
• pandas (data processing)
• statsmodels (ARIMA and SARIMAX models)
• matplotlib and seaborn (visualization)
Model accuracy is evaluated using:
• RMSE (Root Mean Square Error)
• MAE (Mean Absolute Error)
• MAPE (Mean Absolute Percentage Error) (10)
This study aims to develop a forecasting model using SARIMAX to analyze electricity consumption in Al-Musayyib City, integrating influential explanatory variables such as population size, temperature, and the number of subscribers in the electricity network.
The study adopted a quantitative analytical methodology using monthly data spanning from 2010 to 2024. This time frame allows for capturing long-term trends and seasonal variations in electricity consumption.
The study design was divided into several main stages, including:
• Data collection
• Data preprocessing
• Testing for stationarity
• Building the SARIMAX model
• Evaluating model accuracy using statistical performance indicators such as RMSE, MAE, and MAPE
This design is characterized by flexibility in incorporating explanatory variables, providing higher accuracy compared to traditional models that rely solely on time series data (11).
Monthly data were collected from official and reliable sources to ensure the validity of the results. The dataset included:
• Electricity consumption
• Population size
• Average monthly temperature
• Number of subscribers in the electricity network
Data integrity was verified to ensure there were no missing values or errors that could affect model accuracy (12).
Table (1): Data Collection
The table illustrates the data sources and types, reflecting the study’s reliance on accurate official data. The long time span enables the model to identify seasonal and cyclical patterns. The comprehensiveness of the dataset is considered a strength, as it allows precise measurement of each explanatory variable’s impact on electricity consumption. Using official data reduces the likelihood of errors and enhances the reliability of future forecasts.
Before building the model, the data were cleaned to ensure they were free from missing values and outliers.
Subsequently, the stationarity of the time series was tested using the Augmented Dickey-Fuller (ADF) test. Stationarity is a fundamental requirement for building ARIMA and SARIMAX models.
Data preprocessing represents a critical step in ensuring model accuracy, as missing values or extreme variations can negatively affect forecasting performance. Monthly variables were also transformed into a suitable format for modeling, and date alignment was adjusted to ensure consistency in statistical analysis.
Table (2): Data Processing
Each step aims to enhance data quality and ensure suitability for statistical modeling. Cleaning prevents distortions caused by outliers, while stationarity testing ensures reliable forecasting. Continuous review of explanatory variables supports accurate integration of influencing factors.
The model parameters (p, d, q) for the ARIMA component and (P, D, Q, s) for the seasonal component were determined based on graphical analysis and ACF and PACF plots.
The explanatory variables incorporated into the model were:
• Population
• Temperature
• Number of subscribers
The dataset was divided into:
• Training set (80%)
• Testing set (20%)
This division allows evaluation of model performance on unseen data.
Table (3): SARIMAX Model Parameters
The selected parameters reflect a clear understanding of seasonal and trend components in electricity consumption. Integrating explanatory variables enhances the model’s adaptability to climatic and demographic changes, thereby improving forecasting accuracy. Splitting the data ensures model generalization and avoids overfitting.
A descriptive analysis was conducted to illustrate seasonal and cyclical patterns in electricity consumption and to compare actual values with explanatory variables during the period 2010–2024.
Table (4): Descriptive Data Analysis
The table shows a clear relationship between electricity consumption and explanatory variables. Consumption increases with higher temperatures during summer months, while it decreases during moderate seasons such as spring. Population growth and the increase in subscribers demonstrate a gradual effect on demand, reinforcing the necessity of incorporating these variables into the model.
Figure 1: Trend of Increasing Electricity Consumption
Source: Prepared by the researcher
The SARIMAX model was evaluated using the following performance indicators:
• RMSE (Root Mean Square Error): Measures the average squared prediction error[13].
• MAE (Mean Absolute Error): Measures the average absolute error[14].
• MAPE (Mean Absolute Percentage Error): Measures the relative forecasting error compared to actual values[15].
Figure 2: Time Series of Electricity Consumption
Figure 3: Decomposition of the Time Series (Trend – Seasonality – Residual)
Figure 4: Autocorrelation Function (ACF) Plot
Table (5): Model Performance Evaluation
The results indicate that the SARIMAX model provides highly accurate forecasts, with a low relative error (MAPE = 2.5%). The low RMSE and MAE values demonstrate the model’s ability to adapt to seasonal and cyclical variations in electricity consumption.
These findings confirm that integrating explanatory variables enhances forecasting accuracy compared to traditional models and provides decision-makers with a reliable tool for future energy planning.
The SARIMAX model demonstrated high accuracy in forecasting monthly electricity consumption, with minimal differences between actual and predicted values[16].
• Population growth → gradual increase in demand
• Temperature → seasonal impact
• Number of subscribers → direct impact on total demand[17]
1. SARIMAX proved highly effective in forecasting electricity consumption.
2. Integrating explanatory variables significantly improved accuracy.
3. Temperature has a strong seasonal impact.
4. Accurate forecasting enhances energy planning and grid stability.
5. The model provides a practical decision-making tool.
1. Continuously update explanatory variable data.
2. Apply SARIMAX in similar cities.
3. Integrate forecasts with generation planning.
4. Monitor demographic and climate indicators regularly.
5. Combine SARIMAX with AI models for improved handling of sudden changes.
Ali, S. (2022). ARIMA and SARIMAX Models for Electricity Demand Forecasting. Journal of Engineering Sciences, Baghdad, p. 45.
Al-Baghdadi, A. (2023). Impact of Climatic Variables on Electricity Consumption. Journal of Electrical Engineering, Baghdad, p. 112.
Abdullah, M. (2021). Time Series Analysis in Electrical Power. Dar Al-Ilm, Baghdad, p. 78.
Box, G.E.P., Jenkins, G.M., & Reinsel, G.C. (2015). Time Series Analysis: Forecasting and Control. Wiley, New York, p. 52.
Hyndman, R.J., & Athanasopoulos, G. (2021). Forecasting: Principles and Practice. OTexts, Melbourne, p. 123.
Abdullah, M. (2021). Time Series Analysis in Electrical Power. Dar Al-Ilm, Baghdad, p. 82.
Ali, S. (2022). ARIMA and SARIMAX Models for Electricity Demand Forecasting. Journal of Engineering Sciences, Baghdad, p. 49.
Ali, S. (2022). ARIMA and SARIMAX Models for Electricity Demand Forecasting. Journal of Engineering Sciences, 10(3), pp. 45–60.
Al-Baghdadi, A. (2023). Impact of Climatic Variables on Electricity Consumption. Journal of Electrical Engineering, 12(2), pp. 110–125.
Recent international sources available via Google Scholar on SARIMAX and electricity forecasting, accessible in English or translated into Arabic.
Hyndman, R.J., & Athanasopoulos, G. (2021). Forecasting: Principles and Practice. OTexts, Melbourne, p. 145.
Box, G.E.P., Jenkins, G.M., & Reinsel, G.C. (2015). Time Series Analysis: Forecasting and Control. Wiley, New York, p. 68.
Agostino Tarsitano and Ilaria L. Amerise, “Short-term Load Forecasting Using a Two-Stage SARIMAX Model,” Energy, vol. 133, pp. 108–114, 2017. DOI: 10.1016/j.energy.2017.05.126.
H. Chitsaz, H. Shaker, H. Zareipour, D. Wood, and N. Amjady, “Modeling and Forecasting Hourly Electricity Demand by SARIMAX with Interactions,” Energy, vol. 165, Part B, pp. 257–268, 2018. DOI: 10.1016/j.energy.2018.09.157.
E. Eskandarnia and M. AlHammad, “Predication of Future Energy Consumption Using SARIMAX,” IET Conference Proceedings, 2021. DOI: 10.1049/icp.2021.0853.
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.
H. Chitsaz, H. Shaker, H. Zareipour, D. Wood, and N. Amjady, “Modeling and Forecasting Hourly Electricity Demand by SARIMAX with Interactions,” Energy, vol. 165, pp. 257–268, Dec. 2018, doi: 10.1016/j.energy.2018.09.157.