Solve the differential eqation and then implement nonlinear least square?
2 次查看(过去 30 天)
显示 更早的评论
I have 3 dimentional positional data of a pitched baseball.
I would like to estimate the acceleration from the data but I want to avoid differentiating the positional data.
Therefore, I am wondering if I can get the instant acceleration without differentiation of the positions.
The, I firstly tried to fit the data with differential equations model and to determine the coefficients of each term.
The differential equations model were as follows:
diff(rx(t),t,2) == K*sqrt(diff(rx(t),t)^2+diff(ry(t),t)^2+diff(rz(t),t)^2)*(CL/(w)*(diff(rz(t),t)*wy-wz*diff(ry(t),t))-CD*diff(rx(t),t));% X-component
diff(ry(t),t,2) == K*sqrt(diff(rx(t),t)^2+diff(ry(t),t)^2+diff(rz(t),t)^2)*(CL/(w)*(diff(rx(t),t)*wz-wx*diff(rz(t),t))-CD*diff(ry(t),t));%Y-component
diff(rz(t),t,2) == K*sqrt(diff(rx(t),t)^2+diff(ry(t),t)^2+diff(rz(t),t)^2)*(CL/(w)*(diff(ry(t),t)*wx-wy*diff(rx(t),t))-CD*diff(rz(t),t));%z-component
%where rx,ry,rz are each component of the ball position.
%CL and CD are drag and lift coefficients.
%K is the constant value.
%w is the magnitude of the angular velocity and wx, wy, and wz are each of components of the angular velocity.
I tried to solve the differential equations yet there were no positive answers so I guess the equations should be solved numerically.
When I get the equations, which is like "rx(t)=", I guess I could fit the positional data what I have.
I am not good at math so the way I try might be entirely wrong so if there is any possible way to answer my question, it would be great, so please help me get a any hints.
Kind regards,
6 个评论
Torsten
2018-3-7
编辑:Torsten
2018-3-7
In my opinion, working directly on the data is the way to go.
If you want to fit parameters within your model to best approximate your data, you will have to couple an ODE solver and a curve-fitting tool.
I suggest you study Star Strider's reference example:
https://de.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitting
Best wishes
Torsten.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!