Source-linked AI summary
Learning Optimal Solutions for Extremely Fast AC Optimal Power Flow
Ahmed Zamzam, Kyri Baker
TL;DR
AC OPF is difficult to solve quickly as grid conditions fluctuate and existing approximations may misrepresent the system or fail to guarantee feasibility. The paper learns a mapping from system loading to optimal generation settings, then recovers a feasible AC solution without directly solving AC OPF. The approach produces feasible solutions extremely quickly with negligible optimality sacrifice, including 6x–22x speedups in one IEEE 118-bus case.
Problem
Frequent generator adjustments are increasingly needed, but solving nonconvex AC OPF quickly is computationally difficult and approximations may not guarantee feasibility.
Method
A neural network learns the mapping from system loading to optimal generator values, while an iterative power-flow procedure recovers the full feasible AC OPF solution.
Results
6x–22x speedup was observed for the IEEE 118-bus network with λ = 0.005, while test scenarios showed very low maximum infeasibility and negligible optimality sacrifice.
Takeaways & Limitations
The framework provides feasible AC OPF solutions on extremely fast timescales without directly solving the nonconvex optimization problem or using power-flow approximations.
Abstract
from arXiv · showhide
In this paper, we develop an online method that leverages machine learning to obtain feasible solutions to the AC optimal power flow (OPF) problem with negligible optimality gaps on extremely fast timescales (e.g., milliseconds), bypassing solving an AC OPF altogether. This is motivated by the fact that as the power grid experiences increasing amounts of renewable power generation, controllable loads, and other inverter-interfaced devices, faster system dynamics and quicker fluctuations in the power supply are likely to occur. Currently, grid operators typically solve AC OPF every 15 minutes to determine economic generator settings while ensuring grid constraints are satisfied. Due to the computational challenges with solving this nonconvex problem, many efforts have focused on linearizing or approximating the problem in order to solve the AC OPF on faster timescales. However, many of these approximations can be fairly poor representations of the actual system state and still require solving an optimization problem, which can be time consuming for large networks. In this work, we leverage historical data to learn a mapping between the system loading and optimal generation values, enabling us to find near-optimal and feasible AC OPF solutions on extremely fast timescales without actually solving an optimization problem.
I. INTRODUCTION
The paper proposes learning AC OPF solutions directly from system loading to obtain fast, feasible, near-optimal generator settings without solving the original optimization problem.
- AC OPF determines economic generation dispatch while satisfying network constraints, but fluctuating renewable generation requires more frequent set-point adjustments.
- Existing fast-timescale approaches use approximations, distributed computation, or online optimization, yet approximations may not guarantee feasibility.
- The method avoids directly solving AC OPF and uses neither approximations, linearizations, nor convexifications of the power-flow equations.
- The neural network maps system loading to optimal generation values and voltage magnitudes in roughly 1 millisecond on a laptop for the considered networks.
- A fast iterative procedure recovers the full AC OPF solution and ensures feasibility after neural-network prediction.
- The proposed framework learns a mapping from network loads to optimal generator set-points and voltage magnitudes using historical AC OPF solutions.
II. PROBLEM FORMULATION
The AC OPF is formulated on a network of buses with generator and load variables, then recast as an operator mapping load demands to generator active powers and voltage magnitudes.
- The formulation represents each bus by voltage, active-power injection, and reactive-power injection variables, with generator and load buses collected in sets G and L.
- The AC OPF minimizes generation cost subject to active and reactive generation bounds, voltage-magnitude limits, and nonlinear power-flow equations.
- Given load demands, generator active powers, and generator-bus voltage magnitudes, the remaining voltage vector can be recovered by solving the power-flow equations.
- The learning target is an OPF operator that maps active and reactive load demands to generator active-power injections and generator-bus voltage magnitudes.
- The solution is parameterized through α_n and β_n, which represent normalized active-generation and voltage-magnitude choices within their respective bounds.
III. LEARNING FEASIBLE AC OPF SOLUTIONS
The paper uses artificial neural networks to approximate the high-dimensional, nonlinear mapping from system inputs to AC OPF solution variables.
- Artificial neural networks model high-dimensional, complex, nonlinear relationships and can process large collections of AC OPF solutions for rapid prediction.
A. Approximating the mapping between loads and the optimal solution
The learning approach uses a deep neural network with sigmoid outputs and strictly feasible training solutions to keep predicted generation and voltage parameters within prescribed bounds.
- A deep neural network with sigmoid activation functions is used to approximate the OPF mapping.
- Because AC OPF solutions often lie on the feasibility boundary, the method aims to place neural-network outputs in the feasibility-set interior.
- Training data are generated by solving a restricted AC OPF problem that avoids voltage magnitudes exactly at their limits.
- Strictly interior voltage training samples are intended to keep bounded prediction deviations within voltage limits, although they approximate a mapping different from the original AC OPF mapping.
- Sigmoid output functions constrain the normalized α_n and β_n parameters to [0, 1], thereby bounding generation and voltage outputs.
B. Generating training samples
Training samples represent varied system states using load-demand realizations, while infeasible profiles are removed before training a deep neural network mapping loads to OPF outputs.
- Historical AC OPF runs provide abundant training data covering a wide variety of system states.
- Infeasible load profiles are discarded because they do not represent physically realizable power-system states.
- The deep NN maps active and reactive load demands at load buses to generator voltage magnitudes and active-power injections.Its input dimension is 2|L| and its output dimension is 2|G| −1, excluding active power at the slack bus.
D. Recovering feasible solutions
The learned generator setpoints are converted into a feasible AC operating point by solving power-flow equations, with a corrective procedure for reactive-power-limit violations.
- The approach constrains neural-network outputs and uses power-flow equations to recover feasibility of the complete AC OPF solution.This avoids solving the original nonconvex optimization problem end-to-end.
- The recovery power-flow problem solves for voltages and generator active and reactive injections using the neural network’s predicted values.
- Reactive-power violations are rare but can occur when recovered generator injections exceed their limits.
- When reactive limits are violated, the method identifies affected generators, fixes their reactive injections at limits, and solves a modified power-flow problem.
- The end-to-end procedure remains extremely fast because it solves power-flow equations rather than a nonconvex optimization problem.
IV. SIMULATION RESULTS
The experiments use MATPOWER to generate training data and solve power-flow equations for the learned generator setpoints on each considered network.
- 100,000 training samples were generated for each considered network using MATPOWER, which also solved the power-flow equations for the learned setpoints.
A. Test networks and setup
The study evaluates the approach on IEEE 118-, 57-, and 39-bus systems using a specified deep neural-network architecture and training setup.
- The test systems are the IEEE 118-, 57-, and 39-bus networks, with their nodes, generators, lines, and base operating costs reported in Table I.
- The neural network has three sigmoid-activation hidden layers, with widths determined by the input and output dimensions.
- The model is implemented in TensorFlow and trained using the Adam optimizer.
B. Time comparisons
The learning-based framework is evaluated against direct AC OPF solving using a speedup factor that includes neural-network, power-flow, and feasibility-recovery time. For the IEEE 118-bus case, speedups range from 6x to 22x, with a two-humped distribution because the second stage is needed only for some test cases.
- The speedup factor compares direct AC OPF solution time with the learning-based method’s total solution time.The method’s time includes neural-network evaluation, power-flow solution, and any additional power-flow equations needed for feasibility.
- 6x to 22x speedups were observed for the IEEE 118-bus network with λ = 0.005.The relative histogram reports this range across test instances.
- The histogram has two humps because the algorithm’s second stage is required for only a portion of test cases.
C. Feasibility and optimality
The learned AC OPF solutions remain highly feasible with minimal optimality impact, while the full feasibility-recovery procedure delivers substantial computational speedups across the tested networks.
- Feasibility: The neural network produces generator set-points, while power-flow equations recover reactive generation and remaining voltages to ensure overall AC OPF feasibility.The output layer guarantees selected constraints, and Algorithm 1 addresses reactive-power-limit feasibility.
- Evaluation: 1,000 AC OPF test scenarios were evaluated for each of the IEEE 118-bus, 57-bus, and 39-bus networks.The 118-bus case showed higher initial infeasibility when λ = 0, so λ = 0 results were omitted for the other cases.
- Feasibility: Maximum infeasibility was very low across all network simulations and remained within most solver feasibility tolerances.The reported feasibility procedure includes the time required to enforce the reactive-power constraints.
- Feasibility and optimality: Increasing λ from 0.005 to 0.01 generally improves feasibility while mildly affecting optimality, whose overall impact remains minimal across the considered networks.The voltage-feasible set is further restricted as λ increases.
V. CONCLUSIONS AND FUTURE WORK
The paper presents a machine-learning framework that maps system loading to AC OPF generation values and uses power-flow recovery to obtain feasible solutions quickly. Its reported results show negligible optimality sacrifice, while future work targets much larger and mixed-integer AC OPF problems.
- Conclusions: The framework learns a mapping from system loading to optimal generation values for AC OPF.It trains on strictly feasible solutions and recovers remaining voltages and reactive generation through power-flow equations.
- Conclusions: The proposed procedure recovers feasible AC OPF solutions extremely quickly with a negligible sacrifice in optimality.The framework is presented as faster and more accurate than approaches based on linearizing or approximating nonlinear power-flow equations.
- Future work: Future work will test the framework on networks with thousands of buses and on mixed-integer problems such as security-constrained AC OPF.The authors also discuss learning-assisted optimization when directly learning feasible optimal solutions is difficult.