Parameter fitting with a numerical solution

  • #1

hunt_mat

Homework Helper
1,775
27
Suppose I have some experimental data on the diffusion of some concentrate into a cylindrical medium. I don't a priori know the initial concentration or diffusion constant. I have some code to solve the PDE given in the cylindrical domain which solves the equation for given initial concentration and diffusion constant.

My initial thoughts was to do a parameter sweep and then once I have a matrix for this, so a least squares on the data and the numerical solution and do fminsearch on the resulting matrix.

I know that this is an incredibly inefficient method. I wondered if there was a clever way.
 

Answers and Replies

  • #2
Do you have the Global Optimization Toolbox? There are lots of tools in there to deal with this kind of problem. The general idea would not be to generate a bunch of solutions in advance, but to reduce the number of solutions of the PDE by calculating it selectively, refining the initial parameters depending on previous solutions.
 
  • #3
Do you have the Global Optimization Toolbox? There are lots of tools in there to deal with this kind of problem. The general idea would not be to generate a bunch of solutions in advance, but to reduce the number of solutions of the PDE by calculating it selectively, refining the initial parameters depending on previous solutions.

Unfortunately I don't. What I did in the end was simply do a parameter sweep. With a double loop. I stored the square differences in an array and did a search for the minimum.

It's not the smartest solution but it gave a reasonable fit. I wanted to know if there was a clever way to go about this?
 
  • #4
As the derivative is known, I recommend the Levenberg-Marquardt algorithm to both fit the data and find the unknown parameters.
 

Suggested for: Parameter fitting with a numerical solution

Replies
1
Views
601
Replies
2
Views
933
Replies
5
Views
474
Replies
13
Views
959
Replies
1
Views
557
Replies
1
Views
1K
Replies
4
Views
1K
Back
Top