Function lupnt::ModifiedGramSchmidt¶
Defined in File udu_utils.h
Function Documentation¶
-
VecMatPair lupnt::ModifiedGramSchmidt(const MatXd &D_tilde, const MatXd &Y)¶
Modified weighted Gram-Schmidt (MWGS) orthogonalization for the numerically stable UDU time update (Thornton’s algorithm).
Given
Y(size[n x (n+m)]) and a symmetric weight matrixD_tilde(size[(n+m) x (n+m)]), returns(D, U)— a diagonalD(size[n]) and a unit-upper-triangularU(size[n x n]) — such thatU diag(D) U^T = Y D_tilde Y^T, computed without ever forming the product. For the UDU predict step,Y = [F U | G]andD_tilde = blkdiag(D_prev, Q), so this propagates the factored covariance and folds in the process noise in one stable pass — unlike reconstructingP, addingQ, and re-factoring, which loses variances many orders of magnitude below the largest one.- Parameters:
D_tilde – Symmetric weight matrix, size
[(n+m) x (n+m)]Y – Coefficient matrix, size
[n x (n+m)]
- Returns:
Pair
(D, U): diagonal factorD(size[n]) and unit-upper-triangular factorU(size[n x n])