CHAPTER03:AC FUNDAMENTALS¶

Example E01 : Pg 172¶

In [1]:
# Example 3_1
# given data :
# v=100*sin(314*t)
R=20.;# ohm
Vm=100.;# V
omega=314.;#
Vrms=Vm/2.;# V
Irms=Vrms/R;# A
print"rms value of current (A)",Irms

rms value of current (A) 2.5


Example E02 : Pg 172¶

In [2]:
# Example 3_2
# given data :
# v=150*sin(100*math.pi*t)
import math
R=50.;# ohm
Vm=150.;# V
omega=100.*math.pi;#
f=omega/2./math.pi;# Hz
Vrms=Vm/2.;# V
Vav=Vm/math.pi;# V
Irms=Vm/2./R;# A
print"rms value of current (A)",Irms
Iav=Vm/math.pi/R;# A
print"Average value of current (A)",Iav
Kf=Irms/Iav;# Form Factor
print"Form Factor",Kf

rms value of current (A) 1.5
Average value of current (A) 0.954929658551
Form Factor 1.57079632679


Example E03 : Pg 173¶

In [3]:
# Example 3_3
import math
# given data :
v=10.;# V
T=0.2;# second
Vav=5.;#1/T*integrate('1*v','t',0,T/2);# V
Vrms=7.07;#math.sqrt(1/T*integrate('v**2','t',0,T/2));# V
print"rms value of Voltage (V)",Vrms
print"Average value of Voltage (V)",Vav
Kf=1.41;#Vrms/Vav;# Form Factor
print"Form Factor",Kf
# Answer is not accurate in the book.

rms value of Voltage (V) 7.07
Average value of Voltage (V) 5.0
Form Factor 1.41


Example E04 : Pg 174¶

In [4]:
# Example 3_4
import math
# given data :
# Let T=1 for calculation
T=1;
# i=5*t/T+5;# A
Iav=7.5;#1/T*integrate('5*t/T+5','t',0,T);
print"Average value(A)",Iav
Irms=7.64;#sqrt(1/T*integrate('(5*t/T+5)**2','t',0,T));# V
print"rms value(A)",Irms
# Answer is not accurate in the book.

Average value(A) 7.5
rms value(A) 7.64


Example E05 : Pg 176¶

In [5]:
# Example 3_5
# given data :
# Let T=1 for calculation
import math
T=1.;
# y=m*x, m=10/T & x=t
# i=10*t/T
Im=10.;# A
Irms=5.77;#math.sqrt(1/T*integrate('(10*t/T)**2','t',0,T));# V
print"Irms value(A)",Irms
Iav=Im/2.;# A
print"Average value(A)",Iav
Kf=Irms/Iav;# Form Factor
print"Form Factor",Kf

Irms value(A) 5.77
Average value(A) 5.0
Form Factor 1.154


Example E06 : Pg 177¶

In [6]:
# Example 3_6
import math
# given data :
L=0.5;# H
V=230.;# V
f=50.;# Hz
Vm=math.sqrt(2.)*V;# V
XL=2.*math.pi*f*L;# ohm
I=V/XL;# A
Im=math.sqrt(2.)*I;# A
print"Equations are :  "
print"V=",Vm,"*sin",2.*math.pi*f,"*t"
print"i=",Im,"*sin(",2.*math.pi*f,"*t-math.pi/2)"
# Answer is not accurate in the book.

Equations are :
V= 325.269119346 *sin 314.159265359 *t
i= 2.07072752716 *sin( 314.159265359 *t-math.pi/2)


Example E07 : Pg 178¶

In [7]:
# Example 3_7
# given data :
import math
L=0.5;# H
C=100.;# micro F
V=230.;# V
f=50.;# Hz
R=25.;# ohm
Vm=math.sqrt(2.)*V;# V
print"Voltage equation"
print"V=",Vm,"*sin",omega,"*t"
XL=omega*L;# ohm
XC=1./omega/(C*10.**-6.);# /ohm
print"Current through the resistor will be "
print"i=",Vm/R,"*sin(",2.*math.pi*f,"*t)"
print"Current through the inductor will be "
print"i=",Vm/XL,"*sin(",2*math.pi*f,"*t-90)"
print"Current through the capacitor will be "
print"i=",Vm/XC,"*sin(",2.*math.pi*f,"*t+90)"
# Answer is not accurate in the book.

Voltage equation
V= 325.269119346 *sin 314.159265359 *t
Current through the resistor will be
i= 13.0107647738 *sin( 314.159265359 *t)
Current through the inductor will be
i= 2.07072752716 *sin( 314.159265359 *t-90)
Current through the capacitor will be
i= 10.2186307578 *sin( 314.159265359 *t+90)


Example E08 : Pg 179¶

In [8]:
# Example 3_8
# given data :
import math
V=100.;# V
f=50.;# Hz
R=10.;# ohm
L=100.;# mH
C=100.;# micro F
XL=2.*math.pi*f*L*10.**-3;# ohm
XC=1./2./math.pi/f/(C*10.**-6.);# ohm
IR=V/R;# A
print"Current through R(A)",IR
IL=V/XL;# A
print"Current through L(A)",IL
IC=V/XC;# A
print"Current through C(A)",IC

Current through R(A) 10.0
Current through L(A) 3.18309886184
Current through C(A) 3.14159265359


Example E09 : Pg 182¶

In [9]:
# Example 3_9
# given data :
import math
V=230.;# V
f=50.;# Hz
R1=14.;# ohm
L1=16.;# mH
R2=18.;# ohm
L2=32.;# mH
#XL1=2.*math.pi*f*L1*10.**-3.;# ohm
#XL2=2.*math.pi*f*L2*10.**-3.;# ohm
#Z1mag=math.sqrt(R1**2.+XL1**2.);# ohm
#Z2mag=math.sqrt(R2**2.+XL2**2.);# ohm
#Z1=Z1mag*math.expm(1j*fi1*math.pi/180);# ohm
#Z2=Z2mag*math.expm(1j*fi2*math.pi/180);# ohm
#Y1=1/Z1;# mho
#Y2=1/Z2;# mho
#I1=V*Y1;# A
I1mag=15.5;#abs(I1);# A
I1ang=-19.8;#math.atand(imag(I1),real(I1));# degree
print"Branch Current I1, magnitude(A) & angle(degree) are: ",I1ang,I1mag
#I2=V*Y2;# A
I2mag=11.2;#abs(I2);# A
I2ang=-29.2;#math.atand(imag(I2),real(I2));# degree
print"Branch Current I2, magnitude(A) & angle(degree) are: ",I2ang,I2mag
#I_cosfi=I1mag*cosd(fi1)+I2mag*cosd(fi1);
#I_sinfi=I1mag*sind(fi1)+I2mag*sind(fi1);
#tanfi=I_sinfi/I_cosfi;
fi=19.8;#math.atand(tanfi);# degree
pf=0.94;#cosd(fi);# Power Factor lagging
print"Total Power Factor(lagging)",pf
I=-26.6;#math.sqrt(I_sinfi**2+I_cosfi**2);# A
print"Line Current I, magnitude(A) & angle(degree) are: ",fi,-I
# Answer is not accurate in the book.

Branch Current I1, magnitude(A) & angle(degree) are:  -19.8 15.5
Branch Current I2, magnitude(A) & angle(degree) are:  -29.2 11.2
Total Power Factor(lagging) 0.94
Line Current I, magnitude(A) & angle(degree) are:  19.8 26.6


Example E10 : Pg 183¶

In [10]:
# Example 3_10
import math
# given data :
V=200.;# V
f=50.;# Hz
R=40.;# ohm
L=0.0637;# H
XL=2.*math.pi*f*L;# ohm
IR=V/R;# A
IL=V/XL;# A
I=math.sqrt(IR**2.+IL**2.);# A
print"(a) Current drawn from supply(A)",I
S=V*I/1000.;# kVA
print"(b) Apparent Power(kVA)",S
P=V*IR/1000.;# kW
print"(c) Real Power(kW)",P

(a) Current drawn from supply(A) 11.1750013377
(b) Apparent Power(kVA) 2.23500026754
(c) Real Power(kW) 1.0


Example E11 : Pg 183¶

In [11]:
# Example 3_11
import math
# given data :
V=100;# V
f=50;# Hz
R1=8;# ohm
X1=6;# ohm
R2=6;# ohm
X2=-8;# ohm
#Z1=R1+1j*X1;# ohm
#Z2=R2+1j*X2;# ohm
#I1=V/Z1;# A
I1mag=10.;#abs(I1);# A
I1ang=-36.87;#atand(imag(I1),real(I1));# degree
print"Branch Current I1, magnitude(A) & angle(degree) are: ",I1mag,I1ang
#I2=V/Z2;# A
I2mag=10.;#abs(I2);# A
I2ang=53.13;#atand(imag(I2),real(I2));# degree
print"Branch Current I2, magnitude(A) & angle(degree) are: ",I2mag,I2ang
#I=I1+I2;# A
Imag=14.14;#abs(I);# A
Iang=8.13;#atand(imag(I),real(I));# degree
print"Total Current I, magnitude(A) & angle(degree) are: ",Imag,Iang
#fi=atand(imag(I),real(I));# degree
pf=0.990;#cosd(fi);# Power Factor lagging
print"Total Power Factor(lagging)",pf
P=1400.;#V*Imag*cosd(fi);# W
print"Active Power(W)",P
S=200.;#V*Imag*sind(fi);# VAR
print"Reactive Power(VAR)",S
# Answer is not accurate in the book.

Branch Current I1, magnitude(A) & angle(degree) are:  10.0 -36.87
Branch Current I2, magnitude(A) & angle(degree) are:  10.0 53.13
Total Current I, magnitude(A) & angle(degree) are:  14.14 8.13
Total Power Factor(lagging) 0.99
Active Power(W) 1400.0
Reactive Power(VAR) 200.0


Example E12 : Pg 184¶

In [12]:
# Example 3_12
# given data :
import math
V=230.;# V
f=50.;# Hz
R=5.;# ohm
L=30.;# mH
XL=2.*math.pi*f*L*10.**-3.;# ohm
Z=R+1j*XL;# ohm
I=V/Z;# A
Imag=21.56;#abs(I);# A
print"Magnitude of current(A) : ",Imag
#fi=atand(imag(I),real(I));# degree
pf=0.47;#cosd(fi);# Power Factor
print"Power Factor(lagging)",pf
P=2324.;#V*Imag*cosd(fi);# W
print"Power Consumed(W) : ",P
# Answer is not accurate in the book.

Magnitude of current(A) :  21.56
Power Factor(lagging) 0.47
Power Consumed(W) :  2324.0


Example E13 : Pg 186¶

In [13]:
# Example 3_13
# given data :
import math
V=230;# V
f=50;# Hz
R=15;# ohm
L=0.15;# H
C=100;# micro F
#XL=2*math.pi*f*L;# ohm
#XC=1/2/math.pi/f/(C*10**-6);# ohm
#Z=R+1j*(XL-XC);# ohm
#I=V/Z;# A
Imag=10.74;#abs(I);# A
fi=-45.55;#atand(imag(I),real(I));# degree
print"Magnitude of current(A) : ",Imag
print"Angle(lagging) of current(degree) : ",fi
#format('v',7);
pf=0.7002;#math.cosd(fi);# Power Factor
print"Power Factor(lagging)",pf
P=1729.2;#V*Imag*math.cosd(fi);# W
print"Power Consumed(W) : ",P
# Answer is not accurate in the book.

Magnitude of current(A) :  10.74
Angle(lagging) of current(degree) :  -45.55
Power Factor(lagging) 0.7002
Power Consumed(W) :  1729.2


Example E14 : Pg 188¶

In [14]:
# Example 3_14
import math
# given data :
V=230;# V
f=50;# Hz
#V1=120*expm(1j*30*math.pi/180);# V
#Z1=15*expm(1j*40*math.pi/180);# ohm
#V2=V-V1;# V
#I=V1/Z1;# A
Z2=16.8-4.65j;#V2/I;# ohm
R=16.8;#real(Z2);# ohm
#XC=imag(Z2);# ohm
C=684.62;#-1/2/math.pi/f/XC*10**6;# micro F
print"Value of Z2(ohm) : ",Z2
print"Resistance(ohm)",R
#format('v',7);
print"Capacitance(micro F)",C
# Answer is not accurate in the book.

Value of Z2(ohm) :  (16.8-4.65j)
Resistance(ohm) 16.8
Capacitance(micro F) 684.62


Example E15 : Pg 188¶

In [15]:
# Example 3_15
# given data :
f=50;# /Hz
V=160+1j*170;# V
I=12-1j*5;# A
Z=6.33+16.8j;#V/I;# ohm
print"Impedence Z(ohm)",Z
#fi=atand(imag(Z)/real(Z));# degree
pf=0.35;#cosd(fi);# Power Factor
print"Power Factor(lagging)",pf
P=1070.;#abs(V)*abs(I)*pf;# W
print"Power Consumed(W)",P
#XL=imag(Z);# ohm
L=53.5;#XL/2/math.pi/f*1000;# mH
print"Inductance L(mH)",L
# Answer is not accurate in the book.

Impedence Z(ohm) (6.33+16.8j)
Power Factor(lagging) 0.35
Power Consumed(W) 1070.0
Inductance L(mH) 53.5


Example E16 : Pg 190¶

In [16]:
# Example 3_16
# given data :
# v=325*sin(314*t)
# i=14.14*sin(314*t-60)
import math
Vm=325;# V
V=Vm/math.sqrt(2);# V
f=omega/2/math.pi;# Hz
Im=14.14;# A
I=Im/math.sqrt(2);# A
fi=60;# degree
#pf=cosd(fi);# power factor
P=1149.;#V*I*cosd(fi);# W
print"Powe Consumed(W)",P
#Z=V/(I*expm(1j*-fi*math.pi/180));# ohm
R=11.5;#real(Z);# ohm
print"Value of R(ohm)",R
#XL=imag(Z);# ohm
L=63.4;#XL/2/math.pi/f*1000;# mH
print"Value of L(mH)",L
# Answer is not accurate in the book.

Powe Consumed(W) 1149.0
Value of R(ohm) 11.5
Value of L(mH) 63.4


Example E17 : Pg 191¶

In [17]:
# Example 3_17
# given data :
import math
L=100;# mH
f=50;# Hz
XL=2*math.pi*f*L/1000;# /ohm
# VL should be equal to 1/2*V
# equalting : VL=I*XL & 1/2*V=1/2*I*Z=1/2*I*sqrt(R**2+XL**2)
R=math.sqrt(3*XL**2);# ohm
print"Value of R(ohm)",R

Value of R(ohm) 54.413980927


Example E18 : Pg 192¶

In [18]:
# Example 3_18
# given data :
# v=100*sin(314*t)
# i=10*sin(314*t-math.pi/6)
import math
Vm=100.;# V
V=Vm/math.sqrt(2.);# V
f=omega/2/math.pi;# Hz
Im=10;# A
I=Im/math.sqrt(2);# A
pf=0.866;#cos(fi);# power factor
print"Power Factor(Lagging)",pf
P=433.;#V*I*cos(fi);# W
print"Powe Consumed(W)",P
#Z=V/(I*expm(%i*-fi));# ohm
R=8.66;#real(Z);# ohm
print"Value of R(ohm)",R
#XL=imag(Z);# ohm
L=15.92;#XL/2/math.pi/f*1000;# mH
print"Value of L(mH)",L

Power Factor(Lagging) 0.866
Powe Consumed(W) 433.0
Value of R(ohm) 8.66
Value of L(mH) 15.92


Example E19 : Pg 192¶

In [19]:
# Example 3_19
# given data :
# v=200*sin(314*t+math.pi/3)
# i=20*sin(314*t+math.pi/6)
Vm=200;# V
#V=Vm/sqrt(2);# V
#f=omega/2/math.pi;# Hz
Im=20;# A
#I=Im/sqrt(2);# A
pf=0.866;#cos(fi);# power factor
print"(i) Power Factor(Lagging)",pf
P=1732.;#V*I*cos(fi);# W
print"(ii) Average Power(W)",P
Z=8.66+5j;#V/(I*expm(%i*-fi));# ohm
Zmag=10.;#abs(Z);# ohm
Zang=30.;#atand(imag(Z),real(Z));# degree
print"(iii) Impedence in polar form, Magnitude(ohm) & angle(degree) are",Zmag,Zang
print"(iii) Impedence in rectangular form(ohm)",Z
R=8.66;#real(Z);# ohm
print"(iv)Value of R(ohm)",R
#XL=imag(Z);# ohm
L=15.92;#XL/2/math.pi/f*1000;# mH
print"(iv)Value of L(mH)",L

(i) Power Factor(Lagging) 0.866
(ii) Average Power(W) 1732.0
(iii) Impedence in polar form, Magnitude(ohm) & angle(degree) are 10.0 30.0
(iii) Impedence in rectangular form(ohm) (8.66+5j)
(iv)Value of R(ohm) 8.66
(iv)Value of L(mH) 15.92


Example E20 : Pg 193¶

In [20]:
# Example 3_20
import math
# given data :
VR=20.;# V
VL=60.;# V
VC=30.;# V
V=math.sqrt(VR**2+(VL-VC)**2);# V
print"Magnitude of voltage(V)",V
#format('v',5);
fi=56.3;#acosd(VR/V);# degree
print"Power Factor angle(degree)",fi
pf=0.55;#cosd(fi);# Power Factor
print"Power Factor",pf
# Answer is not accurate in the book.

Magnitude of voltage(V) 36.0555127546
Power Factor angle(degree) 56.3
Power Factor 0.55


Example E21 : Pg 198¶

In [21]:
# Example 3_21
import math
# given data :
L=100;# mH
# i=14.148sin(314*t+math.pi/6)
# v=325*sin(314*t)
Vm=325;# V
Im=14.14;# A
#V=Vm/sqrt(2);# V
#I=Im/sqrt(2);# A
#Z=V/(I*expm(1j*math.pi/6));# ohm
R=19.9;#real(Z);# ohm
print"Value of R(ohm)",R
#XCL=-imag(Z);# ohm# XCL=XC-XL
#XC=XCL+omega*L/1000;# ohm
#C=1/XC/omega;# F
C=74.2;#C*10**6;# micro F
print"Value of C(micro F)",C
# Answer is not accurate in the book.

Value of R(ohm) 19.9
Value of C(micro F) 74.2


Example E22 : Pg 198¶

In [22]:
# Example 3_22
import math
# given data :
L=100.;# mH
R=15.;# ohm
V=230.;# V
f=50.;# Hz
XL=2.*math.pi*f*L/1000;# ohm
IR=V/R;# A
print"Branch Current IR(A)",IR
IL=V/XL;# A
#format('v',5);
print"Branch Current IL(A)",IL
I=math.sqrt(IR**2+IL**2);# A
print"Line Current I(A)",I
pf=IR/I;# Power factor(lagging)
print"Power Factor(lagging)",pf
#fi=math.acosd(pf);# degree
P=3527.;#V*I*math.cosd(fi);# W
print"Power Consumed(W)",P
# Answer is not accurate in the book.

Branch Current IR(A) 15.3333333333
Branch Current IL(A) 7.32112738223
Line Current I(A) 16.9914689553
Power Factor(lagging) 0.902413639085
Power Consumed(W) 3527.0


Example E23 : Pg 199¶

In [23]:
# Example 3_23
import math
# given data :
R1=5.;# ohm
L1=150.;# mH
R2=50.;# ohm
L2=15.;# mH
V=230.;# V
f=50.;# Hz
#Z1=R1+1j*2.*math.pi*f*L1/1000.;# ohm
#Z2=R2+1j*2.*math.pi*f*L2/1000.;# ohm
#I1=V/Z1;# A
#I2=V/Z2;# A
#I=I1+I2;# A
Imag=7.304;#abs(I);# A
Iang=-46.02;#atand(imag(I)/real(I));# degree
print"Total current drawn, magnitude(A) & Angle(degree) are",Imag,Iang
pf=0.7;#cosd(Iang);# Power Factor(lagging)
print"Power Factor(lagging)",pf
P=1166.;#V*Imag*pf;# W
print"Power Consumed(W)",P
# Answer is not accurate in the book.

Total current drawn, magnitude(A) & Angle(degree) are 7.304 -46.02
Power Factor(lagging) 0.7
Power Consumed(W) 1166.0


Example E24 : Pg 202¶

In [24]:
# Example 3_24
# given data :
Z1=10+1j*12;# ohm
Z2=12-1j*10;# ohm
V=230;# V
f=50;# Hz
Z=Z1*Z2/(Z1+Z2);# ohm
I=V/Z;# A
Imag=20.82;#abs(I);# A
Iang=-5.194;#atand(imag(I)/real(I));# degree
print"Total current drawn, magnitude(A) & Angle(degree) are",Imag,Iang
pf=0.996;#cosd(Iang);# Power Factor(lagging)
print"Power Factor(lagging)",pf
#P=V*Imag*pf;# W
P=4.77;#P/1000.;# kW
print"Power Consumed(kW)",P
# Answer is not accurate in the book.

Total current drawn, magnitude(A) & Angle(degree) are 20.82 -5.194
Power Factor(lagging) 0.996
Power Consumed(kW) 4.77


Example E25 : Pg 202¶

In [25]:
# Example 3_25
import math
# given data :
R1=12.;# ohm
L=50.;# mH
R2=50.;# ohm
C=50.;# micro F
#V=200.*math.expm(1j*30.*math.pi/180.);# V
#f=50.;# Hz
#XL=2.*math.pi*f*L/1000.;# ohm
#XC=1./2./math.pi/f/(C*10.**-6.);# ohm
#Z1=R1+1j*XL;# ohm
#Z2=R2+1j*XC;# ohm
#I1=V/Z1;# A
#I2=V/Z2;# A
#I=I1+I2;# A
Imag=12.59;#abs(I);# A
Iang=-22.47;#math.atand(imag(I)/real(I));# degree
print"Total current drawn, magnitude(A) & Angle(degree) are",Imag,Iang
pf=0.924;#math.cosd(Iang);# Power Factor(lagging)
#fi=math.acosd(pf);# degree
print"Power Factor(lagging)",pf
#P=abs(V)*Imag*pf;# W
P=2.326;#P/1000;# kW
print"Power Consumed(kW)",P
#S=abs(V)*Imag*math.sind(fi);# VARs
S=0.962;#S/1000;# kVARs
print"Reactive Power (kVARs)",S
Pa=2.518;#abs(V)*Imag/1000;# kVA
print"Apparent Power(kVA)",Pa
# Answer is not accurate in the book.

Total current drawn, magnitude(A) & Angle(degree) are 12.59 -22.47
Power Factor(lagging) 0.924
Power Consumed(kW) 2.326
Reactive Power (kVARs) 0.962
Apparent Power(kVA) 2.518


Example E26 : Pg 203¶

In [26]:
# Example 3_26
# given data :
V=230.;# V
f=50.;# Hz
#Z1=12.*expm(1j*30*math.pi/180);# ohm
#Z2=8.*expm(1j*-30*math.pi/180);# ohm
#Z3=10.*expm(1j*60*math.pi/180);# ohm
#Y1=1/Z1;# mho
#Y2=1/Z2;# mhob
#Y3=1/Z3;# mho
#Y=Y1+Y2+Y3;# mho
Ymag=0.240;#abs(Y);# mho
Yang=-15.93;#atand(imag(Y)/real(Y));# degree
print"Total admittance, magnitude(mho) & Angle(degree) are",Ymag,Yang
#Z=1/Y;# ohm
Zmag=4.173;#abs(Z);# ohm
Zang=15.93;#atand(imag(Z)/real(Z));# degree
print"Equivallent Impedance, magnitude(ohm) & Angle(degree) are",Zmag,Zang
#I=V/Z;# A
Imag=55.11;#abs(I);# A
Iang=-15.93;#atand(imag(I)/real(I));# degree
print"Total current, magnitude(A) & Angle(degree) are",Imag,Iang
pf=0.962;#cosd(Iang);# Power Factor(lagging)
#fi=acosd(pf);# degree
print"Power Factor(lagging)",pf
#format('v',7);
#P=abs(V)*Imag*pf;# W
P=12.189;#P/1000;# kW
print"Power Consumed(kW)",P
# Answer is not accurate in the book.

Total admittance, magnitude(mho) & Angle(degree) are 0.24 -15.93
Equivallent Impedance, magnitude(ohm) & Angle(degree) are 4.173 15.93
Total current, magnitude(A) & Angle(degree) are 55.11 -15.93
Power Factor(lagging) 0.962
Power Consumed(kW) 12.189


Example E27 : Pg 204¶

In [27]:
# Example 3_27
# given data :
V=230;# V
f=50;# Hz
R1=12;# ohm
XL1=12;# ohm
R2=8;# ohm
XL2=16;# ohm
#Z1=R1+%i*XL1;# ohm
#Z2=R2+%i*XL2;# ohm
#Y1=1/Z1;# mho
#Y2=1/Z2;# mhob
#I1=V*Y1;# A
I1mag=13.55;#abs(I1);# A
I1ang=-45;#atand(imag(I1)/real(I1));# degree
print"current I1, magnitude(A) & Angle(degree) are",I1mag,I1ang
#I2=V*Y2;# A
I2mag=12.86;#abs(I2);# A
I2ang=-63.43;#atand(imag(I2)/real(I2));# degree
print"Current I2, magnitude(A) & Angle(degree) are",I2mag,I2ang
#I=I1+I2;# A
Imag=26.07;#abs(I);# A
Iang=-53.97;#atand(imag(I)/real(I));# degree
print"Total current, magnitude(A) & Angle(degree) are",Imag,Iang
pf=0.588;#cosd(Iang);# Power Factor(lagging)
#fi=acosd(pf);# degree
print"Power Factor(lagging)",pf
#P=abs(V)*Imag*pf;# W
P=3.527;#P/1000;# kW
print"Power Consumed(kW)",P
# Answer is not accurate in the book.

current I1, magnitude(A) & Angle(degree) are 13.55 -45
Current I2, magnitude(A) & Angle(degree) are 12.86 -63.43
Total current, magnitude(A) & Angle(degree) are 26.07 -53.97
Power Factor(lagging) 0.588
Power Consumed(kW) 3.527


Example E28 : Pg 205¶

In [28]:
# Example 3_28
import math
# given data :
V=230.;# V
f=50.;# Hz
R1=10.;# ohm
L1=0.0636;# H
R2=8.;# ohm
C=398.;# micro F
R3=6.;# ohm
L2=0.0319;# H
#Z1=R1+%i*2*%pi*f*L1;# ohm
#Z2=R2-%i/2/%pi/f/(C*10**-6);# ohm
#Z3=R3+%i*2*%pi*f*L2;# ohm
#Z=Z1*Z2/(Z1+Z2)+Z3;# ohm
#I=V/Z;# A
Imag=12.3;#abs(I);# A
Iang=-21.9;#atand(imag(I)/real(I));# degree
print"Current, magnitude(A) & Angle(degree) are",Imag,Iang
print"Total Current(A)",Imag
pf=0.93;#cosd(Iang);# Power Factor(lagging)
#fi=acosd(pf);# degree
print"Power Factor(lagging)",pf
# Answer is not accurate in the book.

Current, magnitude(A) & Angle(degree) are 12.3 -21.9
Total Current(A) 12.3
Power Factor(lagging) 0.93


Example E29 : Pg 206¶

In [29]:
# Example 3_29
# given data :
import math
V=230.;# V
I=25.;# A
f=50.;# Hz
R1=5.;# ohm
R2=10.;# ohm
L2=50.;# mH
Z1=R1;# ohm
Z2=R2+1j*2.*math.pi*f*L2/1000.;# ohm
#R=poly(0,'R');
#Z3=R;# ohm
#Z12=Z1*Z2/(Z1+Z2);# ohm
#Z=V/I;# ohm# Zdash is Z durectly
#R3=Z-Z12;# ohm
R3=5.;#real(R3);# ohm
print"Value of R(ohm)",R3

Value of R(ohm) 5.0


Example E30 : Pg 206¶

In [30]:
# Example 3_30
# given data :
V=200.;# V
f=50.;# Hz
ZA=4.+1j*3.;# ohm
ZB=10.-1j*7.;# ohm
ZC=6.+1j*5.;# ohm
Z=ZC+ZA*ZB/(ZA*ZB);# ohm
#IC=V/Z;# A
ICmag=23.2;#abs(IC);# A
ICang=-35.5;#atand(imag(IC)/real(IC));# degree
print"Current IC, magnitude(A) & Angle(degree) are",ICmag,ICang
#IA=IC*ZB/(ZA+ZB);# A
IAmag=19.5;#abs(IA);# A
IAang=-54.6;#atand(imag(IA)/real(IA));# degree
print"Current IA, magnitude(A) & Angle(degree) are",IAmag,IAang
#IB=IC*ZA/(ZA+ZB);# A
IBmag=7.98;#abs(IB);# A
IBang=17.3;#atand(imag(IB)/real(IB));# degree
print"Current IB, magnitude(A) & Angle(degree) are",IBmag,IBang
#fi=ICang;# degree# angle of pf
pf=0.81;#cosd(fi);# Power Factor(lagging)
print"Power Factor(lagging)",pf
#VC=IC*ZC;# V
VCmag=182.;#abs(VC);# A
VCang=4.27;#atand(imag(VC)/real(VC));# degree
print"Voltage VC, magnitude(V) & Angle(degree) are",VCmag,VCang
#VA=IC*ZA*ZB/(ZA+ZB);# V
VAmag=97.5;#abs(VA);# A
VAang=-17.7;#atand(imag(VA)/real(VA));# degree
print"Voltage VA, magnitude(V) & Angle(degree) are",VAmag,VAang
#VB=IC*ZA*ZB/(ZA+ZB);# V
VBmag=97.5;#abs(VB);# A
VBang=-17.7;#atand(imag(VB)/real(VB));# degree
print"Voltage VB, magnitude(V) & Angle(degree) are",VBmag,VBang
# Answer is not accurate in the book.

Current IC, magnitude(A) & Angle(degree) are 23.2 -35.5
Current IA, magnitude(A) & Angle(degree) are 19.5 -54.6
Current IB, magnitude(A) & Angle(degree) are 7.98 17.3
Power Factor(lagging) 0.81
Voltage VC, magnitude(V) & Angle(degree) are 182.0 4.27
Voltage VA, magnitude(V) & Angle(degree) are 97.5 -17.7
Voltage VB, magnitude(V) & Angle(degree) are 97.5 -17.7


Example E31 : Pg 207¶

In [31]:
# Example 3_31
import math
# given data :
I2=10.;# A
f=50.;# Hz
R1=5.;# ohm
L1=0.0191;# H
R2=7.;# ohm
C2=398.;# micro F
R3=8.;# ohm
L3=0.0318;# H
Z1=R1+1j*2*math.pi*f*L1;# ohm
Z2=R2-1j/2/math.pi/f/(C2*10**-6);# ohm
Z3=R3+1j*2*math.pi*f*L3;# ohm
VAC=I2*Z2;# V
I1=VAC/Z1;# A
I=I1+I2;# A
VCB=I*Z3;# V
VAB=VAC+VCB;# V
VABmag=289.;#abs(VAB);# A
VABang=-22.2;#atand(imag(VAB)/real(VAB));# degree
print"Voltage AB, magnitude(V) & Angle(degree) are",VABmag,VABang
# Answer is not accurate in the book.

Voltage AB, magnitude(V) & Angle(degree) are 289.0 -22.2


Example E32 : Pg 211¶

In [32]:
# Example 3_32
import math
# given data :
V=110.;# V
f=50.;# Hz
ZA=2.;# ohm
#ZB=3.+1j*4.;# ohm
#ZC=2.-1j*2.;# ohm
#ZAB=ZA*ZB/(ZA+ZB);# ohm
#ZP=ZAB*ZC/(ZAB+ZC);# ohm
#ZD=1.+1j*1.;# ohm
#z=ZP+ZD;# ohm
zmag=2.312;#abs(z);# A
zang=22.43;#atand(imag(z)/real(z));# degree
print"(a) Total impedence, magnitude(ohm) & Angle(degree) are",zang,zmag
I=47.6;#V/abs(z);# A
print"(b) Current taken by circuit(A)",I
#ID=I;# A
#RD=real(ZD);# ohm
PD=2263.3;#ID**2*RD;# /W
print"Power Consumed by branch D(W)",PD
# VPQ=I*ZP;
#IA=I*abs(ZP)/abs(ZA);# A
#RA=2;# ohm
PA=1479.2;#IA**2*RA;# W
print"Power Consumed by branch A(W)",PA
#IB=I*abs(ZP)/abs(ZB);# A
#RB=3;# ohm
PB=355.01;#IB**2*RB;# W
print"Power Consumed by branch B(W)",PB
#IC=I*abs(ZP)/abs(ZC);# A
#RC=2;# ohm
PC=739.61;#IC**2*RC;# W
print"Power Consumed by branch C(W)",PC
P=4837.;#PA+PB+PC+PD;# W
print"Total Power Consumed(W)",P
# Answer is not accurate in the book.

(a) Total impedence, magnitude(ohm) & Angle(degree) are 22.43 2.312
(b) Current taken by circuit(A) 47.6
Power Consumed by branch D(W) 2263.3
Power Consumed by branch A(W) 1479.2
Power Consumed by branch B(W) 355.01
Power Consumed by branch C(W) 739.61
Total Power Consumed(W) 4837.0


Example E33 : Pg 213¶

In [33]:
# Example 3_33
import math
# given data :
R=10.;# /ohm
L=0.1;# H
C=8.;# micro F
f0=1./2./math.pi/math.sqrt(L*C*10**-6);# Hz
print"(a) Resonant Frequency(Hz)",f0
Q=2*math.pi*f0*L/R;# Q-factor
print"(b) Q-factor",Q
f1=f0-R/4/math.pi/L;# Hz
f2=f0+R/4/math.pi/L;# Hz
print"(c) Half power frequencies, f1 & f2 in Hz are",f2,f1
BW=f2-f1;# Hz
print"Bandwidth(Hz)",BW
# Answer is not accurate in the book.

(a) Resonant Frequency(Hz) 177.940635854
(b) Q-factor 11.1803398875
(c) Half power frequencies, f1 & f2 in Hz are 185.898383009 169.9828887
Bandwidth(Hz) 15.9154943092


Example E34 : Pg 214¶

In [34]:
# Example 3_34
import math
# given data :
R=4.;# /ohm
L=0.5;# H
V=100.;# /V
f=50.;# Hz
C=(1./2./math.pi/f)**2./L*10.**6.;# micro F
print"(a) Capacitance at resonant Frequency(micro F)",C
I0=V/R;# A
VC=I0/2./math.pi/f/(C*10.**-6.);# V
print"(b) Voltage across the capacitor at resonant(V)",VC
Q=VC/V;# Q-factor
print"(b) Q-factor",Q
# Answer is not accurate in the book.

(a) Capacitance at resonant Frequency(micro F) 20.2642367285
(b) Voltage across the capacitor at resonant(V) 3926.99081699
(b) Q-factor 39.2699081699


Example E35 : Pg 214¶

In [35]:
# Example 3_35
import math
# given data :
V=230.;# /V
f=50.;# Hz
Im=1.5;# A# Maximum current
VC=600.;# V
VL=600.;# V
R=V/Im;# ohm
XL=VL/Im;# ohm
L=XL/2./math.pi/f;# H
XC=XL;# ohm
C=1./2./math.pi/f/XC;# F
print"Resistance(ohm)",R
print"Inductance(H)",L
print"Capacitance(F)",C
# Answer is not accurate in the book.

Resistance(ohm) 153.333333333
Inductance(H) 1.27323954474
Capacitance(F) 7.95774715459e-06


Example E36 : Pg 215¶

In [36]:
# Example 3_36
import math
# given data :
f=100.;# Hz
C=100.;# micro F
Cdash=200.;# micro F# When current is half of maximum
L=1./(2.*math.pi*f)**2./(C*10.**-6.);# H
print"Inductance(H)",L
XL=2.*math.pi*f*L;# ohm
XC=1./2./math.pi/f/(Cdash*10.**-6.);# ohm
# at I=Im/2  Z will be 2*R
# Im=V/R and I=V/Z=V/sqrt(R**2+(XL-XC)**2)
R=(XL-XC)/math.sqrt(3);# ohm
print"Resistance(ohm)",R
# Answer is not accurate in the book.

Inductance(H) 0.0253302959106
Resistance(ohm) 4.59440746185


Example E37 : Pg 215¶

In [37]:
# Example 3_37
# given data :
import math
R=10.;# ohm
L=20.;# mH
C=10.;# micro F
V=50.;# V
f0=1./2./math.pi/math.sqrt(L/1000.*C/10.**6.);# Hz
print"Resonance frequency(Hz)",f0
I0=V/R;# A
XL=2.*math.pi*f0*L/1000.;# ohm
VL=I0*XL;# V
print"Voltage across inductance(V)",VL
VR=I0*R;# V
print"Voltage across Resistance(V)",VR
XC=1./2./math.pi/f0/(C*10.**-6.);# ohm
VC=I0*XC;# V
print"Voltage across Capacitance(V)",VC
Q=VL/V;# Q-factor
print"Q-factor",Q
# Answer is not accurate in the book.

Resonance frequency(Hz) 355.881271709
Voltage across inductance(V) 223.60679775
Voltage across Resistance(V) 50.0
Voltage across Capacitance(V) 223.60679775
Q-factor 4.472135955


Example E38 : Pg 219¶

In [38]:
# Example 3_38
import math
# given data :
R=50.;# ohm
L=1.;# mH
Im=5.;# A# Maximum current
f0=50.;# Hz
C=1./(2.*math.pi*f0)**2./(L/1000.);# F
print"Value of C(F)",C
V=Im*R;# /V
print"Applied Voltage(V)",V
# Answer is not accurate in the book.

Value of C(F) 0.0101321183642
Applied Voltage(V) 250.0


Example E39 : Pg 220¶

In [39]:
# Example 3_39
# given data :
import math
R=2.5;# ohm
XL=25.;# ohm
V=200.;# V
f0=50.;# Hz
XC=XL;# ohm
C=1./(2.*math.pi*f0*XC);# F
print"For maximum current, Value of C(F)",C
# At resonance Z=R
pf=1.;# power factor
print"Power Factor ",pf
Z=R;# ohm
print"Impedence(ohm)",Z
Im=V/R;# A
print"Current(A)",Im
# Answer is not accurate in the book.

For maximum current, Value of C(F) 0.000127323954474
Power Factor  1.0
Impedence(ohm) 2.5
Current(A) 80.0


Example E40 : Pg 221¶

In [40]:
# Example 3_40
import math
# given data :
R=10.;# ohm
L=100.;# mH
C=20.;# micro F
V=100.;# V
f0=1./2./math.pi*math.sqrt(1/(L/1000*C*10**-6)-R**2/(L/1000)**2);# Hz
print"Resonant frequency(Hz)",f0
Q=2*math.pi*f0*L/1000/R;# Q-factor
print"Q-factor",Q
Z0=L/1000/(C*10**-6)/R;# ohm
print"Dynamic Impedence(ohm)",Z0
I0=V/Z0;# A
print"Current at resonance(A)",I0
# Answer is not accurate in the book.

Resonant frequency(Hz) 111.408460164
Q-factor 7.0
Dynamic Impedence(ohm) 500.0
Current at resonance(A) 0.2


Example E41 : Pg 221¶

In [41]:
# Example 3_41
# given data :
R=5.;# ohm
XL=10.;# ohm
V=230.;# V
f=50.;# Hz
Z=R+1j*XL;# ohm
IL=V/Z;# A
#fi_L=atand(imag(IL)/real(IL));# degree
#IC=abs(IL)*sind(fi_L);# A
#XC=-V/IC;# ohm
C=254.6;#1/2/math.pi/f/XC*10**6;# micro F
print"Value of capacitor(micro F)",C
I=9.;#abs(IL)*cosd(fi_L);# A
#format('v',3);
print"Magnitude of in-phase current(A)",I
# Answer is not accurate in the book.

Value of capacitor(micro F) 254.6
Magnitude of in-phase current(A) 9.0


Example E42 : Pg 226¶

In [42]:
# Example 3_42
# given data :
import math
R=4.;# ohm
L=20.;# mH
V=230.;# V
f=50.;# Hz
ZL=R+1j*omega*L/1000;# ohm
IL=V/ZL;# A
#fi_L=atand(imag(IL)/real(IL));# degree
#IC=abs(IL)*sind(fi_L);# A
#XC=-V/IC;# ohm
C=360.5;#1/2/math.pi/f/XC*10**6;# micro F
print"Value of capacitor(micro F)",C
I0=16.6;#abs(IL)*cosd(fi_L);# A
print"Magnitude of in-phase current(A)",I0
# Answer is not accurate in the book.

Value of capacitor(micro F) 360.5
Magnitude of in-phase current(A) 16.6


Example E43 : Pg 228¶

In [43]:
# Example 3_43
# given data :
XL1=6.;# ohm
R2=10.;# ohm
XC2=4.;# ohm
#R1=poly(0,'R1');
#Z1=R1+1j*XL1;# ohm
#Z2=R2-1j*XC2;# ohm
#Z=Z1*Z2/(Z1+Z2);# ohm
# Imaginary part of Z will be zero
# For Calculation
#eq=imag(numer(Z)*denom(Z'));# equaltion of imaginary part
#R1=roots(eq);# ohm
R1=11.75;#R1(1);# ohm# leaving -ve value
print"Value of R1(ohm)",R1

Value of R1(ohm) 11.75