1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
clear
clc
clf
Sb = 50;
S=50;
V =1;
Xd = 0.2;
X1 =0.4;
X2 = 0.4;
H = 2.7;
E=1.05 ;
G=1;
M = G*H/(180*50);
pe0 = (E*V/X1);
d0=asind(S/(Sb*pe0 ));
Pe0=pe0 * sind(d0);
pe1 = (E*V/(X1+X2+Xd));
pe2 = (E*V/(X1+Xd));
dt=.05
c_1=dt*dt/M
for i=1:14
if i==1 then
m_t(i)=0;
m_Pm(i)=Pe0
m_sind(i)=sind(d0)
m_Pe(i)=S/Sb
m_Pa(i)=0
m_cPe(i)=c_1 * m_Pa(i)
m_dd(i)=0
m_d(i)=d0
else if i==2 then
m_t(i)=0;
m_Pm(i)=pe1
m_d(i)=d0
m_sind(i)=sind(m_d(i))
m_Pe(i)=m_sind(i)*m_Pm(i)
m_Pa(i)=(1 - m_Pe(i) + m_Pa(i-1))/2
m_cPe(i)=c_1 * m_Pa(i)
m_dd(i)=0
else
m_t(i)=m_t(i-1) +dt;
m_Pm(i)=pe1
m_dd(i)=m_dd(i-1) + m_cPe(i-1)
m_d(i)=m_d(i-1)+m_dd(i)
m_sind(i)=sind(m_d(i))
m_Pe(i)=m_Pm(i) * m_sind(i)
m_Pa(i)=(1 - m_Pe(i))
m_cPe(i)=c_1 * m_Pa(i)
end
end
end
res1(:,1)=m_t(:)
res1(:,2)=m_Pm(:)
res1(:,3)=m_sind(:)
res1(:,4)=m_Pe(:)
res1(:,5)=m_Pa(:)
res1(:,6)=m_cPe(:)
res1(:,7)=m_dd(:)
res1(:,8)=m_d(:)
res1=round(res1*1000)/1000
i=1
head=['' '' 't' '' '' 'Pm' '' '' 'sin d' '' '' 'Pe' '' '''Pa' '' '''8.33Pa' '' '''d delta' 'delta']
disp(res1, head, "(a)")
plot(m_t, m_d)
title('Swing Curve(Blue: Sustained fault; Red: Fault cleared in .1 sec)');
xlabel('seconds');
ylabel('degrees');
//(b)
while i<15
if i==1 then
m_t2(i)=0;
m_Pm2(i)=Pe0
m_sind2(i)=sind(d0)
m_Pe2(i)=S/Sb
m_Pa2(i)=0
m_cPe2(i)=c_1 * m_Pa2(i)
m_dd2(i)=0
m_d2(i)=d0
else if i==2 then
m_t2(i)=0;
m_Pm2(i)=pe1
m_d2(i)=d0
m_sind2(i)=sind(m_d2(i))
m_Pe2(i)=m_sind2(i)*m_Pm2(i)
m_Pa2(i)=(1 - m_Pe2(i) + m_Pa2(i-1))/2
m_cPe2(i)=c_1 * m_Pa2(i)
m_dd2(i)=0
else
m_t2(i)=m_t2(i-1) +dt;
if m_t2(i) == .1 then
m_Pm2(i)=pe1
m_dd2(i)=m_dd2(i-1) + m_cPe2(i-1)
m_d2(i)=m_d2(i-1)+m_dd2(i)
m_sind2(i)=sind(m_d2(i))
m_Pe2(i)=m_Pm2(i) * m_sind2(i)
m_Pa2(i)=(1 - m_Pe2(i))
m_cPe2(i)=c_1 * m_Pa2(i)
i=i+1
m_t2(i)=m_t2(i-1)
m_Pm2(i)=pe2
m_dd2(i)=m_dd2(i-1)
m_d2(i)=m_d2(i-1)
m_sind2(i)=sind(m_d2(i))
m_Pe2(i)=m_Pm2(i) * m_sind2(i)
m_Pa2(i)=(1 - m_Pe2(i) + m_Pa2(i-1))/2
m_cPe2(i)=c_1 * m_Pa2(i)
else
m_Pm2(i)=m_Pm2(i-1)
m_dd2(i)=m_dd2(i-1) + m_cPe2(i-1)
m_d2(i)=m_d2(i-1)+m_dd2(i)
m_sind2(i)=sind(m_d2(i))
m_Pe2(i)=m_Pm2(i) * m_sind2(i)
m_Pa2(i)=(1 - m_Pe2(i))
m_cPe2(i)=c_1 * m_Pa2(i)
end
end
end
i=i+1
end
res2(:,1)=m_t2(:)
res2(:,2)=m_Pm2(:)
res2(:,3)=m_sind2(:)
res2(:,4)=m_Pe2(:)
res2(:,5)=m_Pa2(:)
res2(:,6)=m_cPe2(:)
res2(:,7)=m_dd2(:)
res2(:,8)=m_d2(:)
res2=round(res2*1000)/1000
disp(res2,head, "(b)")
plot(m_t2, m_d2,'r')
//(c)
D0=d0 * %pi/180
Pi=1
Dm=%pi - asin(Pi/pe2)
dcc=acosd(((Pi * (Dm-D0))-(pe1*cos(D0))+(pe2*cos(Dm)))/(pe2 -pe1))
tcc=.395
mprintf("\n\n(c) dcc= %.1f deg; clearing time=%.3f sec", dcc,tcc)
|