Pdepe for heat conduction and in thermal parameters optimization. Non smooth cost function.
4 次查看(过去 30 天)
显示 更早的评论
I am having a problem with use of Matlab´s pdepe solver that I am not sure of origin. I would like to ask if anybody encountered anything similar or how to possibly explain the features I am seeing.
I have set up a heat conduction model for freezing ground. At this stage, I am doing an optimization of ground thermal properties using measured and simulated ground temperature data. To check the setup of my model, at first, I am using synthetic "measurements" without noise to fit my simulations to. I generate a temperature field using certain ground thermal parameters (so called "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. As said, I do not add any noise so far to the temperature field simulated with the modified target parameter. Also, for now, I am only changing and optimizing for one parameter at once.
My problem is that when I plot the objective function for this optimization problem - the sum of squares between the temperature field generated with "true" and "modified" parameter set - it is not smoothly decreasing, as I would expect - see the picture below. The x-axis shows "modified" values of parameter CRock used for computation of "modified" temperature field that was compared to the "true" temperature field at each step where there is the *.
This objective function represents a problem for consequent optimization using the lsqnonlin solver, which gets stuck in all those local minima that are visible on the cost function plot. Therefore I would like to get rid of the "spikes".
So far, I haven´t found a good explanation why these jags in the cost function appear and a likely explanation of this feature is my actual question. I would expect the cost function to be smoothly decreasing as the target parameter approaches its "true" value. [here, the "true" CRock = 2e6 J/m3/K, the cost function being evaluated on the range of "modified" CRock values 1.4e6:2000:1.42e6] I am guessing that it might be related to the number of iterations taken by the pdepe solver when searching for the solution to the heat equation. I am guessing that at the points where the "spikes" appear, the pdepe solver might be taking an extra iteration comparing to the point before. I can eliminate some of the spikes by adjusting the RelTol and AbsTol of the pdepe solver far below their default values. However, this very much increases the computation time which is not acceptable for my application where the heat model needs to run many times during the optimization.
So far, I managed to overcome the actual optimization problem by using a different optimization algorithm - fminsearch instead of lsqnonlin. However, fminsearch appears not to be recommended choice for problems that are sums of squares. It also takes more iterations than lsqnonlin to converge. The lsqnonlin should be designed for my kind of problem. However, so far, I can´t apply as due to the shape of my cost function, it does not move from provided initial starting point.
Any hints will be greatly appreciated.
0 个评论
回答(1 个)
Alan Weiss
2013-10-25
编辑:Alan Weiss
2013-10-25
Sonia, did you try setting DiffMinChange and DiffMaxChange to 1e3 and 1e4 respectively? Your plot makes it appear as if you might need to take very large finite difference steps.
Alan Weiss
MATLAB mathematical toolbox documentation
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Heat and Mass Transfer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!