Chapter07:Differential and Multistage amlplifiers

Ex7.1:pg-690

In [15]:
# Consider the differential amplifier

B=100.0; # beta value

# 7.1a
V_T=0.025; # (V)
I_E=0.0005; # (A)
R_E=150.0; # (ohm)
r_e1=V_T/I_E;  # emitter resistance (ohm)
r_e2=r_e1; # emitterA resistance (ohm)
r_e=r_e1;
R_id=2*(B+1)*(r_e+R_E);
print round(R_id/1000.0),"The input differential resistance R_id (kohm)"

# 7.1b
R_id=40000.0; # (ohm)
R_sig=5000.0; # (ohm)
R_C=10000.0; # (ohm)
R_E=150.0; # (ohm)
A_v=R_id/(R_id+R_sig); # A_v= v_o/v_sig (V/V)
A_V=2*R_C/(2.0*(r_e+R_E)); # A_V= v_o/v_id (V/v)
A_d=A_v*A_V; # A_d=v_o/v_sig (V/V)
print "Overall differential voltage gain (V/V)",round(A_d,-1)

# 7.1c
R_EE=200000.0; # (ohm)
deltaR_C=0.02*R_C; # in the worst case
A_cm=R_C*deltaR_C/(2.0*R_EE*R_C)
print  A_cm,"Worst case common mode gain (V/V)"

# 7.1d
CMRR=20*math.log10(A_d/A_cm)
print int(CMRR),"CMRR in dB"

# 7.1e
r_o=200000.0; #(ohm)
R_icm=(B+1)*(R_EE*r_o/2.0)/(R_EE+r_o/2.0);
print round(R_icm/1e6,1),"Input common mode resistance (kohm)"
40.0 The input differential resistance R_id (kohm)
Overall differential voltage gain (V/V) 40.0
0.0005 Worst case common mode gain (V/V)
98 CMRR in dB
6.7 Input common mode resistance (kohm)

Ex7.2:pg-747

In [28]:
W=7.2*10**-6; # (m)
L=0.36*10**-6; # (m)
C_gs=29*10**-15; # (F)
C_gd=5*10**-15; # (F)
C_db=5*10**-15;  # (F)
uC_n=387*10**-6; # uC_n=u_nC_ox (A/V**2)
uC_p=86*10**-6; # uC_p=u_pC_ox (A/V**2)
V_an=5; # V_an=V'_An (V/um) (V)
V_ap=6; # V_ap=V'_Ap (V/um) (V)
I=0.2*10**-3; # (A)
R_SS=25000; # (ohm)
C_SS=0.2*10**-12; # (F)
C_S=25*10**-15; # (F)
K_n=uC_n*W/L;
I_D=100*10**-6; # bias current (A)
V_OV=math.sqrt(2*I_D/K_n);
g_m=I/V_OV;
g_m1=g_m;
g_m2=g_m;
r_o1=V_an*0.36/(0.1*10**-3);
r_o2=r_o1;
K_p=uC_p*W/L;
V_OV34=math.sqrt(2*I_D/K_p); # V_OV3,4
g_m3=2*0.1*10**-3/V_OV34;
g_m4=g_m3;
r_o3=V_ap*0.36/(0.1*10**-3);
r_o4=r_o3;
A_d=g_m*(r_o2*r_o4)/(r_o2+r_o4);
print round(A_d,1),"A_d (V/V)"
A_cm=-1/(2*g_m3*R_SS);
print round(A_cm,3),"A_cm (V/V)"
CMRR=20*log10(-A_d/A_cm); # negative sign to make A_cm positive
print round(CMRR,1),"CMRR in dB"
C_gd1=5*10**-15; # (F)
C_db1=5*10**-15; # (F)
C_db3=5*10**-15; # (F)
C_gs3=20*10**-15; # (F)
C_gs4=20*10**-15; # (F)
C_m=C_gd1+C_db1+C_db3+C_gs3+C_gs4;
C_gd2=5*10**-15; # (F)
C_db2=5*10**-15; # (F)
C_gd4=5*10**-15; # (F)
C_db4=5*10**-15; # (F)
C_x=25*10**-15; # (F)
C_L=C_gd2+C_db2+C_gd4+C_db4+C_x;
print "poles and zeroes of A_d"
R_o=r_o2*r_o4/(r_o2+r_o4)
f_p1=1/(2*math.pi*C_L*R_o);
print int(f_p1/1e6),"f_p1 (MHz)"
f_p2=g_m3/(2*math.pi*C_m);
print round(f_p2/1e9,2),"f_p2 (GHz)"
f_Z=2*f_p2;
print round(f_Z/1e9,1),"f_Z (GHz)"
print "Dominant pole of CMRR is at location of commom-mode gain zero"
f_Z=1/(2*math.pi*C_SS*R_SS);
print round(f_Z/1e6,1),"f_Z (MHz)"
12.2 A_d (V/V)
-0.034 A_cm (V/V)
51.1 CMRR in dB
poles and zeroes of A_d
360 f_p1 (MHz)
1.7 f_p2 (GHz)
3.4 f_Z (GHz)
Dominant pole of CMRR is at location of commom-mode gain zero
31.8 f_Z (MHz)

Ex7.3:pg-751

In [49]:
I_REF=90*10.0**-6; # (A)
V_tn=0.7; # (V)
V_tp=0.8; # Magnitude is cconsidered
uC_n=160.0*10**-6; # uC_n=u_n*C_ox
uC_p=40*10.0**-6; # uC_p=u_p*C_ox
V_A=10.0; # (V)
V_DD=2.5; # (V)
V_SS=2.5; # (V)
L=0.8*10**-6; # (m)
r_o2=222.0; # (ohm)
r_o4=222.0; # (ohm)
g_m1=0.3; # (mho)
A_1=-g_m1*r_o2*r_o4/(r_o2+r_o4);
print round(A_1,2),"=A_1 (V/V)"
r_o6=111.0; # (ohm)
r_o7=111.0; # (ohm)
g_m6=0.6; # (mho)
A_2=-g_m6*r_o6*r_o7/(r_o6+r_o7);
print round(A_2,2),"=A_2 (V/V)"
print "For Q_1"
W=20*10.0**-6; # (m)
I_D=I_REF/2.0; # (A)
print round(I_D/(10.0**-6),2),"=I_D (microA)"
K_p=uC_p*W/L;
V_OV=math.sqrt(2*I_D/K_p);
print round(V_OV,2),"=V_OV (V)"
V_GS=V_tp+V_OV;
print round(V_GS,2),"=V_GS (V)"
g_m=2*I_D/V_OV;
print round(g_m/(10.0**-3),2),"=g_m (mA/V)"
r_o=V_A/I_D;
print int(r_o/1e3),"=r_o (kohm)"
print "For Q_2"
W=20*10.0**-6; # (m)
I_D=I_REF/2; # (A)
print round(I_D/(10.0**-6),2),"=I_D (microA)"
K_p=uC_p*W/L;
V_OV=math.sqrt(2*I_D/K_p);
print round(V_OV,2),"=V_OV (V)"
V_GS=V_tp+V_OV;
print round(V_GS,2),"=V_GS (V)"
g_m=2*I_D/V_OV;
print round(g_m/(10.0**-3),2),"=g_m (mA/V)"
r_o=V_A/I_D;
print round(r_o/1e3),"=r_o (kohm)"
print "For Q_3"
W=5*10**-6; # (m)
I_D=I_REF/2; # (A)
print round(I_D/(10.0**-6),2),"=I_D (microA)"
K_n=uC_n*W/L;
V_OV=math.sqrt(2*I_D/K_n);
print round(V_OV,2),"=V_OV (V)"
V_GS=V_tn+V_OV;
print round(V_GS,2),"=V_GS (V)"
g_m=2*I_D/V_OV;
print round(g_m/(10.0**-3),2),"=g_m (mA/V)"
r_o=V_A/I_D;
print round(r_o/1e3),"=r_o (kohm)"
print "For Q_4"
W=5*10**-6; # (m)
I_D=I_REF/2; # (A)
print round(I_D/(10.0**-6),2),"=I_D (microA)"
K_n=uC_n*W/L;
V_OV=math.sqrt(2*I_D/K_n);
print round(V_OV,2),"=V_OV (V)"
V_GS=V_tn+V_OV;
print round(V_GS,2),"=V_GS (V)"
g_m=2*I_D/V_OV;
print round(g_m/(10.0**-3),2),"=g_m (mA/V)"
r_o=V_A/I_D;
print round(r_o/1e3),"=r_o (kohm)"
print "For Q_5"
W=40*10.0**-6; # (m)
I_D=I_REF; # (A)
print round(I_D/(10.0**-6),2),"=I_D (microA)"
K_p=uC_p*W/L;
V_OV=math.sqrt(2*I_D/K_p);
print round(V_OV,2),"=V_OV (V)"
V_GS=V_tp+V_OV;
print round(V_GS,2),"=V_GS (V)"
g_m=2*I_D/V_OV;
print round(g_m/(10.0**-3),2),"=g_m (mA/V)"
r_o=V_A/I_D;
print round(r_o/1e3),"=r_o (kohm)"
print "For Q_6"
W=10*10**-6; # (m)
I_D=I_REF; #A
print round(I_D/(10.0**-6),2),"=I_D (microA)"
K_n=uC_n*W/L;
V_OV=math.sqrt(2*I_D/K_n);
print round(V_OV,2),"=V_OV (V)"
V_GS=V_tn+V_OV;
print round(V_GS,2),"=V_GS (V)"
g_m=2*I_D/V_OV;
print round(g_m/(10.0**-3),2),"=g_m (mA/V)"
r_o=V_A/I_D;
print round(r_o/1e3),"=r_o (kohm)"
print "For Q_7"
W=40*10**-6; # (m)
I_D=I_REF;#A
print round(I_D/(10.0**-6),2),"=I_D (microA)"
K_p=uC_p*W/L;
V_OV=math.sqrt(2*I_D/K_p);
print round(V_OV,2),"=V_OV (V)"
V_GS=V_tp+V_OV;
print round(V_GS,2),"=V_GS (V)"
g_m=2*I_D/V_OV;
print round(g_m/(10.0**-3),2),"=g_m (mA/V)"
r_o=V_A/I_D;
print round(r_o/1e3),"=r_o (kohm)"
print "For Q_8"
W=40*10**-6; # (m)
I_D=I_REF; # A
print round(I_D/(10.0**-6),2),"=I_D (microA)"
K_p=uC_p*W/L;
V_OV=math.sqrt(2*I_D/K_p);
print round(V_OV,2),"=V_OV (V)"
V_GS=V_tp+V_OV;
print round(V_GS,2),"=V_GS (V)"
g_m=2*I_D/V_OV;
print round(g_m/(10.0**-3),2),"=g_m (mA/V)"
r_o=V_A/I_D;
print int(r_o/1e3),"=r_o (kohm)"
A_O=A_1*A_2;
print round(20*log10(A_O)),"=The dc open loop gain in dB"
v_ICMmin=-2.5+1;
print round(v_ICMmin,2),"=Lower limit of input common-mode (V)"
v_ICMmax=2.2-1.1;
print round(v_ICMmax,2),"=Upper limit of input common-mode (V)"
v_Omax=V_DD-V_OV;
print round(v_Omax,2),"=Highest allowable output voltage (V)"
v_Omin=-V_SS+V_OV;
print round(v_Omin,2),"=Lowest allowable output voltage (V)"
-33.3 =A_1 (V/V)
-33.3 =A_2 (V/V)
For Q_1
45.0 =I_D (microA)
0.3 =V_OV (V)
1.1 =V_GS (V)
0.3 =g_m (mA/V)
222 =r_o (kohm)
For Q_2
45.0 =I_D (microA)
0.3 =V_OV (V)
1.1 =V_GS (V)
0.3 =g_m (mA/V)
222.0 =r_o (kohm)
For Q_3
45.0 =I_D (microA)
0.3 =V_OV (V)
1.0 =V_GS (V)
0.3 =g_m (mA/V)
222.0 =r_o (kohm)
For Q_4
45.0 =I_D (microA)
0.3 =V_OV (V)
1.0 =V_GS (V)
0.3 =g_m (mA/V)
222.0 =r_o (kohm)
For Q_5
90.0 =I_D (microA)
0.3 =V_OV (V)
1.1 =V_GS (V)
0.6 =g_m (mA/V)
111.0 =r_o (kohm)
For Q_6
90.0 =I_D (microA)
0.3 =V_OV (V)
1.0 =V_GS (V)
0.6 =g_m (mA/V)
111.0 =r_o (kohm)
For Q_7
90.0 =I_D (microA)
0.3 =V_OV (V)
1.1 =V_GS (V)
0.6 =g_m (mA/V)
111.0 =r_o (kohm)
For Q_8
90.0 =I_D (microA)
0.3 =V_OV (V)
1.1 =V_GS (V)
0.6 =g_m (mA/V)
111 =r_o (kohm)
61.0 =The dc open loop gain in dB
-1.5 =Lower limit of input common-mode (V)
1.1 =Upper limit of input common-mode (V)
2.2 =Highest allowable output voltage (V)
-2.2 =Lowest allowable output voltage (V)

Ex7.5:pg-760

In [56]:
B=100.0; # beta value
I_E=0.2510**-3; # (A)
R_1=20000.0; # (ohm)
R_2=20000; # (ohm)
R_3=3000; # (ohm)
R_4=2300; # (ohm)
R_5=15700; # (ohm)
R_6=3000; # (ohm)
r_e1=25/0.25; # (ohm)
r_e2=r_e1; # (ohm)
r_pi1=(B+1)*r_e1;
r_pi2=(B+1)*r_e2;
R_id=r_pi1+r_pi2;
print round(R_id/1e3,2),"Input differential resistance (kohm)"
I_E=1*10.0**-3;
r_e4=25/1.0;
r_e5=r_e4;
r_pi4=(B+1)*r_e4;
r_pi5=(B+1)*r_e5;
R_i2=r_pi4+r_pi5;
print round(R_i2/1e3,2),"Input resistance of the second stage R_i2 (kohm)"
A_1=(R_i2*(R_1+R_2)/((R_i2+R_1+R_2)*(r_e1+r_e2)))
print round(A_1,1),"Voltage gain of the first stage (V/V)"
r_e7=25/1.0;
R_i3=(B+1)*(R_4+r_e7);
print round(R_i3/1e3,1),"Input resistance of the third stage R_i3 (kohm)"
A_2=(-R_3*R_i3)/((R_3+R_i3)*(r_e4+r_e5));
print round(A_2,1),"Voltage gain of the second stage (V/V)"
r_e8=25/5.0;
R_i4=(B+1)*(r_e8+R_6);
print round(R_i4/1e3,2),"Input resistance of the third stage R_i2 (kohm)"
A_3=(-R_5*R_i4)/((R_5+R_i4)*(r_e7+R_4));
print round(A_3,2),"Voltage gain of the third stage (V/V)"
A_4=R_6/(R_6+r_e8);
print round(A_4,2),"Voltage gain of the fourth stage (V/V)"
A=A_1*A_2*A_3*A_4 ; # A=v_o/v_id (V/V)
print round(A),"Overall output gain (V/V)"
print round(20*log10(A),1),"Overall output gain in dB"
R_o=R_6*(r_e8+R_5/(B+1))/(R_6+r_e8+R_5/(B+1))
print round(R_o),"Output resistance (ohm)"
20.2 Input differential resistance (kohm)
5.05 Input resistance of the second stage R_i2 (kohm)
22.4 Voltage gain of the first stage (V/V)
234.8 Input resistance of the third stage R_i3 (kohm)
-59.2 Voltage gain of the second stage (V/V)
303.5 Input resistance of the third stage R_i2 (kohm)
-6.42 Voltage gain of the third stage (V/V)
1.0 Voltage gain of the fourth stage (V/V)
8514.0 Overall output gain (V/V)
78.6 Overall output gain in dB
152.0 Output resistance (ohm)