ECE666: Power Systems Operation
Module-2: Optimal Power Flow
Prof. Kankar Bhattacharya
Department of Electrical & Computer Engineering
University of Waterloo, Waterloo, N2L 3G1, Canada
kankar@[Link]
1 Module-2 ECE666: Winter 2024
Coverage
• Review of power flow analysis
• Power flow equations and NR approach to solution
• Fast-decoupled load flow (FDLF) and DC power flow
• Optimal Power Flow (OPF)
• Background, characteristic features, mathematical model
• OPF Applications
• SCOPF and DCOPF
2 Module-2 ECE666: Winter 2024
Part-1: Power Flow Analysis
3 Module-2 ECE666: Winter 2024
Power Flow Analysis Problem
• Involves calculation of power flows and voltages of the
network for specified conditions at the bus
• Subject to regulating capability of generators, capacitors, etc.
• This information is essential for continuous evaluation of the
system performance
• A single phase representation is usually adequate since
power systems are usually balanced
• Provides a steady-state analysis of the “state” of the
system (“a snap-shot”) at any given instant, and for a
certain system condition
• Typically executed to:
• determine operational state of the system, take preventive
actions (at the dispatch stage, 5 minute ahead)
• examine feasibility of new transmission lines (planning stage)
4 Module-2 ECE666: Winter 2024
Power Flow Analysis… contd.
• It is customary to use per unit representation
• Base power (SBase) is normally chosen to be the rating of one
of the major equipment
• SBase remains the same for the whole system
• Voltage base (VBase) is dependent on location (section) of the
system and changes over different sections
• Bus Specifications:
Type Pi Qi Vi δi COMMENTS
Load Bus or PQ Bus √ √ Usual load representation (constant P,
Q)
Voltage Controlled Bus √ √ V is held constant for any Qi
Generator Bus or PV √ √ For synchronous condensers Pi = 0
Bus
Reference or Slack Bus √ √ This bus adjusts net power to hold the
voltage constant and meet the losses
5 Module-2 ECE666: Winter 2024
Bus Specifications
• Associated with each bus are four quantities:
• Real power injected, Pi
• Reactive power injected, Qi
• Voltage magnitude, |Vi|
• Phase angle, δi
Power System
PGi+jQGi |Vi|∠δi
Pi = PGi – PDi
Qi = QGi - QDi
PDi+jQDi
Typical bus-bar representation for power flow analysis
6 Module-2 ECE666: Winter 2024
Bus Specifications… contd.
• Slack bus- provides real and reactive power required to
meet the losses
• Voltage magnitude |V| and angle δ are specified at this bus
• Also called Reference Bus because δ=0°is specified. Other
bus angles are calculated with reference to this bus
• Voltage controlled buses (or PV Bus)
• Voltage magnitude |V| and real power P are specified
• Load buses (or PQ Buses)
• Real and reactive power (P and Q) are specified at these buses
7 Module-2 ECE666: Winter 2024
General Form of System Admittance Matrix [Y]
• The general form representation of an element of the Y
matrix is given as follows:
𝑌𝑌𝑖𝑖,𝑗𝑗 (𝑖𝑖≠𝑗𝑗) = −𝑦𝑦�𝑖𝑖,𝑗𝑗
𝑁𝑁 𝑁𝑁
1
𝑌𝑌𝑖𝑖,𝑖𝑖 = � 𝑦𝑦�𝑖𝑖,𝑗𝑗 + � 𝑦𝑦�𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑖𝑖,𝑗𝑗
2
𝑗𝑗=1 𝑗𝑗=1
• The line admittance is denoted by 𝑦𝑦
�𝑖𝑖,𝑗𝑗 and 𝑦𝑦�𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑖𝑖,𝑗𝑗 is the
charging susceptance of a line.
Page-8 Module-2 ECE666: Winter 2024
Power Flow Equations: In Polar Coordinates
• Real and reactive power injected at bus i is,
*
Si = Pi + jQi = V i ⋅ I i
• Superscript * denotes complex conjugate
• Taking conjugate on both sides of the above:
(**
)
⇒ Pi − jQi = Vi ⋅ Ii = Vi* ⋅ Ii
• Current injected at a bus is written, from above, as,
Pi − jQi
⇒ Ii =
*
Vi
9 Module-2 ECE666: Winter 2024
Power Flow Equations… contd.
• Also from network flows, we have
I 1 = Y 11V 1 + Y 12V 2 + ... + Y 1n V n
I 2 = Y 21V 1 + Y 22V 2 + ... + Y 2n V n
...
I n = Y n1V 1 + Y n 2 V 2 + ... + Y nn V n
• The above equations can be generalized as,
N
I i = ∑ Y ij V j ∀ 𝑖𝑖 ∈ 𝑁𝑁
j =1
10 Module-2 ECE666: Winter 2024
Power Flow Equations… contd.
• The complex power at a bus is,
* * N
Pi − jQi = V i I i = V i ∑ Y ij V j ∀ 𝑖𝑖 ∈ 𝑁𝑁
j =1
• Using polar form representation of complex
quantities, in the complex power relation above:
jδ i jθij
V i = Vi e ; Y ij = Yij e
• We obtain,
Pi − jQi = Vi e − jδ i N
∑ Yij e
jθ ij
Vj e
jδ j N
= ∑ ViV jYij e
(
j θ ij +δ j −δ i )
j =1 j =1
∀ 𝑖𝑖 ∈ 𝑁𝑁
11 Module-2 ECE666: Winter 2024
Power Flow Equations… contd.
• Separating the complex power equation in real and
imaginary parts
( )
N
Pi = ∑ ViV j Yij cos θ ij + δ j − δ i ∀ 𝑖𝑖 ∈ 𝑁𝑁
j =1
( )
N
Qi = − ∑ ViV jYij sin θ ij + δ j − δ i ∀ 𝑖𝑖 ∈ 𝑁𝑁
j =1
12 Module-2 ECE666: Winter 2024
Power Flow Equations… contd.
• Considering only equations for known injections of Pi and Qi,
we re-write the power-flow equations as,
( )
N
Pi = ∑ ViV jYij cos θij + δ j − δ i ∀i ≠ slack
j =1
( )
N
Qi = − ∑ ViV jYij sin θ ij + δ j − δ i ∀i ≠ slack & i ≠ PV
j =1
• Both set of equations exclude the slack bus real and
reactive injections because they are unknown, and are
calculated after all the variables are determined
• The reactive power equations exclude the PV bus
injections because these are computed separately
13 Module-2 ECE666: Winter 2024
Power Flow Equations… contd.
• Note, Pi (=PGi–PDi) and Qi (=QGi-QDi) denote net real and
reactive power injected into the power system (see figure).
Hence we have:
( )
N
Pi = PGi − PDi = ∑ ViV jYij cos θij + δ j − δ i i ≠ slack
j =1
( )
N
Qi = QGi − QDi = − ∑ ViV jYij sin θ ij + δ j − δ i i ≠ slack ; i ≠ PV
j =1
Power System
PGi+jQGi |Vi|∠δi
Pi + jQi
PDi+jQDi
14 Module-2 ECE666: Winter 2024
The Jacobian Matrix [J]
• The power flow equations were obtained as follows:
( )
N
Pi = ∑ ViV jYij cos θij + δ j − δ i ∀i ≠ slack
j =1
( )
N
Qi = − ∑ ViV jYij sin θ ij + δ j − δ i ∀i ≠ slack & i ≠ PV
j =1
• Using Taylor Series expansion on these equations, a linear
form representation can be obtained, as shown below,
Page-15 Module-2 ECE666: Winter 2024
The Jacobian Matrix and Its Sub-Matrices
• We can express in vector-matrix form as follows:
• The sub-matrices of [J], i.e., [J11], [J12], [J21], [J22] are
given as follows:
Page-16 Module-2 ECE666: Winter 2024
The Newton-Raphson Method
Page-17 Module-2 ECE666: Winter 2024
Newton-Raphson Method
• This method converges to high accuracy nearly always in 2
to 5 iterations
• For a flat-start: (|Vi| = 1 p.u. and δi = 0) for all buses.
• At the P-V buses, |Vi| is held at the specified value.
• Qi is calculated at each P-V bus at the end of an iteration
and if it violates the limits, the P-V bus is switched to a P-Q
bus.
• When Qi is within limits, it is switched back to a P-V bus.
Page-18 Module-2 ECE666: Winter 2024
Fast Decoupled Load Flow and DC Load Flow
19 Module-2 ECE666: Winter 2024
Fast Decoupled Load Flow (FDLF)
• Consider the complex power equation again. We
use a mixed form representation
�𝑖𝑖,𝑗𝑗 is represented in rectangular form as 𝑌𝑌�𝑖𝑖,𝑗𝑗 = 𝐺𝐺𝑖𝑖,𝑗𝑗 + 𝑗𝑗𝑗𝑗𝑖𝑖,𝑗𝑗
• 𝑌𝑌
�𝑖𝑖 is represented in polar form as, 𝑉𝑉�𝑖𝑖 = 𝑉𝑉𝑖𝑖 𝑒𝑒 𝑗𝑗𝛿𝛿𝑖𝑖
• 𝑉𝑉
* N * *
Si = Pi + jQi = V i I i = V i ∑ Y ij V j
j =1
( ) j (δ i −δ j )
N
= ∑ Vi V j Gij − jBij e
j =1
{ ( )
N Vi V j Gij cos δi − δ j + Bij sin δi − δ j ( )}
= ∑
j =1 +
{ ( ) (
j Vi V j Gij sin δi − δ j − Bij cos δi − δ j
)}
20 Module-2 ECE666: Winter 2024
FDLF… contd.
• Separating real and imaginary parts from the
previous equation we write the power flow
equations in mixed form, as follows:
{ }
N
Pi = ∑ Vi V j Gij cos δ ij + Bij sin δ ij
j =1
{ }
N
Qi = ∑ Vi V j Gij sin δ ij − Bij cos δ ij
j =1
• Where δi - δj = δij
• From this representation, elements of Jacobian
matrix can be obtained.
21 Module-2 ECE666: Winter 2024
FDLF… contd.
• Off-diagonal elements of the Jacobian (i ≠ j)
∂Pi
∂δ j
{
= Vi V j Gij sin δ ij − Bij cos δ ij }
∂Qi
∂δ j
{
= − Vi V j Gij cos δ ij + Bij sin δ ij }
∂Pi
{
= Vi Gij cos δ ij + Bij sin δ ij }
∂V j
∂Qi
{
= Vi Gij sin δ ij − Bij cos δ ij }
∂V j
22 Module-2 ECE666: Winter 2024
FDLF… contd.
• Diagonal elements of the Jacobian (i = j)
∂Pi
{ }
N
= 2 Vi Gii + ∑ V j Gij cos δ ij + Bij sin δ ij
∂ Vi j =1
j ≠i
2
P − Vi Gii Pi
= 2 Vi Gii + i = + Vi Gii
Vi Vi
∂Qi Qi
{ }
N
= = −2 Vi Bii + ∑ V j Gij sin δ ij − Bij cos δ ij
∂ Vi Vi j =1
j ≠i
∂Pi
{ }
N
= ∑ Vi V j − Gij sin δ ij + Bij cos δ ij 2
∂δ i j =1 Q + Vi Bii Qi
= −2 Vi Bii + i = − Vi Bii
j ≠i Vi Vi
{ }
N 2
= − ∑ Vi V j Gij sin δ ij − Bij cos δ ij = −Qi − Bii Vi
j =1
j ≠i
∂Qi
{ }
N 2
= ∑ Vi V j Gij cos δ ij + Bij sin δ ij = Pi − Gii Vi
∂δ i j =1
j ≠i
23 Module-2 ECE666: Winter 2024
FDLF… contd.
Assumptions
• Since (δi-δj) is small, cos(δi-δj) ≅ 1, sin(δi-δj) ≅ 0
• Gijsin(δi-δj) is much smaller compared to Bij, Gij≅0
• Hence we have
∂Pi ∂Pi
≈ 0; ≈ 0 ⇒ [J 12 ] = 0
∂ Vi ∂Vj
∂Qi ∂Qi
≈ 0; ≈ 0 ⇒ [J 21 ] = 0
∂δ i ∂δ j
24 Module-2 ECE666: Winter 2024
FDLF… contd.
• Further assumptions in [J11]
∂Pi 2
= −Qi − Bii Vi
∂δ i
n
(
= − ∑ Vi V j Gij sin δ ij − Bij cos δ ij ) − Bii Vi
2
j =1
n 2 2 n 2 2 2
≅ ∑ Vi V j Bij − Bii Vi ≅ Vi ∑ Bij − Bii Vi = 0 − Bii Vi = − Bii Vi
j =1 j =1
• Similarly,
∂Pi
= − Vi V j Bij
∂δ j
25 Module-2 ECE666: Winter 2024
FDLF… contd.
• Based on similar lines, we also have the [J22] as:
∂Qi
= − Bii Vi
∂ Vi
∂Qi
= − Bij Vi
∂V j
• To summarize, [J11] and [J22] matrix elements
are:
∂Pi 2 ∂Pi
= − Bii Vi = − Bij Vi V j
∂δ i ∂δ j
∂Qi ∂Qi
= − Bii Vi = − Bij Vi
∂ Vi ∂V j
26 Module-2 ECE666: Winter 2024
FDLF… contd.
• Defining a susceptance matrix (imaginary part of Y-
Bus matrix), without the slack bus row and column
(assuming slack bus to be bus-1)
B22 B23 ... B2n
B B33 ... B3n
B = 32
... ... ... ...
Bn 2 Bn3 ... Bnn
• Then we can write,
𝐉𝐉𝟏𝟏𝟏𝟏 = − 𝐕𝐕 𝐁𝐁 𝐕𝐕
𝐉𝐉𝟐𝟐𝟐𝟐 = − 𝐕𝐕 𝐁𝐁
• [V] is a diagonal matrix
27 Module-2 ECE666: Winter 2024
FDLF… contd.
• Power flow equations in simplified form are,
ΔP = [J 11 ]⋅ Δδ = −[V ][B ][V ][Δδ]
ΔQ = [J 22 ]⋅ Δ V = −[V ][B ][Δ V ]
• The two equations are now decoupled and hence the
system of equations is much easier to compute.
• Simplified form of the above equations are:
∂Pi
∆Pi = ⋅ ∆δ j = − Vi V j Bij ∆δ j
∂δ
j
∂Q
i
∆Qi = ⋅ ∆ V j = − Vi V j Bij ∆ V j
∂Vj
28 Module-2 ECE666: Winter 2024
FDLF: Final Relations
• Dividing by 𝑉𝑉𝑖𝑖 and assuming 𝑉𝑉𝑗𝑗 ≅ 1.0 𝑝𝑝. 𝑢𝑢.,
∆Pi ~
= ∆Pi = − Bij ∆δ j
Vi
∆Qi ~
= ∆Qi = − Bij ∆ V j
Vi
� and ∆𝑄𝑄� are just scaled versions of ∆P and ∆Q
• ∆𝑃𝑃
respectively. In matrix form, we can write,
[ ]
ΔP = [V ]−1[ΔP ] = −[B ][Δδ]
~
[ ]
ΔQ = [V ]−1[ΔQ] = −[B ][Δ V ]
~
29 Module-2 ECE666: Winter 2024
DC Power Flow
• A further simplification is to simply drop the reactive power
equation
[ΔP~ ] = −[B][Δδ]
• This results in a linear, non-iterative set of equations
• DC power flow is only good for calculating MW flows on lines
• No indication of bus voltages, reactive power or MVAr flows
• Assuming Vi = 1.0 p.u., we have
[ΔP] = −[B][Δδ]
30 Module-2 ECE666: Winter 2024
DC Load Flow… contd.
• The linear set of equations in DC Load Flow
makes the calculations simpler.
• To summarize, the following assumptions are
used from an ac power flow to arrive at dc power
flow equations:
• Line resistances are neglected.
• Magnitude of the bus voltages are ≅ 1.0 p.u.
• δij = δi - δj ≅ 0 ⇒ cos(δij) ≅ 1 and sin(δij) ≅ δij.
31 Module-2 ECE666: Winter 2024
DC Load Flow… contd.
• Thus the set of equations forming the dc load flow
can also be stated as follows:
𝑁𝑁
𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑖𝑖 = � 𝐵𝐵𝑖𝑖,𝑗𝑗 𝛿𝛿𝑖𝑖 − 𝛿𝛿𝑗𝑗 ∀ 𝑖𝑖 = 1, … , 𝑁𝑁
𝑗𝑗=1
• Also that, 𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑖𝑖,𝑗𝑗 = −𝑏𝑏𝑖𝑖,𝑗𝑗 𝛿𝛿𝑖𝑖 − 𝛿𝛿𝑗𝑗 ∀ 𝑖𝑖, 𝑗𝑗 = 1, … , 𝑁𝑁
• Note that
• Bij: element of susceptance matrix, p.u.
• δ: voltage angle, radians
• bij: susceptance of line i-j, p.u.
• PFlow: real power flow on line, p.u.
• Reactive power flow equation disappears because of assumptions.
32 Module-2 ECE666: Winter 2024
Part-2: Optimal Power Flow
33 Module-2 ECE666: Winter 2024
History of OPF
• In 1962, Carpentier from EDF, France introduced a
generalized NLP formulation of the ELD problem including
voltage and other operating constraints
• This was later named Optimal Power Flow (OPF), following the
work of Dommel & Tinny in 1968
• Today, any problem that involves the determination of the
instantaneous ‘optimal’ steady-state of an electric power
system is an OPF problem
• Optimal steady state is achieved by adjusting the available
controls to minimize an objective function subject to
specified operating and security requirements
34 Module-2 ECE666: Winter 2024
Insufficiency of ELD
• ELD assumes that demand and supply are aggregated at
one node, for the entire system
• The inherent assumption is that power flow will follow such a
simple constraint
• In practice, power flow is determined by physical laws of
electricity flow (power flow equations)
• In ELD, reactive power generation and demand is ignored
and bus voltages are not considered
• Transmission loss representation is, at best, approximate
35 Module-2 ECE666: Winter 2024
From ELD to OPF
• The power flow equations are introduced in ELD as
demand-supply balance equations
• The demand-supply balance is effected at each bus
individually. Not for the aggregate system.
• The optimum solution yields a set of generation variables
that minimize costs while satisfying the physical laws of
flow of electricity
• It becomes a constrained non-linear optimization problem
36 Module-2 ECE666: Winter 2024
Basic OPF Formulation
• The classical objective is to minimize the total
operating cost (NG is set of generators):
NG
Cost = ∑ Ci(Pi )
i =1
• Demand-supply Balance: considers bus-wise load-
generation balance for active and reactive power
Pi − PDi = ∑ Vi V j Yi, j cos(θi, j + δ j − δ i ) ∀i ∈ N
j
Qi − QDi = − ∑ Vi V j Yi, j sin(θi, j + δ j − δ i ) ∀i ∈ N
j
• Limits on Bus Voltages
ViMin ≤ Vi ≤ ViMax , ∀ i = 1,..., N
37 Module-2 ECE666: Winter 2024
Basic OPF Formulation… contd.
• Limits on real and reactive power generation
PiMin ≤ Pi ≤ PiMax ∀i ∈ NG
QiMin ≤ Qi ≤ QiMax ∀i ∈ NG
• Bounds on angles
− π ≤ δ i ≤ π , ∀ i = 1,..., N
• The Lagrangian for the OPF formulation can be constructed
as follows:
NG N
F = ∑ Ci (Pi ) + ∑ λi PDi − Pi − ∑ Vi V j Yi, j cos(θi, j + δ j − δ i )
i =1 i =1 j
N
+ ∑ γ i QDi − Qi + ∑ Vi V j Yi, j sin(θi, j + δ j − δ i )
i =1 j
38 Module-2 ECE666: Winter 2024
Characteristic Features of OPF
• Incremental loss representation is exact- due to detailed
network representation and bus-wise demand balance
• More operating constraints can be included
• Allows inclusion of security constraints
• Several adjustable variables and controls
• Different objective functions possible
• Can be used for analytical studies of different time-frames-
short, medium and long-term
• Increasingly important in electricity markets
39 Module-2 ECE666: Winter 2024
OPF Objectives and Controls
• Objective Functions: Minimize
• Cost of operation / Increase in cost
• Deviation from optimum settings (or minimum control shift)
• Real power losses
• Cost of load curtailment
• Number of controls
• Installation cost of new capacitors / reactors
• MW transfers
• Total emissions
• Control variables
• Real and reactive power generation
• Switched capacitor settings
• Reactive injection for a SVC
• Load MW and MVAr curtailment (load shedding)
• LTC transformer tap settings, etc.
40 Module-2 ECE666: Winter 2024
Example-1: OPF Model Formulation
• 3-bus System:
0 ≤ P1 ≤ 5 p.u. 0 ≤ P2 ≤ 2.5 p.u.
− 0.2 ≤ Q1 ≤ 3 p.u. − 0.2 ≤ Q2 ≤ 1.5 p.u.
PD3 = 3.6392 p.u. QD3 = 0.5339 p.u.
1 3
0.9 ≤ V1 ≤ 1.1 p.u. 0.9 ≤ V2 ≤ 1.1 p.u. 0.9 ≤ V3 ≤ 1.1 p.u.
14.493∠4.938 9.578∠1.862 4.975∠1.67
Y = 9.578∠1.862 14.467∠4.972 4.903∠1.768
2
4.975∠1.67 4.903∠1.768 9.866∠4.861
• Find the Optimal Dispatch to minimize the total cost
( )(
J = a1P12 + b1P1 + c1 + a2 P22 + b2 P2 + c2 )
41 Module-2 ECE666: Winter 2024
Example-1 …contd.
• Minimize: ( )(
J = a1P12 + b1P1 + c1 + a2 P22 + b2 P2 + c2 )
• Subject to
P1 − 15 V1 cos(− 90) − 10 V1 V2 cos(90 + δ 2 − δ1 ) - 5 V1 V3 cos(90 + δ 3 − δ1 ) = 0
2
Q1 + 15 V1 sin (− 90 ) + 10 V1 V2 sin (90 + δ 2 − δ1 ) + 5 V1 V3 sin (90 + δ 3 − δ1 ) = 0
2
P2 − 10 V2 V1 cos(90 + δ1 − δ 2 ) − 15 V2 cos(− 90 ) − 5 V2 V3 cos(90 + δ 3 − δ 2 ) = 0
2
Q2 + 10 V2 V1 sin (90 + δ1 − δ 2 ) + 15 V2 sin (− 90 ) + 5 V2 V3 sin (90 + δ 3 − δ 2 ) = 0
2
− 3.6392 + 5 V3 V1 cos(90 + δ1 − δ 3 ) + 5 V3 V2 cos(90 + δ 2 − δ 3 ) + 10 V3 cos(− 90 ) = 0
2
− 0.5339 + 5 V3 V1 sin (90 + δ1 − δ 3 ) + 5 V3 V2 sin (90 + δ 2 − δ 3 ) − 10 V3 sin (− 90 ) = 0
2
42 Module-2 ECE666: Winter 2024
Example-1 …contd.
• Inequality Constraints:
− P1 ≤ 0
0.9 − V1 ≤ 0
P1 ≤ 5 p.u.
− P2 ≤ 0 V1 − 1.1 ≤ 0
P2 ≤ 2.5 p.u. 0.9 − V2 ≤ 0
− 0.2 − Q1 ≤ 0 V2 − 1.1 ≤ 0
Q1 ≤ 3 p.u.
0.9 − V3 ≤ 0
− 0.2 − Q2 ≤ 0
V3 − 1.1 ≤ 0
Q2 ≤ 1.5 p.u.
43 Module-2 ECE666: Winter 2024
Example-1 …contd.
• The equality constraints resolves to:
P1 + 10 V1 V2 sin (δ 2 − δ1 ) + 5 V1 V3 sin (δ 3 − δ1 ) = 0
Q1 − 15 V1 + 10 V1 V2 cos(δ 2 − δ1 ) + 5 V1 V3 cos(δ 3 − δ1 ) = 0
2
P2 + 10 V2 V1 sin (δ1 − δ 2 ) + 5 V2 V3 sin (δ 3 − δ 2 ) = 0
Q2 + 10 V2 V1 cos(δ1 − δ 2 ) − 15 V2 + 5 V2 V3 cos(δ 3 − δ 2 ) = 0
2
− 3.6392 − 5 V3 V1 sin (δ1 − δ 3 ) − 5 V3 V2 sin (δ 2 − δ 3 ) = 0
− 0.5339 + 5 V3 V1 cos(δ1 − δ 3 ) + 5 V3 V2 cos(δ 2 − δ 3 ) + 10 V3
2
=0
44 Module-2 ECE666: Winter 2024
Example-1 …contd.
• The Lagrangian can be constructed as:
( )(
F = a1P12 + b1P1 + c1 + a2 P22 + b2 P2 + c2 )
+ λ1(P1 + 10 V1 V2 sin (δ 2 − δ1 ) + 5 V1 V3 sin (δ 3 − δ1 ))
+ λ2 (P2 + 10 V2 V1 sin (δ1 − δ 2 ) + 5 V2 V3 sin (δ 3 − δ 2 ))
+ λ3 (− 3.6392 − 5 V3 V1 sin (δ1 − δ 3 ) − 5 V3 V2 sin (δ 2 − δ 3 ))
+ γ 1 Q1 − 15 V1 + 10 V1 V2 cos(δ 2 − δ1 ) + 5 V1 V3 cos(δ 3 − δ1 )
2
+ γ 2 Q2 + 10 V2 V1 cos(δ1 − δ 2 ) − 15 V2 + 5 V2 V3 cos(δ 3 − δ 2 )
2
+ γ 3 − 0.5339 + 5 V3 V1 cos(δ1 − δ 3 ) + 5 V3 V2 cos(δ 2 − δ 3 ) + 10 V3
2
45 Module-2 ECE666: Winter 2024
Example-1: OPF Solution
• *********************************************************************
• Case-A: Cost Minimizing OPF Solution
• *********************************************************************
• Bus P-Optimal Q-Optimal λP λQ
• (MW) (MW) ($/MWh) ($/MVArh)
• 1 300.549 100.183 609.598 0.000
• 2 88.734 125.174 628.890 0.000
• 3 0.000 0.000 726.046 61.937
• Real MC denotes the effect on cost with change in demand at the bus
• Reactive MC denotes the effect on cost with change in reactive demand at the bus
• *********************************************************************
• Case-B: Loss Minimizing OPF Solution
• *********************************************************************
• Bus P-Optimal Q-Optimal λP λQ
• (MW) (MW) (MW/MWh) (MW/MVArh)
• 1 226.996 111.671 0.000 0.000
• 2 161.151 106.367 0.000 0.000
• 3 0.000 0.000 0.175 0.098
• Real MC denotes the effect on loss with change in demand at the bus
• Reactive MC denotes the effect on loss with change in reactive demand at a bus
• ********************************************
• Comparison of Two Cases
• ********************************************
• Case Total Cost Total Loss
• ($) (MW)
• A 121931.565 25.363
• B 145876.673 24.227
46 Module-2 ECE666: Winter 2024
Example-2
1 3 2
6 4
System data relating to generation and load 5
Bus Gen. Cap. MW Cost Ch., $/hr Load Voltage, p.u. MVAr support
1 100 ≤ P1 ≤ 500 P12+8.5P1+5 73.125 + j19.50 1.05 -20 ≤ Q1≤ 300
2 50 ≤ P2 ≤ 250 3.4P22+25.5P2+9 92.625 + j29.25 1.06 -20 ≤Q2≤ 150
3 NIL - 78.00 + j39.00 0.95 ≤V3≤ 1.05 NIL
4 NIL - 112.125 + j31.20 0.95 ≤V4≤ 1.05 0 ≤Q4≤ 100
5 NIL - 126.75+ j34.125 0.95 ≤V5≤ 1.05 NIL
6 NIL - 67.375 + j24.375 0.95 ≤V6 ≤1.05 0 ≤Q6≤ 100
47 Module-2 ECE666: Winter 2024
Example-2: OPF with Minimum Cost Objective
Bus Generation, MVAr λP MCP, λQ Total Total
MW support $/MWh $/MVArh system system
cost, $ loss,
MW
1 426.04 12.274 860.58 0.0 294848.4 51.955
2 175.915 113.793 1221.725 0.0
3 - - 1244.837 20.981
4 - 100.00 1148.348 19.775
5 - - 1297.163 53.981
6 - 100.00 1200.707 31.690
λP = marginal cost of real power at a bus
λQ= marginal cost of reactive power at a bus
48 Module-2 ECE666: Winter 2024
Example-2: ELD Solution
Bus Optimum Generation, Marginal Cost, λ Total system cost,
MW $/MWh $
1 426.932
862.364 240547.58
2 123.068
• Since transmission loss is neglected in ELD, it shows lower cost
than OPF
• Costs worth 52 MW of losses are not accounted for by ELD
• Costlier generator (unit-2) effectively supplies the transmission
loss
• OPF provides bus-wise marginal cost for real and reactive power
49 Module-2 ECE666: Winter 2024
Example-2: OPF with Minimum Loss Objective
Bus Generation, MVAr λP λQ Total Total
MW support MW/MW MW/MVAr system system
cost, $ loss, MW
1 331.722 2.911 0 0 331748.04 31.722
2 250.000 92.275 0.157 0
3 - - 0.198 0.018
4 - 74.717 0.209 0
5 - - 0.305 0.033
6 - 99.988 0.249 0
λP = marginal loss from supplying real power at a bus
λQ = marginal loss from supplying reactive power at a bus
50 Module-2 ECE666: Winter 2024
Controls, Constraints in P & Q Subproblems
Controls Constraints
Active Power OPF -MW generations -Control variable limits
-Economy interchanges -Voltage angles between buses
-Phase shifter positions (specific)
-HVDC Line MW flows -MW branch flows
-Load curtailment -MW reserve margins
-Area MW Interchanges
-Net area MW generation
Reactive Power OPF -Generator voltages -Control variable limits
-Generator MVArs -Bus voltage magnitudes
-SVC MVArs -MVAr generations
-Capacitor or reactor status -MVAr branch flows
-LTC tap positions -MVAr reserve margins
-Area MVAr Interchanges
-Net area MVAr generation
51 Module-2 ECE666: Winter 2024
Inequality Constraints
• The inequality constraints can be classified into two
categories:
• Physical limits of controls- these cannot be violated
• For example, transformer tap, real and reactive power generation cannot
go beyond its upper and lower bounds
• Operating limits- these are imposed to enhance security and
do not represent physical bounds. They can be relaxed
temporarily, if necessary, to obtain feasible solutions.
• Infeasible problems of this kind are always encountered in some on-line
applications and a good OPF program must be able to cope with them.
52 Module-2 ECE666: Winter 2024
OPF Application: Minimum Cost Operation
• This is the most used, reflecting ELD practice
• J = sum of costs of controlled generation of thermal plants &
cost of controlled interchange transactions
• All system control variables are eligible to participate
• If the only control variable is P, it is termed as Security
Constrained Economic Dispatch (SCED)
• Usually the LF equations are replaced by DCLF equations
53 Module-2 ECE666: Winter 2024
OPF Application: Loss Minimization
• This is the classical Reactive Power Dispatch problem
• Commonly used
• The optimization seeks to minimize the circulating VAr and also
maintains acceptable voltage profile
• Usually reactive power controls are used- transformer taps,
switching capacitors, generator voltages
• Executed every 30 minutes in the control center
• With more control variables (more freedom), system losses
decrease
• Loss Minimization can give substantial savings
• reducing losses by 10 MW, utility’s λ =$20/MWh
• SAVINGS/YEAR = $1.5 Million
54 Module-2 ECE666: Winter 2024
OPF Application: Optimal Capacitor Siting
• Seeks the best location to place capacitor in the system
• Minimize cost of new devices
• Include different constraints and post-contingency analysis
• A medium-term planning study
• Note that Optimal Capacitor Switching is part of OPF Loss
Minimization
55 Module-2 ECE666: Winter 2024
OPF Application: Nodal Pricing of Power
• Dual of demand balance constraint (power flow
equations) gives the marginal cost of supply at a
bus
• These are the λi and γi variables in the Lagrangian
function
• Introduces the concept of Locational Marginal
Price (LMP)
• Reactive power pricing is also viable from the
same model
56 Module-2 ECE666: Winter 2024
Part-3: SCOPF and DCOPF
57 Module-2 ECE666: Winter 2024
Security Constrained OPF (SCOPF)
• Objective of SCOPF is to minimize total generation cost.
• The additional constraints over and above the OPF model
are related to grid “security”, and are represented by:
• Line power flow constraints.
• The line flows (PT) are typically computed off-line using an N-1
contingency criterion.
• Current limits imposed based on line thermal limits, IT
• Bus voltage limits V
• These problems are now being solved successfully for large
systems (thousands of constraints) using Interior Point
methods.
58 Module-2 ECE666: Winter 2024
SCOPF… contd.
• The ‘standard’ SCOPF model is as follows:
N
Min.J = ∑ ai Pi2 + bi Pi + ci
i =1
s.t. g(δ, V, Q, P ) = 0
PiMin ≤ Pi ≤ PiMax
PT (δ, V ) ≤ PTMax
IT (δ, V ) ≤ ITMax
QiMin ≤ Qi ≤ QiMax
ViMin ≤ Vi ≤ ViMax
• g(.): set of real and reactive power flow equations
59 Module-2 ECE666: Winter 2024
DCOPF Formulation
• Objective: Minimize cost of genertion
• Constraints:
• Demand-supply Balance: the ac power flow equations
are replaced by dc load flow equations.
• Line flow limits based on dc load flow representation.
• Limits on real power generation.
• Bounds on bus angles.
• Commonly used in electricity market settlement
models for Locational Marginal Price (LMP)
markets.
• With the objective of maximizing the social welfare,
instead of minimizing cost.
60 Module-2 ECE666: Winter 2024
DCOPF Formulation
NG
Cost = ∑ Ci(Pi )
i =1
N
(
PInji = ∑ Bij δ i − δ j ) ∀ i = 1,..., N
j =1
PFlowij = −bij (δ i − δ j ) ∀ i, j = 1,..., N
− bij (δ i − δ j ) ≤ PFlowijMax ∀ i, j = 1,..., N
PiMin ≤ Pi ≤ PiMax ∀i ∈ NG
− π ≤ δ i ≤ π , ∀ i = 1,..., N
61 Module-2 ECE666: Winter 2024
References: Power Flow Analysis
• Power flow analysis is a well established topic and very
good treatment of this topic is found in several text books,
such as:
• M. A. Pai, Computer techniques in power system analysis, Tata
McGraw Hill, New Delhi, 1979
• G. W. Stagg and A. H. El-Abiad, Computer methods in power
systems analysis, McGraw Hill New York, 1968
• A. R. Bergen and V. Vittal, Power systems analysis, 2nd Edition,
Prentice Hall, 2000
• J. J. Grainger and W. D. Stevenson, Power system analysis,
McGraw-Hill, 1994
62 Module-2 ECE666: Winter 2024
References: Basic OPF
• J. Carpentier, “Contribution e l’étude do Dispatching Economique”,
Bulletin Society Francaise Electriciens, August 1962
• H. W. Dommel and W. F. Tinney, Optimal power flow solutions,
IEEE Trans Power Apparatus and Systems, October 1968
• J. A. Momoh, M. E. El-Hawary and R. Adapa, A review of selected
optimal power flow literature to 1993. Parts-I and II:”, IEEE Trans
Power Systems, Feb.’99, pp. 96-111
• M. Huneault and F. D. Galiana, “A survey of the optimal power flow
literature”, IEEE Transactions on Power Systems, May ’91, pp.
762-770.
• IEEE Tutorial Course, Optimal Power Flow: Solution Techniques,
Requirements, and Challenges”, IEEE Power Engineering Society
Publication No. 96 TP 111-0
63 Module-2 ECE666: Winter 2024
References: OPF Applications
• A. Monticelli, M. V. F. Pereira and S. Granville, “Security constrained OPF with post-
contingency corrective rescheduling”, IEEE Transactions on Power Systems, February
1987
• B. Stott, O. Alsac and A. J. Monticelli, “Security analysis and optimization”,
Proceedings of the IEEE, December 1987, pp.1623-1644
• G. Opoku, “Optimal power system VAR planning”, IEEE Transactions on Power
Systems, Feb. ’90, pp. 53-60
• Y. T. Hsiao, C. C. Liu, H. D. Chiang and Y. L. Chen, “A new approach for optimal VAR
sources planning in large scale electric power systems”, IEEE Transactions on Power
Systems, Aug. ’93, pp. 988-996
• N. Deeb and S. M. Shahidehpour, “Cross decomposition for multi-area optimal
reactive power planning”, IEEE Transactions on Power Systems, Nov. ’93, pp. 1539-
1544
• S. Granville and M. C. A. Lima, “Application of decomposition techniques to VAR
planning: Methodological and computational aspects”, IEEE Transactions on Power
Systems, Nov. ’94, pp. 1780-1787
• M. Bjelogrlic, M. S. Calovic, P. Ristanovic and B. S. Babic, “Application of Newton’s
OPF in voltage / reactive power control”, IEEE Transactions on Power Systems,
Nov.’90, pp.1447-1454
64 Module-2 ECE666: Winter 2024