1 Unsupervised Optimal Power Flow Using Graph Neural Networks

2025-04-30 0 0 1.12MB 12 页 10玖币
侵权投诉
1
Unsupervised Optimal Power Flow
Using Graph Neural Networks
Damian Owerko, Fernando Gama, and Alejandro Ribeiro
Abstract—Optimal power flow (OPF) is a critical optimization
problem that allocates power to the generators in order to satisfy
the demand at a minimum cost. Solving this problem exactly
is computationally infeasible in the general case. In this work,
we propose to leverage graph signal processing and machine
learning. More specifically, we use a graph neural network to
learn a nonlinear parametrization between the power demanded
and the corresponding allocation. We learn the solution in an
unsupervised manner, minimizing the cost directly. In order
to take into account the electrical constraints of the grid,
we propose a novel barrier method that is differentiable and
works on initially infeasible points. We show through simulations
that the use of GNNs in this unsupervised learning context
leads to solutions comparable to standard solvers while being
computationally efficient and avoiding constraint violations most
of the time.
Index Terms—optimal power flow, unsupervised learning,
graph neural networks, graph signal processing
I. INTRODUCTION
Optimal power flow (OPF) is a critical optimization problem
for the energy industry. It consists in allocating power to each
generator in the grid, so that the energy demand is satisfied
with minimum cost (optimally). OPF is used to allocate
electricity generation throughout the day, establish day-ahead
market prices, and plan for grid infrastructure [1].
The objective of the OPF problem is to minimize the cost of
generating electrical power, subject to the constraints imposed
by the grid infrastructure, the physical laws of electromag-
netism, and the demand patterns. This problem is nonconvex
due to the sinusoidal nature of the alternating current and volt-
age and the constraints imposed by electrical interconnections
of the grid. Therefore, solving the OPF problem exactly is
computationally infeasible in the general case [1], [2]. In fact,
it has been show to be NP-hard [3].
One of the most common ways used to address the non-
tractability of the OPF problem is to solve a linear surrogate
based on small-angle approximations. [4]. In practical cases,
however, power grids are typically highly loaded thus violating
the small-angle approximation [5]. A more accurate, but com-
putationally intensive solution, is to rely on solvers for interior
point methods [6]. The OPF problem can also be approximated
by nonlinear, convex optimization problems. Examples include
quadratic [7], [8], second order conic [9] and semi-definite
Supported by NSF CCF 1717120, ARO W911NF1710438, ARL DCIST
CRA W911NF-17-2-0181, ISTC-WAS and Intel DevCloud. D. Owerko and
A. Ribeiro are with the Dept. of Electrical and Systems Eng., Univ. of Pennsyl-
vania., F. Gama is with the Electrical and Computer Engineering Department,
Rice University, Houston, TX. Email: {owerko,aribeiro}@seas.upenn.edu,
and fgama@rice.edu.
programming (SDP) [10], [11] relaxations. There exists a
small class of topologies for which sufficient conditions exist
for convex relaxation optimality [12]. In particular, these
relaxations work well for radial networks, but often lead to
infeasible solutions or sub-optimal for meshed topologies [12].
Nevertheless, SDP relaxations were shown to perform well
on a variety of topologies [13], promting research into more
advanced relaxations with more general optimality guarantees
[14]. An alternative approach is to use successive linear
approximations that converge to the exact formulation [15].
This allows to balance trade-offs between accuracy and com-
putation time and integrates well into existing infrastructure
that relies on LP solvers. The implementation is slower than
interior point methods. However, unlike interior point methods,
successive linear approximations can be implemented on LP
solvers already used in industry.
Machine learning has arisen as a promising approach to
overcome computational tractability. Inference of machine
learning models is typically much faster than traditional
solvers and feasibility of the solution can be quickly verified
or used to hot-start a computationally expensive solver. Histor-
ically, there were many attempts to apply machine learning to
this problem, with the work in [16] providing a comprehensive
review until 2009. Many of these approaches such as genetic
algorithms and particle swarms, do scale well and therefore
have not between shown to be effective for networks with
more than 30 buses [17]–[20]. Early approaches used imitation
learning to learn to replicate solutions obtained using interior
point methods [21], [22], but often violated constraints and
could not perform that the method used to train them. Newer
approaches such as DeepOPF [23], use constrained learning
and are able to provide more robust solutions.
Graph signal processing (GSP) has emerged as a conve-
nient mathematical framework to describe problems involving
network data [24], [25]. By extending concepts of traditional
signal processing, such as filtering and frequency analysis, to
graph-based data, GSP provides novel tools for the analysis
and design of distributed solutions [26], [27]. Of particu-
lar interest are graph neural networks (GNNs) [28], which
have been shown to be successful in both signal processing
and machine learning problems involving graph data [29]–
[31]. GNNs are built as extensions of graph convolutional
filters, followed by (typically pointwise, typically nonlinear)
activation functions. This allows GNNs to learn nonlinear
behaviors while retaining a decentralized nature and exploiting
the underlying graph structure. Thus, GNNs are promising
candidates for learning optimal power flow allocations from
state measurements, while respecting the topology of the grid.
arXiv:2210.09277v1 [eess.SY] 17 Oct 2022
2
In this paper we propose a novel, unsupervised, constrained
learning approach. We make the following contributions.
1) We use GNNs to parametrize a mapping between the state
of the buses in the grid and the target generated power.
2) We learn the resulting parametrization by means of opti-
mizing the constrained OPF problem.
3) We introduce a differentiable, piece-wise penalty function
based on the log-barrier in order to enforce constraints.
This allows for the use of gradient-based methods.
4) We propose new methods of evaluating machine learning
OPF models. Since we are dealing with a physical system,
it is important to evaluate not only the rate at which a
model violates constraints, but also the severity of those
violations.
5) We show that graph neural networks are ideally suited to
optimal power flow as they scale well for sparse graphs
and can be implemented in a distributed manner.
Section II introduces the OPF problem. Section III leverages
graph signal processing to present an appropriate descrip-
tion of the OPF problem and introduces the GNN-based
parametrization of the solution. In section IV we propose a
novel approach to unsupervised learning of OPF, where piece-
wise penalty functions IV-D are used as a method of enforcing
constraints IV-D. Finally, we provide experimental results V
on the efficacy of our architecture on the IEEE 30 and 118
bus power system test cases.
II. OPTIMAL POWER FLOW
An electrical grid is an interconnected system that generates
electricity and delivers it to consumers. Its two most important
electrical components are generators that produce electricity
and loads that demand electric power [32]. Denote by BGbe
the set of all generators such that generator i∈ BGproduces
Sg
iCunits of power. Similarly, load i∈ BDdemands
Sd
iCunits of power. Note that the power is described by
means of a complex number to indicate its active (real) and
reactive (imaginary) power. The cost cito operate a generator
is a function ci:C7→ Rof the power produced.
The problem of OPF is concerned with minimizing the
generation costs, while meeting the demand and satisfying
the electrical constraints of the grid [5]. Specifically, in OPF
we are trying to find the generator output power Sg
iwhich
minimize the total production cost
min
{Sg
i}i∈BGX
i
ci(Sg
i).(1)
The quantity of power produced by each generator is con-
strained within a certain range by two complex limits
Sg
i,min Sg
iSg
i,max (2)
for all i∈ BG, and where Sg
i,min, Sg
i,max Cand is a gener-
alized inequality over the complex plane. The lower bound for
the generator output is often zero, but not necessarily. Some
generators, like nuclear power plants, cannot be turned off
within the time-frame of the optimization problem [33]. Other
generators might be able to store power leading to negative
lower bounds.
Vi
Tij : 1
Yij Vj
Yc
ij Yc
ij
Figure 1. Circuit diagram of π-section branch model with transformer.
Abus is a grid element to which all other electrical
components connect. Consider the set of all buses B. Each
generator and load is connected to exactly one bus. Denote
the sets of generators and loads connecting to bus i∈ B as
BG
i⊆ BGand BD
i⊆ BD, respectively. There may be multiple
generators and loads connected to one bus.
Additionally, the bus i∈ B is characterized by its voltage
ViC, the net power injected at the bus SiC, and its
shunt admittance Ys
i. The shunt admittance is the combined
admittance between a bus’ connected devices and ground.
Therefore, the net power injected is the total power injected
by generators on the bus minus the power consumed by the
load on the bus, which can be conveniently written as follows.
[34]
Si=X
j∈BG
i
Sg
jX
j∈BD
i
Sd
j(3)
The power lost due to the shunt admittance is given by Ohm’s
law Ys
i|Vi|2[34].
The physical limitations of the components connected to a
bus constrain the voltage magnitude between Vi,min, Vi,max
R[34]. That is,
Vi,min ≤ |Vi| ≤ Vi,max.(4)
While the components may be rated to operate at voltages out-
side this range, eq. (4) defines the stable operating conditions
[34].
Branches connect different buses with each other. A branch
(i, j)∈ E ⊆ B × B connects bus ito bus j. We model
branches using an ideal transformer and a line in series, a
model known as a π-section branch model with a transformer,
see figure 1 for a circuit diagram and [34]–[36] for further
details. An ideal transformer is characterized by the complex
transformation ratio Tij Cwhich describes the ratio of the
input voltage to the output voltage [34], [35], i.e. Vj=Vi/Tij ,
and assumes no internal losses. This transformer is in series
with a π-section line, which is described by three parameters:
the line admittance Yij Cdescribing the flow of current from
one end to the other, the forward charging admittance Yc
ij C
and backward charging admittance Yc
ji C. Note that the air
is a dielectric and therefore we model its effect on the line
by adding a capacitor connected to the ground. Therefore, the
total power flowing forward Sij Cand backward Sji C
along a branch is [34]
Sij = (Yij +Yc
ij )|Vi|2
|Tij |2Y
ij
ViV
j
Tij
(5)
Sji = (Yij +Yc
ji)|Vj|2Y
ij
V
iVj
T
ij
.(6)
3
There is a physical limit to the amount power a branch can
handle for extended periods of time [34], [35]. This can be
represented by Sij,max Rsuch that
|Sij | ≤ Sij,max.(7)
Additionally a branch may have limits, θij,min and θij,max
in R, on the difference in voltage phase angle between the
buses it connects [34]. Specifically,
θij,min (ViV
j)θij,max (8)
where (ViV
j)is the angle difference between the voltage
phase at bus iand the voltage phase at bus j. It is common
to define reference buses to eliminate ambiguity in terms of
voltage angles [34], [35], which are defined to have zero
voltage angle.
Buses and branches are related by the power-flow equation
as a direct consequence of Kirchhoffs current law [34]. The
net power injected at the bus (3) must be equal to the power
flowing out of the bus, so it holds that
Si=Ys
i|Vi|2X
(i,j)∈E∩ET
Sij .(9)
The distinction between the power flow and the optimal
power flow problems is important [5], [35]. In the power
flow problem the goal is to solve for the voltage Vi, given
the net power injected Siat each node and the topologi-
cal characteristics of the grid, as described by the values
Ys
i, Tij , Yij , Y c
ij . The power generated and demanded at each
node are exogenous variables. Optimal power flow (OPF), on
the other hand, is a constrained optimization problem where
the power generated is endogenous. The goal is to determine
the power output of each generator Sg
ithat minimizes the
total generation cost Pi∈B ci(Sg
i)while satisfying power
flow equation (9) and the aforementioned constraints. In this
problem, only the power demanded at each node Sd
iis an
exogenous variable. Table I summarizes the optimal power-
flow problem.
A. Solutions
There is extensive research into solving the optimal power
flow problem [1]. The branch equations, (5) and (6), make
it non-convex [2], as the complex multiplications involve
trigonometric functions. Finding the exact solution is strongly
NP-hard [3]. Consequently, many research efforts focus on
finding approximations, relaxations, and solutions for OPF on
special families of graphs.
One common approach, named DC-OPF, is a linear approx-
imation to the exact OPF problem (sometimes referred to as
AC-OPF). DC-OPF is a first order approximation around the
point where voltage angles are close to zero. Since the voltage
angle differences are small, complex multiplications in (5) and
(6) are approximated using small-angle approximations. The
problem becomes linear if we normalize voltage magnitude.
Additionally, if the cost function is convex, so too is the
DC-OPF problem. Most commonly, the cost function is a
second-order polynomial. Nevertheless, DC-OPF solutions are
not guaranteed to be feasible in the exact OPF case [37].
Table I
THE COMPLETE OPTIMAL POWER FLOW EQUATIONS FOR THE
FORMULATION USED IN THIS PAPER. REFER TO SECTION II FOR
EXPLANATIONS OF INDIVIDUAL EQUATIONS.
minimize X
i∈BG
ci(Sg
i)(1)
subject to
Sg
i,min Sg
iSg
i,max,for all i∈ BG(2)
Si=X
j∈BG
i
Sg
iX
j∈BD
i
Sd
i.(3)
Vi,min ≤ |Vi| ≤ Vi,max,for all i∈ B (4)
Sij = (Yij +Yc
ij )|Vi|2
|Tij |2Y
ij
ViV
j
Tij
,for all (i, j)∈ E
(5)
Sji = (Yij +Yc
ji)|Vj|2Y
ij
V
iVj
T
ij
,for all (i, j)∈ E (6)
|Sij | ≤ Sij,max,for all (i, j)∈ E (7)
θij,min (ViV
j)θij,max,for all (i, j)∈ E (8)
Si=Ys
i|Vi|2+X
(i,j)∈E∪E T
Sij ,for all i∈ B (9)
Particularly, the assumptions of the DC-OPF problem are
violated when demand is high, which coincidentally is the
most critical case of the grid operation [5], [37].
In some situations, the OPF problem can be solved exactly
by using using one of several off-the-shelf optimization prob-
lem solvers, such as CONOPT, IPOPT, KNITRO, MINOS or
SNOPT [38]. However, in general, they are slow to converge
for large networks [6] or have no guarantee of convergence. In
particular, the IPOPT (Interior Point OPTimizer) [39] solver
has found widespread use due to its robustness, but it is
computationally costly [6].
III. GRAPH NEURAL NETWORKS
The objective of this work is to approximate the OPF
solution by taking the power demanded by each load Sd
ifor
all i∈ BDas an input and outputting the optimal generation
scheme, Sg
ifor all i∈ BG, in a scalable and distributed way.
To do so, we parametrize the solution by means of a graph
neural network.
A. Graph Signal Processing
Graph signal processing (GSP) has emerged as a convenient
framework to describe, analyze and solve problems that are
distributed in nature. Let G= (B,E,W)be a graph where
B={1, ..., N}is the set of Nnodes, E B × B is the set
of edges, and W:E Ris a weight function that assigns
a (positive) scalar to each edge. Data is described as a signal
z:B RFdefined on top of the nodes of the graph. The
signal at a node is a vector of Fmeasurements or features.
It is often convenient to represent a graph signal as a matrix
ZRN×F. The ith row of Z,ziRF, collects the Ffeatures
at node i,zi=z(i)[24], [25], [27]. We represent complex
quantities by a pair of features.
摘要:

1UnsupervisedOptimalPowerFlowUsingGraphNeuralNetworksDamianOwerko,FernandoGama,andAlejandroRibeiroAbstract—Optimalpowerow(OPF)isacriticaloptimizationproblemthatallocatespowertothegeneratorsinordertosatisfythedemandataminimumcost.Solvingthisproblemexactlyiscomputationallyinfeasibleinthegeneralcase.I...

收起<<
1 Unsupervised Optimal Power Flow Using Graph Neural Networks.pdf

共12页,预览3页

还剩页未读, 继续阅读

声明:本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。玖贝云文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知玖贝云文库,我们立即给予删除!
分类:图书资源 价格:10玖币 属性:12 页 大小:1.12MB 格式:PDF 时间:2025-04-30

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 12
客服
关注