Next Article in Journal
Machine Learning (ML)-Based Copper Mineralization Prospectivity Mapping (MPM) Using Mining Geochemistry Method and Remote Sensing Satellite Data
Next Article in Special Issue
Accurate and Robust Rotation-Invariant Estimation for High-Precision Outdoor AR Geo-Registration
Previous Article in Journal
Sparse Direct Position Determination Based on TDOA Information in Correlation-Domain
Previous Article in Special Issue
High-Accuracy Positioning in GNSS-Blocked Areas by Using the MSCKF-Based SF-RTK/IMU/Camera Tight Integration
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

GM(1,1)-Based Weighted K-Nearest Neighbor Algorithm for Indoor Localization

1
College of Geodesy and Geomatics, Shandong University of Science and Technology, Qingdao 266590, China
2
Shandong Water Conservancy Vocational College, Rizhao 276826, China
*
Author to whom correspondence should be addressed.
Remote Sens. 2023, 15(15), 3706; https://doi.org/10.3390/rs15153706
Submission received: 18 May 2023 / Revised: 9 July 2023 / Accepted: 23 July 2023 / Published: 25 July 2023
(This article belongs to the Special Issue Remote Sensing in Urban Positioning and Navigation)

Abstract

:
Along with the IoT technology, the importance of indoor positioning is increasing, but the accuracy of the traditional fingerprint positioning algorithm is negatively affected by the complex indoor environment. This issue of low indoor spatial geolocation localization accuracy when the signal is collected away from the present stage occurs due to the signal instability of the iBeacon in the traditional fingerprint localization algorithm, which generates a variety of factors such as object blocking and reflection, multipath effect, etc., as well as the scarcity of reference fingerprint data points. In response, this study proposes an inverse distance-weighted optimization WKNN algorithm for indoor localization based on the GM(1,1) model. By implementing GM(1,1) model pre-process leveling, the original fingerprint library was reconstructed into a large-capacity fingerprint database using the inverse distance-weighted interpolation method. The local inverse distance-weighted interpolation was used for interpolation, combined with the WKNN algorithm to complete the coordinate solution in real time. This effectively solved the issue of low localization accuracy caused by the large fluctuation of the received signal strength (RSS) sampling measurement data and the existence of few reference fingerprint datapoints in the fingerprint database. The results show that this algorithm reduced the average positioning error by 5.9% compared with ordinary kriging (OK) interpolation leveling and reduced the average positioning error by 18.2% compared with the indoor spatial location accuracy of the original fingerprint database, which can effectively improve the positioning accuracy and provide technical support for indoor location and navigation services.

1. Introduction

GNSS has been widely used outdoors, but it has many disadvantages, including weak signal, weak penetration, and susceptibility to interference. Due to the signal mastering caused by indoor environments, satellite navigation positioning indoors often has errors of tens of meters, making it difficult to meet the navigation and positioning needs of users. However, the demand for a ubiquitous and accurate indoor localization service is continuously growing [1]. In recent years, there has been a rapid increase in the availability of commercial indoor localization solutions [2] for needs such as patients seeking consultation in main hospitals, owners looking for their vehicles in the garage of a commercial complex, travelers achieving faster railway and subway station rides, tourists conveniently going to the exhibition area of interest, etc. Nowadays, the use of radio technology is becoming increasingly common. Within the indoor positioning site environment, indoor spatial location navigation services based on wireless sensor networks provide the actual spatial location point coordinates of the user terminal by means of spatial positioning algorithms based on the received signal strength (RSS). The Internet of Things (IoT) can enable smart infrastructures to provide advanced services to the users [3]. Infrastructural approaches include Wi-Fi, radio frequency identification (RFID), ultrawide-band (UWB), and Bluetooth (BLE), and they require a customized infrastructure such as Wi-Fi access points (APs), beacons, sensors, and tags to sense the environment [4]. Pedestrian dead reckoning (PDR) and magnetic-field-based location systems employ environmental signals which do not require an infrastructure [5,6,7,8]. Wi-Fi [9] has an average accuracy of 5 to 15 m. It has the advantage of widely distributed Wi-Fi APs, low access requirements, and high flexibility. However, it also has limitations such as noise and multipath distortion, radio mismatch issues, fluctuations in Wi-Fi signals, vulnerability to changes in APs, and the heterogeneity of Wi-Fi devices, and the positioning performance is severely degraded in dynamic environments [4]. UWB [10] has the advantages of high accuracy (10–30 cm), high multipath resolution, large bandwidth, low latency, high penetration, and freedom from interference. The constraints of UWB include high infrastructural requirements, energy consumption, and high user costs [4]. Apple’s low-power iBeacon technology [11] has been widely used for indoor location services with its low power consumption and low cost. Magnetic fields are mainly used in narrow one-dimensional spaces such as corridors [12,13]. There are difficulties in using magnetic fields in wide environments [14] and achieving positioning using magnetic fields in old buildings with almost no metal structures [15]. Due to the shadow effect, the multipath propagation effect and the deployment direction of iBeacon devices, the RSS-based signal propagation model does not describe the relationship between the RSS and location distance precisely enough [16]. Moreover, iBeacon positioning accuracy is usually affected by its signal quality in practical environments. iBeacon positioning accuracy is usually influenced by its signal quality in practical environments [17]. The radio signal from iBeacon is reflected and refracted by objects such as ceilings, walls, and the ground during the propagation process, and the radio signal is unique for each location in the room. The fingerprint is the use of the radio signal as the marker attribute with uniqueness at the spatial location measurement point according to the RSS of each beacon collected, and the resulting marker attribute has the same essence of uniqueness as human fingerprints. Complex indoor environments often have various constraints, and as some walking trajectories are relatively fixed, it becomes feasible to use historical information about the trajectory to enhance location estimation methods [18].
The positioning method of the spatial location fingerprint database based on received signal strength (RSS) data has received a lot of attention as a research focus for experts and scholars around the world. The RSS-based fingerprint method has two phases [19]: the offline phase and the real-time phase. The offline phase selects reference fingerprint data points, traverses the localization area to complete the information data collection of the reference fingerprint data points, establishes the reference fingerprint data points, and constructs the fingerprint database. In the real-time phase, the RSS data collected in real-time at the unknown spatial location measurement point is matched with the fingerprint database, and the coordinates of the unknown spatial location measurement point are estimated by using the WKNN algorithm to fit the stable parity.
In the offline phase, the signal acquisition device collects RSS from the surrounding iBeacon at the reference point. Due to the instability of the signal, the RSS fluctuates non-cyclically when the acquisition is carried out, which RSS requires pre-processing. The simplest way is to adopt mean filtering, but this method cannot remove the noise, but only relatively attenuate it. In the literature [20], RSS data with a smaller probability of occurrence are filtered directly using Gaussian filtering to attenuate the noise due to the fact that the RSS roughly fits the Gaussian distribution. However, this method requires a long acquisition time to produce sufficient data samples, which is not conducive to reducing the time cost of database building. The grey prediction method has significant advantages in the prediction of small sample data [21]. GM(1,1) is the most commonly used model; generally, only four data samples are needed to use the GM(1,1) model. The GM(1,1) model can be used to fit and smooth RSS data, achieving the purpose of noise reduction. This model is particularly suitable for cases where the RSS data collected are limited, characterized by a small number of samples and limited information. When building an offline fingerprint database, the distance between the reference points is an important factor affecting estimation accuracy. A smaller spacing between reference points will result in a higher localization accuracy but increase the time cost and vice versa [22]. Considering factors such as time cost and work efficiency, the number of reference fingerprint points collected is often small and the fingerprint point spacing is large when constructing a fingerprint database, which is not conducive to improving localization performance. Therefore, it is more common to use spatial interpolation to expand the offline fingerprint database. Inverse distance weighted (IDW) interpolation is a weighted interpolation method that uses the inverse of the squared distance as the weight [23]. It has a relatively simple computational process but is not accurate enough for predicting more distant insertion points. The signals emitted from iBeacon exhibit non-isotropic characteristics. The literature [24] draws on the ordinary kriging (OK) interpolation algorithm for generating a large-capacity, high-resolution location fingerprint database based on limited real-world data. However, the ordinary kriging (OK) interpolation algorithm does not take into account the influence of natural environmental variables, and there are disadvantages whereby the variation function can easily affect the estimation accuracy to a large extent.
To address the above problems, this paper proposes a fingerprint database optimization algorithm based on the GM(1,1) model and IDW interpolation (referred to as GM(1,1) + IDW interpolation), which solves the problem of RSS sampling data fluctuation by using the GM(1,1) model. It also addresses the low positioning accuracy and limited reference fingerprint points in the fingerprint database by using IDW interpolation for local interpolation. At the real-time localization stage, K-nearest neighbor (KNN) is used to find the k-nearest neighboring reference fingerprint points based on the Euclidean distance between the RSS data collected online and the reference fingerprint, using the center of mass of these points as the estimated coordinates of the unknown points. The literature [25] utilizes weighted K-nearest neighbor (WKNN), where the coordinates of unknown points are estimated using the inverse of the distance as the weight. This way, the effect of noise on the localization accuracy is weakened. Compared with KNN, the application of this method results in a relatively high localization accuracy.
This paper is organized as follows: Section 2 elucidates the proposed inverse distance weighted optimization WKNN algorithm for indoor localization based on the GM(1,1) model; Section 3 presents the experimental design and analyzes the experimental results, including the effective coverage of iBeacon signals, the pre-process leveling effect of the GM(1,1) model, and the implementation of inverse distance weighted optimization WKNN algorithm for indoor positioning based on the GM(1,1) model; Section 4 discusses the advantages, limitations, and future improvements of the algorithm proposed in this paper; and Section 5 concludes the whole paper and suggests potential future research directions.

2. Methods

2.1. Grey Prediction Model GM(1,1)

The basic logic of the GM(1,1) model is to accumulate the irregular raw data to acquire a more regular numerical series and then model it. After modelling, the predicted values of the original data can be obtained for further prediction.
The original data, R S S k ( 0 ) , of n fingerprint points (where k = 1, 2, …, n) are known, and after preprocess leveling, the predicted value R S S k ( 0 ) of R S S k ( 0 ) can be obtained.
The basic algorithmic steps for RSS data pre-process leveling are as follows [26]:
(1) A set of irregularly received signal strength (RSS) data were arranged in an ascending order to form the original series:
R S S ( 0 ) = { R S S 1 ( 0 ) , R S S 2 ( 0 ) , , R S S n ( 0 ) }
(2) In order to make the data exponential and easy to solve later, the new series was obtained by accumulating the data using the accumulation technique. The new series R S S k 1 was obtained by accumulating R S S k 0 :
R S S ( 1 ) = { R S S 1 ( 1 ) , R S S 2 ( 1 ) , , R S S n ( 1 ) } = { R S S 1 ( 0 ) , R S S 1 ( 0 ) + R S S 2 ( 0 ) , }
R S S k ( 1 ) = i = 1 k R S S i ( 0 ) , k = 1 , 2 , , n
(3) The following formula was used to calculate the immediate mean
z k ( 1 ) = R S S k ( 1 ) + R S S k 1 ( 1 ) 2 , k = 2 , 3 , n
(4) A GM(1,1) fitting model was developed and the predicted RSS was obtained
R S S k ( 0 ) + a z k ( 1 ) = u
The above equation is the fitted model of GM(1,1). The u and a in the equation are the key coefficients to be obtained for the model treatment, where u is the amount of gray action and a is the development coefficient. The u and a can be obtained using the least-squares method.
[ a , u ] T = ( B T B ) 1 B T Y
B = z 1 1 1 z 2 1 1 z n 1 1
Y = [ R S S 2 ( 0 ) , R S S 3 ( 0 ) , , R S S n ( 0 ) ]
The response function is:
R S S k + 1 1 = ( R S S ( 0 ) u a ) e a k + u a R S S k + 1 0 = R S S k + 1 1 R S S k 1 , k = 1 , 2 , , n
For the above function, R S S k + 1 1 is the estimated value of R S S k + 1 ( 1 ) and R S S k + 1 0 is the estimated value of R S S k + 1 ( 0 ) , which is the predicted RSS.
(5) Optimization Verification
The variance ratio C-test and the small error probability p-test were used for the obtained prediction series. R S S ( 0 ) was the original series, R S S 0 was the model prediction series, and ε ( 0 ) was the residual series. The mean and variance of each series were
R S S ¯ = 1 n k = 1 n R S S k ( 0 ) S 1 2 = 1 n k = 1 n ( R S S k ( 0 ) R S S ¯ ) 2 ε ¯ = 1 n k = 1 n ε k ( 0 ) S 2 2 = 1 n k = 1 n ( ε k ( 0 ) ε ¯ ) 2
The variance ratio C = S 2 S 1 , and the probability of small errors p = P ε k ε ¯ < 0.6745 S 1 , were defined. Usually, C < 0.35 and p > 0.95 have the highest accuracy class.

2.2. Inverse Distance Weighted Interpolation

The inverse distance weighted (IDW) interpolation model is shown in Equation (8):
Z = j = 1 N 1 D i j α Z j j = 1 N 1 D i j α
where α is the distance decay coefficient, Z j is the observed value at point j ; N is the number of nearest points, D i j is the distance between the unknown point i and the known point j , and i represents any point to be interpolated.
The inverse distance weighted (IDW) interpolation method uses the inverse of the squared distance as the weight, and the inverse of the pth power of the distance is positively correlated with the similarity between the fingerprint data points. The smaller the fingerprint data point spacing is, the higher the similarity.
The distance between k nearest neighbor fingerprint points and the point to be inserted is known. Thus, the attribute value of the inserted point can be predicted based on the distance relationship.
Given the coordinates, if F i of measurement point F 0 to be inserted, and the k nearest neighbor fingerprint points F i of the inserted point (where, i = 1 , 2 , , k ) are found, the attribute value of point F 0 to be inserted can be found using the following equations:
D i = ( x 0 x i ) 2 + ( y 0 y i ) 2
λ i = ( 1 d i ) 2 i = 1 k ( 1 d i ) 2
R * ( F 0 ) = i k λ i R ( F i )
In the above equations, λ i ( i = 1 , 2 , , k ) is the weight of the attribute value of the fingerprint point to the insertion point, and R * ( F 0 ) is the obtained attribute value of the insertion point.
For IDW interpolation, the farther the fingerprint point is from the insertion point, the worse the prediction effect is. Nevertheless, the prediction accuracy can be improved via local interpolation. As a result, IDW interpolation was chosen for the expansion of the fingerprint database in this paper.

2.3. Inverse Distance Weighted Optimization WKNN Algorithm for Indoor Localization Based on the GM(1,1) Model

In the traditional fingerprint localization algorithm, when the signal is collected at the offline stage, it generally uses Gaussian filtering to pre-process the RSS data for leveling due to the instability of the signal of each iBeacon collected and measured. After the RSS data is leveled via the Gaussian filtering processing, the fingerprint data points are formed and stored in the fingerprint database; finally, the WKNN method is used for localization matching at the real-time stage. Using Gaussian filtering to remove singularities is a more common technical method at the offline stage. However, the credibility of Gaussian filtering is relatively low for solving problems such as the presence of obstacle reflections, shadowing effects, and the limited sample size.
For this study, the sampling time was 12 s and the sample size was limited. As a result, it was inappropriate to directly use Gaussian filtering technical approach to process the leveling data at for the offline stage. Meanwhile, if each reference fingerprint data point exists with large spacing, the establishment of an offline fingerprint database will also have an impact on the accuracy of spatial location measurement point positioning during the real-time phase. Based on the above limitations, this study optimized the fingerprint data spatial location measurement algorithm through the optimization of the fingerprint database construction, pre-process leveling of RSS data, etc. The technical route of the optimized location measurement algorithm is shown in Figure 1.
The basic steps of the algorithm were as follows:
Step1: The iBeacon indoor spatial location was selected deployment with reference to the spatial location of the measurement points.
Step 2: The fingerprint data at each reference measurement point spatial location were collected and measured, and the fingerprint data information pre-processed for leveling using the GM(1,1) model. This required the acquisition of signals along the four directions of southeast and northwest to ensure a more uniform acquisition of iBeacon signals. The RSS information from each beacon was pre-processed and leveled using the GM(1,1) model.
Step 3: IDW interpolation was performed on the offline fingerprint database. The RSS data were fitted and the mean-parity processed to establish each fingerprint data point and construct the offline fingerprint database. To increase the capacity of the fingerprint database, IDW interpolation was used to reconstruct the offline fingerprint database. Based on the deployment position and association mode of the fingerprint data points obtained from the collected measurements, four related nearest neighbor fingerprint data points were selected around the insertion position point for prediction. Figure 2 shows the schematic diagram of the offline fingerprint database after IDW interpolation reconstruction, where the blue squares represent the fingerprint data points obtained from real-time acquisition measurements and the red circles represent the fingerprint data points inserted using IDW interpolation. Four columns of fingerprint data points were inserted in the six reference fingerprint data points with equal vertical spacing, resulting in a sevenfold expansion of the fingerprint database.
Step 4: Indoor spatial localization matching was completed using the WKNN method during the real-time phase. The WKNN method is used to calculate the Euclidean distance between the fingerprint data points and RSS data points measured through real-time acquisition. The k- nearest fingerprint data points were found, and the coordinates of the weighted center of mass of the k fingerprint data points were used as the coordinates of an unknown indoor spatial location points after the proposed stable parity using the inverse of the nth power of the Euclidean distance as the weights [27].
The weight calculation formula is
w i , i = 1 D i , i + ε
The predicted coordinates of the point to be determined are calculated as
( x , y ) i B e a c o n = i = 1 k w i , i ( x i , y i )
where ( x , y ) i B e a c o n denotes the predicted coordinates of the unknown indoor spatial location point, w i , i denotes the assigned weight, ε is a small constant added to avoid the denominator being zero, D i , i denotes the Euclidean distance from the received signal strength (RSS) data spatial location point to the ith fingerprint data point obtained from the real-time acquisition measurement, and ( x i , y i ) is the measured coordinate value of the ith fingerprint data point.

3. Results

3.1. Effective iBeacon Signal Coverage Radius

Before deploying iBeacons, the most reasonable spacing and height of the iBeacons need to be determined. Therefore, experiments that measure the effective coverage of the iBeacon signal need to be conducted first. Five iBeacons of the same version were attached to the wall at the heights of 2 m, 2.3 m, 2.6 m, 2.9 m, and 3.2 m from the floor, and the experimental data were collected at three time periods: 9:00–11:00, 15:00–17:00, and 19:00–21:00. Beginning at the position directly opposite the iBeacon (0 m), along the wall line direction, it was collected until 30 m was reached, where the broadcast frequency of the iBeacon was set to 10 Hz and the sampling time of each position was 12 s. The relationship between the RSS and distance is shown in Figure 3.
According to Figure 3, the maximum value of the received signal strength (RSS) was about −55 dBm during all three time periods, without obvious fluctuations. The received signal strength (RSS) changed approximately to the same extent with distance attenuation, whereby the received signal strength (RSS) of the side distance between 0 m and 20 m decayed rapidly, and the iBeacon deployed at the 2.6 m height was higher than the iBeacon at other heights during all three time periods. The average received signal strength (RSS) of the iBeacon at 2.3 m, 2.9 m, and 3.2 m was higher compared to that of other heights. Considering that the iBeacon device may be more affected by the multi-path effect at the 2.9 m height, the highest peak of the RSS at 2.9 m height appeared around 2 m away from the iBeacon. According to the sampling data in Table 1, it is known that the missing signal rate was higher above 10 m. This indicates that the deployment height of the best way of the iBeacon at this experimental environment site is 2.6 m, and the effective coverage of the iBeacon signal should be within 10 m.

3.2. Environmental Sites for the Test and Measurement

In order to evaluate the improvement effect and accuracy of the WKNN algorithm implemented in this study on the performance of fingerprint database localization measurement at the indoor spatial environment site, we used experimental buildings A and B as the indoor spatial experimental environment site and conducted experimental measurement tests on the performance of the fingerprint database spatial location localization according to the technical design protocol.
The area of the space experiment environment was about 124 and 180 square meters in experimental buildings A and B, respectively. The topographical sketch of the two space experiment environments is shown in Figure 4 and Figure 5. The main hardware equipment in this spatial location measurement experiment was 18 iBeacons based on Bluetooth 5.0 and 1 Xiaomi CC9 cell phone. The transmitting power of the beacons used in this experiment was set to 0 dBm and the broadcasting frequency was 10 Hz. iBeacons should be deployed and selected for the two spatial positioning experimental sites to avoid obstacles, strong electrical and magnetic areas, and other unfavorable measurement factors.
In order to reduce the influence of factors such as environment and equipment on experimental results, combined with the iBeacon signal effective coverage radius test measurement experiment in Section 3.1, the interval between two adjacent iBeacon deployments was controlled at 5–7 m, and the vertical distance from the ground was 2.6 m. The iBeacon was deployed in a uniform and symmetrical manner along the wall space on both sides of the corridor of the A and B experimental buildings. As the width of the corridor of the experimental environment in building A was 2.4 m, and the width of the corridor of the experimental environment in building B was 3.3 m, a total of two columns were collected and measured in the experimental environment of building A, and 26 fingerprint data points were collected and measured in real time. A total of three columns were collected and measured in the experimental environment of building B, and 65 fingerprint data points were collected and measured in real time.

3.3. Analysis of Pre-Processing Parity Results of the GM(1,1) Model

Based on the GM(1,1) model pre-processing smoothing method, three sets of test experiments were conducted in this study to further verify the effectiveness of the method. The first group of test experiments used GM(1,1) model-based pre-process leveling, followed by fingerprint data building; the second group of test experiments used the mean filter method for pre-process leveling, followed by fingerprint data building; and the third group of test experiments used the Gaussian filter method for pre-process leveling, followed by fingerprint data building. The spatial location test measurement points were randomly selected, and the indoor spatial location test was performed using the WKNN method.
The root mean square error (RMSE) after pre-process leveling using the GM(1,1) model, mean filtering, and Gaussian filtering are shown in Figure 6. As shown at Figure 6, at the environmental site of the spatial experiment field where building A was located, the RMSE was ±2.218 m when the GM(1,1)-based model is used for pre-process leveling; the RMSE was ±2.263 m when the mean filter was used for pre-process leveling; and the RMSE was ±2.661 m when the Gaussian filter was used for pre-process leveling. Therefore, when comparing the pre-process leveling based on the GM(1,1) model with the mean filter and Gaussian filter methods, the spatial position positioning accuracy of the room after its leveling was improved by 5.9% and 16.5%, respectively. At the environmental site of the spatial experiment field where building B was located, the RMSE was ±2.397 m when the GM(1,1)-based model was used for pre-process leveling; the RMSE was ±2.466 m when the mean filter was used for pre-process leveling; and the RMSE was ±2.686 m when the Gaussian filter was used for pre-process leveling. Therefore, when comparing the pre-process leveling based on the GM(1,1) model with the mean filter and Gaussian filter methods, the spatial position positioning accuracy of the room after its leveling was improved by 2.8% and 10.8%, respectively.
Based on the above results, it can be inferred that the fingerprint data localization algorithm using the GM(1,1)-model-based pre-process leveling is significantly better than the two algorithms such as mean filtering and Gaussian filtering.

3.4. GM(1,1) + IDW Interpolation

The accuracy and effect after pre-process leveling based on the GM(1,1) model are much better than the mean value of pre-process leveling using the mean filtering and Gaussian filtering. In order to compare the effect of IDW and ordinary kriging (OK) interpolation on the optimization of the original fingerprint database, this study used the data after pre-process leveling based on the GM(1,1) model to construct the fingerprint database defined as GM(1,1), which is also called the original fingerprint database. Three sets of experiments were pre-processed in this study. The first set was the original fingerprint database; the second set was the processing optimization of the original fingerprint database using IDW interpolation; and the third set was the processing optimization of the original fingerprint database using ordinary kriging (OK) interpolation. WKNN was used as the real-time phase solving matching localization algorithm.
The cumulative distribution function (CDF) plots of the localization errors of the fingerprint databases constructed by the three algorithms in the experimental field environment of the experimental buildings A and B are shown in Figure 7. The average localization error, RMSE, and maximum error are shown in Figure 8.
Figure 9 and Figure 10 show the trajectory maps of the location test under at different indoor spatial experimental environment sites. Based on the different indoor spatial location experimental environment sites, there are some differences in the number of interpolated fingerprint data points.
According to Figure 7, at the indoor experimental environment site of experimental building A, the GM(1,1) + IDW fold was higher than the GM(1,1) fold and the GM(1,1) + OK fold, respectively. From the analytical study of the test trajectory graph in Figure 9, it is known that the test trajectory of GM(1,1) + IDW interpolation fitted better than the test trajectory of GM(1,1) + OK interpolation and was closer to the trajectory of the real path. According to the analysis study in Figure 8, it can be inferred that the RMSE of GM(1,1) + IDW localization leveling results was ±1.575 m and the average localization error was ±1.415 m, which was about 17.9% and 17.8% lower compared with GM(1,1); the RMSE of GM(1,1) + OK localization leveling results was ±1.752 m and the average localization error was ±1.548 m, respectively. Compared with GM(1,1), the RMSE was ±1.752 m and the average positioning error was ±1.548 m, which were reduced by 8.6% and 10.0%, respectively.
Based on the results shown in Figure 8, at the indoor experimental environment site in the experimental building B, the analysis study shows that the folds based on the GM(1,1) + IDW interpolation method were higher than those based on the GM(1,1) model folds and the GM(1,1) + OK interpolation method folds. Combined with the analysis study of the test trajectory graph shown in Figure 10 it is known that the test trajectory based on the GM(1,1) + IDW interpolation method fitted better than the test trajectory based on the GM(1,1) + OK interpolation method and was closer to the real trajectory. According to the data in Figure 8, the RMSE of positioning pre-processing parity results based on GM(1,1) + IDW interpolation was ±2.032 m, and the average positioning error is ±1.695 m. Compared with the pre-processing parity based on the GM(1,1) model, the RMSE was reduced by 13.4% and 18.6%, respectively. For the spatial position positioning parity results based on the GM(1,1) + OK interpolation method, the RMSE was ±2.080 m, and the average positioning error was ±1.747 m; compared with the pre-processing parity based on the GM(1,1) model, it was reduced by 12.7% and 17.0%, respectively.
In summary, the inverse distance weighted optimization WKNN algorithm for indoor localization based on the GM(1,1) model implemented in this study had advantages over the algorithm of the original fingerprint database and the optimization algorithm based on the combination of the GM(1,1) model + OK interpolation.

4. Discussion

It is urgent and necessary to explore an optimized algorithm to construct a high-performance fingerprint database in a simple and convenient way to provide high-precision positioning services in indoor environments for a wide range of users.
To address the existing problem of a large workload in fingerprint database construction, the literature [24] draws upon Gaussian filtering and the spherical model to obtain the spatially propagated variance characteristic function and the generated fingerprint database using the OK algorithm. Although this method reduces the library building workload, it is computationally intensive, and the fingerprint database localization performance is greatly affected by the variance characteristic function. In the literature [28], a hybrid filtering method was used, in which the mean, median, and Gaussian filtering results were averaged to equalize the differences. The limitation of this method is that although it avoids deviations from large error values, it does not improve the fingerprint database localization performance significantly.
The inverse distance weighted interpolation optimization WKNN algorithm for indoor localization based on the GM (1,1) model proposed in this study uses the advantages of the GM (1,1) model with a lower amount of required data collection and more convenient operation to perform pre-process leveling to enhance the optimization of RSS data de-noise fitting and achieve the purpose of smoothing noise. However, it also incorporates the use of IDW interpolation to perform local interpolation leveling to achieve the effect of expanding the capacity of the fingerprint database, realizing the rapid construction of the fingerprint database, and improving localization performance.

5. Conclusions

In this study, an inverse distance weighted interpolation optimization WKNN algorithm based on the GM(1,1) model was implemented and tested to address the problem of poor spatial location accuracy due to the low stability of the sampled measurement data and sparse reference fingerprint data points during the offline phase of indoor spatial location positioning using a fingerprint database. In order to examine the accuracy and effectiveness of the proposed optimization algorithm, a series of experiments were conducted to test the localization using a WKNN matching algorithm from the perspectives of effective coverage of an iBeacon signal, pre-processing parity of the sampled data, and interpolation of the fingerprint database.
The results show that the effective coverage of the iBeacon is approximately 10 m.
(1) The localization accuracy of the fingerprint database after preprocessing using the GM(1,1) model and IDW interpolation was significantly improved compared with that after the GM(1,1) model preprocessing and OK interpolation. The average localization error and RMSE were reduced by approximately 5.9% and 6.2%, respectively.
(2) The localization accuracy of the fingerprint database after preprocessing using the GM(1,1) model and IDW interpolation was significantly improved compared with that of the original fingerprint database. The average localization error and RMSE were reduced by about 18.2% and 15.7%, respectively.
The data showed that the optimization algorithm proposed in this study effectively improves the positioning accuracy and performance, and significantly reduced the positioning error caused by the low stability of the sampled measurement data in the offline stage and the sparse reference fingerprint data points, which lead to poor spatial position positioning accuracy.
The limitation of this study was that the continuity and instantaneity of the fusion technique of the fingerprint data spatial location method was not sufficiently studied. In future research, it is important to study the technology of convergence of the fingerprint data spatial localization method in real time. Additionally, optimizing the processing algorithm for heading angle during turning can further enhance performance and continuity. By doing so, the positioning performance of fingerprint data spatial location positioning algorithm can be improved, aligning it with the actual production work needs.

Author Contributions

Conceptualization, Y.X. and L.X.; methodology, L.X. and Y.X.; software, L.X.; validation, Y.X., J.C. and Y.L.; formal analysis, L.X., J.C. and Y.L.; investigation, L.X., J.C. and R.W.; data curation, L.X.; writing—original draft preparation, L.X.; writing—review and editing, Y.X., J.C., Y.L., R.W. and G.L.; supervision, Y.X.; project administration, J.C.; funding acquisition, J.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National College Students‘ innovation and entrepreneurship training program (No. 202210424056).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Rizk, H.; Abbas, M.; Youssef, M. Device-independent cellular-based indoor location tracking using deep learning. Pervasive Mob. Comput. 2021, 75, 19. [Google Scholar] [CrossRef]
  2. Arbula, D.; Ljubic, S. Indoor Localization Based on Infrared Angle of Arrival Sensor Network. Sensors 2020, 20, 6278. [Google Scholar] [CrossRef] [PubMed]
  3. Spachos, P.; Plataniotis, K.N. BLE Beacons for Indoor Positioning at an Interactive IoT-Based Smart Museum. IEEE Syst. J. 2020, 14, 3483–3493. [Google Scholar] [CrossRef] [Green Version]
  4. Ouyang, G.L.; Abed-Meraim, K.; Ouyang, Z.K. Magnetic-Field-Based Indoor Positioning Using Temporal Convolutional Networks. Sensors 2023, 23, 1514. [Google Scholar] [CrossRef] [PubMed]
  5. Paterna, V.C.; Auge, A.C.; Aspas, J.P.; Bullones, M.A.P. A Bluetooth Low Energy Indoor Positioning System with Channel Diversity, Weighted Trilateration and Kalman Filtering. Sensors 2017, 17, 2927. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  6. Yao, C.Y.; Hsia, W.C. An Indoor Positioning System Based on the Dual-Channel Passive RFID Technology. IEEE Sens. J. 2018, 18, 4654–4663. [Google Scholar] [CrossRef]
  7. Alarifi, A.; Al-Salman, A.; Alsaleh, M.; Alnafessah, A.; Al-Hadhrami, S.; Al-Ammar, M.A.; Al-Khalifa, H.S. Ultra wideband indoor positioning technologies: Analysis and recent advances. Sensors 2016, 16, 707. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  8. Ali, M.U.; Hur, S.; Park, S.; Park, Y. Harvesting indoor positioning accuracy by exploring multiple features from received signal strength vector. IEEE Access 2019, 7, 52110–52121. [Google Scholar] [CrossRef]
  9. Liu, F.; Liu, J.; Yin, Y.; Wang, W.; Hu, D.; Chen, P.; Niu, Q. Survey on WiFi-based indoor positioning techniques. IET Commun. 2020, 14, 1372–1383. [Google Scholar] [CrossRef]
  10. Mazhar, F.; Khan, M.G.; Sällberg, B. Precise indoor positioning using UWB: A review of methods, algorithms and implementations. Wirel. Pers. Commun. 2017, 97, 4467–4491. [Google Scholar] [CrossRef]
  11. De Sousa, F.S.; Capovilla, C.E.; Casella, I.R. Analysis of Bluetooth low energy technology in indoor environments. In Proceedings of the 2016 IEEE International Symposium on Consumer Electronics (ISCE), Austin, TX, USA, 14–22 May 2016; pp. 55–56. [Google Scholar]
  12. Haverinen, J.; Kemppainen, A. A global self-localization technique utilizing local anomalies of the ambient magnetic field. In Proceedings of the 2009 IEEE International Conference on Robotics and Automation, Kobe, Japan, 12–17 May 2009; pp. 3142–3147. [Google Scholar]
  13. Galván-Tejada, C.E.; García-Vázquez, J.P.; Brena, R.F. Magnetic field feature extraction and selection for indoor location estimation. Sensors 2014, 14, 11001–11015. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  14. Li, K.; Bigham, J.; Bodanese, E.L.; Tokarchuk, L. Location estimation in large indoor multi-floor buildings using hybrid networks. In Proceedings of the 2013 IEEE Wireless Communications and Networking Conference (WCNC), Shanghai, China, 7–10 April 2013; pp. 2137–2142. [Google Scholar]
  15. Gozick, B.; Subbu, K.P.; Dantu, R.; Maeshiro, T. Magnetic maps for indoor navigation. IEEE Trans. Instrum. Meas. 2011, 60, 3883–3891. [Google Scholar] [CrossRef]
  16. Li, Y.; Yan, K. Indoor Localization Based on Radio and Sensor Measurements. IEEE Sens. J. 2021, 21, 25090–25097. [Google Scholar] [CrossRef]
  17. Zeng, L.C.; He, Z.F.; Tan, Z.R.; Geng, R.L.; Liu, M.H.; Xia, L.L.; Lin, D.Y. Analysis and modelling of iBeacon wireless signal propagation in multiple environments. Int. J. Sens. Netw. 2021, 37, 254–264. [Google Scholar] [CrossRef]
  18. Bai, S.; Yan, M.; Wan, Q.; He, L.; Wang, X.; Li, J. DL-RNN: An accurate indoor localization method via double RNNs. IEEE Sens. J. 2019, 20, 286–295. [Google Scholar] [CrossRef]
  19. Ezhumalai, B.; Song, M.; Park, K. An Efficient Indoor Positioning Method Based on Wi-Fi RSS Fingerprint and Classification Algorithm. Sensors 2021, 21, 3418. [Google Scholar] [CrossRef] [PubMed]
  20. Li, K.; Li, J.H.; Jiao, Y.T.; Ding, G.R.; Dong, S.H. An Expectation Maximization Solution for RSS Target Localization by Gaussian Mixture Noise Analysis. In Proceedings of the 12th International Conference on Signal Processing Systems, Electr Network, Shanghai, China, 6–9 November 2020. [Google Scholar]
  21. Qian, W.Y.; Wang, J. An improved seasonal GM(1,1) model based on the HP filter for forecasting wind power generation in China. Energy 2020, 209, 118499. [Google Scholar] [CrossRef]
  22. Zheng, X.P.; Chen, P.; Shang, J.G. Reference Points Density Invariant Map Matching for Wi-Fi Fingerprinting Positioning. In Proceedings of the 26th International Conference on Geoinformatics (Geoinformatics), Yunnan Normal University, Kunming, China, 28–30 June 2018. [Google Scholar]
  23. Bokati, L.; Velasco, A.; Kreinovich, V. Scale-Invariance and Fuzzy Techniques Explain the Empirical Success of Inverse Distance Weighting and of Dual Inverse Distance Weighting in Geosciences. In Proceedings of the Annual Conference of the North-American-Fuzzy-Information-Processing-Society (NAFIPS), Electr Network, Online, 19–22 August 2020; pp. 379–390. [Google Scholar]
  24. Wang, P.; Feng, Z.H.; Tang, Y.; Zhang, Y.Z. A fingerprint database reconstruction method based on ordinary Kriging algorithm for indoor localization. In Proceedings of the IEEE International Conference on Intelligent Transportation, Big Data & Smart City (ICITBS), Changsha, China, 12–13 January 2019; pp. 224–227. [Google Scholar]
  25. Peng, X.S.; Chen, R.Z.; Yu, K.G.; Ye, F.; Xue, W.X. An Improved Weighted K-Nearest Neighbor Algorithm for Indoor Localization. Electronics 2020, 9, 2117. [Google Scholar] [CrossRef]
  26. Wang, Y.; Ren, W.J.; Cheng, L.; Zou, J.J. A Grey Model and Mixture Gaussian Residual Analysis-Based Position Estimator in an Indoor Environment. Sensors 2020, 20, 3941. [Google Scholar] [CrossRef] [PubMed]
  27. Li, G.F.; Li, L.; Zheng, Z.H.; Cheng, X.; Xu, Y. A Fingerprint Database Optimization Algorithm Based on GM(1,1) Model and IDW Interpolation. China Satellite Navigation System Management Office Academic Exchange Center. In Proceedings of the 12th Annual China Satellite Navigation Conference—S09 User Terminal Technology, Nanchang, China, 26–28 May 2021; pp. 50–56. [Google Scholar] [CrossRef]
  28. Zhang, X.N.; Zhang, S.F.; Wang, C.; Sun, S.J. Regional Double-Layer, High-Precision Indoor Positioning System Based on iBeacon Network. Math. Probl. Eng. 2022, 2022, 12. [Google Scholar] [CrossRef]
Figure 1. Technology route.
Figure 1. Technology route.
Remotesensing 15 03706 g001
Figure 2. Schematic diagram of the offline fingerprint database after interpolation.
Figure 2. Schematic diagram of the offline fingerprint database after interpolation.
Remotesensing 15 03706 g002
Figure 3. The relationship between the RSS and the distance. Time periods (a) 9:00−11:00 AM; (b) 15:00−17:00 PM; (c) 19:00−21:00 PM.
Figure 3. The relationship between the RSS and the distance. Time periods (a) 9:00−11:00 AM; (b) 15:00−17:00 PM; (c) 19:00−21:00 PM.
Remotesensing 15 03706 g003aRemotesensing 15 03706 g003b
Figure 4. Schematic diagram of the experimental site in building A.
Figure 4. Schematic diagram of the experimental site in building A.
Remotesensing 15 03706 g004
Figure 5. Schematic diagram of the experimental site in building B.
Figure 5. Schematic diagram of the experimental site in building B.
Remotesensing 15 03706 g005
Figure 6. RMSE of the three pretreatment methods.
Figure 6. RMSE of the three pretreatment methods.
Remotesensing 15 03706 g006
Figure 7. (A): CDF comparison graph under WKNN matching location algorithm. (B): CDF comparison graph under WKNN matching location algorithm. Note: GM(1,1): original fingerprint database; GM(1,1) + IDW: fingerprint database optimization algorithm based on GM(1,1) and IDW interpolation; GM(1,1) + OK: fingerprint database optimization algorithm based on GM(1,1) and OK interpolation. The same parameters are shown below.
Figure 7. (A): CDF comparison graph under WKNN matching location algorithm. (B): CDF comparison graph under WKNN matching location algorithm. Note: GM(1,1): original fingerprint database; GM(1,1) + IDW: fingerprint database optimization algorithm based on GM(1,1) and IDW interpolation; GM(1,1) + OK: fingerprint database optimization algorithm based on GM(1,1) and OK interpolation. The same parameters are shown below.
Remotesensing 15 03706 g007
Figure 8. Comparison of the mean error, RMSE, and maximum error.
Figure 8. Comparison of the mean error, RMSE, and maximum error.
Remotesensing 15 03706 g008
Figure 9. Building A: trajectory diagrams of different algorithms. (a) GM(1,1); (b) GM(1,1) + IDW; (c) GM(1,1) + OK; (d) comparison of trajectories.
Figure 9. Building A: trajectory diagrams of different algorithms. (a) GM(1,1); (b) GM(1,1) + IDW; (c) GM(1,1) + OK; (d) comparison of trajectories.
Remotesensing 15 03706 g009
Figure 10. Building B: trajectory diagrams of different algorithms. (a) GM(1,1); (b) GM(1,1) + IDW; (c) GM(1,1) + OK; (d) comparison of trajectories.
Figure 10. Building B: trajectory diagrams of different algorithms. (a) GM(1,1); (b) GM(1,1) + IDW; (c) GM(1,1) + OK; (d) comparison of trajectories.
Remotesensing 15 03706 g010
Table 1. The number of samples at each location.
Table 1. The number of samples at each location.
Distance (m)024681012141618202224262830
Height (m) Number of Samples
2.09:00–11:00 a.m.6160131731221910102101
2.343352224121967851314318
2.65126452519205483375512
2.9464751211373856411011
3.2344138121445333042250
2.015:00–17:00 p.m.524626273222212169111202110
2.355234131322429681012797119
2.669494744253414109188210636
2.949662925173267106535320
3.243473950342114768327889
2.019:00–21:00 p.m.50373016291414472672913
2.338462130153281237733862
2.65040442617316584633346
2.93962273117765520221042
3.238454626261311263724224
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Xiang, L.; Xu, Y.; Cui, J.; Liu, Y.; Wang, R.; Li, G. GM(1,1)-Based Weighted K-Nearest Neighbor Algorithm for Indoor Localization. Remote Sens. 2023, 15, 3706. https://doi.org/10.3390/rs15153706

AMA Style

Xiang L, Xu Y, Cui J, Liu Y, Wang R, Li G. GM(1,1)-Based Weighted K-Nearest Neighbor Algorithm for Indoor Localization. Remote Sensing. 2023; 15(15):3706. https://doi.org/10.3390/rs15153706

Chicago/Turabian Style

Xiang, Lai, Ying Xu, Jianhui Cui, Yang Liu, Ruozhou Wang, and Guofeng Li. 2023. "GM(1,1)-Based Weighted K-Nearest Neighbor Algorithm for Indoor Localization" Remote Sensing 15, no. 15: 3706. https://doi.org/10.3390/rs15153706

APA Style

Xiang, L., Xu, Y., Cui, J., Liu, Y., Wang, R., & Li, G. (2023). GM(1,1)-Based Weighted K-Nearest Neighbor Algorithm for Indoor Localization. Remote Sensing, 15(15), 3706. https://doi.org/10.3390/rs15153706

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop