From: Charbel on
Hey everybody,
i'm trying to fit a data curve with a function that contains 8 unknown parameters.

Explanation:
for all these methods that i mentioned in the title, i guess they need initial values of X0 before starting the iterations. (X0 is the vectore that contains arbitrary values of the 8 unknown parameters needed for these methods can start iterations)

Problem:
Because this an 8 unknown parameters, so there must different solutions for my fitting my data curve. So when i change X0, and run the lsqcurvefit, i obtain another 8 other parameters but giving me the same simulation curve of the one before.
In other words, there's a lot of minimum in the least square method used, but the model can't succeed to find the optimal minimum. (in French: Il trouve chaque fois un minimum local, et non pas le minimum optimal).

Question:
is lsqcurvefit is wrong to use in my case? I need to find the same results ,whatever is the value of X0 that i fix.

To be honest, i only tried the lsqcurvefit, the others 2 i didn't try them yet.
I need ur advice so i don't wastre my time on the others.

The function used is the double Wiebe Function for Heat release rate. it contains exponential parts.

Best Regards.
CSA
From: Alan Weiss on
First, lsqnonlin and lsqcurvefit are exactly the same. lsqcurvefit is
simply a convenient way to call lsqnonlin.

Second, fmincon is less suitable than lsqcurvefit. fmincon requires some
constraints, and you didn't mention any. You could use fminunc, but it
would be slower and less reliable than lsqcurvefit. For more information
on choosing solvers, see
http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brhkghv-18.html#brhkghv-19

Third, since there are many local minima, I suggest you start your
minimization from a wide variety of initial points. If you have some
idea of a reasonable range for each component, such as a_i +- b_i, then
take start points as
(rand(8,1) - 0.5).*b*2 + a
or
a + abs(b).*randn(8,1)

Fourth, are you sure your model needs all 8 parameters? If there are
many equivalent fits, perhaps you could simplify your model.

Good luck,

Alan Weiss
MATLAB mathematical toolbox documentation

Charbel wrote:
> Hey everybody,
> i'm trying to fit a data curve with a function that contains 8 unknown parameters.
>
> Explanation:
> for all these methods that i mentioned in the title, i guess they need initial values of X0 before starting the iterations. (X0 is the vectore that contains arbitrary values of the 8 unknown parameters needed for these methods can start iterations)
>
> Problem:
> Because this an 8 unknown parameters, so there must different solutions for my fitting my data curve. So when i change X0, and run the lsqcurvefit, i obtain another 8 other parameters but giving me the same simulation curve of the one before.
> In other words, there's a lot of minimum in the least square method used, but the model can't succeed to find the optimal minimum. (in French: Il trouve chaque fois un minimum local, et non pas le minimum optimal).
>
> Question:
> is lsqcurvefit is wrong to use in my case? I need to find the same results ,whatever is the value of X0 that i fix.
>
> To be honest, i only tried the lsqcurvefit, the others 2 i didn't try them yet.
> I need ur advice so i don't wastre my time on the others.
>
> The function used is the double Wiebe Function for Heat release rate. it contains exponential parts.
>
> Best Regards.
> CSA
From: Charbel on
Alan Weiss <aweiss(a)mathworks.com> wrote in message <hb9op0$2d7$1(a)fred.mathworks.com>...
> First, lsqnonlin and lsqcurvefit are exactly the same. lsqcurvefit is
> simply a convenient way to call lsqnonlin.
>
> Second, fmincon is less suitable than lsqcurvefit. fmincon requires some
> constraints, and you didn't mention any. You could use fminunc, but it
> would be slower and less reliable than lsqcurvefit. For more information
> on choosing solvers, see
> http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brhkghv-18.html#brhkghv-19
>
> Third, since there are many local minima, I suggest you start your
> minimization from a wide variety of initial points. If you have some
> idea of a reasonable range for each component, such as a_i +- b_i, then
> take start points as
> (rand(8,1) - 0.5).*b*2 + a
> or
> a + abs(b).*randn(8,1)
>
> Fourth, are you sure your model needs all 8 parameters? If there are
> many equivalent fits, perhaps you could simplify your model.
>
> Good luck,
>
> Alan Weiss
> MATLAB mathematical toolbox documentation


Excuse Me for noot mentioning the lower bounds and upper bounds.
lb=[0;0;0;0;0;0;0];
ub=[1;20;20;50;20;20;150]
and there is 7 parameters not 8.
Actually i think we can fix some of these parameters, but i was hoping that the results of lsqcurvefit will help to find out what to fix.

Thank U for the explanation of the 3 functions. i thought that lsqnonlin is different from lsqcurvefit. i'll check ur url and if i didn't get it yet, i'll contact you again.

Best Regards.
CSA