In [3]:

```
# Given data
Vf= 0.0125 # in volt
Vo= 0.5 # in volt
Beta= Vf/Vo
# For oscillator A*Beta= 1
A= 1/Beta
print "Amplifier Should have a minimum gain of",A,"to provide oscillation"
```

In [4]:

```
from numpy import pi, sqrt
# Given data
R1= 50 # in kohm
R1=R1*10**3 # in ohm
R2=R1 # in ohm
R3=R2 # in ohm
C1= 60 # in pF
C1= C1*10**-12 # in F
C2=C1 # in F
C3=C2 # in F
f= 1/(2*pi*R1*C1*sqrt(6))
print "Frequency of oscilltions = %0.2f kHz" %( f*10**-3)
```

In [5]:

```
from numpy import pi
# Given data
f=2 # in kHz
f=f*10**3 # in Hz
# Let
R= 10 # in kohm (As R should be greater than 1 kohm)
R=R*10**3 # in ohm
# Formula f= 1/(2*pi*R*C)
C= 1/(2*pi*f*R) # in F
C= C*10**9 # in nF
# For Bita to be 1/3, Choose
R4= R # in ohm
R3= 2*R4 # in ohm
print "Value of C = %0.2f nF" %C
print "Value of R3 = %0.f kohm" %(R3*10**-3)
print "Value of R4 = %0.f kohm" %(R4*10**-3)
```

In [6]:

```
# Given data
R1= 200 # in kohm
R1=R1*10**3 # in ohm
R2=R1 # in ohm
C1= 200 # in pF
C1= C1*10**-12 # in F
C2=C1 # in F
f= 1/(2*pi*R1*C1) # in Hz
print "Frequency of oscilltions = %0.2f kHz" %(f*10**-3)
# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong
```

In [7]:

```
# Given data
L= 100 # in µH
L= L*10**-6 # in H
C1= .001 # in µF
C1= C1*10**-6 # in F
C2= .01 # in µF
C2= C2*10**-6 # in F
C= C1*C2/(C1+C2) # in F
# (i)
f= 1/(2*pi*sqrt(L*C)) # in Hz
print "Operating frequency = %0.f kHz" %(round(f*10**-3))
# (ii)
Beta= C1/C2
print "Feedback fraction = %0.1f " %Beta
# (iii)
# A*Bita >=1, so Amin*Bita= 1
Amin= 1/Beta
print "Minimum gain to substain oscillations is",Amin
```

In [8]:

```
# Given data
L= 15 # in µH
L= L*10**-6 # in H
C1= .004 # in µF
C1= C1*10**-6 # in F
C2= .04 # in µF
C2= C2*10**-6 # in F
C= C1*C2/(C1+C2) # in F
f= 1/(2*pi*sqrt(L*C)) # in Hz
print "Frequency of oscilltions = %0.1f kHz" %(f*10**-3)
```

In [9]:

```
# Given data
L= 0.01 # in H
C= 10 # in pF
C= C*10**-12 # in F
f= 1/(2*pi*sqrt(L*C)) # in Hz
print "Frequency of oscilltions = %0.2f kHz" %(f*10**-3)
# Note: Calculation to find the value of f in the book is wrong, so answer in the book is wrong
```

In [10]:

```
# Given data
L= 0.8 # in H
C= .08 # in pF
C= C*10**-12 # in F
C_M= 1.9 # in pF
C_M= C_M*10**-12 # in F
C_T= C*C_M/(C+C_M) # in F
R=5 # in kohm
f_s= 1/(2*pi*sqrt(L*C)) # in Hz
print "Series resonant frequency = %0.f kHz" %(f_s*10**-3)
# (ii)
f_p= 1/(2*pi*sqrt(L*C_T)) # in Hz
print "Parallel resonant frequency = %0.f kHz" %(f_p*10**-3)
# Note: Calculation to find the value of parallel resonant frequency in the book is wrong, so answer in the book is wrong
```

In [11]:

```
# Given data
R1= 220 # in kohm
R1=R1*10**3 # in ohm
R2=R1 # in ohm
C1= 250 # in pF
C1= C1*10**-12 # in F
C2=C1 # in F
f= 1/(2*pi*R1*C1)
print "Frequency of oscilltions = %0.2f Hz" %f
```

In [16]:

```
from math import tan
# Given data
R= 10 # in kohm
R=R*10**3 # in ohm
f=1000
fie= 60 # in °
# The impedence of given circuit , Z= R+j*1/(omega*C)
# the phase shift, tan(fie)= imaginary part/ Real part
# tand(fie) = 1/(omega*R*C)
C= 1/(2*pi*R*tan(fie*pi/180))
print "The value of C = %0.2f pF" %(C*10**12)
# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong
```

In [17]:

```
# Given data
R= 10 # in kohm
R=R*10**3 # in ohm
f=1000
fie= 60 # in °
# The impedence of given circuit , Z= R+j*1/(omega*C)
# the phase shift, tan(fie)= imaginary part/ Real part
# tand(fie) = 1/(omega*R*C)
C= 1/(2*pi*R*tan(fie*pi/180))
print "The value of C = %0.2f µF" %(C*10**6)
# Note : There is an calculation error to evaluate the value of C, So the answer in the book is wrong
```

In [18]:

```
# Given data
L= 50 # in µH
L= L*10**-6 # in H
C1= 300 # in pF
C1= C1*10**-12 # in F
C2= 100 # in pF
C2= C2*10**-12 # in F
C_eq= C1*C2/(C1+C2) # in F
f= 1/(2*pi*sqrt(L*C_eq)) # in Hz
print "Frequency of oscillations = %0.1f MHz" %(f*10**-6)
Beta= C2/C1
# (iii)
# A*Beta >=1, so A*Bita= 1 (for sustained oscillations)
Amin= 1/Beta
print "Minimum gain to substain oscillations is",Amin
```

In [19]:

```
# Given data
L1= 2 # in mH
L1= L1*10**-3 # in H
L2= 1.5 # in mH
L2= L2*10**-3 # in H
# Formula f= 1/(2*pi*sqrt((L1+L2)*C)
# For f= 1000 kHz, C will be maximum
f=1000 # in kHz
f=f*10**3 # in Hz
Cmax= 1/((2*pi*f)**2*(L1+L2)) # in F
# For f= 2000 kHz, C will be maximum
f=2000 # in kHz
f=f*10**3 # in Hz
Cmin= 1/((2*pi*f)**2*(L1+L2)) # in F
print "Maximum Capacitance = %0.1f pF" %(Cmax*10**12)
print "Minimum Capacitance = %0.1f pF" %(Cmin*10**12)
```