from math import sqrt
from math import pi
#Variable declaration
L1=58.6; #Inductance, micro henry
C1=300.0; #Capacitance, pF
#Calculation
f=(1/(2*round(pi,2)*sqrt(L1*10**-6*C1*10**-12)))/1000; #Frequency of oscillation, kHz
#Result
print("frequency of oscillation=%dkHz"%f);
#Note : The frequency has been calculated in the text as 1199kHz but here the answer gets approximated to 1200kHz.
from math import pi
#Variable declaration
L1=1.0; #Inductance , mH
f=1.0; #frequency of oscillation, GHz
#Calculation
#Since, f=1/(2*pi*sqrt(L1*C1)),
C1=(1/(L1*10**-3*(f*10**12*2*pi)**2))*10**12; #Capacitance, pF
#Result
print("The Capacitance of the capacitor of the LC oscillator=%.2epF"%C1);
from math import pi
from math import sqrt
#Variable declaration
C1=0.001; #Capacitor C1, microfarad
C2=0.01; #Capacitor C2, microfarad
L=15.0; #Inductance, microhenry
#Calculation
CT=C1*C2/(C1+C2); #Total capacitance
#(i) Operating frequency
f=(1/(2*pi*sqrt(CT*10**-6*L*10**-6)))/1000; #Operating frequency, kHz
#(ii) Feedback fraction
mv=C1/C2; #Feedback fraction
#Result
print("(i) The operating frequency=%dkHz"%f);
print("(ii) The feedback fraction=%.1f"%mv);
#Note : The operating frequency is calculated in the text as 1361kHz but here it has been approximated to 1362kHz
from math import pi
#Variable declaration
mv=0.25; #Feedback fraction
L=1.0; #Inductance, mH
f=1.0; #Operating frequeny, MHz
#Calculation
#Since, f=1/(2*pi*sqrt(L*C))
CT=round((1/(L*10**-3*(2*pi*f*10**6)**2))*10**12,1); #Total capacitance, pF
#Since, mv=C1/C2 and CT=C1*C2/(C1+C2) or CT=C2/(1+ (C2/C1)),
#From the above equations, substituting value of mv and calculaing value of C2,
C2=CT*(1+(1/mv)); #Capacitance of C2 capactior, pF
C1=mv*C2; #Capacitance of C1 capacitor, pF
#Result
print("C1=%.1fpF and C2=%.1fpF"%(C1,C2));
from math import sqrt
from math import pi
#Variable decalaration
L1=1000.0; #Inductance of L1 inductor, microhenry
L2=100.0; #Inductance of L2 inductor, microhenry
M=20.0; #Mutual inductance, microhenry
C=20.0; #Capacitance, pF
#Calculation
LT=L1+L2+2*M; #Total inductance, microhenry
#(i) Operating frequency
f=(1/(2*pi*sqrt(LT*10**-6*C*10**-12)))/1000; #Operating frequency, kHz
#(ii)
mv=L2/L1; #feedback fraction
#Result
print("(i) The operating frequency=%dkHz."%f);
print("(ii) The feedback fraction=%.1f."%mv);
#Note : The operating frequecy has been calculated in the text as 1052kHz but here it gets approximated to 1054kHz
from math import pi
#Variable declaration
C=1.0; #Capacitance, pF
f=1.0; #Frequency, MHz
mv=0.2; #Feedback frequency
#Calculation
LT=(1/(C*10**-12*(2*pi*f*10**6)**2))*1000; #Total inductance, mH
#Since, mv=L2/L1 or L2=mv*L1 and L1+L2=LT or L1(1+mv)=LT,
L1=LT/(1+mv); #Inductance of L1 inductor, mH
L2=L1*mv; #inductance of L2 inductor, mH
#Result
print("L1=%.1fmH and L2=%.2fmH."%(L1,L2));
from math import sqrt
from math import pi
#Variable declaration
R1=1.0; #Resistor R1, mega ohm
R2=R1; #Resistor R2, mega ohm
R3=R1; #Resistor R3, mega ohm
C1=68.0; #Capacitor C1, pF
C2=C1; #Capacitor C2, pF
C3=C1; #Capacitor C3, pF
#Calculation
R=R1*10**6; #Resistance of the resistors of phase shift circuit, ohm
C=C1*10**-12; #Capacitance of the capacitors of phase shift circuit, F
fo=1/(2*pi*R*C*sqrt(6)); #Frequency of oscillation, Hz
#Result
print("The frequency of oscillation=%dHz"%fo);
#Note: The frequency of oscillation had been calculated in the text as 954Hz, but here it gets approximated to 955 HZ.
from math import pi
from math import sqrt
#Variable declaration
C=5.0; #Capacitance of the capacitors of phase shift circuit, pF
fo=800.0; #Required frequency of oscillation, kHz
#Calculation
#Since, fo=1/(2*pi*R*C*sqrt(6))
R=(1/(2*pi*C*10**-12*fo*10**3*sqrt(6)))/1000; #Resistance of the resistors of phase shift circuit, kilo ohm
#Result
print("R=%.1f kilo ohm."%R);
from math import pi
#Variable declaration
#Resistance of R1 and R2 resistors of the R-C bridge circuit
R1=220.0; #kilo ohm
R2=220.0; #kilo ohm
#Capacitance of C1 and C2 the capacitors of the R-C bridge circuit
C1=250.0; #pF
C2=250.0; #pF
#Calculation
#Since, R1=R2 and C1=C2, R1=R2 is taken as R and C1=C2 is taken as C
#And, f=1/(2*pi*sqrt(R1*R2*C1*C2))is transformed to f=1/(2*pi*R*C).
R=R1*10**3; #kilo ohm
C=C1*10**-12; #pF
f=1/(2*pi*R*C); #Frequency of oscillation, Hz
#Result
print("The frequency of oscillation=%dHz."%f);
#Note : The frequency of oscillation is calculated in the text as 2892Hz but here it gets approximated to 2893 Hz.
from math import sqrt
from math import pi
#Variable declaration
#a.c equivalent values of the crystal:
L=1.0; #Inductance , H
C=0.01; #Capacitance , pF
R=1000.0; #Resistance , ohm
Cm=20.0; #Mounting capacitance, pF
#Calculation
fs=(1/(2*round(pi,2)*sqrt(L*C*10**-12)))/1000; #Series resonant frrequency, kHz
CT=(C*Cm/(C+Cm)); #Total capacitance, pF
fp=(1/(2*round(pi,2)*sqrt(L*CT*10**-12)))/1000; #Prallel resonant frequency, kHz
#Result
print("fs=%.0fkHz and fp=%.0fkHz."%(fs,fp));
#Note: fs and fp are calculated in the text as 1589kHz and 1590kHz, but here it gets approximated to 1592kHz and 1593kHz