Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-1142

Kalman filter gain calculation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3
    • 3.4
    • None

    Description

      In the class KalmanFilter in the function correct(RealMatrix) the gain matrix currently is calculated via first calculating the inverse of the residual covariance matrix s. I think it would be more effective to calculate the gain by directly solving the linear system with an QR or Cholesky decomposition.
      For example like this (maybe replace "Cholesky" by "QR"):
      // calculate gain matrix
      // K(k) = P(k)- * H' * (H * P(k)- * H' + R)^-1
      // K(k) = P(k)- * H' * S^-1
      // K(k) * S = P(k)- * H'
      // S' * K(k)' = H * P(k)-'
      RealMatrix kalmanGain = new CholeskyDecomposition(s).getSolver().solve(measurementMatrix.multiply(errorCovariance.transpose())).transpose();

      Attachments

        Activity

          People

            Unassigned Unassigned
            WhiskyDelta Arne Schwarz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified