Sie sind auf Seite 1von 5

EXP.

NO:-
DATE:-

FORMATION OF Y-BUS BY INSPECTION METHOD

AIM:

To form Y-bus matrix by inspection method

SYSTEM DATA:

G1 G2

1 2

LINE DATA:

LINE BUS CODE LINE IMPEDANCE HALF-LINE CHARGE


NO. ADMITTANCE
1 1-2 0+j0.2 0+j0.01
2 2-3 0+j0.1 0+j0.02
3 3-1 0+j0.25 0+j0.03

1
Algorithm:

Step 1: Start

Step 2: read the number of buses, number of lines and line data.

Step 3: Initialize Y bus matrix (i.e) replace entire entries by zero.

Yij= -yij=Yij=off diagonal elements

Step 4: Form the Y bus matrix using the algorithm Yij = Yij, j=1 where Yii= diagonal

element.

Step 5: Display the Y bus in matrix form.

Step 6: Stop.

2
Flowchart

Start

Read the number of


buses, number of lines
and line data

Initialize Y bus matrix

Line number =1

Form the Y bus matrix using


the relevant algorithm.

Increment the line


number.

Is this the
last line?

Print Y bus matrix.

Stop

3
PROGRAM:

# include<iostream.h>
# include<complex.h>
# include<fstream.h>
# define NB 3+1
# define NL 3+1
void main()
{
int i,j,k,l,m,nb,nl,lno[NL],sb[NL],eb[NL];
complex zl[NL],ybus[NB][NB],hlc[NL];
ifstream fin;
fin.open ("ybus.dat");
ofstream fout;
fout.open ("ybus.out");
fin>>nb>>nl;
fout<<"\n FORMATION OF Y-BUS MATRIX BY INSPECTION METHOD \n"
<<"==================================================\n"
<<"\n no.of buses:"<<nb
<<"\n no.of lines:"<<nl
<< "\n line no. SB \t EB \t line imp. \t HLC \n";
for (i=1;i<=nl;i++)
{
for (j=1;j<=nb;j++)
ybus[i][j]=complex(0,0);
}
for (i=1;i<=nl;i++)
{
fin>>lno[i]>>sb[i]>>eb[i]>>zl[i]>>hlc[i];
fout<<lno[i]<<"\t"<<sb[i]<<"\t"<<eb[i]<<"\t"<<zl[i]<<"\t"<<hlc[i]<<"\n";
l=sb[i];
m=eb[i];
ybus[l][l]+=1/zl[i]+hlc[i];
ybus[l][l]+=1/zl[i]+hlc[i];
ybus[l][m]=-1/zl[i];
ybus[m][l]=-1/zl[i];
}
cout<< "\n YBUS MATRIX================ \n";
for (i=1;i<=nb;i++)
{
fout<< "\n";
for (j=1;j<=nb;j++)
fout<<ybus[i][j]<<"\t";
}
}

4
INPUT FILE:

33
1 1 2 (0,0.2) (0,0.01)
2 1 3 (0,0.1) (0,0.02)
3 2 3 (0,0.25) (0,0.03)

OUTPUT FILE:

FORMATION OF Y-BUS MATRIX BY INSPECTION METHOD


==================================================

No.of buses: 3
No.of lines: 3
Line no. SB EB line imp. HLC
1 1 2 (0, 0.2) (0, 0.01)
2 1 3 (0, 0.1) (0, 0.02)
3 2 3 (0, 0.25) (0, 0.03)

(0, -14.88) (0, 5) (0, 10)


(0, 5) (0, -8.87) (0, 4)
(0, 10) (0, 4) (0, -13.95)

RESULT:

Thus Y-bus is formed using inspection method.

Das könnte Ihnen auch gefallen