Source-linked AI summary

Physics-Informed Neural Networks for AC Optimal Power Flow

Rahul Nellikkath, Spyros Chatzivasileiadis

arXiv:2110.02672v1eess.SYcs.LG

TL;DR

AC-OPF is difficult to solve and existing neural-network methods lack worst-case constraint guarantees. The paper embeds AC-OPF physics in neural-network training and adds methods to determine and reduce worst-case violations, achieving higher accuracy and lower violations than standard neural networks.

  • Problem

    AC-OPF is nonlinear and non-convex, while existing machine-learning approaches lack worst-case guarantees for output constraint violations.

  • Method

    The paper incorporates AC-OPF KKT conditions into neural-network training and introduces methods for extracting and reducing worst-case generation and line-constraint violations.

  • Results

    Physics-informed neural networks achieve 20% to 30% lower test-set mean absolute error and improve average constraint violation, suboptimality, and distance from optimality.

  • Takeaways & Limitations

    Physics-informed training can improve prediction accuracy with the same or fewer data, while worst-case violations can be further reduced through targeted hyperparameter tuning.

  • Takeaways & Limitations

    Tuning for lower worst-case generation-constraint violations can worsen average performance, and the relationship between average and worst-case performance requires further analysis.

Abstract

from arXiv · show

This paper introduces, for the first time to our knowledge, physics-informed neural networks to accurately estimate the AC-OPF result and delivers rigorous guarantees about their performance. Power system operators, along with several other actors, are increasingly using Optimal Power Flow (OPF) algorithms for a wide number of applications, including planning and real-time operations. However, in its original form, the AC Optimal Power Flow problem is often challenging to solve as it is non-linear and non-convex. Besides the large number of approximations and relaxations, recent efforts have also been focusing on Machine Learning approaches, especially neural networks. So far, however, these approaches have only partially considered the wide number of physical models available during training. And, more importantly, they have offered no guarantees about potential constraint violations of their output. Our approach (i) introduces the AC power flow equations inside neural network training and (ii) integrates methods that rigorously determine and reduce the worst-case constraint violations across the entire input domain, while maintaining the optimality of the prediction. We demonstrate how physics-informed neural networks achieve higher accuracy and lower constraint violations than standard neural networks, and show how we can further reduce the worst-case violations for all neural networks.

I. INTRODUCTION

AC-OPF is valuable but difficult because its nonlinear, non-convex formulation is computationally challenging, while neural-network approximations lack worst-case constraint guarantees. The paper addresses both issues with physics-informed training and methods for determining and reducing worst-case violations.

  • AC-OPF supports planning, real-time operation, uncertainty analysis, control-setpoint selection, bidding, and market clearing, but its nonlinear, non-convex equations can cause convergence difficulties and long runtimes.
  • Machine-learning approaches can provide 100-1’000 times computation speedup, but they require large datasets covering normal and abnormal operating points that are often unavailable or difficult to generate.
  • Existing neural-network approaches provide no worst-case performance guarantees, despite AC-OPF’s safety-critical constraints on lines, voltages, and generators.
  • The paper incorporates AC-OPF KKT conditions into neural-network training to reduce dependence on training-data size and quality.
  • It also introduces methods to determine worst-case generation and line-flow constraint violations across the input domain and reduce them.

A. AC - Optimal Power Flow

The paper formulates generation-cost-minimizing AC-OPF as a QCQP governed by power-flow, operating-limit, and optimality conditions. Its KKT formulation organizes the equality and inequality constraints and provides necessary conditions for optimality.

  • AC-OPF minimizes generation cost for a system with Nb buses, Ng generators, and Nd loads, and is formulated as a quadratically constrained quadratic program.
  • Optimal generation depends on active and reactive demand and network constraints, while nodal injections are represented through active and reactive power-flow equations.
  • Feasibility requires active and reactive generation limits together with voltage and line-current-flow constraints.
  • The KKT system comprises stationarity, complementary slackness, and dual feasibility conditions that are necessary for AC-OPF optimality.

B. Physics Informed Neural Network

The physics-informed neural network predicts AC-OPF setpoints while incorporating KKT-condition discrepancies into training. It combines supervised errors with physics-based errors, including at collocation points without precomputed OPF solutions.

  • The network predicts active and reactive generation setpoints from active and reactive demand using hidden layers, weights, biases, and nonlinear activations.
  • Separate hidden-layer groups predict generation outputs, voltage setpoints, and dual variables, enabling KKT-condition discrepancies to be evaluated during training.
  • The KKT discrepancy terms measure stationarity, complementary-slackness, and dual-feasibility errors, which are zero when the prediction is optimal.
  • Collocation points require no precomputed optimal dispatch, voltage, or dual variables; only the KKT-violation error is used for those points.
  • Training minimizes generation, voltage, dual-variable, and KKT-violation mean absolute errors through a weighted loss function.

C. Evaluating the Worst Case Performance of the Physics-Informed Neural Network

The paper evaluates neural-network performance using worst-case generation and line-flow constraint violations over the entire input domain, rather than only unseen-test-set averages.

  • Evaluation includes worst-case generation and line-flow constraint violations across the entire input domain in addition to average test-set performance.
  • The worst-case evaluation is used to assess and improve the proposed physics-informed neural-network training architecture.
  • The evaluation therefore targets constraint behavior beyond average prediction accuracy on an unseen test dataset.

1) Worst-Case Guarantees for Generation Constraint Violations:

The paper formulates worst-case generation constraint violations over the full input domain using a mixed-integer representation of the neural network and its ReLU activations.

  • The maximum active and reactive power generation constraint violations are formulated as an optimization problem over the input domain.
  • The formulation uses the generation capacity bounds together with a mixed-integer reformulation of the ReLU activation function.
  • The ReLU reformulation uses binary variables to select the active branch according to whether each preactivation is positive or negative.
  • When the relevant preactivation is positive, one set of constraints becomes active; when it is negative, the alternative constraint becomes active.

2) Worst-Case Guarantees for Line Flow Constraint Violations:

The paper computes worst-case line-flow violations by combining neural-network generation predictions with non-convex AC power-flow equations and solving the resulting MIQCQP.

  • Line-flow limits are evaluated from predicted generation setpoints because line-flow values are not direct neural-network outputs.
  • The AC power-flow equations produce voltages and squared line flows from the predicted generation setpoints.
  • Because these equations are non-convex and quadratic, the worst-case line-flow guarantees are formulated as a Mixed Integer Quadratic Constrained Quadratic Programming problem.
  • Solving the MILP and MIQCQP problems to zero MILP gap makes the obtained generation and line-flow violation values global optima over the entire input domain.

A. Simulation Setup

The simulations compare standard and physics-informed neural networks on four AC-OPF test systems using sampled demand inputs, trained models, and optimization-based worst-case analysis.

  • The proposed architecture is evaluated against a standard neural network on four test systems, including cases from the PGLib-OPF library.
  • The test-system characteristics and neural-network properties are reported in Tables I and II.
  • Ten thousand random active and reactive power input sets were generated with Latin hypercube sampling and divided into collocation, training, and unseen test data.
  • The networks were trained for 1,000 epochs using 200 batches, with TensorFlow and Python.
  • PINN training took almost three times as long as standard-NN training, but required considerably fewer samples with computed OPF outputs because collocation points avoid OPF evaluations.
  • MILP and MIQCQP formulations were implemented in YALMIP and solved using Gurobi, with code made available online.

B. Average Performance over Test Data Set

Average performance is assessed on unseen test data using prediction error, constraint violation, suboptimality, and distance-to-optimality metrics, with PINNs selected through hyperparameter tuning.

  • The comparison uses mean absolute error together with average constraint violation, suboptimality, and distance to the optimal setpoint.
  • Both standard and physics-informed networks were trained to minimize mean absolute error.
  • The reported PINN results use hyperparameters selected by testing combinations and choosing the one producing the least test-set mean absolute error.
  • Table III reports standard-NN results and average PINN results for improving average performance.
  • 20% to 30% lower test-set MAE was obtained by incorporating KKT conditions into neural-network training.

C. Worst Case performance

Worst-case evaluation shows that physics-informed neural networks reduce constraint violations relative to standard neural networks, while hyperparameter tuning can further improve worst-case guarantees. Extracting line-flow guarantees remains computationally difficult for larger cases, and optimizing worst-case behavior may trade off average performance.

  • Generation constraints: PINN models with the lowest MAE significantly reduce worst-case generation constraint violations versus standard NNs across all test cases.The comparison uses the standard NN and a PINN selected for lowest MAE.
  • Hyperparameter tuning: 15% to 30% additional reduction in worst-case generation constraint violation is achieved by tuning PINN hyperparameters for worst-case performance.This objective differs from minimizing mean absolute error.
  • Line-flow constraints: Physics-informed neural networks also produce lower worst-case line-flow constraint violations in Case 14.Line-flow guarantees could not be computed for Cases 39, 118, and 162 within 5 hours and zero optimality gap.
  • Computational limits: Worst-case line-flow guarantee extraction remains computationally challenging because the MIQCQP could not be solved to zero optimality gap within 5 hours for three cases.The paper identifies scalable guarantee-extraction algorithms as future work.
  • Average versus worst-case performance: Tuning PINNs to reduce worst-case generation violations worsens average performance in most cases, suggesting a possible trade-off between average and worst-case objectives.The relationship between good average performance and low worst-case violations requires further analysis.

D. Input Domain Reduction

Reducing the test input domain improves worst-case guarantees for AC-OPF neural networks, especially standard networks. PINNs maintain lower worst-case violations across the reductions and therefore need only slightly larger training domains to meet a target threshold.

  • Effect of input-domain reduction: Input-domain reduction improves worst-case guarantees for both standard NNs and PINNs, especially for standard NNs.The reduction is applied symmetrically to the test-set input domain by δ.
  • Comparison across models: PINNs exhibit lower worst-case violations than standard NNs across the entire range of input-domain reductions.The resulting worst-case generation violation is evaluated with respect to maximum active-power loading.
  • Comparison across models: Standard NNs experience a significantly larger reduction in violations from input-domain reduction than PINNs.This difference indicates that standard NNs depend more strongly on the extent of the evaluated input domain.
  • Training-domain implications: PINNs require only a slightly larger training-data input domain to keep worst-case violations below a target threshold, whereas standard NNs may require much larger domains.The paper states that achieving a similarly low violation level with standard NNs may not always be possible.
  • Contribution: The paper contributes a framework that incorporates AC-OPF physical equations into training and extracts and minimizes worst-case generation and line-constraint violations.It also reports improved prediction accuracy with considerably fewer input data points.
Loading 2110.02672v1…