If your robot's motion and sensing are roughly well-behaved and you only need to track one hypothesis about its state, the Kalman filter family—specifically the Extended Kalman Filter (EKF) or Unscented Kalman Filter (UKF)—will get you there efficiently. If your problem is fundamentally ambiguous, non-linear, or non-Gaussian—think global localization in a symmetric building—reach for a particle filter, and budget for the extra computation. That is the core trade-off, and this guide walks you through why it exists and how to apply it to your own project.
Introduction to State Estimation in Robotics
Every autonomous robot has to answer the same question over and over: where am I, and where is everything around me? Sensors are noisy, motion models are imperfect, and the answer has to be recomputed continuously as new data arrives. The dominant tools for this job belong to the family of recursive Bayesian estimators, which—as Nicola Bellotto and Huosheng Hu of the University of Essex describe in their comparison study—include Kalman filters and sequential Monte Carlo estimators, the latter better known as particle filters.
In a typical tracking application, the target state evolves according to a discrete-time model in which the current state vector depends on the previous state plus white noise. Both filter families attack that same model; they differ in what they assume about it and how they represent their belief about the state. Those two differences—assumptions and representation—drive every practical decision you will make.
The stakes are real across robotics domains. Nak Yong Ko and Tae Gyun Kim, comparing the two filters for underwater vehicle localization, note that Kalman and particle filters are the major filters for estimating robot pose on the ground, and that both have been adapted for underwater robots. So the choice you face is not which filter is "better" in the abstract, but which one matches your system's actual character.
Kalman Filter Family: Principles and Assumptions
The workhorse of the family is the EKF. Per MathWorks' estimation filter documentation, the EKF is modified from the classical Kalman filter to adapt to non-linear models by linearizing the non-linear system about the state estimate—and in doing so, it neglects the second and higher order non-linear terms. That is the family's defining compromise: it forces your non-linear problem into a locally linear shape, and the error from that simplification grows as your system becomes more non-linear.
The UKF takes a different route to the same goal. Instead of first-order linearization, it applies an Unscented Transformation: it samples the covariance distribution at the current time, propagates those sample points—called sigma points—through the non-linear model, and approximates the resulting covariance from the propagated points. Bellotto and Hu's formulation uses 2n+1 weighted sigma points for a state of dimension n. According to MathWorks, this yields more accurate covariance propagation than the EKF's linearization, especially for highly non-linear systems.
Two practical consequences follow. First, the UKF does not require deriving and calculating Jacobian matrices, which removes one of the EKF's implementation headaches. Second, propagating 2n+1 sigma points through the model can be computationally expensive for high-dimensional states. A related variant, the cubature Kalman filter, uses 2n sample points and, per MathWorks, often achieves better statistical stability, avoiding divergence that can occur in the UKF on single-precision platforms.
