Ch-15 : Oscillators

Page No. 475 Example 15.1.

In [1]:
from math import pi
L1=(1./(4*(pi**2)*((120*10**3)**2)*0.004*10**-6))-(0.4*10**-3)  #in henry
x1=L1*10**3 #in mH
print "L1 = (1 / 4*pi**2*fo**2*C) - L1 =%0.2f mH"%x1
L1 = (1 / 4*pi**2*fo**2*C) - L1 =0.04 mH

Page No. 475 Example 15.2.

In [2]:
from math import pi
print "When fo = 950 kHz"
C=1./(4*(pi**2)*((2*10**-3)+(20*10**-6))*((950*10**3)**2)) #farady
x1=C*10**12 #pF
print "           C =%0.2f pF"%x1
print "When fo = 2050 kHz"
C=1./(4*(pi**2)*((2*10**-3)+(20*10**-6))*((2050*10**3)**2)) #farady
x1=C*10**12 #pF
print "           C = %0.2f pF"%x1
print "Hence, the range of capacitance is from 2.98 pF to 13.89 pF"
When fo = 950 kHz
           C =13.89 pF
When fo = 2050 kHz
           C = 2.98 pF
Hence, the range of capacitance is from 2.98 pF to 13.89 pF

Page No. 476 Example 15.3

In [8]:
from math import sqrt,pi
L1=38.*10**-6
L2=12.*10**-6
C=500.*10**-12
L=L1+L2
fo = 1. / (2*pi*sqrt(L*C))
x1=fo*10**-6
print "fo = 1 / 2*pi*sqrt(50*10**-6*500*10**-12) =%0.2f MHz"%x1
beta=L1/L2
print "Feedback factor,  beta = L1 / L2 =%0.2f"% beta
fo = 1 / 2*pi*sqrt(50*10**-6*500*10**-12) =1.01 MHz
Feedback factor,  beta = L1 / L2 =3.17

Page No. 478 Example 15.4.

In [9]:
from math import pi
C1=0.2*10**-6
C2=0.02*10**-6
fo=10.*10**3
L=(C1+C2)/(4*pi**2*fo**2*C1*C2)
x1=L*10**3
print "L = (C1+C2) / (4*pi**2*fo**2*C1*C2) =%0.2f mH"%x1
print "The voltage gain required to produce oscillation is"
x2=C1/C2
print "    Av > C1/C2 =%0.2f"%x2
L = (C1+C2) / (4*pi**2*fo**2*C1*C2) =13.93 mH
The voltage gain required to produce oscillation is
    Av > C1/C2 =10.00

Page No. 480 Example 15.5.

In [10]:
from math import sqrt,pi
L=40.*10**-3
C1=100.*10**-12
C2=500.*10**-12
Vo=10.
print "(i) In a Colpitts oscillator, a series combination of C1 and C2 which is in parallel with inductance L and frequency of oscillations is"
fo=1./ (2*pi*sqrt((L*C1*C2)/(C1+C2)))
x1=fo*10**-3
print "    fo = 1 / 2pi*sqrt(LCeq) = 1 / 2pi*sqrt(L*C1*C2/C1+C2) =%0.2f kHz"%x1
Vf=(Vo*C1)/C2
print "Vf = Vo*C1 / C2 =%0.2f V"%Vf
gain=C2/C1
print "  Gain = 500*10**-12 / 100*10**-12 =%0.2f"%gain
x2=C2/10
x3=x2*10**12
print "C1 = C2 / 10 =%0.2f pF"%x3
print "(v) The frequncy of oscillation is"
fo=1./ (2*pi*sqrt((40*50*500*10**-27)/((50*10**-12)+(500*10**-12))))
x4=fo*10**-3
print "fo = %0.2f kHz"% x4
(i) In a Colpitts oscillator, a series combination of C1 and C2 which is in parallel with inductance L and frequency of oscillations is
    fo = 1 / 2pi*sqrt(LCeq) = 1 / 2pi*sqrt(L*C1*C2/C1+C2) =87.17 kHz
Vf = Vo*C1 / C2 =2.00 V
  Gain = 500*10**-12 / 100*10**-12 =5.00
C1 = C2 / 10 =50.00 pF
(v) The frequncy of oscillation is
fo = 118.03 kHz

Page No. 481 Example 15.6.

In [11]:
from math import sqrt,pi
fo1=400.*10**3
fo2=1200.*10**3
Lp=60.*10**-6
C = 1 / (4*pi**2*fo1**2*Lp)
x1=C*10**12
print "When  fo = 400 kHz,  Cmax(pF) =%0.2f"%x1  # answer in textbook is wrong
C = 1. / (4*pi**2*fo2**2*Lp)
x2=C*10**12
print "When  fo = 1200 kHz,  Cmin = %0.2f pF"%x2
When  fo = 400 kHz,  Cmax(pF) =2638.57
When  fo = 1200 kHz,  Cmin = 293.17 pF

Page No. 482 Example 15.7.

In [12]:
from math import sqrt,pi
fo1=540.*10**3
fo2=1650.*10**3
L=1*10.**-3
Cmax = 1. / (4*pi**2*fo1**2*L)
x1=Cmax*10**12
print "When  fo = 540 kHz,  Cmax = %0.2f pF"%x1
Cmin = 1. / (4*pi**2*fo2**2*L)
x2=Cmin*10**12
print "When  fo = 1650 kHz,  Cmin = %0.2f pF"%x2
print "Hence, the capacitor range required is 9.3-86.87 pF"
When  fo = 540 kHz,  Cmax = 86.87 pF
When  fo = 1650 kHz,  Cmin = 9.30 pF
Hence, the capacitor range required is 9.3-86.87 pF

Page No. 483 Example 15.8.

In [13]:
from math import sqrt,pi
fo=1./(2*pi*(200*10**3)*(100*10**-12)*sqrt(6)) #in Hz
x1=fo*10**-3 #in kHz
print " fo =%0.2f kHz"%x1
 fo =3.25 kHz

Page No. 486 Example 15.9.

In [14]:
from math import sqrt,pi
fo=1./(2*3.142*10000*(0.01*10**-6)*sqrt(6+((4*2.2*10**3)/(10000)))) #in Hz
print "fo = %0.2f Hz"%fo
beta=23.+(29.*(10/2.2))+(4*(2.2/10))
print "beta =%0.2f"%beta
fo = 606.69 Hz
beta =155.70

Page No. 487 Example 15.10.

In [18]:
from math import sqrt,pi
fo=1./(2*pi*(10*10**3)*(7.1*10**3)*sqrt(6+((4*40*10**3)/(7.1*10**3)))) # in Farady
x1=fo*10**9 # in nF
print "  C=%0.2f nF"%x1
h=23.+(29.*(7.1/40))+(4*(40/7.1))
print "  hfe >=%0.2f"% h
  C=0.42 nF
  hfe >=50.68

Page No. 488 Example 15.11.

In [19]:
from math import sqrt,pi
C=1./(2*pi*100000*10000) # in farady
x1=C*10**12 #in pF
print "Therefore,  C = 1 / 2*pi*R*fo =%0.2f pF"%x1
Therefore,  C = 1 / 2*pi*R*fo =159.15 pF

Page No. 489 Example 15.12.

In [20]:
from math import sqrt,pi
print "(a) The series resonant frequencies of the crystal is"
fs=1./(2*pi*sqrt(0.5*0.06*10**-12))  #in Hz
x1=fs*10**-3 #in kHz
print "  fs = 1 / 2*pi*sqrt(L*Cs) = %0.2f kHz"%x1
fs=(2.*pi*(918.9*10**3)*0.5)/(5*10**3)
print "Q factor of the crystal at fs = omegaS*L / R = 2*pi*fs*L / R =%0.2f"%fs
print "(b) The parallel resonant frequency of the crystal is"
fp=(1./(2*pi))*sqrt((1.06*10**-12)/(0.5*(0.06*10**-12)*(1*10**-12))) # in Hz
x1=fp*10**-3
print "  fp = 1/2pi * sqrt((Cs+Cp)/(L*Cs*Cp)) =%0.2f kHz"%x1
fp=(2.*pi*(946.*10**3)*0.5)/(5.*10**3)
print "Q factor of the crystal at fp = omegaS*L / R = 2*pi*fs*L / R =%0.2f"%fp
(a) The series resonant frequencies of the crystal is
  fs = 1 / 2*pi*sqrt(L*Cs) = 918.88 kHz
Q factor of the crystal at fs = omegaS*L / R = 2*pi*fs*L / R =577.36
(b) The parallel resonant frequency of the crystal is
  fp = 1/2pi * sqrt((Cs+Cp)/(L*Cs*Cp)) =946.05 kHz
Q factor of the crystal at fp = omegaS*L / R = 2*pi*fs*L / R =594.39