You are on page 1of 5

Example 8.

1 (a)

w= 315
R= 32
L= 0.4
X= w*0.4
Vm= 390
Z= R + X*j
Zm=sqrt(R*R+L*L)
Im= Vm/Zm
tau=L/R
gamma= atan(w*L/R)

t=0:.00001:.080
alpha1=gamma
i1= Im *sin(w*t+ alpha1 - gamma)
plot(t,i1)
grid on

Output Plot
Example 8.1 (b)

w= 315
R= 32
L= 0.4
X= w*0.4
Vm= 390
Z= R + X*j
Zm=sqrt(R*R+L*L)
Im= Vm/Zm
tau=L/R
gamma= atan(w*L/R)

t=0:.00001:.080
alpha2= gamma-(pi/2)
i2= Im *sin(w*t+ alpha2 - gamma)- Im *exp(-t/tau).*sin(alpha2-gamma)
plot(t,i2)
grid on

Output Plot
Example 8.10(a and b)

xd2=.15
xd1=.25
xd=1.25
xt=.25
v=1

s=100.*1000000
v1=20000
v2=400000
ib1= s/(1.732.*v1)
ib2= s/(1.732.*v2)

id2pu=v/(xt+xd2)
id2_gen=id2pu.*ib1
id2_dist=id2pu.*ib2

id1pu=v/(xt+xd1)
id1_gen=id1pu.*ib1
id1_dist=id1pu.*ib2

idpu=v/(xt+xd)
id_gen=idpu.*ib1
id_dist=idpu.*ib2

i_asympu=1.732.*id2pu
i_asym_gen=i_asympu.*ib1
i_asym_dist=i_asympu.*ib2
Example 8.10(c)

td2=.035
td1=.50
td=.3
Id2=2.5
Id1=2
Id=.667

t=1:.01:10
i=sqrt(2).*( (Id2-Id1).*exp(-t/td2) + (Id1-Id).*exp(-t/td1) + Id) .* sin(377.*t+ (pi)/2)
+ sqrt(Id2).*exp(-t/td)
plot(t, i)
grid on

Output Plot
Newton-Raphson Method

del_zero=.4606
Pmax=1.8
c=cos(del_zero)
delmax(1)=2.356
a=1
epsilon=1
while epsilon>.001
f=(delmax(a)-del_zero).*sin(delmax(a))+ cos(delmax(a))
dfdt=(delmax(a)-del_zero).*cos(delmax(a))

d_delmax=(c-f)/dfdt
delmax(a+1)=delmax(a)+d_delmax
delmax_final=delmax(a+1)
a=a+1
epsilon=abs(d_delmax)
end

del_one=pi-delmax_final
Pm_critical=Pmax.*sin(del_one)

You might also like