Need help with correcting the code below

조회 수: 11 (최근 30일)
Rizbi
Rizbi 2017년 10월 8일
댓글: Rizbi 2017년 10월 9일
Hello,
I am trying to plot this curve but failing to do so. I want to plot Vth as a function of shiM (3.5:0.25:5.5)
But maybe I am not using my for loop correctly. Could anyone please have a look? I really need help. Here is the code:
clc;
mo= 9.11e-31;
mn= 1.1*mo
mh=0.5*mo
k=1.3e-23;
T=300;
Eg=1.166*1.6e-19 %%Eg=1.166ev
h=6.63e-34
q= 1.6e-19;
alpha= 0.000473*q
B=636;
Na= 1e21; %%unit in meter cube,,, we have to change it for (b)
X=4.1*q %%%electron affinity value in eV CHECK
tox= 0.6e-9; %%in meter .. i took tox=0.6nm
eps0 = 8.85e-12;
Kox = 3.95; %%%oxide dielectric constant
Ks = 11.7;%%%semiconductor dielectric constant
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Nv= 2*((2*3.142*mh*k*T)/h^2)^1.5
Nc= 2*((2*3.142*mn*k*T)/h^2)^1.5
ni=sqrt(Nc*Nv)*exp((-Eg)/(2*k*T))
Egt= Eg- ((alpha*(T^2))/(B+T))
shiF= k*T* log(Na/ni) %%%joules
shiS= abs(X+ (Eg/2)+ shiF) %%joule
Cox= (Kox * eps0)/tox
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
i=1;
for shiM=3.5*q:0.25*q:5.5*q %%%assumed
shiMS(i)= abs(shiM - shiS) %%joule
%%now calculatetion of Vth
Vth= abs(shiM - shiS)+ (2*shiF) + sqrt(4*q*Ks*eps0*Na*shiF)/Cox %%unit in volts
i=i+1;
end
shiM=3.5*q:0.25*q:5.5*q
plot(shiM, Vth, '-*r')
title('Threshold voltage vs given parameter curve'), xlabel('phiM'), ylabel('Threshold voltage')

채택된 답변

Walter Roberson
Walter Roberson 2017년 10월 8일
Change
Vth= abs(shiM - shiS)+ (2*shiF) + sqrt(4*q*Ks*eps0*Na*shiF)/Cox %%unit in volts
to
Vth(i) = abs(shiM - shiS)+ (2*shiF) + sqrt(4*q*Ks*eps0*Na*shiF)/Cox %%unit in volts

추가 답변 (1개)

Rizbi
Rizbi 2017년 10월 8일
Yes I did but the result looks like this attached. maybe there is still some problem. COuld you please help me?
  댓글 수: 2
Walter Roberson
Walter Roberson 2017년 10월 8일
Yes, that is what your formula leads to. For the K'th entry, your formula gives approximately
abs(4.0e-20*K - 2.851588058088316e-19) + 0.000000000001044453337529677
Rizbi
Rizbi 2017년 10월 9일
okay thank you.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Semiconductors and Converters에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by