How can I minimize the difference between data from PDE script and experimental data set?

조회 수: 3 (최근 30일)
I have built a script to solve PDE of diffusion problem. I want to obtain some constants (D, k, and k_ads) by comparing the concentration profile from the experiment with the one from PDE. The concentration profile is in 1x10 array. Suppose I can make an objective function by (C_simulation-C_exp)^2, so how can I minimize it by automatically change the constants as can be done in Excel solver add-in? For clearer perception, I gave the script attached. C_simulation is function of Cp at x=0 at any t (-dC/dt=k*(C(t)-Cp(x=0,t)-> I integrate it first and substitute C(t) as function of Cp and C(t=0)). At this point, I confused how to build C_simulation array (to locate the Cp at x=0,any t and then perform optimization to get k_ads, K, and D. Thank you for the suggestions.

답변 (2개)

Alan Weiss
Alan Weiss 2017년 9월 27일
You can use fminsearch, or, if you have an Optimization Toolbox™ license, lsqcurvefit. See Nonlinear Data-Fitting.
Alan Weiss
MATLAB mathematical toolbox documentation
  댓글 수: 1
hardy stanley
hardy stanley 2017년 9월 28일
Dear Alan, Thank you for the reference. However, in my problem, only k is the explicitly related to the C and the others (D and k_ads) are implicit in the PDE. I do not know how to relate it into an explicit equation as showed in the example.
Thank you.
Regards, Hardy

댓글을 달려면 로그인하십시오.


Torsten
Torsten 2017년 9월 27일
Here is an example for parameter fitting in an ODE:
https://de.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitting
The procedure for a PDE is the same.
Best wishes
Torsten.
  댓글 수: 1
hardy stanley
hardy stanley 2017년 9월 28일
Dear Torsten,
Thank you for your help. However, the experimental data I got is concentration in the liquid (C) but the PDE is about concentration in the pores (Cp). So, I cannot directly fit it after the PDE is solved.
Regards, Hardy

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 PDE Solvers에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by