# Kalman Filter with State Constrained to a Surface

I have a state that represents a direction vector condtrained to the surface of a unit sphere . In the update step of a Kalman filter, the state estimate is the sum of two values, like this

$$\hat{x_{k|k}}=\hat{x_{k|k-1}}+K_k(z_k-\hat{z_k})$$

This takes the latest predicted value that happens to meet the constraint, and updates it with a weighted difference between the measurement and the expected value of the measurement.

In my case, the state, x, is in $\Bbb{R}^3$, but I would like to consider this in other dimensions.

My question is how do I perform the update so that the result is constrained to the surface (in this case a sphere)? How is the performance of the filter degraded by this? Any reference material or direct help would be useful to me in dealing with this question.

• As the support of the normal distribution is the real line, you are violating assumptions behind KF. I suppose you may well run into stability problems (filter diverging) depending on the application. I have observed this applying an Extended Kalman filter to a problem where one state variable is bound to the interval $(-\pi,\pi] \subset \mathbb{R}$. You might also take a look at this paper: sciencedirect.com/science/article/pii/S0959152409002091 (Constrained Bayesian state estimation – A comparative study and a new particle filter based approach). – mikkola Nov 3 '15 at 17:04
• @mikkola - Thanks for the tip. My simulations are diverging and the problem seems to be a rank deficient matrix. This probably means the equations are over-specified due to the constraint. I haven't read this paper yet, but I am leaning away from a particle filter solution because I am resource limited. It does look like the way to go otherwise. – Jim Nov 4 '15 at 16:10
• sure. I understand the criticism against a particle filter here. I much prefer other estimation methods when possible, too. I hope the paper may present also some alternative approaches in their references. – mikkola Nov 5 '15 at 13:19
• Maybe you could write the system in spherical coordinates and reduce it to a 2-dimensional system (assuming you know the radius). Then there are no constraints to worry about. – Calculon Apr 19 '17 at 6:38