You are on page 1of 19

Dieter Fox

Department of Computer Science and Engineering


Adapting the Sample
University of Washington
Seattle, WA 98195, USA
Size in Particle Filters
fox@cs.washington.edu Through KLD-Sampling

Abstract mate the posterior probability density over the state space of
a dynamic system (Doucet, Godsill, and Andrieu 2000a; Pitt
Over the past few years, particle filters have been applied with great and Shephard 1999; Arulampalam et al. 2002). The key idea
success to a variety of state estimation problems. In this paper we of this technique is to represent probability densities by sets
present a statistical approach to increasing the efficiency of parti- of samples. It is due to this representation that particle filters
cle filters by adapting the size of sample sets during the estimation combine efficiency with the ability to represent a wide range
process. The key idea of the KLD-sampling method is to bound the of probability densities. The efficiency of particle filters lies
approximation error introduced by the sample-based representation in the way they place computational resources. By sampling
of the particle filter. The name KLD-sampling is due to the fact that in proportion to likelihood, particle filters focus the computa-
we measure the approximation error using the Kullback–Leibler dis- tional resources on regions with high likelihood, where good
tance. Our adaptation approach chooses a small number of samples approximations are most important.
if the density is focused on a small part of the state space, and it Since the complexity of particle filters depends on the num-
chooses a large number of samples if the state uncertainty is high. ber of samples used for estimation, several attempts have been
Both the implementation and computation overhead of this approach made to make more efficient use of the available samples
are small. Extensive experiments using mobile robot localization as a (Gilks and Berzuini 2001; Pitt and Shephard 1999; Godsill
test application show that our approach yields drastic improvements and Clapp 2001). So far, however, an important source for in-
over particle filters with fixed sample set sizes and over a previously creasing the efficiency of particle filters has only rarely been
introduced adaptation technique. studied: adapting the number of samples over time. While
KEY WORDS—particle filters, robot localization, non-linear sample sizes have been discussed in the context of genetic
estimation algorithms (Pelikan, Goldberg, and Cant-Paz 2000) and in-
teracting particle filters (Del Moral and Miclo 2000), most
existing approaches to particle filters use a fixed number of
1. Introduction samples during the entire state estimation process. This can
be highly inefficient, since the complexity of the probability
Estimating the state of a dynamic system based on noisy sen- densities can vary drastically over time. Previously, an adap-
sor measurements is extremely important in areas as different tive approach for particle filters has been applied by Koller
as speech recognition, target tracking, mobile robot naviga- and Fratkina (1998) and Fox et al. (1999a). This approach
tion, and computer vision. Over the past few years, particle adjusts the number of samples based on the likelihood of ob-
filters have been applied with great success to a variety of servations, which has some important shortcomings, as we
state estimation problems including visual tracking (Isard and will show. In this paper we introduce a novel approach to
Blake 1998), speech recognition (Vermaak et al. 2002), mo- adapting the number of samples over time. Our technique de-
bile robot localization (Fox et al. 1999a; Lenser and Veloso termines the number of samples based on statistical bounds
2000; Jensfelt et al. 2000), map building (Montemerlo et al. on the sample-based approximation quality. Extensive exper-
2002a), people tracking (Schulz et al. 2001; Montemerlo, iments indicate that our approach yields significant improve-
Thrun, and Whittaker 2002b), and fault detection (Verma, ments over particle filters with fixed sample set sizes and over
Langford, and Simmons 2001; de Freitas 2002). A recent a previously introduced adaptation technique.
book provides an excellent overview of the state of the art In this paper, we investigate the utility of adaptive parti-
(Doucet, de Freitas, and Gordon 2001). Particle filters esti- cle filters in the context of mobile robot localization, which
The International Journal of Robotics Research
is the problem of estimating a robot’s pose relative to a map
Vol. 22, No. 12, December 2003, pp. 985-1003, of its environment. The localization problem is occasionally
©2003 Sage Publications

985
Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015
986 THE INTERNATIONAL JOURNAL OF ROBOTICS RESEARCH / December 2003

referred to as “the most fundamental problem to providing a that the data consist of an alternating sequence of time indexed
mobile robot with autonomous capabilities” (Cox 1991). The observations zt and control measurements ut , which describe
mobile robot localization problem comes in different flavors. the dynamics of the system. The posterior at time t is called
The most simple localization problem is position tracking. the belief Bel(xt ), defined by
Here the initial robot pose is known, and localization seeks
to identify small, incremental errors in a robot’s odometry. Bel(xt ) = p(xt | zt , ut−1 , zt−1 , ut−2 . . . , u0 , z0 ).
More challenging is the global localization problem, where
a robot is not told its initial pose, but instead has to deter- Bayes filters make the assumption that the dynamic system
mine it from scratch. The global localization problem is more is Markov, i.e., observations zt and control measurements ut
difficult, since the robot’s position estimate cannot be repre- are conditionally independent of past measurements and con-
sented adequately by unimodal probability densities (Burgard trol readings given knowledge of the state xt . Under this as-
et al. 1996). Only recently, several approaches have been intro- sumption the posterior can be determined efficiently using
duced that can solve the global localization problem, among the following two update rules: whenever a new control mea-
them grid-based approaches (Burgard et al. 1996), topologi- surement ut−1 is received, the state of the system is predicted
cal approaches (Kaelbling, Cassandra, and Kurien 1996; Sim- according to
mons and Koenig 1995), particle filters (Fox et al. 1999a), and 
multi-hypothesis tracking (Austin and Jensfelt 2000; Roume- Bel − (xt ) ←− p(xt | xt−1 , ut−1 ) Bel(xt−1 ) dxt−1 ,(1)
liotis and Bekey 2000). The most challenging problem in mo-
bile robot localization is the kidnapped robot problem (Engel- and whenever an observation zt is made, the state estimate is
son and McDermott 1992), in which a well-localized robot is corrected according to
teleported to some other position without being told. This
problem differs from the global localization problem in that Bel(xt ) ←− α p(zt | xt )Bel − (xt ) . (2)
the robot might firmly believe to be somewhere else at the time
Here, α is a normalizing constant which ensures that the belief
of the kidnapping. The kidnapped robot problem, thus, is of-
over the entire state space sums up to one. The term p(xt |
ten used to test a robot’s ability to recover autonomously from
xt−1 , ut−1 ) describes the system dynamics, i.e., how the state
catastrophic localization failures. Virtually all approaches ca-
of the system changes given control information ut−1 . p(zt |
pable of solving the global localization problem can be modi-
xt ), the perceptual model, describes the likelihood of making
fied such that they can also solve the kidnapped robot problem.
observation zt given that the current state is xt . Note that the
Therefore, we will focus on the tracking and global localiza-
random variables x, z and u can be high-dimensional vectors.
tion problem in this paper.
The belief immediately after the prediction and before the
The remainder of this paper is organized as follows. In the
observation is called the predictive belief Bel − (xt ), as given
next section we will outline the basics of Bayes filters and dis-
in eq. (1). At the beginning, the belief Bel(x0 ) is initialized
cuss different representations of posterior densities. Then we
with the prior knowledge about the state of the system.
will introduce particle filters and their application to mobile
Bayes filters are an abstract concept in that they only pro-
robot localization. In Section 3, we will introduce our novel
vide a probabilistic framework for recursive state estimation.
technique to adaptive particle filters. Experimental results are
To implement Bayes filters, we have to specify the percep-
presented in Section 4 before we conclude in Section 5.
tual model p(zt |xt ), the dynamics p(xt | xt−1 , ut−1 ), and the
representation of the belief Bel(xt ).
2. Particle Filters for Bayesian Filtering and
Robot Localization 2.2. Belief Representations

In this section we review the basics of Bayes filters and alter- The properties of the different implementations of Bayes fil-
native representations for the probability densities, or beliefs, ters strongly differ in the way they represent densities over the
underlying Bayes filters. Then we introduce particle filters as state xt . We will now discuss different belief representations
a sample-based implementation of Bayes filters, followed by and their properties in the context of mobile robot localization.
a discussion of their application to mobile robot localization. An overview of the different algorithms is given in Figure 1.

Kalman filters are the most widely used variant of Bayes


2.1. Bayes Filters
filters (Kalman 1960; Gelb 1974; Smith, Self, and
Bayes filters address the problem of estimating the state x Cheeseman 1990; Welch and Bishop 2001). They ap-
of a dynamical system from sensor measurements. The key proximate beliefs by their first and second moments,
idea of Bayes filtering is to recursively estimate the posterior i.e., mean and covariance. Kalman filters are optimal
probability density over the state space conditioned on the under the assumptions that the initial state uncertainty is
data collected so far. Without loss of generality, we assume unimodal Gaussian and that the observation model and

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


Fox / Adapting the Sample Size in Particle Filters 987

Grid Topological Kalman filter Extended / unscented


fixed/variable resolution Kalman filter
Piecewise constant approximation Abstract state space First and second moment First and second moment
Arbitrary posteriors Arbitrary, discrete posteriors Linear dynamics/observations Non−linear dynamics/observ.
Non−linear dynamics/observations Abstract dynamics/observations Optimal (linear, Gaussian) Not optimal (linear approx.)
Optimal, converges to true posterior One−dimensional graph Polynomial in state dimension Polynomial in state dimension
Exponential in state dimensions Global localization Position tracking Position tracking
Global localization

Particle filter Multi−hypothesis


tracking (EKF)
Sample−based approximation
Arbitrary posteriors Multi−modal Gaussian
Non−linear dynamics/observations Non−linear dynamics/observations
Optimal, converges to true posterior Not optimal (linear approx.)
Exponential in state dimensions Polynomial in state dimension
Global localization Global localization

Discrete Continuous
Bayes filters

Fig. 1. Properties of the most common implementations of Bayes filters. All approaches are based on the Markov assumption
underlying all Bayes filters.

the system dynamics are linear in the state with Gaus- of dimensions) (Cox and Leonard 1994; Dissanayake
sian noise. Non-linearities are typically approximated et al. 2001; Leonard and Feder 1999; Castellanos et al.
by linearization at the current state, resulting in the ex- 1999; Deans 2002).
tended Kalman filter (EKF). Recently, the unscented However, due to the assumption of unimodal posteriors,
Kalman filter (UF) has been introduced (Julier and Kalman filters applied to robot localization solely aim
Uhlmann 1997; Wan and van der Merwe 2000). This at tracking a robot’s location. They are not designed
approach deterministically generates samples (sigma- to globally localize a robot from scratch in arbitrarily
points) taken from the Gaussian state and passes these large environments. Some of the limitations of Kalman
samples through the non-linear dynamics, followed by a filters in the context of robot localization have been
Gaussian approximation of the predicted samples. The shown experimentally in Gutmann et al. (1998).
unscented filter has been shown to yield better approxi-
mations both in theory and in practice. Due to the linear Multi-hypothesis approaches represent the belief state by
approximations, both EKFs and UFs are not optimal. mixtures of Gaussians (Austin and Jensfelt 2000;
Roumeliotis and Bekey 2000; Jensfelt and Kristensen
Despite their restrictive assumptions, Kalman filters 2001; Arras, Castellanos, and Siegwart 2002). Each
have been applied with great success to mobile robot hypothesis, or Gaussian, is typically tracked by an
localization, where they yield very efficient and accu- EKF. Due to their ability to represent multi-modal be-
rate position estimates even for highly non-linear sys- liefs, these approaches are able to solve the global lo-
tems (Leonard and Durrant-Whyte 1991; Lu and Mil- calization problem. Since each hypothesis is tracked
ios 1997; Arras and Vestli 1998; Gutmann, Weigel, and using a Kalman filter, these methods still rely on
Nebel 1999). One of the key advantages of Kalman fil- the assumptions underlying the Kalman filters (apart
ters is their efficiency. The complexity is polynomial from unimodal posteriors). In practice, however, multi-
in the dimensionality of the state space and the ob- hypothesis approaches have been shown to be very ro-
servations. Due to this graceful increase in complexity, bust to violations of these assumptions. So far it is not
Kalman filters can be applied to the simultaneous local- clear how these methods can be applied to extremely
ization and map building problem (SLAM), where they non-linear observations, such as those used in Dellaert
estimate full posteriors over both robot positions and et al. (1999). In addition to pure Kalman filtering, multi-
landmark positions (typically consisting of hundreds hypothesis approaches require sophisticated heuristics

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


988 THE INTERNATIONAL JOURNAL OF ROBOTICS RESEARCH / December 2003

to solve the data association problem and to determine Since the complexity of these methods grows expo-
when to add or delete hypotheses (Bar-Shalom and Li nentially with the number of dimensions, it is doubtful
1995; Cox 1993). whether they can be applied to higher-dimensional state
spaces.
Topological approaches are based on symbolic, graph struc-
tured representations of the environment. The state Sample-based approaches represent beliefs by sets of sam-
space of the robot consists of a set of discrete, locally ples, or particles (Fox et al. 1999a; Dellaeart et al.
distinctive locations such as corners or crossings of hall- 1999; Fox et al. 2001; Lenser and Veloso 2000; Jens-
ways (Kaelbling, Cassandra, and Kurien 1996; Sim- felt et al. 2000; Gustafsson et al. 2002). A key advan-
mons and Koenig 1995; Kuipers 2000; Hertzberg and tage of particle filters is their ability to represent arbi-
Kirchner 1996; Choset and Nagatani 2001; Kuipers and trary probability densities, which is why they can solve
Beeson 2002). The advantage of these approaches lies the global localization problem. Furthermore, particle
in their efficiency and in the fact that they can repre- filters can be shown to converge to the true posterior
sent arbitrary distributions over the discrete state space. even in non-Gaussian, non-linear dynamic systems (Del
Therefore they can solve the global localization prob- Moral and Miclo 2000). Compared to grid-based ap-
lem. Additionally, these approaches may scale well to- proaches, particle filters are very efficient since they fo-
wards high-dimensional state spaces because the com- cus their resources (particles) on regions in state space
plexity of the topological structure does not directly with high likelihood. Since the efficiency of particle fil-
depend on the dimensionality of the underlying state ters strongly depends on the number of samples used for
space. A key disadvantage, however, lies in the coarse- the filtering process, several attempts have been made to
ness of the representation, due to which position esti- make more efficient use of the available samples (Gilks
mates provide only rough information about the robot and Berzuini 2001; Pitt and Shephard 1999; Godsill and
location. Furthermore, only sensor information related Clapp 2001). Since the worst-case complexity of these
to the symbolic representation of the environment can methods grows exponentially in the dimensions of the
be used, and adequate features might not be available state space, it is not clear how particle filters can be
in arbitrary environments. applied to arbitrary, high-dimensional estimation prob-
lems. If, however, the posterior focuses on small, lower-
Grid-based, metric approaches rely on discrete, piecewise dimensional regions of the state space, particle filters
constant representations of the belief (Burgard et al. can focus the samples on such regions, making them ap-
1996, 1998; Konolige and Chou 1999; Olson 2000). plicable to even high-dimensional state spaces. We will
For indoor localization, the spatial resolution of these discuss the details of particle filters in the next section.
grids is usually between 10 and 40 cm and the angu-
lar resolution is usually 5◦ . As topological approaches, Mixed approaches use independences in the structure of the
these methods can represent arbitrary distributions over state space to break the state into lower-dimensional
the discrete state space and can solve the global local- subspaces (random variables). Such structured rep-
ization problem.1 In contrast to topological approaches, resentations are known under the name of dynamic
the metric approximations provide accurate position es- Bayesian networks (Ghahramani 2001). The individual
timates in combination with high robustness to sensor subspaces can be represented using the most adequate
noise. A grid-based method has been applied success- representation, such as continuous densities, samples,
fully for the position estimation of the museum tour- or discrete values (Koller and Lerner 2001). Recently,
guide robots Rhino and Minerva (Burgard et al. 1999; under the name of Rao–Blackwellised particle filters
Thrun et al. 2000; Fox, Burgard, and Thrun 1999b). (Doucet et al. 2000b; de Freitas 2002; Gustafsson et al.
A disadvantage of grid-based approaches lies in their 2002), the combination of particle filters with Kalman
computational complexity, based on the requirement filters yielded extremely robust and efficient approaches
to keep the typically three-dimensional position prob- to higher-dimensional state estimation including full
ability grid in memory and to update it for each new posteriors over robot positions and maps (Murphy and
observation. Efficient sensor models (Fox, Burgard, Russell 2001; Montemerlo et al. 2002a).
and Thrun 1999b; Konolige and Chou 1999), selec-
tive update schemes (Fox, Burgard, and Thrun 1999b), 2.3. Particle Filters
and adaptive, tree-based representations (Burgard et al.
1998) greatly increase the efficiency of these methods, Particle filters are a variant of Bayes filters which represent
making them applicable to on-line robot localization. the belief Bel(xt ) by a set St of n weighted samples distributed
according to Bel(xt ):
1. Topological and, in particular, grid-based implementations of Bayes filters
for robot localization are often referred to as Markov localization (Fox 1998). St = {xt(i) , wt(i)  | i = 1, . . . , n}.

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


Fox / Adapting the Sample Size in Particle Filters 989

Table 1: The Basic Particle Filter Algorithm

(i) (i)
1. Inputs: St−1 = {xt−1 , wt−1  | i = 1, . . . , n} representing belief Bel(xt−1 ),
control measurement ut−1 , observation zt
2. St := ∅, α := 0 // Initialize
3. for i := 1, . . . , n do // Generate n samples
// Resampling: Draw state from previous belief
4. Sample an index j from the discrete distribution given by the weights in St−1
// Sampling: Predict next state
(i) (j )
5. Sample xt from p(xt | xt−1 , ut−1 ) conditioned on xt−1 and ut−1
(i) (i)
6. wt := p(zt | xt ); // Compute importance weight
(i)
7. α := α + wt // Update normalization factor
(i) (i)
8. St := St ∪ {xt , wt } // Insert sample into sample set
9. for i := 1, . . . , n do // Normalize importance weights
(i) (i)
10. wt := wt /α
11. return St

Here each xt(i) is a state, and the wt(i) are non-negative nu- so that they sum up to one (steps 9 and 10). It can be shown
merical factors called importance weights, which sum up to that this procedure, in fact, implements the Bayes filter, us-
one. The basic form of the particle filter realizes the recursive ing an (approximate) sample-based representation (Doucet,
Bayes filter according to a sampling procedure, often referred Godsill, and Andrieu 2000a; Doucet, de Freitas, and Gordon
to as sequential importance sampling with resampling (SISR; 2001). Furthermore, the sample-based
√ posterior converges to
see also Liu and Chen 1998; Doucet, Godsill, and Andrieu the true posterior at a rate of 1/ n as the number n of samples
2000a; Doucet, de Freitas, and Gordon 2001). A time update goes to infinity (Del Moral and Miclo 2000).
of the basic particle filter algorithm is outlined in Table 1.
At each iteration, the algorithm receives a sample set St−1
2.3.1. Particle Filters for Mobile Robot Localization
representing the previous belief of the robot, a control mea-
surement ut−1 , and an observation zt . Steps 3–8 generate n Figure 2 illustrates the particle filter algorithm using a one-
samples representing the posterior belief; step 4 determines dimensional robot localization example. For illustration pur-
which sample to draw from the previous set. In this resampling poses, the particle filter update is broken into two separate
step, a sample index is drawn with probability proportional parts: one for robot motion (steps 4 and 5), and one for ob-
to the sample weight.2 Once a sample index is drawn, the servations (steps 6 and 7). The robot is given a map of the
corresponding sample and the control information ut−1 are hallway, but it does not know its position. Figure 2(a) shows
used to predict the next state xt(i) . This is done by sampling the initial belief, a uniformly distributed sample set, which ap-
from the density p(xt | xt−1 , ut−1 ), which represents the sys- proximates a uniform distribution. Each sample has the same
tem dynamics. Each xt(i) corresponds to a sample drawn from importance weight, as indicated by the equal heights of all
the predictive belief Bel − (xt ) in eq. (1). In order to generate bars in this figure. Now assume the robot detects the door to
samples according to the posterior belief Bel(xt ), importance its left. The likelihood p(z | x) for this observation is shown
sampling is applied, with Bel(xt ) as target distribution and in the upper graph in Figure 2(b). This likelihood is incorpo-
p(xt | xt−1 , ut−1 )Bel(xt−1 ) as proposal distribution (Smith rated into the sample set by adjusting and then normalizing the
and Gelfand 1992; Fox et al. 2001). By dividing these two importance factor of each sample, which leads to the sample
distributions, we get p(zt | xt(i) ) as the importance weight for set shown in the lower part of Figure 2(b) (steps 6–10 in Ta-
each sample (see eq. (2)). Step 7 keeps track of the normaliza- ble 1). These samples have the same states as before, but now
tion factor, and step 8 inserts the new sample into the sample their importance factors are proportional to p(z | x). Next the
set. After generating n samples, the weights are normalized robot moves to the right, receiving control information u. The
particle filter algorithm now draws samples from the current,
2. Resampling with minimal variance can be implemented efficiently (con-
weighted sample set, and then randomly predicts the next lo-
stant time per sample) using a procedure known as deterministic selection
(Kitagawa 1996; Arulampalam et al. 2002) or stochastic universal sampling cation of the robot using the motion information u (steps 4 and
(Baker 1987). 5 in Table 1). The resulting sample set is shown in Figure 2(c).

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


990 THE INTERNATIONAL JOURNAL OF ROBOTICS RESEARCH / December 2003

(a)

w(i)
x

(b)

P(z|x)

w(i)
x

(c)

w(i)

(d)

P(z|x)

w(i)
x

(e)

w(i)
x

Fig. 2. One-dimensional illustration of particle filters for mobile robot localization.

Notice that this sample set differs from the original one in that the upper graph of Figure 2(d). By weighting the importance
the majority of samples are centered around three locations. factors in proportion to this probability, we obtain the sample
This concentration of the samples is achieved through resam- set in Figure 2(d). After the next robot motion, which includes
pling step 4 (with a subsequent motion). The robot now senses a resampling step, most of the probability mass is consistent
a second door, leading to the probability p(z | x) shown in with the robot’s true location.

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


Fox / Adapting the Sample Size in Particle Filters 991

In typical robot localization problems, the position of the and Kröse 2002). Along a similar line of reasoning, the in-
robot is represented in the two-dimensional Cartesian space jection of observation samples into the posterior can be very
along with the robot’s heading direction θ . Measurements zt advantageous (Lenser and Veloso 2000; Thrun et al. 2001; Fox
may include range measurements and camera images, and et al. 2001). However, this approach requires the availability of
control information ut usually consists of the robot’s odom- a sensor model from which it is possible to efficiently generate
etry readings. The next state probability p(xt | xt−1 , ut−1 ) samples.
describes how the position of the robot changes based on in- In this paper we introduce an approach to increasing the ef-
formation collected by the robot’s wheel encoders. This con- ficiency of particle filters by adapting the number of samples
ditional probability is typically a model of robot kinematics to the underlying state uncertainty (Fox 2002). The localiza-
annotated with white noise (Fox et al. 1999a, 2001). The per- tion example in Figure 3 illustrates when such an approach
ceptual model p(zt | xt ) describes the likelihood of making can be very beneficial. In the beginning of global localization,
the observation zt given that the robot is at location xt . Particle the robot is highly uncertain and a large number of samples
filters have been applied to a variety of robot platforms and is needed to accurately represent its belief (cf. Figure 3(a)).
sensors such as vision (Dellaert et al. 1999; Lenser and Veloso On the other extreme, once the robot knows where it is, only
2000; Enderle et al. 2000; Wolf, Burgard, and Burkhardt 2002; a small number of samples suffices to accurately track its
Vlassis, Terwijn, and Kröse 2002; Gutmann and Fox 2002) position (cf. Figure 3(c)). However, with a fixed number of
and proximity sensors (Fox et al. 1999a, 2001; Jensfelt et al. samples it is necessary to choose large sample sets so as to
2000). allow a mobile robot to address both the global localization
Figure 3 illustrates the application of particle filters to mo- and the position tracking problem. Our approach, in contrast,
bile robot localization using sonar sensors. We show a map adapts the number of samples during the localization process,
of a hallway environment along with a sequence of sample thereby choosing large sample sets during global localization
sets during global localization. The pictures demonstrate the and small sample sets for position tracking. Before we intro-
ability of particle filters to represent a wide variety of distribu- duce our method for adaptive particle filters, let us first discuss
tions, ranging from uniform to highly focused. Especially in an existing technique to changing the number of samples dur-
symmetric environments, the ability to represent ambiguous ing the filtering process (Koller and Fratkina 1998; Fox et al.
situations is of utmost importance for the success of global 1999a).
localization. In this example, all sample sets contain 100,000
samples. While such a high number of samples might be nec-
3.1. Likelihood-Based Adaptation
essary to accurately represent the belief during early stages of
localization (cf., Figure 3(a)), it is obvious that only a small We call this approach likelihood-based adaptation since it de-
fraction of this number suffices to track the position of the termines the number of samples based on the likelihood of
robot once it knows where it is (cf., Figure 3(c)). Unfortu- observations. More specifically, the approach generates sam-
nately, it is not straightforward how the number of samples ples until the sum of the non-normalized likelihoods exceeds
can be adapted during the estimation process, and this prob- a pre-specified threshold. This sum is equivalent to the nor-
lem has only rarely been addressed so far. malization factor α updated in step 7 of the particle filter al-
gorithm (see Table 1). Likelihood-based adaptation has been
applied to dynamic Bayesian networks (Koller and Fratkina
3. Adaptive Particle Filters with Variable 1998) and mobile robot localization (Fox et al. 1999a). The
Sample Set Sizes intuition behind this approach is as follows. If the sample set
is well in tune with the sensor reading, each individual impor-
The time complexity of one update of the particle filter al- tance weight is large and the sample set remains small. This
gorithm is linear in the number of samples needed for the is typically the case during position tracking (cf. Figure 3(c)).
estimation. Therefore, several attempts have been made to If, however, the sensor reading carries a lot of surprise, as is
make more effective use of the available samples, thereby the case when the robot is globally uncertain or when it lost
allowing sample sets of reasonable size. One such method track of its position, the individual sample weights are small
incorporates Markov chain Monte Carlo (MCMC) steps to and the sample set becomes large.
improve the quality of the sample-based posterior approxima- The likelihood-based adaptation directly relates to the
tion (Gilks and Berzuini 2001). Another approach, auxiliary property that the variance of the importance sampler is a
particle filters, applies a one-step lookahead to minimize the function of the mismatch between the proposal distribution
mismatch between the proposal and the target distribution, and the target distribution. Unfortunately, this mismatch is
thereby minimizing the variability of the importance weights, not always an accurate indicator for the necessary number
which in turn determines the efficiency of the importance sam- of samples. Consider, for example, the ambiguous belief
pler (Pitt and Shephard 1999). Auxiliary particle filters have state consisting of four distinctive sample clusters shown in
been applied recently to robot localization (Vlassis, Terwijn, Figure 3(b). Due to the symmetry of the environment, the

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


992 THE INTERNATIONAL JOURNAL OF ROBOTICS RESEARCH / December 2003

Robot position

Start
(a)

Robot position

(b)

Robot position

(c)

Fig. 3. Map of the University of Washington (UW) Computer Science and Engineering (CSE) Department along with a series
of sample sets representing the robot’s belief during global localization using sonar sensors (samples are projected into two
dimensions). The size of the environment is 54 × 18 m2 . (a) After moving 5 m, the robot is still highly uncertain about its
position and the samples are spread through major parts of the free space. (b) Even as the robot reaches the upper-left corner
of the map, its belief is still concentrated around four possible locations. (c) Finally, after moving approximately 55 m, the
ambiguity is resolved and the robot knows where it is. All computation is carried out in real time on a low-end PC.

average likelihood of a sensor measurement observed in this At each iteration of the particle filter, determine the
situation is approximately the same as if the robot knew its number of samples such that, with probability 1 − δ, the
position unambiguously (cf., Figure 3(c)). Likelihood-based error between the true posterior and the sample-based
adaptation would hence use the same number of samples in approximation is less than ε.
both situations. Nevertheless, it is obvious that an accurate
approximation of the belief shown in Figure 3(b) requires a
multiple of the samples needed to represent the belief in Fig- 3.2.1. The Kullback–Leibler Distance
ure 3(c). To derive a bound on the approximation error, we assume
The likelihood-based approach has been shown to be su- that the true posterior is given by a discrete, piecewise con-
perior to particle filters with fixed sample set sizes (Koller and stant distribution such as a discrete density tree or a multi-
Fratkina 1998; Fox et al. 1999a). However, the previous dis- dimensional histogram (Koller and Fratkina 1998; Moore,
cussion makes clear that this approach does not fully exploit Schneider, and Deng 1997; Omohundro 1991; Thrun, Lang-
the potential of adapting the size of sample sets. ford, and Fox 1999). For such a representation we show how
to determine the number of samples so that the distance be-
tween the sample-based maximum likelihood estimate (MLE)
3.2. KLD-Sampling
and the true posterior does not exceed a pre-specified thresh-
The key idea of our approach to adaptive particle filters can old ε. We denote the resulting approach as the KLD-sampling
be stated as follows: algorithm since the distance between the MLE and the true

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


Fox / Adapting the Sample Size in Particle Filters 993

distribution is measured by the Kullback–Leibler distance Equation (10) follows from eq. (6) and the convergence result
(KL-distance; Cover and Thomas 1991). The KL-distance is stated in eq. (7). The quantiles of the chi-square distribution
a measure of the difference between two probability distribu- are given by
tions p and q:
P (χk−1
2
≤ χk−1,1−δ
2
) = 1−δ. (11)
 p(x)
K(p, q) = p(x)log . (3) If we choose n such that 2nε is equal to χk−1,1−δ
2
x
q(x) , we can
combine eqs. (10) and (11) and get
The KL-distance is never negative and it is zero if and only .
if the two distributions are identical. It is not a metric, since Pp (K(
p , p) ≤ ε) = 1 − δ . (12)
it is not symmetric and does not obey the triangle property.
Now we have a clear relationship between the number of sam-
Despite this fact, it is accepted as a standard measure for the
ples and the resulting approximation quality. To summarize,
difference between probability distributions (or densities).
if we choose the number of samples n as
In what follows, we will first determine the number of sam-
ples needed to achieve, with high probability, a good approx- 1 2
n= χ , (13)
imation of an arbitrary, discrete probability distribution (see 2ε k−1,1−δ
also Rice 1995; Johnson, Kotz, and Balakrishnan 1994). Then
then we can guarantee that with probability 1 − δ, the KL-
we will show how to modify the basic particle filter algorithm
distance between the MLE and the true distribution is less
so that it realizes our adaptation approach. To see, suppose that
than ε (see eq. (12)). In order to determine n according
n samples are drawn from a discrete distribution with k differ-
to eq. (13), we need to compute the quantiles of the chi-
ent bins. Let the vector X = (X1 , . . . , Xk ) denote the number
square distribution. A good approximation is given by the
of samples drawn from each bin. X is distributed according
Wilson–Hilferty transformation (Johnson, Kotz, and Balakr-
to a multinomial distribution, i.e., X ∼ Multinomialk (n, p),
ishnan 1994), which yields
where p = p1 . . . pk specifies the true probability of each bin.
The maximum likelihood estimate of p using the n samples is 
1 2 . k−1 2
given by  p = n−1 X. Furthermore, the likelihood ratio statistic n= χk−1,1−δ = 1−
2ε 2ε 9(k − 1)
λn for testing p is
 3 (14)

k   2
p
j + z1−δ ,
log λn = Xj log . (4) 9(k − 1)
j =1
pj
where z1−δ is the upper 1 − δ quantile of the standard normal
Since Xj is identical to n
pj we get distribution. The values of z1−δ for typical values of δ are

k   readily available in standard statistical tables.
p
j
log λn = n p
j log . (5) This concludes the derivation of the sample size needed
j =1
pj to approximate a discrete distribution with an upper bound ε
on the KL-distance. From eq. (14) we see that the required
From eqs. (3) and (5) we can see that the likelihood ratio
number of samples is proportional to the inverse of the error
statistic is n times the KL-distance between the MLE and the
bound ε, and to the first-order linear in the number k of bins
true distribution:
with support. Here we assume that a bin of the multinomial
log λn = nK(
p , p). (6) distribution has support if its probability is above a certain
threshold (i.e., if it contains at least one particle).3
It can be shown that the likelihood ratio converges to a chi-
square distribution with k −1 degrees of freedom (Rice 1995): 3.2.2. Using KL-Distance in Particle Filters
2 log λn →d χk−1
2
as n → ∞. (7) It remains to be shown how to incorporate this result into the
Now let Pp (K( p , p) ≤ ε) denote the probability that the KL- particle filter algorithm. The problem is that we do not know
distance between the true distribution and the sample-based 3. This way of determining the number of degrees of freedom of a multinomial
MLE is less than or equal to ε (under the assumption that p distribution is a common statistical tool. In our approach, the key advantage of
is the true distribution). The relationship between this proba- this approximation is that it results in an efficient implementation that does not
even depend on a threshold itself (see next section). We also implemented a
bility and the number of samples can be derived as follows: version of the algorithm using the complexity of the state space to determine
the number of samples. Complexity is measured by 2H , where H is the
Pp (K(
p , p) ≤ ε) = Pp (2nK( p , p) ≤ 2nε) (8) entropy of the distribution. This approach does not depend on thresholding
= Pp (2 log λn ≤ 2nε) (9) at all, but it does not have guaranteed approximation bounds and cannot be
. implemented as efficiently as the method described here. Furthermore, it does
= P (χk−1 ≤ 2nε).
2
(10) not yield noticeably different results.

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


994 THE INTERNATIONAL JOURNAL OF ROBOTICS RESEARCH / December 2003

Table 2: KLD-Sampling Algorithm


(i) (i)
1. Inputs: St−1 = {xt−1 , wt−1  | i = 1, . . . , n} representing belief Bel(xt−1 ),
control measurement ut−1 , observation zt ,
bounds ε and δ, bin size ", minimum number of samples nχmin
2. St := ∅, n = 0, nχ = 0, k = 0, α = 0 // Initialize
3. do // Generate samples . . .
// Resampling: Draw state from previous belief
4. Sample an index j from the discrete distribution given by the weights in St−1
// Sampling: Predict next state
(j )
5. Sample xt(n) from p(xt | xt−1 , ut−1 ) using xt−1 and ut−1
6. wt(n) := p(zt | xt(n) ); // Compute importance weight
7. α := α + wt(n) // Update normalization factor
8. St := St ∪ {xt(n) , wt(n) } // Insert sample into sample set
9. if (xt(n) falls into empty bin b) then
10. k := k + 1 // Update number of bins with support
11. b := non-empty // Mark bin

3
12. nχ := k−1 2 2
2ε 1 − 9(k−1) + 9(k−1) z1−δ // Update number of desired samples

13. n := n + 1 // Update number of generated samples


14. while (n < nχ and n < nχ min ) // . . . until KL-bound is reached
15. for i := 1, . . . , n do // Normalize importance weights
16. wt(i) := wt(i) /α
17. return St

the true posterior distribution for which we can estimate the samples required for our current estimate of k (step 12). This
number of samples needed for a good approximation (the effi- concurrent increase in number n of already generated samples
cient estimation of this posterior is the main goal of the particle and in the desired number nχ of samples works as follows.
filter). Our solution to this problem is to rely on the sample- In the early stages of sampling, k increases with almost every
based representation of the predictive belief as an estimate for new sample since virtually all bins are empty. This increase
the posterior (samples from this belief are generated in step 5 in k results in an increase in the number of desired samples
of the basic particle filter algorithm shown in Table 1). Fur- nχ . However, over time, more and more bins are non-empty
thermore, eq. (14) shows that it is not necessary to determine and nχ increases only occasionally. Since n increases with
the complete discrete distribution, but that it suffices to deter- each new sample, n will finally reach nχ and sampling can be
mine the number k of bins with support (for given ε and δ). stopped (condition in step 14).
Even though we do not know this quantity before we actually The implementation of this modified particle filter is
generate all samples from the predictive distribution, we can straightforward. The difference to the original algorithm is
estimate k by counting the number of bins with support during that we have to keep track of the number k of supported
sampling. bins and the number nχ of desired samples (steps 9–12; for
An update step of the KLD-sampling particle filter is sum- clarity we omitted the fact that nχ can be determined only
marized in Table 2. As can be seen, we update the number when k > 1). The bins can be implemented either as a fixed,
of supported bins k for the predictive distribution after each multi-dimensional grid, or more compactly as tree structures
sample generated in step 5. The determination of k can be (Koller and Fratkina 1998; Moore, Schneider, and Deng 1997;
done incrementally by checking for each generated sample Omohundro 1991; Thrun, Langford, and Fox 1999; Fox et al.
whether it falls into an empty bin or not (steps 9–11). Af- 2000). Note that the sampling process is guaranteed to termi-
ter each sample, we use eq. (14) to update the number nχ of nate, since for a given bin size ", the maximum number k of

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


Fox / Adapting the Sample Size in Particle Filters 995

bins is limited, which also limits the maximum number nχ of distance along with 95% confidence intervals against the av-
desired samples. erage number of samples for the different algorithms and pa-
To summarize, our approach adapts the number of samples rameter settings (for clarity, we omitted the large error bars for
based on the approximation error introduced by the sample- KL-distances above 1.0). The different data points for KLD-
based representation. It uses the predictive belief state as sampling were obtained by varying the error bound ε between
an estimate of the underlying posterior. Therefore, it is not 0.4 and 0.015. Each data point in the graph represents the aver-
guaranteed that our approach does not diverge from the true age of 16 global localization runs with different start positions
(unknown) belief. However, as our experiments show, diver- of the robot (each of these runs itself represents the average of
gence only occurs when the error bounds are too loose. KLD- approximately 150 sample set comparisons at different points
sampling is easy to implement and the determination of the in time). As expected, the more samples used by the different
sample set size can be done without noticeable loss in process- approaches, the better the approximation. The curves clearly
ing speed (at least in our low-dimensional robot localization illustrate the superior performance of our approach. While the
context). Furthermore, our approach can be used in combina- fixed approach requires about 50,000 samples before it con-
tion with any scheme for improving the approximation of the verges to a KL-distance below 0.25, our approach converges
posterior (Gilks and Berzuini 2001; Pitt and Shephard 1999; to the same level using only 3000 samples on average. This
Godsill and Clapp 2001; Thrun et al. 2001). is also an improvement by a factor of 12 compared to the ap-
proximately 36 000 samples needed by the likelihood-based
approach. The graph also shows that our approach is not guar-
4. Experimental Results
anteed to accurately track the true belief. This is due to the
We have evaluated KLD-sampling in the context of indoor fact that the error bound is computed relative to the current
mobile robot localization using data collected with a Pio- estimate of the belief, not the true posterior. Therefore, our
neer robot (see Figure 4). The data consist of a sequence of approach can diverge if the error bound is too loose (see left-
sonar and laser range-finder scans along with odometry mea- most data point in the KLD-sampling graph). However, these
surements annotated with time-stamps to allow systematic experiments indicate that our approach, even though based
real-time evaluations. We used a beam-based sensor model on several approximations, is able to accurately track the true
to compute the likelihood of the sensor scans (Fox, Burgard, posterior using far smaller sample sets on average than other
and Thrun 1999b; Fox et al. 2001). In the first experiments approaches.
we compared our KLD-sampling approach to the likelihood-
based approach discussed in Section 3.1, and to particle fil- 4.2. Real-Time Performance
ters with fixed sample set sizes. Throughout the experiments
we used different parameters for the three approaches. For Due to the computational overhead for determining the num-
the fixed approach we varied the number of samples, for the ber of samples, it is not clear that our approach yields better
likelihood-based approach we varied the threshold used to results under real-time conditions. To test the performance of
determine the number of samples, and for our approach we our approach under realistic conditions, we performed multi-
varied ε, the bound on the KL-distance. In all experiments, ple global localization experiments under real-time consider-
we used a value of 0.99 for (1 − δ) and a fixed bin size " of ations using the time-stamps in the data sets. As in the previ-
50 × 50 cm2 × 10◦ . We limited the maximum number of sam- ous experiment, localization was based on the robot’s sonar
ples for all approaches to 100 000. The influence of different sensors. Again, the different average numbers of samples for
parameter settings on the performance of KLD-sampling is KLD-sampling were obtained by varying the ε-bound. The
discussed in more detail in Section 4.4. minimum and maximum numbers of samples correspond to
ε-bounds of 0.4 and 0.015, respectively. After each update
of the particle filter we determined the distance between the
4.1. Approximation of the True Posterior estimated robot position and the corresponding reference po-
In the first set of experiments we evaluated how accurately sition.4 The results are shown in Figure 5(b). The U-shape
the different methods approximate the true posterior density. of all three graphs nicely illustrates the trade-off involved in
Since the ground truth for these posteriors is not available, choosing the number of samples under real-time constraints.
we generated reference sample sets using a particle filter with Choosing not enough samples results in a poor approximation
a fixed number of 200,000 samples (far more than actually of the underlying posterior and the robot frequently fails to
needed for position estimation). At each iteration of our test localize itself. On the other hand, if we choose too many sam-
algorithms, we computed the KL-distance between the cur- ples, each update of the algorithm can take several seconds
rent sample sets and the corresponding reference sets, us- and valuable sensor data have to be discarded, which results
ing histograms for both sets. We ignored the time-stamps in
4. Position estimates are extracted from sample sets using histograming and
these experiments and gave each algorithm as much time as local averaging, and the reference positions were determined by evaluating
needed to process the data. Figure 5(a) plots the average KL- the robot’s highly accurate laser range-finder information.

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


996 THE INTERNATIONAL JOURNAL OF ROBOTICS RESEARCH / December 2003

18 m
(a) (b)
54 m

Fig. 4. (a) Pioneer II robot used throughout the experiments. (b) Map used for localization along with the path followed by
the robot during data collection. The small circles mark the different start points for the global localization experiments.

3.5 200
KLD−based adaptation KLD−based adaptation
3 Likelihood−based adaptation Likelihood−based adaptation

Localization error [cm]


2.5 Fixed sampling 150 Fixed sampling
KL distance

1.5 100

0.5 50

−0.5 0
0 20000 40000 60000 80000 100000 0 20000 40000 60000 80000
Number of samples (a) Number of samples (b)

Fig. 5. The x-axis represents the average sample set size for different parameters of the three approaches. (a) The y-axis
plots the KL-distance between the reference densities and the sample sets generated by the different approaches (real-time
constraints were not considered in this experiment). (b) The y-axis represents the average localization error measured by
the distance between estimated positions and reference positions. The U-shape in (b) is due to the fact that under real-time
conditions, an increasing number of samples results in higher update times and therefore loss of sensor data.

in less accurate position estimates. Figure 5(b) also shows (solid line). As expected, the higher accuracy of the laser
that, even under real-time conditions, our KLD-sampling ap- range-finder results in a faster drop in the number of sam-
proach yields drastic improvements over both fixed sampling ples and in smaller sample sets during the final tracking phase
and likelihood-based sampling. The smallest average localiza- of the experiment. Note that the same parameters were used
tion error is 44 cm in contrast to a minimal average error of 79 for both runs. Extensions 1 and 2 illustrate global localization
and 114 cm for the likelihood-based and the fixed approach, using sonar and laser range-finders. We show animations of
respectively. This result is due to the fact that our approach is sample sets during localization, annotated with the number of
able to determine the best mix between more samples during samples used at the different points in time. Both runs start
early stages of localization and fewer samples during posi- with 40 000 samples. The robot is plotted at the position esti-
tion tracking. Due to the smaller sample sets, our approach mated from the sample sets. The timing of the animations is
also needs significantly less processing power than any of the proportional to the approximate update times for the particle
other approaches. Note that the average errors are relatively filter (real updates are more than two times faster).
high since they include the large errors occurring during the
beginning of each localization run.
Figure 6 shows the sample set sizes during a typical global 4.3. Tracking Performance
localization run using KLD-sampling. In addition to the sizes So far we have only shown that KLD-sampling is bene-
based on the sonar data used in the previous experiments ficial if the state uncertainty is extremely high in the be-
(dashed line), the graph also shows the numbers of samples ginning and then constantly decreases to a certain level. In
resulting from data collected by the robot’s laser range-finder this experiment we test whether KLD-sampling can produce

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


Fox / Adapting the Sample Size in Particle Filters 997

100000

Laser
Sonar
10000

Number of samples
1000

100

10
0 200 400 600 800 1000 120

Time [sec]

Fig. 6. Typical evolution of number of samples for a global localization run, plotted against time (the number of samples is
shown on a log scale). The solid line shows the number of samples when using the robot’s laser range-finder; the dashed line
is based on sonar sensor data.

Adaptive 700
600 Adaptive
Fixed
Localization error [cm]

600
Number of samples

500
400
400

300
200
200

100
0
0 500 1000 1500 2000 250
0 200 400 600 800 1000
Number of samples (a) Time [sec] (b)

Fig. 7. (a) Localization error for different average sample set sizes. The solid line shows the error using KLD-sampling, and
the dashed line illustrates the results using fixed sample set sizes. (b) Number of samples during one of the KLD-sampling
runs. The gray shaded areas indicate time intervals of sensor loss, i.e., during which no laser data were available.

improvements even for tracking, when the initial state of the lustrates the localization error for different sample set sizes
system is known. Again, we used the data collected by the Pi- for both KLD-sampling and fixed sample set sizes.5 Again,
oneer robot shown in Figure 4. This time we used the robot’s our approach is highly superior to the fixed sampling scheme.
laser range-finder data. In each run, the particle filter was With our approach, good tracking results (average error of
initialized with a Gaussian distribution centered at the start 52.8 ± 8.5 cm) can be achieved with only 184 samples on
location of the robot. Our initial experiments showed that in average, while the fixed approach requires 750 samples to
this context KLD-sampling has no significant advantage over achieve comparable accuracy. Note that the relatively large
fixed sample sets. This result is not surprising since the un- errors are due to the intervals of sensor loss.
certainty does not vary much during position tracking. How- Figure 7(b) illustrates why our approach performs better
ever, if we increase the difficulty of the tracking task, our than particle filters with fixed sample sets. The figure plots
approach can improve the tracking ability. Here, the difficulty the number of samples during one of the runs using KLD-
was increased by adding random noise to the robot’s odome-
5. We did not compare KLD-sampling to the likelihood-based approach, since
try measurements (30%) and by modeling temporary loss of
this method is not able to adequately adapt to situations of sensor loss. This
sensor data. This was done by randomly choosing intervals of is due to the fact that, without integrating sensor data, the likelihoods are
30 s during which all laser scans were deleted. Figure 7(a) il- always the same.

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


998 THE INTERNATIONAL JOURNAL OF ROBOTICS RESEARCH / December 2003

Robot position Robot position

(a) (b)

Robot position Robot position

(c) (d)

Fig. 8. Sample sets before, during and after an interval of sensor loss. (a) During normal tracking, the robot is highly certain
and only 64 samples are used. (b) At the end of the sensor loss interval, the robot is uncertain and 561 samples are used
to represent the belief. (c) Even after receiving sensor data again, the robot has to keep track of multiple hypotheses (129
samples). (d) The position uncertainty is low and the number of samples is reduced accordingly (66 samples).

sampling. The gray shaded areas indicate time intervals dur- number of required samples changes less significantly with
ing which the laser data were removed from the script. The different settings of δ than with different values of ε (see also
graph shows that our approach automatically adjusts the num- eq. (14)). Hence it is reasonable to fix δ and adjust ε so as to
ber of samples to the availability of sensor data. While less achieve good performance.
than 100 samples are used during normal tracking, the num- Figure 10 shows how KLD-sampling changes with the bin
ber of samples automatically increases whenever no laser data size ". These results were obtained in the context of the global
are available. This increased number of samples is needed to localization experiment described in Section 4.1. For each
keep track of the increased estimation uncertainty due to sen- bin size, (1 − δ) was fixed to 0.99 and ε was varied so as
sor loss. Figure 8 shows a sequence of sample sets (a) before, to achieve different sample set sizes. Figure 10(a) shows the
(b) during and (c,d) after one of the intervals without laser average number of samples for bin sizes ranging from 25 ×
data. It is clear that distributions during the sensor loss inter- 25 cm2 ×5◦ to 200 × 200 cm2 ×40◦ . For fixed values of
val (Figure 8(b)) require more samples than the distributions δ and ε, the number of samples increases with smaller bin
during normal tracking (Figures 8(a) and (d)). Furthermore, sizes. The difference is most prominent for small values of the
Figure 8(c) shows that it is essential to have enough samples tolerated approximation error ε. This result is not surprising,
to represent ambiguous situations occurring due to increased since smaller bin sizes result in larger values of non-empty
uncertainty. bins k, thereby increasing the number n of required samples.
Figure 10(b) shows the localization error plotted versus the
average number of samples for different bin sizes. Again, the
4.4. Parameter Settings
number of samples was varied by changing the value of ε. In
In this section we discuss the influence of the different param- this experiment we found no significant difference between
eters on the performance of KLD-sampling. Our approach is the performances when using different bin sizes. When using
independent of the parameters used for the sensor and motion approximately 1200 samples on average, all bin sizes achieved
models, i.e., these values do not have to be changed when us- the same low level of localization error. The only difference
ing KLD-sampling. The key parameters of the approach are lies in the value of ε required to achieve a certain average
the error bound ε, the probability bound δ, and the bin size number of samples. More specifically, the same quality can
". In the experiments so far, the bound δ and the bin size " be achieved when using large bin sizes in combination with
were fixed, and only the error bound ε was changed. For a small approximation bound ε, or when using small bin sizes in
given number of non-empty bins k, the number of samples n combination with larger approximation bound ε. This result
is computed using eq. (14). Figure 9 illustrates this function was slightly surprising since we expected that smaller bin
for different combinations of ε and δ. The graphs are shown sizes would result in better overall performance. However,
for up to 100 bins only. For larger values the individual graphs the result is also very encouraging since it shows that the
continue in almost perfectly straight lines. As can be seen, the performance of KLD-sampling is very robust to changes in

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


Fox / Adapting the Sample Size in Particle Filters 999

1600
0.015
4000 0.025
Number of required samples n

Number of required samples n


0.05
0.1
1200 0.2
3000

800 99.9%
99% 2000
95%
90%
400
1000

0 0
0 20 40 60 80 100 0 20 40 60 80 100
Number of bins k (a) Number of bins k (b)

Fig. 9. Number of required samples n versus number of bins k for different settings of ε and δ. (a) ε was fixed to 0.05 and the
graphs show eq. (14) for different values of (1 − δ). (b) (1 − δ) was fixed to 95% and ε was varied.

400
200cm x 40deg 200cm x 40deg
16000 100cm x 20deg
100cm x 20deg
50cm x 10deg Localization error [cm]
25cm x 5deg 50cm x 10deg
Avg. number of samples

300 25cm x 5deg


12000

8000 200

4000
100

0
0.006 0.0125 0.025 0.05 0.1 0.2 0 1000 2000 3000 400
(a) (b)
Error bound ε Number of samples

Fig. 10. Dependency on bin size. (a) The x-axis represents different values for the error bound ε. The y-axis plots the resulting
average number of samples for different bin sizes. (b) The x-axis shows the average number of samples and the y-axis plots
the localization error achieved with the corresponding number of samples and bin size. Obviously, all bin sizes achieve
comparable results.

its parameters. In our experience, a good approach was to fix tween the maximum likelihood estimate and the underlying
two parameters to reasonable values (e.g., (1 − δ) = 0.99 posterior does not exceed a pre-specified bound. Thereby, our
and " = 50 × 50 cm2 ×10◦ ), and to adjust the remaining approach chooses a small number of samples if the density is
parameter so as to obtain the desired results. focused on a small subspace of the state space, and chooses a
large numbers of samples if the samples have to cover a major
5. Conclusions and Future Research part of the state space. KLD-sampling is most advantageous
when the complexity of the posterior changes drastically over
We have presented a statistical approach to adapting the sam- time, as is the case, for example, in global robot localization
ple set sizes of particle filters during the estimation process. and position tracking with sensor loss.
The key idea of the KLD-sampling approach is to bound the Both the implementational and computational overheads
error introduced by the sample-based belief representation. of this approach are small. Extensive experiments in the con-
At each iteration, our approach generates samples until their text of mobile robot localization show that our approach yields
number is large enough to guarantee that the KL-distance be- drastic improvements over particle filters with fixed sample

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


1000 THE INTERNATIONAL JOURNAL OF ROBOTICS RESEARCH / December 2003

sets and over a previously introduced adaptation approach ZDX robot using the robot’s
(Koller and Fratkina 1998; Fox et al. 1999a). In our exper- eight sonar sensors. The num-
iments, KLD-sampling yields better approximations using ber of samples is shown in the
only 6% of the samples required by the fixed approach, and lower left corner of the ani-
using less than 9% of the samples required by the likelihood mation (maximum was set to
adaptation approach. In addition to the experiments presented 40,000). The timing of the an-
in this paper, KLD-sampling has been tested in various indoor imation is proportional to the
environments including a museum with wide open spaces. In approximate update times for
all environments, the results were comparable to those pre- the particle filter (real updates
sented here. are more than two times faster).
So far, KLD-sampling has been tested using robot local- 2 Video Same as extension 1. This time,
ization only. We conjecture, however, that many other appli- the robot’s laser range-finder is
cations of particle filters can benefit from this method. In gen- used for localization. The pa-
eral, our approach achieves maximal improvements in lower- rameters for adoptive sampling
dimensional state spaces and when state uncertainties vary are the same as for the sonar
over time. In high-dimensional state spaces the bin counting sensor data in extension 1.
can be implemented using tree structures (Koller and Fratkina
1998; Moore, Schneider, and Deng 1997; Omohundro 1991;
Thrun, Langford, and Fox 1999; Fox et al. 2000). In this case
the additional cost of KLD-sampling is higher, since each tree Acknowledgments
lookup takes time logarithmic in the size of the state space (in-
stead of the constant time for the grid we used in the experi- This research is sponsored in part by the National Sci-
ments). Furthermore, our approach can be combined with any ence Foundation (CAREER grant number 0093406) and by
other method for improving the efficiency of particle filters DARPA’s MICA and SDR programme (contract numbers
(Gilks and Berzuini 2001; Pitt and Shephard 1999; Godsill F30602-98-2-0137 and NBCHC020073). The author wishes
and Clapp 2001; Thrun et al. 2001). to thank Jon A. Wellner and Vladimir Koltchinskii for their
KLD-sampling opens several directions for future re- help in deriving the statistical background of this work. Ad-
search. In our current implementation we use a discrete distri- ditional thanks go to Wolfram Burgard and Sebastian Thrun
bution with a fixed bin size to determine the number of sam- for valuable discussions.
ples. We assume that the performance of the filter can be fur-
ther improved by changing the discretization over time, using
References
coarse discretizations when the uncertainty is high, and fine
discretizations when the uncertainty is low. Our approach can Arras, K. O., Castellanos, J. A., and Siegwart, R. 2002.
also be extended to the case where in certain parts of the state Feature-based multi-hypothesis localization and tracking
space highly accurate estimates are needed, while in other for mobile robots using geometric constraints. In Proceed-
parts a rather crude approximation is sufficient. This prob- ings of the IEEE International Conference on Robotics and
lem can be addressed by locally adapting the discretization Automation.
to the desired approximation quality using multi-resolution Arras, K. O., and Vestli, S. J. 1998. Hybrid, high-precision
tree structures (Koller and Fratkina 1998; Moore, Schneider, localization for the mail distributing mobile robot system
and Deng 1997) in combination with stratified sampling. As a MOPS. In Proceedings of the IEEE International Confer-
result, more samples are used in “important” parts of the state ence on Robotics and Automation.
space, while fewer samples are used in other parts. Arulampalam, S., Maskell, S., Gordon, N., and Clapp,
T. 2002. A tutorial on particle filters for on-line non-
linear/non-Gaussian Bayesian tracking. IEEE Transac-
Appendix: Index to Multimedia Extensions
tions on Signal Processing 50(2):174–188.
The multimedia extension page is found at http://www. Austin, D., and Jensfelt, P. 2000. Using multiple Gaussian hy-
ijrr.org. potheses to represent probability distributions for mobile
robot localization. In Proceedings of the IEEE Interna-
Table of Multimedia Extensions tional Conference on Robotics and Automation.
Extension Type Description Baker, J. E. 1987. Reducing bias and inefficiency in the se-
1 Video Global localization using lection algorithm. In Proceedings of the 2nd International
KLD-sampling: shown is a Conference on Genetic Algorithms.
sequence of sample sets during Bar-Shalom, Y., and Li, X.-R. 1995. Multitarget-Multisensor
global localization of a Pioneer Tracking: Principles and Techniques, Yaakov Bar-Shalom.

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


Fox / Adapting the Sample Size in Particle Filters 1001

Burgard, W., Fox, D., Hennig, D., and Schmidt, T. 1996. Esti- tial Monte Carlo sampling methods for Bayesian filtering.
mating the absolute position of a mobile robot using posi- Statistics and Computing 10(3):197–208.
tion probability grids. In Proceedings of the National Con- Doucet, A., de Freitas, J. F. G., Murphy, K., and Russell, S.
ference on Artificial Intelligence. 2000b. Rao–Blackwellised particle filtering for dynamic
Burgard, W., Derr, A., Fox, D., and Cremers, A. B. 1998. Bayesian networks. In Proceedings of the Conference on
Integrating global position estimation and position track- Uncertainty in Artificial Intelligence.
ing for mobile robots: the Dynamic Markov Localization Doucet, A., de Freitas, N., and Gordon, N., editors. 2001. Se-
approach. In Proceedings of the IEEE/RSJ International quential Monte Carlo in Practice, Springer-Verlag, New
Conference on Intelligent Robots and Systems. York.
Burgard, W., Cremers, A.B., Fox, D., Hähnel, D., Lakemeyer, Enderle, S., Ritter, M., Fox, D., Sablatnög, S., Kraetzschmar,
G., Schulz, D., Steiner, W., and Thrun, S. 1999. Experi- G., and Palm, G. 2000. Soccer-robot localization using spo-
ences with an interactive museum tour-guide robot. Artifi- radic visual features. In Proceedings of the International
cial Intelligence 114(1-2):3–55. Conference on Intelligent Autonomous Systems.
Castellanos, J. A., Montiel, J. M. M., Neira, J., and Tardós, J. Engelson, S., and McDermott, D. 1992. Error correction in
D. 1999. The SPmap: A probabilistic framework for simul- mobile robot map learning. In Proceedings of the IEEE
taneous localization and map building. IEEE Transactions International Conference on Robotics and Automation.
on Robotics and Automation 15(5):948–952. Fox, D. December 1998. Markov Localization: A Probabilis-
Choset, H., and Nagatani, K. 2001. Topological simultaneous tic Framework for Mobile Robot Localization and Navi-
localization and mapping (SLAM): toward exact localiza- agation. Ph.D. thesis, Department of Computer Science,
tion without explicit localization. IEEE Transactions on University of Bonn, Germany.
Robotics and Automation 17(2):125–137. Fox, D. 2002. KLD-sampling: Adaptive particle filters. In
Cover, T. M., and Thomas, J. A. 1991. Elements of Informa- T. G. Dietterich, S. Becker, and Z. Ghahramani, editors,
tion Theory, Wiley Series in Telecommunications, Wiley, Advances in Neural Information Processing Systems 14
New York. (NIPS), MIT Press, Cambridge, MA.
Cox, I. J. 1991. Blanche—an experiment in guidance and nav- Fox, D., Burgard, W., Dellaert, F., and Thrun, S. 1999a. Monte
igation of an autonomous robot vehicle. IEEE Transactions Carlo Localization: Efficient position estimation for mo-
on Robotics and Automation 7(2):193–204. bile robots. In Proceedings of the National Conference on
Cox, I. J. 1993. A review of statistical data association tech- Artificial Intelligence.
niques for motion correspondence. International Journal Fox, D., Burgard, W., and Thrun, S. 1999b. Markov localiza-
of Computer Vision 10(1):53–66. tion for mobile robots in dynamic environments. Journal
Cox, I. J., and Leonard, J. J. 1994. Modeling a dynamic envi- of Artificial Intelligence Research (JAIR) 11:391–427.
ronment using a Bayesian multiple hypothesis approach. Fox, D., Burgard, W., Kruppa, H., and Thrun, S. 2000. A prob-
Artificial Intelligence 66:311–344. abilistic approach to collaborative multi-robot localization.
Deans, M. C. 2002. Maximally informative statistics for lo- Autonomous Robots 8(3):325–344.
calization and mapping. In Proceedings of the IEEE Inter- Fox, D., Thrun, S., Dellaert, F., and Burgard, W. 2001. Par-
national Conference on Robotics and Automation. ticle filters for mobile robot localization. In A. Doucet,
de Freitas, N. 2002. Rao–Blackwellised particle filtering for N. de Freitas, and N. Gordon, editors, Sequential Monte
fault diagnosis. IEEE Aerospace. Carlo in Practice, Springer-Verlag, New York.
Del Moral, P., and Miclo, L. 2000. Branching and interact- Gelb, A. 1974. Applied Optimal Estimation, MIT Press, Cam-
ing particle systems approximations of Feynman–Kac for- bridge, MA.
mulae with applications to non linear filtering. In Semi- Ghahramani, Z. 2001. An introduction to hidden Markov
naire de Probabilites XXXIV, Lecture Notes in Mathemat- models and Bayesian networks. International Journal of
ics Vol. 1729, Springer-Verlag, Berlin. Pattern Recognition and Artificial Intelligence 15(1):9–
Dellaert, F., Burgard, W., Fox, D., and Thrun, S. 1999. Using 42.
the condensation algorithm for robust, vision-based mo- Gilks, W. R., and Berzuini, C. 2001. Following a mov-
bile robot localization. In Proceedings of the IEEE Com- ing target—Monte Carlo inference for dynamic Bayesian
puter Society Conference on Computer Vision and Pattern models. Journal of the Royal Statistical Society, Series B
Recognition. 63(1):127–146.
Dissanayake, M. W. M., Newman, P., Clark, S., Durrant- Godsill, S., and Clapp, T. 2001. Improvement strategies for
Whyte, H. F., and Csorba, M. 2001. A solution to the si- Monte Carlo particle filters. In A. Doucet, N. de Freitas,
multaneous localization and map building (SLAM) prob- and N. Gordon, editors, Sequential Monte Carlo in Prac-
lem. IEEE Transactions on Robotics and Automation tice, Springer-Verlag, New York.
17(3):229–241. Gustafsson, F., Gunnarsson, F., Bergman, N., Forssell, U.,
Doucet, A., Godsill, S. J., and Andrieu, C. 2000a. On sequen- Jansson, J., Karlsson, R., and Nordlund, P.-J. 2002. Parti-

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


1002 THE INTERNATIONAL JOURNAL OF ROBOTICS RESEARCH / December 2003

cle filters for positioning, navigation and tracking. IEEE ing correlation. In Proceedings of the International Joint
Transactions on Signal Processing. Conference on Artificial Intelligence.
Gutmann, J. S., Burgard, W., Fox, D., and Konolige, K. 1998. Kuipers, B. 2000. The spatial semantic hierarchy. Artificial
An experimental comparison of localization methods. In Intelligence 119:191–233.
Proceedings of the IEEE/RSJ International Conference on Kuipers, B., and Beeson, P. 2002. Bootstrap learning for place
Intelligent Robots and Systems. recognition. In Proceedings of the National Conference on
Gutmann, J. S., and Fox, D. 2002. An experimental com- Artificial Intelligence.
parison of localization methods continued. In Proceedings Lenser, S., and Veloso, M. 2000. Sensor resetting localiza-
of the IEEE/RSJ International Conference on Intelligent tion for poorly modelled mobile robots. In Proceedings
Robots and Systems. of the IEEE International Conference on Robotics and
Gutmann, J. S., Weigel, T., and Nebel, B. 1999. Fast, accurate, Automation.
and robust self-localization in polygonal environments. In Leonard, J. J., and Durrant-Whyte, H. F. 1991. Mobile robot
Proceedings of the IEEE/RSJ International Conference on localization by tracking geometric beacons. IEEE Trans-
Intelligent Robots and Systems. actions on Robotics and Automation 7(3):376–382.
Hertzberg, J., and Kirchner, F. 1996. Landmark-based au- Leonard, J. J., and Feder, H. J. S. 1999. A computationally
tonomous navigation in sewerage pipes. In Proceedings of efficient method for large-scale concurrent mapping and
the 1st Euromicro Workshop on Advanced Mobile Robots, localization. In Proceedings of the 9th International Sym-
IEEE Computer Society Press, Los Alamitos, CA. posium on Robotics Research.
Isard, M. and Blake, A. 1998. Condensation – conditional den- Liu, J., and Chen, R. 1998. Sequential Monte Carlo methods
sity propagation for visual tracking. International Journal for dynamic systems. Journal of the American Statistical
of Computer Vision 29(1):5–28. Association 93(443):1032.
Jensfelt, P., and Kristensen, S. 2001. Active global local- Lu, F., and Milios, E. 1997. Robot pose estimation in unknown
ization for a mobile robot using multiple hypothesis environments by matching 2D range scans. Journal of In-
tracking. IEEE Transactions on Robotics and Automation telligent and Robotic Systems 18:249–275.
17(5):748–760. Montemerlo, M., Thrun, S., Koller, D., and Wegbreit, B.
Jensfelt, P., Wijk, O., Austin, D., and Andersson, M. 2000. 2002a. FastSLAM: A factored solution to the simultane-
Feature based condensation for mobile robot localization. ous localization and mapping problem. In Proceedings of
In Proceedings of the IEEE International Conference on the National Conference on Artificial Intelligence.
Robotics and Automation. Montemerlo, M., Thrun, S., and Whittaker, W. 2002b. Condi-
Johnson, N., Kotz, S., and Balakrishnan, N. 1994. Continuous tional particle filters for simultaneous mobile robot local-
Univariate Distributions, Vol. 1, Wiley, New York. ization and people-tracking. In Proceedings of the IEEE
Julier, S. J., and Uhlmann, J. K. 1997. A new extension International Conference on Robotics and Automation.
of the Kalman filter to non-linear systems. In Proceed- Moore, A. W., Schneider, J., and Deng, K. 1997. Efficient
ings of AeroSense: The 11th International Symposium on locally weighted polynomial regression predictions. In
Aerospace/Defense Sensing, Simulation and Controls. Proceedings of the International Conference on Machine
Kaelbling, L. P., Cassandra, A. R., and Kurien, J. A. 1996. Learning.
Acting under uncertainty: Discrete Bayesian models for Murphy, K., and Russell, S. 2001. Rao–Blackwellised parti-
mobile-robot navigation. In Proceedings of the IEEE/RSJ cle filtering for dynamic Bayesian networks. In A. Doucet,
International Conference on Intelligent Robots and N. de Freitas, and N. Gordon, editors, Sequential Monte
Systems. Carlo in Practice, Springer-Verlag, New York.
Kalman, R. E. 1960. A new approach to linear filtering and Olson, C. F. 2000. Probabilistic self-localization for mobile
prediction problems. Transactions of the ASME, Journal robots. IEEE Transactions on Robotics and Automation
of Basic Engineering 82:35–45. 16(1):55–66.
Kitagawa, G. 1996. Monte Carlo filter and smoother for non- Omohundro, S. M. 1991. Bumptrees for efficient function,
Gaussian non-linear state space models. Journal of Com- constraint, and classification learning. In R. P. Lippmann,
putational and Graphical Statistics 5(1):1–25. J. E. Moody, and D. S. Touretzky, editors, Advances in Neu-
Koller, D., and Fratkina, R. 1998. Using learning for approx- ral Information Processing Systems 3, Morgan Kaufmann,
imation in stochastic processes. In Proceedings of the In- San Mateo, CA.
ternational Conference on Machine Learning. Pelikan, M., Goldberg, D. E., and Cantú-Paz, E. 2000.
Koller, D., and Lerner, U. 2001. Sampling in factored dynamic Bayesian optimization algorithm, population size, and time
systems. In A. Doucet, N. de Freitas, and N. Gordon, edi- to convergence. In Proceedings of the Genetic and Evolu-
tors, Sequential Monte Carlo in Practice, Springer-Verlag, tionary Computation Conference.
New York. Pitt, M. K., and Shephard, N. 1999. Filtering via simulation:
Konolige, K., and Chou, K. 1999. Markov localization us- auxiliary particle filters. Journal of the American Statisti-

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015


Fox / Adapting the Sample Size in Particle Filters 1003

cal Association 94(446):590–599. bilistic algorithms and the interactive museum tour-guide
Rice, J. A. 1995. Mathematical Statistics and Data Analysis, robot Minerva. International Journal of Robotics Research
2nd edition, Duxbury Press, Belmont, CA. 19(11):972–999.
Roumeliotis, S. I., and Bekey, G. A. 2000. Bayesian estima- Thrun, S., Fox, D., Burgard, W., and Dellaert, F. 2001. Ro-
tion and Kalman filtering: A unified framework for mobile bust Monte Carlo localization for mobile robots. Artificial
robot localization. In Proceedings of the IEEE Interna- Intelligence 128(1-2):99–141.
tional Conference on Robotics and Automation. Verma, V., Langford, J., and Simmons, R. 2001. Non-
Schulz, D., Burgard, W., Fox, D., and Cremers, A. B. 2001. parametric fault identification for space rovers. In Interna-
Tracking multiple moving targets with a mobile robot using tional Symposium on Artificial Intelligence and Robotics
particle filters and statistical data association. In Proceed- in Space.
ings of the IEEE International Conference on Robotics and Vermaak, J., Andrieu, C., Doucet, A., and Godsill, S. J. 2002.
Automation. Particle methods for Bayesian modelling and enhancement
Simmons, R., and Koenig, S. 1995. Probabilistic robot navi- of speech signals. IEEE Transactions on Speech and Audio
gation in partially observable environments. In Proceed- Processing 10(3):173–185.
ings of the International Joint Conference on Artificial Vlassis, N., Terwijn, B., and Kröse, B. 2002. Auxiliary par-
Intelligence. ticle filter robot localization from high-dimensional sen-
Smith, A. F. M., and Gelfand, A. E. 1992. Bayesian statistics sor observations. In Proceedings of the IEEE International
without tears: A sampling-resampling perspective. Amer- Conference on Robotics and Automation.
ican Statistician 46(2):84–88. Wan, E. A., and van der Merwe, R. 2000. The unscented
Smith, R., Self, M., and Cheeseman, P. 1990. Estimating Kalman filter for non-linear estimation. In Proceedings of
uncertain spatial relationships in robotics. In I. Cox and Symposium 2000 on Adaptive Systems for Signal Process-
G. Wilfong, editors, Autonomous Robot Vehicles, Springer ing, Communications, and Control.
Verlag, Berlin. Welch, G., and Bishop, G. 2001. An introduction to the
Thrun, S., Langford, J., and Fox, D. 1999. Monte Carlo hid- Kalman filter. Notes of ACM SIGGRAPH tutorial on the
den Markov models: Learning non-parametric models of Kalman filter.
partially observable stochastic processes. In Proceedings Wolf, J., Burgard, W., and Burkhardt, H. 2002. Robust vision-
of the International Conference on Machine Learning. based localization for mobile robots using an image re-
Thrun, S., Beetz, M., Bennewitz, M., Burgard, W., Cre- trieval system based on invariant features. In Proceedings
mers, A. B., Dellaert, F., Fox, D., Haehnel, D., Rosen- of the IEEE International Conference on Robotics and
berg, C., Roy, N., Schulte, J., and Schulz, D. 2000. Proba- Automation.

Downloaded from ijr.sagepub.com at MOUNT ALLISON UNIV on June 23, 2015

You might also like