summaryrefslogtreecommitdiff
path: root/3673/CH9/EX9.a.24/Example_a_9_24.sce
blob: 73ea8f1a7bd4aae4fc0ee84a0e92ba0ef61e37b3 (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
//Example_a_9_24 page no:423
clc;
Zamag=10;
Zaang=0;
Zbmag=8;
Zbang=30;
Zcmag=5;
Zcang=45;
Vabmag=415;
Vabang=0;
Vabreal=Vabmag*cosd(Vabang);
Vabimag=Vabmag*sind(Vabang);
Vab=Vabreal+(%i*Vabimag);
Vbcmag=415;
Vbcang=-120;
Vbcreal=Vbcmag*cosd(Vbcang);
Vbcimag=Vbcmag*sind(Vbcang);
Vbc=Vbcreal+(%i*Vbcimag);
Zareal=Zamag*cosd(Zaang);
Zaimag=Zamag*sind(Zaang);
Za=Zareal+(%i*Zaimag);
Zbreal=Zbmag*cosd(Zbang);
Zbimag=Zbmag*sind(Zbang);
Zb=Zbreal+(%i*Zbimag);
Zcreal=Zcmag*cosd(Zcang);
Zcimag=Zcmag*sind(Zcang);
Zc=Zcreal+(%i*Zcimag);
Vo=((Vab/Za)-(Vbc/Zc))/((1/Za)+(1/Zb)+(1/Zc));
Voa=Vo-Vab;
Voc=Vo+Vbc;
Ia=-Voa/Za;
Ib=-Vo/Zb;
Ic=-Voc/Zc;
Iamag=-sqrt(real(Ia)^2+imag(Ia)^2);
Iaang=atand(imag(Ia)/real(Ia));
Iaang=180+Iaang;
Ibmag=-sqrt(real(Ib)^2+imag(Ib)^2);
Ibang=atand(imag(Ib)/real(Ib));
Icmag=-sqrt(real(Ic)^2+imag(Ic)^2);
Icang=atand(imag(Ic)/real(Ic));
Icang=Icang-180;
disp(Iamag,"the magnitude of current I1 is (in A)");
disp(Iaang,"the angle of current I1 is (in A)");
disp(Ibmag,"the magnitude of current I2 is (in A)");
disp(Ibang,"the angle of current I2 is (in A)");
disp(Icmag,"the magnitude of current I3 is (in A)");
disp(Icang,"the angle of current I3 is (in A)");
//the result produced in this problem varies slightly with the text book calculation because in text book the value is rounded off at every point but here values of directly simplified results are used