
In this paper, we capture the dynamic behavior of hourly consumption of electricity during the period of power crisis ("dumsor'' period) in Ghana using two-state Markov switching autoregressive (MS-AR) and autoregressive (AR) models. Hourly data between the periods of January 1, 2014 and December 31, 2014 was obtained from the Ghana Grid company and used for the study. Using different information criteria, the MS(2)-AR(4) is selected as the optimal model to describe the dynamic behavior of electricity consumption during periods of power crisis in Ghana. The parameters of the MS(2)-AR(4) model are then estimated using the expectation-maximization algorithm. From the results, the likelihood of staying under a low electricity consumption regime is estimated to be 87%. The expected duration for a low electricity consumption regime is 7.8 hours, and the high electricity consumption regime is expected to last 2.3 hours before switching to the low demand regime. The proposed model is robust as compared to the autoregressive model because it effectively captures the dynamics of electricity demand over time through the peaks and significant fluctuations in consumption patterns. Similarly, the model can identify distinct regime changes linked to electricity consumption during periods of power crises.
Citation: Samuel Asante Gyamerah, Henry Ofoe Agbi-Kaiser, Keziah Ewura Adjoa Amankwah, Patience Anipa, Bright Arafat Bello. Modeling the hourly consumption of electricity during period of power crisis[J]. Clean Technologies and Recycling, 2023, 3(3): 148-165. doi: 10.3934/ctr.2023010
[1] | Arun Kumar M, Rithick Joshua K, Sahana Rajesh, Caroline Dorathy Esther J, Kavitha Devi MK . Predicting wind power using LSTM, Transformer, and other techniques. Clean Technologies and Recycling, 2024, 4(2): 125-145. doi: 10.3934/ctr.2024007 |
[2] | Asiye Bilgili, Kerem Gül . Forecasting power generation of wind turbine with real-time data using machine learning algorithms. Clean Technologies and Recycling, 2024, 4(2): 108-124. doi: 10.3934/ctr.2024006 |
[3] | Anshu Murdan, Iqbal Jahmeerbacus, S Z Sayed Hassen . Challenges of existing grid codes and the call for enhanced standards. Clean Technologies and Recycling, 2023, 3(4): 241-256. doi: 10.3934/ctr.2023015 |
[4] | Harry Ramenah, Abdel Khoodaruth, Vishwamitra Oree, Zahiir Coya, Anshu Murdan, Miloud Bessafi, Damodar Doseeah . Johansen model for photovoltaic a very short term prediction to electrical power grids in the Island of Mauritius. Clean Technologies and Recycling, 2023, 3(2): 107-118. doi: 10.3934/ctr.2023007 |
[5] | Yvette Baninla, Qian Zhang, Xiaoqi Zheng, Yonglong Lu . Drivers of changes in natural resources consumption of Central African countries. Clean Technologies and Recycling, 2022, 2(2): 80-102. doi: 10.3934/ctr.2022005 |
[6] | Adekunle Olubowale Mofolasayo . Evaluation of economic feasibility of rooftop solar energy systems under multiple variables. Clean Technologies and Recycling, 2024, 4(1): 61-88. doi: 10.3934/ctr.2024004 |
[7] | Chukwuebuka C. Okafor, Christian N. Madu, Charles C. Ajaero, Juliet C. Ibekwe, Chinelo A. Nzekwe . Sustainable management of textile and clothing. Clean Technologies and Recycling, 2021, 1(1): 70-87. doi: 10.3934/ctr.2021004 |
[8] | Muhammad Ali Saqib, Muhammad Sohail Abbas, Hiroyuki Tanaka . Sustainability and innovation in 3D printing: Outlook and trends. Clean Technologies and Recycling, 2024, 4(1): 1-21. doi: 10.3934/ctr.2024001 |
[9] | Ashiraf Abeid, Felichesmi Lyakurwa, Eliaza Mkuna . Life cycle assessment of metallic vs. wooden structured solar dryers: Insights into the environmental sustainability. Clean Technologies and Recycling, 2025, 5(1): 87-111. doi: 10.3934/ctr.2025005 |
[10] | Shuwen Zhang, Noah Kirumira . Techniques of recycling end-of-life wind turbine blades in the pavement industry: A literature review. Clean Technologies and Recycling, 2024, 4(1): 89-107. doi: 10.3934/ctr.2024005 |
In this paper, we capture the dynamic behavior of hourly consumption of electricity during the period of power crisis ("dumsor'' period) in Ghana using two-state Markov switching autoregressive (MS-AR) and autoregressive (AR) models. Hourly data between the periods of January 1, 2014 and December 31, 2014 was obtained from the Ghana Grid company and used for the study. Using different information criteria, the MS(2)-AR(4) is selected as the optimal model to describe the dynamic behavior of electricity consumption during periods of power crisis in Ghana. The parameters of the MS(2)-AR(4) model are then estimated using the expectation-maximization algorithm. From the results, the likelihood of staying under a low electricity consumption regime is estimated to be 87%. The expected duration for a low electricity consumption regime is 7.8 hours, and the high electricity consumption regime is expected to last 2.3 hours before switching to the low demand regime. The proposed model is robust as compared to the autoregressive model because it effectively captures the dynamics of electricity demand over time through the peaks and significant fluctuations in consumption patterns. Similarly, the model can identify distinct regime changes linked to electricity consumption during periods of power crises.
While energy supply in Ghana has been relatively stable in recent years, the country has been beset by energy supply issues in the past, which have had a substantial impact on the country's economic status [1]. This is due to either low levels of water in the dams or technical malfunctions of equipment caused by high amounts of water. However, the issue of electricity generation and delivery does not appear to be limited to Ghana; it appears to be a concern in many developing countries, including all member states of the Economic Community of West African States (ECOWAS). In Ghana, electricity consumption is constantly plagued with power outages and fluctuations commonly referred to as "DumSor'' a term meaning "Off and On". [2] claims that in order for ECOWAS to meet its 2030 goal of achieving 100% electrification in all member countries, significant increases in energy generation capacity are required. Ghana's electricity sector is in a period of transition and its electricity consumption growth rate for the past five years has been increasing by 10.3% annually, with supply falling short of expectations [3]. Projections were made in line with ECOWAS' aim to make electricity accessible to all Ghanaians by 2020 [4]. However, as at the end of 2019, the access rate was 83.5% and with a growth rate of 3.13%, the country missed the target by 14%. The actual challenge is ensuring that this aim is met and, more importantly, that supply is both consistent and enough. Ghana, as at 2021, still experiences nationwide blackouts like on Sunday, March 7th, 2021 and load shedding exercises like the Volta and Oti Region load shedding operation from Thursday, March 18th, to Monday, March 21st, 2021. In addition, the annual increase in electricity demand has caught up with available generation, leaving very little spare capacity to deal with a system outage.
Different techniques for modelling hourly electricity consumption have been studied in the literature. For instance, [5] used the self-exciting threshold autoregressive (SETAR) model and the smooth transition regression (STR) model to model, analyze and forecast the residential electricity consumption in Ethiopia. The study showed that the SETAR model was more effective than the STR model. [6] used a back propagation neural network to model electricity consumption. In a study conducted by [7], a regression model was used to generate hourly electricity consumption over the course of a year for the commercial and industrial sectors of three US cities. The model was built using hourly datasets from the previous four years. [8] considered a new extension of the stochastic Gamma diffusion process by introducing time functions to model electric power consumption during a period of economic crisis. [9] employed bottom-up stochastic models to simulate high-resolution heating and cooling electricity consumption profiles. In a recent study, [10] used the Markov process technique, feature selection and clustering to model electricity consumption forecasting for Bushehr-Iran Power Distribution Company. [11] used principal component analysis to model the monthly electricity consumption of public sanitary buildings using climatological variables.
Globally, household electricity consumption is affected by factors like seasons, the number of occupants living in the house, the income of the household and time of day. People also consume electricity in different ways and with different degrees of urgency. The variation in Ghana's household electricity consumption is greatly affected by the time of day, where low consumption is recorded during the early hours of the day and high consumption is usually in the evening and nighttime since most people are employed during the day. Understanding how variation in residential electricity demand affects consumers and businesses alike is crucial for sustainability programs. Typically, time series models are commonly used to evaluate the transient behavior of variables like power demand, exchange rates and temperature, among others. The mixed autoregressive moving averages (ARMA), moving average (MA) and autoregressive (AR) models are the most popular and often used models. Although these models are highly effective in a variety of applications, they are incapable of representing certain nonlinear dynamic patterns, such as asymmetry, amplitude dependency and volatility clustering. For example, electricity consumption normally fluctuates during the time of the day, with high and low consumption depending on the time of the day (Figure 2). With this kind of data, it would be inefficient to think that a single linear model could explain all of these different behaviors. Markov switching models (MSM) are a type of nonlinear time series model that has become popular for explaining how different time series regimes behave.
According to [12], the Markov switching model consists of a set of models that may characterize time series behavioral patterns under various regimes. The switching technique is regulated by a latent state variable that assumes the process of a "first-order Markov chain'', which is a distinctive aspect of the Markov switching model. For instance, [13] modeled electricity spot prices using regime-switching models. [14] used full-period, pre-form and post-reform sample times to model the demand for electricity in Ghana based on the effects of policy regime switching. The study found that technology changes were energy-saving during the pre-reform period, while technology changes were energy-consuming during the post-reform period. Using the entire sample period, electricity demand in the long run is highly influenced by GDP and industry efficiency. [15] developed a time-dependent two-state Markov regime switching (MRS) model to capture the hourly spot price of electricity. The constructed model was efficient as it was able to capture the main characteristics exhibited in the hourly electricity spot price. To model the dynamics of temperature for weather derivatives, [15] used a time-changing mean-reversion Levy regime-switching model to capture both normal and extreme temperature fluctuations. [16] described "El Nino Southern Oscillation (ENSO)'' patterns using a two-state Markov regime-switching framework. They discovered that the behavioral patterns of both research phases (El Nino and La Nina events) are diametrically opposed and distinct. The findings of the study also show that, while the Box-Jenkins approach produces a decent representation of the time series under review, it is unable to capture some nonlinearities that arise as a result of the presence of changing regimes. Furthermore, it was shown that the presence of weather cycles necessitates the origin of non-linear factors in many climatic time series for describing climatic variables. The model was able to reflect the index's properties across time. This study therefore employs a Markov regime switching model to model electricity consumption since its switching mechanism can capture the distinct behavior of electricity consumption. This ability is particularly relevant in the context of insufficient supply, as it allows for the identification of critical periods of high demand and the subsequent allocation of resources accordingly. Specifically, the objective of this paper is: (1) to model the consumption of electricity during periods of power crisis using a Markov-regime switching model and (2) to estimate the expected duration of each regime for the selected period.
The paper is organized as follows. The Markov switching autoregressive model and parameter estimate of the model using the expectation maximization algorithm are presented in Section 2. In Section 3, the data description and analysis are presented. The results and analysis are presented in Section 4, whilst the conclusion and policy recommendations are presented in Section 5.
The MS-AR model's point of reference is the Markov chain. An approach called the Markov chain explains how the likelihood of the occurrence of an event depends solely on the attained state of a prior event. The constructed Markov switching model is based on the studies of [12] and [17].
An MS model is the name given to a combination of discrete-time stochastic processes, one of which is unobserved (latent) and the other of which is observed. The dynamics of the process that is not being observed affects that of the observed. As a result, the series of observations can be used to rebuild the distribution of the unobserved process [17]. Given that the Markov chain is conditionally autoregressive, the unobserved process is a Markov chain with finite-state defined as st, whereas the observable process is defined as yt.
Let st denote an unobservable state variable assuming the value one or two. A simple switching model for the variable yt involves two AR specifications (Eq 1):
yt={α0+βyt−1+ϵt,st=1α0+α1+βyt−1+ϵt,st=2 | (1) |
where |β|<1 and ϵt∼i.i.d.N(0,σ2ϵ). When st=1, yt is a stationary AR(1) process with mean α0/(1−β) and when st changes from 1 to 2, yt switches to another stationary AR(1) process with mean (α0+α1)/(1−β). Based on the value of the state variable st, this model accepts two dynamic structures at various levels if and only if α1≠1. st controls the switching between these two states which are two distinct distributions with different means coming together to form yt.
An autoregressive model is a specific type of regression model for time series where a value from the series is regressed on prior value(s) of that same series. For example,
yt=α0+α1yt−1+ϵt | (2) |
In Eq 2 response variable from the preceding time period, yt−1, has been transformed into a predictor. Under the usual assumptions, the error terms are ϵt∼i.i.d.N(0,σ2ϵ).
The number of immediate past values used in predicting the current time value determines the order of the AR model. A first-order autoregressive model abbreviated as AR(1) is given by Eq 2.
Using two prior values of the time series as predictors in the model changes the model from AR(1) to AR(2), a second-order autoregressive model which can be written as:
yt=α0+α1yt−1+α2yt−2+ϵt | (3) |
A generalized autoregressive model of the p-th-order abbreviated as AR(p) is obtained by incorporating prior values of the series at times t−1,t−2,…,t−p as predictors into a multiple linear regression model to predict the current time value. This model may be expressed as follows:
yt=α0+α1yt−1+α2yt−2+⋯+αpyt−p+ϵt | (4) |
The model given by Eq 4, predicts yt based on the prior time values to time t−p.
The MS-AR model requires a probabilistic process to govern the transition of yt from one regime (state) to another. In our case, a two-state Markov chain is used. This chain assumes that the probability of being in state st is solely determined by the previous value of state st−1.
Pr(st=j|st−1=i,st−2=k,...)=Pr(st=j|st−1=i)=pij | (5) |
where the transition probability pij which depicts the possibility of moving to state j following that the process is in state i satisfies Eq 6:
K∑j=1pij=1 | (6) |
The shift between regimes in the MS-AR models is governed by an unobserved Markov chain which is based solely on the observed time series. Model Eq 7 summarized the general form of the MS-AR model.
(yt−μst)=K∑i=1βi(yt−i−μst−i)+ϵt | (7) |
where the relevant observations are given by yt, the coefficients are βi,i=1,…,K, st is the regime at time t, μst is a constant that depends on the regime st, and the distribution of ϵt is Gaussian N(0,σ2).
The conditional likelihood density model Eq 8 can be used to depict the likelihood density model of yt given the stochastic variable st for j=1,2,…,K.
f(yt|st=j;μj,σ2j)=1√2πσ2jexp(−(yt−μj)22σ2j) | (8) |
Certain stochastic distributions determine the hidden or latent regime st. Equation 9 shows how the model is represented by πj for the marginal likelihood of st and j=1,2,…,K.
πj=Pr(st=j;θ) | (9) |
θ includes the likelihood of πj, where θ=(μ1,μ2,…,μK,σ21,σ22,…,σ2K,π1,π2,…,πK).
The expectation maximization (EM) approach is used to estimate the model's parameters. In doing so, a preliminary estimate of the probability density function is made. This function is then used to derive the log-likelihood function. This process of estimation can be divided into two main steps.
The first step is to consider the joint density of yt, st and st−1 conditioned on ψt−1 information. To achieve this, we must derive the density function of yt. This is produced from a fundamental analysis of a two-state Markov switching model with a first order autoregressive term using the the MS-AR model in Eq 7 and the transition probability condition in Eq 6 as shown in model Eq 10.
f(yt|st,st−1,ψt−1;θ)=1√2πσ2stexp(((yt−μst)−β1(yt−1−μst−1))22σ2st) | (10) |
where ψt−1 refers to information up to time t−1 and θ=(μ1,μ2,σ2,β1) is the parameter space of the MS(2)-AR(1) model.
Then the joint density of yt, st and st−1 conditioned on ψt−1 is:
f(yt,st,st−1|ψt−1;θ)=f(yt|st,st−1,ψt−1;θ)×Pr(st,st−1|ψt−1;θ) | (11) |
where f(yt|st,st−1,ψt−1;θ) is given by Eq 10.
Aggregating the joint density in Eq 11 over all possible values for both st and st−1 yields the marginal density:
f(yt|ψt−1;θ)=K∑st=1K∑st−1=1f(yt,st,st−1|ψt−1;θ)=K∑st=1K∑st−1=1f(yt|st,st−1,ψt−1;θ)×Pr(st,st−1|ψt−1;θ) | (12) |
Then the log-likelihood function is given by:
lnL(θ)=T∑t=1ln{K∑st=1K∑st−1=1f(yt|st,st−1,ψt−1;θ)×Pr(st,st−1|ψt−1;θ)} | (13) |
To complete the above procedure, we still need to deal with the challenges in the calculation of Pr(st,st−1|ψt−1;θ). The filtering and smoothing algorithms are used to assess the probability that an observation will follow a particular pattern from one observation t−1 to the next t.
The filtering algorithm is illustrated with the two steps below:
STEP 1: At the t-th iteration or beginning of time t, Pr(St−1=i|ψt−1;θ),,i=1,2,…,K is already know. Then the weighting terms Pr(st=j,st−1=i|ψt−1;θ),i=j=1,2,…,K can be calculated as:
Pr(st=j,st−1=i|ψt−1;θ)=Pr(st=j|st−1=i|;θ)×Pr(st−1=i|ψt−1;θ) | (14) |
where Pr(st=j|st−1=i|;θ),i=j=1,2,…,K are the transition probabilities.
STEP 2: At the end of the t−th iteration or the end time t, yt will be observed. We will then update the probability terms as follows:
Pr(st=j,st−1=i|ψt−1,yt;θ)=f(yt,st=j,st−1=i|ψt−1;θ)f(yt|ψt−1;θ)=f(yt|st=j,st−1=i,ψt−1;θ)×Pr(st=j,st−1=i|ψt−1;θ)K∑st=1K∑st−1=1f(yt|st,st−1,ψt−1;θ)×Pr(st,st−1|ψt−1;θ) | (15) |
with
Pr(st=j|ψt−1,yt;θ)=K∑i=1Pr(st=j,st−1=i|ψt−1,yt;θ) | (16) |
Iterating the above two steps for t=1,2,…,T provides us with the appropriate weighting terms in Eq 12.
The smoothing algorithm on the other hand uses all the observation in the sample. This gives Pr(st=j|ψT;θ), which is the smoothed probability as opposed to Pr(st=j|ψt−1,yt;θ)=Pr(st=j|ψt;θ),t=1,2,…,T, which is the filtered probability in Eq 16.
The smoothing algorithm as illustrated below considers the derivation of the joint probability that st=j and st+1=k is based on the full observation:
Pr(st=j,st+1=k|ψT;θ)=Pr(st+1=k|ψT;θ)×Pr(st=j,st+1=k|ψt;θ)=Pr(st+1=k|ψT;θ)×Pr(st=j,st+1=k|ψt;θ)Pr(st+1=k|ψt;θ)=Pr(st+1=k|ψT;θ)×Pr(st=j|ψt;θ)×Pr(st+1=k|st=j;θ)Pr(st+1=k|ψt;θ) | (17) |
and
Pr(st=j|ψT;θ)=K∑k=1Pr(st=j,st+1=k|ψT;θ) | (18) |
The basic filter's last iteration produces Pr(sT|ψT) which would be use in the above iteration for t=T−1,T−2,…,1 to generate the smoothed probabilities, Pr(st|ψT),t=T−1,T−2,…,1.
We then differentiate Eq 13 with respect to each of the parameters in θ=(μj,σ2j,πj,βj) and equate to zero to maximize the parameters estimates on θ. This is illustrated in Eq 19.
∂lnL(θ)∂θ=T∑t=11f(yt;θ)×∂f(yt;θ)∂θ | (19) |
The MS-AR model parameters can be estimated with the equations below:
μj=T∑t=1yt×Pr(st=j|yt;θ)T∑t=1Pr(st=j|yt;θ) | (20) |
σ2j=T∑t=1(yt−μj)2×Pr(st=j|yt;θ)T∑t=1Pr(st=j|yt;θ) | (21) |
πj=1TT∑t=1Pr(st=j|yt;θ) | (22) |
βj=T∑t=1K−1∑j=1(yt−μj)×Pr(st=j|ψT;θ)T∑t=1K−2∑j=1Pr(st=j|ψT;θ) | (23) |
The expected duration of the regimes is then estimated with the equation below:
E(D)=11−pjj | (24) |
The electricity consumption data was obtained from the Ghana Grid Company (GRIDCO) limited. The data was analyzed from January 1, 2014, to December 31, 2014. The data obtained is the hourly power consumed by all installations linked to the distribution network. This study period is the period where Ghana was in a power crisis which was popularly referred to as the "dumsor'' period.
Multilevel seasonality is an essential characteristic of electricity consumption; the consumption pattern varies by month, day of the week and hour of the day. These seasonalities are highly predictable and can be deterministically modeled. Figure 1 shows the time series plot of the hourly electricity consumption data for the period under study. Changes in the consumption of electricity for a period of one month are shown in Figure 2. The plot exhibits seasonal movement. Generally, it can be seen that the electricity consumption during the power crisis is mean-reverting, that is, it reverts back to its mean, which is about 1700 MW. Clearly, there are two distinct periods that can be characterized by this plot–high and low consumption periods. This can be attributed to the fact that electricity consumption during the power crisis period was lower in the early hours of the day and higher in the latter hours of the day. Each of these two periods is characterized by distinct behavioral tendencies that are inherently opposed to one another. The length of the phases that occur between the two, however, is unknown. The MS-AR approach can be used to model the electricity consumption data based on the above-mentioned conditions. The low consumption state is determined to be state one (1), while state two (2) is designated as the high consumption state.
The descriptive statistics are shown in Table 1. The skewness values are observed to be above 0 which indicates the consumption series is positively skewed and, as such, not normally distributed. The kurtosis is 0.2580, which implies that the distribution of the series is leptokurtic. The standard deviation value clearly shows that there is high volatility in the amount of electricity consumed during the electricity crisis period (Figure 3).
Minimum | Maximum | Mean | Standard deviation | Skewness | Kurtosis | |
2014 | 809 | 1974 | 1488.0913 | 142.7847 | 0.1885 | 0.2580 |
The autocorrelation function (ACF) plots in Figure 4 clearly show a daily seasonal trend with peaks at 24 hours, 48 hours, 72 hours and so on. Consider the equation below:
L(t)=˜Lt+Ct | (25) |
where L(t) is the hourly electricity consumption, ˜Lt is the deseasonalized electricty consumption and Ct is detrministic seasonal component for t=0hour,1hour,2hours,3hours,⋯. From Eq 25, the electricity consumption data can be deseasonalized.
A stationarity test was done on the data to ascertain if a unit root exists or not. The Augmented Dickey–Fuller (ADF) and Phillips–Perron (PP) tests are the methodologies used in this case. The results are presented in Tables 2 and 3, respectively. The ADF test for the three years covered by the study is summarized in Table 2. Several exogenous factors (without constant, with constant and with constant and trend) are used in this test. The test results indicated that, regardless of the exogenous factors utilized, the series for the various years is stationary since the absolute value of the test statistics of all the three years' test results is greater than the absolute of the corresponding critical value. The PP unit root test result is shown in Table 3. The series is stationary, as evidenced by the test results for all three years.
Year | Test statistics | 5% critical value |
Without constant 2014 | -2.2313 | -1.95 |
With constant 2014 | -24.3513 | -2.86 |
With constant and trend 2014 | -27.8649 | -3.41 |
Year | Test statistics | 5% critical value |
With constant 2014 | -20.8710 | -2.862418 |
With trend 2014 | -23.6494 | -3.413069 |
The number of significant autoregressive terms needed to estimate the parameters, including the transitional probabilities and autoregressive coefficients, is obtained from the partial autocorrelation function (PACF) and ACF plots. To correctly model the electricity consumption data sets, it is essential to obtain a lag order that will result in the best autoregressive model. The PACF plot is used to establish the optimal order of the AR process since it eliminates differences caused by prior lags and keeps only the pertinent features. Utilizing the PACF also guarantees that only the necessary features or lags are kept, which is another benefit. PACF plots of the deseasonalized time series for 2014 are shown in Figure 5. For the period under consideration, lags 1, 2, 3 and 4 are statistically significant enough to be incorporated into the model.
From Figure 5, the PACF suggested we consider an AR(1), AR(2), AR(3) and AR(4) for our MS(2)-AR(p) model.
To select the optimum model that describes the phenomenon, lag values 1, 2, 3, 4 of the MS(2)-AR(p) models are analyzed and the AIC, BIC, HQC and log-likelihood values were calculated. The model with the least AIC, BIC and HQC values performs better than the others. Using the AIC, BIC, and HQC values, the best model obtained from Table 4 was MS(2)-AR(4).
Model | AIC | BIC | HQC | Log-likelihood |
MS(2)-AR(1) | 90520.77 | 90585.39 | 90530.43 | -45256.39 |
MS(2)-AR(2) | 90413.28 | 90510.21 | 90427.75 | -45200.64 |
MS(2)-AR(3) | 90391.16 | 90520.40 | 90410.45 | -45187.58 |
MS(2)-AR(4) | 90381.16 | 90542.71 | 90405.28 | -45180.58 |
To ascertain the efficiency of the MS(2)-AR(4) model, it is compared with four (4) single-state models: AR(1), AR(2), AR(3) and AR(4). AIC, BIC, HQC and log-likelihood are used to select the best model. From Table 5, the AIC, BIC and HQC values of the MS(2)-AR(4) model are the lowest, and the log-likelihood value of MS(2)-AR(4) is the largest. These indicate the superiority of the constructed MS(2)-AR(4) model in capturing the dynamics of electricity consumption through time and at different regimes.
Model | AIC | BIC | HQC | Log-likelihood |
AR(1) | 92472.54 | 92493.78 | 92479.78 | -46233.27 |
AR(2) | 92293.95 | 92322.26 | 92303.59 | -46142.97 |
AR(3) | 92272.28 | 92307.67 | 92284.34 | -46131.14 |
AR(4) | 92269.50 | 92311.97 | 92283.97 | -46128.75 |
MS(2)-AR(4) | 90381.16 | 90542.71 | 90405.28 | -45180.58 |
From the parameter estimation procedure using expectation maximization, the estimates of the model specification (MS(2)-AR(4)) of the transition probabilities and autoregressive coefficients are computed. The Table 6 summarizes the estimated parameters. μ is the estimated regime constant, which depends on st and the βi parameters are the autoregressive coefficients for the regimes.
Regime | Parameter | Coefficient | Std. error | t-statistic | p-value |
1 | μ | 72.9800 | 6.4039 | 11.3962 | <0.0001 |
β1 | 0.8705 | 0.0143 | 60.8741 | <0.0001 | |
β2 | 0.0751 | 0.0156 | 4.8141 | <0.0001 | |
β3 | -0.0106 | 0.0136 | -0.7794 | 0.4357 | |
β4 | 0.0171 | 0.0105 | 1.6286 | 0.1034 | |
2 | μ | 211.3742 | 27.5262 | 7.6790 | <0.0001 |
β1 | 0.6267 | 0.0303 | 20.6832 | <0.0001 | |
β2 | 0.0827 | 0.0387 | 2.1370 | 0.0326 | |
β3 | 0.1040 | 0.0439 | 2.3690 | 0.0178 | |
β4 | 0.0389 | 0.0376 | 1.0346 | 0.3009 |
The MS(2)-AR(4) fitted model for 2014 hourly electricity consumption can therefore be specified as:
yt={0.8705(yt−1−μst−1)+0.0751(yt−2−μst−2)−0.0106(yt−3−μst−3)+0.0171(yt−4−μst−4),st=10.6267(yt−1−μst−1)+0.0827(yt−2−μst−2)+0.1040(yt−3−μst−3)+0.0389(yt−4−μst−4),st=2 | (26) |
The expected duration of the two regime with the transitional, smoothed and filtered probabilities are estimated using the fitted model. The transitional probabilities for the MS(2)-AR(4) model is illustrated as a matrix bellow:
P=(P11P12P21P22)=(0.87140.12860.44160.5584) | (27) |
which satisfies Eq 6. From matrix Eq 27, the likelihood of the consumption of electricity remaining low during the next hour given that it was low in the previous hour is P11=0.8714, and the likelihood of the consumption of electricity being high during the next hour given that it was high in the previous hour is P12=0.1286. With a probability of P22=0.5584, the consumption of electricity will remain high during the next hour given that it was high in the previous hour and with a probability of P21=0.4416, the consumption will move to the low consumption regime.
Using Eq 24, the expected duration of the low electricity consumption regime in 2014 is at least 1/(1−0.8714)=7.8 hours, while the high electricity consumption regime is expected to last at least 1/(1−0.5584)=2.3 hours before switching to a low demand regime.
Figures 6 and 7 illustrate the plots for the filtered and smoothed probability, respectively. They approximate the odds of remaining in the same regime to one or zero for a given regime. During a low consumption regime, the likelihood of being in state 1, P(S(t)=1) is approximately one. This confirms P11=0.8714 in matrix Eq 27. In contrast, the likelihood of being in state 2, P(S(t)=2) is approximately zero during a low consumption regime.
To test the validity of the fitted model, we examined the residuals of the model with the Durbin–Watson test. The MS(2)-AR(4) has a Durbin–Watson test statistic of 2.00223, indicating uncorrelated residuals, which implies that the error terms' variances are constant. Figure 8 shows the residuals plot.
Data was simulated using the estimated parameter values from the MS(2)-AR(4) model. The simulated data was fitted to the original deaseasonalized series. The deseasonalized series, as well as the fitted MS(2)-AR(4) model, are depicted in Figure 9. The figure shows that the proposed model is capable of effectively capturing the index's behavior over time. The suggested model can identify peaks and significant fluctuations in the electricity consumption pattern in 2014. Similarly, the model can identify distinct regime swings linked with electricity consumption.
According to the study's results, the expected duration for low and high electricity consumption periods is 7.8 and 2.3 hours, respectively, during periods of power crisis. Transitional periods also exist between these low and high consumption regimes. These are transitions from a low consumption regime to a high consumption regime and from a high consumption regime to a low consumption regime. For the year under consideration, the transition from a low to high electricity consumption regime and from a high to a low consumption regime is projected to take at least 1.1 and 1.8 hours, respectively. It is clear that electricity consumption in Ghana is low on average, with an erratic pattern. As seen in Figure 1, it also swings and varies over time, with some extremely low periods of consumption possibly due to the effects of climate change. This is reinforced by [18], who concludes that under various scenarios of climate change, temperature rises would impact household electricity consumption significantly.
From the study, a two-state MS(2)-AR(4) model best captures Ghana's electrical consumption pattern during the period of power crisis. According to the analysis, the likelihood of maintaining a low electricity consumption regime in 2014 is estimated to be 87%, while the likelihood of maintaining a high electricity consumption regime is estimated to be 56%. During the power crisis, the expected duration of a low electricity consumption regime is 7.8 hours. Over the course of the entire research period, the high electricity consumption regime is expected to last 2.3 hours before switching to the low demand regime.
The findings of this paper offer crucial insights for policy implementation for both policymakers and utility companies. Policymakers can prioritize load shedding or load shifting initiatives during the estimated 7.8 hours of the low electricity consumption regime. By implementing these measures, policymakers can ensure the efficient allocation of available electricity resources, thereby reducing system strain and preserving a balanced supply-demand dynamic. Moreover, both policymakers and utility companies must optimize resource allocation and respond promptly to changes in consumption. This includes implementing real-time monitoring systems to detect transitions between high and low electricity consumption regimes, allowing for timely resource allocation adjustments. By effectively managing these consumption shifts, policymakers and utility companies can maintain a resilient and dependable electricity infrastructure, which will ultimately benefit the economy and end consumers.
The authors declare they have not used Artificial Intelligence (AI) tools in the creation of this article.
This paper is a revised version of the preprint paper "Modelling the Hourly Consumption of Electricity during Period of Power Crisis'' [19] available online. The authors wish to thank the Ghana Grid Company Limited (GRIDCo) for providing the data for this research.
The authors declare no conflict of interest in this paper.
[1] | Kumi EN (2017) The Electricity Situation in Ghana: Challenges and Opportunities, Washington DC: Center for Global Development. |
[2] |
Adeoye O, Spataru C (2019) Modelling and forecasting hourly electricity demand in west African countries. Appl Energ 242: 311–333. https://doi.org/10.1016/j.apenergy.2019.03.057 doi: 10.1016/j.apenergy.2019.03.057
![]() |
[3] | Energy Commission, Energy Outlook for Ghana 2021. Energy Commission, 2021. Available from: http://www.energycom.gov.gh/planning/data-center/energy-outlook-for-ghana. |
[4] |
Eshun ME, Amoako-Tuffour J (2016) A review of the trends in Ghana's power sector. Energy Sustain Soc 6: 1–9. https://doi.org/10.1186/s13705-016-0075-y doi: 10.1186/s13705-016-0075-y
![]() |
[5] |
Gabreyohannes E (2010) A nonlinear approach to modelling the residential electricity consumption in Ethiopia. Energy Econ 32: 515–523. https://doi.org/10.1016/j.eneco.2009.08.008 doi: 10.1016/j.eneco.2009.08.008
![]() |
[6] | Nwulu NI, Agboola OP (2012) Modelling and predicting electricity consumption using artificial neural networks. 2012 11th International Conference on Environment and Electrical Engineering, IEEE, 1059–1063. https://doi.org/10.1109/EEEIC.2012.6221536 |
[7] |
Pielow A, Sioshansi R, Roberts MC (2012) Modeling short-run electricity demand with long-term growth rates and consumer price elasticity in commercial and industrial sectors. Energy 46: 533–540. https://doi.org/10.1016/j.energy.2012.07.059 doi: 10.1016/j.energy.2012.07.059
![]() |
[8] |
Nafidi A, Gutiérrez R, Gutiérrez-Sánchez R, et al. (2016) Modelling and predicting electricity consumption in spain using the stochastic gamma diffusion process with exogenous factors. Energy 113: 309–318. https://doi.org/10.1016/j.energy.2016.07.002 doi: 10.1016/j.energy.2016.07.002
![]() |
[9] |
Palacios-Garcia E, Moreno-Munoz A, Santiago I, et al. (2018) A stochastic modelling and simulation approach to heating and cooling electricity consumption in the residential sector. Energy 144: 1080–1091. https://doi.org/10.1016/j.energy.2017.12.082 doi: 10.1016/j.energy.2017.12.082
![]() |
[10] |
Dalkani H, Mojarad M, Arfaeinia H (2021) Modelling electricity consumption forecasting using the markov process and hybrid features selection. Int J Intell Syst Appl 13: 14–23. https://doi.org/10.5815/ijisa.2021.05.02 doi: 10.5815/ijisa.2021.05.02
![]() |
[11] |
Pérez-Montalvo E, Zapata-Velásquez ME, Benitez-Vazquez LM, et al. (2022) Model of monthly electricity consumption of healthcare buildings based on climatological variables using PCA and linear regression. Energy Rep 8: 250–258. https://doi.org/10.1016/j.egyr.2022.06.117 doi: 10.1016/j.egyr.2022.06.117
![]() |
[12] | Hamilton JD (1989) MPCE: a maximum probability based cross entropy loss function for neural network classification. Econometrica 57: 357–384. |
[13] |
Bierbrauer M, Trück S, Weron R, et al. (2004) Modeling electricity prices with regime switching models. Computational Science-ICCS 2004: 4th International Conference, Kraków, Poland, 859–867. https://doi.org/10.1007/978-3-540-25944-2_111 doi: 10.1007/978-3-540-25944-2_111
![]() |
[14] |
Adom PK, Bekoe W (2013) Modelling electricity demand in ghana revisited: The role of policy regime changes. Energy Policy 61: 42–50. https://doi.org/10.1016/j.enpol.2013.05.113 doi: 10.1016/j.enpol.2013.05.113
![]() |
[15] |
Gyamerah SA, Ngare P (2018) Regime-switching model on hourly electricity spot price dynamics. J Math Financ 8: 102–110. https://doi.org/10.4236/jmf.2018.81008 doi: 10.4236/jmf.2018.81008
![]() |
[16] | Cárdenas-Gallo I, Sánchez-Silva M, Akhavan-Tabatabaei R, et al. (2015) A markov regime-switching framework application for describing EI niño Southern Oscillation (ENSO) patterns. 12th International Conference on Applications of Statistics and Probability in Civil Engineering (ICASP12), Vancouver, Canada, 1–8. |
[17] | Hamilton JD (1994) State-space models, Handbook of Econometrics, Amsterdam: Elsevier, 3039–3080. https://doi.org/10.1016/S1573-4412(05)80019-4 |
[18] |
Avordeh TK, Gyamfi S, Opoku AA (2021) Quantitative estimation of the impact of climate change on residential electricity demand for the city of Greater Accra, Ghana. Int J Energy Sect Manag 15: 1066–1086. https://doi.org/10.1108/IJESM-08-2020-0008 doi: 10.1108/IJESM-08-2020-0008
![]() |
[19] | Gyamerah SA, Agbi-Kaiser HO, Amankwah KEA, et al. (2022) Modelling the hourly consumption of electricity during period of power crisis. arXiv preprint. |
1. | Samuel Asante Gyamerah, Henry Ofoe Agbi-Kaiser, Keziah Ewura Adjoa Amankwah, Patience Anipa, Bright Arafat Bello, Modeling the hourly consumption of electricity during period of power crisis, 2023, 3, 2770-4580, 148, 10.3934/ctr.2023010 |
Minimum | Maximum | Mean | Standard deviation | Skewness | Kurtosis | |
2014 | 809 | 1974 | 1488.0913 | 142.7847 | 0.1885 | 0.2580 |
Year | Test statistics | 5% critical value |
Without constant 2014 | -2.2313 | -1.95 |
With constant 2014 | -24.3513 | -2.86 |
With constant and trend 2014 | -27.8649 | -3.41 |
Year | Test statistics | 5% critical value |
With constant 2014 | -20.8710 | -2.862418 |
With trend 2014 | -23.6494 | -3.413069 |
Model | AIC | BIC | HQC | Log-likelihood |
MS(2)-AR(1) | 90520.77 | 90585.39 | 90530.43 | -45256.39 |
MS(2)-AR(2) | 90413.28 | 90510.21 | 90427.75 | -45200.64 |
MS(2)-AR(3) | 90391.16 | 90520.40 | 90410.45 | -45187.58 |
MS(2)-AR(4) | 90381.16 | 90542.71 | 90405.28 | -45180.58 |
Model | AIC | BIC | HQC | Log-likelihood |
AR(1) | 92472.54 | 92493.78 | 92479.78 | -46233.27 |
AR(2) | 92293.95 | 92322.26 | 92303.59 | -46142.97 |
AR(3) | 92272.28 | 92307.67 | 92284.34 | -46131.14 |
AR(4) | 92269.50 | 92311.97 | 92283.97 | -46128.75 |
MS(2)-AR(4) | 90381.16 | 90542.71 | 90405.28 | -45180.58 |
Regime | Parameter | Coefficient | Std. error | t-statistic | p-value |
1 | μ | 72.9800 | 6.4039 | 11.3962 | <0.0001 |
β1 | 0.8705 | 0.0143 | 60.8741 | <0.0001 | |
β2 | 0.0751 | 0.0156 | 4.8141 | <0.0001 | |
β3 | -0.0106 | 0.0136 | -0.7794 | 0.4357 | |
β4 | 0.0171 | 0.0105 | 1.6286 | 0.1034 | |
2 | μ | 211.3742 | 27.5262 | 7.6790 | <0.0001 |
β1 | 0.6267 | 0.0303 | 20.6832 | <0.0001 | |
β2 | 0.0827 | 0.0387 | 2.1370 | 0.0326 | |
β3 | 0.1040 | 0.0439 | 2.3690 | 0.0178 | |
β4 | 0.0389 | 0.0376 | 1.0346 | 0.3009 |
Minimum | Maximum | Mean | Standard deviation | Skewness | Kurtosis | |
2014 | 809 | 1974 | 1488.0913 | 142.7847 | 0.1885 | 0.2580 |
Year | Test statistics | 5% critical value |
Without constant 2014 | -2.2313 | -1.95 |
With constant 2014 | -24.3513 | -2.86 |
With constant and trend 2014 | -27.8649 | -3.41 |
Year | Test statistics | 5% critical value |
With constant 2014 | -20.8710 | -2.862418 |
With trend 2014 | -23.6494 | -3.413069 |
Model | AIC | BIC | HQC | Log-likelihood |
MS(2)-AR(1) | 90520.77 | 90585.39 | 90530.43 | -45256.39 |
MS(2)-AR(2) | 90413.28 | 90510.21 | 90427.75 | -45200.64 |
MS(2)-AR(3) | 90391.16 | 90520.40 | 90410.45 | -45187.58 |
MS(2)-AR(4) | 90381.16 | 90542.71 | 90405.28 | -45180.58 |
Model | AIC | BIC | HQC | Log-likelihood |
AR(1) | 92472.54 | 92493.78 | 92479.78 | -46233.27 |
AR(2) | 92293.95 | 92322.26 | 92303.59 | -46142.97 |
AR(3) | 92272.28 | 92307.67 | 92284.34 | -46131.14 |
AR(4) | 92269.50 | 92311.97 | 92283.97 | -46128.75 |
MS(2)-AR(4) | 90381.16 | 90542.71 | 90405.28 | -45180.58 |
Regime | Parameter | Coefficient | Std. error | t-statistic | p-value |
1 | μ | 72.9800 | 6.4039 | 11.3962 | <0.0001 |
β1 | 0.8705 | 0.0143 | 60.8741 | <0.0001 | |
β2 | 0.0751 | 0.0156 | 4.8141 | <0.0001 | |
β3 | -0.0106 | 0.0136 | -0.7794 | 0.4357 | |
β4 | 0.0171 | 0.0105 | 1.6286 | 0.1034 | |
2 | μ | 211.3742 | 27.5262 | 7.6790 | <0.0001 |
β1 | 0.6267 | 0.0303 | 20.6832 | <0.0001 | |
β2 | 0.0827 | 0.0387 | 2.1370 | 0.0326 | |
β3 | 0.1040 | 0.0439 | 2.3690 | 0.0178 | |
β4 | 0.0389 | 0.0376 | 1.0346 | 0.3009 |