# Kalman Filter Explained

What is Kalman Filtering?

Kalman Filtering ( linear quadratic estimation or LQE ) is an algorithm that is used to calculate the variable of Interest optimally when they can’t be measured directly. But their Indirect Measure is available . Another Definition that is not from google is that it is an iterative Mathematical Process that uses a set of equations and consecutive data inputs to quickly estimate the True value, Position, Velocity, acceleration, etc of the object in discussion when the measured value contains random errors, uncertainty ,etc.I would like to mention that all the Information in the article has been collected from the watching the Playlist of Kalman Filter by Michel van Biezen .

IDEA

Kalman in 1 D

Steps :-

1. Calculating Kalman Gain — It is the most important variable in the whole process as it finds the right balance between the Estimate and Measurement Value .

where E is the Error .

2. Calculate New Estimate

where EST is Estimation, KG/K is Kalman Gain, Measurement is the observed value.

3. Update in Error in Estimation

Kalman in MultiDimesion

Equation :-

1. Estimate Matrix

X is State Matrix , U is Control Variable Matrix (how 1 state affect the other ) ,W is Predicted State Noise Matrix. Xkp is New state Estimation. A and B is made up of 1,0 and Delta t to make the matrix shape compatible for the operations.

2. Covariance matrix

Initially it is made up of the Covariance of the State Variable and then updated each iteration.Process Covariance Matrix basically contains the Information about the Error in Estimation.Q is the Error in Process of Calculating Process Covariance Matrix .

3. Kalman Gain

H is Identity Matrix Generally just to ensure compatibility in the dimensions.R is the Error in Measurements .

4. Measured Value

X is measured value here and Z is measurement Noise.

5. Calculate Current State

6. Update Process Covariance Matrix

A,B,H,C etc are all used to preserve the matrix dimensions and let be compatible with one another .

This brings us to the end of 1st Iteration and you may continue as many iterations you want .Bringing us closer and closer to the optimal value.