lsqnonlin parameter estimation performance

7 次查看(过去 30 天)
Hi There
I'm using lsqnonline to fit some data points to a chemical kinetic model (a set of differential equations). I'm testing the code based on the literature values already estimated and available. There are 7 parameters originaly which I cut down to 3 because of the lsqnonlin poor performance. So even by doing this and giving initial guess which is close to the true answer available, the solver fails. That means either it get stuck at the initial guess or if initial guess is a bit farther, it starts diverging giving complex numbers as the value for objective function. I've checked my objective function it returns reasonable values before hooking it to lsqnonlin.
I've tracked my objective function during the run and the progress is not good. The objective function is actually the scaled error (difference between data points and the prediction).
Also I test fmincon ,similar performance observed.I attached the code below any suggestion to make it faster and effective is appreciated:

回答(1 个)

Matt J
Matt J 2014-6-21
编辑:Matt J 2014-6-21
You have expressions like pH2^2.5 = (f(5)*PT/FT)^2.5 in your differential equations. If there is nothing to prevent f(5) from going negative, this will give complex-valued results.
I tend to wonder whether the System Identification Toolbox would be more appropriate for this kind of thing. Guidelines in this thread might also be useful. I found that experimenting with DiffMinChange did yield some descent. I'm not a big fan of that approach, however.
  1 个评论
Matt J
Matt J 2014-6-21
编辑:Matt J 2014-6-21
Note that your lb,ub arguments are defined as scalars. Since your unknown vector is not a scalar, you should be getting warnings about this. I imagine you intended this instead,
lb(1:3)=0;
ub=[];

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by