You are on page 1of 5

ECE 476 Power System Analysis Fall 2013

Homework 8

Reading: Chapter 6.
Due Date: Tuesday, November 12, 2013
Problem 1. Problem 6.38 of GS&O, 5th Edition
Solution. First, convert all values to per unit.
150 MW
= 1.5 p.u.
Sbase
100 MVA
Q
50 Mvar
=
=
= 0.5 p.u.
Sbase
100 MVA
0.1 MVA
ymax
=
=
= 0.001 p.u.
Sbase
100 MVA
P

Ppu =
Qpu
ymax,pu

The Y -bus for this system is


Y =

1
j0.1
1
j0.1

1
j0.1
1
j0.1


j10 j10
=
j10 j10

The state vector of unknowns is x = [2 , V2 ]T . Next, we construct the power flow equations at bus 2. Since it is a
PQ bus, we have two equations as follows:
f P2 (x) = 0 = V2 V1 [G21 cos (2 1 ) + B21 sin (2 1 )] + V22 G22 P2
= 10V2 sin 2 + 1.5,
f Q2 (x) = 0 = V2 V1 [G21 sin (2 1 ) B21 cos (2 1 )] V22 B22 Q2
= 10V2 cos 2 + 10V22 + 0.5.
The Jacobian in this problem is
J=

"

f P2
2
f Q2
2

f P2
V2
f Q2
V2

10V2 cos 2
10V2 sin 2


10 cos 2
.
10 cos 2 + 20V2

With initial guess of V2 = 10 , after 4 iterations, the final converged solution is V2 = 0.9334 9.2473.
% ECE 476 Fall 2013
% Homework 8, Problem 1, 6.38 of GS&O
clear all
close all
% x = [t2 V2]
P2 = -1.5;
Q2 = -0.5;
Xl = 1i*0.1;
1

Y = [1/Xl -1/Xl;
-1/Xl 1/Xl];
B = imag(Y);
x = [0 1];
f = [B(2,1)*x(2)*sin(x(1)) - P2;
-B(2,1)*x(2)*cos(x(1)) - B(2,2)*x(2)^2 - Q2];
eps = 1e-4;
cnt = 0;
while abs(f(1))>eps || abs(f(2))>eps
J = [B(2,1)*x(2)*cos(x(1)) B(2,1)*sin(x(1));
B(2,1)*x(2)*sin(x(1)) -B(2,1)*cos(x(1))-2*B(2,2)*x(2)];
f = [B(2,1)*x(2)*sin(x(1)) - P2;
-B(2,1)*x(2)*cos(x(1)) - B(2,2)*x(2)^2 - Q2];
x = x - J\f;
cnt = cnt + 1;
end
Problem 2. Problem 6.39 of GS&O, 5th Edition
Solution. Assume the system power base is 100 MVA. Then,
P2 = 0.6 p.u., P3 = 0.8 p.u., and Q3 = 0.6 p.u.
The Y -bus is given as

j7 j2
j5
Y = j2 j6 j4 .
j5
j4 j9

In this problem, the state vector of unknowns is x = [2 , 3 , V3 ]T . The power flow equations are f = [f P2 , f P3 , f Q3 ]T ,
where
f P2 (x) = 0 = V2 V1 [G21 cos (2 1 ) + B21 sin (2 1 )] + V22 G22 + V2 V3 [G23 cos (2 3 ) + B23 sin (2 3 )] P2
= 2 sin 2 + 4V3 sin (2 3 ) 0.6,
f P3 (x) = 0 = V3 V1 [G31 cos (3 1 ) + B31 sin (3 1 )] + V3 V2 [G32 cos (3 2 ) + B32 sin (3 2 )] + V32 G33 P3
= 5V3 sin 3 + 4V3 sin (3 2 ) + 0.8,
f Q3 (x) = 0 = V3 V1 [G31 sin (3 1 ) B31 cos (3 1 )] + V3 V2 [G32 sin (3 2 ) B32 cos (3 2 )] V32 B33 Q3
= 5V3 cos 3 4V3 cos (3 2 ) + 9V32 + 0.6.
The corresponding Jacobian is

2 cos 2 + 4V3 cos(2 3 )


4V3 cos (3 2 )
J =
4V3 sin (3 2 )

4V3 cos(2 3 )
4 sin(2 3 )

5V3 cos 3 + 4V3 cos (3 2 )


5 sin 3 + 4 sin (3 2 )
5V3 sin 3 + 4V3 sin (3 2 ) 5 cos 3 4 cos (3 2 ) + 18V3

With a maximum power flow mismatch of 0.1 MVA and initial guess of V2 = 130 and V3 = 130 , after 5
iterations, the final converged solution is V2 = 13.4680 and V3 = 0.9226 3.9898.

% ECE 476 Fall 2013


% Homework 8, Problem 2, 6.39 of GS&O
clear all
close all
% x = [t2 t3 V3]
P2 = 0.6;
P3 = -0.8;
Q3 = -0.6;
Y = -1i * [7 -2 -5;
-2 6 -4;
-5 -4 9];
B = imag(Y);
x = [pi/6 pi/6 1];
f = [B(2,1)*sin(x(1)) + B(2,3)*x(3)*sin(x(1)-x(2)) - P2;
B(3,1)*x(3)*sin(x(2)) + B(3,2)*x(3)*sin(x(2)-x(1)) - P3;
-B(3,1)*x(3)*cos(x(2)) - B(3,2)*x(3)*cos(x(2)-x(1)) - B(3,3)*x(3)^2 - Q3];
eps = 1e-4;
cnt = 0;
while abs(f(1))>eps || abs(f(2))>eps || abs(f(3))>eps
J = [B(2,1)*cos(x(1)) + B(2,3)*x(3)*cos(x(1)-x(2)) ...
-B(2,3)*x(3)*cos(x(1)-x(2)) ...
B(2,3)*sin(x(1)-x(2));
-B(3,2)*x(3)*cos(x(2)-x(1)) ...
B(3,1)*x(3)*cos(x(2)) + B(3,2)*x(3)*cos(x(2)-x(1)) ...
B(3,1)*sin(x(2)) + B(3,2)*sin(x(2)-x(1));
-B(3,2)*x(3)*sin(x(2)-x(1)) ...
B(3,1)*x(3)*sin(x(2)) + B(3,2)*x(3)*sin(x(2)-x(1)) ...
-B(3,1)*cos(x(2)) - B(3,2)*cos(x(2)-x(1)) - 2*B(3,3)*x(3)];
f = [B(2,1)*sin(x(1)) + B(2,3)*x(3)*sin(x(1)-x(2)) - P2;
B(3,1)*x(3)*sin(x(2)) + B(3,2)*x(3)*sin(x(2)-x(1)) - P3;
-B(3,1)*x(3)*cos(x(2)) - B(3,2)*x(3)*cos(x(2)-x(1)) - B(3,3)*x(3)^2 - Q3];
x = x - J\f;
cnt = cnt + 1;
end
Problem 3. Problem 6.40 of GS&O, 5th Edition
Solution. Using the same code as the previous problem with initial guess of V2 = 10 and V3 = 0.250, after 6
iterations, the final converged solution is V2 = 16.4388 and V3 = 0.1206 404.7242.

Problem 4. Problem 6.42 of GS&O, 5th Edition


Solution. The Y -bus is given as

j10
j5
j5
j10 j5 .
Y = j5
j5
j2
j7

In this problem, the state vector of unknowns is x = [2 , 3 , V2 , V3 ]T . The power flow equations are f = [f P2 , f P3 , f Q2 , f Q3 ]T ,
where
f P2 (x) = 0 = V2 V1 [G21 cos (2 1 ) + B21 sin (2 1 )] + V22 G22 + V2 V3 [G23 cos (2 3 ) + B23 sin (2 3 )] P2
= 5V2 sin 2 + 5V2 V3 sin (2 3 ) + 1,
f P3 (x) = 0 = V3 V1 [G31 cos (3 1 ) + B31 sin (3 1 )] + V3 V2 [G32 cos (3 2 ) + B32 sin (3 2 )] + V32 G33 P3
= 5V3 sin 3 + 2V3 V2 sin (3 2 ) + 1.5,
f Q2 (x) = 0 = V2 V1 [G21 sin (2 1 ) B21 cos (2 1 )] V22 B22 + V2 V3 [G23 sin (2 3 ) B23 cos (2 3 )] Q2
= 5V2 cos 2 + 10V22 5V2 V3 cos (2 3 ) + 0.5,
f Q3 (x) = 0 = V3 V1 [G31 sin (3 1 ) B31 cos (3 1 )] + V3 V2 [G32 sin (3 2 ) B32 cos (3 2 )] V32 B33 Q3
= 5V3 cos 3 2V3 V2 cos (3 2 ) + 7V32 + 0.75.
The corresponding Jacobian is


J
J = 11
J21
where

J21
and
J22 =

5V2 cos 2 + 5V2 V3 cos (2 3 )


2V3 V2 cos (3 2 )

5 sin 2 + 5V3 sin (2 3 )
J12 =
2V3 sin (3 2 )

5V2 sin 2 + 5V2 V3 sin (2 3 )
=
2V3 V2 sin (3 2 )

J11 =

5 cos 2 + 20V2 5V3 cos (2 3 )


2V3 cos (3 2 )


J12
,
J22

5V2 V3 cos (2 3 )
,
5V3 cos 3 + 2V3 V2 cos (3 2 )

5V2 sin (2 3 )
,
5 sin 3 + 2V2 sin (3 2 )

5V2 V3 sin (2 3 )
,
5V3 sin 3 + 2V3 V2 sin (3 2 )

5V2 cos (2 3 )
.
5 cos 3 2V2 cos (3 2 ) + 14V3

With a maximum power flow mismatch of 0.1 MVA and initial guess of V2 = 10 and V3 = 10 , after 5 iterations,
the final converged solution is V2 = 0.7768 18.2603 and V3 = 0.7348 22.6208.
% ECE 476 Fall 2013
% Homework 8, Problem 4, 6.42 of GS&O
clear all
close all
% x = [t2 t3 V2 V3]
syms t2 t3 V2 V3
x = [t2; t3; V2; V3];
P2
Q2
P3
Q3

=
=
=
=

-1;
-0.5;
-1.5;
-0.75;

Y = [-1i*10 1i*5 1i*5;

1i*5 -1i*10 1i*5;


1i*5 1i*2 -1i*7];
B = imag(Y);
f = [B(2,1)*V2*sin(t2)
B(3,1)*V3*sin(t3)
-B(2,1)*V2*cos(t2)
-B(3,1)*V3*cos(t3)

+
+
-

B(2,3)*V2*V3*sin(t2-t3) - P2;
B(3,2)*V3*V2*sin(t3-t2) - P3;
B(2,2)*V2^2 - B(2,3)*V2*V3*cos(t2-t3) - Q2;
B(3,2)*V3*V2*cos(t3-t2) - B(3,3)*V3^2 - Q3];

J = jacobian(f,x);
xval = [0 0 1 1];
fval = subs(f, x, xval);
eps = 1e-4;
cnt = 0;
while abs(fval(1))>eps || abs(fval(2))>eps || abs(fval(3))>eps || abs(fval(4))>eps
Jval = subs(J, x, xval);
fval = subs(f, x, xval);
xval = xval - Jval\fval;
cnt = cnt + 1;
end

You might also like