Fitting PDE to estimate parameters
38 ビュー (過去 30 日間)
古いコメントを表示
Hello!
I am trying to fit my PDE to estimate two parameters. I've been using lsqnonlin and since it solves for the smallest SSE, the results are quite inadequate, for this case. Is there any other way to do this or am I going wrong somewhere.
4 件のコメント
Star Strider
2023 年 9 月 8 日
MATLAB has PDE solvers (an entire toolbox designed for that, as well as the pdepe function) and bvp4c and bvp5c for boundary value problems.
What are your original differential equations?
採用された回答
Star Strider
2023 年 9 月 8 日
I see one problem:
residual = Ccalc - Cexp;
that is easily fixed by using the norm function (here calculating the square root of the sum of squares):
residual = norm(Ccalc - Cexp);
resulting in a significant improvement in the estimated parameters. That then produces:
De =
0.0081
kf =
0.0024
which is correct for ‘De’ however is off by a factor of
for ‘kf’, since (as you mentioned) the original parameter estimates produce a good fit to the data, and the estimated value for ‘kf’ is 1000 times larger than the initial value for ‘kf’ that gives a good fit. I looked through your code, and I do not immediately see any error that could account for that discrepancy. I have to leave that to you.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1476921/image.png)
.
6 件のコメント
Torsten
2023 年 9 月 8 日
Convection (u) dominates diffusion (D_z) so drastically that you won't be able to fit D_z whatever you supply as data basis.
And I see you now have an adsorption isotherm taken off the hat. Why didn't you use it for your model including particle diffusion ? Did you think it's superfluous there ?
その他の回答 (1 件)
Shoresh Shokoohi
2023 年 9 月 8 日
Fitting a partial differential equation (PDE) to estimate parameters can be a challenging task, especially when using traditional least-squares methods like `lsqnonlin` that minimize the sum of squared errors (SSE). PDE parameter estimation often involves non-linear, ill-posed problems, and the choice of optimization algorithm and initial parameter estimates is crucial. Here are some suggestions for improving your parameter estimation process:
1. Choose a Suitable Optimization Algorithm**: While `lsqnonlin` is a commonly used optimization function in MATLAB, it may not always be the best choice for PDE parameter estimation. Consider trying different optimization algorithms that are specifically designed for complex and non-linear problems. Some alternatives include:
- Particle Swarm Optimization (PSO)**: PSO is a population-based optimization algorithm that can handle non-linear problems effectively.
- Genetic Algorithms (GA)**: GAs are another population-based optimization technique that can be useful for parameter estimation in PDEs.
- Pattern Search**: The `patternsearch` function in MATLAB is designed for optimization problems with non-linear constraints.
2. Properly Regularize the Problem**: Regularization can help stabilize parameter estimation in ill-posed problems. Consider adding regularization terms to your objective function to encourage smooth or sparse parameter estimates, depending on your prior knowledge about the parameters.
3. Properly Define the Objective Function**: Ensure that your objective function accurately represents the error between the PDE model and your experimental data. It's essential to properly implement the numerical solution of the PDE with the current parameter estimates and compare it to the observed data.
4. Initial Parameter Estimates**: The choice of initial parameter estimates can significantly impact the optimization process. Try different initial values, and consider using your domain knowledge or sensitivity analysis to make informed guesses.
5. Constraint Handling**: If your parameters have physical bounds, ensure that you impose appropriate constraints during optimization to keep the estimates within realistic ranges.
6. Data Preprocessing**: Preprocess your experimental data appropriately by addressing outliers and noise. Smooth or filter the data if necessary.
7. Convergence Criteria**: Adjust the convergence criteria for your optimization algorithm to ensure that it has sufficient iterations to find a good solution.
8. Global Optimization**: Consider using global optimization techniques, such as the Genetic Algorithm or Particle Swarm Optimization, which can explore a broader parameter space to find global minima.
9. Parallel Computing**: Depending on the complexity of your PDE and the optimization problem, you might benefit from parallel computing to speed up the parameter estimation process.
10. Expert Consultation**: If the problem remains challenging, consider consulting with experts in numerical optimization or PDEs for guidance.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Geometry and Mesh についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!