# Two Exponential Decay Fit

I’m trying to fit data with two exponential decay function plus y-offset.
I’m using 5 variable parameters.

function = par[0]*exp(-x/par[1])+par[2]*exp(-x/par[3])+par[4]

But, I got a problem.
This is my error message from ROOT.

Warning in : Abnormal termination of minimization.
FCN=11.2854 FROM MIGRAD STATUS=CALL LIMIT 1638 CALLS 1639 TOTAL
EDM=1.90899e-05 STRATEGY= 1 ERR MATRIX NOT POS-DEF
EXT PARAMETER APPROXIMATE STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 N0_{1} 6.39464e-01 6.88392e-01 6.62436e-03 -2.07597e-01
2 tau_{1} 4.52286e+03 4.57698e+03 1.99429e-02 -3.32837e-03
3 N0_{2} 8.25802e-01 8.42403e-01 7.51460e-03 -2.47577e-01
4 tau_{2} 5.29552e+03 1.19968e+04 2.08785e-03 -3.90478e-02
5 Y-Offset 8.89952e-01 2.91969e+00 -2.60190e-03 -1.30026e+00

How can I solve the message of “Abnormal termination of minimization” ?

Function has exponential term, therefore chisquare is divergent.
I removed one exponential term,
" function = par[0]*exp(-x/par[1]) + par[2] "
This reduced function is divergent too.

In the case of single exponential,
" function = par[0]*exp(-x/par[1]) "
I can make linear function with log form, therefore I can fit very easily.

In my case, how can I fit ?? Is there any comment?

I also get this strange message about “abnormal termination” from time to time.
It even happens when the initial values of parameters are close to the “real ones” but as soon as I set them to a rather “crazy” values, the fit converges.
Well, it may sound weird but, it really helps when one significantly changes initial values of parameters.
So, try to play with them.
Maybe changing the order of parameters would help, too (but I haven’t tried it in my case).
Something like:
function = par[0]+par[1]*exp(-x/par[3])+par[2]*exp(-x/par[4])

I tried to fit data with the suggested function of

function = par[0]+par[1]*exp(-x/par[3])+par[2]*exp(-x/par[4]).

But, I got same messages whenever I fit.

I think that this function can’t fit data with mathematical reason.

(y - y_offset )=N0*exp(-x/t)
Because of y_offset, this function can have large mount of fit parameters.
In addition, those parameters can have good Chisquare.
Therefore, fitting algorithm can’t minimize chisquare.

Hi,

you should set the initial fit parameters to values as close as possible to the fitted ones. You might also try to
constraint some of them to avoid to go in non-physical regions. Also sometimes one can try to fix first some of the parameters to reasonable value, and then re-fit later leaving them floating.

Best Regards

Lorenzo