フィルターのクリア

Estimate differential equation parameters

13 ビュー (過去 30 日間)
Alessandro Antonini
Alessandro Antonini 2013 年 1 月 31 日
Dear all,
I need to estimate a parameter of a second order differential equation. This equation is a law of the displacement of a floating body. I know a solution in time domain coming from the experimental investigation but the roblem are the values of the parameters. Is there any function to estimate a differetial equation parameters?
Thanking in advance
Alessandro Antonini

採用された回答

Shashank Prasanna
Shashank Prasanna 2013 年 1 月 31 日
You can set up an optimization problem to 'fit' your ode to the experimental data for certain parameters that minimize the error between the fitted and real data.
Here is a link in the documentation that explains how to go about this: http://www.mathworks.com/help/optim/ug/optimizing-a-simulation-or-ordinary-differential-equation.html
  3 件のコメント
Shashank Prasanna
Shashank Prasanna 2013 年 2 月 1 日
編集済み: Shashank Prasanna 2013 年 2 月 1 日
Ok, at this point i am assuming you know how to set up an ode and solve it using ODE45, if you are not sure then please look through some examples in: http://www.mathworks.com/help/matlab/ref/ode45.html
I am going to assume you ode function is 'odefun' as in some examples in the link, but with an extra parameter p passed by the optimizer.
Create your objective function such that it minimizes the error between your fitted ode result for a given parameter(s) p.
function err = odefit(exp_t,exp_y,p)
[t,y] = ode45(@(t,y)odefun(t,y,p),exp_t,0) % i am using y0=0 you can choose whatever.
err = sum((y-exp_y).^2); % compute error between experimental y and fitted y
end
p_estimate = fminsearch(@(p)odefit(exp_t,exp_y,p),p0);
Choice of optimization function is left to you and some dangers are listed in the link i gave in the previous post.
Alessandro Antonini
Alessandro Antonini 2013 年 2 月 1 日
Yes I know how set up ODE. Thanks

サインインしてコメントする。

その他の回答 (1 件)

Matt J
Matt J 2013 年 1 月 31 日
編集済み: Matt J 2013 年 1 月 31 日
If it's a linear differential equation with constant unknown coefficients, just evaluate both sides of your differential equation at lots of time points. This will result in a linear system of equalities in the unknown parameters x(i), representable in matrix/vector form as
A*x=b
Then solve by doing x=A\b.

カテゴリ

Help Center および File ExchangeNumeric Solvers についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by