Practical and Parameterized Fingerprinting Through Maximal Filtering for Indoor Positioning

Fingerprinting techniques are known to perform better for radio-frequency-based indoor positioning compared to lateration-based techniques. However, accurate fingerprinting depends on a thorough prior scene analysis, in which the area should be described in terms of the signal parameters the positioning system deploys. This requires a heavy workload to build accurate systems, causing a tradeoff between accuracy and practicality. In this article, we propose a chain of subsequent preprocessing techniques for generating accurate radio frequency maps (RMs). The techniques consist of filtering the received signal strength indicator and interpolating the local probability distribution parameters. The proposed subsequent techniques generate smoother RMs and describe these maps with only two parameters per position. By plugging an adaptive particle filter as the position estimation algorithm, we show that the generated RMs increase the positioning accuracy significantly. We also investigate the relation between practicality and accuracy in terms of the invested time in the process of fingerprinting and the stored data to represent the RM. Alongside the increased accuracy of the proposed system, the approach allows a dramatic increase in the practicality of the fingerprinting technique.


Practical and Parameterized Fingerprinting
Through Maximal Filtering for Indoor Positioning

F. Serhan Daniş
Abstract-Fingerprinting techniques are known to perform better for radio-frequency-based indoor positioning compared to lateration-based techniques.However, accurate fingerprinting depends on a thorough prior scene analysis, in which the area should be described in terms of the signal parameters the positioning system deploys.This requires a heavy workload to build accurate systems, causing a tradeoff between accuracy and practicality.In this article, we propose a chain of subsequent preprocessing techniques for generating accurate radio frequency maps (RMs).The techniques consist of filtering the received signal strength indicator and interpolating the local probability distribution parameters.The proposed subsequent techniques generate smoother RMs and describe these maps with only two parameters per position.By plugging an adaptive particle filter as the position estimation algorithm, we show that the generated RMs increase the positioning accuracy significantly.We also investigate the relation between practicality and accuracy in terms of the invested time in the process of fingerprinting and the stored data to represent the RM.Alongside the increased accuracy of the proposed system, the approach allows a dramatic increase in the practicality of the fingerprinting technique.
Index Terms-Convex combination, fingerprinting, indoor positioning systems, parameterization, radio frequency map smoothing, real-time data processing.

I. INTRODUCTION
I NDOOR positioning is an active research domain that aims to localize target objects precisely in closed spaces.The target objects range from heavy-duty assets to commonly used household items or from animals to even people themselves.Such systems have application potentials in marketing for customer behavior identification [1], in industry or logistics for tracking assets or shipments [2], [3], in health care especially for the elderly care and patients that suffer from dementia [4] and health-related devices [5], and in agriculture for tracking animals and analyzing their behaviors [6].
Radio-frequency-based indoor positioning has been a challenge for about two decades now.Whereas highly accurate indoor positioning can be achieved using other modalities like vision, they also require dedicated hardware and high processing power [7].Indoor positioning systems not only deal with the accuracy problem, but also minimize the hardware investment costs due to their pervasiveness mission.The Bluetooth Low energy (BLE) technology is regarded to solve both of these problems, thanks to the low prices of the hardware, high mobility, high availability, and pervasiveness of the Bluetooth technology [4].Among the several signal parameters of the technology, the received signal strength indicator (RSSI) is promising for positioning purposes because of its relation to the travel distance of a specific signal [8].Furthermore, with the distances between multiple receivers or emitters in hand, lateration-based techniques can easily be adopted as a positioning system.On the contrary, raw RSSI readings are shown to display high variance even with fully stationary emitters and receivers [9].
There are basically three main techniques that rely on RSSI.The proximity technique is used to assess the closeness to a sensor or an emitter.In trilateration or multilateration, positions are estimated using signal-to-distance relations.This latter technique is fast and easily trained, but depends on signal-to-distance mapping models that are easily disrupted by the natural characteristics of electromagnetic signals like multipath [10].The fingerprinting-based techniques perform significantly better, but the required labor and time make them inherently disadvantageous [11].In fingerprinting, data should be captured for long durations to catch the most available variability in terms of signal parameters.Moreover, the area in question should be covered as densely as possible in order to approximate the true mapping as accurately [12].Though accurate, these requirements make fingerprinting an impractical approach compared to the signalto-distance-based approaches.
The relation between positions and signal parameters is contained into the radio frequency maps.We assume this relation as probabilistic and build estimates of the probabilistic radio frequency maps (PRMs).The complex characteristics of radio frequency signals have led to approximating the true PRMs through fingerprinting, in which associated signal parameters are recorded on several positions, called the reference positions (RPs) [13].
In order to be able to build a PRM estimate, information on RPs is usually interpolated for a grid of off-RP positions [14].Various interpolation methods are available to find a PRM estimate especially for indoor positioning systems (IPS).Daniş and Cemgil [9] use an optimal transport technique to find interpolations of histograms on arbitrary positions.With only one value on a position instead of a histogram, interpolation techniques are countless, such as dimensionality reduction and clustering methods [15], Gaussian process regression [16], or more advanced techniques like bidirectional encoder representations from transformers (BERT) [17].
The accuracy in fingerprinting is directly related to the scan resolution of the area.A PRM estimate can be characterized by histograms on every grid position, which will be called grid histograms.When built with raw signal parameters, a grid histogram describes the map highly locally, because the multimodality of signal propagation onto that position is unique.This lack of generalization of raw grid histograms leads to a massive amount of data collection and storage to accurately approximate the true PRM.However, the naturally changing conditions of signal propagation make this collected data at a time useless in the future.The collection procedure should be repeated frequently.
The labor dedicated to the fingerprinting procedure can be mitigated by reducing the RPs and the log duration at the RPs, both of which may be considered to have adverse effects on the performance of the positioning system.Subedi and Pyun [18] improve the traditional fingerprinting technique by combining it with weighted centroid localization.They show that the improvement reduces the number of required RPs, which increases the performance and the practicality of the classical fingerprinting approach.The increase in the practicality paves the way to the automatization.With reduced log durations, a robot can be employed to gather RP data faster than a human does.Kolakowski [19] focuses on radio map calibration solutions and introduces a GraphSLAM-based algorithm to train models for radio map calibration and achieves a median of trajectory error of 0.87 m for robot positioning in the case of neural network regression.Kawecki et al. [20] deal with the impracticality of fingerprinting by replacing the measured RSSI maps with the simulated maps using multiwall and ray tracing models.
Though the hardware is pervasive and cheap, the unreliable nature of wireless signals still raises questions.Even in fingerprinting, raw signal parameters are regarded as risky to be directly used, because the associated parameters are shown to vary not only with respect to space but also with respect to time [21].A preprocessing step to detect features of the signals that discriminate positions or distances is mandatory.In the literature, varying filters are applied on temporal RSSI data.Koledoye et al. [22] present an overview of common filtering techniques, where RSSI readings are processed to improve the accuracy of range computation.Their results show that the accuracy of range estimation is significantly improved with the help of prior filtering.Subhan et al. [23] use a gradient filter to minimize the effects of communication holes and are able to predict the RSSI values in the case of connection losses in a positioning system.A regular Kalman filter can obtain smoother series when applied on the RSSI data [24], and the smoothed data correct a simultaneous localization and configuration setting based on FastSlam.In the work of Su et al. [25], RSSI values are transferred into the frequency domain using the Fourier transform, after which features can be modeled using a few physical parameters.Similar filtering techniques are used to smooth or extract features from the RSSI data, such as Savitzky-Golay smoothing filter [26], variations of moving average filter [27], [28], the belief condensation filter [29], and the median filter [30].
In this work, we aim to enhance both the accuracy and the practicality of a fingerprint-based IPS.A mobile emitter is navigated in an area decorated with several BLE sensors.The position of the emitter is regarded as the latent variable in a hidden Markov model (HMM), in which the RSSI data generated at the sensors are the measurements.The transition density of the model is assumed to be a naïve diffusion model because of the lack of information on how the emitter moves.The emission density is designed to use the PRM estimate to measure the likelihood of an RSSI on a map position.Because an analytical relation between the RSSI data and the position is not easily buildable, we adopt sequential Monte Carlo techniques and plug in the adaptive particle filter (APF), which was proposed in a previous study [31].
In a more recent work [32], we show that the application of the maximal filter technique directly on the raw RSSI data boosts the localization accuracy.The maximal filter produces low-variance histograms, which are called maximalized histograms.We interpret that the PRM estimates with the maximalized histograms generalize better and generate smoother maps.In this work, we further investigate the obtained PRM approximations and reduce the positioning error dramatically by further converting the histograms into Gaussian distributions so that the PRM estimates are implemented with only two parameters instead of histograms with several bins per position.By using smoothed and parameterized distributions, not only the accuracy is boosted, but also the tracking models are extremely simplified.
This work introduces a PRM estimation heuristic as its major contribution.The system comprises three parts: a signal processing step called the maximal filter, a reparameterization procedure to smooth the histograms, and a convex combination technique to estimate a PRM.We apply the maximal filter on the streaming RSSI data.The technique can be applied both in the offline PRM estimation procedure and in real-time position estimation.The maximal filter opens a way for the successive steps, as the maximalized RSSI histograms have exceptionally low variances.In the second step, we replace these histograms with the parameters of their Gaussian distribution approximations.Having only two parameters, various interpolation techniques become possible.In the third step, we interpolate these distribution parameters at fine resolutions using a softmax-based convex combination.We achieve smoother PRM estimates to be used as the emission density of the HMM.Along with the whole PRM estimation system, the reparameterization and combination steps serve as the contributions of this work.
We investigate the performance of the proposed technique by tuning several system parameters, such as the window size of the maximal filter, the variance of the fitted Gaussian distribution, and the number of neighboring RPs for the convex combination.We achieve submeter medians and means of positioning errors locally (i.e., 0.8 and 1.0 m, respectively).We further investigate the number of RPs and the fingerprinting durations on the RPs to enhance the practicality of the fingerprinting approach.The results show that the addition of the maximal filter and redefining PRM with Gaussian parameters not only produce smooth PRMs and boost the accuracy but also increase the practicality by reducing the dedicated time dramatically to build accurate PRMs, (i.e., 6-15 s per RP).We test our technique using a dataset in which the true trajectories are labeled with the ground truth positions.This setup enables us to evaluate our algorithms exactly and realistically.The experimental results show that by introducing the maximal filter and the subsequent PRM estimation technique, we achieve a general performance boost of about 40%, from 1.795 to 1.054 m.
The rest of this article is organized as follows.In Section II, the PRM estimation methodology is described.In Section III, we briefly introduce the benchmark dataset and the parameter space of the experiments.The system performance is evaluated from several perspectives through massive experimental results in Section IV.Finally, Section V concludes this article with insights gained from this research and the probable future directions.

II. METHODOLOGY
We introduce a methodology for generating high-resolution and accurate PRM estimates, which are used in the succeeding positioning and tracking algorithm.The PRM generation procedure is designed to run offline.It takes the RSSI data streams collected on some RPs as input and constructs PRM estimates through a series of RSSI filtering, histogram parameterization, and interpolation approaches.The constructed PRM estimates are fed to a live positioning and tracking algorithm, for which we plug the APF.To make the tracking algorithm compatible with the current work, the input RSSI streams are also exposed to the same RSSI filtering operation.This section focuses on the parameterized PRM estimation procedure.We also include a brief summary of the live position estimation algorithm to satisfy the integrity of the whole process.

A. Parameterizing Fingerprints
We build the PRM estimates using fingerprinting, that is, taking the snapshot of the map in terms of RSSI values on RPs.We assume to have access to time-stamped RSSI values captured by multiple BLE sensors.These streaming RSSI values are compiled into histograms for each RP for each sensor, which are called raw histograms.As it is impractical to collect data on a dense grid of map positions, the data are collected on a relatively small but evenly distributed set of RPs.We interpolate (or extrapolate) these histograms on a dense grid of positions in order to construct a PRM estimate of the target area.The resulting high-resolution PRM can then be used to relate the RSSI values to the positions.
We believe that the raw histograms describe the map too locally because they also include the RSSI data resulting from location-specific signal reflections and interferences.Moreover, their interpolations are not expected to generalize to identify the RSSI-to-position mappings on the whole area.Thus, the resulting PRMs are not expected to be accurate.
The proposed system replaces the grid histograms with their Gaussian approximations to build parameterized PRMs.A summary of the proposed parameterization procedure is shown in Fig. 1.
1) The stream of RSSI values of RPs is exposed to signal filtering techniques, in the particular case, to the maximal filter to obtain low-variance (maximalized) histograms.2) In the parameterization step, by fitting the sample distribution parameters (the mean and the standard deviation), these low-variance histograms are replaced with the corresponding Gaussian distributions.3) We finally apply a softmax-based convex combination on the redefined distributions of the RP sets to estimate the Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.distributions on a dense grid of the area, which is called a PRM estimate.In the online phase of the experiments, the maximal filter is employed with the same window size to process the sequential trajectory RSSI streams into low-variance histograms.The maximalized streams are fed to the APF as observations.While a diffusion-based transition model is used for the transition density, the PRM estimate obtained using the compatible parameters in the offline phase is employed as the emission density of the particle filter.
1) Maximal Filter: In an RSSI stream related to a sensoremitter pair, we observe that a high RSSI value is followed by lower values in time (see the gray + in Fig. 2).When the raw stream is represented by a histogram, the histogram displays multiple modes (see the gray histogram in Fig. 2).We hypothesize that these multiple modes are due to the repetitive patterns in the streaming data.Most of these repetitive patterns can be explained by the reflection phenomenon that is characteristic to the electromagnetic signals, where the mode with the highest RSSI data represents the transmissions with line-of-sight or wide-angled reflection.The other lower modes of the histogram are due to the dominant reflections from the surrounding objects.
To control this repetitive behavior, we apply a lagged maximal filter on the streaming RSSI data (see the black × in Fig. 2), where the current value is replaced by the highest value in a time window.We observe that the modes at the lower RSSI values are reduced considerably (see the black histogram in Fig. 2).The positioning performance that uses the maximal filter is shown to perform better with respect to the median and the mean counterparts.Moreover, the maximal filter improves the positioning performance with respect to a system that uses raw fingerprints [32].
Lagging is formalized with the window size, l, in seconds.We define a sliding window of RSSI values of size l seconds.Each RSSI reading at time tis related to a window ending at that time, w l t .Lag windows contain variable-sized RSSI readings in the last l seconds, including the current reading.The maximal filter is defined as follows: where w l t = {r u } with τ t − l < τ u < τ t .τ t − l and τ t point the time stamps at the beginning and the end of the sliding time window, w l t , respectively.The current RSSI value, r t , is replaced by the maximum of the RSSI values in the window of previous l seconds.
By sliding the time window of size l over the whole RSSI stream, we disrupt the original data stream and obviously lose information, but the low-variance maximalized histograms identify the positions better.An example to the maximalized histogram is shown in Fig. 2. We may also lose accuracy due to lagging.As the window size is increased, the current RSSI value is also delayed as much.Filtering with large windows is prone to positioning errors due to lagging measurement data.The window size, l, is a parameter to be optimized, and the effect of different window sizes is investigated in the experiments.
2) Histogram Parameterization: The low variances and the single modes of the maximalized histograms make them appropriate to be reformulated with 1-D Gaussian distributions parameterized with the sample means and standard deviations, instead of histogram bins.Moreover, we hypothesize that the maximalized histograms do not still accurately approximate the true PRM: the resulting histogram may not generalize to the neighboring positions other than the RP.We further develop the system by parameterizing the fingerprint histograms with the parameters of Gaussian distributions over RSSI values.For the mean of new distributions, we use the sample mode of the maximalized histogram.For the standard deviation of the Gaussian distribution, we first use the sample standard deviation of the maximalized histogram, but we further generalize the model by determining a common standard deviation for all the histograms, which is to be further optimized by measuring the positioning performance.
An example of the parameterization is shown in Fig. 2: the black histogram is constructed by applying maximal filtering on the RSSI data.We visualize that the processed histograms display a single-mode behavior compared to the multimodal nature of the original histograms in gray.
We denote the sample mean of the maximalized histogram on a specific map position, x, with μ x and the common standard deviation with σ.The emission density on a specific position is then modeled with a Gaussian distribution, as formalized in (2).Note that the support of the distribution is the set of RSSI space, not the map surface, and the computations should be performed for each sensor (2) 3) Convex Combination: With the Gaussian distribution parameters on the RPs in hand, {F i } i∈ [1..M ] , we estimate the parameters for the unknown intermediate positions using convex combination.To augment the similarity to the closer positions, we use a softmax-based convex combination as follows: where the combination weights, ω i , are first computed using the softmax function that takes as input the Euclidean distances to the closest M RPs, d i .The mean and the standard deviation on the arbitrary point, (μ x , σ), is a convex combination of the parameters of its neighboring positions weighted with the softmax function on the distances.In our approach, we use several sets of neighboring RPs to estimate the distribution parameters on a position (see Fig. 3).A sample area of influence for an arbitrary position is also represented in Fig. 3(b).By computing the parameters on each position, the PRM estimate is now represented by a grid of means instead of RSSI histograms.Sample heatmaps of the means at a resolution of 0.2 m are given in Fig. 4. We observe that the heatmaps get smoother by increasing the number of neighboring RPs.
Interpolating means and setting standard deviations on each map position leads us to a new representation of the PRM estimate by Gaussian distributions, instead of discrete histograms.The likelihood of an RSSI reading on a map position can now be measured quickly.By tuning the aforementioned parameters, i.e., the windows size of the maximal filter, l, the common standard deviation, σ, and the number of neighboring RPs, M , different PRM estimates are obtained.We investigate the effects of these parameters on the positioning performance through the PRM estimates constructed using their specific values.

B. Tracking Model and Live Position Estimation
We track the position of a mobile BLE emitter using a three-level HMM.The model is constructed primarily upon two latent Markovian chains.We assume to have access only to sequential BLE RSSI readings from multiple sensors as observations, y t = (r t , s t ), with r t and s t being the RSSI readings and the sensor indexes respectively, and as latent variables we want to estimate the positions that the tracked object resides at the corresponding time stamp, x t .The model assumes that the tracked object can move in any direction, so the transition density of the positions that models unknown dynamics of the tracked object forms a diffusion of probabilities and is implemented with a Gaussian distribution, p(x t |x t−1 ) = N (x t ; x t−1 , k t I).The covariance of this motion model is controlled by the diffusion factor, k t .The diffusion factor is also modeled as sequential and variable and forms another latent chain.The transition density for the diffusion factor is implemented with a gamma distribution, p(k t |k t−1 ) = G(f (k t−1 , ν)), where the distribution specific parameters, α t and β t , are tuned as a function of the previous diffusion factor k t−1 and a sensitivity value ν.We call this model as the adaptive diffusion model [31].For the constant counterpart of the diffusion factor, we call the model as the static diffusion model [9].Choosing a variable diffusion factor results in better positioning performances, as it is expected to adapt itself to the dynamic conditions, which is preferable for real-time purposes.
Finally, the highest layer that links the RSSI measurements to the positions or the emission density p(y t |x t ) is estimated through a fingerprinting technique.The full generative model of the tracking model is as follows: Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
The three-layer diffusion-based tracking model described above can be solved using sampling-based inference strategies.Because it is hard to make an analytical definition of the emission density from the position space to the RSSI space, we comply with the Monte Carlo sampling methods.We employ the APF in which the diffusion factor is also sampled along with the positions.
In the APF, we adopt the uniform density to spread a number of initial position particles that approximate the distribution of the latent position of the tracked object.The diffusion factor is also sampled, and its distribution is represented with the diffusion particles.At the importance sampling stage, a new set of diffusion particles is estimated with respect to a gamma distribution whose parameters are constructed upon the set of highly weighted diffusion particles at the previous iteration.Associating each position particle to a diffusion particle, a set of position particles is also estimated.When a new RSSI measurement is received, the estimations are evaluated against a high-resolution PRM estimate that stands for the emission density.When the position particles are evaluated against the emission density, the position weights are accumulated to the associated diffusion particles to form diffusion weights.The evaluation step yields an importance weight for each position estimation and diffusion estimation that are used in the indispensable resampling step where the particles are repopulated to avoid the degeneracy problem of the particle filter algorithm.For the resampling method, systematic resampling is preferred as it is shown to be steadily faster than multinomial resampling.
For details of the tracking model with APF, the readers should refer to our previous work [31].

A. Dataset
We use a position-annotated BLE RSSI dataset to evaluate the proposed PRM generation strategies.The data are collected in a closed office area of size about 364 m 2 , using 12 BLE sensors stationed in the area.An especially designed setup of a BLE beacon and cameras is navigated to collect live BLE RSSI data emitted by the beacon.Each BLE RSSI data point is annotated with the highly precise ground truth positions.The ground truth positions are obtained by a visual position annotation system through the cameras [7].The data are compiled into a dataset of several trajectories and RP recordings in the same area.
From the dataset, we use four of these trajectories: a zigzag (E 1 ), a rectangular (E 2 ), and two straight trajectories (E 3 and E 4 ), which are formed with the RSSI data captured by the sensors and the high-precision position data captured by the visual position annotation system while navigating at a speed of about 0.4 m/s that simulates the human walk in the area.These trajectories and their labels are given in Fig. 5.
We process the RSSI data streams captured by the sensors on 81 evenly distributed stationary RPs, namely, fingerprints.The original streams in the dataset are collected for a duration of 30 min each.
The configuration space is reduced to the given parameter sets considering the preliminary experiments and insights gained from the data collection stage and the previous work.The previous work on maximal filtering shows that the window sizes l ≤ 0.5 are indiscriminative because 0.5 corresponds to the BLE packet emission frequency [32].We also discard the space of l > 5.0, where the accuracy falls due to high lagging.
After preliminary experiments with the mean, median, and mode of the maximalized histograms, we observe that the mode is insignificantly the best performing option to replace the mean of the Gaussian distribution, μ.Moreover, we also observe empirically that choosing a common standard deviation for the Gaussian distributions, σ, leads to better positioning accuracies Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.[32] compared to the sample standard deviations after applying the maximal filter.While searching for a common standard deviation for all the experiments, the grids of standard deviations are selected to vary from 0.5 to 5.0 with steps of 0.5.

TABLE I BEST PERFORMANCES (IN METERS) OF THE TWO PARTICLE FILTER MODELS AFTER THE MAXIMAL FILTER
With the insight of the fact that the raw histograms describe the true PRM only locally, we aim to attain smoothed and generalized grid histograms that are used to construct the final PRM estimate.First we use that for each position, the convex combination requires at least four surrounding RPs.The number is further increased to 8, 12, 16, and 20 to obtain smoother PRM estimates.
Finally, for the diffusion factors k and the sensitivity values ν, we limit the search space with a close neighborhood of the best values.Because these parameters indirectly tune the covariance of the transition density of the model, we pick and report them in the logarithmic scale.
In accordance with the system overview (see Fig. 1), each experiment consists of three preparation steps: 1) applying the maximal filter on the raw RSSI streams with a preset window size, l; 2) obtaining the mode of the maximalized histogram, μ x , and setting a common standard deviation, σ; and 3) exposing the distribution parameters to the convex combination with a predefined number of neighbors, M , to generate a high-resolution parameterized PRM estimate with a grid cell size of 0.2 m.
Each individual experiment is run using the real-world BLE RSSI data related to a trajectory from the aforementioned dataset.These RSSI data are also processed on the fly by the maximal filter with the same window size as of the PRM generation and then fed into the particle filter as observations.For the diffusion-based transition density, a sensitivity value ν is defined, and for the emission density, the estimated PRM is employed.Each step of the particle filter yields the weighted mean of the position particles as an estimate for the current position of the tracked object.The accuracy of each position estimate is measured with the Euclidean distance to its ground truth counterpart.We determine the performance of a configuration by summarizing all of these measured accuracies in all the related experiments into a distribution of errors.While reporting the results, we focus on the median and mean of these error distributions.
The experiments are performed on a high-performance computer with two processors of type Intel Xeon CPU E5-2697 A v4 2.60 GHz.The computer can use 64 threaded cores simultaneously.The particle filters to track the positions through trajectories are implemented with Python3.9, and the batches of experiments are coordinated via Bash scripting (codes available online 1 ).With the availability of multiple cores on the computer, the experiments are run in batches of 50 parallel processes for each parameter configuration.

IV. RESULTS
We report the results in two parts.The first part aims to highlight the best parameter configuration and the corresponding best accuracy that can be achieved with the aforementioned methodology.The second part addresses the practicality issue of the fingerprinting technique in the light of the achieved results in the first part.As the best results may be due to the individual experimental state, we also discuss how these results may be regarded from the generalization perspective.

A. Parameter Search for Accuracy
We first bring the best results from the previous work [32], summarized by Table I, in which the PRM estimates are constructed directly from the maximalized histograms through the affine Wasserstein combination technique [9].Each line corresponds to a new experiment with different trajectories, and the last line with the label "All" is a special experiment that uses all the four experiments as a single experiment.We report the medians and the means of these results, according to which the static diffusion model interestingly achieves significantly better accuracies as shown with statistics in bold font face for each experiment.We hypothesize that these PRM estimates can be further ameliorated as the APF is expected to be more accurate.We present these results as a baseline for the upcoming results.
Building on this hypothesis, we first report the best accuracies related to the configurations of the four parameters: the window size (l) of the maximal filter, standard deviation (σ) of the parameterization, number of neighboring RPs (M ), and sensitivity value (ν) or static diffusion factor (k) of the particle filters.A serious number of experiments are performed in order to find the parameter configurations that yield the best accuracy.The reported results in Table II are given in terms of the minimal median and mean errors for each individual experiment.The experiment labeled "All" again uses an aggregation of all the trajectories as a single experiment in order to remove the trajectory-specific biases.
The table also introduces a comparison of the adaptive diffusion model, where the diffusion factor is also sampled with respect to a sensitivity value ν, and the static diffusion model, in which the diffusion factor k is set to a constant value for the tracking experiment.In these experiments, the particle sizes are set to D = 50, P = 19, and N = 1000 for adaptive and static diffusion models.

TABLE II BEST PERFORMANCES (IN METERS) OF THE STATIC AND ADAPTIVE DIFFUSION MODELS ON THE EXPERIMENTAL TRAJECTORIES
The statistics in bold show the best means and the medians of the separate experiments in each line.We see from these results that the adaptive diffusion model outperforms the static diffusion model significantly by a median margin of about 0.5 m.The margin is higher for the means, which can be interpreted as that the adaptive diffusion model achieves lower error rates with lower deviations than the static model.We visualize that submeter accuracies can be obtained for certain experiments (E 1 and E 4 ) with certain parameter combinations; however, the aggregated measurement of all of the experiments yields an error distribution with a median of 1.054 m and a mean of 1.442 m.
Seeing the obvious domination of the adaptive diffusion strategy, the experimentation of the static diffusion strategy is discontinued.Using the adaptive model, we further investigate the effect of the parameters.We focus on the number of RPs used in the convex combination, M .As we have shown that more RPs generate smoother PRM estimates, we expect to increase the accuracy with larger sets of neighboring RPs.We set the number of neighbors to M = {4, 8, 12, 16, 20} and show both the best achieved medians and means for individual experimental tracks alongside with their aggregated error measurements in Fig. 6.Whereas the trend of the accuracies varies with respect to different experiments, the aggregated errors show that employing more RPs in our model does not reduce the error significantly.However, it is preferable to use 8 or 12 neighboring RPs in the current setup, which corresponds coarsely to using the RPs for a position with a neighborhood radius of 3.9 and 4.6 m.
The results display fluctuations in the best parameters, due to the characteristics of the trajectories.For a more generalized  view of the parameters, we record the number of the window size (l) and the distribution deviation (σ) that vote for the best five performances.These rankings are given in Tables III and IV.According to these findings, the most accurate estimations suggest window sizes of w ∈ {1.5, 3.0} and deviations of σ ∈ {3.0, 3.5}.This is interpreted that the algorithm prefers first to filter the RSSI data sufficiently enough not to lose accuracy due to lagging (l = 1.5), and second, it filters violently for better smoothing with a time gap tradeoff (l = 3.0).Conversely to the two peaks of window sizes, the best standard deviation tends to converge to a single peak around σ = 3.0.
The lack of a consensus on a single window size parameter leads us to investigate the heatmaps of the errors with respect to these two parameters at different slices of sensitivities and number of RPs.Heatmaps of ordered slices can be seen in Fig. 7. Condensed dark regions that represent low error rates can be seen in heatmaps in the middle section that correspond to the sensitivity values between 0.00005 and 0.005.Above this interval of sensitivities, we have smoother heatmaps that do not have deep trenches as much.Below this interval, a line of low points is prominent at σ = 2.0.Moreover, this line is characteristic to all of the heatmaps.Below this line, we see mountainous high errors, which can be interpreted as that for standard deviations, the filtering algorithm cannot act flexibly enough to track the object.For the window sizes, lower window sizes seems favorable, as the errors rise up very slowly as the window size is increased.And finally varying the number of neighboring RPs does not have a significant effect in the best accuracies; however, the higher number of RPs produces both smoother maps and smoother error distributions.Even though the number of experiments is very high, at the order of 100 000 per trajectory, the resolution of the parameter space can still be further increased.Nevertheless, at this resolution, we see that the results focus on a best parameter configuration: r l = 1.5; r μ = "mode"; r σ = 3.5; r M = 8; r ν = 2.0 × 10 −4 .
We finally present the actual estimations of the selected experiments that achieve high performances in Fig. 8.We visualize typical divergences from the ground truth trajectories.The error distributions behave accordingly: the medians are measured to be lower nearly all of the time compared to the means.This is related to the fact that the error distributions are right skewed and the upper bound of the errors is only limited by the map size.However, the errors are deduced to be distributed extraordinarily well as the medians and the means are very close.An exception to this order arises in the experiments of the track E 4 , where there exists a gap of one meter, even in a highly accurate trajectory estimation [see Fig. 8(d)].This inaccuracy is explained by the systematic erroneous estimations related to the initialization part of the experiments.

B. Practicality Enhancement
Scanning the area at a high resolution, that is with 81 points for 30 min per RP, is itself impractical.Because we aim to increase both the accuracy and the practicality of BLE-RSSI-based positioning, with the help of the maximal filter, we present that shorter durations of RSSI data recordings generalize as robustly as the longer durations.To assess the accuracy of shorter period fingerprinting, the original RP streams are cropped down to different intervals from 30 min down to 3 s.Moreover, using the parameter configuration near the best configuration obtained in the previous section, we repeat the experiments with shorter data capture durations on RPs and less RPs compared to the original set.We investigate the effects of shortened data durations, d F ∈ {1800, 900, 300, 120, 60, 30, 15, 6, 3}, in seconds.
Similar to the data capture durations, the number of RPs used for fingerprinting is directly related to the practicality of the system.Scanning the area on a smaller number of RPs is more favorable in terms of dedicated labor for the scene analysis.The effect of the number of RPs is investigated by downsizing the RPs while still respecting the area coverage, with N F ∈ {81, 41, 25, 13}.The positions of different sets of RPs can be seen in Fig. 9.
In Fig. 10, we visualize the effects of using different data capture durations per RP and different numbers of RPs.Scanning the area with a high number of RPs is obviously the best option with respect to the errors, as the aggregated error medians fall down to 1 m (1.05 m with N F = 81 and d F = 300).With less RPs, the error rates gradually increase; however, we still keep the error rates at 2.012 m with 13 RPs.This is an expected tradeoff.
An unexpected advantage emerges with the reduced durations of data.At a high number of RPs, from 30 min to 15 s, the error medians do not significantly increase, but taking snapshots of RSSI data with 15 s, each decreases the labor of fingerprinting dramatically.For smaller numbers of RPs, the results get more interesting: with data durations of 6 s with 25 or 13 evenly distributed RPs, we attain unexpectedly high accuracies, 1.487 and 2.012 m, respectively.We interpret these unexpected accuracies with the fact that the PRM estimates generated with short durations approximate the true PRM better and, thus, fit better to the live data used in the experiments.We measure the practicality of the proposed approaches by the time invested in fingerprinting and the required storage space for the PRM estimates.The complexity of IPS itself is not taken into consideration because the positioning algorithm is designed to run in real time, and it does not vary with respect to the aforementioned parameter selections.Here, we focus on the PRM preparation or calibration procedures.The complexity of the PRM preparation process can be regarded as a product of the number of RPs (N F ), the data collection duration per RP (d F ), the window size of the maximal filter (l), and the number of neighbors in the convex combination (M ): The time response of the PRM estimation procedure including I/O operations is around 1 min with the highest complexity discussed in this work.However, the main gain from this work is the reduction of required time of data collection, by decreasing the number of RPs or the data collection duration with no or little change in positioning accuracy.In data collection, we assume that we have a 2-min measurement and calibration overhead due to the replacement of the emitter on each RP.We add this duration on the PRM estimation duration, which basically becomes negligible.In Table V, we measure the practicality of the system by comparing different options with the legacy option.The first and the second lines show how dense we select the RPs and for how long we collect data on each RP.In the original dataset, RSSI data duration of 30 min (1800 s) at 81 RPs take approximately 43 h (legacy).By reducing the duration on each RP down to 15 s (option #1), the same task can be completed in only 3 h, which may also be considered a long time for fingerprinting.Moreover, we also show that the approach decreases the errors by 50% to a median of 1.069 m.
The same approach also reduces the required memory space for storing a PRM under 1 MB.By considering the cell RSSI value as 8 bytes for a floating number, this makes 8 bytes × 9451 positions × 12 sensors = 0.865 MB for the PRM size.Even better compressions are possible: We can round the RSSI value of each cell to the closest integer, the space of which can be represented by 1 byte, making in total 0.1 MB for the PRM size.Moreover, considering the extremities for the RSSI value as −100 and −50, we can reduce it to 6 bits, which makes 0.08 MB for the PRM size.Once processed and prepared, this size enables the PRM to be highly portable and be stored in any modern device, after which it will be used as a lookup table in the positioning process.
We also discuss the options with lower numbers of RPs with other options.The fingerprinting duration can easily be reduced below 1 h with a 0.5-m accuracy loss (option #2), or under 30 min with 1-m accuracy loss (option #3).All of the proposed options perform better than the legacy approach with respect to the invested time, storage for PRM estimates, and the accuracy.
Finally, we compare our results with the results of studies that work in similar experimental conditions.In the work of Blochand Pastell [6], they achieve an average error rate of 3.3 m in an open barn environment of size 420 m 2 using ten BLE anchors.In another work with a similar setup, Gonçalves et al. [33] localize the sheep with an average error rate of 2.48 m.Zuo et al. [34] design a larger setup with more anchors, which again corresponds to similar conditions when scaled down.They reach to median and mean rates of 1.42 and 1.45 m, respectively.Our system outperforms these systems with aggregated mean errors around 1.4 m with individual experimental means at 1 m and aggregated median errors around 1.054 with individual experimental medians at 0.816 m.

V. CONCLUSION
Radio-frequency-based indoor positioning and tracking depends strongly on a relation between the signal parameters and the positions.In this work, this relation is built into a PRM, by which the algorithm can assess the likelihood of a certain RSSI value on a certain position.
This work focuses on the emission density of an HMM through the PRM estimations and lacks accurate transition densities or motion models.We believe that differentiable particle filters can be trained to learn the dynamics of the moving object and decrease the positioning errors further.
Another open issue that is not covered in this work is the performance of the proposed IPS in the densely populated areas.Even though we believe that the maximal filtering step will remove the interference and absorption effects due to humans, further experimentation is required.
Nevertheless, the construction of the PRM estimates is not trivial, because RSSI measurements are naturally noisy, which result in high positioning errors with raw signals with accompanying high variance.We first show that this noise can be intuitively removed by the maximal filter.The resulting positional RSSI histograms have remarkably low variance, which leads to reformulating them into more simplified Gaussian distributions that can be parameterized with one or two variables.With simpler positional distributions, we then obtain PRM estimates better suited for the position evaluation tasks.The results show that the positioning performance can be reduced to 0.8 m for specific experimental trajectories.
The sequence of the maximal filter and the fingerprint parameterization helps us gain another advantage: the dramatically short durations of data collection periods are as sufficient as the longer durations of the same procedure.Considering this practicality enhancement, we also show how the positioning performance is affected with respect to the number of reference points.
For the scalability of the work, like extending in 2-D by adding new rooms, the complexity of the PRM preparation is not expected to increase; however, the processing times will increase with additional sensors for better coverage.For multifloor areas, the signals from multiple levels will be surely captured and will be misleading.However, we believe that by the use of maxfilter, the levels of the signals will be highly discriminative, and a similar accuracy will be attained.
With the insights gained in this work, we infer immediately that it is possible to achieve a more practical fingerprinting procedure, in which the positions are to be finely estimated by a previously proposed vision based positioning system, and the RSSI data are captured by walking or navigating a robot in the target area.Moreover, this future system can be fully automatized without the need of human intervention.
Another automatization is possible with a more intelligent PRM search procedure with making PRM estimates, running the IPS algorithm with those estimates, and linking the feedback for searching for parameters of better PRM estimates.The whole series will take very long as it runs the IPS system within, but this approach will pave the way to supervised machine learning algorithms.

Fig. 2 .
Fig. 2. RSSI readings are exposed to a maximal filter to discard possibly misleading values in time windows.The current value (+) is replaced by the maximum value (×) in a time window the filter offers.The corresponding histograms after the filtering operations can be seen for a window size of 2.0 s.

Fig. 3 .
Fig. 3. (a) Convex combination on an arbitrary position, x, shown with a red dot.The gray dots point the RP of the fingerprints.(b) Sample map representation of the area of influence for a sample position for different numbers of neighboring RPs: 4, 8, 12, 16, and 20.

Fig. 4 .
Fig. 4. Heatmaps of positionwise means of the Gaussian distribution of RSSI values: the heatmaps are generated by the convex combination by setting the number of neighbors to 4, 12, and 20 from left to right.These maps belong to the specific sensor pointed with .

Fig. 6 .
Fig. 6.Best error measurements with respect to the number of neighboring RPs for each experimental trajectory and the aggregated trajectory.

Fig. 7 .
Fig. 7. Heatmaps of the error medians for varying sensitivities, number of neighbors, window sizes, and standard deviations.

Fig. 10 .
Fig. 10.Median errors of the aggregated tracks achieved after reducing the data capture durations and the number of RPs.

TABLE III RANKS
WITH RESPECT TO THE WINDOW SIZES OF THE MAXIMAL FILTER

TABLE IV RANKS
WITH RESPECT TO THE DEVIATION OF THE FITTED DISTRIBUTION AFTER THE MAXIMAL FILTER

TABLE V COMPARING
THE PRACTICALITY MEASUREMENTS OF DIFFERENT APPROACHES