NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Dynamic Energy Management

Nicholas Moehle, Enzo Busseti, Stephen Boyd, Matt WytockSpringer Optimization and its Applications 2019 · OpenAlex

Abstract

We present a unified method, based on convex optimization, for managing the power produced and consumed by a network of devices over time. We start with the simple setting of optimizing power flows in a static network, and then proceed to the case of optimizing dynamic power flows, i.e., power flows that change with time over a horizon. We leverage this to develop a real-time control strategy, model predictive control, which at each time step solves a dynamic power flow optimization problem, using forecasts of future quantities such as demands, capacities, or prices, to choose the current power flow values. Finally, we consider a useful extension of model predictive control that explicitly accounts for uncertainty in the forecasts. We mirror our framework with an object-oriented software implementation, an open-source Python library for planning and controlling power flows at any scale. We demonstrate our method with various examples. Appendices give more detail about the package, and describe some basic but very effective methods for constructing forecasts from historical data.

Introduction

Modern power grids are undergoing a fundamental transformation. The transition from centralized, predictable generation to a decentralized landscape—integrated with volatile renewable sources like wind and solar, energy storage systems, and flexible, deferrable loads—presents a significant management challenge. Traditional static dispatch methods are no longer sufficient. Managing these modern systems requires dynamic management that accounts for time-varying constraints, such as battery states of charge and generator ramp rates, while navigating the inherent uncertainty of weather and demand.

This paper introduces a unified framework for managing power networks using convex optimization. By moving from static dispatch to real-time control under uncertainty, the proposed framework balances the "social" goal of minimizing total network cost with the economic reality of individual device profits.

Methodology

The framework is built upon a hierarchy of optimization techniques, ranging from simple snapshots to complex, uncertainty-aware control loops:

  • Static Optimal Power Flow (OPF): This uses convex optimization to determine the most cost-effective way to route power through a network at a single point in time.
  • Dynamic OPF: This extends the optimization over a time horizon ($T$ periods). This temporal extension allows the model to handle "coupling" constraints, such as a battery's state of charge (which depends on previous actions) or a generator's ramp-up limits.
  • Model Predictive Control (MPC): To handle real-time operations, the dynamic problem is re-solved at every time step using the latest forecasts. Only the first step of the resulting plan is executed, creating a feedback loop that naturally corrects for previous forecast errors.
  • Robust MPC: This extension considers multiple "scenarios" (plausible futures) simultaneously. By optimizing for a range of outcomes, the system creates a plan that is resilient to forecast inaccuracies.

Software Implementation: cvxpower

The authors implemented this framework in cvxpower, an open-source object-oriented Python library built on top of CVXPY. It utilizes a "device-terminal-net" abstraction, allowing users to build complex networks by modularly plugging together components like wind farms, batteries, and local grid connections.

Economic Insights and Equilibrium

A central contribution of this work is the bridge between optimization and economics. The authors demonstrate that Locational Marginal Prices (LMPs) are mathematically equivalent to the Lagrange multipliers of the power conservation constraints within the optimization problem.

This leads to a powerful insight regarding economic equilibrium: if every device in the network acts as a "price taker"—maximizing its own profit based on these LMPs—the resulting aggregate behavior is identical to the global cost-minimizing solution. This alignment ensures that individual incentives can drive social welfare in a decentralized market.

Case Study and Results

The methods were tested using NREL wind availability data from West Texas (2010–2012) in a simulation involving a wind farm integrated with a gas generator and storage. The performance was measured against a "Prescient" model (the theoretical lower bound with perfect knowledge of the future).

Strategy Monthly Operating Cost
Prescient (Perfect Knowledge) $3,269
Standard MPC (Basic Forecast) $3,869
Robust MPC (20 Scenarios) $3,291

The results highlight the efficacy of the robust approach: Robust MPC achieved performance within 1% of perfect future knowledge, despite using relatively inaccurate individual wind forecasts. This suggests that the combination of feedback (re-optimizing every step) and scenario-based planning is remarkably resilient to uncertainty.

Limitations and Future Work

While the framework is robust, several areas remain for future exploration:

  • DC vs. AC Models: The current work focuses on "DC" power flow models, which are linear and convex. Real-world AC power flow involves non-convex physics (voltage magnitudes and phase angles). While convex relaxations exist, they were not the primary focus of this study.
  • Market Dynamics: The economic equilibrium assumes all actors are "price takers." In smaller or highly constrained networks, large actors might possess the power to manipulate prices, a scenario that requires further game-theoretic analysis.
  • Computational Complexity: Solving robust MPC with a high number of scenarios across long horizons can be computationally intensive, potentially limiting its application in extremely large-scale, high-frequency grid operations.

Summary updated

BibTeX
@inproceedings{moehle2019dynamic,
  author = {Nicholas Moehle and Enzo Busseti and Stephen Boyd and Matt Wytock},
  title = {{Dynamic Energy Management}},
  booktitle = {Springer Optimization and its Applications},
  year = {2019},
  doi = {10.1007/978-3-030-22788-3\_4},
}

Loading related content...

Figure