summaryrefslogtreecommitdiff
path: root/2276/CH5/EX5.6/chapter5_ex6.sce
blob: 818ad43a2932e20e4139c96db4586d5b0ffa1d43 (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
clc
clear

//input
v=415;//supply voltage in volts
f=50;//supply frequency in hertz
r1=50;//resistance in branch 1 in ohms
r2=30;//resistance in branch 2 in ohms
c=50*(10^-6);//capacitance in branch 2 in farad
//branch 1 and 2 are in parallel

//calculations
g1=1/r1;//conductance of branch 1 in siemens
xc=1/(2*%pi*f*c);//reactance of branch 2 in siemens
z=((r2^2)+(xc^2))^0.5;//impedance in ohms
g2=r2/(z^2);//conductance of branch 2 in siemens
b2=xc/(z^2);//susceptance of branch 2 in siemens
gt=g1+g2;//total conductance in siemens
bt=0+b2;//total susceptance in siemens
yt=((gt^2)+(bt^2))^0.5;//total admittance in mho
it=v*yt;//total current in amperes
R=gt/(yt^2);//resistance of the series equivalent circuit in ohms
Xc=bt/(yt^2);//capacitive reactance of the series circuit in ohms

//output
mprintf('the current taken from the supply will be %3.1f A and the resistance and capacitive reactance of the equivalent series circuit are %3.0fohm and %3.0fohms respectively',it,R,Xc)