Restoring Feasibility in Power Grid Optimization: A Counterfactual ML Approach
Mostafa Mohammadian, Anna Van Boven · 2025
Read Restoring Feasibility in Power Grid Optimization: A Counterfactual ML Approach by Mostafa Mohammadian, Anna Van Boven (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-06369.txt.
Introduction
Mostafa Mohammadian, Anna Van Boven, and Kyri Baker wrote a 2025 paper on rescuing power grid plans that have become infeasible. Grid operators solve the optimal power flow problem to choose the cheapest generator dispatch that meets demand within engineering limits. Stressed conditions, volatile demand, and variable wind and solar output can leave the problem with no valid solution at all.
An infeasible plan risks voltage instability and overloaded lines if operators improvise. The authors propose a learning framework that combines machine learning with counterfactual explanations, statements of what would have to change for a plan to work. The system suggests minimal adjustments that restore feasibility. This gives operators a principled way to recover instead of relaxing limits by guesswork.
Catalog record
| CREATOR | Mostafa Mohammadian, Anna Van Boven |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 32 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2504-06369
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Restoring Feasibility in Power Grid Optimization: A Counterfactual ML Approach Thanks: This research is supported by National Science Foundation awards 2041835 2041835 and 2242930 2242930 . Mostafa Mohammadian, Anna Van Boven Abstract Electric power grids are essential components of modern life, delivering reliable power to end-users while adhering to a multitude of engineering constraints and requirements. In grid operations, the Optimal Power Flow problem plays a key role in determining cost-effective generator dispatch that satisfies load demands and operational limits. However, due to stressed operating conditions, volatile demand profiles, and increased generation from intermittent energy sources, this optimization problem may become infeasible, posing risks such as voltage instability and line overloads. This study proposes a learning framework that combines machine learning with counterfactual explanations to automatically diagnose and restore feasibility in the OPF problem. Our method provides transparent and actionable insights by methodically identifying infeasible conditions and suggesting minimal demand response actions. We evaluate the proposed approach on IEEE 𝟑𝟎 \bm{30} -bus and 𝟑𝟎𝟎 \bm{300} -bus systems, demonstrating its capability to recover feasibility with high success rates and generating diverse corrective options, appropriate for real-time decision-making. These preliminary findings illustrate the potential of combining classical optimization with explainable AI techniques to enhance grid reliability and resilience. I Introduction Electric power grids are essential components of modern society that ensure reliable electricity supply to end-users such as industries, businesses, and residential consumers [ 1 ] . At the heart of power grid operations lies the Optimal Power Flow (OPF) problem, which plays a crucial role in both planning and real-time decision-making. OPF seeks to determine the most cost-effective way to dispatch generators to meet fluctuating load demands while adhering to various physical and engineering constraints. OPF is further complicated by volatile renewable energy injections, rising electricity consumption, and an increasing necessity for tighter operating margins. Moreover, since grid operators frequently have to operate systems close to their security limits to handle higher loading conditions, finding a feasible solution to OPF can become considerably more challenging [ 2 ] . Previously, in power systems research, various techniques have been developed to better formulate and solve the large-scale OPF problem. First, from an algorithmic perspective, researchers have developed a range of computationally efficient numerical methods to deal with larger and more complex networks [ 3 , 4 , 5 ] . Second, from a formulation viewpoint, OPF has broadened to include multiple objectives (e.g., cost minimization, emission reduction) as well as a range of physical and operational constraints [ 6 , 7 ] . Despite these advancements, solving the OPF problem is still challenging, and it can be nontrivial to find solutions that simultaneously satisfy all of the constraints. These limitations underscore the need for robust frameworks that can systematically diagnose, mitigate, and ultimately prevent infeasibilities within OPF domain [ 8 ] . When the OPF problem becomes infeasible — indicating that no solution meets the constraints — system operators face significant challenges to ensure reliability. Diagnosing the underlying causes of these infeasibilities is critical, yet traditional methods offer limited insights into adjustments that can resolve the infeasibilities. In practice, operators often resort to manual interventions or time-consuming “feasibility fixing” procedures within optimization solvers. Under heavy load scenarios (where system constraints are highly binding), for instance, operators may reduce congestion on transmission lines by incorporating dynamic line ratings, or by temporarily relaxing transmission line constraints [ 9 ] . Alternatively, operators may adjust power injections to restore feasibility and prevent widespread outages, which necessitates a time-intensive post-processing procedure. As mentioned above, most traditional solvers will take a long time to recognize and mitigate an infeasibility in a larger power system. However, resolving an infeasibility must happen rapidly in order to prevent voltage instability and grid collapse. Several papers have studied techniques for quickly identifying and localizing infeasible power grid conditions. In [ 10 , 11 ] , an Equivalent Circuit Formulation (ECF) is utilized to determine how much additional current is needed in each bus to maintain power balance. Other works, such as [ 12 , 13 ] implement machine learning (ML) strategies that perform emergency load shedding in response to a contingency event, such as a line outage. These techniques are faster than traditional optimization solvers in identifying and resolving a power system infeasibility. However, they are not fully prescriptive; none of these works specify both the exact amount and the location of the load to shed to maintain the feasibility of the system. Additional works incorporate explainable Artificial Intelligence (XAI) techniques into power systems operations [ 14 ] , partially to assist in understanding system behavior. [ 15 ] applies XAI techniques to identify the causes of contingency events on the grid, demonstrating how XAI can increase understanding of system behaviors and attributes that contribute to fault conditions. In this context, an XAI technique called counterfactual explanations [ 16 , 17 ] offers new ways to investigate power system operations by explaining the impact of small changes to system characteristics. In recent work, counterfactual explanations have been used to understand generator dispatch decisions in DC-OPF [ 18 ] . This type of insight, when integrated with robust, data-driven methods, can enable system operators to identify, explain, and mitigate infeasible circumstances before they become costly or create unsafe conditions. Building on recent advances in machine learning and counterfactual explanations within power systems, our paper introduces an end-to-end learning framework designed to restore feasibility in OPF problems. As an initial foray into this area, we focus on DC Optimal Power Flow (DC-OPF) problems to understand if the use of counterfactual explanations in these problems can be useful. Our integrated system first detects infeasible scenarios and then utilizes counterfactual explanations to pinpoint possible bus power injection adjustments needed to restore feasibility. This allows grid operators to have a suite of diverse options to restore feasibility. In contrast with the concept of “interpretability”, which addresses transparency of the model itself, explainability seeks to explain the behavior of a model - key for understanding OPF feasibility adjustments. Together, this study aims to bridge the gap between classical optimization methods and modern AI-driven explainability, marking a significant step forward in the design of robust and interpretable power grid optimization tools [ 14 ] . II Preliminaries This section presents the foundational concepts for DC-OPF and outlines the analytical feasibility restoration scheme that serves as our Baseline approach. II-A DC Optimal Power Flow DC-OPF is widely used for current power system operations due to its convexity and computational benefits. In the DC-OPF framework, the aim is to determine the minimum-cost generator dispatch that meets load requirements within a power network, subject to power flow constraints on transmission lines and generator operating limits. Let us consider a power network with N buses, represented by the set \mathcal{N} , and l transmission lines, forming the edge set \mathcal{E} . For each bus i\in\mathcal{N} , p^{g}_{i} and p^{d}_{i} denote the total generated power and power consumption (demand), respectively. The variable p^{f}_{ij} indicates the active power flow on each transmission line, with b_{ij} representing the line susceptance. In addition, the vector \bm{\theta}\in\mathbb{R}^{n} captures the phase angles at all buses, with \theta_{0} denoting the reference bus angle. Hence, the DC-OPF problem can be