blob: 6fdf9ecaf363724adf58f4f7b93566e79ba13644 (
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
|
//Chapter-5, Example 5.24, Page 184
//=============================================================================
clc
clear
//INPUT DATA
L=0.05;//inductance in henry
R2=20;//resistance in ohms
R1=15;//resistance in ohms
V=200;//supply voltage in volts
f=50;//frequency in hz
//CALCULATIONS
//for branch 1
Z1=(R1)+((%i)*(2*%pi*f*L));//impedance in ohms
Y1=inv(Z1);//admittance in branch
I1=V*(Y1);//current in branch
disp(I1);
i1=abs(I1);//magnitude of current
//for branch 2
Y2=1/R2;//admittance in branch
I2=V*Y2;//current in branch
i2=abs(I2);//magnitude of current
I=I1+I2;//total current in A
i=abs(I);//magnitude of total current
theta=atan(imag(I)/real(I));//angle in radians
theta=theta*(180)/(%pi);//angle in degrees
mprintf("Thus current in branch1,branch2 abd total currents are %1.2f A,%d A,%2.2f A respectively\n",i1,i2,i);
mprintf("phase angle of the combination is %2.1f degrees",theta);
//=================================END OF PROGRAM======================================================================================================
|