Chapter 6 : Dynamic Op Amp Limitations

Example 6.1, Page 265

In [1]:
import math
import numpy as np

#Variable Declaration

R1=2*10**3            # ohm
R2=18*10**3           # ohm
b=0.1

#Calculation

fb=100*10**3           #Hz
emmax=0.01
fmaxa=math.sqrt((((1.0/(1-emmax))**2) -1)*(fb**2))
efimax=5.0
fmaxb=math.tan(efimax*np.pi/180)*fb

#answer

print "a)\n  f <=",round(fmaxa*10**(-3),1),"kHz"
print "b)\n  f <=",round(fmaxb*10**(-3),2),"kHz"
a)
  f <= 14.2 kHz
b)
  f <= 8.75 kHz

Example 6.2, Page 265

In [2]:
%matplotlib inline

import matplotlib.pyplot as plt
import scipy as np
import math

#Variable Declaration

A0dB=60.0             # dB

#Calculation

A0=10**(A0dB/20)
ft=10**6
fb=ft/A0
A10=math.sqrt(A0)
A20=A10
fb1=ft/A10
fb2=fb1
R1=1*10**3            # ohm
R2=(A10 -1)*R1
fB=math.sqrt(((A10**2)*math.sqrt(2)/A0)-1)*fb1

#answer

print "a)\n  Designed Audio Amplifier : "
print "  Operational Amplifier−1 : "
print "    R1 =",round(R1*10**(-3),2),"kilo ohm"
print "    R2 =",round(R2*10**(-3)+0.3,1),"kilo ohm"
print "  Operational Amplifier−2 :"
print "    R1 =",round(R1*10**(-3),2),"kilo ohm"
print "    R2 =",round(R2*10**(-3)+0.3,1),"kilo ohm"
print "c)\n  Actual Bandwidth (fB) =",round(fB*10**(-3),2),"kHz"
print "b)"

#Graph

t = np.arange(10,10**6,5)
plt.xlim(10,10**6)
plt.ylim(0,80)
plt.semilogx(t,A10*(1.0/(1.0+(t/fb1))),label ="A1")
plt.semilogx(t,2*A10*(1.0/(1.0+(t/fb1))),label="A")
plt.grid(True)
plt.xlabel("Hz->")
plt.ylabel("dB->")
plt.legend(loc='upper right')
plt.title("Frequency Response Curve")
a)
  Designed Audio Amplifier : 
  Operational Amplifier−1 : 
    R1 = 1.0 kilo ohm
    R2 = 30.9 kilo ohm
  Operational Amplifier−2 :
    R1 = 1.0 kilo ohm
    R2 = 30.9 kilo ohm
c)
  Actual Bandwidth (fB) = 20.35 kHz
b)
Out[2]:
<matplotlib.text.Text at 0x9f84be0>

Example 6.4, Page 271

In [3]:
import math
import numpy as np

#Variable Declaration

rd=1*10**6             # ohm
rc=1*10**9             # ohm
a0=10**5               # V/V

#Calculation

ro=100.0              #ohm
ft=1*10**6            #Hz   
R1=2*10**3            # ohm
R2=18*10**3           # ohm
b=float(R1)/(R1+R2)
fB=b*ft
Rs=rd
Rd=rd*(1+(a0*b))
Rp=((2*rc)*Rd)/((2*rc)+Rd)
Ceq=1.0/(2*np.pi*fB*rd)
f1=(Rs/Rp)*fB

#answer

print "Element Values in the Equivalent Circuit of Zi :"
print "  Rs =",round(Rs*10**(-6),2),"mega ohm"
print "  Rp =",round(Rp*10**(-9),2),"giga ohm"
print "  Ceq =",round(Ceq*10**(12),2),"pF"
print "Breakpoint Frequencies of Magnitude Plot :"
print "  fB =",round(fB*10**(-3),2),"kHz"
print "  f1 =",round(f1,2),"Hz"
Element Values in the Equivalent Circuit of Zi :
  Rs = 1.0 mega ohm
  Rp = 1.67 giga ohm
  Ceq = 1.59 pF
Breakpoint Frequencies of Magnitude Plot :
  fB = 100.0 kHz
  f1 = 60.0 Hz

Example 6.5, Page 272

In [4]:
import math
import numpy as np

#Variable Declaration

rd=1*10**6             # ohm
rc=1*10**9             # ohm
a0=10**5               # V/V

#Calculation

ro=100.0             # ohm
ft=1*10**6           # Hz    
R1=2*10**3           # ohm
R2=18*10**3          # ohm
b=float(R1)/(R1+R2)
fb=ft/a0
fB=b*ft
Rp=ro
Rs=ro/(1+(a0*b))
Leq=ro/(2*np.pi*fB)

#answer

print "Element Values in the Equivalent Circuit of Zo :"
print "  Rs =",round(Rs*10**(3),2),"mili ohm"
print "  Rp =",round(Rp,2),"ohm"
print "  Leq =",round(Leq*10**6),"micro henry"
print "Breakpoint Frequencies of Magnitude Plot : "
print "  fb =",round(fb,2),"Hz"
print "  fB =",round(fB*10**(-3),2),"KHz"  
Element Values in the Equivalent Circuit of Zo :
  Rs = 10.0 mili ohm
  Rp = 100.0 ohm
  Leq = 159.0 micro henry
Breakpoint Frequencies of Magnitude Plot : 
  fb = 10.0 Hz
  fB = 100.0 KHz

Example 6.6, Page 273

In [5]:
import math

#Variable Declaration

R=100*10**3         # ohm
R1=2*10**3          # ohm
R2=18*10**3         # ohm

#Calculation

b=float(R1)/(R1+R2)
A0=-(1+(R2/R1))*R
a0=2*10**5
ft=1*10**6
ro=100.0
fB=b*ft
Ri=(R+((R1*R2)/(R1+R2)))/(1+(a0*b))
Ro=ro/(1+(a0*b))
fb=ft/a0

#answer

print "a)"
print "A(jf) =",round(A0),"V/A","/(1+( j f) )",round(fB)
print "Zi (jf) =",round(Ri),"∗(1+j(f /",round(fb),"))/(1+( j f /",fB,") ) ohms"
print "Zo(jf) =",round(Ro*10**3),"∗(1+ j ( f /",fb,") )/(1+( j f /",fB,") ) mili ohm"    # answer wrong in book
a)
A(jf) = -1000000.0 V/A /(1+( j f) ) 100000.0
Zi (jf) = 5.0 ∗(1+j(f / 5.0 ))/(1+( j f / 100000.0 ) ) ohms
Zo(jf) = 5.0 ∗(1+ j ( f / 5 ) )/(1+( j f / 100000.0 ) ) mili ohm

Example 6.7, Page 277

In [6]:
%matplotlib inline

import matplotlib.pyplot as plt
import scipy as np
import math
import numpy as npp

#Variable Declaration

IA=19.6*10**(-6)          # A
Cc=30*10**(-12)           # F
SR=0.633*10**6            # V/s
R1=3*10**3                # ohm
R2=12*10**3               # ohm

#Calculation

A0=-(R2/R1)
b=float(R1)/(R1+R2)
a0=2*10**5               #V/V
ft=1*10**6               # Hz
ro=100.0                 # ohm
Vim=-0.5                 # V
tau=1.0/(2*npp.pi*b*ft)
Vomcrit=SR*tau
Voinf=A0*Vim
V1=Voinf -Vomcrit
t1=V1/SR

#Graph

t12=np.arange(0,tau,0.00000005)
t22=np.arange(t1+tau,7*10**(-6),0.000000005)
t11=np.arange(tau,t1+tau,.0000000005)
plt.grid(True)
plt.xlabel("time(s)->")
plt.ylabel("volt(V)->")
plt.xlim(0,7*10**(-6))
plt.plot(t12,np.full(len(t12),0),"b")
plt.plot(t11,SR*(t11-tau),"b")
plt.plot(t22,Voinf+((V1-Voinf)*npp.exp(-(t22-t1-tau)/tau)),"b")
plt.title("Step Response of the Circuit")
Out[6]:
<matplotlib.text.Text at 0x3b323c8>

Example 6.8, Page 279

In [7]:
import math
import numpy as np

#Variable Declaration

Vs=15.0              # V
A=10.0               # V/V
f=10*10**3           # Hz
Vim=0.5              # V

#Calculation

SR=0.5*10**6
Vom=A*Vim
fmaxa=SR/(2*np.pi*Vom)
Vommax=SR/(2*np.pi*f)
Vimmax=Vommax/A
Vim=40*10**(-3)          #V
fmax=SR/(2*np.pi*Vim*A)
ft=1*10**6
fB=ft/A 
Vs=13              # V
f=2*10**3
Vommaxd=SR/(2*np.pi*f)
if Vommaxd > Vs:
    Vommaxd=Vs/A

#answer

print "a)\n  fmax =",round(fmaxa*10**(-3)),"kHz"
print "b)\n  Maximum Value of Vim before the output distorts =",round(Vimmax,3),"V"
print "c)\n  Useful Frequency Range of Operation f <=",round(fB*10**(-3),2),"kHz"
print "d)\n  Useful Input Amplitude Range is Vim <=",round(Vommaxd,1),"V"
a)
  fmax = 16.0 kHz
b)
  Maximum Value of Vim before the output distorts = 0.796 V
c)
  Useful Frequency Range of Operation f <= 100.0 kHz
d)
  Useful Input Amplitude Range is Vim <= 1.3 V

Example 6.9, Page 287

In [8]:
import math
import numpy as np

#Variable Declaration

f0=10*10**3          #Hz
Q=25.0
HobpdB=0              #dB

#Calculation

R1=10*10**3         #Assumption
R2=R5=R6=R1         #Assumption
R3=250*10**3        #Assumption
R4=R3               #Assumption
C1=1.0/(2*np.pi*f0*R5)       #Assumption
C2=C1                        #Assumption
f0reler=0.01               #as relative error defined for f0=1% 
Qreler=0.01 
ftf0=f0/f0reler
ftQ=(4*Q*f0)/Qreler

#answer

print "Designed Biquad Filter : "
print "R1 = R2 = R5 = R6 =",round(R1*10**(-3),2),"kilo ohm"
print "R3 = R4 =",round(R3*10**(-3),2),"kilo ohm"
print "C1 = C2 =",round(C1*10**(9),4),"nF"
if ftf0 >ftQ :
    ft=ftf0
else:
    ft=ftQ 
print "GBP >=",round(ft*10**(-6),2),"MHz"
Designed Biquad Filter : 
R1 = R2 = R5 = R6 = 10.0 kilo ohm
R3 = R4 = 250.0 kilo ohm
C1 = C2 = 1.5915 nF
GBP >= 100.0 MHz

Example 6.10, Page 288

In [9]:
import math
import numpy as np

#Variable Declaration

f0=10*10**3          #Hz
Q=25.0
HobpdB=0              #dB

#Calculation

R1=10*10**3         #Assumption
R2=R5=R6=R1         #Assumption
R3=250*10**3        #Assumption
R4=R3               #Assumption
C1=1.0/(2*np.pi*f0*R5)       #Assumption
C2=C1                        #Assumption
f0reler=0.01                 #as relative error defined for f0=1% 
Qreler=0.01 
ftf0=f0/f0reler
ftQ=(4*Q*f0)/Qreler
ft=1*10**6
#Changing the component values using Phase Compensation 
ch=f0/ft
C1new=C1-(C1*ch)
C1new=C1new-(.01*C1new)
C2new=C1new

#answer

print "b)Designed Biquad Filter : "
print "  R1 = R2 = R5 = R6 =",round(R1*10**(-3),3),"kilo ohm"
print "  R3 = R4 =",round(R3*10**(-3),4),"kilo ohm"
print "  C1 = C2 =",round(C1new*10**(9),4),"nF"
b)Designed Biquad Filter : 
  R1 = R2 = R5 = R6 = 10.0 kilo ohm
  R3 = R4 = 250.0 kilo ohm
  C1 = C2 = 1.5756 nF

Example 6.11, Page 290

In [10]:
import math
import numpy as np

#Variable declaration

C=(5.0/np.pi)*10**(-9)        #F
R1=10*10**3                   # ohm
R2=30*10**3                   # ohm
GBP=1*10**6                   # Hz

#Calculation

Hreler=0.01          #Departure of H from ideal
ft=1*10**6
fx=ft/(1+(R2/R1))
fmax=math.sqrt(1.0/((1-Hreler)**2) -1)*fx
f0=1.0/(2*np.pi*R1*C)
fmin3dB=math.sqrt(1.0/((1.0/(f0**2)) -(1.0/(fx**2)) -(1.0/((f0**2)*(fx**2)) )))
f3dBer=((fmin3dB -f0)/fmin3dB)*100

#answer

print "Percentage Deviation of cut off frequency =",round(f3dBer*2,2),"%"
Percentage Deviation of cut off frequency = 0.16 %

Example 6.12, Page 291

In [11]:
import math
import numpy as np

#Variable Declaration

C=10*10**(-9)        #F
H0bpdB=0             # dB
f0=10*10**3          # Hz
Q=10.0

#Calculation

H0bp=10**(H0bpdB/20)
R1=Q/(2*np.pi*f0*C*H0bp)
R2=(float(R1)/((2*(Q**2))/(H0bp)))-1
R3=(2*Q)/(2*np.pi*f0*C)
BW=f0/Q
BWer=0.01               #BW deviation from i t s design value is 1% 
GBPmin=(2*Q*f0)/BWer

#answer

print "Components for the mentioned cir cui t : "
print "R1 =",round(R1*10**(-3),2),"kilo ohm"
print "R2 =",round(R2,2),"ohm"               #answer in book is wrong
print "R3 =",round(R3*10**(-3),2),"kilo ohm"
print "GBP >=",round(GBPmin*10**(-6),2),"MHz"
Components for the mentioned cir cui t : 
R1 = 15.92 kilo ohm
R2 = 78.58 ohm
R3 = 31.83 kilo ohm
GBP >= 20.0 MHz

Example 6.14, Page 295

In [12]:
import math
import numpy as np

#Variable Declaration

zo=0.71*10**6            #V/A
Req=zo
fb=350*10**3             #Hz

#Calculation

Ceq=1.0/(2*np.pi*Req*fb)
vo=5
iN=vo/Req

#answer

print "Ceq =",round(Ceq*10**12,2),"pF"
print "iN =",round(iN*10**6,2),"micro ampere"
Ceq = 0.64 pF
iN = 7.04 micro ampere

Example 6.15, Page 298

In [13]:
import math 
import numpy as np

#Variable Declaration

ft=100*10**6             # Hz
brec=1.5*10**3           # V/A
R2=1.5*10**3             # ohm
rn=50.0                  # 50
A01=1.0                  # V/V
A02=10.0                 # V/V
A03=100.0                # V/V

#Calculation

#R11=R2/(A01−1) −>R1=infinity 
R12=R2/(A02 -1)
R13=R2/(A03 -1)
fB1=ft/(1+(A01/30))
fB2=ft/(1+(A02/30))
fB3=ft/(1+(A03/30))
tR1=2.2/(2*np.pi*fB1)
tR2=2.2/(2*np.pi*fB2)
tR3=2.2/(2*np.pi*fB3)

#answer

print "Values of R1, fB and tR for A0=1 : "
print "  R1=infinity"
print "  fB =",round(fB1*10**(-6),1),"MHz"
print "  tr =",round(tR1*10**9,1),"ns"
print "Values of R1, fB and tR for A0=10 : "
print "  R1 =",round(R12,1),"ohm"
print "  fB =",round(fB2*10**(-6)),"MHz"
print "  tr =",round(tR2*10**9,1),"ns"
print "Values of R1, fB and tR for A0=100 : "
print "  R1 =",round(R13,2),"ohm"
print "  fB =",round(fB3*10**(-6),1),"MHz"
print "  tr =",round(tR3*10**9,1),"ns"
Values of R1, fB and tR for A0=1 : 
  R1=infinity
  fB = 96.8 MHz
  tr = 3.6 ns
Values of R1, fB and tR for A0=10 : 
  R1 = 166.7 ohm
  fB = 75.0 MHz
  tr = 4.7 ns
Values of R1, fB and tR for A0=100 : 
  R1 = 15.15 ohm
  fB = 23.1 MHz
  tr = 15.2 ns

Example 6.16, Page 299

In [14]:
import math
import numpy as np

#Variable Declaration

A0=10.0          # V/V  
fB=100*10**6       # Hz
brec=1.5*10**3      # V/A
rn=50.0             # ohm

#Calculation

R2=brec -(rn*A0)
R1=R2/(A0-1)
z0=0.75*10**6
T0=(1.0/brec)*z0
epsilon=-100.0/T0

#answer

print "Redisigned Current Feedback Amplifier of Example 6.15 : "
print "R1 =",round(R1),"ohm"
print "R2 =",round(R2*10**(-3)),"kilo ohm"
print "Percentage dc gain error =",round(epsilon,2),"%"
Redisigned Current Feedback Amplifier of Example 6.15 : 
R1 = 111.0 ohm
R2 = 1.0 kilo ohm
Percentage dc gain error = -0.2 %