Table of Contents
Fetching ...

On the Choice of Loss Function in Learning-based Optimal Power Flow

Ge Chen, Junjie Qin

TL;DR

The paper addresses real-time AC OPF surrogates by comparing two learning-loss strategies: traditional MSE and a cost-aligned decision loss. It introduces a physics-informed surrogate with a structured output and a Lagrangian duality-based training regime to enforce feasibility, mitigating issues from discontinuities in the load-to-solution mapping. Empirical results on the IEEE 39-bus system show that decision loss yields lower OPF regret and substantially faster solutions than IPM, with improved constraint compliance when combined with the proposed network design and training. The work provides a practical path toward reliable, fast OPF surrogates for dynamic power systems with high renewable penetration.

Abstract

We analyze and contrast two ways to train machine learning models for solving AC optimal power flow (OPF) problems, distinguished with the loss functions used. The first trains a mapping from the loads to the optimal dispatch decisions, utilizing mean square error (MSE) between predicted and optimal dispatch decisions as the loss function. The other intends to learn the same mapping, but directly uses the OPF cost of the predicted decisions, referred to as decision loss, as the loss function. In addition to better aligning with the OPF cost which results in reduced suboptimality, the use of decision loss can circumvent feasibility issues that arise with MSE when the underlying mapping from loads to optimal dispatch is discontinuous. Since decision loss does not capture the OPF constraints, we further develop a neural network with a specific structure and introduce a modified training algorithm incorporating Lagrangian duality to improve feasibility.} This result in an improved performance measured by feasibility and suboptimality as demonstrated with an IEEE 39-bus case study.

On the Choice of Loss Function in Learning-based Optimal Power Flow

TL;DR

The paper addresses real-time AC OPF surrogates by comparing two learning-loss strategies: traditional MSE and a cost-aligned decision loss. It introduces a physics-informed surrogate with a structured output and a Lagrangian duality-based training regime to enforce feasibility, mitigating issues from discontinuities in the load-to-solution mapping. Empirical results on the IEEE 39-bus system show that decision loss yields lower OPF regret and substantially faster solutions than IPM, with improved constraint compliance when combined with the proposed network design and training. The work provides a practical path toward reliable, fast OPF surrogates for dynamic power systems with high renewable penetration.

Abstract

We analyze and contrast two ways to train machine learning models for solving AC optimal power flow (OPF) problems, distinguished with the loss functions used. The first trains a mapping from the loads to the optimal dispatch decisions, utilizing mean square error (MSE) between predicted and optimal dispatch decisions as the loss function. The other intends to learn the same mapping, but directly uses the OPF cost of the predicted decisions, referred to as decision loss, as the loss function. In addition to better aligning with the OPF cost which results in reduced suboptimality, the use of decision loss can circumvent feasibility issues that arise with MSE when the underlying mapping from loads to optimal dispatch is discontinuous. Since decision loss does not capture the OPF constraints, we further develop a neural network with a specific structure and introduce a modified training algorithm incorporating Lagrangian duality to improve feasibility.} This result in an improved performance measured by feasibility and suboptimality as demonstrated with an IEEE 39-bus case study.
Paper Structure (15 sections, 11 equations, 6 figures, 1 algorithm)

This paper contains 15 sections, 11 equations, 6 figures, 1 algorithm.

Figures (6)

  • Figure 1: An example where a decision with a high MSE exhibits a lower cost than another decision with a lower MSE.
  • Figure 2: An example to illustrate the discontinuity of the mapping from loads to the decisions given by the IPM. (a) Structure of the test system, (b) Feasible set of the second generator's output $(p^g_2, q^g_2)$, where the red stars represents two different local minimums, (c) decisions given by IPM, (d) decisions predicted by a neural network, and (e) constraint violations of the predicted decisions.
  • Figure 3: Specially designed structure of the neural network for predicting OPF solutions. Its last activation is the sigmoid. A physics-informed layer is also established for the calculation of constraint violations.
  • Figure 4: Results of (a) regrets and (b) solving time given by the two models. The regret can be regarded as the "optimality gap".
  • Figure 5: Maximum and average line power flows and maximum bus voltage violations of different methods.
  • ...and 1 more figures