summaryrefslogtreecommitdiff
path: root/339/CH6/EX6.11/ex6_11.sce
blob: 22a522318f822ce9432c0e9232a56a2e0fc2c365 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//define problem parameters
Nd=1e18*1e6;
Vb=0.81;
eps_r=12.5;
d=50e-9;
dWc=3.5e-20;
W=10e-6;
L=0.5e-6;
mu_n=8500*1e-4;

//define physical constants
q=1.60218e-19;//electron charge
eps0=8.85e-12;//permittivity of free space

eps=eps_r*eps0;

//pinch-off voltage
Vp=q*Nd*d^2/(2*eps)

//threshold voltage
Vth=Vb-dWc/q-Vp

//drain-source applied voltage range
Vds=0:0.01:5;

//gate-source voltages
Vgs_r=-1:0.25:0;




for n=1:length(Vgs_r)
   Vgs=Vgs_r(n);
   Id=mu_n*W*eps/(L*d)*((Vds*(Vgs-Vth)-Vds.*Vds/2).*(1-(Vds>(Vgs-Vth)))+1/2*(Vgs-Vth)^2*(1-(Vds<=(Vgs-Vth))));
   plot(Vds,Id/1e-3);
   set(gca(),"auto_clear","off");
end;
   

title('Drain current vs. V_{DS} plotted for different V_{GS}');
xlabel('Drain-source voltage V_{DS}, V');
ylabel('Drain current I_{D}, mA');