1 Introduction

The increasing popularity of wireless networks (WiFi) has greatly boosted both commercial and academic interest in indoor positioning systems. Requiring no specialized hardware, WiFi-based positioning systems utilize off-the-shelf wireless access points to determine the location of objects and people in indoor environments using wireless signals, emitted by a multitude of electronic devices. This location information finds a broad range of applications, including in robotics, indoor navigation systems, and facility management and planning in retail stores, universities, airports, public buildings, etc. [12, 13].

WiFi-based positioning systems use sensors to capture the signals transmitted by WiFi-equipped devices such as smartphones and laptops. Since the signals are attenuated (i.e., reduced in strength) as they travel through physical space, a sensor close to a device emitting a signal will measure a higher signal strength than a sensor farther away from the device. By combining measurements of the same signal by different sensors, indoor positioning systems can approximate the signal’s origin. Two broad groups of localization techniques exist: fingerprinting-based and model-based methods. The former can be regarded as a form of supervised learning, where a model is trained to predict a device’s location based on grouped signal strength measurements by passing it pairs of measurement groups (sample features) and known locations (labels). Consequently, fingerprinting-based methods require training data  [5, 24]. Model-based methods, on the other hand, require no training data and rely on physical models for the propagation of signals through space to determine the most likely location of the device [20]. They include lateration-based methods, which estimate the distance to multiple sensors based on the received signal strengths and use regression methods to determine the most likely position of the device.

The first concern with all of these approaches is the unpredictability of signal propagation through indoor environments. Static obstacles such as walls, ceilings, and furniture attenuate the transmitted signal and prohibit the construction of an accurate model for the received signal strength. Furthermore, the refraction of signals by these obstacles leads to multiple observations of the same signal by a single sensor, but at different signal strengths (the multipath phenomenon, see [16]). Dynamic obstacles such as people further complicate the process, as these cannot be modeled offline. The resulting observation noise results in significant variance of location estimates in all existing approaches [12]. The second problem encountered using these methods is that they can only estimate the location of a device when it transmits a signal. In practice, signals are transmitted infrequently and at irregular intervals, thus only allowing for intermittent positioning.

Both of these problems form major hurdles in the application of WiFi-based location analysis to real-world issues. With intermittent, inaccurate, and imprecise location estimates, any further data mining and analysis becomes exceedingly difficult. In this paper, we propose a novel method to mitigate these issues. We employ a nonparametric approach to approximate sensors’ received signal strength distributions over time. For this, we use a Gaussian process (GP) model to obtain an a posterior estimate and associated variance information of signal strengths, which simultaneously allows us to resample from the distribution at any timestamp, and to sample only measurements with sufficiently low variance. The proposed approach can greatly enhance any model based on signal strengths. In addition to the Gaussian process model, we also compare several smoothing methods for location estimates. Ultimately, our main contribution is an accurate model that addresses each of the problems outlined above, reducing localization noise and providing accurate location estimates at arbitrary time intervals.

The rest of the paper is structured as follows. First, related work is outlined in Sect. 2. Section 3 gives a formal problem statement. Methods for smoothing and interpolation and the proposed Gaussian process model are discussed in Sects. 4 and 5. Experiments are covered in Sect. 6. Section 7 concludes.

2 Background and Related Work

Driven by the proliferation of WiFi-equipped devices, WiFi sensors have become a popular choice for use in indoor positioning systems. Requiring no specialized hardware, the accuracy of these approaches is generally in the range of 2 to 4 m [12]. This makes them a good candidate for indoor localization purposes in many areas, including, among others, facility planning and indoor navigation. In robotics, localization of robots in indoor spaces forms a key challenge [22].

Both physical models for signal propagation and machine learning methods are broadly applied. The latter include methods based on traditional machine learning techniques such as support vector machines and k-nearest neighbours [12]. Notably, a Gaussian process model for generating a likelihood model of signal strengths from location data is proposed in [5]. More recently, a neural network approach was suggested by Zou et al. [24]. Such fingerprinting-based models require training data to construct a prediction model, which has two major drawbacks [14]. First, training data can be expensive to obtain: to construct a proper localization model, training data consisting of signal strength measurements and known device coordinates is required from locations throughout the input space. Second, when extending a localization system to new environments or with additional sensors, the system needs to be re-trained with additional training data.

Approaches requiring no calibration data instead rely on physical models for the propagation of signals through space, only requiring the locations of the sensors to be known. They include approaches based on the measured angle of the incoming signal (angle of arrival) and approaches based on the time a signal takes to reach the sensor (time of flight) [8, 15]. Furthermore, distance-based models, localizing devices using a model of the propagation of signals through space, are often used [10, 23]. They exploit the fact that radio signals reduce in strength as they propagate through space, utilizing lateration-based techniques to find the most likely position of the device based on signal strength measurements at multiple sensors. Lastly, approaches exist that require neither training data nor knowledge about the environment (such as sensors locations). These approaches, known as simultaneous localization and mapping (SLAM [22]) methods, simultaneously infer environment information and device locations. Applications of this method using WiFi sensors include WiFi SLAM [4] and distributed particle SLAM [2]. For an extensive review of WiFi-based positioning systems and applications, we refer the reader to [3, 8, 12].

No single performance measure exists for evaluating localization quality, but consensus exists in literature that both accuracy and precision are important. In [12] and [3], different performance criteria are discussed; we will use a subset of these in our work. The main contribution of this paper is the proposition of a lateration-based model using Gaussian processes for signal strength measurements, addressing the most important performance criteria of accuracy, precision, and responsiveness simultaneously. Our approach enables high-quality location estimates at arbitrary timestamps. To the best of our knowledge, this is the first generic model for continuously estimating device locations.

3 Problem Statement

Our aim is to construct a (1) precise, (2) accurate, and (3) responsive (i.e., able to provide continuous location estimates) positioning system for indoor environments where relatively few signal observations are present. Furthermore, the method should be robust and cost-effective.

Assume we are provided with a set of n signal strength measurements \(X = (\mathbf {x}_1, \dots , \mathbf {x}_n)\) for a single device. Each measurement is generated by a device at some unknown position. The vector \(\mathbf {x}_i\) consists of the observation timestamp, an identifier of the sensor receiving the signal, the signal strength, and information to uniquely identify the package transmitted by the device. Let \(\mathbf {d}_t\) denote the position of the device at time t. Our objective, then, is to obtain a position estimate \(\mathbf {\hat{d}}_t\) for the device at any timestamp t based on the measurements X. We wish to maximize the accuracy, i.e., minimize the distance between the expected estimated location and the actual location, \(||\mathbb {E}[\mathbf {\hat{d}}_t] - \mathbf {d}_t]||\), where \(||\cdot ||\) denotes the Euclidean norm. We also wish to maximize the precision, i.e., minimize the expected squared distance between the estimated location and the mean estimated location, \(\mathbb {E}\left[ ||\mathbf {\hat{d}}_t - \mathbb {E}[\mathbf {\hat{d}}_t]||^2\right] \).

Of course, we cannot evaluate the expected accuracy and precision. Instead, we optimize the empirical accuracy and precision. Assume our calibration data consists of observations of a device at c different known locations \((\mathbf {p}_1, \dots , \mathbf {p}_c)\). Each set \(C_j\) then consists of the estimated device positions when the device was at position \(\mathbf {p}_j\). Let \(\mathbf {\hat{p}}_j\) be the mean of the estimated positions for calibration point j, i.e., \(\mathbf {\hat{p}}_j = \frac{1}{|C_j|} \sum _{\mathbf {\hat{d}} \in C_i} \mathbf {\hat{d}}\). The accuracy and precision are then calculated as an average over the accuracy and precision at all calibration points.

The empirical accuracy (Acc) is calculated as the mean localization error,

$$\begin{aligned} Acc = \frac{1}{c} \sum \limits _{j=1}^c || \mathbf {\hat{p}}_j - \mathbf {p}_j || . \end{aligned}$$
(1)

The empirical precision (Prec) per calibration point is calculated as the mean squared distance between the estimated location and the mean estimated location. This yields, averaged over all calibration points,

$$\begin{aligned} Prec = \frac{1}{c} \sum \limits _{j=1}^c \left( \frac{1}{|C_j|} \sum _{\mathbf {\hat{d}} \in C_j} ||\mathbf {\hat{d}} - \mathbf {\hat{p}}_j||^2 \right) . \end{aligned}$$
(2)

4 Lateration-Based Positioning

WiFi-equipped devices emit radio signals when connected to an access point, and when scanning for a known access point. Sensors can be utilized to listen for these signals, recording the received signal strength. We henceforth refer to this received package and the associated signal strength as a measurement. Our approach combines measurements of a signal by different sensors to determine its spatial origin. It requires no prior knowledge besides the sensor locations.

To localize a device, we need measurements of the same signal from multiple sensors. Each transmitted package contains information, including the package’s sequence number and a device identifier, by which we can identify unique packages received by multiple sensors. We henceforth refer to these groups of measurements of the same package by different sensors as co-occurrences.

4.1 Localization Model

Having identified a co-occurence, we wish to translate this set of the package’s signal strength measurements into an estimate of the transmitting device’s location. We do so by modeling the propagation of the signal through space, and finding the device coordinates and parameters that minimize the difference between the modeled signal strengths and the observed signal strengths.

To model the propagation of a signal in space from a transmitting antenna to a receiving antenna, we make use of the Friis transmission equation [6]. It defines the relation between the transmitted signal strength \(P_t\) (from an antenna with gain \(G_t\)), the received signal strength \(P_r\) (at an antenna with gain \(G_r\)), the wavelength \(\lambda \) of the signal, and the distance R between the antennas. Antenna gain is a measure for the efficiency of the antenna, and is constant for each antenna. Using the dBm unit for the signal strengths, we calculate \(P_r\) by

$$\begin{aligned} P_r = P_t + G_t + G_r + 20 \cdot \log \left( \frac{\lambda }{4\pi R}\right) , \end{aligned}$$
(3)

where \(\log (\cdot )\) denotes the logarithm with base 10. Equation 3 is premised on the assumption that the path between the two antennas is unobstructed (the free space assumption). This assumption is captured in the last term of the equation, which is the logarithm of the inverse of what is known as the free-space path loss \((\frac{4\pi R}{\lambda })^2\) (also known as the free-space loss factor [1]). However, in most real-world indoor environments, we cannot assume free space. To combat this problem, we make use of an empirically derived formula for modeling propagation loss from [9]. It introduces the path loss exponent n as the exponent in the fraction of the path loss equation. For free-space environments, \(n=2\), yielding the original transmission equation. For environments with obstructions, generally \(n>2\) [18]. We introduce a method for estimating n in Sect. 4.2. We note that, by using a physical model for estimating device locations based on measurements, our lateration-based method does not require an expensive training phase. Further motivation for using lateration-based methods over fingerprinting-based methods can be found in the fact that, unlike in most machine learning problems, the true model generating our observations is known (up to corrections for the multipath phenomenon). This valuable prior knowledge is discarded in most fingerprinting-based methods.

Given the signal strength model, we formulate the localization problem as a regression problem, minimizing the sum of squared differences between the measured signal strength, and the signal strength obtained when calculating \(P_r\) from the Friis transmission equation using our estimated location parameters. Assuming i.i.d. measurements with additive Gaussian noise, this corresponds to the maximum likelihood estimator. We define the model for the transmission strength based on the Friis transmission equation from Eq. 3 and incorporate sensor i’s path loss exponent \(n_i\), rewriting it for a single sensor as:

$$\begin{aligned} P_r&= P_t + G_t + G_r + n_i \cdot 10 \cdot \log \left( \frac{\lambda }{4\pi R_i}\right) \\&= P_t + G_t + G_r + n_i \cdot 10 \cdot \log \left( \frac{\lambda }{4\pi }\right) - n_i \cdot 10 \cdot \log R_i\\&= \rho - n_i \cdot 10 \cdot \log R_i\text {,} \end{aligned}$$

where \(\rho = P_t + G_t + G_r + n_i \cdot 10 \cdot \log \left( \frac{\lambda }{4\pi }\right) \) is the bias term to be estimated, and the path loss exponent \(n_i\) is assumed known and constant. The model corresponds to the transmission strength model defined in [9]. The resulting system of equations is underdetermined in the general case where \(G_r\) is dependent on the sensor. Thus, we assume that \(G_r\) is constant across all sensors, making the system overdetermined. In our case, as all WiFi sensors are of the same type, this is reasonable. Expressing \(R_i\) in terms of the sensor location vector \(\mathbf {s}^{(i)}=(s^{(i)}_x, s^{(i)}_y)^T\) and the device location estimate vector \(\mathbf {d}=(d_x, d_y)^T\), we obtain our model:

$$\begin{aligned} f_i(\theta ) \equiv f_i(\theta | \mathbf {s}^{(i)}, n_i) = \rho - n_i \cdot 10 \cdot \log ||\mathbf {s}^{(i)}-\mathbf {d}||, \end{aligned}$$
(4)

where \(\theta \equiv (\rho , d_x, d_y)^T\) are the parameters to be estimated. We are now in place to define our loss function J:

$$\begin{aligned} J(\theta ) \equiv J(\theta | \mathbf {s}^{(1)}, \dots , \mathbf {s}^{(N)}, \mathbf {n}) = \sum \limits _{i=1}^{N} (P^{(i)}_r - f_i(\theta ))^2, \end{aligned}$$
(5)

where \(P^{(i)}_r\) is the measured signal strength at sensor i. We wish to minimize this function, i.e., we want to find \(\hat{\theta } \in \mathop {\hbox {arg}\,\hbox {min}}\nolimits _\theta J(\theta )\). The loss function is nonconvex, and has no closed-form solution. Therefore, we make use of Newton’s method, which iteratively minimizes the loss function using the update rule \(\theta _{t+1} = \theta _t - \frac{f'(\theta _t)}{f''(\theta _t)}\) for determining the set of parameters \(\theta \) at iteration \((t+1)\). The initial state can be chosen in several ways, e.g., by taking the weighted mean position of all sensors that received the signal.

The positioning procedure described thus far localizes each co-occurrence independently, without taking into account previous or future estimated device positions. In other words, it assumes the locations over time for a single device are independent. Furthermore, it is premised on the assumption that the signal propagates through free space, which does not generally hold. In the remainder of this section, we propose several methods to overcome these shortcomings and improve the quality of fits in the sense of the outlined performance criteria.

4.2 Estimating the Path Loss Exponent

The general Friis transmission equation is premised on the assumption that the radio signal propagates through free space, which is generally not the case in indoor environments. To combat this, [9] proposes an empirical adjustment to the model, introducing path loss exponent n in the Friis transmission equation, where n grows as the free-space assumption is relaxed.

Considering Eq. 4, we see that the received signal strength can be rewritten as \(P_r = \rho - nx\), where \(x = 10 \cdot \log (R)\). As all parameters in \(\rho \) are assumed to be constant with respect to R, \(P_r\) is linear in \(\log (R)\). Now, using calibration data for which R, the distance between device and sensor, and \(P_r\), the received signal strength at the sensor, are known, we can apply linear regression to estimate \(\rho \) and n. Having estimated path loss exponent n, we can use it in our model to account for attenuation effects induced by the surroundings.

4.3 Smoothing and Filtering Fits

Another improvement on fit quality, in the sense of in particular precision, but also accuracy, can be achieved by exploiting the knowledge that, during short periods of time, the position of a device is not expected to change significantly. This opens up the possibility of simply smoothing the estimated locations through time. Here, we outline the most common smoothing and filtering methods, which can be applied to the estimated x- and y-coordinates individually.

First, we consider using the exponential moving average (EMA) [7]. Due to its O(1) complexity in smoothing a single data point, and because it only depends on previous observations, it is a good candidate for systems requiring large-scale and real-time localization. In its simplest form, the EMA assumes evenly spaced events, and calculates the smoothed value \(x'_i\) at step i as a weighted average of \(x'_{i-1}\), the smoothed value at step \(i-1\), and \(x_i\), the unsmoothed input value. Using \(\alpha \) to control the amount of smoothing, we obtain \(x'_i = x_i \cdot \alpha + x'_{i-1} \cdot (1 - \alpha )\).

Second, we consider Gaussian smoothing [21], which can be seen as the convolution of the signal with a Gaussian kernel. Like EMA, the filter generally assumes evenly spaced observations. However, by adjusting the weighting of each sample based on its observation timestamp, we can apply it to non-evenly-spaced observations as well. In discrete space, we calculate the smoothed value \(x'_i\) as the weighted average of all observations, where the weight of \(x_j\) is dependent on the time difference between observations j and i. Denoting n as the number of observations and \(t_i\) as the observation timestamp of sample i, we write

$$\begin{aligned} x'_i = \frac{\sum \nolimits _{j=1}^n w_{j} x_j}{\sum \nolimits _{j=1}^n w_j} \quad \text {, where}\quad w_j = \frac{1}{\sqrt{2\pi \sigma ^2}}\exp \left( {-\frac{1}{2\sigma ^2}(t_j-t_i)^2}\right) . \end{aligned}$$
(6)

Thus, the filter simply smooths the locations’ x- and y-coordinates. Theoretically, the filter has time complexity O(n) for a single observation, but this can be reduced to O(1) for observations sorted by timestamp. As a large part of a Gaussian’s density is concentrated close to its mean, we can simply use a small central section of the Gaussian without expecting significant changes in results.

Third, we consider a more sophisticated smoothing approach: the Savitzky-Golay filter [19], which smooths values by fitting a low-degree polynomial (centered around the observation to be smoothed) to the observed values in their vicinity. It then predicts the smoothed value at time t by evaluating the fitted polynomial function at its center. This corresponds to the bias term in the fitted polynomial. Each observation is smoothed independently, and makes use of the observations within some pre-specified window around the observation to be smoothed. For evenly spaced observations, an analytical solution exists; numerical methods are required for our non-evenly-spaced observations.

5 Gaussian Processes for Measurement Resampling

Smoothing and filtering approaches address the first of the two most significant problems of WiFi-based indoor localization: they improve accuracy and precision. However, they do not tackle the second problem, concerning the scarcity of measurements. We introduce a method to address both of the issues simultaneously, allowing arbitrary resampling of measurements while limiting variance.

Our method generates a model for the signal strengths measured by the sensors for a single device, and then resamples signals from this model. The model is constructed by means of a Gaussian process, making use of the fact that the signal of a device as measured by a sensor is expected to vary only slightly over small time intervals. Resampling facilitates the construction of new measurements at arbitrary timestamps, and reduces variance in signal strengths at the same time, by interpolating between signals received from the device around the requested timestamp. Before continuing to the implementation of this method, we provide a brief explanation of Gaussian processes; for details on prediction with Gaussian processes, we refer the reader to [17].

5.1 Gaussian Processes

Assume that we have a data set consisting of n observations, and that each observation is in \(\mathbb {R}^d\). We denote , where \(\mathbf {x}_i \in \mathbb {R}^d\) and \(y_i \in \mathbb {R}\) denote the feature vector and the target value, respectively, for the ith data point. The observations are drawn i.i.d. from some unknown distribution specified by

$$\begin{aligned} y_i = f(\mathbf {x}_i) + \epsilon _i, \end{aligned}$$
(7)

where \(\epsilon _i\) is a Gaussian distributed noise variable with 0 mean and variance \(\sigma _i^2\).

Since we want to predict a target value for previously unseen inputs, our objective is to find a function \(\hat{f}\) that models f. A Gaussian process estimates the posterior distribution over f based on the data. A model is sought that finds a compromise between fitting the input data well, and adhering to some prior preference about the shape of the model. This prior preference touches on a fundamental concept in Gaussian processes: they are based on the assumption that some similarity measure between two inputs exists that defines the correlation between their target values based on their input values. More formally, it requires a kernel function \(k(\mathbf {x}, \mathbf {x'})\) to be specified that defines the correlation between any pair of inputs \(\mathbf {x}\) and \(\mathbf {x'}\). Furthermore, a Gaussian process requires a prior mean \(\mu \) (usually 0) and variance \(\sigma ^2\) (chosen to reflect the uncertainty in the observations).

5.2 A Gaussian Process Model for Signal Strength Measurements

We propose a method for modeling the signal strength over time for a single device and a single sensor. We assume that each measurement consists of at least a timestamp, the measured signal strength, and information to uniquely identify the co-occurence (see Sect. 4), the device, and the sensor. In our model, we instantiate a single Gaussian process with one-dimensional feature vectors for each sensor to model the development of the signal over time. We will later elaborate on possibilities to extend this model to include additional information.

For our GP models, we propose using the exponential kernel or a similar kernel that exploits the fact that signal strengths vary relatively little over time. The measurements variance \(\mathbf {\sigma }^2\) should be chosen based on prior knowledge from the calibration data, and should reflect the observed variance in signal strength measurements. An important aspect of the GP is that it includes approximations of the variance on the posterior distribution. Consequently, we can reason about the certainty of our prediction at a specific timestamp. We exploit this knowledge in sampling from our signal strength distributions, discarding timestamps where the variance exceeds a predetermined upper bound. By sampling measurements for multiple sensors at the same timestamp, we can generate new co-occurences at arbitrary timestamps, provided that the variance is below our prespecified threshold. The latter reveals the true power of the GP model: resampling means that we are much less affected by the intermittence in the transmittal of signals by devices. Furthermore, we have estimates of the quality of the measurements, and we can vary in the trade-off between the number of measurements to generate, and their quality. We note that this capability is not natively present in existing techniques, even in those that are based on Gaussian processes: their models output device locations independently based on given measurements.

Fig. 1.
figure 1

Gaussian process model applied to a single sensor’s signal measurements.

Figure 1 displays an example, where we apply the Gaussian process model to measurements of a device from a single sensor. We use data of a person carrying a device along a predefined path in a store over a time period of 15 min. We fit a Gaussian process model with an exponential kernel to these measurements, optimizing the hyperparameters \(\ell \) and \(\sigma ^2\) using the Limited-memory BFGS algorithm [11]. The resulting mean estimate and 95% confidence interval are plotted in Fig. 1. As can be seen from this image, the posterior variance decreases in regions where many observations are present. This makes sense, considering we assume additive Gaussian noise: when multiple measurements are made in a small time range, we can more accurately estimate the target value for that time. Resampling the mean, i.e., maximum-likelihood prediction of the obtained distribution, we can generate arbitrarily many new measurements. Using a fixed upper bound on the variance at which to resample points allows us to quantify the quality of the obtained measurements.

An additional advantage of Gaussian processes is that we can incorporate additional information about the measurements in our kernel function k. For instance, we can amend the feature vectors to include the sensors’ x- and y-coordinates, and make use of the fact that nearby sensors should obtain similar signal strength measurements for the same device at nearby timestamps.

6 Experiments and Results

We are now ready to evaluate the performance of our localization algorithm and the various suggested improvements. Our two experimental setups, data sets, and methods of comparison to baseline approaches are described in Sect. 6.1. We first optimize the path loss exponent hyperparameter in Sect. 6.2. Based on these experiments, we evaluate the smoothing approaches and our proposed Gaussian process model in Sects. 6.3 and 6.4, respectively.

6.1 Experimental Setup

Our experiments were conducted in an \(84 \times 110\) m indoor retail environment. A total of 85 sensors were positioned throughout a single floor of the store at irregular locations, at around 3 m above ground level. The sensors, off-the-shelf WiFi access points, report integer dBm signal strengths. A multitude of obstacles were present, including furniture and walls.

The Gaussian process model generates new measurements by sampling from the modeled signal strength distributions for all sensors at regular intervals, discarding measurements with variance exceeding a certain threshold. We set this threshold such that it is just below the observation noise passed to the model. This way, we essentially require a significant contribution from multiple nearby measurements to generate a measurement at a specific timestamp: if only a single measurement is near the input timestamp, the estimated variance will be close to the observation noise, and thereby above our variance threshold. However, it is possible to adjust this threshold to balance measurement quality and quantity.

Table 1. Properties of fixed calibration and visitor path data sets.

Two data sets, listed in Table 1, were used. The fixed calibration data set was constructed by positioning a device at several fixed, known locations throughout the store, and emitting packages for a known amount of time. The path travelled was approximately 500 m long. A person carrying the device moved at roughly 1.4 \({\mathrm{ms^{-1}}}\), and traversed the path a total of 22 times. Close to 6,000 packages were received from this device during the evaluated time period. The positioning system’s accuracy and precision can be evaluated by comparing the estimated locations to the real locations. This corresponds with most well-known experimental setups from literature [12]. The second visitor path data set was constructed by moving a device along the same known path through the environment several times in a row. The path travelled by the device is unique and known, but the associated timestamps (where the device was at what time) are not. Thus, we cannot evaluate accuracy and precision in the same way as with fixed calibration data. Instead, we rely on the shortest distance to the path, i.e., the length of the shortest line segment from the estimated location to the known path, referred to as distance of closest approach, or DOCA.

As data sets used in indoor localization and implementations of indoor localization methods are generally not open-source, we compare our methods to a baseline, namely the lateration-based model applied to the raw co-occurrences of measurements. The performance of this baseline corresponds with empirical results from other studies using similar methods [3].

6.2 Results: Path Loss Exponent

We estimate the path loss exponent (see Sect. 4.2) using the fixed calibration data. The true distance between device and sensor is combined with the received signal strength in a linear regression model. We apply the approach to estimate the path loss exponent globally, using 65 000 measurements with 81 unique sensors. The regression yields a path loss exponent of approximately 2.48 with an \(R^2\) coefficient of 0.38. We validate this result by comparing predictor accuracy and precision using different path loss exponents. Figure 2a shows the mean of the distances to the calibration points, and the distance variance, for different path loss exponent values. Path loss exponent 2.0 (solid, black line) corresponds to the original localization model (which assumes free space), whereas the dashed black line corresponds to the path loss exponent calculated based on the linear regression model. The figure shows that the accuracy of the calculated exponent (2.48) is very close to that of the empirical optimum; the variance, however, is slightly higher. Precision is relatively constant for \(n \in [2.0, 2.5]\), and accuracy only marginally improves with an adjusted path loss exponent.

Fig. 2.
figure 2

Result diagrams for experiments in Sects. 6.2 and 6.4.

6.3 Results: Smoothing and Filtering

Our smoothing and filtering approaches, introduced in Sect. 4.3, attempt to improve localization accuracy and precision by averaging the estimated x- and y-coordinates over small time periods. All experiments were conducted using the path loss exponent estimated in Sect. 6.2. Based on empirical experiments with multiple hyperparameter combinations, hyperparameters of the smoothing and filtering algorithms were set:

  • Exponential Moving Average: a constant smoothing factor \(\alpha \) was used, with \(\alpha = 0.5\). Experiments were conducted with \(\alpha \in [0.1,0.9]\).

  • Gaussian smoothing: a Gaussian with standard deviation \(\sigma = {5000}\) ms was used. We experimented with \(\sigma \in {[1000,20000]}\).

  • Savitzky-Golay filtering: a third-degree polynomial was fitted to a window of 50 s centered around the data point to be smoothed. Experiments with polynomials of degree 2 and 4 demonstrated inferior performance.

Results are shown in Table 2, demonstrating how, on the fixed position calibration data, all smoothing methods vastly outperformed the baseline. The average distance between the mean estimated location and the true location was reduced by 37%. Gaussian smoothing outperformed both EMA and Savitzky-Golay filtering, but the differences in accuracy were minimal. All smoothing methods show a significant improvement in precision (variance was reduced by 75% for Gaussian smoothing), which is expected as they generally shift estimates towards the mean.

Table 2. Smoothing and filtering results on fixed and visitor path data set. Results are in meters.

For the visitor path data set, we note from Table 2 that the DOCA (see Sect. 6.1) forms a lower bound on the distance between the estimated location and the actual location. This results from the fact that each actual location is on the path, but it is unclear where on the path the device was located at a given timestamp. Especially for methods with a higher deviation from the actual location, this improves observed performance, as a significantly misestimated location can still have a small DOCA when it is close to another path segment.

In general, the visitor path test results are in conformity with the fixed calibration test results. Every smoothing and filtering approach substantially improves on the baseline accuracy, and Gaussian smoothing outperforms the other two smoothing approaches. A decrease of 32% in mean DOCA relative to the baseline method was attained, and variance was significantly reduced. To visualize the effect smoothing has on our original location estimates, we include a visualization of the location estimates of a single traversal of the path. The actual path, the originally estimated path, and the smoothed path (using Gaussian smoothing) are depicted in Fig. 3a. This visualization shows the noisy nature of the original estimates, and the extent to which smoothing ensures that the estimated path corresponds with the actual path followed.

Fig. 3.
figure 3

Result diagrams for experiments in Sect. 6.

6.4 Results: Gaussian Process Measurement Resampling

Lastly, we consider the Gaussian process measurement resampling model introduced in Sect. 5, operating on the raw measurements obtained by the sensors. Because it outputs location estimates based on newly generated measurements sampled from this model, both the number of location estimates and their timestamps differ between the Gaussian process model and the smoothing approaches. To still allow for a comparison between the results of the other approaches and the measurement resampling model, we choose the sampling interval (the time between potential measurements to be sampled) such that the number of resulting location estimates roughly corresponds to the number of location estimates for the raw measurements. The results of the Gaussian process model on the fixed and visitor path data sets are listed in comparison to the original model and the Gaussian smoothing model in Table 3. The number of location estimates is listed alongside the performance metrics.

Table 3. Gaussian process measurement resampling results on fixed and visitor path data set. Results are in meters.

The model is able to greatly improve the quality of location estimates when compared to the unfiltered estimates: on the fixed calibration data, accuracy improved from 3.44 m to 2.16 m, and precision improved from 6.01 m to 1.76 m. On the visitor path data, DOCA decreased from 2.08 m to 1.54 m, and the variance in DOCA decreased from 5.65 m to 1.50 m. As such, the observed performance of the Gaussian process measurements resampling model is generally similar to the performance measured using the top-performing smoothing method (Gaussian smoothing). The similarity in performance of these two different approaches is remarkable, as the smoothing model operates on the location estimates, whereas the Gaussian process model operates on the signal strength measurements. As can be expected, the Gaussian process model achieves less variance reduction than the Gaussian smoothing approach. This can be explained by the fact that the Gaussian smoothing approach operates on the location estimates, thereby directly impacting the precision performance criterion.

In general, our results show that the Gaussian process model is able to significantly improve localization accuracy and precision. However, its true advantage surfaces when considering the responsiveness performance criterion: the Gaussian process model allows for arbitrary resampling, meaning that we can generate arbitrarily many measurements. We investigate this property further by evaluating the effect the number of potential sampling points has on the accuracy and precision of the location estimates. To this end, we sample at different numbers of equally spaced intervals over a time period of approximately 45 min, during which the path was traversed 5 times. In Fig. 2b, the tradeoff between the number of resulting location estimates and accuracy and precision is depicted. The accuracy remains constant, and the precision converges as the number of samples increases, substantiating the claim that the number of location estimates can be increased arbitrarily, without significantly impacting performance.

A visualization of the path estimated by the GP model when using an exceedingly large number of location estimates is provided in Fig. 3b. Here, the baseline model from Fig. 3a is compared with a Gaussian process model where approximately 3 times as many points were sampled. The figure highlights the ability of the Gaussian process to provide location estimates at points in time where, previously, no location estimates were possible.

7 Conclusion and Future Work

In this paper, we have presented a novel method for continuously estimating device positions in indoor environments based on intermittent WiFi signals. Using a Gaussian process model for signal strength measurements at WiFi sensors, we realized continuous location estimation, while also significantly improving estimation accuracy and precision. Moreover, we have investigated several smoothing approaches for indoor positioning systems, which improve accuracy and precision to a similar degree, bypassing the computational costs of Gaussian processes. On our validation set of known, fixed device positions, our algorithms improved localization accuracy from 3.44 m to 2.17 m and precision from 6.01 m to 1.49 m. Performance on the visitor path data set of movements along a known path also significantly improved: the mean distance to the true path was reduced from 2.08 m to 1.42 m, and the distance variance was reduced from 5.65 m to 1.18 m. These results accomplish the goals set out in Sect. 1: an accurate, precise location estimator that is able to sample locations at arbitrary timestamps.

Further research opportunities and novel applications are manifold. The results pave the way for significant improvements in dwell-time analysis, visitor tracking, and other major application areas. In future work we aim to derive movement patterns of visitors through time. Such approaches could also be used to automatically infer layouts of indoor environments, identifying obstacles, paths, and open space based on the shape of the estimated movement distributions.