## Example 21-1, Page 806¶

In [18]:
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.'

voltage gain Av =  40.0
cutoff frequency fc =  19.5 KHz
frequency response:
voltage gain is 32 dB in pass band. response breaks at 19.5 KHz.


## Example 21-2, Page 807¶

In [2]:
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.'

voltage gain Av =  -195.45
cutoff frequency fc =  37.01 KHz
voltage gain is 45.8 dB in pass band. response breaks at 37 KHz.


## Example 21-3, Page 811¶

In [4]:
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'

 Q =  0.707
pole frequency fp =  4.57 KHz
cutoff frequency fc = fp,  4.57 KHz


## Example 21-4, Page 811¶

In [5]:
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'

 Q =  0.58
pole frequency fp =  8.19 KHz
cutoff frequency fc =  6.44 KHz


## Example 21-5, Page 812¶

In [6]:
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'

Q =  4.16
pole frequency fp =  2.23 KHz
cutoff frequency fc =  3.08 KHz
3-dB frequency f(3dB) =  3.43 KHz


## Example 21-6, Page 817¶

In [7]:
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'

 Q =  0.71
pole frequency fp =  10.26 KHz
cutoff frequency fc =  10.26 KHz


## Example 21-7, Page 817¶

In [8]:
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'

Q =  0.58
pole frequency fp =  19.41 KHz
cutoff frequency fc =  15.26 KHz


## Example 21-8, Page 818¶

In [17]:
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'

Q =  20.0
pole frequency fp =  12.92 KHz
cutoff frequency fc =  18.27 KHz
resonant frequency f0 =  12.92 KHz
3-dB frequency f(3-dB) =  20.02 KHz
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
after considering tolerance in resistance, Q changed to 94.2857142857 approximately


## Example 21-9, Page 820¶

In [10]:
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'

Q =  0.71
pole frequency fp =  2.0 KHz
cutoff frequency fc =  2.0 KHz


## Example 21-10, Page 821¶

In [16]:
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'

Q =  2.0
pole frequency fp =  5.31 KHz
cutoff frequency fc =  4.02 KHz
resonant frequency f0 =  5.64 KHz
3-dB frequency f(3-dB) =  3.58 KHz
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


## Example 21-11, Page 825¶

In [15]:
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'

bandwidth BW =  1.08 KHz
minimum center frequency f0 =  11.46 KHz
maximum center frequency f0 =  26.42 KHz


## Example 21-12, Page 827¶

In [13]:
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'

voltage gain Av =  1.77
Q =  2.17
center frequency f0 =  60.29 KHz


## Example 21-13, Page 833¶

In [14]:
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'

center frequency f0 =  1.59 KHz
phase shift =  116.0 degrees

In [ ]: