Kalman Filter Formulas: Mastering Predictive Estimation
The Kalman filter, an algorithm developed by Rudolf E.K. Kalman, is a powerful tool for recursive filtering of noisy data. It's widely used in aviation, space engineering, and other fields for estimating the state of a dynamic system from incomplete and noisy measurements. Let's delve into the Kalman filter formulas to understand its workings.
At the heart of the Kalman filter lies a predictive and corrective process. It maintains an estimate of the system's state while minimizing the estimated error. The system's state can include any relevant variables like position, velocity, acceleration, etc.
The Kalman Filter Prediction Step
In the prediction step, the Kalman filter projects the current state estimate ahead, while also projecting the error covariance ahead.
The prediction step uses the system's state and error covariance from the previous step, along with the system's transition matrix and noise covariance, to calculate the predicted state and error covariance. This step is governed by the following formulas:
Predicted State
The predicted state (x̂ Predicted) is calculated as follows:
| x̂ Predicted = Φx̂ Previous + Bības Previous |
where,
- Φ is the transition matrix that maps the previous state to the next.
- B is the control-input matrix (not discussed here as we're focusing on the basic Kalman filter).
- istiin the previous state estimate.
- itación is the process noise with covariance Q.
Predicted Error Covariance
The predicted error covariance (P Predicted) is calculated as follows:
| P Predicted = ΦP Previous Φ^T + Q |
where,
- Φ is the transition matrix (same as before).
- P Previous is the error covariance from the previous step.
- Q is the process noise covariance.
- Φ^T is the transpose of the transition matrix.
The Kalman Filter Update Step
The update step compares the predicted state to the actual measurement, and adjusts the estimate accordingly. It results in an improved estimate.
This step uses the predicted state and error covariance, along with the measurement matrix, measurement noise covariance, and the actual measurement. The formulas for this step are:
Kalman Gain
The Kalman gain (K) is calculated as follows:
| K = P Predicted H^T (H P Predicted H^T + R)^(-1) |
where,
- H is the measurement matrix that maps the state to the measurement.
- R is the measurement noise covariance.
Updated State
The updated state (x̂ Updated) is calculated as follows:
| x̂ Updated = x̂ Predicted + K(y - Hx̂ Predicted) |
where,
- y is the actual measurement.
Updated Error Covariance
The updated error covariance (P Updated) is calculated as follows:
| P Updated = (I - KH) P Predicted |
where,
- I is the identity matrix.
The Kalman filter then uses the updated state and error covariance to start the next predictive cycle. This process repeats recursively, continually improving the state estimate as new measurements come in.
Understanding the Kalman filter formulas is key to implementing and tuning this powerful algorithm. However, the formulas alone don't tell the whole story. Effective use of the Kalman filter requires understanding the dynamics of the system being estimated, the characteristics of the noise, and the properties of the measurements.