Reducing Electricity Grid Imbalance Via Load Profile Prediction

May 14, 2024

How did ROITI reduce electricity grid imbalance via load profile prediction for a client?

The Use Case

Our client provides electricity to a large industrial facility in Germany with a peculiar load profile (Fig 1) [Note 1]. The consumption can fluctuate between a couple of MW to more than 100 MW in the span of a couple of quarter-hours. Since our client needs to nominate the consumption on the day-ahead market they need a good forecast of the load profile to avoid accruing imbalance [Note 2]. Imbalance is problematic not only because of costs but also because at certain scales it starts to present technical problems to the grid operator.

Figure 1.

Since it is extremely difficult to forecast the load profile the day before, our client nominates a certain average amount on the day-ahead market and corrects the imbalance on the intraday market 30 minutes before delivery. Without any correction, the amount of balancing energy amounts to 33% of the actual consumption, quite a significant percentage. The correction is based on a forecasting model. This is where we came in.

Our Role

Our client had developed a forecasting model which reduced the overall imbalance by 26%. We improved this to 37%. This we show with a performance backtest between May 2022 and May 2023 (Fig 2.).

Figure 2.

The backtest is carried out in the following way:

We train our model on data from March and April 2022. We then let the model predict 30 minutes before delivery for every quarter-hour in the following three months – May, June, and July. Since the data is historical, we can calculate the performance of our model. We then retrain the model on the whole data until July and predict the next three months and so on.

At every point in time, the model predicts data it has not seen (“out-of-sample”), and the backtest also incorporates the effect of model retraining.


The task involved methods from the field of time series prediction. These are traditionally statistical and, as of more recently, machine learning methods that aim to predict a future value based on past values. In our use case, we use 96 past quarter hours of consumption to predict the third quarter hour. As additional data to predict, we use the day-ahead nominations from our client.

While the nominations do not tackle the fluctuations in the load profile, they do mirror the shift schedule of the industrial complex (our client receives these schedules from the complex’s management). Finally, we provide the model with the hour-of-day, day-of-week, and month-of-year of each quarter-hour. It thus learns consumption patterns related to those (f. ex. that there is less consumption over the Christmas period).

There are numerous state-of-the-art models when it comes to time series prediction. ARIMA (Autoregressive Integrated Moving Average) models used to be the traditional choice. Our client initially used a Random Forest model – a much more recent type of technology. After comparing various models, our model of choice was the Temporal Fusion Transformer (TFT) – a very recent model based on deep learning and neural networks. It outperformed the rest by reducing the imbalance with approximately 10 pp (percentage points) in the backtest.

An interesting detail is that TFT borrows some of the technology behind the now famous ChatGPT – the name “Transformer” refers to the same transformer as in ChatGPT – “Chat Generative Pretrained Transformer”.

Finally, an additional benefit of TFT is that it is part of a family of “probabilistic time series predictors”. This means it can also predict a probability distribution (Fig. 3.). In other words, it can predict not only the consumption for a certain quarter-hour but also the probability that the actual value falls within a certain range. While not particularly necessary for our use case, this can have a large utility in other situations, such as risk management. 

Figure 3.

The Cost-Side – a not so straightforward issue

While generating imbalance is to be avoided, cutting costs may not be straightforward. The final stage of imbalance correction is when the grid operator turns on the balancing infrastructure (generators and sinks). In Germany, the cost of balancing the operator charges is not a penalty, but a price.

A positive imbalance means one is using less than nominated. If for a specific quarter-hour, the grid is short on power, such positive imbalance may support the system and generate revenue – the operator will pay the imbalance price. The price may also be negative. In these situations, a negative imbalance will generate revenue – the consumer would be pulling from the grid when there is a surplus. While this sounds like a market, it is strictly forbidden to speculate with the imbalance price. Each participant in the grid must avoid imbalance to the best of their ability.

A further complication that can occur is that usually, the price for imbalanced energy is higher than day-ahead and intraday prices. When we analyzed the status quo in our use case we noticed that with the current model, after a reduction of 26%, the final imbalance leftover consisted of more buying than selling. The facility used on average more than anticipated. When imbalance prices are higher than intraday prices, reducing imbalance reduces costs by avoiding buying at the higher imbalance prices. The situation, however, becomes the opposite if imbalance prices are lower than intraday. Then, paradoxically, reducing imbalance leads to additional costs, because one is better off buying at imbalance prices than at the higher intraday prices. This was happening in some periods in 2022 and 2023.

Because speculating with the imbalance price is forbidden, we were up against a serious problem. We had to find a way to reduce costs derived from a price (the imbalance price) that we were not supposed to speculate with. The way we tackled that was by adopting what one may refer to as a “market neutral strategy” and having a “symmetrical” imbalance. We tuned our model and overall process in such a way that the buying and selling when correcting imbalances are almost equal. Since the load profile fluctuates almost every quarter-hour, correcting the imbalance requires buying in one quarter-hour and selling in the next. Buying and selling so close in time usually means that the price would be similar between the two transactions. Thus, with similar prices, whether one incurs costs or generates revenue is mostly dependent on the amount of buying and selling.

Since we tuned the model to correct the imbalance symmetrically, these amounts were the same and they canceled each other out at the margins. Long-term, the strategy’s bottom line was zero. No revenue, no costs, but imbalance reduced. Our client welcomed the idea of having a robust zero-cost operation. Without speculating about the prices, the alternative is to rely on market dynamics and have nothing better than hope to be on the right side of the transaction.


Author: Ivan Dochev, Senior Data Scientist

[1] Note that for data protection purposes we cannot present any concrete numbers, only relative and ballpark values.

[2] Imbalance occurs when an amount of electricity for a particular quarter-hour is nominated, but the actual consumption differs. Germany has a special price for “imbalance energy” – the energy that needs to be added to or taken from the grid to bridge the difference between the nomination and the actual consumption.

(Visited 66 times)