#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)
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"
#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)
#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)"
#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)
#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)
#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"
#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),"%"
#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"
#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),"%"
#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"
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"
#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."
#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"
#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"
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
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"
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"
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)
#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"
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)
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"
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"
#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"
#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"
#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)
#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."
#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)
#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)
#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"