Two-stage indoor positioning method and system based on MWKNN-PF

By adopting the two-stage indoor positioning method of MWKNN-PF in indoor positioning, the problem of poor positioning effect of traditional WKNN algorithm during signal fluctuations and environmental changes is solved, and higher real-time and positioning accuracy are achieved.

CN120151786AInactive Publication Date: 2025-06-13周宁
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510425675.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-06-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional fingerprint positioning methods such as WKNN algorithm are affected when signal fluctuations and environmental changes are changed, and the calculation volume is large, making it difficult to meet the real-time requirements.

Method used

A two-stage indoor positioning method based on MWKNN-PF is adopted to obtain fingerprint point signal data in the positioning area, and a fingerprint library is built, clustering algorithm is used to obtain cluster clusters, dynamically select neighboring points, and a state transfer model is constructed for prediction, and finally the precise positioning coordinates are obtained through particle filtering.

Benefits of technology

The calculation load of fingerprint matching work in the line stage is reduced, the overall real-time is improved, and the accuracy and reliability of positioning are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120151786A_ABST
    Figure CN120151786A_ABST
Patent Text Reader

Abstract

The invention discloses a two-stage indoor positioning method and system based on MWKNN-PF, and relates to the technical field of indoor positioning, and the method comprises the steps: obtaining a positioning region, constructing an equidistant grid, and obtaining the receiving signal data of fingerprint points, and each grid intersection point is a fingerprint point; obtaining a vector and a covariance of each fingerprint point according to the received signal data, and constructing a fingerprint database; obtaining a plurality of clusters according to a clustering algorithm; receiving signal data is extracted, and a cluster with the minimum distance is obtained; obtaining the number of adjacent points according to the dynamic selection, and obtaining an initial positioning coordinate according to the weight of the plurality of adjacent points; constructing a prediction model according to the state transition model; the initial positioning result based on the MWKNN algorithm serves as an actual measurement value, particle filtering is conducted on the target state, the accurate position of the target at the # imgabs0 # moment is obtained, compared with the WKNN algorithm, the calculation load of fingerprint matching work in the online stage is greatly reduced, and the overall real-time performance is improved by reducing the calculation load.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of indoor positioning, and specifically relates to a two-stage indoor positioning method and system based on MWKNN-PF. Background Art

[0002] Indoor positioning is a technology for determining the position of an object or a person in an indoor environment. It uses various signal sources, such as Bluetooth, Wi-Fi, ultra-wideband, infrared, ultrasonic, etc., as well as corresponding positioning algorithms and devices to accurately calculate the coordinate position of the target in the indoor space. Different from outdoor positioning technologies (such as GPS), indoor positioning needs to solve problems such as complex indoor environment, signal occlusion, and multipath effect to achieve high positioning accuracy and reliability. Indoor positioning technology is widely used in places such as shopping malls, airports, hospitals, factories, etc., and can be used for various purposes such as navigation, asset tracking, personnel management, intelligent security, etc., providing more convenience and efficiency improvement for people's life and work.

[0003] For traditional fingerprint positioning methods, such as the WKNN (Weighted K-Nearest Neighbor) algorithm, although the positioning accuracy is improved by calculating the contribution of neighboring points with weights, the positioning effect is often affected in cases of signal fluctuations and environmental changes. The WKNN algorithm needs to consider the contributions of all reference points during the calculation process, and the calculation amount is large, making it difficult to meet the real-time requirements. Therefore, the present invention proposes a two-stage indoor positioning method and system based on MWKNN-PF. Summary of the Invention

[0004] To solve the above technical problems, a two-stage indoor positioning method and system based on MWKNN-PF are provided, which solve the problems of large calculation amount and difficulty in meeting the real-time requirements.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A two-stage indoor positioning method based on MWKNN-PF includes: Obtain a positioning area, construct equidistant grids, and obtain the received signal data of fingerprint points, where each grid intersection is a fingerprint point; According to the received signal data, obtain the vector and covariance of each fingerprint point, and construct a fingerprint database; According to the clustering algorithm, obtain multiple clustering clusters; Extract the received signal data and obtain the cluster with the minimum distance; According to dynamic selection, obtain the number of neighboring points, and obtain the initial positioning coordinates according to the weights of multiple neighboring points; According to the state transition model, construct a prediction model; According to the prediction model, combined with the initial positioning coordinates, obtain the accurate positioning coordinates.

[0006] Preferably, obtaining each fingerprint point vector and covariance based on the received signal data and constructing a fingerprint database includes the following steps: Obtain fingerprint point coordinates according to an equidistant grid; Obtain the received signal data of multiple fingerprint points collected continuously for multiple times; Obtain the mean vector of the corresponding fingerprint point based on the received signal data; Obtain the corresponding sample variance based on the mean and construct a covariance matrix; Upload the coordinates, mean vector and covariance matrix and store them to construct a fingerprint database; Among them, the specific formula for the mean vector is: ; Among them, the specific formula for the covariance is: ; Among them, the specific form of the covariance matrix is: ; In the formula, is the mean vector of the corresponding fingerprint point, is the total number of collections, is the number of collections, is the corresponding Bluetooth base station number, is the corresponding received signal data, is the corresponding covariance, is the covariance matrix.

[0007] Preferably, obtaining multiple clustering clusters based on the clustering algorithm includes the following steps: Extract multiple fingerprint points in the fingerprint database and construct clustering centroid points; Based on the clustering centroid points and combined with the fingerprint database, obtain the similarity between the remaining fingerprint points and the clustering centroid points. Among them, the similarity uses the product of the Mahalanobis distance and the coordinate Euclidean distance as the similarity evaluation parameter for the similarity between the fingerprint point and the clustering centroid point; Based on the similarity, assign the remaining fingerprint points one by one to the clustering cluster with the largest similarity among the clustering centroid points and construct the corresponding clustering cluster; Recalculate the centroid points of the clustering cluster and compare them with the centroid points of the previous clustering cluster; If the new centroid point is the same as the previous centroid point, all fingerprint points are divided into multiple clustering clusters, and the number of clustering clusters is the same as the number of fingerprint points in the clustering centroid points; If the new centroid point is different from the previous centroid point, re-cluster until all fingerprint points are divided into multiple clustering clusters; Among them, the specific calculation formula for the similarity evaluation parameter is: ; Among them, the specific calculation formula of the Mahalanobis distance is: ; Among them, the specific formulas for reproducing the mean vector and covariance matrix of the clustering centroid points are: ; ; In the formula, is the similarity evaluation parameter between fingerprint point A and clustering centroid point B, is the Mahalanobis distance of the received signal data values of the two, and are respectively the mean vector and covariance matrix of the th fingerprint point in the th clustering cluster.

[0008] Preferably, the extracting the received signal data and obtaining the cluster with the minimum distance includes the following steps: Collect the received signal data of each Bluetooth base station at the to-be-determined point; Obtain the Mahalanobis distance between the to-be-determined point and the centroid points of each clustering cluster; Sort the centroid points of the clustering clusters in ascending order according to the Mahalanobis distance; Obtain the centroid point of the clustering cluster with the minimum Mahalanobis distance and the corresponding clustering cluster, and mark it as the cluster with the minimum distance.

[0009] Preferably, the obtaining the number of neighboring points according to dynamic selection and obtaining the initial positioning coordinates according to the weights of multiple neighboring points includes the following steps: Obtain the mean value and standard deviation of the Euclidean distances between the centroid point of the clustering cluster in the cluster with the minimum distance and the fingerprint points in the cluster; Filter multiple Euclidean distances according to the standard deviation; If the Euclidean distance is less than or equal to the standard deviation, mark the corresponding fingerprint point as a near-neighbor matching point; If the Euclidean distance is greater than the standard deviation, discard it; Use the near-neighbor matching algorithm to perform an initial estimation of the coordinates of the to-be-determined point; Obtain the Mahalanobis distance between the to-be-determined point and multiple near-neighbor fingerprint points, and calculate the weights; Obtain the initial positioning coordinates according to the weights and the coordinates of the near-neighbor matching points; Among them, the calculation formula of the weight is: ; Among them, the calculation formula of the initial positioning coordinates is: ; ; In the formula, is the weight corresponding to the Mahalanobis distance; is the Mahalanobis distance corresponding to the point to be determined and the neighboring fingerprint points, and are the initial positioning coordinates, and correspond to the coordinates of the neighboring matching points.

[0010] Preferably, constructing the prediction model based on the state transition model includes the following steps: Extract the position component in the particle state to obtain the difference vector; Obtain the squared Mahalanobis distance based on the difference vector; Obtain the measurement vector based on the initial positioning coordinates; Obtain the state vector, combine it with the measurement vector, and obtain the observation matrix; Obtain the state transition matrix, process noise, measurement noise, and measurement noise driving matrix, and combine the state vector and the measurement vector to construct the prediction model; Among them, the specific form of the prediction model is: ; In the formula, is the state vector, is the measurement vector, is the state transition matrix, is the process noise driving matrix, is the observation matrix, is the noise driving matrix, is the process noise, is the measurement noise.

[0011] Preferably, obtaining the precise positioning coordinates based on the prediction model and combining the initial positioning coordinates includes the following steps: Generate multiple particles with the same weight within the positioning area and mark them; Obtain the prior particles and the corresponding weights according to the prediction model; Obtain the likelihood data according to the likelihood function and combine the weights; Normalize the likelihood data of multiple particles to obtain the normalized data; Sum the weighted particles to obtain the target state vector at the next moment; Extract the coordinate components in the target state vector to construct the precise positioning coordinates; Among them, the specific formula of the likelihood function is: ; Among them, the specific calculation formula of the likelihood data is: ; Among them, the specific calculation formula for the normalized data is: ; Among them, the specific calculation formula for the target state vector is: ; In the formula, is the normalized weight of particle , is the covariance matrix of the measurement noise, is the filtered value of the target state vector.

[0012] Preferably, a two-stage indoor positioning system based on MWKNN-PF is proposed to implement the above-mentioned two-stage indoor positioning method based on MWKNN-PF, including: Control module: The control module is used to control the data transmission within the system; Data acquisition module: The data acquisition module is used to collect the position information of Bluetooth base stations; Data processing module: The data processing module is used to perform noise reduction processing on the data within the system; Data storage module: The data storage module is used to construct a fingerprint database; Data analysis module: The data analysis module is used to analyze the data within the system.

[0013] Compared with the prior art, the advantages of the present invention are as follows: By collecting the RSSI data at the point to be determined, calculating the RSSI Mahalanobis distance between the point to be determined and each cluster centroid point, and selecting the cluster where the cluster centroid point with the smallest Mahalanobis distance is located. Calculate the Mahalanobis distance between the point to be determined and each fingerprint point in this cluster, and sort each fingerprint point according to the similarity size according to the result. Calculate the mean and standard deviation of the coordinate Euclidean distance between the fingerprint point with the largest similarity and the remaining fingerprint points. Then screen out the fingerprint points whose coordinate Euclidean distance is less than or equal to the standard deviation as the near neighbor matching points, use the weighted K-nearest neighbor matching algorithm to calculate the initial position of the target, use the IMU to measure the acceleration and angular velocity on the target's travel route, calculate the predicted value of the target position according to the state transition model, use the initial positioning result based on the MWKNN algorithm as the actual measurement value, perform particle filtering on the target state, and obtain the accurate position of the target at time Brief Description of the Drawings

[0014] Figure 1Flow diagram of steps S100 - S700 in a two - stage indoor positioning method and system based on MWKNN - PF proposed by the present invention; Figure 2 Flow diagram of steps S201 - S205 in a two - stage indoor positioning method and system based on MWKNN - PF proposed by the present invention; Figure 3 Flow diagram of steps S301 - S306 in a two - stage indoor positioning method and system based on MWKNN - PF proposed by the present invention; Figure 4 Flow diagram of steps S401 - S404 in a two - stage indoor positioning method and system based on MWKNN - PF proposed by the present invention; Figure 5 Flow diagram of steps S501 - S507 in a two - stage indoor positioning method and system based on MWKNN - PF proposed by the present invention; Figure 6 Flow diagram of steps S601 - S605 in a two - stage indoor positioning method and system based on MWKNN - PF proposed by the present invention; Figure 7 Flow diagram of steps S701 - S706 in a two - stage indoor positioning method and system based on MWKNN - PF proposed by the present invention; Figure 8 Structure block diagram of a two - stage indoor positioning method and system based on MWKNN - PF proposed by the present invention. Detailed implementation

[0015] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments in the following description are only examples, and those skilled in the art can think of other obvious variations.

[0016] Refer to Figure 1-8 As shown, a two - stage indoor positioning method based on MWKNN - PF includes: S100. Obtain the positioning area, construct equidistant grids, and obtain the received signal data of fingerprint points, where each grid intersection is a fingerprint point; S200. According to the received signal data, obtain the vector and covariance of each fingerprint point, and construct a fingerprint database; S300. According to the clustering algorithm, obtain multiple clustering clusters; S400. Extract the received signal data and obtain the cluster with the minimum distance; S500. According to dynamic selection, obtain the number of neighboring points, and according to the weights of multiple neighboring points, obtain the initial positioning coordinates; S600. Construct a prediction model based on the state transition model; S700. Obtain the precise positioning coordinates based on the prediction model and in combination with the initial positioning coordinates; Those skilled in the art can understand that by dividing into equidistant grids, the positioning area is refined into multiple small areas. Each grid intersection point serves as a fingerprint point. Received signal data is collected at these fingerprint points. By calculating the mean vector and covariance matrix of each fingerprint point, the signal features of the fingerprint points are extracted. These feature data are stored to form a fingerprint database, which is the core component of the indoor positioning system. The fingerprint database provides the environmental feature information required for positioning. Through the clustering algorithm, fingerprint points with similar signal features are grouped into one category to form multiple clustering clusters. The division of the clustering clusters helps reduce the computational amount during the positioning process and improve the positioning efficiency. At the same time, the clustering clusters also reflect the environmental distribution in the positioning area. According to the signal data received at the point to be determined, it is compared with the clustering clusters in the fingerprint database to find the clustering cluster with the most similar signal features to the point to be determined. This clustering cluster is the cluster with the minimum distance, that is, it represents the possible position range where the point to be determined is located. Through the dynamic selection algorithm, the number of neighboring points is determined, and according to the similarity between the signal features of the neighboring points and the point to be determined, their weights are calculated. Using these weights and the coordinates of the neighboring points, the initial positioning coordinates of the point to be determined are calculated. The prediction model can predict the future position of the point to be determined based on its historical position information and motion state. By combining the prediction model and the initial positioning coordinates, the historical position information and the current signal features can be fully utilized to improve the accuracy and reliability of the positioning.

[0017] As Figure 2 shown, the steps of obtaining the vector and covariance of each fingerprint point based on the received signal data and constructing the fingerprint database include the following: S201. Obtain the fingerprint point coordinates based on equidistant grids; S202. Obtain the received signal data of multiple fingerprint points collected continuously for multiple times; S203. Obtain the mean vector of the corresponding fingerprint point based on the received signal data; S204. Obtain the corresponding sample variance based on the mean and construct the covariance matrix; S205. Upload the coordinates, mean vector, and covariance matrix and store them to construct the fingerprint database; Among them, the specific formula for the mean vector is: ; Among them, the specific formula for the covariance is: ; Among them, the specific form of the covariance matrix is: ; In the formula, is the mean vector corresponding to the fingerprint point, is the total number of acquisitions, is the number of acquisitions, is the corresponding Bluetooth base station number, is the corresponding received signal data, is the corresponding covariance, is the covariance matrix; Those skilled in the art can understand that by dividing the positioning area with an equidistant grid to determine the positions of the intersection points of each grid, that is, the coordinates of the fingerprint points, at each fingerprint point, the received signal data is continuously acquired multiple times, which can eliminate the errors caused by accidental factors and make the acquired signal data more reliable. By calculating the mean value of the signal data acquired multiple times at each fingerprint point, the mean vector is obtained. The mean vector represents the average signal characteristics of the fingerprint point in a specific environment. By calculating the deviation between the signal data acquired multiple times at each fingerprint point and the mean value, the sample variance is obtained. According to the sample variance, the covariance matrix is constructed. The covariance matrix reflects the correlation between different signal characteristics. The fingerprint point coordinates, mean vector, and covariance matrix are integrated and stored to construct a fingerprint database. The fingerprint database is the core database of the indoor positioning system. The fingerprint database stores the position information and signal characteristic information of all fingerprint points in the positioning area. By constructing the fingerprint database, reliable data support is provided for the subsequent positioning process.

[0018] As Figure 3 shown, the steps of obtaining multiple clustering clusters according to the clustering algorithm are as follows: S301. Extract multiple fingerprint points in the fingerprint database and construct clustering centroid points; S302. Based on the clustering centroid points, combined with the fingerprint database, obtain the similarity between the remaining fingerprint points and the clustering centroid points. Among them, the similarity uses the product of the Mahalanobis distance and the coordinate Euclidean distance as the similarity evaluation parameter for the similarity between the fingerprint point and the clustering centroid point; S303. Based on the similarity, assign the remaining fingerprint points one by one to the clustering cluster with the largest similarity among the clustering centroid points and construct the corresponding clustering cluster; S304. Recalculate the centroid points of the clustering cluster and compare the centroid points with the centroid points of the previous clustering cluster; S305. If the new centroid point is the same as the previous centroid point, all fingerprint points are divided into multiple clustering clusters, and the number of clustering clusters is the same as the number of fingerprint points in the clustering centroid points; S306. If the new centroid point is different from the previous centroid point, re-cluster until all fingerprint points are divided into multiple clustering clusters; Among them, the specific calculation formula for the similarity evaluation parameter is: ; Among them, the specific calculation formula of the Mahalanobis distance is: ; Among them, the specific formulas for regenerating the mean vector and covariance matrix of the clustering centroid points are: ; ; In the formula, is the similarity evaluation parameter between fingerprint point A and clustering centroid point B, is the Mahalanobis distance of the received signal data values of the two, and are respectively the mean vector and covariance matrix of the th fingerprint point in the th clustering cluster; Those skilled in the art can understand that a group of initial fingerprint points are selected from the fingerprint database as clustering centroid points. The centroid points will serve as the center of the clustering process, and the subsequent steps will focus on classifying fingerprint points and constructing clustering clusters around these points. By combining the Mahalanobis distance (considering the covariance structure of signal features) and the coordinate Euclidean distance (considering spatial position information), a comprehensive similarity evaluation parameter is obtained. This parameter can more comprehensively reflect the similarity degree between fingerprint points and centroid points. For each fingerprint point, calculate its similarity with all clustering centroid points, and then assign it to the clustering cluster with the maximum similarity. By recalculating the mean value of the fingerprint points within each clustering cluster (or considering other statistical characteristics), new centroid points are obtained. Compare the new centroid points with the previous centroid points to determine whether the clustering process has converged. If the new centroid points are the same as the previous centroid points, it indicates that the clustering process has converged and the fingerprint points have been stably divided into multiple clustering clusters. If the new centroid points are different from the previous centroid points, it indicates that the clustering process is not yet stable and needs to continue clustering. By continuously updating the centroid points and reclassifying the fingerprint points until the clustering process converges.

[0019] As Figure 4 shown, the steps of extracting the received signal data and obtaining the cluster with the minimum distance include the following: S401. Collect the received signal data of each Bluetooth base station at the to-be-determined point; S402. Obtain the Mahalanobis distance between the to-be-determined point and the centroid points of each clustering cluster; S403. Sort the centroid points of the clustering clusters in ascending order according to the Mahalanobis distance; S404. Obtain the centroid point of the clustering cluster with the minimum Mahalanobis distance and the corresponding clustering cluster, and mark it as the cluster with the minimum distance; Those skilled in the art can understand that by collecting the received signal data (such as signal strength, signal-to-noise ratio, etc.) of each Bluetooth base station at the point to be determined, the communication state between the point to be determined and the surrounding Bluetooth base stations can be obtained. Mahalanobis distance is a distance metric method that takes into account the data covariance structure and can more accurately reflect the similarity degree between the point to be determined and the centroid point in the signal feature space. Through ascending sorting, the centroid point of the clustering cluster with the highest similarity (or the smallest distance) to the point to be determined can be ranked in the front, facilitating the subsequent selection process. The result of the sorting will directly affect the accuracy of the finally selected clustering cluster. By obtaining the centroid point of the clustering cluster with the smallest Mahalanobis distance, the clustering cluster that is most similar to the point to be determined in the signal feature space can be found, and this clustering cluster is marked as the cluster with the smallest distance.

[0020] As Figure 5 shown, the steps of obtaining the number of neighboring points according to dynamic selection and obtaining the initial positioning coordinates according to the weights of multiple neighboring points include the following steps: S501. Obtain the mean and standard deviation of the Euclidean distances between the centroid point of the clustering cluster in the cluster with the smallest distance and the fingerprint points within the cluster; S502. Screen multiple Euclidean distances according to the standard deviation; S503. If the Euclidean distance is less than or equal to the standard deviation, mark the corresponding fingerprint point as a near-neighbor matching point; S504. If the Euclidean distance is greater than the standard deviation, discard it; S505. Use the near-neighbor matching algorithm to initially estimate the coordinates of the point to be determined; S506. Obtain the Mahalanobis distances between the point to be determined and multiple near-neighbor fingerprint points, and calculate the weights; S507. Obtain the initial positioning coordinates according to the weights and the coordinates of the near-neighbor matching points; Among them, the calculation formula for the weight is: ; Among them, the calculation formula for the initial positioning coordinates is: ; ; In the formula, is the weight corresponding to the Mahalanobis distance; is the Mahalanobis distance between the point to be determined and the near-neighbor fingerprint point, and are the initial positioning coordinates, and are the coordinates of the corresponding near-neighbor matching points; Those skilled in the art can understand that by calculating the average Euclidean distance between the fingerprint points within a cluster and the centroid point, the average distance of the fingerprint points relative to the centroid point can be known; while calculating the standard deviation can reflect the degree of dispersion of these distance data. By comparing the Euclidean distance between each fingerprint point and the centroid point with the standard deviation, it can be determined whether the fingerprint point belongs to the "neighboring" range of the centroid point. Fingerprint points with an Euclidean distance less than or equal to the standard deviation are regarded as being relatively close to the centroid point in space and are thus marked as neighboring matching points; while fingerprint points with an Euclidean distance greater than the standard deviation are regarded as being relatively far from the centroid point and are thus discarded. The neighboring matching algorithm usually estimates the coordinates of the to-be-determined point through a certain weighted average method based on the coordinate information of the neighboring points. By calculating the Mahalanobis distance between the to-be-determined point and each neighboring fingerprint point, the differences in signal characteristics among the neighboring fingerprint points can be reflected. Through the weighted average method, the coordinate information of the neighboring matching points is fused to obtain the initial positioning coordinates of the to-be-determined point.

[0021] As Figure 6 shown, constructing a prediction model according to the state transition model includes the following steps: S601. Extract the position component in the particle state to obtain a difference vector; S602. Obtain the squared Mahalanobis distance according to the difference vector; S603. Obtain a measurement vector according to the initial positioning coordinates; S604. Obtain a state vector, combine it with the measurement vector to obtain an observation matrix; S605. Obtain a state transition matrix, process noise, measurement noise, and measurement noise driving matrix, combine the state vector and the measurement vector to construct a prediction model; Among them, the specific form of the prediction model is: ; In the formula, is the state vector, is the measurement vector, is the state transition matrix, is the process noise driving matrix, is the observation matrix, is the noise driving matrix, is the process noise, is the measurement noise; Those skilled in the art can understand that by extracting the position component from the state information of the particles and calculating the position difference vector between different particles or between a particle and a certain reference point, the position component usually represents the position information of the particle in space, while the difference vector reflects the relative difference in position between the particles or between the particle and the reference point. By calculating the square of the Mahalanobis distance, the similarity or difference degree in position between the particles or between the particle and the reference point can be quantified. The measurement vector usually represents certain measured values observed at the initial positioning coordinates, and these measured values can be used in subsequent prediction and update processes. The state vector usually represents the complete state information of the particle (including position, velocity, etc.), and the observation matrix describes how to extract the part corresponding to the measurement vector from the state vector. By constructing the observation matrix, the mapping relationship between the state vector and the measurement vector can be established. The state transition matrix describes the variation law of the particle state over time, and the process noise and measurement noise respectively represent the uncertainties in the state transition and measurement processes. By combining these parameters and matrices, as well as the state vector and the measurement vector, a prediction model can be constructed to predict and update the future state of the particle.

[0022] As Figure 7 shown, according to the prediction model and in combination with the initial positioning coordinates, obtaining the precise positioning coordinates includes the following steps: S701. Generate multiple particles with the same weight within the positioning area and mark them; S702. Obtain the prior particles and their corresponding weights according to the prediction model; S703. Obtain the likelihood data according to the likelihood function and in combination with the weights; S704. Perform normalization processing on the likelihood data of multiple particles to obtain the normalized data; S705. Calculate the weighted sum of the particles to obtain the target state vector at the next moment; S706. Extract the coordinate components in the target state vector to construct the precise positioning coordinates; Among them, the specific formula of the likelihood function is: ; Among them, the specific calculation formula of the likelihood data is: ; Among them, the specific calculation formula of the normalized data is: ; Among them, the specific calculation formula of the target state vector is: ; In the formula, is the normalized weight of the particle , To measure the covariance matrix of noise, is the filtered value of the target state vector; Those skilled in the art can understand that multiple particles are randomly generated within the positioning area. Each particle represents a possible target position or state, and initially they are given the same weight. By marking these particles, it is convenient for subsequent tracking and processing. According to the current state of the particles and the prediction model, the prior state of the particles at the next moment, that is, the prior particles, can be calculated. According to the uncertainty in the prediction process, the weights of the particles are updated. The likelihood function describes the probability distribution of the observed data under the given particle state. By combining the weights of the particles and the likelihood function, the likelihood data between each particle and the observed data can be calculated. Since the likelihood data may have different dimensions and ranges, direct comparison and weighting may be inaccurate, and the likelihood data needs to be normalized to convert it to the same dimension and range. According to the weights of the particles and the normalized likelihood data, the particles are weighted and averaged to obtain the state estimate of the target at the next moment. The target state vector usually includes multiple components such as position and velocity, and the coordinate component represents the position information of the target in space.

[0023] Such as Figure 8 shown, a two-stage indoor positioning system based on MWKNN-PF is proposed to implement the above-mentioned two-stage indoor positioning method based on MWKNN-PF, including: Control module: The control module is used to control the data transmission within the system; Data acquisition module: The data acquisition module is used to acquire the position information of Bluetooth base stations; Data processing module: The data processing module is used to perform noise reduction processing on the data within the system; Data storage module: The data storage module is used to construct a fingerprint database; Data analysis module: The data analysis module is used to analyze the data within the system.

[0024] In summary, the advantages of the present invention are as follows: By collecting RSSI data at the point to be determined, calculating the Mahalanobis distance of RSSI between the point to be determined and each cluster centroid point, and selecting the cluster where the cluster centroid point with the smallest Mahalanobis distance is located. Calculate the Mahalanobis distance between the point to be determined and each fingerprint point in this cluster, and sort each fingerprint point according to the similarity size according to the results. Calculate the mean value and standard deviation of the coordinate Euclidean distance between the fingerprint point with the largest similarity and the remaining fingerprint points. Then screen out those with coordinate Euclidean distance less than or equal to the standard deviation Use a fingerprint point as a nearest neighbor matching point, calculate the initial position of the target using the weighted K-nearest neighbor matching algorithm, measure the acceleration and angular velocity on the target's travel route using an IMU, calculate the predicted value of the target position based on the state transition model, use the initial positioning result based on the MWKNN algorithm as the actual measurement value, perform particle filtering on the target state, and obtain the accurate position of the target at a certain moment. Compared with the WKNN algorithm, the computational load of fingerprint matching in the online stage is significantly reduced. By reducing the computational load, the overall real-time performance is improved.

[0025] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification is only the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection required by the present invention is defined by the appended claims and their equivalents.

Claims

1. A two-stage indoor positioning method based on MWKNN-PF, characterized in that: include: Obtain the positioning area and construct an equidistant grid to obtain the received signal data of the fingerprint point, where each grid intersection is a fingerprint point; According to the received signal data, obtain each fingerprint point vector and covariance, and build a fingerprint library; According to the clustering algorithm, multiple clusters are obtained; Extract the received signal data and obtain the cluster with the minimum distance; According to the dynamic selection, the number of neighboring points is obtained, and according to the weights of multiple neighboring points, the initial positioning coordinates are obtained; Based on the state transition model, a prediction model is constructed; Based on the prediction model and combined with the initial positioning coordinates, the precise positioning coordinates are obtained.

2. The two-stage indoor positioning method based on MWKNN-PF according to claim 1 is characterized in that: The method of obtaining each fingerprint point vector and covariance based on the received signal data and constructing a fingerprint library includes the following steps: Obtain the coordinates of fingerprint points based on an equidistant grid; Multiple fingerprint acquisition points continuously collect multiple received signal data; According to the received signal data, a mean vector of the corresponding fingerprint point is obtained; According to the mean, obtain the corresponding sample variance and construct the covariance matrix; Upload coordinates, mean vectors and covariance matrices and store them to build a fingerprint library; Among them, the specific formula of the mean vector is: ; Among them, the specific formula of covariance is: ; Among them, the specific form of the covariance matrix is: ; In the formula, is the mean vector of the corresponding fingerprint point, is the total number of collections, is the number of collections, is the corresponding Bluetooth base station number, is the corresponding received signal data, is the corresponding covariance, is the covariance matrix.

3. A two-stage indoor positioning method based on MWKNN-PF according to claim 2, characterized in that: The step of obtaining multiple clusters according to the clustering algorithm comprises the following steps: Extract multiple fingerprint points in the fingerprint library and construct cluster centroid points; According to the cluster centroid point, combined with the fingerprint library, the similarity between the remaining fingerprint points and the cluster centroid point is obtained, wherein the similarity adopts the product of the Mahalanobis distance and the coordinate Euclidean distance as the similarity evaluation parameter of the fingerprint point and the cluster centroid point; According to the similarity, the remaining fingerprint points are assigned one by one to the cluster with the largest similarity among the cluster centroid points, and the corresponding cluster is constructed; Recalculate the centroid of the cluster and compare it with the centroid of the previous cluster; If the new centroid is the same as the previous centroid, all fingerprint points are divided into multiple clusters, and the number of clusters is the same as the number of fingerprint points in the cluster centroid; If the new centroid point is different from the previous centroid point, clustering is performed again until all fingerprint points are divided into multiple clusters; Among them, the specific calculation formula of the similarity evaluation parameter is: ; The specific calculation formula of Mahalanobis distance is: ; Among them, the specific formula for reproducing the mean vector and covariance matrix of the cluster centroid point is: ; ; In the formula, is the similarity evaluation parameter between fingerprint point A and cluster centroid point B, is the Mahalanobis distance of the received signal data values ​​of the two, and Respectively The first The mean vector and covariance matrix of fingerprint points.

4. The two-stage indoor positioning method based on MWKNN-PF according to claim 3 is characterized in that: The method of extracting received signal data and obtaining the cluster with the minimum distance comprises the following steps: Collect the received signal data of each Bluetooth base station at the point to be determined; Get the Mahalanobis distance between the point to be determined and the centroid of each cluster; According to the Mahalanobis distance, the centroid points of the clusters are sorted in ascending order; Get the centroid of the cluster with the smallest Mahalanobis distance and the corresponding cluster, and mark it as the cluster with the smallest distance.

5. The two-stage indoor positioning method based on MWKNN-PF according to claim 4 is characterized in that: The method of obtaining the number of neighboring points according to dynamic selection and obtaining the initial positioning coordinates according to the weights of the plurality of neighboring points comprises the following steps: Get the mean and standard deviation of the Euclidean distance between the centroid of the cluster with the smallest distance and the fingerprint points in the cluster; Filter multiple Euclidean distances based on standard deviation; If the Euclidean distance is less than or equal to the standard deviation, the corresponding fingerprint point is marked as a neighbor matching point; If the Euclidean distance is greater than the standard deviation, it is discarded; Use the nearest neighbor matching algorithm to make an initial estimate of the coordinates of the fixed point; Obtain the Mahalanobis distance between the point to be determined and multiple neighboring fingerprint points, and calculate the weight; Obtain the initial positioning coordinates based on the weights and coordinates of the nearest matching points; The weight calculation formula is: ; Among them, the calculation formula of the initial positioning coordinates is: ; ; In the formula, is the weight corresponding to the Mahalanobis distance; is the Mahalanobis distance between the point to be determined and the neighboring fingerprint point, and is the initial positioning coordinate, and The coordinates of the corresponding neighbor matching points.

6. The two-stage indoor positioning method based on MWKNN-PF according to claim 5 is characterized in that: The construction of the prediction model according to the state transition model comprises the following steps: Extract the position component in the particle state and obtain the difference vector; According to the difference vector, obtain the square of Mahalanobis distance; According to the initial positioning coordinates, obtain the measurement vector; Get the state vector, combine it with the measurement vector, and get the observation matrix; Obtain the state transfer matrix, process noise, measurement noise and measurement noise driving matrix, combine the state vector and measurement vector, and build a prediction model; Among them, the specific form of the prediction model is: ; In the formula, is the state vector, is the measurement vector, is the state transfer matrix, is the process noise driving matrix, is the observation matrix, is the noise driving matrix, is the process noise, To measure noise.

7. The two-stage indoor positioning method based on MWKNN-PF according to claim 6 is characterized in that: The method of obtaining accurate positioning coordinates based on the prediction model and the initial positioning coordinates includes the following steps: Generate multiple particles with the same weight in the positioning area and mark them; According to the prediction model, obtain the prior particles and corresponding weights; According to the likelihood function and combined with the weight, the likelihood data is obtained; Normalizing the likelihood data of multiple particles to obtain normalized data; Take the weighted sum of the particles and obtain the target state vector at the next moment; Extract the coordinate components in the target state vector and construct precise positioning coordinates; Among them, the specific formula of the likelihood function is: ; Among them, the specific calculation formula of likelihood data is: ; Among them, the specific calculation formula for normalized data is: ; Among them, the specific calculation formula of the target state vector is: ; In the formula, For particles The normalized weight of is the covariance matrix of the measurement noise, is the filtered value of the target state vector.

8. A two-stage indoor positioning system based on MWKNN-PF, used to implement the two-stage indoor positioning method based on MWKNN-PF as described in claims 1-7, characterized in that: include: Control module: The control module is used to control data transmission within the system; Data collection module: The data collection module is used to collect Bluetooth base station location information; Data processing module: The data processing module is used to perform noise reduction processing on the data in the system; Data storage module: The data storage module is used to build a fingerprint library; Data analysis module: The data analysis module is used to analyze the data in the system.

Citation Information

Cited By

  • Dehydrator working state detection method and system based on data analysis

    CN121167337A