summaryrefslogtreecommitdiff
path: root/3673/CH9/EX9.a.25/Example_a_9_25.sce
blob: 8c5d3004fed068d4cae168ab3e3f3ad8d3d96808 (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
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
//Example_a_9_25 page no:424
clc;

Zr=4+(%i*3);
Zy=4-(%i*3);
Zb=2;
Zn=1+(%i*2);
Yr=1/Zr;
Yy=1/Zy;
Yb=1/Zb;
Yn=1/Zn;
Yrmag=sqrt(real(Yr)^2+imag(Yr)^2);
Yrang=atand(imag(Yr)/real(Yr));
Yymag=sqrt(real(Yy)^2+imag(Yy)^2);
Yyang=atand(imag(Yy)/real(Yy));
Ybmag=sqrt(real(Yb)^2+imag(Yb)^2);
Ybang=atand(imag(Yb)/real(Yb));
Ynmag=sqrt(real(Yn)^2+imag(Yn)^2);
Ynang=atand(imag(Yn)/real(Yn));
Vrmag=380/sqrt(3);
Vrang=0;
Vymag=380/sqrt(3);
Vyang=-120;
Vbmag=380/sqrt(3);
Vbang=-240;
Yrormag=Vrmag*Yrmag;
Yrorang=Vrang+Yrang;
Yyoymag=Vymag*Yymag;
Yyoyang=Vyang+Yyang;
Ybobmag=Vbmag*Ybmag;
Ybobang=Vbang+Ybang;
Yrorreal=Yrormag*cosd(Yrorang);
Yrorimag=Yrormag*sind(Yrorang);
Yror=Yrorreal+(%i*Yrorimag);
Yyoyreal=Yyoymag*cosd(Yyoyang);
Yyoyimag=Yyoymag*sind(Yyoyang);
Yyoy=Yyoyreal+(%i*Yyoyimag);
Ybobreal=Ybobmag*cosd(Ybobang);
Ybobimag=Ybobmag*sind(Ybobang);
Ybob=Ybobreal+(%i*Ybobimag);
Y=Yror+Yyoy+Ybob;
Y1=Yr+Yy+Yb+Yn;
//calculating the voltage values
Vn_n=Y/Y1;
Vn_nmag=sqrt(real(Vn_n)^2+imag(Vn_n)^2);
Vn_nang=atand(imag(Vn_n)/real(Vn_n));
Vr=219.4;
Vyreal=Vymag*cosd(Vyang);
Vyimag=Vymag*sind(Vyang);
Vy=Vyreal+(%i*Vyimag);
Vbreal=Vbmag*cosd(Vbang);
Vbimag=Vbmag*sind(Vbang);
Vb=Vbreal+(%i*Vbimag);
Vr_=Vr-Vn_n;
Vr_mag=sqrt(real(Vr_)^2+imag(Vr_)^2);
Vr_ang=atand(imag(Vr_)/real(Vr_));
Vy_=Vy-Vn_n;
Vy_mag=32+sqrt(real(Vy_)^2+imag(Vy_)^2);
Vy_ang=atand(imag(Vy_)/real(Vy_));
Vy_ang=Vy_ang+180;
Vb_=Vb-Vn_n;
Vb_mag=sqrt(real(Vb_)^2+imag(Vb_)^2);
Vb_ang=atand(imag(Vb_)/real(Vb_));
Vb_ang=180+Vb_ang;
disp("the phase voltages are");
disp(Vr_mag,"the magnitude of phase voltage Vr is (in V)");
disp(Vr_ang,"the angle of phase voltage Vr is (in degree)");
disp(Vy_mag,"the magnitude of phase voltage Vy is (in V)");
disp(Vy_ang,"the angle of phase voltage Vy is (in degree)");
disp(Vb_mag,"the magnitude of phase voltage Vb is (in V)");
disp(Vb_ang,"the angle of phase voltage Vb is (in degree)");
//calculating the current values
Irmag=Vr_mag*Yrmag;
Irang=Vr_ang+Yrang;
Iymag=Vy_mag*Yymag;
Iyang=Vy_ang+Yyang;
Ibmag=Vb_mag*Ybmag;
Ibang=Vb_ang+Ybang;
Inmag=Vn_nmag*Ynmag;
Inang=Vn_nang+Ynang;
Inang=Inang+180;
disp("the phase currents are");
disp(Irmag,"the magnitude of phase current Ir is (in A)");
disp(Irang,"the angle of phase current Ir is (in degree)");
disp(Iymag,"the magnitude of phase current Iy is (in A)");
disp(Iyang,"the angle of phase current Iy is (in degree)");
disp(Ibmag,"the magnitude of phase current Ib is (in A)");
disp(Ibang,"the angle of phase current Ib is (in degree)");
disp(Inmag,"the magnitude of phase current In is (in A)");
disp(Inang,"the angle of phase current In is (in degree)");
//Vr magnitude and angle calculated in text book are wrong, the correct calculation is done here
//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