Serving the Quantitative Finance Community

 
User avatar
sudarshankumar
Topic Author
Posts: 0
Joined: November 15th, 2013, 5:46 am

Kalman filter stability problem

December 3rd, 2013, 8:40 pm

While implementing Klamna filter some times matrix become singular. After searching internet I came to know Josef form of Klaman filter can mitigate that.Just wanted to know how to implement thatWill replacing old quantion (InitVarY=(I-KalmanGain*H)*VarY; with new one InitVarY=(I-KalmanGain*H)*VarY*(I-KalmanGain*H)'+ KalmanGain*R*KalmanGain'; will be sufficient ??or do i need to edit some other equantion as well
 
User avatar
OOglesby
Posts: 1
Joined: August 26th, 2011, 5:34 am

Kalman filter stability problem

December 3rd, 2013, 10:39 pm

There can be several places and several reasons why a matrix can become singular. Unless the model used is truly linear, your process noise matrix, Q, should not be all zeros. For nonlinear models, having even small non-zero values on the diagonal of Q can help prevent singular matrices from forming and it helps ensure that the filter does not ignore the measurements.Another place to be careful is the calculation of the Kalman gain: [$]\frac{VarY*H^T}{H*VarY*H^T + R}[$]. Do not explicitly compute inverse in this equation. Instead solve a system of equations (Ax=b) whereA=[$](H*VarY*H^T + R)^T[$]x=[$]KalmanGain^T[$]b=[$](VarY*H^T)^T[$]If your solver can handle solving (xA=b), then the outermost transposes can be removed.If your development language has symmetric matrices, then use it to represent InitVarY, VarY, R, and Q.