from __future__ import division
from numpy import pi, sqrt
#Given data
L = 29.3 # in µH
L = L * 10**-6 # in H
C = 450 # in pF
C = C * 10**-12 # in F
f_o = 1/( 2*pi*(sqrt( L*C )) ) # in Hz
f_o = f_o * 10**-6 # in MHz
print "The frequency of oscillation = %0.2f MHz " %f_o
#Given data
f_o = 100 # in kHz
f_o = f_o * 10**3 # in Hz
L = 100 #in µH
L = L * 10**-6 # in H
#Formula f_o = 1/( 2*pi*(sqrt(L*C)) )
C1 = 1/(4*(pi**2)*(f_o**2)*L) # in F
C1 = C1 * 10**12 # in pF
f_o = 1500 # in kHz
f_o = f_o * 10**3 # in Hz
C2 = 1/(4*(pi**2)*(f_o**2)*L) # in F
C2 = C2 * 10**12 # in pF
print "The range of variable capacitor =",round(C2,1),"pF to -",int(C1,),"pF"
#Given data
V_CC = 12 # in V
Pout = 88 # in mW
Plosses = 8 # in mW
Pin = Pout+Plosses # in mW
Pin = Pin * 10**-3 # in W
I_C = Pin/V_CC # in A
Gm = 10 # in mA/V
Gm = Gm * 10**-3 # in A/V
V_B = I_C/Gm # in V
ratio = V_CC/V_B # Transformer winding turn ratio
print "The Transformer winding turn ratio = %0.f " %ratio
#Given data
L = 100 # in µH
L = L * 10**-6 # in H
C1 = 0.001 # in µF
C1 = C1 * 10**-6 # in F
C2 = 0.01 # in µF
C2 = C2 * 10**-6 # in F
f = (1/(2*pi))*(sqrt( (1/(L*C1))+(1/(L*C2)) )) # in Hz
f = f * 10**-3 # in kHz
print "The opertaing frequency = %0.f kHz " %f
Beta = C1/C2 # feedback fraction
print "The feed back fraction = %0.1f " %Beta
Amin = 1/Beta # minimum gain to sustain oscillations
print "The minimum gain to sustain oscillations = %0.f " %Amin
# A = R_C/R_E
R_C = 2.5 # in k ohm
R_C = R_C * 10**3 # in ohm
R_E = R_C/Amin # in ohm
print "The emitter resistance = %0.f ohm " %R_E
#Given data
f_o = 950 # in kHz
f_o = f_o *10**3 # in Hz
C1 = 100 # in pF
C1 = C1 * 10**-12 # in F
C2 = 7500 # in pF
C2 = C2 * 10**-12 # in F
#Formula f_o = (1/(2*Pi))*(sqrt( (1/(L*C1))+(1/(L*C2)) ))
L1 = (1/(4*(pi**2)*(f_o**2)))*( (1/C1) + (1/C2) ) # in H
L1 = L1 * 10**3 # in mH
f_o = 2050 # in kHz
f_o = f_o * 10**3 # in Hz
L2 = (1/(4*(pi**2)*(f_o**2)))*( (1/C1) + (1/C2) ) # in H
L2 = L2 * 10**3 # in mH
print "The range of inductance values =",round(L2,3),"mH to",round(L1,3),"mH"
#Given data
L1 = 30 # in mH
L1 = L1 * 10**-3 # in H
L2 = 1*10**-8 # in H
M = 0 # in H
L = L1+L2+(2*M) # in H
C = 100 # in pF
C = C * 10**-12 # in F
f_o = 1/(2*pi*(sqrt( L*C ))) # in Hz
f_o = f_o * 10**-3 # in kHz
print "The frequency of oscillation = %0.1f kHz " %f_o
#Given data
L1 = 1 # in mH
L1 = L1 * 10**-3 # in H
L2 = 100 # in µH
L2 = L2 * 10**-6 # in H
M = 50 # in µH
M = M * 10**-6 # in H
C = 100 # in pF
C = C * 10**-12 # in F
L = L1+L2+(2*M) # in H
f_o = 1/(2*pi*(sqrt( L*C ))) # in Hz
f_o = f_o * 10**-3 # in kHz
print "The oscillation frequency = %0.f kHz " %f_o
#Given data
Rs = 5 # in k ohm
Rs =Rs * 10**3 # in ohm
Ls = 0.8 # in H
Cs = 0.08 # in pF
Cs = Cs * 10**-12 # in pF
C_P = 1 # in pF
C_P = C_P * 10**-12 # in F
f_s = 1/(2*pi*(sqrt( Ls*Cs ))) # in Hz
f_s = f_s * 10**-3 # in kHz
print "The series resonant frequency = %0.f kHz " %f_s
f_p = (1/(2*pi)) * (sqrt( (1+(Cs/C_P))/(Ls*Cs) )) # in Hz
f_p = f_p * 10**-3 # in kHz
print "The parallel resonant frequency = %0.f kHz " %f_p
#Given data
f_s = 1 # in MHz
f_s = f_s * 10**6 # in Hz
Cs = 0.1 # in pF
Cs = Cs * 10**-12 # in pF
# f_s = 1/(2*pi*(sqrt( Ls*Cs )))
Ls = 1/(4*(pi**2)*Cs*(f_s**2)) # in H
print "The value of inductance = %0.4f H " %Ls
#Given data
C = 0.04 # in pF
Cdesh = 2 # in pF
Per1 = (1/2)*(C/Cdesh)*100 # in %
Per2 = (sqrt(1+C/Cdesh)-1)*100 # in %
print "Parallel resonant frequency is greater than series resonant frequency by",round(Per2,3),"%"
#Given data
R1 = 800 # in k ohm
R1 = R1 * 10**3 # in ohm
R2 = R1 # in ohm
R3 = R1 # in ohm
R = R1 # in ohm
C1 = 100 # in pF
C1 = C1 * 10**-12 # in F
C2 = C1 # in F
C3 = C1 # in F
C = C1 # in F
f_o = 1/(2*pi*R*C*sqrt(6)) # in Hz
print "The frequency of oscillation = %0.f Hz " %f_o
#Given data
C1 = 0.016 # in µF
C1 = C1 * 10**-6 # in F
C2 = C1 # in F
C3 = C1 # in F
C = C1 # in F
#f_o = 1/(2*pi*R*C*sqrt(10))
f_o = 1 # in kHz
f_o = f_o * 10**3 # in Hz
R = 1/(2*pi*f_o*C*sqrt(10)) # in ohm
print "The value of resiatnce = %0.f ohm " %R
print "Standard value : 3.3 kohm"
#Given data
f_o = 10 # in kHz
f_o = f_o * 10**3 # in Hz
R = 200 # in k ohm
R = R * 10**3 # in ohm
C = 1/(2*pi*f_o*R) # in F
C=C*10**12 # in pF
print "The value of C = %0.1f pF " %C
R4 = R # in ohm
R4= R4*10**-3 # in k ohm
print "The value of R4 = %0.f k ohm " %R4
R3 = R4*2 # in k ohm
print "The value of R3 = %0.f k ohm " %R3
#Given data
f = 15 # in kHz
f = f * 10**3 # in Hz
R = 200 # in k ohm
R = R * 10**3 # in ohm
C = 1/(2*pi*f*R) # in F
C= C*10**12 # in pF
print "The value of C = %0.f pF " %C
R4 = R # in ohm
R4= R4*10**-3 # in k ohm
print "The value of R4 = %0.f k ohm " %R4
R3 = R4*2 # in k ohm
print "The value of R3 = %0.f k ohm " %R3
#Given data
R1 = 20 # in k ohm
R1 = R1 * 10**3 # in ohm
R2 = R1 # in ohm
R = R1 # in ohm
C1 = 1000 # in pF
C1 = C1 * 10**-12 # in F
C2 = C1 # in F
C = C1 # in F
f = 1/(2*pi*R*C) # in Hz
f= f*10**-3 # in kHz
print "The frequency of oscillations = %0.2f kHz " %f
from math import log10
#Given data
R_E = 60 # in k ohm
R_E = R_E * 10**3 # in ohm
C = 0.25 # in µF
C = C * 10**-6 # in F
Eta = 0.65
f = 1/(2.3*R_E*C*log10(1/(1-Eta))) # in Hz
print "The pulse repetition frequency = %0.1f Hz " %f