Introduction
Managing Multi-Energy Systems (MES)—which integrate electricity, heating, and gas—is a complex balancing act. The goal is to minimize operational costs while satisfying volatile demands and technical constraints. Traditionally, Model Predictive Control (MPC) has been the industry standard. However, MPC faces significant "hidden costs," including the high engineering effort required to build precise mathematical models and its sensitivity to forecast errors.
This paper provides a head-to-head comparison between traditional MPC and Reinforcement Learning (RL). RL offers a model-free alternative that learns optimal control policies through direct interaction with the environment, potentially bypassing the need for complex manual modeling.
As shown in the table above, while MPC excels in theoretical maturity and constraint handling, it suffers from high online complexity. RL is inherently adaptive and has low online complexity, though it currently lacks the mature safety theories of MPC.
Methodology
The researchers developed a simulation toolchain using Modelica for high-fidelity physical modeling, exported as a Functional Mock-up Unit (FMU) and wrapped in an OpenAI Gym environment.
The study compared four controllers:
- Perfect Foresight LMPC: A Linear MPC with 100% accurate future knowledge (the theoretical ceiling).
- Realistic LMPC: An MPC using noisy, "realistic" Gaussian forecasts.
- PPO (Proximal Policy Optimization): An on-policy RL algorithm.
- TD3 (Twin Delayed DDPG): A state-of-the-art off-policy RL algorithm for continuous action spaces.
The RL agents were tuned using Optuna, an automated hyperparameter optimization framework, to ensure a fair comparison.
Case Studies and Data
Two dynamic simulation environments based on real-world conditions in Dresden, Germany, were used:
- Case Study I (Simple): A 5-asset system (wind, PV, gas boiler, CHP, and battery) governed by 2,430 differential-algebraic equations.
- Case Study II (Complex): A 9-asset system including a heat pump, genset, and thermal storage, governed by 2,548 equations.
Simulations were driven by real-world hourly electrical/thermal demand, day-ahead electricity prices, and weather data.
Key Results and Insights
The results demonstrate that RL agents, specifically TD3, can outperform realistic MPC implementations by learning system dynamics directly from data.
- Performance Benchmarks: In the simple case, the TD3 agent achieved 101.5% of the perfect LMPC's performance. In the complex case, it reached 94.6%, significantly beating the realistic LMPC, which fell to 89.9%.
- The "Linearity Trap": TD3's ability to capture non-linear system dynamics allowed it to surpass even the "perfect" Linear MPC in simpler scenarios, as LMPC is limited by its own simplifications.
- Robustness to Uncertainty: While realistic MPC performance drops significantly under forecast uncertainty, RL agents are inherently more robust because they learn the environment's stochasticity rather than relying on a single predicted trajectory.
- Execution Speed: Once trained, RL agents execute in milliseconds, whereas MPC requires solving complex optimization problems (MILP) at every time step, which can take seconds or minutes.
Limitations and Future Work
Despite its performance, RL faces challenges regarding safety and training time. The agents required approximately two years of simulated interaction to reach peak performance and engaged in "unsafe interactions" during the exploration phase.
Future research will focus on "Shielding" (enforcing safety constraints via temporal logic) and Model-Based RL (like the Dyna-algorithm) to accelerate the learning process and ensure that the agent never takes a catastrophic action during its exploration phase.
Summary updated