Curve fitting thin film reflectance to extract optical parameters
8 ビュー (過去 30 日間)
古いコメントを表示
I am trying to fit experimental Reflectance data to Lorentz oscillator model but the fit is not matching the expirement data. Can you please suggest what I am doing wrong
The expression for relectivity from a thin film of thickness L is
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326210/image.png)
where
,
and n are reflective index of incoming medium (air ), substrate(SiO2) and the thin film respectively.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326215/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326220/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326225/image.png)
no=1;
and
is complex reflective index.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326230/image.png)
The reflectivity is then ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326235/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326235/image.png)
I am modelling the complex dielectric constant ϵ with Lorentz oscillators which gives
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326240/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326245/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326250/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326255/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326260/image.png)
I have experimental R vs E (energy in eV). I want to fit this experimental data to the above expression and find the fitting parameters.
%Resonant energy from experiment
E0=1.7226;
%Initial guess of fitting parameter
wp=0.707;
g=11.40*10^(-3);
e=10.8;
p0=[e wp g];
%Fitting of the experiment data
st=p0
opts = optimoptions(@lsqnonlin,'DiffMaxChange', 0.1,'FinDiffType', 'central', 'Display','off','MaxFunEvals',2E7,'TolFun',1E-18,'TolX',1E-300,'MaxIter',4E3);
%opts = optimoptions(@lsqnonlin);
opts.Algorithm = 'levenberg-marquardt'
x0 = st; % arbitrary initial guess
lb = 0.0*ones(size(st));
[p_estimated,resnorm,residuals,exitflag,output] = lsqnonlin(@(p)reflectance(I,E0,p) , x0, lb,[], opts)
%Function of the reflectance
function R = reflectance(I,E0,p)
ns=1.732; %reflective index of SiO2
E=linspace(min(I(:,1)), max(I(:,1)),length(I(:,1)));
E=E';
lambda=1240./E;
L=2*pi*0.6/(lambda);
I1=I(:,2);
e=p(1)+p(2).^2 ./(E0.^2-E.^2-1i.*E.*p(3));
n1=sqrt(e);
d=L*n1;
r=(n1.*(1-ns).*cos(d)+1i*(ns-n1.^2).*sin(d))./ (n1.*(1+ns).*cos(d)+1i.*(ns+n1.^2).*sin(d));
%r=(1-e)./((1+e)+2*1i.*sqrt(e).*cot(L.*sqrt(e)));
%r=(1-e)./(1+e);
R=abs(r).^2-I(:,2);
end
Below shown are plots of experiment data and data after fitting.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326265/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1326270/image.png)
I have attached the experimental data. First column is energy in eV and second is reflectance.
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Linear and Nonlinear Regression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!