*Joseph O’Brien and Eoin Mooney*

A time series is an ordered sequence of values of a variable at equally spaced times. Some business metrics naturally lend themselves to time series analysis, one of which is the consumption of electricity that is measured at half hourly time points. In this blog post, we will describe a recent industry project undertaken by a number of MACSI researchers for Vayu Energy, a supplier of electricity, that requires accurate forecasts of their customer’s future electricity demand based upon past observations.

From May 23^{rd} 2018, due to the Irish electricity market’s scheduled transition from SEM to I-SEM, electricity suppliers in Ireland and Northern Ireland will forward purchase their customer’s electricity requirements in the Day Ahead market, 24 hours ahead of real-time. The new market is designed so that the more accurate these Day Ahead forecasts are, the lower the overall cost of electricity should be for the end consumer.

The above chart shows a typical month’s demand for electricity from Vayu’s customer portfolio. There appears to be a repeated pattern after every seventh cycle which are the weeks. There appears to be five days of higher demand (the weekdays) followed by two days with less demand. This is expected as the majority of Vayu’s customers are Industrial/Commercial and would have a much higher consumption profile during the week.

**Mathematical Modelling**

From a time series perspective, there is a number of interesting characteristics in such data; mainly as each observation has a number of correlated steps.

- Daily – The demand at any given period would be related to the same time the previous day i.e. a seasonality of 48.
- Weekly – There is a relationship between the observation on any given day and at the same point the previous week i.e. a seasonality of 336.
- Yearly – The demand on given days would be similar each year, however the effect of this is small in comparison to the other seasonalities.

There are also short-term correlations; for example the demand in any given half hour period is affected by the demand in the previous half hour periods, so this needs to be considered.

One issue with using such a large number of seasonalities however, is that we run into both memory issues and computation time problems. To get around this we first fitted a Fourier Series to the underlying data and then taking the residuals from this fit, we used a time series model to the errors, which is a less complex challenge.

Another large issue was that on public holidays the demand is much less than average for a given weekday; to factor this in we needed to use covariates to subtract a certain quantity away from the predicted demand on such days.

**Results**

After developing the model and performing statistical fitting to determine the number of parameters to include for final predictions, we had a system which could closely forecast the half hourly electricity demand a number of days in advance for Vayu’s entire customer portfolio.

An example of such a prediction is shown below where the blue lines represent our model’s predictions versus the actual demand shown by the black lines.

This problem was a good example of how mathematical theories can be applied to industrial problems and the advantages they can bring to commercial partners.

Vayu Energy has been preparing for the Irish electricity market’s transition from SEM to I-SEM for over 2 years and have invested in systems, models, software and human resources as well as developing an I-SEM customer communications program to ensure they and their customers are fully prepared come May 2018.

The customer demand forecasting capability that MACSI has developed for Vayu is a key component of their I-SEM readiness project and these models will have a crucial role in the daily operation of Vayu’s electricity business in I-SEM.

*Joseph O’Brien is a first year PhD student in MACSI, he is working under the supervision of Professor James Gleeson and Dr Kevin Burke. Joseph is funded through a SFI project (16/IA/4470) that will develop new mathematical techniques and models to help understand the dynamics of social spreading phenomena, such as viral information contagion and cascades of popularity.*

*Eoin Mooney is the Head of Trading at Vayu. Eoin has a strong interest in the quantitative side of trading having spent more than 10 years as the Head of Algorithmic Trading at a top Financial Trading firm in Dublin. He graduated from Trinity College Dublin with a degree in Mathematics and a masters in High Performance Computing.*