Fingerprint positioning algorithm based on dynamic GS-DBSCAN
Through Gaussian weight filtering and DBSCAN clustering processing of dynamic GS-DBSCAN fingerprint positioning algorithm, the abnormal proximity problem caused by WiFi signal interference is solved, the accuracy and stability of indoor positioning are improved, and more accurate position information is provided.
Patent Information
- Application Number
- CN202411230961.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-24
AI Technical Summary
In indoor environments, WiFi signals are easily disturbed, resulting in the emergence of abnormal neighbors in KNN algorithms, affecting positioning accuracy and stability.
The dynamic GS-DBSCAN fingerprint positioning algorithm is adopted, and the interference of abnormal neighbors is eliminated through the combination of Gaussian weight screening and dynamic DBSCAN clustering, and the effectiveness of neighbors is improved, and the location information is estimated using the WKNN algorithm.
The accuracy and stability of indoor positioning are significantly improved, the cumulative error probability curve converges faster, the positioning accuracy is improved, and the stability is better.
Smart Images

Figure CN119183068A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of indoor navigation and positioning, and in particular to a dynamic GS-DBSCAN fingerprint positioning algorithm. Background Art
[0002] With the continuous development of science and technology and the continuous advancement of wireless communication technology, the application scenarios of location-based services are becoming increasingly diverse, such as the Internet of Things, venue management, location navigation, public services, etc. In indoor environments, due to the complex and changing environment, the global positioning system signal is easily interfered, and effective positioning is difficult to achieve. Researchers at home and abroad have adopted different technologies to achieve accurate positioning in indoor environments. In recent years, positioning technologies such as inertial navigation, Bluetooth, ultrasound, infrared, UWB, and WIFI have been widely studied. Among them, due to the low cost and wide distribution of WiFi technology, the research on WiFi indoor positioning technology has become a hot topic today.
[0003] In WiFi indoor positioning, the KNN algorithm has attracted the attention of many scholars due to its simple algorithm, easy implementation, and high positioning accuracy. In the actual indoor environment, there are many uncertain factors that will cause different degrees of interference to the WiFi signal, resulting in the emergence of abnormal neighboring points; in the KNN algorithm, the interference of abnormal neighboring points is excluded, and not all of the neighboring points are valid. Therefore, a method needs to be studied to eliminate the interference of abnormal neighboring points, improve the effectiveness of neighboring points, and thus improve the stability and accuracy of positioning. Summary of the invention
[0004] The purpose of the present invention is to provide a fingerprint positioning algorithm based on dynamic GS-DBSCAN. First, the k neighboring reference points selected by the K nearest neighbor method are screened by Gaussian weights, the neighboring points are optimized, the interference from abnormal neighboring points is filtered out, and the density characteristics between the neighboring points are made more prominent; then the dynamic neighborhood DBSCAN clustering algorithm is used to cluster them according to the density characteristics between them, and finally the WKNN algorithm is used to estimate the location information.
[0005] The technical solution of the present invention to solve the above problem is as follows: a dynamic GS-DBSCAN fingerprint positioning algorithm, comprising the following steps:
[0006] S1, obtain WiFi data and build fingerprint library;
[0007] S2, select k neighboring reference points using K-nearest neighbor algorithm;
[0008] S3, perform Gaussian weight screening on the obtained K neighboring reference points, optimize and eliminate abnormal neighboring points;
[0009] S4, using the obtained neighboring points, the dynamic neighborhood DBSCAN clustering algorithm is used to process them and cluster them using their density characteristics;
[0010] S5, use the WKNN algorithm to estimate the final position information.
[0011] The beneficial effects of the present invention are:
[0012] The present invention is based on a dynamic GS-DBSCAN fingerprint positioning algorithm. By adopting a processing method combining Gaussian weight filtering and dynamic DBSCAN clustering, the interference of abnormal neighboring points is eliminated, the effectiveness of neighboring points is improved, and thus the stability and accuracy of positioning are improved. When indoor positioning is performed based on the dynamic GS-DBSCAN fingerprint positioning algorithm, the positioning accuracy is significantly improved. At the same time, the cumulative error probability curve of the algorithm converges faster, and has better stability when performing positioning. A new method is provided for indoor positioning technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a schematic diagram of the process of the present invention;
[0014] Figure 2 is a schematic diagram of Gaussian filtering;
[0015] Figure 3 This is a comparison chart of DBSCAN clustering and GS-DBSCAN clustering effects
[0016] Figure 4 This is a comparison chart of the positioning effects of the DBSCAN-WKNN positioning algorithm and the algorithm of the present invention in a fixed field;
[0017] Figure 5 This is a comparison chart of the positioning effects of the algorithm of the present invention, the WKNN algorithm, and the Kmeans-WKNN algorithm. DETAILED DESCRIPTION
[0018] The present invention is further described below with reference to specific examples, which are only used to explain the present invention but not to limit the scope of the present invention.
[0019] like Figure 1 As shown, a dynamic GS-DBSCAN fingerprint positioning algorithm includes the following steps:
[0020] S1, obtain WiFi data and build fingerprint library;
[0021] S2, select k neighboring reference points using K-nearest neighbor algorithm;
[0022] S3, perform Gaussian weight screening on the obtained K neighboring reference points, optimize and eliminate abnormal neighboring points;
[0023] S4, using the obtained neighboring points, the dynamic neighborhood DBSCAN clustering algorithm is used to process them and cluster them using their density characteristics;
[0024] S5, use the WKNN algorithm to estimate the final position information.
[0025] Furthermore, in step S1, an offline fingerprint library is constructed. First, the WIFI signal strength from the pre-arranged access point (AP) base station is collected at each location in the experimental environment, and the coordinates of the location are recorded. Generally, the RSS of each location is processed by mean filtering, and the processed RSS and the corresponding coordinates are stored in the fingerprint library. The fingerprint library data can be expressed as
[0026]
[0027] The fingerprint database S consists of coordinates L and fingerprint information R. n y n ) represents the coordinates of the nth reference point, It is expressed as the signal strength value of the mth AP at the nth reference point.
[0028] Furthermore, in step S2, KNN algorithm is used to select K neighboring points with the smallest Euclidean distance, and then the average value of the K neighboring points is used as the positioning coordinates.
[0029]
[0030] In the formula is the positioning coordinate, (x i y i ) is the coordinate of the i-th neighboring point.
[0031] Furthermore, in step S3, K reference points are selected as neighboring points by the KNN algorithm, the Gaussian weights between the neighboring points are calculated by formula (3), and each column of the matrix W is summed using formula (5) to obtain the sum of the weights s between each neighboring point and other neighboring points. i , use Gaussian weights to measure the distance between neighboring points. The smaller the weight, the greater the distance between neighboring points. Therefore, the Gaussian weights of neighboring points are averaged, and a circle is drawn with the average Gaussian weight as the center and the difference between the average Gaussian weight and the maximum Gaussian weight as the radius. Neighboring points within the circle are retained, and those outside the circle are filtered to obtain n neighboring points after Gaussian filtering.
[0032]
[0033] In the formula, w i,jIt is represented as the Gaussian weight between the i-th and j-th neighboring points. The matrix W can be represented as an undirected graph, so w i,j =w j,i .
[0034] Furthermore, in step S4, the abnormal neighboring points are filtered by using Gaussian weights, so that the data can achieve a more accurate effect. For clustering of neighboring points, since most of them are close to each other, the specific steps are as follows:
[0035] 1) Input the dataset U of neighboring points after dimensionality reduction, neighborhood parameters (neighborhood value—ε, maximum sample parameter—MinPts);
[0036] 2) Using distance measurement, we can take all samples s in U as i As the center, find the sample s i If the number of samples in the sample set is greater than or equal to MinPts, it is added to the core object set Ω, otherwise it is marked as a boundary point or noise point.
[0037] 3) Randomly select a core sample in the set Ω, establish a new cluster set A, add all samples in its ε-neighborhood to cluster A; traverse the samples in the ε-neighborhood of all samples in cluster A and add them to cluster A. Then update the set Ω t =Ω t-1 -A
[0038] 4) Repeat step 3. When , stop the operation and output the clustering result {ABLL}
[0039] Because the accuracy of the DBSCAN clustering algorithm is closely related to the setting of its neighborhood parameters, poor neighborhood parameter settings may cause too many samples to be marked as noise samples or cause too many single clusters to form. Therefore, K-distance is used to implement dynamic ε-neighborhood. The dynamic neighborhood implementation process is as follows:
[0040] 1) In the dataset U, for any sample s i , calculate the distance d between it and any sample in set U except itself k , forming a distance set D = {d1 d2 L d k L n-1}, where d k It is called k-distance.
[0041]
[0042] 2) Sort the distance values in the distance set D to get a set in increasing order of distance
[0043] E={e1 e2 L e n-1}.
[0044] 3) Calculate the distance increment (Delta) between adjacent k-distances and select the inflection point according to the size of the distance increment. The inflection point is usually located at a position with a large distance increment, indicating a transition from one density region to another.
[0045] Delta k =|e k -e k+1 | (7)
[0046] Furthermore, in step S5, after clustering according to the density characteristics between them using the dynamic neighborhood DBSCAN clustering algorithm, the WKNN algorithm is used to estimate the location information.
[0047]
[0048] Embodiment 1:
[0049] To verify the positioning effect based on the dynamic GS-DBSCAN fingerprint positioning algorithm, 4 APs were arranged in an office with an area of about 7m×9m. The 4 APs were arranged in the four corners of the room. Due to the obstruction of objects in the environment, data was collected at intervals of 0.7m in most areas and at intervals of 0.9m in some obstructed areas. The signal strength and coordinates of 76 locations were collected as the fingerprint library. DBSCAN-WKNN and the dynamic GS-DBSCAN fingerprint positioning algorithm were used to predict the coordinates of the test points. The specific effects are as follows: Figure 3 , Figure 4 And as shown in Table 1.
[0050] Table 1. Comparison of positioning algorithm errors
[0051]
[0052] From Example 1, it can be concluded that compared with the algorithm of the present invention, the overall positioning effect of the algorithm of the present invention has been greatly improved, the standard deviation has been reduced to 0.35m, the average error has been reduced to 0.61m, and the maximum and minimum errors have also been greatly improved, reduced to 1.26m and 0.16m respectively; Observation Figure 4 It can be seen that the positioning error of the algorithm of the present invention is significantly better than that of the DBSCAN-WKNN positioning algorithm. Moreover, by observing the cumulative distribution diagram of the error, it can be seen that the positioning error of most test points is kept below 1m, which greatly improves the positioning accuracy.
[0053] Embodiment 2:
[0054] To further verify the positioning performance of the dynamic GS-DBSCAN positioning algorithm, this paper compares it with existing positioning methods, such as the WKNN algorithm and the Kmeans-WKNN algorithm. The specific results are shown in Table 2 and Figure 5 shown.
[0055] Table 2 Comparison of positioning algorithm errors
[0056]
[0057] From Example 2, it can be obtained that: through Table 2 and Figure 5 It can be seen that in terms of maximum error, standard deviation and average error, the positioning effect of the algorithm of the present invention has been significantly improved, and the positioning accuracy is more accurate than the first two positioning methods in terms of overall effect; the cumulative error probability curve of the algorithm of the present invention has been greatly improved compared with the WKNN algorithm and the Kmeans-WKNN algorithm, and 85% of the positioning errors are less than 1m, and the positioning accuracy is more accurate.
Claims
1. A dynamic GS-DBSCAN fingerprint positioning algorithm, characterized in that: The following steps are involved: S1, obtain WiFi data and build a fingerprint library; S2, select k neighboring reference points using K-nearest neighbor algorithm; S3, performing Gaussian weight screening on the obtained K neighboring reference points, optimizing and eliminating abnormal neighboring points; S4, using the obtained neighboring points, the dynamic neighborhood DBSCAN clustering algorithm is used to process them and cluster them using their density characteristics; S5, use the WKNN algorithm to estimate the final position information.
2. According to claim 1, a dynamic GS-DBSCAN fingerprint positioning algorithm is characterized in that: In S1, the signal strength of each WiFi point in the experimental environment is collected. Specifically, data is collected through a laptop. The computer's WiFi module, several APs, and python programming software are mainly used. WiFi data collection uses the pywifi library to call the computer's WiFi module, obtain the WiFi signal strength of the location at different locations, and use the mean filtering method to process the RSS of each location. The processed RSS and the corresponding coordinates are stored in the fingerprint library. The fingerprint library data can be expressed as The fingerprint database S consists of coordinates L and fingerprint information R. n y n ) represents the coordinates of the nth reference point, It is expressed as the signal strength value of the mth AP at the nth reference point.
3. According to claim 1, a dynamic GS-DBSCAN fingerprint positioning algorithm is characterized in that: The S2 uses the KNN algorithm to select the K neighboring points with the smallest Euclidean distance, and then uses the average value of the K neighboring points as the positioning coordinates. The algorithm formula is: In the formula is the positioning coordinate, (x i y i ) is the coordinate of the i-th neighboring point.
4. According to claim 1, a dynamic GS-DBSCAN fingerprint positioning algorithm is characterized in that: In S3, after selecting K reference points as neighboring points by the KNN algorithm, Gaussian weight screening is then performed to optimize and remove abnormal neighboring points. The specific method for Gaussian weight screening is: In the formula, w i,j It is represented as the Gaussian weight between the i-th and j-th neighboring points. The matrix W can be represented as an undirected graph, so w i,j =w j,i .
5. The dynamic GS-DBSCAN fingerprint positioning algorithm according to claim 1 is characterized in that: In S4, the dynamic neighborhood DBSCAN clustering algorithm is used to perform clustering using their density characteristics, and K-distance is used to implement dynamic ε-neighborhood.
6. According to claim 1, a dynamic GS-DBSCAN fingerprint positioning algorithm is characterized in that: In S5, the dynamic neighborhood DBSCAN clustering algorithm performs clustering according to the density characteristics between them, and then uses the WKNN algorithm to estimate the location information:
