Parameter estimation of a set of ODE
7 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Alan Weiss
on 6 Oct 2019
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 Comments
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!