Chapter 3: SMALL SIGNAL MODELS,AMPLIFICATION AND BIASING

Example 3.1,Page number 136

In [2]:
#Variable declaration
beeta=100            #current gain
Ic=2.5               #collector current(mA)
Io=-0.5              #output current(mA) 
Rl=2.5               #load resistance(kohm)

#Calculations
rpi=beeta*(25/Ic)   #dynamic resistance(ohms)
Ib=Io/(-beeta)      #as Io=-beeta*Ib
Vs=rpi*Ib           #signal voltage(V)
Vo=Rl*Io            #output voltage(V)
Av=Vo/Vs            #voltage gain
Ai=Io/Ib            #current gain

#Results
print"signal voltage is",Vs,"mV"
print"current gain is",Ai
print"voltage gain is",round(Av/1E-3)
signal voltage is 5.0 mV
current gain is -100.0
voltage gain is -250.0

Example 3.2,Page number 139

In [1]:
import math

#Variable declaration
Id=1.6               #drain current(mA)
Vgs=-3               #gate to source voltage(V)
Id1=.4               #drain current(mA)
Vgs1=-4              #gate to source voltage(V)   
Vp=-5                #peak voltage(V) by solving equations 1.6=Idss(1+3/Vp)^2 and .4=Idss(1+4/Vp)^2
Idss=10              #small signal drain current(mA) by solving equations 1.6=Idss(1+3/Vp)^2 and .4=Idss(1+4/Vp)^2
                      
#Calculations
gmo=-(2*Idss)/Vp                #transconductance(mS)
gm=gmo*(math.sqrt(Id/Idss))     #transconductance(uS)
gm1=gmo*(math.sqrt(Id1/Idss))   #transconductance(uS) 

#Results
print"Idss and Vp are",Idss,"mA and",Vp,"V"
print"gmo is",gmo,"mS"
print"gm at Id is",round(gm/1E-3),"and gm at Id1 is",round(gm1/1E-3),"uS"
Idss and Vp are 10 mA and -5 V
gmo is 4 mS
gm at Id is 1600.0 and gm at Id1 is 800.0 uS

Example 3.3,Page number 140

In [5]:
#Variable declaration
gm=1600             #gm(us)
rd=50               #resistance(kohms)
Rl=5                #load resistance(kohms)

#Calculations
Av=-gm*Rl           #Vgs=Vs from circuit model
                    #Vo=-(gm*Vgs)*Rl
                    #as Av=Vo/Vs=-gm*Rl     

#Result
print"voltage gain of the circuit is",round(Av/1E+3)
voltage gain of the circuit is -8.0

Example 3.4,Page number 145

In [8]:
#Variable declaration
beta=100.       #current gain
rpi=2*10**3     #dynamic resistance(ohms)
rx=500          #resistance(ohms)
ro=250*10**3    #output resistance(ohms)
R1=50*10**3     #resistance(k ohms)   
R2=10*10**3     #resistance(k ohms)
Rc=5*10**3      #collector current(k ohms) 
Rl=5*10**3.     #load current(k ohms)
Rs=1*10**3      #source resistance(k ohms)

#Calculations
Rb=(R1*R2)/(R1+R2)               #equivalent resistance of R1 and R2(kohms)
r=rpi+rx                         #series resistance of rpi and rx(k ohms) 
gm=beta/rpi                      #transconductance(mS)
Vo=-gm*((Rc*Rl)/(Rc+Rl))*.526    #output voltage(V) as 
Av=Vo                            #voltage gain
Ai=Av*((Rs+((Rb*r)/(Rb+r)))/Rl)  #current gain 

#Results
print"source to load voltage gain is",Av
print"source to load current gain is",Ai,"(Solution given in the textbook is incorrect)"
source to load voltage gain is -65.75
source to load current gain is -38.43745 (Solution given in the textbook is incorrect)

Example 3.5,Page number 148

In [4]:
#Variable declaration
beta=100.       #current gain
rd=50*10**3     #internal dynamic resistance(ohms
gm=5*10**-3     #transconductance(mS)
R1=50*10**3     #resistance(ohms)   
R2=10*10**3      #resistance(ohms)
Rs=10*10**3      #source current(ohms) 
Rg=1*10**6.      #gate resistance(ohms)
Rd=10*10**3      #drain resistance(ohms)

#Calculations                      
Vgs=(Rg/(Rs+Rg))                 #gate to source voltage (V) as Vgs=Vs((Rg/(Rs+Rg))   
Av=-Vgs*gm*((rd*Rd)/(rd+Rd))      #voltage gain,Av=Vo/Vs and Vo=-gmVgs(rd||Rd)
Ai=Av*((Rs+Rg)/Rd)               #current gain

#Results
print"source to load voltage gain is",round(Av)
print"source to load current gain is",round(Ai)
source to load voltage gain is -41.0
source to load current gain is -4167.0

Example 3.6,Page number 149

In [1]:
#Variable declaration
Rs=500           #collector current(k ohms) 
Io=-1*10**-3     #output current(mA) 
Rc=5*10**3.       #collector resistance(ohms)
hie=2*10**3
hoe=10*10**-6.    
hfe=100.
hre=5*10**-4
Rb=50*10**3.     #base resistance(ohms)

#Calculations                      
Io1=-1/(1+Rc*hoe)*hfe   #as Io=-1/(1+Rc*hoe)*hfe*Ib 
Ib=-1/Io1               #base current(uA)
Vo=Io*Rc                #output voltage(V)
Vi=hie*Ib+Vo*hre        #input voltage(V)
Is=Ib+Vi/Rb             #source current(ohms)
Ai=Io/Is                #current gain
Vs=(Is*Rs)+Vi           #source voltage(V)
Av=Vo/Vs                #voltage gain

#Results
print"source to load voltage gain is",round(Av/1E-3)
print"source to load current gain is",round(Ai/1E-3)
source to load voltage gain is -189.0
source to load current gain is -92.0

Example 3.7,Page number 153

In [11]:
#Variable declaration
beeta=100.      #current gain  
Ic=4.           #collector current(mA)
Vbe=0.7         #base to emitter voltage(V)  
Re=2.           #emitter resistance(ohms)
Vcc=32.         #supply voltage(V)
abeeta=40.      #actual current gain

#Calculations
Ib=Ic/beeta                        #base current(mA)
Rb=(Vcc-Vbe-((Ib+Ic)*Re))/Ib       #as Vcc=(Ib*Rb)+Vbe+(Ib+Ic)*Re              
Ib=(Vcc-Vbe-8)/(Rb+Re)             #as Vcc=Rb*Ib+Vbe+(Ib+Ic)*Re
Ic1=abeeta*Ib                      #collector current(mA)
deltaIc=Ic-Ic1                     #change in collector current(mA)

#Result
print"change in Ic when beeta=40 is",deltaIc,"mA"
change in Ic when beeta=40 is 2.4 mA

Example 3.8,Page number 155

In [24]:
#Variable declaration
Rb1=36                   #base resistance 1(kohms)
Rb2=12                   #base resistance 2(kohms)
Rc=4                     #emitter resistancce(kohms) 
Re=1.8                   #emitter resistance(kohms)    
Vcc=12                   #supply voltage(V)
Vbe=0.7                  #base to emitter voltage(V)

#Calculations
Rb=(Rb1*Rb2)/(Rb1+Rb2)   #base resistance(ohms)
Vbb=Vcc*(Rb2/(Rb1+Rb2))  #voltage supply to base(V)
                         #(10.8*Ib)+(1.8*Ic)=2.3    equation 1...solving -Vbb+RbIb+Vbe+(Ib+IC)Re
                          #(1.8*Ib)+(5.8*Ic)+Vce=12  equation 2  solving -Vcc+RcIc+Vce+(Ob+Ic)Re
#Part a
beeta=50              #current gain  
Ib=2.3/100.8          #(10.8*Ib)+(90*Ib)=2.3 ,using -Vbb+Rb*Ib+Vbe+(Ib+Ic)*Re  
                      #as Ic=50Ib and putting this in equation 1      
Icq=Ib*beeta
Vceq=Vcc-(1.8*Ib)-(5.8*Icq) #from equation 2

#Part b
beeta=150           #current gain  
Ib=2.3/280.8        # (10.8*Ib)+(270*Ib)=2.3,using -Vcc+Rc*Ic+Vce+(Ib+Ic)*Re   
                    #as Ic=150Ib and putting this in equation 1      
Icq1=Ib*beeta                           
Vceq1=Vcc-(1.8*Ib)-(5.8*Icq1)         #from equation 2

#Results
print"when beeta increases by 300%,Icq increases by",round((((Icq1-Icq)/Icq1)*100),1),"%"
print"when beeta increases by 300%, Vceq increases by",round(((Vceq-Vceq1)/Vceq)*100),"%"
when beeta increases by 300%,Icq increases by 7.1 %
when beeta increases by 300%, Vceq increases by 9.0 %

Example 3.9,Page number 156

In [9]:
#Variable declaration
Ic=4                      #collector current(mA)
Vce=8                     #collector emitter voltage(V) 
beeta=100                 #current gain   
Rb2=24                    #base resistance(kohms)
Vbe=0.7                   #base to emitter voltage(V)
Rc=4                     #collector current(kohm)
Re=2                     #emitter resistance(kohms) 
Ib=0.04                  #base current(mA) 

#Calculations
#Part a
Vcc=(Ic*Rc)+Vce+Ic*Re         #from formula Vcc=IcRc+Vce+(Ic+Ib)Re..eq 1

#Part b
Rb1=Rb2*(Vcc-(Vbe+Ic*Re))/((Vbe+Ic*Re)+Ib)  #from eq 1 and also from Vbb= Vcc(Rb2/(Rb1+Rb2))
Rb=(Rb1*Rb2)/(Rb1+Rb2)                      #base resistance(ohms)
Vbb=(Vcc*Rb2)/(Rb1+Rb2)                     #supply to base(V)

#Part c
abeeta=40                                 #actual current gain
Ib1=((Vbe+Re*Ic)-Vbe)/((1+abeeta)*2+Rb)   #from equation Vbb=IbRb+Vbe+(Ic+Ib)Re
Ic1=abeeta*Ib1                            #collector gain

#Results
print"a)Vcc is",Vcc,"V"
print"b)values are Rb1:",round(Rb1,2),"KOhms,Rb:",round(Rb,2),"kohm and Vbb:",round(Vbb,2),"V" 
print"c)actual value of Ic1",round(Ic1,2),"mA"
a)Vcc is 32 V
b)values are Rb1: 63.98 KOhms,Rb: 17.45 kohm and Vbb: 8.73 V
c)actual value of Ic1 3.22 mA

Example 3.10,Page number 158

In [12]:
#Variable declaration
Vcc=10       #supply voltage(V)
Rc=4.7       #collector current(kohms)
Rb=250       #base resistance(kohms)
Re=1.2       #emitter resistance(kohms)
beeta=100    #current gain
Vbe=0.7      #base to emitter voltage(V)

#Calculations
#Part a
Ib=(Vcc-Vbe)/(Rb+(beeta*(Rc+Re)))   #base current(uA)
Ic=beeta*Ib                         #collector current(mA)
Vce=Vcc-Ic*(Rc+Re)                  #collector to emitter voltage(V)
#Part b
beeta1=150                          #current gain
Ib1=(Vcc-Vbe)/(Rb+(beeta1*(Rc+Re))) #base current(mA)
Ic1=beeta1*Ib1                      #collector current(mA)
Vce1=Vcc-Ic1*(Rc+Re)                #collector to emitter voltage(V)
deltaIc=((Ic1-Ic)/Ic)*100           #small change in Ic(mA)
deltaVce=((Vce-Vce1)/Vce)*100       #small change in Vce(V)

#Results
print"values of Ic is",round(Ic,2),"mA and Vce:",round(Vce,2),"V"
print"values of Ic1 is",round(Ic1,2),"mA and Vce1 is",round(Vce1,2),"V"
print"% change in Ic is",round(deltaIc,2),"% and in Vce is",round(deltaVce,2),"%"
values of Ic is 1.11 mA and Vce: 3.47 V
values of Ic1 is 1.23 mA and Vce1 is 2.75 V
% change in Ic is 11.01 % and in Vce is 20.74 %

Example 3.11,Page number 160

In [13]:
#Variable declaration
Id=3              #drain current(mA)
Vds=12            #drain source voltage(V)
Vgs=-3            #gate source voltage(V)
Vdd=36            #drain voltage(V)
Vgg=12            #gate voltage(V)
Rg=12             #gate resistance(Mohms)

#Calculations
R1=(Rg*Vdd)/Vgg             #resistance(Mohms)
R2=(Rg*R1)/(R1-Rg)          #resistance(kohms)
Rs=(Vgg-Vgs)/Id             #resistance(kohms)
Rd=(Vdd-Vds-Id*Rs)/Id       #as Vdd-IdRd-Vds-IdRs
Vgs=-3.6                    #consider Vgs increases by 20%
Idnew=(Vgg-Vgs)/Rs          #new drain current(mA)

#Results
print"value of R1:",R1,"MOhm,R2:",R2,"Mohms,Rs:",Rs,"KOhm and Rd:",Rd,"kohms"
print"new Id is",Idnew,"mA"
value of R1: 36 MOhm,R2: 18 Mohms,Rs: 5 KOhm and Rd: 3 kohms
new Id is 3.12 mA

Example 3.12,Page number 161

In [18]:
from sympy import*
import math

#Variable declaration
k=0.0002                    #device parameter
Vt=4                        #thevinin voltage(V)   
Vdd=24                      #drain voltage(V)
Id0=3                        #drain current(mA)  

#Calculations
Vgs=(math.sqrt(Id0/k))+4   #as Id=k(Vgs-Vt)^2
Rd=-(Vgs-Vdd)/Id0         #as Vds=Vdd-IdRd and Vgs=Vds=7.87                        
k=0.0003                  #device parameter 

Id=symbols('Id')
expr=solve(Id**2-7.5*Id+13.7,Id)
print"equation has 2 solutions",expr                                    # putting value of k=0.0003 in eq of Id,
Id1=3.15                                    # we get Vgs=Vds=24-5.4Id and putting Vgs again in Id we get,
                                    # Id^2-7.5Id+13.7=0
                                    
Idchange=((Id1-Id0)/Id0)*100                                                    #changed Id(mA)

#Result
print"change in Id is",Idchange,"% increase"
equation has 2 solutions [3.14792027106039, 4.35207972893962]
change in Id is 5.0 % increase

Example 3.13,Page number 162

In [9]:
#Variable declaration 
Vt=2                        #threshold voltage(V)
Id=8                        #drain current(mA)
Vgs=6.                       #gate to source voltage(V)
k=0.5                       #device parameter
Vdd=24                      #drain voltage(V)
Vds=10                       #drain to source voltage(V)

#Calculations
#Part a
Vgs1=4                                            #gate to source voltage(V) 
Id1=k*(Vgs1-Vt)**2                                 #drain current(mA)

#Part b
Vgg=3*Vgs1                                         #gate voltage(V)
R2=(Vdd/Vgg)-1                                    #resistance(Mohms)
Rs=(Vgg-Vgs1)/2                                    #source resistance(k ohms)
Rd=(Vdd-Vds-Id1*Rs)/2

#part c
K=1.5*k                   #increased by 50%
Vgs2=3.67                 #solving 12=Vgs+4Id and Id=0.75(Vgs-2)^2 
Id2=2.08                   #drain current when k is increased(mA)
Vds1=Vdd-Id2*(Rd+Rs)      #drain to source voltage(V)

#Results
print"drain current defined by Vgs=4 and Vds=10 is",Id1,"mA"
print"value of Rs,Rd,R2 are",Rs,"k ohms,", Rd,"k ohms,",R2,"Mohms resp."
print"actual value of Id and Vds are",Id2,"mA,",Vds1,"mA and",Vds," V resp."
drain current defined by Vgs=4 and Vds=10 is 2.0 mA
value of Rs,Rd,R2 are 4 k ohms, 3.0 k ohms, 1 Mohms resp.
actual value of Id and Vds are 2.08 mA, 9.44 mA and 10  V resp.

Example 3.14,Page number 166

In [30]:
#Variable declaration
Ic=10                       #collector current(mA)
beeta=100                   #current gain
Vbe=0.7                     #base to emitter voltage(V)
Vcc=10                      #supply voltage(V) 

#Calculations
#Part a
R=(beeta*(Vcc-Vbe))/((beeta+2)*Ic)               #resistance(k ohms)  
beeta1=200                                       #current gain
Ic1=(beeta1/(beeta1+2))*((Vcc-Vbe)/R)            #collector current(mA)
Icchange=((Ic-Ic1)/Ic)                           #change in collector current(mA)  

#Part b
Ic2=0.1                                          #collector current(mA)
R1=(beeta*(Vcc-Vbe))/((beeta+2)*Ic)              #resistance(k ohms)
Ic3=(beeta1/(beeta1+2))*((Vcc-Vbe)/R1)           #collector current(mA)
Icchange1=((Ic2-Ic3)/Ic2)                        #change in collector current(mA)

#Results
print"% change in Ic is",round(Icchange,1),"% increase"
print"% change in Ic is",round(Icchange1,1),"% increase"
% change in Ic is 1.0 % increase
% change in Ic is 1.0 % increase

Example 3.15,Page number 167

In [34]:
#Variable declaration
Vcc=6                      #supply voltage(V)
R=1.2                      #resistance(k ohms)
Vbe=0.7                    #base to emitter voltage(V) 
beeta=100.                 #current gain

#Calculations
#Part a
Ir=(Vcc-Vbe)/R             #current(mA)
I=(beeta/(beeta+3))*Ir     #current(mA)as transistors are identiical,I=Ie

#Result
print"load current I is",round(I,2),"mA"
load current I is 4.29 mA

Example 3.16,Page number 171

In [15]:
import math 

#Variable declaration
Idss=10              #drain current for zero bias(mA)
Vp=-4                #peak voltage(V)
Idq=Id=2.5           #quienscent drain current(mA)
Vdd=24               #voltage drain drain(V)
Vgg=4                #gate voltage(V)
R1=22                #resistance(Mohms)

#Calculations
#Part a
Vgs=Vp*(1-(math.sqrt(Id/Idss)))         #solving Id=Idss(1-Vgs/Vp)^2
Rs=(Vgg-Vgs)/Id                         #as Vgg-Vgs-IdRs=0 ,Id=Is 
Rd=2.5*Rs                               #given
R2=(Vgg*R1)/(R1-Vgg)                    #from Vgg=(R1*R2)/(R1+R2)

#Part b
gmo=-(2*Idss)/Vp                       #transconductance(mS)
gm=gmo*(math.sqrt(Id/Idss))            #transconductance(mS)

#Part c
Av=-gm*Rd                              #voltage gain

#Results
print"values of Rs:",Rs,"Kohms,Rd:",Rd,"k ohms and R2 is",round(R2,1),"M ohms"
print"value of gm is",gm,"mS and gmo is",gmo,"mS"
print"voltage amplification is",Av
values of Rs: 2.4 Kohms,Rd: 6.0 k ohms and R2 is 4.0 M ohms
value of gm is 2.5 mS and gmo is 5 mS
voltage amplification is -15.0

Example 3.17,Page number 174

In [2]:
import math

#Variable declaration
beeta=98.                          #current gain
rpi=1.275                          #dynamic resistance(k ohms)
Rb=220.                            #base resistance(k ohms)
Re=3.3                             #emitter resistance(k ohms)
Vcc=12.                            #supply voltage(V)
Vbe=0.7                            #base to emitter voltage(V)

#Calculations
#Part a
x=rpi/(1+beeta)
Av=Re/(Re+x)                     #voltage gain

#Part b
Zb=rpi+(1+beeta)*Re            #impedance(k ohms)
Zi=(Zb*Rb)/(Zb+Rb)             #input impedance(k ohms)
Zo=(Re*x)/(Re+x)               #output impedance(k ohms)

#Part c
Ib=(Vcc-Vbe)/(Rb+(Re*(1+beeta)))     #as Ie=(1+beeta)*Ib
Ic=beeta*Ib                         #collector current(mA)
rpi=beeta*(25/Ic)                   #dynamic resistance(k ohms)

#Results
print"voltage gain is",round(Av,3)
print"input impedance is",round(Zi,1),"KOhm and output impedance is",round((Zo/1E-3),1),"ohms"
print"value of Ic is",round(Ic,3),"mA"
print"value of rpi is",round((rpi/1E+3),3),"k ohms"
voltage gain is 0.996
input impedance is 131.7 KOhm and output impedance is 12.8 ohms
value of Ic is 2.026 mA
value of rpi is 1.21 k ohms

Example 3.18,Page number 176

In [4]:
from sympy import*
import math

#Variable declaration
Idss=16                           #drain current bias to zero(mA) 
Vp=-4                             #pinch off voltage(V)  
Rg=1                              #gate resistance(ohms)
Rs=2.2                            #sourse resistance(ohm)
Vdd=9                             #drain drain voltage(V)

#Calculations
#Part a
#Id=Idss*(1-(Vgs/Vp))**2
# putting value of Vgs=2.2*Id inequation of Id,we get
#Id**2-3.84Id+3.31   

Id=symbols('Id')
expr=solve(Id**2-3.84*Id+3.31,Id)
print expr
Id1=1.3    
Vgs=-Id1*Rs                                         #gate to source voltage(V)
gm0=-(2*Idss)/Vp                                    #transconductance(mS)
gm=gm0*(1-(Vgs/Vp))                                 #transconductance(mS)  
rm=1/gm                                             #transresistance(k ohms) 
Av=(Rs*gm)/(1+(Rs*gm))                              #voltage gain

#Part b
Zi=Rg                                               #input impedance(Mohms)
Zo=(Rs*rm)/(Rs+rm)                                  #output impedance(ohms)

#Results
print"voltage gain is",round(Av,3)
print"input and output impedences are",Zi,"Mohms and",round((Zo/1E-3),1),"ohms"
 [1.30648553399288, 2.53351446600712]
voltage gain is 0.834
input and output impedences are 1 Mohms and 365.7 ohms

Example 3.19,Page number 182

In [1]:
import math

#Variable declaration
Re=0.56                          #emitter resistance(k ohms)
beta=1600                        #current gain
R1=110                           #resistance(k ohms)
R2=330                           #resistance(k ohms)

#Calculations
#Part a
Av1=Re*(beta+1)               #voltage gain

#part b
Rb=(R1*R2)/(R1+R2)             #base resistance(k ohms)
Vs=(1.56/(Re*(beta+1)))+1       #source voltage(V) 
Avs=1/Vs

#part c
R=1+(1+beta)*Re                                    #resistance presented to Ib
I=Rb/(Rb+R)                                        #I=Ib/Ii 
Ai=(1+beta)*I                                      #current gain

#part d
Rl=10*10**3                             #load resistance(ohm)
Re1=(Re*Rl)/(Re+Rl)                     #emitter resistance(k ohms)
R1=1+(1+beta)*Re1                       #resistance presented to Ib(k ohms)
I1=Rb/(Rb+R1)                           #I1=Ib/Ii
Ai1=(beta+1)*I1                         #current gain
Av2=Re1*(1+beta)                        #voltage gain

#Results
print"a)voltage gain is",Av1
print"b)Avs is",round(Avs,2)
print"c)Ai is",round(Ai,2)
print"when output Vo1 feeds a load of 10 k ohms Ai is",round(Ai1),"and Av2 is",round(Av2)
a)voltage gain is 896.56
b)Avs is 1.0
c)Ai is 134.02
when output Vo1 feeds a load of 10 k ohms Ai is 134.0 and Av2 is 897.0

Example 3.20,Page number 184

In [13]:
#Variable declaration
beeta1=120.                       #current gain
beeta2=160.                      #current gain
Vcc=18                           #supply voltage(V)
Rc=0.1                           #collector resistance(ohms)
Rb=2*10**3.                       #base resistance(ohms)
Vbe=0.7                          #base to emitter voltage(V)

#Calculations
Ib1=(Vcc-Vbe)/(Rb+(beeta1*beeta2*Rc))#base current(uA)
Ib2=beeta1*Ib1                      #base current(mA)
Ie1=(beeta1+1)*Ib1                  #emitter current(mA)
Ic=Ie1+(beeta2*Ib2)                 #collector current(mA)
Vo=Vcc-(Ic*Rc)                      #output voltage(V)
Vi=Vo-Vbe                           #input voltage(V)

#Results
print"dc biased current is",round(Ic,1),"mA"
print"output voltage",round(Vo,2),"V"
print"input voltage",round(Vi,2),"V"
dc biased current is 85.3 mA
output voltage 9.47 V
input voltage 8.77 V

Example 3.21,Page number 191

In [4]:
import math

#Variable declaration
deltaId=2.                         #change in Id(mA)
deltaVgs=1.                        #change in Vgs(V)
deltaVds=5.                        #change in Vds(V)
Idss=10.                           #drain current biased to zero(mA)
Id=5.                              #drain current(mA)
Vp=-6.                             #pinch off voltage(V)

#Calculations
#Part a
gm=(deltaId)/(deltaVgs)            #transconductance(mS)
rds=(deltaVds)/(deltaId)           #resistance(k ohms)
gm0=-(2*Idss)/Vp                   #transconductance(mS)
gm=gm0*(math.sqrt(Id/Idss))        #transconductance(mS)

#Part b
R1=4.5                             #resistance(k ohms)
R2=2                               #resistance(k ohms)
Av=gm*((R1*R2)/(R1+R2))            #voltage gain

#Results
print"drain current biased to zero is",Idss,"mA and pinch off voltage is",Vp,"V"
print"value of gm and rds are",round(gm,2),"mS and",rds,"k ohms"
print"small signal amplifier gain is",round(Av,2)
drain current biased to zero is 10.0 mA and pinch off voltage is -6.0 V
value of gm and rds are 2.36 mS and 2.5 k ohms
small signal amplifier gain is 3.26

Example 3.22,Page number 193

In [5]:
import math

#Variable declaration
Idson=0.2
Vgs=5                      #gate to source voltage(V)
Vdd=12                     #drain voltage(V)
Vt=2                       #thevinine voltage(V)
R1=100.                    #resistance(k ohms)                               
R2=100.                    #resistance(k ohms)   
Rd=30                      #drain resistance(K ohms)
Rs=6                       #source resistance(k ohms)
deltaVdd=0.3               #change in Vdd(V)
rds=50                     #internal drain to source resistance()

#Calculations
#Part a
k=Idson/((Vgs-Vt)**2)              #device parameter
Vgg=Vdd*(R1/(R1+R2))               #gate voltage(V)
Vgs=4.89                           #gate to source voltage(V)
Id=k*(Vgs-Vt)**2                   #drain current(mA)
Vds=Vdd-((Rd+Rs)*Id)               #drain to source voltage(V)
gm=2*(math.sqrt(k*Id))             #transconductance(mS)
deltaVgg=deltaVdd*(R2/(R1+R2))     #change in Vgg(V)

vgs=0.105                          #as vgs=0.15-6id where id=u*vgs/(rds+Rs+Rd)=0.74vgs after solving
id= 0.074*vgs*10**3

#Results
print"id is",id,"uA"
id is 7.77 uA

Example 3.23,Page number 194

In [50]:
import math

#Variable declaration
deltaId=1                         #change in Id(mA)
deltaVgs=0.75                     #change in Vgs(V) 
rd=100                            #internal drain resistance(k ohms)
Rd=100                            #drain resistance(k ohms)
Vgs=2                             #as Vgs= 2sinwt                

#Calculations
gm=(deltaId)/(deltaVgs)           #transconductance(m)  
Vo=-gm*Vgs*((rd*Rd)/(rd+Rd))      # as Vi=2sin(w*t)

#Results
print"value of Vo is",round(Vo),"*sinwt mV"
value of Vo is -133.0 *sinwt mV

Example 3.24,Page number 195

In [60]:
#Finding resistance

#Variable declaration
Rd=4                 #drain resistance(ohms)
Rs=2.5               #ource resistance(ohms)      
R1=200*10**3         #resistance(ohms)
R2=100*10**3         #resistance(ohms)
gm=2.5               #transconductance(mS)
rd=60                #internal drain resistance(ohms)

#Calculations
#Part b
Ro=Rs/(1+(((1+gm*rd)*Rs)/(rd+Rd)))   #output resistance(ohms)

#Part c
Rd1=0                              #drain resistance
Ro1=Rs/(1+(((1+gm*rd)*Rs)/rd))     #output resistance(ohms)

#Results
print"value of Ro is",round(Ro/1E-3),"ohms"
print"value of Ro1 is",round(Ro1/1E-3),"ohms"
value of Ro is 362.0 ohms
value of Ro1 is 343.0 ohms

Example 3.25,Page number 196

In [35]:
#Variable declaration
beeta=100                      #current gain factor
Vbe=0.7                        #base to emitter voltage(V)
Rb=250                         #base resistance(k ohms)
Vee=10                         #emitter voltage(V)
Re=1                           #emitter resistance(k ohms)

#Calculations
Ib=(Vee-Vbe)/(Rb+1+beeta)       # solving Rb*Ib+Vbe+(Ic+Ib)=Vee and putting Ic+Ib=(1+beeta)Ib
Ic=beeta*Ib                     #collector current(mA)
rpi=beeta*(25/Ic)               #dynamic resistance(ohms)    
Vi=(rpi*Ib)+(1+beeta)*Re*Ib     #input voltage(V)
Ri=Vi/Ib                        #input resistance(k ohms)

#Results
print"value of Ri is",round((Ri/1E+1),1),"K ohms"
value of Ri is 104.5 K ohms

Example 3.26,Page number 197

In [6]:
#Variable declaration
beeta=125                       #current gain
gm=35                           #transconductance(mS)
Re=4                            #emitter resistance(k ohms)
Rb=1.5                          #base resistance(k ohms)

#Calculations
#Part a
rpi=beeta/gm                   #dynamic resistance(k ohms)
Ri=rpi+((1+beeta)*Re)          #input resistance(k ohms) 
Ro=((Rb+rpi)*Re)/((Rb+rpi)+((1+beeta)*Re))  #output resistance(ohms) as Ro=Vo/Isc

#Part b                                 
f=((1+beeta)*Re)/(Rb+rpi+((1+beeta)*Re))  #transfer function

#Results
print"value of Ri is",Ri,"K ohms and Ro is",round(Ro,4),"k"
print"transfer function is",round(f,2)
value of Ri is 507 K ohms and Ro is 0.0354 k
transfer function is 0.99

Example 3.28,Page number 199

In [8]:
#Variable declaration 
Vcc=16               #supply voltage(V)
Vc=12                 #collector voltage(V)
Ic=8                  #collector current(mA)
Ic1=12                
deltaIc=2000          #collector current(uA)
deltaVce=4            #collector emitter voltage(Vce) 
deltaIb=20            #base current(mA)       
Rl=2.                 #load reistance(k ohms)      

#Calculations
hfe=(deltaIc)/(deltaIb)
hoe=(deltaIc)/(deltaVce)
Rdc=Vcc/Ic                       #dc resistance(k ohms)
Rac=Vc/Ic1                       #ac resistance(k ohms)
Re=Rdc-Rac                       #emitter resistance(k ohms)
Rac1=(Rac*Rl)/(Rac+Rl)           #for load of 2kohms, Rc=Rac
Icq=Vcc/(Rac1+Rdc)               #Ic at operatingpoint(mA) 
Vceq=Vcc-(Icq*Rdc)               #Vc at operating point(V)

#Results
print"value of hfe and hoe are",hfe,"uS and",hoe,"uS"
print"value Rc and Re are",Rac,"k ohms and",Re,"k ohms resp."
print"value of Icq and Vce",Icq,"mA and",Vceq,"V resp."
 value of hfe and hoe are 100 uS and 500 uS
value Rc and Re are 1 k ohms and 1 k ohms resp.
value of Icq and Vce 6.0 mA and 4.0 V resp.

Example 3.29,Page number 200

In [20]:
#Variable declaration
hfe=120              #current gain
r1=1.5               #resistance(k ohms)
Vi=1                 #input voltage(V) 
hoe=50*10**-3        #output conductance with input open circuited
Rs=2                 #source resistance(k ohms)
Vbe=0.7              #base to emitter voltage(V)
Vcc=10               #supply voltage(V)
r3=0.33              #resistance(k ohms)
r4=5.8               #rsistance(k ohms) 
r5=27                #rsistance(k ohms) 
hoe=50*10**-3        #output conductance with input open circuited
    
#Calculations
#Part a
Vbb=Vcc*(r4/(r4+r5))          #voltage to bae(V)
Rb=(r5*r4)/(r5+r4)            # as Vbb-Vbe=RbIb+(hfe+1)Ib*R,here hfe=beeta
ib=(Vbb-Vbe)/(Rb+(hfe+1)*r3)  #instantaneous base current(mA)
hie=(0.02/ib)*10**3           
Ib=Vi/hie                    #base current(mA)
h=hfe*Ib
Avo=-h*r1                    #voltage gain

#Part b
r=1/hoe                #resistance(k ohms)
R1=(r*r1)/(r+r1)       #resitance(k ohms)
R=(R1*Rs)/(R1+Rs)      #resistance(k ohms)
Ib1=1/(Rs+R)          #base current(mA)
h1=hfe*Ib1
Avl=-h1*R             #voltage gain

#Results
print"hie and Avo are",round(hie),"and",round((Avo/1E-3),1)
print"Avl is",round(Avl,2)
hie and Avo are 837.0 and -215.1
Avl is -34.95

Example 3.30,Page number 201

In [34]:
#Variable declaration
Rl=20              #load resistance(ohms)
Vcc=30             #supply voltage(V)
beeta=150          #current gain 
Re=2200            #emitter resistance(ohms)  
Rb=350             #base resistance(k ohms) 
Vbe=0.7            #base to emitter voltage(V)
Is=10**-3          #source current(A) 
r1=2000            #resistance(ohms)

#Calculations
Ib=(Vcc-Vbe)/(Rb+(1+beeta)*Re)#base current(uA)
Ic=beeta*Ib                   #collector current(mA)
rpi=beeta*(25/Ic)             #dynamic resistance(ohms)   
R=(Re*Rl)/(Re+Rl)             #resistance(ohms)  
Ib1=17.95                     #round the base emitter(as Rb>>2 kohms,it it ignored)
Vl=(beeta+1)*Ib1*R            #load voltage(V)
Avl=Vl                              #Voltage gain
Il=Vl/Rl                            #load current(A)
Ail=Il/Is                           #current gain

#Results
print"overall voltage gain is",round((Avl/1E+3),2)
print"overall current gain is",round(Ail/1E+3)
overall voltage gain is 51.5
overall current gain is 2575.0

Example 3.31,Page number 202

In [9]:
#Variable declaration
Vcc=15             #supply voltage(V)
beeta=30           #current gain 
R=.47            #emitter resistance(ohms)  
Vbe=0.7            #base to emitter voltage(V)
Vo=5               #output voltage(V)

#Calculations
Vbb=Vcc/2                                   #base voltage(V)
'''
Vbb=(R1/2)*Ib+Vbe*2+(30Ib+Ic2)*R
Ic2=beeta*30Ib,so
Ic2=30*30Ib=900Ib
Vbb=(R1/2)*Ib+Vbe*2+(30+900)*R*Ib....(i)
(R1/2)*Ib+437*Ib=6.1.......(ii)
0.47*930Ib=5         #output voltage is given like this

'''
Ib=Vo/(R*930)    #from equation(i)

'''
substituting value of Ibin eq(ii) we get

'''
R1=((6.1-4.98)/0.0114)*2                     #resistance(k ohms)  
#Results
print"value of R1 is",round(R1),"K ohms"
value of R1 is 196.0 K ohms
In [ ]: