Chapter 7: Oscillators

Example 7.1, Page No. 470

In [42]:
# oscillation frequency 

import math
#Variable declaration
c=450.0         # capacitance of tunned circuit in pico farad
L=29.3          # INDUCTANCE of tunned circuit in micro henry

#Calculations
fo=(1/(2*math.pi*math.sqrt(L*10**-6*c*10**-12)))*10**-6

#Result
print("tunned frequency = %.2f MHz"%fo)
tunned frequency = 1.39 MHz

Example 7.2, Page No. 470

In [47]:
# tunned capacitance range of tunned circuit

import math
#Variable declaration
L=100.0              # INDUCTANCE of tunned circuit in micro henry
fo1=500.0            # tunned frequency in killo hertz
fo2=1500.0           # tunned frequency in killo hertz

#Calculations
C1= (1/(4*math.pi**2*(fo1*10**3)**2*L*10**-6))     # tunned capacitance
C2= (1/(4*math.pi**2*(fo2*10**3)**2*L*10**-6))     # tunned capacitance

#Result
print("tunned capacitance range of tunned circuit in pF is %.1f - %.f"%(C2*10**12,C1*10**12))
tunned capacitance range of tunned circuit in pF is 112.6 - 1013

Example 7.3, Page No. 470

In [3]:
# TRANSFORMER WINDING RATIO

import math
#Variable declaration
Vcc=12.0             # collector vltage
Po=88.0              # power output in milli watt
Ploss=8.0            # power losses in milli watt
gm=10.0              # transconductance in milli ampere per volt


#Calculations
Pi= Po+Ploss         # input power in milli watt
Ic= Pi/Vcc           # collector current in milli ampere
Vb= Ic/(gm)          # base VOLTAGE 
TR=Vcc/Vb            # transfomer turn ratio

#Result
print("transformer winding turn-ratio is %.f"%TR)
transformer winding turn-ratio is 15

Example 7.4, Page No. 478

In [8]:
# oscillation frequency 

import math
#Variable declaration
C1=0.005               # capacitance of tunned circuit in micro farad
C2=0.01                # capacitance of tunned circuit in micro farad
L=100.0                # INDUCTANCE of tunned circuit in micro henry

#Calculations
C=(C1*C2)/(C1+C2)                                      # total capacitance in micro farad
C = math.floor(C*10**4)/10**4
fo=(1/(2*math.pi*math.sqrt(L*10**-6*C*10**-6)))        # tunned frequency in killo hertz

#Result
print C
print("tunned frequency = %.2f kHz"%(fo*10**-3))
0.0033
tunned frequency = 277.05 kHz

Example 7.5, Page No. 478

In [10]:
# oscillation frequency 

import math
#Variable declaration
C1=500.0             # capacitance of tunned circuit in PICO farad
C2=500.0             # capacitance of tunned circuit in pico farad
L=1.0                #INDUCTANCE of tunned circuit in milli henry

#Calculations
C=(C1*C2)/(C1+C2)                                       # total capacitance in micro farad
fo=(1/(2*math.pi*math.sqrt(L*10**-3*C*10**-12)))*10**-3 #tunned frequency in killo hertz

#Result
print("tunned frequency = %.1f kHz"%fo)
tunned frequency = 318.3 kHz

Example 7.6, Page No. 478

In [12]:
# tunned capacitance and inductance of tunned circuit

import math
#Variable declaration
fo=500.0              # tunned frequency in killo hertz
L3=1.0                # assume inductance 


#Calculations
LC= (1/(4*math.pi**2*(fo*10**-3)**2)) 
C=LC/(L3*10**-3)      # capacitance in pico farad
C1= 2*C 
C2=C1


#Result
print("inductance                              = %.f mH"%L3)
print("tunned capacitance C1 of tunned circuit = %.1f pF"%C1)
print("tunned capacitance C2 of tunned circuit = %.1f pF"%C2)
inductance                              = 1 mH
tunned capacitance C1 of tunned circuit = 202.6 pF
tunned capacitance C2 of tunned circuit = 202.6 pF

Example 7.8, Page No.484

In [1]:
# tunned capacitance  of tunned circuit

import math
#Variable declaration
fo1=50.0               # tunned frequency in killo hertz
L1=100.0               # inductance in micro henry
L2=100.0               # inductance in micro henry

#Calculations
C= (1/(4*math.pi**2*(fo1*10**-6)**2*(L1+L2)*10**-6))*10**-12

#Result
print("tunned capacitance  tunned circuit = %.5f micro-F"%C)
tunned capacitance  tunned circuit = 0.05066 micro-F

Example 7.9, Page No. 485

In [2]:
# oscillation frequency 

import math
#Variable declaration
C=0.2           # capacitance of tunned circuit in MICRO farad
L1=0.5          # INDUCTANCE of tunned circuit in milli henry
L2=1.0          # INDUCTANCE of tunned circuit in milli henry

#Calculaions
fo=(1/(2*math.pi*math.sqrt((L1+L2)*10**-3*C*10**-6)))

#Result
print("tunned frequency = %.1f kHz"%fo)
tunned frequency = 9188.8 kHz

Example 7.10, Page No. 485

In [7]:
# oscillation frequency 

import math
#Variable declaration
C=100.0          # capacitance of tunned circuit in pico farad
L1=1.0           # INDUCTANCE of tunned circuit in milli henry
L2=0.1           # INDUCTANCE of tunned circuit in milli henry
M = 0.05         # Mutual INDUCTANCE of tunned circuit in milli henry 

#Calculations
fo=(1/(2*math.pi*math.sqrt((L1+L2+2*M)*10**-3*C*10**-12))) # tunned frequency in killo hertz


#Result
print("tunned frequency = %.f kHz"%(fo/1000))
tunned frequency = 459 kHz

Example 7.11, Page No.485

In [8]:
# feedback ratio

import math
#Variable declaration
Af=40.0            # gain wtih feedback
Vi=2.4             # input voltage
Vif=0.1            # input voltage with feedback


#Calculations
A= Af*(Vi/Vif)     # gain without feedback
Beta= (1-(A/Af))/A # feedback ratio

#Result
print("feedback ratio = %.3f"%Beta)
feedback ratio = -0.024

Example 7.12, Page No.488

In [19]:
# resonant frequency

import math
#Variable declaration
Cs=0.08               # capacitance of tunned circuit in pico farad
Ls=0.8                # series INDUCTANCE of tunned circuit in henry
Cp=1.0                # parallel capacitance in pico farad
Rs=5.0                # SERIES RESISTANCE IN KILLO OHMS

#Calculations
fs=round((1/(2*math.pi*math.sqrt(Ls*Cs*10**-12)))*10**-3)               # series tunned frequency in killo hertz
fp=round(((1/(2*math.pi))*math.sqrt((1+Cs/Cp)/(Ls*Cs*10**-12)))*10**-3) # parralel tunned frequency in killo hertz


#Result
print("series tunned frequency   = %.f kHz"%fs)
print("parallel tunned frequency = %.f kHz"%fp)
series tunned frequency   = 629 kHz
parallel tunned frequency = 654 kHz

Example 7.13, Page No. 488

In [16]:
# quality factor

import math
#Variable declaration
f=450.0               # resonant frequency in killo hertz
L=4.2                 # inductnace in henry
R=600.0               # resistance in ohms

#Calculations
Q= (2*math.pi*f*10**3*L)/R

#Result
print("quality factor is %.f"%Q)
#Answer in the book is slightly different
quality factor is 19792

Example 7.14, Page No.489

In [18]:
# resonant frequency

import math
#Variable declaration
Cs=0.01                # capacitance of tunned circuit in pico farad
Ls=0.8                 # series INDUCTANCE of tunned circuit in henry
Cp=20.0                # parallel capacitance in pico farad
Rs=5.0                 # SERIES RESISTANCE IN KILLO OHMS


#Calculations
fs=((1/(2*math.pi*math.sqrt(Ls*Cs*10**-12)))*10**-3)              # series tunned frequency in killo hertz
fp=(((1/(2*math.pi))*math.sqrt((1+Cs/Cp)/(Ls*Cs*10**-12)))*10**-3)# parralel tunned frequency in killo hertz


#Result
print("Series tunned frequency   = %.2f kHz"%(math.floor(fs*100)/100))
print("Parallel tunned frequency = %.2f KHz"%fp)
Series tunned frequency   = 1779.40 kHz
Parallel tunned frequency = 1779.85 KHz

Example 7.15, Page No.489

In [31]:
# resonant frequency,percentage change and quality factor

import math
#Variable declaration
Cs=0.065               # capacitance of tunned circuit in pico farad
Ls=0.33                # series INDUCTANCE of tunned circuit in henry
Cp=1.0                 # parallel capacitance in pico farad
Rs=5.5                 # SERIES RESISTANCE IN KILLO OHMS

#Calculation
fs=round((1/(2*math.pi*math.sqrt(Ls*Cs*10**-12)))*10**-3)               # series tunned frequency in killo hertz
fp=math.ceil(((1/(2*math.pi))*math.sqrt((1+Cs/Cp)/(Ls*Cs*10**-12)))*10**-3) # parralel tunned frequency in killo hertz
Pc= ((fp-fs)/fs)*100   # percentage by which series resonant frequency exceeds the parallel resonant frequency
Qs= ((2*math.floor(math.pi*100)*fs*10**3*Ls/100)/(Rs*10**3))                           # quality factor with series resonant frequency
Qp= ((2*math.floor(math.pi*100)*fp*10**3*Ls/100)/(Rs*10**3))                 # quality factor with parallled resonant frequency

#Result
print("series tunned frequency   = %.f kHz"%fs)
print("parallel tunned frequency = %.f kHz"%fp)
print("percentage by which series resonant frequency exceeds the parallel resonant frequency = %.1f%%"%Pc)
print("quality factor with series resonant frequency is %.2f"%Qs)
print("quality factor with paralled resonant frequency is %.2f"%(math.floor(Qp*100)/100))
series tunned frequency   = 1087 kHz
parallel tunned frequency = 1122 kHz
percentage by which series resonant frequency exceeds the parallel resonant frequency = 3.2%
quality factor with series resonant frequency is 409.58
quality factor with paralled resonant frequency is 422.76

Example 7.16, Page No.490

In [34]:
# oscillation frequency 

import math
#Variable declaration
C1=120.0               # capacitance of tunned circuit in PICO farad
C2=1500.0              # capacitance of tunned circuit in pico farad
C3=15.0                # capacitance of tunned circuit in pico farad
L=10.0                 # INDUCTANCE of tunned circuit in micro henry


#Calculations
Cx=(C1*C2)/(C1+C2)     # capacitance in pico farad
Ct=(Cx*C3)/(Cx+C3)     # total capacitance in pico farad
fo=(1/(2*math.pi*math.sqrt(L*10**-6*Ct*10**-12)))*10**-6      # tunned frequency in mega hertz
foa= (1/(2*math.pi*math.sqrt(L*10**-6*C3*10**-12)))*10**-6    # actual resonant frequency in mega hertz

#Result
print("tunned frequency          = %.2f MHz"%fo)
print("actual resonant frequency = %.2f MHz"%foa)
tunned frequency          = 13.84 MHz
actual resonant frequency = 12.99 MHz

Example 7.17, Page No. 490

In [35]:
# resonant frequency 

import math
#Variable declaration
R=500.0               # resistance in ohms
C1=0.01               # capacitance of tunned circuit in pico farad
C2=10.0               # capacitance of tunned circuit in pico farad
L=0.06                # INDUCTANCE of tunned circuit in  henry

#Calculations
C=(C1*C2)/(C1+C2)     # total capacitance in micro farad
fs=((1/(2*math.pi*math.sqrt(L*C1*10**-12)))*10**-6)  # series tunned frequency in mega hertz
C=(C1*C2)/(C1+C2)                                    # total capacitance in pico farad
fp=(1/(2*math.pi*math.sqrt(L*C*10**-12))*10**-6)     #parralel tunned frequency in mega hertz

#Result
print("series tunned frequency   = %.3f MHz"%fs)
print("parallel tunned frequency = %.4f MHz"%fp)
series tunned frequency   = 6.497 MHz
parallel tunned frequency = 6.5007 MHz

Example 7.18, Page No. 491

In [36]:
# oscillation frequency 

import math
#Variable declaration
C=100.0                   # capacitance of tunned circuit in pico farad
L1=50.0                   # INDUCTANCE of tunned circuit in micro henry
L2=50.0                   # INDUCTANCE of tunned circuit in micro henry

#Calculations
fo=(1/(2*math.pi*math.sqrt((L1+L2)*10**-6*C*10**-12)))*10**-6          # tunned frequency in mega hertz

#Result
print("Tunned frequency = %.2f MHz"%fo)
Tunned frequency = 1.59 MHz

Example 7.19, Page No.491

In [37]:
# oscillation frequency 

import math
#Variable declaration
C1=120.0             # capacitance of tunned circuit in PICO farad
C2=1500.0            # capacitance of tunned circuit in pico farad
L=10.0               # INDUCTANCE of tunned circuit in micro henry

#Calculation
C=(C1*C2)/(C1+C2)    # total capacitance in pico farad
fo=(1/(2*math.pi*math.sqrt(L*10**-6*C*10**-12)))*10**-6    # tunned frequency in mega hertz

#Result
print("tunned frequency = %.2f MHz"%fo)
tunned frequency = 4.77 MHz

Example 7.20, Page No.491

In [38]:
# oscillation frequency 

import math
#Variable declaration
C1=120.0            # capacitance of tunned circuit in PICO farad
C2=1500.0           # capacitance of tunned circuit in pico farad
C3=15.0             # capacitance of tunned circuit in pico farad
L=10.0              # INDUCTANCE of tunned circuit in micro henry


#Calculations
Cx=(C1*C2)/(C1+C2)  # capacitance in pico farad
Ct=(Cx*C3)/(Cx+C3)  # total capacitance in pico farad
fo=(1/(2*math.pi*math.sqrt(L*10**-6*Ct*10**-12)))*10**-6       # tunned frequency in mega hertz


#Result
print("tunned frequency = %.2f MHz"%fo)
tunned frequency = 13.84 MHz

Example 7.21, Page No.497

In [6]:
# oscillation frequency 

import math
#Variable declaration
C=100.0             # capacitance in pico farad
R=800.0             # resistance in killo ohms

#Calculations
fo=round(1/(2*math.pi*R*10**3*C*10**-12*math.sqrt(6))) # RESONANT FREQUENCY IN HERTZ


#Result
print("Resonant frequency = %.f Hz"%fo)
Resonant frequency = 812 Hz

Example 7.22, Page No.498

In [8]:
# oscillation frequency 

import math
#Variable declaration
w=2*10**3                  # in radiand per second

#Calculations
f= round(w/(2*math.pi))    # resonant frequency
X=(((16*10**9*4*w**2*10**3))/((4*w**2*10**3)**2))

#Result
print("resonant frequency         = %.f Hz"%f)
print("oscillations are sustained = %.f"%X)
resonant frequency         = 318 Hz
oscillations are sustained = 1

Example 7.23, Page No. 502

In [41]:
# Design R-C phase shift oscillator

import math
#Variable declaration
fo=1.0                        # resonant frequency in killo hertz
Av= 29.0                      # voltage gain
Vcc=10.0                      # collector voltage
Ib=0.5                        # maximum base current in micro ampere
Rf2=180.0                     # standard resistance in killo ohms


#Calculations
I1=100*Ib                     # assume current in micro ampere
Vosat= 0.9*Vcc                # saturation voltage assume
V1=Vosat/Av                   # voltage for sustained oscillations
R1=(V1/(I1*10**-6))*10**-3    # RESISTANCE IN KILLO PHMS
Rf1=Av*R1                     # resistance in killo ohms
R3=Rf2 
R=R1 
C=(1/(2*math.pi*R*10**3*fo*10**3*math.sqrt(6)))*10**6 


#Result
print("Resistance  R1 for the R-C Phase shift oscillator  = %.1f k-ohm"%R)
print("Resistance Rf for the R-C Phase shift oscillator   = %.f k-ohm"%R3)
print("Capacitance for the R-C Phase shift oscillator     = %.2f micro-F"%C)
Resistance  R1 for the R-C Phase shift oscillator  = 6.2 k-ohm
Resistance Rf for the R-C Phase shift oscillator   = 180 k-ohm
Capacitance for the R-C Phase shift oscillator     = 0.01 micro-F

Example 7.24, Page No. 502

In [48]:
# drain resistance and Design R-C phase shift oscillator

import math
#Variable declaration
Mu=55.0
rd=5.5                # resistane in killo ohms
fo=5.0                # resonant frequency in killo hertz
A= 29.0               # voltage gain
R=30.0                # assume Resistance in killo ohms


#Calculations
Rd= (29*rd)/(Mu-A)    # resistance in killo ohms
RC=((1/(2*math.pi*fo*10**3*math.sqrt(6)))*10**6) 
C=(RC*10**-6/(30*10**3)*10**12)


#Result
print("drain resistance                               = %.2f k-ohm"%Rd)
print("R-C time constant                              = %.f pico-sec"%(math.ceil(RC)))
print("Capacitance for the R-C Phase shift oscillator = %.f pF"%C)
#Answer for capacitance is wrong in the book
drain resistance                               = 6.13 k-ohm
R-C time constant                              = 13 pico-sec
Capacitance for the R-C Phase shift oscillator = 433 pF

Example 7.25, Page No.503

In [49]:
# Vf/Vo,frequency of oscillations and minimum gain

import math
#Variable declaration
Beta=1.0/29


#Calculations
VfVo= (Beta+1)


#Result
print("Voltage gain = %f"%VfVo)
print("\nf=1/(2*%pi*R*C*sqrt(6)) frequency of oscillations")
print("\nAs gain is more than one oscillations will be sustained")
Voltage gain = 1.034483

f=1/(2*%pi*R*C*sqrt(6)) frequency of oscillations

As gain is more than one oscillations will be sustained

Example 7.26, Page No. 510

In [70]:
# design wein bridge oscillator

import math
#Variable declaration
Vcc=15.0                           # collector voltage
f=10.0                             # frequency of oscillation in killo hertz
I=1.0                              # current in millo ampere


#Calculations
Vo=Vcc-1                           # maximum output voltage
x=Vo/I                             # resistance in killo ohms
R4=x/3                             # resistance in killo ohms
R3= 2*R4                           # resistance in killo ohms
R4_s = 4.7                         # Standard value
R3_s = 10                          # Standard value 
A= (1+(R3_s/R4_s))                   # amplifier gain
R=R4_s                               # resistance in killo ohms
C=(1/(2*math.pi*f*10**3*R*10**3))*10**9


#Result
print("Amlifier gain   = %.2f"%(math.floor(A*100)/100))
print("resistance R4   = %.1f k-ohm (use 4.7 k-ohm standard value)"%R)
print("resistance R3   = %.1f k-ohm (use 10 k-ohm standard value)"%(math.ceil(R3*10)/10))
print("Capacitance     = %.2f nF"%(math.floor(C*100)/100))
#print("this is name as example 7.27 in the book" )
Amlifier gain   = 3.12
resistance R4   = 4.7 k-ohm (use 4.7 k-ohm standard value)
resistance R3   = 9.4 k-ohm (use 10 k-ohm standard value)
Capacitance     = 3.38 nF

Example 7.27 Page No.511

In [75]:
# sustained oscillations and output frequency

import math
#Variable declaration
R4=5.1                     # resistance in killo ohms
R3=12.0                    # resistance in killo ohms
C=1.0                      # capacitance in nano farad

#Calculations
A= (1+(R3/R4))        # amplifier gain
R=R4                       # resistance in killo ohms
fo= (1/(2*math.pi*C*10**-9*R*10**3))*10**-3

#Result
print("Amlifier gain is %.2f. It is greater than 1 so circuit will oscillate."%A)
print("Oscillation frequency = %.1f kHz"%fo)
Amlifier gain is 3.35. It is greater than 1 so circuit will oscillate.
Oscillation frequency = 31.2 kHz

Example 7.29, Page No.514

In [85]:
# design wein bridge oscillator

import math
#Variable declaration
Vcc=10.0             # collector voltage
f=10.0               # frequency of oscillation in killo hertz
I=500.0              # current in micro ampere


#Calculations
Vo=Vcc-1             # maximum output voltage
x=(Vo/I)*10**3       # resistance in killo ohms
R4=x/3               # resistance in killo ohms
Rf= 2*R4             # resistance in killo ohms
R4_s = 5.6           # standard value
R=R4_s               # resistance in killo ohms
C=(1/(2*math.pi*f*10**3*R*10**3))*10**12

#Resulr
print("Resistance R  = R1 = %.f k-ohm(uswe 5.6k as standard value)"%R)
print("resistance Rf = %.f k-ohm"%Rf)
print("Capacitance   = %.f nF(use 2700 nF as standard value)"%C)
Resistance R  = R1 = 6 k-ohm(uswe 5.6k as standard value)
resistance Rf = 12 k-ohm
Capacitance   = 2842 nF(use 2700 nF as standard value)

Example 7.30, Page No.514

In [87]:
print("Theoretical example")
Theoretical example

Example 7.31, Page No.515

In [ ]:
print("Theoretical example")

Example 7.32, Page No. 517

In [91]:
# Design R-C phase shift oscillator

import math
#Variable declaration
Vce=5.0                  # in volts
RE=1.0                   # emitter reistsance in killo ohms
Vbe=0.7                  # in volts
Ie=1.0                   # emitter current in mA
Re=1.0                   # EMITTER RESISTANCE IN KILLO OHMS
f=100.0                  # oscillaor frequency in killo hertz
hfe=100.0
hie=1.0                  # in killo ohms
Vc=5.0                   # in volts
Ic=1.0                   # current in mili ampere
Vcc=20.0                 # in volts
R=10.0                   # resistane in killo ohms

#Calculations
Rc=(Vcc-Vce-Ie*Re)/(Ic)  # collector resistance in killo ohms is
k= Rc/R
C= ((1/(2*math.pi*R*10**3*f*10**3*math.sqrt(6+(4*1.4)))))*10**12
R3= R-hie                # resistance in kiilo ohms
Vb= (Vbe+Ie*Re)          # voltage at base
R2=R 
I2=Vb/R2                 # in mA
V2=(Vcc-R2*I2)           # voltage drop across R2
IR1= (I2+(1.0/100))      # CURRENT ACROOS R1
R1= V2/(IR1) 


#Result
print("Emitter resistance   = %.f  k-ohm"%Re)
print("collector resistance = %.f k-ohm"%Rc)
print("resistance R         = %.f k-ohm"%R)
print("Capacitance          = %.1f pF"%C)
print("resistance(R3)       = %.f k-ohm"%R3)
print("resistance(R2)       = %.f k-ohm"%R2)
print("resistance(R1)       = %.f k-ohm"%R1)
#Answer for Resistance (R1) is wrong in the book
Emitter resistance   = 1  k-ohm
collector resistance = 14 k-ohm
resistance R         = 10 k-ohm
Capacitance          = 46.7 pF
resistance(R3)       = 9 k-ohm
resistance(R2)       = 10 k-ohm
resistance(R1)       = 102 k-ohm

Example 7.33, Page No.518

In [96]:
# Design R-C phase shift oscillator

import math
#Variable declaration
rd=40.0                  # resistane in killo ohms
fo=1.0                   # resonant frequency in killo hertz
gm= 5000.0               # in killo mh
R=10.0                   # assume Resistance in killo ohms
Av=29.0                  # VOLTAGE GAIN
Vdd=12.0                 # drain voltage


#Calculations
C=((1/(2*math.pi*fo*10**3*R*10**3*math.sqrt(6)))*10**9)# C in nano farad
Rl= (Av/gm*10**-6)*10**9 # load resistance in killo ohms
Rl = math.ceil(Rl)
Rd= ((Rl*rd)/(rd-Rl))    # drain resistance in killo ohms


#Result
print("Drain Resistance                               = %.2f k-ohm"%Rd)
print("Capacitance for the R-C Phase shift oscillator = %.1f nF"%C) 
Drain Resistance                               = 7.06 k-ohm
Capacitance for the R-C Phase shift oscillator = 6.5 nF

Example 7.34, Page No.518

In [105]:
# design wein bridge oscillator

import math
#Variable declaration
R=100.0                         # ASSUME RESSITANCE IN KILO OHMS
fo1=10.0                        # tunned frequency in killo hertz
fo2=100.0                       # tunned frequency in  hertz

#Calculations
C1= (1/(2*math.pi*R*10**3*fo1*10**3))*10**9  # tunned capacitance
C2= (1/(2*math.pi*R*10**3*fo2))*10**9        # tunned capacitance

#Result
print("Tunned capacitance C1 range of tunned circuit = %.3f nF"%C1)
print("Tunned capacitance C2 range of tunned circuit = %.1f nF"%C2)
#Answer slightly different than book
Tunned capacitance C1 range of tunned circuit = 0.159 nF
Tunned capacitance C2 range of tunned circuit = 15.9 nF

Example 7.35, Page No. 519

In [111]:
# resonant frequency and quality factor

import math
#Variable declaration
Cs=0.06                   # capacitance of tunned circuit in pico farad
Ls=0.5                    # series INDUCTANCE of tunned circuit in henry
Cp=1.0                    # parallel capacitance in pico farad
Rs=5.0                    # SERIES RESISTANCE IN KILLO OHMS

#Calculations
fs=((1/(2*math.pi*math.sqrt(Ls*Cs*10**-12)))*10**-3)               # series tunned frequency in killo hertz
fp=(((1/(2*math.pi))*math.sqrt((1+Cs/Cp)/(Ls*Cs*10**-12)))*10**-3) # parralel tunned frequency in killo hertz
Pc= ((fp-fs)/fs)*100      # percentage by which series resonant frequency exceeds the parallel resonant frequency
Qs= round((2*math.pi*fs*10**3*Ls)/(Rs*10**3))                           # quality factor with series resonant frequency
Qp= round((2*math.pi*fp*10**3*Ls)/(Rs*10**3))                           # quality factor with parallled resonant frequency

#Result
print("Series tunned frequency   = %.1f kHz"%fs)
print("Quality factor with series  resonant frequency is %.f"%Qs)
print("\nParallel tunned frequency = %.f kHz"%fp)
print("Quality factor with paralled resonant frequency is %.f"%Qp)
Series tunned frequency   = 918.9 kHz
Quality factor with series  resonant frequency is 577

Parallel tunned frequency = 946 kHz
Quality factor with paralled resonant frequency is 594