Convergence Problem with lsqnonlin

10 views (last 30 days)
Mehr Markazi
Mehr Markazi on 8 Oct 2013
Commented: Matt J on 8 Oct 2013
Hi there,
I have to model a complex reactions system. During my work I have to optimize and estimate some parameters (reaction rate constants) using “lsqnonlin- Least square Non-linear Method”. The problem is that when I do optimization and use the estimated parameters for the model, the behavior of the model is worse than that of before optimization. I mean the estimated parameters make the model gives worse results than that of before optimization. In fact, “lsqnonlin” does not converge and the program stops because of different reasons like limitation of iteration, tolerance X or tolerance function.
Would you please let me know what I should do to solve the problem?
Thanks in advance for any recommend and suggestion.

Accepted Answer

Matt J
Matt J on 8 Oct 2013
Edited: Matt J on 8 Oct 2013
Some typical causes,
  1. You could have a bug in your objective function code. It isn't computing what you think it does.
  2. You may have chosen bad tolerance values or scaled your objective function poorly in relation to those tolerances.
  3. Your initial guess x0 is not near enough to the solution you want.
  2 Comments
Mehr Markazi
Mehr Markazi on 8 Oct 2013
Thank you for prompt answer.
1. I am sure the objective function code goes in right way. I have checked it. For example with a graph which shows the error vs. the number of iteration.
2. I am not sure about the tolerance. Would you please let me know how I should choose the proper tolerance?
3. I have tried different initial guesses. I have also used "MultiStart" method to start from multiple start points.
Matt J
Matt J on 8 Oct 2013
Edited: Matt J on 8 Oct 2013
Thank you for prompt answer.
1. I am sure the objective function code goes in right way. I have checked it. For example with a graph which shows the error vs. number of iteration.
That doesn't sound like good evidence. A graph vs. the unknown parameters would be the meaningful check. Did you check that the function is zero for zero when given the true parameters?
2. I am not sure about the tolerance. Would you please let me know how I should choose the proper tolerance?
If the value of the objective function changes by a crazy large number like 10^8 in response to a small change in the parameters, that is a sign of bad scaling. Similarly, a crazy small change in response to a large change in parameters is bad too.
3. I have tried different initial guesses. I have also used "MultiStart" method to start from multiple start points.
You could have chosen badly.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!