Parameter fitting with a numerical solution

In summary, the conversation discusses a method for finding unknown parameters in a diffusion experiment. The initial approach involved using a parameter sweep and then using least squares and fminsearch on the resulting matrix, but it was deemed inefficient. The suggestion of using the Global Optimization Toolbox was made, which would involve reducing the number of solutions by selectively calculating them. However, the person does not have access to the Toolbox and ended up using a parameter sweep with a double loop. This was not the most efficient solution, but it provided a reasonable fit. The conversation also mentions the possibility of using the Levenberg-Marquardt algorithm, which takes into account the known derivative, for a more efficient solution.
  • #1
hunt_mat
Homework Helper
1,782
32
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.
 
Physics news on Phys.org
  • #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
DrClaude said:
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.
 

Related to Parameter fitting with a numerical solution

1. What is parameter fitting with a numerical solution?

Parameter fitting with a numerical solution is a method used in scientific research to adjust the values of parameters in a mathematical model in order to make the model fit experimental data. It involves using numerical algorithms to find the best values for the parameters that result in the closest match between the model predictions and the observed data.

2. Why is parameter fitting with a numerical solution important?

Parameter fitting with a numerical solution is important because it allows us to accurately describe and understand complex systems or phenomena. By adjusting the parameters of a mathematical model to fit experimental data, we can gain insights into how the system works and make predictions about its behavior in different scenarios.

3. What are the steps involved in parameter fitting with a numerical solution?

The first step is to define the mathematical model and select the parameters that need to be fitted. Then, experimental data is collected and used to evaluate the model's performance. Next, a numerical algorithm, such as a least squares method, is used to adjust the parameter values and improve the fit. This process is repeated until a satisfactory fit is achieved. Finally, the fitted parameters are used to make predictions or draw conclusions about the system.

4. What are the advantages of using a numerical solution for parameter fitting?

Numerical solutions for parameter fitting offer several advantages. They provide a systematic and efficient way to optimize the parameters of a model, and they can handle complex, nonlinear relationships between the parameters and the model output. Additionally, numerical solutions can be automated, saving time and reducing human error.

5. Are there any limitations to parameter fitting with a numerical solution?

While parameter fitting with a numerical solution can be a powerful tool, it also has some limitations. It requires a good understanding of the system and the selection of appropriate parameters to be effective. Additionally, the accuracy of the results depends on the quality and quantity of the experimental data used. Finally, numerical solutions may not always find the global optimum, and multiple runs with different starting values may be needed to ensure a reliable fit.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
Replies
0
Views
485
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
0
Views
576
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
2
Replies
41
Views
8K
  • General Math
Replies
6
Views
830
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
  • Differential Equations
Replies
5
Views
2K
Back
Top