Kalman Filter Made Easy (3/3)

Kalman Filter Made Easy (3/3)

In the previous article we discussed about how to predict the next state of the system and also how to estimate the error in prediction that is a process co variance matrix . In this article we will look at the calculation of Kalman Gain and estimating the final state of system.

If you recall from first article , Kalman Gain is not static it is a time varying gain . The formula for determining the Kalman Gain is as under

Kalman Gain

As you can see above it comprises of three matrices Ptp which is a process co variance Matrix , H which is an observation Matrix and R which is a sensor noise covariance matrix or in other words error in measurement . In simple terms Kalman gain can be represented as

Nut Shell

Error in measurement can be determined based on the accuracy and resolution specification of sensor , like say for example range resolution and doppler resolution of RADAR . If we consider that Error in estimate is 0 , then K will become 0 . When that happens the filter will ignore measurements completely and as mentioned previously to not to let that happen we need to set Matrix Q to non zero value. Even though it is not possible to design a sensor which has 0 error in measurement , if we assume that we have such a kind sensor , then Kalman gain will have a value 1 , which means filter will only use measurements and completely ignore predictions. In reality the value of Kalman gain keeps on adjusting dynamically between 0 and 1. If the Kalman gain value is 0.5 , the filter gives equal weightage to both estimation and measurements. Observation Matrix H in case of RADAR is basically the one used to carry out co ordinate system transformation from cartesian to radial and looks like the one below

??

Observation Matrix


The next step is to determine the state of the system based on the measurement - we can call it as measured state of the system and is represented by following equation : Yk= C* Xmk+Zk

Where Xmk is a measurement of state of the system & Zk is a noise in measurement ( please note that noise in measurement is different than the error in measurement) . C is the transformation matrix used for matrix dimension matching .

Sample Calcultion


Finally we now have all the ingredients ready to determine the state of the system which is calculated using the following equation

As you can see , The final state of the system is summation of previous state and a weighted average of current measurement and prediction.

This marks an end to this article series , I hope you enjoyed it reading as much as I enjoyed writing it .


Ashish Deshpande

SVP || SW HW EE eMobility || SMIEEE

1 年

all three posts are very informative, thank you for sharing

要查看或添加评论,请登录

社区洞察

其他会员也浏览了