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, , of n fingerprint points (where k = 1, 2, …, n) are known, and after preprocess leveling, the predicted value of 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:
(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
was obtained by accumulating
:
(3) The following formula was used to calculate the immediate mean
(4) A GM(1,1) fitting model was developed and the predicted RSS was obtained
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.
The response function is:
For the above function, is the estimated value of and is the estimated value of , 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.
was the original series,
was the model prediction series, and
was the residual series. The mean and variance of each series were
The variance ratio , and the probability of small errors , were defined. Usually, and have the highest accuracy class.
2.2. Inverse Distance Weighted Interpolation
The inverse distance weighted (IDW) interpolation model is shown in Equation (8):
where α is the distance decay coefficient,
is the observed value at point
;
is the number of nearest points,
is the distance between the unknown point
and the known point
, and
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
of measurement point
to be inserted, and the
k nearest neighbor fingerprint points
of the inserted point (where,
) are found, the attribute value of point
to be inserted can be found using the following equations:
In the above equations, () is the weight of the attribute value of the fingerprint point to the insertion point, and 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
The predicted coordinates of the point to be determined are calculated as
where
denotes the predicted coordinates of the unknown indoor spatial location point,
denotes the assigned weight,
is a small constant added to avoid the denominator being zero,
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
is the measured coordinate value of the ith fingerprint data point.
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.