Sub-nanosecond WiFi signal flight time measurement method and system based on coherence
Through a coherence-based sub-nanosecond WiFi signal time-of-flight measurement method, RTT is used to measure the timestamps of information packets, measurement packets and ACK packets, and combined with CSI for linear fitting, the device structure robustness in WiFi signal SFO elimination is solved. solves the problem of accuracy and computational complexity, achieving efficient SFO elimination and accurate signal time-of-flight measurement.
Patent Information
- Application Number
- CN202410931803.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-07-12
Smart Images

Figure CN118509977B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of radio communication and channel state perception, and in particular to a method and system for measuring the flight time of a sub-nanosecond WiFi signal based on coherence and eliminating a sampling frequency offset (SFO) based on channel state information (CSI). Background Art
[0002] In wireless communications, the sampling frequency of the receiver and transmitter is not completely synchronized, which results in a difference between the sampling frequency of the receiver and the transmitter. This difference is SFO. SFO affects the signal at the receiver, especially in applications such as WiFi ranging. SFO causes the phase of the received signal to change, further affecting the accuracy of ranging. SFO causes the phase of the received signal to rotate or shift. Due to the deviation of the received signal at the discrete sampling moment, there is a difference between the signal phase corresponding to the sampling point and the original signal phase. This difference is reflected in the calculation of the CSI phase.
[0003] The perception capability of WiFi is highly dependent on the accuracy of CSI measurements. However, due to the difference in the frequency of the local oscillator (LO) at the transmitting and receiving ends, the symbol frequency offset (Symbol Frequency Offset) problem will occur, resulting in the cumulative phase error of CSI. In addition, the local oscillator is very sensitive to temperature changes. Long-term operation of the device will increase the internal temperature, which will cause the drift of SFO, thereby bringing more phase errors to CSI. Therefore, SFO has a serious impact on the development of CSI phase-based positioning technology. It hinders the development of new generation WiFi technologies such as wireless phase synchronization, WiFi phased array, and WiFi imaging. In short, the SFO problem limits the progress of WiFi technology in phase-related applications, which is a challenge that needs to be solved.
[0004] There are some studies on eliminating SFO. For example, the Chinese patent document with publication number CN116939501A proposed a sampling frequency elimination method based on antenna array combined with MUSIC algorithm, which uses three WiFi devices and each device is equipped with 3 antennas to eliminate SFO in the flight time through the antenna array. Or the Chinese patent document with publication number CN115661938A proposed a method for detecting elderly falls based on wireless signals, which eliminates the influence of SFO by measuring the channel state information in the wired (i.e. wired) state and the channel state information in the wireless state, and comparing the two.
[0005] The above methods can effectively eliminate SFO. However, the elimination method based on antenna array requires huge overhead, especially in antenna synchronization, which will generate complex calculation operations; and there are challenges in the deployment of the entire system, which is not suitable for environments with restricted equipment. The method based on CSI comparison requires changing the device structure, and the structural change may lead to unsatisfactory robustness; although this measurement method can obtain a relatively accurate signal flight time (Time of Flight, ToF), it cannot meet the user's requirements for stability; in addition, this method is difficult to simply quantify the impact of SFO, and cannot quantitatively analyze the impact of SFO on the system. Summary of the invention
[0006] The object of the present invention is to provide a sub-nanosecond WiFi signal flight time measurement method based on coherence to address all or part of the above-mentioned problems, so as to quantify and eliminate SFO in the WiFi signal flight time through simple calculations based on the existing network card device without changing the device structure.
[0007] The technical solution adopted by the present invention is as follows:
[0008] A method for measuring the flight time of a sub-nanosecond WiFi signal based on coherence uses a measurement receiving end and a measurement initiating end; the method comprises:
[0009] S1. The measurement initiator sends an RTT measurement information packet to the measurement receiver and records the RTT measurement information packet sending timestamp ;
[0010] S2: The measurement initiator sends messages to the measurement receiver in succession measurement packets, and record the measurement packet sending timestamp of each measurement packet , , Indicates the sequence number of the measurement package, is a positive integer;
[0011] S3: After the measurement receiver receives the RTT measurement information packet, it records the arrival timestamp of the RTT measurement information packet. , and then successively record the arrival timestamp of each measurement packet received ;
[0012] S4. After receiving all measurement packets, the measurement receiving end immediately sends an ACK data packet to the measurement initiating end and records the sending timestamp of the ACK data packet. ; and the receiving end measures the arrival timestamp of the RTT measurement information packet based on the CSI of the RTT measurement information packet and the measurement packet and the arrival timestamp of each measurement packet Perform corrections to obtain the precise arrival timestamp of the RTT measurement information packet and measuring packet precise arrival timestamps ;
[0013] S5: The measurement receiving end accurately timestamps the RTT measurement information packet , measure the exact arrival timestamp of the packet and ACK packets send timestamp Load into the report data packet and send to the measurement initiator;
[0014] S6. After the measurement initiator receives the ACK data packet, it records the arrival timestamp of the ACK data packet. , and timestamp the arrival of the ACK packet based on the CSI of the ACK packet Correct the ACK packet to get the exact arrival timestamp ;
[0015] S7: After the measurement initiator receives the report data packet, it will accurately arrive at the timestamp of the measurement packet. and measure packet sending timestamp , the cumulative amount of SFO per unit time is calculated by linear fitting;
[0016] S8: The measurement initiator accurately measures the ToF protocol based on RTT and calculates the precise signal flight time. :
[0017] ,
[0018] Where k represents the cumulative amount of SFO per unit time.
[0019] Furthermore, the RTT measurement information packet carries the measurement packet number ;Measure the receiving end after receiving When a measurement packet is received, it is determined that all measurement packets have been received.
[0020] Furthermore, the measurement initiator sends the measurement packets successively according to a predetermined time interval.
[0021] Furthermore, the total duration of sending the measurement packets configured for the measurement initiator is fixed; the predetermined time interval is obtained by averaging the fixed total duration based on the total amount of the measurement packets.
[0022] Further, the accurate arrival timestamp and send timestamp , the cumulative amount of SFO per unit time is calculated by linear fitting, including:
[0023] S71, according to Construct the sending interval sequence T of the measurement packet and the RTT measurement information packet, and according to Construct a rough ToF sequence of measurement packetsToF:
[0024] ,
[0025] ,
[0026] in represents a predetermined time interval, Indicates The time interval between sending the measurement packet and the RTT measurement information packet, Indicates Rough flight time of a measurement package;
[0027] S72. Construct a coordinate point set P:
[0028] ;
[0029] S73. Calculate the average value of the point set coordinates:
[0030] ,
[0031] ,
[0032] It represents the average time interval between all measurement packets and RTT measurement information packets. represents the average of the rough flight times of all measurement packets;
[0033] S74. Calculate covariance and variance:
[0034] ,
[0035] ,
[0036] represents the covariance between the sending time interval between the measurement packet and the RTT measurement information packet and the rough flight time of the measurement packet, It represents the variance of the time interval between the measurement packet and the RTT measurement information packet;
[0037] S75. Calculate the slope k to obtain the cumulative amount of SFO per unit time:
[0038] .
[0039] Furthermore, the method for correcting the timestamp according to the CSI is:
[0040] ,
[0041] in, represents the correction result of the timestamp of data packet j, represents the CSI measured for packet j, represents the conjugate transpose, represents the phase of a complex number, is the subcarrier of packet j, represents the subcarrier spacing, represents the time series range using the discrete Fourier transform time window, Indicates the delay occupied by the protection interval, Indicates the delay occupied by the short training frame, Indicates the delay occupied by the preamble.
[0042] To solve the above problems, the present invention further provides a sub-nanosecond WiFi signal flight time measurement system based on coherence, which is configured to execute the above sub-nanosecond WiFi signal flight time measurement method based on coherence.
[0043] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0044] The present invention utilizes the existing network card equipment to realize the collection of required data, combines CSI, and uses the least square method to fit the cumulative SFO to realize the quantitative analysis and elimination of SFO, which has low calculation complexity and high calculation efficiency. By configuring the number of coherent measurement packages, the accuracy of SFO cumulative measurement can be controlled, and the calculation flexibility is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The present invention will now be described by way of example with reference to the accompanying drawings, in which:
[0046] Figure 1 It is a flow chart of the coherence-based sub-nanosecond WiFi signal flight time measurement method.
[0047] Figure 2 This is the timing diagram of the ToF protocol for accurate RTT measurement.
[0048] Figure 3 This is a diagram of the ToF measurement effect. DETAILED DESCRIPTION
[0049] All features disclosed in this specification, or steps in all methods or processes disclosed, except mutually exclusive features and / or steps, can be combined in any manner.
[0050] Any feature disclosed in this specification (including any additional claims and abstract), unless otherwise stated, may be replaced by other alternative features that are equivalent or have similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.
[0051] The method of the present invention can be used in all WiFi standards supported Frequency band, bandwidth 、Protocol format( ), number of spatial streams s(1-n) and modulation and coding scheme (MCS) rate. The transmission format is protocol.
[0052] Tx and Rx should be in the same WiFi channel and work at the same bandwidth. For example, both Tx and Rx should work in WiFi standard channel 30 (carrier frequency ),broadband In addition, the WiFi data packets sent by both ends use the protocol format IEEE802.11ax, which is the WiFi HE data packet format.
[0053] According to the basic principle of wireless communication, the signal frequency sent by ISTA is , the signal frequency received by RSTA is , then the frequency response of the transmission channel can be expressed as , the mathematical relationship of the signal is , where the noise term represents the random interference in the environment. When the receiver knows a reference signal When the channel frequency response is calculated, the channel estimation algorithm can be used to calculate the channel frequency response. , also known as CSI, is the solution to the mathematical relationship between the three.
[0054] In OFDM-based WiFi protocols (802.11 Protocol), CSI can be specifically expressed as a 3D matrix ,in represents the number of subcarriers, For ISTA spatial stream, is the number of RSTA antennas. According to the WiFi protocol standard, the subcarrier numbers are , where subcarrier 0 is not used; bandwidth ( ) can be Different bandwidths, corresponding The values are 64, 128, 256, 512, and 1024 respectively.
[0055] Example 1
[0056] This embodiment introduces a sub-nanosecond WiFi signal flight time measurement method based on coherence. The method is implemented based on a protocol for accurately measuring the signal flight time based on the round trip time (RTT). The execution of the method requires the use of a measurement receiving end (Response Station, RSTA) and a measurement initiating end (Initial Station, ISTA).
[0057] like Figure 1 As shown, the method of this embodiment includes the following process:
[0058] S1. The measurement initiator sends an RTT measurement information packet to the measurement receiver and records the RTT measurement information packet sending timestamp The RTT measurement packet is sent with a timestamp And the timing of other subsequent timestamps is as follows Figure 2 shown.
[0059] S2: The measurement initiator sends messages to the measurement receiver in succession measurement packets, and record the measurement packet sending timestamp of each measurement packet , , Indicates the sequence number of the measurement package, Is a positive integer.
[0060] The measurement packet is sent after the RTT measurement information packet. In some embodiments, the sending period of the RTT measurement information packet and the measurement packet is set, and the measurement sending end sends the measurement packet at a predetermined time interval after sending the RTT measurement information packet. Time to send a measurement packet, a total of measurement packets, that is, the measurement initiator sends a measurement packet based on a predetermined time interval. The measurement packets are sent successively.
[0061] In addition, the total amount of the measurement package It is set according to actual needs. When the total time length of sending measurement packets configured for the measurement initiator is fixed, the larger the value, the more accurate the calculation of SFO cumulative value in subsequent fitting operations. The above-mentioned predetermined time interval The fixed total duration is averaged based on the total number of measurement packets.
[0062] S3: After the measurement receiver receives the RTT measurement information packet, it records the arrival timestamp of the RTT measurement information packet. , and then successively record the arrival timestamp of each measurement packet received .
[0063] Measurement package , then the corresponding The arrival timestamp of the measurement packet .
[0064] S4. After receiving all measurement packets, the measurement receiving end immediately sends an ACK data packet to the measurement initiating end and records the sending timestamp of the ACK data packet. .
[0065] The above RTT measurement information packet carries the measurement packet number , then the measurement receiving end receives When the measurement packet is received, it is determined that all measurement packets have been received. After receiving a measurement packet, the ACK packet is sent to the measurement initiator immediately.
[0066] In addition, the measurement receiver timestamps the arrival of the RTT measurement information packet based on the CSI of the RTT measurement information packet and the measurement packet. and the arrival timestamp of each measurement packet Perform corrections to obtain the precise arrival timestamp of the RTT measurement information packet and measuring packet precise arrival timestamps .
[0067] Arrival timestamp Taking correction as an example, the method for correcting the timestamp according to CSI is:
[0068] ,
[0069] in Indicates the arrival timestamp of the measurement packet for measurement packet i The correction result is represents the CSI measured by measurement package i, represents the conjugate transpose, represents the phase of a complex number, is the subcarrier of the measurement packet i, represents the subcarrier spacing, represents the time series range using the discrete Fourier transform time window, Indicates the delay occupied by the protection interval, Indicates the delay occupied by the short training frame, Indicates the delay occupied by the preamble.
[0070] The method for correcting the timestamps of other data packets is similar.
[0071] S5: The measurement receiving end accurately timestamps the RTT measurement information packet , measure the exact arrival timestamp of the packet and ACK packets send timestamp The data is loaded into a report data packet and sent to the measurement initiator.
[0072] S6. After the measurement initiator receives the ACK data packet, it records the arrival timestamp of the ACK data packet. , and timestamp the arrival of the ACK packet based on the CSI of the ACK packet Correct the ACK packet to get the exact arrival timestamp .
[0073] S7: After the measurement initiator receives the report data packet, it will accurately arrive at the timestamp of the measurement packet. and measure packet sending timestamp , the cumulative amount of SFO per unit time is calculated by linear fitting.
[0074] The calculation of the cumulative amount of SFO in this step, in some embodiments, includes the following process:
[0075] S71, according to Construct the sending interval sequence T of the measurement packet and the RTT measurement information packet, and according to Construct a rough ToF sequence of measurement packetsToF:
[0076] ,
[0077] ,
[0078] in Indicates The time interval between sending the measurement packet and the RTT measurement information packet, Indicates The rough flight time of a measurement packet.
[0079] S72. Construct a coordinate point set P:
[0080] .
[0081] S73. Calculate the average value of the point set coordinates:
[0082] ,
[0083] ,
[0084] It represents the average time interval between all measurement packets and RTT measurement information packets. Represents the average of the rough flight times of all measured packets.
[0085] S74. Calculate covariance and variance:
[0086] ,
[0087] ,
[0088] represents the covariance between the sending time interval between the measurement packet and the RTT measurement information packet and the rough flight time of the measurement packet, Indicates the variance of the time interval between the measurement packet and the RTT measurement information packet.
[0089] S75. Calculate the slope k to obtain the cumulative amount of SFO per unit time:
[0090] .
[0091] S8: The measurement initiator accurately measures the ToF protocol based on RTT and calculates the precise signal flight time. .
[0092] Specifically, the measurement initiator uses the precise arrival timestamp of the ACK packet , RTT measurement packet sending timestamp , ACK packet sending timestamp , RTT measurement information packet precise arrival timestamp , and the cumulative amount of the above SFO, calculate the precise signal flight time .
[0093] have: .
[0094] Example 2
[0095] This embodiment introduces an example of a sub-nanosecond WiFi signal flight time measurement method based on coherence.
[0096] ISTA sends an RTT measurement packet on a channel with a carrier frequency of 5315MHz (the frame format of the packet follows the 802.11ax protocol). The packet contains key parameters: number of coherent measurement packets (The number of measurement packets sent immediately by the measurement initiator). Under the premise of ensuring that the total sending time of the measurement initiator remains unchanged, the number of measurement packets As much as possible, so as to ensure the accuracy of the SFO accumulation per unit time. The value is 100.
[0097] S1. The measurement initiator sends an RTT measurement information packet to the measurement receiver and records the RTT measurement information packet sending timestamp .
[0098] S2: After sending the RTT measurement information packet, the measurement initiator waits for a predetermined time interval. After that, at the predetermined time interval Send to the measurement receiving end successively measurement packets, and record the measurement packet sending timestamp of each measurement packet , .
[0099] S3. After receiving the RTT measurement information packet, the measurement receiver records the arrival timestamp of the RTT measurement packet. , then receive 100 measurement packets successively, and record the arrival timestamp of each measurement packet received .
[0100] S4: The measurement receiving end uses the RTT measurement information packet and the CSI of each measurement packet to timestamp the arrival of the RTT measurement information packet. and the arrival timestamp of each measurement packet The calibration method is:
[0101] ,
[0102] in, represents the correction result of the timestamp of data packet j, represents the CSI measured for packet j, represents the conjugate transpose, represents the phase of a complex number, is the subcarrier of packet j, represents the subcarrier spacing, represents the time series range using the discrete Fourier transform time window, Indicates the delay occupied by the protection interval, Indicates the delay occupied by the short training frame, Indicates the delay occupied by the preamble.
[0103] The correction method for timestamps based on CSI is the same. Through the above method, the arrival timestamp of the RTT measurement information packet is Perform correction to obtain the precise arrival timestamp of the RTT measurement information packet , to measure the packet arrival timestamp Perform correction to obtain the precise arrival timestamp of the measurement packet Similarly, the arrival timestamp of subsequent ACK packets Correct the ACK packet to get the exact arrival timestamp .
[0104] After receiving 100 measurement packets, the measurement receiver immediately sends an ACK packet to the measurement initiator and records the sending timestamp of the ACK packet. .
[0105] S5, measure the arrival timestamp of 100 measurement packets at the receiving end After correction, the RTT measurement packet arrives at the precise timestamp , measure the exact arrival timestamp of the packet and ACK packets send timestamp The data is loaded into a report data packet and sent to the measurement initiator.
[0106] S6. After the measurement initiator receives the ACK data packet, it records the arrival timestamp of the ACK data packet. , and timestamp the arrival of the ACK packet based on the CSI of the ACK packet Correct the ACK packet to get the exact arrival timestamp .
[0107] S7, the measurement initiator calculates the The slope k of It represents the time interval between the sending of the ith measurement packet and the RTT measurement information packet, which is specifically expressed as , represents the rough flight time of the ith data packet The slope k is calculated by the following method:
[0108] Coordinate point set P It is expressed as:
[0109] .
[0110] Compute the mean coordinate of a set of points:
[0111] ,
[0112] ,
[0113] It represents the average time interval between 100 measurement packets and the RTT measurement information packet. Represents the average of the rough flight time of 100 measurement packets.
[0114] Compute the covariance and variance of the flight times and timestamps:
[0115] ,
[0116] ,
[0117] represents the covariance between the sending time interval between the measurement packet and the RTT measurement information packet and the rough flight time of the measurement packet, Indicates the variance of the time interval between the measurement packet and the RTT measurement information packet.
[0118] calculate The slope k, that is, the accumulation of SFO per unit time:
[0119] .
[0120] S8. The measurement initiator calculates the sub-nanosecond flight time through the round-trip delay , the specific calculation method is as follows:
[0121] The calculation effect is as follows Figure 3 shown.
[0122] Example 3
[0123] Based on Embodiment 1 or 2, Embodiment 3 introduces a sub-nanosecond WiFi signal flight time measurement system based on coherence, and the system is configured to execute the sub-nanosecond WiFi signal flight time measurement method based on coherence of any of the above embodiments.
[0124] Specifically, the system is configured with a processor and a storage medium, the storage medium stores a computer program, and the processor is used to execute the computer program in the storage medium to run the method in the above embodiment.
[0125] The present invention is not limited to the above-mentioned specific embodiments, but extends to any new features or any new combination disclosed in this specification, as well as any new method or process steps or any new combination disclosed.
Claims
1. A method for measuring the flight time of a sub-nanosecond WiFi signal based on coherence, using a measurement receiving end and a measurement initiating end; characterized in that: Methods include: S1. The measurement initiator sends an RTT measurement information packet to the measurement receiver and records the RTT measurement information packet sending timestamp ; S2: The measurement initiator sends the measurement receiving end one by one according to the predetermined time interval. measurement packets, and record the measurement packet sending timestamp of each measurement packet , , Indicates the sequence number of the measurement package, is a positive integer; S3: After the measurement receiver receives the RTT measurement information packet, it records the arrival timestamp of the RTT measurement information packet. , and then successively record the arrival timestamp of each measurement packet received ; S4. After receiving all measurement packets, the measurement receiving end immediately sends an ACK data packet to the measurement initiating end and records the sending timestamp of the ACK data packet. ; and the receiving end measures the arrival timestamp of the RTT measurement information packet based on the CSI of the RTT measurement information packet and the measurement packet and the arrival timestamp of each measurement packet Perform corrections to obtain the precise arrival timestamp of the RTT measurement information packet and measuring packet precise arrival timestamps ; The method for correcting the timestamp according to CSI is: , in, represents the correction result of the timestamp of data packet j, represents the CSI measured for packet j, represents the conjugate transpose, represents the phase of a complex number, is the subcarrier of packet j, represents the subcarrier spacing, represents the time series range using the discrete Fourier transform time window, Indicates the delay occupied by the protection interval, Indicates the delay occupied by the short training frame, Indicates the delay occupied by the preamble; S5: The measurement receiving end accurately timestamps the RTT measurement information packet , measure the exact arrival timestamp of the packet and ACK packets send timestamp Load into the report data packet and send to the measurement initiator; S6. After the measurement initiator receives the ACK data packet, it records the arrival timestamp of the ACK data packet. , and timestamp the arrival of the ACK packet based on the CSI of the ACK packet Correct the accurate arrival timestamp of ACK data packet ; S7: After the measurement initiator receives the report data packet, it will accurately arrive at the timestamp of the measurement packet. and measure packet sending timestamp , the cumulative amount of SFO per unit time is calculated by linear fitting, including: S71, according to Construct the sending interval sequence T of the measurement packet and the RTT measurement information packet, and according to Construct a rough ToF sequence of measurement packetsToF: , , in represents a predetermined time interval, Indicates The time interval between sending the measurement packet and the RTT measurement information packet, Indicates Rough flight time of a measurement package; S72. Constructing a set of coordinate points P : ; S73. Calculate the average value of the point set coordinates: , , It represents the average time interval between all measurement packets and RTT measurement information packets. represents the average of the rough flight times of all measurement packets; S74. Calculate covariance and variance: , , represents the covariance between the sending time interval between the measurement packet and the RTT measurement information packet and the rough flight time of the measurement packet, It represents the variance of the time interval between the measurement packet and the RTT measurement information packet; S75. Calculate the slope k to obtain the cumulative amount of SFO per unit time: ; S8: The measurement initiator accurately measures the ToF protocol based on RTT and calculates the precise signal flight time : , Where k represents the cumulative amount of SFO per unit time.
2. The method for measuring the time of flight of a sub-nanosecond WiFi signal based on coherence according to claim 1, characterized in that: The RTT measurement information packet carries the measurement packet number ;Measure the receiving end after receiving When a measurement packet is received, it is determined that all measurement packets have been received.
3. The method for measuring the time of flight of sub-nanosecond WiFi signals based on coherence according to claim 1, characterized in that: The total duration of sending the measurement packets configured for the measurement initiator is fixed; the predetermined time interval is obtained by averaging the fixed total duration based on the total amount of the measurement packets.
4. A sub-nanosecond WiFi signal flight time measurement system based on coherence, characterized in that: The system is configured with a processor and a storage medium, wherein the storage medium stores a computer program, and the processor is used to execute the computer program in the storage medium to run the coherence-based sub-nanosecond WiFi signal flight time measurement method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Method for detecting falling-down of old people based on wireless signals
CN115661938A
Target motion trajectory tracking method and device based on commercial WiFi equipment
CN116939501A
WiFi ToF ranging and positioning system based on channel state information
CN109150780A
Positioning method based on arrival time of wireless signal
CN114630273A
Method and device for estimating sampling frequency deviation based on channel state information
CN117499194A
