# Learning to Solve AC Optimal Power Flow by Differentiating through Holomorphic Embeddings

arXiv: https://arxiv.org/abs/2012.09622 · HTML: https://mlsanity.com/paper/2012.09622/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 16 Dec 2020.

## Built on by (most cited first, 3 of 3)

- [Learning to Solve the AC-OPF using Sensitivity-Informed Deep Neural Networks](https://mlsanity.com/paper/2103.14779/) (2021)
- [Learning to Solve the AC Optimal Power Flow via a Lagrangian Approach](https://mlsanity.com/paper/2110.01653/) (2021)
- [Reinforcement Learning for Battery Energy Storage Dispatch augmented with Model-based Optimizer](https://mlsanity.com/paper/2109.01659/) (2021)

## Abstract (arXiv)

Alternating current optimal power flow (AC-OPF) is one of the fundamental problems in power systems operation. AC-OPF is traditionally cast as a constrained optimization problem that seeks optimal generation set points whilst fulfilling a set of non-linear equality constraints -- the power flow equations. With increasing penetration of renewable generation, grid operators need to solve larger problems at shorter intervals. This motivates the research interest in learning OPF solutions with neural networks, which have fast inference time and is potentially scalable to large networks. The main difficulty in solving the AC-OPF problem lies in dealing with this equality constraint that has spurious roots, i.e. there are assignments of voltages that fulfill the power flow equations that however are not physically realizable. This property renders any method relying on projected-gradients brittle because these non-physical roots can act as attractors. In this paper, we show efficient strategies that circumvent this problem by differentiating through the operations of a power flow solver that embeds the power flow equations into a holomorphic function. The resulting learning-based approach is validated experimentally on a 200-bus system and we show that, after training, the learned agent produces optimized power flow solutions reliably and fast. Specifically, we report a 12x increase in speed and a 40% increase in robustness compared to a traditional solver. To the best of our knowledge, this approach constitutes the first learning-based approach that successfully respects the full non-linear AC-OPF equations.
