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.