Parameter estimation of a set of ODE
조회 수: 7 (최근 30일)
이전 댓글 표시
I want to fit the parameters and in the following set of coupled differential equations:
where y, z and w depend on time and m is a constant, while P is a given set of data for every time, . The given (measured) data sets are and and I can obtain the set from them. I have tried to follow the procedure described in the Lorenz System example (see here: https://la.mathworks.com/help/optim/ug/fit-differential-equation-ode.html?lang=en) which uses the function lsqcurvefit, but I can't figure out how to include the time variation of the P data set.
Is there any other optimization tool or procedure that may help? Or how should I include the variation of P in the function?
Thanks in advance!
댓글 수: 0
답변 (1개)
Alan Weiss
2019년 10월 6일
I'm not sure how your function is given to MATLAB. But suppose that it is in a function file PofT.m. You simply have to include a call to PofT in your differential equation, like this:
function f = odef(t,a,m,sigma)
f(1) = a(3);
f(2) = a(3) - a(2)*abs(a(3));
f(3) = (1/m)*(PofT(t) - sigma(1)*a(2) - sigma(2)*f(2) + sigma(3)*a(3));
end
Or something to that effect. I used the response variable a = [y,z,w] and sigma having indices 1,2,3 instead of 0,1,2.
If you have measured then you will have to include a call to interp1 or some such function in your definition of for all times t.
Alan Weiss
MATLAB mathematical toolbox documentation
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!