Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
13Activity
0 of .
Results for:
No results containing your search query
P. 1
Bus Admittance Impedance. Matrix Algorithm. Matlab

Bus Admittance Impedance. Matrix Algorithm. Matlab

Ratings: (0)|Views: 2,293|Likes:
Published by Khurram Hashmi
generates bus Impedance and admittance matrix
generates bus Impedance and admittance matrix

More info:

Published by: Khurram Hashmi on Feb 25, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/08/2013

pdf

text

original

 
 Load Flow Calculations in Matlab
Generating Bus. Impedance & Admittance Matrices
byEngr. Khurram HashmiBS. Electrical Power Engineering(FOE, Univ. of Central Punjab)
For those of you who are interested in automating your power / load flow calculations. This mightprovide an initial step. When invoked in Matlab workspace, This algorithm asks for the total number of busses in your system, followed by prompts asking for impedances between busses. It generates a BusImpedance Matrix (called ZMAT here) and a Bus admittance Matrix ( called YMAT here). A dummyvariable ( a ) is used as input to the algo. While being invoked. You can assign any integer value, theoperation is regardless of it.Paste this in an M.file and save with the function namePlease follow the Matlab syntax when calling function in Main
>>[ZMAT,YMAT]=admittmat(1)
 
 
 function[ZMAT,YMAT]=admittmat(a)
 
%ANY NUMBER OF BUSSES WITH ANY IMPEDANCE BETWEEN THEM
 
n=input('indicate the total number of busses .n. =');
 
ZMAT=zeros(n,n);%initializing matrix
 
YMAT=zeros(n,n);%initializing matrix
 
%..Input Algo...
 
%possib=n^2 ;%total elements
 
rw=1 ;
 
col=1;
 
for(rw = 1:n)
 
for(col =rw:n)
 
if(col == rw)
 
ZMAT(rw,col) = 0;%this calculated later on
 
else
 
str=['Impedance between bus',num2str(rw),'&','bus',num2str(col)]; %output display string
 
disp(str)%
 
%IMPEDANCE MATRIX ENTRIES
 
ZMAT(rw,col) = input('entry =')*(-1);
 
ZMAT(col,rw) = ZMAT(rw,col);%corresponding in lower diagonal
 
%ADMITTANCE MATRIX ENTRIES
 
YMAT(rw,col) = inversion(ZMAT(rw,col));
 
YMAT(col,rw) = YMAT(rw,col);%corresponding in lower diagonal
 
end end end
 
clc;
 
%calculating the Bus Admittance and Impedances
 
YMATdiag=(-1)*sum(YMAT,2,'double');%adding row wise
 
ZMATdiag=(-1)*sum(ZMAT,2,'double');%adding row wise
 
for(cntr = 1:n)
 
YMAT(cntr,cntr) = YMATdiag(cntr,1);%placing in diagonal
 
ZMAT(cntr,cntr) = ZMATdiag(cntr,1);%placing in diagonal
 
end
 
%----INVERSION--------------------------
 
function[inverse]= inversion(value);
 
if( value == 0)
 
inverse = 0;else
 
inverse = inv(value);
 
end
 
 
 
Notes on the Algorithm:
Each element of a bus impedance or admittance matrix corresponds to the impedance or admittancethe busses share with each other (corresponding to the index number). A negative sign is supplementedwith non Diagonal elements.YMAT=

 
Y12
gives the admittance Busses 1 and 2 share
Y13
.. the admittance Busses 1 ad 3 share and so on.Whereas
Y11
gives the self admittance of the Bus 1 i.e. the sum of impedances connected to bus 1Note that:
Y11 =Y12 + Y13
 ZMAT and YMAT (n by n) matrices are initialized with zeroes
ZMAT
=
 
YMAT
=
 
 Elements in the Diagonal are omitted as zeros. Whereas, only the upper diagonal elements areprompted for and multiplied by (-1). These form corresponding elementsZMAT=

 
The algorithm reflects these in the lower diagonal of the matrixZMAT=

 
Partially, Admittance matrix is generated by inversing each of these elementsYMAT=

 
Adding the rows we get the diagonal elementsZMATdiagonal =
  
 Similarly for the Admittance diagonal elementsYMATdiagonal =

 These are placed in the diagonals respectively
ZMAT
=

 
Similarly,

Activity (13)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Joyjoy C Lbanez liked this
Khurram Hashmi liked this
Khurram Hashmi liked this
Khurram Hashmi liked this
Kheang Kietheng liked this
Inan Günay liked this
mmsm2012 liked this
Emad M Emadd liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->