Post · 2 min read· pp. 67–69

Measurement Update Derivations » MSCKF Nullspace Projection

In the standard EKF update, given a linearized measurement error (or residual) equation:

diagram

we naively need to compute the residual covariance matrix diagram as follows:

diagram

However, there would be a big problem in visual-inertial odometry (VIO); that is, we do not know what the prior feature covariance and it is coupled with both the state, itself, and the noise (i.e., diagram, diagram, and diagram). This motivates the need for a method to remove the feature diagram from the linearized measurement equation (thus removing the correlation between the measurement and its error).

To this end, we start with the measurement residual function by removing the "sensitivity" to feature error we compute and apply the left nullspace of the Jacobian diagram. We can compute it using QR decomposition as follows:

diagram

Multiplying the linearized measurement equation by the nullspace of the feature Jacobian from the left yields:

diagram

where we have employed the fact that diagram and diagram are orthonormal.

We now examine the dimensions of the involved matrices to appreciate the computation saving gained from this nullspace projection.

diagram

With that, we can have the following conclusion about the sizes when the nullspace is applied:

diagram

Finally, we perform the EKF update using the inferred measurement diagram:

diagram

where the time index (subscript) diagram refers to the prior estimate which was denoted before by symbol diagram and diagram corresponds to the posterior (or updated) estimate indicated before by diagram.

Implementation

Using Eigen 3 library, we perform QR decomposition to get the nullspace. Here we know that the size of diagram is diagram, which corresponds to the number of observations and size of the 3D point feature state.

text
Eigen::ColPivHouseholderQR<Eigen::MatrixXd> qr(H_f.rows(), H_f.cols());
qr.compute(H_f);
Eigen::MatrixXd Q = qr.householderQ();
Eigen::MatrixXd Q1 = Q.block(0,0,Q.rows(),3);
Eigen::MatrixXd Q2 = Q.block(0,3,Q.rows(),Q.cols()-3);