Self-Supervised Learning for Soft-Constrained AC-OPF in Multiphase Distribution Systems

Hoang T. Nguyen, Deepjyoti Deka, Priya L. Donti, Varsha Pendyala, Nurali Virani, Wajid Muneer, Reetam Sen BiswasarXiv 2026

It’s late, you’ve had a long day, and the last thing you want to think about is the non-convex, non-linear nightmare of power grid optimization. But bear with me, because the way we manage electricity is changing, and the old math is starting to buckle under the pressure.

TL;DR

Modern power grids are becoming incredibly complex to manage in real-time due to the surge in renewable energy. This paper introduces a self-supervised AI that learns to solve the "Optimal Power Flow" problem thousands of times faster than traditional solvers, and it does so without needing any pre-solved "answers" to learn from.

What Problem Does This Paper Address?

Think of a distribution grid—the network of wires delivering power to your neighborhood—as a giant, multi-phase balancing act. Traditionally, power flowed one way: from big plants to your house. Now, with solar panels and batteries (Distributed Energy Resources, or DERs) everywhere, power flows in every direction.

To keep the grid stable, operators solve the AC Optimal Power Flow (AC-OPF) problem. They need to find the cheapest way to run the grid while keeping voltages and currents within safe limits. The catch? AC-OPF is "non-convex," which is math-speak for "really hard and slow to solve." Traditional solvers like IPOPT are great, but they are often too slow for the split-second decisions needed when a cloud suddenly covers a massive solar farm.

Furthermore, sometimes there is no perfect solution. In extreme weather, you might have to slightly violate a voltage limit to keep the lights on. Traditional "hard-constrained" solvers often just fail in these cases. We need "soft constraints"—where the system knows it’s okay to bend the rules a little, provided it pays a "penalty" in the objective function.

Methods

The authors propose a neural network (a Multi-Layer Perceptron) that acts as a lightning-fast surrogate for traditional solvers.

![Fig.

  1. Proposed method for learning to solve soft-constrained AC-OPF.](/figures/art_35f8fbd792624ddb8c57374b8fc637b4)

The "magic" happens in how it's trained:

  1. Self-Supervised Learning: Usually, AI needs "labels" (the right answers) to learn. Here, the AI learns by looking at the physics of the grid directly. It makes a prediction, checks how much that prediction costs and how many rules it breaks, and then adjusts itself. No slow traditional solver is needed during training.
  2. Differentiable Physics: The pipeline includes a "differentiable power flow solver." This allows the AI to "feel" how changing a battery's output affects the voltage three streets away, allowing it to calculate gradients and improve.
  3. The Clip & Penalty Strategy: Hard limits (like "this battery can't output more than 10kW") are enforced by a CLIP layer. Soft limits (like voltage ranges) are handled by adding penalties to the Loss Function. If the AI predicts a voltage that's too high, the loss goes up, and the AI learns to avoid that.

Datasets

The team tested their approach on standard IEEE benchmark systems that simulate real-world complexity:

  • IEEE 123-bus, 240-bus, and 906-bus systems.
  • They simulated 200,000 scenarios covering "Wide" (normal), "High-load/Low-generation," and "Low-load/High-generation" conditions to ensure the AI wasn't just a fair-weather friend.

Key Insights and Ideas

  • The "Flat" Optimum: One of the most interesting findings is that the AI doesn't have to match a traditional solver's setpoints exactly to be successful. As seen in Figure 7, the AI might pick different settings for individual batteries than IPOPT would, yet the total cost to the grid remains almost identical. This suggests the "solution space" is quite flat—there are many ways to be "optimal."
  • Speed is a Feature: By moving the heavy math to the training phase, the "inference" (using the model) becomes trivial. We're talking about moving from seconds or minutes down to milliseconds.
  • Handling Topology: Grids aren't static; switches flip all the time. The authors used the Sherman-Morrison-Woodbury (SMW) formula to update their internal grid model instantly when the topology changes, rather than re-calculating the whole matrix from scratch.

Key Results

The numbers are, frankly, staggering:

  • Speedup: The AI was between 58x and 5,272x faster than the IPOPT solver.
  • Accuracy: The "optimality gap" (how much more expensive the AI's solution was compared to the perfect one) was consistently under 1%.
  • Visual Fidelity: If you look at the voltage profiles in Figure 6, the AI’s predictions (red) almost perfectly overlay the "gold standard" solver (blue).

![Fig.

  1. Phase-wise voltage magnitudes and angles for our method and IPOPT in a single problem instance of the IEEE 123-bus system.](/figures/art_0190e07242d74301abb8fe982abc38f9)

Limitations and Future Work

While the results are impressive, the authors note a few hurdles:

  • Distribution Shift: If the grid conditions change drastically from what the AI saw during training (e.g., a 20% shift in load patterns), the accuracy drops, particularly regarding voltage penalties.
  • Discrete Decisions: Currently, the model handles continuous variables (like "how much power"). It doesn't yet handle discrete "on/off" decisions for equipment as gracefully.
  • Future Directions: The team aims to explore "label-free training-set augmentation" to make the models even more robust to weird, out-of-distribution grid events.

Summary updated

Abstract

This paper presents a self-supervised learning framework for fast, soft-constrained AC optimal power flow (OPF) in unbalanced multiphase distribution systems. The soft AC-OPF objective balances operating cost, renewable energy curtailment, and penalties for violating operating limits. A neural network predicts distributed energy resource (DER) setpoints conditioned on operating conditions, switch configurations, and objective weights. The predicted setpoints are then processed through a DER projection and differentiable AC power flow to enforce device limits and network equalities. The framework is trained by directly minimizing the AC-OPF objective, without optimal-solution labels. Experiments on 123-, 240-, and 906-bus systems yield mean objective gaps of 0.32%, 0.92%, and 0.56%, respectively, relative to IPOPT, across wide operating ranges. Across these systems and the evaluated high-load/low-generation and low-load/high-generation scenarios, the largest mean gap is 1.04%, with mean speedups of 58-5272 times relative to IPOPT.
BibTeX
@misc{nguyen2026self,
  author = {Hoang T. Nguyen and Deepjyoti Deka and Priya L. Donti and Varsha Pendyala and Nurali Virani and Wajid Muneer and Reetam Sen Biswas},
  title = {{Self-Supervised Learning for Soft-Constrained AC-OPF in Multiphase Distribution Systems}},
  year = {2026},
  eprint = {2611.31026},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.31026},
}
Figure