# CHAPTER 11 - OSCILLATORS¶

## Example E01 - Pg 282¶

In [1]:
#  Exa 11.1
#  Given data
import math
#w=poly(0,'w');
#  For sustained oscillation,
#w= 4.*w*10.**6.-w**3.;
#w= roots(w);
f= 318.;#round(w/(2*math.pi));#  in Hz
print '%s %.2f' %("The frequency of oscillation in Hz is : ",f)
print '%s' %("\nHence the system will oscillate")

The frequency of oscillation in Hz is :  318.00

Hence the system will oscillate


## Example E02 - Pg 283¶

In [2]:
#  Exa 11.2
import math
#  Given data
Av= 29.;
I_Bmax = 0.5*10.**-6.;#  in A
I1= 100.*I_Bmax
Vo_sat = 0.9;#  in V
V_CC = 9.0;#  in V
V_EE= -9.;#  in V
V1= 9./Av;#  in V
R1= V1/I1;#  in ohm
R1= 5.6*10.**3.;#  in ohm (standard value)
Rf= Av*R1;#  in ohm
Rf= 180.*10.**3.;#  in ohm
R3= Rf;#  in ohm
R=R1;#  in ohm
C= 1./(2.*math.pi*R*math.sqrt(6.)*1000.);#  in F
R= R*10.**-3.;#  in k ohm
Rf= Rf*10.**-3.;#  in k ohm
C= C*10.**6.;#  in uF
print '%s %.2f' %("The value of R and R1 in k ohm is : ",R)
print '%s %.f' %("The value of Rf and R3 in k ohm is : ",Rf)
print '%s %.2f' %("The value of C in uF is : ",C)
print '%s %.f' %("The value of V_CC in volts is : ",V_CC)
print '%s %.f' %("The value of V_EE in volts is : ",V_EE)

The value of R and R1 in k ohm is :  5.60
The value of Rf and R3 in k ohm is :  180
The value of C in uF is :  0.01
The value of V_CC in volts is :  9
The value of V_EE in volts is :  -9


## Example E03 - Pg 285¶

In [3]:
#  Exa 11.3
#  Given data
import math
f = 5.;#  in kHz
f = f * 10.**3.;#  in Hz
miu = 55.;
r_d = 5.5;#  in k ohm
r_d = r_d * 10.**3.;#  in ohm
A= 29.;
#  abs(A) = g_m*R_L = (g_m*r_d*R_D)/(r_d+R_D) = (miu*R_D)/(r_d+R_D);
#  miu*R_D = abs(A)*(r_d+R_D);
R_D = (abs(A)*r_d)/(miu-A);#  in ohm
R_D= R_D*10.**-3.;#  in k ohm
print '%s %.2f' %("Minimum value of R_D in  k ohm is",R_D);
R_D= R_D*10.**3.;#  in ohm
Alpha = math.sqrt(6.);
#  Alpha = 1/(2*%pi*f*R_C);
RC = 1./(2.*math.pi*f*Alpha);#  in sec
RC= round(RC*10.**6.);#  in usec
print '%s %.2f' %("The value of RC in usec is",RC);
RC= RC*10.**-6.;#  in sec
R_L = (r_d*R_D)/(r_d+R_D);#  in ohm
R = 30.*10.**3.;#  in ohm
C = RC/R;#  in F
C = C * 10.**12.;#  in pF
R= R*10.**-3.;#  in k ohm
print '%s %.2f' %("The value of R in k ohm is",R);
print '%s %.2f' %("The value of C in pF is",C);

Minimum value of R_D in  k ohm is 6.13
The value of RC in usec is 13.00
The value of R in k ohm is 30.00
The value of C in pF is 433.33


## Example E04 - Pg 286¶

In [4]:
#  Exa 11.4
#  Given data
import math
f= 100.*10.**3.;#  in Hz
h_fe = 100.;
h_ie = 1.* 10.**3.;#  in ohm
V_CE = 5.;#  in V
V_BE= 0.7;#  in V
I_C = 1.* 10.**-3.;#  in A
I_B= 0.01*10.**-3.;#  in A
V_CC = 20.;#  in V
R_E = 1.* 10.**3.;#  in ohm
I_E = I_C;#  in A
R_C = (V_CC-V_CE-(I_E*R_E))/I_C;#  in ohm
R = 10.*10.**3.;#  in k ohm
k = R_C/R;
h_fe=(23.+29./k+4.*k);
#  Formula f= 1/(2*%pi*R*C*sqrt(6+4*k))
C= 1./(2.*math.pi*R*f*math.sqrt(6.+4.*k));#  in F
#  R= R3+R1 || R2+h_ie = R3+h_ie (approx)
R3= R-h_ie;#  in ohm
V_B= V_BE+I_E*R_E;#  in V
R2= 10.*10.**3.;#  in ohm (assumed value)
I_R2= V_B/R2;#  current in R2 in A
V_R1= V_CC-V_B;#  drop across R1 in V
I_R1= I_R2+I_B;#  in A
R1= V_R1/I_R1;#  in ohm
R_E= R_E*10.**-3.;#  in k ohm
R_C= R_C*10.**-3.;#  in k ohm
R= R*10.**-3.;#  in k ohm
R1= R1*10.**-3.;#  in k ohm
R2= R2*10.**-3.;#  in k ohm
R3= R3*10.**-3.;#  in k ohm
C=C*10.**12.;#  in pF
print '%s %.2f' %("The value of R_E in k ohm is",R_E);
print '%s %.2f' %("The value of R_C in k ohm is",R_C);
print '%s %.2f' %("The value of R in k ohm is",R);
print '%s %.2f' %("The value of h_fe >=",h_fe);
print '%s %.2f' %("The value of C in pF is : ",C)
print '%s %.2f' %("The value of R3 in k ohm is : ",R3)
print '%s %.2f' %("The value of R2 in k ohm is : ",R2)
print '%s %.2f' %("The value of R1 in k ohm is : ",R1)

The value of R_E in k ohm is 1.00
The value of R_C in k ohm is 14.00
The value of R in k ohm is 10.00
The value of h_fe >= 49.31
The value of C in pF is :  46.73
The value of R3 in k ohm is :  9.00
The value of R2 in k ohm is :  10.00
The value of R1 in k ohm is :  101.67


## Example E05 - Pg 290¶

In [5]:
#  Exa 11.5
#  Given data
import math
f = 5.;#  in kHz
f = f * 10.**3.;#  in Hz
R1 = 14.;#  in k ohm
R2 = 75.;#  in k ohm
R_C = 18.;#  in k ohm
R = 6.;#  in k ohm
h_ie = 2.;#  in k ohm
k = R_C/R;#  in k ohm
#  f = 1/( 2*%pi*RC*sqrt(6+(4*k)) );
C = 1./( 2.*math.pi*R*10.**3.*f*math.sqrt(6.+(4.*k)) );#  in F
C = C * 10**9;#  in nF
print '%s %.2f' %("The value of capacitor in nF is",C);
h_fe= 23.+(29./k)+(4.*k);
print '%s %.2f' %("The value of h_fe >= ",h_fe)
print '%s' %("Thus the transistor used mush have a minimum current gain of 45")

The value of capacitor in nF is 1.25
The value of h_fe >=  44.67
Thus the transistor used mush have a minimum current gain of 45


## Example E07 - Pg 294¶

In [6]:
#  Exa 11.7
#  Given data
import math
f_max = 10.;#  in kHz
f_max = f_max * 10.**3.;#  in Hz
R = 100.*10.**3.;#  in k ohm
C = 1./(2.*math.pi*f_max*R);#  in F
C= C*10.**9.;#  in nF
print '%s %.2f' %("For maximum frequency, the value of C in nF is",C);
f_min = 100;#  in Hz
C = 1./(2.*math.pi*f_min*R);#  in F
C= C*10.**9.;#  in nF
print '%s %.2f' %("For minimum frequency, the value of C in nF is",C);

For maximum frequency, the value of C in nF is 0.16
For minimum frequency, the value of C in nF is 15.92


## Example E08 - Pg 295¶

In [7]:
#  Exa 11.8
#  Given data
import math
R4 = 220.;#  in k ohm
R4 = R4 * 10.**3.;#  in ohm
R3 = R4;#  in ohm
R = R4;#  in ohm
C1 = 250.* 10.**-12.;#  in F
C2 = C1;#  in F
C = C1;#  in F
f = 1./(2.*math.pi*R*C);#  in Hz
f= f*10.**-3.;#  in k Hz
print '%s %.2f' %("The frequency of oscillation in kHz is",f);

The frequency of oscillation in kHz is 2.89


## Example E09 - Pg 298¶

In [8]:
#  Exa 11.9
#  Given data
import math
L = 0.33;
Cs = 0.65;#  in pF
Cs = Cs * 10.**-12.;#  in F
C_M = 1.;#  in pF
C_M = C_M * 10.**-12.;#  in F
R = 5.5;#  in k ohm
R = R * 10.**3.;#  in ohm
f_s = 1./(2.*math.pi*math.sqrt( L*Cs ));#  in Hz
f_s= f_s*10.**-6.;#  in MHz
print '%s %.2f' %("The series resonant frequency in MHz is",f_s);
f_s= f_s*10.**6.;#  in Hz
Ceq = (Cs*C_M)/(Cs+C_M);#  in F
f_P = 1./(2.*math.pi*math.sqrt( L*Ceq ));#  in Hz
f_P= f_P*10.**-6.;#  in MHz
print '%s %.2f' %("The parallel resonant frequency in MHz is : ",f_P)
f_P= f_P*10.**6.;#  in Hz
P = ((f_P-f_s)/f_s)*100.;#  in %
print '%s %.2f %s' %("The parallel resonant frequency exceds series resonant frequency by",P,"%");
Q = (math.sqrt(L/Cs))/R;
print '%s %.2f' %("The Q factor of the crystal is",Q);

The series resonant frequency in MHz is 0.34
The parallel resonant frequency in MHz is :  0.44
The parallel resonant frequency exceds series resonant frequency by 28.45 %
The Q factor of the crystal is 129.55


## Example E10 - Pg 298¶

In [9]:
#  Exa 11.10
#  Given data
Cs = 0.04;#  in pF
C_M = 2.;#  in pF
Per =(1./2.)*(Cs/C_M)*100.;#  in %
print '%s %.f %s' %("Parallel resonant frequency is greater than series resonant frequency by" ,Per, "%")

Parallel resonant frequency is greater than series resonant frequency by 1 %


## Example E12 - Pg 302¶

In [10]:
#  Exa 11.12
#  Given data
import math
C = 0.01;#  in pF
C = C * 10.**-12.;#  in F
L = 10.;#  in mH
L = L * 10.**-3.;#  in H
f_o = 1/(2*math.pi*math.sqrt(L*C));#  in Hz
f_o = f_o * 10**-6;#  in MHz
print '%s %.2f' %("The oscillation frequency in MHz is",f_o);
R1 = 100.;#  in k ohm
R2 = 5.;#  in k ohm
A = 1. + (R1/R2);
#  Beta = R/10;
#  loopgain = A*Beta A*R/10 >=1
R= 10./A;#  in k ohm
R=round(R*10.**3.);#  in ohm
print '%s %.f %s' %("The value of R is >=",R,"ohm")

The oscillation frequency in MHz is 15.92
The value of R is >= 476 ohm