Anyone please help in correcting my code for Id vs Vgs of AlN\GaN HEMT
조회 수: 7 (최근 30일)
이전 댓글 표시
I have tried fir Id vs Vgs of hemt, but I am not getting correct result. Please check my code once.
code:
clear all;
E0=8.85e-12;
Eoxide=(9*E0);
toxide=6e-9;
coxide=(Eoxide/toxide);
dit=1.2e12;
q=1.6e-19;
gamma=(1/(1+dit*q/coxide));
nd=1.5e16;
daln=6e-9;
fim=(5.1*1.6e-19);
xaln=(1.9*1.6e-19);
fi0=(3.4*1.6e-19);
fis0=(gamma*(fim-xaln)-(gamma*q*nd*daln/coxide));
sigmapol=3.38e17;
sigmaaln=3.38e17;
Ealn=(10.78*E0);
detaEc=(0.343*1.6e-19);
Vt=fis0-detaEc-(sigmapol*q*daln/Ealn);
cq=3.436e15;
ceq=(coxide*cq/coxide+cq);
mu=0.09;
g=33.3;
vgs=-2:0.5:2;
m=length(vgs);
for i=1:m
current(1,i)=((mu*ceq/2)*(g)*(vgs(i)-Vt)^2);
%Simplified equation by approximation
end
plot(vgs,current(1,:),'b')
xlabel('Vgs, V')
ylabel('Drain Current,A')
title('I-V Characteristics of a hemt')
I am getting this result
댓글 수: 0
답변 (1개)
sai charan sampara
2023년 10월 4일
Hello Nudrat,
I understand that you are trying to plot “Id” vs “Vgs” curve using pre-defined parameters and formula but getting an error.
cq=3.436e15;
ceq=(coxide*cq/coxide+cq);%This line has an error%
mu=0.09;
g=33.3;
This is because there is an error in the line 21 of the code. In line 21 while calculating “ceq” MATLAB uses BODMAS and first performs division of “cq” and “coxide”. Hence the value of “ceq” you are getting is abnormally large.
It can be fixed as follows using parenthesis:
ceq=(coxide*cq/(coxide+cq));
This fixes the value of “ceq” and thereby the graph.
Also, as you are using “current” as an array in the for loop, consider pre allocating it for faster execution of the code.
Hope this helps.
Thanks,
Charan.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Filter Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!