# Chapter 31 , Sinusoidal Oscillators¶

## Example 31.1 , Page Number 787¶

In :
import math

#Variables

fo = 22.0 * 10**3                         #Frequency (in Hertz)
C = 2.0 * 10**-9                          #Capacitance (in Farad)

#Calculation

L = (0.159/fo)**2/C                       #Inductance (in Henry)

#Result

print "Inductance is ",round(L,3)," H."

Inductance is  0.026  H.


## Example 31.2 , Page Number 787¶

In :
import math

#Variables

fo = 2.2 * 10**6                         #Frequency (in Hertz)

#Calculation

f1o = fo * 2**0.5                        #New frequency (in Hertz)

#Result

print "It will work at frequency of ",round(f1o * 10**-6,2)," MHz when capacitance is reduced by 50%."

It will work at frequency of  3.11  MHz when capacitance is reduced by 50%.


## Example 31.3 , Page Number 789¶

In :
import math

#Variables

C = 100.0 * 10**-12                  #Capacitance (in Farad)
L1 = 30.0 * 10**-6                   #Inductance1 (in Henry)
L2 = 1.0 * 10**-8                    #Inductance2 (in Henry)

#Calculation

L = L1 + L2                          #Net inductance (in Henry)
fo = 1/(2*math.pi*(L * C)**0.5)      #Frequency of oscillations (in Hertz)

#Result

print "Frequency of oscillations is ",round(fo * 10**-6,1)," MHz,"

Frequency of oscillations is  2.9  MHz,


## Example 31.4 , Page Number 790¶

In :
import math

#Variables

L1 = 1000.0 * 10**-6                  #Inductance1 (in Henry)
L2 = 100.0 * 10**-6                   #Inductance2 (in Henry)
M = 20.0 * 10**-6                     #Mutual Inductance (in Henry)
C = 20.0 * 10**-12                    #Capacitance (in Farad)

#Calculation

L = L1 + L2 + 2 * M                  #Net inductance (in Henry)
fo = 1/(2*math.pi*(L * C)**0.5)      #Frequency of oscillations (in Hertz)

#Result

print "Frequency of oscillations is ",round(fo * 10**-6,3)," MHz,"

#Slight variation due to higher precision.

Frequency of oscillations is  1.054  MHz,


## Example 31.5 , Page Number 790¶

In :
import math

#Variables

C = 1.0 * 10**-9                       #Capacitance (in Farad)
L1 = 4.7 * 10**-3                      #Inductance1 (in Henry)
L2 = 47.0 * 10**-6                     #Inductance2 (in Henry)

#Calculation

L = L1 + L2                            #Net inductance (in Henry)
fo = 1/(2*math.pi*(L * C)**0.5)        #Frequency of oscillations (in Hertz)

#Result

print "Frequency of oscillations is ",round(fo * 10**-3,2)," kHz,"

#Slight variation due to higher precision.

Frequency of oscillations is  73.05  kHz,


## Example 31.6 , Page Number 791¶

In :
import math

#Variables

L1 = 2.0 * 10**-3                         #Inductance1 (in Henry)
L2 = 20.0 * 10**-6                        #Inductance2 (in Henry)
fomin = 950.0 * 10**3                     #Frequency minimum (in Hertz)
fomax = 2050.0 * 10**3                    #Frequency maximum (in Hertz)

#Calculation

L = L1 + L2                               #Net inductance (in Henry)
C1 = 1.0/(4 * math.pi**2*(L*fomin**2))    #Capacitance1 (in Farad)
C2 = 1.0/(4 * math.pi**2*(L*fomax**2))    #Capacitance2 (in Farad)

#Result

print "Range of capacitance required is ",round(C2 * 10**12,2)," pF and ",round(C1 * 10**12,1)," pF."

Range of capacitance required is  2.98  pF and  13.9  pF.


## Example 31.7 , Page Number 792¶

In :
import math

#Variables

L1 = 0.1 * 10**-3                         #Inductance1 (in Henry)
L2 = 10.0 * 10**-6                        #Inductance2 (in Henry)
M = 20.0 * 10**-6                         #Mutual Inductance (in Hnery)
fo = 4110.0 * 10**3                       #Frequency (in Hertz)

#Calculation

L = L1 + L2 + 2*M                         #Net inductance (in Henry)
C = 1.0/(4 * math.pi**2 * L*fo**2)        #Capacitance (in Farad)
beta = L2 / L1                            #Feedback ratio
Av = 1/beta                               #Voltage gain

#Result

print "Capacitance required is ",round(C * 10**12,4)," pF.\nVoltage gain for sustained condition is ",Av,"."

#Calculation error in the value of M used in formula , therefore incorrect value of C.

Capacitance required is  9.9969  pF.
Voltage gain for sustained condition is  10.0 .


## Example 31.8 , Page Number 793¶

In :
import math

#Variables

C1 = 0.001 * 10**-6                      #Capacitance (in Farad)
C2 = 0.01 * 10**-6                       #Capacitance (in Farad)
L = 5.0 * 10**-6                         #Inductance (in Henry)

#Calculation

Av = C2 / C1                             #Voltage gain
C = C1 * C2 / (C1 + C2)                  #Net capacitance (in Farad)
fo = 1 /(2*math.pi*(L * C)**0.5)         #Frequency (in Hertz)

#Result

print "Required voltage gain is ",Av,".\nFrequency of oscillation is ",round(fo * 10**-6,2)," Mhz."

#Slight variation due to higher precision.

Required voltage gain is  10.0 .
Frequency of oscillation is  2.36  Mhz.


## Example 31.9 , Page Number 793¶

In :
import math

#Variables

C1 = 0.1 * 10**-6                   #Capacitance (in Farad)
C2 = 1.0 * 10**-6                   #Capacitance (in Farad)
L = 470.0 * 10**-6                  #Inductance (in Henry)

#Calculation

C = C1 * C2/ (C1 + C2)              #Net capacitance (in Farad)
fo = 1 /(2*math.pi*(L * C)**0.5)    #Frequency (in Hertz)

#Result

print "Frequency of oscillation is ",round(fo * 10**-3,2)," kHz."

#Slight variation due to higher precision

Frequency of oscillation is  24.35  kHz.


## Example 31.10 , Page Number 794¶

In :
import math

#Variables

C1 = 100.0 * 10**-12                    #Capacitance (in Farad)
C2 = 7500.0 * 10**-12                   #Capacitance (in Farad)
fomin = 950.0 * 10**3                   #Frequency minimum (in Hertz)
fomax = 2050.0 * 10**3                  #Frequency maximum (in Hertz)

#Calculation

C = C1 * C2/ (C1 + C2)                  #Net capacitance (in Farad)
L1 = 1.0/(4 * math.pi**2*(C*fomin**2))  #Inductance1 (in Henry)
L2 = 1.0/(4 * math.pi**2*(C*fomax**2))  #Inductance2 (in Henry)

#Result

print "The range of inductance required is from ",round(L2 * 10**6)," micro-Henry to ",round(L1 * 10**6)," micro-Henry."

The range of inductance required is from  61.0  micro-Henry to  284.0  micro-Henry.


## Example 31.11 , Page Number 795¶

In :
import math

#Variables

fo = 450.0 * 10**3                #Frequency(in Hertz)
#Let us assume
C1 = C2 = C = 10.0 * 10**-6       #Capacitance (in Farad)
C21 = 2 * C2                      #Capacitance (in Farad)

#Calculation

fo1 = fo * (3.0/4.0)**0.5         #New Frequency (in Hertz)

#Result

print "The oscillation frequency if C2 is doubled is ",round(fo1 * 10**-3,1)," kHz."

The oscillation frequency if C2 is doubled is  389.7  kHz.


## Example 31.12 , Page Number 796¶

In :
import math

#Variables

C1 = 0.1 * 10**-6                   #Capacitance (in Farad)
C2 = 1.0 * 10**-6                   #Capacitance (in Farad)
C3 = 100.0 * 10**-12                #Capacitance (in Farad)
L = 470.0 * 10**-6                  #Inductance (in Henry)

#Calculation

C = (1.0/C1 + 1.0/C2 +1.0/C3)**-1   #Capacitance (in Farad)
fo = 1/(2*math.pi *(L*C)**0.5)      #Frequency (in Hertz)

#Result

print "Frequency of oscillation is ",round(fo * 10**-3,1)," kHz."

Frequency of oscillation is  734.5  kHz.


## Example 31.13 , Page Number 799¶

In :
import math

#Variables

L = 0.33                       #Inductance (in Henry)
C1 = 0.065 * 10**-12           #Capacitance (in Farad)
C2 = 1.0 * 10**-12             #Capacitance (in Farad)
R = 5.5 * 10**3                #Resistance (in ohm)

#Calculation

fs = 1/(2*math.pi*(L*C1)**0.5) #Series Resonant frequency (in Hertz)
Qfactor = 2*math.pi*fs*L/R     #Q-factor

#Result

print "Series resonant frequency is ",round(fs * 10**-6,2)," MHz.\nQ-factor of the crystal is ",round(Qfactor,1),"."

#Slight variation due to higher precision

Series resonant frequency is  1.09  MHz.
Q-factor of the crystal is  409.7 .


## Example 31.14 , Page Number 802¶

In :
import math

#Variables

gm = 5000.0 * 10**-6                    #Transconductance (in mho)
rd = 40.0 * 10**3                       #Resistance (in ohm)
R = 10.0 * 10**3                        #Resistance (in ohm)
fo = 1.0 * 10**3                        #Frequency (in Hertz)
Av = 40.0                               #Voltage gain

#Calculation

C = 1/(2*math.pi*(R)*6**0.5*fo)         #Capacitance (in Farad)
rL = Av / gm                            #a.c. load resistance (in ohm)
RD = (rL * rd)/(rd-rL)                  #Drain resistance (in ohm)

#Result

print "Value of capacitor is ",round(C* 10**6,5)," micro-Farad."
print "Value of drain resistance is ",RD * 10**-3," kilo-ohm."

Value of capacitor is  0.0065  micro-Farad.
Value of drain resistance is  10.0  kilo-ohm.


## Example 31.15 , Page Number 803¶

In :
import math

#Variables

fo = 2.0 * 10**3                   #Frequency (in Hertz)
mu = 50.0                          #Amplification factor
rd = 5.0 * 10**3                   #Resistance (in ohm)
Av = 40.0                          #Voltage gain
R = 10.0 * 10**3                   #Resistance (in ohm)

#Calculation

gm = mu / rd                       #Transconductance (in mho)
rL = Av/ gm                        #a.c. load resistance (in ohm)
RD = (rL * rd)/(rd-rL)             #Drain resistance (in ohm)
RC = 0.065/(fo)                    #RC product (in second)
C = RC / R                         #Capacitance (in Farad)

#Result

print "Maximum value of RD is ",RD * 10**-3," kilo-ohm.\nValue of the RC product is ",RC," s.\nValue of R is ",R * 10**-3," kilo-ohm.\nValue of C is ",C * 10**9," nF."

Maximum value of RD is  20.0  kilo-ohm.
Value of the RC product is  3.25e-05  s.
Value of R is  10.0  kilo-ohm.
Value of C is  3.25  nF.


## Example 31.18 , Page Number 807¶

In :
import math

#Variables

fo = 2.0 * 10**3                                #Frequency (in Hertz)
hie = 2.0 * 10**3                               #hie (in ohm)
R1 = 20.0 * 10**3                               #Resistance (in ohm)
R2 = 80.0 * 10**3                               #Resistance (in ohm)
RC = 10.0 * 10**3                               #Collector Resistance (in ohm)
R = 8.0 * 10**3                                 #Resistance (in ohm)

#Calculation

C = 1/(2*math.pi*R)*(1/(6 + 4*RC/R)**0.5)/fo    #Capacitance (in Farad)
hfe = 23 + 29 * R/RC + 4* RC /R                 #Current gain
Ri = (1/R1 + 1/R2 + 1/hie)**-1                  #Input resistance (in ohm)
R3 = R - Ri                                     #Feedback resitor (in ohm)

#Result

print "Value of capacaitor C is ",round(C * 10**6,3)," micro-Farad.\nValue of transistor gain is hfe >= ",hfe,".\nValue of feedback resistor R3 is ",round(R3 * 10**-3,1)," kilo-ohm."

Value of capacaitor C is  0.003  micro-Farad.
Value of transistor gain is hfe >=  51.2 .
Value of feedback resistor R3 is  6.2  kilo-ohm.


## Example 31.19 , Page Number 809¶

In :
import math

#Variables

fo = 10.0 * 10**3                        #Frequency (in Hertz)
R = 100.0 * 10**3                        #Resistance (in ohm)

#Calculation

C = 1/(2*math.pi*R*fo)                   #Capacitance (in Farad)

#Result

print "Value of the capacitor C is ",round(C * 10**12)," pico-Farad."

Value of the capacitor C is  159.0  pico-Farad.