Chapter 25: Application of complex numbers to parallel a.c. circuits

Example 1, page no. 446

In [1]:
from __future__ import division
import math
import cmath
#initializing  the  variables:
Z1  =  0  -  5j;#  in  ohms
Z2  =  25  + 40j;#  in  ohms
Z3  =  3  -  2j;#  in  ohms
r4  =  50;#  in  ohms
theta4  =  40;#  in  degrees

#calculation:
 #admittance  Y
Y1  =  1/Z1
 #conductance,  G
G1  =  Y1.real
 #Suspectance,  Bc
Bc1  =  abs(Y1.imag)
 #admittance  Y
Y2  =  1/Z2
 #conductance,  G
G2  =  Y2.real
 #Suspectance,  Bc
Bc2  =  abs(Y2.imag)
 #admittance  Y
Y3  =  1/Z3
 #conductance,  G
G3  =  Y3.real
 #Suspectance,  Bc
Bc3  =  abs(Y3.imag)
Z4  =  r4*math.cos(theta4*math.pi/180)  +  1j*r4*math.sin(theta4*math.pi/180)
 #admittance  Y
Y4  =  1/Z4
 #conductance,  G
G4  =  Y4.real
 #Suspectance,  Bc
Bc4  =  abs(Y4.imag)


#Results
print  "\n\n  Result  \n\n"
print  "\n  (a)admittance  Y  is  (",round(Y1.real,2),"  +  (",round(Y1.imag,2),")i)  S, "
print   " conductance,  G  is  ",round(G1,2),"  S,  susceptance,Bc  is  ",round(Bc1,2),"  S\n"
print  "\n  (b)admittance  Y  is  (",round(Y2.real,2),"  +  (",round(Y2.imag,2),")i)  S, "
print   " conductance,  G  is  ",round(G2,2),"  S,  susceptance,Bc  is  ",round(Bc2,2),"  S\n"
print  "\n  (c)admittance  Y  is  (",round(Y3.real,2),"  +  (",round(Y3.imag,2),")i)  S, "
print   " conductance,  G  is  ",round(G3,2),"  S,  susceptance,Bc  is  ",round(Bc3,2),"  S\n"
print  "\n  (d)admittance  Y  is  (",round(Y4.real,2),"  +  (",round(Y4.imag,2),")i)  S, "
print   " conductance,  G  is  ",round(G4,2),"  S,  susceptance,Bc  is  ",round(Bc4,2),"  S\n"

  Result  



  (a)admittance  Y  is  ( -0.0   +  ( 0.2 )i)  S, 
 conductance,  G  is   -0.0   S,  susceptance,Bc  is   0.2   S


  (b)admittance  Y  is  ( 0.01   +  ( -0.02 )i)  S, 
 conductance,  G  is   0.01   S,  susceptance,Bc  is   0.02   S


  (c)admittance  Y  is  ( 0.23   +  ( 0.15 )i)  S, 
 conductance,  G  is   0.23   S,  susceptance,Bc  is   0.15   S


  (d)admittance  Y  is  ( 0.02   +  ( -0.01 )i)  S, 
 conductance,  G  is   0.02   S,  susceptance,Bc  is   0.01   S

Example 2, page no. 447

In [2]:
from __future__ import division
import math
import cmath
#initializing  the  variables:
Y2  =  0.001  -  0.002j;#  in  S
Y3  =  0.05  +  0.08j;#  in  S
r1  =  0.004;#  in  S
theta1  =  30;#  in  degrees

 #calculation:
 #impedance,  Z
Z2  =  1/Y2
Z3  =  1/Y3
Y1  =  r1*math.cos(theta1*math.pi/180)  +  1j*r1*math.sin(theta1*math.pi/180)
Z1  =  1/Y1


#Results
print  "\n\n  Result  \n\n"
print  "\n  (a)Impedance,Z  is  (",round(Z1.real,2),"  +  (",round(  Z1.imag,2),")i)  ohm\n"
print  "\n  (b)Impedance,Z  is  (",round(Z2.real,2),"  +  (",round(  Z2.imag,2),")i)  ohm\n"
print  "\n  (c)Impedance,Z  is  (",round(Z3.real,2),"  +  (",round(  Z3.imag,2),")i)  ohm\n"

  Result  



  (a)Impedance,Z  is  ( 216.51   +  ( -125.0 )i)  ohm


  (b)Impedance,Z  is  ( 200.0   +  ( 400.0 )i)  ohm


  (c)Impedance,Z  is  ( 5.62   +  ( -8.99 )i)  ohm

Example 3, page no. 448

In [3]:
from __future__ import division
import math
import cmath
#initializing  the  variables:
Y  =  0.040  -  1j*0.025;#  in  S

#calculation:
 #impedance,  Z
Z  =  1/Y
 #conductance,  G
G  =  Y.real
 #Suspectance,  Bc
Bc  =  abs(Y.imag)
 #parallrl  
 #resistance,  R
Rp  =  1/G
 #capacitive  reactance
Xcp  =  1/Bc
 #series
 #resistance,  R
Rs  =  Z.real
 #capacitive  reactance
Xcs  =  abs(Z.imag)


#Results
print  "\n\n  Result  \n\n"
print  "\n  (a)for  parallel,  resistance,R  is  ",round(Rp,2),"  ohm  and  capacitive  reactance,  Xc  is  ",round(Xcp,2),"  ohm\n"
print  "\n  (b)forseries,  resistance,R  is  ",round(Rs,2),"  ohm  and  capacitive  reactance,  Xc  is  ",round(Xcs,2),"  ohm\n"

  Result  



  (a)for  parallel,  resistance,R  is   25.0   ohm  and  capacitive  reactance,  Xc  is   40.0   ohm


  (b)forseries,  resistance,R  is   17.98   ohm  and  capacitive  reactance,  Xc  is   11.24   ohm

Example 4, page no. 449

In [2]:
from __future__ import division
import math
import cmath
#initializing  the  variables:
R1  =  8;#  in  ohm
R  =  5;#  in  ohm
R2  =  6;#  ohm
rv  =  50;#  in  volts
thetav  =  0;#  in  degrees

#calculation:
 #voltage,V
V  =  rv*math.cos(thetav*math.pi/180)  +  1j*rv*math.sin(thetav*math.pi/180)
 #circuit  impedance,  ZT
ZT  =  R  +  (R1*1j*R2/(R1  +  1j*R2))
 #Current  I
I  =  V/ZT
 #current,I1
I1  =  I*(1j*R2/(R1  +  1j*R2))
 #current,  I2
I2  =  I*(R1/(R1  +  1j*R2))

#Results
print  "\n\n  Result  \n\n"
print  "\n  current,  I  = ",round(abs(I),2),"/_",round(cmath.phase(complex(I.real, I.imag))*180/math.pi,2),"deg  A,"
print   "current,I1  = ",round(abs(I1),2),"/_",round(cmath.phase(complex(I1.real, I1.imag))*180/math.pi,2),"deg  A,  "
print   "current,  I2  = ",round(abs(I2),2),"/_",round(cmath.phase(complex(I2.real, I2.imag))*180/math.pi,2),"deg  A\n"

  Result  



  current,  I  =  5.7 /_ -25.98 deg  A,
current,I1  =  3.42 /_ 27.15 deg  A,  
current,  I2  =  4.56 /_ -62.85 deg  A

Example 5, page no. 450

In [3]:
from __future__ import division
import math
import cmath
#initializing  the  variables:
R1  =  5;#  in  ohm
R2  =  3;#  in  ohm  
R3  =  8;#  ohm
Xc  =  4;#  in  ohms
XL  =  12;#  in  Ohms
V  =  40;#  in  volts
f  =  50;#  in  Hz

#calculation:
Z1  =  R1  +  1j*XL
Z2  =  R2  -  1j*Xc
Z3  =  R3
 #circuit  admittance,  YT  =  1/ZT
YT  =  (1/Z1)  +  (1/Z2)  +  (1/Z3)
 #Current  I
I  =  V*YT
I1  =  V/Z1
I2  =  V/Z2
I3  =  V/Z2
thetav  =  0
thetai  =  cmath.phase(complex(I.real, I.imag))*180/math.pi
phi  =  thetav  -  thetai  
if  (phi>0):
         a  =  "lagging"
else:
         a  =  "leading"



#Results
print  "\n\n  Result  \n\n"
print  "\n  current,  I  is  (",round(I.real,2),"  +  (",round(I.imag,2),")i)  A,"
print   "and  its  phase  relative  to  the  40  V  supply  is  ",a,"s  by  ",round(abs(phi),2),"deg\n"

  Result  



  current,  I  is  ( 10.98   +  ( 3.56 )i)  A,
and  its  phase  relative  to  the  40  V  supply  is   leading s  by   17.96 deg

Example 6, page no. 451

In [2]:
from __future__ import division
import math
import cmath
#initializing  the  variables:
L  =  0.07958;#  in  Henry
R  =  18;#  in  ohm
C  =  64.96E-6;#  in  Farad
rv  =  250;#  in  volts
thetav  =  0;#  in  degrees
f  =  50;#  in  Hz

#calculation:
 #Inductive  reactance
XL  =  2*math.pi*f*L
 #capacitive  reactance
Xc  =  1/(2*math.pi*f*C)
 #impedance  of  the  coil,
Zcoil  =  R  +  1j*XL
 #impedance  presented  by  the  capacitor,
Zc  =  -1j*Xc
 #Total  equivalent  circuit  impedance,
ZT  =  Zcoil*Zc/(Zcoil  +  Zc)
 #voltage
V  =  rv*math.cos(thetav*math.pi/180)  +  1j*rv*math.sin(thetav*math.pi/180)
 #current,  I
I  =  V/ZT
thetai  =  cmath.phase(complex(I.real,I.imag))*180/math.pi
phi  =  thetav  -  thetai
if  (phi>0):
         a  =  "lagging"
else:
         a  =  "leading"

 #Current  in  the  coil,  ICOIL
Icoil  =  V/Zcoil
 #Current  in  the  capacitor,  IC
Ic  =  V/Zc



#Results
print  "\n\n  Result  \n\n"
print  "\n  (a)the  circuit  impedance  is  ",round(ZT.real,2),"  +  (",round(  ZT.imag,2),")i  ohm\n"
print  "\n  (b)supply  current,  I  = ",round(abs(I),2),"/_",round(cmath.phase(complex(I.real, I.imag))*180/math.pi,2),"deg  A\n"
print  "\n  (c)circuit  phase  relative  is  ",a,"s  by  ",round(abs(phi),2),"deg\n"
print  "\n  (d)current  in  coil,  Icoil  = ",round(abs(Icoil),2),"/_",round(cmath.phase(complex(Icoil.real, Icoil.imag))*180/math.pi,2),"deg  A\n"
print  "\n  (e)current  in  capacitor,  Ic  = ",round(abs(Ic),2),"/_",round(cmath.phase(complex(Ic.real, Ic.imag))*180/math.pi,2),"deg A\n"

  Result  



  (a)the  circuit  impedance  is   48.02   +  ( 15.03 )i  ohm


  (b)supply  current,  I  =  4.97 /_ -17.38 deg  A


  (c)circuit  phase  relative  is   lagging s  by   17.38 deg


  (d)current  in  coil,  Icoil  =  8.12 /_ -54.25 deg  A


  (e)current  in  capacitor,  Ic  =  5.1 /_ 90.0 deg A

Example 7, page no. 452

In [6]:
from __future__ import division
import math
import cmath
#initializing  the  variables:
RL  =  6j;#  in  ohm
R2  =  8;#  in  ohm
Z3  =  10;#  in  ohm
rv  =  50;#  in  volts
thetav  =  30;#  in  degrees
ri  =  31.4;#  in  amperes
thetai  =  52.48;#  in  degrees
f  =  5000;#  in  Hz

#calculation:
 #impedance,  Z2
Z2  =  R2  +  RL
 #voltage
V  =  rv*math.cos(thetav*math.pi/180)  +  1j*rv*math.sin(thetav*math.pi/180)
 #current,  I
I  =  ri*math.cos(thetai*math.pi/180)  +  1j*ri*math.sin(thetai*math.pi/180)
 #Total  circuit  admittance,
YT  =  I/V
 #admittance,  Y3
Y3  =  1/Z3
 #admittance,  Y2
Y2  =  1/Z2
 #admittance,  Y1
Y1  =  YT  -  Y2  -  Y3
 #impedance,  Z1
Z1  =  1/Y1

#Results
print  "\n\n  Result  \n\n"
print  "\n  (a)the  impedance  Z1  is  ",round(Z1.real,2),"  +  (",round(  Z1.imag,2),")i  ohm\n"

 #resistance,  R1
R1  =  Z1.real
X1  =  Z1.imag  
if  ((R1>0)&(X1<0)):
    C1  =  -1/(2*math.pi*f*X1)
    print  "\n  (b)The  series  circuit  thus  consists  of  a  resistor  of  resistance  ",round(R1,2),"  ohm"
    print   "  and  a  capacitor  of  capacitance  ",round(C1*1E6,2),"uFarad\n"
elif  ((R1>0)&(X1>0)):
    L1  =  2*math.pi*f*X1
    print  "\n  (b)The  series  circuit  thus  consists  of  a  resistor  of  resistance  ",round(R1,2),"  ohm "
    print   " and  a  inductor  of  insuctance  ",round(L1*1000,2),"mHenry\n"

  Result  



  (a)the  impedance  Z1  is   1.6   +  ( -1.2 )i  ohm


  (b)The  series  circuit  thus  consists  of  a  resistor  of  resistance   1.6   ohm
  and  a  capacitor  of  capacitance   26.55 uFarad

Example 8, page no. 453

In [8]:
from __future__ import division
import math
import cmath
#initializing  the  variables:
RL1  =  1.02j;#  in  ohm
R1  =  1.65;#  in  ohm
RLa  =  7j;#  in  ohm
Ra  =  5;#  in  ohm
Rcb  =  -1j*15;#  in  ohm
Rb  =  4;#  in  ohm
rv  =  91;#  in  volts
thetav  =  0;#  in  degree

#calculation:
 #voltage
V  =  rv*math.cos(thetav*math.pi/180)  +  1j*rv*math.sin(thetav*math.pi/180)
 #impedance,  Z1
Z1  =  R1  +  RL1
 #impedance,  Za
Za  =  Ra  +  RLa
 #impedance,  Zb
Zb  =  Rb  +  Rcb
 #impedance,  Z,  of  the  two  branches  connected  in  parallel
Z  =  Za*Zb/(Za  +  Zb)
 #Total  circuit  impedance
ZT  =  Z1  +  Z
 #Supply  current,  I
I  =  V/ZT
thetai  =  cmath.phase(complex(I.real, I.imag))*180/math.pi
phi  =  thetav  -  thetai  
if  (phi>0):
         a  =  "lagging"
else:
         a  =  "leading"

 #Voltage  V1
V1  =  I*Z1
 #Voltage  V2
V2  =  I*Z
 #current  Ia
Ia  =  V2/Za
 #Current  Ib
Ib  =  V2/Zb


#Results
print  "\n\n  Result  \n\n"
print  "\n  (a)equivalent  series  circuit  impedance  is  ",round(ZT.real,2),"  +  (",round(  ZT.imag,2),")i  ohm\n"
print  "\n  (b)supply  current,  I  is  ",round(I.real,2),"  +  (",round(  I.imag,2),")i  A\n"
print  "\n  (c)circuit  phase  relative  is  ",a,"  by  ",round(abs(phi),2),"deg\n"
print  "\n  (d)voltage,  V1  is  (",round(V1.real,2),"  +  (",round(V1.imag,2),")i)  V  and  V2  is(",round(V2.real,2),"  +  (",round(  V2.imag,2),")i)  V\n"
print  "\n  (e)current,  Ia  is  (",round(Ia.real,2),"  +  (",round( Ia.imag,2),")i)  A  and  Ib  is(",round(Ib.real,2),"  +  (",round(  Ib.imag,2),")i)  A\n"

  Result  



  (a)equivalent  series  circuit  impedance  is   12.0   +  ( 5.0 )i  ohm


  (b)supply  current,  I  is   6.46   +  ( -2.69 )i  A


  (c)circuit  phase  relative  is   lagging   by   22.61 deg


  (d)voltage,  V1  is  ( 13.41   +  ( 2.15 )i)  V  and  V2  is( 77.59   +  ( -2.15 )i)  V


  (e)current,  Ia  is  ( 5.04   +  ( -7.49 )i)  A  and  Ib  is( 1.42   +  ( 4.79 )i)  A