# Chapter- 2 : Introduction To Operational Amplifiers¶

## Example : 2.2 - Page No 70¶

In :
# Given data
Vin1= 5 # in µV
Vin1= Vin1*10**-6 # in V
Vin2= -7 #in µV
Vin2= Vin2*10**-6 # in V
Av= 2*10**5 # unit less
Rin= 2 # in MΩ
Vout= (Vin1-Vin2)*Av # in V
print "The output voltage = %0.1f volts" %Vout

The output voltage = 2.4 volts


## Example : 2.4 - Page No 71¶

In :
from __future__ import division
# Given data
Rs= 2 # in kΩ
RL= 5 # in kΩ
A= 10**5 # unit less
Rin= 100 #in kΩ
Rout= 50 # in Ω
Vout= 10 # in V
# For Vout = 10 V, V1= V2 = Vout
V1= Vout # in V
V2= V1 # in V
# From equation V1= Vs*Rin/(Rin+Rs)
Vs= V1*(Rin+Rs)/Rin # in V
Vout_by_Vs= Vout/Vs # value of Vout/Vs
print "The value of Vs =%0.1f volts" %Vs
print "The value of Vout/Vs = %0.2f" %Vout_by_Vs
print "The input resistance of the circuit = %0.f kΩ" %Rin

The value of Vs =10.2 volts
The value of Vout/Vs = 0.98
The input resistance of the circuit = 100 kΩ


## Example : 2.6 - Page No 74¶

In :
import math
# Given data
Ad= 100 # differential mode gain
Acm= 0.01 # common mode gain
CMRR_desh= 20*math.log(CMRR,10) # CMRR in dB
print "CMRR = %0.f dB" %CMRR_desh

CMRR = 80 dB


## Example : 2.7 - Page No 74¶

In :
# Given data
Ad= 10**5 # differential mode gain
CMRR= 10**5
# Common-mode gain,
print "The common-mode gain = %0.f" %Acm

The common-mode gain = 1


## Example : 2.8 - Page No 74¶

In :
# Given data
V1= 10 # in mV
V2= 9 # in mV
Ad= 60 # differential voltage gain in dB
CMRR= 80 # in dB
CMRR= 10**(CMRR/20)
Vd= V1-V2 # difference signal in mV
Vcm= (V1+V2)/2 # common-mode signal in mV
# Output voltage,
# Error voltage
Per_error= Verror/Vout*100 # percentage error
print "The error voltage = %0.2f mV" %Verror
print "The percentage error in the output voltage = %0.3f " %Per_error

The error voltage = 0.95 mV
The percentage error in the output voltage = 0.095


## Example : 2.9 - Page No 74¶

In :
# Given data
V1= 745 # in µV
V2= 740 # in µV
Ad= 5*10**5 # differential voltage gain
CMRR= 80 # in dB
CMRR= 10**(CMRR/20)
Vd= V1-V2 # difference signal in µV
Vcm= (V1+V2)/2 # common-mode signal in µV
# Output voltage,
# Error voltage
Vout= Vout*10**-6 # in V
Verror= Verror*10**-6 # in V
Per_error= Verror/Vout*100 # percentage error
print "The output voltage = %0.6f V" %Vout
print "The percentage error in the output voltage= %0.4f" %Per_error

The output voltage = 2.537125 V
The percentage error in the output voltage= 1.4633


## Example : 2.10 - Page No 76¶

In :
# Given data
Vd= 25 #differential input voltage in µV
Vd= Vd*10**-6 # in V
A= 200000 # open loop gain
# Output voltage,
Vout= A*Vd # in V
print "The output voltage = ± %0.f " %Vout

The output voltage = ± 5


## Example : 2.11 - Page 83¶

In :
# Given data
dVout= 20 # change in output voltage in V
dt= 4 # change in time in µs
SR= dVout/dt # slew rate in V/µs
print "The slew rate = %0.f V/µs" %SR

The slew rate = 5 V/µs


## Example : 2.12 - Page No 83¶

In :
# Given data
IB1= 10 # in µA
IB2= 7.5 # in µA
# Input bias current,
I_in_bias= (IB1+IB2)/2 # in µA
# Input offset current,
I_in_offset= IB1-IB2 # in µA
print "The input bias current = %0.2f µA" %I_in_bias
print "The input offset current = %0.1f µA" %I_in_offset

The input bias current = 8.75 µA
The input offset current = 2.5 µA


## Example : 2.13 - Page No 83¶

In :
from numpy import pi
# Given data
SR= 6 # slew rate in V/µs
SR= 6*10**6 # in V/s

# Part (i) For Vmax= 1V
Vmax= 1 # in V
fmax= SR/(2*pi*Vmax) # limiting frequency in Hz
fmax= fmax*10**-6 # in MHz
print "Part (i) : The limiting frequency for maximum voltage of 1V = %0.3f MHz" %fmax

# Part (ii) For Vmax= 10V
Vmax= 10 # in V
fmax= SR/(2*pi*Vmax) # limiting frequency in Hz
fmax= fmax*10**-3 # in kHz
print "Part (ii) : The limiting frequency for maximum voltage of 10V = %0.1f kHz"%fmax

Part (i) : The limiting frequency for maximum voltage of 1V = 0.955 MHz
Part (ii) : The limiting frequency for maximum voltage of 10V = 95.5 kHz


## Example : 2.14 - Page No 84¶

In :
# Given data
Vpp= 3 # output voltage in V
del_t= 4 # in µs
del_V= 90*Vpp/100-10*Vpp/100 # in V
# Required slew rate,
SR= del_V/del_t # in V/µs
print "The required slew rate = %0.1f V/µs" %SR

The required slew rate = 0.6 V/µs