The Unscented Kalman filter (UKF) attempts to obtain a more accurate linearization by using multiple samples to calculate the covariance. Instead of passing a single point through the action transition function and shaping the covariance, it passes multiple points through the action transition funtion and calculates the covariance from scratch using the transformed points. A primitive version of this filter might use a large number of samples and calculate the covariance and mean of the posterior distribution by brute force. When all of the distributions involved Gaussian, it is possible to construct the posterior Gaussian using a few specifically selected samples. These deterministically selected samples are referred to as sigma points.
The sigma point selection is influenced by three parameters:
The UKF requies its action model to be a GaussianActionModel.
The code to set up the filter does not change much from the EKF. Because the UKF models the nonlinearities better, the error bounds grow more quickly than the EKF. To slow the error growth, the amount of error specified by R has been reduced.
The code to update the belief is identical to the EKF.
The sensor update uses the same technique of sampling and covariance calculation as the action update. However, for this tutorial, we will use the same sensor model as we did with the Kalman filter and the EKF. The code to setup the filter and update with the sensor observation is exactly the same.
The following Silverlight app shows the UKF in action.