Fitting multiple exponential function .
26 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Saroj Poudyal
il 7 Giu 2023
Commentato: Saroj Poudyal
il 7 Giu 2023
I am trying to fit my experimental data with the following function, where T is temperature and rest all are fitting parameter.
I am using following matlab code for fitting.
fun = @(x)shibita_fitting(x,data)
x0=[8000 2000 0.1 10^3 0.5 10^3 0.1];
bestx = fminsearch(fun,x0)
where fitting function is defined as
function sse = shibita_fitting(x,data)
a = x(1);
d=x(2);
e1=x(3);
c1=x(4);
E1=x(5);
c2=x(6);
E2=x(7);
T=data(:,1);
I=data(:,2);
I_new=a* (1+d*exp(-e1./T))./(1+c1*exp(-E1./T)+c2*exp(-E2./T));
sse = sum((I - I_new).^2);
The result of fitting is displayed below. The fitting is following the trend but it is not able to reproduce the kink near T=50.
Please suggest.
3 Commenti
Mathieu NOE
il 7 Giu 2023
are you sure your model is capable of reproducing that kink ?
also , on complex models, fminsearch is very sensitive to x0 values. If you are a bit too off, the convergence is poor
you may have to use a more robust tool.
Risposta accettata
Alex Sha
il 7 Giu 2023
@Saroj Poudyal, the result you obtained is not the best one, refer to the global optimization solution below:
Sum Squared Error (SSE): 1481189.88030936
Root of Mean Square Error (RMSE): 145.464275452741
Correlation Coef. (R): 0.996415848858336
R-Square: 0.992844543856079
Parameter Best Estimate
--------- -------------
x1 6850.52907094882
x2 602297.690775148
x3 565.832984121765
x4 8348759.66056058
x5 679.004219138599
x6 9.35098845248168
x7 70.2264432550839
4 Commenti
Alex Sha
il 7 Giu 2023
@Saroj Poudyal The global optimization algorithm does not need to guess the initial start-value of each parameter, at least in theory, but can obtain the global optimization solution, although in practical applications it is often far from the ideal result. However, for complex fitting problems, it is still helpful to choose the global optimization algorithms.
Matlab contains a global optimization toolbox, you can try various global optimization algorithms included, such as genetic algorithms, etc., but personal experience, the power of Matlab's global optimization toolbox is still relatively weak, and needs continuous improvement.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Optimization Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!