fet1.m FET Characteristic curves and bias

Contents

A couple of plot commands

vg2;
set(0,'DefaultFigurePosition',[0,0,800,600]);


kp=50e-6;w=10e-6;l=2e-6;vt0=1;
vdaxis=0:0.1:15;
vgaxis=0:1:5;
[vd,vg]=meshgrid(vdaxis,vgaxis);
const=kp*w/l
VA=150;
lambda=1/VA;
vdd=12;
const =
   2.5000e-04

Saturation Current

idsat=const*(vg-vt0).^2/2;

Triode Current

idtriode=const*((vg-vt0).*vd-vd.^2/2);

Boundary

idboundary=const*vd.^2/2;

Actual current

id=idtriode.*(idtriode>=idboundary)+idsat.*(idsat<idboundary);
id=id.*(1+lambda*vd);
figure;plot(vdaxis,id*1e3);hold on;
xlabel('v_{DS}, Drain--Source Voltage, V');
ylabel('i_{D}, Drain Current, mA');

Curve for Current Mirror Transistor

% Saturation Current
idsatm=const*(vg-vt0).^2/2;

% Triode Current
idtriodem=const*((vg-vt0).*(vdd-vd)-(vdd-vd).^2/2);

% Boundary
idboundarym=const*(vdd-vd).^2/2;

% Actual current
idm=idtriodem.*(idtriodem>=idboundarym)+idsatm.*(idsatm<idboundarym);
idm=idm.*(1+lambda*(vdd-vd));
idm(vd>vdd)=0;

plot(vdaxis,idm(5,:)*1e3,'b-');
moose=axis;
plot(vdaxis,idboundary*1e3,'k--');grid on;
plot(vdaxis,idboundarym.*(vd<vdd)*1e3,'k--');grid on;
axis(moose);
hold off;

Plot for logic

kp=50e-6;w=10e-6;l=2e-6;vt0=0;
vdaxis=0:0.1:5;
vgaxis=0:1:5;
[vd,vg]=meshgrid(vdaxis,vgaxis);
const=kp*w/l
VA=150;
lambda=1/VA;
vdd=5;
const =
   2.5000e-04

Saturation Current

idsat=const*(vg-vt0).^2/2;

Triode Current

idtriode=const*((vg-vt0).*vd-vd.^2/2);

Boundary

idboundary=const*vd.^2/2;

Actual current

id=idtriode.*(idtriode>=idboundary)+idsat.*(idsat<idboundary);
id=id.*(1+lambda*vd);

Curve for Current Mirror Transistor

% Saturation Current
idsatm=const*(vg-vt0).^2/2;

% Triode Current
idtriodem=const*((vg-vt0).*(vdd-vd)-(vdd-vd).^2/2);

% Boundary
idboundarym=const*(vdd-vd).^2/2;

% Actual current
idm=idtriodem.*(idtriodem>=idboundarym)+idsatm.*(idsatm<idboundarym);
idm=idm.*(1+lambda*(vdd-vd));
idm(vd>vdd)=0;

Curve for Current Mirror Transistor

% Saturation Current
idsatm=const*(vg-vt0).^2/2;

% Triode Current
idtriodem=const*((vg-vt0).*(vdd-vd)-(vdd-vd).^2/2);

% Boundary
idboundarym=const*(vdd-vd).^2/2;

% Actual current
idm=idtriodem.*(idtriodem>=idboundarym)+idsatm.*(idsatm<idboundarym);
idm=idm.*(1+lambda*(vdd-vd));
idm(vd>vdd)=0;

figure;plot(vdaxis,id*1e3);hold on;
xlabel('v_{DS}, Drain--Source Voltage, V');
ylabel('i_{D}, Drain Current, mA');
plot(vdaxis,idm*1e3);
moose=axis;
plot(vdaxis,idboundary*1e3,'k--');grid on;
plot(vdaxis,idboundarym.*(vd<vdd)*1e3,'k--');grid on;
axis(moose);