powerplant

adesso Blog

As European countries cut themselves off from Russian energy, they face the inevitable challenge of coping with restricted electricity supply. Here in Finland, this has resulted in all layers of society, from government and private companies to individual households and consumers, to come together in finding ways to conserve energy.

An essential part of avoiding the dreaded point, where electricity demand exceeds maximum national supply capability, is demand forecasting. From a production perspective, it is crucial to plan energy supply to match peaks in demand. On the other hand, forecasts might be useful for consumers who align their own consumption peaks with low-demand segments. From one perspective, this behavior helps to ease the pressure on the supply side. Additionally, it plays into the pockets of the consumers, since electricity prices can skyrocket during peak demand times.

We decided to take our own shot at predicting Finnish electricity demand and see how well we could do using a combination of historical consumption and weather data. Our chosen approach was a deep learning model that predicts, given a specific point in time, the hourly demand during the next 48 hours from that point.

Let us first take a look at how Finland consumes electricity. All the data we need is accessible through the open data portal of Fingrid, Finland’s transmission system operator.


Figure 1: Finnish electricity consumption over a four-year period


Figure 2: Finnish electricity consumption over a five-day period

As one might guess, we see evidence of periodic behavior on both daily, and yearly basis.

The model: what is Long Short-Term Memory and what do we feed it with?

The type of neural network we used for this task is called Long Short-Term Memory (LSTM). It is actually not a very new concept, being first introduced in 1997, but it has maintained its position as a trusted approach for time series forecasting. LSTM is a specialized type of recurrent neural network, that learns to analyze past information step-by-step, and use gate mechanisms to decide at each time point, how much of the past information is kept, and how strongly it is augmented with the current information. It then uses this knowledge to predict the future behavior of the time series.

To obtain our full training time series, we merged four years’ worth (01.01.2019-31.12.2022) of Finnish electricity consumption and temperature observation data together. In addition, we extracted the yearly and daily periodic patterns from the consumption data by decomposing it into trigonometric components. This helps the model learn to weigh its forecast according to the time of day and year. The training itself was done by feeding the network 6-day segments of this multivariate time series, asking it to predict the consumption for the next 48 hours, and comparing the prediction to the actual time series.

How it performs

The network manages to capture the daily fluctuation patterns, peaks and low points reasonably well, although these kinds of time series always have random components, and perfect predictions are impossible to make. Due to its nature, the LSTM network can get thrown off, for example, by strong deviations from short-term past behavior. Still, the most critical information, which is the timing of demand peaks and low points, is captured quite effectively by the model.


Figure 3: Comparison between the model forecast and actual electricity consumption during a 48h segment in April 2022

Conclusion

Time series analysis, such as electricity demand forecasting, play a vital role in shaping a more data-driven society. Having access to reasonable forecasts helps energy suppliers to align resources more effectively, and consumers to help flatten demand peaks, saving money while doing it.

Modern deep learning techniques, the LSTM network being one of them, present us with a plethora of options to develop these forecast models. It is far from an exact science to choose a modeling approach and develop its architecture to maximum predictive capability. Obviously, we still have a lot to learn when it comes to applying deep learning methods.

Picture Joel Himanen

Author Joel Himanen

Joel Himanen works as an Associate Data Scientist at adesso Nordics. He believes that learning to gather, use and share data in a smart and fair way is a crucial part of changing our world for the better. Alongside wrapping up his master’s studies at Aalto University, Joel has, for example, been working on predictive modeling to accelerate the circular economy transition in the construction industry.

Save this page. Remove this page.