0% found this document useful (0 votes)
191 views14 pages

Lab 1 6 PDF

The documents contain examples of MATLAB programs for calculating electrical parameters of transmission lines including reactance, admittance matrix formation, and bus building algorithms. The programs demonstrate calculations for single phase and three phase systems, as well as symmetrical and unsymmetrical configurations.

Uploaded by

Dhamo Daran
Copyright
© Attribution Non-Commercial (BY-NC)
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)
191 views14 pages

Lab 1 6 PDF

The documents contain examples of MATLAB programs for calculating electrical parameters of transmission lines including reactance, admittance matrix formation, and bus building algorithms. The programs demonstrate calculations for single phase and three phase systems, as well as symmetrical and unsymmetrical configurations.

Uploaded by

Dhamo Daran
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 14

Ex No : 1 Program :

clc; clear all; D=input('Enter the distance'); d=input('Enter the diamiter'); R=d/2 Rm=0.7788*R; L=4e-4*log(D/Rm); C=pi*(8.854e-9)/log(D/Rm); XL=2*pi*50*L XC=1/(2*pi*50*C)

Single Phase Two Wire System

fprintf('\t inductive reactance is =%d',XL); fprintf('\t Capacitive reactance is = %d',XC);

Output :
Enter the distance 2 Enter the diamiter 5.78e-2 R =0.0289 XL =0.5639 XC =5.1348e+005 inductive reactance is =5.638608e-001 Capacitive reactance is = 5.134791e+005

Ex No : 2
Program : clc; clear all;

Three Phase Symmetrical and Unsymmetrical System

d=input('Enter the diameter'); R=d/2 Rm=0.7788*R; Ca=input('Enter Case Number for Symmetrical --> 1 & for Unsymmetrical --> 2'); switch Ca case 1 D=input('Enter the distance'); case 2 Dab=input('Enter the Dab distance'); Dbc=input('Enter the Dbc distance'); Dca=input('Enter the Dca distance'); D=(Dab*Dbc*Dca)^(1/3); end L=2e-4*log(D/Rm); C=(2*pi*(8.854e-9))/log(D/Rm); XL=2*pi*50*L XC=1/(2*pi*50*C) fprintf('\t Inductive reactance is =%d',XL); fprintf('\t Capacitive reactance is = %d',XC);

Output:
For Symmetrical Enter the diameter 5.64e-2 R =0.0282 Enter Case Number for Symmetrical --> 1 & for Unsymmetrical --> 2 1 Enter the distance 2 XL =0.2835 XC =2.5814e+005 Inductive reactance is =2.834710e-001 Capacitive reactance is = 2.581425e+005

For Unsymmetrical Enter the diameter 5.64e-2 R =0.0282 Enter Case Number for Symmetrical --> 1 & for Unsymmetrical --> 2 2 Enter the Dab distance 2 Enter the Dbc distance 4 Enter the Dca distance 3 XL =0.3065 XC =2.7910e+005 Inductive reactance is =3.064803e-001 Capacitive reactance is = 2.790959e+005

Ex No :3

Three Phase Horizontal Conductor

Program:
clc; clear all; d=input('Enter the Diameter'); R=d/2 Ds=input('Enter the Gmr value'); Dab=input('Enter the Dab Distamce'); Dbc=input('Enter the Dbc Distance'); Dca=input('Enter the Dca Distance'); Dm=(Dab*Dbc*Dca)^(1/3); L=0.2*log(Dm/Ds) C=0.56/log(Dm/R) XL=2*pi*50*L XC=1/(2*pi*50*C) fprintf('\t inductive reactance is =%d',XL); fprintf('\t Capacitive reactance is = %d',XC);

Output:
Enter the Diameter 5.64e-2 R =0.0282 Enter the Gmr value 1.5e-2 Enter the Dab Distamce 15 Enter the Dbc Distance 15 Enter the Dca Distance 30

L =1.4278 C =0.0861 XL =448.5443 XC =0.0370 Inductive reactance is =4.485443e+002 Capacitive reactance is = 3.698950e-002

Ex No:4

Three Phase Bundled Conductor

Program:
clc; clear all; D=input('Enter the Diameter'); R=D/2 Ds=input('Enter the Gmr value'); d=input('Enter the Bundeld Space'); Dab=input('Enter the Dab Distamce'); Dbc=input('Enter the Dbc Distance'); Dca=input('Enter the Dca Distance'); Dm=(Dab*Dbc*Dca)^(1/3); Ds=1.09*(Ds*d^3)^(1/4); Dsc=1.09*(R*d^3)^(1/4); L=0.2*log(Dm/Ds) C=0.056/log(Dm/Dsc) XL=2*pi*50*L XC=1/(2*pi*50*C) fprintf('\t Inductive reactance is =%d',XL); fprintf('\t Capacitive reactance is = %d',XC);

Output:
Enter the Diameter 0.035 R =0.0175 Enter the Gmr value 0.01417 Enter the Bundeld Space 0.045 Enter the Dab Distamce 15 Enter the Dbc Distance 15 Enter the Dca Distance 30

L = 1.2486 C =0.0090 XL =392.2529 XC =0.3519 Inductive reactance is =3.922529e+002 Capacitive reactance is = 3.518535e-001

Ex No:5

Formation of Y-bus Admittance Matrix

Program:
clear all; clc n=input('Enter the no of Buses'); for i=1:n for j=1:n fprintf('Enter the impedance value between %d & %d is',i,j); z(i,j)=input('='); y(i,j)=1/z(i,j); end end z y Y(n,n)=0; for i=1:n for j=1:n if i==j for k=1:n Y(i,j)=Y(i,j)+y(i,k); end else Y(i,j)=-y(i,j); end end end disp('Bus Admittance Matrix is ::'); Ybus=Y

Output:
Enter the no of Buses 4 Enter the impedance value between 1 & 1 is= inf Enter the impedance value between 1 & 2 is=2-8j Enter the impedance value between 1 & 3 is=1-4j Enter the impedance value between 1 & 4 is=inf Enter the impedance value between 2 & 1 is=2-8j Enter the impedance value between 2 & 2 is=inf Enter the impedance value between 2 & 3 is=0.666-2.664j Enter the impedance value between 2 & 4 is=1-4j Enter the impedance value between 3 & 1 is=1-4j Enter the impedance value between 3 & 2 is=0.666-2.664j Enter the impedance value between 3 & 3 is=inf Enter the impedance value between 3 & 4 is=2-8j Enter the impedance value between 4 & 1 is=inf Enter the impedance value between 4 & 2 is=1-4j Enter the impedance value between 4 & 3 is=2-8j Enter the impedance value between 4 & 4 is=inf

z= Inf 2.0000 - 8.0000i 1.0000 - 4.0000i Inf Inf

2.0000 - 8.0000i

0.6660 - 2.6640i 1.0000 - 4.0000i Inf 2.0000 - 8.0000i Inf

1.0000 - 4.0000i 0.6660 - 2.6640i Inf

1.0000 - 4.0000i 2.0000 - 8.0000i

y= 0 0.0294 + 0.1176i 0.0588 + 0.2353i 0 0

0.0294 + 0.1176i

0.0883 + 0.3533i 0.0588 + 0.2353i 0 0.0294 + 0.1176i 0

0.0588 + 0.2353i 0.0883 + 0.3533i 0

0.0588 + 0.2353i 0.0294 + 0.1176i

Bus Admittance Matrix is ::

Ybus = 0.0882 + 0.3529i -0.0294 - 0.1176i -0.0588 - 0.2353i 0

-0.0294 - 0.1176i 0.1766 + 0.7062i -0.0883 - 0.3533i -0.0588 - 0.2353i -0.0588 - 0.2353i -0.0883 - 0.3533i 0.1766 + 0.7062i -0.0294 - 0.1176i 0 -0.0588 - 0.2353i -0.0294 - 0.1176i 0.0882 + 0.3529i

Ex No:6 Program:
clc clear all

Bus Building Algorithm By Using Z-bus

N=input('Enter the No Busses(((include Ref Bus)))=='); elements=input('enter the no of Element='); loop=input('Enter the no of loop='); z(N,N)=0; b(N,N)=0; fprintf('case 1: Ref bus to New bus\n Case 2: Existing bus to New Bus \n Case 3: Existing Bus to Ref Bus \n Case 4:Existing Bus to Existing Bus\n') for k=1:elements ELEMENTS=k i=input('Enter the Starting bus='); j=input('Enter the Ending Bus='); fprintf('Enter the impedance value b/w %d and %d bus',i,j) z(i,j)=input('='); b(i,j)=input('Enter the Type of Case this bus='); end z k=0; s=1; for t=1:2 for i=s:N for j=1:N if z(i,j)~=0 cond=b(i,j); switch cond case 1 Z(k+1,k+1)=z(i,j); k=k+1; fprintf('Impedance Matrix at step %d is =',k) Z case 2 Z(k+1,k+1)=Z(k,k)+z(i,j); Z(k+1,1:k)=Z(k,1:k);

Z(1:k,k+1)=Z(1:k,k); k=k+1; fprintf('Impedance Matrix at step %d is =',k) Z case 3 Z(k+1,k+1)=Z(k,k)+z(i,j); Z(k+1,1:k)=Z(k,1:k); Z(1:k,k+1)=Z(1:k,k); for p=1:k for q=1:k Z1(p,q)=Z(p,q)-(Z(p,k+1)*Z(k+1,q))/Z(k+1,k+1); end end Z=Z1; fprintf('Impedance Matrix at step %d after reduce is ',k+1) Z case 4 Z(k+1,k+1)=z(i,j)+Z(i-1,i-1)+Z(j-1,j-1)-2*Z(i-1,j-1); Z(k+1,1:k)=Z(j-1,1:k)-Z(i-1,1:k); Z(1:k,k+1)=Z(1:k,j-1)-Z(1:k,i-1); for p=1:k for q=1:k Z1(p,q)=Z(p,q)-(Z(p,k+1)*Z(k+1,q))/Z(k+1,k+1); end end Z=Z1; fprintf('Impedance Matrix at step %d after reduce is =',k+1) Z end s=j; z(i,j)=0; j=N; end end end end Z

Output:
Enter the No Busses (((include Ref Bus)))==4 enter the no of Element=5 Enter the no of loop=2 case 1: Ref bus to New bus Case 2: Existing bus to New Bus Case 3: Existing Bus to Ref Bus Case 4:Existing Bus to Existing Bus ELEMENTS =1 Enter the Starting bus=1 Enter the Ending Bus=2 Enter the impedance value b/w 1 and 2 bus=1.2j Enter the Type of Case this bus=1 ELEMENTS = 2 Enter the Starting bus=2 Enter the Ending Bus=3 Enter the impedance value b/w 2 and 3 bus=0.2j Enter the Type of Case this bus=2 ELEMENTS =3 Enter the Starting bus=3 Enter the Ending Bus=4 Enter the impedance value b/w 3 and 4 bus=0.5j Enter the Type of Case this bus=2 ELEMENTS =4 Enter the Starting bus=4 Enter the Ending Bus=1 Enter the impedance value b/w 4 and 1 bus=1.5j Enter the Type of Case this bus=3 ELEMENTS =5 Enter the Starting bus=4 Enter the Ending Bus=2

Enter the impedance value b/w 4 and 2 bus=0.3j Enter the Type of Case this bus=4 z= 0 0 0 0 + 1.5000i 0 + 1.2000i 0 0 0 0 + 0.2000i 0 0 + 0.3000i 0 0 0 0 + 0.5000i 0

Impedance Matrix at step 1 is = Z= 0 + 1.2000i Impedance Matrix at step 2 is = Z= 0 + 1.2000i 0 + 1.2000i 0 + 1.2000i 0 + 1.4000i

Impedance Matrix at step 3 is = Z= 0 + 1.2000i 0 + 1.2000i 0 + 1.2000i 0 + 1.2000i 0 + 1.4000i 0 + 1.4000i 0 + 1.2000i 0 + 1.4000i 0 + 1.9000i

Impedance Matrix at step 4 after reduce is Z= 0 + 0.7765i 0 + 0.7059i 0 + 0.5294i 0 + 0.7059i 0 + 0.8235i 0 + 0.6176i 0 + 0.5294i 0 + 0.6176i 0 + 0.8382i

Impedance Matrix at step 4 after reduce is = Z= 0 + 0.7052i 0 + 0.6804i 0 + 0.6186i 0 + 0.6804i 0 + 0.8144i 0 + 0.6495i 0 + 0.6186i 0 + 0.6495i 0 + 0.7268i

You might also like