betaFeedback

WorksEngineering

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

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.

Introduction

As distribution networks incorporate a growing proportion of distributed energy resources, system operators need fast AC optimal power flow (AC-OPF) solutions due to the inherent variability of DERs and the need to assess a large number of operating scenarios. Given the sheer number of DERs and the nonconvex, nonlinear nature of the AC-OPF problem, traditional optimization solvers are simply too slow to support rapid operational decisions and analysis. In addition, many practical scenarios require soft-constrained formulations that penalize constraint violations rather than enforcing them as hard constraints to handle infeasible operating conditions. In this context, a fast learning-based surrogate offers a promising approach to approximate AC-OPF solutions.

Supervised approaches such as DeepOPF [1] predict a subset of the decision variables, reconstruct the remaining ones through the AC power-flow equations, and penalize inequality violations during training, but rely on solver-generated optimal solutions as labels. Recent work on foundation models for transmission-grid analysis includes GridSFM [2], which predicts AC-OPF solutions across diverse grid topologies, and GENCO [3], which provides a unified neural architecture for power flow, OPF, and state estimation. Both combine supervision from solver-generated solutions with physics-based training losses, retaining a dependence on labeled data.

Self-supervised learning approximates AC-OPF solutions by training directly on the objective function and constraints, bypassing the cost of generating optimal solution labels. DC3 [4] combines a completion of partial predictions to satisfy equality constraints with gradient-based correction to reduce inequality violations. FSNet [5] incorporates a differentiable feasibility-seeking step that minimizes constraint violations, enabling end-to-end training. An augmented-Lagrangian objective is used to train a model that predicts a subset of decision variables and determines the remaining ones through AC power flow [6]. Primal-dual learning jointly trains primal and dual neural networks to approximate primal solutions and instance-specific Lagrange multipliers [7].

In distribution grids, augmented-Lagrangian-guided learning incorporates instance-specific multipliers and penalties into neural-network training to enable voltage regulation and loss reduction [8]. Large multiphase distribution feeders additionally require accounting for phase imbalance and switch-induced topology changes. Our previous work [9] addresses these requirements through a self-supervised framework combining differentiable power flow, efficient admittance-inverse updates, and feasibility seeking, with evaluation on unbalanced feeders ranging from 13 to 8,500 nodes. However, the constraint-handling mechanisms in all of these methods, including our own, aim to satisfy prescribed operating limits as hard constraints; none explicitly prices operating-limit exceedances in a soft-constrained OPF objective.

Compared to our previous work [9] on hard-constrained AC-OPF, this paper extends the self-supervised learning approach to a soft-constrained AC-OPF formulation for multiphase distribution systems. Voltage magnitude, branch current, angle difference, and substation apparent-power limits are penalized in the objective, while the AC power-flow equations and DER operating limits remain hard constraints. This formulation can accommodate challenging operating scenarios in which the prescribed network limits cannot all be satisfied, enabling operators to assess the trade-offs between operating cost, renewable curtailment, and constraint violations. Experiments look at a high level of renewable penetration under a broad range of operating conditions, including high-load/low-DER and low-load/high-DER scenarios. Beyond objective gaps and computational speed, we compare individual objective components and the resulting voltage profiles and DER dispatches with those obtained using a nonlinear optimization solver.

Soft-constrained AC-OPF Formulation

We consider a multiphase distribution feeder with non-slack phase nodes P={1,…,Np}\mathcal{P} = \{1,\ldots,N_p\} and fixed substation (slack voltage v0\mathbf{v}_0 on phases Φ0\Phi_0. Let E\mathcal{E} and Esw\mathcal{E}_{\mathrm{sw}} denote the static multiphase branches and switch branches, respectively. The prescribed switch-status vector is z=(ze)e∈Esw\mathbf{z}=(z_e)_{e\in\mathcal{E}_{\mathrm{sw}}}, where ze=1z_e=1 indicates a closed switch and ze=0z_e=0 an open switch. Note that topology is an exogenous input to the AC-OPF problem; we optimize DER dispatch for each operating scenario. Bold symbols denote vectors or matrices, diag⁡(⋅)\operatorname{diag}(\cdot) forms a diagonal matrix, and ȷ2=−1\jmath^2=-1. An overbar denotes complex conjugation, while ℜ{⋅}\Re\{\cdot\} and ℑ{⋅}\Im\{\cdot\} extract real and imaginary parts. The positive-part operator is [x]+=max⁡(x,0)[x]_+=\max(x,0).

The nodal admittance matrix is partitioned as [10]

Y(z)=[YLL(z)YL0(z)Y0L(z)Y00(z)],\mathbf{Y}(\mathbf{z})= \begin{bmatrix} \mathbf{Y}_{LL}(\mathbf{z}) & \mathbf{Y}_{L0}(\mathbf{z})\\ \mathbf{Y}_{0L}(\mathbf{z}) & \mathbf{Y}_{00}(\mathbf{z}) \end{bmatrix},

where subscripts LL and 00 identify non-slack and slack blocks.

Let D\mathcal{D} be the set of DER units, with phase controls indexed by k=1,…,Nck=1,\ldots,N_c. The set Kj\mathcal{K}_j contains the phase controls of unit j∈Dj\in\mathcal{D}. Active and reactive DERs setpoints form pder,qder∈RNc\mathbf{p}^{\mathrm{der}},\mathbf{q}^{\mathrm{der}}\in\mathbb{R}^{N_c}, with complex vector sder=pder+ȷqder\mathbf{s}^{\mathrm{der}}=\mathbf{p}^{\mathrm{der}}+\jmath\mathbf{q}^{\mathrm{der}}.

For branch ℓ∈E\ell\in\mathcal{E}, let Φℓ\Phi_\ell be its phase set and define the branch–phase pairs Eph={(ℓ,ϕ):ℓ∈E, ϕ∈Φℓ}\mathcal{E}_{\mathrm{ph}}=\{(\ell,\phi):\ell\in\mathcal{E},\ \phi\in\Phi_\ell\}. For a branch ℓ\ell, Vf,ℓ\mathbf{V}_{f,\ell} and Vt,ℓ\mathbf{V}_{t,\ell} are vectors containing its per-unit terminal voltages on the system. The series-admittance matrix Yℓser\mathbf{Y}^{\mathrm{ser}}_\ell includes mutual coupling between branch phases. The branch-current vector iℓ=(iℓ,ϕ)ϕ∈Φℓ\mathbf{i}_\ell=(i_{\ell,\phi})_{\phi\in\Phi_\ell} is

iℓ=Yℓser(Vf,ℓ−Vt,ℓ),ℓ∈E.(1)\mathbf{i}_\ell=\mathbf{Y}^{\mathrm{ser}}_\ell(\mathbf{V}_{f,\ell}-\mathbf{V}_{t,\ell}),\quad\ell\in\mathcal{E}. \tag*{(1)}

Let vnmin⁡,vnmax⁡v_n^{\min},v_n^{\max} be voltage-magnitude bounds, iℓmax⁡i_\ell^{\max} the branch-current rating, and s0,ϕmax⁡s_{0,\phi}^{\max} the substation apparent-power rating on phase ϕ\phi. For the phase endpoints (m,n)(m,n) of (ℓ,ϕ)(\ell,\phi), let tℓ,ϕt_{\ell,\phi} be the tangent of the prescribed angle-difference bound and

dℓ,ϕ=ℜ{vm‾vn},cℓ,ϕ=ℑ{vm‾vn}.d_{\ell,\phi}=\Re\{\overline{v_m}v_n\},\qquad c_{\ell,\phi}=\Im\{\overline{v_m}v_n\}.

Define the voltage, branch-current, angle, and substation capacity penalty functions as

PV=∑n∈P([(vnmin⁡)2−∣vn∣2]++[∣vn∣2−(vnmax⁡)2]+),(2)P_V=\sum_{n\in\mathcal{P}}\left(\left[(v_n^{\min})^2-|v_n|^2\right]_+ + \left[|v_n|^2-(v_n^{\max})^2\right]_+\right), \tag*{(2)}
PI=∑(ℓ,ϕ)∈Eph[∣iℓ,ϕ∣2−(iℓmax⁡)2]+,(3)P_I=\sum_{(\ell,\phi)\in\mathcal{E}_{\mathrm{ph}}}\left[|i_{\ell,\phi}|^2-(i_\ell^{\max})^2\right]_+, \tag*{(3)}
Pθ=∑(ℓ,ϕ)∈Eph([cℓ,ϕ−tℓ,ϕdℓ,ϕ]++[−cℓ,ϕ−tℓ,ϕdℓ,ϕ]+),(4)P_\theta=\sum_{(\ell,\phi)\in\mathcal{E}_{\mathrm{ph}}}\left([c_{\ell,\phi}-t_{\ell,\phi}d_{\ell,\phi}]_+ + [-c_{\ell,\phi}-t_{\ell,\phi}d_{\ell,\phi}]_+\right), \tag*{(4)}
Psub=∑ϕ∈Φ0[∣s0,ϕ∣2−(s0,ϕmax⁡)2]+.(5)P_{\mathrm{sub}}=\sum_{\phi\in\Phi_0}\left[|s_{0,\phi}|^2-(s_{0,\phi}^{\max})^2\right]_+. \tag*{(5)}

In terms of economic efficiency, the operating cost C1C_1 of the system is evaluated as the sum of electricity cost from the substation and DERs:

C1=c1p02+c2p0+∑k=1Nc(c1,kder(pkder)2+c2,kderpkder),C_1=c_1p_0^2+c_2p_0+\sum_{k=1}^{N_c}\left(c_{1,k}^{\mathrm{der}}(p_k^{\mathrm{der}})^2+c_{2,k}^{\mathrm{der}}p_k^{\mathrm{der}}\right),

where p0=∑ϕ∈Φ0ℜ{s0,ϕ}p_0=\sum_{\phi\in\Phi_0}\Re\{s_{0,\phi}\} is the total substation active power. The substation injections s0\mathbf{s}_0 are determined by v\mathbf{v} through (7d). The pairs (c1,c2)(c_1,c_2) and (c1,kder,c2,kder)(c_{1,k}^{\mathrm{der}},c_{2,k}^{\mathrm{der}}) are the quadratic and linear cost coefficients for the substation and DER phase kk, respectively.

The curtailment cost C2C_2 is

C2=∑j∈D(pjder,avail−∑k∈Kjpkder).C_2=\sum_{j\in\mathcal{D}}\left(p_j^{\mathrm{der,avail}}-\sum_{k\in\mathcal{K}_j}p_k^{\mathrm{der}}\right).

With economic weights wcost,wcurtail≥0w_{\mathrm{cost}},w_{\mathrm{curtail}}\ge0 and soft-limit weights ρV,ρI,ρθ,ρsub>0\rho_V,\rho_I,\rho_\theta,\rho_{\mathrm{sub}}>0, the complete objective is

F=wcostC1+wcurtailC2+ρVPV+ρIPI+ρθPθ+ρsubPsub.(6)F=w_{\mathrm{cost}}C_1+w_{\mathrm{curtail}}C_2 +\rho_VP_V+\rho_IP_I+\rho_\theta P_\theta+\rho_{\mathrm{sub}}P_{\mathrm{sub}}. \tag*{(6)}

where pjder,availp_j^{\mathrm{der,avail}} is the available active power of the DER unit jj. All objective terms are evaluated at the operating point of the given scenario, and the weights can change across scenarios.

For DER phase control kk, pkder,minp_k^{\mathrm{der,min}} and pkder,maxp_k^{\mathrm{der,max}} are active- and reactive-power bounds, and skder,maxs_k^{\mathrm{der,max}} is its apparent-power rating. The soft-constrained AC-OPF is formulated as

min⁡pder,qder,v F(7)\min_{\mathbf{p}^{\mathrm{der}},\mathbf{q}^{\mathrm{der}},\mathbf{v}}\ F \tag*{(7)}
s.t.i=YL0(z)v0+YLL(z)v,sder−sload=diag⁡(v)i,s0=diag⁡(v0)Y00(z)v0+Y0L(z)v‾,0≤pder≤pder,max,qder,min≤qder≤qder,max,∑k∈Kjpkder≤pjder,avail,j∈D,(pkder)2+(qkder)2≤(skder,max)2,k=1,…,Nc.(8)\begin{aligned} \text{s.t.}\quad\mathbf{i}&=\mathbf{Y}_{L0}(\mathbf{z})\mathbf{v}_0+\mathbf{Y}_{LL}(\mathbf{z})\mathbf{v},\\ \mathbf{s}^{\mathrm{der}}-\mathbf{s}^{\mathrm{load}}&=\operatorname{diag}(\mathbf{v})\mathbf{i},\\ \mathbf{s}_0&=\operatorname{diag}(\mathbf{v}_0)\overline{\mathbf{Y}_{00}(\mathbf{z})\mathbf{v}_0+\mathbf{Y}_{0L}(\mathbf{z})\mathbf{v}},\\ \mathbf{0}&\le\mathbf{p}^{\mathrm{der}}\le\mathbf{p}^{\mathrm{der,max}},\\ \mathbf{q}^{\mathrm{der,min}}&\le\mathbf{q}^{\mathrm{der}}\le\mathbf{q}^{\mathrm{der,max}},\\ \sum_{k\in\mathcal{K}_j}p_k^{\mathrm{der}}&\le p_j^{\mathrm{der,avail}},\quad j\in\mathcal{D},\\ (p_k^{\mathrm{der}})^2+(q_k^{\mathrm{der}})^2&\le(s_k^{\mathrm{der,max}})^2,\quad k=1,\ldots,N_c. \tag*{(8)} \end{aligned}

Constraints (8)–(7c) impose the network current relation and nodal complex-power balance. Constraint (7d) defines substation injections, and (7e)–(7h) impose DER device and aggregate availability limits.

Proposed Method

Pipeline

We present the proposed method for training a neural network to solve Problem (7) in Figure 1. The multi-layer perceptron (MLP) network learns a mapping from the input (loads, DER availability, switch configuration z\mathbf{z}, and objective weights) to the output (raw DER setpoints (pder,raw,qder,raw)(\mathbf{p}^{\mathrm{der,raw}},\mathbf{q}^{\mathrm{der,raw}})). A clipping layer projects the raw DER setpoints onto the DER operational limits (7e)–(7h) to obtain (pder,qder)(\mathbf{p}^{\mathrm{der}},\mathbf{q}^{\mathrm{der}}). A differentiable fixed-point power-flow solver then computes the corresponding voltages v\mathbf{v} needed to evaluate the AC-OPF objective. When switches change, we use the Sherman-Morrison-Woodbury (SMW) formula to efficiently update the inverse of the admittance matrix YLL(z)\mathbf{Y}_{LL}(\mathbf{z}), rather than recomputing it from scratch. For the details of the clip layer, power flow solver, and SMW implementation, please refer to our previous work [9]. Note that the entire process is trained end-to-end and does not require labeled optimal solutions from a traditional AC-OPF solver; instead, it relies directly on the objective and constraint functions to evaluate the solution and update the network parameters to self-improve the predicted solution during training. During inference, we follow the same pipeline, but without backpropagation or loss computation; instead, we output the complete solution, including pderp^{\mathrm{der}}, qderq^{\mathrm{der}}, and vv.

Figure 1. Proposed method for learning to solve soft-constrained AC-OPF.

Loss function

Let θ\theta denote the neural-network parameters and T\mathcal{T} a training dataset of operating scenarios. For each scenario b∈Tb \in\mathcal{T}, Fb(θ)F_b(\theta) denotes the soft-OPF objective in (6), evaluated at the DER setpoints obtained by projecting the neural-network predictions and the corresponding AC power-flow voltages. Its dependence on θ\theta arises through the neural-network predictions, the projection layer, and the power-flow computation. The training loss is the mean objective over a mini-batch B\mathcal{B},

L(θ)=1∣T∣∑b∈TFb(θ).(9)\mathcal{L}(\theta)=\frac{1}{|\mathcal{T}|}\sum_{b\in\mathcal{T}}F_b(\theta). \tag*{(9)}

The DER limits (7e)–(7h) are enforced by the projection layer, while the power-flow solver enforces the network equalities (8), (7c), subject to convergence and numerical tolerance. Thus, no additional DER-violation or power-flow equality penalty is included in (9). Voltage, current, angle, and substation capacity exceedances are already penalized within Fb(θ)F_b(\theta) through (2)–(5). Gradients of (9) are propagated through the projection and differentiable power-flow solver to update θ\theta, i.e., training is conducted end-to-end.

Experimental Results

We evaluate the proposed method on the IEEE 123-bus, 240-bus, and 906-bus cases, which contain 50, 100, and 61 PV units and 8, 9, and 8 switches, respectively. Load demands and PV availability are sampled as fractions of the base values in the OpenDSS files under three scenario types. In the wide scenarios, the load and PV availability factors are drawn from U[0.2,1.5]\mathcal{U}[0.2, 1.5] and U[0,1]\mathcal{U}[0, 1], respectively, covering the full operating range. The two extreme scenarios restrict sampling to the stressed corners of this range: the high-load/low-DER scenarios use U[0.7,1.0]\mathcal{U}[0.7, 1.0] and U[0,0.3]\mathcal{U}[0, 0.3], and the low-load/high-DER scenarios use U[0.2,0.5]\mathcal{U}[0.2, 0.5] and U[0.6,1]\mathcal{U}[0.6, 1]. For each grid, we generate 200,000 unlabeled training samples, of which 60% are wide, 20% high-load/low-DER, and 20% low-load/high-DER scenarios, and three labeled test sets of 2,000 samples each, one per scenario type. For the power flow solver, we use fixed-point iteration for the IEEE 123-bus and 906-bus cases, and the Newton–Raphson method for the 240-bus case [9].

We compare against a Direct Prediction baseline, in which the neural network directly predicts all variables, including the DERs’ active and reactive setpoints, voltage magnitudes, and voltage angles, without using a power flow solver. Instead, a penalty term for violations of the power flow equations is added to the loss function. For fair comparison, at test time, we pass the predicted DER setpoints through a power flow solver before computing the metrics.

Regarding metrics, we calculate the optimality gap using (Fpred−F⋆)/max⁡{F⋆,1}(F^{\mathrm{pred}}-F^\star)/\max\{F^\star,1\}, where FpredF^{\mathrm{pred}} is the predicted objective from the proposed method and F⋆F^\star is the optimal objective obtained from IPOPT. As the hard constraints for power flows and DER limits are enforced by construction, we do not separately report model feasibility results.

Test results on different scenarios

The optimality gap and speedup between the models and IPOPT are reported in Table I. The Direct Prediction approach fails to learn good solutions and suffers from large optimality gaps in all cases. In contrast, our proposed method closely approximates the IPOPT reference objective while substantially reducing the computational burden of soft-constrained AC-OPF. On the 123-bus system, the proposed method achieves an optimality gap of 0.32% for wide scenarios, and 0.01% and 0.13% for the high-load/low-DER and low-load/high-DER scenarios, respectively. Similarly, it obtains gaps of 0.56% for the 906-bus case and 0.92% for the 240-bus case under wide scenarios, with similarly low gaps for the extreme scenarios. Regarding speedup, the proposed method is, on average, 484× faster than IPOPT for the 123-bus case, 68× faster for the 240-bus case, and 4548× faster for the 906-bus case. This demonstrates potential for repeated AC-OPF evaluations and time-sensitive operational applications.

GridMethodwidehigh-load/low-DERlow-load/high-DER
123 busOurs0.32 ±0.03 (×408)0.01 ±0.00 (×626)0.13 ±0.01 (×418)
123 busDirect Prediction300.40 ±68.26 (×333)47.62 ±46.49 (×515)448.38 ±239 (×339)
240 busOurs0.92 ±0.01 (×79)0.92 ±0.03 (×59)1.04 ±0.01 (×67)
240 busDirect Prediction74.14 ±14.29 (×76)8.23 ±0.47 (×58)350.10 ±19.69 (×65)
906 busOurs0.56 ±0.09 (×5272)0.04 ±0.01 (×4466)0.03 ±0.00 (×3907)
906 busDirect Prediction218.04 ±59.74 (×4521)137.28 ±81.42 (×3863)82.59 ±17.39 (×3455)

Table I. Relative objective gaps (%, mean ± std over 3 seeds) and mean speedups over IPOPT (parentheses) on our different test sets.

Beyond the objective gap, we examine how limit violations arise under the two methods. Figure 2 compares the sum of limit penalties (i.e., ρVPV+ρIPI+ρθPθ+ρsubPsub\rho_V P_V + \rho_I P_I + \rho_\theta P_\theta+ \rho_{\mathrm{sub}} P_{\mathrm{sub}}) in (6) incurred by our method (vertical axis) and by IPOPT (horizontal axis) instance by instance, pooled over three seeds; points on the diagonal have equal penalties. We find that the penalties are driven mainly by voltage constraints and, to a smaller degree, by branch-current constraints; on these test sets, neither method violates the angle-difference or substation constraints. First, the two methods largely agree on where violations occur. On the wide sets, the proposed method incurs a nonzero penalty in 15.1%, 92.9%, and 6.3% of the scenarios for the 123-, 240-, and 906-bus cases, compared with 14.1%, 88.2%, and 5.7% for IPOPT. Second, when both methods violate a limit, the penalties are strongly correlated over several orders of magnitude but slightly higher for the proposed method, with mean penalties on the wide sets of 0.91, 6.86, and 11.82, versus 0.69, 6.72, and 11.19 for IPOPT. Scenarios in which only the proposed method incurs a penalty contribute just 3%, 13%, and 6% of the excess.

Instance-wise weighted constraint penalties for the proposed method and IPOPT

Figure 2. Instance-wise weighted constraint penalties for the proposed method and IPOPT.

Table II reports the optimality gaps and speedups under distributional shifts relative to the training data. For a shift level δ\delta, each load and DER availability in a scenario from the wide test set is multiplied by 1±(δ+δ∣Z∣)1 \pm(\delta+\delta|Z|), where Z∼N(0,1)Z \sim\mathcal{N}(0,1) and the sign is sampled independently for each element. Thus, each perturbation has a relative magnitude of at least δ\delta. At δ=0.05\delta= 0.05, the optimality gaps of the proposed method stay at the in-distribution level of Table I (0.25%, 0.76%, and 0.64% for the 123-, 240-, and 906-bus cases), i.e., the method is robust to moderate input deviations.

GridShift0.050.10.150.2
123 bus0.25 ± 0.04 (×349)1.58 ± 0.41 (×361)5.65 ± 0.45 (×362)9.50 ± 0.54 (×261)
240 bus0.76 ± 0.00 (×114)0.59 ± 0.01 (×81)0.56 ± 0.02 (×83)0.49 ± 0.02 (×59)
906 bus0.64 ± 0.04 (×2931)2.38 ± 0.08 (×3856)8.27 ± 0.73 (×3606)15.80 ± 1.22 (×5057)

Table II. Relative objective gaps (%, mean ± std over 3 seeds) and mean speedups over IPOPT (parentheses) under distribution shift.

At larger shifts, the mean gaps on the 123- and 906-bus cases grow, reaching 9.50% and 15.80% at δ=0.2\delta= 0.2. This is expected of a learned surrogate evaluated without retraining, and at δ=0.2\delta= 0.2, every load and DER availability is perturbed independently by at least 20%, which increasingly alters the load and DER patterns seen in training. The degradation is, however, concentrated in a minority of scenarios: at δ=0.2\delta= 0.2, the median gap is only 0.21% and 0.06%, and 74% and 87% of the scenarios remain within a 1% gap. It also stems almost entirely from voltage penalties, whereas the economic cost stays within about 0.2% of that of IPOPT. On the 240-bus case, the relative gap decreases with the shift level because the reference objective roughly doubles (driven by larger voltage penalties in the IPOPT solution) while the absolute objective difference stays nearly unchanged. The shift experiment tests the trained models, without any adaptation, to isolate their out-of-distribution behavior. In practice, a natural remedy to even further improve the performance under shifts is to add

Distributions of the economic objective and electrical quantities over 2,000 wide test instances of the 240-bus system

Figure 4. Distributions of the economic objective and electrical quantities over 2,000 wide test instances of the 240-bus system.

shifted samples to the training set, which can be done cheaply because training is label-free, i.e., requires no AC-OPF solves. In addition, as much of the gap stems from voltage violations rather than economic costs, imposing hard constraints may be beneficial in some cases to maintain robustness under distributional shift, as also observed in our prior work [9].

Histograms

Figure 3–Figure 5 compare the distributions of the economic objective and key physical quantities for our method and IPOPT over 2,000 wide test scenarios in the 123-, 240-, and 906-bus cases. Voltage quantities are pooled over non-slack nodes, branch quantities over branch phases, and substation powers summed across phases for each scenario. The distributions of economic objective, voltage magnitude and angle, branch current, and active power closely overlap across all systems.

Distributions of the economic objective and electrical quantities over 2,000 wide test instances for the 123-bus system

Figure 3. Distributions of the economic objective and electrical quantities over 2,000 wide test instances for the 123-bus system.

Distributions of the economic objective and electrical quantities over 2,000 wide test instances of the 906-bus system

Figure 5. Distributions of the economic objective and electrical quantities over 2,000 wide test instances of the 906-bus system.

The most visible differences appear in reactive power. For the 240-bus case, the proposed method concentrates substation reactive power more tightly around its mean, with a standard deviation of 124 kvar versus 223 kvar for IPOPT. For the 123-bus case, IPOPT returns substation reactive power near zero in about 30% of scenarios, whereas our method spreads these cases over neighboring values. The 906-bus case shows a similar pattern. The objective (6) does not directly price reactive power; instead, it affects the objective only through active-power losses and the voltage, current, angle-difference, and substation-capacity penalties. These reactive-power differences are therefore consistent with the small objective gaps reported above, despite the distinct dispatch distributions.

Single-instance dispatch and voltage analysis

Figure 6 and Figure 7 show one instance of the 123-bus case in the wide test datasets. In Figure 6(a), the voltage magnitudes produced by the proposed method closely follow those of IPOPT along the feeder on phases A and C. On phase B, they remain higher toward the feeder end, with a maximum difference of 0.014 p.u., and all magnitudes remain within the limits. The angles in Figure 6(b) have the same shape along the feeder and differ by at most 1.1°.

Figure 7. Active and reactive DER setpoints by phase for the proposed method and IPOPT in the same IEEE 123-bus instance as Figure 6.

Phase-wise voltage magnitudes and angles for our method and IPOPT in a single problem instance of the IEEE 123-bus system

Figure 6. Phase-wise voltage magnitudes and angles for our method and IPOPT in a single problem instance of the IEEE 123-bus system.

The DER setpoints in Figure 7 agree for most units, but several differ with a maximum difference of 26 kW, and the reactive setpoints differ by up to 72 kvar. The totals nevertheless match closely. The proposed method injects 1517.8 kW of the 1519.0 kW available, while IPOPT uses the full 1519.0 kW, and 1127 kvar versus 1117 kvar. The substation active power in this instance is 2269 kW versus 2265 kW. The proposed method thus distributes the same total injection differently across the DER phases, changing the objective by only 0.16%. This suggests that the objective is flat around the optimum and that a small optimality gap does not require the individual setpoints to match those of IPOPT.

Conclusion

We presented a self-supervised framework for soft-constrained AC-OPF in unbalanced multiphase distribution systems. Combining DER projection with differentiable AC power flow enables training without optimal-solution labels, while explicit penalties capture trade-offs among operating cost, renewable curtailment, and network-limit violations. On 123-, 240-, and 906-bus feeders, the method achieves mean objective gaps of at most 1.04% relative to IPOPT, with orders-of-magnitude speedups. A component-wise comparison shows that the method incurs penalties in nearly the same scenarios as IPOPT, with the remaining gap arising from slightly larger voltage penalties, while the economic cost, voltage profiles, and active-power quantities closely match; individual DER setpoints, particularly reactive power, can differ without materially changing the objective. Under input shift, the gaps remain near the in-distribution level when loads and DER availability are moderately perturbed, and any degradation is confined to voltage penalties in a minority of scenarios. Future work will address this through label-free training-set augmentation, and will extend the framework to real-time optimization and discrete device decisions.

Acknowledgments

This work was funded by GE Vernova as part of the MIT-GE Vernova Energy & Climate Alliance.

References

  1. [1]X. Pan, M. Chen, T. Zhao, and S. H. Low, “DeepOPF: A feasibility-optimized deep neural network approach for AC optimal power flow problems,” IEEE Systems Journal, vol. 17, no. 1, pp. 673–683, 2022.arxiv.org/abs/2007.01002
  2. [2]W. Yang, A. Britto Matos Lima, T. V. Spina, S. Fowers, B. Zhang, and C. White, “GridSFM: A foundation model for AC optimal power flow,” Microsoft Research, May 2026. [Online]. Available: https://www.microsoft.com/en-us/research/publication/gridsfm-a-foundation-model-for-ac-optimal-power-flow/arxiv.org/abs/2609.30173
  3. [3]A. Puech, M. Mazzonelli, T. R. Govindasamy, M. Mngomezulu, H. Maeso-García, T. Tolhurst, J. Bayazi, A. Moeni, N. Simumba, C. Cintas, D. Nelischer, R. Kienzler, J. Weiss, A. Varbella, F. Dörfler, G. Hug, M. Mevissen, J. Bernabé-Moreno, F. Mirallès, H. F. Hamann, E. Vos, and T. Brunschweiler, “GENCO — a unified neural solver embedded in a development framework for steady-state grid analysis,” arXiv preprint arXiv:2608.09921, 2026.arxiv.org/abs/2608.09921
  4. [4]P. L. Donti, D. Rolnick, and J. Z. Kolter, “DC3: A learning method for optimization with hard constraints,” in International Conference on Learning Representations, 2021.arxiv.org/abs/2104.12225
  5. [5]H. T. Nguyen and P. L. Donti, “FSNet: Feasibility-seeking neural network for constrained optimization with guarantees,” arXiv preprint arXiv:2506.00362, 2025.arxiv.org/abs/2506.00362
  6. [6]K. Chen, S. Bose, and Y. Zhang, “Unsupervised deep learning for AC optimal power flow via Lagrangian duality,” in GLOBECOM 2022–2022 IEEE Global Communications Conference. IEEE, 2022, pp. 5305–5310.arxiv.org/abs/2212.03977
  7. [7]S. Park and P. Van Hentenryck, “Self-supervised primal-dual learning for constrained optimization,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 37, no. 4, 2023, pp. 4052–4060.arxiv.org/abs/2208.09046
  8. [8]S. Bouchkati, P. Lutat, L. Böttcher, F. Klein-Helmkamp, and A. Ulbig, “Augmented lagrangian guided learning for the optimal power flow problem,” IFAC-PapersOnLine, vol. 58, no. 13, pp. 50–55, 2024.DOI
  9. [9]H. T. Nguyen, S. Liu, R. S. Biswas, V. Pendya, N. Virani, D. Deka, and P. L. Donti, “Scalable self-supervised learning for multiphase AC-OPF in distribution systems with topology reconfiguration,” 2026. [Online]. Available: https://arxiv.org/abs/2608.25095
  10. [10]M. Bazrafshan and N. Gatsis, “Comprehensive modeling of three-phase distribution systems via the bus admittance matrix,” IEEE Transactions on Power Systems, vol. 33, no. 2, pp. 2015–2029, 2017.DOI

Paper details

vlnc:W_n5fsatwk
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Engineering

Not recorded for this paper

View statement
Looking for related papers…
Contents