Damped oscillation fit We have some measurement data like this:  
 
The expected behavior of the data is a damped oscillation:
$$y=a e^{d*t} cos(\omega t+\phi) + k$$
Where:
$t$ Current time
$y$ Current deflection  
$a$ Amplitude
$d$ Damping factor
$\omega$ Angluar velocity
$\phi$ Phase shift
$k$ Offset
The task is to fit the 5 parameters to match the real data.
Our current approch does the following:
- Find start values for all 5 parameters
- Place the values into a system of equations
- Iterate until the error gets below a given value
In most cases this works well. But in some cases it fails (breaking after 100 iterations). Now there are two possible options:
1) Suppose that the data is 'too bad' and give up
2) Find a better solution
Does anyone have a idea of different ways to solve this?

The figure 1 below shows the result of an attempt to fit the experimental curve with the expected equation. 
The scanning of the graph yielded a data of about 360 points. Taking only the first 60 points, the fitting is rather good (thick black curve). But soon the computed curve becomes more and more far from the other experimental points (thin red curve).
This draw to think that the phenonena is more complicated and cannot be correctly model with the expected function. Some additional and relatively important terms probably appear. The constant term (noted $\lambda_0$ on the figure) seems of relatively low importance at the beginning, but more visible later.

The method used for the fitting is described  page 49 and top of page 50 in the document :  http://fr.scribd.com/doc/14674814/Regressions-et-equations-integrales
On this paper, the constant term (noted here $\lambda_0$ ) doesn’t exists (4 parameters regression). A small modification allows to introduce this additional parameter. So, in fact,  the computation was done with the 5 parameters. 
With the expected function, it works properly only for the begining of the experiment. If all the points are taken into account, the fitting fails completely, which tends to confirme that the expected function is not convenient to model all the experiment.
