# Chapter02:Operational Amplifiers¶

## Ex2.1:pg-72¶

In [6]:
# Consider inverting configuration

# 2.1a
R_1=1000.0; # (ohm)
R_2=100*10.0**3; # (ohm)
A=10**3; # (V/V)
print A,"= A (V/V)"
G=-R_2/R_1/(1+(1+R_2/R_1)/A);
print round(-G,2),"= G"
e=(-G-(R_2/R_1))/(R_2/R_1)*100;
print round(e,2),"= e (%)"
v_1=0.1; # (V)
v_1=G*v_1/A;
print round(v_1*1000,2),"= v_1 (mV)"
A=10**4; # (V/V)
print A,"= A (V/V)"
G=-R_2/R_1/(1+(1+R_2/R_1)/A);
print round(-G,2),"= G"
e=(-G-(R_2/R_1))/(R_2/R_1)*100;
print round(e,2),"= e (%)"
v_1=0.1; # (V)
v_1=G*v_1/A;
print round(v_1*1000,3),"= v_1 (mV)"
A=10**5; # (V/V)
print A,"= A (V/V)"
G=-R_2/R_1/(1+(1+R_2/R_1)/A);
print round(-G,2),"= G"
e=(-G-(R_2/R_1))/(R_2/R_1)*100;
print round(e,2),"= e (%)"
v_1=0.1; # (V)
v_1=G*v_1/A;
print round(v_1*1000,3),"= v_1 (mV)"

# 2.1b
A=50000; # (V/V)
print A,"= A (V/V)"
G=-R_2/R_1/(1+(1+R_2/R_1)/A);
print round(-G,2),"= G"
print "Thus a -50% change in the open loop gain results in only -0.1% in the closed loop gain"

1000 = A (V/V)
90.83 = G
-9.17 = e (%)
-9.08 = v_1 (mV)
10000 = A (V/V)
99.0 = G
-1.0 = e (%)
-0.99 = v_1 (mV)
100000 = A (V/V)
99.9 = G
-0.1 = e (%)
-0.1 = v_1 (mV)
50000 = A (V/V)
99.8 = G
Thus a -50% change in the open loop gain results in only -0.1% in the closed loop gain


## Ex2.3:pg-88¶

In [1]:
R_2=1-50000-1/1000.0+50;
print round(-R_2/1000.0,1),"= R_2 (Kohm)"
R_1=-2*R_2/999;
print round(R_1),"= R_1 (ohm)"

49.9 = R_2 (Kohm)
100.0 = R_1 (ohm)