Optimal Power Flow Using Graph Neural Networks

Damian Owerko, Fernando Gama, Alejandro Ribeiro

Introduction

The Optimal Power Flow (OPF) problem is a cornerstone of modern energy systems, determining the most cost-effective generation schedule that satisfies physical grid constraints. While the linearized "DC OPF" is commonly used for its simplicity, it often fails to capture the complexities of stressed grids. Conversely, the accurate "AC OPF" is non-convex and NP-hard, making traditional solvers like IPOPT computationally prohibitive for real-time, large-scale applications.

Proposed Method: Imitation Learning with GNNs

To address these challenges, this work proposes a scalable approach using Graph Neural Networks (GNNs) trained via imitation learning. Instead of solving the optimization problem directly, a GNN is trained to mimic the outputs of a high-fidelity solver (IPOPT).

Unlike standard Multi-Layer Perceptrons (MLPs), GNNs explicitly incorporate the grid's physical topology into their architecture. This provides a powerful inductive bias, as the network "knows" which buses are connected by transmission lines.

The architecture of a GNN layer, showing how node features are transformed and aggregated across the graph structure.

Local Message Passing and Scalability

The core mechanism of the GNN is the graph convolution, where each node updates its state by aggregating information from its immediate neighbors. This local processing allows the model to scale efficiently; as the grid grows, the number of parameters remains manageable because filters are shared across the graph. This local-to-global information flow is key to capturing the physics of the grid without the overhead of fully connected layers.

Visualization of information propagation in a GNN. As layers increase, each node aggregates information from a wider neighborhood, effectively learning the global state through local interactions.

Experimental Results

The models were evaluated on the IEEE-30 and IEEE-118 benchmarks. The results demonstrate that GNNs significantly outperform MLPs in both accuracy and scalability. In the IEEE-118 case, a "Global GNN" achieved an RMSE of 0.00306, nearly three times more accurate than a comparable MLP.

The most striking result is the computational speedup. While the IPOPT solver required 18 seconds for the IEEE-118 case, the GNN provided a solution in approximately 50 microseconds—a $10^5$ speedup. This performance level enables real-time grid management and rapid "what-if" scenario analysis that were previously impossible.

Conclusion and Future Directions

By leveraging the inherent structure of power grids, GNNs offer a path toward high-speed, accurate OPF solutions. While current models assume a static topology and do not strictly guarantee physical feasibility, future work focusing on projection steps and transfer learning for changing topologies will be critical for deployment in real-world, dynamic power grids.

Summary updated

BibTeX
@inproceedings{owerko2019optimal,
  author = {Damian Owerko and Fernando Gama and Alejandro Ribeiro},
  title = {{Optimal Power Flow Using Graph Neural Networks}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2019},
  doi = {10.1109/icassp40776.2020.9053140},
}
Figure