blob: 5302962631e295f0f6df5d19a4e8203a87a35fdf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
//Chapter-5, Example 5.17, Page 176
//=============================================================================
clc
clear
//INPUT DATA
L=10;//inductance in milliHenry
C=5;//capacitor in uf
phi=50;//phase in degrees-------->lagging
f=500;//frequency in hz
V=200;//supply voltage in volts
//CALCULATIONS
Xc=1/(2*%pi*f*C*10^-6);//Capacitive reactance in ohms
Xl=(2*%pi*f*L*10^-3);//inductive reactance in ohms
R=(Xc-Xl)/(tan(phi*%pi/180));//resistance in ohms
Z=sqrt((R)^2+(Xc-Xl)^2);//impedance in ohms
I=V/Z;//current in A
Vr=(I)*(R);//voltage across resistance
Vl=(I)*(Xl);//voltage across inductance
Vc=(I)*(Xc);//voltage across capacitance
mprintf("Thus voltages across resistance,inductance,capacitance are %3.2f volts,%3.2f volts,%3.2f volts respectively,",Vr,Vl,Vc);
//=================================END OF PROGRAM======================================================================================================
;
|