Professional Documents
Culture Documents
FAULT ANALYSIS
clear all;
clc;
%main program for the fault analysis package
nb=input('enter the number of buses');
ng=input('enter the number of generators');
nl=input('enter the number of lines');
nt=input('enter the number of transformers');
%the following section determines choice of function
choice=input('enter your choice 1) data entry 2) fault analysis');
if choice==1
dataentry(nb,ng,nl,nt);
end
if choice==2
fid=fopen('faultdata.txt','r');
b=textread('faultdata.txt');
fclose(fid);
if b(2)==1
%three phase fault analysis
done=threephfault(nb,ng,nl,nt);
end
if b(2)==2
%SLG fault analysis
done=slgfault(nb,ng,nl,nt);
end
if b(2)==3
%LL fault analysis
done=llfault(nb,ng,nl,nt);
end
if b(2)==4
%LLG fault analysis
done=llgfault(nb,ng,nl,nt);
end
end
output
The positive sequence Ybus
40.000
-10.000
-10.000
-20.000
0.000
-10.000
40.000
-10.000
0.000
-20.000
-10.000
-10.000
20.000
0.000
0.000
-20.000
0.000
0.000
25.000
0.000
0.000
-20.000
0.000
0.000
25.000
0.140
0.110
0.125
0.112
0.088
0.110
0.140
0.125
0.088
0.112
0.125
0.125
0.175
0.100
0.100
0.112
0.088
0.100
0.129
0.071
0.088
0.112
0.100
0.071
0.129
26.667
-3.333
-3.333
-20.000
0.000
-3.333
26.667
-3.333
0.000
0.000
-3.333
-3.333
6.667
0.000
0.000
-20.000
0.000
0.000
27.143
0.000
0.000
0.000
0.000
0.000
7.143
0.108
0.022
0.065
0.080
0.000
0.022
0.044
0.033
0.016
0.000
0.065
0.033
0.199
0.048
0.000
0.080
0.016
0.048
0.095
0.000
0.000
0.000
0.000
0.000
0.140
Fault current
Magnitude Angle(radians)
I1
3.730
-1.571
I2
1.984
3.142
I0
1.746
3.142
0.534
0.000
0.248
1.571
0.113
1.571
2.000
0.534
0.000
0.248
1.571
0.058
1.571
3.000
0.347
0.000
0.347
1.571
0.347
1.571
4.000
0.627
0.000
0.198
1.571
0.083
1.571
5.000
0.627
-0.524
0.198
2.094
0.000
0.000
1.000
2.000
0.000
1.571
0.000
-0.000
0.185
-0.000
2.000
3.000
1.865
-1.571
0.992
3.142
0.966
3.142
3.000
1.000
1.865
1.571
0.992
-0.000
0.780
-0.000
1.000
4.000
1.865
1.571
0.992
-0.000
0.595
3.142
2.000
5.000
1.865
1.571
0.992
-0.000
0.000
0.000
4.000
6.000
1.865
1.571
0.992
-0.000
0.595
-0.000
5.000
6.000
1.865
1.571
0.992
-0.000
0.000
0.000
1.000
0.000
-1.571
0.000
3.142
0.185
3.142
3.000
2.000
1.865
1.571
0.992
-0.000
0.966
-0.000
1.000
3.000
1.865
-1.571
0.992
3.142
0.780
3.142
4.000
1.000
1.865
-1.571
0.992
3.142
0.595
-0.000
5.000
2.000
1.865
-1.571
0.992
3.142
0.000
0.000
0.644
0.595
0.675
-2.365
0.454
1.686
2.000
0.615
0.520
0.715
-2.310
0.399
1.702
3.000
0.776
1.107
0.491
-2.880
0.491
1.309
4.000
0.687
0.422
0.740
-2.286
0.546
1.833
5.000
0.658
0.306
0.805
-2.218
0.466
1.880
1.000
2.000
0.185
0.000
0.185
-0.000
0.185
-0.000
2.000
3.000
2.704
-2.380
2.086
3.106
2.127
1.002
3.000
1.000
2.573
0.811
1.901
-0.039
2.232
-2.210
1.000
4.000
1.907
1.361
0.529
-0.139
3.246
-2.557
2.000
5.000
2.113
1.082
1.122
-0.065
2.769
-2.438
4.000
6.000
2.449
0.866
1.716
-0.043
2.347
-2.273
5.000
6.000
2.113
1.082
1.122
-0.065
2.769
-2.438
1.000
0.185
-3.142
0.185
3.142
0.185
3.142
3.000
2.000
2.704
0.761
2.086
-0.035
2.127
-2.140
1.000
3.000
2.573
-2.331
1.901
3.103
2.232
0.932
4.000
1.000
1.907
-1.780
0.529
3.002
3.246
0.585
5.000
2.000
2.113
-2.060
1.122
3.076
2.769
0.704