Source-linked AI summary
DeepOPF: A Deep Neural Network Approach for Security-Constrained DC Optimal Power Flow
Xiang Pan, Tianyu Zhao, Minghua Chen, Shengyu Zhang
TL;DR
SC-DCOPF is important for reliable power-system operation but can be excessively time-consuming on large networks. DeepOPF learns generations from loads, reconstructs phase angles through power-flow equations, and applies ℓ1-projection for feasibility. On IEEE test cases, it reports less than 0.2% optimality loss and speedups of up to two orders of magnitude versus Gurobi.
Problem
SC-DCOPF supports reliable operation under contingencies, but solving it for large-scale networks incurs excessive running time.
Method
DeepOPF trains a DNN to predict generations from loads, reconstructs phase angles using power-flow equations, and uses ℓ1-projection post-processing to ensure feasibility.
Results
Less than 0.2% optimality loss is reported, with up to 318 average speedup for IEEE Case300 under typical operating conditions.
Takeaways & Limitations
DeepOPF provides a fast, feasible DNN-based solver for SC-DCOPF, with computation speedups reaching up to two orders of magnitude under typical loads.
Abstract
from arXiv · showhide
We develop DeepOPF as a Deep Neural Network (DNN) approach for solving security-constrained direct current optimal power flow (SC-DCOPF) problems, which are critical for reliable and cost-effective power system operation.DeepOPF is inspired by the observation that solving SC-DCOPF problems for a given power network is equivalent to depicting a high-dimensional mapping from the load inputs to the generation and phase angle outputs. We first train a DNN to learn the mapping and predict the generations from the load inputs. We then directly reconstruct the phase angles from the generations and loads by using the power flow equations. Such a predict-and-reconstruct approach reduces the dimension of the mapping to learn, subsequently cutting down the size of the DNN and the amount of training data needed. We further derive a condition for tuning the size of the DNN according to the desired approximation accuracy of the load-generation mapping. We develop a post-processing procedure based on $\ell_1$-projection to ensure the feasibility of the obtained solution, which can be of independent interest. Simulation results for IEEE test cases show that DeepOPF generates feasible solutions with less than 0.2% optimality loss, while speeding up the computation time by up to two orders of magnitude as compared to a state-of-the-art solver.
NOMENCLATURE
The paper frames SC-DCOPF as a repeated, high-dimensional load-to-operating-decision mapping and proposes DeepOPF to approximate it efficiently while preserving feasibility.
- Motivation: SC-DCOPF is critical for reliable operation because it enforces security constraints under possible equipment-failure contingencies.The paper focuses on preventive SC-DCOPF, where decisions satisfy both pre- and post-contingency constraints.
- Motivation: Large-scale SC-DCOPF has excessive computational complexity and running time, limiting its practical applicability.
- DeepOPF framework: DeepOPF learns the load-generation mapping with a DNN, then reconstructs phase angles from generations and loads using linearized power-flow equations.This predict-and-reconstruct design reduces the mapping dimension, DNN size, and required training data/time.
- DeepOPF framework: The approach uses ℓ1-projection post-processing to ensure feasibility of the final solution.
- Analysis: Approximation accuracy decreases exponentially with network depth and polynomially with neurons per layer, enabling DNN-size tuning.
- Results: Less than 0.2% optimality loss is reported for feasible IEEE test-case solutions, with speedups of up to two orders of magnitude under typical loads.Under congested loads, the reported speedup is up to one order of magnitude; prediction accuracy and running time exhibit a trade-off.
II. RELATED WORK
Prior SC-OPF methods include iterative optimization, computational intelligence, learning-assisted solvers, and constraint-set reduction. DeepOPF instead directly learns an OPF solution mapping, while requiring network-specific training and accepting approximation loss.
- Existing approaches: Iteration-based SC-OPF methods approximate the problem with quadratic or linear programming and then apply solvers such as interior-point methods.Their time complexity can be substantial for large-scale power systems.
- Existing approaches: Computational-intelligence methods such as PSO-RO use reconstruction operators and penalties for feasibility but lack performance guarantees and can be computationally expensive.
- Existing approaches: Learning-based OPF studies mainly integrate machine learning into conventional algorithms, while constraint-set methods reduce problem size by identifying inactive and active constraints.
- Limitations: DeepOPF's main limitation is unavoidable approximation loss, plus the need for separate solvers and substantial training data for different power networks.The paper states that these requirements can be handled offline.
- Comparison: The constraint-reduction and DNN approaches are orthogonal and can be combined, with potential overall speedup obtained from both methods.
- DeepOPF: DeepOPF directly learns load-to-generation and voltage mappings for SC-DCOPF, providing a DNN-based solver with feasibility guarantees and a condition for tuning approximation accuracy.
- SC-DCOPF formulation: SC-DCOPF minimizes generation cost subject to generator limits, power-balance equations, and transmission-capacity constraints across contingencies.The formulation assumes the network remains connected after a single-line contingency.
IV. DEEPOPF FOR SOLVING SC-DCOPF
DeepOPF predicts generation decisions from load inputs and reconstructs phase angles using power-flow equations, reducing the variables learned while automatically satisfying equality constraints. It adds feasibility post-processing when the predicted solution violates operating limits.
- Framework: DeepOPF predicts only independent generation variables from load inputs, then determines remaining variables through power-balance equality constraints.This reduces the number of variables assigned to the neural network and handles equality constraints automatically.
- Inference and feasibility: The inference stage applies the trained model to given loads, while a post-processing ℓ1-projection restores feasibility when approximation errors produce violations.Feasibility is checked against generation and line transmission limits before projection is used.
- Training data: Training data are generated by uniformly sampling loads around default values, solving the resulting instances with a quadratic-programming solver, and normalizing the data.For high-dimensional loads near sampling boundaries, the paper notes that MCMC may be used instead.
- Phase angle reconstruction: Phase angles are computed from predicted generations and loads using linearized power-flow equations after removing the slack-bus row and column.The reduced admittance matrix is full rank, and the slack-bus phase angle is inserted afterward.
E. The DNN Model
The DNN approximates the load-generation mapping using a multilayer feed-forward architecture, with a loss that combines prediction error and penalties for inequality-constraint violations.
- DNN architecture: The DNN uses one input layer, several hidden layers, and one output layer to approximate the load-generation mapping.The hidden layers model feature interactions through weights and biases.
- Loss function: The training loss measures mean-square error between predicted and optimal scaling factors because these correspond one-to-one with generation outputs.The loss therefore focuses on generation prediction rather than separately modeling phase angles.
- Loss function: A penalty term captures violations of transmission-related inequality constraints using contingency-specific flow calculations.The calculated phase angles and line-flow expressions provide the quantities used to assess violations.
- Loss function: The total loss is a weighted sum of reference-solution error and inequality-constraint penalties.Positive weights balance the two components during training.
3) The training process:
The analysis characterizes neural-network approximation of the load-to-generation mapping and derives a network-size condition tied to the desired error tolerance. The training procedure also includes feasibility recovery for infeasible predictions.
- The training process:: Training minimizes the average loss over the training set by tuning the DNN weight matrices and bias vectors.NT denotes the amount of training data, and Ltotal,k denotes the loss for training item k.
- The training process:: SGD with momentum solves the training problem while reducing per-iteration computation through subsets of summation terms.The paper motivates this choice for large-scale datasets.
- The training process:: When predictions violate generation or line limits, an ℓ1-projection linear program obtains a feasible solution from the DNN prediction.The paper identifies infeasible machine-learning outputs as a practical issue and uses off-the-shelf solvers for the projection.
- A. Approximation Error of the Load-to-Generation Mapping: The load-to-generation mapping is piece-wise linear and Lipschitz-continuous under the paper’s SC-DCOPF setting.The analysis assumes a compact load-input domain and initially focuses on one-dimensional output mappings.
- A. Approximation Error of the Load-to-Generation Mapping: The approximation-error lower bound decreases exponentially with network depth and polynomially with the maximum neurons per layer.The bound is linear in the input-domain diameter d and the mapping’s Lipschitz constant Λ.
- A. Approximation Error of the Load-to-Generation Mapping: The derived condition specifies a necessary neural-network size for achieving a target approximation error ϵ.If the condition is not satisfied, some difficult mappings may have minimum approximation error exceeding ϵ.
B. Computational Complexity
DeepOPF’s computation comprises DNN generation prediction, phase-angle reconstruction with contingency checks, and optional ℓ1-projection. The resulting complexity is lower than direct interior-point solution, and simulations report fast, high-quality solutions.
- B. Computational Complexity: DeepOPF’s runtime has three components: DNN generation prediction, phase-angle computation and feasibility checking, and optional ℓ1-projection.The projection component is used when post-processing is needed to ensure feasibility.
- B. Computational Complexity: Setting the maximum layer width M to O(N) and the hidden-layer count Nhid to 3 yields the stated generation-prediction complexity.N is the number of buses.
- B. Computational Complexity: Phase-angle reconstruction solves one set of linear equations per contingency and checks transmission-line limits.This stage uses the generations predicted by the DNN.
- B. Computational Complexity: The ℓ1-projection is a linear program that can be solved using fast matrix-multiplication-based algorithms or off-the-shelf solvers.It is included only when post-processing is required.
- B. Computational Complexity: DeepOPF has substantially lower complexity than direct interior-point solution of SC-DCOPF.The paper reports that simulations corroborate this complexity advantage.
- B. Computational Complexity: Less than 0.2% optimality loss is reported for quality SC-DCOPF solutions produced in a fraction of the time used by a state-of-the-art solver.This result is reported for both typical and congested settings.
C. Trade-off between Accuracy and Complexity
DeepOPF exposes a tunable accuracy–complexity trade-off through the DNN’s hidden-layer and per-layer neuron counts.
- The number of hidden layers Nhid and maximum neurons per layer M can be tuned to balance approximation accuracy and computational complexity.
VI. NUMERICAL EXPERIMENTS
The numerical experiments evaluate DeepOPF against Gurobi across IEEE test systems and operating conditions using feasibility, cost, runtime, and speedup metrics. DeepOPF achieves low optimality loss and substantial computational acceleration, including challenging congested settings with post-processing.
- The experiments use IEEE Case30, Case57, Case118, and Case300 systems under typical operating conditions.
- Performance is averaged over 5,000 test instances using feasibility rate, objective cost, running time, and speedup relative to Gurobi.
- Up to two orders of magnitude speedup is achieved under typical load conditions, with larger test cases showing greater efficiency.
- 81.7% feasibility before post-processing and 318 average speedup are reported for IEEE Case300 under typical conditions.
C. Performance with High-Variation Load and under Congested Settings
DeepOPF remains feasible and fast across high-variation and congested IEEE Case118 settings, while network scale, training data, and loss weighting trade accuracy against speed and feasibility.
- High-Variation Load: 100% feasibility and 0.1% optimality loss were achieved under the typical high-variation load setting.The load varied from 50% to 150% of default demand.
- Congested Settings: 0.2% optimality loss and ×56 speedup were obtained under the lightly-congested setting with post-processing.For cases with binding line constraints, the corresponding results were less than 0.2% loss and ×8 speedup.
- Congested Settings: Under heavy congestion, post-processing raised feasibility to 100%, with less than 0.2% optimality loss and ×16 speedup over Gurobi.Without post-processing, DeepOPF failed to generate feasible solutions; after projection, both KNN and DeepOPF became feasible, with DeepOPF performing better overall.
- Network and Training Size: Larger training sets reduced optimality loss, while deeper and wider networks improved loss but reduced speedup.The experiments varied training data from 10,000 to 30,000 samples and compared three network scales.
- Loss Weighting: Increasing the loss-function penalty weight w2 improved pre-projection feasibility and speedup by reducing the number of post-processing calls.The weighting factors were adjusted to balance training loss against inequality-constraint violations.
- Overall Implication: DeepOPF’s construction and training costs can be amortized across repeated instances solved for the same network.The paper identifies repeated operation, such as solving every five minutes, as the setting where this amortization is minor.
APPENDIX A PROOF OF LEMMA 1
The proof establishes that the piece-wise linear load-generation mapping is Lipschitz-continuous and develops a lower bound for approximating a two-segment Lipschitz function with a linear function.
- Lipschitz Continuity: The scalar optimal-generation mapping is represented as piece-wise linear over convex polyhedral regions of the input domain.Each region uses an affine expression a_i x + b_i.
- Lipschitz Continuity: Within each region, the output difference is bounded by the region slope norm times the input difference norm.The proof writes |f*(x1) − f*(x2)| ≤ ||a_i|| · ||x1 − x2||.
- Lipschitz Continuity: Using Λ as the maximum region-slope norm gives a global bound |f*(x1) − f*(x2)| ≤ Λ · ||x1 − x2||.This bound directly establishes Lipschitz continuity over the input domain.
- Approximation Lower Bound: Lemma 4 lower-bounds the worst-case L∞ approximation error when a two-segment piece-wise linear Lipschitz function is approximated by a linear function.The construction uses a tent-shaped two-segment function over [−µ, µ] and analyzes the linear approximant by its intercept.
APPENDIX C PROOF OF THEOREM 2
The proof bounds the approximation difficulty of piece-wise linear neural networks by relating their segment count to depth and width, yielding a worst-case error lower bound.
- Segment Counting: A neural-network function with depth N_hid and maximum width M has at most n linear segments over the input domain.The proof partitions the domain into 2n equal intervals and constructs a difficult Lipschitz-continuous target function.
- Approximation Bound: Any function with at most n segments is linear over at least one selected two-interval segment, where Lemma 4 applies.This transfers the two-segment approximation lower bound to the broader network-function class.
- Segment Counting: ReLU networks with depth N_hid and maximum width M generate at most (2M)^Nhid linear segments.The proof substitutes this segment-count bound into the approximation analysis.
APPENDIX D PROOF OF COROLLARY 3
The proof derives DNN sizing and computational-complexity relationships for DeepOPF, then reports its empirical speedup and optimality-loss distributions on IEEE Case118.
- DNN Sizing: A necessary DNN-scale condition is derived to approximate the most difficult load-to-generation mapping with error at most ϵ.The condition is based on the preceding approximation bound and a Lipschitz constant Λ.
- Computational Complexity: With N_hid = 3 and M = O(N), DeepOPF’s generation-prediction complexity is smaller than that of the interior-point method.The paper explicitly compares the resulting DNN complexity with the conventional method.
- Computational Complexity: DeepOPF’s generation-prediction complexity is expressed through input-to-hidden, hidden-layer, and hidden-to-output computations.For a fully connected model, the overall arithmetic complexity is represented as N_inK_1 + N_hidM^2 + N_hidK_out.
- Computational Complexity: The output layer uses Sigmoid functions to keep final output elements within (0, 1).The complexity analysis treats the resulting Sigmoid computation as constant when the relevant integer bounds are fixed.
- Empirical Results: On IEEE Case118, DeepOPF achieved average optimality loss below 0.2% and average speedup of ×281 against Gurobi.The maximum observed optimality loss was around 1.2%, while the maximum speedup was around ×320.