Kalman filter Kalman Filter Kalman filter is used to filter true - - PowerPoint PPT Presentation
Kalman filter Kalman Filter Kalman filter is used to filter true - - PowerPoint PPT Presentation
Kalman filter Kalman Filter Kalman filter is used to filter true system states from noisy measurements T o apply the filter, we have to have good model of a system Common use cases: localization of robots, spaceships, ... radar
Kalman Filter
Kalman filter is used to filter “true” system states from noisy measurements T
- apply the filter, we have to have good
model of a system Common use cases: localization of robots, spaceships, ... radar tracking ...
Model
System state Observations Errors wk ∼ N(0, Qk) vk ∼ N(0, Rk) zk = Hkxk + vk xk = Fkxk−1 + Bkuk + wk
Kalman filter
Kalman filter is represented by two variables at any time k the estimate of state at time k given allthe observations until and including time k error covariance matrix showing the precision of state estimates ˆ xk|k Pk|k
Filtering steps
Prediction Based on previous state we predict the next state and variation of the system Update Based on the observation we correct the system state and covariance estimates
Predict
The state and covariance are predicted from model ˆ xk|k−1 = Fkˆ xk−1|k−1 + Bk−1uk−1 Pk|k−1 = FkPk−1|k−1FT
k + Qk−1
Update
The state is updated as where is called the Kalman gain The estimate covariance is ˆ xk|k = ˆ xk|k−1 + Kk(zk − Hkˆ xk|k−1) Pk|k = (I − KkHk)Pk|k−1 Kk
Kalman gain
Kalman gain gives an optimal weight for including the observation information It minimizes the mean square error criteria Which means we are minimizing E[|xk − ˆ xk|k|2]. tr(Pk|k)
Deriving the Kalman gain
Using the model terms it is easy to show Expanding it, we get Setting the derivative to zero yields
Pk|k = cov(xk − ˆ xk|k) = (I − KkHk)Pk|k−1(I − KkHk)T + KkRkKT
k
Pk|k = Pk|k−1 − KkHkPk|k−1 − Pk|k−1HT
k KT k + Kk(HkPk|k−1HT k + Rk)KT k
= Pk|k−1 − KkHkPk|k−1 − Pk|k−1HT
k KT k + KkSkKT k
∂ tr(Pk|k) ∂ Kk = −2(HkPk|k−1)T + 2KkSk = 0 Kk = Pk|k−1HT
k S−1 k
Extended Kalman filter
Say we have a nonlinear model Kalman filter cannot be applied directly However, we can linearize the model at each step and use it in the model xk = f(xk−1, uk) + wk zk = h(xk) + vk
Figure 4.6: Second simulation: . The filter is slower to re- spond to the measurements, resulting in reduced estimate variance. 50 40 30 20 10
- 0.2
- 0.3
- 0.4
- 0.5
Voltage R 1 =
Parameter influence
Figure 4.7: Third simulation: . The filter responds to measurements quickly, increasing the estimate variance. 50 40 30 20 10
- 0.2
- 0.3
- 0.4
- 0.5
Voltage R 0.0001 =