Indoor personnel positioning and tracking method based on WiFi signal

By combining a Gaussian mixture model based on CSI signals and a weighted k-nearest neighbor algorithm with a Kalman filter model, the accuracy and stability issues of traditional WiFi indoor positioning in complex environments are solved, achieving precise indoor positioning and tracking.

CN121334601APending Publication Date: 2026-01-13XIAMEN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511477399.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Traditional WiFi indoor positioning methods based on RSSI signal strength suffer from reduced recognition performance and unstable positioning in complex environments. Existing methods cannot effectively solve this problem, and current technologies cannot effectively address the accuracy and stability issues of WiFi indoor positioning in complex environments.

Method used

A Gaussian mixture model based on CSI signals combined with a weighted k-nearest neighbor algorithm (GMM-WKNN) is used to achieve accurate indoor positioning and tracking by denoising CSI data, calculating Euclidean distance using the probability distribution values ​​generated by the Gaussian mixture model, and combining it with a Kalman filter model for trajectory optimization.

Benefits of technology

It effectively reduces positioning errors and improves the accuracy and stability of indoor positioning. Especially in complex environments, it reduces positioning errors and enables precise tracking of target personnel trajectories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121334601A_ABST
    Figure CN121334601A_ABST
Patent Text Reader

Abstract

The invention discloses an indoor personnel positioning and tracking method based on a WiFi signal, and the method comprises the following steps: 1, obtaining a plurality of pieces of CSI data of a target person, and carrying out the processing of steps 2-4 on each piece of CSI data; step 2, after preprocessing the CSI data, based on a plurality of preset fingerprint points, performing clustering according to a Gaussian mixture model to obtain a grouping result; step 3, according to the grouping result, calculating the Euclidean distance between the CSI data and each fingerprint point to obtain the weight of each fingerprint point; step 4, obtaining a positioning point of the CSI data according to the Euclidean distance and the weight; and step 5, according to the positioning points of the plurality of CSI data, using a Kalman filtering model to obtain the trajectory of the target person. According to the method, the influence of a human body on indoor WiFi signal transmission is utilized, trajectory data are obtained based on CSI information, then positioning is carried out by adopting an indoor positioning algorithm based on combination of a Gaussian mixture model and a weighted k-nearest neighbor algorithm, and target personnel positioning and accurate trajectory tracking are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for indoor personnel location and tracking based on WiFi signals. Background Technology

[0002] In recent years, with the continuous development and popularization of mobile communication technology, WiFi signals have become a hot research area for human activity recognition. Deviceless WiFi sensing technology for human activity recognition has attracted much attention from researchers due to its low cost, convenience, and privacy protection, and has great potential in applications such as vital sign detection, gesture recognition, activity recognition, indoor positioning, and tracking. Traditional WiFi indoor positioning mainly relies on RSSI signal strength indication. Although RSSI is simple to use and easy to measure, it is not stable. In complex environments, due to the influence of random noise, multipath fading, and temporal dynamics, the sensing mechanism of RSSI is weakened, and the recognition performance is significantly reduced, thus having certain limitations. Channel State Information (CSI) can overcome these shortcomings well. It is more stable and provides richer multipath propagation information, making the use of finer-grained CSI for WiFi indoor positioning a new research hotspot. Summary of the Invention

[0003] The purpose of this invention is to provide an indoor personnel positioning and tracking method based on WiFi signals. This method utilizes the influence of the human body on indoor WiFi signal transmission, obtains trajectory data based on CSI information, and then uses an indoor positioning algorithm based on Gaussian mixture model combined with weighted k-nearest neighbor algorithm for positioning, thereby achieving accurate tracking of the target personnel's trajectory.

[0004] To achieve the above objectives, the solution of the present invention is:

[0005] A method for indoor people location and tracking based on WiFi signals includes the following steps:

[0006] Step 1: Obtain several CSI data points for the target personnel, and process each CSI data point using steps 2-4.

[0007] Step 2: After preprocessing the CSI data, clustering is performed based on a preset number of fingerprint points according to the Gaussian mixture model to obtain the grouping results;

[0008] Step 3: Based on the grouping results, calculate the Euclidean distance between the CSI data and each fingerprint point to obtain the weight of each fingerprint point;

[0009] Step 4: Based on the Euclidean distance and weights, obtain the location points of the CSI data;

[0010] Step 5: Based on the location points of several CSI data, use the Kalman filter model to obtain the trajectory of the target person.

[0011] In step 2 above, the CSI data is preprocessed, including:

[0012] The CSI data is decomposed using a preset wavelet basis and a preset number of decomposition levels, and then denoised according to a preset threshold.

[0013] In step 2 above, the probability density function of the Gaussian mixture model is:

[0014]

[0015] Where x represents CSI data, and K indicates that the Gaussian mixture model consists of a linear mixture of K individual Gaussian models. Let be the mixing coefficients of the k-th single Gaussian model. Let be the probability density function of the k-th single Gaussian model. and Let represent the mean and covariance matrix of the k-th single Gaussian model, respectively.

[0016] In the Gaussian mixture model described above, the expectation-maximization algorithm based on iterative thinking is used to adjust the mixing coefficients. mean Covariance matrix Perform parameter estimation; including,

[0017] The first step is to construct the likelihood function.

[0018]

[0019]

[0020] in, ;

[0021] The second step is to randomly initialize the parameters. Estimate the probability that the data was generated by each single Gaussian model:

[0022]

[0023] The third step involves calculating the probability of each point belonging to a distribution, as well as the parameters of each Gaussian distribution, and then updating the parameters.

[0024]

[0025]

[0026]

[0027] Repeat steps two and three until the parameter is obtained. Convergence, yielding the mixing coefficients. mean Covariance matrix The estimated value.

[0028] The specific content of step 3 above is as follows:

[0029] Step 31: Calculate the probability distribution values ​​of CSI data on each Gaussian distribution;

[0030] Step 32: Use the probability distribution value as the weight of the fingerprint point.

[0031] In step 4 above, based on the Euclidean distance between the CSI data and each fingerprint point, K fingerprint points with the closest distance are selected, and the K fingerprint points are multiplied by their corresponding weights to obtain the location points of the CSI data.

[0032] In step 5 above, the trajectory is segmented according to the velocity direction of the positioning point.

[0033] In step 5 above, the process of constructing the Kalman filter model is as follows:

[0034] Step A, define the initial state vector of the target person as follows: ,in and Indicates the x-axis and y-axis positions of the target personnel. and Let x represent the velocity of the target person along the x-axis and y represent the velocity along the y-axis; then we have,

[0035]

[0036] Wherein, the state transition matrix A is expressed as

[0037]

[0038] in, Indicates the time interval for collecting CSI data;

[0039] Let the observed values =( Then the measurement matrix H is represented as:

[0040]

[0041] The expression for the transfer noise covariance matrix of an object moving at a constant velocity is as follows:

[0042]

[0043] The covariance matrix R of the observation noise is expressed as:

[0044]

[0045] Step B, given the posterior estimate at time k-1 Control input Estimation error covariance The Kalman filtering process is as follows:

[0046] The prediction steps are as follows:

[0047]

[0048]

[0049] in, Let A be the prior state estimate at time k, A be the state transition matrix, and B be the control matrix. Let k be the control vector. For process noise, Let Q be the prior estimate covariance at time k, and let Q be the transfer noise covariance.

[0050] The update steps are as follows:

[0051]

[0052]

[0053]

[0054]

[0055] in, Let R be the Kalman gain, R be the observation noise covariance, and H be the measurement matrix. Let be the posterior estimate at time k. Let k be the observation value at time k. To observe noise.

[0056] The basic idea of ​​this invention, based on the above scheme, is that the human body has a certain impact on indoor WiFi signal transmission, and this impact will be reflected in CSI (Content Detection and Tracking). WiFi transmitting and receiving devices continuously send CSI information; collecting and utilizing this information achieves the effect of indoor personnel positioning and tracking. This invention first performs noise reduction preprocessing on the collected CSI data, then uses the preprocessed data to construct a GMM (Gross Model) to capture the probability distribution characteristics of the CSI data. Next, it classifies the data points according to the probability distribution characteristics of the CSI data and proposes a threshold-based k-value selection method to reduce the positioning error caused by a fixed k-value. The proposed GMM-WKNN algorithm uses the probability distribution value generated by the GMM model instead of the amplitude in Euclidean distance calculation, using probability as the weight to avoid calculation errors introduced by distance weights. Finally, the WKNN algorithm is used for positioning estimation to obtain the final positioning result.

[0057] Compared with the prior art, the beneficial effects of the present invention are reflected in:

[0058] (1) This invention proposes an indoor positioning algorithm based on Gaussian mixture model combined with weighted k nearest neighbor algorithm (GMM-WKNN). The algorithm uses the probability distribution value generated by GMM Gaussian mixture model to replace the amplitude for Euclidean distance calculation. At the same time, the probability is used as the weight, which effectively reduces the error between the distance and the real distance caused by using distance as the weight. Finally, the positioning result is calculated by weighted k nearest neighbor algorithm, thereby completing indoor positioning.

[0059] (2) To address the issue that the K value has a significant impact on the positioning results, this invention proposes an optimization method for grouping CSI data using the clustering properties of GMM. By dividing the CSI data into different groups, a suitable K value can be assigned based on the characteristics and signal distribution of each group. This flexible K value selection mechanism allows the algorithm to better adapt to signal changes in different environments, thereby effectively reducing positioning errors.

[0060] (3) This invention combines the GMM-WKNN positioning algorithm with Kalman filtering to propose an indoor tracking algorithm based on WIFI signals. The algorithm first constructs an offline fingerprint database using CSI data, and then performs coarse positioning of the trajectory data using the GMM-WKNN algorithm. Subsequently, the Kalman filtering tracking algorithm is used to further process the coarse positioning results, thereby achieving accurate tracking of the target person's trajectory. Attached Figure Description

[0061] Figure 1 This is a schematic diagram of an indoor positioning experiment scenario in an embodiment of the present invention;

[0062] Figure 2This is a probability distribution diagram of cumulative positioning error in an embodiment of the present invention. Detailed Implementation

[0063] The technical solution and beneficial effects of the present invention will be described in detail below with reference to the accompanying drawings.

[0064] This invention provides a method for indoor personnel location and tracking based on WiFi signals, comprising the following steps:

[0065] Step 1: Data Collection

[0066] 1.1 Offline fingerprint information collection: Assuming the positioning and tracking area is 4.8m*4.8m (the actual area is not limited, as long as there is WiFi signal coverage), fingerprint information is collected using relevant CSI devices at 0.8m intervals, for a total of 49 fingerprint points. For the positioning test points, 17 points are randomly selected in this area to verify the performance of the positioning algorithm. 100 data packets are collected for each fingerprint point and test point.

[0067] 1.2 Online verification of trajectory data acquisition: Experimenters walked at a constant speed along a predetermined trajectory route within the experimental area, and collected three different trajectory routes for verification.

[0068] Step 2: Noise Reduction Preprocessing

[0069] Because CSI data acquisition is easily affected by equipment and environmental noise, which can significantly interfere with positioning accuracy, noise preprocessing is essential. Wavelet thresholding denoising offers advantages such as simple principle and fast computation speed. This method can better adapt to the local characteristics of signals, providing better local information in the frequency and time domains, and is beneficial for preserving the detailed features of the signal. By performing wavelet decomposition on the CSI data, selecting an appropriate wavelet basis and decomposition level, and setting a suitable threshold, the best denoising effect can be achieved.

[0070] Step 3: Construct Gaussian Mixture Model

[0071] 3.1 Conduct in-depth analysis of the denoised CSI amplitude data to determine the appropriate number of Gaussian components, ensuring that the selected number of components can effectively describe the distribution characteristics of the data.

[0072] 3.2 Constructing a Gaussian mixture model:

[0073] Gaussian Mixture Models (GMMs) are a clustering method based on probability density functions. They assume that each cluster is a mixture of multiple Gaussian distributions. Each GMM consists of several single Gaussian models, which are linearly combined in a certain proportion to form the probability density function of the GMM.

[0074] (1)

[0075] Where x represents CSI data, and K indicates that the GMM consists of a linear mixture of K single Gaussian models. Let be the mixing coefficients of the k-th single Gaussian model. Let be the probability density function of the k-th single Gaussian model. and Let be the mean and covariance matrices of the k-th single Gaussian model, respectively. Where the mixing coefficients... mean and covariance matrix The parameters are all unknown.

[0076] To estimate the above parameters, the Expectation-Maximization (EM) algorithm, based on an iterative approach, is required. The EM algorithm consists of two steps: the E-step calculates the posterior probability distribution of the latent variables given the current model parameters, and the M-step calculates the maximum likelihood estimates of the model parameters. The calculation steps are as follows:

[0077] Step 1: Construct the likelihood function:

[0078] (2)

[0079] (3)

[0080] In the formula: .

[0081] Step 2: Randomly initialize parameters Estimate the probability that the data was generated by each single Gaussian model:

[0082] (4)

[0083] Step 3: Based on the calculated probability of each point belonging to its distribution and the parameters of each Gaussian distribution, update the parameters once:

[0084] (5)

[0085] (6)

[0086] (7)

[0087] Repeat steps two and three above until the parameter is obtained. The process continues until convergence. After obtaining the final estimate using the EM algorithm, it is substituted into equation (1) to obtain the Gaussian mixture model.

[0088] 3.3 After completing the model construction, export the parameters of the Gaussian mixture model for subsequent analysis and application. The model can be saved as a corresponding file to ensure the reliability and repeatability of the data.

[0089] Step 4: Cluster and group the CSI data

[0090] 4.1 Utilize the clustering properties of Gaussian mixture models to group data points. By calculating the probability of each data point belonging to each Gaussian component, the data points are assigned to the component with the highest probability.

[0091] 4.2 After clustering is completed, save the clustering results and related parameters to a file for subsequent analysis or further processing.

[0092] Step 5: Use the probability distribution values ​​generated by the Gaussian mixture model to replace the amplitudes, calculate the Euclidean distance between the test points and each fingerprint point in the same class, and use the probability distribution values ​​to replace the amplitudes for weight calculation.

[0093] 5.1 For each test point, calculate its probability distribution value on each Gaussian distribution.

[0094] 5.2 Format the Euclidean distance between each test point and fingerprint points in the same group using the calculated probability distribution values. In this process, the generated probability distribution values ​​will be used instead of the amplitude for distance calculation. The formula for calculating the Euclidean distance is as follows:

[0095] (8)

[0096] In the formula: This represents the Gaussian mixture probability distribution value of the i-th point to be located. This represents the Gaussian mixture probability distribution value of the j-th fingerprint point in the fingerprint database.

[0097] 5.3 Using Gaussian mixture probability distribution values ​​as weights effectively avoids errors caused by using distance as the weight, thus improving positioning accuracy. The formula is as follows:

[0098] (9)

[0099] In the formula: Let be the weight of the i-th fingerprint point in the offline fingerprint database.

[0100] Step Six: Perform preliminary localization estimation using the Weighted k-Nearest Neighbors (WKNN) algorithm.

[0101] 6.1 The Euclidean distance between each test point and the fingerprint points of the same group is calculated in step five. Then, the K training samples that are closest to the test sample are selected. After multiplying the K training samples by the corresponding weights, the preliminary localization estimation is performed using equation (10). The selection of the K value is based on the clustering results in step four. Different K values ​​will be used for different groups.

[0102] (10)

[0103] In the formula: To locate the coordinate values, Let i be the coordinates of the i-th reference point. Let be the weight factor for the i-th reference point.

[0104] Step 7: Optimize the positioning results precisely using a Kalman filter tracking model to ultimately achieve indoor tracking.

[0105] 7.1 Trajectory Segmentation Processing:

[0106] Since the velocity direction varies depending on the trajectory, the trajectory needs to be segmented. The velocity along the positive x- and y-axis is assumed to be +1, and the velocity along the negative x- and y-axis is assumed to be -1. The final velocity is obtained by multiplying the actual velocity by the direction of motion.

[0107] 7.2 Kalman Filter Model Construction:

[0108] In the Kalman filter tracking model, assuming the target person is walking at a constant speed in a certain direction, the initial state vector is represented as follows: ,in and Indicates the x-axis and y-axis positions of the target personnel. and This represents the target person's velocity along the x-axis and y-axis. The formula is as follows:

[0109] (11)

[0110] The state transition matrix A can be represented as:

[0111] (12)

[0112] In the formula: This indicates the time interval for collecting fingerprint data, with a value of 1 second.

[0113] The observed values ​​can be obtained using a Gaussian mixture model and the WKNN fingerprint matching algorithm. =( The measurement matrix H can then be represented as:

[0114] (13)

[0115] The expression for the transfer noise covariance matrix of an object moving at a constant velocity is as follows:

[0116] (14)

[0117] The covariance matrix R of the observation noise can be expressed as:

[0118] (15)

[0119] 7.3 Kalman filter tracking process:

[0120] Given the posterior estimate at time k-1 Control input Estimation error covariance The Kalman filtering process is as follows:

[0121] Prediction steps:

[0122] (16)

[0123] (17)

[0124] In the formula: Let A be the prior state estimate at time k, A be the state transition matrix, and B be the control matrix. Let k be the control vector. For process noise, Let Q be the prior estimate covariance at time k, and let Q be the transfer noise covariance.

[0125] Update steps:

[0126] (18)

[0127] (19)

[0128] (20)

[0129] (twenty one)

[0130] In the formula: Let R be the Kalman gain, R be the observation noise covariance, and H be the measurement matrix. Let be the posterior estimate at time k. Let k be the observation value at time k. To observe noise.

[0131] By using a Kalman filter tracking model to process the segmented trajectory, indoor positioning and tracking based on CSI signals is finally achieved.

[0132] In this embodiment of the invention, the experimental data collection was conducted in an indoor hall. The experimental area was set at 4.8m x 4.8m, with a fingerprint point placed every 0.8m, for a total of 49 fingerprint points collected. Seventeen test points were randomly selected within this area to verify the performance of the localization algorithm. 100 data packets were collected from each fingerprint point and each test point. A schematic diagram of the experimental scenario is shown below. Figure 1 As shown.

[0133] The data acquisition equipment consisted of one laptop, one Cisco router, and one Raspberry Pi 3B+. The Cisco router was configured in IEEE 802.11 ac mode with a bandwidth of 80MHz, a frequency of 5.21GHz, and 157 channels. The laptop was used to send ping packets to establish communication with the router, while the Raspberry Pi used its installed Nexmon firmware to obtain CSI information. Finally, the CSI data obtained from the Raspberry Pi was processed using MATLAB software.

[0134] To verify the effectiveness of this invention, the localization errors of the proposed GMM-WKNN algorithm, Kmeans-WKNN algorithm, and WKNN algorithms with different k values ​​were compared. The statistical results are shown in Table 1. The average localization errors of the WKNN algorithm for the three k values ​​were 1.89m, 1.88m, and 1.83m, respectively; the average localization error of the Kmeans-WKNN algorithm was 1.62m; and the average localization error of the proposed GMM-WKNN algorithm was 1.29m. This represents a 29.5% reduction in the lowest average localization error compared to the traditional WKNN algorithm, a 20% reduction compared to the Kmeans-WKNN algorithm, and a 10% reduction compared to the CNN algorithm.

[0135] Table 1 Comparison of errors of different positioning algorithms

[0136]

[0137] Error probability statistical analysis was performed on the above five algorithms, and the cumulative distribution function curves of the positioning errors are shown in Figure 2. As can be seen from the figure, the GMM-WKNN algorithm proposed in this invention achieves a positioning accuracy better than 1.6m with a probability of 82%, which is better than the Kmeans-WKNN algorithm's 65%, and better than the three WKNN algorithms with different k values' 43%, 35%, and 63%. This indicates that the proposed Gaussian mixture filtering combined with the WKNN algorithm can effectively reduce indoor positioning errors and improve indoor positioning performance.

Claims

1. A method for indoor personnel positioning and tracking based on WiFi signals, characterized in that... Includes the following steps: Step 1: Obtain several CSI data points for the target personnel, and process each CSI data point using steps 2-4. Step 2: After preprocessing the CSI data, clustering is performed based on a preset number of fingerprint points according to the Gaussian mixture model to obtain the grouping results; Step 3: Based on the grouping results, calculate the Euclidean distance between the CSI data and each fingerprint point to obtain the weight of each fingerprint point; Step 4: Based on the Euclidean distance and weights, obtain the location points of the CSI data; Step 5: Based on the location points of several CSI data, use the Kalman filter model to obtain the trajectory of the target person.

2. The indoor personnel positioning and tracking method based on WiFi signals as described in claim 1, characterized in that: In step 2, the CSI data is preprocessed. include, The CSI data is decomposed using a preset wavelet basis and a preset number of decomposition levels, and then denoised according to a preset threshold.

3. The indoor personnel positioning and tracking method based on WiFi signals as described in claim 1, characterized in that: In step 2, the probability density function of the Gaussian mixture model is: , Where x represents CSI data, and K indicates that the Gaussian mixture model consists of a linear mixture of K individual Gaussian models. Let be the mixing coefficients of the k-th single Gaussian model. Let be the probability density function of the k-th single Gaussian model. and Let represent the mean and covariance matrix of the k-th single Gaussian model, respectively.

4. The indoor personnel positioning and tracking method based on WiFi signals as described in claim 3, characterized in that: In the Gaussian mixture model, the expectation-maximization algorithm based on iterative thinking is used to adjust the mixing coefficients. mean Covariance matrix Perform parameter estimation; include, The first step is to construct the likelihood function. , , in, ; The second step is to randomly initialize the parameters. Estimate the probability that the data was generated by each single Gaussian model: , The third step involves calculating the probability of each point belonging to a distribution, as well as the parameters of each Gaussian distribution, and then updating the parameters. , , , Repeat steps two and three until the parameter is obtained. Convergence, yielding the mixing coefficients. mean Covariance matrix The estimated value.

5. The indoor personnel positioning and tracking method based on WiFi signals as described in claim 1, characterized in that: The specific content of step 3 is as follows: Step 31: Calculate the probability distribution values ​​of CSI data on each Gaussian distribution; Step 32: Use the probability distribution value as the weight of the fingerprint point.

6. The indoor personnel positioning and tracking method based on WiFi signals as described in claim 1, characterized in that: In step 4, based on the Euclidean distance between the CSI data and each fingerprint point, K fingerprint points with the closest distance are selected, and the K fingerprint points are multiplied by their corresponding weights to obtain the location points of the CSI data.

7. The indoor personnel positioning and tracking method based on WiFi signals as described in claim 1, characterized in that: In step 5, the trajectory is segmented according to the velocity direction of the positioning point.

8. The indoor personnel positioning and tracking method based on WiFi signals as described in claim 1, characterized in that: In step 5, the construction process of the Kalman filter model is as follows: Step A, define the initial state vector of the target person as follows: ,in and Indicates the x-axis and y-axis positions of the target personnel. and Let x represent the velocity of the target person along the x-axis and y represent the velocity along the y-axis; then we have, , The state transition matrix A is represented as follows: , in, Indicates the time interval for collecting CSI data; Let the observed values =( Then the measurement matrix H is represented as: , The expression for the transfer noise covariance matrix of an object moving at a constant velocity is as follows: , The covariance matrix R of the observation noise is expressed as: , Step B, given the posterior estimate at time k-1 Control input Estimation error covariance The Kalman filtering process is as follows: The prediction steps are as follows: , , in, Let A be the prior state estimate at time k, A be the state transition matrix, and B be the control matrix. Let k be the control vector. For process noise, Let Q be the prior estimate covariance at time k, and let Q be the transfer noise covariance. The update steps are as follows: , , , , in, Let R be the Kalman gain, R be the observation noise covariance, and H be the measurement matrix. Let be the posterior estimate at time k. Let k be the observation value at time k. To observe noise.