Kalman Filters are used for state estimation in control systems when noisy measurements are present. This repository includes an implementation of the algorithm in Python and also a Jupyter Notebook for testing in real data for altitude estimation of a quadrotor. The algorithm was applied in the quad using a sensor-fusion technique by blending the measurements from the barometric pressure sensor and the accelerometer to provide altitude (relative height of the quad) estimation.
-
Start
-
Initialize the state estimate:
and the error covariance estimate:
-
Predict the state for the next time step:
-
Predict the error covariance for the next time step:
-
Compute the Kalman Gain:
-
Update the state estimate:
-
Update the error covariance estimate:
Go to 2
The matrices and vectors in the above equations are defined as follows:
-
: State transition matrix for time step -
: Input control matrix for time step -
: Control input at time step -
: Process noise covariance matrix at time step -
: Measurement matrix at time step -
: Measurement noise covariance matrix at time step -
: Measurement vector at time step -
: Identity matrix