#(a) Program to find the mutual conductance gm.
ic=6*(10**-3) #Collector Current in ampere
vt=26*(10**-3) #vt=26mV at 300k is the voltage equivalent of temperature
gm=ic/vt #the mutual conductance is gm=(ic/vt)
print"The mutual conductance is gm(in mho)=",round(gm,2),"mho"
#(b) Program to find the input conductance gb and resistance R
hfe=120 #hfe= common-emitter current gain factor
gb=round(gm,2)/hfe #input conductance in mho
Ri=1/gb #Resistance in ohms
print"Input conductance gb(in mho)=","{:.2e}".format(gb),"mho"
print"Input resistance Ri (in ohms)=",int(Ri),"ohms"
#(c)Program to find the electron diffusion coefficient Dn
un=1600 #electron Mobility in cm2/V.s
Dn=un*vt # Dn=un*kt/q=un*26*(10**-3)
print"Electron diffusion coefficient Dn(in cm2/s)=",Dn,"cm2/second"
#(d)Program to find the diffusion capacitance Cbe
Wb=(10**-8) #cross sectional area in cm2
Cbe=(round(gm,2)*(Wb**2))/(2*Dn)
Cbe=Cbe/(10**-19)
print"Diffusion capacitance Cbe(in pF)=",round(Cbe,2),"pF"
#(a) Program to find the impurity desities in the emitter,base and collector regions
NdE=1*(10**19)
NaB=1.5*(10**17)
NdC=3*(10**14)
print"(a) The impurity densities (in cm-3)are :"
print "NdE=","{:.0e}".format(NdE),"cm-3 [the impurity density in the n-type emitter region]"
print "NaB=","{:.1e}".format(NaB,1),"cm-3 [the impurity density in the p-type base region]"
print "NdC=","{:.0e}".format(NdC),"cm-3 [the impurity density in the n-type collector region]"
#(b)Program_to_find_the_mobilities_in_the_emitter,base and collector_regions
upE=80
unE=105
upB=400
unC=1600
print"(b) The mobilities(in cm2/v*s)are :"
print"upE=",upE,"cm2/V.s [mobility in the emitter]"
print"unE",unE,"cm2/V.s [mobility in the emitter]"
print"upB",upB,"cm2/V.s [mobility in the base]"
print"unC",unC,"cm2/V.s [mobility in thecollector]"
#(c)Program to find the diffusion lengths in the emitter,base and collector regions
Vt=26*(10**-3) #voltage equivalent of temperature in volt
DpE=upE*Vt
DnE=unE*Vt
DpB=upB*Vt
DnC=unC*Vt
print"(c) The diffusion constants are computed to be:"
print"DpE=",DpE,"cm2/s"
print"DnE=",DnE,"cm2/s"
print"DpB=",DpB,"cm2/s"
print"DnC=",DnC,"cm2/s"
#(d)Program_to_compute_the_equilibrium_densities_in the emitter,base and_collector_regions
ni=1.5*(10**10)
pEo=(ni**2)/NdE
npB=(ni**2)/NaB
pCo=(ni**2)/NdC
print"(d) The equlibrium densities are:"
print"npB=","{:.1e}".format(npB),"cm-3"
print"pEo=","{:.2e}".format(pEo),"cm-3" #answer is wrong in book
print"pCo=","{:.1e}".format(pCo),"cm-3"
#(e)Program to compute the terminal currents
print"(e) The terminal currents are computed as follows:"
A=2*(10**-2) # cross-section_area
q=1.6*(10**-19)
W=(10**-5) #base_width
Le=(10**-4) #Diffusion_length_in_emitter
Ve=.5 #Emitter_junction_voltage
InE=-(A*q*DnE*(ni**2)*exp(Ve/Vt))/(NaB*W) #Ine=-(Aq*Dp*(ni**2)*(exp(Ve/Vt)-1))/(Le*Nd);
InE=InE/(10**-3);
print" the electron current in the emitter is InE(in mA)=",round(InE,4),"mA"
IpE=(A*q*DpE*(ni**2)*(exp(Ve/Vt)-1))/(Le*NdE) #Ipe=(A*q*De*peo*(exp(Ve/Vt)-1))/Le =(A*q*Dp*(ni**2)*(exp(Ve/Vt)-1))/(Le*Nd)
IpE=IpE/(10**-6)
print" the hole current in the emitter is IpE(in uA)=",round(IpE,3),"uA"
Ico=-(A*q*DnE*(ni**2)/(NaB*W))-(A*q*DpE*pEo)/Le
Ico=Ico/(10**-12)
print" the reverse saturation current in the collector is Ico(in pA)=",round(Ico,3),"pA"
InC=-(A*q*DnE*(ni**2)*exp(Ve/Vt)/(NaB*W))
InC=InC/(10**-3)
print" the electron current which reaches the collector is InC(in mA)=",round(InC,4),"mA"
IE=(-IpE*(10**-6))+(InE*(10**-3));
IE=IE/(10**-3);
print"the emitter current is IE(in mA)=",round(IE,3),"mA"
IC=(-Ico*(10**-12))-(InC*(10**-3));
IC=IC/(10**-3);
print"the collector current is IC(in mA)=",round(IC,3),"mA"
IB=(IpE*(10**-6))-[((InE*(10**-3)))-(InC*(10**-3))]+(Ico*(10**-12));
IB=IB/(10**-6);
print"the current in the base terminal is IB(in uA)=",round(IB,3),"uA"
print"NOTE: The recombination-generation currents in the spcae-charge regions are not counted"
#(a) Program to find the mobilities un and up
un=200
up=500
print"(a) The mobilities(in cm2/V.s )are read from Fig.A-2 in Appendix A as:"
print"un=",un,"cm2/V.s [for NdE=5*(10**18) cm-3]"
print"up=",up,"cm2/V.s [for Na=5*(10**16) cm-3]"
#(b) Program to find the diffusion coefficients Dn and Dp
Vt=26*(10**-3) #Vt=kt/q=voltage equivalent of temperature in volt
Dn=un*Vt
Dp=up*Vt
print"(b) The diffusion coefficients are:"
print"Dn=",round(Dn,2),"cm2/s"
print"Dp=",round(Dp,1),"cm2/s"
#(c) Program to find the emitter efficiency factor y
W=(10**-3) #Base width in cm
Le=(10**-2) #Emitter Length in cm
Na=5*(10**16) #Acceptor density in base region in /cm3
Nd=5*(10**18) #Donor density in emitter region in /cm3
y=1/(1+((Dp*Na*W)/(Dn*Nd*Le)))
print"(c) The emitter efficiency factor y=",round(y,3)
#(d) Program to find the transport factor B
Tn=10**-6 #electron lifetime in seconds
B=1-((W**2)/(2*Dn*Tn)) #transport factor
print"(d) The transport factor B=",round(B,3)
#(e) Program to find the current gain a
a=B*y
print"(e) The current gain a=",round(a,2)
import math
# Program to determine the maximum allowable power that the transisitor can carry
Xc=1 #Reactance in ohm
ft=4*(10**9) #Transit-time cut-off frequency in Hertz
Em=1.6*(10**5) #maximum electric field V/cm
Vx=4*(10**5) #saturation drift velocity in cm/sec
Pm=(((Em*Vx/(2*math.pi)))**2)/(Xc*(ft**2));
print"The maximum allowable power(in W) that the transisitor can carry is=",round(Pm,2),"W"
#(a) Program to determine the latice match present in percent
print"The latice match present is within 1%"
#(b) Program to find the conduction-band differential between Ge and GaAs
X1=4 #electron affinity of Ge in eV
X2=4.07 #electron affinity of GaAs in eV
AE=X1-X2
print"The conduction-band differential is(in eV)=",AE,"eV"
#(c) Program to find the valence-band differential between Ge and GeA
Eg2=1.43 #energy gap in GaAs in eV
Eg1=0.8 #energy gap in Ge in eV
Ev=Eg2-Eg1-AE
print"The valence-band differential is(in eV)=",Ev,"eV"
#(a) Program to compute the built-in voltage in the p-GaAs side
Na=6*(10**16) #Acceptor density in p-GaAs side /cm3
w02=-26*(10**-3)*log(Na/(1.8*(10**6)))
print"The built-in voltage(in V) in the p-GaAs side is=",round(w02,2),"V"
#(b) Program to compute the hole mobility
up=400
print"The hole mobility is =",up,"cm2/V.s"
#(c) Program to compute the hole diffusion constant
Dp=up*26*(10**-3)
print"The hole diffusion constant is Dp=",Dp,"cm2/s"
#(d) Program to compute the minority hole density in n-Ge region
ni=1.5*(10**10)
Nd=5*(10**18) #Donor density in n-Ge region in /cm3
pno=(ni**2)/Nd
print"The minority hole density (cm-3)in n-Ge is =",int(pno),"cm-3"
#(e) Program to compute the minority electron density in p-GaAs region
Na=6*(10**16) #acceptor density in p-GaAs region in /cm3
npo=((1.8*(10**6))**2)/Na
print"The minority electron density(in cm-3) in p-GaAs region is =",npo,"cm-3" #answer is wrong in book
#(f) Program to compute the hole diffusion length
tp=6*(10**-6) #hole lifetime in seconds
Lp=sqrt(tp*Dp)
print"The hole diffusion length(in cm) is =","{:.2e}".format(Lp),"cm"
#(g) Program to compute the emitter-junction current
A=2*(10**-2) #cross section cm2
VE=1 #bias voltage at emitter junction in Volt
q=1.6*(10**-19) #charge of electron in V
l=VE/(26*(10**-3))
I=(A*q*Dp*pno*(exp(l)-1))/(Lp)
print"The emitter-junction current(in A)is =",round(I,2),"A" #answer is wrong in book