blob: 4de784cbb59a9172593170114a29fe23cebc0556 (
plain)
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
|
clc
//the code below uses userdefined complexstring function
function s=complexstring(a)
if imag(a)>=0 then
s=sprintf('%g+%gi',real(a),imag(a))
else
s=sprintf('%g%gi',real(a),imag(a))
end
funcprot(0)
endfunction
VLB=2400 //line to base voltage in volts
V1=VLB/sqrt(3) //reference phasor in volts //ans may vary due to roundoff error
mprintf("V1=%fV\n",V1)
kVAB=9375 //rated kVA
I1B=(kVAB*1000)/(sqrt(3)*VLB)
pf=0.8 //power factor
mprintf("I1B=%fA\n",I1B) //ans may vary due to roundoff error
I1=I1B*exp((-1)*%i*(acos(pf)))
disp('I1='+complexstring(I1)+'A')//ans may vary due to roundoff error
mprintf("\n")
x1=0.1//in ohms
disp('EΦ=V1+jI1x1='+complexstring(V1+%i*I1*x1)+'V')//ans may vary due to roundoff error
mprintf("\n")
disp('sqrt3*|EΦ|='+complexstring((abs(V1+%i*I1*x1))*sqrt(3))+'V')
Ifu=110 //value in ampere,dc
Ifs=149 //value in ampere,dc
ks=Ifs/Ifu
mprintf("ks=%f\n",ks) //ans may vary due to roundoff error
m1=(abs((V1+%i*I1*x1)))/Ifs //equal to m` in textbook
mprintf("ḿ́=|EΦ|/Ifs=%fΩ\n",m1)//ans may vary due to roundoff error
xdu=0.8 //in ohms
xd=x1+((xdu-x1)/ks)
mprintf("xd=x1+(xdu-x1)/ks=%fΩ\n",xd)//ans may vary due to roundoff error
Ef=V1+(%i*I1*xd)
disp('Ef='+complexstring(Ef)+'V')//ans may vary due to roundoff error
mprintf("\n")
mprintf("If=%fA\n",abs(Ef)/m1)//ans may vary due to roundoff error
|