# Chapter 10 - Operational Amplifier¶

## Example E1 - Pg 490¶

In [2]:
#Ex10_1 Pg-490
#calculate Common moce voltage gain,Output voltage
Rc=1.*10.**(6.) #collector resisstor in ohm
Re=2.*10.**(6.) #emitter resistor in ohm
Vin=1.*10.**(-3.) #input voltage in V
Acm=Rc/Re #Common moce voltage gain
print '%s %.1f' %("Common moce voltage gain =",Acm)
Vo=Acm*Vin #output voltage
print '%s %.1f' %("Output voltage = mV",Vo*1e3)
print '%s' %("Thus a differential amplifier in common mode attenuates the input signal rather than amplifying it")

Common moce voltage gain = 0.5
Output voltage = mV 0.5
Thus a differential amplifier in common mode attenuates the input signal rather than amplifying it


## Example E2 - Pg 491¶

In [1]:
#Ex10_2 Pg-491
#calculate Amplified output voltage,Attenuated output voltage
A=150. #voltage gain
Acm=0.5 #common mode voltage gain
Vin=1.*10.**(-3.) #input voltage in V
Vo=A*Vin #output voltage
print '%s %.2f' %("Amplified output voltage = V",Vo)
Vo=Acm*Vin #output voltage
print '%s %.1f' %("Attenuated output voltage = mV",Vo*1e3)

Amplified output voltage = V 0.15
Attenuated output voltage = mV 0.5


## Example E3 - Pg 517¶

In [3]:
#Ex10_3 Pg-517
#calculate Amplified output voltage
R1=10.*10.**(3.) #resistor R1 in ohm
Rf=50.*10.**(3.) #feedback resistor in ohm
Vin=10.*10.**(-3.) #input voltage in V
Ro=5000. #load resistor in ohm
print '%s' %("A'' = Vo/Vi = (-1)*Rf/R1*(1+1/A*(1+Rf/R1))**-1 ")
A=5000.
Vo=Vin*(Rf/R1)/(1+1/A*(1+Rf/R1)) #output voltage
print '%s %.0f' %("\n When gain A =",A)
print '%s %.1f' %(" \n Amplified output voltage = mV",Vo*1e3)
A=10000.
Vo=Vin*(Rf/R1)/(1+1/A*(1+Rf/R1))
print '%s %.0f' %("\n When gain A=%.0f",A)
print '%s %.2f' %(" \n Amplified output voltage = mV",Vo*1e3)
A=5000.
Rout=Ro/(1.+A*R1/Rf) #load resistance
print '%s %.3f' %(" \n Ro = ohm",Rout)
A=10000.
Rout=Ro/(1.+A*R1/Rf) #load resistance
print'%s %.3f' %("\nRo = ohm",Rout)

A'' = Vo/Vi = (-1)*Rf/R1*(1+1/A*(1+Rf/R1))**-1

When gain A = 5000

Amplified output voltage = mV 49.9

When gain A=%.0f 10000

Amplified output voltage = mV 49.97

Ro = ohm 4.995

Ro = ohm 2.499


## Example E4 - Pg 518¶

In [4]:
#Ex10_4 Pg-518
#calculate Magnitude of Closed loop gain,Closed loop frequency,Output voltage
R1=1.5*10.**(3.) #resistor R1 in ohm
Rf=75.*10.**(3.) #feedback resistor in ohm
Vin=10.*10.**(-3.) #input voltage in V
funi=1.*10.**(6.) #unity frequency in Hz
Acl=(-1.)*Rf/R1 #closed loop gain
print '%s %.0f' %("Magnitude of Closed loop gain =",abs(Acl))
fcl=funi/abs(Acl) #closed loop frequency
print '%s %.0f' %("Closed loop frequency = kHz",fcl*1e-3)
Vout=abs(Acl)*Vin #output voltage
print '%s %.1f' %("Output voltage = mV pp",Vout*1e3)

Magnitude of Closed loop gain = 50
Closed loop frequency = kHz 20
Output voltage = mV pp 500.0


## Example E5 - Pg 518¶

In [5]:
#Ex10_5 Pg-518
#calculate When resistor 100 k-ohm is in zero position & maximum position
R1=2.*10.**(3.) #resistor R1 in ohm
Rf=0 #feedback resistor in ohm
print '%s' %("(1) When resistor 100 k-ohm is in zero position")
A=1+Rf/R1 #gain
print '%s %.0f' %("Gain =",A)
Rf=100.*10.**(3.)
print '%s' %("\n(2)When resistor 100 k-ohm is in maximum position")
A=1.+Rf/R1 #gain
print '%s %.0f' %("Gain =",A)

(1) When resistor 100 k-ohm is in zero position
Gain = 1

(2)When resistor 100 k-ohm is in maximum position
Gain = 51


## Example E6 - Pg 519¶

In [6]:
#Ex10_6 Pg-519
#calculate voltage gain,Amplified output voltage
R1=50.*10.**(3.) #resistor R1 in ohm
Rf=300.*10.**(3.) #feedback resistor in ohm
Vin=1. #input voltage in V
print '%s' %("In the inverting mode,voltage gain is ")
print '%s' %("A'' = Vo/Vi = (-1)*Rf/R1*(1+1/A*(1+Rf/R1))**-1 ")
A=10000.
Vo=(-1.)*Vin*(Rf/R1)/(1.+1./A*(1.+Rf/R1)) #output voltage
print '%s %.3f' %("\nAmplified output voltage = V",Vo)

In the inverting mode,voltage gain is
A'' = Vo/Vi = (-1)*Rf/R1*(1+1/A*(1+Rf/R1))**-1

Amplified output voltage = V -5.996


## Example E7 - Pg 519¶

In [7]:
#Ex10_7 Pg-519
#calculate Power Bandwidth
import math
Sr=15./1e-6 #slew rate in V/sec
Vp=10. #peak output voltage
fmax=Sr/(2.*math.pi*Vp) #Power Bandwidth
print '%s %.3f' %("Power Bandwidth = kHz",fmax*1e-3)

Power Bandwidth = kHz 238.732


## Example E8 - Pg 519¶

In [8]:
#Ex10_8 Pg-519
#calculate Input resistance and Output resistance of buffer circuit
A=5000. #voltage gain
Ri=10000. #input resistor in ohm
Ro=100. #load resistor in ohm
Rf=0 #feedback resistor in ohm
Rin=A*Ri/(1+Rf/Ri) #input resistance of buffer circuit
print '%s %.0f' %("Input resistance of buffer circuit = *1e7 ohm",Rin*1e-7)
Rout=Ro/A*(1.+Rf/Ri) #output resistance of buffer circuit
print '%s %.2f' %("Output resistance of buffer circuit = ohm",Rout)

Input resistance of buffer circuit = *1e7 ohm 5
Output resistance of buffer circuit = ohm 0.02