ECE 476 – Power System Analysis Fall 2014

```ECE 476 – Power System Analysis Fall 2014
Homework 8
Problem 1. Problem 6.38 of GS&O, 5th Edition
Solution. First, convert all values to per unit.
P
150 MW
= −1.5 p.u.
Sbase
100 MVA
Q
50 Mvar
=
= −0.5 p.u.
=−
Sbase
100 MVA
∆ymax
0.1 MVA
=
= 0.001 p.u.
=
Sbase
100 MVA
Ppu =
Qpu
∆ymax,pu
=−
The Y -bus for this system is
1
j0.1
1
− j0.1
Y =
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 sin θ2
.
−10 cos θ2 + 20V2
With initial guess of V¯2 = 1∠0◦ , after 4 iterations, the final converged solution is V¯2 = 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;
Y = [1/Xl -1/Xl;
1
-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
Y =  j2
j5
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(θ2 − θ3 )
4 sin(θ2 − θ3 )

−4V3 cos (θ3 − θ2 )
5V3 cos θ3 + 4V3 cos (θ3 − θ2 )
5 sin θ3 + 4 sin (θ3 − θ2 )
J =
−4V3 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 V¯2 = 1∠30◦ and V¯3 = 1∠30◦ , after 5
iterations, the final converged solution is V¯2 = 1∠3.4680◦ and V¯3 = 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 V¯2 = 1∠0◦ and V¯3 = 0.25∠0◦ , after 6
iterations, the final converged solution is V¯2 = 1∠6.4388◦ and V¯3 = 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
J12
,
J22
5V2 cos θ2 + 5V2 V3 cos (θ2 − θ3 )
−5V2 V3 cos (θ2 − θ3 )
,
−2V3 V2 cos (θ3 − θ2 )
5V3 cos θ3 + 2V3 V2 cos (θ3 − θ2 )
5 sin θ2 + 5V3 sin (θ2 − θ3 )
5V2 sin (θ2 − θ3 )
J12 =
,
2V3 sin (θ3 − θ2 )
5 sin θ3 + 2V2 sin (θ3 − θ2 )
5V2 sin θ2 + 5V2 V3 sin (θ2 − θ3 )
−5V2 V3 sin (θ2 − θ3 )
=
,
−2V3 V2 sin (θ3 − θ2 )
5V3 sin θ3 + 2V3 V2 sin (θ3 − θ2 )
J11 =
J21
and
J22 =
−5 cos θ2 + 20V2 − 5V3 cos (θ2 − θ3 )
−5V2 cos (θ2 − θ3 )
.
−2V3 cos (θ3 − θ2 )
−5 cos θ3 − 2V2 cos (θ3 − θ2 ) + 14V3
With a maximum power flow mismatch of 0.1 MVA and initial guess of V¯2 = 1∠0◦ and V¯3 = 1∠0◦ , after 5 iterations,
the final converged solution is V¯2 = 0.7768∠ − 18.2603◦ and V¯3 = 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
```