Ode15s getting stuck at certain parameter combinations

1 view (last 30 days)
I am optimizing for thermal parameters of a heat model. I am using lsqnonlin for nonlinear parameter optimization and pdepe (which apparently calls ode15s solver) for heat transfer calculation. As the lsqnonlin updates the parameter combination (4 parameters), at some times, the pdepe function gets stuck. In the sense that normal calculation lasts for around 1min, but the "stuck" calculation goes on endlessly without producing solution and preventing the lsqnonlin from continuing the optimization. If I understand the problem right, this happens because the pde solver is stuck in endless loop and is incapable of finding a solution that satisfies the error tolerances...? The only "solution" I could find is to break the calcuation (Ctrl+C). Consequently I have to either relax the tolerances (AbsTol and RelTol) or modify the parameter values, so that the parameter combination doesn´t cause trouble to the ode15s solver. However, my starting parameter values are result of initial approximation, thus I do not like to change these starting values for lsqnonlin.
My question is, am I understanding the cause of the problem right? Or is there an another explanation to what´s happening? And, is the above the only solution?
I found similar problem in this feed: http://www.mathworks.com/matlabcentral/answers/67124-ode15s-get-stuck-randomly but there wasn´t possible explanation to why this is happening and how to get around it.
Thanks for any hints!
Sonia

Answers (0)

Community Treasure Hunt

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

Start Hunting!