Unscented KF vs EKF

Why was the decision made to use an EKF instead of a Unscented KF? Being that the UKF does require more tuning but it does have better performance. I know that the UKF does require a slight increase in computation time but the complexity is the the same as the EKF.

This question could certainly be answered by @priseborough better than me, but here is my 2 cents.

The highly dynamic nature of attitude control of a quadcopter requires speed and tolerance to noise and uncertainties, making the EKF a prefered choice because the UKF method of averging sigma points cannot deal with complete uncertainties.

As for speed, although the EKF and UKF have roughly the same accuracy, the computational overhead of the UKF, the simplicity of the Jacobian matrix calculations, and the quasi-linear nature of the quaternion dynamics makes the EKF a better choice for the task of improving tracking of noisy quaternion signals.

UKF and Particule filters are prefered in SLAM where high accuracy and minimal error in the estimation loop are required and justifying the use of a much higher budget of processing power within the localisation and mapping system.

My intuition is that In Ardupilot’s case the (high) measurement frequencies we deal with result in highly “local” linearity, so the EKF’s Jacobian method to approximate non linearity works well. It’s doubtful sampling as done with UKF would improve this. Also UKF is typically a bit slower. That said it would be interesting to do a comparative study.

Not for the faint of heart, to say the least, given coding and testing complexity.

Also of note, we’re running multiple instances of the EKF, one for each IMU usually sampling at different rates so we become immune to high frequency vibration aliasing. It will automatically switch between the instances for the one with the best innovation. That’s not something we could do with a UKF given the complexity.

Awesome, thanks for clearing that up!

In the past have implemented the PX4/ecl state and prediction equations (which are the same as EKF3) as a UKF implementation for a client and can confirm that the increase in computations makes it not possible to run a single instance on an STM32F4 processor. It might be possible in an F7. There was some improvement in accuracy depending on the types of observations used, but it was not significant.

Much of the computational cost increase I encountered was due to the UKF derivation not utilising the algebraic optimisations that the the EKF does to take advantage of sparseness in the matrices.

2 Likes