· Philipp Leser
Why Energy MPC?
How a predictive approach may improve your energy management and reduce energy costs.
According to a PwC study about 34% of CEOs of German medium size companies consider their company under existential threat. A similar study of the KFW Bank also reveals that about 47% (or even 52% in manufacturing) consider energy prices as the biggest problem.
If you are somehow involved in energy trading, energy management or procurement for one of these energy-intensive companies, you are probably not interested in reading a “know it all” blog post that is, in fact, just repeating information you already have or could google yourself. I assume that the readers of this blog post already know that times have changed, and that they predict that the planned EU energy markets reforms will even increase the pressure to adapt.
Massive changes are at best annoying, in the worst case, they put the business in danger. People tend to blame the government or the EU. But a brief look at China and their strategic reasoning for making the change to renewable energies it is quite probable that the old times are gone.
So what now? Many medium-sized companies in the DACH region (Germany, Austria and Switzerland) try to minimize their energy costs and regularly start projects to tackle that. Either by trying to become more energy efficient or by optimizing energy procurement. And they have been doing this for a long time now. Long before it was a fancy topic for trendy posts on LinkedIn. In our experience, medium-sized companies in the DACH region are rather innovative. So why don’t we see more flexibility in the planning of energy-intensive manufacturing or more energy storage solutions in these companies then? Why do they still procure their energy from a big utility? Because, until recently, it didn’t make any sense to do so! If you ask them, you will see that many of them have considered that a couple of times in the past. But pushed it into the backlog. The competitive pressure for these small and medium-sized companies is wild. There is neither time nor budget for horsing around!
On the other hand, many of these businesses already know, or at least suspect, that their plant is actually a Prosumer . They might be handling steel or do plastic casting, but their plant actually could be considered a “hybrid power plant” .
Simply put:
- they have machines and processes that consume energy (machines, server farm, …)
- they also own assets that produce energy (solar panels on rooftops, wind turbines, usable waste heat, …)
- possibly energy storage (hot water tanks, heat pumps, batteries for Uniterruptible Power Supply (USP) )
The combination of a “hybrid plant” and drastic changes in energy markets presents a challenge. But for fast movers it is also a chance to separate from the competition, reduce long-term energy costs, cut ties to big utilities and monetize potential flexibility in the manufacturing schedule.
Model Predictive Control (MPC)
Given the above conditions, it makes sense to model and then optimize the whole plant, that is the system of energy consumption, production and storage. Like I already mentioned: the fact that we don’t see this already everywhere is that in the past, the risks and investments out-weighted the potential gains. Hidden Champions are often market leaders because of their laser sharp focus on their core business. And don’t take stupid risks.
We think these mid-sized companies should approach any innovations in energy management and energy procurement cautiously. Step by step. European energy markets are rather complex. And honestly still not as transparent as we would like them to have (even though great is made). Not everybody can recite the exact definitions for the multitude of ancillary services products (FCR, aFRR, mFRR, …) In Germany, many companies already pass the trading of their assets to a specialized trading operation, a so called “Direktvermarkter” . There are some really awesome and innovative operations out there, like Flexpower that offer, IMHO, transparent and fair solutions.
On the other hand, we hear that more and more companies want to take the whole energy management and procurement into their own hands. For big energy-intensive companies, that have always been the case. Deutsche Bahn and BASF always had their own trading operations. Many medium-sized companies are thinking about moving in the same direction. Obviously, no medium or small-sized company can or should manage that in one “big bang” transformation step.
As soon as the decision is made to take more control in energy procurement and energy management, there needs to exist a strategy. As already eluded, we think this should be done step by step. Roughly, there are three steps:
-
Prediction: Even if an external trading operation is involved to handle the procurement, a solid prediction of the energy consumption is a “necessary condition” for all the following evolutions. Most of the time this is more work than anticipated.
- electricity consumption data and production schedule needs to be cleaned and prepared. Sometimes other data, like weather data, is also helpful to improve the predictions. There is a lot of data-engineering to do.
- if the company also owns energy generation assets, these have to be predicted as well. Predicting solar assets is a well-developed field, and most of the time it makes sense to include a specialized service provider here. These predictions need to be integrated as well.
- if available, storage options have to be modeled and predicted as well. State Of Charge (SOC) is almost and alchemy :).
-
Procurement in the energy markets: If the prediction system is good enough, the next step is to actually sell and buy energy (and probably ancillary services) in the markets. This more than just “buying electricity”. No matter how good the predictions are, there will be errors. This implies risk that needs to be managed. It doesn’t matter whether you are taking the risk officially or push it down to one of the service providers: that risk does not get away and, like in the insurance industry, somebody wants to be compensated for taking the risk. You might not have realized this in the past, but differences in predicted and actual demand need to be balanced in the ancillary service markets. This has always been the case. At this stage, storage is only used to buffer your own errors in predicted demand.
-
Optimal control of the whole plant: Now it’s time to take on the challenge of optimizing the whole system. Minimizing the overall energy costs with respect to:
- your own energy generating capacity
- storage capacity
- manufacturing and consumption schedule
- (eventually) flexibility manufacturing schedule
- market data
- other constraints (noise regulations, maintenance, …)
Every one of these three steps is quite a challenge. It should be checked at all stages that there is enough potential to justify the efforts and investments. We think that these small companies are quite good at evaluating this. Energy must be a major cost driver!
An improved demand prediction almost always makes sense. In the future, a good prediction of your net consumption will always be of monetary value. If your prediction and demand match, you will become a good client for your energy provider. You will be compensated for that in the future.
Energy trading in European markets is complex. That is not a bug. That is a feature. The interplay between the multitude of market products (intraday, day ahead, ancillary services, Futures, PPAs, …) and the actual physical delivery can be quite complicated. Depending on the implementation, this implies that market access, communication protocols and data feed can become a lot of work. In my opinion, School of Flex is a good intro here. Everything beyond that is out of scope here.
After the first two stages, there exists a solid prediction system and a way to procure energy in the markets. Now it is time to optimize the interplay of using storage, producing energy and consuming energy in order to minimize costs. But how could we do this?
Several properties make this a rather tough optimization problem to solve:
- it is a sequential decision problem. We need to plan and buy hours ahead. Market prices change continuously. With every new bit of arriving information, we might to have to adapt the decision. Hence, it is actually a sequence of decisions.
- it is also a stochastic optimization problem. Weather and market prices are non-deterministic.
- a bunch of linear and non-linear constraints
- probably a complex loss function
- …
The points mentioned above indicate that this is not a classical linear or convex problem where we can get an exact optimum. In this context, “optimizing” just means “make it better than it has been before”.
We didn’t name our company “Data-Cybernetics” just because it sounds cool. Or at least not only because of that :). We do believe, that many problems in business, science and engineering can be framed as sequential decision or sequential optimization problems. “Sequential decision-making” is a sub discipline of optimal control, cybernetics and operations research. And hence part of almost all engineering disciplines, but also has its applications in economics, finance, computer science and biology. Therefore, there are a lot of different academic “tribes” researching the same problem. All with their own notation. I, personally, consider the book Reinforcement Learning and Stochastic Optimization: A Unified Framework for Sequential Decisions quite helpful here because it tries to unify the different approaches and define a single notation.
A solid formulation of the problem is a necessary condition. But not a sufficient one. “AI” fairy-dust will also not solve that problem for you. Even though many PowerPoint slides and LinkedIn posts try to tell you something different.
We choose Model Predictive Control as a description for our approach. That is actually not entirely correct and a bid misleading. Control theory defines MPC a bit stricter. Most of the time, you have some explicit model of a dynamical system in the form of a system of differential equations. This is obviously a lost cause in our case. Instead of a system of differential equations, we use a mix of “Digital Twin Models” and machine learning models to model the plants’ behavior. And instead of an MLP solver we have to fall back on a set of specific optimization models, meta-heuristics and machine learning-based approaches.
So MPC uses a prediction model, to simulate a sequence of decisions and find the optimal path. With the arrival of new information, the optimization is re-run and the solution is updated.
For this, we need the following building blocks:
- a “plant model”. A model of the hybrid assets and all their components.
- an “optimizer” module.
- systems that provide data for these components
- monitoring and an anomaly detection system for the inputs and outputs of the systems.
- in some cases, it is useful to implement a state estimation module as well.
We also have to be hones here. Often the term “digital twin” is a bit of a grandiose name for a simple function that models a component output given certain inputs. Often taken directly from the manual. Therefore, we often call these models “fundamental models”. The whole development should be driven by pragmatic considerations. Still, the design of these digital twins of consumption machines, energy producing assets and storage solutions require domain knowledge and some work. But they are necessary for a predictive approach. We need to be able to simulate different decisions.
In case the fundamental models are not enough and there are other drivers (like temperature) of energy consumption or production, the fundamental models can be augmented by a machine learning model that takes the predictions of the digital twins as inputs and combines them with other data sets to enhance the predictions and correct systematic errors.
In addition, the data engineering for the prediction systems is not free lunch. This also holds true for all market access related components.
So there are plenty of investments and a lot of work. On the other hand, the presented system needs not to be a real-time system from the start. Or to be completely automated without any human input. On the contrary. We strongly advise against the early focus on complete automation here. Instead, we would consider this as a decision support system, following a Human in the Loop approach. This allows for a step-by-step approach, where each stage itself adds value on its own.
Conclusion
Taking control of energy management and energy procurement can become a competitive advantage for energy-intensive medium or small companies. This takes time and investment. Try to transform everything at once will probably fail.
Our MPC approach gives a general, flexible and modular framework to approach the problem step by step. We (and everybody else) would be lying if we would tell you that we have everything ready as a “plug and play” solution. A massive transformation like that is an individual and iterative process, that includes more than software and some mathematical modelling or machine learning. It will include organizational changes, will have legal implications, and will involve finding good partners and service providers.
If you are involved in an energy-intensive company and are considering exploring the problem of minimizing your energy costs, we would love to talk to you. And if you are already in the process, we are overly interested in your experiences and lessons learned. Let’s talk.