Abstract
This paper introduces a hybrid control framework that combines the foresight of Model Predictive Control (MPC) with the adaptive learning capabilities of Reinforcement Learning (RL) to manage multi-agent battery storage systems. By employing a parameterized MPC as a structured function approximator within a Deterministic Policy Gradient (DPG) framework, the system learns to minimize electricity costs and respect grid constraints under significant price and demand uncertainty. Experimental results demonstrate that the learned policy effectively maintains battery health, optimizes economic outcomes, and ensures grid stability through peak shaving.
Introduction
As smart grids evolve, the transition toward decentralized energy systems allows individual households and businesses to participate in bidirectional power trading. However, managing a fleet of batteries in a multi-agent system presents significant challenges. Primarily, controllers must navigate high levels of uncertainty in electricity prices, local solar production, and household demand. Additionally, they must adhere to strict physical constraints—such as state-of-charge (SOC) limits to prevent battery degradation—and grid-imposed peak power limits to ensure infrastructure stability.
Traditional control methods often fall short: standard RL struggles with "hard" physical constraints and high-dimensional forecasts, while conventional MPC can be suboptimal when its internal model fails to capture real-world stochasticity. This research bridges the gap by proposing an MPC-based RL approach that treats the MPC as a "structured brain," leveraging known physics while learning to adapt to environmental noise.
Methods
The proposed framework utilizes a Parameterized MPC as the policy for the RL agent. Unlike "black-box" neural networks, the MPC structure incorporates the known physics of battery dynamics, making the learning process significantly more sample-efficient.
The core components of the methodology include:
- Deterministic Policy Gradient (DPG): The RL algorithm tunes the MPC's internal cost functions, model parameters (such as battery efficiency), and constraints ($\theta$) by observing system performance over time.
- Least Squares Temporal Difference (LSTD): This method provides a sample-efficient estimation of the value function (the long-term cost-to-go), facilitating stable gradient calculations for policy updates.
- Constraint Handling via Slack Variables: To maintain feasibility during the learning process, the MPC uses slack variables that allow for minor, heavily penalized constraint violations. This ensures the system remains stable while exploring optimal policies in a noisy environment.
Results and Discussion
The approach was validated using a 100-month simulation featuring real-world electricity price data from the Nord Pool European Power Exchange (Trondheim, Norway, November 2020) and synthetic Gaussian noise to model demand and production uncertainty.
Economic Optimization and Convergence
The system demonstrated significant improvement in economic performance ($J$) over the simulation period. The most rapid gains were observed within the first 20 months, as the RL agent successfully tuned the MPC parameters to better anticipate price fluctuations. The learning process showed clear convergence, with the gradient norm decreasing steadily as the policy stabilized.
Constraint Satisfaction and Policy Behavior
A key achievement of the RL-tuned policy is its ability to proactively manage battery health. Initially, an un-tuned MPC might allow the State-of-Charge (SOC) to drop below safe thresholds (e.g., 10%). After learning, the policy successfully keeps the batteries within a safer 20%–80% SOC range, avoiding high-penalty zones near physical limits.
Furthermore, the learned policy naturally converged to a "bang-bang" structure—alternating between maximum buying and maximum selling—which aligns with theoretical expectations for linear economic costs in stochastic environments. The centralized controller also successfully implemented "peak shaving," ensuring that the total power exchanged with the grid remained below the defined upper bound ($\bar{P} = 1.5$).
Conclusion
This research demonstrates that embedding MPC within an RL framework provides a robust solution for multi-agent battery management. By leveraging the structural advantages of MPC and the adaptive nature of RL, the system achieves superior economic performance while strictly adhering to physical and grid constraints. Future work will focus on developing decentralized learning architectures to address scalability and privacy concerns in larger-scale urban grid deployments.
Summary updated