フィルターのクリア

The below program is the Ids Vds characteristics of a DG MOSFET. and I am getting the error as Matrix dimensions must agree.. Please help me by fixing it

18 ビュー (過去 30 日間)
if true
clear all;
hfin=1;
tsi=20
W=2*hfin*tsi;
Vth=1;
Leff=180;
DIBL=1.127*(W\Leff);
vth=Vth-DIBL;
lambda=25*10^-5;
u=1360;
ld=0.1;
Ec=1.5*106;
Cox=60;
Vds=0:0.5:10;
vgs=input('ENTER THE Vgs in volts');
m=length(Vds);
for i=1:m
if vgs < Vth
current(1,i)=0;
elseif Vds(i) >= (vgs - Vth)
current(1,i)=0.5* (vgs - Vth)^2*(1+lambda*Vds(i));
elseif Vds(i) < (vgs - Vth)
current(1,i)=((vgs-vth)*Vds(i))- 0.5*(Vds(i)^2)*(2*W*u*Cox/(Leff-ld+(Vds/Ec))+lambda*2*W*Cox/(Leff-ld)^2);
end
end
plot(Vds,current(1,:),'b')
xlabel('Vds, V')
ylabel('Drain Current,A')
title('I-V Characteristics of a MOSFET')
end
  2 件のコメント
ES
ES 2014 年 1 月 7 日
編集済み: ES 2014 年 1 月 7 日
I think there is a small misunderstanding of the concepts.. MOSFET works in linear region for certain voltage ranges and then saturates in some other region.. So you need two equations to draw its characteristics.. That is
if Mosfet in Linear region:
use Linear region's equation.
else
use Saturation region's equation.
end
In your code you have given the equation for only the linear region..
In the previous links I had sent you in the number of threads you have opened, there were IF and ELSE logics to handle it. Please go through them. You should also add the logic in a similar way. The equations there, are different because they are different MOSFETs, but all MOSFETs basically operate the same way, as to having different regions of operations..
ARTI
ARTI 2014 年 1 月 7 日
Sir, now I have added but still the same error
if true
clear all;
hfin=1;
tsi=20
W=2*hfin*tsi;
Vth=1;
Leff=180;
DIBL=1.127*(W\Leff);
vth=Vth-DIBL;
lambda=25*10^-5;
u=1360;
ld=0.1;
Ec=1.5*106;
Cox=60;
Vds=0:0.5:5;
A=3;
vgs=input('ENTER THE Vgs in volts');
Vdssat=(vgs-vth)/(1+(vgs-vth)/(Leff*Ec))
F=1-log(1+exp(A*(1-Vds/Vdssat))/log(1+exp(A)))
m=length(Vds);
for i=1:m
if vgs < Vth
current(1,i)=0;
current1(1,i)=0;
elseif Vds(i) >= (vgs - Vth)
current(1,i)=((vgs-vth)*Vds(i)-0.5*(Vds(i)^2))*(2*W*u*Cox/(Leff-ld+(Vds/Ec))+lambda*2*W*Cox/(Leff-ld)^2);
elseif Vds(i) < (vgs - Vth)
current(1,i)=((vgs-vth)*F*Vdssat(i)-0.5*F*(Vdssat(i)^2))*(2*W*u*Cox/(Leff-ld+(F*Vdssat/Ec))+lambda*2*W*Cox/(Leff-ld)^2);
end
end
plot(Vds,current(1,:),'b')
xlabel('Vds, V')
ylabel('Drain Current,A')
title('I-V Characteristics of a MOSFET')
end

サインインしてコメントする。

採用された回答

ES
ES 2014 年 1 月 7 日
See the attached file and modified code..
clear all;
hfin=1;
tsi=20
W=2*hfin*tsi;
Vth=1;
Leff=180;
DIBL=1.127*(W\Leff);
vth=Vth-DIBL;
lambda=25*10^-5;
u=1360;
ld=0.1;
Ec=1.5*106;
Cox=60;
Vds=0:0.5:10;
vgs=input('ENTER THE Vgs in volts');
m=length(Vds);
for i=1:m
if vgs < Vth
current(1,i)=0;
current1(1,i)=0;
elseif Vds(i) >= (vgs - Vth)
current(1,i)=0.5* DIBL * ((vgs - Vth)^2)*(1+lambda*Vds(i));%Added DIBL
elseif Vds(i) < (vgs - Vth)
current(1,i)= DIBL*((vgs-Vth)*Vds(i) - 0.5*(Vds(i)^2))*(1+lambda*Vds(i)); %Simplified equation by approximation
end
end
plot(Vds,current(1,:),'b')
xlabel('Vds, V')
ylabel('Drain Current,A')
title('I-V Characteristics of a MOSFET')
  5 件のコメント
User _X
User _X 2021 年 12 月 20 日
A pretty useful and accurate code for the DG MOS!!
User _X
User _X 2021 年 12 月 20 日
I am trying to create the matlab code for the Ids - Vgs characteristics of a TG MOSFET, but I face several difficulties. Could I aks for help with this one?

サインインしてコメントする。

その他の回答 (1 件)

ES
ES 2014 年 1 月 7 日
編集済み: ES 2014 年 1 月 7 日
Fine that you have handled the linear and saturation region now..:) There were two small issues.. I have changed them below..
clear all;
hfin=1;
tsi=20
W=2*hfin*tsi;
Vth=1;
Leff=180;
DIBL=1.127*(W\Leff);
vth=Vth-DIBL;
lambda=25*10^-5;
u=1360;
ld=0.1;
Ec=1.5*106;
Cox=60;
Vds=0:0.5:10;
vgs=input('ENTER THE Vgs in volts');
m=length(Vds);
for i=1:m
if vgs < Vth
current(1,i)=0;
elseif Vds(i) >= (vgs - Vth)
current(1,i)=0.5* DIBL*(vgs - Vth)^2*(1+lambda*Vds(i));%Added DIBL
elseif Vds(i) < (vgs - Vth)
current(1,i)=((vgs-vth)*Vds(i))- 0.5*(Vds(i)^2)*(2*W*u*Cox/(Leff-ld+(Vds(i)/Ec))+lambda*2*W*Cox/(Leff-ld)^2);%Addedvds(i) instead of vds
end
end
plot(Vds,current(1,:),'b')
xlabel('Vds, V')
ylabel('Drain Current,A')
title('I-V Characteristics of a MOSFET')

カテゴリ

Help Center および File ExchangeParticle & Nuclear Physics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by