持续更新:https://cgabc.xyz/posts/881febbe/
What is observability ?
In control theory, observability is a measure for how well internal states of a system can be inferred by knowledge of its external outputs.
What is consistency ?
A recursive estimator is consistent when the estimation errors are zero-mean and have covariance matrix equal to that reported by the estimator.
Observability $\longrightarrow$ Consistency Mismatch (actual vs true) in observability $\longrightarrow$ Inconsistency VINS observability properties $\longrightarrow$ estimator inconsistency
已知,光滑标量函数 h h h 以及 光滑向量场 f f f 和 g g g
h
(
x
)
:
R
n
→
R
f
(
x
)
:
R
n
→
R
n
g
(
x
)
:
R
n
→
R
n
行向量 梯度 ∇ h \nabla h ∇h 乘以 向量场 f f f,其结果 L f h L_f h Lfh 正好是个标量
L f h = ∇ h ⋅ f = ( ∂ h ∂ x ) T f L_f h = \nabla h \cdot f = \left( \frac{\partial h}{\partial x} \right)^T f Lfh=∇h⋅f=(∂x∂h)Tf
L g L f h L_g L_f h LgLfh 结果依然是个标量
L g L f h = L g ( L f h ) = ∇ ( L f h ) g = ( ∂ ( L f h ) ∂ x ) T g = ( ∂ ( ( ∂ h ∂ x ) T f ) ∂ x ) T g L_g L_f h = L_g (L_f h) = \nabla(L_f h) g = \left( \frac{\partial (L_f h)}{\partial x} \right)^T g = \left( \frac{\partial \left( (\frac{\partial h}{\partial x})^T f \right)}{\partial x} \right)^T g LgLfh=Lg(Lfh)=∇(Lfh)g=(∂x∂(Lfh))Tg=(∂x∂((∂x∂h)Tf))Tg
总结一下:Lie Derivative与一般的Derivative的区别是,Lie Derivative是定义在两个函数 h h h 和 f f f 之间的,它俩都是向量 x x x 的函数,通过共同的 x x x 联系起来;一般的Derivative是某个函数对 x x x 定义的。
what: 控制理论中的 可观察性(observability)4 是指系统可以由其外部输出推断其内部状态的程度。
why: 为了能让系统不可观的维度与真实系统一致,从而提高系统精度
how: 通过计算可观性矩阵,分析其零空间的秩,来分析系统哪些状态维度可观/不可观;可观性矩阵对应系统可观测的维度,零空间对应系统不可观的维度
Discrete state space equations of nonlinear systems (linearized without considering noise) is
{
x
k
+
1
=
Φ
k
x
k
y
k
=
H
k
x
k
according to the Lie derivative, the observability matrix is
O
(
x
⋆
)
=
[
H
1
H
2
Φ
2
,
1
⋮
H
k
Φ
k
,
1
]
\mathbf{\mathcal{O}} \left(\mathbf{x}^{\star}\right) = \left[
then, the unobservable dimensions of the system are
rank ( N ( O ) ) \text{rank}(N(\mathcal{O})) rank(N(O))
对于SLAM系统而言(如单目VO),当我们改变状态量时,测量不变意味着损失函数不会改变,更意味着求解最小二乘时对应的信息矩阵H存在着零空间。
for the monocular VO based on optimization methods, the dimension of null space of the Hessian (Information) matrix H H H is 7, that is, the unobservable dimensions are
rank ( N ( H ) ) = 7 \text{rank}(N(H)) = 7 rank(N(H))=7
J T J Δ x = − J T r ⟶ H Δ x = b J^T J \Delta x = - J^T r \quad \longrightarrow \quad H \Delta x = b JTJΔx=−JTr⟶HΔx=b
What is the relationship between the Hessian matrix H H H and the observability matrix O \mathcal{O} O in the optimization based VO/VIO ?
As a note, the measurement Jacobian, d Y dY dY, is equivalent to the observability matrix, d O d\mathcal{O} dO, evaluated at a nominal state, x 0 x_0 x0.
贺一家博士给的总结:
a state estimator is consistent if the estimation errors (i) are zero-mean, and (ii) have covariance matrix smaller or equal to the one calculated by the filter.
open_vins #171: Consistency maintenance methods, FEJ vs Observability-constrained(OC) ones
paper:
paper: A First-Estimates Jacobian EKF for Improving SLAM Consistency
estimation from the first time
to ensure that the state transition and Jacobian matrices are evaluated at correct linearization points such that the above observability analysis will hold true
FEJ 算法:不同残差对同一个状态求雅克比时,线性化点必须一致,这样就能避免零空间退化而使得不可观变量变得可观。
app:
ref:
TODO
MSCKF-VIO (S-MSCKF):
Modification of the State Transition Matrix Φ \Phi Φ
// Modify the transition matrix to make the observability matrix have proper null space
Matrix3d R_kk_1 = quaternionToRotation(imu_state.orientation_null);
Phi.block<3, 3>(0, 0) = quaternionToRotation(imu_state.orientation) * R_kk_1.transpose();
Vector3d u = R_kk_1 * IMUState::gravity;
RowVector3d s = (u.transpose() * u).inverse() * u.transpose();
Matrix3d A1 = Phi.block<3, 3>(6, 0);
Vector3d w1 = skewSymmetric(imu_state.velocity_null - imu_state.velocity) * IMUState::gravity;
Phi.block<3, 3>(6, 0) = A1 - (A1 * u - w1) * s;
Matrix3d A2 = Phi.block<3, 3>(12, 0);
Vector3d w2 = skewSymmetric(dtime * imu_state.velocity_null + imu_state.position_null - imu_state.position) * IMUState::gravity;
Phi.block<3, 3>(12, 0) = A2 - (A2 * u - w2) * s;
Modification of the Measurement Jacobian H H H
// Modifty the measurement Jacobian to ensure observability constrain. Ref: OC-VINS
Matrix<double, 4, 6> A = H_x;
Matrix<double, 6, 1> u = Matrix<double, 6, 1>::Zero();
u.block<3, 1>(0, 0) = quaternionToRotation(cam_state.orientation_null) * IMUState::gravity;
u.block<3, 1>(3, 0) = skewSymmetric(p_w - cam_state.position_null) * IMUState::gravity;
H_x = A - A * u * (u.transpose() * u).inverse() * u.transpose();
H_f = -H_x.block<4, 3>(0, 3);
It is well known that visual-inertial systems have four degrees of freedom that are not observable: the global position and the rotation around gravity. These unobservable degrees of freedom (called gauge freedom) have to be handled properly in visual-inertial state estimation to obtain a unique state estimate.
H有正确的零空间,比如,对于单目VO,rank(N(H)) = 7,则H为奇异矩阵,那么增量方程始终存在病态或求解不稳定问题;通过处理 规范自由度 解决。
In optimization-based methods, three approaches are usually used:
ref: