Chapter 1 Passive Circuits

Example 1.2.2, Pg.no.5

In [50]:
import math
#given
Ro=50.0
ILdB=6.0                    #T−type attenuator provide 6−dB insertion loss 
#calculation
IL=10**-(ILdB/20)           #Determination of R
R=Ro*(1-IL)/(1+IL)
R=round(R,2)
print 'The value of resistance R is',R,'ohm' 
#Determination of R3
R3=(2*Ro*IL)/(1-(0.5)**2)
R3=round(R3,1)
print 'The value of resistance R3 is',R3,'ohm'
The value of resistance R is 16.61 ohm
The value of resistance R3 is 66.8 ohm

Example 1.2.3,Pg.no.6

In [51]:
import math
#given
Ro=50.0
ILdB=6.0
IL=10**-(ILdB/20)         #Determination of RA and RB
RA=Ro*(1+IL)/(1-IL)
RA=round(RA,1)
print 'The value of resistance RA and RB is',RA,'ohm'
#Determination of RC
RC=Ro*(1-(IL)**2)/(2*IL)
RC=round(RC,1)
print 'The value of resistance RC is',RC,'ohm'
The value of resistance RA and RB is 150.5 ohm
The value of resistance RC is 37.4 ohm

Example 1.2.4,Pg.no.8

In [52]:
import math
from math import log10,sqrt
#given
Rs=75.0          #resistance
Rl=50.0       
#Determination of R1
R1=sqrt(Rs*(Rs-Rl))
R1=round(R1,2)
print 'The value of resistance R1 is',R1,'ohm'
#Determination of R3
R3=((Rs**2)-(R1**2))/R1
R3=round(R3,2)
print 'The value of resistance R3 is',R3,'ohm'
#Determination of insertion loss
IL=(R3*(Rs+R1))/((Rs+R1+R3)*(R3+R1)-(R3)**2)
ILdB=-20*log10(IL) #convertion of power in decibels
ILdB=round(ILdB,2)
print 'The value of insertion loss is',ILdB,'dB'
The value of resistance R1 is 43.3 ohm
The value of resistance R3 is 86.61 ohm
The value of insertion loss is 5.42 dB

Example 1.2.5,Pg.no.9

In [53]:
from math import log10,sqrt
Rs=10.0
Rl=50.0        #Determination of R2
R2=sqrt(Rl*(Rl-Rs))
R2=round(R2,3)
print 'The value of resistance R2 is',R2,'ohm'
#Determination of R3
R3=((Rl**2)-(R2**2))/R2
R3=round(R3,2)
print 'The value of resistance R3 is',R3,'ohm'
#Determination of insertion loss
IL=(R3*(Rs+Rl))/((Rs+R3)*(R3+R2+Rl)-(R3)**2)
ILdB=-20*log10(IL)           #convertion of power in decibels
ILdB=round(ILdB,2)
print 'The value of insertion loss is',ILdB,'dB'
The value of resistance R2 is 44.721 ohm
The value of resistance R3 is 11.18 ohm
The value of insertion loss is 9.99 dB

Example 1.5.1,Pg.no.19

In [54]:
import math
from math import sqrt
C=7*10**-12
R=5.0
L=10**-6
f=25*10**6       
#Determination of self resonant freq of coil denoted as Fsr
Fsr=1/(2*3.14*(L*C)**0.5)
Fsr=Fsr/(10**6)
Fsr=round(Fsr,1)
print 'The value of self resonant freq is',Fsr,'MHz'
#Determination of Q−factor of coil , excluding self − capacitive effects
Q=(2*3.14*f*L)/R
print 'The value of Q−factor is',Q
#Determination of effective inductance
Leff=(1-(25/60)**2)**-1
Leff=round(Leff,0)
print 'The value of effective inductance is',Leff,'uH'
#Determination of effective Q−factor
Qeff=(1-0.173)*Q
Qeff=round(Qeff,0)
print 'The value of effective Q−factor is',Qeff
The value of self resonant freq is 60.2 MHz
The value of Q−factor is 31.4
The value of effective inductance is 1.0 uH
The value of effective Q−factor is 26.0

Example 1.8.1,Pg.no.23

In [55]:
import cmath
from math import sqrt
#given
Lp=150*10**-6           #inductance
Ls=150*10**-6
Cp=470*10**-12          #capacitance
Cs=470*10**-12          #Lp=Ls=150 uH,Cp=Cs=470 pF
Q=85.0                  #Q−factor for each ckt is 85
c=0.01                  #Coeff of coupling is 0.01
Rl=5000.0               #Load resistance Rl=5000 ohm
r=75000.0               #Constant current source with internal resistance r=75 kohm
#calculations
#Determination of common resonant frequency
wo=1/(sqrt(Lp*Cp))
wo=wo/(10**6)
wo=round(wo,2)
print 'The value of common resonant freq is',wo,'Mrad/sec'
p=3.77*10**6
Z2=complex(62.9004,558)               #Formula=Rl/(1+(p*j*Cs*Rl))
Z1=complex(4.3,565)                   #Formula=r/(1+(p*j*Cp*r)) ;At resonance Zs=Zp=Z
z=complex(0,1)
Z=wo*Ls*(1/Q +z)
Zm=complex(0,p*c*Lp)             #Determination of denominator
print 'Zm=',Zm
Dr=((Z+Z1)*(Z+Z2))-(Zm**2) 
Dr=complex(791,80)
#Hence transfer impedance is given as
Zr=complex(43.8,2.25*10**3)        #formula=(Z1*Z2*Zm)/Dr
print 'The transfer impedance is',Zr,'ohm'
The value of common resonant freq is 3.77 Mrad/sec
Zm= 5.655j
The transfer impedance is (43.8+2250j) ohm

Example 1.10.1,Pg.no.31

In [56]:
import math
C1=70*10**-12
C2=150*10**-12
Rl=200.0
Q=150.0
f=27*10**6
r=40000.0
#Determination of common resonant freq
wo=2*3.14*f
wo=wo/(10**6)
print 'The value of common resonant freq is',wo,'Mrad/ sec'
#Determination of Gl
Gl=1/Rl
G1=Gl*(10**3) 
print'The value of Gl is',G1,'mSec'
#Checking the approxiamtion in denominator
ap=((wo*(C1+C2))/(Gl))**2
alpha=(C1+C2)/C1
alpha=round(alpha,2)
print 'The value of alpha is',alpha
#Determination of effective load
Reff=((alpha)**2)*Rl
Reff=Reff/(10**3)
Reff=round(Reff,2)
print 'The value of effective load is',Reff,'kohm'   
#If effective load is much less than internal resistance hence tuning capacitance then
Cs=C1*C2/(C1+C2)
Cs=Cs*(10**12)
Cs=round(Cs,2)
print 'The value of tuning capacitance is',Cs,'pF'
#Determination of Rd
Rd=Q/(wo*Cs)*(10**3)
Rd=round(Rd,3)
print 'The value of Rd is',Rd,'kohm'
#If Rd is much greater than Reff then −3dB bandwidth is given by
B=1/(2*3.14*C2*alpha*Rl)
B=B/(10**6)
B=round(B,2)
print 'The value of −3dB BW is',B,'MHz'
The value of common resonant freq is 169.56 Mrad/ sec
The value of Gl is 5.0 mSec
The value of alpha is 3.14
The value of effective load is 1.97 kohm
The value of tuning capacitance is 47.73 pF
The value of Rd is 18.534 kohm
The value of −3dB BW is 1.69 MHz