Vout=13.5 #As per figure 18-7b(V)
Aov=100000 #open loop voltage gain
V2=Vout/Aov #required input voltage(V)
print 'Required input voltage V2 = ',V2*10**6,'uV'
CMRR_dB=40 #As per figure 18-7a at 100KHz(dB)
CMRR=10**(CMRR_dB/20)
print 'Common-mode rejection ratio = ',CMRR
Av1=1000 #Voltage gain as per figure 18-7c for 1KHZ
Av10=100 #Voltage gain as per figure 18-7c for 10KHZ
Av100=10 #Voltage gain as per figure 18-7c for 100KHZ
print 'Voltage gain for 1KHZ = ',Av1
print 'Voltage gain for 1KHZ = ',Av10
print 'Voltage gain for 1KHZ = ',Av100
Vout=0.25 #output changes in 0.1us (V)
t=0.1 #time for output change(us)
SR=Vout/t #slew rate(V/us)
print 'Slew rate SR = ',SR,'V/us'
import math
SR=15 #slew rate(V/us)
Vp=10 #Peak output voltage(V)
fmax=1000*SR/(2*math.pi*Vp) #power bandwidth (KHz)
print 'Power bandwidth = ',round(fmax),'KHz'
import math
SR1=0.5 #Slew rate1(V/us)
SR2=5 #Slew rate2(V/us)
SR3=50 #Slew rate3(V/us)
Vp=8 #peak voltage(V)
fmax1=1000*SR1/(2*math.pi*Vp) #power bandwidth1 (KHz)
fmax2=1000*SR2/(2*math.pi*Vp) #power bandwidth2 (KHz)
fmax3=SR3/(2*3*math.pi*Vp) #power bandwidth3 (MHz)
print 'Power bandwidth1 = ',math.ceil(fmax1),'KHz'
print 'Power bandwidth2 = ',math.ceil(fmax2),'KHz'
print 'Power bandwidth3 = ',math.ceil(fmax3),'MHz'
Vin=10 #input voltage(mV)
Rf=75 #feedback path resistance Rf (KOhm)
R1=1.5 #inverting input resistance R1(KOhm)
Funity=1 #Funity (MHz)
Av_CL=-Rf/R1 #closed loop voltage gain
f2_CL1=Funity/-Av_CL #closed loop bandwidth1(KHz)
Vout1=Av_CL*Vin #output voltage1(mV)
Vout2=-Vin #output voltage2(mV)
print 'Output voltage for 1KHz = ',Vout1,'mVpp'
print 'Output voltage for 1MHz = ',Vout2,'mVpp'
Vin=10 #input voltage(mV)
Rf=75 #feedback path resistance Rf (KOhm)
R1=1.5 #inverting input resistance R1(KOhm)
Iinb=80*10**-9 #bias current(A)
Iino =20*10**-9 #Iin(off) (A)
Vino=2.0 #Vin(off) (mV)
Av=50 #voltage gain
RB1=0 #resistance at noninverting input(KOhm)
RB2=R1*Rf/(Rf+R1) #thevenin resistance at inverting input(KOhm)
V1err=(RB1-RB2)*Iinb*10**6 #dc error input1 (mV)
V2err=(RB1+RB2)*(Iino/2)*10**6 #dc error input2 (mV)
V3err=Vino #dc error input3 (mV)
Verror=Av*(abs(V1err)+V2err+V3err) #output error voltage(mV)
print 'output error voltage Verror = ',round(Verror,2),'mV'
Vin=10 #input voltage(mV)
Rf=75 #feedback path resistance Rf (KOhm)
R1=1.5 #inverting input resistance R1(KOhm)
Iinb=500*10**-9 #bias current(A)
Iino =200*10**-9 #Iin(off) (A)
Vino=6.0 #Vin(off) (mV)
Av=50 #voltage gain
RB1=0 #resistance at noninverting input(KOhm)
RB2=R1*Rf/(Rf+R1) #thevenin resistance at inverting input(KOhm)
V1err=(RB1-RB2)*Iinb*10**6 #dc error input1 (mV)
V2err=(RB1+RB2)*(Iino/2)*10**6 #dc error input2 (mV)
V3err=Vino #dc error input3 (mV)
Verror=Av*(abs(V1err)+V2err+V3err) #output error voltage(mV)
print 'output error voltage Verror = ',round(Verror,2),'mV'
import math
Vin=50 #input voltage(mV)
Rf=3.9*10**3 #feedback path resistance Rf (Ohm)
R1=100 #inverting input resistance R1(Ohm)
Funity=1*10**6 #Funity (Hz)
Av_CL=1+(Rf/R1) #closed loop voltage gain
f2_CL1=Funity/Av_CL #closed loop bandwidth1(KHz)
Av_CL1=math.ceil(10**(12/20.0)) #Av for 12 dB at 250 KHz
Vout=Av_CL1*Vin #output voltage(mV)
print 'Output voltage for 250KHz = ',Vout,'mVpp'
Vin=10 #input voltage(mV)
Rf=3.9*10**3 #feedback path resistance Rf (Ohm)
R1=100 #inverting input resistance R1(Ohm)
Iinb=500*10**-9 #bias current(A)
Iino =200*10**-9 #Iin(off) (A)
Vino=6.0*10**-3 #Vin(off) (V)
Av=40 #voltage gain
RB1=0 #resistance at noninverting input(KOhm)
RB2=R1*Rf/(Rf+R1) #thevenin resistance at inverting input(KOhm)
V1err=(RB1-RB2)*Iinb #dc error input1 (mV)
V2err=(RB1+RB2)*(Iino/2) #dc error input2 (mV)
V3err=Vino #dc error input3 (mV)
Verror=Av*(abs(V1err)+V2err+V3err) #output error voltage(mV)
print 'output error voltage Verror = ',Verror*1000,'mV'
Vin1=100*10**-3 #input voltage1(V)
Vin2=200*10**-3 #input voltage2(V)
Vin3=300*10**-3 #input voltage3(V)
Rf=100.0 #feedback path resistance Rf (KOhm)
R1=20.0 #inverting input resistance R1(KOhm)
R2=10.0 #inverting input resistance R2(KOhm)
R3=50.0 #inverting input resistance R3(KOhm)
Av1_CL=-Rf/R1 #closed loop voltage gain
Av2_CL=-Rf/R1 #closed loop voltage gain
Av3_CL=-Rf/R1 #closed loop voltage gain
Vout=Av1_CL*Vin1+Av2_CL*Vin2+Av3_CL*Vin3 #output voltage1(mV)
RB2=(R1**-1+R2**-1+R3**-1+Rf**-1)**-1 #thevenin resistance at inverting input(KOhm)
print 'Output voltage = ',Vout,'Vpp'
print 'thevenin resistance at inverting input RB2 = ',round(RB2,2),'KOhm'
Vin=10 #ac voltage source (mVpp)
Av=1 #voltage gain
Funity=1 #unity frequency (MHz)
Vout=Av*Vin #output voltage(V)
f2_CL=Funity #bandwidth(MHz)
print 'Output voltage = ',Vout,'mVpp'
print 'Bandwidth f2(CL) = ',f2_CL,'MHz'
RL=1.0 #load resistance(Ohm)
Vout=9.99 #load voltage(mV)
Vz=0.01 #voltage across Zout(CL) (mV)
iout=Vout/RL #load current(mA)
Zout_CL=Vz/iout #output impedance(Ohm)
print 'Load current iout = ',iout,'mA'
print 'closed loop output impedance Zout(CL) = ',round(Zout_CL,3),'Ohm'