Source-linked AI summary
UNION: A Unified AC-OPF Framework for Topology-Varying Real-Time Grid Operation
Kyungnam Park, Keunju Song, Yeji Lim, Suho Park, Kibaek Kim, Hongseok Kim
TL;DR
Real-time AC-OPF must remain fast, accurate, and feasible across changing operating conditions and network topologies, while existing learning-based approaches often specialize by system or topology. UNION addresses this with jointly trained graph learning, topology-conditioned implicit power-flow completion, and deterministic restoration, achieving strong heterogeneous-system and zero-shot contingency performance.
Problem
AC-OPF repeatedly solves a computationally demanding nonconvex problem, while faster linearized approximations can lose AC fidelity or produce infeasible decisions; joint learning is further challenged by heterogeneous system scales and topologies.
Method
UNION jointly trains a shared graph-based model using scalar-gated aggregation with explicit consensus correction, a sparse differentiable implicit AC power-flow layer, and deterministic feasibility restoration.
Results
1.23% mean GapR and 99.56% mean IFRR were achieved after restoration across seven heterogeneous systems, with 100% IFRR on six systems.
Takeaways & Limitations
Topology-conditioned physical completion supports zero-shot N−1 operation, including 100% IFRR on GOC-4601 and Korea-4492 for both line and generator outages.
Abstract
from arXiv · showhide
Secure real-time grid operation requires fast AC optimal power flow (AC-OPF) tools that stay accurate and feasible as operating conditions and topology change. Learning-based methods have advanced, but most are trained per system or per topology, and delivering an operating point that satisfies every operational limit remains challenging. This paper proposes UNION, a unified graph-based AC-OPF framework for heterogeneous systems and topology-varying operation. UNION proposes a shared graph encoder, a scalar-gated aggregation with explicit consensus correction, and a sparse-aware differentiable implicit layer embedding the AC power-flow equations. The remaining inequalities are handled by primal-dual training and the deterministic restoration layer. A single model trained jointly across seven systems, including a real-world 4,492-bus Korean transmission grid, attains a 1.23% mean objective gap and satisfies every operational limit on 99.56% of test instances. It sustains this under zero-shot $N-1$ contingencies, i.e., line and generator outages, and over five days of time-varying Korean topologies; it retains full snapshot coverage at a 2.51% gap under lightweight online fine-tuning. UNION pre-restoration inference takes 55$-$58 ms per instance on the three largest systems, and 108$-$114 ms including restoration. These results indicate that one jointly trained, physics-consistent model can support real-time AC-OPF across heterogeneous systems and evolving topologies.
I. INTRODUCTION
UNION addresses the difficulty of fast, feasible AC-OPF across heterogeneous systems and changing topologies. It combines shared graph learning, topology-conditioned physics, consensus-stabilized training, and deterministic restoration, validated across systems and operating conditions.
- AC-OPF must repeatedly solve a nonconvex problem under nonlinear power-flow equations and engineering limits, making real-time operation computationally demanding.
- Many learning-based methods remain system-specific or narrow-regime, while feasibility under outages, maintenance, and changing topologies remains difficult.
- UNION trains one graph-based model across seven systems, including the 4,492-bus Korea-4492 grid, and uses active-topology AC power-flow completion instead of full-state extrapolation.
- SGA interpolates mean and attention pooling through a shared scalar gate, while ECC corrects pairwise sign conflicts among system-wise gate gradients.
- The deterministic restoration operator repeatedly applies generator-side corrections and re-solves AC power flow to reduce residual operational-limit violations.
- Validation covers normal operation, zero-shot N−1 outages, and 116 changing-topology Korean snapshots, with subsecond inference on large systems.
II. PROBLEM FORMULATION
The formulation represents each heterogeneous, topology-dependent operating instance as an AC-OPF problem with equality physics, inequality limits, and system-specific data. Feasible instances seek minimum operating cost over the resulting constraint set.
- A. AC-OPF Formulation: The paper considers heterogeneous systems and operating instances, each associated with a system, load-perturbed condition, and active topology.
- A. AC-OPF Formulation: Each instance includes active buses, active branches, generator buses, a reference bus, and aggregated co-located generators.
- A. AC-OPF Formulation: The AC-OPF decision vector collects the optimization variables for the operating instance.
- A. AC-OPF Formulation: Instance parameters include demands, generation quantities, voltage and flow bounds, branch and network data, and generator cost coefficients.
- A. AC-OPF Formulation: The standard AC network model defines bus active and reactive injections and complex branch power flows from the active-topology admittance data.
- A. AC-OPF Formulation: The feasible set Z(ω) contains decisions satisfying equality constraints heq(z; ω)=0 and inequality constraints gineq(z; ω)≤0.
- A. AC-OPF Formulation: When feasible, the optimal solution z⋆(ω) minimizes the operating-cost objective over Z(ω).
B. Graph Representation of AC-OPF Instances
UNION represents each operating condition as an attributed graph whose active buses and branches vary with topology. Additional AC-OPF data remains available downstream for control parameterization, implicit physics, training, and constraint evaluation.
- Each AC-OPF instance is represented as an attributed graph to support shared learning across systems with different sizes and active topologies.
- Node features contain bus active and reactive demands, while edge features contain branch resistance, reactance, charging capacitance, and thermal limits.
- Generator limits, voltage bounds, admittance matrices, and cost coefficients are retained in ξω for downstream model and constraint computations.
- Topology changes enter through the active branch set Eω and bus-admittance matrix Yω, avoiding fixed indexing.
- The shared predictor processes Gω with trainable parameters while ξω supplies instance data used downstream.
- Because Gω is defined on the active bus and branch sets, the output dimension follows the corresponding system size and active topology.
- The unified objective seeks economically competitive and AC-feasible solutions across heterogeneous systems and topology-varying instances.
III. PROPOSED FRAMEWORK: UNION
UNION maps active grid graphs and instance data to generator controls and an AC-consistent solution candidate. Its architecture combines EA-GNN embeddings with scalar-gated mean–attention aggregation shared across systems.
- UNION is an integrated graph-to-solution system whose architecture, training, and restoration address heterogeneous topology-varying AC-OPF.
- For each operating instance, the shared predictor πϕ processes graph representation Gω and instance data ξω through a graph-to-solution pipeline.
- The pipeline produces node embeddings Hω, graph context mω, generator controls ûω, and recovered solution candidate ẑϕ(ω).
- EA-GNN performs edge-aware local message passing and multi-hop convolution to incorporate nodal demand and active-branch attributes into bus embeddings.
- SGA combines mean and attention pooling through one learnable scalar gate shared across systems to obtain a fixed-dimensional graph context.
- Mean pooling avoids direct graph-size scaling, while attention pooling emphasizes buses relevant to OPF prediction.
- The shared scalar gate provides the one-dimensional aggregation interface for explicit consensus correction and remains permutation-invariant across graph sizes.
3) Control Predictor:
UNION predicts a compact set of generator control setpoints rather than the full AC-OPF decision vector. These setpoints are mapped to instance-dependent operating ranges, while the implicit physical layer recovers remaining quantities.
- UNION predicts generator control setpoints instead of directly regressing the full AC-OPF decision vector.This reduces predictor output dimension and leaves remaining state completion to the AC power-flow layer.
- For each generator bus, the shared predictor maps local node embeddings and graph-level context to active-power and voltage control primitives.The two primitives are denoted ˜p_i and ˜v_i.
- Raw predictor outputs are transformed through sigmoid mappings into instance-dependent active-power and voltage operating ranges.The parameterization distinguishes non-reference active-power setpoints from voltage setpoints at all generator buses.
- The resulting generator control vector enforces non-reference active-power bounds and generator-voltage bounds by construction.Remaining state and dependent generation quantities are recovered through the implicit physical layer, and branch flows are then evaluated from the voltage state.
4) Sparse-Aware Differentiable Implicit Layer:
UNION completes predicted generator controls by solving reduced nonlinear AC power-flow equations in a differentiable implicit layer. Sparse template reuse and pattern-homogeneous batching make this computation practical across systems and topology changes.
- The differentiable implicit layer solves reduced AC power-flow equations to complete state variables from the predicted generator control vector.This embeds nonlinear power balance directly in forward inference rather than relying only on residual penalties.
- The reduced state contains non-reference voltage angles and the voltage-related state needed for PQ-bus reactive-power mismatches.Full voltage and generator quantities are reconstructed using the standard PV/PQ/slack-bus partition.
- The equality-completion operator Ψ returns a state satisfying F(ˆx_ω; ˆu_ω, ω) = 0, after which the full AC-OPF prediction is reconstructed.Branch flows are evaluated from the recovered voltage state.
- Newton–Raphson enforces nonlinear power balance up to solver tolerance, while implicit differentiation computes gradients without unrolling Newton iterations.The gradient calculation uses a transpose solve involving the state Jacobian.
- Sparse-aware execution reuses symbolic sparse templates for instances sharing Jacobian sparsity patterns, updating only numerical nonzero values.Topology-varying mini-batches are made pattern-homogeneous because active branch changes invalidate pattern-dependent solver objects.
B. UNION Training Strategy
UNION combines system-wise primal–dual optimization with a shared multi-system training loop. The objective minimizes generation cost while controlling operational inequality violations across heterogeneous systems and topologies.
- UNION jointly updates model parameters and system-specific dual variables through a system-wise primal–dual objective.This addresses remaining operational inequalities while maintaining shared optimization across heterogeneous systems.
- The implicit layer handles power-balance equalities and control parameterization enforces selected active-power and voltage bounds by construction.Training controls reactive-power, slack-generator active-power, PQ-bus voltage, and apparent-flow limits at both branch ends.
- The constrained objective combines generation cost with dual-weighted residual violations, where nonpositive residuals denote satisfied inequalities.Violation vectors use elementwise positive parts, so satisfied and inactive constraints contribute zero.
- System-wise losses are formed over mini-batches and averaged across systems for the shared primal update.The resulting training loop preserves system-specific constraint structure while optimizing shared model parameters.
- The standard primal gradient keeps dual variables fixed, while projected ascent updates each system-specific dual vector with inactive topology-dependent entries masked.This separates model optimization from system-wise dual adaptation.
2) Explicit Consensus Correction (ECC):
ECC corrects conflicts among system-wise gradients at UNION’s shared scalar aggregation gate. Feasibility restoration then refines predictions deterministically, using higher-precision power-flow completion and generator-related adjustments when needed.
- System-wise losses can produce conflicting update directions for the shared scalar gate in heterogeneous multi-system training.ECC targets this shared aggregation interface rather than all model parameters.
- ECC measures pairwise sign conflicts among system-wise gate gradients and penalizes opposing updates.The consensus term is zero when all gate-gradient signs are mutually consistent and positive when at least one pair conflicts.
- Because direct differentiation would require expensive second-order implicit-layer derivatives, ECC approximates its correction direction with finite differences.The correction is computed while holding other model components and dual variables fixed.
- ECC modifies only the scalar gate update, while remaining model parameters follow the standard primal objective.The gate combines the ordinary primal gradient step with a consensus correction weighted by µ_cons.
- Restoration applies a deterministic, training-free operator after power-flow refinement to address residual inequality violations.The FP64 completion removes numerical power-balance residuals, while restoration targets remaining feasibility issues.
- If needed, restoration adjusts generator-related setpoints through PV-to-PQ switching, active-power redistribution, voltage correction, and branch-overload relief.Trials are accepted only when they achieve feasibility or sufficiently reduce the violation measure; unsuccessful cases remain infeasible.
IV. EXPERIMENTS
UNION is evaluated across seven heterogeneous AC-OPF systems using common perturbed-demand instances, with cost accuracy and constraint feasibility assessed before and after deterministic restoration.
- Experimental benchmark: Seven systems, including the real-world Korea-4492 grid, are evaluated under a common load-perturbation protocol.Each system contributes 1,000 training, 1,000 validation, and 2,000 test instances.
- Experimental benchmark: Demand instances perturb active and reactive loads within ±10% of nominal values.
- Metrics: Cost accuracy is measured by absolute relative objective gap between predicted and reference objective costs.
- Metrics: Feasibility covers generator, voltage, branch-flow, and active- and reactive-power-balance constraints using violation magnitudes and tolerance τ = 10^-4 p.u.The balance categories use residuals, while inequality categories use positive-part bound violations.
- Metrics: IFR counts an instance as feasible only when all evaluated constraints are simultaneously satisfied, whereas CSR averages category-wise satisfaction ratios.Evaluation distinguishes pre-restoration metrics from restored GapR and IFRR; failed restorations count as infeasible.
B. Normal-Case Performance Across Heterogeneous Systems
UNION delivers strong normal-case cost–feasibility performance across heterogeneous systems and retains high restored feasibility under selected zero-shot outages, with failures tied to corrective-control limits.
- Normal-case performance: 1.20% average Gap and 99.73% average CSR are achieved before restoration, while pre-restoration IFR is 27.24%.UNION has the lowest Gap and highest CSR in the reported normal-case comparison.
- Normal-case performance: GOC-2312 restoration failures are concentrated in apparent-power limits on 19 of 3,013 rated branches, with three branches accounting for most unsuccessful instances.These branches include near-zero-impedance couplers and high-impedance radial branches with limited redispatch leverage.
- Zero-shot N−1 contingencies: 100% IFRR is achieved on GOC-4601 and Korea-4492 for both line and generator outages, with GapR values of 0.24%–0.93%.Their corrective redundancy distributes outage-induced imbalances across many generator controls and meshed-network paths.
- Zero-shot N−1 contingencies: IEEE 57 line-outage failures are voltage-limited, with seven generator-voltage setpoints unable to remove all shallow residuals having median magnitude 0.0023 p.u.
- Zero-shot N−1 contingencies: IEEE 118 generator-outage failures are dominated by deeper apparent-flow violations, and PG-GNN, CANOS, and UNION share a 70.07% IFRR.The reported analysis attributes this outcome to insufficient corrective network paths and PTDF leverage.
D. Real-World Temporal Adaptation on Korea-4492
UNION is evaluated on 116 hourly Korea-4492 snapshots spanning five days of changing generator availability and active line states. It maintains broad temporal coverage and real-time-scale latency, with lightweight fine-tuning achieving full coverage at a 2.51% objective gap.
- Temporal evaluation: 116 hourly snapshots span five days with time-varying generator availability and active line states.Evaluation includes zero-shot inference and online fine-tuning within the same 5-minute operating interval.
- Temporal evaluation: 100% coverage after online fine-tuning raises UNION from 92.24% zero-shot coverage and yields a 2.51% GapR.Fine-tuned UNION also attains an IFRR of 82.8%, outperforming CANOS by 1.71 percentage points in GapR and 7.8 percentage points in IFRR.
- Temporal evaluation: Zero-shot UNION has the highest coverage at 92.24%, ahead of CANOS at 86.21% and PG-GNN at 56.03%.PG-GNN remains limited by its fixed output dimension when active generators exceed 182.
- Temporal evaluation: Full coverage after fine-tuning addresses failures caused by dispatches that cannot be balanced within the reference-generator range.On covered snapshots, restoration largely removes generator, reactive-power, and branch-flow violations, while residual infeasibility concentrates in voltage limits.
- Runtime: 55–58 ms implicit-layer inference results from exploiting Jacobian sparsity, compared with 225–259 ms without sparse computation.Including FP64 refinement and restoration, the full UNION pipeline requires 108–114 ms on the three largest systems.
- Topology adaptation: The shared graph–implicit design physically recomputes dependent AC states for each active topology rather than extrapolating the full state from the GNN.This topology-conditioned completion supports zero-shot N−1 operation; on GOC-4601 and Korea-4492, UNION achieved 100% IFRR under both line and generator outages, with GapR values of 0.24%–0.93%.