In kalman filter, the elements of state transition matrix using fourth-order runge-kutta integration
6 views (last 30 days)
Show older comments
Hello all,
In a simple 1d object positioning state given accelerations, I would like to use fourth-order runge kutta method to transit state.
I know runge-kutta method is based on estimated rate/slope in the current, half step and a full step time, which calulates k1, k2, k3 and k4.
It is easy to calculate in vector form.
But how to represent it in matrix form?
I wonder how to get the elements in A which is required to calcuate the covariance in later step.
[pos(n+1);rate(n+1)] = A * [pos(n);rate(n)];
Since k2, k3, k4 are rates calculated based on k1 which is rate (n), how to get their coefficients in A?
Thank you in advance.
1 Comment
John D'Errico
on 26 Mar 2023
Why are you writing your own ODE solver? Use ODE45, or one of the other codes provided. If you don't know enough about how to write a code yourself from scratch, why do you think you will do a better job than a professional with both expertise in MATLAB and in numerical analysis?
Answers (1)
Paul
on 26 Mar 2023
Hi Chong-You,
It sounds like the system is linear and time invariant. In continuous time, the state dynamics are:
xdot(t) = Ac * x(t)
Then the A matrix for the discrete time propagation is
x(k+1) = A*x(k)
where A = expm(Ac*T) and T is the discretization time step.
Why is a Runge-Kutta integration needed?
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!