KALMAN FILTER MADE EASY PART 1
I promise that by the end of this series you will be able to understand the complete Kalman filter. Please leave the fear before you start reading…
What is Kalman Filtering ??
- It is an iterative process.
- It takes consecutive data inputs to estimate the next value . For example in tracking we estimate the position , velocity in the next time instance.
- It takes care of uncertainty and random error.
In the above image 1 we are estimating the temperature using the kalman filter. Finally using the kalman filter we will converge to the actual value. If we are tracking object it will have the position and velocity also.
For every time iteration we have to calculate the three values
- kalman gain
- Estimate at the time t
- Error in the estimate.
Things will become more clear once we see the numerical example . How we calculate the kalman gain , estimate and the error in estimate.
What Kalman Gain Talks about ?
- It tells about how much the new measurements are used to update the new estimate that will be used in the next time instance.
- It tells how much the estimate we have to impart from the measurement value and how much from the predicted value.
- It depends on the error that we are estimating and the error that we are reading.
- Kalman Gain = (Error in estimated value)/(Error in estimated value+Error in Measured Value).
- We have the error in estimated value and we also have the error in measured value. But the error in measured value is generally constant.
- More the value of the kalman gain , More the importance to the difference between measured value and estimated value.
Main Equations of kalman Filter :
What we have ?? What we want ??
- We have the estimated value from the previous time instance that can be used for the current time instance. example : If car wastravelling at certain position in previous time instance .we know what is its position in current time instance.
- Now in the current time instance we got the measured value.
- Now we have to estimate the value in current time instance such that it can be used in the next time instance.
- For that we use the estimated value from previous time instance and penalise that value using the measured value at current time instance.
- How we penalise it is based on the kalman gain.
- If you face any difficulty in understanding this mail me machinelearningdeeplearning628@gmail.com.
MULTI-DIMENSIONAL MODEL OF THE KALMAN FILTER :
Flow Chart of Kalman Filtering Process:-
######## XUV, APAQ,PHPHR,CIAZ #############
X- State Transition Matrix. P- Process Covariance Matrix. U- Control Variable Matrix. W- Predicted State Noise Matrix. Q- Process Noise Covariance Matrix.Y- Measurement Matrix. Z- Measurement of uncertainity. R- Sensor Noise Covariance Matrix.
We have the STATE TRANSITION MATRIX , PROCESS CO-VARIANCE MATRIX .
Why do we have the PROCESS-COVARIANCE MATRIX ??
- Process in the kalman filtering may have errors in it.
- To keep track of those errors we use the process covariance matrix.
- Hence, to reduce the errors through the process we use the process co-variance matrix.
State Matrix is the one which carries the predicted and updated values. Process Covariance matrix carries the Noise.
State Matrix can be multi-dimenstional.. How ??
- For example think like we are tracking the object. If we track the position in only x direction then it is single-dimensional.
- If we track the object in both x and y directions then it will be two-dimensional.
- If we track the object in all x,y and z directions then it will be three-dimensional.