0% found this document useful (0 votes)
12 views22 pages

Psa Lab Till Exp5

Uploaded by

sweetcandy.vxe
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)
12 views22 pages

Psa Lab Till Exp5

Uploaded by

sweetcandy.vxe
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/ 22

'JI

-3
~
~
~ Department of Electrical Engineering
~

---0 Delhi Technological University


~
Delhi-110042
~
~
~ .------i •••••

~ ScMJ.-t1nllefo-
ea.e-
HiVMdatv

~
-$
~
~
..
,_, .,.
a....
rJtlV Of' IMV

s___,,.c:a.e-
~
rJOVMdHtN

~
Advanced Power System Analysis I

~
~ Laboratory Manual
~

~
~

~
E~+EC' .
.......
~

~
=-'1-------------------
=--
~ -- - -- - - - -
----·

,
~

~
List of Experiments
~
s. Title of Experiment Addressed
No cos
41 1 To compute the bus admittance matrix (Ybus) for a given COl
V
power system network.
-4 2 To compute the power-flow solution of a given power CO2
,/

~ system network using the Gauss-Siedel method.


3 To compute the power-flow solution of a given power CO2
~ v
system network using the Newton-Raphson algorithm.
~ 4 To compute the power-flow solution of a given power CO2
system network using the fast-decoupled power-flow
~
algorithm.
~ 5 To compute the optimal dispatch in a given three- CO3
generator system (a) without and (b) with transmission
~
losses.
~ 6 To compute the bus impedance matrix of a given power CO4
~ system network in MATLAB using Z bus building
algorithm.
--9 7 To carry out symmetrical fault analysis in a given power CO4
system network using MATLAB.
~

--
~
8
.
Determine the critical clearing time for a given single
machine infinite bus system.
After completion of this course the students will be able to
cos

~ CO 1. Model power system components and fonnulate network matrices in


Power Systems.
~
CO2. Carry out power flow analysis using Gauss-Siedel , Newton Raphson,
~ FDLF algorithms.


~
CO3. Carry out economic load dispatch and op~imal power flow .
CO4. Implement symmetrical fault analysis in Power Systems.
COS. Carry out transients and small signal stability analysis in Power Systems.
..
!!t
~

::.9
~
i
$
~
~

~
EXPERIMENT 1
~
Aim: To compute the bus admittance matrix Ybus for the small power system
~ network given below using MATLAB mfile/Python/C++
~
~
~
~
~
~
k.
4
~
The branch data / line data for the above network is given below:
~
From To R X B
~ bus no. bus no. (p.u) (p.u) (p.u)
~ 1 2 0.02 0.1 0.03
1 3 0.02 0.1 0.03
~ 1
2
4
4
0.02 0.1 0.03
0.02 0.1 0.03
3 4 0.02 0.1 0.03

~
Theory: In an AC power system network, the relationship between the
injected node currents and the node voltages is given by

~
l~
T~
.. ~
~
where
I = vector of injected node currents
Ybus = bus admittance matrix
V= vector of node voltages
Each component element of the interconnected network is referred to as abranch.
The branch or the component is connected between two nodes of the network, or be-
tween anode and the referenee node. For the puryose of modeling, we will repre-
sent a branch by either the branch impedance z, or the branch admittance y. The
branch impedance zis also referred to as the primitive impedance, and the branch ad-
mittance y is referred to as the primitive admittance. In terms of the primitive ad-
mittances, the steps in developing the bus admittance matrix or Ybus for a ~ven
~ network are as follows:
~

~ Steps in Constructing the Ybus by Inspection


~~
L The Ybus is symmetric.
~
2. Y;;, the self-admittance (diagonal term),is equal to the sum of the primitive ad-
~
mittances of all _the components connected to the ith node.
~
3. Yi;, the ifth element of th.e Ybus (off-diagonal element), is equal to the negative
4 of the primitive admittance of all components connected between nodes i and
~ j. It is to be noted here that if more than one component is connected in par-


-A
allel between the two nodes, the equivalent primitive admittance of the com-
ponents is first obtained before determining the entry in the Ybus.

~
!!I
.J
~
,
"'
~
Consider the five-bus system shown in Figure E9.4. The parameters for the line data
~ and the transformer data are provided in Table E9.4. The table provides information
regarding the network topology by providing the bus numbers to which the branches
~
are connected. In addition, the table provides the series impedance and the line charg-
~ ing susceptance for each line in p.u. on an appropriately chosen base. Determine the
-bus admittance matrix Ybus for the given system.
I~

0
~
~
I ~ 10--t2..,.__---:.-a4
Ti
,-r
T,.
~
Figure E9,4 Single--line
4 3 diagram for Example 9.4.
._§
_,
TABLE E9.4 . TRANSFORMER AND -z· I
-9 TRANSMISSION LINE DATA
..__
/

~ From Bus# To Bus# R (p.u.) . X (p.u.) B (p.u.)


r:,· 1-· 2. 0.004 0.0533 0
r.. ·.
q
2 3 0.02 0.25 0.22
iii _)

3 4 0.02 0.25 0.22


;a
2 4 0.01 0.15 0.11
~
4 5 0.006 0.08 0
4
Solution Note that the data provided are in terms of the primitive impedances for the
=--

.-9
series impedance data. The line charging is provided in terms of the total primitive ad-
•mittance B. We model each transmission line using the 1r-equivalent model. Before
assembling the Ybus, we first calculate the primitive admittance of each branch. All the
admittances are in per unit.
:!I
Ill
~
1
Y12 = 0.004 +\ 0_0533 = 1.400 - j 18.657

1
)123 = 0.02 + j0.25 = 0.318 - j3.975

.Y34 = Yn = 0.318 - j3.975


1
Yz4 = 0.01 + j0.15 = 0.442 - j6.637

y45 = 0.006 ! j0.08 = 0.932 - jl2.43

Having calculated the primitive admittances, we can now start assembling the ele-
ments of the Yt,u,• For the purpose of clarity, we will individually form each element
and then display the elements in matrix form. ,,

~ = Yu = 1.400 - jlS.657
Y12 = Yi1 = - Yi2 = -1.400 + j 18.657

~
YiJ = Yi.. = y 15 = ¥J1 = Y.t1 = Ys1 = 0
B/ -~-
•~4
"z22 = Yu + .Y2J + .>'24 + J•,., 223 + JT

~
= 1.400 - j18.657 + 0.318 _: j3.975 + 0.442 - j6.637 + j0ll + j0.055
= 2.16 - j29.104
Y23 = Y32 = -123 = -0.318 +. j3.975

~
~
Yi. = l':.2 = -.Y24 = -0.442 +
Yis = Y;i = 0
j6.637

~ V
.L33 =)In+ Y34
+ .Bn +
lT
,B'J4
lT

*
~
= 0.318 - j3.915 + 0.318 - j3.975 +
Y34 = Y43 = -y34 = -0.318 + j3.975 .
j0.11 + j0.11 = 0.636 - j7.73

l";s = fs3 = 0
~


24
Y44 = '24 + .>'34 + Y4s +. j~ + j8;
,

= 0.442 - j6.637 + 0.318 - j3.975 + 0.932 - j12.43 + j0.055


~ + j0.11 = 1.692 - j22.877
= Ys .. = -y45 = -0.932 + j 12.43
~
~5

= y45 = 0.932 - j 12.43

_,
~5
~
I

---_)

~
~
~
._ Having calculated all the elements of the Ybou we are now in aposition to write the
Y1,m in matrix form.
-
r4i (1.40-j18.66) (-1.40 +j18.(,6) 0 0 0
G (-1.40+jl8.66) (2.16-j29.10) (-OJ18+j3.98) (-0.442+j6.64) 0

,_--
Y. • O· (-0.318+j3.98) (0.636-j7.73) (-0318+j3.98) 0
0 (-0.442+j6.64) (-OJ18+j3.98) (1.6gi-; 22.88) (-0.932+j12.43)
0 0 0 (-0.932+j12.43) (0.932-j12.43)
~
~
Procedure:
~ (a) Using the method as explained, compute the Ybus for the given power system
~ network manually.
~ (b) Write codes given below to build the Ybus from the line / branch data. Use
a the following steps:
Stepl: Type in the branch data (i.e. R, X and B as given) in a matrix 'D'.
~
'D' should contain five columns and as many rows as that in the
given branch data / line data of the given network. The five
columns correspond to 'From bus number', 'To bus number', R, X
and B, respectively. Check if data of B corresponds to Btotat or B112.
Step 2: Type the code given below and save it in a MATLAB mfile. Save
t~e code as amit 1 if Amit is your first name (no blank spaces in
between).
Step 3: Debug and run the code to generate Ybus•
Step 4: Check the programme results with the manually calculated Ybus•
Code in MATLAB mfile:

clc
clear all
nb=4; % nb is number of buses in the network
z=inf(nb, nb);
D=[l 2 0.02 0.1 0.03;1 3 0.02 0.1 0.03;1 4 0.02 0.1 0.03;2 4 0.02 0.1 0.03;3 4 0.02
0.1 0.03); % Five columns are for 'From bus', 'To bus', 'R', 'X' and 'B'
r=size (D);
rows=r(l) ;
for i=l:rows
z ( D( i, 1) , D ( i, 2) ) =D ( i, 3) +j * D ( i, 4) ;
z ( D ( i, 2) , D ( i, 1) ) =z ( D( i, 1) , D( i, 2) ) ;
b ( D ( i, 1) , D ( i, 2) ) =D ( i, 5) ;
b ( D ( i, 2) , D( i, 1) ) =b ( D( i, 1) , D( i, 2) ) ;
end
for i=l:nb
yO(i)=j*s um(b(i, :))/2;
end
for i=l:nb
for m=l:nb
if i~=m
Y(i,m)=-1 /z(i,m);
else
Y (i,m) =yO (i) +sum(l. /z (i,:));
end
end
end
~----------------------------~-r

EXPERIMENT 2

Aim: To carry out power-flow / load-flow of a given i?ower system network


using Gauss-Siedel method

r~

~
~ '

t:

~
, V3
So3 = 2.8653 + jl .2244
I

In the above network, all the transmission lines are identical. For each line, the
~ shunt element is a capacitor with an adm1ttance of Ysh j 0.01 while each series
r4 element is an inductor with an impedance of Zse j 0 .1.

~ 1. Theory:
,...,.,,
4
A
~

'~
~
JI
~
JI,
rp1

••
r.
~

-• Consider Case I of the power flow problem: given Vi ,S2, S3, • • • , Sn, find S1 ,l'z, V3,
... , "Yn. We use a form of (10.3) repeated here for convenience,

•-s
n

Si= Vi LYfkvr (10.3a)


k=I

--
n
S; =V;Ir:v: i =2, I • • 'n (10.3b)

--
k:a I

Note: If we know Vi, Yi, ... , Yn we can solve for S1 explicitly using (10.3a). Since
we already do know Yi, it only remains to find Vi, v;, . . . , ~. These n - 1 un-

-.- knowns may be found from the n - l equations of (10.3b). Thus, the heart of the
problem is the solution of n - 1 implicit equations in the unknown vi, ~, . . . ,
Yn, where Vi and S2, S3, . . , , Sn are known. Equivalently, taking complex conju-

-- gates, we can replace (10.3) by


It

Sj =Vf ~ f;k Vx i =2, 3, ... , n (10.6)

~
- k=l

We now rearrange {10.6) in a form in which a solution by iteration may be attempt-


ed. It should be noted that there are alternative ways of setting up the problem.

t
- Dividing (10.6) by Yf and separating out the Y;; term, we can rewrite (10.6) as
s~
~*=Vu)',·+
l;Y:
n
11
k
.iJI./"YI
~ ~L l
0

=2 3
, , , • •, n (10.7)
V; k=l
t k1i
.
' or, rearrangmg,
1 s: II
V; =;7 y• - ~fik~ i = 2, 3, ... , n (10.8)
1 U l k=l
k Pi
l 2. Procedure: First compute the bus admittance matrix. Check that
--
I

'11 - jl9.98 jlO j1O

4
-- Ybus = jl0
/10
- j19.98
jlO
jlO
- j19.98

Type the code given below for the Gauss-Siedel algorithm in a MATLAB mfile.
19 Save the code as amit2 if Amit is your first name (no blank spaces in between).

---- Debug the code and run it to get the final results as:

82] --:3° ]
41 [
83 =[ -10°
._ V3 O.9S·p. u.

-a
.9 Code in MATLAB mfile:
~ clc
clear all
~ %Data%
slb=l;pvb=l;pqb=l;nb=slb+pvb+pqb;
.s Y=[-j*19.98 j*lO j*lO;j*lO -j*19.98 j*lO;j*lO j*lO -j*l9.98];
y=abs,(Y) ;phj.=_angle (Y);
v(l)=l.O;th(l)=O;v(2)=1.05;
~ Psp12)=0.6661;Psp(3)=-2.8653;Qsp(3)=-l.2244;
%initial guess for unknown theta·and v %
th(2)=0;v(3)=1.0;th(3)=0;
~ m=180/pi;

-
%Program for Gauss Siedel algorithm%
err=l. 0; t=O; %• '•t' is the number of iterations of the algorithm
while err>le-4
for i=2:3
~ Px(i)=O;Qx(i)=O;
for k=l:3
a end
Px(i)=Px(i)+v(i)*v(k)*y(i,k)*cos(th(i)-th(k)-phi(i,k));
Qx(i)=Qx(i)+v(i)*v(k)*y(i,k)*sin(th(i)-th(k)-phi(i,k));

a end
for i=l:3

a end
V(i)=v(i)*(cos(th(i))+j*sin(th(i)));

for i=2:3

,,
~ vint(i)=O;

I
-


• for k=l:3

• if k~=i
vint(i)=v int(i)+Y (i,k)*V( k);


else • • • •
end
end

• end
for i=2:nb


if i<=(slb+p vb)
V ( i) = ( ( ( Psp ( i) -j *Qx ( i) ) / conj (V ( i) ) -vint ( i) ) /Y ( i, i) ) ;
else •

• end
end
V(i)=((( Psp(i)-j* Qsp(i))/ conj (V(i))-v int(i))/Y (i,i));

for i=2:nb
'

if i<=(slb+p vb)
th(i)=an gle(V(i) );
else
v(i)=abs (V(i));
th(i)=an gle(V(i) );
end
end
delp=Psp -Px;
delq=Qsp -Qx;
delpqx= [delp'; delq'];
err=abs{ rnax{del pqx));
t=t+l;
end
[v' rn*th']
'I

~
~
-
~
EXPERIMENT 3
~
r-~ Aim: To compute the power-flow solution of the given power system network
using the Newton-Raphson algorithm.
~
~ Pc 2 =0.6661

~
.......... f V2 i =I.OS

V3
So3 = 2.8653 + jJ .2244

For the above network, all the transmission lines are identical. In the equivalent-
pi representation of each line, the series impedance equals Zse = j 0.1 while each
of the shunt admittances (equal on both sides) equal Ysh = j 0.01. This gives the
rI
bus admittance matrix Ybus as

- jl9,98 jlO jlO


Ybus= jlO - j19.98 jlO
jlO jlO - j19.98
Theory: In the above 3-bus system, there are three buses - the frrst bus is the
slack bus, the second bus is a PV bus and the third bus is a PQ bus. Hence the
unknown variables to be computed are 9 9 and V Hence, the Newton-
2
,

3
3

Raphson algorithm for power-flow of the above three bus system is given by
xl =XO+ ,-1flf

where

92
JC = 83
l~I

r• BP2
a82
a]'l
aP2
a63
aP3
a~
a IVjl
aP3
J(x) = a ll'31
ae2 a93
aQ3 BQl aQ3
as2 aB3 a IV31
and L\f on the right-hand side is given by

Procedure: Type the code given below for the Newton-Raphson algorithm in a
MATLAB mfile. Save the code as amit3 if Amit is your first name (no blank
spaces in between). Debug the code and run it to get the final results as:
_30
-10°
0.95 p. u.
Code in MATLAB mfile:
clc
clear all
%Data%
slb=l;pvb=l;pqb=l;nb=slb+pvb+pqb;
Y=[-j*l9.98 j*lO j*lO;j*lO -j*l9.98 j*lO;j*lO j*lO -j*l9.98];
y=abs(Y);phi=angle(Y);
v(l)=l.O;th(l)=O;v(2)=1.05;
Psp(2)=0.666l;Psp(3)=-2.8653;Qsp(3)=-l.2244;
%initial guess for unknown theta and v %
th(2)=0;v(3)=1.0;th(3)=0;
cc=l80/pi;
THV=[O;O;l];
%Program for Newton-Raphson algorithm%
err=l.0; t=O; % 't' is number of iterations of the algorithm
while err>le-4
for i=(slb+l) :nb
Px(i)=O;Qx(i)=O;
for k=l:3
Px(i)=Px(i)+v(i)*v(k)*y(i,k)*cos(th(i)-th(k)-p hi(i,k));
Qx(i)=Qx(i)+v(i)*v(k)*y(i,k)*sin(th(i)-th(k)- phi(i,k));
end
end
% formation of Jacobian 'J' %
% P-theta jacobian %
JPth(l,l)=-Qx(2)-(((v(2))A2)*abs(Y(2,2))*sin( angle(Y(2,2))));
JPth(l,2)=v(2)*v(3)*abs(Y(2,3))*sin(th(2)-th( 3)-(angle(Y(2,3))));
JPth(2,l)=v(3)*v(2)*abs(Y(3,2))*sin(th(3)-th(2 )-(angle(Y(3,2) )));
JPth(2,2)=-Qx(3)-(((v(3))A2)*abs(Y(3,3))*sin( angle(Y(3,3))));
% P-v jacobian %
JPv(l,l)=v(2)*abs(Y(2,3))*cos(th(2)-th(3)-(an gle(Y(2,3))));
JPv(2,l)=(Px(3)/v(3))+(v(3)*abs(Y(3,3))*cos(a ngle(Y(3,3))));
% Q-theta jacobian %
JQth(l,l)=-v(3)*v(2)*abs(Y(3,2))*cos(th(3)-th (2)-(angle(Y(3,2))));
JQth ( 1, 2) = Px ( 3) - ( ( (v ( 3) ) A2) * abs (Y ( 3, 3) ) * cos ( ang 1 e ( Y ( 3, 3) ) ) ) ;
% Q-v jacobian %
JQv(l,l)=(Qx(3)/v(3))-(v(3)*abs(Y(3,3))*sin(a ngle(Y(3,3))));
J=[JQth JQv;JPth JPv];
for p=l:pgb
delq(p)=Qsp(p+slb+pvb)-Qx(p+slb+pvb);
end
for p=l: (pvb+pqb)
delp(p)=Psp(p+slb)-Px(p+slb);
end
delPQ=[delq';delp'];
delthv=THV+(inv(J)*delPQ);
for p=(slb+l) :nb
th(p)=delthv(p-1);
end
for p=(slb+pvb+l) :nb
v(p)=delthv(p+pqb-slb);
end
THV=delthv;
err=max(abs(delPQ))
t=t+l;
end
[v' cc*th']
WF1fi?t1:WG:liilft ct46WE;&W4 1 1 S e ,+

EXPERIMENT 4

Aim: To compute the power-flow solution of the given power system network
using the fast-decoupled power-flow algorithm.

Pc 2 = 0.6661

............-.. V3
Sol = 2.8653 + j] .2244

For the above network, all the transmission lines are identical. In the equivalent-
pi representation of each line, the series impedance equals Zse = j 0.1 while each
of the shunt admittances (equal on both sides) equal Ysh = j 0.01. This gives the
bus admittance matrix Ybus as

- jl9.98 jlO jlO


Ybus = jlO - j19.98 jlO
jlO jlO - j19.98
Theory: The advantage of the fast-decoupled power-flow algorithm is that the
Jacobian matrices are constants. Hence, their inverses are precalculated and
stored before the iterative loop starts. Since the usually large Jacobian matrices
are not required to be inverted in every iteration, time taken by each iteration is
very less. The form of the fast-decoupled power-flow algorithm is given by
= AP(r')
- B ~(I'
-BA IVP' = ~Q(x1
where
AP = rv1-1 AP and AQ = (Vr1AQ
In the above 3-bus system, there are three buses - the first bus is the slack bus,
the second bus is a PV bus and the third bus is a PQ bus. Hence the unknown
variables to be computed are 8 8 and V Hence, the fast-decoupled power-
2
,

3 3
.

flow algorithm for the above three bus system is given by


aP2 "

-[-19.98
10 -~~-98] [:::J = ~~
111;1
And
AQ3)"
-( .:..19.98) '11¥';1" =( 1v;1
• I

Procedure: Type the code given below for the fast-decoupled power-flow
algorithm in a MATLAB mfile. Save the code as amit4 if Amit is your first
name (no blank spaces in between). Debug the code and run it to get the final
results as
l

Code in MATLAB mfile:


clc
clear all
%Data%
slb=l;pvb=l;pqb=l;nb=slb+pvb+pqb;
Y=[-j*19.98 j*lO j*lO;j*lO -j*19.98 j*lO;j*lO j*lO -j*19.98];
y=abs(Y);phi=angle(Y);
B=imag(Y);
v(l)=l.O;th(l)=O;v(2)=1.05;
Psp(2)=0.6661;Psp(3)=-2.8653;Qsp(3)=-1.2244;
%initial guess for unknown theta and v %
th(2)=0;v(3)=1.0;th(3)=0;
cc=180/pi;
TH=[O;O];
V=l;
%jacobian for P-theta %
Jpth_old=-B(slb+l:end,slb+l:end);Jpth=inv(Jpth_old); % inverse of matrix precalculated
and stored before iteration loop starts
%jacobian for Q-v %
Jqv_old=-B(slb+pvb+l:end,slb+pvb+l:end);Jqv=inv(Jqv_old); % inverse of matrix
precalculated and stored before iteration loop starts
%Program for Newton-Raphson algorithm%
err=l.0; t=O; % 't' is number of iterations of the algorithm
while err>le-4
for i=(slb+l) :nb
Px(i)=O;
for k=l: nb
Px(i)=Px(i)+v(i)*v(k)*y(i,k)*cos(th(i)-th(k)-phi(i,k));
end
end
% P-theta loop%
for p=l: (pvb+pqb)
delp(p)=(Psp(p+slb)-Px(p+slb))/v(p+slb);
end
TH=TH+(Jpth*delp');
for p=(slb+l) :nb
th(p)=TH(p-1);
end
% Q-v loop%
for i=(slb+pvb+l) :nb
Qx(i)=O;
for k=l:nb
Qx(i)=Qx(i)+v(i)*v(k)*y(i,k)*sin(th(i)-th(k)-phi(i,k));
end
end

- for p=l:pqb

end
delq(p)=(Qsp(p+slb+pvb)-Qx(p+slb+pvb))/v(p+slb+pvb);

-I V=V+(Jqv*delq');
for p=l:pqb

end
v(slb+pvb+p)=V(p);

delPQ=[delp';delq'];
err=max(abs(delq))

• end
t=t+l;

[v' cc*th']

I
EXPERIMENT 5

Aim: To compute the optimal dispatch in the three-generator system given


below (a) without and (b) with transmission losses.

~
~

~
"I~
,,,~
':, The fuel cost functions of the above three generators are given as

t c1 = 0.001562PJ1 + 7.92Pc1 + 561 $/hr I

I) c2 = 0.00194PJ2 + 7.8SPc2 + 310 $/hr

c3 = 0.00482PJ3 + 7.97Pc 3 + 78 $/hr


'
~ The total active power demand is 850 MW.
~ The transmission losses are given as Ploss = 0.00003PJ1 + 0.00009PJ2 +
D 0.00012PJ3 MW.

t
t
~

~
......,.rr ew::::::;• s i E, a >d k if 144, ,¥ \51 LI' 2 i t9 ; ti 'Si z i hd ► F+& 4¥! di h

Theory: (a) Without transmission loss, the optimal dispatch rule is given as

IC 1 = IC 2 = IC 3 = A where ICi = ddc1 , i = 1,2, ... 3


PGi

From the three generators' fuel cost functions, the above equations can be
written in matrix form as

0.003124 0 0 -1 -7.92
0 0.00388 0 -1 -7.85
I

0 0 0.00964 -1 -7.97
1 1 1 0 850

The above equations are linear, of the form [A] [X] = [B] and can be solved
very easily using [X] = [A]- 1 [BJ.

(b) With transmission losses, the optimal dispatch rule is given as L1 IC 1 =


L2 IC2 = L3 IC3 = A where Li == 1-8~loss , i = 1, 2 ... 3.
oPGi

Thus, after putting values of the parameters given for the system, the first
equation becomes L1 IC1 = A i.e. 1-!~1l oss = A, which can be written as
oPG1

0.003124PG1 + 7.92
--------=A
1 - (0.00006PG1)

or, 0.003124 PG 1 + 0.00006APG1 = A - 7.92.


The above equation pertains to generatin g unit I. Similarly , the equations for
generatin g units 2 and 3 can be written. After putting all three equations in the
matrix form, we get,
Ni 4:t,iNiWiF!i§iitiJ I, NF+ EN I 1'85Witi

[
0.003124 + 0.00006 A
0 .
0
0.00388 + 0.00018 A
0
0 j [Pei]
Pc2
0 0 0.00964 + 0.00024 pG3

~
- 7.92]
= A- 7.85
-7.97

It can be observed that with transmission losses included, the above equations
have become nonlinear, unlike in part (a). They have now to be iteratively
solved after assuming an initial value of A. This method is known as the
lambda iteration method. As a good approximation, we can choose the value
of A which was obtained in part (a) i.e. without transmission losses.

Procedure: Type the code given below in a MATLAB mfile. Save the code
as amit5 if Amit is your first name (no blank spaces in between). Debug the
code and run it to get the fmal results.

Code in MATLAB mftle:


clc
clear all
a=[0.003124 0 0 -1;0 .00388 0 -1;0 0 .00964 -1;1 1 1 OJ;
pd=850; % pd stands for total demand
b•[-7.92;-7.8 5;-7.97;pd];
x•inv(a)*b;
lam=x(end); % lam stands for lambda
err=lOO;t=O;
while err>•le-1
al=[0.003124+ 0.00006*lam O O;O 0.00388+0.000 18*lam O;O O 0.00964+0.000 24*lam];
bl=[lam-7.92; lam-7.8S;lam -7.97];
pg=inv(al)*b l;
ploss=0.00003 *(pg(l)A2)+0. 00009*(pg(2)A 2)+0.00012*(p g(3)A2);
if sum(pg)-ploss- pd>=O
lam=lam-0.01;
else
lam=lam+0.01;
end
err=abs(sum(p g)-ploss-pd) )
t~+l) ).
end
~
-
=
~
EXPERIMENT 6

~
• Aim: To compute the bus impedance matrix of a given power system network
in MATLAB using Z bus building algorithm .

•• l5

•• 1-- ---2

~
- lJ
3

~ Reference node

For the above network, take z1 =jl.O, z2 = jl.25, z3 = j0.1, z4 = j0.2,


Z5 = j0.1.

Theory:
The Ybus /Zbus matrix constitutes the models of the passive portions of the
power network. The impedance matrix is a full matrix and is most useful for
short circuit studies. An algorithm for formulating [Zbus] is described in terms
of modifying an existing bus impedance matrix designated as [Zbus]otd· The
modified matrix is designated as [Zbus]new• The network consists of a reference
bus and a number of other buses. When a new element having self impedance
Zb is added, a new bus may be created (if the new element is a tree branch) or
a new bus may not be created (if the new element is a link). Each of these two
cases can be subdivided into two cases so that Zb may be added in the
following ways or modifications:

You might also like