Clear Filters
Clear Filters

Is the solver 'lsqnonlin' boundary dependent?

1 view (last 30 days)
Runze Zhang
Runze Zhang on 31 Jan 2022
Commented: Runze Zhang on 2 Feb 2022
Hello everyone,
I 'm trying to use 'lsqnonlin' to solver an overdetermined equation system. But I found that the final results are really dependent on the lower and upper boundary. So that means if I want to get the precise values, I should tighten the boundary to a very small interval. But in practice we can't know the exact boundary very precisely. So my question is that is 'lsqnonlin' really so boundary dependent as I guessed and if there is any other boundary independent solver recommended if possible?
Thanks in advance!
Runze

Answers (2)

Benjamin Thompson
Benjamin Thompson on 31 Jan 2022
Looking at the documentation for lsqnonlin, there are options for solving a problem with or without boundaries on the input variables. Solving nonlinear problems can be difficult, you may need to try a different approach on the initial guess, use simulated annealing repeating with a range of initial guesses, or try an evolutionary approach that optimizes a set of guesses from one iteration to the next.
  1 Comment
Runze Zhang
Runze Zhang on 1 Feb 2022
Thanks for your answer, Benjamin! Yes, I'm trying what you adviced and hope that makes sense.

Sign in to comment.


John D'Errico
John D'Errico on 1 Feb 2022
This is unlikely to be the case of lsqnonlin being "boundary dependent". That is not true in my experience. It is more likely a case of the estimation problem being poorly posed. Do you have large residuals, or is the problem nearly singular, etc.? lsqnonlin is basically just an optimizer, that is applied to a specific class of objectives, so a sum of squares of residuals, optionally with bound constraints. If the problem is a difficult one, it will have a problem. But then you are likely to also have similar problems with other solvers as applied to the same problem.
My guess is there are multiple solutions to the problem, all of which are nearly as good as any other in that set, so when you change things, it finds a subtly different solution. If any solution is as good as any other, then it really does not matter which one you get in the end. Thiose solutions will typically lie along some path in the parameter space, effectively a long, flat, probably curved valley in the objective function.
  1 Comment
Runze Zhang
Runze Zhang on 2 Feb 2022
Yes, you are right. Since the system is rather complex, if you run the script pure mathematically, you can get many solutions, some of them have even better precision than our desired result.

Sign in to comment.

Categories

Find more on Get Started with Optimization Toolbox in Help Center and File Exchange

Tags

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!