0% found this document useful (0 votes)
38 views

HW 6 Solutions

The document provides a homework problem involving DC power flow analysis and optimal power flow modeling for an electric power network. It includes: 1) Analyzing the effect of adding a new transmission line to the network using DC power flow. 2) Setting up the optimal power flow problem as a linear program to minimize generation costs subject to power balance constraints. 3) Explicitly writing the linear constraints for generator outputs, node angle differences, and line flows based on the network model.

Uploaded by

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

HW 6 Solutions

The document provides a homework problem involving DC power flow analysis and optimal power flow modeling for an electric power network. It includes: 1) Analyzing the effect of adding a new transmission line to the network using DC power flow. 2) Setting up the optimal power flow problem as a linear program to minimize generation costs subject to power balance constraints. 3) Explicitly writing the linear constraints for generator outputs, node angle differences, and line flows based on the network model.

Uploaded by

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

EE/Econ 458, HW 6 – Due Wednesday, October 19, 2011

1. For the system below:


a. Obtain the Y-bus.
b. Obtain the B’ matrix.
c. Set up and solve the DC power flow relation P=B’θ. Give all
four angles.
d. Obtain the D matrix and the node-arc incidence matrix A.
e. Compute all line flows. Compare the line flows to those for the
solution given in the class notes, and comment on the effect of
the added line in terms of loading in other lines.
Pg2=2pu
Pg1

1 2

y12 =-j10
y14 =-j10 y13 =-j10
Pd2=1pu y23 =-j10
y24 =-j8

y34 =-j10
4 3

Pg4=1pu Pd3=4pu

Solution:
a. Relative to the Y-bus from the notes, we need to modify four elements of the matrix
corresponding to entries for buses 2 and 4 between which the new line is connected.
Specifically, we need to modify elements (2,2), (2, 4), (4,2), and (4,4). The resulting Y-
bus is given by:
 30 10 10 10 
 10  28 8 10 
Y  j 
 10 10  30 10 
 
 10 8 10  28
b. The B’ matrix is obtained by negating the Y-bus, removing the “j”, and then removing
column 1 and row 1.
 30  10  10  10
 10 28  10  8   28  10  8 
  B'   10 30  10
 10  10 30  10
    8  10 28 
  10  8  10 28 

c. The DC Power flow relations are:


 P2   28  10  8   2 
 P    10 30  10  
 3   3 
 P4    8  10 28   4 

where
 P2   1 
 P     4
 3  
 P4   1 
Solving the DC Power flow relations, we obtain:
1
 2   28  10  8   1   0.025
    10 30  10  4    0.15 
 3      
 4    8  10 28   1   0.025
This is exactly the same solution we would obtain using the system without the line from
bus 2 to bus 4. If you solve the system without the line between buses 2 and 4 (see notes
called “Power flow equations”), you will find that the angles of buses 2 and 4 are the
same, and so placing a line between them does not result in any flow and thus, it does not
result in any change in the flows in the rest of the network.

d. The D-matrix is
10 0 0 0 0 0
 0 10 0 0 0 0
 
 0 0 10 0 0 0
D 
 0 0 0 10 0 0 
 0 0 0 0 10 0
 
 0 0 0 0 0 8 
The node-arc incidence matrix is constructed as in the notes, except we need one more row
corresponding to the extra branch between buses 2 and 4. We define directionality on this branch
as positive from bus 2 to bus 4. The matrix is

 
node 
number

2 3 4
0 0 - 1 1
- 1 0 0  2

1 -1 0 3
A   branch number
0 -1 1 4
0 -1 0 5
  
 1 0 - 1 6

e. Because the network angles did not change, and because the new line should carry no
flow (because the angles at either terminal are the same), the line flows should be exactly
the same, an expectation we can check via P B  ( D  A)   .

 PB1  10 0 0 0 0 0  0 0 - 1 0.25


 P   0 10 0 0 0 0 - 1 0 0   
 B2      0.025 0.25
 PB 3   0 0 10 0 0 0  1 - 1 0    1.25 
      0.15    
 PB 4   0 0 0 10 0 0  0 - 1 1   0.025 1.25 
 PB 5   0 0 0 0 10 0  0 - 1 0     1.5 
      
 PB 6   0 0 0 0 0 8  1 0 - 1  0 
Notice that the flow on the circuit we added is zero, which confirms that the solution is the same.
The solution is illustrated in the figure below.

Pg2=2pu
Pg1=2pu

1 2

P12=0.25
P14 =0.25 P13=1.5
Pd2=1pu P23 =1.25

P43 =1.25
4 3

Pg4=1pu Pd3=4pu

2. Using the same system you analyzed in problem 1, set up the optimal
power flow as a linear program. Assume the objective function is
exactly the same as used in the example in class, i.e.,
Z  1307 Pg1  1211Pg 2  1254Pg 4 . Also, assume each unit has a lower limit of
100 MW and an upper limit of 300 MW, which will be (in per unit):
1  Pg1  3
1  Pg 2  3 .
1  Pg 3  3
a. Write down the optimization problem you must solve. Assume
infinite transmission capacity.

Solution:
First, let’s obtain the power flow equations:
 Pg1   30  10  10  10  1 
 P  1   
 g 2    10 28  10  8   2 
  4   10  10 30  10  3 
    
 Pg 4   10  8  10 28   4 
Writing them out explicitly as they need to be used in CPLEX,

we obtain:
Pg1  30 1  10 2  10 3  10 4  0
Pg 2  10 1  28 2  10 3  8 4  1
10 1  10 2  30 3  10 4  4
Pg 4  10 1  8 2  10 3  28 4  0

Now we need to obtain the line flow equations. Note that we define directionality
according to the diagram below.

Pg2
Pg1

1 2

Pb2=P12
Pb1=P14 Pb5=P13
Pd2=1pu Pb3=P23
Pb6=P24

Pb4=P43
4 3

Pg4 Pd3=4pu

1 0 0  1 10 0 0 0 0 0
1  1 0 0   0 10 0 0 0 0
   
0 1  1 0   0 0 10 0 0 0
A  D 
0 0  1 1   0 0 0 10 0 0
1 0  1 0   0 0 0 0 10 0
   
0 1 0  1  0 0 0 0 0 8
And so
10 0 0 0 0 0 1 0 0  1 10 0 0  10  101  10 4 

1   0 10 0 0 0 0 1  1 0 0  1  10  10 0 0  1   101  10 2 
   0 0 10 0 0 0 0 1  1 0   2   0 10  10 0   2   10 2  10 3 
( D  A)   2         
 3   0 0 0 10 0 0 0 0  1 1   3   0 0  10 0   3   10 3  10 4 
      
 4  0 0 0 0 10 0 1 0  1 0   4  10 0  10 0   4   101  10 3 
      
 0 0 0 0 0 8 0 1 0  1  0 8 0  8   8 2  8 4 
Therefore,

 Pb1   10 1  10 4  0


 P   10  10  0
 1   b2   1 2   
   P   10  10  0 
 P b  ( D  A)   2   0    b 3    2 3
 
 3   Pb 4   10 3  10 4  0
   Pb 5   10 1  10 3  0
 4 
     
 Pb 6   8 2  8 4  0
 Pb1  10 1  10 4  0
 Pb 2  10 1  10 2  0
 Pb 3  10 2  10 3  0
 Pb 4  10 3  10 4  0
 Pb 5  10 1  10 3  0
 Pb 6  8 2  8 4  0

And so here is the optimization problem we need to solve:


min Z  1307 Pg1  1211Pg 2  1254Pg 4
subject to
Pg1  30 1  10 2  10 3  10 4  0
Pg 2  10 1  28 2  10 3  8 4  1
10 1  10 2  30 3  10 4  4
Pg 4  10 1  8 2  10 3  28 4  0
 Pb1  10 1  10 4  0
 Pb 2  10 1  10 2  0
 Pb 3  10 2  10 3  0
 Pb 4  10 3  10 4  0
 Pb 5  10 1  10 3  0
 Pb 6  8 2  8 4  0
1  Pg1  3
1  Pg 2  3
1  Pg 3  3
   Pb1  
   Pb 2  
   Pb 3  
   Pb 4  
   Pb 5  
   Pb 6  
b. Provide your CPLEX code used to solve the above optimization
problem.
Solution:
minimize
1307 pg1 + 1211 pg2 + 1254 pg4
subject to
theta1=0
-pb1 + 10 theta1 - 10 theta4 = 0
-pb2 + 10 theta1 - 10 theta2 = 0
-pb3 + 10 theta2 - 10 theta3 = 0
-pb4 - 10 theta3 + 10 theta4 = 0
-pb5 + 10 theta1 - 10 theta3 = 0
-pb6 + 8 theta2 - 8 theta4 =0
pg1 - 30 theta1 + 10 theta2 + 10 theta3 + 10 theta4 = 0
pg2 + 10 theta1 - 28 theta2 + 10 theta3 +8 theta4 = 1.0
10 theta1 + 10 theta2 - 30 theta3 + 10 theta4 = 4
pg4 + 10 theta1 + 8 theta2 + 10 theta3 - 28 theta4 = 0
-pg1 <= -1
pg1 <= 3
-pg2 <= -1
pg2 <= 3
-pg4<= -1
pg4 <= 3
-pb1 <= 500
pb1 <= 500
-pb2 <= 500
pb2 <= 500
-pb3 <= 500
pb3 <= 500
-pb4 <= 500
pb4 <= 500
-pb5 <= 500
pb5 <= 500
-pb6 <= 500
pb6 <= 500
Bounds
-500 <= pb1 <= 500
-500 <= pb2 <= 500
-500 <= pb3 <= 500
-500 <= pb4 <= 500
-500 <= pb5 <= 500
-500 <= pb6 <= 500
-3.14159 <= theta1 <= 3.14159
-3.14159 <= theta2 <= 3.14159
-3.14159 <= theta3 <= 3.14159
-3.14159 <= theta4 <= 3.14159
end
c. Use CPLEX to solve the LP stated in part b. In answering the
below questions, make sure you specify the units.
i. Provide the value of the objective function at the optimal
solution.
Solution: Z*=$6194
ii. Provide the values of the decision variables at the optimal
solution. Typing “display solution variables - ” provides
Solution: Pg1=1.0 pu, Pg2=3.0 pu, Pg4=1.0 pu.
iii. Provide the values of the auxiliary variables (angles and
line flows) at the optimal solution. Make sure you specify
line flows as Pbk=Pij where the flow direction is defined
positive from bus i to bus j.
Solution: Typing “display solution variables - ” provides
θ1=0 rad, θ2=0.026389 rad,
θ3=-0.125 rad, θ4=-0.001389 rad.
Pb1=P14=0.013880pu
Pb2=P12=-0.263889pu
Pb3=P23=1.513889pu
Pb4=P43=1.0 pu
Pb5=P13=1.25pu
Pb6=P24=0.222222pu
iv. Identify the locational marginal prices (LMPs) at each bus.
Solution: Typing “display solution dual - ” provides
LMP1=$1211/pu-hr or $12.11/MWhr
and it is the same for buses 2, 3, and 4.
v. How much will the objective function increase if the load
at bus 2 changes from 1.0 pu to 1.01 pu?
Solution:
Under most circumstances, this is given by the LMP at bus
2, which is $12.11. However, if you actually resolve the
optimization under the condition that the bus 2 load is 1.01
pu, you will find the objective function increases by
$12.54, indicating that the additional load was served by
Pg4. This is because in the original solution (when the bus
2 load was 1.0 pu), Pg2 was at 3 pu, which is its upper
limit. But Pg2=3pu, not because the Pg2 constraint was
activated and held Pg2 to the limit but because the solution
settles to exactly Pg2=3pu. In other words, even if the
constraint was increased to 3.01pu, Pg2 would remain at
3pu (this would not happen if the constraint was active at
the Pg2=3pu solution). And so the constraint is not binding
and the computed LMP is $12.11. Yet, a 1 MW increase in
load at bus 2 will cost $12.54/MWhr. The issue here is
that LMPs are discontinuous due to the activation of
constraints. In this case, the “jump” of the LMP at bus 2
(and indeed at all buses) from $12.11 to $12.54 occurs just
when the system load is increased from 5 pu (bus 2 load of
1pu and bus 3 load of 4pu) to anything larger than 5 pu.
Such discontinuities cause volatility in the LMPs. So
although the LMP is $12.11, the answer is $12.54.
vi. How much will the objective function increase if the load
at bus 3 changes from 4.0 pu to 4.01 pu?
Solution:
The situation here is the same as in part v. Although the
dual variable of the bus 3 power injection equation is
$12.11, the objective increases by $12.54 when the bus 3
load changes from 4.0 to 4.01 pu. So although the LMP is
$12.11, the answer is $12.54.
vii. How much will the objective function increase if the lower
generation limit for Pg1 is increased to 101 MW?
Solution: By typing “display solution dual -” we find that
the dual variable for the lower limit on Pg1 is -96$/pu-hr
or -.96$/MWhr. But this constraint is written in CPLEX as
“-pg1 <= -1” and so if the RHS increases by 0.01 pu (1
MW), to -.99, the objective will increase by -$.96, i.e., the
objective will actually decrease by $.96. This means that if
the RHS changes to -1.01, the objective will increase by
$.96.
d. Constrain the flow limit on Pb3=P23 to 1.4 pu and resolve using
CPLEX.
i. Provide the value of the objective function at the optimal
solution.
Solution: Z*=$6211.63
ii. Provide the values of the decision variables at the optimal
solution. Typing “display solution variables - ” provides
Solution: Pg1=1.0 pu, Pg2=2.59 pu, Pg4=1.41 pu.
iii. Provide the values of the auxiliary variables (angles and
line flows) at the optimal solution. Make sure you specify
line flows as Pbk=Pij where the flow direction is defined
positive from bus i to bus j.
Solution: Typing “display solution variables - ” provides
θ1=0 rad, θ2=0.015 rad,
θ3=-0.125 rad, θ4=0.01 rad.
Pb1=P14=-0.1pu
Pb2=P12=-0.15pu
Pb3=P23=1.4pu
Pb4=P43=1.35 pu
Pb5=P13=1.25pu
Pb6=P24=0.04pu
iv. Identify the locational marginal prices (LMPs) at each bus.
Solution: Typing “display solution dual - ” provides
LMP1=$1251.85/pu-hr or $12.5185/MWhr
LMP2=$1211/pu-hr or $12.11/MWhr
LMP3=$1290.55/pu-hr or $12.9055/MWhr
LMP4=$1254/pu-hr or $12.54/MWhr
v. How much will the objective function increase if the load
at bus 2 changes from 1.0 pu to 1.01 pu?
Solution: This is given by the LMP at bus 2, which is
$12.11.
vi. How much will the objective function increase if the load
at bus 3 changes from 4.0 pu to 4.01 pu?
Solution: This is given by the LMP at bus 3, which is
$12.9055.
vii. How much will the objective function increase if the
transmission limit on Pb3=P23 is increased by 1 MW from
1.4 to 1.41 pu?
Solution: By typing “display solution dual -” we find that
the dual variable for the transmission limit on Pb3 is
-154.8$/pu-hr or -1.548$/MWhr.
If the RHS increases by 0.01 pu (1 MW), to 1.41, the
objective will increase by -$1.548, i.e., the objective will
actually decrease by $1.548.

You might also like