Ginan
Loading...
Searching...
No Matches
KalmanFilterBLAS Class Reference

BLAS/LAPACK optimized operations for Kalman filtering. More...

Detailed Description

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

Collaboration diagram for KalmanFilterBLAS:

Static Public Member Functions

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.
 

Member Function Documentation

◆ computeHP()

void KalmanFilterBLAS::computeHP ( const MatrixXd & H,
const MatrixXd & P,
MatrixXd & HP )
static

Compute H*P matrix product using BLAS.

Parameters
HDesign matrix (numH x numX)
PState covariance (numX x numX)
HPOutput matrix (numH x numX)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
HDesign matrix (numH x numX)
PState covariance (numX x numX)
RMeasurement noise (numH x numH)
QOutput innovation covariance (numH x numH)
Here is the call graph for this function:

◆ 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
HDesign matrix (numH x numX)
PState covariance (numX x numX)
QInnovation covariance (numH x numH) - will be modified!
KOutput Kalman gain (numX x numH)
QinvOptional output for Q inverse
inverterInversion method to use
Returns
true if successful, false if inversion failed
Here is the call graph for this function:

◆ solveLinearSystem()

bool KalmanFilterBLAS::solveLinearSystem ( MatrixXd & Q,
MatrixXd & B,
E_Inverter inverter )
static

Solve Q*X = B for multiple right-hand sides using LAPACKE.

Parameters
QCoefficient matrix (n x n) - will be modified!
BRight-hand side / solution matrix (n x m) - will be modified!
inverterSolver method to use
Returns
true if successful, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
PPrior covariance (numX x numX)
KKalman gain (numX x numH)
HDesign matrix (numH x numH)
RMeasurement noise (numH x numH)
PpOutput posterior covariance (numX x numX)
Here is the call graph for this function:

◆ 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
PPrior covariance (numX x numX)
KKalman gain (numX x numH)
HDesign matrix (numH x numX)
HPPre-computed H*P (numH x numX)
PpOutput posterior covariance (numX x numX)
Here is the call graph for this function:

◆ 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
xPrior state (numX)
KKalman gain (numX x numH)
vInnovation vector (numH)
xpOutput posterior state (numX)
dxOutput state change (numX)
begXStarting index in full state vector
numXNumber of states to update
begHStarting index in measurement vector
numHNumber of measurements
Here is the call graph for this function:

The documentation for this class was generated from the following files: