Borrar filtros
Borrar filtros

Nonlinear fit to multiple data sets with shared parameters

3 visualizaciones (últimos 30 días)
Genius
Genius el 9 de Nov. de 2012
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 !

Respuestas (2)

Taniadi
Taniadi el 9 de Nov. de 2012
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 el 9 de Nov. de 2012
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.

Categorías

Más información sobre Get Started with Curve Fitting Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by