The Flow of Power
Steven Low
Simons Institute: Real-time Decision Making Bookcamp
Power Systems, Berkeley, January 2018
Bootcamp: Power systems
The flow of power (S Low)
Basic concepts and models
Power flow and optimization
The flow of information (S Meyn)
Distributed control architectures
The flow of money (K Poolla)
Market structures and services
from steady state to dynamics
from engineering to economics
R. Karp’s instruction
“... the level should be sufficiently elementary
that an expert on the topic will be bored.”
The flow of power I
Basic concepts and models
Why smart grid? (15 mins)
Three-phase AC transmission: 3 key ideas (30 mins)
Phasor representation
Balanced operation
Per-phase analysis
Device models (30 mins)
Transmission line
Transformer
Generator
The flow of power II
Power flow and optimization
Network models (10mins)
Admittance matrix
Power flow models
Optimal power flow problems (35mins)
Formulation and example
Convex relaxations
Real-time OPF
Why smart grid?
Watershed moment
Energy network will undergo similar architectural
transformation that phone network went through
in the last two decades to become the world’s
largest and most complex IoT
deregulation
IoT
Tesla: multi-phase AC started
1888 both started as natural monopolies 1980-90s
both provided a single commodity
both grew rapidly through two WWs
1876 1980-90s
Bell: telephone deregulation
started
convergence
1969: DARPAnet to Internet
Watershed moment
Industries will be restructured
AT&T, MCI, McCaw Cellular, Qualcom
Google, Facebook, Twitter, Amazon, eBay, Netflix
Infrastructure will be reshaped
Centralized intelligence, vertically optimized
Distributed intelligence, layered architecture
Watershed moment
(April 20, 2017)
What will drive power network transformation ?
Watershed moment
(April 20, 2017)
What will drive power network transformation ?
Electricity gen & transportation
Source:
USEPA
They consume the most energy
Consume 2/3 of all energy in US (2014)
They emit the most greenhouse gases
Emit >1/2 of all greenhouse gases in US (2014)
To drastically reduce greenhouse gases
Generate electricity from renewable sources
Electrify transportation
World energy stats (2011)
Consumption 519 quad BTU
petroleum 34%
coal 29%
gas 23%
renewable (elec) 8%
nuclear 5%
Consumption 519 (quad BTU) per capita (mil BTU)
top 5 China 20% 78
countries
US 19% 313
Russia 6% 209
India 5% 20
Japan 4% 164
total 54%
Source: EIA
World energy stats (2011)
Consumption 519 quad BTU
petroleum 34%
coal 29%
gas 23%
renewable (elec) 8%
nuclear 5%
Consumption 519 (quad BTU) CO2 emission
top 5 China 20% 27%
countries
US 19% 17%
Russia 6% 5%
India 5% 5%
Japan 4% 4%
total 54% 58%
Source: EIA
US greenhouse gas emission 2014
Electricity generation
and transportation are
top-two GHG emitters
(56% total)
… and they consume
the most energy
(66% total)
Total (2014) = 6,870 Million Metric Tons of CO2 equivalent
ource: USEPA, https://www3.epa.gov/climatechange/ghgemissions/sources/transportation.html
US energy flow 2014
quadrillion BTU
Source: EIA Monthly Energy Review March 2015
US electricity flow 2014
quadrillion Btu
Conversion loss:
63%
Fossil : 65% Plant use: 2%
T&D losses: 2.4%
Nuclear: 21% Gross gen:
37% End use:
Renewable: 13% 33%
US total energy use: 98.3 quads
For electricity gen: 39% Source: EIA March 2015
Monthly Energy Review
US dirty supply
2 trillion kWh
coal
gas
1
nuclear
hydro
oil wind
solar
coal
all fossils
billion kWh
gas
nuclear
hydro
Source:
US EIA
US renewable generations
750 billion kWh
nuclear
500
hydro
250
wind solar
12%
10% hydro
8%
6%
4%
wind
2%
solar
0%
4 5 6 7 8 9 0 1 2 3 4
-0 -0 -0 -0 -0 -0 -1 -1 -1 -1 -1
ct ct ct ct ct ct ct ct ct ct ct
Source: US EIA O O O O O O O O O O O
US wind capacity
Wind capacity (2016):
82,183 MW
Hydro capacity (2015):
78,956 MW
US wind generation capacity
exceeded hydro capacity in 2016
US solar capacity
Federal
incentives
extended
to 2023
US solar industry snapshot
US installed solar capacity by mid 2015: ~23 GW
784K homes and businesses
Q2 2015 solar installation: 1.4 GW
Utility: 729 MW
Residential: 473 MW (70% growth yr-on-yr)
H1 2015: a new solar installation / 2 mins Source: SEIA 2015
(Solar Energy Industries Association)
Power the world by solar
Uncertainty
High Levels of Wind and Solar PV Will
Present an Operating Challenge!
Source: Rosa Yang, EPRI
Voltage violations are quite frequent
Source: Leon Roose, University of Hawaii
Development & demo of smart grid inverters for high-penetration PV applications
“Energiewende”
Source: Leon Roose, University of Hawaii
Development & demo of smart grid inverters for high-penetration PV applications
Today’s grid
Few large generators
~10K bulk generators (>90% capacity), actively controlled
Many dump loads
131M customers, 3,100 utilities, ~billion passive loads
Control paradigm: schedule supply to match demand
Centralized, human-in-the-loop, worst case, deterministic
Future grid
Wind and solar farms are not dispatchable
Many small distributed generations
Network of distributed energy resources (DERs)
EVs, smart buildings/appliances/inverters, wind turbines, storage
Control paradigm: match demand to volatile supply
Distributed, real-time feedback, risk limiting, robust
Risk: active DERs introduce rapid random Opportunity: active DERs enables realtime
fluctuations in supply, demand, power quality dynamic network-wide feedback control,
increasing risk of blackouts improving robustness, security, efficiency
Caltech research: distributed control of networked DERs
• Foundational theory, practical algorithms, concrete
applications
• Integrate engineering and economics
• Active collaboration with industry
Recap
Global energy demand will continue to grow
There is more renewable energy than the world
ever needs
Someone will figure out how to capture and store it
There will be connected intelligence everywhere
Cost of computing, storage, communication and
manufacturing will continue to drop
Power system will transform into the largest
and most complex Internet of Things
Generation, transmission, distribution, consumption,
storage
Recap
To develop technologies that will enable and guide
the historic transformation of our power system
Materials, devices, systems, theory, algorithms
Control, optimization, stochastics, data, economics
Motivation: Optimal power flow
gen cost, power loss
power flow equation
line flow
injection limits
line limits
voltage limits
• describes network topology and impedances
• is net power injection (generation) at node j
The flow of power I
Basic concepts and models
Why smart grid? (15 mins)
Three-phase AC transmission: 3 key ideas (30 mins)
Phasor representation
Balanced operation
Per-phase analysis
Device models (30 mins)
Transmission line
Transformer
Generator
Visualizing the grid
Transmission lines: 190K miles
Distribution lines: 73K miles
(2002) [Sascha von Meier]
Today’s grid
Few large generators
~10K bulk generators (>90% capacity), actively controlled
Many dump loads
131M customers, 3,100 utilities, ~billion passive loads
Control paradigm: schedule supply to match demand
Centralized, human-in-the-loop, worst case, deterministic
[Sascha von Meier]
[Sascha von Meier] service drop
transmission
line
transmission
substation [Sascha von Meier]
distribution
substation
[Sascha von Meier]
transformer &
[Sascha von Meier] distribution line
[Sascha von Meier] service drop
Mathematical model
Quantities of interest
Voltage, current, power, energy
All are sinusoidal functions of time
Voltage
nominal frequency
US: 60 Hz
EU: 50 Hz
Steady state: frequencies at all points are nominal
Reasonable model at timescale of minute and up
Mathematical model
Quantities of interest
Voltage, current, power, energy
All are sinusoidal functions of time
Voltage
nominal frequency
North/Central Americas: 60 Hz
Most other major countries: 50 Hz
Steady state: frequencies at all points are nominal
Reasonable model at timescales of minute and up
Dynamic models at sec-min timescale: S Meyn’s tutorial
this part of tutorial is all about steady state
Phasor representation
Quantities of interest
Voltage, current, power, energy
All are sinusoidal functions of time
Voltage
amplitude phase
voltage
phasor
Phasor representation
Quantities of interest
Voltage, current, power, energy
All are sinusoidal functions of time
Voltage
voltage
phasor
Phasor representation
Quantities of interest
Voltage, current, power, energy
All are sinusoidal functions of time
Voltage
voltage
phasor
Phasor representation
Voltage
Current
Linear circuit elements
Resistor R
Inductor L
Capacitor C
these are main circuit elements to model the grid
Linear circuit elements
Resistor R
Inductor L
Capacitor C
−1
𝑉 =( 𝑗 𝜔 𝐶 ) ∙𝐼
Linear circuit elements
time
domain
phasor
domain
Complex power
Quantities of interest
Voltage, current, power, energy
All are sinusoidal functions of time
Instantaneous power
average power
Complex power
Quantities of interest
Voltage, current, power, energy
All are sinusoidal functions of time
Instantaneous power
average power
Complex power real (active) power
reactive power
Phasor analysis
Steady state behavior described by algebraic
equations
Instead of dynamic equations
Circuit analysis
Voltages and currents are linear
Power flow analysis
Power flow equations are nonlinear
We will describe device and network models, and analyze
them, in phasor domain
3-phase AC : 3 key ideas
Phasor representation
Balanced operation
Per-phase analysis
3-phase AC system
3 single-phase system: single 3-phase system:
3-phase AC system
Y-configuration:
voltage source impedance load
Delta-configuration:
3-phase AC system
Y-configuration:
voltage source impedance load
Balanced 3p source
Equal in magnitude, 120 deg difference in phase
Balanced 3p impedance load
Identical impedances
3-phase AC system
Balanced 3p source
Equal in magnitude, 120 deg difference in phase
Balanced 3p impedance load
Identical impedances
voltage source impedance load
Delta-configuration:
Balanced 3-phase system
transmission line
voltage impedance
source load
Balanced 3p operation
Balanced 3p sources
Balanced 3p loads
Balanced (identical) transmission lines
Advantages
1-phase
3-phase
Advantages
1-phase
3-phase
Advantages
1-phase
3-phase
Advantages of balanced 3p operation
Instantaneous power is constant in t !
Uses ~1/2 as much materials (wires) as three 1p system
Incurs ~1/2 as much active power loss as three 1p system
3-phase AC : 3 key ideas
Phasor representation
Balanced operation
Per-phase analysis
Per-phase analysis: Wye
Important properties of balanced 3p system
Per-phase analysis: Wye
Important properties of balanced 3p system
All voltages and currents are 3-phase balanced
Phases are decoupled, i.e., variables in each phase
depend only on quantities in that phase
Per-phase analysis: Wye
Properties:
All voltages and currents
are 3-phased balanced
Phases are decoupled
per-phase equivalent circuit
...
...
Delta-Wye transformation
Equivalent 3p sources: same external behavior
line-to-line voltages:
Delta-Wye transformation
Equivalent 3p sources: same external behavior
line-to-line voltages:
Delta-Wye transformation
Equivalent 3p sources: same external behavior
same terminal currents on same line-to-line voltages
Per-phase analysis
transmission line
voltage impedance
source load
Convert all Delta sources and loads into Wye
Solve phase a circuit with all neutrals connected for desired variables
Phase b / c variables: subtract / add 120deg to phase a variables
If variables internal to Delta configurations are desired, solve them
from original circuit
Per-phase analysis
transmission line
voltage impedance
source load
phase-a
circuit
Per-phase analysis
transmission line
voltage impedance
source load
phase-a
circuit
Recap: basic concepts
3-phase AC transmission system
Phasor representation
Balanced operation
Per-phase analysis
We will describe device and network models, and analyze
them, in phasor domain, using per-phase analysis
The flow of power I
Basic concepts and models
Why smart grid? (15 mins)
Three-phase AC transmission: 3 key ideas (30 mins)
Phasor representation
Balanced operation
Per-phase analysis
Device models (30 mins)
Transmission line
Transformer
Generator
Transmission line model
model of transmission line
series impedance
shunt
admittance
Terminal behavior
What do line parameters depend on ?
What about a 3-phase line ?
What are some implications ?
Transmission line model
Line inductance l
total flux linkages
Multiple conductors
self inductance mutual inductance
Transmission line model
Conditions
Symmetric 3-phase line
Multiple conductors
“self-inductance”
The phases are decoupled !
Transmission line model
Line capacitance c
total charge / m
Multiple conductors
self inductance mutual inductance
Transmission line model
Conditions
Symmetric 3-phase line
Multiple conductors
“self-capacitance”
The phases are decoupled !
Transmission line model
Line parameters (balanced 3p line)
Phases are decoupled
Line inductance and capacitance
Line resistance r / conductance g depend on
wire material & size
Transmission line model
per-phase model of phase voltage:
Transmission line model
per-phase model of phase voltage:
Transmission line model
model of transmission line
series impedance
shunt
admittance
Transmission line model
Long line (l>150mi):
Long line (50<l<150mi):
Long line (l<50mi):
Transmission line model
High voltage min transmission line loss
Specified: required load power and voltage
Transmission line model
Recap
Line characteristics depend on materials, size, and
geometry of 3-phase line
Linear per-phase circuit model
circuit model: series impedance + shunt admittance
The flow of power I
Basic concepts and models
Why smart grid? (15 mins)
Three-phase AC transmission: 3 key ideas (30 mins)
Phasor representation
Balanced operation
Per-phase analysis
Device models (30 mins)
Transmission line
Transformer
Generator
Transformer model
Single-phase ideal transformer n
Transformer model
Single-phase (non-ideal) transformer
can be easily measured
Transformer model
Single-phase (non-ideal) transformer
Transformer model
3-phase ideal transformer
Transformer model
3-phase ideal transformer
per-phase properties
Transformer model
3-phase ideal transformer
per-phase properties
Transformer model
3-phase ideal transformer
per-phase properties
Transformer model
3-phase ideal transformer
per-phase properties
Transformer model
Per-phase equivalent circuit
Transformer model
Recap
Four configurations: YY, DD, DY, YD
Linear per-phase circuit model
Generator model
Putting everything together
3p generator
(terminal 3p transformer 3p transmission 3p transformer
voltage) (stepup) line (stepdown)
Putting everything together
single-phase equivalent circuit
The flow of power II
Power flow and optimization
Network models (10mins)
Admittance matrix
Power flow models
Optimal power flow problems (35mins)
Formulation and example
Convex relaxations
Real-time OPF
Example circuit model
Network model
Each line modeled as model
• Series impedance
• Shunt admittance at each end
• They may not be equal
Network admittance matrix
Y : network graph + admittances
Network admittance matrix
The flow of power II
Power flow and optimization
Network models (10mins)
Admittance matrix
Power flow models
Optimal power flow problems (35mins)
Formulation and example
Convex relaxations
Real-time OPF
Bus injection model
i j k
admittance matrix:
graph G: undirected
Y specifies topology of G and
impedances z on lines
Bus injection model
Kirchhoff law
power balance
admittance matrix:
Bus injection model
Kirchhoff law
power balance
Eliminate I :
Bus injection model
Complex form:
Polar form:
Cartesian form:
Bus injection model
DC power flow
Assumptions:
• Lossless short line
• Small angle difference
• Fixed voltage magnitude
• Ignore reactive power
The flow of power II
Power flow and optimization
Network models (10mins)
Admittance matrix
Power flow models
Optimal power flow problems (35mins)
Formulation and example
Convex relaxations
Real-time OPF
Optimal power flow (OPF)
OPF is solved routinely for
network control & optimization decisions
market operations & pricing
at timescales of mins, hours, days, …
Non-convex and hard to solve
Huge literature since 1962
Common practice: DC power flow (LP)
Also: Newton-Raphson, interior point, …
Optimal power flow
gen cost, power loss
power flow equation
line flow
injection limits
line limits
voltage limits
• describes network topology and impedances
• is net power injection (generation) at node j
Optimal power flow
gen cost, power loss
power flow equation
line flow
injection limits
line limits
voltage limits
nonconvex feasible set (nonconvex QCQP)
• not Hermitian (nor positive semidefinite)
• is positive semidefinite (and Hermitian)
Optimal power flow
OPF problem underlies numerous applications
• nonlinearity of power flow equations nonconvexity
Ian Hiskens, Michigan
Dealing with nonconvexity
Linearization
DC approximation
Convex relaxations
Semidefinite relaxation (Lasserre hierarchy)
QC relaxation (van Hentenryck)
Strong SOCP (Sun)
Dealing with nonconvexity
Linearization
DC approximation
Convex relaxations
Semidefinite relaxation (Lasserre hierarchy)
QC relaxation (van Hentenryck)
Strong SOCP (Sun)
Realtime OPF
Online algorithm, as opposed to offline
Also tracks time-varying OPF
Relaxations of AC OPF
dealing with nonconvexity
Bose (UIUC) Chandy Farivar (Google) Gan (FB) Lavaei (UCB) Li (Harvard)
many others at & outside Caltech …
Low, Convex relaxation of OPF, 2014
http://netlab.caltech.edu
Equivalent feasible sets
quadratic in V
linear in W
Equivalent problem:
convex in W
except this constraint
Solution strategy
If optimal solution satisfies easily checkable conditions,
then optimal solution of OPF can be recovered
Equivalent relaxations
Theorem
Radial G: SOCP is equivalent to SDP ( )
Mesh G: SOCP is strictly coarser than SDP
For radial networks: always solve SOCP !
Exact relaxation
For radial networks, sufficient conditions on
power injections bounds, or
voltage upper bounds, or
phase angle bounds
Exact relaxation
For radial networks, sufficient conditions on
power injections bounds, or
voltage upper bounds, or
phase angle bounds
Exact relaxation
QCQP
graph of QCQP
QCQP over tree
Exact relaxation
QCQP
Key condition
Theorem
SOCP relaxation is exact for
QCQP over tree Bose et al 2012, 2014
Sojoudi, Lavaei 2013
Implication on OPF
Not both lower & upper bounds on real & reactive powers at both ends
of a line can be finite
Example
Real Power Reactive Power
SOCP Y
SDP Y
power flow • Relaxation is exact if X and Y have same
solution X Pareto front
• SOCP is faster but coarser than SDP
Bose, Low, Teeraratkul, Hassibi TAC 2015
Potential benefits
IEEE test SDP MATPOWER
systems cost cost
12.4% lower cost than solution from
[Louca, Seiler, Bitar 2013] nonlinear solver MATPOWER
Potential benefits
Case study on an SCE feeder
Southern California
1,400 residential houses, ~200 commercial buildings
Controllable loads: EV, pool pumps, HVAC, PV inverters
Formulated as an OPF problem, multiphase unbalanced radial
network
baseline optimized
peak load reduction: 8%
energy cost reduction: 4%
Realtime AC OPF
for tracking
Gan (FB) Tang (Caltech) Dvijotham (DeepMind)
See also: Dall’Anese et al, Bernstein et al, Gan & L, JSAC 2016
Hug & Dorfler et al, Callaway et al Tang et al, TSG 2017
Motivations
Simplify OPF simulation/solution
Solving static OPF with simulator in the loop
Avoid modifying GridLab-D during ARPA-E GENI (2012-15)
Deal with nonconvexity
Network computes power flow solutions in real time at
scale for free
Exploit it for our optimization/control
Track optimal solution of time-varying OPF
Uncertainty will continue to increase
Real-time measurements increasingly become available on
seconds timescale
Must, and can, close the loop in the future
Dealing with nonconvexity
Linearization
DC approximation
Convex relaxations
Semidefinite relaxation (Lasserre hierarchy)
QC relaxation (van Hentenryck)
Strong SOCP (Sun)
Realtime OPF
Online algorithm, as opposed to offline
Also tracks time-varying OPF
Literature
Static OPF:
Gan and Low, JSAC 2016
Dall’Anese, Dhople and Giannakis, TPS 2016
Arnold et al, TPS 2016
A. Hauswirth, et al, Allerton 2016
Time-varying OPF:
Dall’Anese and Simonetto, TSG 2016
Wang et al, TPS 2016
Tang, Dvijotham and Low, TSG 2017
Tang and Low, CDC 2017
Earlier relevant work on voltage control
Survey: Molzahn et al, TSG 2017
OPF
power flow equations
operational constraints
controllable uncontrollable capacity limits
devices state
OPF
power flow equations
operational constraints
capacity limits
OPF
power flow equations
operational constraints
capacity limits
OPF: eliminate y
Theorem [Huang, Wu, Wang, & Zhao. TPS 2016]
For DistFlow model, controllable (feasible) region
is convex (despite nonlinearity of y(x))
OPF: add barrier or penalty
add barrier or penalty function
to remove operational constraints
f: nonconvex
Online (feedback) perspective
cyber
network
measurement,
control communication
x(t) y(t)
physical
network
• Explicitly exploits network as power flow solver
• Naturally tracks changing network conditions
Outline: realtime OPF
Motivation
Problem formulation
Static OPF [Gan & Low, JSAC 2016]
1st order algorithm
Optimality properties
Time-varying OPF [Tang, Dj, & Low, TSG 2017]
2nd order algorithm
Tracking performance
Distributed implementation [Tang & Low, CDC 2017]
Static OPF
gradient projection algorithm:
active control
law of physics
[Gan & Low, JSAC 2016]
Local optimality
Under appropriate assumptions
x(t) converges to set of local optima
if #local optima is finite, x(t) converges
Global optimality
Theorem
If co{local optima} are in A then
x(t) converges to the set of global optima
x(t) itself converges a global optimum if
#local optima is finite
Global optimality
Theorem
If SOCP is exact over X, then assumption holds
Incidentally, this turns out to be the convergence condition in Arnold,et al, “Model-Free Optimal Control of
VAR Resources in Distribution Systems: An Extremum Seeking Approach,”
Suboptimality gap
any original
any local feasible pt
optimum slightly away
from X boundary
Informally, a local minimum is almost as good
as any strictly interior feasible point
Simulations
Outline: realtime OPF
Motivation
Problem formulation
Static OPF [Gan & Low, JSAC 2016]
Dynamic OPF [Tang, Dj, & Low, TSG 2017]
2nd order algorithm
Tracking performance
Distributed implementation [Tang & Low, CDC 2017]
See also: Dall’Anese and Simonetto, TSG 2016
Wang et al, TPS 2016
Tracking performance
IEEE 300 bus
realtime OPF algorithms can track time-varying OPF well
Tracking performance
IEEE 300 bus
realtime OPF algorithms can track time-varying OPF well
Drifting OPF
static
OPF
drifting
OPF
Drifting OPF
Quasi-Newton algorithm:
active control
law of physics
[Tang, Dj & Low, 2017]
Drifting OPF
Computing by solving convex QP:
e.g. approx Hessian
[Tang, Dj & Low, 2017]
Tracking performance
control error
Theorem
avg rate of drifting
Tracking performance
Theorem
avg rate of drifting
• of optimal solution
• of feasible set
[Tang, Dj, & Low, TSG 2017]
Tracking performance
Theorem
error in Hessian approx
[Tang, Dj, & Low, TSG 2017]
Tracking performance
Theorem
“condition number”
of Hessian
[Tang, Dj, & Low, TSG 2017]
Implementation
Implement L-BFGS-B
More scalable
Handles (box) constraints X
Simulations
IEEE 300 bus
Tracking performance
IEEE 300 bus
Tracking performance
IEEE 300 bus
Key message
Large network of DERs
Real-time optimization at scale
Computational challenge: power flow solution
Online optimization [feedback control]
Network computes power flow solutions in real time
at scale for free
Exploit it for our optimization/control
Naturally adapts to evolving network conditions
Examples
Slow timescale: OPF
Fast timescale: frequency control