0% found this document useful (0 votes)
179 views53 pages

Lecture 23: Optimal Power Flow: Prof. Tom Overbye Dept. of Electrical and Computer Engineering Texas A&M University

This document provides a summary of a lecture on optimal power flow (OPF) methods for electric power system analysis. It discusses linear programming (LP) optimal power flow, including how it iterates between solving the power flow and an LP. Examples are provided using PowerWorld software to illustrate LP OPF for an introductory power flow case and how it identifies binding constraints. The document also briefly discusses locational marginal prices, generator cost modeling, and security constrained OPF.

Uploaded by

Manuel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
179 views53 pages

Lecture 23: Optimal Power Flow: Prof. Tom Overbye Dept. of Electrical and Computer Engineering Texas A&M University

This document provides a summary of a lecture on optimal power flow (OPF) methods for electric power system analysis. It discusses linear programming (LP) optimal power flow, including how it iterates between solving the power flow and an LP. Examples are provided using PowerWorld software to illustrate LP OPF for an introductory power flow case and how it identifies binding constraints. The document also briefly discusses locational marginal prices, generator cost modeling, and security constrained OPF.

Uploaded by

Manuel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 53

ECEN 615

Methods of Electric Power


Systems Analysis
Lecture 23: Optimal Power Flow

Prof. Tom Overbye


Dept. of Electrical and Computer Engineering
Texas A&M University
[email protected]
Announcements
• Read Chapters 3 and 8 from the book
• Homework 5 is due today
• Second exam is in class on November 21
– Same format as with the first exam

2
LP Optimal Power Flow
• LP OPF was introduced in
– B. Stott, E. Hobson, “Power System Security Control
Calculations using Linear Programming,” (Parts 1 and 2)
IEEE Trans. Power App and Syst., Sept/Oct 1978
– O. Alsac, J. Bright, M. Prais, B. Stott, “Further Developments
in LP-based Optimal Power Flow,” IEEE Trans. Power
Systems, August 1990
• It is a widely used technique, particularly for real power
optimization; it is the technique used in PowerWorld

3
LP Optimal Power Flow
• Idea is to iterate between solving the power flow, and
solving an LP with just a selected number of
constraints enforced
• The power flow (which could be ac or dc) enforces
the standard power flow constraints
• The LP equality constraints include enforcing area
interchange, while the inequality constraints include
enforcing line limits; controls include changes in
generator outputs
• LP results are transferred to the power flow, which is
then resolved
4
LP OPF Introductory Example
• In PowerWorld load the B3LP case and then
display the LP OPF Dialog (select Add-Ons, OPF
Options and Results)
• Use Solve LP OPF to Bus 2
60 MW 60 MW
Bus 1

solve the OPF, initially


10.00 $/MWh

slack

0.0 MW 10.00 $/MWh

with no line limits


120 MW 180.0 MW
120%
0 MW
60 MW

enforced; this is similar Total Cost


1800 $/h
120%
60 MW

Bus 3
120 MW

10.00 $/MWh

to economic dispatch
180 MW

0 MW

with a single power


balance equality constraint
• The LP results are available from various pages on
the dialog 5
LP OPF Introductory Example, cont

6
LP OPF Introductory Example, cont
• On use Options, Constraint Options to enable the
enforcement of the Line/Transformer MVA limits

7
LP OPF Introductory Example, cont.

20 MW 20 MW
Bus 2 Bus 1

10.00 $/MWh

slack

60.0 MW 12.00 $/MWh


100 MW 120.0 MW
100%
0 MW
80 MW

Total Cost 100% 100 MW


80 MW
1920 $/h
Bus 3 14.00 $/MWh

180 MW

0 MW

8
Example 6_23 Optimal Power Flow
On the Options,
Environment
page the simulation can be
set to solve an OPF when
simulating

This is Example6_23_OPF. In this example


the load is gradually increased
9
Locational Marginal Costs (LMPs)
• In an OPF solution, the bus LMPs tell the marginal
cost of supplying electricity to that bus
• The term “congestion” is used to indicate when there
are elements (such as transmission lines or
transformers) that are at their limits; that is, the
constraint is binding
• Without losses and without congestion, all the LMPs
would be the same
• Congestion or losses causes unequal LMPs
• LMPs are often shown using color contours; a
challenge is to select the right color range!
10
Example 6_23 Optimal Power Flow
with Load Scale = 1.72

11
Example 6_23 Optimal Power Flow
with Load Scale = 1.72
• LP Sensitivity Matrix (A Matrix)

The first row is the power balance constraint, while


the second row is the line flow constraint. The matrix
only has the line flows that are being enforced.

12
Example 6_23 Optimal Power Flow
with Load Scale = 1.82
• This situation is infeasible, at least with available
controls. There is a solution because the OPF is
allowing one of the constraints to violate (at high
cost)

80 MW 80 MW 124 MW 124 MW 143 MW


A A

57% 57% 54 Mvar


1.05 pu MVA 0.99 pu MVA
1.00 pu
3 4
1 16.82 $/MWh 20.74 $/MWh 22.07 $/MWh

133 MW 213 MW 64 MW 268 MW 42 MW


slack AGC ON 71 Mvar
A A

89% 58% A 280 MW


100% AGC ON
A
MVA
M VA
48%
MVA MVA
64 MW
176 MW 56 MW
133 MW A
42 MW 100%
1.04 pu MVA 176 MW 0.95 pu
15.91 $/MWh 5 1101.78 $/MWh
2
71 MW 220 MW 231.9 MW
36 Mvar AGC ON 71.3 Mvar

Total Hourly Cost: 11297.88 $/h Load Scalar: 1.82


Total Area Load: 713.4 MW
Marginal Cost ($/MWh): 235.47 $/MWh

13
Generator Cost Curve Modeling
• LP algorithms require linear cost curves, with
piecewise linear curves used to approximate a
nonlinear cost function
• Two common ways
of entering cost
information are
– Quadratic function
– Piecewise linear curve
• The PowerWorld OPF
supports both types

14
Security Constrained OPF
• Security constrained optimal power flow (SCOPF)
is similar to OPF except it also includes
contingency constraints
– Again the goal is to minimize some objective function,
usually the current system cost, subject to a variety of
equality and inequality constraints
– This adds significantly more computation, but is required
to simulate how the system is actually operated (with N-1
reliability)
• A common solution is to alternate between solving
a power flow and contingency analysis, and an LP

15
Security Constrained OPF, cont.
• With the inclusion of contingencies, there needs to
be a distinction between what control actions must
be done pre-contingent, and which ones can be
done post-contingent
– The advantage of post-contingent control actions is they
would only need to be done in the unlikely event the
contingency actually occurs
• Pre-contingent control actions are usually done for
line overloads, while post-contingent control
actions are done for most reactive power control
and generator outage re-dispatch

16
SCOPF Example
• We’ll again consider Example 6_23, except now it has
been enhanced to include contingencies and we’ve also
greatly increased the capacity on the line between buses
4 and 5
82 MW 82 MW 26 MW 26 MW 78 MW 82 MW 82 MW 26 MW 26 MW 78 MW
A A A A

57% 12% 29 Mvar 57% 12% 29 Mvar


1.05 pu MVA 1.00 pu MVA
1.00 pu 1.05 pu MVA 1.00 pu MVA
1.00 pu
3 4 3 4
1 14.33 $/MWh 14.87 $/MWh 15.05 $/MWh 1 14.33 $/MWh 14.87 $/MWh 15.05 $/MWh

53 MW 135 MW 91 MW 147 MW 96 MW 53 MW 135 MW 91 MW 147 MW 96 MW


slack AGC ON 39 Mvar slack AGC ON 39 Mvar
A A A A

36% 80% A
A 84 MW 36% 80% A
A 84 MW
MVA MVA
100% 268% AGC ON MVA MVA
100% 80%
AGC ON
MVA MVA
MVA MVA
91 MW 91 MW
0 MW 127 MW 0 MW 127 MW
53 MW 53 MW
96 MW 96 MW
1.04 pu 0 MW 0.82 pu 1.04 pu 0 MW 0.82 pu
14.20 $/MWh 5 1540.19 $/MWh 14.20 $/MWh 5 15.05 $/MWh
2 2
39 MW 173 MW 127.4 MW 39 MW 173 MW 127.4 MW
20 Mvar AGC ON 39.2 Mvar 20 Mvar AGC ON 39.2 Mvar

Total Hourly Cost: 5729.74 $/h Load Scalar: 1.00 Total Hourly Cost: 5729.74 $/h Load Scalar: 1.00
Total Area Load: 392.0 MW Total Area Load: 392.0 MW
Marginal Cost ($/MWh): 319.73 $/MWh Marginal Cost ($/MWh): 14.70 $/MWh

Original with line 4-5 limit Modified with line 4-5 limit
of 60 MW with 2-5 out of 200 MVA with 2-5 out
17
PowerWorld SCOPF Application
Just click the button to solve

Number of times
to redo contingency
analysis

18
LP OPF and SCOPF Issues
• The LP approach is widely used for the OPF and
SCOPF, particularly when implementing a dc power
flow approach
• A key issue is determining the number of binding
constraints to enforce in the LP tableau
– Enforcing too many is time-consuming, enforcing too few
results in excessive iterations
• The LP approach is limited by the degree of linearity
in the power system
– Real power constraints are fairly linear, reactive power
constraints much less so

19
OPF Solution by Newton’s Method
• An alternative to using the LP approach is to use
Newton’s method, in which all the equations are
solved simultaneously
• Key paper in area is
– D.I. Sun, B. Ashley, B. Brewer, B.A. Hughes, and W.F.
Tinney, "Optimal Power Flow by Newton Approach", IEEE
Trans. Power App and Syst., October 1984
• Problem is For simplicity x represents
all the variables and we can
Minimize f ( x)
use h to impose limits on
s.t. g(x)= 0 individual variables
h(x) 0
20
OPF Solution by Newton’s Method
• During the solution the inequality constraints are
either binding (=0) or nonbinding (<0)
– The nonbinding constraints do not impact the final
solution
• We’ll modify the problem to split the h vector into
the binding constraints, h1 and the nonbinding
constraints, h2
Minimize f ( x)
s.t. g(x)= 0
h1 (x) 0
h 2 (x) 0
21
OPF Solution by Newton’s Method
• To solve first define the Lagrangian
L(x, λ1 , λ 2 )  f (x)  μT g(x)+λ T h1 (x)
Let z =  x μ λ 
• A necessary condition for a minimum is that the
gradient is zero Both  and  are
 L(z )  Lagrange Multipliers
 z 
 1 
 L(z ) 
L ( z )  0  
z2 
 
  
 
  22
OPF Solution by Newton’s Method
• Solve using Newton’s method. To do this we need
to define the Hessian matrix
  2 L(z )  2 L( z )  2 L( z ) 
 
 xi x j xi  j xi  j 
  2
L ( z )    2 L(z ) 
 2 L( z )  H ( z )    0 0 
 zi z   i x j 
 2 
  L(z ) 0 0 
 x
 ji 
• Because this is a second order method, as opposed
to a first order linearization, it can better handle
system nonlinearities
23
OPF Solution by Newton’s Method
• Solution is then via the standard Newton’s method.
That is
Set iteration counter k=0, set k max
Set convergence tolerance 
(k) No iteration is
Guess z needed for a
While  L(z )    and  k < k max  quadratic function
with linear
 z   H ( z )  L ( z )
(k 1) (k) 1
z constraints
k=k+1
End While
24
Example
• Solve
Minimize x12  x 22 such that x 1  x2  2  0
Solve initially assuming the constraint is binding
L  x,    x12  x 22    3x1  x2  2 
 L  No iteration is
 x 
 1   2x1  3  needed so any
 L  
L  x,        2x 2    “guess” is fine.
x
 2  3x1  x2  2 Pick (1,1,0)
 L 
  
 
1
 2 0 3  x1  1   2 0 1   2  0.6
 2 L  x,    H  x,    0 2 1    x2   1    0 2 1   2   0.2
 3 1 0      0   1 1 0   2  0.4

Because l is positive the constraint is binding 25


Newton OPF Comments
• The Newton OPF has the advantage of being better
able to handle system nonlinearities
• There is still the issue of having to deal with
determining which constraints are binding
• The Newton OPF needs to implement second order
derivatives plus all the complexities of the power
flow solution
– The power flow starts off simple, but can rapidly get
complex when dealing with actual systems
• There is still the issue of handling integer variables

26
Mixed-Integer Programming
• A mixed-integer program (MIP) is an optimization
problem of the form
Minimize c x
s.t. Ax  b
x0
where x  n-dimensional column vector
c  n-dimensional row vector
b  m-dimensional column vector
A  m×n matrix
some or all x j integer

27
Mixed-Integer Programming
• The advances in the algorithms have been substantial

Speedups
from 2009
to 2015 were
about a factor
of 30!

Notes are partially based on a presentation at Feb 2015 US National Academies Analytic
Foundations of the Next Generation Grid by Robert Bixby from Gurobi Optimization titled
“Advances in Mixed-Integer Programming and the Impact on Managing Electrical Power Grids” 28
Mixed-Integer Programming
• Suppose you were given the following choices?
– Solve a MIP with today’s solution technology on a 1991
machine
– Solve a MIP with a 1991 solution on a machine from today?
• The answer is to choose option 1, by a factor of
approximately 300
• This leads to the current debate of whether the OPF
(and SCOPF) should be solved using generic solvers or
more customized code (which could also have quite
good solvers!)
Notes are partially based on a presentation at Feb 2015 US National Academies Analytic
Foundations of the Next Generation Grid by Robert Bixby from Gurobi Optimization titled
“Advances in Mixed-Integer Programming and the Impact on Managing Electrical Power Grids” 29
More General Solvers Overview
• OPF is currently an area of active research
• Many formulations and solution methods exist…
– As do many tools for highly complex, large-scale
computing!

• While many options exist, some may work better for


certain problems or with certain programs you already
use

• Consider experimenting with a new language/solver!

30
Gurobi and CPLEX
• Gurobi and CPLEX are two well-known
commercial optimization solvers/packages for
linear programming (LP), quadratic
programming (QP), quadratically constrained
programming (QCP), and the mixed integer (MI)
counterparts of LP/QP/QCP
• Gurobi and CPLEX are accessible through object-
oriented interfaces (C++, Java, Python, C), matrix-
oriented interfaces (MATLAB) and other modeling
languages (AMPL, GAMS)

31
Solver Comparison

Algorithm Type LP/MILP QP/MIQP SOCP SDP


------------------
linear/mixed integer quadratic/mixed integer second order cone semidefinite
Solver linear program quadratic program program program

CPLEX* x x x
GLPK x
Gurobi* x x x
IPOPT x
Mosek* x x x x
SDPT3/SeDuMi x x

Linear programming can be solved by quadratic programming,


which can be solved by second-order cone programming, which
can be solved by semidefinite programming.
32
DC OPF and SCOPF
• Solving a full ac OPF or SCOPF on a large system is
difficult, so most electricity markets actually use the
more approximate, but much simpler DCOPF, in which
a dc power flow is used
– Interested students can learn more about what is actually done
by reading the below paper (this is completely optional)
• PowerWorld includes this option in the Options,
Power Flow Solution, DC Options

https://www.ferc.gov/legal/staff-reports/2017/marginallosscalculations.pdf 33
Example 6_13 DC SCOPF Results:
Load Scalar at 1.20
• Now there is not an unenforceable constraint on the line
between 4-5 (for the line 2-5 contingency) because the
reactive losses are ignored
63 MW 63 MW 59 MW 59 MW 94 MW
A A

42% 26% 0 Mvar


1.00 pu MVA 1.00 pu MVA
1.00 pu
3 4
1 14.81 $/MWh 16.41 $/MWh 16.89 $/MWh

87 MW 150 MW 55 MW 176 MW 45 MW
slack AGC ON 0 Mvar
A A

58% 46% A
A 136 MW
MVA MVA
45% 14%
MVA
MVA AGC ON
55 MW
124 MW 28 MW
87 MW A
45 MW 62%
1.00 pu MVA
124 MW 1.00 pu
14.63 $/MWh 5 16.89 $/MWh
2
47 MW 184 MW 152.9 MW
0 Mvar AGC ON 0.0 Mvar

Total Hourly Cost: 6942.99 $/h Load Scalar: 1.20


Total Area Load: 470.4 MW
Marginal Cost ($/MWh): 15.92 $/MWh

34
2000 Bus Texas Synthetic DC OPF
Example
• This system does a DC OPF solution, with the
ability to change the load in the areas
The quite
low LMPs
are actually
due to a
constraint
on a single
230/115 kV
transformer

35
Actual ERCOT LMPs on Nov 13,
2019 at 9:55 am

Source: www.ercot.com/content/cdr/contours/rtmLmp.html 36
June 1998 Heat Storm: Two
Constraints Caused a Price Spike

Price of
electricity
in Central
Illinois went
to $7500
per MWh!

Colored areas could NOT sell into Midwest because of


constraints on a line in Northern Wisconsin and on a
Transformer in Ohio
37
Electricity Markets History
• For decades electric utilities operated as vertical
monopolies, with their rates set
by state regulators
• Utilities had an obligation to serve
and customers had no choice
– There was little third party generation
• Major change in US occurred in 1992
with the National Energy Policy Act
that mandated utilities provide
“nondiscriminatory” access to the high voltage grid
• Goal was to setup true competition in generation
38
Markets Versus Centralized Planning
• With the vertically integrated utility, a small number of
entities (typically utilities) did most of the planning
– For example, which new generators and/or lines to build
– Planning was coordinated and governed by regulators
– Regulators needed to know the utilities actual costs so they
could provide them with a fixed rate of return
• With markets the larger number of participants often
make individual decisions in reaction to prices
– For example, whether to build new generation
– Generator owners in general to not need to reveal their true
costs; rather they make offers into the market

39
Overall Goal
• Goal is to maximize the economic surplus (or total
welfare), which is the sum of the consumer surplus
and the producer surplus (i.e., their profit)
• Generation owners have to
decide their offer prices
• If their price is too high, they
are not selected to generate
• At the wholesale level, the
consumers often just see a
price, though there can be price
responsive load bids
Image Source: en.wikipedia.org/wiki/Economic_surplus#/media/File:Economic-surpluses.svg
40
Electricity Markets Today
• Starting in about 1995 electricity markets gradually
started to develop, both in the US and elsewhere
• In North America
more than 60% of the
load is supplied
via wholesale
electricity markets
• Markets differ but
they all have certain
common features

Image: www.isorto.org/about/default
41
Electricity Markets Common
Features
• Day ahead market – this is needed because time is
required to make decisions about committing
generators
– Generation owners submit offers for how much generation
they can supply and at what price; accepted offers are binding
• Real-time energy market – needed because day ahead
forecasts are never perfect, and unexpected events can
occur
• Co-optimization with other “ancillary services” such as
reserves
The source for much of this material “Analytic Research Foundations for the Next-Generation Electric
Grid” (Chapter 2), The National Academies Press, 2016 (free download available)
42
Electricity Markets Common
Features
• Pricing is done using locational marginal prices,
determined by an SCOPF
– Most markets include a marginal losses component
• LMP markets are designed to send transparent price
signal so people can make short and long-term decisions
– Generators are free to offer their electricity at whatever price
they desire; they do not have to reveal their “true” costs
– Most of the times markets work as planned, and prices are
competitive
– During times of shortages (scarcity) there are limits on LMPs;
ERCOT’s is $9000/MWh
– Markets are run by independent system operators (ISOs)
43
LMP Energy Markets
• In an LMP energy market the generation is paid the
LMP at the bus, and the loads pay the LMP at the bus
– This is done in both the day ahead market and in the real-
time market (which makes up the differences between actual
and the day ahead)
• The generator surplus (profit) is the difference
between the LMP and the actual cost of generation
• Generators that offer too high are not selected to run,
and hence make no profit
• A key decision for the generation owners is what
values to offer
44
Generator Offers
• Generator offers are given in piecewise linear curves;
that is, a fixed $/MWh for so much power for a time
period
• In the absence of constraints (congestion) the ISO
would just select the lowest offers to meet the
anticipated load
• Actual dispatch is determined using an SCOPF

45
General Guidelines
• Generators with high fixed costs and low operating
costs (e.g., wind, solar, nuclear) benefit from running
many hours
– Usually they should submit offers close to their marginal costs
– Wind (and some others) receive a production tax credit for
their first ten years of operation
• $23/MWh for systems starting construction before 1/1/2017
• $18.4/MWh for systems starting construction in 2017 (a 20%
reduction)
• In 2018 the reduction is 40% and 60% in 2019; after that it is zero
(unless, of course, changed by Congress)
• Generators with low fixed costs and high operating cost
can do fine operating fewer hours (at higher prices)
46
Auctions
• In its simplest form, an auction is a mechanism of
allocating scarce goods based upon competition
– a seller wishes to obtain as much money as possible, and a
buyer wants to pay as little as necessary.
• An auction is usually considered efficient if resources
accrue to those who value them most highly
• Auctions can be either one-sided with a single
monopolist seller/buyer or a double auction with
multiple parties in each category
– bid to buy, offer to sell
• Most people’s experience is with one-side auctions
with one seller and multiple buyers 47
Auctions, cont.
• Electricity markets can be one-sided, with the ISO
functioning as a monopolist buyer, while multiple
generating companies make offers to sell their
generation, or two-sided with load participation
• Auction provides mechanism for participants to reveal
their true costs while satisfying their desires to buy low
and/or sell high.
• Auctions differ on the price participants receive and the
information they see along the way

48
Types of Single-Sided Auctions
with Multiple Buyers, One Seller
• Simultaneous auctions
– English (ascending price to buy)
– Dutch (descending price to buy)
• Sealed-bid auctions (all participants submit offers
simultaneously)
– First price sealed bid (pay highest price if one,
discriminatory prices if multiple)
– Vickrey (uniform second price) (pay the second highest
price if one, all pay highest losing price if many); this
approach gives people incentive to bid their true value

49
Uniform Price Auctions: Multiple
Sellers, One Buyer
• Uniform price auctions are sealed offer auctions in
which sellers make simultaneous decisions (done
when submitting offers).
• Generators are paid the last accepted offer
• Provides incentive to offer at marginal cost since
higher values cause offers to be rejected
– reigning price should match marginal cost
• Price caps are needed to prevent prices from rising
up to infinity during shortages
• Some generators offering above their marginal
costs are needed to cover their fixed costs
50
What to Offer Example
• Below example shows 3 generator case, in which the
bus 2 generator can vary its offer to maximize profit
Gen 2 Cost = $12/MWh
Offer Multiplier: 1.00 20 MW 20 MW
Bus 1
Gen 2 Profit: 0.0 $/h
10.00 $/MWh

slack

60.0 MW 12.00 $/MWh


100 MW 120.0 MW
100% Gen 1 Offer = Cost = $10/MWh
0 MW Bus 2 Gen 1 Profit: 0.1 $/h
80 MW

Total Cost 100% 100 MW


80 MW
1920 $/h
Bus 3 14.00 $/MWh
180 MW

0 MW
Gen 3 Offer = Cost = $20/MWh
Gen 3 Profit: 0.0 $/h

Note, this example makes the unrealistic assumption that


the other generators do not vary their offers in response
51
Horizontal Market Power
• One issue is whether a particular group of generators has
market power
• Market power is the antithesis of competition
• It is the ability of a particular group of sellers to maintain prices above
competitive levels, usually by withholding supply
• The extreme case is a single supplier of a product (i.e., a
monopoly)
• In the short run what a monopolistic producer can charge depends
upon the price elasticity of the demand
• Sometimes market power can result in decreased prices in the
long-term by quickening the entry of new players or new
innovation

52
Market Power and Scarcity Rents
• A generator owner exercises market power when it is
unwilling to make energy available at a price that is
equal to that unit’s variable cost of production, even
thought there is currently unloaded generation capacity
(i.e., there is no scarcity).
• Scarcity rents occur when the level of electric demand
is such that there is little, if any, unused capacity
• Scarcity rents are used to recover fixed costs

53

You might also like