summaryrefslogtreecommitdiff
path: root/503/CH3/EX3.3/ch3_3.sci
blob: 1c9c2fc6a65f6a7bba3c5d0e05b0f53fbd9796d9 (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
// To calculate primary and scondary side impedences,current and their pf and real power
// and calculate terminal voltage

clc;
N_1=150;
N_2=75;

a=N_1/N_2;

Z_2=[5,30];                //polar(magnitude,phase diff)
disp(Z_2,'secondary impedence(ohm)');
Z_1=[a^2*Z_2(1),Z_2(2)];
disp(Z_1,'primary impedence(ohm)');

V_1=[200,0];                //polar(magnitde,phase diff)
V_2=[V_1(1)/a,V_1(2)];
disp(V_2,'secondary terminal voltage(V)');

I_2(1)=V_2(1)/Z_2(1);
I_2(2)=V_2(2)-Z_2(2);
disp(I_2,'I_2=');
pf=cosd(I_2(2));
disp(pf,'pf lagging=');

I_1(1)=I_2(1)/a;
I_1(2)=I_2(2);
disp(I_1,'I_1(A)');
pf=cosd(I_1(2));
disp(pf,'pf lagging=');

P_2=V_2(1)*I_2(1)*cosd(I_2(2));   
disp(P_2,'secondary power output(W)=');
//P_1=primary power output
P_1=P_2                            //as the transormer is lossless
disp(P_1,'primary power output(W)=');