Lsqnonlin doing too small steps and not moving from initial point during optimization
23 次查看(过去 30 天)
显示 更早的评论
I am using the lsqnonlin function to calibrate parameters of a ground heat conduction model. I am starting with one-parameter optimization. So far, I am using synthetic data to check the functioning of my model setup. I have a temperature field generated with certain ground thermal parameters combination ("true" parameter values). Then I change the value of one of the parameters ("modified" param. values) and I am trying to retrieve its "true" value by minimizing the residual between the temperature field calculated with true and modified parameter set. I do not add any noise so far to the temperature field simulated with modified target parameter.
The objective function for my parameter (here, the heat capacity of rock component of the ground) looks as on the picture below - it is not smooth. I know that the lsqnonlin searches for local minimum only, however, I believe that the algorithm should be able to overcome this kind of "spikes" in the cost function. In fact, no matter how close to the true parameter value I start the optimization, the lsqnonlin does not move at all from this starting point and the optimization does not progress at all. The objective function just looks this spiky all over the possible parameter values.
I am able to produce a very smooth cost function for the parameter when I adjust the settings of the pdepe solver (the AbsTol and RelTol settings), which I use for solving the heat equation. However, this comes for the cost of extremely long computation times which is not acceptable considering that the forward heat model calculation needs to run many times during the optimization. Therefore I am focusing on adjusting the settings of the lsqnonlin function to overcome the local minima and move to a minimum closer to the true value of calibrated parameter (CRock for the original temperature field = 2e6 [J/m3/K], my starting guesses ranging from 1.4e6 to 1.8e6).
During the lsqnonlin run, I am following the progress of the optimization using the Display option. I can see that the objective function value is not decreasing and the lsqnonlin is keeping to choose smaller and smaller steps, getting stuck even closer to the initial guess ("start" value).
I was trying to adjust lsqnonlin options such as the TolX, TolFun as stopping criteria and DiffMinChange setting, but nothing helps to force the lsqnonlin to make bigger steps to ignore these "spikes". I would be extremely grateful for any suggestions and advices since it is quite some time that I am struggling with this problem.
Sonia
1 个评论
PATHAN
2015-4-29
Same problem here. "Initial Point is the Local Minimum". No increment or decrement in the values. If you got an idea, I will appreciate if you hint us too. Regards P
采纳的回答
Alan Weiss
2013-10-23
There is some documentation on optimizing problems where the objective function is given by a simulation or integration. While it is very basic, perhaps some of the ideas there could help you.
Also, did you sum the squares in the objective function? lsqnonlin wants the objective not to contain the sum of squares.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
3 个评论
PATHAN
2015-4-17
编辑:PATHAN
2015-4-17
Hi Sonia, n Alan.... Do you solved your problem? I am trying the same. lsqnonlin is saying that "Initial point is the local minimum". I hope you may have gone throw lots of optimization stuffs, if you have any idea, please guide on this matter. Hope for motivating reply, and thanks in advance. #IRespectResearhers :-) PMG
更多回答(1 个)
David
2019-2-20
编辑:David
2019-2-20
Agree with most of the above although (not sure if parameter names have changed) the parameter in the options to modify is called 'FiniteDifferenceStepSize' rather than DiffMinChange . For me setting this to 1e-2 rather than the default of sqrt(eps) (i.e.1e-8) got it to actually do something rather than just not doing anything and saying that the initial point is (a local) optimal.
options=optimoptions('lsqnonlin','display','iter-detailed','FiniteDifferenceStepSize',1e-2);
[x,resnorm,residual,exitflag,output,lambda,jacobian]=lsqnonlin(fun,x0,lb,ub,options);
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surrogate Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!