BLAS/LAPACK optimized operations for Kalman filtering.
More...
BLAS/LAPACK optimized operations for Kalman filtering.
This class provides high-performance implementations of core Kalman filter operations using CBLAS and LapackWrapper while maintaining Eigen matrix interfaces for compatibility with existing code.
Design principle: Single Responsibility - handles only mathematical computations
|
| static void | computeInnovationCovariance (const MatrixXd &H, const MatrixXd &P, const MatrixXd &R, MatrixXd &Q) |
| | Compute innovation covariance Q = H*P*H' + R using BLAS.
|
| |
| static bool | computeKalmanGain (const MatrixXd &H, const MatrixXd &P, MatrixXd &Q, MatrixXd &K, MatrixXd *Qinv, E_Inverter inverter) |
| | Compute Kalman gain K = P*H'*Q^-1 using BLAS/LAPACKE.
|
| |
| static void | computeHP (const MatrixXd &H, const MatrixXd &P, MatrixXd &HP) |
| | Compute H*P matrix product using BLAS.
|
| |
| static void | updateStateVector (const VectorXd &x, const MatrixXd &K, const VectorXd &v, VectorXd &xp, VectorXd &dx, int begX, int numX, int begH, int numH) |
| | Update state vector: xp = x + K*v using BLAS.
|
| |
| static void | updateCovarianceStandard (const MatrixXd &P, const MatrixXd &K, const MatrixXd &H, const MatrixXd &HP, MatrixXd &Pp) |
| | Update covariance: Pp = P - K*H*P (standard form) using BLAS.
|
| |
| static void | updateCovarianceJoseph (const MatrixXd &P, const MatrixXd &K, const MatrixXd &H, const MatrixXd &R, MatrixXd &Pp) |
| | Update covariance: Pp = (I-K*H)*P*(I-K*H)' + K*R*K' (Joseph form) using BLAS.
|
| |
| static bool | solveLinearSystem (MatrixXd &Q, MatrixXd &B, E_Inverter inverter) |
| | Solve Q*X = B for multiple right-hand sides using LAPACKE.
|
| |
◆ computeHP()
| void KalmanFilterBLAS::computeHP |
( |
const MatrixXd & | H, |
|
|
const MatrixXd & | P, |
|
|
MatrixXd & | HP ) |
|
static |
Compute H*P matrix product using BLAS.
- Parameters
-
| H | Design matrix (numH x numX) |
| P | State covariance (numX x numX) |
| HP | Output matrix (numH x numX) |
◆ computeInnovationCovariance()
| void KalmanFilterBLAS::computeInnovationCovariance |
( |
const MatrixXd & | H, |
|
|
const MatrixXd & | P, |
|
|
const MatrixXd & | R, |
|
|
MatrixXd & | Q ) |
|
static |
Compute innovation covariance Q = H*P*H' + R using BLAS.
- Parameters
-
| H | Design matrix (numH x numX) |
| P | State covariance (numX x numX) |
| R | Measurement noise (numH x numH) |
| Q | Output innovation covariance (numH x numH) |
◆ computeKalmanGain()
| bool KalmanFilterBLAS::computeKalmanGain |
( |
const MatrixXd & | H, |
|
|
const MatrixXd & | P, |
|
|
MatrixXd & | Q, |
|
|
MatrixXd & | K, |
|
|
MatrixXd * | Qinv, |
|
|
E_Inverter | inverter ) |
|
static |
Compute Kalman gain K = P*H'*Q^-1 using BLAS/LAPACKE.
- Parameters
-
| H | Design matrix (numH x numX) |
| P | State covariance (numX x numX) |
| Q | Innovation covariance (numH x numH) - will be modified! |
| K | Output Kalman gain (numX x numH) |
| Qinv | Optional output for Q inverse |
| inverter | Inversion method to use |
- Returns
- true if successful, false if inversion failed
◆ solveLinearSystem()
| bool KalmanFilterBLAS::solveLinearSystem |
( |
MatrixXd & | Q, |
|
|
MatrixXd & | B, |
|
|
E_Inverter | inverter ) |
|
static |
Solve Q*X = B for multiple right-hand sides using LAPACKE.
- Parameters
-
| Q | Coefficient matrix (n x n) - will be modified! |
| B | Right-hand side / solution matrix (n x m) - will be modified! |
| inverter | Solver method to use |
- Returns
- true if successful, false otherwise
◆ updateCovarianceJoseph()
| void KalmanFilterBLAS::updateCovarianceJoseph |
( |
const MatrixXd & | P, |
|
|
const MatrixXd & | K, |
|
|
const MatrixXd & | H, |
|
|
const MatrixXd & | R, |
|
|
MatrixXd & | Pp ) |
|
static |
Update covariance: Pp = (I-K*H)*P*(I-K*H)' + K*R*K' (Joseph form) using BLAS.
- Parameters
-
| P | Prior covariance (numX x numX) |
| K | Kalman gain (numX x numH) |
| H | Design matrix (numH x numH) |
| R | Measurement noise (numH x numH) |
| Pp | Output posterior covariance (numX x numX) |
◆ updateCovarianceStandard()
| void KalmanFilterBLAS::updateCovarianceStandard |
( |
const MatrixXd & | P, |
|
|
const MatrixXd & | K, |
|
|
const MatrixXd & | H, |
|
|
const MatrixXd & | HP, |
|
|
MatrixXd & | Pp ) |
|
static |
Update covariance: Pp = P - K*H*P (standard form) using BLAS.
- Parameters
-
| P | Prior covariance (numX x numX) |
| K | Kalman gain (numX x numH) |
| H | Design matrix (numH x numX) |
| HP | Pre-computed H*P (numH x numX) |
| Pp | Output posterior covariance (numX x numX) |
◆ updateStateVector()
| void KalmanFilterBLAS::updateStateVector |
( |
const VectorXd & | x, |
|
|
const MatrixXd & | K, |
|
|
const VectorXd & | v, |
|
|
VectorXd & | xp, |
|
|
VectorXd & | dx, |
|
|
int | begX, |
|
|
int | numX, |
|
|
int | begH, |
|
|
int | numH ) |
|
static |
Update state vector: xp = x + K*v using BLAS.
- Parameters
-
| x | Prior state (numX) |
| K | Kalman gain (numX x numH) |
| v | Innovation vector (numH) |
| xp | Output posterior state (numX) |
| dx | Output state change (numX) |
| begX | Starting index in full state vector |
| numX | Number of states to update |
| begH | Starting index in measurement vector |
| numH | Number of measurements |
The documentation for this class was generated from the following files: