summaryrefslogtreecommitdiff
path: root/343/CH2/EX2.57/ex2_57.sce
blob: a8a768c658927a170329c39f9f2de349a594cba3 (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
clc
V=230+%i*0;            //Assigning values to parameters
L=10*10^-3;
f=50;
R=10;
Xl=2*%pi*f*L;
Xc=1/(2*%pi*f*C);
Z1=10+%i*3.14;
Z2=10-%i*6.37;
Z=(Z1*Z2)/(Z1+Z2);
I=V/Z;
I1=V/Z1;
I2=V/Z2;
[r,t]=polar(Z1);
[ro,th]=polar(Z2);
[rot,tt]=polar(Z);
pf1=cos(t);
pf2=cos(th);
pft=cos(tt);
P1=I1*I1*R;
P2=I2*I2*R;
disp("Ohms",polar(Z),"Total Impedance");
disp("Amperes",polar(I1),"Branch current I1");
disp("Amperes",polar(I2),"Branch current I2");
disp(polar(pf1),"Power factor of branch 1");
disp(polar(pf2),"Power factor of branch 2");
disp(polar(pft),"Total Power factor");
disp("Watts",polar(P1),"Power consumed by branch 1");
disp("Watts",polar(P2),"Power consumed by branch 2");