- Research
- Open Access
- Published:

# Bayesian filtering for indoor localization and tracking in wireless sensor networks

*EURASIP Journal on Wireless Communications and Networking*
**volume 2012**, Article number: 21 (2012)

## Abstract

In this article, we investigate experimentally the suitability of several Bayesian filtering techniques for the problem of tracking a moving device by a set of wireless sensor nodes in indoor environments. In particular, we consider a setup where a robot was equipped with an ultra-wideband (UWB) node emitting ranging signals; this information was captured by a network of static UWB sensor nodes that were in charge of range computation. With the latter, we ran, analyzed, and compared filtering techniques to track the robot. Namely, we considered methods falling into two families: Gaussian filters and particle filters. Results shown in the article are with real data and correspond to an experimental setup where the wireless sensor network was deployed. Additionally, statistical analysis of the real data is provided, reinforcing the idea that in this kind of ranging measurements, the Gaussian noise assumption does not hold. The article also highlights the robustness of a particular filter, namely the cost-reference particle filter, to model inaccuracies which are typical in any practical filtering algorithm.

## 1. Introduction

Wireless sensor networks (WSNs) enable a plethora of applications, from which localization of moving devices appears as an appealing feature that complements (or substitutes) global navigation satellite systems (GNSSs) based localization, especially in places where GNSS signals are very weak, such as in indoor environments, or in situations where the portion of in-view sky is small, such as urban areas with tall buildings.

There is extensive literature available on the topic, see for instance [1, 2] and references therein. In the last decade, literally hundreds of research papers have been published dealing with localization and tracking of devices surrounded by wireless sensors, a problem that can be mathematically cast into an estimation problem of time-varying parameters, and where the equations modeling the system are essentially nonlinear. Two main types of estimation techniques have been considered so far: (i) centralized approaches, in which all measurements obtained by the sensors are transmitted to a central processing unit in charge of performing the estimation (see, e.g., [3]), and (ii) distributed estimation techniques (see [4, 5]), where each sensor is responsible for the processing of its measurements and of data provided by neighboring sensors. Most of the proposed solutions can be classified in the framework of Bayesian filtering, a statistical approach that has also evolved importantly during the last few years due to its good behavior in dynamical nonlinear systems [6, 7] and the availability of powerful computational resources that enable their practical application. For instance, in [8] measurements were collected from various sensors and processed in a centralized processing unit wherein a particle filter was used to track a moving target. Moreover, [9] showed how even measurements of different types can be incorporated into a single filtering algorithm. In [9], authors tracked moving objects using various kinds of Bayesian filters.

From the wide range of wireless technologies available for WSNs, we focus our attention on impulse-radio-based ultra-wideband (UWB), a technology that has a number of inherent properties, which are well suited to sensor network applications. UWB technology not only has a very good time-domain resolution allowing for precise localization and tracking, but also its noise-like signal properties create little interference to other systems and are resistant to severe multipath and jamming. In [10], authors provided an overview of the IEEE 802.15.4a standard, which adopts UWB impulse radio to ensure robust data communications and precision ranging.

In this article, we undertake an experimental approach with commercial off-the-shelf devices, in contrast to most contributions where controllable, computer-simulated, results are used to assess the performance of a given method. Here, the focus was on the use of real-world data, with its inherent inaccuracies and non-modeled effects, to test a set of localization algorithms. This prevented distributed estimation techniques, since the sensor nodes did not allow additional, custom signal processing, but provided real-life ranging measurements from which interesting conclusions could be extracted, such as their non-Gaussianity nature. From an algorithmic perspective, we analyzed a set of sequential estimation techniques that account for a priori information of the moving device, the so-called Bayesian filters. In particular, Gaussian filters and particle filters were studied and compared in the nonlinear setup. The former included the well-known extended Kalman filter (EKF), and the recently proposed quadrature and cubature Kalman-type techniques that showed a compromise between filtering performance and computational complexity. The class of particle filters we investigated encompassed standard and cost-reference particle filters (CRPFs). Another main contribution of this work is the assessment of the robustness of these methods to non-Gaussian model distributions as well as other model inaccuracies through the processing of real world data. Specially remarkable is the robustness performance of the CRPF, since model assumptions are mild compared to the rest of the filtering solutions.

The article is organized as follows. In Section 2, the experimental setup is described, including an statistical analysis of the database. Section 3 provides an overview of Bayesian filtering techniques, motivating the descriptions of suitable algorithms depending on the assumptions about the distribution of measurement noise and the linearity of the measurement equation. Section 4 presents results of the aforementioned algorithms in the experimental scenario described in Section 2, and finally Section 5 draws some conclusions.

## 2. Experimental setup

The work reported in this article is related to the extensive UWB measurement campaign made within NEWCOM++, an EU FP7 Network of Excellence [11]. The measurement campaign was performed in an indoor environment with a network of *N* = 12 static UWB sensors deployed in the area. The scenario was an office-like environment, whose floor map can be consulted in Figure 1. From the sensors shown in the figure, we only take into account UWB technology, neglecting thus the deployed ZigBee sensors. In this experimental setup, a robot was moved in a straight path along the corridor of a building. The robot took a 90° turn almost at the middle of its run. So the trajectory of the robot was *L*-shaped, 20 m length approximately. The robot was equipped with a number of sensors, namely UWB, ZigBee, and accelerometer measures (see Figure 2). As mentioned, only UWB technology is considered in this work. The UWB sensor mounted on the robot emitted pulsed radio signals while moving on the track. The rest of 12 UWB sensors were placed around the trajectory of the robot. Range estimates provided by each UWB sensor were recorded and later combined by the filtering algorithms for localization. The data were taken for two cases: once by keeping the speed of the robot constant and again by moving the robot with varying speed. The speed of the robot was controlled through commands sent from a laptop using a Bluetooth channel. The robot was kept stationary for the initial 5 s before it started to move. Since the trajectory of robot was totally controlled according to the command generated by writing an algorithm which defines each movement of the robot in terms of direction and speed, the true position of the robot at each instant could be easily obtained. Such ground truth was estimated using a ruler located in the path (as might be observed in Figure 2) and carefully measuring by similar means the location of anchor nodes in the plane. Of course, the precision of such ground truth was limited by the experimental nature of the measurement campaign, although the procedure is valid to extract important conclusions after data processing. With the knowledge of true position of robot and anchor nodes, the true range was obtained for each anchor node in the sampling instants. Figure 3 shows the comparison of true and observed ranges for anchor node seven during the full run of the robot along its trajectory. It can be observed that the measurements are quite noisy as compared to the true ranges (i.e., departure from the ideal line).

In this work, the tracking of a single mobile node (i.e., the robot) was considered for the experiment. However, the experiment could be easily extended for multiple moving nodes if one runs independent filters per robot in the case of self-positioning, or using more sophisticated data association techniques to discern among targets [12–15]. The multiple target tracking setup is left for future work, focusing our attention and conclusions on the case in which measurements in [11] were recorded.

The Timedomain PulsON 220 UWB sensors [16], used for the experiment, operate with a center frequency of 4.7 GHz and a bandwidth (10 dB radiated) of 3.2 GHz at -12.8 dB EIRP. Pulse repetition frequency was 9.6 MHz. The measured quantity is the distance estimate between the sensor nodes at a certain sampling rate (500 ms in our case). These sensors are interfaced via Ethernet using the user datagram protocol (UDP) controlled from a laptop as shown in Figure 2. The locations of these sensor nodes were accurately measured. Note that all nodes were located at a same height of 1.13 m, with the ceiling being at 3 m. Timedomain PulsON 220 UWB node computed a range estimate using a proprietary time-of-arrival (TOA) estimator, whose implementation is not public. The experiment of computing ranges between robot's node and the rest of nodes was performed 700 times per pair, composing the database described in [11]. Notice that some nodes were located inside neighboring rooms and hence those measurements were in non-line-of-sight (NLOS) conditions for the whole (or part of the) trajectory of the robot.

More precisely, the measurement database is composed of (i) the accurately measured locations of each node, which will be used as the *true* positions for algorithms assessment. In the sequel, let us use **x**_{
t
}= [*x*_{
t
}, *y*_{
t
}]^{T}to denote the 2-D position of the robot at time *t* and **r**_{
i
}= [*x*_{
i
}, *y*_{
i
}]^{T}the static coordinates of the *i*-th node; and (ii) the instantaneous range estimates from each node *i* to the robot, denoted as ${\widehat{\rho}}_{i,t}$. The recorded measurements are modeled as

with *n*_{i,t}denoting the ranging error and *ρ*_{
i
}(**x**_{
t
}) = ≜ ∥**x**_{
t
}- **r**_{
i
}∥ the true distance from the *i*-th node to the robot at *t*.

The positioning problem is that of obtaining an estimate ${\widehat{x}}_{t}$ of robot's position given ${\widehat{\rho}}_{i,t}$ and **r**_{
i
}with *i* ∈ {1,...,*N*}. Many positioning algorithms could be used for such problem, as those reported in [17]. For instance, to enumerate some of them, we could apply a nonlinear least squares (LS) algorithm to deal with (1), such as those proposed in [18, 19]; a projection onto convex sets, reported in [20]; a transformation of the measurements could be done to obtain a linear equation [21], which can be straightforwardly solved by an LS, total LS or weighted LS algorithms. The list of algorithms is obviously not limited to the latter and one might find many contributions in the literature. Here, we are interested in those methods that sequentially estimate the possibly time-evolving mobile position given the available measurements, as well as previous records. This sequential procedure finds its theoretical justification within Bayesian filtering, which is outlined in Section 3, along with some popular filtering algorithms.

### 2.1. Testing for normality of UWB-based distance measurements

Before delving into the use of Bayesian filters for tracking the mobile robot, it is important to assess the degree of Gaussianity of the measures in the database. The aforementioned database serves to test positioning algorithms, which sometimes resort to the Gaussian assumption, and thus their performance potentially depends on the validity of such assumption.

There have been several attempts to model the indoor propagation channel for UWB transmissions. Particularly, a model due to [22] was proposed for the distribution of TOA estimates. In this work, it was already seen that these errors could not be considered merely Gaussian, but of a rather more complex nature. The latter includes multipath effect (bias) and LOS/NLOS conditions. Recent works have reinforced this idea [23, 24].

In this section, we analyze the particular results reported in [11] using the Anderson-Darling test, which is one of the most powerful tools to assess normality of a sample based on its empirical distribution function [25].

In order to provide meaningful results, from a statistical point of view, a database of *L*_{
m
}= 700 independent measures is considered here. In this setup, the same set of UWB anchor nodes was used, with same locations, and *L*_{
m
}range measures were recorded for each pair of connected nodes (*i, j*) [11]. The Anderson-Darling test, which can be consulted in Appendix 1 and particularized to our application, is a detector to assess whether the set of measurements from *i* to *j* follows a normal distribution with unknown mean and variances or not. Let us denote the probability that the test output is affirmative as ${\mathbb{P}}_{i,j}\left\{{\mathcal{H}}_{0}\right\}$, where ${\mathcal{H}}_{0}$ is the hypothesis that the sample is normally distributed.

The results can be consulted in Figure 4 for different values of the detection probability. In Figure 4a, the average probability of accepting ${\mathcal{H}}_{0},\phantom{\rule{2.77695pt}{0ex}}\overline{\mathbb{P}}\left\{{\mathcal{H}}_{0}\right\}$ has been plotted. It is defined as

where $\mathcal{C}$ is the subset of all nodes that are connected to others, i.e., those whose measurements are available in the database. The dimension of $\mathcal{C}$ is denoted by ${n}_{c}=\text{dim}\left\{\mathcal{C}\right\}$. Notice that there are pairs which are not connected, for instance due to obstacles in the propagation path. Figure 4a also shows the maximum probability, over all nodes in $\mathcal{C}$ that ${\mathcal{H}}_{0}$ is accepted:

The results show that the Gaussian assumption is not realistic. Probability values below 0.15 were obtained on the average. Moreover, even in the *best* measures, where the Gaussianity fits the most, probability values range from 0.582 to 0.884 depending on the significance level *α*. For the sake of completeness, Figure 4b plots the ordered values of ${\mathbb{P}}_{i,j}\left\{{\mathcal{H}}_{0}\right\}$ with $i,j\in \mathcal{C}$. From this, we can see that the probability decays rapidly and that actually few measurements could be classified as Gaussian with a probability larger than 0.5 even with low values of *α*.

As a conclusion of this subsection, we can claim that the Gaussian assumption does not hold in general for the measurements in the database [11]. Even though in some pairs of range measures it could be accepted, the majority of pairs failed the statistical test. Therefore, it is expected that those filtering algorithms based on such modeling assumption should behave poorly when compared with other techniques that can cope with non-Gaussianities or are distribution free.

## 3. Bayesian filtering

The problem of interest concerns the estimation of an unobserved discrete-time random signal in a dynamic system. The unknown is typically referred to as the state of the system. State equation models the evolution in time of states as a discrete-time stochastic function, in general

where **f**_{t-1}(·) is a known, possibly nonlinear, function of the state **x**_{
t
}and **u**_{
t
}is referred to as process noise which gathers any mismodeling effect or disturbances in the state characterization. The relation between measurements and states is modeled by

where **h**_{
t
}(·) is a known, possibly nonlinear function and **n**_{
t
}is referred to as measurement noise. Both process and measurement noise are assumed with known statistics and are mutually independent. The initial *a priori* distribution of the state vector is assumed to be known, *p*(**x**_{0}) ≜ *p*(**x**_{0}|**y**_{0}). From a theoretical point of view, all necessary information to infer information of the unknown states resides in the posterior distribution.

Bayesian filtering involves the recursive estimation of states ${x}_{t}\in {\mathbb{R}}^{{n}_{x}}$ given measurements ${y}_{t}\in {\mathbb{R}}^{{n}_{y}}$ at time *t* based on all available measurements, **y**_{1:t}= {**y**_{1},...,**y**_{
t
}}. To that aim, we are interested in the filtering distribution *p*(**x**_{
t
}|**y**_{1:t}) and its recursive computation given *p*(**x**_{t-1}|**y**_{1:t-1}), as well as *p*(**y**_{
t
}|**x**_{
t
}) and *p*(**x**_{
t
}|**x**_{t-1}) referred to as the likelihood and the prior distributions, respectively. Such recursive solution is implemented in two steps, prediction and update, each one consisting in the evaluation of integrals. The reader is referred to textbook references for further insight into the Bayesian filtering framework [6, 26–28]. Once the filtering distribution becomes available, one is typically interested in computing statistics from it. For instance, the minimum mean square error (MMSE) estimator ${E}_{X|Y}\left\{{x}_{t}|{y}_{1:t}\right\}$, or in general any function of the states ${E}_{X|Y}\left\{\phi \left({x}_{t}\right)|{y}_{1:t}\right\}$.

Unfortunately, the filtering equations involved in the Bayesian estimation can be solved analytically only in few cases such as the case of linear/Gaussian dynamic systems where the KF yields to the optimal solution [29]. In general setups, one has to resort to suboptimal solutions, most of them based on efficient numerical integration methods [6].

The experimental setup presented in Section 2 can be easily mapped into a dynamic system of the form (4)-(5). For instance, a linear constant acceleration model has been adopted for state evolution [30], and thus

where the state vector is composed of position and velocity components, **p**_{
t
}≜ (*x*_{
t
}, *y*_{
t
})^{T}and **v**_{
t
}≜ (*ẋ*_{
t
}, *ẏ*_{
t
})^{T}, respectively. Process noise **u**_{
t
}is assumed to be a zero-mean Gaussian process, i.e., ${u}_{t}~\mathcal{N}\left(0,Q\right)$, with covariance chosen to be **Q** = 0.1 · **I**_{4} hereinafter according to measurement campaign processing. Finally, *T* denotes the sampling period in (6).

In (6) we have accounted for external information other than ranging. In particular, we have considered that the robot was equipped with an inertial measurement unit (IMU) that provides filtered estimates of acceleration of the mobile [31, 32]. Particularly, we considered the three-axis acceleration sensor LIS3L02DQ [33]. ${a}_{t}\triangleq {\left({\u1e8d}_{t},{\xfd}_{t}\right)}^{T}$ can then be modeled as the true acceleration plus zero-mean additive Gaussian noise with a standard deviation 0.01 m/s^{2}.

On the other hand, from (1), we know that measurement equation

is nonlinear. As some of the most popular Bayesian filters resort to the Gaussian assumption, we consider that measurement noise **n**_{
t
}is normally distributed according to ${n}_{t}~\mathcal{N}\left(0,R\right)$, although we know from Section 1 that it is not the case in general. Notice that some of the filters that will be discussed in this article do not impose Gaussianity of noise distributions. In the simulation results of Gaussian filters reported in Section 4, we considered that **R** = 4 · **I**_{
N
}m^{2}. This value was obtained after off-line analysis of database measurements.

The rest of this section presents a number of filtering algorithms based on different assumptions on the model defined by (4)-(5). Particularly, we focus our attention on the location problem defined in Section 2, in which measurements were nonlinear and states evolved linearly.

### 3.1. Extended Kalman filter

The KF achieves optimal MMSE solution only under the highly constrained linear/Gaussian conditions. However, for most real world systems, the assumptions are too tight. They may not hold in some applications where the dependence of measurements on states is nonlinear, or when noises cannot be considered normally distributed or zero-biased. In such situations, the MMSE estimator is intractable and we have to resort to sub-optimal Bayesian filters. Among the suboptimal filters, the EKF [26] has been widely used for some years. The main idea adopted in the EKF is to linearize the state transition and/or observation equations through a Taylor-series expansion around the mean of the relevant random variable and apply the linear KF to this linearized model. This filter behaves poorly when the degree of nonlinearity becomes high. Moreover, EKF involves the analytical derivation of the Jacobians which can get extremely complicated for complex models. In our case, measurements are defined by range estimates (1) and the Jacobian of **h**_{
t
}, necessary for EKF implementation, is

where $\frac{\partial {h}_{i,t}}{{\partial}_{{x}_{t}}}=\frac{{x}_{t}-{x}_{i}}{2\parallel {x}_{t}-{x}_{i}\parallel}$, and $\frac{\partial {h}_{i,t}}{{\partial}_{{y}_{t}}}=\frac{{y}_{t}-{y}_{i}}{2\parallel {y}_{t}-{y}_{i}\parallel},\forall i=1,\dots ,N$.

### 3.2. Sigma-point Kalman filters

To overcome the drawbacks of EKF, many derivatives of KF have been proposed to date, the most popular one being the unscented Kalman filter (UKF) [34]. UKF belongs to a family of Kalman-like filters, called the sigma Point Kalman filters (SPKFs) [35]. SPKF addresses the issues of EKF for nonlinear estimation problems by using the approach of numerical integration. The dynamic system is again considered Gaussian, and thus one can identify that the prediction/update recursion can be transformed into a numerical evaluation of the involved integrals in the Bayesian recursion [36]. Then, only estimates of mean and covariance of predicted/update distributions are necessary and the integrals are numerically evaluated by a minimal set of deterministically chosen weighted sample points, called the *sigma points*. The nonlinear function is then approximated by performing statistical linear regression between these points. This approach of weighted statistical linear regression takes into account the uncertainty (i.e., probabilistic spread) of the prior random variable. Besides UKF, various other SPKFs such as quadrature Kalman filter (QKF) [37, 38] and cubature Kalman filter (CKF) [39] have been proposed and the choice among these filters depending upon various factors such as the degree of nonlinearity, order of system state, required accuracy, etc. Moreover, computationally efficient and numerically stable variants of these filters have also been proposed by means of the square root version of QKF and CKF. Although the former is able to provide enhanced results with respect to the CKF [40], its computational cost is considerably larger in high-dimensional problems. Whereas the number of sigma-points generated within the QKF increases exponentially with *n*_{
x
}, the increase is linear in the CKF case.

### 3.3. Standard particle filter

All of the Kalman-type filters, discussed above, are based on the assumption that the probabilistic nature of the system is Gaussian. The performance of these filters tend to degrade when the true density of the system is not Gaussian. With the improvement in processing power of the computers, sequential Monte Carlo (SMC) based Bayesian filters are gaining popularity as they intend to address the problems of nonlinear systems, which do not necessarily have a Gaussian distribution. The term particle filtering (PF) denotes one of the algorithms in the SMC methods family [41, 42].

As opposite to Kalman-type filters, where the posterior distribution is fully characterized by its mean and covariance, a PF provides a discrete characterization of the distribution. The set of N_{p} weighted random points is referred to as particles ${\left\{{x}_{t}^{\left(i\right)},{w}_{t}^{\left(i\right)}\right\}}_{i=1}^{{\mathsf{\text{N}}}_{\mathsf{\text{P}}}}$. These random samples are drawn from the importance density distribution, *π*(·),

and weighted according to

Here, we consider the standard particle filter (SPF) based on the sampling importance resampling (SIR) concept [7]. In this case, $\pi \left(\cdot \right)=p\left({x}_{t}\left|{x}_{t-1}^{\left(i\right)}\right.\right)$ is the transitional prior and weights can be expressed in terms of the likelihood distribution, ${\stackrel{\u0303}{w}}_{t}^{\left(i\right)}=p\left({y}_{t}\left|{x}_{t}^{\left(i\right)}\right.\right)$. After particle generation, weighting and normalization $\left({w}_{t}^{\left(i\right)}={\stackrel{\u0303}{w}}_{t}^{\left(i\right)}/{\sum}_{i}{\stackrel{\u0303}{w}}_{t}^{\left(i\right)}\right)$, a MMSE estimate of the state can be computed as

which was proved to converge *a.s*. to the true value if N_{p} was large enough [43, 44].

A typical problem of PFs is the degeneracy of particles, where all but one weight tend to zero. This situation causes the particle to collapse to a single state point. To avoid degeneracy, we apply resampling, consisting in eliminating particles with low importance weights and replicating those in high-probability regions [45, 46].

In this article, we consider a variant of the SPF, which resorts to the prior distribution to generate particles. Such algorithm is widely used that it deserved a specific name; typically, one refers to this implementation as the bootstrap filter. Particle generation and filtering is

in this case, where we made use of the assumptions of the dynamic system described in (6)-(7).

### 3.4. Cost-reference particle filter

Particle filters are also sensitive to the proper specifications of the model distributions [47]. In fact in many situations, especially when the true noise distribution is unknown or it does not have a proper mathematical model, it is impossible to obtain a solution in closed form and hence mostly a Gaussian distribution is assumed for the ease of computation and to obtain tractable solution. So, it is likely that the PFs may degrade in performance whenever the assumed distribution is different from the true distribution.

A new type of SMC filter, known as the CRPF, was first introduced in [48]. The idea in CRPF is to propagate the particles from one time epoch to the other based on some user-defined cost function. This family of methods tries to overcome some limitations of general PF algorithms: namely, the need for a tractable and realistic probabilistic model of the a priori distribution of the state, *p*(**x**_{0}), the conditional density of the transition, *p*(**x**_{
t
}|**x**_{t-1}) and the likelihood distribution *p*(**y**_{
t
}|**x**_{
t
}). In order to surmount such problems, CRPF methods perform the dynamic optimization of an arbitrary cost function, which is not necessarily tied to the statistics of the state and the observation processes, instead of relying on a probabilistic model of the dynamic system (in contrast to the SPF algorithm). By a proper selection of this cost function, we can design and implement algorithms in a quite simple manner, regardless of the availability of process and measurement noise densities.

The CRPF algorithm can be interpreted as follows. Firstly, N_{p} particles are randomly initialized at *t* = 0. Usually, one draws from a uniform distribution in the bounded interval ${I}_{{x}_{0}}$, and a zero cost is assigned to each particle:

for *i* = 1,..., N_{p}. Notice that in the CRPF algorithm, we denote as particles the set ${\left\{{x}_{t}^{\left(i\right)},{\mathcal{C}}_{t}^{\left(i\right)}\right\}}_{i=1}^{{\mathsf{\text{N}}}_{\mathsf{\text{p}}}}$. At *t* + 1, particles with higher cost are selected (by resampling) and those with lower cost are rejected. The cost of the selected particles does not change in this stage. Preserving the cost of particles after resampling helps to shift particles toward local minima of the cost function. The predictive cost of the particle, defined as

is calculated for each particle. We use the following risk function

where *q* ≥ 1 and $\parallel b\parallel =\sqrt{{b}^{T}b}$ denote the norm of **b**. Then, a probability mass function (PMF) of the form

is defined, where *μ* : ℝ ↦ [0,+ ∞] is a monotonically decreasing function, known as the generating function. The most intuitive choice of PMF is

which we adopt in the sequel. Then, we resample the trajectories ${\left\{{x}_{t}^{\left(i\right)},{\mathcal{C}}_{t}^{\left(i\right)}\right\}}_{i=1}^{{\mathsf{\text{N}}}_{\mathsf{\text{p}}}}$ according to ${\widehat{\pi}}_{t+1}$ and obtain a new set ${\left\{{\widehat{x}}_{t}^{\left(i\right)},{\widehat{\mathcal{C}}}_{t}^{\left(i\right)}\right\}}_{i=1}^{{\mathsf{\text{N}}}_{\mathsf{\text{p}}}}$.

The following algorithmic step is particle propagation. First, a set of N_{p} random particles are drawn from an arbitrary conditional distribution, *p*_{t+1}(**x**_{t+1}|**x**_{
t
}), with only constraint being that ${E}_{pt+1\left({x}_{t+1}|{x}_{t}\right)}\left\{{x}_{t+1}\right\}={f}_{t}\left({x}_{t}\right)$. These new particles have associated weights

where, λ, which lies between 0 and 1, is the forgetting factor that controls the weights assigned to old observations. $\Delta {\mathcal{C}}_{t+1}^{\left(i\right)}$ is the incremental cost function. An intuitive and computationally simple choice [49] is

where *q* ≥ 1. The updated set of particles is then ${\left\{{x}_{t+1}^{\left(i\right)},{\mathcal{C}}_{t+1}^{\left(i\right)}\right\}}_{i=1}^{{\mathsf{\text{N}}}_{\mathsf{\text{p}}}}$, which is used for estimation purposes as follows. As in the selection step, a PMF is once again defined:

from which several estimators can be computed, including the minimum cost estimator. In this paper, we are interested in the mean estimate

which reminds of the estimator in (12) for the SPF algorithm.

## 4. Results

The Bayesian filters introduced in Section 3 were used to track and locate the robot of the experimental setup in Section 2. Recall that a robot was moved along a trajectory while emitting an UWB ranging signal; such signal was received by a set of UWB sensors located in an office environment with known locations. The problem tackled in this article is that of a data fusion center in charge of tracking the position of the robot accounting for the measured ranges. Initial position ambiguity was modeled with a Gaussian random variable with covariance 10 · **I**_{2}

Figure 5 shows the cumulative density function (CDF) of the localization error for various filters. Also, a solution based on the LS algorithm applied to the observations in (7) was evaluated for the sake of comparison. Note that this is not a sequential method. Particularly, we considered N_{p} = 50 particles for both SPF and CRPF algorithms, as well as *q* = 2 for the cost function in CRPF. The plot shows the probability that a certain filter occurs in an error lower than the selected *x*-axis value. Therefore, a *good* filter in terms of such figure of merit is one which tends quickly to 1, meaning that small errors were committed. Notice that it is a monotonically increasing function. From the results in Figure 5 we can see that, when applying the filters to the real data in [11], the best performance was obtained by the CRPF. As predicted by theory, the Gaussian assumption made by the filters proved to be inappropriate, and hence the inferior performance.

The selection of the cost function for CRPF algorithm is known to be a design issue, which might modify the performance of the filter. Typically, the *L*_{
q
}-norm is used due to its simplicity [50] as we considered in (18) and (22). For the results in Figure 5 we considered the intuitive value *q* = 2, but other options are possible. In Figure 5, it can also be observed that the performances of SPKFs are better than that of SPF. It shows that for certain applications, SPKF can be a choice over SPF. This is especially beneficial when computational efficiency is one of the major factors under consideration. A similar result has been observed in [51], wherein a UKF has outperformed a SPF for the particular application of localization. Moreover, it can also be observed that Bayesian filters have better performance as compared to the LS estimator. This shows that using even a trivial prior information can enhance the performance, thus showing the superiority of Bayesian filters to non-Bayesian ones. In Figure 6, the CDF of the localization error for three values of *q* can be consulted. The Euclidean norm, *q* = 2, obtain fair results as shown in Figure 5. However, the high degree of non-Gaussianity in range measures, mainly due to the presence of a large percentage of outliers, makes it more appealing to use other values. For instance, it is well known [52] that the sample mean (corresponding to *q* = 2) is less robust to outliers than the median (*q* = 1). Given the relevance to our application, it was worthy to study the effect of using different types of norms in the cost function. Moreover, we studied the use of *q* = ∞. Results shown in Figure 6 are in accordance with theory; the value *q* = 1 provides the most robust result in the presence of outliers, being this choice for the cost function very convenient in the setup reported in this article.

The convergence properties of SPF and CRPF do depend on the number of particles considered [43]. A number of N_{p}-values were also tested to evaluate its effect. Figure 7 depicts the overall root mean square error (RMSE) for SPF and CRPF algorithms versus N_{p} ∈ [2, 100]. CRPF used *q* = 1 in this figure. Apart from the conclusion that CRPF outperforms SPF, we can see that increasing N_{p} above ten particles did not modify the performance of both filters. The main reason could be the high noise of measures, which prevents obtaining better estimation results independently of N_{p}.

The localization errors have been plotted with the 1.5*σ* and 3*σ* confidence intervals for LS and CRPF filters in Figure 8a.b, respectively. After using the same axis intervals, we can see that the error values are much less and are well bounded in the case of CRPF as compared to that of LS.

For the sake of completeness, the estimated trajectory of the CRPF with N_{p} = 50 particles and *q* = 1 is shown in Figure 9. Also the true trajectory is plotted, which started at coordinates (14.4, 11.1) meters. Crosses denote the location of UWB sensors, in accordance with the deployment in Figure 1.

## 5. Conclusions

In this article, we addressed the problem of robot localization by means of a set of UWB ranging devices, as well as measures from acceleration sensors. In particular, we used an experimental setup, and thus we dealt with real data. The contributions of this article are twofold. On the one hand, we analyzed the Gaussian assumption of recorded data, which is commonly considered in the derivation of many signal processing algorithms. After an exhaustive statistical analysis by the Anderson-Darling test, we found out that this assumption does not hold in general. Therefore, localization algorithms resorting to this consideration are likely to fail.

In a second part of the article, we studied a number of Bayesian filters to track the time-evolving position of the robot. Mainly, we considered Kalman-type filters, standard PF, and a recently proposed CRPF, which reduces considerably model assumptions on noise distributions. From the results, with real data from the experimental setup, we saw that CRPF outperforms the rest of the filters due to its inherent robustness against model inaccuracies. Other filters require rather tight model assumptions, which do not hold in general.

## Appendix 1

### The Anderson-Darling test for normality

The aim of the test is to assess the normality of the sample composed of a set of *L* measured ranges between a node *i* and its neighbor *j*. The set is defined as ${\left\{{\widehat{\rho}}_{i,j}^{\left(\ell \right)}\right\}}_{\ell =1}^{L}$, where index ℓ denotes a realization of the random variable (1) in the static scenario and *L* ≤ *L*_{
m
}. This section presents the method used to accept/reject Gaussianity of UWB range measures, based on the Anderson-Darling statistic *A*^{2} as proposed in [53]. *A*^{2} statistic is known to be one of the most powerful tools when testing normality [25]. The procedure is as follows.

First, for each (*i, j*) node pair, the set of ranges are sorted in ascending order

and, since the hypothetic underlying normal distribution is unknown, the mean and variance are estimated as

With Φ(·) being the standard normal CDF,^{a}we use the standardized sample

to compute the Anderson-Darling statistic *A*^{2}, which is defined as:

Then, the null hypothesis ${\mathcal{H}}_{0}$ that the sample is normally distributed is rejected if the modified statistic exceeds a given threshold:

The threshold *γ*_{
α
}is fixed for a chosen level of significance *α*, where 0 ≤ *α* ≤ 1 is defined as

that is, the probability of rejecting the null hypothesis while true. *γ*_{
α
}can be obtained numerically by Monte Carlo simulations or refer to the tabulated values as a function of *L* and *α*[25]. The detection probability can then be straightforwardly computed as

Indeed, we are not interested in the case of *L* = *L*_{
m
}since the Anderson-Darling test is known to reject the null hypothesis for large sample sizes in the presence of small discrepancies, such as outliers. Therefore, instead of testing the whole set of *L*_{
m
}measurements, the approach taken considers the random selection of *L* = 10 samples from the measurement set. Notice that the test is more likely to reject ${\mathcal{H}}_{0}$ when increasing *L*. The subset is then processed following the above procedure, which is performed independently 700 times per each pair of nodes (*i, j*) and averaged. One could use different *L* values with similar conclusions as those discussed in Section 1.

## Endnote

^{a}Recall that the CDF of a normal random variable *x* with mean *μ* and variance *σ*^{2} is $\Phi \left(x;\mu ,{\sigma}^{2}\right)=\frac{1}{2}+\frac{1}{2}\mathsf{\text{erf}}\left(\frac{x-\mu}{\sqrt{2}\sigma}\right)$, with the error function [54] being defined as $\mathsf{\text{erf}}\left(x\right)=\frac{2}{\sqrt{\pi}}{\int}_{0}^{x}{e}^{-{t}^{2}}dt$.

## References

- 1.
Boukerche A: Algorithms and Protocols for Wireless Sensor Networks, Ser. In

*Wiley Series on Parallel and Distributed Computing*. Wiley-IEEE Press, Hoboken, NJ; 2008. - 2.
Yu K, Sharp I, Guo YJ: Ground-Based Wireless Positioning, ser. In

*IEEE Press Series on Digital & Mobile Communication*. Wiley-IEEE Press, Chichester, UK; 2009. - 3.
Sheng X, Hu YH: Maximum likelihood multiple-source localization using acoustic energy measurements with wireless sensor networks.

*IEEE Trans Signal Process*2005, 53(1):44-53. - 4.
Cattivelli F, Lopes CG, Sayed AH: Diffusion recursive least-squares for distributed estimation over adaptive networks.

*IEEE Trans Signal Process*2008, 56(5):1865-1877. - 5.
Gasparri A, Pascucci F: An interlaced extended information filter for self-localization in sensor networks.

*IEEE Trans Mobile Comput*2010, 9(10):1491-1504. - 6.
Chen Z: Bayesian filtering: From Kalman filters to particle filters, and beyond. In

*Adapt Syst Lab*. McMaster University, Ontario, Canada, Tech. Rep; 2003. - 7.
Ristic B, Arulampalam S, Gordon N:

*Beyond the Kalman Filter: Particle Filters for Tracking Applications.*Artech House, Boston; 2004. - 8.
Ansari J, Riihijarvi J, Mahonen P: Combining Particle Filtering with Cricket System for Indoor Localization and Tracking Services. Personal, Indoor and Mobile Radio Communications, 2007, in PIMRC 2007.

*IEEE 18th International Symposium on*2007, 1-5. - 9.
Fox V, Hightower J, Liao L, Schulz D, Borriello G: Bayesian filtering for location estimation. Pervasive Comput.

*IEEE*2003, 2: 24-33. - 10.
Zhang J, Orlik PV, Sahinoglu Z, Molisch AF, Kinney P: UWB systems for wireless sensor networks.

*Proc IEEE*2009, 97(2):313-331. - 11.
Dardari D, Sottile F: WPR.B database: Annex of Progress Report II on Advanced Localization and positioning Techniques: Data Fusion and Applications.

*Deliverable DB.3 Annex, 216715 Newcom++ NoE, WPR.B*2009. - 12.
Bar-Shalom Y, Tse E: Tracking in a cluttered environment with probabilistic data association.

*Automatica*1975, 11: 451-460. 10.1016/0005-1098(75)90021-7 - 13.
Bar-Shalom Y, Fortmann TE:

*Tracking and Data Association.*Academic Press, Orlando; 1988. - 14.
Reid DB: An algorithm for tracking multiple targets.

*IEEE Trans Automat Contr*1979, 24(6):443-454. - 15.
Blackman S: Multiple hypothesis tracking for multiple target tracking.

*IEEE Aerosp Electron Syst Mag*2004, 19(1):5-18. - 16.
Time Domain Corporation2009. [http://www.timedomain.com/]

- 17.
Gholami MR, Ström E, Rydström M: Indoor sensor node positioning using UWB range measurements. In

*Proc XVII European Signal Processing Conference EUSIPCO'09*. Glasgow, Scotland; 2009. - 18.
Ängeby J: Estimating signal parameters using the nonlinear instantaneous least squares approach.

*IEEE Trans Signal Process*2000, 48(10):2721-2732. 10.1109/78.869022 - 19.
Storn R, Price K: Differential evolution--a simple and efficient adaptive scheme for global optimization over continuous spaces.

*J Global Optim*1997, 11: 341-359. 10.1023/A:1008202821328 - 20.
Blatt D, Hero AO III: Energy-based sensor network source localization via projection onto convex sets.

*IEEE Trans Signal Process*2006, 54(9):3614-3619. - 21.
Meesookho C, Mitra U, Narayanan S: On energy-based acoustic source localization for sensor networks.

*IEEE Trans Signal Process*2008, 56(1):365-377. - 22.
Alavi B, Pahlavan K: Modeling of the TOA-based distance measurement error using UWB indoor radio measurements.

*IEEE Commun Lett*2006, 10(4):275-277. 10.1109/LCOMM.2006.1613745 - 23.
Alsindi N, Alavi B, Pahlavan K: Measurement and modeling of ultrawideband TOA-based ranging in indoor multipath environments.

*IEEE Trans Veh Technol*2009, 58(3):1046-1058. - 24.
Bellusci G, Janssen GJM, Yan J, Tiberius CCJM: Modeling distance and bandwidth dependency of TOA-based UWB ranging error for positioning.

*Rec Lett Commun*2009, 1-4. 2009 - 25.
Stephens MA: EDF statistics for goodness of fit and some comparisons.

*J Am Stat Assoc*1974, 69(347):730-737. 10.2307/2286009 - 26.
Anderson BDO, Moore JB:

*Optimal Filtering.*Prentice-Hall, Englewood; 1979. - 27.
Sorenson H:

*Recursive Estimation For Nonlinear Dynamic Systems.*Marcel Dekker, New York; 1988. - 28.
Kay SM:

*Fundamentals of Statistical Signal Processing. Estimation Theory.*Prentice-Hall, Upper Saddle River; 1993. - 29.
Kalman RE: A new approach to linear filtering and prediction problems.

*Trans ASME J Basic Eng D*1960, 82: 35-45. 10.1115/1.3662552 - 30.
Gustafsson F, Gunnarsson F, Bergman N, Forssell U, Jansson J, Karlsson R, Nordlund PJ: Particle filters for positioning, navigation and tracking.

*IEEE Trans Signal Process*2002, 50(2):425-437. 10.1109/78.978396 - 31.
Grewal MS, Weill LR, Andrews AP:

*Global Positioning Systems, Inertial Navigation, and Integration.*2nd edition. Wiley, Hoboken; 2007. - 32.
Groves D:

*Principles of GNSS Inertial and Multisensor Navigation Systems.*Artech House, London, England; 2008. - 33.
3-axis acceleration chip LIS3L02DQ datasheet, STMicroelectronics2005. [http://www.datasheetcatalog.org/datasheet2/1/036ete1wq40k5kgkoi91389ap83y.pdf]

- 34.
Julier S, Uhlmann J, Durrant-White HF: A new method for nonlinear transformation of means and covariances in filters and estimators.

*IEEE Trans Automat Contr*2000, 45: 477-482. 10.1109/9.847726 - 35.
Merwe RVD, Wan E: Sigma-point Kalman filters for probabilistic inference in dynamic state-space models. In

*Proceedings of the Workshop on Advances in Machine Learning*. Montreal, Canada; 2003. - 36.
Ito K, Xiong K: Gaussian filters for nonlinear filtering problems.

*IEEE Trans Automat Contr*2000, 45(5):910-927. 10.1109/9.855552 - 37.
Arasaratnam I, Haykin S, Elliot RJ: Discrete-time nonlinear filtering algorithms using Gauss-Hermite quadrature.

*Proc IEEE*2007, 95(5):953-977. - 38.
Arasaratnam I, Haykin S: Square-root quadrature Kalman filtering.

*IEEE Trans Signal Process*2008, 56(6):2589-2593. - 39.
Arasaratnam I, Haykin S: Cubature Kalman filters.

*IEEE Trans Autom Control*2009, 54(6):1254-1269. - 40.
Fernández-Prades C, Vilà-Valls J: Bayesian nonlinear filtering using quadrature and cubature rules applied to sensor data fusion for positioning. In

*Proc of the IEEE International Conference on Communications, ICC'10*. Cape Town, South Africa; 2010. - 41.
Arulampalam S, Maskell S, Gordon N, Clapp T: A tutorial on particle filters for online nonlinear/non-Gaussian Bayesian tracking.

*IEEE Trans Signal Process*2002, 50(2):174-188. 10.1109/78.978374 - 42.
Djurić PM, Kotecha JH, Zhang J, Huang Y, Ghirmai T, Bugallo MF, Míguez J: Particle filtering.

*IEEE Signal Process Mag*2003, 20(5):19-38. 10.1109/MSP.2003.1236770 - 43.
Crisan D, Doucet A: A survey of convergence results on particle filtering for practitioners.

*IEEE Trans Signal Process*2002, 50(3):736-746. 10.1109/78.984773 - 44.
Hu X, Schön T, Ljung L: A basic convergence result for particle filtering.

*IEEE Trans Signal Process*2008, 56(4):1337-1348. - 45.
Bolić M, Djurić P, Hong S: Resampling algorithms for particle filters: A computational complexity perspective.

*EURASIP J Appl Signal Process*2004, 15: 2267-2277. - 46.
Douc R, Cappé O, Moulines E: Comparison of resampling schemes for particle filtering. In

*Proc of the 4th International Symposium on Image and Signal Processing and Analysis, ISPA'05*. Zagreb, Croatia; 2005:64-69. - 47.
Djurić PM, Bugallo MF, Closas P, Míguez J: Measuring the robustness of sequential methods. In

*Proc of the IEEE International Workshop on Computational Advances in Multi-Sensor Adaptive Processing, CAMSAP'09*. Aruba (Dutch Antilles); 2009. - 48.
Míguez J, Bugallo MF, Djurić PM: A new class of particle filters for random dynamic systems with unknown statistics.

*EURASIP J Appl Signal Process*2004, 2004(15):2278-2294. 10.1155/S1110865704406039 - 49.
Míguez J: Analysis of selection methods for cost-reference particle filtering with applications to maneuvering target tracking and dynamic optimization. ELSEVIER Digit.

*Signal Process*2007, 17: 787-807. - 50.
Bugallo M, Míguez J, Djurić P: Positioning by cost reference particle filters: study of various implementations.

*International Conference on Computer as a Tool, EUROCON 2005, vol. 2*2005, 1610-1613. - 51.
Bellotto N, H Hu:

*Computationally Efficient Solutions for Tracking People with a Mobile Robot: An Experimental Evaluation of bayesian Filters.*Springer, Berlin; 2009. - 52.
Huber PJ:

*Robust Statistics.*2nd edition. Wiley, New York; 1981. - 53.
Anderson TW, Darling DA: Asymptotic theory of certain goodness-of-fit criteria based on stochastic processes.

*Ann Math Stat*1952, 23(2):730-737. - 54.
Proakis J, Salehi M:

*Communciation Systems Engineering.*Prentice-Hall, Upper Saddle River; 1994.

## Acknowledgements

The authors would like to thank the anonymous reviewers for their constructive comments and suggestions, which have significantly improved the quality of this work. The authors want to acknowledge the critical contribution to the article made by their colleagues who carried out the range measurement campaign: Davide Dardari (Universita di Bologna, UNIBO), Francesco Sottile (Istituto Superiore Mario Boella), Javier Arribas (Centre Tecnologic de Telecomunicacions de Catalunya), Andrea Conti (Universit degli Studi di Ferrara), Marco Rosetti (UNIBO), Valerio Casadei (UNIBO), Sergio Contino (UNIBO), Denis Fusconi (UNIBO), and Nicolo Decarli (UNIBO). This work has been partially supported by the European Commission in the framework of the FP7 Network of Excellence in Wireless COMmunications NEWCOM++ (contract n. 216715) and COST Action IC0803 (RFCSET), as well as the Spanish Science and Technology Commission TEC2008-02685/TEC (NARRA).

## Author information

## Additional information

### Competing interests

The authors declare that they have no competing interests.

## Authors’ original submitted files for images

Below are the links to the authors’ original submitted files for images.

## Rights and permissions

## About this article

### Cite this article

Dhital, A., Closas, P. & Fernández-Prades, C. Bayesian filtering for indoor localization and tracking in wireless sensor networks.
*J Wireless Com Network* **2012, **21 (2012) doi:10.1186/1687-1499-2012-21

Received:

Accepted:

Published:

### Keywords

- Sensor Node
- Wireless Sensor Network
- Extended Kalman Filter
- Minimum Mean Square Error
- Anchor Node