Chapter10-Integrated Circuit Biasing and Active Loads

Ex1-pg580

In [1]:
import math

##Example 10.1
Vbe=0.6;##(V)
b=100.;
V1=5.;
Io=200.;##micro A
Iref=Io*(1.+2./b);
print"%s %.2f %s"%('\nreference current= ',Iref,' microA\n')
Iref=Iref*0.001;##mA
R1=(V1-Vbe)/Iref;
print"%s %.2f %s"%('\nR1= ',R1,' KOhm\n')
reference current=  204.00  microA


R1=  21.57  KOhm

Ex2-pg582

In [2]:
import math

##Example 10.2
V1=5.;
V2=-5.;
R1=9.3;
b=50.;
Vbe=0.7;
Va=80.;
Iref=(V1-Vbe-V2)/R1;
print"%s %.2f %s"%('\nreference current = ',Iref,'mA\n')
Io=Iref/(1.+2./b);
print"%s %.2f %s"%('\noutput current= ',Io,'mA\n')
ro=Va/Io;
print"%s %.2f %s"%('\nsmall signal output resistance= ',ro,' KOhm\n')
##dIo=dVce2/ro
Vce2=0.7;
dIo=(V1-Vce2)/ro;
print"%s %.2f %s"%('\nchange in load current= ',dIo,' mA\n')
x=dIo/Io;
x=x*100.;
print"%s %.2f %s"%('\npercent change in output current= ',x,' \n')
reference current =  1.00 mA


output current=  0.96 mA


small signal output resistance=  83.20  KOhm


change in load current=  0.05  mA


percent change in output current=  5.38  

Ex4-pg591

In [3]:
import math

##Example 10.4
Iref=1.;
Io=12.*10**-3;
V1=5.;
V2=-5.;
Vt=0.026;
Vbe=0.7;
R1=(V1-Vbe-V2)/Iref;
print"%s %.2f %s"%('\nResistance R1 = ',R1,'KOhm\n')
Re=(Vt/Io)*math.log(Iref/Io);
print"%s %.2f %s"%('\nResistance Re = ',Re,'KOhm\n')
Vbe=Io*Re;
print"%s %.2f %s"%('\ndifference between two B-E voltages= ',Vbe,' V\n')
Resistance R1 =  9.30 KOhm


Resistance Re =  9.58 KOhm


difference between two B-E voltages=  0.11  V

Ex5-pg593

In [4]:
import math

##Example 10.5
V1=5.;
V2=-5.;
R1=9.3;
Re=9.580;
Vt=0.026;
b=100.;
Vbe=0.7;
Va=80.;
Io=12.;
ro2=Va/Io;
print"%s %.2f %s"%('\nsmall signal collector resistance= ',ro2,' MOhm\n')
Io=12.*0.001;##mA
gm2=Io/Vt;
print"%s %.2f %s"%('\ntransconductance= ',gm2,' mA/V\n')
r=b*Vt/Io;
print"%s %.2f %s"%('\nResistance= ',r,' KOhm\n')
Ro=ro2*(1.+gm2*Re*r/(Re+r));
print"%s %.2f %s"%('\noutput resistance= ',Ro,' MOhm\n')
dVc2=4.;
dIo=dVc2/Ro;
print"%s %.2f %s"%('\nchange in load current= ',dIo,' microA\n')
Io=12.;##micro A
x=dIo/Io;
x=x*100.;
print"%s %.2f %s"%('\npercent change in output current =\n',x,'')
small signal collector resistance=  6.67  MOhm


transconductance=  0.46  mA/V


Resistance=  216.67  KOhm


output resistance=  34.90  MOhm


change in load current=  0.11  microA


percent change in output current =
 0.96 

Ex6-pg597

In [5]:
import math

##Example 10.6
V1=5.;
V2=-5.;
Vbe=0.6;
Veb=0.6;
Iq2=400.*10**-3;##mA
Iref=200.*10**-3;##mA
Iq1=Iref;
Iq3=Iq1;
Iq4=600.*10**-6;
R1=(V1-Veb-Vbe-V2)/Iref;
print"%s %.2f %s"%('\nResistance R1= ',R1,' KOhm\n')
Resistance R1=  44.00  KOhm

Ex7-pg601

In [6]:
import math
 
##Example 10.7
##uox*Cox/2=x
x=20.*10**-6;##A/V^2
Vtn=1.;
V1=5.;
V2=0.;
Iref=0.25*10**-3;
Io=0.1*10**-3;
Vgs2=1.85;
##let y=W/L
y2=Io/(x*(Vgs2-Vtn)**2);
print"%s %.2f %s"%('\nwidth per length 2= ',y2,'\n')
y1=Iref/(x*(Vgs2-Vtn)**2);
print"%s %.2f %s"%('\nwidth per length 1= ',y1,'\n')
Vgs1=Vgs2;
Vgs3=V1-V2-Vgs1;
print"%s %.2f %s"%('\nVgs3= ',Vgs3,' V\n')
y3=Iref/(x*(Vgs3-Vtn)**2);
print"%s %.2f %s"%('\nwidth per length 3= ',y3,'\n')
width per length 2=  6.92 


width per length 1=  17.30 


Vgs3=  3.15  V


width per length 3=  2.70 

Ex8-pg604

In [7]:
import math

##Example 10.8
Iref=100.;
Io=Iref;
##lambda=y
y=0.01;
gm=0.5*10**3;
ro=1./(y*Iref);
print"%s %.2f %s"%('\noutput resistance= ',ro,' MOhm\n')
ro2=1.;
ro4=1.;
Ro=ro4+ro2*(1.+gm*ro4);
print"%s %.2f %s"%('\noutput resistance of cascode circuit= ',Ro,' MOhm\n')
output resistance=  1.00  MOhm


output resistance of cascode circuit=  502.00  MOhm

Ex9-pg609

In [8]:
import math

##Example 10.9
Idss1=2.;
Idss2=1.;
Vp1=-1.5;
Vp2=Vp1;
##lambda=y
y1=0.05;
y2=y1;
V2=-5.;
Vds=1.5;
Vsmin=Vds+V2;
print"%s %.2f %s"%('\nminimum value of Vs= ',Vsmin,' V\n')
Io=Idss2*(1.+y1*Vds);
print"%s %.2f %s"%('\noutput current= ',Io,' mA\n')
Vgs1=(1.-math.sqrt(Io/Idss1))*Vp1;
print"%s %.2f %s"%('\ngate to source voltage of Q1= ',Vgs1,' V\n')
V1=Vgs1+Vsmin;
print"%s %.2f %s"%('\nV1= ',V1,' V\n')
minimum value of Vs=  -3.50  V


output current=  1.07  mA


gate to source voltage of Q1=  -0.40  V


V1=  -3.90  V

Ex10-pg615

In [9]:
import math

##Example 10.10
Vt=0.026;
Van=120.;
Vap=80.;
Av=-(1./Vt)/(1./Van+1./Vap);
print"%s %.2f %s"%('\nsmall signal open circuit voltage gain=\n',Av,'')
small signal open circuit voltage gain=
 -1846.15 

Ex11-pg620

In [10]:
import math

##Example 10.11
Van=120.;
Vap=80.;
Vt=0.026;
Ico=0.001;
##Rl=infinity
Av=-(1./Vt)/(1./Van+1./Vap);
print"%s %.2f %s"%('\nsmall signal open circuit voltage gain=\n',Av,'')
Rl=100.;
Av1=-(1./Vt)/(1./Van+1./Vap+1./Rl);
print"%s %.2f %s"%('\nsmall signal open circuit voltage gain=',Av1,'')
Rl=10.;
Av2=-(1./Vt)/(1./Van+1./Vap+1./Rl);
print"%s %.2f %s"%('\nsmall signal open circuit voltage gain=\n',Av2,'')
small signal open circuit voltage gain=
 -1846.15 

small signal open circuit voltage gain= -1247.40 

small signal open circuit voltage gain=
 -318.30 

Ex12-pg623

In [11]:
import math
 
##Example 10.12
##lambda=y
yn=0.01;
yp=0.01;
Vtn=1.;
Kn=1.;
Iref=0.5;
gm=2.*math.sqrt(Kn*Iref);
print"%s %.2f %s"%('\ntransconductance = ',gm,'mA/V\n')
go=yn*Iref;
print"%s %.2f %s"%('\nsmall signal transistor conductance= ',go,' mA/V\n')
go2=go;
##for Rl=infinity
Av=-gm/(go+go2);
print"%s %.2f %s"%('\nvoltage gain= ',Av,' \n')
Rl=100.;##Kohm
gl=0.01;
Av=-gm/(go+gl+go2);
print"%s %.2f %s"%('\nvoltage gain= \n',Av,'')
transconductance =  1.41 mA/V


small signal transistor conductance=  0.01  mA/V


voltage gain=  -141.42  


voltage gain= 
 -70.71