Update Sub Set of the State Vector in Kalman Filter

I question about Kalman Filter:

If I have system state $$\mathbf{X} = [x_1\ x_2\ x_3\ x_4\ x_5]^T,$$ these state elements are independent. I have measurement from a sensor to correct the predicted state. Normally, the correction will perform on all elements of state $\mathbf{X}$ and produce new covariance matrix $\mathbf{P}$.

If I just want to correct the substate only $x_1$ and $x_2$, and do not do anything with $x_3$, $x_4$ and $x_5$, how can I do that ? and how to compute $\mathbf{P}$?

• What do you mean by independent? Can you show us the dynamic model matrix? The measurement matrix? Unless the block matrix is diagonal they are not independent.
– Royi
Apr 6, 2020 at 6:25
• Need more detail "If I just want to correct the substate only x1 and x2, and do not do anything with x3, x4 and x5" and "Kalman filter" don't go together well. A Kalman filter starts with a model of the system whose states are to be estimated, and ends with a prescription for how to modify the estimated states. Your desires have no bearing on the ultimate construction of the Kalman filter. So -- edit your question to give at least a partial model of your system that exemplifies why you think that the best state estimation is to be had by updating only $x_1$ and $x_2$. Dec 27, 2021 at 16:33

2 Answers

It will depend upon the measurement model. If your sensor provides data for all the states i.e. for $x_1,x_2,x_3,x_4,x_5$, then you can update only $x_1$ and $x_2$ by making the noise covariance corresponding to $x_3,x_4,x_5$ very large. Actually, there will still be some corrections in these three states but they will be small. The higher the covariance corresponding to these three states, the lower is the correction in them. Alternatively, you can make the last three rows and last three columns of process covariance very small.

• @tn0432: Unless I'm isunderstanding, it sounds like you know the values of $x_3$, $x_4$ and $x_5$. If that's the case, then you can set the variances of those terms in the state equation to zero and use their known values as the initial values. Although not a great example, ( since the focus is conversion from arima to state space ) below shows how this done when converting from arima to state space. robjhyndman.com/talks/ABS3.pdf Nov 18, 2017 at 17:03
• @tn0432: as an addendum to what I said, you made need to make the variances of the known states non-zero but orders of magnitude less than the variances of the unknown states. Otherwise, if you just set them to zero, you may run into problems inverting the matrix. of course, you still may run into problems inverting it but there's a whole literature on that issue also. Nov 19, 2017 at 7:14

There is a literature on Constrained Kalman Filters, as an example of one of 625 hits in IEEE Explore:

S. J. Julier and J. J. LaViola, "On Kalman Filtering With Nonlinear Equality Constraints," in IEEE Transactions on Signal Processing, vol. 55, no. 6, pp. 2774-2784, June 2007. doi: 10.1109/TSP.2007.893949 Abstract: The state space description of some physical systems possess nonlinear equality constraints between some state variables. In this paper, we consider the problem of applying a Kalman filter-type estimator in the presence of such constraints. We categorize previous approaches into pseudo-observation and projection methods and identify two types of constraints-those that act on the entire distribution and those that act on the mean of the distribution. We argue that the pseudo-observation approach enforces neither type of constraint and that the projection method enforces the first type of constraint only. We propose a new method that utilizes the projection method twice-once to constrain the entire distribution and once to constrain the statistics of the distribution. We illustrate these algorithms in a tracking system that uses unit quaternions to encode orientation keywords: {Kalman filters;filtering theory;pseudonoise codes;statistical distributions;Kalman filtering;distribution statistics;nonlinear equality constraints;projection method;pseudo-observation;state space description;unit quaternions;Chemical reactors;Computer science;Filtering;Kalman filters;Kinematics;Physics;Probability distribution;Quaternions;State-space methods;Statistical distributions;Kalman filtering;measurement matrix;nonlinear constraints;quaternions}, URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=4203082&isnumber=4203033

but probably more useful to you,

https://www.mathworks.com/matlabcentral/linkexchange/links/2191-kalman-filtering-with-state-constraints-a-survey-of-linear-and-nonlinear-algorithms-tutorial

There are many possible approaches.