Get $a_1$, $a_2$, $b_1$, $b_2$ from $a_1 \times \exp{b_1 \times x} - a_2 \times \exp{b_2 \times x}$

57 Views Asked by At

I have experimental data which follow the function below. $$f(x) = a_1 e^{-b_1 x} - a_2 e^{-b_2 x} + \epsilon$$ ($a_1$, $b_1$, $a_2$, $b_1$ are all positive real numbers. $\epsilon$ represents experimental error)

What I'd like to do is to estimate $a_1$, $b_1$, $a_2$, $b_2$ from the data. These are crucial for evaluating physical properties of samples.

If this was a function like $y = ax + b$, these constants could be estimated using linear regression model. However, this one is tricky. I've been dealing with this problem and haven't found an answer yet.

I tried Fourier transform to convert it to an easier form, which didn't work well.

Does anyone have a solution for this issue?

2

There are 2 best solutions below

1
On

There are methods for non-linear parameter estimation, discussed in any numerical analysis textbook. Basically you define an error function, usually $e(a1,a2,b,b2)=\sum (f(x_i)-d_i)^2$ where $x_i$ are the points at which you have data and $d_i$ are the data points. You then minimize this function over the four variables. Your problem can be badly conditioned so it becomes hard to estimate the values-there are combinations of the variables that to not increase the error function much. Probably you can get more specific recommendations over at cross validated. There is a discussion and code in chapter 10 of Numerical Recipes, with obsolete versions free. I don't know if that is considered state of the art.

6
On

Fitting data to a model which is a linear combination of exponential functions can be extremely difficult. Nonlinear regression is easy provided good starting values of the parameters. I shall try to give you a small trick to try to find acceptable estimates.

The model being $$y= a_1 e^{-b_1 x} + a_2 e^{-b_2 x}$$ the nonlinearity comes from $b_1,b_2$. If they were known, the problem would be simple since corresponding to a linear regression $y=a_1 z_1+a_2 z_2$ with $z_1=e^{-b_1 x},z_2=e^{-b_2 x}$. So, consider the error function $$\Phi(b_1,b_2)=\sum_{i=1}^n \Big(a_1 e^{-b_1 x_i} + a_2 e^{-b_2 x_i}-y_i\Big)^2=\sum_{i=1}^n \Big(a_1 z_{1i} + a_2 z_{2i}-y_i\Big)^2$$ Just compute the function over a grid of values for $b_1,b_2$; for every couple, you need to perform the linear regression. Locate the area where the function is minimum. For the "best" couple $(b_1,b_2)$, recompute the corresponding $(a_1,a_2)$.

This preliminary step can easily be performed using Excel.

Once you have the starting values, you are ready for the full nonlinear regression and you could even do it using Excel solver.