• Create Account

Inferiarum

Member Since 02 Dec 2009
Offline Last Active May 21 2015 04:13 PM

In Topic: Kalman filter without using matrix inverse

13 September 2013 - 01:20 AM

I you are using lapack to do the linear algebra stuff, the functions dpotrf and dpotrs will do what you need here.

In Topic: Kalman filter without using matrix inverse

13 September 2013 - 01:11 AM

Kalman filter predict/update equations are here:

https://en.wikipedia.org/wiki/Kalman_filter

I have implemented the Kalman filter and it works nicely.  However,  the standard Kalman equations are written naively in terms of the matrix inverse.  In particular, the S matrix (innovation covariance) is inverted in order to compute K (the gain matrix):

S = H P H^t + R
K = P H^t S^{-1}

The gain matrix (K) is finally used to update the state estimate (x) and estimated covariance of the state (P) as follows:

x += K y
P -= K H P

I would like to update 'x' and 'P' without computing the matrix inverse S^{-1}.

In the following reference, a method is given "for calculating (H P H^t + R)^{-1} H in the conventional Kalman filter without explicitly computing an inverse." (using U D U^T, or LDL^t)  Of course, (H P H^t + R)^{-1} is equal to S^{-1}, but this confuses me because "S^{-1} H" does not appear in the computation of K....and so, it is not clear to me, how the value of S^{-1}H can be used to compute K.

Reference:
'Kalman Filtering; Theory and Practice Using MATLAB', second edition, by Grewal and Andrews
(click the second link)

You have K = P H^t S^{-1} = P X^t, where X is the solution to the linear system of equations

S X = H

now this could be solved by calculating X = S^-1 H which is, however, not the most efficient solution.

Since in your case S is positive definite, you can use the Cholesky decomposition to solve it.

In Topic: Projection matrix confusion

31 May 2013 - 09:03 AM

You cannot use a matrix to project onto a box like that.
A projection matrix projects onto a linear subspace e.g. a plane.

edit: You should probably ignore this answer ...

In Topic: A Daft Statement

28 May 2013 - 02:23 AM

I did not get the point of this thread and the supposedly daft statement.

What are you trying to tell us?

Maybe you should give an example or something.

In Topic: Player Movement

27 May 2013 - 12:20 PM

How do you resolve the collision?

Lets say the player is penetrating a plane.

If you push the player out in direction of the plane normal it should slide down slopes on its own, which is probably not what you want.

If you push the player out vertically, it will stay in position and gravity should also not affect the movement speed.

PARTNERS