Method for measuring distance between devices based on wi-fi channel state information
Patent Information
- Application Number
- CN202410122024.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-29
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2044-01-29
AI Technical Summary
[0004]本发明的目的在于克服上述现有技术存在的缺陷,提出了一种基于WiFi信道状态信息的设备间距测量方法,用于解决现有技术中存在的测距精度较低的技术问题
[0017]本发明接收设备计算多次采集信息中每根发射天线与所有接收天线形成的多条链路两两消除AGC后的直射径信道冲激响应的相关性,并根据相关性对多链路信道冲激响应进行了筛选,然后计算所有相关性最高的消除AGC后的信道冲激响应的平均值,充分利用了收发端多条链路上的信道状态信息,降低了信道状态信息的误差,提高了测距的精度。
Smart Images

Figure CN117970301B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of communication technology and relates to a method for measuring device spacing based on WiFi channel status information, which can be applied to device positioning and monitoring. Background Technology
[0002] Wireless ranging technology refers to the technology of measuring the relative distance between objects or devices using wireless signals. Wireless ranging technology can be divided into ultra-wideband (UWB) based ranging, WiFi signal strength received signal intensity (RSSI) based ranging, and channel state information (CSA) based ranging. The approach of WiFi CSA-based ranging technology is to analyze the error sources in the CSI, model and suppress these errors, and then measure the distance according to an existing propagation model. Alternatively, it can process the CSI after error suppression to obtain a distance-related metric. A ranging model is then constructed using this metric and the distance, and the real-time metric is substituted into the ranging model to obtain the distance between the transmitting and receiving ends.
[0003] Existing ranging methods based on WiFi channel state information first collect data at sampling points at different distances from the transmitter and preprocess the collected data. Then, phase correction is performed on the CSI data, and the corresponding CIR data is obtained through Inverse Fourier Transform (IFFT). Multipath suppression is applied to the obtained CIR data, and AGC compensation is subtracted. Outlier removal is performed on the CIR dataset for each location, and a multinomial regression model is used to establish a distance estimation model between the clustered CIR data and the distance. In the ranging process, CSI data is collected in real time, and the data is processed in the same way to obtain real-time cluster CIR data. This data is then substituted into a distance estimation model to obtain the distance between the transmitting and receiving ends. For example, patent application CN108650628A, entitled "Indoor Positioning Method Combining Ranging and Fingerprinting Based on Wi-Fi Network," discloses a method for estimating the distance between transmitting and receiving ends based on CIR. This invention constructs a ring-shaped fingerprint map of the indoor scene and collects CSI data for each target location. It uses CIR data with the ability to distinguish multipath clusters and undergoes phase correction and AGC loop compensation processing to estimate the distance between the transmitting and receiving ends. This invention uses phase correction and AGC loop compensation-processed CIR for ranging, which can improve ranging accuracy. However, its drawback is that it only fuses the metric values obtained after processing the channel state information of multiple links, which can easily produce large errors, resulting in relatively low ranging accuracy. Summary of the Invention
[0004] The purpose of this invention is to overcome the defects of the prior art and propose a device distance measurement method based on WiFi channel state information to solve the technical problem of low ranging accuracy in the prior art.
[0005] To achieve the above objectives, the technical solution adopted by the present invention includes the following steps:
[0006] (1) Initial ranging scenario:
[0007] Initialize a ranging scenario with a WiFi network consisting of T transmitting antennas as the transmitter and a receiving device consisting of R receiving antennas as the receiver. The T transmitting antennas and the R receiving antennas form T*R communication links, where T≥1 and R≥2.
[0008] (2) Preprocess the CSI data for each link:
[0009] The receiving device performs C acquisitions of channel state information (CSI) on each link at its current location, and processes the CSI data from each acquisition. c Preprocessing is performed to obtain preprocessed CSIT containing T*R link channel state information. c Among them, the preprocessed Channel State Information (CSI) for each link c,tr It consists of channel state information of K subcarriers, where K∈[16,56];
[0010] (3) Obtain the direct path channel impulse response of each link after AGC elimination:
[0011] The receiving device receives the preprocessed Channel State Information (CSI) for each link. c,tr Perform an inverse Fourier transform and extract the channel state information of the K subcarriers of each link from the inverse Fourier transform CIR. c,tr,k The maximum value is taken as the direct path channel impulse response (CIRL) of this link. c,tr Then delete CIRL c,tr AGC data A in agc The direct path channel impulse response CIRG after AGC elimination was obtained. c,tr Then the direct path channel impulse response after eliminating AGC corresponding to the channel state information (CSI) collected in the Cth time is CIRG.
[0012] (4) Calculate the cluster value of the average impulse response of the direct path channel with the highest correlation after eliminating AGC:
[0013] The receiving device calculates the correlation of the direct-path channel impulse response of the t-th transmitting antenna and all receiving antennas in the C data acquisitions after pairwise elimination of AGC. Then, select the M most correlated channel impulse responses after AGC elimination in the link formed by the t-th transmit antenna, calculate the average CIRM of the T*M most correlated channel impulse responses after AGC elimination, and then use the box plot method to process the CIRM outliers to obtain the cluster value CIRME of CIRM.
[0014] (5) The receiving device acquires the distance measurement results to the transmitting end:
[0015] The receiving device calculates the distance d between itself and the transmitter using the cluster value CIRME.
[0016] Compared with the prior art, the present invention has the following advantages:
[0017] The receiving device of this invention calculates the correlation of the direct path channel impulse response after pairwise elimination of AGC in multiple links formed by each transmitting antenna and all receiving antennas in multiple data acquisitions. Based on the correlation, the channel impulse responses of the multiple links are filtered, and then the average value of the channel impulse responses after elimination of AGC with the highest correlation is calculated. This fully utilizes the channel state information on multiple links at the transmitting and receiving ends, reduces the error of the channel state information, and improves the accuracy of ranging. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the implementation of the present invention;
[0019] Figure 2 The present invention uses a polynomial regression result curve.
[0020] Figure 3 This is a comparison chart of the ranging accuracy of the present invention and existing technologies. Detailed Implementation
[0021] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0022] Reference Figure 1 The present invention includes the following steps:
[0023] Step 1) Initial ranging scenario:
[0024] The initialization process uses a ranging scenario with T transmitting antennas as the transmitting end and a receiving device with R receiving antennas as the receiving end. The T transmitting antennas and R receiving antennas form T*R communication links, where T≥1 and R≥2. In this embodiment, the transmitting WiFi is a common commercial WiFi, and the receiving device is a laptop computer equipped with an Intel 5300 network card. The transmitting WiFi has 1 antenna, and the receiving network card has 3 external receiving antennas. The 1 transmitting antenna and the 3 receiving antennas form 3 communication links, where T=1 and R=3.
[0025] Step 2) Preprocess the CSI data for each link:
[0026] The receiving device performs C acquisitions of channel state information (CSI) on each link at its current location, and processes the CSI data from each acquisition. c Preprocessing is performed to obtain preprocessed CSIT containing T*R link channel state information. c Among them, the preprocessed Channel State Information (CSI) for each link c,tr It consists of channel state information of K subcarriers, where K∈[16,56]; each transmit antenna forms a communication link with each receive antenna, so each collection contains T*R links of channel state information (CSIT). c The expression is:
[0027]
[0028] CSI c,tr =[CSI c,tr,1 CSI c,tr,2 CSI c,tr,k CSI c,tr,K ]
[0029] Among them, CSI c,tr,k This represents the channel state information of the k-th subcarrier;
[0030] In this embodiment, the state information on each link is collected 100 times, and the expression for the channel state information collected each time is as follows:
[0031] CSI c =[CSI c,11 CSI c,12 CSI c,13 ]
[0032] According to the 802.11n protocol, the channel is divided into 56 subcarriers. The CSI acquisition tool samples the channel frequency response (CFR) of each subcarrier by 30 samples, resulting in channel state information for each link containing 30 subcarriers. The expression is as follows:
[0033] CSI c,tr =[CSI c,tr,1 CSI c,tr,2 CSI c,tr,k CSI c,tr,30 ]
[0034] Channel state information (CSI) directly acquired by the receiver is limited by the accuracy of commercial wireless equipment, synchronization errors between the transceiver and receiver, and internal hardware noise. This results in CSI reflecting not only channel characteristics but also hardware circuitry characteristics. Therefore, it is necessary to preprocess the directly acquired CSI to eliminate errors caused by hardware circuitry. This preprocessing is crucial for each acquired CSI. c Preprocessing is performed, and the receiving device obtains Channel State Information (CSI) for each subcarrier. c,tr,k Hampel filtering is performed to suppress outliers in amplitude, while CSI... c,tr,k Linear filtering is performed to suppress phase outliers, resulting in CSI. c,tr,k Corresponding filtered channel state information CSIT c,tr,k ;
[0035] By using a Hampel filter to suppress amplitude outliers, the amplitude values (CSIAO) of the subcarrier channel state information in each link after removing outliers are obtained. c,tr,k The internal circuitry of the receiving device can cause phase errors in the channel state information. The phase error and subcarrier number are linearly related. To eliminate the phase error, a linear denoising function is constructed as follows:
[0036]
[0037] Among them CSIP c,tr,k The CSIP represents the measured subcarrier channel state information phase. c,tr,K Represents the phase value of the channel state information of the Kth subcarrier, CSIP c,tr,1 This represents the phase value of the channel state information for the first subcarrier, l c,tr,k The CSIPO represents the number of the k-th subcarrier, and is used to obtain the phase of the channel state information of each subcarrier after phase correction. c,tr,k The amplitude value of the subcarrier channel state information (CSIAO) in each link after removing outliers is calculated. c,tr,k Phase CSIPO of each subcarrier channel state information after phase correction c,tr,k Reorganization, resulting in CSI c,tr,k Corresponding filtered channel state information CSIT c,tr,k C = 100, K = 30, l c,tr,k ∈[-28,-26,...,-4,-2,-1,1,3,…,25,27,28];
[0038] Step 3) Obtain the direct path channel impulse response for each link after AGC cancellation:
[0039] The receiving device receives the preprocessed Channel State Information (CSI) for each link.c,tr Perform an inverse Fourier transform and extract the channel state information of the K subcarriers of each link from the inverse Fourier transform CIR. c,tr,k The maximum value is taken as the direct path channel impulse response (CIRL) of this link. c,tr Then delete CIRL c,tr AGC data A in agc The direct path channel impulse response CIRG after AGC elimination was obtained. c,tr Then the direct path channel impulse response after eliminating AGC corresponding to the channel state information (CSI) collected in the Cth time is CIRG.
[0040] CIR has the ability to distinguish different path clusters. The maximum value of the Fourier transform of the channel state information (CSI) of 30 subcarriers for each link is used as the direct path channel impulse response (CSR) for that link, suppressing multipath components. The preprocessed CSI is then used to... c,tr Perform an inverse Fourier transform, where the channel state information (CSI) of each preprocessed subcarrier is... c,tr,k The formula for performing the inverse Fourier transform is:
[0041]
[0042] Where N represents the number of points in the inverse Fourier transform, e represents the natural constant, and j represents the imaginary unit; in this embodiment, N = 30.
[0043] The AGC loop within the receiver automatically maintains the output signal within a very small range of variation, primarily for stable output. During wireless signal transmission, changes in the signal transmission environment and the distance between the transmitter and receiver can alter the signal strength at the receiver. Therefore, AGC compensation varies depending on the distance. The acquired CSI is the result after AGC compensation, so the AGC compensation in the CSI should be removed by deleting the CIR. c,tr AGC data A in agc The calculation formula is:
[0044] CIRG c,tr =CIR c,tr -A agc ;
[0045] Step 4) Calculate the cluster value of the average impulse response of the direct path channel with the highest correlation after eliminating AGC:
[0046] The receiving device calculates the correlation of the direct-path channel impulse response of the t-th transmitting antenna and all receiving antennas in the C data acquisitions after pairwise elimination of AGC. Then, select the M most correlated channel impulse responses after AGC elimination in the link formed by the t-th transmit antenna, calculate the average CIRM of the T*M most correlated channel impulse responses after AGC elimination, and then use the box plot method to process the CIRM outliers to obtain the cluster value CIRME of CIRM.
[0047] Because there are multiple signal transmission links between the transmitter and receiver, the obtained CSI will also include spatial diversity characteristics, meaning that each link can yield a set of CSIs. After preprocessing, inverse Fourier transforming, multipath suppression, and AGC elimination of the CSIs, the direct-path channel impulse response should exhibit a consistent variation under the same environment. However, due to hardware noise, there may be poor link channel impulse responses. The correlation between the direct-path channel impulse responses of the t-th transmitting antenna and the R links formed by all receiving antennas in C acquisitions after AGC elimination is calculated. The calculation formula is:
[0048]
[0049] Among them, CIRG u and CIRG v Let denot u and v be the direct path channel impulse responses after AGC elimination in the R links formed by each transmit antenna and all receive antennas, respectively, and let τ represent CIRG. v Compared to CIRG u The length of the delay, 0≤τ≤C, u∈[1,R], v∈[1,R]; Box plots can describe the discrete distribution of data in a relatively stable way, which is beneficial for data cleaning. The box plot method is used to process outliers in CIRM, and the calculation formula is:
[0050]
[0051] IQR = Q3 - Q1
[0052] Where IQR represents the interquartile range of CIRM, Q1 represents the lower quartile of CIRM, and Q3 represents the upper quartile of CIRM; in this embodiment, τ = 0;
[0053] Step 5) The receiving device acquires the distance measurement results to the transmitting end:
[0054] The receiving device calculates its distance d from the transmitter using the cluster value CIRME. The steps are as follows:
[0055] (5a) The receiving device uses a multinomial regression method to construct the coefficient relationship between the Z transceiver distances and the cluster value obtained offline in advance:
[0056]
[0057] Where, p x Let x represent the coefficient of degree x, where x ∈ [0, X], and X represent the maximum degree. d represents the cluster value obtained offline with the z-th iteration number x. z This represents the distance between the z-th transmitting and receiving ends;
[0058] (5b) The receiving device calculates its distance from the transmitter using the coefficient relationship and the cluster value CIRME of CIRM:
[0059] d = p0 + p1 × CIRME + ... + p x ×CIRME x +…+p X ×CIRME X .
[0060] Multinomial regression is a predictive modeling method, and the resulting multinomial regression curve is shown below. Figure 2 As shown, the horizontal axis represents the distance between the transceiver and the vertical axis represents the channel impulse response amplitude. The data points in the figure represent the cluster values corresponding to 10 transceiver distances. The curves in the figure represent the polynomial regression result curves. The cluster value amplitude gradually decreases as the distance between the transceiver and the receiver increases. The receiving device calculates its distance from the transmitter using the coefficient relationship and the cluster value CIRME of CIRM.
[0061] d = p0 + p1 × CIRME + ... + p x ×CIRME x +…+p X ×CIRME X .
[0062] In this embodiment, X = 3 and Z = 10.
[0063] The technical effects of the present invention will be further explained below with reference to experimental data:
[0064] A comparative experiment was conducted to assess the ranging accuracy of this invention with existing Wi-Fi network-based ranging methods, and the results are as follows: Figure 3 As shown, the horizontal axis represents the ranging error, and the vertical axis represents the cumulative error distribution. The curve in the figure represents the cumulative ranging error distribution curve. Ten measuring distances were obtained at positions of 3m and 7m from the WiFi transmitter. Then, the error between the measured distance and the actual distance was calculated. The cumulative error distribution function of the 20 ranging errors was plotted. The ranging accuracy can be controlled within 1.03m with 80% probability. The existing technology can control the ranging accuracy within 1.96m with 80% probability. The experimental results show that the present invention improves the ranging accuracy compared with the existing technology.
Claims
1. A method for measuring device spacing based on WiFi channel state information, characterized in that, Includes the following steps: (1) Initial ranging scenario: Initialization to include The WiFi transmitter uses the root antenna as the transmitting end, to include The receiving device with the root receiving antenna is used for ranging scenarios at the receiving end. root transmitting antenna and Root receiving antenna formation One communication link, of which, , ; (2) Preprocess the CSI data for each link: The receiving device performs channel state information on each link at its current location. Each acquisition is performed, and the channel state information acquired in each acquisition is processed. Preprocessing is performed to obtain the preprocessed contents. Link channel status information Among them, the channel state information of each link after preprocessing Depend on It consists of channel state information of each subcarrier, wherein, ; (3) Obtain the direct path channel impulse response of each link after AGC elimination: The receiving device receives the preprocessed channel state information for each link. Perform inverse Fourier transform and convert each link Inverse Fourier transform of channel state information of each subcarrier The maximum value is taken as the direct path channel impulse response of this link. Then delete AGC data in The direct path channel impulse response after AGC elimination was obtained. ,but Channel state information collected this time The corresponding direct-path channel impulse response after AGC elimination is: ; (4) Calculate the cluster value of the average impulse response of the direct path channel with the highest correlation after eliminating AGC: Receiver calculation The first time information was collected The root transmitting antenna and all receiving antennas form a Correlation of direct-path channel impulse responses after pairwise elimination of AGC in each link And select the first The link with the highest correlation formed by the root transmitting antenna Calculate the channel impulse response after AGC elimination. The average channel impulse response after AGC removal with the highest correlation. Then, the box plot method was used to analyze... Outlier handling was performed to obtain Cluster value ; (5) The receiving device acquires the distance measurement results between itself and the transmitting end: The receiving device uses cluster values Calculate the distance between yourself and the transmitter. .
2. The method according to claim 1, characterized in that, The channel state information mentioned in step (2) The expression is: ; ; in, Indicates the first Channel state information of each subcarrier.
3. The method according to claim 2, characterized in that, The channel state information collected each time in step (2) Preprocessing is performed, and the steps are as follows: Channel state information for each subcarrier received by the receiving device Hampel filtering is performed to suppress outliers in amplitude, while Linear filtering is performed to suppress phase outliers, resulting in... Corresponding filtered channel state information .
4. The method according to claim 3, characterized in that, The channel state information of each preprocessed link described in step (3) Perform an inverse Fourier transform, where the channel state information of each preprocessed subcarrier is... The formula for performing the inverse Fourier transform is: ; in, This indicates the number of points in the inverse Fourier transform. Represents the natural constant. It represents the imaginary unit.
5. The method according to claim 4, characterized in that, The deletion described in step (3) AGC data in The calculation formula is: 。 6. The method according to claim 5, characterized in that, The calculation described in step (4) The first time information was collected The root transmitting antenna and all receiving antennas form a Correlation of direct-path channel impulse responses after pairwise elimination of AGC in each link The calculation formula is: ; in, and These represent the signals formed by each transmitting antenna and all receiving antennas. The first link Article, No. The direct path channel impulse response after AGC elimination on a single link. express Compared to The length of the delay , , .
7. The method according to claim 6, characterized in that, The box plot method described in step (4) is used for... Outlier handling is performed using the following formula: ; ; in, express The interquartile range, express The lower quartile, express The upper quartiles.
8. The method according to claim 7, characterized in that, The receiving device described in step (5) uses cluster values. Calculate the distance between yourself and the transmitter. The implementation steps are as follows: (5a) The receiving device uses a multinomial regression method to construct the pre-obtained offline data. The coefficient relationship between the distance between the transmitting and receiving ends and the cluster value is as follows: ; in, Indicates the number of times coefficient, , This represents the maximum value of the number of times. Indicates the number obtained offline. The number of times is Cluster value, Indicates the first The distance between the transmitting and receiving ends; (5b) The receiving equipment uses the coefficient relationship and Cluster value Calculate the distance between yourself and the transmitter: 。
Citation Information
Patent Citations
Indoor positioning method combining ranging and fingerprinting based on Wi-Fi network
CN108650628A