import math
#Variable declaration
L=1.414; #Alpha
Ri=1; #in Ohm
#Calculations&Results
Rf=2-L;
print "The value of Rf is = %.3f Ohm\n"%Rf;
Av=1+Rf/Ri;
print "The pass band gain of = %.3f \n"%Av;
fc=1000; #in Hz
W=2*math.pi*fc;
print "The critical frequency is = %.0f radians per seconds\n"%W;
R=1/W;
print "The Resistor required is = %.6f Ohm\n"%R;
C1=2/L;
print "The capacitor1 required is = %.3f F\n"%C1;
C2=L/2;
print "The capacitor2 required is = %.3f F\n"%C2;
import math
#Variable declaration
L=1.732; # Aplha = DAMPING
Kf=1.274;
#Calculations&Results
R1=L/2;
print "The Resistor required is = %.3f Ohm\n"%R1;
R2=2/L;
print "The Resistor required is = %.3f Ohm\n"%R2;
F3db=5000; #in Hz
Fc=F3db/Kf;
print "The critical frequency is = %.0f Hz\n"%Fc;
Wc=2*math.pi*Fc;
print "The Wc is = %.0f radians per seconds\n"%Wc;
R1n=R1/Wc;
print "The value of scaled Resistor R1 is = %.7f Ohm\n"%R1n;
R2n=R2/Wc;
print "The value of scaled Resistor R2 is = %.7f Ohm\n"%R2n;
import math
#Variable declaration
f3db=20; #In Hz
#Calculations&Results
W3db=2*math.pi*f3db;
print "The desired break frequency, W3db is = %.1f radians per second\n"%W3db;
print "Stage 1";
kf=1.557;
Wc=W3db/kf;
print "The Wc is = %.1f radians per second\n"%Wc;
Rscaled=1/80.7; #Rscaled value
R=1000*Rscaled; #Practical Value
print "The scaled Resistor required is = %.3f Ohm\n"%R;
C=1*10**-6; #Assumed Value
print "The assumed capacitor is = %.f uFarad\n"%(C*10**6);
print "Stage 2";
Alpha=1.775;
R1=Alpha/2;
print "The Resistor R1 required is = %.4f Ohm\n"%R1;
R2=2/Alpha;
print "The Resistor R2 required is = %.3f Ohm\n"%R2;
kf1=1.613;
Wc1=W3db/kf1;
print "The required critical frequency ,Wc is = %.1f radians per second\n"%Wc1;
#we will scale the resistor
R1s=R1/Wc1;
R2s=R2/Wc1;
print "The scaled resistor R1 is = %.4f Ohm\n"%R1s;
print "The scaled resistor R2 is = %.4f Ohm\n"%R2s;
print "The assumed capacitor is = %.f uFarad\n"%(C*10**6);
#for practical values of resistor and capacitor multiplying by 10**6
R1m=R1s*10**6;
R2m=R2s*10**6;
print "The practical value of resistor R1 is = %.0f Ohm\n"%R1m;
print "The practical value of resistor R2 is = %.0f Ohm\n"%R2m;
print "The assumed capacitor is = %.f uFarad\n"%(C*10**6);
print "Stage 3"
Alpha=1.091;
R21=Alpha/2;
R22=2/Alpha;
kf2=1.819;
Wc2=W3db/kf2;
print "The required critical frequency ,Wc is = %.1f radians per second\n"%Wc2;
#Scale resistor by Wc to achive tuning frequency
R21s=R21/Wc2;
R22s=R22/Wc2;
print "The scaled resistor R1 is = %.5f Ohm\n"%R21s;
print "The scaled resistor R2 is = %.4f Ohm\n"%R22s;
#for practical values of resistor and capacitor multiplying by 10**6
R21m=R21s*10**6;
R22m=R22s*10**6;
print "The practical value of resistor R1 is = %.0f Ohm\n"%R21m;
print "The practical value of resistor R2 is = %.0f Ohm\n"%R22m;
print "The assumed capacitor is = %.6f Farad\n"%C;
import math
#Variable declaration
L=1.414; #Alpha
fc=800; #In Hz
#Calculations&Results
Rf=2-L;
print "The value of Rf is = %.3f Ohm\n"%Rf;
Wc=2*math.pi*fc;
print "The critical frequency is = %.0f radians per seconds\n"%Wc;
R=1/Wc;
print "The value of scaled Resistor R1 is = %.3e Ohm\n"%(R*10**-4);
print "The value of scaled Resistor and capacitor is = %.0f Ohm and 10nF \n"%(R*10**8);
import math
#Variable declaration
f2=1200; #in Hz
f1=800; #in Hz
#Calculations&Results
BW=f2-f1;
print "The Bandwidth is %.f Hz\n"%BW;
fo=(f1*f2)**0.5;
print " fo is %.0f Hz\n"%fo;
Q=fo/BW;
print " Q is %.2f \n"%Q;
Av=-2*Q*Q;
print "Av is %.0f \n"%Av;
fut=10*Av*fo;
print "funity is %.0f Hz\n"%fut;
R2=2*Q;
print "R2 is %.1f Ohm\n"%R2;
R1b=Q/(2*Q*Q-1);
print "R1b is %.4f Ohm\n"%R1b;
W=2*math.pi*fo;
print "The frequency is = %.0f radians per seconds\n"%W;
C=1/W*10**6;
print "C is %.1f uF\n"%C;
#practical component value
print "R and C are %.0f Ohm and %.3f F\n"%(R2*10,C/10);
import math
#Variable declaration
Q=25;
fo=4300; #in Hz
#Calculations&Results
Rd=3*Q-1; #R damping
print "Rdamping is %.1f Ohm\n"%Rd;
W=2*math.pi*fo;
print "The frequency is = %.0f radians per seconds\n"%W;
C=1./W*10**6;
print "C is %.f uF\n"%C;
#practical component value
print "Rdamping and C are %.0f Ohm and %.1f nF\n"%(Rd*5000,C/5000*10**3);
#remaining other Resistor are of 5K Ohm
import math
#Variable declaration
Q=30;
fo=60; #in Hz
#Calculations&Results
Rd=3*Q-1; #R damping
print "Rdamping is %.1f Ohm\n"%Rd;
W=2*math.pi*fo;
print "The frequency is = %.0f radians per seconds\n"%W;
C=1/W*10**3;
print "C is %.2f F\n"%C;