The disclosure belongs to the field of positioning technology, and more specifically relates to a fingerprint positioning method and system in a smart classroom.
In a smart classroom, it is important to carry out attendance check and take records, conduct real-time interaction between teachers and students, transmit teaching-related data and record and perform group-interaction based teaching, but these tasks are essentially based on the students' positions in the classroom space, so there is an urgent need to conduct research and studies on classroom space positioning. A variety of indoor positioning technologies have emerged for complex indoor environments, such as positioning technologies based on wireless local area networks, RFID, ZigBee and iBeacon. Indoor positioning based on iBeacon technology has the advantages of low cost and low power consumption, so many researches on indoor positioning algorithms based on iBeacon technology have been developed.
iBeacon is a Bluetooth technology with low power consumption that operates based on the principle similar to previous Bluetooth technologies. Signals are transmitted from iBeacon, a Bluetooth device is positioned and accepts the signals, and feedback the signals. When a user enters, exits, or move around within an area, the iBeacon's broadcast is able to propagate, and the distance between the user and the iBeacon can be calculated (calculation can be performed through the received signal strength indicator RSSI).
Typical indoor positioning methods are based on direction of arrival (DOA), time difference of arrival (TDOA), time of arrival (TOA), received signal strength indicator (RSSI) and so on. The RSSI based indoor positioning algorithm is mainly divided into two categories, namely, the geometric positioning method based on ranging and the fingerprint positioning method based on pattern matching model.
The core algorithms used by fingerprint positioning generally include machine learning algorithms such as KNN, SVM, neural network, and decision tree. The algorithm of the KNN model is widely adopted because of its complexity, low hardware cost and computational cost. Therefore, the KNN algorithm is an algorithm mainly used for indoor fingerprint positioning. The improvement of the weight of the fingerprint positioning algorithm based on KNN is made mainly in two aspects. The first aspect is to introduce the weight when calculating the Euclidean distance for matching.
For example, in literature [1] (Chen Shunming, Li Ping. Research on environment adaptive indoor positioning algorithm based on RSSI weight [J]. Computer Engineering and Applications, 2015, 51(22): 99-103), RSSI-based weights are introduced when calculating Euclidean distance for matching, and environmental adaptation is improved. The second aspect is to introduce the weight, that is, the weighted center of mass, when finding the nearest neighbor points to solve the center of mass, and the position of the center of mass is the final estimate of position. With such algorithm, the environmental adaptability and positioning accuracy are improved, but the algorithms is more complicated.
For example, literature [2] (Peng Hong, Zhao Yang, Xia Tianpeng. WSN weighted center of mass positioning algorithm based on optimized RSSI accuracy [J]. Computer Engineering and Applications, 2015, 51 (21): 88-91) is a type of optimized weighted center of mass algorithm which uses the reciprocal of the actual distance between the reference node and to-be-tested node as the weight. Since the indoor environment is relatively complicated, the actual distance determined based on the signal attenuation model has large deviation; besides, the weight is fixed, there is no environmental adaptability, and the positioning accuracy is not high.
In another example, literature [3] (Wu Zetai, Cai Renqin, Xu Shuyan, Wu Xiaosi, Fu Yuli. Research and improvement of WiFi positioning based on K-nearest neighbor method [J]. Computer Engineering, 2017, 43(03): 289-293) obtains estimated coordinates based on the weight of the similarity between the to-be-trained sample and trained samples by weighting the center of mass. Although the positioning time is shortened, the accuracy is not improved and there is no environmental adaptability. It can be learned that there is no research based on the Euclidean distance weight, and current researches have poor adaptability with respect to the complex indoor environment.
To solve the problem of low positioning accuracy, poor environmental adaptability and unstable positioning result in conventional indoor fingerprint positioning algorithms, the present disclosure provides a fingerprint positioning method in a smart classroom with the purpose of improving indoor positioning accuracy, environmental adaptability and stability of positioning results.
An indoor fingerprint positioning method includes an offline database establishing phase and an online positioning phase;
Specifically, the offline database establishing phase is:
(S1) Arranging P iBeacons inside the room as the wireless signal transmitting terminals; gridding the room, defining an intersection point of a grid as an anchor node, recording the physical coordinates of the nth anchor node Ln=(xn, yn), n=1, L, N;
(S2) collecting a signal strength value RSSIijn transmitted by the jth iBeacon at the nth anchor node, at the ith sampling moment, n=1, L, N, i=1, L, M, j=1, L, P;
(S3) Gaussian filtering and averaging the M signal strength values transmitted by the jth iBeacon collected at the nth anchor node, and an average is used as a standard signal strength values of the jth iBeacon collected at the nth anchor node and recorded as the original fingerprint Fn(PRan1, L, PRanP), n=1, L, N;
(S4) constituting a fingerprint database, n=1, L, N, by the physical coordinates Ln=(xn, yn) at the nth anchor node and the corresponding original fingerprint Fn=(PRan1, L, PRanP);
Specifically, the online positioning phase comprises:
(T1) collecting the signal strength value RSSIj transmitted by the jth iBeacon at the to-be-measured point, j=1, L, P;
(T2) according to the signal strength value RSSIj, j=1, L, P searches for K anchor nodes that are the closest to its signal strength value in the fingerprint database as the reference anchor nodes;
(T3) calculating a coordinate (X, Y) of the to-be-measured point according to the reference anchor nodes:
(xk, yk) is the coordinate of the kth reference anchor node, ωk is the weight coefficient, k=1, L, K;
In the weight coefficient
dk represents the Euclidean distance between the to-be-measured point and the kth reference anchor node, β is the second weight index.
Further, the specific implementation of the step (T2) is: calculating the Euclidean distance D(n)=√{square root over (Σn=1Nω′jg(PRanj−RSSIj)2)} between the to-be-measured point and the anchor node according to the signal strength, j=1, L, P, wherein,
α is the first weight index.
Further, the specific implementation of the step (S3) Gaussian filtering and averaging is:
At the nth anchor node, n=1, L, N, determining the confidence interval of the signal strength
At nth anchor node, n=1, L, N, extracting the M′ signal strengths RSSIijn, i′=1, L, M′ in the confidence interval, calculating the average of the extracted M′ signal strengths
An indoor fingerprint positioning system, including P iBeacon wireless signal transmitting terminals, Bluetooth devices and a data processing center;
iBeacon for transmitting wireless signals;
Bluetooth device for collecting wireless signals;
the data processing center configured to position the to-be-measured point according to the collected wireless signal, specifically:
including the offline database establishing phase and the online positioning phase;
wherein, specifically, the offline database establishing phase comprises:
(S1) gridding the room, gridding the intersection point as an anchor node, recording the physical coordinates of the nth anchor node Ln=(xn, yn), n=1, L, N;
(S2) collecting the signal strength value RSSIijn transmitted by the jth iBeacon at the nth anchor node, at the ith sampling moment, n=1, L, N, i=1, L, M, j=1, L, P;
(S3) Gaussian filtering and averaging the M signal strength values transmitted by the jth iBeacon collected at the nth anchor node, and an average is used as a standard signal strength values of the jth iBeacon collected at the nth anchor node and recorded as the original fingerprint Fn=(PRan1, L, PRanP), n=1, L, N;
(S4) constituting a fingerprint database, n=1, L, N, by a physical coordinates Ln=(xn, yn) at the nth anchor node and the corresponding original fingerprint Fn=(PRan1, L, PRanP);
wherein, specifically the online positioning phase comprises:
(T1) collecting the signal strength value RSSIj transmitted by the jth iBeacon at a to-be-measured point, j=1, L, P;
(T2) according to the signal strength value RSSIj, j=1, L, P searches for the K anchor nodes that are the closest to its signal strength value in the fingerprint database as the reference anchor nodes;
(T3) calculating a coordinate (X, Y) of the to-be-measured point according to the reference anchor nodes:
(xk, yk) is the coordinate of the kth reference anchor node, ωk is the weight coefficient, k=1, L, K;
wherein in the weight coefficient
dk represents the Euclidean distance between the to-be-measured point and the kth reference anchor node, β is the second weight index.
The beneficial technical effects of the present disclosure are embodied in:
The disclosure firstly performs Gaussian filtering and averaging on the wireless signal strength value RSSI in the fingerprint database; then finds the neighbor point that is the closest to the signal strength of the to-be-measured point. Finally, the Euclidean distance is used as the weight reference, and the weighted center of mass is obtained for the nearest neighbors. The weight index is introduced as an index of the weight, and the coordinates of the to-be-tested node are obtained. The disclosure has higher positioning accuracy, smaller positioning error fluctuation and greater environmental adaptability.
In order to make the purpose, technical solutions and advantageous effect of the present disclosure clearer, the disclosure is further described in detail below with reference to accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the disclosure and are not intended to limit the disclosure. In addition, the technical features involved in the various embodiments of the present disclosure can be combined with each other as long as they do not form a conflict with each other.
Specifically, the offline database establishing phase is the following:
(S1) arranging P iBeacons inside the room as the wireless signal transmitting terminals; gridding the room, defining an intersection point of a grid as an anchor node, recording the physical coordinates of the nth anchor node Ln=(xn, yn), n=1, L, N
The actual ground of the application scenario is gridded. The optimal gridding scheme that is adopted is dividing the ground into square grids of 1 m×1 m=1 m2. The iBeacon equipment is arranged on the ceiling or wall of the application site. The optimal layout scheme is to deploy four iBeacon devices at four corners of a venue with a size of 10 m×10 m=100 m2.
(S2) collecting the signal strength value RSSIijn transmitted by the jth iBeacon at the nth anchor node, at the ith sampling moment, n=1, L, N, i=1, L, M, j=1, L, P.
(S3) Gaussian filtering and averaging the M signal strength values transmitted by the jth iBeacon collected at the nth anchor node, and an average is used as a standard signal strength values of the jth iBeacon collected at the nth anchor node and recorded as the original fingerprint Fn=(PRan1, L, PRanP), n=1, L, N
According to a preferred embodiment, the specific implementation of Gaussian filtering and averaging is:
At the nth anchor node, n=1, L, N, determining the confidence interval for signal strength
At nth anchor node, n=1, L, N extracting the M′ signal strengths RSSIijn, i′=1, L, M′ in the confidence interval, calculating the average of the extracted M′ signal strengths
(S4) constituting a fingerprint database, n=1, L, N, by the physical coordinates Ln=(xn, yn) at the nth anchor node and the corresponding original fingerprint Fn=(PRan1, L, PRanP).
Specifically, the online positioning phase comprises:
(T1) collecting the signal strength value RSSIj transmitted by the jth iBeacon at a to-be-measured point, j=1, L, P.
(T2) according to the signal strength value RSSIj, j=1, L, P searches for the K anchor node that are the closest to its signal strength value in the fingerprint database as the reference anchor nodes.
According to a preferred embodiment: calculating the Euclidean distance D(n)=√{square root over (Σn=1Nω′jg(PRanj−RSSIj)2)} between the to-be-measured point and the anchor node according to the signal strength, j=1, L, P, wherein,
α is the first weight index.
(T3) Calculating the coordinate (X, Y) of the to-be-measured point according to the reference anchor nodes:
(xk, yk) is the coordinate of the kth reference anchor node, ωk is the weight coefficient, k=1, L, K.
In the weight coefficient
dk represents the Euclidean distance between the to-be-measured point and the kth reference anchor node. The weight index β can be determined through experiments. Or, since its change causes change of average error, there is a functional relationship between β and the average error. Curve fitting is performed according to the weight index and the scatter plot of average positioning error, and the β value of the smallest value taken from the average positioning error is the optimal value.
Calculation of α is the same as the calculation of β, and function relation equation of the α and the average positioning error is determined through experiments or curve fitting, the extremum of the function is solved to determine the optimal α value.
The following example is described in details below with reference to the experimental site shown in
The total area of the classroom is 11.8 m×7.3 m=85.78 m2, and 7 m×7 m=49 m2 is taken as the experimental area. This experiment requires the deployment of 4 iBeacon devices on the ceiling of the smart classroom. The iBeacon equipment adopted in the experiment is manufactured by SENSORO company. The broadcast frequency is of 100 ms-1285 ms and can be adjusted separately. The circle indicated by the arrow in the center is the installation location of the iBeacon device. The device for sensing wireless access point is selected from an Android-based smartphone, model Redmi Note 4X, as a wireless access point with an RSSI value acquisition tool.
Offline database establishing phase:
Step 1: The 4 iBeacon devices required for the experiment are arranged on the classroom ceiling.
Step 2: The experiment area of the classroom is gridded by intervals of one meter, and the grid intersection is used as an anchor node. The RSSI values of the anchor node are collected through the mobile phone. This experiment collects 4D RSSI samples from the 4 iBeacon devices at 25 to-be-tested nodes and 64 anchor nodes. A total of 21360 RSSI samples are collected.
Step 3: The collected RSSI values are processed by Gaussian filtering, and then the geometric average is obtained. Thereafter, the geometric average and the actual physical coordinates together constitute location fingerprint information to establish a fingerprint database.
Online positioning phase:
Step 4: The RSSI data of the to-be-measured point is collected, and weighted Euclidean distances between each to-be-measured point to all anchor nodes are calculated. By the mapping relationship F, weighted KNN matching algorithm is used to match the data of location fingerprint space. In the example, RSSI is used as a weight reference to find the K nearest neighbor points to perform curve fitting on the weight index variable and average positioning error.
Step 5: The weighted Euclidean distance reciprocal calculated in step 4 is used as the weight, and the weight index β is used as the index variable. The weight index parameter and the average positioning error are subjected to curve fitting, and the fitting curve is as shown in
Step 6: Performance indicators such as positioning error, error variance and smallest error are calculated, and the method is evaluated by comparing with other algorithms in terms of performance.
As shown in
The KNN, GKNN, RW, and EDW algorithms are run on the same computer, respectively, and the above four algorithms are evaluated based on four indexes, including average error, largest error, smallest error and error variance, and the comparison result is as shown in Table 1.
It can be seen from Table 1 that the KNN algorithm without being subjected to Gaussian filtering has larger average error than the GKNN algorithm after Gaussian filtering by 0.187 m, and the error variance is larger by 0.2489, indicating that the noise in the indoor environment has a greater influence on the data. After Gaussian filtering, the stability of the positioning result and positioning accuracy are significantly improved.
Comparing the performance of the EDM algorithm with the other three algorithms, the average error of the EDW algorithm is decreased by 0.384 m, 0.197 m and 0.255 m than KNN, GKNN and RW algorithms respectively. The positioning accuracy is improved significantly. The difference between the largest error and the smallest error and the error variance are smaller than other algorithms, indicating that the EDW algorithm has relatively stable positioning performance as the influence of the environment is smaller.
Those skilled in the art will readily understand that the above description is only a preferred embodiment of the present disclosure and should not be construed as limiting the disclosure. Any modifications, substitutions, improvements, and so on made within the spirit and principles of the disclosure should fall within the scope of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201810564419.8 | Jun 2018 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2018/118078 | 11/29/2018 | WO | 00 |