필터 지우기
필터 지우기

Nonlinear fit to multiple data sets with shared parameters

조회 수: 3 (최근 30일)
Genius
Genius 2012년 11월 9일
Hi all, I have eight sets of voltage vs. current data at different temperatures, for example V vs I @20K , V vs I @ 100K. And I want to use this expression to fit all these eight data sets. V=V(I,T;Rs,T0,nf,Is)=I*Rs/(T-T0)+nf*ln(1+I/(Is*(T-T0)) In the expression, V is the depent variable, I and T is the indepent variables, Rs,T0,nf,Is are fitting parameters shared by all eight sets of data. So how can I do the fitting in Matlab?? Thank you all! Your help will be very appreciated !

답변 (2개)

Taniadi
Taniadi 2012년 11월 9일
I think to fit the data set, you can try to use least square method, that is to minimize the error between calculated value and the experimental value. You can use the 'lsqnonlin' or 'fminsearch' command in the optimization toolbox.

Star Strider
Star Strider 2012년 11월 9일
If you want to fit each data set for each temperature independently, this is probably the easiest way:
% Parameters: B(1) = Rs, B(2) = T0, B(3) = nf, B(4) = Is
beta0 = [1E+3; 10; 1; 1E-4].*rand(4,1);
Tv = linspace(20,100,8); % Temperature vector
for k1 = 1:length(Tv)
T = Tv(k1);
Vfcn = @(B,I) I.*B(1)./(T-B(2)) + B(3).*log(1 + I./(B(4).*(T-B(2))));
[Beta,R,J,CovB,MSE] = nlinfit(I, V, Vfcn, beta0);
end
Fitting all T, I and V values at once is possible but a bit more of a challenge.

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by