Reference Device-Assisted Adaptive Location Fingerprinting

Location fingerprinting suffers in dynamic environments and needs recalibration from time to time to maintain system performance. This paper proposes an adaptive approach for location fingerprinting. Based on real-time received signal strength indicator (RSSI) samples measured by a group of reference devices, the approach applies a modified Universal Kriging (UK) interpolant to estimate adaptive temporal and environmental radio maps. The modified UK can take the spatial distribution characteristics of RSSI into account. In addition, the issue of device heterogeneity caused by multiple reference devices is further addressed. To compensate the measuring differences of heterogeneous reference devices, differential RSSI metric is employed. Extensive experiments were conducted in an indoor field and the results demonstrate that the proposed approach not only adapts to dynamic environments and the situation of changing APs’ positions, but it is also robust toward measuring differences of heterogeneous reference devices.


Introduction
The explosive growing of location-based services (LBS) has brought high demands for location information, and fostered research interest in positioning technology. Besides Global Navigation Satellite Systems (GNSS), indoor positioning technology has gained much attention. Existing wireless infrastructures such as WiFi access points (AP), that are designed for ubiquitous network access and communication, show great potential for providing wireless positioning and augmenting GNSS indoors.
Received signal strength indicator (RSSI)-based location fingerprinting approaches are often adopted in indoor wireless positioning systems. Although the construction of radio maps involves great labor costs, location fingerprinting can provide more accurate estimations compared to other techniques, such as Cell-ID and trilateration, especially in dynamic environments. Location fingerprinting involves two steps: radio map construction and location estimation. The radio map is a combination of signal strength profiles of the APs that cover the target area. It is always approximated by discrete location fingerprints collected at predefined calibration points. Based on the constructed radio map, online RSSI measurements are matched to find the most similar location fingerprints which are further used for location estimation [1]. For practical use, constructing a radio map is a burdensome task. Even worse, the radio map needs continuous updating to accommodate the changing environments. Environmental dynamics, such as people moving, and doors opening and closing can cause rapid RSSI fluctuations. Moreover, the movement of APs or furniture will change the RSSI profiles. All the mentioned factors can lead to an outdated radio map which deteriorates the location fingerprinting performance and therefore repeated site surveys or calibrations are needed ‚ The issue of reference device heterogeneity in adaptive approaches is addressed for the first time. A differential RSSI metric is verified to be appropriate to alleviate the impacts caused by heterogeneous reference devices.
The rest of this paper is organized as follows: Section 2 presents related work on adaptive approaches for radio map construction and methods for handling device heterogeneity, whereas Section 3 introduces the proposed adaptive location fingerprinting method. Experiments and results are shown in Section 4. Section 5 draws the conclusions.

Adaptive Approaches for Radio Map Construction
Dynamic environments have been widely considered in research on wireless positioning. To obtain robust estimates of RSSI, mean or median sample values are applied. However, these estimates that rely on samples from a short time period cannot represent exactly the long term characteristics of RSSI measurements, not to mention the fact that RSS samples may have complex distributions during different time periods. For example, RSS values at a sampling point sometimes approximate a Gaussian distribution [11]. However, the distributions are always skewed [12], and sometimes with a long tail [13]. Besides, two peak distribution [14] and multimodal distribution [12] are also found. To overcome the limitations of samples over specific time periods, and to reduce the heavy data collection burden, crowd-sourcing-based methods [15,16] or reference device-based methods [2][3][4][5][6][7][8][9] provide alternatives. Our work focuses on the reference device-based manner. On the one hand, RSSI measurements can be mapped to geographical distances [2], and trilateration is then applied to estimate locations. On the other hand, RSSI measurements can be used to estimate the signal strength profiles of APs [3][4][5][6][7][8][9], and location fingerprinting is then used for location estimation. In this paper, the discussions follow the latter approach. Although we can place one reference device at each predefined point just as the LANDMARC system does [6], the method relies on too many reference devices. Applying interpolation methods can effectively reduce the number of reference devices. For example, in the LEASE system [7], the Akima Spline interpolation method is used to estimate radio maps. Besides, other interpolation methods, such as the inverse distance weighting (IDW) [17,18], radial basis function (RBF) [19], linear [18,20], and Kriging ones [21][22][23] can be applied to generate radio maps too. Before applying these interpolation methods, we should learn the characteristics of each one and make them suit the estimation of RSSI. For example [24], the IDW method estimates the values at unsampled points using a linear combination of values at sampled points weighted by an inverse value of the distance from the unsampled point to the sample points. The assumption is that Sensors 2016, 16,802 3 of 17 the closer the distance is, the more similar are the values between the unsampled point and the sample point. The nearest neighbours method predicts the value at an unsampled point based on the value of the nearest sample. Among these methods, the Kriging methods first employ the idea of geostatistics that besides the relative positions between the unsampled point and the sample points, additionally the spatial correlation of the variables is considered.
Unlike the above conventional interpolation methods, radio signal propagation model-based interpolation methods take the characteristics of radio signals into account and therefore to some extent can provide more accurate RSSI estimates. For example, Atia et al. [8] proposed a solution that is based on online RSSI samples from the existing WLAN APs which have been modified as a combination of reference devices and conventional APs. In the solution, the Gaussian Process Regression (GPR) method was used to augment the Log distance path loss model to obtain AP signal strength profiles. Similarly, modified APs are also applied by Du et al. [9]. With additional self-made sensor anchors, they use the Geography Weighted Regression (GWR) method to obtain a more accurate signal propagation model to construct radio maps. The so called RSSI Geography Weighted Regression (RGWR) is a variable-coefficient regression method that maintains as a significant feature the fact that signals attenuate with different characteristics in different regions. In order to apply the RGWR method, the coordinates of APs and anchors, as well as the distances between each pair of anchor and AP are necessary, besides signal strength information. For the above two approaches, although the modified APs can be replaced by reference devices and conventional APs, APs' positions are required, which brings additional information to manage and are unpractical for random APs that are much more numerous than deployed APs. Based on the Log distance path loss propagation model, Lee et al. [25] also proposed to refine the model for each partitioned cell depending on a high order Voronoi diagram which is generated according to the reference points. In their method, APs' positions are estimated simultaneously when estimating the parameters of the propagation model. More than a radio signal propagation model, the RSSI regression relationship between the sampling points of the radio map and neighboring reference devices can be obtained and utilized too. New radio maps can be estimated based on the regression relationship [3][4][5]. For example, Yin et al. [3] used a decision tree to model the relationship. According to the deployment of all reference devices, the reference-point value space is partitioned into several regions. An assumption is that the RSSI relationship between reference devices and the mobile client is linear when they are in the same region. With the trained model, radio maps can be updated effectively even with one reference device. Wang et al. [4] proposed to use neural networks to build the relationship. In their work, a three-layer structure is applied, and data from all the reference devices are used as the inputs, whereas data at each sampling point is used as the output. Although these methods perform well in time-varying environments, the assumption of invariable RSSI regression relationships between a sampling point and the neighboring calibration points is not true once some APs' positions are changed.

Methods for Handling Device Heterogeneity
None of the former adaptive approaches solves the issue of device heterogeneity which prevents those approaches from being practically applied. Since receivers with different hardware and software measure totally differently from each other, it is necessary to compensate the differences because the devices that are used for location estimation are various, such as notebooks, smart phones, etc. The solutions for tackling device heterogeneity can be divided into two categories: creating a robust metric and mapping the original values to a standard value space [26]. Depending on the observations, RSSI samples measured by two different devices at the same place have a consistent relationship [27][28][29]. Thus RSSIs measured by different devices can be mapped to reasonable values based on the relationship. First a linear relationship [27] is found between the RSSI measurements of two devices. Although manual calibration always produces a large improvement in terms of location accuracy [28], it is tedious since every device needs calibration. As a result, automatic calibration has drawn more attention. For example, based on a linear relationship, Haeberlen et al. [28] investigated three manners-manual, quasi-automatic and automatic calibration-to approximate the model. Tsui et al. [29] proposed an unsupervised learning method to automatically obtain a transformation function for mapping WiFi signal patterns from an unknown device to the training device. Experimental results show that position error caused by device heterogeneity is reduced about 4%. However, these methods cannot work without a learning procedure, and they can only work in pairwise mode. Both of these characteristics limit their usability. On the contrast, robust metrics can save the learning step and break the pairwise mode. Differential RSSI [15,[30][31][32][33][34][35] is believed to be effective since it eliminates the antenna gains of receivers from a theoretical view [30], but it uses one dimension less than original RSSI vector [31] and may create a greater range of locations that satisfy a given sample set of RSSI signals [32]. The form of the differential RSSI vector is presented in [33], and there are˜N 2¸e lements in the vector (N denotes the number of the elements in the original RSSI vector) in which only (N´1) of the elements are independent. Besides differential RSSI, other metrics were also applied in previous studies. For example, a method named hyperbolic location fingerprinting (HLP) based on RSSI ratio is proposed in [36]. Although the proposed RSSI ratio is observed to be more stable than absolute values, there is no theoretical analysis on the reason why it mitigates the measuring differences of heterogeneous devices. Cheng et al. [37] proposed a combined metric, the ratio of signal strength differences which eliminates measuring differences caused by device heterogeneity and dynamic environments. However, this approach needs RSSI readings from three closely located antennas which are usually unavailable for common users' devices.

Reference Device-Assisted Adaptive Location Fingerprinting
Reference device-assisted adaptive location fingerprinting approach consists of two steps: radio map construction and location estimation. However, the two steps are both performed online, which is different from conventional location fingerprinting. The following subsections present the approach in detail. First, a modified UK interpolation is proposed for the interpolation of RSSI. Second, a differential RSSI metric is adopted and deduced for multiple reference device-based location estimation. The flow chart of the proposed approach is depicted in Figure 1. automatically obtain a transformation function for mapping WiFi signal patterns from an unknown device to the training device. Experimental results show that position error caused by device heterogeneity is reduced about 4%. However, these methods cannot work without a learning procedure, and they can only work in pairwise mode. Both of these characteristics limit their usability. On the contrast, robust metrics can save the learning step and break the pairwise mode. Differential RSSI [15,[30][31][32][33][34][35] is believed to be effective since it eliminates the antenna gains of receivers from a theoretical view [30], but it uses one dimension less than original RSSI vector [31] and may create a greater range of locations that satisfy a given sample set of RSSI signals [32]. The form of the differential RSSI vector is presented in [33], and there are   2 N elements in the vector (N denotes the number of the elements in the original RSSI vector) in which only (N − 1) of the elements are independent. Besides differential RSSI, other metrics were also applied in previous studies. For example, a method named hyperbolic location fingerprinting (HLP) based on RSSI ratio is proposed in [36]. Although the proposed RSSI ratio is observed to be more stable than absolute values, there is no theoretical analysis on the reason why it mitigates the measuring differences of heterogeneous devices. Cheng et al. [37] proposed a combined metric, the ratio of signal strength differences which eliminates measuring differences caused by device heterogeneity and dynamic environments. However, this approach needs RSSI readings from three closely located antennas which are usually unavailable for common users' devices.

Reference Device-Assisted Adaptive Location Fingerprinting
Reference device-assisted adaptive location fingerprinting approach consists of two steps: radio map construction and location estimation. However, the two steps are both performed online, which is different from conventional location fingerprinting. The following subsections present the approach in detail. First, a modified UK interpolation is proposed for the interpolation of RSSI. Second, a differential RSSI metric is adopted and deduced for multiple reference device-based location estimation. The flow chart of the proposed approach is depicted in Figure 1.

Radio Map Construction
Radio signals have two inherent characteristics: large-scale attenuation and small-scale fading [38]. Large-scale attenuation indicates the impacts of the travel paths of signals. Small-scale fading refers to the impacts of local environmental dynamics. The fluctuations caused by the small-scale fading are always time-varying, and they are highly correlated with human activities [5]. For example, during work hours, RSSI values fluctuate more rapidly, and if offline calibration is conducted during this time period, it will be unsuitable for online use during non-work hours. Thus we must construct suitable radio maps for location estimation. Radio maps estimated by using real-time RSSI measurements can be the candidates for this.

RSSI Estimation by Using the UK [39] Method
To construct a radio map which is a combination of location fingerprints, RSSI estimates with respect to each AP at predefined points should be obtained first. In this paper, we choose UK as the primary estimation method, and propose a novel way of obtaining the semivariogram models accommodating the characteristics of RSSI spatial distribution.

Radio Map Construction
Radio signals have two inherent characteristics: large-scale attenuation and small-scale fading [38]. Large-scale attenuation indicates the impacts of the travel paths of signals. Small-scale fading refers to the impacts of local environmental dynamics. The fluctuations caused by the small-scale fading are always time-varying, and they are highly correlated with human activities [5]. For example, during work hours, RSSI values fluctuate more rapidly, and if offline calibration is conducted during this time period, it will be unsuitable for online use during non-work hours. Thus we must construct suitable radio maps for location estimation. Radio maps estimated by using real-time RSSI measurements can be the candidates for this.

RSSI Estimation by Using the UK [39] Method
To construct a radio map which is a combination of location fingerprints, RSSI estimates with respect to each AP at predefined points should be obtained first. In this paper, we choose UK as the primary estimation method, and propose a novel way of obtaining the semivariogram models accommodating the characteristics of RSSI spatial distribution.
Kriging interpolants are but variants of the linear estimator [40]: where m px 0 q and m px i q are expected values of Z px 0 q and Z px i q. x 0 is the unsampled point, and {x i } are the neighboring sampled points. ω i is the weight of sampled point x i . Z px 0 q is treated as a random field with a trend component, m px 0 q and a residual component, R px 0 q " Z px 0 q´m px 0 q. For RSSI, m px 0 q is not just a constant but a linear or higher-order trend in the (x, y) coordinates of the data point. Assume that: where, s k p¨q is a function of location, β k is an unknown parameter. This kind of Kriging with a trend is known as UK.
Substituting Equation (2) into Equation (1), we get: We require: leading to an UK estimator:Ẑ with: For simplification, we require: Note that we can still hold the constraint Equation (7). Thus we have a minimization problem with p constraints that can be solved using Lagrange multipliers, λ k : By solving the partial derivatives λ k and ω i , we get equations of the Kriging weights: According to the solution to these equations, we can obtain the weights. The covariance is generally derived from the semivariogram model γ p¨q which has the following form: where Z(x) and Z(x + h) are values of two points separated by vector h. The semivariogram depends only on the vector h. There are several ways to estimate the model. The classical formula is: where x i and x j are a pair of two points separated by vector h, and N(h) denotes the number of pairs.

A Novel Method for Constructing the Semivariogram Models
Conventional semivariogram model-based UK can certainly be used for RSSI estimation. However, by considering the characteristics of then spatial RSSI distribution, the performance may be improved. The spatial distribution of RSSI from an AP is similar to light waves spreading out from a point light source. Two pairs of data points that have equal separation distances may produce totally different variances. For example, in Figure 2a, two pairs of data points A, B and C, D are separated by vectors á AB and á CD which have equal norms and the same orientations. However, the RSSI variance between point A and B can be totally different from the counterpart between points C and D, since the resulting factors are different. Besides environmental factors, the two pairs of data points have their own specific factors. For points A and B, the main factor is the difference of attenuation directions of the radio signals. While for points C and D, the main factor is the difference of travel distances between radio signals. As we know, the impacts on RSSI caused by radio signals' travel distances and attenuation directions are totally different, and if the RSSI variances caused by the two factors have not been treated discriminatively, the obtained semivariogram model will not be exact enough.
where xi and xj are a pair of two points separated by vector h, and N(h) denotes the number of pairs.

A Novel Method for Constructing the Semivariogram Models
Conventional semivariogram model-based UK can certainly be used for RSSI estimation. However, by considering the characteristics of then spatial RSSI distribution, the performance may be improved. The spatial distribution of RSSI from an AP is similar to light waves spreading out from a point light source. Two pairs of data points that have equal separation distances may produce totally different variances. For example, in Figure 2a, two pairs of data points A, B and C, D are separated by vectors AB  and CD  which have equal norms and the same orientations. However, the RSSI variance between point A and B can be totally different from the counterpart between points C and D, since the resulting factors are different. Besides environmental factors, the two pairs of data points have their own specific factors. For points A and B, the main factor is the difference of attenuation directions of the radio signals. While for points C and D, the main factor is the difference of travel distances between radio signals. As we know, the impacts on RSSI caused by radio signals' travel distances and attenuation directions are totally different, and if the RSSI variances caused by the two factors have not been treated discriminatively, the obtained semivariogram model will not be exact enough.
In this paper, we propose to decompose the original vector h between two data points into two vectors h1 and h2 according to the differences of attenuation directions and travel distances of two radio signals. In Figure 2b, two data points P1 and P2 are presented. We have the original vector h ( 1 2 P P   ). Suppose the spatial location of the transmitter is known, so we select P1 which is closer to the transmitter. Then a point P2' that has the same distance to the transmitter as the selected point P1 can be found in the travel path of the radio signal passing through P2. Then we can get h1 (

P P 
). Note that: In this paper, we propose to decompose the original vector h between two data points into two vectors h 1 and h 2 according to the differences of attenuation directions and travel distances of two radio signals. In Figure 2b, two data points P 1 and P 2 are presented. We have the original vector h ( á P 1 P 2 ). Suppose the spatial location of the transmitter is known, so we select P 1 which is closer to the transmitter. Then a point P 2 ' that has the same distance to the transmitter as the selected point P 1 can be found in the travel path of the radio signal passing through P 2 . Then we can get h 1 ( á P 1 P 1 2 ) and h 2 ( á P 1 2 P 2 ). Note that: Following the above method for deriving two sub-vectors, we can obtain two semivariogramŝ γ 1 ph 1 q andγ 2 ph 2 q from the original set of data points. Semivariogramγ 1 ph 1 q is with respect of the information of RSSI structure on the difference of local environments in the travel paths of radio signals, whereas semivariogramγ 2 ph 2 q represents the RSSI structure information on the difference of travel distances of the radio signals. The two semivariograms are built independently, and then they are combined as a nested structureγ phq: By the way, if the spatial location of the transmitter is unknown, we can still rely on the traditional method to obtainγ phq.

Eliminating the Impacts of Heterogeneous Reference Devices
In the proposed approach, RSSI is estimated by using the data measured by multiple reference devices. Since RSSI values are related to the configurations of the transmitter and receiver, it is reported that the value of the difference caused by device heterogeneity has a level of 10 to 20 dBm [33]. As a result, the estimated RSSI also contains heterogeneous measurement differences. We conducted an experiment to verify the difference between the estimated RSSI and observed RSSI at the same location. We used a mobile device to measure RSSI values from nine WLAN APs at a location. For each AP, we collected 100 samples, and then obtained the mean value of the RSSI values. That is the observed RSSI sample. At the same location, we also use the modified UK method to estimate RSSI values with respect to the nine APs. Figure 3a presents the estimated and observed RSSI values with respect to the nine detected WLAN APs. Obviously, the more similar these two RSSI samples are the better. However, there are differences (8 to 10 dBm) between the estimated and observed values. Thus, the negative impacts of heterogeneous reference devices should be alleviated beforehand. Since it is hard to establish relationships between pair-wise devices for the proposed multiple reference devices-based solution, we apply the differential value metric which does not need a training process. According to [30], differential RSSI eliminates receiver gains, and therefore reduces the impact of device heterogeneity. Since the estimated RSSI is derived from the data from multiple reference devices, it is verified whether differential RSSI is suitable for the elimination of measuring differences in the estimated RSSI. According to Equation (8), estimated RSSI is a weighted sum of measured RSSI values by multiple reference devices. Suppose: where RSSI t,j denotes the RSSI measured by reference device t from AP j , and k t denotes the associated weight. Thus, differential RSSI between RSSI i,1 and RSSI i,2 has the form of: We can observe from the above expression that, although the estimated RSSI is derived from the data measured by several reference devices, measuring differences are still reduced since the receiver gains are eliminated likewise in ∆RSSI 1,2 . As Figure 3b presents, differential values respectively derived from observed RSSIs and estimated RSSIs are plotted. Since nine APs are observed, 36 pairs of APs are used to calculate differential values. Compared with Figure 3a, observed differential RSSIs and the estimated ones at the same point appear more similar in Figure 3b. Thus in differential RSSI metrics, the degree of similarity can be represented more accurately.
By the way, if the spatial location of the transmitter is unknown, we can still rely on the traditional method to obtain   h  .

Eliminating the Impacts of Heterogeneous Reference Devices
In the proposed approach, RSSI is estimated by using the data measured by multiple reference devices. Since RSSI values are related to the configurations of the transmitter and receiver, it is reported that the value of the difference caused by device heterogeneity has a level of 10 to 20 dBm [33]. As a result, the estimated RSSI also contains heterogeneous measurement differences. We conducted an experiment to verify the difference between the estimated RSSI and observed RSSI at the same location. We used a mobile device to measure RSSI values from nine WLAN APs at a location. For each AP, we collected 100 samples, and then obtained the mean value of the RSSI values. That is the observed RSSI sample. At the same location, we also use the modified UK method to estimate RSSI values with respect to the nine APs.

Location Estimation
Based on the estimated radio map, K Weighted Nearest Neighbors (KWNN) is used for location estimation:X where X i denotes the location of selected location fingerprint, K denotes the number of selected location fingerprints, and w i denotes the weight which is always derived from the inverse distance between two RSSI vectors (one is the online measurement, and the other is the related location fingerprint). For example, the inverse Euclidean distance: where N denotes the number of APs, RSSI 0,j denotes the online measurement from the jth AP, and RSSI i,j denotes the measurement in the location fingerprint from the jth AP. This kind of calculation of weight doesn't consider measuring differences which may degrade localization accuracy of a system. In our adaptive location fingerprinting, radio maps are generated by multiple reference devices. And measuring difference becomes a crucial problem for location estimation. We apply the form of differential RSSI vector presented in [33]. Although it has˜N 2¸e lements (N denotes the number of the elements in original RSSI vector) which seems redundant since only (N´1) of the elements are independent, it is free from the process of selecting a key element which is essential for generating a vector to contain independent elements only. Given the form of differential RSSI vector, the weight w i of the selected location fingerprint is still derived from the inverse Euclidean distance between two differential RSSI vectors:

Setup
The proposed approach was evaluated on the fifth floor in a research building. The floor plan is shown in Figure 4. vector, the weight wi of the selected location fingerprint is still derived from the inverse Euclidean distance between two differential RSSI vectors:

Setup
The proposed approach was evaluated on the fifth floor in a research building. The floor plan is shown in Figure 4.   The area measures 48ˆ21 m 2 , and the test bed covers the whole corridor and three rooms. Sixteen PCs marked as RD1 to RD16 in Figure 4b are uniformly placed to play the roles of reference devices. There are 10 desktops, each of which is embedded with one of three types of IEEE 802.11 wireless network interface cards (WNICs): Netcore NW335, D-link DWA-123, and D-link DWL-G122.
The others are laptops, two HP Mini 110s with Broadcom 802.11 b/g WNIC, two Lenovo E40s with Intel(R) dual band wireless-AC 3160 WNIC, one Acer Aspire 5100 with Atheros AR5005G WNIC, and one LenovoThinkpadSL400with Atheros AR5008 WNIC. In the experiments, the reference devices were activated to collect real-time RSSI data. A Dell Inspiron 14-7447 PC with Intel(R) Dual Band Wireless-AC 3160 was used as the mobile device. Using the mobile device, we collected test data during four time periods in two days for location calculation at 43 points marked by circles in Figure 4b. Details of the four time periods are as follows, one time period, 7 p.m. to 8 p.m. on the first day, and three time periods 10 a.m. to 11 a.m., 3 p.m. to 4 p.m., and 4 p.m. to 5 p.m. on the next day. At each point 100 samples were collected. To form an offline radio map, the mobile device was used to collect 88 location fingerprints at the survey points marked by crosses in Figure 4a. At each point we also collected 100 samples. All the devices have the same sample frequency (1 Hz). Tens of wild WLAN APs with unknown positions can be scanned in the area, and three more marked by AP1, AP2, AP3 are added. The wild APs may be on the same floor outside this test bed or on different floors, or even in different buildings. All the wild and added APs were used for positioning. However none of the APs covers the entire area, and at each sampling point 10 to 20 APs can be scanned on average.
To evaluate the proposed approach, two interpolants, IDW and Universal Krigingas well as the neural network (NN)-based approach proposed in previous work [4] are used as the baseline.Since location results based on the offline radio map are not so good which prevent those offline radio map-based adaptive approaches [3,4] from providing ideal location performances, we use the RSSIs estimated by our modified UK method to train the NN-based regression functions between each survey point and its neighboring reference devices. Default settings for all the experiments are as follows, the threshold forneural network training are 2000 times, the smoothing window size for the data used for RSSI estimation and location estimation is 20K in KWNN for location estimation equals 8.

Results and Analysis
For Kriging interpolants, the semivariogram model should be determined first. In the following tests, we applied the models approximated depending on the collected offline radio map. Although the semivariograms are derived from the offline radio map, the two UK interpolants, conventional UK and the modified UK still produce accurate location results as presented in the following tests. This fact implies that the two UK interpolants both adapt to dynamic environments. As for each of the added APs, the semi-variances of RSSI values in the test area with respect to different manners were calculated and presented in Figure 5, respectively. Each curve for an AP was obtained by using a different manner, and it represents quantitative structural characteristics of RSSIs' spatial distribution in the test area. We find that the obtained statistical results based on the difference of travel distances of radio signals are similar with the results based on the conventional manner. But the results based on the difference of attenuation directions of radio signals are somewhat different. It implies that a combination of semivariograms based on the difference of attenuation directions and the difference of travel distances of radio signals contains more information about the environments than conventional semivariogram, since the difference of attenuation directions of radio signals represents the difference of local environments in the travel paths of radio signals. And therefore, the combination can enhance the prediction of RSSI. To fit the experimental semivariogram, we choose the spherical model [40]: where a denotes range, C 0 denotes nugget, and C 0 + C denotes sill. γ p0q = 0 means a discontinuity at the origin, which is called the "nugget effect". For each AP, the parameters C 0 and C were obtained according to the approximated model, but the parameter a was assumed as a fixed value, 8 m.  With the given parameters of UK interpolants, experiments were first conducted to evaluate the performances of the radio maps estimated by using real-time data against the offline radio map during two time periods, 7 p.m. to 8 p.m. on the first day and 10 a.m. to 11 a.m. on the second day. Figure 6 shows the average location errors and standard deviations (SD) of the location errors. All the real-time estimated radio maps provide better results in two time periods, compared to the offline radio map. It implies that it is possible to replace the offline radio map by real-time radio maps for practical use. Estimated radio maps-based average location errors are all around 2 m. And we can also observe that the modified UK performs comparable with the NN method, and performs better than the UK and IDW methods. As mentioned above, all the semivariogram models are derived from the offline radio map, and therefore the two UK interpolants adapt to dynamic environments. With the given parameters of UK interpolants, experiments were first conducted to evaluate the performances of the radio maps estimated by using real-time data against the offline radio map during two time periods, 7 p.m. to 8 p.m. on the first day and 10 a.m. to 11 a.m. on the second day. Figure 6 shows the average location errors and standard deviations (SD) of the location errors. All the real-time estimated radio maps provide better results in two time periods, compared to the offline radio map. It implies that it is possible to replace the offline radio map by real-time radio maps for practical use. Estimated radio maps-based average location errors are all around 2 m. And we can also observe that the modified UK performs comparable with the NN method, and performs better than the UK and IDW methods. As mentioned above, all the semivariogram models are derived from the offline radio map, and therefore the two UK interpolants adapt to dynamic environments.  Figure 7 presents the average location errors and SDs of the location errors. Since the test depicted in Figure 6b is conducted on the same day as the two tests here, and is without the impact of changing  Figure 7 presents the average location errors and SDs of the location errors. Since the test depicted in Figure 6b is conducted on the same day as the two tests here, and is without the impact of changing APs' positions, it is used as the baseline for comparison. For the offline radio map and the NN-based method, compared with the location results presented in Figure 6b, the average location errors increase about 25% and 100%, respectively, when two APs' positions are changed (as presented in Figure 7a), and increase over 60% and 300%, respectively, when three APs' positions are changed (as presented in Figure 7b). This implies that the NN-based method cannot accommodate the change of APs' positions. However, IDW and UK interpolants are flexible with the changing of APs' positions and the average location errors with respect to the estimated radio maps by using the interpolants does not increase compared with the results presented in Figure 6b, which means that the conventional semivariogram model of an AP can still be used when the AP's position has been changed. For the proposed method, the semivariogram models are associated with the positions of APs, but the changing of APs' positions brings about little impact. Since compared with the distance from an AP to the sampling points, the distances between the sampling points are much shorter. And thus the impacts on the difference of attenuation directions and the difference of travel distances of two radio signals caused by the changing of APs' positions are trivial. APs' positions, it is used as the baseline for comparison. For the offline radio map and the NN-based method, compared with the location results presented in Figure 6b, the average location errors increase about 25% and 100%, respectively, when two APs' positions are changed (as presented in Figure 7a), and increase over 60% and 300%, respectively, when three APs' positions are changed (as presented in Figure 7b). This implies that the NN-based method cannot accommodate the change of APs' positions. However, IDW and UK interpolants are flexible with the changing of APs' positions and the average location errors with respect to the estimated radio maps by using the interpolants does not increase compared with the results presented in Figure 6b, which means that the conventional semivariogram model of an AP can still be used when the AP's position has been changed. For the proposed method, the semivariogram models are associated with the positions of APs, but the changing of APs' positions brings about little impact. Since compared with the distance from an AP to the sampling points, the distances between the sampling points are much shorter. And thus the impacts on the difference of attenuation directions and the difference of travel distances of two radio signals caused by the changing of APs' positions are trivial. In the following, we used the data collected during the time period from10 a.m. to 11 a.m. to test the approaches in cases of removing different numbers of APs. The involved APs are also the added ones. Figure 8 presents the average location errors. If the added APs are all removed (three APs are removed), the average location error based on the offline radio map increases significantly, but the estimated radio maps-based location accuracy still maintains high levels. And UK and the In the following, we used the data collected during the time period from10 a.m. to 11 a.m. to test the approaches in cases of removing different numbers of APs. The involved APs are also the added ones. Figure 8 presents the average location errors. If the added APs are all removed (three APs are removed), the average location error based on the offline radio map increases significantly, but the estimated radio maps-based location accuracy still maintains high levels. And UK and the modified UK methods perform better than IDW method and the NN-based method in all cases. When the positions of more than two APs are known (one AP is removed or none is removed), the improvements of the proposed method in location accuracy are observable, compared with the conventional UK method.
Sensors 2016, 16,802 14 of 17 modified UK methods perform better than IDW method and the NN-based method in all cases. When the positions of more than two APs are known (one AP is removed or none is removed), the improvements of the proposed method in location accuracy are observable, compared with the conventional UK method. Last but one, we tested the impact of the number of reference devices on the approaches based on the data during the time period, 10 a.m. to 11 a.m. To ensure that the left reference devices cover the entire test bed, we divided all 16 reference devices into eight groups, RD1 and RD2, RD3 and RD4, RD5 and RD6, RD7 and RD8, RD9 and RD10, RD11 and RD12, RD13 and RD14, as well as RD15 and RD 16, and make sure at least one reference device in each group is in operation during each test. Therefore, at least eight reference devices are required. Figure 9 presents the average location errors with respect to different numbers of reference devices. For each number, we chose 40 random subsets of reference devices and compared the approaches. Since the offline radio map does not require any data from the reference devices, the average location error does not change with the number of reference devices. And the NN-based Last but one, we tested the impact of the number of reference devices on the approaches based on the data during the time period, 10 a.m. to 11 a.m. To ensure that the left reference devices cover the entire test bed, we divided all 16 reference devices into eight groups, RD1 and RD2, RD3 and RD4, RD5 and RD6, RD7 and RD8, RD9 and RD10, RD11 and RD12, RD13 and RD14, as well as RD15 and RD 16, and make sure at least one reference device in each group is in operation during each test. Therefore, at least eight reference devices are required. Figure 9 presents the average location errors with respect to different numbers of reference devices.
Sensors 2016, 16,802 14 of 17 modified UK methods perform better than IDW method and the NN-based method in all cases. When the positions of more than two APs are known (one AP is removed or none is removed), the improvements of the proposed method in location accuracy are observable, compared with the conventional UK method. Last but one, we tested the impact of the number of reference devices on the approaches based on the data during the time period, 10 a.m. to 11 a.m. To ensure that the left reference devices cover the entire test bed, we divided all 16 reference devices into eight groups, RD1 and RD2, RD3 and RD4, RD5 and RD6, RD7 and RD8, RD9 and RD10, RD11 and RD12, RD13 and RD14, as well as RD15 and RD 16, and make sure at least one reference device in each group is in operation during each test. Therefore, at least eight reference devices are required. Figure 9 presents the average location errors with respect to different numbers of reference devices. For each number, we chose 40 random subsets of reference devices and compared the approaches. Since the offline radio map does not require any data from the reference devices, the average location error does not change with the number of reference devices. And the NN-based For each number, we chose 40 random subsets of reference devices and compared the approaches. Since the offline radio map does not require any data from the reference devices, the average location error does not change with the number of reference devices. And the NN-based method is more robust than the three interpolants, IDW, UK and the modified UK with respect to the number of reference devices. Among the three interpolants, our proposed method performs better than conventional UK method as the number of reference devices decreases from 16 to 8. However, IDW method performs even better when the number of reference devices is less than 12. It implies that with lower density of reference devices, the interpolants should be combined with the NN-based method to provide reasonable estimation.
As for all the above tests, the estimated radio maps were derived from heterogeneous measurements, and therefore only differential RSSI was applied to location estimation. To reveal the superiority of differential RSSI metrics over raw RSSI metrics, comparative tests were finally conducted. The test data is again during time period from 10 a.m. to 11 a.m. Figure 10 presents the average location errors. We can observe that differential RSSI improves the location accuracy significantly. This implies that device heterogeneity causes severe negative impacts on multiple reference device-based adaptive location fingerprinting, and differential RSSI is efficient in this situation. the number of reference devices. Among the three interpolants, our proposed method performs better than conventional UK method as the number of reference devices decreases from 16 to 8. However, IDW method performs even better when the number of reference devices is less than 12. It implies that with lower density of reference devices, the interpolants should be combined with the NN-based method to provide reasonable estimation.
As for all the above tests, the estimated radio maps were derived from heterogeneous measurements, and therefore only differential RSSI was applied to location estimation. To reveal the superiority of differential RSSI metrics over raw RSSI metrics, comparative tests were finally conducted. The test data is again during time period from 10 a.m. to 11 a.m. Figure 10 presents the average location errors. We can observe that differential RSSI improves the location accuracy significantly. This implies that device heterogeneity causes severe negative impacts on multiple reference device-based adaptive location fingerprinting, and differential RSSI is efficient in this situation.
From the above experiments, we can conclude that the proposed approach not only adapts to dynamic environments and the situations of changing APs' positions, but it is also robust with respect to reference device heterogeneity. However, it is less robust than regression function-based methods [3,4] with respect to the number of reference devices. Thus, a combination of the proposed approach and regression function-based methods would be the good future choice for adaptive location fingerprinting. Figure 10. Average location errors of different approaches with respect to differential RSSI and raw RSSI metrics.

Conclusions
In this paper, we propose an adaptive location fingerprinting approach assisted by reference devices. The approach is not only robust for dynamic environments and the situation of changing APs' positions, but it also accommodates measurement differences caused by reference device heterogeneity. Two issues are studied in the proposed adaptive location fingerprinting approach, RSSI interpolation in indoor areas, and measurement differences between heterogeneous reference devices. For the interpolation of RSSI, the modified UK is proposed and provides better results than conventional UK because it takes the characteristics of RSSIs' spatial distribution into account. Differential RSSI is effective for the alleviation of the negative impacts caused by heterogeneous reference devices. Since the proposed approach is less robust than regression function-based methods [3,4] with respect to the number of reference devices, in the future it will be combined with those methods to achieve better location performance.   Figure 10. Average location errors of different approaches with respect to differential RSSI and raw RSSI metrics.
From the above experiments, we can conclude that the proposed approach not only adapts to dynamic environments and the situations of changing APs' positions, but it is also robust with respect to reference device heterogeneity. However, it is less robust than regression function-based methods [3,4] with respect to the number of reference devices. Thus, a combination of the proposed approach and regression function-based methods would be the good future choice for adaptive location fingerprinting.

Conclusions
In this paper, we propose an adaptive location fingerprinting approach assisted by reference devices. The approach is not only robust for dynamic environments and the situation of changing APs' positions, but it also accommodates measurement differences caused by reference device heterogeneity. Two issues are studied in the proposed adaptive location fingerprinting approach, RSSI interpolation in indoor areas, and measurement differences between heterogeneous reference devices. For the interpolation of RSSI, the modified UK is proposed and provides better results than conventional UK because it takes the characteristics of RSSIs' spatial distribution into account. Differential RSSI is effective for the alleviation of the negative impacts caused by heterogeneous reference devices. Since the proposed approach is less robust than regression function-based methods [3,4] with respect to the number of reference devices, in the future it will be combined with those methods to achieve better location performance.