ni = 1.5*10**10
Na = 10**18
Nd = 10**17
kBT=0.026
e = 1.6*10**-19
Vbi= (kBT)*((log((Na*Nd)/ni**2)))
print"The built in voltage of a p+n diode is ,Vbi=","{:.2e}".format(Vbi),"V"
h=.25*10**-4
apsilen = 11.9*8.85*10**-14
Vp= (e*(h**2)*Nd)/(2*apsilen)
print"The total volage drop required to pinch the channel is ,Vp= ","{:.2e}".format(Vp),"V"
VG= Vbi-Vp
print"The pinch off at gate bias is ,VG= ","{:.2e}".format(VG),"V"
# Note : due to different precisions taken by me and the author ... my answer differ
phi_b=0.8
T=300.0
kBT=0.026
R_star=8.0
Dp=20.0
pn = 3.38*10**-5
e = 1.6*10**-19
Lp=1*10**-4
# for Schottky case Js = R_star*T**2*(exp(-(phi_b)/(kBT)))
Js = R_star*T**2*(exp(-(phi_b)/(kBT)))
print"The gate current density is ,Js =","{:.2e}".format(Js),"A/cm**2"
# from p-n diode theory Jo = (e*Dp*pn)/(Lp)
Jo = (e*Dp*pn)/(Lp)
print"The gate current density is ,Jo =","{:.2e}".format(Jo),"A/cm**2"
ni = 1.5*10**10
Nc = 4.45*10**17
Nd = 10**17
kBT=0.026
e = 1.6*10**-19
h=0.25*10**-4
apsilen = 13.2*8.85*10**-14
Vh = 0.8
Vp= (e*(h**2)*Nd)/(2*apsilen)
print"The total volage drop required to pinch the channel is ,Vp= ",round(Vp,1),"V"
Ecf= -(kBT)*(log(Nd/Nc))
print"The difference between the conduction band and fermi level is ,Ecf=","{:.2e}".format(Vbi),"V"
Vbi= Vh-Ecf
print"The built in potential is ,Vbi= ","{:.2e}".format(Vbi),"V"
VGS= Vbi-Vp
print"The pinch off at gate bias is ,VT=",round(VGS,1),"V"
Nd = 10**17
e = 1.6*10**-19
apsilen = 13.1*8.85*10**-14
Vbi = 0.76
h= sqrt((2*apsilen*Vbi)/(e*Nd))
print"The thickness at which the value of Vp is same at Vbi is ,h=","{:.1e}".format(h),"cm"
Nc = 4.45*10**17
Nd = 10**17
kBT=0.026
e = 1.6*10**-19
h=0.06*10**-4
apsilen = 13.2*8.85*10**-14
Vh = 0.8
Vp= (e*(h**2)*Nd)/(2*apsilen)
print"The total volage drop required to pinch the channel is ,Vp=","{:.1e}".format(Vp),"V"
Ecf= -(kBT)*(log(Nd/Nc))
print"The difference between the conduction band and fermi level is ,Ecf=","{:.2e}".format(Ecf),"V"
Vbi= Vh-Ecf
print"The built in potential is ,Vbi=","{:.2e}".format(Vbi),"V"
VG= Vbi-Vp
print"The pinch off at gate bias is ,VG=","{:.2e}".format(VG),"V"
mu_n=6000
phi_b=0.8
kBT=0.026
e = 1.6*10**-19
h=0.25*10**-4
Nd = 5*10**16
Nc = 4.45*10**17
L = 2*10**-4
Z = 25*10**-4
apsilen = 13.2*8.85*10**-14
VGS1 = 0
VGS2 = -1
Vbi = (phi_b-(kBT*(log(Nc/Nd))))
print"The built-in voltage is ,Vbi =","{:.2e}".format(Vbi),"V"
Vp= (e*(h**2)*Nd)/(2*apsilen)
print"The internal pinch off potential is ,Vp=",round(Vp,2),"V"
go=(e*mu_n*Nd*Z*h)/(L)
print"The value of go of the channel is ,go=","{:.2e}".format(go),"ohm**-1"
ID_sat = go*((Vp/3)-Vbi+((2*(Vbi**1.5))/(3*(Vp**.5))))
print"The value of saturation voltage is ,ID_sat =","{:.2e}".format(ID_sat),"V"
ID1 = go*((Vp/3)-Vbi+VGS2+((2*((Vbi+abs(VGS2))**1.5))/(3*(Vp**.5))))
print"The value of saturation current at VGS1 is ,ID(sat) =","{:.2e}".format(ID1),"A"
gm_sat= go*(1-((Vbi/Vp)**.5))
print"The value of saturation conductance at VGS1 is ,gm_sat=","{:.1e}".format(gm_sat),"S"
gm_sat= go*(1-((((Vbi+abs(VGS2))/Vp)**.5)))
print"The value of saturation conductance at VGS2 is ,gm_sat=","{:.2e}".format(gm_sat),"S"
# Note : due to different precisions taken by me and the author ... my answer differ
Nd = 5*10**16
L = 2*10**-4
apsilen = 13.2*8.85*10**-14
VDS1 = 1.0
VDS2 = 1.5
VGS1 = 0
ID=4.03
dL1 = sqrt((2*apsilen*VDS1)/(e*Nd))
print"The change in channel length is ,dL (VDS(sat)+1 V) =","{:.2e}".format(dL1),"cm"
dL2 = sqrt((2*apsilen*VDS2)/(e*Nd))
print"The change in channel length is ,dL (VDS(sat)+1.5 V) =","{:.1e}".format(dL2),"cm"
ID1 = ID*(1+(dL1/(2*L)))
print"The current at the bias is ,ID1(VDS(sat)+1 V) =",round(ID1,2),"mA"
ID2 = ID*(1+(dL2/(2*L)))
print"The current at the bias is ,ID2(VDS(sat)+1.5 V) =",round(ID2,2),"mA"
rDS = (VDS2-VDS1)/((ID2-ID1)*10**-3)
print"The output resistance of source drain channel is ,rDS =","{:.2e}".format(rDS),"ohm"
# Note : due to different precisions taken by me and the author ... my answer differ
mu_n=1000
e = 1.6*10**-19
h=0.5*10**-4
Nd = 10**16
L = 2*10**-4
apsilen = 11.9*8.85*10**-14
Vs = 10**7
fT = (e*mu_n*Nd*(h**2))/(2*math.pi*apsilen*(L**2))
print"The maximum cutoff frequency of the device in the constant mobility model is ,fT =","{:.2e}".format(fT),"Hz"
fT = Vs/(2*math.pi*L)
print"The maximum cutoff frequency of the device in the saturation velocity model is fT =","{:.2e}".format(fT),"Hz"
VDS =0.5
h=1*10**-4
ID=4.03
F = VDS/h
print"The electric field in channel is ,F =","{:.2e}".format(F),"V/cm"
Vsi = 5*10**6
VGaAs = 10**7
Ttr1 = h/Vsi
print"The transit time of electrons in silicon is ,Ttr(si) = ","{:.2e}".format(Ttr1),"s"
Ttr2 = h/VGaAs
print"The transit time of electrons in GaAs is ,Ttr(GaAs) =","{:.2e}".format(Ttr2),"s"
fT1 = 1.0/(2*math.pi*Ttr1)
print"The corresponding frequency of silicon is ,fT(Si) =","{:.2e}".format(fT1),"Hz"
fT2 = 1.0/(2*math.pi*Ttr2)
print"The corresponding frequency of GaAs is ,fT(GaAs) =","{:.2e}".format(fT2),"Hz"
VB = 100.0
FSi=3*10**5
FGaAs=4*10**5
FSiC=3*10**6
Vsi = 10**7
VGaAs = 10**7
VSiC = 2*10**7
LBSi = VB/FSi
print"The minimum channel length at which Si material will breakdown is ,LBSi = ","{:.2e}".format(LBSi),"cm"
LBGaAs = VB/FGaAs
print"The minimum channel length at which GaAs material will breakdown is ,LBGaAs =","{:.2e}".format(LBGaAs),"cm"
LBSiC = VB/FSiC
print"The minimum channel length at which SiC material will breakdown is ,LBSiC =","{:.2e}".format(LBSiC),"cm"
fT1 = Vsi/(2*math.pi*LBSi)
print"The corresponding cutoff frequency of silicon is ,fT(Si) = ","{:.1e}".format(fT1),"Hz"
fT2 = VGaAs/(2*math.pi*LBGaAs)
print"The corresponding frequency of GaAs is ,fT(GaAs) =","{:.1e}".format(fT2),"Hz"
fT3 = VSiC/(2*math.pi*LBSiC)
print"The corresponding cutoff frequency of SiC is ,fT(SiC) =","{:.2e}".format(fT3),"Hz"