I'm trying to understand how I can update a Kalman filter with a state variable for position and velocity when I only measure position. I have a covariance matrix of the position measurements. But what does the overall covariance matrix of the measurements look like where velocity is unmeasured?

It seems that zeros would send the gain with respect to velocity to favor the measurement, which would drive the velocity estimates toward whatever value I input for the velocity measurements.

I have a similar problem where I am trying to fuse alternating measurements where I either have X and Y but no Z or X and Z but no Y. I would expect a single filter to fuse the two sets of measurements if I do this right, but I don't have a full grasp on how to handle to covariance terms involving the unmeasured property.


2 Answers 2


But what does the overall covariance matrix of the measurements look like where velocity is unmeasured?

That's a meaningless question -- if you're really not measuring velocity, then by definition it has no immediate impact on the measurements.

The covariance that matters is the filter's state covariance matrix $P$ in Wikipedia's notation. It encodes the effect of the system's state transition matrix ($F$).

When you compute the error between the filter's predicted output and its actual output, that error can be ascribed to a mix of random noise in the measurement and to state error. When you compute the Kalman gain ($K$), that is computed in part from the state covariance matrix -- so it encodes how the measurement error should be apportioned between the states.

So, each step of the way, when you compute $K$, you're answering the question "what's the best way to use this measurement error to update my states?".

In the case of alternating measurements, you model $H$ as being time varying. So if you measure X, you get the best way to apply an error between the actual and the predicted X to the state estimate. Then, when you measure Y, again, you get the best way to apply that error to the state estimate.

  • $\begingroup$ Thanks, Tim. I had to slap my forehead after reading your explanation of the role of H. That resolved a lot of questions. I should have known this! $\endgroup$
    – Jim
    Mar 3, 2021 at 17:36
  • $\begingroup$ Oh, how obvious things can be once they're pointed out! $\endgroup$
    – TimWescott
    Mar 3, 2021 at 17:51

This is exactly where the Dynamic Model comes into play.
The whole idea of the Kalman Filter is that you have a model which connects between variables which are measured to those which are not measured (Estimation) or measured differently (Fusion).

Since the velocity is the derivative of the location over time you have a model which connects them both. Once you set the model (Piece Wise Constant Velocity / Changing Velocity and the level of noise) the Kalman Filter does the fusion of the data and the model to estimate the parameters.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.