# Chapter4-Basic BJT Amplifiers¶

## Ex1-pg174¶

In [2]:
import math

##Example 4.1
b=100.;
Vcc=12.;
Vbe=0.7;
Rc=6.;
Rb=50.;
Vbb=1.2;
##dc solution
Ibq=(Vbb-Vbe)/Rb;
print"%s %.2f %s"%('\nbase current=  ',Ibq,' mA\n')
Icq=b*Ibq;
print"%s %.2f %s"%('\ncollector current= ',Icq,' mA\n')
Vceq=Vcc-Icq*Rc;
print"%s %.2f %s"%('\ncollector emitter voltage= ',Vceq,' V\n')
##transistor is forward biased
##ac solution
V_T=0.026;##(V)
##small signal hybrid pi parameters
r_pi=b*V_T/Icq;
print"%s %.2f %s"%('\nsmall signal resistance= ',r_pi,' KOhm\n')
g_m=Icq/V_T;
print"%s %.2f %s"%('\ntransconductance= ',g_m,' mA/V\n')
##Av=Vo/Vs=-(g_m*Rc)*r_pi/(r_pi+Rb)
Av=-(g_m*Rc)*r_pi/(r_pi+Rb);
print"%s %.2f %s"%('\nsmall signal voltage gain=\n',Av,'')

base current=   0.01  mA

collector current=  1.00  mA

collector emitter voltage=  6.00  V

small signal resistance=  2.60  KOhm

transconductance=  38.46  mA/V

small signal voltage gain=
-11.41


## Ex2-pg177¶

In [3]:
import math

##Example 4.2
V_pi=50.;##(V)
Icq=1.;##(mA)
ro=V_pi/Icq;
print"%s %.2f %s"%('\nsmall signal output resistance= ',ro,' KOhm\n')
Rc=6.;
g_m=38.5;
r_pi=2.6;
Rb=50.;
Av=-(g_m)*(Rc*ro/(Rc+ro))*r_pi/(r_pi+Rb);
print"%s %.2f %s"%('\nsmall signal voltage gain= \n',Av,'')

small signal output resistance=  50.00  KOhm

small signal voltage gain=
-10.19


## Ex4-pg190¶

In [5]:
import math

##Example 4.4
b=100.;
Vbe=0.7;
Va=100.;
V_T=0.026;##(V)
##from dc analysis
Icq=0.95;
Vceq=6.31;
##ac analysis
r_pi=b*V_T/Icq;
print"%s %.2f %s"%('\nsmall signal resistance= ',r_pi,' KOhm\n')
g_m=Icq/V_T;
print"%s %.2f %s"%('\ntransconductance= ',g_m,' mA/V\n')
Rs=0.5;
Rc=6.;
ro=Va/Icq;
print"%s %.2f %s"%('\nro= ',ro,' KOhm\n')
Av=-g_m*(5.9*r_pi/(5.9+r_pi))/((5.9*r_pi/(r_pi+5.9))+Rs)*ro*Rc/(ro+Rc);
print"%s %.2f %s"%('\nsmall signal voltage gain= ',Av,' \n')
Ri=5.9*r_pi/(r_pi+5.9);
print"%s %.2f %s"%('\ninput resistance= ',Ri,' KOhm\n')
Ro=ro*Rc/(ro+Rc);
print"%s %.2f %s"%('\noutput resistance= ',Ro,' KOhm\n')

small signal resistance=  2.74  KOhm

transconductance=  36.54  mA/V

ro=  105.26  KOhm

small signal voltage gain=  -163.64

input resistance=  1.87  KOhm

output resistance=  5.68  KOhm



## Ex5-pg194¶

In [6]:
import math

##Example 4.5
b=100.;
Vbe=0.7;
Rc=2.;
Rs=0.5;
Icq=2.16;
V_T=0.026;##(V)
Vceq=4.8
##ac solution
r_pi=b*V_T/Icq;
print"%s %.2f %s"%('\nsmall signal resistance= ',r_pi,' KOhm\n')
g_m=Icq/V_T;
print"%s %.2f %s"%('\ntransconductance= ',g_m,' mA/V\n')
##since Va=infinity,ro=Va/Icq is also infinity
Re=0.4;
Rib=r_pi+(1.+b)*Re;
print"%s %.2f %s"%('\ninput resistance to the base= ',Rib,' KOhm\n')
##Ri=R1||R2||Rib
Ri=10.*Rib/(10.+Rib);
print"%s %.2f %s"%('\ninput resistance to the amplifier= ',Ri,' KOhm\n')
Av=-(1./(r_pi+(1.+b)*Re))*b*Rc*Ri/(Ri+Rs);
print"%s %.2f %s"%('\nsmall signal voltage gain= \n',Av,'')
##by approximate expression
Av=-Rc/Re;
print"%s %.2f %s"%('\nsmall signal voltage gain= \n',Av,'')

small signal resistance=  1.20  KOhm

transconductance=  83.08  mA/V

input resistance to the base=  41.60  KOhm

input resistance to the amplifier=  8.06  KOhm

small signal voltage gain=
-4.53

small signal voltage gain=
-5.00


## Ex7-pg199¶

In [7]:
import math

##Example 4.7
Iq=0.5;
b=120.;
Va=80.;
V_T=0.026;##(V)
rc=120.;##small signal collector resistance (KOhm)
##Icq=Iq
Icq=0.5;
g_m=Icq/V_T;
print"%s %.2f %s"%('\ntransconductance= ',g_m,' mA/V\n')
ro=Va/Icq;
print"%s %.2f %s"%('\nsmall signal output resistance= ',ro,' KOhm\n')
Av=-g_m*ro*rc/(ro+rc);
print"%s %.2f %s"%('\nsmall signal voltage gain= ',Av,' \n')

transconductance=  19.23  mA/V

small signal output resistance=  160.00  KOhm

small signal voltage gain=  -1318.68



## Ex8-pg201¶

In [9]:
import math

##Example 4.8
b=150.;Veb=0.7;
##dc solution
V2=10.;
V1=-10.;
V_T=0.026;##(V)
Rc=5.;
Rb=50.;
Re=10.;
Ibq=(V2-Veb)/(Rb+(1.+b)*Re);
print"%s %.2f %s"%('\nbase current ',Ibq,' mA\n')
Icq=b*Ibq;
print"%s %.2f %s"%('\ncollector current= ',Icq,' mA\n')
Ieq=(1.+b)*Ibq;
print"%s %.2f %s"%('\nemitter current= ',Ieq,' mA\n')
Vecq=V2-V1-Icq*Rc-Ieq*Re;
print"%s %.2f %s"%('\nemitter collector voltage= ',Vecq,' V\n')
##ac solution
r_pi=b*V_T/Icq;
print"%s %.2f %s"%('\nsmall signal resistance= ',r_pi,' KOhm\n')
g_m=Icq/V_T;
print"%s %.2f %s"%('\ntransconductance = ',g_m,'mA/V\n')
##since Va=infinity,ro=Va/Icq is also infinity

base current  0.01  mA

collector current=  0.89  mA

emitter current=  0.90  mA

emitter collector voltage=  6.53  V

small signal resistance=  4.36  KOhm

transconductance =  34.39 mA/V



## Ex9-203¶

In [10]:
import math

##Example 4.9
Ic=0.894;
i_C=2.*Ic;
print"%s %.2f %s"%('\nmaximum possible symmetrical peak to peak ac collector current= ',i_C,' mA\n')
Rc=5.;
Rl=2.;
vo=i_C*Rc*Rl/(Rc+Rl);
print"%s %.2f %s"%('\nmaximum possible symmetrical peak to peak output voltage= ',vo,' V\n')
iC=Ic+i_C*1/2.;
print"%s %.2f %s"%('\nmaximum instantaneous collector current= ',iC,' mA\n')

maximum possible symmetrical peak to peak ac collector current=  1.79  mA

maximum possible symmetrical peak to peak output voltage=  2.55  V

maximum instantaneous collector current=  1.79  mA



## Ex10-pg206¶

In [12]:
import math

##Example 4.10
b=100.;
Vbe=0.7;
V_T=0.026;##(V)
Re=2.;
R1=50.;
R2=50.;
Rs=0.5;
Va=80.;
##by dc analysis
Icq=0.793;
Vceq=3.4;
r_pi=b*V_T/Icq;
print"%s %.2f %s"%('\nsmall signal resistance= ',r_pi,' KOhm\n')
g_m=Icq/V_T;
print"%s %.2f %s"%('\ntransconductance= ',g_m,' mA/V\n')
ro=Va/Icq;
print"%s %.2f %s"%('\nsmall signal output resistance= ',ro,' KOhm\n')
Rib=r_pi+(1.+b)*Re*ro/(ro+Re);
print"%s %.2f %s"%('\ninput resistance to the base= ',Rib,' KOhm\n')
##Ri=R1||R2||Rib
x=R1*R2/(R1+R2);
Ri=x*Rib/(x+Rib);
print"%s %.2f %s"%('\nRi= ',Ri,' KOhm\n')
y=ro*Re/(ro+Re);
Av=(1./(r_pi+(1.+b)*y))*(1.+b)*y*Ri/(Ri+Rs);
print"%s %.2f %s"%('\nsmall signal voltage gain= ',Av,' \n')

small signal resistance=  3.28  KOhm

transconductance=  30.50  mA/V

small signal output resistance=  100.88  KOhm

input resistance to the base=  201.35  KOhm

Ri=  22.24  KOhm

small signal voltage gain=  0.96