#Given
R=10 #Kohm
C=0.001 #microF
#Calculation
wc=1/(R*10**3*C*10**-6)
fc=wc/(6.28)
#Result
print"The cut off frequency is",round(fc/1000,2),"Khz"
#Given
f=2 #Frequency, khz
C=0.005 #MicroF
#Calculation
R=1/(6.28*2*10**3*C*10**-6)
#Result
print"The value of R is",round(R/1000,1),"Kohm"
#Given
f=30 #rad/s, frequency
C=0.01 #microF
R=1/(f*10**3*C*10**-6)
#Result
print"The value of R is",round(R/1000,1),"Kohm"
#Given
f=1 #Khz, cut off frequency
C1=0.01 #MicroF
#Calculation
C2=2*C1
R=0.707/(6.28*f*10**3*C1*10**-6)
Rf=2*R
#Result
print"The value of R is",round(R,0),"ohm"
print"The value of Rf is",round(Rf,0),"ohm"
#given
C3=0.01 #microF, from fig 11.5 (a)
f=1.0 #Khz, cut off frequency
#Calculation
C1=C3/2.0
C2=2*C3
R=1/(6.28*f*10**3*C3*10**-6)
#Result
print"The value of C1=",C1,"microF"
print"The value of C2=",C2,"microF"
print"The value of R=",round(R),"ohm"
#Given
C=0.002 #microF, capacitance
fc=10 #Khz, frequency
#Calculation
R=1/(6.28*f*10**3*C*10**-6)
#Result
print"The value of R=",round(R/10000),"kohm"
#Given
R=22.0 #kohm
C=0.001 #microF
#Calculation
import math
wc=1/(R*10**3*C*10**-6)
fc=wc/(2*math.pi)
#Result
print"The value of wc is",round(wc/10000,2),"krad/s"
print"The value of fc is",round(fc/10,1),"Hz"
#Given
C1=0.01 #microF
C2=C1
f=1 #KHz, frequency
#Calculation
#From eq 11.9
R1=1.414/(6.28*f*10**3*C1*10**-6)
R2=R1/2.0
#result
print"The value of R1 is",round(R1/1000,1),"kohm"
print"The value of R2 is",round(R2/1000,1),"kohm"
#Given
C1=125 #pF
C2=C1 #KHz,cut off frequency
f=80 #Krad/s cutoff frequency
#Calculation
#From eq 11.9
R1=1.414/(f*10**3*C1*10**-12)
R2=R1/2.0
#result
print"The value of R1 is",round(R1/1000,0),"kohm"
print"The value of R2 is",round(R2/1000,1),"kohm"
#Given
f=159.0 #Hz, cut off frequency
C=0.1 #microF
C1=C
C2=C
C3=C
wc=1
#calculation
R3=1/(wc*10**3*C*10**-6)
R1=2*R3
R2=R3/2.0
#Result
print"(a)The value of R3 is",round(R3/1000),"kohm"
print"(b)The value of R1 is",round(R1/1000),"kohm"
print"(c)The value of R2 is",round(R2/1000,0),"kohm"
#Given
f=60 #kHz, cut off frequency
C=220 #pF
C1=C
C2=C
C3=C
#calculation
R3=1/(6.28*f*10**3*C*10**-12)
R1=2*R3
R2=R3/2.0
#Result
print"(a)The value of R3 is",round(R3/1000,0),"kohm"
print"(b)The value of R1 is",round(R1/1000),"kohm"
print"(c)The value of R2 is",round(R2/1000),"kohm"
#Given
f1=300 # Hz, lower cutoff frequency
f2=3000 #Hz, upper cutoff frequency
#Calculation
import math
B=f2-f1
f=math.sqrt(f1*f2)
#Result
print"The bandwidth is",B,"Hz"
print"The frequency is",round(f,1),"Hz"
#Given
fr=950 #Hz, resonant frequency
B=2700 #Hz
#Calculation
import math
fl=math.sqrt(B**2/4.0+fr**2)-B/2.0
fh=fl+B
#Result
print"The lower cutoff frequency is",round(fl,1),"Hz"
print"The upper cutoff frequency is",round(fh,1),"Hz"
#Given
B=2700.0 #Hz
fr=950 #Hz resonant frequency
#calculation
Q=fr/B
#Result
print"The quality factor",round(Q,2)
if Q<0.5:
print"This filter is classified"
else:
print"This filter is not classified"
#Given
fr=1000 #Hz, resonant frequency
fl=80 #From eq 11.16
fh=1280 #upper frequency
C=0.015 #microF
Q=2.0 #Quality factor
#Calculation
import math
B=fr/Q
fl=math.sqrt(B**2/4.0+fr**2)-B/2.0
fh=fl+B
R=0.1591/(B*C*10**-6)
Rr=R/(2*Q**2-1)
#Result
print"The Rr is",round(Rr/1000,2),"kohm"
#Given
R=21.21*10**3 #ohm, resiatance
Rr=3.03*10**3
C=0.015*10**-6 #F, capacitance
#Calculation
import math
#From eq 11.12
fr=0.1125*math.sqrt(1+R/Rr)/(R*C)
B=0.1591/(R*C)
#Result
print"The resonant frequency is",round(fr,0),"Hz"
print"Bandwidth is",round(B,0),"Hz"
#Given
fr=120 #Hz resonant frequency
B=12 #Hz
Q=10 #Quality factor
#Calculation
C=0.33 #MicroF
R=0.1591/(B*C*10**-6)
Rr=R/(2*Q**2-1)
#Result
print"The value of resistance is",round(R/1000,1),"kohm"
print"The value of Rr is",round(Rr,1),"kohm"