RTT measurement method, apparatus, related device, WLAN system, medium, and program
By performing multiple FTM interactions between WLAN devices, adjusting the air interface duration, and correcting clock drift deviation, the problem of insufficient RTT measurement accuracy was solved, achieving higher-precision RTT measurement and improving the accuracy of distance measurement and positioning services.
Patent Information
- Application Number
- CN202411548928.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, the accuracy of RTT measurement between WLAN devices is insufficient, mainly due to large measurement deviations caused by clock drift, which affects the accuracy of distance measurement and positioning services.
By triggering the device and responding to the device through multiple FTM interactions, ensuring that the air interface duration of at least two FTM interactions is different, the deviation of the actual RTT and the deviation of the air interface duration are calculated, and then the clock drift deviation is corrected to finally determine the accurate RTT.
By correcting clock drift bias, the accuracy of RTT measurements between WLAN devices is improved, measurement errors are reduced, and the accuracy of distance measurement and positioning services is enhanced.
Smart Images

Figure CN121968275A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication technology, specifically to an RTT measurement method, apparatus, related equipment, WLAN system, medium, and program. Background Technology
[0002] WLAN (Wireless Local Area Network) is a network system that connects electronic devices such as mobile phones, computers, and tablets within the wireless signal range using wireless communication technologies such as WiFi (Wireless Fidelity); electronic devices communicating in WLAN can be called WLAN devices.
[0003] There is a time skew between WLAN devices, which is the signal transmission delay caused by distance between WLAN devices. By measuring the time skew between WLAN devices, it can be used for distance measurement, positioning services, and even optimization of network communication quality. Therefore, measuring the time skew between WLAN devices is of great significance.
[0004] Measuring the RTT (Round Trip Time) between WLAN devices can measure the time deviation between them. Therefore, how to provide a technical solution to improve the measurement accuracy of RTT has become a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of this, embodiments of this application provide an RTT measurement method, apparatus, related equipment, WLAN system, medium, and program to improve the measurement accuracy of RTT.
[0006] To achieve the above objectives, the embodiments of this application provide the following technical solutions.
[0007] In a first aspect, embodiments of this application provide an RTT measurement method applied to a triggering device, the method comprising:
[0008] Multiple FTM interactions are performed with the response device, and the air interface duration of at least two of the multiple FTM interactions is different;
[0009] For any two FTM interactions with different air interface durations of FTM frames, determine the deviation of the actual RTT and the deviation of the air interface duration of the FTM frames.
[0010] Based on the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame, the clock drift deviation of the response device and the triggering device is determined.
[0011] The actual RTT is corrected based on the clock drift deviation between the response device and the triggering device to obtain the corrected RTT;
[0012] Based on the corrected RTT, determine the RTT between the triggering device and the responding device for the final measurement.
[0013] Secondly, embodiments of this application provide an RTT measurement method applied to a response device, the method comprising:
[0014] Perform multiple FTM interactions with the triggering device;
[0015] Furthermore, the air interface duration of the FTM frames in at least two of the multiple FTM interactions is set to be different, so that the triggering device can determine the clock drift deviation of the responding device and the triggering device based on the deviation of the actual RTT of any two FTM interactions with different air interface durations of the FTM frames, and the deviation of the air interface duration of the FTM frames; wherein the clock drift deviation is used to correct the actual RTT.
[0016] Thirdly, embodiments of this application provide an RTT measurement device applied to a triggering device, the device comprising:
[0017] The trigger-side FTM interaction module is used to perform multiple FTM interactions with the response device, wherein the air interface duration of the FTM frames in at least two of the multiple FTM interactions is different.
[0018] The interaction deviation determination module is used to determine the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame for any two FTM interactions with different air interface durations.
[0019] The clock drift deviation determination module is used to determine the clock drift deviation of the response device and the triggering device based on the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame.
[0020] The correction module is used to correct the actual RTT based on the clock drift deviation between the response device and the triggering device, so as to obtain the corrected RTT;
[0021] The final measurement determination module is used to determine the RTT between the triggering device and the responding device for the final measurement based on the calibrated RTT.
[0022] Fourthly, embodiments of this application provide an RTT measurement device applied to a response device, the device comprising:
[0023] The response-side FTM interaction module is used to perform multiple FTM interactions with the triggering device;
[0024] The air interface duration setting module is used to set the air interface duration of the FTM frames of at least two FTM interactions in the multiple FTM interactions to be different, so that the triggering device can determine the clock drift deviation of the response device and the triggering device based on the deviation of the actual RTT of any two FTM interactions with different air interface durations of the FTM frames, and the deviation of the air interface duration of the FTM frames; wherein, the clock drift deviation is used to correct the actual RTT.
[0025] Fifthly, embodiments of this application provide a triggering device, comprising: at least one memory and at least one processor; the memory stores computer execution instructions, and the processor invokes the computer execution instructions stored in the memory to execute the RTT measurement method as described in the first aspect above.
[0026] In a sixth aspect, embodiments of this application provide a response device, comprising: at least one memory and at least one processor; the memory stores computer-executable instructions, and the processor invokes the computer-executable instructions stored in the memory to execute the RTT measurement method as described in the second aspect above.
[0027] In a seventh aspect, embodiments of this application provide a WLAN system including a plurality of WLAN devices; among the plurality of WLAN devices, the WLAN device that initiates an FTM is a triggering device, and the WLAN device that responds to an FTM is a responding device; wherein, the triggering device is the triggering device as described in the fifth aspect above, and the responding device is the responding device as described in the sixth aspect above.
[0028] Eighthly, embodiments of this application provide a storage medium storing computer-executable instructions that, when executed, implement the RTT measurement method as described in the first aspect above, or the RTT measurement method as described in the second aspect above.
[0029] Ninthly, embodiments of this application provide a computer program product, including computer execution instructions, which, when executed, implement the RTT measurement method as described in the first aspect above, or the RTT measurement method as described in the second aspect above.
[0030] In the RTT measurement method provided in this application embodiment, the triggering device and the responding device perform multiple FTM interactions, and the air interface duration of the FTM frames in at least two of the multiple FTM interactions is different. Therefore, for any two FTM interactions with different air interface durations, the triggering device can determine the deviation of the actual RTT and the deviation of the air interface duration of the FTM frames, and determine the clock drift deviation between the responding device and the triggering device based on the deviation of the actual RTT and the deviation of the air interface duration of the FTM frames. Furthermore, the triggering device can correct the actual RTT based on the clock drift deviation between the responding device and the triggering device to obtain the corrected RTT, and determine the final measured RTT between the triggering device and the responding device based on the corrected RTT. It can be seen that this application embodiment can calculate the clock drift deviation between the triggering device and the responding device through the difference in the air interface duration of the FTM frames, and then correct the measured actual RTT, reducing the RTT error caused by the clock drift deviation between the triggering device and the responding device, making the final measured RTT between the triggering device and the responding device more accurate, and thus improving the measurement accuracy of RTT. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0032] Figure 1 This is an example diagram of WLAN architecture.
[0033] Figure 2A This is an example diagram of the FTM process.
[0034] Figure 2B This is a timing example diagram for a single FTM interaction.
[0035] Figure 3 This is another timing example diagram for an FTM interaction.
[0036] Figure 4 A flowchart of the RTT measurement method provided in the embodiments of this application.
[0037] Figure 5A A timing example diagram of the first FTM interaction provided in an embodiment of this application.
[0038] Figure 5B A timing example diagram of the second FTM interaction provided in an embodiment of this application.
[0039] Figure 6 This is an example diagram of a sampling clock.
[0040] Figure 7 An example diagram illustrating the coordination of time points between the MAC layer and the PHY layer.
[0041] Figure 8A This is an example diagram illustrating the addition of randomized delay to the PHY layer of the response device in an embodiment of this application.
[0042] Figure 8B This is an example diagram illustrating the addition of randomized latency to the MAC and PHY layers of the response device in an embodiment of this application.
[0043] Figure 9A A block diagram of the RTT measurement device provided in the embodiments of this application.
[0044] Figure 9B Another block diagram of the RTT measuring device provided in the embodiments of this application. Detailed Implementation
[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0046] Figure 1 An exemplary diagram of a WLAN architecture is shown, such as... Figure 1 As shown, WLAN devices mainly include:
[0047] The wireless router 110 is a core device in a WLAN, used to connect to the Internet and provide network access for terminal devices connected to the WLAN. In other words, terminal devices connected to the WLAN can communicate with the Internet through the wireless router.
[0048] At least one (or more) wireless access nodes 120 are provided to extend the network coverage of a WLAN, allowing terminal devices to connect to the WLAN from different locations. Specifically, the wireless access nodes connect to a wireless router, facilitating communication between the terminal devices and the wireless router. The wireless access nodes and the wireless router can be connected via wired connections, wireless bridging, wireless networking, or other connection methods. Of course, using wireless access nodes is only one network extension solution for WLAN; embodiments of this application may also support communication between the terminal devices and the wireless router without the need for wireless access nodes.
[0049] Multiple terminal devices 130, such as laptops, smartphones, tablets, smart TVs, set-top boxes, smart home devices, IoT devices and other user-side devices, can communicate with wireless routers or wireless access nodes via WiFi to access WLAN, and then communicate with the Internet through the wireless router.
[0050] In a WLAN architecture, measuring the RTT between WLAN devices can include, but is not limited to:
[0051] Measuring the RTT between a terminal device and a wireless router or wireless access node; for example, by measuring the RTT between a terminal device and a wireless router or wireless access node, the distance to the terminal device can be estimated, thereby enabling the location of the terminal device; also, by analyzing the RTT between the wireless router or wireless access node and the terminal device, the signal strength and latency of the terminal device can be understood, and the network configuration can be adjusted to optimize the connection quality.
[0052] Measuring the RTT between a wireless router and a wireless access point; for example, measuring the RTT between a wireless router and a wireless access point can be used for purposes such as network synchronization and network topology optimization (such as adjusting routing or link configuration).
[0053] In other possible cases, embodiments of this application may also support measuring RTT between terminal devices. For example, in WiFi Direct wireless communication mode, terminal devices can communicate point-to-point without the need for relaying through a wireless router or wireless access point. Therefore, terminal devices can directly establish communication links and measure the RTT between them. This situation can be used to analyze the communication performance or distance between terminal devices.
[0054] As can be seen, WLAN devices may include, but are not limited to, terminal devices, wireless routers, and wireless access nodes. Furthermore, embodiments of this application support RTT measurement between any WLAN devices, such as supporting the measurement of RTT between a terminal device and a wireless router or wireless access node, supporting the measurement of RTT between a wireless router and a wireless access node, and supporting the measurement of RTT between terminal devices.
[0055] WLAN standard protocols define the communication methods of WLAN devices within a WLAN. For example, the IEEE (Institute of Electrical and Electronics Engineers) 802.11 protocol, as a WLAN standard protocol, defines the radio wave communication methods of wireless networks and is used in wireless communications such as WiFi. WLAN standard protocols such as IEEE 802.11 introduce FTM (Fine Time Measurement) technology to measure the RTT (Round-Trip Time) between WLAN devices, facilitating the measurement of time deviations between them.
[0056] FTM is a method for accurately measuring signal transmission delay between devices. It collects multiple timestamps by exchanging frames between WLAN devices and recording the Time of Departure (ToD) and Time of Arrival (ToA) of each frame. These timestamps are then used to calculate the Round-Trip Time (RTT) between the WLAN devices. The RTT between WLAN devices is equivalent to the Time of Flight (ToF) of the signal transmission between them.
[0057] Specifically, the frames exchanged between WLAN devices can be divided into FTM frames and ACK (Acknowledgment) frames. WLAN devices can then transmit FTM frames and ACK frames back and forth and record the ToD and ToA timestamps generated by the FTM frame and the ToD and ToA timestamps generated by the ACK frame to calculate the ToF of the FTM and ACK frames, thereby realizing the calculation of the RTT between WLAN devices.
[0058] For ease of explanation, the WLAN device initiating FTM will be called the initiating STA, and the WLAN device responding to FTM will be called the responding STA. In other words, the responding STA responds to the FTM initiated by the initiating device; STA is an abbreviation for Station. For example, Figure 2A An example diagram of the FTM process is shown, such as... Figure 2AAs shown, the FTM process can be divided into the FTM initiation process, the FTM interaction process, and the calculation process. The FTM initiation process is mainly initiated by the triggering device to initiate an FTM request and responded by the responding device. The FTM interaction process is mainly the back-and-forth transmission of FTM frames and ACK frames between the responding device and the triggering device to complete one FTM interaction. The calculation process is mainly the process in which the triggering device calculates the RTT of the previous FTM interaction during the next FTM interaction.
[0059] like Figure 2A As shown, the FTM process may include:
[0060] Step S210: Trigger the device to send an FTM request to the responding device.
[0061] For example, the triggering device sends an FTM request frame to the responding device to initiate an FTM request. The FTM request frame can be considered a management frame in WLAN standard protocols such as IEEE 802.11, used to initiate the FTM process. For instance, the FTM request frame may contain basic information about the triggering device (such as its MAC address) and FTM measurement parameters (such as the number of FTM interactions and the interval between each FTM interaction).
[0062] Step S211: The responding device sends an FTM request response to the triggering device.
[0063] After receiving an FTM request (e.g., an FTM request frame) initiated by the triggering device, if the responding device agrees to FTM, it can send an FTM request response to the triggering device (e.g., the responding device can send an FTM response frame to the triggering device) to inform the triggering device that it is ready to perform FTM.
[0064] After steps S210 and S211 are completed, the FTM initiation process is completed, and the FTM interaction process begins. Based on the number of FTM interactions negotiated between the triggering device and the responding device, the responding device and the triggering device can perform multiple FTM interactions.
[0065] In step S212, the responding device sends an FTM frame to the triggering device and records the ToD timestamp of the FTM frame.
[0066] The responding device first sends an FTM frame to the triggering device. When sending the FTM frame, the responding device generates a ToD timestamp, indicating the time the FTM frame was sent from the responding device. The responding device can record the ToD timestamp of the FTM frame; for ease of explanation, the ToD timestamp of the FTM frame is denoted as T1. ToD .
[0067] Step S213: Trigger the device to receive the FTM frame sent by the response device and record the ToA timestamp of the FTM frame.
[0068] The FTM frame sent by the responding device propagates through the air and reaches the triggering device after passing through the Time-of-Flight (ToF) of the FTM frame, where it is received. The ToF of the FTM frame is affected by the distance between the responding device and the triggering device, and there is a positive correlation. For example, the farther away the responding device and the triggering device are, the longer the ToF of the FTM frame (i.e., the longer the ToF of the FTM frame during propagation in the air), and the closer the responding device and the triggering device are, the shorter the ToF of the FTM frame.
[0069] After receiving the FTM frame sent by the responding device, the triggering device generates a ToA timestamp for the FTM frame, which is the time the FTM frame arrived at the triggering device. The triggering device can record the ToA timestamp of the FTM frame; for ease of explanation, the ToA timestamp of the FTM frame is denoted as T2. ToA .
[0070] Step S214: The triggering device sends an ACK frame to the responding device and records the ToD timestamp of the ACK frame.
[0071] After receiving the FTM frame from the responding device, the triggering device sends an ACK frame to the responding device after the inter-frame waiting time. When sending the ACK frame, the triggering device generates a ToD timestamp, indicating the time the ACK frame was sent from the triggering device. The triggering device can record the ToD timestamp of the ACK frame; for ease of explanation, the ToD timestamp of the ACK frame is denoted as T3. ToD .
[0072] Step S215: The responding device receives the ACK frame sent by the triggering device and records the ToA timestamp of the ACK frame.
[0073] The ACK frame sent by the triggering device propagates through the air and reaches the responding device after passing through the Time-of-Flight (ToF) of the ACK frame, where it is received. The ToF of the ACK frame is affected by the distance between the triggering device and the responding device, and there is a positive correlation between them. That is, the farther away the triggering device and the responding device are, the longer the ToF of the ACK frame; the closer the triggering device and the responding device are, the shorter the ToF of the ACK frame.
[0074] After receiving the ACK frame sent by the triggering device, the responding device generates a ToA timestamp for the ACK frame, which is the time the ACK frame arrived at the responding device. The responding device can record the ToA timestamp of the ACK frame; for ease of explanation, the ToA timestamp of the ACK frame is denoted as T4. ToD .
[0075] It is understandable that the Time-of-Flight (ToF) of the FTM frame is added to the Time-of-Flight (ToF) of the ACK frame to obtain the round-trip time (RTT) of the signal between the responding and triggering devices. That is, the signal round-trip between the responding and triggering devices is achieved through the round-trip FTM and ACK frames. Therefore, the ToF of the FTM frame plus the ToF of the ACK frame equals the RTT between the responding and triggering devices. Since the ToF of the FTM frame is the same as that of the ACK frame, meaning that the distance between the responding and triggering devices does not change within a very short measurement time, the RTT between the responding and triggering devices can be equated to twice the ToF, i.e., 2 * ToF.
[0076] At this point, the responding device and the triggering device have completed one FTM interaction; that is, one FTM interaction involves the interaction of one FTM frame and one ACK frame, that is, the responding device sends an FTM frame to the triggering device and it is received by the triggering device, and the triggering device sends an ACK frame to the responding device and it is received by the responding device. Thus, the responding device and the triggering device have completed one FTM interaction.
[0077] To facilitate a further understanding of the multiple timestamps mentioned above, Figure 2B An exemplary timing diagram of a single FTM interaction is shown, combined with... Figure 2A and Figure 2B As shown, the responding device can send an FTM frame to the triggering device and record the ToD timestamp T1 of the FTM frame after passing through one or more Backoff Slots. ToD It should be noted that the backoff mechanism is used to avoid collisions caused by multiple devices sending data at the same time. When the responding device detects that the channel is busy, the responding device will not immediately send an FTM frame, but will enter the backoff mechanism, and then send an FTM frame when one or more backoff slots are randomly backed off and the channel is idle.
[0078] After the FTM frame passes through the Time-of-Flight (ToF) circuit, it arrives at the triggering device, which records the ToA timestamp T2 of the FTM frame. ToA After the set inter-frame wait time (SIFS), the triggering device sends an ACK frame to the responding device and records the ToD timestamp T3 of the ACK frame. ToD The ACK frame arrives at the response device after passing through the Time-of-Flight (ToF) circuit. The response device records the ToA timestamp T4 of the ACK frame. ToA .
[0079] In step S216, the responding device carries the ToD timestamp of the FTM frame recorded in the previous FTM interaction and the ToA timestamp of the ACK frame in the next FTM interaction during the next FTM interaction.
[0080] In step S217, the responding device sends the FTM frame for the next FTM interaction to the triggering device and records the ToD timestamp of the FTM frame for the next FTM interaction.
[0081] In step S218, the triggering device calculates the RTT of the last FTM interaction.
[0082] Based on the FTM measurement parameters negotiated between the triggering device and the interacting device, such as the number of FTM interactions and the interval between each FTM interaction, the responding device can perform multiple FTM interactions with the triggering device. Since each FTM interaction involves the exchange of one FTM frame and one ACK frame, the responding device and the triggering device can exchange the next FTM frame and the next ACK frame in the next FTM interaction, and record the corresponding timestamps. The specific process can be referred to the previous description, and will not be elaborated here.
[0083] It should be noted that during the next FTM interaction, the responding device will send an FTM frame for the next FTM interaction to the triggering device, and the FTM frame for the next FTM interaction will carry the ToD timestamp T1 of the FTM frame recorded in the previous FTM interaction. ToD and the ToA timestamp T4 of the ACK frame. ToA (For example, in the next FTM interaction, the responding device can use the ToD timestamp T1 of the FTM frame recorded in the previous FTM interaction.) ToD and the ToA timestamp T4 of the ACK frame. ToA (Carried in the payload of the FTM frame in the next FTM interaction) so as to trigger the device to obtain the ToD timestamp T1 of the FTM frame of the previous FTM interaction. ToD and the ToA timestamp T4 of the ACK frame. ToA This enables the triggering device to calculate the RTT of the last FTM interaction.
[0084] In other words, during an FTM interaction, the triggering device can obtain the ToA timestamp T2 of the FTM frame of this FTM interaction. ToA and the ToD timestamp T3 of the ACK frame. ToD The ToD timestamp T1 of the FTM frame in this FTM interaction ToD The ToA timestamp T4 of the ACK frame ToA The response device records this and sends it to the triggering device in the payload of the FTM frame of the next FTM interaction. Then, the triggering device can receive the FTM frame of the next FTM interaction sent by the response device during the next FTM interaction and parse the ToD timestamp T1 of the previous FTM interaction's FTM frame from the payload. ToD The ToA timestamp T4 of the ACK frame ToAFurthermore, based on the ToD timestamp T1 of the FTM frame from the previous FTM interaction... ToD The ToA timestamp T2 of the FTM frame toA The ToD timestamp T3 of the ACK frame ToD and the ToA timestamp T4 of the ACK frame. ToA The RTT of the previous FTM interaction is calculated; that is, the RTT of the previous FTM interaction is calculated by the triggering device after obtaining the FTM frame in the next FTM interaction.
[0085] Combination Figure 2A and Figure 2B The description states that, ideally, the RTT between the triggering device and the responding device is twice the Time to Flight (ToF), i.e., 2 * ToF. Therefore, the ideal RTT between the triggering device and the responding device can be calculated using the following formula 1:
[0086] RTT = 2 * ToF = (T4) ToA -T1 ToD )-(T3 ToD -T2 ToA ), formula 1;
[0087] In one FTM interaction, T4 ToA -T1 ToD T3 represents the total time from when the responding device sends an FTM frame to when it receives an ACK frame; ToD -T2 ToA This represents the interval between when the triggering device receives an FTM frame and when it sends an ACK frame.
[0088] The RTT calculation between the triggering device and the response device mentioned above is based on an ideal situation, and the calculation is the ideal real RTT (i.e., the real flight time of the signal round trip between the triggering device and the response device). However, in reality, there is an RTT deviation caused by clock drift, which leads to a deviation in the actual RTT measured using FTM.
[0089] Clock drift-induced RTT deviation refers to the discrepancy between the timestamps recorded by the triggering and response devices and the actual time due to clock drift, resulting in a discrepancy between the calculated actual RTT and the true RTT.
[0090] Specifically, WLAN devices capture timestamps based on their own clocks. However, WLAN clocks are not perfectly stable and exhibit clock drift. Clock drift refers to the deviation in the clock frequency over time, causing the recorded time to differ from the actual time (e.g., standard time). Clock drift can be represented by PPM (Parts Per Million), indicating the deviation per million units of time. For example, if a WLAN device's clock drift is 20 PPM, then every million units of time (e.g., microseconds, milliseconds, or seconds), the clock will deviate by 20 units from the actual time (e.g., standard time). Assuming that the actual time (e.g., standard time) has elapsed for a period of T_duration, then for a WLAN device with a clock drift of 20 PPM, the actual time measured by the WLAN device will deviate from the actual time (e.g., standard time) by T_duration × 20 PPM. Therefore, the actual time measured by the WLAN device is T_duration × (1 + 20 PPM).
[0091] Due to clock drift in the response and triggering devices, the timestamps recorded by the response and triggering devices will deviate; assuming the clock drift of the triggering device is defined as PPM... i Then due to the clock drift PPM of the triggering device i The ToD timestamp T3 of the ACK frame actually recorded when the device sends the ACK frame. ToD There is a deviation, specifically expressed in Formula 2 below:
[0092] T3 ToD =T2 ToA +(T ftm +SIFS)*(1+PPM i ), formula 2;
[0093] Among them, T ftm This represents the air interface duration of the FTM frame, i.e., the transmission time the FTM frame occupies on the wireless channel. For example, it represents the time the responding device spends sending an FTM frame on the wireless channel, or the time the triggering device spends receiving an FTM frame on the wireless channel. The air interface duration for both the responding and triggering devices is the same, which is the transmission time the FTM frame occupies on the wireless channel, i.e., T. ftm SIFS (Short Interframe Space) refers to the inter-frame wait time defined by WLAN standard protocols such as IEEE 802.11, such as the minimum wait time.
[0094] In other words, the air interface duration T of the FTM frame ftm The sum of the inter-frame wait time (SIFS) and the clock drift (PPM) of the triggering device is present. i The resulting deviation, which triggers the device to send an ACK frame, results in the actual recorded ToD timestamp T3 of the ACK frame. ToD There is clock drift (PPM) in the triggering device. i The resulting deviation.
[0095] Assume the clock drift of the response device is defined as PPM. r Then due to the clock drift PPM of the response device r The ToA timestamp T4 of the ACK frame actually recorded when the responding device receives the ACK frame. ToA There is a deviation, specifically expressed in Formula 3 below:
[0096] T4 ToA =T1 ToD +(T ftm +SIFS+2*ToF)*(1+PPM r ), formula 3;
[0097] In other words, the air interface duration T of the FTM frame ftm The inter-frame latency (SIFS) and the sum of the signal round-trip time (2 * ToF) contribute to the clock drift (PPM) of the responding device. r The resulting deviation leads to the actual ToA timestamp T4 of the ACK frame recorded by the responding device when receiving the ACK frame. ToA There is clock drift (PPM) in the response device. r The resulting deviation.
[0098] To facilitate understanding of the meaning of the parameters mentioned above, Figure 3 An exemplary timing example diagram of an FTM interaction is shown, combined with... Figure 2B and Figure 3 As shown, in Figure 3 In the example, T_measurement is the measurement time of RTT, including the air interface duration T of the FTM frame. ftm Inter-frame latency (SIFS) and round-trip flight time (2 * ToF).
[0099] Due to the ToD timestamp T3 of the actually recorded ACK frame ToD And the ToA timestamp T4 of the actually recorded ACK frame. ToA There is a discrepancy caused by clock drift between the response device and the triggering device. Therefore, the triggering device uses the ToD timestamp T3 of the actually recorded ACK frame. ToD And the ToA timestamp T4 of the actually recorded ACK frame.ToA There will be deviations when calculating the actual RTT;
[0100] Specifically, let's assume the actual RTT calculated is defined as RTT. est The actual definition of ToF is ToF est Then RTT est Twice the ToF est (i.e., the actual RTT is twice the actual ToF), thus utilizing the ToD timestamp T3 of the actually recorded ACK frame. ToD And the ToA timestamp T4 of the actually recorded ACK frame. ToA When calculating the actual RTT, substitute formulas 2 and 3 into formula 1 to obtain the actual RTT (i.e., RTT). est It has the following expression, as shown in Formula 4:
[0101] RTT est =2 * ToF est =(T4) ToA -T1 ToD )-(T3 ToD -T2 ToA )
[0102] =(T ftm +SIFS+2*ToF)*(1+PPM r )-(T ftm +SIFS)*(1+PPM i )
[0103] =(T ftm +SIFS)*(PPM r -PPM i )+2*ToF*(1+PPM r ), formula 4;
[0104] Where ToF is the actual ToF, and 2*ToF is the actual RTT. As can be seen from Formula 4 above, the ToD timestamp T3 of the actually recorded ACK frame is used. ToD And the ToA timestamp T4 of the actually recorded ACK frame. ToA Calculate the actual RTT (i.e., RTT) est Therefore, compared to the true RTT (i.e., 2*ToF), the deviation between the actual RTT and the true RTT mainly consists of the following two items:
[0105] The first term is the air interface duration T of the FTM frame introduced by clock drift. ftm And the deviation of the inter-frame latency (SIFS), which is related to the clock drift (PPM) of the responding device. r and the clock drift PPM of the triggering device iThe differences are related, as reflected in Formula 4 (T). ftm +SIFS)*(PPM r -PPM i );
[0106] The second term is the deviation of the true Time-of-Flight (ToF) introduced by clock drift, which is related to the clock drift (PPM) of the responding device. r The correlation is reflected in Formula 4 as 2*ToF*(1+PPM) r ).
[0107] In real-world measurement scenarios, the distance between WLAN devices within the same WLAN is not very far, so the actual Time-of-Flight (ToF) is relatively small, for example, on the nanosecond level, thus minimizing the deviation introduced by the second point mentioned above; while the air interface duration T of the FTM frame... ftm The accuracy can be measured at the millisecond level. Therefore, the deviation introduced by the first item mentioned above is relatively large and is the main deviation between the actual RTT and the true RTT. Thus, the deviation of the first item mentioned above needs to be considered to correct the measured actual RTT and improve the measurement accuracy of the measured RTT.
[0108] Based on this, embodiments of this application can introduce different air interface durations of FTM frames in multiple FTM interactions between the response device and the triggering device, thereby obtaining the clock drift deviation between the response device and the triggering device (i.e., the difference in clock drift between the response device and the triggering device), and then correcting the actual RTT measured to improve the measurement accuracy of RTT.
[0109] Based on the above approach, as an optional implementation, Figure 4 An exemplary flowchart of the RTT measurement method provided in an embodiment of this application is shown, with reference to... Figure 4 The process may include the following steps.
[0110] In step S410, the triggering device and the responding device perform multiple FTM interactions, and the air interface duration of the FTM frames in at least two of the multiple FTM interactions is different.
[0111] Multiple FTM interactions can occur between the triggering device and the responding device. Each FTM interaction involves the responding device sending an FTM frame to the triggering device and receiving it, and the triggering device sending an ACK frame to the responding device and receiving it. In at least two of the multiple FTM interactions, the responding device sends FTM frames to the triggering device with different air interface durations, thus the air interface durations of the FTM frames used in the at least two FTM interactions between the triggering device and the responding device are different.
[0112] The air interface duration of an FTM frame is denoted as T. ftm, is the transmission time occupied by the FTM frame on the wireless channel, which can be determined by two factors:
[0113] The size of an FTM frame, such as its byte length, is the number of bytes in the FTM frame. The size of an FTM frame can be positively correlated with its air interface duration. For example, the larger the size of an FTM frame (such as its byte length), the longer its air interface duration, and the longer the FTM frame occupies the wireless channel.
[0114] Physical layer parameters, such as the physical layer transmission rate (i.e., the physical rate of wireless channel transmission), can be negatively correlated with the air interface duration of the FTM frame. For example, the higher the physical layer transmission rate, the shorter the air interface duration of the FTM frame. In other words, the higher the physical layer transmission rate, the shorter the time the FTM frame can complete transmission, and thus the shorter the air interface duration it occupies.
[0115] For example, the air interface duration T of an FTM frame ftm It can be represented as:
[0116] T ftm = (Number of bytes in an FTM frame × 8) / Physical layer transmission rate, where 1 byte is 8 bits.
[0117] In other words, the air interface duration T of the FTM frame ftm The size of the FTM frame (e.g., number of bytes) and the physical layer parameters (e.g., physical layer transmission rate) used to transmit the FTM frame are determined by the size of the FTM frame (e.g., number of bytes) and / or the physical layer parameters (e.g., physical layer transmission rate) in at least two of the multiple FTM interactions, so that the air interface duration of the FTM frames in at least two of the multiple FTM interactions is different.
[0118] During any FTM interaction, after receiving the FTM frame sent by the responding device, the triggering device can parse the FTM frame according to WLAN standard protocols such as IEEE 802.11 to determine the air interface duration of the FTM frame. In other words, the air interface duration of the FTM frame can be obtained by both the responding and triggering devices during any FTM interaction. Specifically, for any given FTM interaction, the air interface duration of the FTM frame is set by the responding device, while the triggering device, after receiving the FTM frame, can determine its air interface duration based on WLAN standard protocols such as IEEE 802.11.
[0119] In step S411, for any two FTM interactions with different air interface durations of FTM frames, the device is triggered to determine the deviation of the actual RTT and the deviation of the air interface duration of the FTM frames.
[0120] The triggering device can determine the actual RTT for each FTM interaction. For example, the triggering device can determine the actual RTT for each FTM interaction based on the ToD timestamp, ToA timestamp, ToD timestamp, and ToA timestamp of the ACK frame. Thus, for any two FTM interactions with different air interface durations of the FTM frames, the triggering device can determine the deviation of the actual RTT.
[0121] As an optional implementation, after the triggering device and the responding device complete an FTM interaction, the triggering device can calculate the actual RTT of the previous FTM interaction after receiving an FTM frame in the next FTM interaction; thus, after the triggering device and the responding device perform multiple FTM interactions, the triggering device can calculate the actual RTT of each FTM interaction.
[0122] For example, taking the i-th FTM interaction as an example, the triggering device can calculate the actual RTT of the i-th FTM interaction based on the ToD timestamp of the FTM frame, the ToA timestamp of the FTM frame, the ToD timestamp of the ACK frame, and the ToA timestamp of the ACK frame actually recorded in the i-th FTM interaction; let the actual RTT of the i-th FTM interaction be defined as RTT. esti Accordingly, the actual Time of Flight (ToF) of the i-th FTM interaction is defined as ToF. esti Based on formulas 1 and 4, RTT esti It can be represented by the following formula 5:
[0123] RTT esti =2 * ToF esti =(T4) ToAi -T1 ToDi )-(T3 ToDi -T2 ToAi )
[0124] =(T ftmi +SIFS)*(PPM r -PPM i )+2*ToF*(1+PPM r ), formula 5;
[0125] Among them, T1 ToDi Indicates the ToD timestamp and T2 of the FTM frame actually recorded during the i-th FTM interaction. ToAi Indicates the ToA timestamp and T3 of the FTM frame actually recorded during the i-th FTM interaction. ToDi Indicates the ToD timestamp and T4 of the ACK frame actually recorded during the i-th FTM interaction. ToAi T represents the ToA timestamp of the ACK frame actually recorded during the i-th FTM interaction;ftmi This represents the air interface duration of the FTM frame used in the i-th FTM interaction.
[0126] According to the above formula, after the triggering device and the responding device have performed multiple FTM interactions, the triggering device can calculate the actual RTT for each FTM interaction.
[0127] Furthermore, for any two FTM interactions with different air interface durations of FTM frames, the triggering device can calculate the deviation of the actual RTT between the two FTM interactions; for example, for any two FTM interactions with different air interface durations of FTM frames, the actual RTT of the later FTM interaction is subtracted from the actual RTT of the earlier FTM interaction to obtain the deviation of the actual RTT.
[0128] As an optional implementation, any two FTM interactions with different air interface durations of the FTM frames referred to in the embodiments of this application can be: two adjacent FTM interactions with different air interface durations of the FTM frames, or two non-adjacent FTM interactions with different air interface durations of the FTM frames, as long as the air interface durations of the two FTM interactions are different and there is a deviation in the actual RTT.
[0129] For example, consider the i-th and j-th FTM interactions with different air interface durations in the FTM frames, where the j-th FTM interaction follows the i-th FTM interaction. If the i-th and j-th FTM interactions are adjacent FTM interactions, the j-th FTM interaction can be the (i+1)-th FTM interaction. If the i-th and j-th FTM interactions are not adjacent FTM interactions, the j-th FTM interaction can be any FTM interaction that follows the i-th FTM interaction but is not the (i+1)-th FTM interaction. Assume the actual RTT of the j-th FTM interaction is defined as RTT. estj The actual definition of ToF is ToF estj And RTT estj It has the following representation as shown in Formula 6:
[0130] RTT estj =2 * ToF estj =(T4) ToAj -T1 ToDj )-(T3 ToDj -T2 ToAj )
[0131] =(T ftmj +SIFS)*(PPM r -PPM i )+2*ToF*(1+PPM r ), formula 6;
[0132] Among them, T1ToDj This represents the ToD timestamp and T2 of the FTM frame actually recorded during the j-th FTM interaction. ToAj This represents the ToA timestamp and T3 timestamp of the FTM frame actually recorded during the j-th FTM interaction. ToDj This represents the ToD timestamp and T4 of the ACK frame actually recorded during the j-th FTM interaction. ToAj This represents the ToA timestamp of the ACK frame actually recorded during the j-th FTM interaction;
[0133] T ftmj Let T represent the air interface duration of the FTM frame used in the j-th FTM interaction, and T ftmj -T ftmi =T deltai→j , among which, T deltai→j The deviation of the air interface duration of the FTM frame between the j-th FTM interaction and the i-th FTM interaction is the difference between the air interface durations of the FTM frames in any two FTM interactions with different air interface durations. That is, the deviation of the air interface duration of the corresponding FTM frame is obtained by subtracting the air interface duration of the FTM frame in the earlier FTM interaction from the air interface duration of the later FTM interaction.
[0134] In a further optional implementation, the air interface duration of the FTM frames in adjacent FTM interactions can be different; and the air interface duration of the FTM frames in adjacent FTM interactions can increase sequentially based on a fixed deviation; for example, starting from the first FTM interaction, the air interface duration of the FTM frames in the next FTM interaction increases by a fixed deviation compared to the previous FTM interaction; for example, the air interface duration of the FTM frame in the first FTM interaction is T. ftm1 The air interface duration of the FTM frame in the second FTM interaction is T. ftm2 Then T ftm2 Compared to T ftm1 Add a fixed deviation, which can be defined as T. delta And so on, thus in this case, the deviation T of the air interface duration of the FTM frame between the j-th FTM interaction and the i-th FTM interaction is... deltai→j It can be: T deltai→j =T delta *(ji); For example, if the i-th FTM interaction and the j-th FTM interaction are two consecutive FTMs, then T deltai→j =T delta .
[0135] Of course, embodiments of this application can also support the air interface duration of FTM frames in adjacent FTM interactions decreasing sequentially based on a fixed deviation. For example, starting from the first FTM interaction, the air interface duration of the FTM frame in the next FTM interaction is reduced by a fixed deviation compared to the previous FTM interaction. For instance, the air interface duration of the FTM frame in the first FTM interaction is T. ftm1 The air interface duration of the FTM frame in the second FTM interaction is T. ftm2 Then T ftm2 Compared to T ftm1 Reduce fixed deviation T delta The same principle applies to subsequent FTM interactions.
[0136] The embodiments of this application can also support random changes in the air interface duration of FTM frames in adjacent FTM interactions. That is, the air interface duration of FTM frames in adjacent FTM interactions changes randomly and does not follow a fixed increasing or decreasing rule, as long as the air interface duration of FTM frames in adjacent FTM interactions is different.
[0137] The embodiments of this application can also support non-linear changes in the air interface duration of FTM frames in adjacent FTM interactions, such as exponentially increasing or decreasing the air interface duration of FTM frames in adjacent FTM interactions.
[0138] In other optional implementations, embodiments of this application may also support periodic changes in the air interface duration of FTM frames in multiple FTM interactions. For example, the air interface duration of FTM frames in adjacent FTM interactions may be different, while the air interface duration of FTM frames in every other FTM interaction may be the same. For instance, taking four FTM interactions as an example, the air interface duration of FTM frames between adjacent FTM interactions (such as the first FTM interaction and the second FTM interaction, the third FTM interaction and the fourth FTM interaction) may be different, while the air interface duration of FTM frames in every other interaction (such as the first FTM interaction and the third FTM interaction, the second FTM interaction and the fourth FTM interaction) may be the same.
[0139] In other optional implementations, embodiments of this application may also support different air interface durations for each FTM frame in multiple FTM interactions, such as the air interface duration of the FTM frame increasing sequentially, decreasing sequentially, changing randomly, or changing non-linearly.
[0140] It should be noted that the embodiments of this application do not limit the way the air interface duration of the FTM frame changes, as long as it is ensured that the air interface duration of the FTM frames in at least two of the multiple FTM interactions is different.
[0141] Returning to the examples of the i-th and j-th FTM interactions above, the triggering device obtains the actual RTT (i.e., RTT) of the i-th FTM interaction. esti ), the actual RTT of the j-th FTM interaction (i.e., RTT) estj The deviation T of the air interface duration of the FTM frames of the j-th FTM interaction and the i-th FTM interaction. deltai→j Afterwards, the triggering device can transmit the actual RTT (i.e., RTT) of the j-th FTM interaction. estj Subtract the actual RTT (i.e., RTT) of the i-th FTM interaction esti This allows us to obtain the actual RTT deviation between the j-th FTM interaction and the i-th FTM interaction; for example, subtracting formula 5 from formula 6 yields the following expression:
[0142] RTT estj -RTT esti =2*(ToF) estj -ToF esti ) = T deltai→j *(PPM r -PPM i ),male
[0143] Formula 7.
[0144] In other words, as an optional implementation, for any two FTM interactions with different air interface durations of FTM frames, the actual RTT deviation is: the deviation of the air interface duration of the FTM frame multiplied by the clock drift deviation of the responding device and the triggering device (referred to as the clock drift deviation of the responding device and the triggering device). Therefore, for any two FTM interactions with different air interface durations of FTM frames, the deviation of the air interface duration of the FTM frame, as well as the clock drift deviation of the responding device and the triggering device, are related to the actual RTT deviation.
[0145] In step S412, the triggering device determines the clock drift deviation between the response device and the triggering device based on the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame.
[0146] As mentioned earlier, for any two FTM interactions with different air interface durations of FTM frames, the deviation of the air interface duration of the FTM frames, as well as the clock drift deviation of the responding device and the triggering device, are related to the actual RTT deviation. Therefore, for any two FTM interactions with different air interface durations of FTM frames, after determining the actual RTT deviation and the deviation of the air interface duration of the FTM frames, the triggering device can determine the clock drift deviation of the responding device and the triggering device based on the actual RTT deviation and the deviation of the air interface duration of the FTM frames.
[0147] For example, combining with Formula 7 above, the clock drift deviation between the responding device and the triggering device is PPM. r -PPM i And it has the following representation as shown in Formula 8:
[0148]
[0149] In other words, in an optional implementation, the triggering device can divide the actual RTT deviation of any two FTM interactions with different air interface durations of the FTM frames by the deviation of the corresponding air interface duration of the FTM frames to obtain the clock drift deviation between the responding device and the triggering device.
[0150] In a further optional implementation, during multiple FTM interactions between the triggering device and the responding device, the embodiments of this application can divide the multiple FTM interactions into multiple groups of FTM interactions. Each group of FTM interactions includes two FTM interactions, and the air interface durations of the two FTM interactions in the same group are different. For example, if two adjacent FTM interactions in multiple FTM interactions are divided into a group of FTM interactions, then the air interface durations of the FTM frames of the two adjacent FTM interactions are different. In a further optional implementation, the multiple groups of FTM interactions are not repeated, that is, the FTM interactions in each group of FTM interactions are different times of FTM interactions, and there are no repeated times of FTM interactions.
[0151] Therefore, for each group of FTM interactions, this embodiment can obtain the clock drift deviation of the corresponding response device and triggering device based on the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame. Thus, for multiple groups of FTM interactions, clock drift deviations of the response device and triggering device corresponding to each group of FTM interactions can be formed. For example, taking two adjacent FTM interactions as a group of FTM interactions, for the first group of FTM interactions, this embodiment can obtain the clock drift deviation of the response device and triggering device corresponding to the first group of FTM interactions based on the deviation of the actual RTT between the first and second FTM interactions and the deviation of the air interface duration of the FTM frame. Similarly, based on the deviation of the actual RTT between two adjacent FTM interactions in each group of FTM interactions and the deviation of the air interface duration of the FTM frame, the clock drift deviation of the response device and triggering device corresponding to each group of FTM interactions can be obtained, forming clock drift deviations of the response device and triggering device corresponding to multiple groups of FTM interactions.
[0152] Furthermore, in this embodiment, the clock drift deviations of the response devices and trigger devices corresponding to multiple FTM interactions can be averaged or weighted averaged, and the result can be used as the final clock drift deviation of the response devices and trigger devices to optimize the accuracy of determining the clock drift deviation of the response devices and trigger devices.
[0153] In other words, multiple FTM interactions are divided into multiple groups of FTM interactions, and the clock drift deviation of the responding device and the triggering device is calculated in each group of FTM interactions. Then, an average or weighted average is performed to obtain a more accurate clock drift deviation of the responding device and the triggering device.
[0154] In step S413, the triggering device corrects the actual RTT based on the clock drift deviation between the response device and the triggering device to obtain the corrected RTT.
[0155] After obtaining the clock drift deviation between the response device and the triggering device, the embodiments of this application can correct the actual RTT, thereby correcting the RTT deviation caused by the clock drift deviation between the response device and the triggering device, and obtaining the corrected RTT.
[0156] As an optional implementation, the triggering device can adjust the clock drift deviation (PPM) between the responding device and the triggering device. r -PPM i The actual RTT is corrected by subtracting the RTT deviation caused by the clock drift deviation of the response device and the trigger device from the actual RTT, thus obtaining the corrected RTT.
[0157] Specifically, combining Formula 4, the first term in Formula 4 (T) ftm +SIFS)*(PPM r -PPM i This reflects the clock drift deviation (PPM) between the responding and triggering devices. r -PPM i The resulting RTT bias; in determining the clock drift bias PPM of the response device and the triggering device. r -PPM i Then, you can subtract (T) from the actual RTT. ftm +SIFS)*(PPM r -PPM i If we can correct the actual RTT, we can obtain the corrected RTT.
[0158] As an optional implementation, embodiments of this application can correct the actual RTT for each FTM interaction based on the clock drift deviation between the responding device and the triggering device, thus obtaining the corrected RTT for each FTM interaction. For example, the actual RTT (i.e., RTT) of the i-th FTM interaction is used as an example. esti Taking the correction as an example, the RTT corresponding to the i-th FTM interaction is defined as RTT. esti ', then RTT esti 'This can be expressed by the following formula 9:'
[0159] RTTesti =RTT esti -(T ftmi +SIFS)*(PPM r -PPM i ), formula 9;
[0160] Among them, (T) ftmi +SIFS)*(PPM r -PPM i ) represents the RTT deviation caused by the clock drift deviation between the response device and the triggering device in the i-th FTM interaction.
[0161] In other words, for any FTM interaction, the corrected RTT is: the actual RTT of that FTM interaction minus the RTT deviation caused by the clock drift deviation between the responding device and the triggering device.
[0162] In step S414, the triggering device determines the final measured RTT between the triggering device and the response device based on the corrected RTT.
[0163] As an optional implementation, embodiments of this application may use the corrected RTT as the RTT between the triggering device and the responding device for determining the final measurement.
[0164] As an optional implementation, in multiple FTM interactions, the embodiments of this application can correct the actual RTT of each FTM interaction to obtain the corrected RTT of each FTM interaction, thereby forming the corrected RTT corresponding to each of the multiple FTM interactions; then, the corrected RTT corresponding to each of the multiple FTM interactions is averaged or weighted averaged to obtain the final measured RTT between the triggering device and the responding device.
[0165] In the RTT measurement method provided in this application embodiment, the triggering device and the responding device perform multiple FTM interactions, and the air interface duration of the FTM frames in at least two of the multiple FTM interactions is different. Therefore, for any two FTM interactions with different air interface durations of the FTM frames, the triggering device can determine the deviation of the actual RTT and the deviation of the air interface duration of the FTM frames, and determine the clock drift deviation between the responding device and the triggering device based on the deviation of the actual RTT and the deviation of the air interface duration of the FTM frames. Furthermore, the triggering device can correct the actual RTT based on the clock drift deviation between the responding device and the triggering device to obtain the corrected RTT, and determine the final measured RTT between the triggering device and the responding device based on the corrected RTT.
[0166] Correspondingly, from the perspective of the responding device, the responding device and the triggering device perform multiple FTM interactions, and the responding device can set the air interface duration of the FTM frames of at least two of the multiple FTM interactions to be different, so that the triggering device can determine the clock drift deviation between the responding device and the triggering device based on the deviation of the actual RTT of any two FTM interactions with different air interface durations of the FTM frames, and the deviation of the air interface duration of the FTM frames; wherein, the clock drift deviation between the responding device and the triggering device is used by the triggering device to correct the actual RTT.
[0167] As can be seen, the embodiments of this application can calculate the clock drift deviation between the triggering device and the responding device by the difference in the air interface duration of the FTM frame, and then correct the measured actual RTT, reduce the RTT error caused by the clock drift deviation between the triggering device and the responding device, and make the final measured RTT between the triggering device and the responding device more accurate, thereby improving the measurement accuracy of RTT.
[0168] For ease of understanding, taking the first and second adjacent FTM interactions between the responding device and the triggering device as an example, embodiments of this application can correct the measured actual RTT by introducing different air interface durations of FTM frames in two adjacent FTM interactions. As an optional implementation, Figure 5A An exemplary timing diagram of the first FTM interaction provided in this application embodiment is shown. For ease of explanation, the FTM frame of the first FTM interaction is referred to as the first FTM frame; the air interface duration of the first FTM frame is referred to as the first air interface duration, and is defined as T. ftm1 The ToD timestamp of the first FTM frame is called the first ToD timestamp of the first FTM frame, defined as T1. ToD1 The ACK frame of the first FTM interaction is called the first ACK frame, and the ToD timestamp of the first ACK frame is called the first ToD timestamp of the first ACK frame, defined as T3. ToD1 The ToA timestamp of the first ACK frame is called the first ToA timestamp of the first ACK frame, defined as T4. ToA1 ;
[0169] like Figure 5A As shown, after passing through one or more Backoff Slots, the response device responds for a first air interface duration T. ftm1 Send the first FTM frame to the triggering device and record the first ToD timestamp T1 of the first FTM frame. ToD1 The first FTM frame arrives at the triggering device after passing through the ToF, and the triggering device records the first ToA timestamp T2 of the first FTM frame. TpA1Furthermore, the device is triggered to determine the duration of the first FTM frame on the wireless channel as the first air interface duration T using WLAN standard protocols such as IEEE 802.11. ftm1 After the inter-frame wait time (SIFS), the triggering device sends the first ACK frame to the responding device and records the first ToD timestamp (T3) of the first ACK frame. ToD1 The first ACK frame arrives at the response device after passing through the Time-of-Flight (ToF) circuit. The response device records the first ToA timestamp T4 of the first ACK frame. ToA1 Among them, the RTT measurement time T_measurement1 of the first FTM interaction includes the first air interface duration T of the first FTM frame. ftm1 Inter-frame latency (SIFS) and round-trip time of flight (2 * ToF);
[0170] During the second FTM interaction, the triggering device can determine the first ToD timestamp T1 of the first FTM frame transmitted by the responding device from the FTM frame of the second FTM interaction. ToD1 and the first ToA timestamp T4 of the first ACK frame. ToA1 Furthermore, the triggering device can determine the actual RTT (defined as RTT) of the first FTM interaction. est1 ), RTT est1 The calculation formula is as follows:
[0171] RTT est1 =2 * ToF est1 =(T4) ToA1 -T1 ToD1 )-(T3 ToD1 -T2 ToA1 );
[0172] Among them, ToF est1 This is the actual Time-of-Flight (ToF) for the first FTM interaction; the aforementioned RTT est1 The calculation formula is equivalent to:
[0173] RTT est1 =2 * ToF est1 =(T ftm1 +SIFS)*(PPM r -PPM i )+2*ToF*(1+
[0174] PPM r ).
[0175] As an optional implementation Figure 5BAn exemplary timing diagram of the second FTM interaction provided in this application embodiment is shown. For ease of explanation, the FTM frame of the second FTM interaction is referred to as the second FTM frame; the air interface duration of the second FTM frame is referred to as the second air interface duration, defined as T. ftm2 The ToD timestamp of the second FTM frame is called the second ToD timestamp of the second FTM frame, defined as T1. ToD2 The ACK frame of the second FTM interaction is called the second ACK frame, and the ToD timestamp of the second ACK frame is called the second ToD timestamp of the second ACK frame, defined as T3. ToD2 The ToA timestamp of the second ACK frame is called the second ToA timestamp of the second ACK frame, defined as T4. ToA2 ;
[0176] like Figure 5B As shown, after passing through one or more Backoff Slots, the response device responds for a second air interface duration T. ftm2 Send the second FTM frame to the triggering device and record the second ToD timestamp T1 of the second FTM frame. ToD2 Second air passage duration T ftm2 Unlike the first air passage duration T ftm1 The responding device can set the second air interface duration T of the second FTM frame by adjusting the size (e.g., number of bytes) and / or physical layer parameters (e.g., physical layer transmission rate) of the second FTM frame. ftm2 The first air interface duration T, different from the first FTM frame ftm1 For example, the responding device can adjust the size of the second FTM frame and / or physical layer parameters to make the second air interface duration T of the second FTM frame... ftm2 Compared to the first air interface duration T of the first FTM frame ftm1 Increase T delta ;
[0177] The second FTM frame arrives at the triggering device after passing through the Time-of-Flight (ToF) circuit. The triggering device records the second ToA timestamp T2 of the second FTM frame. ToA2 Furthermore, the triggering device determines the duration of the second FTM frame on the wireless channel as the second air interface duration T using WLAN standard protocols such as IEEE 802.11. ftm2 After the inter-frame wait time (SIFS), the triggering device sends a second ACK frame to the responding device and records the second ToD timestamp (T3) of the second ACK frame. ToD2 The second ACK frame arrives at the response device after passing through the Time-of-Flight (ToF) circuit. The response device records the second ToA timestamp T4 of the second ACK frame. ToA2The measurement time T_measurement2 of the RTT in the second FTM interaction includes the second air interface duration T of the second FTM frame. ftm2 (T ftm1 +T delta ), inter-frame latency SIFS, and signal round-trip flight time (2*ToF);
[0178] During the third FTM interaction, the triggering device can determine the second ToD timestamp T1 of the second FTM frame transmitted by the responding device from the FTM frame of the third FTM interaction. ToD2 And the second ToA timestamp T4 of the second ACK frame. ToA2 Furthermore, the triggering device can determine the actual RTT (defined as RTT) of the second FTM interaction. est2 ), RTT est2 The calculation formula is as follows:
[0179] RTT est2 =2 * ToF est2 =(T4) ToA2 -T1 ToD2 )-(T3 ToD2 -T2 ToA2 );
[0180] Among them, ToF est2 This is the actual Time of Flight (ToF) for the second FTM interaction; the aforementioned RTT est2 The calculation formula is equivalent to:
[0181] RTT est2 =2 * ToF est2 =(T ftm2 +SIFS)*(PPM r -PPM i )-2*ToF*(1+
[0182] PPM r ).
[0183] The triggering device obtains the actual RTT (RTT) of the first FTM interaction. est1 The actual RTT of the second FTM interaction (RTT) est2 After that, RTT can be used. est2 Subtract RTT est1 Thus, the following formula is obtained:
[0184] RTT est2 -RTT est1 =2*(ToF) est2 -ToF est1 )=(T ftm2 -T ftm1 )*
[0185] (PPM r -PPM i ) = T delta *(PPM r -PPM i );
[0186] Furthermore, the triggering device can determine the clock drift deviation (PPM) between the responding device and the triggering device. r -PPM i for:
[0187] After obtaining the clock drift deviation between the responding device and the triggering device, the triggering device can determine the actual RTT (RTT) of the first FTM interaction. est1 The actual RTT of the second FTM interaction (RTT) est2 The actual RTT of each FTM interaction is corrected to obtain the corrected RTT for each FTM interaction. Then, the corrected RTTs corresponding to multiple FTM interactions are averaged or weighted to obtain the final measured RTT between the triggering device and the responding device, thereby improving the measurement accuracy of RTT.
[0188] Furthermore, in reality, there is an RTT deviation caused by the sampling clock, which further leads to errors in RTT measurement using FTM. The RTT deviation caused by the sampling clock refers to the fact that since the sampling clocks of the triggering and response devices are discrete signals, the triggering and response devices are not completely accurate when recording timestamps, resulting in a deviation between the calculated actual RTT and the true RTT.
[0189] Specifically, a sampling clock is a digital signal that triggers events via a rising or falling edge. For example, Figure 6 An example diagram of the sampling clock is shown, in conjunction with... Figure 6 As shown, when the triggering device receives an FTM frame, it selects the most recent rising edge of the physical layer sampling clock (PHY Sampling Clock) as the ToA timestamp T2 for recording the FTM frame. ToA The basis for this is that the triggering and responding devices record timestamps based on the physical layer sampling clock, which operates at a specific clock cycle, so that the triggering and responding devices sample and record timestamps based on the rising or falling edge of the sampling clock.
[0190] However, because the sampling clock is a discrete signal, the triggering and responding devices may miss the precise moment of frame arrival. Therefore, they can only record an approximation of the frame's arrival time. In other words, because the sampling clock samples at discrete time points (i.e., rising or falling edges), the triggering and responding devices use the sampling clock to sample timestamps, which cannot completely and accurately reflect the frame's arrival time. For example, the actual arrival time of the frame may lie between two sampling periods of the sampling clock. Therefore, the deviation between the timestamp recorded by the triggering and responding devices and the actual arrival time of the frame can be up to one sampling period.
[0191] As can be seen, since the timestamp acquisition of WLAN devices is based on a digital sampling clock, the recording accuracy of the timestamp is limited by the sampling period of the sampling clock. Therefore, there may be a deviation of one sampling period between the timestamp recorded by the WLAN device and the actual arrival time of the frame. This causes the triggering device and the response device to be not completely accurate when recording the timestamp, thus causing a deviation between the calculated actual RTT and the true RTT.
[0192] Based on this, the embodiments of this application provide further optimization schemes to optimize the RTT deviation caused by the sampling clock and further improve the measurement accuracy of RTT.
[0193] As an optional implementation, based on Figure 4 In the example RTT measurement process, during each FTM interaction, this embodiment of the application can introduce a randomized delay when the responding device sends the FTM frame. That is, a randomized delay is added at the time the responding device sends the FTM frame, thereby reducing the RTT deviation caused by the sampling clock of the triggering device. In other words, during each FTM interaction, the triggering device uses its internal sampling clock to obtain the ToA timestamp of the FTM frame, resulting in an RTT deviation due to the sampling clock. By introducing a randomized delay at the time the responding device sends the FTM frame during each FTM interaction, this embodiment of the application can randomize the period position of the sampling clock when the triggering device obtains the ToA timestamp of the FTM frame (i.e., during each FTM interaction, the sampling clock of the triggering device no longer always captures the ToA timestamp of the FTM frame at the same period position), thereby randomizing the RTT deviation caused by the sampling clock. Furthermore, through multiple FTM interactions, the RTT deviation caused by the sampling clock of the triggering device is smoothed, improving the measurement accuracy of RTT.
[0194] As an optional implementation, during FTM interaction, the responding device can send FTM frames based on the timing coordination between the MAC (Media Access Control) layer and the PHY (Physical) layer; for example, the MAC layer determines the access channel timing, and the PHY layer sends the FTM frame to the radio frequency interface according to the MAC layer's scheduling, so as to send it to the triggering device. For ease of understanding, Figure 7 An exemplary diagram illustrating the timing coordination between the MAC layer and the PHY layer is shown, such as... Figure 7 As shown, if the MAC layer of the responding device detects that the channel is busy, the MAC layer of the responding device initiates a backoff mechanism, randomly backs off at least one backoff slot (one backoff slot is, for example, 9 microseconds), and then decides to access the channel when it detects that the channel is idle, thereby transmitting the FTM frame to the PHY layer of the responding device for processing; wherein, the clock of the MAC layer of the responding device determines the time point for accessing the channel. For example, the clock of the MAC layer of the responding device records the time point when the randomly backoffed at least one backoff slot ends, and when the channel is idle at that time point, it decides to access the channel, thereby transmitting the FTM frame to the PHY layer of the responding device for processing;
[0195] The PHY layer of the responding device receives the FTM frame transmitted by the MAC layer and sends the FTM frame to the radio frequency (RF) interface. Specifically, the PHY layer of the responding device uses the PHY layer sampling clock to control the timing of sending the FTM frame to the RF interface. For example, the PHY layer sampling clock is triggered at a fixed frequency, and the PHY layer of the responding device determines the data transmission or reception time each time the PHY layer sampling clock is triggered. Thus, after the PHY layer of the responding device receives the FTM frame transmitted by the MAC layer, if the PHY layer sampling clock of the responding device is triggered, the PHY layer of the responding device will send the FTM frame to the radio frequency (RF) interface.
[0196] The FTM frame sent by the PHY layer of the responding device propagates over the air interface and, after undergoing Time-of-Flight (ToF) transmission, reaches the triggering device. The PHY layer sampling clock of the triggering device operates at a fixed frequency. When the FTM frame arrives, the triggering device records the ToA timestamp of the FTM frame based on the PHY layer sampling clock. Since the PHY layer sampling clock of the triggering device is a discrete periodic signal, the arrival time of the FTM frame may not exactly align with the pulse of the PHY layer sampling clock. Therefore, the PHY layer of the triggering device records the timestamp of the most recent pulse of the PHY layer sampling clock as the ToA timestamp of the FTM frame. However, the arrival time of the FTM frame may fall exactly on the boundary between two sampling periods, which will cause an error in the recording of the ToA timestamp of the FTM frame. The magnitude of this error is at most one period of the PHY layer sampling clock, denoted as... Figure 7The uncertainty region of the ToA timestamp. In other words, the period position of the sampling clock affects the accuracy of the ToA timestamp, leading to errors in the actual RTT calculated subsequently.
[0197] It should be noted that the PHY layer sampling clock refers to the fixed-frequency clock of the PHY layer, which is used to control the timing of sending or receiving signals. Each time the PHY layer sampling clock pulse is triggered (i.e., the PHY layer sampling clock is triggered), the PHY layer will decide whether to transmit data; the sampling period refers to the time interval between the PHY layer sampling clock pulses, that is, the period of the PHY layer sampling clock.
[0198] Based on this, embodiments of this application consider adding randomized delays to the MAC layer and / or PHY layer of the response device. Thus, in each FTM interaction in multiple FTM interactions, the response device can transmit FTM frames based on the randomized delays introduced by the MAC layer and / or PHY layer. Consequently, the ToA timestamp of the FTM frame recorded by the trigger device in each FTM interaction will be randomly distributed at different positions in the sampling period of the trigger device's sampling clock, so as to smooth the RTT deviation caused by the sampling clock of the trigger device.
[0199] As an optional implementation, this embodiment of the application can add a MAC layer randomization delay (MACRandom Delay) to the MAC layer of the responding device, and the MAC layer randomization delay is not aligned with the Backoff Slot; specifically, if the MAC layer of the responding device detects that the channel is busy, it initiates the Backoff mechanism. After randomly backing off at least one Backoff Slot, if the MAC layer of the responding device detects that the channel is busy, it obtains the right to use the channel based on the channel access mechanism; at this time, the MAC layer does not immediately transmit the FTM frame to the PHY layer, but adds the MAC layer randomization delay, that is, the MAC layer randomly generates the MAC layer randomization delay, and after the MAC layer randomization delay, the MAC layer transmits the FTM frame to the PHY layer;
[0200] Among them, the randomization delay of the MAC layer is not aligned with the backoff slot. For example, the randomly generated randomization delay of the MAC layer is not aligned with the 9-microsecond backoff slot, thus breaking the mechanism of sending FTM frames to the PHY layer in alignment with the backoff slot. This avoids the situation where multiple FTM interactions send FTM frames that are always aligned with the slot (time slot), so that the FTM frames of multiple FTM interactions can randomly fall at different positions in the sampling period of the sampling clock of the triggering device, so as to smooth the RTT deviation caused by the sampling clock of the triggering device through multiple FTM interactions.
[0201] In other words, by introducing a randomized delay in the MAC layer when the MAC layer of the responding device sends an FTM frame to the PHY layer, the ToA timestamp of the FTM frame can fall at different positions in the sampling period of the sampling clock of the triggering device when the triggering device receives an FTM frame in each FTM interaction, thereby randomizing the RTT deviation caused by the sampling clock of the triggering device.
[0202] As an optional implementation, embodiments of this application may add randomized delay to the PHY layer of the response device. Figure 8A An exemplary diagram illustrating the addition of randomized latency to the PHY layer of a response device according to an embodiment of this application is shown, in conjunction with... Figure 7 and Figure 8A As shown, the MAC layer of the responding device is based on the Backoff mechanism, which is responsible for accessing the channel and determining the time point at which the FTM frame is sent to the PHY layer of the responding device. After receiving the FTM frame from the MAC layer, the PHY layer of the responding device generates a PHY random delay, which causes the PHY layer to send the FTM frame to the radio frequency interface at a random time point. In other words, a PHY random delay is added at the time point when the PHY layer of the responding device sends the FTM frame, so that when the PHY layer of the responding device receives the FTM frame from the MAC layer, a PHY random delay will occur, and then the FTM frame will be sent to the radio frequency interface after the PHY random delay ends.
[0203] By introducing a randomized delay in the PHY layer when the response device sends an FTM frame to the RF air interface, the ToA timestamp of the FTM frame can fall at different positions in the sampling period of the trigger device's sampling clock during each FTM interaction, thereby randomizing the RTT deviation caused by the trigger device's sampling clock.
[0204] As an optional implementation, embodiments of this application may add randomized delays to both the MAC layer and the PHY layer of the responding device. Figure 8B An exemplary diagram illustrating the addition of randomized latency to the MAC and PHY layers of a response device according to an embodiment of this application is shown, in conjunction with... Figure 7 and Figure 8B As shown, the MAC layer of the responding device detects whether the channel is idle. If the channel is busy, it enters the Backoff mechanism. In the Backoff mechanism, the MAC layer of the responding device randomly backs off one or more Backoff Slots and then re-detects the channel status. If the MAC layer of the responding device detects that the channel is idle after randomly backing off one or more Backoff Slots, the MAC layer of the responding device obtains the right to use the channel.
[0205] After the MAC layer of the responding device obtains the right to use the channel, it does not immediately send an FTM frame to the PHY layer of the responding device. Instead, it generates a MAC layer randomization delay that is not aligned with the Backoff Slot. Then, when the MAC layer randomization delay ends, it sends an FTM frame to the PHY layer of the responding device. This makes the sending time of the MAC layer of the responding device sending an FTM frame to the PHY layer of the responding device randomized each time an FTM interaction occurs.
[0206] When the PHY layer of the responding device receives an FTM frame from the MAC layer, it does not immediately send the FTM frame to the radio frequency interface. Instead, it adds a PHY layer randomization delay. After the PHY layer randomization delay ends, the FTM frame is sent to the radio frequency interface, thereby randomizing the time point at which the FTM frame is sent to the radio frequency interface during each FTM interaction.
[0207] The FTM frame sent by the PHY layer of the response device is propagated through the air interface and reaches the triggering device after undergoing Time of Flight (ToF). The triggering device records the ToA timestamp of the FTM frame according to the sampling clock. Due to the randomized delay of the MAC layer and PHY layer of the response device, the embodiments of this application can make the arrival time of each FTM frame at the triggering device randomly distributed at different positions in the sampling period of the sampling clock of the triggering device during multiple FTM interactions. This randomization can reduce the RTT deviation caused by the sampling clock of the triggering device. That is, the RTT deviation caused by the sampling clock of the triggering device can be manifested as a random error. Then, by averaging or weighted averaging the RTT of multiple FTM interactions, the RTT deviation caused by the sampling clock of the triggering device can be smoothed, thereby correcting the RTT deviation caused by the sampling clock of the triggering device.
[0208] In other words, during each FTM interaction in multiple FTM interactions, the triggering device receives the FTM frame sent by the responding device and records the ToA timestamp of the FTM frame based on the sampling clock of the triggering device. Since the MAC layer and / or PHY layer of the responding device introduce randomized delay when transmitting FTM frames, the ToA timestamp of the FTM frame recorded by the triggering device in each FTM interaction is randomly distributed at different positions in the sampling period of the triggering device's sampling clock. That is, the ToA timestamp of each FTM frame recorded by the triggering device is randomized during multiple FTM interactions. Based on this, averaging or weighted averaging of the RTT of multiple FTM interactions can reduce the RTT deviation caused by the sampling clock. That is, the RTT deviation corresponding to the ToA timestamp of the FTM frame in multiple FTM interactions is randomized and eliminated through averaging or weighted averaging, thereby improving the measurement accuracy of RTT.
[0209] In an optional implementation, an RTT measurement scheme based on the different air interface durations of FTM frames in at least two of the multiple FTM interactions provided in the embodiments of this application (e.g.) Figure 4 (Example Scheme) In this embodiment of the application, a randomized delay is introduced into the MAC layer and / or PHY layer of the responding device during each FTM interaction, thereby obtaining the actual RTT for each FTM interaction. Then, based on the deviation of the actual RTT of any two FTM interactions with different air interface durations of the FTM frames, and the deviation of the air interface duration of the FTM frames, the clock drift deviation between the responding device and the triggering device is determined, and the actual RTT for each FTM interaction is corrected to obtain the corrected RTT for each FTM interaction. Furthermore, the corrected RTTs corresponding to multiple FTM interactions are averaged or weighted averaged to obtain the final measured RTT between the triggering device and the responding device. During the above averaging or weighted averaging process, the randomized delay introduced by the responding device into the MAC layer and / or PHY layer during each FTM interaction can smooth out the RTT deviation caused by the sampling clock, thereby reducing the RTT deviation caused by the sampling clock.
[0210] In other words, the actual RTT of multiple FTM interactions is obtained based on the randomized delay introduced by the MAC layer and / or PHY layer of the response device. Thus, the RTT deviation caused by the sampling clock is randomized for the actual RTT of multiple FTM interactions. Furthermore, by using the clock drift deviation of the response device and the trigger device obtained in the embodiments of this application, the actual RTT of each FTM interaction is corrected, and the corrected RTT corresponding to multiple FTM interactions is averaged or weighted averaged. This can further reduce the RTT deviation caused by the sampling clock on the basis of reducing the RTT deviation caused by the clock drift deviation of the response device and the trigger device, thereby improving the measurement accuracy of RTT.
[0211] In a further optional implementation, this application provides an RTT measurement device, which can be regarded as a functional module required by the triggering device to implement the RTT measurement method provided in this application. The following description can be referred to in correspondence with the above description.
[0212] As an optional implementation Figure 9A An exemplary block diagram of an RTT measurement device provided in an embodiment of this application is shown. This RTT measurement device can be applied to a triggering device. (Refer to...) Figure 9A As shown, the RTT measurement device may include:
[0213] The trigger-side FTM interaction module 910 is used to perform multiple FTM interactions with the response device, wherein the air interface duration of the FTM frames in at least two of the multiple FTM interactions is different.
[0214] The interaction deviation determination module 911 is used to determine the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame for any two FTM interactions with different air interface durations of the FTM frame.
[0215] The clock drift deviation determination module 912 is used to determine the clock drift deviation of the response device and the triggering device based on the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame.
[0216] The correction module 913 is used to correct the actual RTT based on the clock drift deviation between the response device and the triggering device to obtain the corrected RTT;
[0217] The final measurement determination module 914 is used to determine the RTT between the triggering device and the responding device for the final measurement based on the calibrated RTT.
[0218] In an optional implementation, the multiple FTM interactions include multiple sets of FTM interactions, each set of FTM interactions includes two FTM interactions, and the air interface durations of the FTM frames of the two FTM interactions in the same set of FTM interactions are different.
[0219] In an optional implementation, the clock drift deviation determination module 912 is used to determine the clock drift deviation of the response device and the triggering device based on the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame, including:
[0220] For each group of FTM interactions, based on the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame, the clock drift deviation of the response device and the triggering device corresponding to each group of FTM interactions is obtained, so as to form the clock drift deviation of the response device and the triggering device corresponding to multiple groups of FTM interactions respectively.
[0221] The clock drift deviations of the response devices and trigger devices corresponding to multiple FTM interactions are averaged or weighted averaged, and the result is used as the final clock drift deviation of the response devices and trigger devices.
[0222] In an optional implementation, for any two FTM interactions with different air interface durations of the FTM frames, the clock drift deviation between the responding device and the triggering device is: the deviation of the actual RTT of the two FTM interactions divided by the deviation of the air interface duration of the FTM frames of the two FTM interactions.
[0223] In the optional implementation, for any two FTM interactions with different air interface durations of the FTM frame, the clock drift deviation between the responding device and the triggering device is specifically expressed as follows:
[0224]
[0225] In an optional implementation, the air interface duration of the FTM frames in adjacent FTM interactions is different. The air interface duration of the FTM frames in adjacent FTM interactions increases or decreases sequentially based on a fixed deviation, or the air interface duration of the FTM frames in adjacent FTM interactions varies randomly, or the air interface duration of the FTM frames in adjacent FTM interactions varies non-linearly.
[0226] or,
[0227] The air interface duration of FTM frames in multiple FTM interactions varies periodically.
[0228] In an optional implementation, the correction module 913 is used to correct the actual RTT based on the clock drift deviation between the response device and the triggering device, and the corrected RTT includes:
[0229] Based on the clock drift deviation of the response device and the triggering device, the actual RTT of each FTM interaction is corrected to obtain the corrected RTT corresponding to each FTM interaction, so as to form the corrected RTT corresponding to multiple FTM interactions respectively.
[0230] In an optional implementation, the final measurement determination module 914, used to determine the RTT between the triggering device and the responding device for the final measurement based on the corrected RTT, includes:
[0231] The RTT corresponding to the corrections of multiple FTM interactions is averaged or weighted to obtain the final measured RTT between the triggering device and the responding device.
[0232] In an optional implementation, for any FTM interaction, the corrected RTT is: the actual RTT of the any FTM interaction, minus the RTT deviation caused by the clock drift deviation of the responding device and the triggering device.
[0233] In the optional implementation, for any FTM interaction, the corrected RTT is specifically represented as follows:
[0234] RTT esti =RTT esti -(T ftmi +SIFS)*(PPM r -PPM i ).
[0235] In further optional implementations, combined with Figure 9A As shown, the RTT measuring device may further include:
[0236] The FTM frame receiving and recording module 915 is used to receive the FTM frame sent by the response device in each of the multiple FTM interactions, and record the ToA timestamp of the FTM frame based on the sampling clock of the triggering device; wherein, the MAC layer and / or PHY layer of the response device introduce randomized delay when transmitting the FTM frame, so that the ToA timestamp of the FTM frame recorded by the triggering device in each FTM interaction is randomly distributed at different positions in the sampling period of the sampling clock of the triggering device;
[0237] The actual RTT determination module 916 is used to determine the actual RTT of each FTM interaction based on the ToD timestamp of the FTM frame, the ToA timestamp of the FTM frame, the ToD timestamp of the ACK frame, and the ToA timestamp of the ACK frame.
[0238] In a further optional implementation, this application embodiment also provides a triggering device, which can be a WLAN device initiating FTM in a WLAN system; in an optional implementation, the triggering device can be configured with the RTT measurement device (such as those described above) provided in this application embodiment. Figure 9A As shown, the device is configured to implement the RTT measurement method provided in this application embodiment. In a further optional implementation, the RTT measurement device can be designed as a software function device, thereby triggering the device to implement the RTT measurement method provided in this application embodiment by executing software instructions.
[0239] In an optional implementation, the triggering device may include: at least one memory and at least one processor; the memory stores computer-executable instructions, and the processor invokes the computer-executable instructions stored in the memory to execute the RTT measurement method performed by the triggering device as provided in the embodiments of this application.
[0240] In a further optional implementation, embodiments of this application also provide a storage medium that stores computer-executable instructions, which, when executed (e.g., when executed by a processor), implement the RTT measurement method performed by a triggering device as provided in embodiments of this application.
[0241] In a further optional implementation, embodiments of this application also provide a computer program product including computer execution instructions, which, when executed (e.g., when executed by a processor), implement the RTT measurement method executed by a triggering device as provided in embodiments of this application.
[0242] In a further optional implementation, this application provides an RTT measurement device, which can be regarded as a functional module required by the response device to implement the RTT measurement method provided in this application. The following description can be referred to in correspondence with the above description.
[0243] As an optional implementation Figure 9B An exemplary diagram illustrates another optional block diagram of the RTT measurement device provided in this application embodiment, which can be applied to a response device, with reference to... Figure 9B As shown, the RTT measurement device may include:
[0244] The response-side FTM interaction module 920 is used to perform multiple FTM interactions with the triggering device;
[0245] The air interface duration setting module 921 is used to set the air interface duration of the FTM frames of at least two FTM interactions in the multiple FTM interactions to be different, so that the triggering device can determine the clock drift deviation of the response device and the triggering device based on the deviation of the actual RTT of any two FTM interactions with different air interface durations of the FTM frames and the deviation of the air interface duration of the FTM frames; wherein, the clock drift deviation is used to correct the actual RTT.
[0246] As an optional implementation, the air interface duration setting module 921 is used to set the air interface duration of the FTM frames in at least two of the multiple FTM interactions to be different, including:
[0247] Adjust the size of the FTM frame and / or the physical layer parameters so that the air interface duration of the FTM frames in at least two of the multiple FTM interactions is different.
[0248] In an optional implementation, the air interface duration of the FTM frames in adjacent FTM interactions is different. The air interface duration of the FTM frames in adjacent FTM interactions increases or decreases sequentially based on a fixed deviation, or the air interface duration of the FTM frames in adjacent FTM interactions varies randomly, or the air interface duration of the FTM frames in adjacent FTM interactions varies non-linearly.
[0249] or,
[0250] The air interface duration of FTM frames in multiple FTM interactions varies periodically.
[0251] In further optional implementations, combined with Figure 9B As shown, the RTT measuring device may further include:
[0252] The FTM frame transmission module 922 is used to transmit FTM frames based on the randomized delay introduced by the MAC layer and / or PHY layer of the response device in each of the multiple FTM interactions, so that the ToA timestamp of the FTM frame recorded by the triggering device in each FTM interaction is randomly distributed at different positions in the sampling period of the sampling clock of the triggering device.
[0253] The MAC layer of the responding device determines the access channel time, and the PHY layer of the responding device sends the FTM frame to the radio frequency air interface according to the scheduling of the MAC layer, so as to send it to the triggering device.
[0254] As an optional implementation, the FTM frame transmission module 922 is used to transmit FTM frames based on the randomized delay introduced by the MAC layer of the responding device in each of the multiple FTM interactions, including:
[0255] In each of the multiple FTM interactions, if the MAC layer of the responding device detects that the channel is busy, the MAC layer of the responding device randomly backoffs one or more Backoff Slots and re-detects the channel status.
[0256] If the MAC layer of the responding device detects that the channel is idle after randomly backing off one or more Backoff Slots, the MAC layer of the responding device obtains the right to use the channel and generates a MAC layer randomization delay that is not aligned with the Backoff Slot.
[0257] When the randomization delay at the MAC layer ends, an FTM frame is sent to the PHY layer of the responding device.
[0258] As an optional implementation, the FTM frame transmission module 922 is used for transmitting FTM frames based on the randomized delay introduced by the PHY layer of the responding device in each of the multiple FTM interactions, including:
[0259] In each of the multiple FTM interactions, after the PHY layer of the responding device receives the FTM frame from the MAC layer, it generates a randomized delay in the PHY layer.
[0260] When the PHY layer randomization delay ends, the FTM frame is sent to the radio frequency interface.
[0261] In a further optional implementation, this application embodiment also provides a response device, which may be a WLAN device in a WLAN system responding to FTM; in an optional implementation, the response device may be configured with the RTT measurement device described above in this application embodiment (such as...). Figure 9BAs shown, the device is configured to implement the RTT measurement method provided in the embodiments of this application. In a further optional implementation, the RTT measurement device can be designed as a software function device, so that the responsive device can execute software instructions to implement the RTT measurement method provided in the embodiments of this application.
[0262] In an optional implementation, the response device may include: at least one memory and at least one processor; the memory stores computer-executable instructions, and the processor invokes the computer-executable instructions stored in the memory to execute the RTT measurement method performed by the response device as provided in the embodiments of this application.
[0263] In a further optional implementation, embodiments of this application also provide a storage medium that stores computer-executable instructions that, when executed (e.g., when executed by a processor), implement the RTT measurement method performed by a responsive device as provided in embodiments of this application.
[0264] In a further optional implementation, embodiments of this application also provide a computer program product including computer execution instructions that, when executed (e.g., when executed by a processor), implement the RTT measurement method performed by a response device as provided in embodiments of this application.
[0265] In a further optional implementation, this application embodiment also provides a WLAN system, which may include multiple WLAN devices. In an optional implementation, the WLAN devices may be in various forms. Figure 1 As shown. Among the multiple WLAN devices, the WLAN device that initiates FTM is the triggering device, and the WLAN device that responds to FTM is the responding device; the triggering device is the triggering device as provided in the embodiments of this application, and the responding device is the responding device as provided in the embodiments of this application.
[0266] The foregoing describes multiple embodiment schemes provided by the embodiments of this application. The optional methods described in each embodiment scheme can be combined and cross-referenced with each other without conflict, thereby extending to a variety of possible embodiment schemes. These can all be considered as the embodiment schemes disclosed and published by the embodiments of this application.
[0267] While the embodiments disclosed above are described in this application, this application is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of this application; therefore, the scope of protection of this application should be determined by the scope defined in the claims.
Claims
1. A method for measuring RTT, characterized in that, Applied to a triggering device, the method includes: Multiple FTM interactions are performed with the response device, wherein the air interface duration of the FTM frames in at least two of the multiple FTM interactions is different; For any two FTM interactions with different air interface durations of FTM frames, determine the deviation of the actual RTT and the deviation of the air interface duration of the FTM frames. Based on the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame, the clock drift deviation of the response device and the triggering device is determined. The actual RTT is corrected based on the clock drift deviation between the response device and the triggering device to obtain the corrected RTT; Based on the corrected RTT, determine the RTT between the triggering device and the responding device for the final measurement.
2. The method according to claim 1, characterized in that, The multiple FTM interactions include multiple sets of FTM interactions, one set of FTM interactions includes two FTM interactions, and the air interface duration of the FTM frames of the two FTM interactions in the same set of FTM interactions is different. The determination of the clock drift deviation of the response device and the triggering device based on the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame includes: For each group of FTM interactions, based on the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame, the clock drift deviation of the response device and the triggering device corresponding to each group of FTM interactions is obtained, so as to form the clock drift deviation of the response device and the triggering device corresponding to multiple groups of FTM interactions respectively. The clock drift deviations of the response devices and trigger devices corresponding to multiple FTM interactions are averaged or weighted averaged, and the result is used as the final clock drift deviation of the response devices and trigger devices.
3. The method according to claim 1 or 2, characterized in that, For any two FTM interactions with different air interface durations of the FTM frames, the clock drift deviation between the responding device and the triggering device is: the deviation of the actual RTT of the two FTM interactions divided by the deviation of the air interface duration of the FTM frames of the two FTM interactions.
4. The method according to claim 3, characterized in that, For any two FTM interactions with different air interface durations for FTM frames, the clock drift deviation between the responding device and the triggering device is specifically expressed as follows: Among them, PPM r In response to device clock drift, PPM i To trigger the device's clock drift, PPM r -PPM i Indicates the clock drift deviation between the responding device and the triggering device; RTT estj For the actual RTT of the j-th FTM interaction, RTT esti The actual RTT for the i-th FTM interaction is defined as follows: the i-th and j-th FTM interactions are any two FTM interactions with different air interface durations for the FTM frames, and the j-th FTM interaction occurs after the i-th FTM interaction; T deltai→j The difference in air interface duration between the j-th FTM interaction and the i-th FTM frame; ToF estj Let RTT be the Time-of-Flight (ToF) of the j-th FTM interaction, where RTT is... estj 2*ToF estj ToF esti Let RTT be the Time-of-Flight (ToF) for the i-th FTM interaction, where RTT is the time-of-flight (ToF) time. esti 2*ToF esti .
5. The method according to claim 1, characterized in that, The air interface duration of the FTM frames in the multiple FTM interactions is different. Specifically, the air interface duration of the FTM frames in the adjacent FTM interactions increases or decreases sequentially based on a fixed deviation, or the air interface duration of the FTM frames in the adjacent FTM interactions changes randomly, or the air interface duration of the FTM frames in the adjacent FTM interactions changes nonlinearly. or, The air interface duration of the FTM frames in the multiple FTM interactions varies periodically.
6. The method according to claim 1, 2, 4, or 5, characterized in that, The step of correcting the actual RTT based on the clock drift deviation between the response device and the triggering device, to obtain the corrected RTT, includes: Based on the clock drift deviation between the response device and the triggering device, the actual RTT of each FTM interaction is corrected to obtain the corrected RTT corresponding to each FTM interaction, so as to form the corrected RTT corresponding to multiple FTM interactions respectively. The step of determining the RTT between the triggering device and the responding device for the final measurement based on the corrected RTT includes: The RTT corresponding to the corrections of multiple FTM interactions is averaged or weighted to obtain the final measured RTT between the triggering device and the responding device.
7. The method according to claim 6, characterized in that, For any FTM interaction, the corrected RTT is: the actual RTT of the any FTM interaction, minus the RTT deviation caused by the clock drift deviation of the responding device and the triggering device.
8. The method according to claim 7, characterized in that, For any given FTM interaction, the corrected RTT is specifically represented as follows: RTT esti ’=RTT esti -(T ftmi +SIFS)*(PPM r -PPM i ); Among them, RTT esti For the actual RTT of the i-th FTM interaction, RTT esti ' is the corrected RTT corresponding to the i-th FTM interaction; (T ftmi +SIFS)*(PPM r -PPM i T represents the RTT deviation caused by the clock drift difference between the responding device and the triggering device in the i-th FTM interaction. ftmi The air interface duration of the FTM frame in the i-th FTM interaction is given by PPM, SIFS is the set inter-frame wait time. r In response to device clock drift, PPM i To trigger the device's clock drift, PPM r -PPM i This indicates the clock drift deviation between the responding device and the triggering device.
9. The method according to claim 1, characterized in that, The method further includes: In each of the multiple FTM interactions, the responding device sends an FTM frame and records the ToA timestamp of the FTM frame based on the sampling clock of the triggering device. The MAC layer and / or PHY layer of the responding device introduce randomized delay when transmitting the FTM frame, so that the ToA timestamp of the FTM frame recorded by the triggering device in each FTM interaction is randomly distributed at different positions in the sampling period of the sampling clock of the triggering device.
10. The method according to claim 9, characterized in that, The method further includes: The actual RTT of each FTM interaction is determined based on the ToD timestamp, ToA timestamp, ToD timestamp of the ACK frame, and ToA timestamp of the ACK frame of each FTM interaction.
11. A method for measuring RTT, characterized in that, Applied to a response device, the method includes: Perform multiple FTM interactions with the triggering device; Furthermore, the air interface duration of the FTM frames in at least two of the multiple FTM interactions is set to be different, so that the triggering device can determine the clock drift deviation of the responding device and the triggering device based on the deviation of the actual RTT of any two FTM interactions with different air interface durations of the FTM frames, and the deviation of the air interface duration of the FTM frames; wherein the clock drift deviation is used to correct the actual RTT.
12. The method according to claim 11, characterized in that, The setting that the air interface duration of the FTM frames in at least two of the multiple FTM interactions are different includes: Adjust the size of the FTM frame and / or the physical layer parameters so that the air interface duration of the FTM frames in at least two of the multiple FTM interactions is different.
13. The method according to claim 12, characterized in that, The air interface duration of the FTM frames in the multiple FTM interactions is different. Specifically, the air interface duration of the FTM frames in the adjacent FTM interactions increases or decreases sequentially based on a fixed deviation, or the air interface duration of the FTM frames in the adjacent FTM interactions changes randomly, or the air interface duration of the FTM frames in the adjacent FTM interactions changes nonlinearly. or, The air interface duration of the FTM frames in the multiple FTM interactions varies periodically.
14. The method according to any one of claims 11-13, characterized in that, The method further includes: In each of the multiple FTM interactions, the FTM frame is transmitted based on the randomized delay introduced by the MAC layer and / or PHY layer of the responding device, so that the ToA timestamp of the FTM frame recorded by the triggering device in each FTM interaction is randomly distributed at different positions in the sampling period of the triggering device's sampling clock. The MAC layer of the responding device determines the access channel time, and the PHY layer of the responding device sends the FTM frame to the radio frequency air interface according to the scheduling of the MAC layer, so as to send it to the triggering device.
15. The method according to claim 14, characterized in that, In each of the multiple FTM interactions, the transmission of FTM frames based on the randomized delay introduced by the MAC layer of the responding device includes: In each of the multiple FTM interactions, if the MAC layer of the responding device detects that the channel is busy, the MAC layer of the responding device randomly backoffs one or more Backoff Slots and re-detects the channel status. If the MAC layer of the responding device detects that the channel is idle after randomly backing off one or more Backoff Slots, the MAC layer of the responding device obtains the right to use the channel and generates a MAC layer randomization delay that is not aligned with the Backoff Slot. When the randomization delay at the MAC layer ends, an FTM frame is sent to the PHY layer of the responding device.
16. The method according to claim 14, characterized in that, In each of the multiple FTM interactions, the transmission of FTM frames based on the randomized delay introduced by the PHY layer of the responding device includes: In each of the multiple FTM interactions, after the PHY layer of the responding device receives the FTM frame from the MAC layer, it generates a randomized delay in the PHY layer. When the PHY layer randomization delay ends, the FTM frame is sent to the radio frequency interface.
17. An RTT measuring device, characterized in that, Applied to a triggering device, the device includes: The trigger-side FTM interaction module is used to perform multiple FTM interactions with the response device, wherein the air interface duration of the FTM frames in at least two of the multiple FTM interactions is different. The interaction deviation determination module is used to determine the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame for any two FTM interactions with different air interface durations. The clock drift deviation determination module is used to determine the clock drift deviation of the response device and the triggering device based on the deviation of the actual RTT and the deviation of the air interface duration of the FTM frame. The correction module is used to correct the actual RTT based on the clock drift deviation between the response device and the triggering device, so as to obtain the corrected RTT; The final measurement determination module is used to determine the RTT between the triggering device and the responding device for the final measurement based on the calibrated RTT.
18. The apparatus according to claim 17, characterized in that, The device further includes: The FTM frame receiving and recording module is used to receive the FTM frame sent by the responding device in each of the multiple FTM interactions, and record the ToA timestamp of the FTM frame based on the sampling clock of the triggering device; wherein, the MAC layer and / or PHY layer of the responding device introduce randomized delay when transmitting the FTM frame, so that the ToA timestamp of the FTM frame recorded by the triggering device in each FTM interaction is randomly distributed at different positions in the sampling period of the sampling clock of the triggering device.
19. An RTT measuring device, characterized in that, Applied to a response device, the device includes: The response-side FTM interaction module is used to perform multiple FTM interactions with the triggering device; The air interface duration setting module is used to set the air interface duration of the FTM frames of at least two FTM interactions in the multiple FTM interactions to be different, so that the triggering device can determine the clock drift deviation of the response device and the triggering device based on the deviation of the actual RTT of any two FTM interactions with different air interface durations of the FTM frames, and the deviation of the air interface duration of the FTM frames; wherein, the clock drift deviation is used to correct the actual RTT.
20. The apparatus according to claim 19, characterized in that, The device further includes: The FTM frame transmission module is used to transmit FTM frames based on the randomized delay introduced by the MAC layer and / or PHY layer of the response device in each of the multiple FTM interactions, so that the ToA timestamp of the FTM frame recorded by the triggering device in each FTM interaction is randomly distributed at different positions in the sampling period of the sampling clock of the triggering device. The MAC layer of the responding device determines the access channel time, and the PHY layer of the responding device sends the FTM frame to the radio frequency air interface according to the scheduling of the MAC layer, so as to send it to the triggering device.
21. A triggering device, characterized in that, include: At least one memory and at least one processor; The memory stores computer execution instructions, and the processor invokes the computer execution instructions stored in the memory to execute the RTT measurement method as described in any one of claims 1-10.
22. A response device, characterized in that, include: At least one memory and at least one processor; The memory stores computer execution instructions, and the processor invokes the computer execution instructions stored in the memory to execute the RTT measurement method as described in any one of claims 11-16.
23. A WLAN system, characterized in that, It includes multiple WLAN devices; among the multiple WLANAM202407025-SH-CN1.AML-PA240030-CN devices, the WLAN device that initiates FTM is the triggering device, and the WLAN device that responds to FTM is the responding device; wherein, the triggering device is the triggering device as described in claim 21, and the responding device is the responding device as described in claim 22.
24. A storage medium, characterized in that, The storage medium stores computer-executable instructions, which, when executed, implement the RTT measurement method as described in any one of claims 1-10, or the RTT measurement method as described in any one of claims 11-16.
25. A computer program product, characterized in that, It includes computer execution instructions, which, when executed, implement the RTT measurement method as described in any one of claims 1-10, or the RTT measurement method as described in any one of claims 11-16.