Chapter 6 Operational Amplifiers

Exa 6.1 page No 355

In [1]:
from __future__ import division
# Given data
CMRR = 10**5
Ad = 10**5
# CMRR = Ad/A_CM
# The common mode gain of the op-amp 
A_CM = Ad/CMRR
print "The common mode gain of the op-amp = %.2f"%A_CM
The common mode gain of the op-amp = 1.00

Exa 6.2 page No 355

In [2]:
from __future__ import division
# Given data
del_V = 20##change = %.2f voltage = %.2f V
del_t = 4##change = %.2f time = %.2f µS
SR = del_V/del_t##slew rate = %.2f V/µS
print "The slew rate = %.2f V/µS"%SR
The slew rate = 5.00 V/µS

Exa 6.3 page No 355

In [3]:
from __future__ import division
# Given data
del_V = 0.75##chagne = %.2f voltage = %.2f V
del_t = 50##change = %.2f time = %.2f ns
# The slew rate 
SR = del_V/(del_t*10**-3)# µs
print "The slew rate = %.2f V/µ-sec"%SR
The slew rate = 15.00 V/µ-sec

Exa 6.4 page No 356

In [4]:
from __future__ import division
# Given data
R1 = 1# k ohm
R_F = 4.7# k ohm
#The closed loop voltage gain, Ao = Vo/Vin = -R_F/R1
Ao = -R_F/R1
print "The closed loop voltage gain = %.2f"%Ao
# The input impedance 
Ri = R1# k ohm
print "The input impedance = %.2f k ohm"%Ri
The closed loop voltage gain = -4.70
The input impedance = 1.00 k ohm

Exa 6.5 page No 357

In [5]:
from __future__ import division
# Given data
Ao = -20
Ri = 5# k ohm
R1 = Ri# k ohm
print "The value of R1 = %.2f k ohm"%R1
# Closed loop voltage gain for inverting amplifier, Ao = -R_F/R1 or
R_F = -Ao*R1# k ohm
print "The value of R_F = %.2f k ohm"%R_F
The value of R1 = 5.00 k ohm
The value of R_F = 100.00 k ohm

Exa 6.6 page No 357

In [6]:
from __future__ import division
# Given data
R1 = 20# k ohm
R_F = 300# k ohm
Vin = 1.25# V
# Ao = Vo/Vin = -R_F/R1
Ao = -R_F/R1
# Output voltage,
Vo = Ao*Vin# V
print "The output voltage = %.2f V"%Vo
The output voltage = -18.75 V

Exa 6.7 page No 358

In [7]:
from __future__ import division
# Given data
Ao = -4# V/V
R_T= 100## total resistance = %.2f k ohm
# R1+R_F= R_T          (i)
# Ao= -R_F/R1             (ii)
R_F= R_T/(1-1/Ao)# k ohm           (From eq (i) and (ii))
R1= -R_F/Ao# k ohm
print "The value of R1 = %.2f k ohm"%R1
print "The value of R_F = %.2f k ohm"%R_F
The value of R1 = 20.00 k ohm
The value of R_F = 80.00 k ohm

Exa 6.8 page No 359

In [8]:
from __future__ import division
# Given data
R1 = 15# k ohm
R_F = 450# k ohm
Vin = -0.25# V
# Vo = Ao*Vin
Vo = (1+R_F/R1)*abs(Vin)# V    (on putting, Ao = 1+(R_F/R1))
print "The output voltage = %.2f V"%Vo
The output voltage = 7.75 V

Exa 6.9 page No 360

In [10]:
from __future__ import division
# Given data
Ao = 1.5# V/V
R = 10# k ohm
# Ao = (1+(R_F/R1))
print "The relation of R1 and R_F can be implemented in two ways : "
print "(i) : When R_F= R || R, in this condition"
# When R_F= R || R
R1= R##in k ohm
R_F= R1*(Ao-1)# k ohm
print "The value of R1 = %.2f k ohm"%R1
print "The value of R_F = %.2f k ohm"%R_F
# When both resistor connected = %.2f series
print "(ii) : When both resistor connected in series, in this condition"
R1= 2*R# k ohm
R_F= R1*(Ao-1)# k ohm
print "The value of R1 = %.2f k ohm"%R1
print "The value of R_F = %.2f k ohm"%R_F
The relation of R1 and R_F can be implemented in two ways : 
(i) : When R_F= R || R, in this condition
The value of R1 = 10.00 k ohm
The value of R_F = 5.00 k ohm
(ii) : When both resistor connected in series, in this condition
The value of R1 = 20.00 k ohm
The value of R_F = 10.00 k ohm

Exa 6.10 page No 361

In [11]:
from __future__ import division
# Given data
Ao = 10
# Ao = (1+(R_F/R1))
#Given that maximum value of resistor should not exceed 30 kΩ, so we select
R_F= 27# k ohm
R1= R_F/(Ao-1)# k ohm
print "The value of R_F = %.2f k ohm"%R_F
print "The value of R1 = %.2f k ohm"%R1
The value of R_F = 27.00 k ohm
The value of R1 = 3.00 k ohm

Exa 6.11 page No 363

In [12]:
from __future__ import division
# Given data
Va = 0.2# V
Vb = -0.5# V
Vc = 0.8# V
Ra = 33# k ohm
Rb = 22#  k ohm
Rc = 11#  k ohm
R_F = 66# k ohm
# Using Superposition theorm, the output voltage
Vo = (-((R_F/Ra)*Va)) -(((R_F/Rb)*Vb)) -(((R_F/Rc)*Vc))# V
print "The output voltage = %.2f V"%Vo
The output voltage = -3.70 V

Exa 6.13 page No 364

In [13]:
from __future__ import division
# Given data
Va = 6# V
Vb = -3# V
Vc = -0.75# V
Ra = 10# k ohm
Rb = 2.5# k ohm
Rc = 4# k ohm
R_F = 10# k ohm
# The output voltage 
Vo = (-((R_F/Ra)*Va)) -(((R_F/Rb)*Vb)) -(((R_F/Rc)*Vc))# V
print "The output voltage = %.2f V"%Vo
The output voltage = 7.88 V

Exa 6.14 page No 365

In [14]:
from __future__ import division
# Given data
R1 = 100# ohm
R2 = R1# ohm
R3 = 3.9# k ohm
R3 = R3 * 10**3# ohm
R_F = R3# ohm
Vx = -3.2# V
Vy = -3# V
# output voltage due to Vx, Vox = -(R_F/R1)*Vx and due to Vy, Voy = (R3/(R2+R3)) * (1+(R_F/R1))*Vy
# Vo = Vox + Voy =  -(R_F/R1)*Vx + (R_F/R1)*Vy   (as R1=R2 and R3=Rf)
#So, Aod = Vo/(Vx-Vy) = -R_F/R1
Aod = -R_F/R1
print "The closed loop differential gain = %.2f"%Aod
Vo = (-R_F/R1)*(Vx-Vy)# V
print "The output voltage = %.2f V"%Vo
The closed loop differential gain = -39.00
The output voltage = 7.80 V

Exa Misc. 6.1 page No 366

In [15]:
# Given data
Vid = 1# mV
Vo = 120# mV
V_CM = 1# mV
Ad = Vo/Vid
Vo = 20# µV
Vo = Vo * 10**-3# mV
A_CM = Vo/V_CM
Vo = 120# mV
# The value of CMRR for the circuit 
CMRR = Vo/A_CM
print "The value of CMRR for the circuit = %.2f"%CMRR
The value of CMRR for the circuit = 6000.00

Exa Misc. 6.2 page No 366

In [16]:
from __future__ import division
# Given data
R1 = 10# k ohm
R_F = 1000# k ohm
# Vin/R1 = -Vo/R_F and Vo/Vin = Ao = -R_F/R1
Ao = abs(-R_F/R1)# k ohm
print "The closed loop gain = %.2f"%Ao
Vin = 30# mV
Vin = Vin  * 10**-3# V
# The output voltage,
Vo =-Ao*Vin# V
print "The output voltage = %.2f V"%Vo

# Note: The loop gain will be unit less.
The closed loop gain = 100.00
The output voltage = -3.00 V

Exa Misc. 6.3 page No 367

In [17]:
from __future__ import division
# Given data
R1min = 10# k ohm
R1max = 20# k ohm
R_F = 300# k ohm
# The closed loop voltage gain corresponding to R1min,
Ao_min = -R_F/R1min
# The closed loop voltage gain corresponding to R1max,
Ao_max = -R_F/R1max
print "The range of voltage gain is : %.2f to %.2f"%(Ao_max,Ao_min)
The range of voltage gain is : -15.00 to -30.00

Exa Misc. 6.4 page No 368

In [18]:
from __future__ import division
# Given data
R_F = 500# k ohm
R_desh = 20# k ohm
Vin = 0.5# V
Rd_desh = 0
R1min = 20# k ohm
R1max = 50# k ohm
# Ao = Vo/Vin = (1+(R_F/R1))
Vo_max = Vin*(1+(R_F/R1min))## output voltage corresponding to R1min
Vo_min = Vin*(1+(R_F/R1max))## output voltage corresponding to R1max
print "Range of output voltage is : %.2f V to %.2f V"%(Vo_min,Vo_max)
Range of output voltage is : 5.50 V to 13.00 V

Exa Misc. 6.5 page No 369

In [19]:
from __future__ import division
# Given data
R1 = 2# k ohm
Rdas = 2# k ohm
R_Fmin = 2# k ohm
R_Fmax = 102# k ohm
# Ao = -R_F/R1
# The minimum closed loop voltage gain 
Aomin = -R_Fmin/R1
print "The minimum closed loop voltage gain = %.2f"%Aomin
#The maximum closed loop voltage gain 
Aomax = -R_Fmax/R1
print "The maximum closed loop voltage gain = %.2d"%Aomax
The minimum closed loop voltage gain = -1.00
The maximum closed loop voltage gain = -51

Exa Misc. 6.6 page No 371

In [20]:
from __future__ import division
# Given data
R1 = 10# k ohm
R_F = 0
# Ao = (1+(R_F/R1))
# The minimum closed loop voltage gain 
Aomin = (1+(R_F/R1))
print "The minimum closed loop voltage gain = %.2f"%Aomin
R_F = 100# k ohm
# The maximum closed loop voltage gain 
Aomax = (1+(R_F/R1))
print "The maximum closed loop voltage gain = %.2f"%Aomax
The minimum closed loop voltage gain = 1.00
The maximum closed loop voltage gain = 11.00

Exa Misc. 6.7 page No 372

In [21]:
from __future__ import division
# Given data
R1 = 220# ohm
R_F = 47# k ohm
R_F =R_F * 10**3# ohm
# The closed loop voltage for switch position-1
Ao = -R_F/R1
print "The closed loop voltage for switch position-1 = %.2f"%Ao
R_F = 18# k ohm
R_F = R_F * 10**3# ohm
# The closed loop voltage for switch position-2
Ao = -R_F/R1
print "The closed loop voltage for switch position-2 = %.2f"%Ao
R_F = 39# k ohm
R_F = R_F * 10**3# ohm
# The closed loop voltage for switch position-3
Ao = -R_F/R1
print "The closed loop voltage for switch position-3 = %.2f"%Ao
The closed loop voltage for switch position-1 = -213.64
The closed loop voltage for switch position-2 = -81.82
The closed loop voltage for switch position-3 = -177.27

Exa Misc. 6.8 page No 373

In [22]:
from __future__ import division
# Given data
R_F = 120# k ohm
Rdas1 = 6# k ohm
Rddas1 = 3# k ohm
R1 = Rdas1# k ohm
# For switch position-1 , the closed loop voltage gain,
Ao = 1+(R_F/R1)
print "The closed loop voltage gain for switch position-1 is : %.2f"%Ao
R1 = (Rdas1*Rddas1)/(Rdas1+Rddas1)# k ohm
# For switch position-2, the closed loop voltage gain, 
Ao = 1+(R_F/R1)
print "The closed loop voltage gain for switch position-2 is : %.2f"%Ao
The closed loop voltage gain for switch position-1 is : 21.00
The closed loop voltage gain for switch position-2 is : 61.00

Exa Misc. 6.9 page No 374

In [27]:
from __future__ import division
# Given data
R_F = 20# k ohm
R1 = 20# k ohm
R2 = 10# k ohm
Vin1 = 2# V
Vin2 = 1# V
# The output voltage, by using super position theorm
Vo = ((-R_F/R1)*Vin1) + ((1+(R_F/R1))*Vin2)
print "The output voltage = %.f V"%Vo
The output voltage = 0 V

Exa Misc. 6.10 page No 375

In [28]:
from __future__ import division
# Given data
R_F = 60# ko hm
R1 = 20# k ohm
Vin1 = 2# V
Vin2 = 0.1# V
# The output voltage, by using super position theorm,
Vo = ((-R_F/R1)*Vin1) + ((1+(R_F/R1))*Vin2)# V
print "The output voltage = %.2f V"%Vo
The output voltage = -5.60 V

Exa Misc. 6.11 page No 375

In [30]:
from __future__ import division
# Given data
R1 = 10# k ohm
R2 = 20# k ohm
R3 = 10# k ohm
R_F = 20# k ohm
Vin1 = 2# V
Vin2 = 1# V
# The output voltage,
Vo = ((-R_F/R1)*Vin1) - ((R_F/R2)*Vin2)# V
print "The output voltage = %.2f V"%Vo
The output voltage = -5.00 V

Exa Misc. 6.12 page No 376

In [31]:
from __future__ import division
# Given data
R_F = 20# k ohm
R1 = 10# k ohm
R2 = 20# k ohm
Vin1 = 2# V
Vin2 = 2# V
Vin3 = 2# V
# The output voltage, by using super position theorm,
Vo = ((-R_F/R1)*Vin1) + (-Vin2*R_F/R2+Vin2) + ((R_F/(((R1*R2)/(R1+R2))))*Vin3)# V
print "The voltage is appeared at the output terminal = %.2f V"%Vo
The voltage is appeared at the output terminal = 2.00 V

Exa Misc. 6.13 page No 377

In [32]:
from __future__ import division
# Given data
R1 = 20# k ohm
R3 = 10# k ohm
R2 = R3# k ohm
R_F = 20# k ohm
Vin1 = 2# V
Vin2 = 2.1# V
# The input voltage at non-inverting terminal,
V_A = (R2*Vin2)/R1# V
# The output voltage, by using super position theorm,
Vo = ((-R_F/R1)*Vin1) + ((1+(R_F/R1))*(R1/(R2+R3))*V_A)# V
print "The output voltage = %.2f V"%Vo
The output voltage = 0.10 V

Exa Misc. 6.15 page No 379

In [33]:
from __future__ import division
# Given data
#Output voltage of the amplifier, Vo = (1+(Rf/Rin))*Vin and voltage gain, Av = Vo/Vin = 1+(Rf/Rin)
Rf = 0
Rin = 2# k ohm
Avmin = 1+(Rf/Rin)
Rf = 100# k ohm
# The maximum loop voltage gain 
Avmax = 1+(Rf/Rin)
print "The maximum loop voltage gain = %.2f"%Avmax
The maximum loop voltage gain = 51.00

Exa Misc. 6.18 page No 383

In [35]:
from __future__ import division
# Given data
Ad = 5*10**5## differential mode gain
CMRR = 80# dB
A_CM = Ad/(10**(CMRR/20))## common mode gain
V1 = 745# µV
V1 = V1 * 10**-6# V
V2 = 740# µV
V2 = V2 * 10**-6# V
# CMRR = 20*log( Ad/A_CM )
# #output voltage = %.2f differential mode gain
Vod = Ad*(V1-V2)# V
print "The output voltage in differential mode gain = %.2f volts"%Vod
#output voltage due to common mode gain 
Vo_CM = A_CM*((V1+V2)/2)##in V
print "The output voltage due to common mode gain = %.2f volts"%Vo_CM
Pr = (Vo_CM/Vod)*100## percentage error = %.2f %
print "The percentage error due to common mode = %.2f %%"%Pr
The output voltage in differential mode gain = 2.50 volts
The output voltage due to common mode gain = 0.04 volts
The percentage error due to common mode = 1.48 %

Exa Misc. 6.19 page No 384

In [38]:
from __future__ import division
# Given data
R1 = 1# Mohm
# The input impedance 
Rin = R1# Mohm
print "The input impedance = %.2f Mohm"%Rin
R2 = 1# Mohm
# The voltage gain 
Avf = -R2/R1## Voltage gain
print "The voltage gain = %.2f"%Avf
The input impedance = 1.00 Mohm
The voltage gain = -1.00

Exa Misc. 6.21 page No 386

In [39]:
from __future__ import division
# Given data
i1 = 1##input current for first op-amp = %.2f mA
i1 = i1 * 10**-3# A
R_F = 1# k ohm
R_F = R_F * 10**3# ohm
# Output voltage at first op-amp stage
Vo = -i1*R_F# V
R1 = 10# k ohm
R2 = 1# k ohm
# The output voltage,
Vg1 = Vo*(1+(R1/R2))# V
print "The output volatge = %.2f V"%Vg1
The output volatge = -11.00 V

Exa Misc. 6.22 page No 386

In [40]:
from __future__ import division
# Given data
R_S3 = 10# k ohm
R_S2 = R_S3# k ohm
R_S1 = R_S3# k ohm
Rf = 10# k ohm
Vs1 = 0.2# V
Vs2 = 0.5# V
Vs3 = 0.8# V
# I = I1+6I2+I3
# I = (Vs1/R_S1) + (Vs2/R_S2) + (Vs3/R_S3)
# I = - If
# Vo = -If*Rf
Vo = (Rf/R_S1)*(Vs1+Vs2+Vs3)# V  (as R_S1= R_S2=R_S3)
print "The value of Vo = %.2f volts"%Vo
print "But the supply voltage of 10 V is used, so the op-amp will reach = %.2f saturation."
print "Hence, output voltage is -10 volts."
The value of Vo = 1.50 volts
But the supply voltage of 10 V is used, so the op-amp will reach = %.2f saturation.
Hence, output voltage is -10 volts.

Exa Misc. 6.25 page No 388

In [41]:
from __future__ import division
# Given data
#Ratio of R2/R1 =  R3/R4 = 4 and R_L = -Vi/R3
Vi = 3.7# V
R3 = 2# k ohm
R3 = R3 * 10**3# ohm
# The current through R_L,
I_L = -Vi/R3# A
I_L= I_L*10**3# mA
print "The current through R_L = %.2f mA"%I_L
The current through R_L = -1.85 mA