# Flipped observation model for the Kalman Filter

In the Kalman filter, an observation model h(x) is used to transform the predicted state variables x from the state space to the measurement space: z = h(x)

If the state space is identical to measurement space, then h(x)=x and the predicted state can simply be represented as: z = x

The state covariance P is transformed using H=dh/dx into the measurement space as HPH^T, where H is the partial derivative of the observation model h(x) with respect to the state variables. The problem is that H is usually nonlinear and tricky to calculate.

I am wondering whether the Kalman filter process would still work if the observation model and all subsequent steps are "flipped" so that the transformation goes from measurement space to state space, instead of state space to measurement space, through the flipped observation model h* where: x = h*(z).

In the flipped process, the innovation would be computed in state space after the measurement matrix is transformed into state space, and the Kalman gain would be computed in state space after the measurement covariance is transformed into the state space.

A similar question was asked about whether an "inverse observation model" would work, which implied that the observation model h needs to be an invertible matrix, but it doesn't sound like this was intended. To avoid this confusion, I'm calling it the "flipped" observation model. https://stats.stackexchange.com/questions/71886/inverse-observation-model-and-kalman-filtering/71895#71895

To take it another step further, regardless of the complexity of the transformation between the state variables and the actual measurement variables, can't the measurement space be defined to be identical to the state space (we'll call this the faux measurement space) for the sole purpose of simplifying calculation of h and H, and just make sure to transform the actual measurement variables into the faux measurement space prior to the update step of the Kalman filter?

• MathJax, please. Commented Aug 3, 2022 at 18:28

You propose 2 questions summarized as

1. Can the observation model and subsequent steps be flipped in the KF?
2. Can the observations be transformed to the state space to simplify the computation of the observation model?

Question 1:

Not really. If you flip the equations in the KF, you would essentially be estimating the measurement in contrast to estimating the states (althouhg it is somewhat unclear by what flipping "all" the equations means). You could rewrite you KF defining your state to be the measurements obtained by the sensors, but I'm not sure the benefit of doing this because the states are what you are interested in estimating.

Question 2:

Yes, but the implementation is the same. This is exactly what you are doing in a KF. If you notice in the KF, you multiple the covariance matrix by the Jacobian of the observation model. This is transforming the covariance from the state space to the observation space. If you do this transformation beforehand, you will still need to transform your covariance matrix, and you will just end up with the exact same equations.

• Thanks for your answer. You break it down nicely into the two questions. Regarding Question 2, my thought was that if you have multiple sensors producing different measurement data, in different measurement spaces, and you want to fuse those measurements and their corresponding covariances to produce a measured state and covariance, then you would want to first transform the disparate measurement types into a common measurement space. Why not just transform them directly to the state space? Commented Aug 11, 2022 at 20:16
• So then the process will be flipped, leading to Question 1, where the space transformation goes from the measurement space(s) of the different sensors, to the state space. As you say, the implementation is the same as a "normal" KF. This would be one case where a flipped KF process would be simpler. However, I'm concerned that KF references don't mention using the KF in this way, but they don't mention any reasons against it either. Commented Aug 11, 2022 at 20:23
• To give an example of having multiple sensors, take a turkey that you want to estimate the temperature of (state) while it is baking in an oven. You have a heat transfer model that can help predict the turkey's temperature based on the last estimated temperature and time elapsed. You also have two sensors that measure indirect information about the turkey's temperature, your nose and eyes. As the turkey gets hotter, the aroma becomes more intense, and the skin starts to brown. You can't directly compare aroma intensity and skin color to the temperature, so you need to relate them by a model. Commented Aug 11, 2022 at 20:33
• This model is the observation model. Clearly, you will need two different models. How do you adapt the KF process for two observation models? See Question 2, where the measurements of aroma and color are correlated to a common space first to be combined, before being correlated to the state space. But if you're going to do this, you may as well just directly correlate the two measurements to the state space. Commented Aug 11, 2022 at 20:40