import math
Rf=39.0 #feedback path resistance Rf (KOhm)
R1=1.0 #inverting input resistance R1(KOhm)
R2=12.0*10**3 #non-inverting input resistance R2(Ohm)
C=680*10**-12 #capacitance at non-inverting input(F)
Av=(Rf/R1)+1 # voltage gain
fc=(2*math.pi*R2*C)**-1 #cutoff frequency(Hz)
print 'voltage gain Av = ',Av
print 'cutoff frequency fc = ',round((fc/1000),2),'KHz'
print 'frequency response:'
print 'voltage gain is 32 dB in pass band. response breaks at 19.5 KHz.'
import math
Rf=43.0 #feedback path resistance Rf (KOhm)
R1=0.220 #non-inverting input resistance R1(KOhm)
C=100*10**-12 #capacitance (F)
Av=(-Rf/R1) # voltage gain
fc=((2*math.pi*Rf*C)**-1)/10**6 #cutoff frequency(KHz)
print 'voltage gain Av = ',round(Av,2)
print 'cutoff frequency fc = ',round(fc,2),'KHz'
print 'voltage gain is 45.8 dB in pass band. response breaks at 37 KHz.'
import math
R1=30 #non-inverting input resistance R1(KOhm)
R2=30 #non-inverting input resistance R2(KOhm)
C2=1.64*10**-9 #feedback path capacitance (F)
C1=820*10**-12 #non-inverting input capacitance (F)
Q=0.5*((C2/C1)**0.5) #Q
fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)
fc=fp #cutoff frequency(KHz)
print ' Q = ',round(Q,3)
print 'pole frequency fp = ',round(fp,2),'KHz'
print 'cutoff frequency fc = fp, ',round(fc,2),'KHz'
import math
R1=51 #non-inverting input resistance R1(KOhm)
R2=51 #non-inverting input resistance R2(KOhm)
C2=440*10**-12 #feedback path capacitance (F)
C1=330*10**-12 #non-inverting input capacitance (F)
kc=0.786 #constant for bessel response
Q=0.5*((C2/C1)**0.5) #Q
fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)
fc=kc*fp #cutoff frequency(KHz)
print ' Q = ',round(Q,2)
print 'pole frequency fp = ',round(fp,2),'KHz'
print 'cutoff frequency fc = ',round(fc,2),'KHz'
import math
R1=22 #non-inverting input resistance R1(KOhm)
R2=22 #non-inverting input resistance R2(KOhm)
C2=27*10**-9 #feedback path capacitance (F)
C1=390*10**-12 #non-inverting input capacitance (F)
kc=1.38 #constant for bessel response
k0=0.99 #constant for bessel response
k3=1.54 #constant for bessel response
Q=0.5*((C2/C1)**0.5) #Q
fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)
fc=kc*fp #cutoff frequency(KHz)
f3=k3*fp #3-dB frequency(KHz)
print 'Q = ',round(Q,2)
print 'pole frequency fp = ',round(fp,2),'KHz'
print 'cutoff frequency fc = ',round(fc,2),'KHz'
print '3-dB frequency f(3dB) = ',round(f3,2),'KHz'
import math
R1=47 #non-inverting input resistance R1(KOhm)
R2=47 #non-inverting input resistance R2(KOhm)
C2=330*10**-12 #feedback path capacitance (F)
C1=330*10**-12 #non-inverting input capacitance (F)
R3=51 #inverting input resistance R3(KOhm)
Rf=30.0 #feedback path resistance Rf (KOhm)
Av=(Rf/R3)+1 #voltage gain
Q=(3-Av)**-1 #Q
fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)
fc=fp #cutoff frequency(KHz)
print ' Q = ',round(Q,2)
print 'pole frequency fp = ',round(fp,2),'KHz'
print 'cutoff frequency fc = ',round(fc,2),'KHz'
import math
R1=82 #non-inverting input resistance R1(KOhm)
R2=82 #non-inverting input resistance R2(KOhm)
C2=100*10**-12 #feedback path capacitance (F)
C1=100*10**-12 #non-inverting input capacitance (F)
R3=56 #inverting input resistance R3(KOhm)
Rf=15.0 #feedback path resistance Rf (KOhm)
kc=0.786 #constant for bessel response
Av=(Rf/R3)+1 #voltage gain
Q=(3-Av)**-1 #Q
fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)
fc=kc*fp #cutoff frequency(KHz)
print 'Q = ',round(Q,2)
print 'pole frequency fp = ',round(fp,2),'KHz'
print 'cutoff frequency fc = ',round(fc,2),'KHz'
import math
R1=56 #non-inverting input resistance R1(KOhm)
R2=56 #non-inverting input resistance R2(KOhm)
C2=220*10**-12 #feedback path capacitance (F)
C1=220*10**-12 #non-inverting input capacitance (F)
R3=20.0 #inverting input resistance R3(KOhm)
Rf=39.0 #feedback path resistance Rf (KOhm)
kc=1.414 #constant for bessel response
k0=1.0 #constant for bessel response
k3=1.55 #constant for bessel response
Av=(Rf/R3)+1 #voltage gain
Q=(3-Av)**-1 #Q
fp=((2*math.pi*R1*(C1*C2)**0.5)**-1)/10**6 #pole frequency(KHz)
fc=kc*fp #cutoff frequency(KHz)
f0=k0*fp #resosnant frequency(KHz)
f3=k3*fp #3-dB frequency (KHz)
Av1=((1.01*Rf)/(0.99*R3))+1 #voltage gain considering 1% tolerance
Q1=(3-Av1)**-1 #Q
print 'Q = ',Q
print 'pole frequency fp = ',round(fp,2),'KHz'
print 'cutoff frequency fc = ',round(fc,2),'KHz'
print 'resonant frequency f0 = ',round(f0,2),'KHz'
print '3-dB frequency f(3-dB) = ',round(f3,2),'KHz'
print 'circuit produces 26-dB peak in response at 12.9 KHz, rolls off to 0 dB at cutoff and 3 dB down at 20 KHz'
print 'after considering tolerance in resistance, Q changed to',Q1,'approximately'
import math
R1=24 #non-inverting input resistance R1(KOhm)
R2=12 #feedback path resistance R2(KOhm)
C=4.7*10**-9 #non-inverting input capacitance (F)
Q=0.5*((R1/R2)**0.5) #Q
fp=((2*math.pi*C*(R1*R2)**0.5)**-1)/10**6 #pole frequency(KHz)
fc=fp #cutoff frequency(KHz)
print 'Q = ',round(Q,2)
print 'pole frequency fp = ',math.ceil(fp),'KHz'
print 'cutoff frequency fc = ',math.ceil(fc),'KHz'
import math
R1=30 #non-inverting input resistance R1(KOhm)
R2=30 #feedback path resistance R2(KOhm)
C=1*10**-9 #non-inverting input capacitance (F)
R3=10.0 #inverting input resistance R3(KOhm)
Rf=15.0 #feedback path resistance Rf (KOhm)
kc=1.32 #constant for bessel response
k0=0.94 #constant for bessel response
k3=1.48 #constant for bessel response
Av=(Rf/R3)+1 #voltage gain
Q=(3-Av)**-1 #Q
fp=((2*math.pi*R1*C)**-1)/10**6 #pole frequency(KHz)
fc=fp/kc #cutoff frequency(KHz)
f0=fp/k0 #resosnant frequency(KHz)
f3=fp/k3 #3-dB frequency (KHz)
print 'Q = ',Q
print 'pole frequency fp = ',round(fp,2),'KHz'
print 'cutoff frequency fc = ',round(fc,2),'KHz'
print 'resonant frequency f0 = ',round(f0,2),'KHz'
print '3-dB frequency f(3-dB) = ',round(f3,2),'KHz'
print 'circuit produces 6.3-dB peak in response at 5.65 KHz, rolls off to 0 dB at cutoff at 4.02 KHz and 3 dB down at 3.59 KHz'
import math
R1=18 #non-inverting input resistance R1(KOhm)
R2=30 #feedback path resistance R2(KOhm)
C=8.2*10**-9 #non-inverting input capacitance (F)
R31=0.080 #inverting max input resistance R3(KOhm)
R32=0.015 #inverting min input resistance R3(KOhm)
BW=((2*math.pi*R1*C)**-1)/10**6 #bandwidth(KHz)
f0=((2*math.pi*C*((2*R1*((R1**-1+R31**-1)**-1))**0.5))**-1)/10**6 #minimum center frequency(KHz)
f01=((2*math.pi*C*((2*R1*((R1**-1+R32**-1)**-1))**0.5))**-1)/10**6 #minimum center frequency(KHz)
print 'bandwidth BW = ',round(BW,2),'KHz'
print 'minimum center frequency f0 = ',round(f0,2),'KHz'
print 'maximum center frequency f0 = ',round(f01,2),'KHz'
import math
R=22.0 #non-inverting input resistance(KOhm)
C=120*10**-9 #non-inverting input capacitance (F)
R1=13.0 #inverting input resistance(KOhm)
R2=10.0 #feedback path resistance(KOhm)
Av=(R2/R1)+1 #voltage gain
Q=0.5/(2-Av) #Q
f0=((2*math.pi*R*C)**-1)/10**3 #center frequency(KHz)
print 'voltage gain Av = ',round(Av,2)
print 'Q = ',round(Q,2)
print 'center frequency f0 = ',round(f0,2),'KHz'
import math
R=1.0 #non-inverting input resistance(KOhm)
C=100*10**-9 #non-inverting input capacitance (F)
f=1.0 #frequency given(KHz)
f0=((2*math.pi*R*C)**-1)/10**6 #center frequency(KHz)
phi=(2*math.atan(f0/f))*180/math.pi #phase shift(deg)
print 'center frequency f0 = ',round(f0,2),'KHz'
print 'phase shift = ',math.ceil(phi),'degrees'