NATIONAL GRID FREQUENCY AND TIME SERIES

TheNigerianWriter
7 min readDec 2, 2019
GRID TRANSMISSION LINES

Grid Frequency has always been a challenge to manage in many developing countries most especially in Africa which is my home continent. Ever since embarking on the data science journey having started as an Electrical Engineer. One question has been plaguing my thoughts — “Can Grid Frequency Prediction make Nigeria (my home country) electricity system a lot better than what it is today.

The Federal Republic of Nigeria, located on the western bend of the African continent is the world’s ninth-largest exporter of oil. The republic was declared in 1960 and has since become a nation with a $375.8 billion GDP. Nigeria exported 3.8% of the world’s total crude oil in 2018 with a value of $43.6 billion.

URBAN NIGERIA

FREQUENCY TIME SERIES FORECASTING

There is a difference in predicting frequency based on a number of independent variables by building a model using a machine learning algorithm and prediction of frequency at a certain point in time which is more forecasting. We are only interested in the latter. Accurate frequency prediction facilitates the National Grid operators in the decision process of precise generation scheduling.

THE BALANCING ACT OF ELECTRICITY SUPPLY

This section gives an overview into how the power gird system works:

Power grid system comprises of the generation, transmission, distribution and consumption at the consumer end. The backbone of the grid is the high-voltage overhead transmission lines that run across the country to remote areas. The power generated by the alternators in the power stations at 11KV is delivered, via step- up transformers, to the grid which transmits the electricity at 330/230/132 KV(depending on the country) to the remote substations of the command centres. Distribution of electricity takes place through feeders from these substations after the line voltage is lowered back to 11 KV by step-down transformer. Medium-voltage distribution lines are erected in different places in the locality up to the step-down transformers, either at customer premises or at distribution poles, where the line voltage is further lowered down to 440/220 V, suitable for the ratings of the electrical appliances. From these field transformers, low-voltage service connections are given to the domestic and commercial customers.

GENERATION PLANTS— CONSUMERS

When a bulk of generation fails, the burden of this load falls on the running sets of the power plants. The sudden extra load grips the prime mover/turbine like a brake and reduces its speed momentarily. When the speed falls below the set limit of frequency of 50Hz, the low frequency safety guard disengages the set from bus bar. The phenomenon is termed the set tripped. A set, when it trips, is relieved instantly of the carrying load and its speed of rotation tends to increase. When the speed crosses the upper set point, the set stops due to over speed safety guard. Thus the imbalance between generation and consumption goes on increasing and the generators trip and stop in the power plants one after another, leading to cascading failures causing a widespread blackout in the country. This has been a national plague to Nigeria, the UK has 35.639GW of demand in electricity and gas turbines provide 16.605 GW of power to satisfy that demand (45%).

Generation supply and demand on Sunday 01–12–2019 at 09:40

In stark contrast to Nigeria’s Electricity distribution landscape, the bulk of energy generation in the country is thermal generation (coal and gas) followed by hydroelectric (water) and hardly any renewable energy resource as an added source of power.

HOW DOES NIGERIA’S ELECTRICITY GENERATION COMPARE

With a country of more than 180 million people, with the largest economy in sub-Saharan Africa, the limitations in the power sector constrain economic growth and this article states that more than 20 million households are without power.Its current energy infrastructure can produce 12,522MW per day which is about 12.5GW but most days can only generate 4 GW of electricity and the current demand in the whole of the country is 25GW which means the country’s production is 21GW in deficit. That is less than one-third of what is required to supply its more than 180 million citizens.

ELECTRICITY INDUSTRY IN NIGERIA.

An overhaul of the electricity industry is not what the article is about but given real time frequency data, how best can we forecast the frequency output using time series modelling. Due to unavailability of Nigeria’s frequency data.I will make use of GRIDWATCH’s six year monthly average frequency between 1st January 2013 and 1st December 2019 of the UK power sector industry.

TIME SERIES MODELLING

The image above shows the frequency data monthly average from January 2013 to August 2019.

Next step is to visualise the time series plot of the monthly average frequency by performing stationarity checks such as rolling mean and rolling standard deviations.

It is clear to see that the mean of the series plot does not change over time which informs that the plot is stationary but we can augment our findings using the Dickey-Fuller test.

DICKEY-FULLER TESTS

The test statistic has a lower value than the critical values and the p-value is less than 0.05 which leads to confirm that the time series is stationary and we can reject the null hypothesis that states“the time series is not stationarity” and with the p-value being less than 0.05, it means our finding are statistically significant.It is important to check for the stationarity of the time series before modelling the data using the Dickey-Fuller test because we do not want time dependent features such as trend and seasonality in our model.

AUTOCORRELATION PLOT

This Autocorrelation plot shows that there is only one significant autocorrelation of an observed value in the time series and the only significance comes after 50 lag.

Autocorrelation plot shows the correlation of time series data with its own lagged values. For example, autocorrelation at lag=1 shows the correlation between y_t and y_t-1 which is none but at lag 52 there is autocorrelation of 0.5. The autocorrelation plot cuts off at 52 lag and the Partial Autocorrelation plot tails off at 52 lag.

Performing a grid search to find the best optimal model, the best SARIMA model to predict monthly average frequency is SARIMA model with AR order of 0, MA order of 1, differencing of 1 and seasonality of 12.As you can see the model is not complicated with only two features statistically significant in predicting the time series forecast. The AIC (Akaike information criterion) as a regularisation measure for selecting the best model is the most optimal after computing a combination of different orders at 34.109 and the coefficient parameters are significant.

TESTING OUT THE PREDICTION OF THE MODEL

The plot above shows the forecast as you can see the model predicts the monthly average frequency to a degree with a MSE of 0.1. The Mean squared error provides us with the average error of our forecasts. The limitation of this time series modelling is the non-occurrence of variation in the data. This is attributed to the fact that frequency threshold is +/- 1% ,if demand is greater than generation, the frequency falls while if generation is greater than demand, the frequency rises. So we can understand the lack thereof seasonality and trends in the data. Time series is probably not the best technique to predict frequency data due to the lack of variance in the data.

My conclusion is that there are ways Nigeria could improve their electricity sector by embedding some data science techniques which includes prediction modelling and time series forecast. But I feel that the sector needs significant investment from the government or private organisations since part of the industry is privatised. Better frequency prediction forecast or modelling informs the Control Centre operators of when to bring certain number of generators online and when to de-load some certain parts of the country so as to prevent total power blackouts more often which happen on average 20 times in a month.

--

--

TheNigerianWriter

Embrace the process, the events are merely highlights.