i need help writing a code for this problems in mathlab. Plot Id versus VDS on a
ID: 3566299 • Letter: I
Question
i need help writing a code for this problems in mathlab.
Plot Id versus VDS on a single graph for the following set of gate voltages: OV,0.2V, 0.4V, 0.6V, 0.8V. Plot over the range of VDS = 0 .. 1.5 V. Vs=0 V. Use the following parameters: mu 350 cm2/s tox 3 nm epsilon ox 3.9 epsilon o 8.854*10-14F/cm W 0.5 mum L 90 nm VT 0.35 V What operating region is best if you wanted to make a current source? I.e., you want to make a device with a constant current that is independent of voltage. Warning: Watch your units!Explanation / Answer
mu=350;
tox=3e-7;
eps_ox=3.9;
eps_0=8.854e-14;
W=0.5e-4;
L=90e-7;
Vt=0.35;
Vds=linspace(0,1.5,100);
count=1;
color=['r','k','b','c','g'];
Id=zeros(1,100);
for Vg=[0 0.2 0.4 0.6 0.8]
if Vg<=Vt
for k=1:100
Id(k)=0;
end
else
Vsat=Vg-Vt;
for k=1:100
if Vds(k)>Vsat
Id(k)=(mu*eps_ox*eps_0*W/(2*tox*L))*Vsat^2;
else
Id(k)=(mu*eps_ox*eps_0*W/(2*tox*L))*(2*Vsat*Vds(k)-Vds(k)^2);
end
end
end
plot(Vds,Id,color(count))
count=count+1;
hold on
end
hold off
legend('Vg=0','Vg=0.2','Vg=0.4','Vg=0.6','Vg=0.8');
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.