-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMobilityCalc.m
120 lines (105 loc) · 3.42 KB
/
MobilityCalc.m
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
function [muSat, muLin] = MobilityCalc(varargin)
% MOBILITYCALC calculates the mobility in the saturation regime
%
% Calculates the mobility in the saturation regime by a linear
% fit to sqrt(Isd) over the last 20V of the data range.
%
% USGAE:
% MOBILITYCALC() - prompts user for data file and parameters
% MOBILITYCALC(data) - prompts user for parameters
% MOBILITYCALC(data, param) - calculates mobilities from given inputs
% MOBILITYCALC(data, param, 'plot',1) - plots fit curves
%
% INPUT:
% data.x - vector with gate voltage data for x.axis
% data.Id - matrix with drain current data
% data.Vstep - vector with drain voltage steps
% param - structure containing channel width W, length L,
% dielectric thickness d and dielectric constant epsilon
%
% OUTPUT:
% muSat - saturation mobility in cm^2/Vs
% muLin - linear mobility in cm^2/Vs
% Vth - threshold voltage in V
%
% Sam Schott, 06.10.2017
% ss2151@cam.ac.uk
%
%% check which input data is given
if nargin > 0 && isstruct(varargin{1})
data=varargin{1};
else
data=FETDataRead;
if isempty(data)
return;
end
end
if nargin > 1 && isstruct(varargin{2})
par=varargin{2};
else
par.dummy=0;
end
Plot = 1;
for i=1:nargin
if ischar(varargin{i})
if strcmp(varargin{i},'plot')
Plot=varargin{i+1};
end
end
end
if strcmp(data.type,'transfer')==0
error('Data has the wrong format. Please select a file with transfer characteristics.');
end
if isfield(par,'W')==0
par.W=input('Please give the channel width W in m: ');
end
if isfield(par,'L')==0
par.L=input('Please give the channel length L in m: ');
end
if isfield(par,'C')==0
par.C=input('Please give the dielectric capacitance per unit area in F/m^2: ');
end
if isfield(par,'Vfit')==0
par.Vfit=input('Please give the voltage interval for the monility fit in V: ');
end
%% Process data
% determine the number of gate voltage points
nPoints=length(data.x)/2;
data.Id = abs(data.Id); data.Ig = abs(data.Ig);
% Average data over forward and backward sweep
VgAVG=(data.x(1:nPoints,:)+flipud(data.x(nPoints+1:2*nPoints,:)))./2;
IdAVG=(data.Id(1:nPoints,:)+flipud(data.Id(nPoints+1:2*nPoints,:)))./2;
% Take sqrt of drain current
SqrtIdAVG=sqrt(IdAVG);
SqrtId=sqrt(abs(data.Id));
%% Calculate saturation mobility
if par.Vfit > max(abs(VgAVG))
error('Please choose a fit interval that is smaller than the maximum gate voltage.');
end
% find beginning and end of fit interval
StartN = nPoints - sum( abs(VgAVG)>=(max(abs(VgAVG))-par.Vfit) );
% linear fit to SqrtId
fitpars = polyfit(VgAVG(StartN:end),SqrtIdAVG(StartN:end,2),1);
% calculate saturation mobility in cm^2/Vs form slope of SqrtId
muSat=2*10000*par.L*fitpars(1)^2/(par.W*par.C);
% plot fit curve
if Plot==1
figure(1);
plot(VgAVG,fitpars(1)*VgAVG+fitpars(2),':k');hold on;
plot(data.x,SqrtId);axis([min(data.x) max(data.x) 0 1.1*max(max(SqrtId))]);
hold off;
end
%% Calculate linear mobility
FitNumber=nPoints-sum(abs(VgAVG)>=max(abs(VgAVG))-par.Vfit); % determine interval of curve for linear fit
VdLin=data.Vstep(1);
fitpars = polyfit(VgAVG(FitNumber:end),IdAVG(FitNumber:end,1),1);
muLin=abs(10000*par.L/(par.C*par.W)*1/VdLin*fitpars(1));%in cm^2/Vs
% plot fit curve
if Plot==1
figure(2);
plot(VgAVG,IdAVG);
hold on;plot(VgAVG,fitpars(1)*VgAVG+fitpars(2),':k');
axis([min(data.x) max(data.x) 0 max(max(IdAVG))]);
hold off;
end
end