An Efficient Learning-Based Solver for Two-Stage DC Optimal Power Flow with Feasibility Guarantees

Ling Zhang, Daniel Tabas, Baosen Zhang · OpenReview

Abstract

This paper presents a novel neural-network-based approach to solving two-stage stochastic DC Optimal Power Flow (DCOPF) problems. By integrating a differentiable gauge map into the network architecture, the proposed solver ensures strict feasibility of grid constraints while achieving computational speeds up to six orders of magnitude faster than conventional solvers. The method is evaluated on standard IEEE benchmarks, demonstrating near-optimal cost performance with unprecedented real-time solving capabilities.

Introduction

In modern power systems, the Optimal Power Flow (OPF) problem is fundamental to determining the most cost-effective generation and transmission strategies while maintaining grid stability. The increasing penetration of volatile renewable energy sources necessitates a two-stage stochastic programming approach. In the first stage, operators make "pre-dispatch" decisions based on forecasts; in the second stage, "recourse" adjustments are made once actual renewable output is realized.

Traditional methods like Sample Average Approximation (SAA) rely on solving massive linear programs, which are often too slow for real-time operations. Conversely, simpler "affine policies" provide speed but frequently violate physical grid constraints, such as line limits. This research introduces a solver that bridges this gap, providing both extreme speed and mathematical guarantees of feasibility.

Methodology: Feasibility by Design

The proposed architecture utilizes two specialized subnetworks: $\phi^0$ for first-stage dispatch decisions and $\phi^R$ to approximate the second-stage "cost-to-go."

The Gauge Map Innovation

The defining feature of this approach is the integration of a gauge map within the neural network's final layers. Standard neural networks typically output values within a fixed range (e.g., -1 to 1), which does not naturally align with the complex, high-dimensional polyhedral constraints of a power grid.

Visualization of the gauge map transforming a unit hypercube to a feasible polyhedron.

As illustrated in the figure above, the gauge map acts as a differentiable function that bijectively maps a simple unit hypercube (the raw output of the neural network) to the complex feasible polyhedron defined by grid constraints. This architectural choice ensures that the network cannot produce an infeasible solution, eliminating the need for computationally expensive post-processing or projection steps. Because the map is differentiable, the entire system can be trained end-to-end using unsupervised learning, where the loss function is the actual cost objective of the DCOPF problem.

Experimental Results

The model was rigorously tested on the IEEE 118-bus system and a large-scale 2000-bus synthetic grid (modeled after the ERCOT footprint). Training involved 50,000 load forecasts, with performance compared against the industry-standard commercial solver, CVXPY.

Performance and Accuracy

The results demonstrate a transformative leap in computational efficiency. On the 118-bus system, the proposed method achieved a solving time of $10^{-7}$ seconds—a million-fold speedup compared to CVXPY's 24 seconds.

Performance comparison on the 118-bus system showing speed and cost metrics.

Despite this speed, the accuracy remains high, with total costs staying within 0.77% to 1.5% of the absolute mathematical optimum. Furthermore, the model showed superior robustness compared to affine policies, which often resulted in significantly higher costs or failed to generalize to new load scenarios.

Conclusion and Future Work

This research proves that learning-based solvers can provide the speed required for real-time grid management without sacrificing feasibility. While this work focuses on the linearized DC model, future research will explore extending the gauge map technique to the non-linear and non-convex equations governing AC power flow. Additionally, adapting the architecture to handle dynamic grid topologies and complex binary constraints remains a key area for development.

Summary updated

Abstract

In this paper, we consider the scenario-based two-stage stochastic DC optimal power flow (OPF) problem for optimal and reliable dispatch when the load is facing uncertainty. Although this problem is a linear program, it remains computationally challenging to solve due to the large number of scenarios needed to accurately represent the uncertainties. To mitigate the computational issues, many techniques have been proposed to approximate the second-stage decisions so they can dealt more efficiently. The challenge of finding good policies to approximate the second-stage decisions is that these solutions need to be feasible, which has been difficult to achieve with existing policies. To address these challenges, this paper proposes a learning method to solve the two-stage problem in a more efficient and optimal way. A technique called the gauge map is incorporated into the learning architecture design to guarantee the learned solutions' feasibility to the network constraints. Namely, we can design policies that are feed forward functions that only output feasible solutions. Simulation results on standard IEEE systems show that, compared to iterative solvers and the widely used affine policy, our proposed method not only learns solutions of good quality but also accelerates the computation by orders of magnitude.
BibTeX
@misc{zhang2023efficient,
  author = {Ling Zhang and Daniel Tabas and Baosen Zhang},
  title = {{An Efficient Learning-Based Solver for Two-Stage DC Optimal Power Flow with Feasibility Guarantees}},
  year = {2023},
  eprint = {2304.01409},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.01409},
}
Figure