Time measurement method and device
By using the calibration delay from the second antenna to the first antenna in the fine time measurement technology to calibrate the message recording time delay, the problem of large error in the calculation of distance between devices is solved and the accuracy of distance measurement is improved.
Patent Information
- Application Number
- CN202110604682.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-03-09
- Filing Date
- 2021-05-31
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2041-05-31
AI Technical Summary
The existing fine time measurement technology has the problem of large errors in computing the distance between devices.
By using the calibration delay of the second antenna to the first antenna in the first device to perform delay calibration of the message recording time, the accuracy of the calculated round trip time is improved.
The error in distance calculation between devices is reduced and the accuracy of distance measurement is improved.
Smart Images

Figure CN115061084B_ABST
Abstract
Description
[0001] This application claims the priority of a Chinese patent application with the application number 202110254291.7 and the invention title "A Fine Time Measurement and Hardware Delay Fast Calibration Method" filed on March 9, 2021, the entire content of which is incorporated herein by reference. Technical Field
[0002] This application relates to the field of communication technologies, and particularly to a time measurement method and apparatus. Background Art
[0003] To avoid measurement errors caused by non-precise clock synchronization, currently, fine timing measurement (FTM) uses two-way signal propagation to measure the signal transmission time between two devices. The distance between the two devices can be calculated using the round trip time (RTT) of the signal between the two devices.
[0004] However, directly calculating the distance between two devices using the signal transceiver times recorded inside the devices has a large error. Summary of the Invention
[0005] This application provides a time measurement method and apparatus, which can solve the problem of large errors when measuring the distance between devices using the FTM technology currently.
[0006] In a first aspect, a time measurement method is provided. The method includes: a first device receives a first message from a second device using a first antenna. The first device sends a second message to the second device using a second antenna, where the first antenna and the second antenna are different antennas in the first device. The first device receives an indication of a first transceiver delay from the second device, where the first transceiver delay is the delay between the time when the second device sends the first message and the time when the second device receives the second message. The first device determines the round trip time between the first device and the second device according to the calibration delay from the second antenna to the first antenna, the recorded time when the first device receives the first message, the recorded time when the first device sends the second message, and the first transceiver delay. Wherein, the calibration delay from the second antenna to the first antenna is the delay when the first device receives the wireless signal sent by the second antenna using the first antenna.
[0007] In this application, the first device first obtains the relative time delay from the second antenna to the first antenna as the calibration time delay. During the time measurement process when the first device is the measurement initiating end, the first device uses the first antenna to receive the first message from the second device and uses the second antenna to send the second message to the second device. Since the first device calibrates the time of the message sent by the second antenna and received by the first antenna by using the calibration time delay from the second antenna to the first antenna, the accuracy of the calculated round-trip time can be improved, thereby reducing the distance calculation error between devices.
[0008] Optionally, the indication of the first transceiver time delay is the value of the first transceiver time delay. Alternatively, the indication of the first transceiver time delay includes the transmission timestamp when the second device sends the first message and the reception timestamp when the second device receives the second message.
[0009] Optionally, the first device also uses the second antenna to send a calibration signal and uses the first antenna to receive the calibration signal. Then the first device measures the time delay of the calibration signal and records the time delay of the calibration signal as the calibration time delay from the second antenna to the first antenna.
[0010] In this application, the first device sends a calibration signal from one antenna to another antenna, and then the calibration time delay from the transmitting antenna to the receiving antenna can be obtained by measuring the time delay of the calibration signal. Since the method for the first device to measure the calibration time delay from the transmitting antenna to the receiving antenna is relatively simple and the calculation time consumed by the first device is also short, fast calibration of the transceiver time delay can be achieved.
[0011] Optionally, ΔT1 = t2 - t1. Wherein, ΔT1 is the time delay of the calibration signal, t1 is the recorded time when the second antenna sends the calibration signal, and t2 is the recorded time when the first antenna receives the calibration signal.
[0012] The time delay of the calibration signal calculated in this application includes the air interface time delay of the calibration signal transmitted from the second antenna to the first antenna. On the one hand, the distance between the first antenna and the second antenna is usually very small, and the air interface time delay from the second antenna to the first antenna is also very small. The influence of this air interface time delay on the calculation result of the calibration time delay from the second antenna to the first antenna is very small, so the air interface time delay from the second antenna to the first antenna can be ignored. On the other hand, when the first device calculates the calibration time delay from the second antenna to the first antenna, the relative positions of the second device and the first device are usually unknown. Therefore, when calculating the calibration time delay from the second antenna to the first antenna in this application, the air interface time delay from the second antenna to the first antenna is usually not considered.
[0013] Optionally, RTT = ΔT2 - (t4 - t3) - ΔT1. Here, RTT is the round-trip time between the first device and the second device, ΔT1 is the calibration delay from the second antenna to the first antenna, t3 is the recorded time when the first device receives the first message, t4 is the recorded time when the first device sends the second message, and ΔT2 is the first transceiver delay.
[0014] Optionally, the number of antennas of the first device is greater than 2, and the first antenna and the second antenna are the two antennas with the strongest received signal strength from the second device among the multiple antennas of the first device.
[0015] Optionally, the first device records multiple sets of corresponding relationships between calibration delays and transceiver antennas. In response to the recording in the first device of the corresponding relationship between the second antenna as the transmitting antenna, the first antenna as the receiving antenna, and the target calibration delay, the first device uses the target calibration delay as the calibration delay from the second antenna to the first antenna.
[0016] In this application, the first device can pre-measure and record the calibration delays between multiple antennas. After determining to receive a message from the second device with the first antenna and send a message to the second device with the second antenna, it can directly obtain the calibration delay corresponding to the second antenna as the transmitting antenna and the first antenna as the receiving antenna based on this corresponding relationship, thereby improving the efficiency of obtaining the calibration delay from the second antenna to the first antenna.
[0017] Optionally, the first message is an FTM frame and the second message is an acknowledgment frame. Then, before the first device receives the first message from the second device with the first antenna, the first device also sends an FTM request frame to the second device, and this FTM request frame is used to request measurement of the round-trip time between the first device and the second device.
[0018] Optionally, the first device sends a third message to a third device with a third antenna. The first device receives a fourth message from the third device with a fourth antenna, and the third antenna and the fourth antenna are different antennas in the first device. The first device calibrates the recorded time when the first device sends the third message and / or the recorded time when the first device receives the fourth message according to the calibration delay from the third antenna to the fourth antenna to obtain an indication of the second transceiver delay. The second transceiver delay is the delay between the time when the first device sends the third message and the time when the first device receives the fourth message. Here, the calibration delay from the third antenna to the fourth antenna is the delay when the first device receives the radio signal sent by the third antenna with the fourth antenna. The first device sends an indication of the second transceiver delay to the third device.
[0019] In this application, the first device first obtains the relative time delay from the third antenna to the fourth antenna as the calibration time delay. During the time measurement process when the first device acts as the measurement response end, the first device sends a third message to the third device using the third antenna and receives a fourth message from the third device using the fourth antenna. Since the second transceiver time delay is the time delay after calibrating the recording time of the message sent using the third antenna and received using the fourth antenna by the calibration time delay from the third antenna to the fourth antenna of the first device, when the third device determines the round-trip time with the first device using this second transceiver time delay, the accuracy of the calculated round-trip time can be improved, thereby reducing the distance calculation error between devices.
[0020] Optionally, the indication of the second transceiver time delay is the value of the second transceiver time delay. Alternatively, the indication of the second transceiver time delay includes the transmission timestamp when the first device sends the third message and the reception timestamp when the first device receives the fourth message. Among them, the transmission timestamp when the first device sends the third message is obtained by calibrating the recording time when the first device sends the third message based on the calibration time delay from the third antenna to the fourth antenna, and / or, the reception timestamp when the first device receives the fourth message is obtained by calibrating the recording time when the first device receives the fourth message based on the calibration time delay from the third antenna to the fourth antenna. That is, the transmission timestamp when the first device sends the third message is the recording time when the first device sends the third message, and the reception timestamp when the first device receives the fourth message is obtained by calibrating the recording time when the first device receives the fourth message based on the calibration time delay from the third antenna to the fourth antenna. Alternatively, the transmission timestamp when the first device sends the third message is obtained by calibrating the recording time when the first device sends the third message based on the calibration time delay from the third antenna to the fourth antenna, and the reception timestamp when the first device receives the fourth message is the recording time when the first device receives the fourth message. Or, the transmission timestamp when the first device sends the third message is obtained by calibrating the recording time when the first device sends the third message based on the calibration time delay from the third antenna to the fourth antenna, and moreover, the reception timestamp when the first device receives the fourth message is obtained by calibrating the recording time when the first device receives the fourth message based on the calibration time delay from the third antenna to the fourth antenna.
[0021] Optionally, ΔT4 = t6 - t5 - ΔT3. Wherein, ΔT4 is the second transceiver time delay, t5 is the recording time when the first device sends the third message, t6 is the recording time when the first device receives the fourth message, and ΔT3 is the calibration time delay from the third antenna to the fourth antenna.
[0022] In a second aspect, a first device is provided. The device includes multiple functional modules, and the multiple functional modules interact with each other to implement the methods in the first aspect and its various embodiments above. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on the specific implementation.
[0023] In a third aspect, a first device is provided, including: a transceiver and multiple antennas;
[0024] The transceiver is configured to receive a first message from a second device using a first antenna among the multiple antennas, and send a second message to the second device using a second antenna among the multiple antennas, where the first antenna and the second antenna are different antennas among the multiple antennas;
[0025] The transceiver is further configured to receive an indication of a first transceiver delay from the second device, where the first transceiver delay is the delay between the time when the second device sends the first message and the time when the second device receives the second message;
[0026] The transceiver is further configured to determine a round-trip time between the first device and the second device according to the calibration delay from the second antenna to the first antenna, the recording time when the first device receives the first message, the recording time when the first device sends the second message, and the first transceiver delay, where the calibration delay from the second antenna to the first antenna is the delay when the first device receives a wireless signal sent by the second antenna using the first antenna.
[0027] In a fourth aspect, a first device is provided, including: a processor, a memory, a transceiver and multiple antennas;
[0028] The transceiver is configured to receive a first message from a second device using a first antenna among the multiple antennas, and send a second message to the second device using a second antenna among the multiple antennas, where the first antenna and the second antenna are different antennas among the multiple antennas;
[0029] The transceiver is further configured to receive an indication of a first transceiver delay from the second device, where the first transceiver delay is the delay between the time when the second device sends the first message and the time when the second device receives the second message;
[0030] The processor is configured to call a computer program stored in the memory to determine a round-trip time between the first device and the second device according to the calibration delay from the second antenna to the first antenna, the recording time when the first device receives the first message, the recording time when the first device sends the second message, and the first transceiver delay, where the calibration delay from the second antenna to the first antenna is the delay when the first device receives a wireless signal sent by the second antenna using the first antenna.
[0031] In a fifth aspect, a computer-readable storage medium is provided, on which instructions are stored. When the instructions are executed by a processor of an access point, the methods in the first aspect and its various embodiments are implemented; or when the instructions are executed by a processor of a wireless controller, the methods in the second aspect and its various embodiments are implemented.
[0032] In a sixth aspect, a chip is provided, which includes programmable logic circuits and / or program instructions. When the chip runs, the methods in the first aspect and its various embodiments are implemented. Description of the Drawings
[0033] Figure 1 FIG. is a schematic diagram of an implementation scenario involved in a time measurement method provided by an embodiment of the present application;
[0034] Figure 2 FIG. is a schematic diagram of the hardware structure of a device provided by an embodiment of the present application;
[0035] Figure 3 FIG. is a schematic flowchart of a time measurement method provided by an embodiment of the present application;
[0036] Figure 4 FIG. is a schematic diagram of the relative positions of a first device and a second device provided by an embodiment of the present application;
[0037] Figure 5 FIG. is a schematic flowchart of another time measurement method provided by an embodiment of the present application;
[0038] Figure 6 FIG. is a schematic flowchart of yet another time measurement method provided by an embodiment of the present application;
[0039] Figure 7 FIG. is a schematic diagram of the structure of a first device provided by an embodiment of the present application;
[0040] Figure 8 FIG. is a schematic diagram of the structure of another first device provided by an embodiment of the present application;
[0041] Figure 9 FIG. is a schematic diagram of the structure of yet another first device provided by an embodiment of the present application. Detailed Embodiments
[0042] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe in detail the embodiments of the present application with reference to the accompanying drawings.
[0043] The time taken for a wireless signal to be transmitted between two devices is positively correlated with the actual distance between the two devices. Therefore, the signal transmission time between the two devices can be used to calculate the distance between the two devices. To avoid measurement errors caused by inaccurate clock synchronization, two-way signal propagation can be used to measure the signal transmission time between the two devices, that is, to calculate the round-trip time (RTT) between the two devices. The round-trip time between the two devices mentioned in the embodiments of this application refers to the round-trip time of the wireless signal between the two devices.
[0044] For example, Figure 1 is a schematic diagram of an implementation scenario involved in a time measurement method provided by an embodiment of this application. As Figure 1 shown, this implementation scenario includes device 101 and device 102. Optionally, this implementation scenario is applied to a wireless local area network (WLAN). Device 101 is an access point (AP) or a station (STA), and device 102 is an AP or an STA. Alternatively, this implementation scenario is applied to a mobile cellular network. Device 101 is a base station or a user equipment (UE), and device 102 is a base station or a UE. Or, device 101 and device 102 can also be other communication devices, and the embodiments of this application do not limit the application scenarios of the provided time measurement method.
[0045] See Figure 1 , device 101 sends wireless signal 1 to device 102 at time T1, and device 102 receives wireless signal 1 at time T2; device 102 sends wireless signal 2 to device 101 at time T3, and device 101 receives wireless signal 2 at time T4. Then the distance D between device 101 and device 102 and the round-trip time RTT between device 101 and device 102 satisfy: RTT = (T4 - T1) - (T3 - T2) = 2D / c. Where c represents the propagation speed of the wireless signal in the air medium, and usually takes the value of the speed of light.
[0046] The above T1, T2, T3, and T4 all refer to the transceiver times of wireless signals at the air interface. In fact, the device can only obtain the signal transceiver times recorded internally. The device can use hardware to record the signal transceiver times. For example, when the signal reaches a specified hardware location in the device, the hardware is triggered to automatically record the arrival time of the signal. The signal transceiver times recorded using hardware can be referred to as hardware recording times. Alternatively, the device can also use software to record the signal transceiver times. For example, after the specified software in the device finishes processing the signal, it automatically records the transmission time of the signal. The signal transceiver times recorded using software can be referred to as software recording times. In the following embodiments of this application, the recording times of the device's transceiver signals (or messages) can refer to the hardware recording times or the software recording times.
[0047] For example, Figure 2 is a schematic diagram of the hardware structure of a device provided by an embodiment of this application. As Figure 2 shown, the device 20 includes: a processor 201, a memory 202, a transceiver 203, and multiple antennas. In the embodiments of this application, an example is given where the multiple antennas include two antennas, namely antenna 204 and antenna 205. In fact, the device can also include three or more antennas.
[0048] The processor 201, the memory 202, and the transceiver 203 are connected through a communication bus (not shown in the figure).
[0049] The processor 201 can be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the solution of this application. The processor 201 can be a single-CPU processor or a multi-CPU processor. Here, the processor 201 can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0050] The memory 202 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 202 can exist independently and be connected to the processor 201 through a communication bus. The memory 202 can also be integrated with the processor 201.
[0051] In the embodiments of the present application, the memory 202 is used to store a computer program, and the computer program includes program instructions. The processor 201 is used to call the computer program and cooperate with the transceiver 203 to implement the time measurement method provided in the following embodiments of the present application.
[0052] The transceiver 203 is used to perform the transceiver actions of the device. Optionally, referring to Figure 2 , the transceiver 203 includes a baseband processing circuit 2031 and a radio frequency processing circuit 2032. The baseband processing circuit 2031 includes a signal generation circuit and a signal reception circuit. The signal generation circuit and the signal reception circuit can be two independent circuits, or some circuits can also be shared between the signal generation circuit and the signal reception circuit. The signal generation circuit is used to generate and send signals. The signal reception circuit is used to receive and process signals. The radio frequency processing circuit 2032 includes Chain 1 and Chain 2. Chain 1 can be enabled as a transmission channel or a reception channel, and Chain 2 can also be enabled as a transmission channel or a reception channel. In the embodiments of the present application, Chain 1 is enabled as a transmission channel and Chain 2 is enabled as a reception channel as an example for illustration. Optionally, Chain 1 can include a filter, a digital-to-analog converter, a power amplifier, etc. Chain 2 can include a filter, an analog-to-digital converter, a power amplifier, etc. Chain 1 and Chain 2 can be independent of each other, or some devices can also be shared.
[0053] Referring to Figure 2, Channel 1 is connected to the signal generation circuit, and Channel 1 is connected to antenna 204, that is, antenna 204 is the transmitting antenna. Channel 2 is connected to the signal receiving circuit, and Channel 2 is connected to antenna 205, that is, antenna 205 is the receiving antenna. The signal generated by the signal generation circuit in the baseband processing circuit 2031 is transmitted through Channel 1 in the radio frequency processing circuit 2032 and sent out by antenna 204. The signal received by antenna 205 is transmitted through Channel 2 in the radio frequency processing circuit 2032 to the signal receiving circuit in the baseband processing circuit 2031, and then the signal is processed by the signal receiving circuit or continues to be transmitted to the processor 201 for processing by the processor 201.
[0054] The above baseband processing circuit 2031 is implemented based on hardware. In some implementation manners, the baseband processing function can also be implemented based on software. For example, the baseband processing function can be implemented in the processor, that is, a baseband processing module is integrated in the processor. The embodiments of the present application do not limit this. For the sake of distinction, the present application refers to the hardware that implements the baseband processing function as the baseband processing circuit, and the software that implements the baseband processing function as the baseband processing module.
[0055] The recording moment of the signal (or message) received or sent by device 20 can be collected by transceiver 203, specifically, it can be collected in the baseband processing circuit 2031, or in the radio frequency processing circuit 2032, or at any position between the baseband processing circuit 2031 and the radio frequency processing circuit 2032. For example, the recording moment of the signal sent by device 20 can be the moment when the signal reaches the outlet of the signal generation circuit in the baseband processing circuit 2031, specifically, it can be the moment when the signal generation circuit records that the signal generation circuit sends out the signal. The baseband processing circuit 2031 is implemented based on hardware, and this recording moment is the hardware recording moment. In some embodiments, the baseband processing function can be implemented based on software, and the signal transceiver moment recorded by the baseband processing module is the software recording moment. Another example is that the recording moment of the signal sent by device 20 can also be the moment when the signal reaches devices such as filters in Channel 1 of the radio frequency processing circuit 2032.
[0056] Based on the above content, it can be known that after the device records the sending moment of the signal, the signal will continue to be transmitted inside the device until it is sent out from the air interface through the transmitting antenna. In addition, after the device receives a signal from the air interface with the receiving antenna, the signal will be transmitted inside the device until it reaches the recording position of the receiving moment, and then the device will record the receiving moment of the signal. Therefore, there is a time delay between the recording moment of the device for receiving and sending wireless signals and the actual receiving and sending moments of the wireless signals at the air interface.
[0057] For example, in Figure 1In the shown implementation scenario, the recording time when device 101 sends wireless signal 1 is denoted as T1’, the recording time when device 102 receives wireless signal 1 is denoted as T2’, the recording time when device 102 sends wireless signal 2 is denoted as T3’, and the recording time when device 101 receives wireless signal 2 is denoted as T4’. Then we have:
[0058] T1 = T1’ + ΔT1 TX_DELAY , ΔT1 TX_DELAY represents the transmission delay from the recording time when device 101 sends wireless signal 1 to the time when device 101 sends wireless signal 1 from the air interface.
[0059] T2 = T2’ - ΔT2 RX_DELAY , ΔT2 RX_DELAY represents the reception delay from the time when device 102 receives wireless signal 1 from the air interface to the recording time when device 102 receives wireless signal 1.
[0060] T3 = T3’ + ΔT3 TX_DELAY , ΔT3 TX_DELAY represents the transmission delay from the recording time when device 102 sends wireless signal 2 to the time when device 102 sends wireless signal 2 from the air interface.
[0061] T4 = T4’ - ΔT4 RX_DELAY , ΔT4 RX_DELAY represents the reception delay from the time when device 101 receives wireless signal 2 from the air interface to the recording time when device 101 receives wireless signal 2.
[0062] Therefore, the actual round-trip time between device 101 and device 102 satisfies: RTT = (T4 - T1) - (T3 - T2) = (T4’ - T1’) - (ΔT1 TX_DELAY + ΔT4 RX_DELAY ) - (T3’ - T2’) - (ΔT3 TX_DELAY + ΔT2 RX_DELAY ).
[0063] Among them, ΔT1 TX_DELAY + ΔT4 RX_DELAY is the transmission and reception delay of device 101, and ΔT3 TX_DELAY + ΔT2 RX_DELAY is the transmission and reception delay of device 102.
[0064] Due to the transmission and reception delay of the device, the error in directly calculating the distance between two devices using the recording time when the device sends and receives wireless signals is large. In the related art, a solution is provided. First, calculate the transmission and reception delay of a single antenna in the device. Then, when the device measures the round-trip time with other devices, use the same antenna to send and receive signals, and calculate the actual round-trip time of the signal in the air interface according to the recording time of the sent and received signals and the round-trip delay of the antenna used to send and receive the signals.
[0065] For example, the device includes three antennas, namely antenna 01, antenna 02, and antenna 03. The calculation process of the transmission and reception delay of a single antenna in the device is as follows: The device uses antenna 01 to send wireless signal 11, and uses antenna 02 and antenna 03 respectively to receive wireless signal 11. The device uses antenna 02 to send wireless signal 22, and uses antenna 01 and antenna 03 respectively to receive wireless signal 22. The device uses antenna 03 to send wireless signal 33, and uses antenna 01 and antenna 02 respectively to receive wireless signal 33. Denote: The delay between the recording time when antenna 01 sends wireless signal 11 and the recording time when antenna 02 receives wireless signal 11 as δ12; The delay between the recording time when antenna 01 sends wireless signal 11 and the recording time when antenna 03 receives wireless signal 11 as δ13; The delay between the recording time when antenna 02 sends wireless signal 22 and the recording time when antenna 01 receives wireless signal 22 as δ21; The delay between the recording time when antenna 02 sends wireless signal 22 and the recording time when antenna 03 receives wireless signal 22 as δ23; The delay between the recording time when antenna 03 sends wireless signal 33 and the recording time when antenna 01 receives wireless signal 33 as δ31; The delay between the recording time when antenna 03 sends wireless signal 33 and the recording time when antenna 02 receives wireless signal 33 as δ32. Then the following formulas can be obtained:
[0066] T1 T +T12+T2 R =δ12; Formula (1)
[0067] T1 T +T13+T3 R =δ13; Formula (2)
[0068] T2 T +T21+T1 R =δ21; Formula (3)
[0069] T2 T +T23+T3 R =δ23; Formula (4)
[0070] T3 T +T31+T1 R =δ31; Formula (5)
[0071] T3 T +T32+T2 R =δ32; Formula (6)
[0072] Among them, T1 T represents the transmission delay from the recording time when the device sends a wireless signal to the time when the device sends the wireless signal from the air interface using antenna 01. T1R Indicates the reception delay from the moment when the antenna 01 of the device receives the wireless signal from the air interface to the moment when the device receives the wireless signal. T2 T Indicates the transmission delay from the moment when the device sends the wireless signal to the moment when the antenna 02 of the device sends the wireless signal from the air interface. T2 R Indicates the reception delay from the moment when the antenna 02 of the device receives the wireless signal from the air interface to the moment when the device receives the wireless signal. T3 T Indicates the transmission delay from the moment when the device sends the wireless signal to the moment when the antenna 03 of the device sends the wireless signal from the air interface. T3 R Indicates the reception delay from the moment when the antenna 03 of the device receives the wireless signal from the air interface to the moment when the device receives the wireless signal. T12 represents the transmission time of the wireless signal from antenna 01 to antenna 02. T13 represents the transmission time of the wireless signal from antenna 01 to antenna 03. T21 represents the transmission time of the wireless signal from antenna 02 to antenna 01. T23 represents the transmission time of the wireless signal from antenna 02 to antenna 03. T31 represents the transmission time of the wireless signal from antenna 03 to antenna 01. T32 represents the transmission time of the wireless signal from antenna 03 to antenna 02.
[0073] Since the distance between two antennas is known and the transmission speed of the wireless signal is also known, the transmission time of the wireless signal between two antennas is also known, that is, T12, T13, T21, T23, T31 and T32 are all known constants. Then, according to formulas (1) to (6), we can get:
[0074] T1 T +T2 T +T3 T +T1 R +T2 R +T3 R = Constant 1; Formula (7)
[0075] where, Constant 1 = [(δ12 + δ13 + δ21 + δ23 + δ31 + δ32)-(T12 + T13 + T21 + T23 + T31 + T32)] / 2.
[0076] In addition, according to Formula (4) + Formula (6), we can get:
[0077] T2 T +T3 T +T2 R +T3 R = Constant 2; Formula (8)
[0078] where, Constant 2 = (δ23 + δ32)-(T23 + T32).
[0079] Further, according to formula (7) - formula (8), it can be obtained that:
[0080] T1 T +T1 R = Constant 3; Formula (9)
[0081] Among them, Constant 3 = Constant 1 - Constant 2. Constant 3 is the transceiver time delay of antenna 01. The calculation method of the transceiver time delay of antenna 02 and antenna 03 can refer to the method of the transceiver time delay of antenna 01, which will not be elaborated in this embodiment of the present application.
[0082] Based on the above calculation process, it can be known that in the related art, when calculating the transceiver time delay of a single antenna by a device, it is necessary to transmit and receive wireless signals multiple times and the calculation steps are cumbersome. Therefore, the entire calculation process is relatively complex. Correspondingly, the time required to calculate the transceiver time delay of a single antenna is also relatively long. Since there may be multiple working gears for some components inside the device, for example, the power amplifier in the radio frequency processing circuit usually has multiple working gears, and the influence degree of some components on the signal transceiver time delay may be different when working in different gears. In fact, there are many different combination ways of multiple gears of multiple components in the device. Therefore, using the calculation method provided by the related art to calculate the transceiver time delay of the antenna in each gear combination of the device will consume a large amount of computing resources and computing time. When the working gear of the component in the device changes, the device cannot achieve online fast calibration of the antenna transceiver time delay. In addition, for a device with only two antennas, the device cannot use the above calculation process to calculate the transceiver time delay of a single antenna.
[0083] For a device, when calculating the round-trip time between it and other devices, the calculation error mainly comes from the transmission delay from the recording moment when the device sends a wireless signal to the moment when the device sends the wireless signal from the air interface using the antenna, and the reception delay from the moment when the device receives the wireless signal from the air interface using the antenna to the recording moment when the device receives the wireless signal, which has nothing to do with whether the antenna for sending the message and the antenna for receiving the message of the device are the same antenna. Since the transceiver delay of a single antenna, as an absolute delay, is relatively complex in the calculation process, and the calculation methods provided in the related technologies cannot calculate the absolute transceiver delay of a single antenna of a device with two antennas, the embodiment of the present application provides a time measurement method for calculating the round-trip time between the device and other devices by calculating the relative transceiver delay from one antenna of the device to another antenna of the device: First, measure the delay of the wireless signal sent by another antenna (referred to as the sending antenna) of the device received by one antenna (referred to as the receiving antenna) of the device, and use this delay as the calibration delay from the sending antenna to the receiving antenna. Then, the device sends a message to other devices using the sending antenna and receives the message from other devices using the receiving antenna. When calculating the round-trip time between the device and other devices, the calibration delay from the sending antenna to the receiving antenna can be used to calibrate the recording moments of the device for sending and receiving messages, improve the accuracy of the calculated round-trip time, and thus reduce the distance calculation error between devices, that is, improve the ranging accuracy between devices. In addition, this time measurement method is applicable to devices with two or more antennas, and has a wide application range.
[0084] Optionally, the device sends a calibration signal using one antenna of the device and receives the calibration signal using another antenna of the device. Then, the device measures the delay of the calibration signal and records the delay of the calibration signal as the calibration delay from the antenna for sending the calibration signal to the antenna for receiving the calibration signal. The calibration signal can be a complete message. Or, the calibration signal can also only include one or more sequences (only including the preamble part of the message), for example, one or more Zadoff-Chu sequences (i.e., ZC sequences) can be used as the calibration signal. Since the method for measuring the calibration delay from the sending antenna to the receiving antenna of the device is relatively simple and the calculation time consumed by the device is also short, the embodiment of the present application can achieve fast calibration of the transceiver delay of the device, and thus can meet the online calibration requirements.
[0085] In the embodiment of the present application, the device can also send the calibration signal multiple times using one antenna and receive the calibration signal sent by this antenna multiple times using another antenna, and then use the average value of the delays of the calibration signals measured multiple times as the calibration delay from the antenna for sending the calibration signal to the antenna for receiving the calibration signal to reduce the error of the measured calibration delay.
[0086] Optionally, when the device receives a calibration instruction, the device measures the calibration time delay between multiple antennas in the device. The calibration instruction may come from a controller connected to the device, a server connected to the device, or the device itself. For example, if the device is an AP, the calibration instruction may be sent from a wireless controller to the AP. Alternatively, when the temperature change in the environment where the device is located exceeds a threshold, and / or when the operating mode of the components in the device changes, the device may determine that it has received a calibration instruction. Or, when the device starts using a positioning service or a ranging service, the device may determine that it has received a calibration instruction.
[0087] Optionally, multiple groups of corresponding relationships between calibration time delays and transceiver antennas may be recorded in the device. For example, if the device includes antenna 1 and antenna 2, the corresponding relationships recorded in the device may be as shown in Table 1.
[0088] Table 1
[0089] Transmitting antenna Receiving antenna Calibration delay Antenna 1 Antenna 2 ΔT12 Antenna 2 Antenna 1 ΔT21 … … …
[0090] Referring to Table 1, the device may record the calibration time delay ΔT12 corresponding to the case where the transmitting antenna is antenna 1 and the receiving antenna is antenna 2, and the calibration time delay ΔT21 corresponding to the case where the transmitting antenna is antenna 2 and the receiving antenna is antenna 1. When the device calculates the round-trip time with other devices, it may select the corresponding calibration time delay from this corresponding relationship according to the actual transceiver antennas.
[0091] Since the time delay of the device for sending and receiving messages may also be affected by temperature and the operating mode of the components in the device, when the device records the corresponding relationship between the calibration time delay and the transceiver antennas, it may also record the temperature and / or the operating mode of the components at the time of measurement. When the device calculates the round-trip time with other devices, it may select the corresponding calibration time delay from this corresponding relationship according to the actual transceiver antennas in combination with the temperature of the environment where it is located and / or the operating mode of the components in the device.
[0092] The time measurement method provided by the embodiments of the present application can be applied to a device with two or more antennas. This device can be used as a measurement initiation end or a measurement response end. The following two embodiments of the present application will respectively use the first device with multiple antennas as the measurement initiation end and the measurement response end to illustrate the implementation process of the time measurement method provided by the present application.
[0093] In the first embodiment of the present application, the first device is the measurement initiation end. Figure 3 It is a schematic flowchart of a time measurement method provided by the embodiments of the present application. As Figure 3 shown, the method includes:
[0094] Step 301, the first device receives a first message from the second device using the first antenna.
[0095] In practical applications, multiple antennas in the first device may receive the first message from the second device. When the first device receives the first message from the second device using the first antenna, it can be understood that the first device only processes the first message received from the second device using the first antenna, and does not process the first message received from the second device using other antennas.
[0096] Step 302: The first device sends a second message to the second device using the second antenna.
[0097] Optionally, the second message is a response message to the first message.
[0098] The first antenna and the second antenna are different antennas in the first device. Optionally, the number of antennas of the first device is greater than 2, and the first antenna and the second antenna are the two antennas with the strongest received signal strength from the second device among the multiple antennas of the first device. Optionally, before the first device receives the first message from the second device using the first antenna, that is, before performing step 301, the first device can use multiple antennas to receive messages from the second device respectively, measure the received signal strength corresponding to each antenna, and then record the two antennas with the strongest received signal strength as the sending antenna and the receiving antenna corresponding to the second device respectively.
[0099] In the embodiments of the present application, if the number of antennas of the first device is greater than 2, the first device can select the antenna used to send a message to the second device and the antenna used to receive a message from the second device according to the received signal strength of the multiple antennas of the first device for the second device. For example, the first device can select the antenna with the strongest received signal strength from the multiple antennas to send a message to the second device, and select the antenna with the second strongest received signal strength from the multiple antennas to receive a message from the second device.
[0100] Alternatively, the first device can also use a fixed antenna to send a message to other devices and use another fixed antenna to receive a message from other devices.
[0101] Current multi-antenna devices usually reply to a device on the antenna that receives the message from the other device, rather than specifying to use a fixed antenna to send a message to a certain device and use another fixed antenna to receive a message from the device. In the present application, before the first device receives the first message from the second device (step 301) and before sending the second message to the second device (step 302), the first device first determines the antenna used to receive the message from the second device and the antenna used to send a message to the second device in the first device, so as to obtain the calibration delay from the sending antenna to the receiving antenna.
[0102] In an embodiment of the present application, after the first device determines to receive a message from the second device using the first antenna and send a message to the second device using the second antenna, the first device obtains the calibration delay from the second antenna to the first antenna. The calibration delay from the second antenna to the first antenna is the delay for the first device to receive the wireless signal sent by the second antenna using the first antenna. The calibration delay from the second antenna to the first antenna can be measured by the first device.
[0103] Optionally, the measurement process of the calibration delay from the second antenna to the first antenna by the first device includes: The first device sends a calibration signal using the second antenna. The first device receives the calibration signal using the first antenna. The first device measures the delay of the calibration signal and records the delay of the calibration signal as the calibration delay from the second antenna to the first antenna. The delay of the calibration signal is obtained based on the recording time when the second antenna sends the calibration signal and the recording time when the first antenna receives the calibration signal.
[0104] Optionally, ΔT1 = t2 - t1. Where ΔT1 is the delay of the calibration signal, t1 is the recording time when the second antenna sends the calibration signal, and t2 is the recording time when the first antenna receives the calibration signal.
[0105] The delay of the calibration signal calculated in the embodiment of the present application includes the air interface delay of the calibration signal from the second antenna to the first antenna. On the one hand, the distance between the first antenna and the second antenna is usually very small, and the air interface delay from the second antenna to the first antenna is also very small. The influence of this air interface delay on the calculation result of the calibration delay from the second antenna to the first antenna is very small, so the air interface delay from the second antenna to the first antenna can be ignored. On the other hand, when the first device calculates the calibration delay from the second antenna to the first antenna, it usually cannot know the relative position between the second device and the first device. Therefore, in the embodiment of the present application, when calculating the calibration delay from the second antenna to the first antenna, the air interface delay from the second antenna to the first antenna is usually not considered. When the first device can know the relative position between the second device and the first device, the embodiment of the present application does not rule out considering the influence of the air interface delay from the second antenna to the first antenna on the calculation of the round-trip time between the first device and the second device, so as to adjust the delay of the calibration signal to obtain the calibration delay.
[0106] For example, Figure 4 is a schematic diagram of the relative position between a first device and a second device provided by an embodiment of the present application. As Figure 4As shown in the figure, the distance between the first antenna and the second antenna is d. The second device, the first antenna, and the second antenna of the first device are on a straight line, and the first antenna is located on the side away from the second device with respect to the second antenna. If the first device takes the midpoint of the line connecting the first antenna and the second antenna as the position of the first device, then when calculating the round-trip time between the first device and the second device, ΔT1 can be used as the calibration delay. If the first device takes the position where the first antenna is located as the position of the first device, then when calculating the round-trip time between the first device and the second device, (ΔT1 - d / c) can be used as the calibration delay. If the first device takes the position where the second antenna is located as the position of the first device, then when calculating the round-trip time between the first device and the second device, (ΔT1 + d / c) can be used as the calibration delay.
[0107] Optionally, multiple groups of corresponding relationships between calibration delays and transceiver antennas are recorded in the first device. After the first device determines to receive a message from the second device using the first antenna and send a message to the second device using the second antenna, in response to the recording in the first device of the corresponding relationship between the transmission antenna being the second antenna, the reception antenna being the first antenna, and the target calibration delay, the first device uses the target calibration delay as the calibration delay from the second antenna to the first antenna. Or, if the first device does not record the calibration delay corresponding to the transmission antenna being the second antenna and the reception antenna being the first antenna, the first device performs the above measurement process to measure the calibration delay from the second antenna to the first antenna.
[0108] Step 303: The first device receives an indication of the first transceiver delay from the second device.
[0109] Among them, the first transceiver delay is the delay between the time when the second device sends the first message and the time when the second device receives the second message. Optionally, the indication of the first transceiver delay is the value of the first transceiver delay. Or, the indication of the first transceiver delay includes the transmission timestamp when the second device sends the first message and the reception timestamp when the second device receives the second message, and the first device calculates the value of the first transceiver delay based on the transmission timestamp when the second device sends the first message and the reception timestamp when the second device receives the second message.
[0110] Optionally, the first device can receive the indication of the first transceiver delay from the second device using any antenna. Or, if the first device and the second device are also connected through a wired medium, the first device can also receive the indication of the first transceiver delay from the second device through this wired medium. For example, if both the first device and the second device are APs and the first device and the second device are connected by wire through a wireless controller, then the first device can receive the indication of the first transceiver delay from the second device forwarded by the controller. The embodiments of the present application do not limit the manner in which the first device receives the indication of the first transceiver delay from the second device.
[0111] Step 304: The first device determines the round-trip time between the first device and the second device according to the calibration delay from the second antenna to the first antenna, the recorded time when the first device receives the first message, the recorded time when the first device sends the second message, and the first transceiver delay.
[0112] The implementation process of step 304 includes: The first device calibrates the delay between the recorded time when the first device receives the first message and the recorded time when the first device sends the second message according to the calibration delay from the second antenna to the first antenna, to obtain the target transceiver delay. Then the first device calculates the round-trip time between the first device and the second device according to the target transceiver delay and the first transceiver delay.
[0113] Optionally, RTT = ΔT2 - (t4 - t3) - ΔT1. Wherein, RTT is the round-trip time between the first device and the second device. ΔT1 is the calibration delay from the second antenna to the first antenna. t3 is the recorded time when the first device receives the first message, and t4 is the recorded time when the first device sends the second message. The sum of (t4 - t3) and ΔT1 is also the target transceiver delay. ΔT2 is the first transceiver delay.
[0114] Optionally, the measurement process of the round-trip time between the first device and the second device can be implemented based on the FTM protocol. For example, in a WLAN, the first message can be an FTM frame, and the second message can be an acknowledgement (ACK) frame. Then before executing step 301, the first device first sends an FTM request frame to the second device, and this FTM request frame is used to request the measurement of the round-trip time between the first device and the second device, that is, the first device, as the measurement initiator, initiates a time measurement process through the FTM request frame.
[0115] Under the FTM protocol, the indication of the first transceiver delay received by the first device in step 303 above can be carried in the FTM frame. The indication of the first transceiver delay can include the transmission timestamp when the second device sends the first message and the reception timestamp when the second device receives the second message. Among them, the transmission timestamp when the second device sends the first message is in the time of departure (TOD) field of the FTM frame, and the reception timestamp when the second device receives the second message is in the time of arrival (TOA) field of the FTM frame.
[0116] In the time measurement method provided in the embodiment of the present application, the first device serves as the measurement initiating end. After the first device determines to receive a message from the second device using the first antenna and send a message to the second device using the second antenna, it obtains the calibration delay from the second antenna to the first antenna. During the time measurement process, the first device receives a first message from the second device using the first antenna and sends a second message to the second device using the second antenna. After receiving the indication of the first transceiver delay from the second device, the first device uses the calibration delay from the second antenna to the first antenna to calibrate the delay between the recording time when the first device receives the first message and the recording time when the first device sends the second message. Then, based on the calibrated delay and the first transceiver delay, the round-trip time between the first device and the second device is determined. Since the first device calibrates the recording time of the transceiver message, the accuracy of the calculated round-trip time can be improved, thereby reducing the distance calculation error between devices, that is, improving the ranging accuracy between devices.
[0117] In the second embodiment of the present application, the first device is the measurement response end. Figure 5 It is a schematic flowchart of another time measurement method provided in the embodiment of the present application. As Figure 5 shown, the method includes:
[0118] Step 501: The first device sends a third message to the third device using the third antenna.
[0119] As the measurement response end, the first device first determines the antenna in the first device used to receive messages from the third device and the antenna used to send messages to the third device, so as to obtain the calibration delay from the sending antenna to the receiving antenna. The manner in which the first device determines the corresponding sending antenna and receiving antenna of the third device can refer to the relevant description process in step 302 above for the first device to determine the corresponding sending antenna and receiving antenna of the second device, and this embodiment of the present application will not elaborate here.
[0120] In the embodiment of the present application, after the first device determines to send a message to the third device using the third antenna and receive a message from the third device using the fourth antenna, it obtains the calibration delay from the third antenna to the fourth antenna. Among them, the calibration delay from the third antenna to the fourth antenna is the delay for the first device to receive the radio signal sent by the third antenna using the fourth antenna. The manner in which the first device obtains the calibration delay from the third antenna to the fourth antenna can refer to the relevant description process in step 302 above for the first device to obtain the calibration delay from the second antenna to the first antenna, and this embodiment of the present application will not elaborate here. Among them, the third antenna and the fourth antenna are different antennas in the first device.
[0121] Optionally, the third antenna and the above-mentioned second antenna can be the same antenna in the first device, and the fourth antenna and the above-mentioned first antenna can be the same antenna in the first device.
[0122] Step 502: The first device receives a fourth message from the third device using the fourth antenna.
[0123] Optionally, the fourth message is a response message to the third message. In practical applications, there may be multiple antennas in the first device that receive the fourth message from the third device. The first device receiving the fourth message from the third device using the fourth antenna can be understood as: the first device only processes the fourth message received from the third device using the fourth antenna, and does not process the fourth message received from the third device using other antennas.
[0124] Step 503: The first device calibrates the recording time of the first device sending the third message and / or the recording time of the first device receiving the fourth message according to the calibration time delay from the third antenna to the fourth antenna, so as to obtain an indication of the second transceiver time delay.
[0125] Among them, the second transceiver time delay is the time delay between the time when the first device sends the third message and the time when the first device receives the fourth message. Optionally, ΔT4 = t6 - t5 - ΔT3. Among them, ΔT4 is the second transceiver time delay, t5 is the recording time of the first device sending the third message, t6 is the recording time of the first device receiving the fourth message, and ΔT3 is the calibration time delay from the third antenna to the fourth antenna.
[0126] Optionally, the indication of the second transceiver time delay is the value of the second transceiver time delay, that is, the first device can use ΔT4 as the indication of the second transceiver time delay. Or, the indication of the second transceiver time delay includes the transmission timestamp of the first device sending the third message and the reception timestamp of the first device receiving the fourth message. Among them, the transmission timestamp of the first device sending the third message is calibrated based on the calibration time delay from the third antenna to the fourth antenna for the recording time of the first device sending the third message, and / or, the reception timestamp of the first device receiving the fourth message is calibrated based on the calibration time delay from the third antenna to the fourth antenna for the recording time of the first device receiving the fourth message. For example, only the recording time of the first device receiving the fourth message can be calibrated, then the transmission timestamp of the first device sending the third message is t5, and the reception timestamp of the first device receiving the fourth message is (t6 - ΔT3). Or, only the recording time of the first device sending the third message can be calibrated, then the transmission timestamp of the first device sending the third message is (t5 + ΔT3), and the reception timestamp of the first device receiving the fourth message is t6. Or, the recording time of the first device receiving the fourth message and the recording time of the first device sending the third message can be calibrated at the same time. For example, the transmission timestamp of the first device sending the third message is (t5 + (ΔT3) / 2), and the reception timestamp of the first device receiving the fourth message is (t6 - (ΔT3) / 2).
[0127] Step 504: The first device sends an indication of the second transceiver delay to the third device.
[0128] The indication of the second transceiver delay is used for the third device to determine the round-trip time with the first device.
[0129] Optionally, the first device may send the indication of the second transceiver delay to the third device using any antenna. Alternatively, if there is also a wired medium connection between the first device and the third device, the first device may also send the indication of the second transceiver delay to the third device through this wired medium. For example, if both the first device and the third device are APs and there is a wired connection between the first device and the third device through a wireless controller, the first device may send the indication of the second transceiver delay to the third device through the controller. The embodiments of the present application do not limit the manner in which the first device sends the indication of the second transceiver delay to the third device.
[0130] Optionally, the measurement process of the round-trip time between the first device and the second device may be implemented based on the FTM protocol. For example, in a WLAN, the third message may be an FTM frame and the fourth message may be an ACK frame. Then, before performing the above step 501, the first device first receives an FTM request frame from the third device, and this FTM request frame is used to request the measurement of the round-trip time between the third device and the first device. The first device then sends the third message to the third device using the third antenna based on this FTM request frame. That is, the first device, as the measurement response end, starts to execute the time measurement process after receiving the FTM request frame from the third device.
[0131] Under the FTM protocol, the indication of the second transceiver delay sent by the first device to the third device in the above step 504 may be carried in the FTM frame. The indication of the second transceiver delay may include the transmission timestamp when the first device sends the third message and the reception timestamp when the first device receives the fourth message. Among them, the transmission timestamp when the first device sends the third message is in the TOD field of the FTM frame, and the reception timestamp when the first device receives the fourth message is in the TOA field of the FTM frame.
[0132] In the time measurement method provided in the embodiments of the present application, the first device serves as the measurement response end. After the first device determines to use the third antenna to send a message to the third device and use the fourth antenna to receive the message from the third device, the first device obtains the calibration delay from the third antenna to the fourth antenna. During the time measurement process, the first device sends a third message to the third device using the third antenna and receives a fourth message from the third device using the fourth antenna. Then, the first device calibrates the recording time when the first device sends the third message and / or the recording time when the first device receives the fourth message by using the calibration delay from the third antenna to the fourth antenna, so as to obtain an indication of the second transceiver delay, and sends the indication of the second transceiver delay to the third device. Since the second transceiver delay is the delay after the first device calibrates the recording time of sending and receiving messages, when the third device determines the round-trip time with the first device using this second transceiver delay, the accuracy of the calculated round-trip time can be improved, thereby reducing the distance calculation error between devices, that is, improving the ranging accuracy between devices.
[0133] In the embodiments of the present application, the measurement initiating end can apply Figure 3 the time measurement method shown, and / or, the measurement response end can apply Figure 5 the time measurement method shown. In the following embodiments of the present application, taking the measurement initiating end and the measurement response end both supporting the time measurement method provided in the embodiments of the present application as an example, the interaction process between the measurement initiating end and the measurement response end is exemplarily described. Among them, the measurement initiating end is device 1, including antenna 1 and antenna 2. The measurement response end is device 2, including antenna 3 and antenna 4. For example, Figure 6 is a schematic flowchart of another time measurement method provided in the embodiments of the present application. As Figure 6 shown, the method includes:
[0134] Step 601, Device 1 sends message 1 to Device 2 using antenna 1.
[0135] The implementation process of this step can refer to the above step 501, and the embodiments of the present application will not repeat it here.
[0136] Step 602, After Device 2 receives message 1 from Device 1 using antenna 3, Device 2 sends message 2 to Device 1 using antenna 4.
[0137] The implementation process of this step can refer to the above steps 301 to 302, and the embodiments of the present application will not repeat it here.
[0138] Step 603, After Device 1 receives message 2 from Device 2 using antenna 2, according to the calibration delay from antenna 1 to antenna 2, Device 1 calibrates the recording time when Device 1 sends message 1 and / or the recording time when Device 1 receives message 2, so as to obtain an indication of the transceiver delay 1.
[0139] The implementation process of this step can refer to the above steps 502 to 503, which will not be elaborated in the embodiments of this application.
[0140] Step 604: Device 1 sends an indication of the transceiver delay 1 to Device 2.
[0141] The implementation process of this step can refer to the above step 504, which will not be elaborated in the embodiments of this application.
[0142] Step 605: Device 2 determines the round-trip time between Device 2 and Device 1 based on the calibration delay from Antenna 4 to Antenna 3, the recording time when Device 2 receives Message 1, the recording time when Device 2 sends Message 2, and the transceiver delay 1.
[0143] The implementation process of this step can refer to the above step 304, which will not be elaborated in the embodiments of this application.
[0144] In summary, in the time measurement method provided by the embodiments of this application, a device measures the delay of a wireless signal sent by another antenna (referred to as the sending antenna) of the device using one antenna (referred to as the receiving antenna), and uses this delay as the calibration delay from the sending antenna to the receiving antenna. Then the device sends a message to other devices using the sending antenna and receives messages from other devices using the receiving antenna. When calculating the round-trip time between the device and other devices or responding to other devices to calculate the round-trip time with this device, the recording time of the device for sending and receiving messages can be calibrated using the calibration delay from the sending antenna to the receiving antenna, improving the accuracy of the calculated round-trip time, thereby reducing the distance calculation error between devices, that is, improving the ranging accuracy between devices. In addition, devices with two or more antennas can all apply this time measurement method, so the application scope of the time measurement method provided by the embodiments of this application is relatively wide.
[0145] Figure 7 It is a schematic structural diagram of a first device provided by the embodiments of this application. As Figure 7 shown, the first device 70 includes: a receiving module 701, a sending module 702, and a determining module 703.
[0146] A receiving module 701 is configured to receive a first message from a second device using a first antenna. A transmitting module 702 is configured to transmit a second message to the second device using a second antenna, where the first antenna and the second antenna are different antennas in the first device. The receiving module 701 is further configured to receive an indication of a first transceiver delay from the second device, where the first transceiver delay is the delay between the time when the second device transmits the first message and the time when the second device receives the second message. A determining module 703 is configured to determine a round-trip time between the first device and the second device based on a calibration delay from the second antenna to the first antenna, a recorded time when the first device receives the first message, a recorded time when the first device transmits the second message, and the first transceiver delay. Wherein, the calibration delay from the second antenna to the first antenna is the delay when the first device receives a wireless signal transmitted by the second antenna using the first antenna.
[0147] Optionally, the indication of the first transceiver delay is the value of the first transceiver delay; or, the indication of the first transceiver delay includes a transmission timestamp when the second device transmits the first message and a reception timestamp when the second device receives the second message.
[0148] Optionally, as Figure 8 shown, the first device 70 further includes a measurement module 704. The transmitting module 702 is further configured to transmit a calibration signal using the second antenna. The receiving module 701 is further configured to receive the calibration signal using the first antenna. The measurement module 704 is configured to measure the delay of the calibration signal and record the delay of the calibration signal as the calibration delay from the second antenna to the first antenna.
[0149] Optionally, ΔT1 = t2 - t1; where ΔT1 is the delay of the calibration signal, t1 is the recorded time when the second antenna transmits the calibration signal, and t2 is the recorded time when the first antenna receives the calibration signal.
[0150] Optionally, RTT = ΔT2 - (t4 - t3) - ΔT1. Where RTT is the round-trip time between the first device and the second device, ΔT1 is the calibration delay from the second antenna to the first antenna, t3 is the recorded time when the first device receives the first message, t4 is the recorded time when the first device transmits the second message, and ΔT2 is the first transceiver delay.
[0151] Optionally, the number of antennas of the first device is greater than 2, and the first antenna and the second antenna are the two antennas with the strongest received signal strength from the second device among the multiple antennas of the first device.
[0152] Optionally, multiple groups of corresponding relationships between calibration delays and transceiver antennas are recorded in the first device. The determining module 703 is further configured to, in response to the recording in the first device of the corresponding relationship between the transmitting antenna being the second antenna, the receiving antenna being the first antenna, and a target calibration delay, use the target calibration delay as the calibration delay from the second antenna to the first antenna.
[0153] Optionally, the first message is an FTM frame and the second message is an acknowledgment frame.
[0154] Optionally, as Figure 9 shown, the first device 70 further includes a calibration module 705. The sending module 702 is further configured to send a third message to a third device using a third antenna. The receiving module 701 is further configured to receive a fourth message from the third device using a fourth antenna, where the third antenna and the fourth antenna are different antennas in the first device. The calibration module 705 is configured to calibrate the recording time of the first device sending the third message and / or the recording time of the first device receiving the fourth message according to the calibration time delay from the third antenna to the fourth antenna, so as to obtain an indication of the second transceiver time delay, where the second transceiver time delay is the time delay between the time when the first device sends the third message and the time when the first device receives the fourth message. The calibration time delay from the third antenna to the fourth antenna is the time delay for the first device to receive the radio signal sent by the third antenna using the fourth antenna. The sending module 702 is further configured to send an indication of the second transceiver time delay to the third device.
[0155] Optionally, the indication of the second transceiver time delay is the value of the second transceiver time delay; or, the indication of the second transceiver time delay includes the sending timestamp of the first device sending the third message and the receiving timestamp of the first device receiving the fourth message. The sending timestamp of the first device sending the third message is calibrated based on the calibration time delay from the third antenna to the fourth antenna for the recording time of the first device sending the third message, and / or, the receiving timestamp of the first device receiving the fourth message is calibrated based on the calibration time delay from the third antenna to the fourth antenna for the recording time of the first device receiving the fourth message.
[0156] Optionally, ΔT4 = t6 - t5 - ΔT3. Where ΔT4 is the second transceiver time delay, t5 is the recording time of the first device sending the third message, t6 is the recording time of the first device receiving the fourth message, and ΔT3 is the calibration time delay from the third antenna to the fourth antenna.
[0157] Regarding the device in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.
[0158] In an optional embodiment of the present application, a first device is provided, including: a transceiver and a plurality of antennas.
[0159] The transceiver is configured to receive a first message from a second device using a first antenna among the plurality of antennas, and send a second message to the second device using a second antenna among the plurality of antennas, where the first antenna and the second antenna are different antennas among the plurality of antennas.
[0160] The transceiver is further configured to receive an indication of a first transceiver time delay from a second device, where the first transceiver time delay is the time delay between the time when the second device sends a first message and the time when the second device receives a second message.
[0161] The transceiver is further configured to determine a round-trip time between the first device and the second device according to the calibration time delay from the second antenna to the first antenna, the recorded time when the first device receives the first message, the recorded time when the first device sends the second message, and the first transceiver time delay, where the calibration time delay from the second antenna to the first antenna is the time delay for the first device to receive a wireless signal sent by the second antenna using the first antenna.
[0162] Optionally, the transceiver is further configured to send a third message to a third device using a third antenna and receive a fourth message from the third device using a fourth antenna. The third antenna and the fourth antenna are different antennas in the first device. The third antenna may be the same as the above-mentioned second antenna, and the fourth antenna may be the same as the above-mentioned first antenna. The transceiver is further configured to calibrate the recorded time when the first device sends the third message and / or the recorded time when the first device receives the fourth message according to the calibration time delay from the third antenna to the fourth antenna to obtain an indication of a second transceiver time delay, where the second transceiver time delay is the time delay between the time when the first device sends the third message and the time when the first device receives the fourth message. The calibration time delay from the third antenna to the fourth antenna is the time delay for the first device to receive a wireless signal sent by the third antenna using the fourth antenna. The transceiver is further configured to send an indication of the second transceiver time delay to the third device.
[0163] Optionally, the first device further includes a processor and a memory. The processor is configured to call a computer program stored in the memory to control the transceiver to send a calibration signal using the second antenna and receive the calibration signal using the first antenna; the processor is further configured to measure the time delay of the calibration signal and record the time delay of the calibration signal in the memory as the calibration time delay from the second antenna to the first antenna.
[0164] Optionally, the memory is configured to store multiple sets of corresponding relationships between calibration time delays and transceiver antennas. The transceiver is configured to obtain the calibration time delay corresponding to the second antenna as the sending antenna and the first antenna as the receiving antenna from the memory and use the calibration time delay as the calibration time delay from the second antenna to the first antenna.
[0165] In another optional embodiment of the present application, another first device is provided, including: a processor, a memory, a transceiver, and multiple antennas.
[0166] The transceiver is configured to receive a first message from a second device using a first antenna among the multiple antennas and send a second message to the second device using a second antenna among the multiple antennas. The first antenna and the second antenna are different antennas among the multiple antennas;
[0167] The transceiver is further configured to receive an indication of the first transceiver time delay from a second device, where the first transceiver time delay is the time delay between the time when the second device sends a first message and the time when the second device receives a second message;
[0168] The processor is configured to call a computer program stored in the memory to determine the round-trip time between the first device and the second device according to the calibration time delay from the second antenna to the first antenna, the recorded time when the first device receives the first message, the recorded time when the first device sends the second message, and the first transceiver time delay, where the calibration time delay from the second antenna to the first antenna is the time delay when the first device receives a wireless signal sent by the second antenna using the first antenna.
[0169] Optionally, the transceiver is further configured to send a third message to a third device using a third antenna and receive a fourth message from the third device using a fourth antenna. The third antenna and the fourth antenna are different antennas in the first device. The third antenna may be the same antenna as the above-mentioned second antenna, and the fourth antenna may be the same antenna as the above-mentioned first antenna. The processor is further configured to calibrate the recorded time when the first device sends the third message and / or the recorded time when the first device receives the fourth message according to the calibration time delay from the third antenna to the fourth antenna to obtain an indication of the second transceiver time delay, where the second transceiver time delay is the time delay between the time when the first device sends the third message and the time when the first device receives the fourth message. The calibration time delay from the third antenna to the fourth antenna is the time delay when the first device receives a wireless signal sent by the third antenna using the fourth antenna. The transceiver is further configured to send an indication of the second transceiver time delay to the third device.
[0170] Optionally, the processor is configured to call a computer program stored in the memory to control the transceiver to send a calibration signal using the second antenna and receive the calibration signal using the first antenna; the processor is further configured to measure the time delay of the calibration signal and record the time delay of the calibration signal in the memory as the calibration time delay from the second antenna to the first antenna.
[0171] Optionally, multiple groups of corresponding relationships between calibration time delays and transceiver antennas are stored in the memory. The processor is configured to obtain the calibration time delay corresponding to the second antenna as the sending antenna and the first antenna as the receiving antenna from the memory and use the calibration time delay as the calibration time delay from the second antenna to the first antenna.
[0172] For example, the first device may be Device 20 as shown in Figure 2 The computer program stored in the memory 202 may include one or more software modules. These one or more software modules may be as shown in Figures 7 to 9The software modules provided in any of the illustrated embodiments. The processor 201 is used to call a computer program and cooperate with the transceiver 203 to implement the time measurement method provided in the above method embodiments. Among them, the transceiver 203 is used to perform the transceiver actions of the first device in the above method embodiments. Optionally, the memory 202 is further used to store the corresponding relationships between multiple sets of calibration time delays and transceiver antennas for the processor 201 or the transceiver 203 to call.
[0173] The embodiments of the present application further provide a time measurement system, which includes two devices, and at least one of the devices is a device as shown in Figure 2 the figure or a first device as shown in Figures 7 to 9 any of the figures.
[0174] The embodiments of the present application further provide a computer-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the time measurement method involved in the above method embodiments is implemented.
[0175] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by a program instructing related hardware. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disc, etc.
[0176] In the embodiments of the present application, the terms "first", "second" and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0177] The term "and / or" in the present application is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0178] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the concept and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A time measurement method, characterized in that, The method includes: The first device sends a calibration signal using a second antenna; The first device receives the calibration signal using a first antenna, where the first antenna and the second antenna are different antennas in the first device; The first device measures the time delay of the calibration signal and records the time delay of the calibration signal as the calibration time delay from the second antenna to the first antenna, where the calibration time delay from the second antenna to the first antenna is the time delay for the first device to receive the calibration signal sent by the second antenna using the first antenna; The first device receives a first message from a second device using the first antenna; The first device sends a second message to the second device using the second antenna; The first device receives an indication of a first transmission and reception time delay from the second device, where the first transmission and reception time delay is the time delay between the time when the second device sends the first message and the time when the second device receives the second message; The first device determines the round-trip time between the first device and the second device based on the calibration time delay from the second antenna to the first antenna, the recording time when the first device receives the first message, the recording time when the first device sends the second message, and the first transmission and reception time delay.
2. The method according to claim 1, wherein The indication of the first transmission and reception time delay is the value of the first transmission and reception time delay; or, the indication of the first transmission and reception time delay includes the transmission timestamp when the second device sends the first message and the reception timestamp when the second device receives the second message.
3. The method according to claim 1, characterized in that, ΔT1 = t2 - t1; Where, ΔT1 is the time delay of the calibration signal, t1 is the recording time when the second antenna sends the calibration signal, and t2 is the recording time when the first antenna receives the calibration signal.
4. The method according to any one of claims 1 to 3, characterized in that RTT = ΔT2 - (t4 - t3) - ΔT1; Where, RTT is the round-trip time between the first device and the second device, ΔT1 is the calibration time delay from the second antenna to the first antenna, t3 is the recording time when the first device receives the first message, t4 is the recording time when the first device sends the second message, and ΔT2 is the first transmission and reception time delay.
5. The method according to any one of claims 1 to 4, characterized in that The number of antennas of the first device is greater than 2, and the first antenna and the second antenna are the two antennas with the strongest received signal strength from the second device among the multiple antennas of the first device.
6. The method according to any one of claims 1 to 5, characterized in that, Multiple sets of corresponding relationships between calibration time delays and transceiver antennas are recorded in the first device; the method further includes: In response to the recording in the first device of the corresponding relationship between the second antenna as the sending antenna, the first antenna as the receiving antenna, and the target calibration time delay, the first device uses the target calibration time delay as the calibration time delay from the second antenna to the first antenna.
7. According to the method as claimed in any one of claims 1 to 6, characterized in that, The first message is a Fine Time Measurement (FTM) frame, and the second message is an acknowledgment frame.
8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: The first device sends a third message to a third device using a third antenna; The first device receives a fourth message from the third device using a fourth antenna, where the third antenna and the fourth antenna are different antennas in the first device; The first device calibrates the recording time of the first device sending the third message and / or the recording time of the first device receiving the fourth message according to the calibration time delay from the third antenna to the fourth antenna, so as to obtain an indication of the second transceiver time delay, where the second transceiver time delay is the time delay between the time when the first device sends the third message and the time when the first device receives the fourth message. The calibration time delay from the third antenna to the fourth antenna is the time delay for the first device to receive the radio signal sent by the third antenna with the fourth antenna. The first device sends an indication of the second transceiver time delay to the third device.
9. The method according to claim 8, wherein The indication of the second transceiver time delay is the value of the second transceiver time delay; or, the indication of the second transceiver time delay includes the transmission timestamp of the first device sending the third message and the reception timestamp of the first device receiving the fourth message. Wherein, the transmission timestamp of the first device sending the third message is obtained by calibrating the recording time of the first device sending the third message based on the calibration time delay from the third antenna to the fourth antenna, and / or, the reception timestamp of the first device receiving the fourth message is obtained by calibrating the recording time of the first device receiving the fourth message based on the calibration time delay from the third antenna to the fourth antenna.
10. The method according to claim 8 or 9, characterized in that, ΔT4 = t6 - t5 - ΔT3; Wherein, ΔT4 is the second transceiver time delay, t5 is the recording time of the first device sending the third message, t6 is the recording time of the first device receiving the fourth message, and ΔT3 is the calibration time delay from the third antenna to the fourth antenna.
11. A first device, characterized in that, It includes: A sending module, configured to send a calibration signal with a second antenna; A receiving module, configured to receive the calibration signal with a first antenna, where the first antenna and the second antenna are different antennas in the first device; A measuring module, configured to measure the time delay of the calibration signal and record the time delay of the calibration signal as the calibration time delay from the second antenna to the first antenna, where the calibration time delay from the second antenna to the first antenna is the time delay for the first device to receive the calibration signal sent by the second antenna with the first antenna; The receiving module is further configured to receive a first message from a second device with the first antenna; The sending module is further configured to send a second message to the second device with the second antenna; The receiving module is further configured to receive an indication of the first transceiver time delay from the second device, where the first transceiver time delay is the time delay between the time when the second device sends the first message and the time when the second device receives the second message; A determining module, configured to determine the round-trip time between the first device and the second device according to the calibration time delay from the second antenna to the first antenna, the recording time of the first device receiving the first message, the recording time of the first device sending the second message, and the first transceiver time delay.
12. The first device according to claim 11, characterized in that, The indication of the first transceiver delay is the value of the first transceiver delay; or, the indication of the first transceiver delay includes the transmission timestamp when the second device sends the first message and the reception timestamp when the second device receives the second message.
13. The first device according to claim 11, characterized in that, ΔT1 = t2 - t1; Wherein, ΔT1 is the delay of the calibration signal, t1 is the recording time when the second antenna sends the calibration signal, and t2 is the recording time when the first antenna receives the calibration signal.
14. The first device according to any one of claims 11 to 13, characterized in that, RTT = ΔT2 - (t4 - t3) - ΔT1; Wherein, RTT is the round-trip time between the first device and the second device, ΔT1 is the calibration delay from the second antenna to the first antenna, t3 is the recording time when the first device receives the first message, t4 is the recording time when the first device sends the second message, and ΔT2 is the first transceiver delay.
15. The first device according to any one of claims 11 to 14, characterized in that, The number of antennas of the first device is greater than 2, and the first antenna and the second antenna are the two antennas with the strongest received signal strength from the second device among the multiple antennas of the first device.
16. The first device according to any one of claims 11 to 15, characterized in that Multiple sets of corresponding relationships between calibration delays and transceiver antennas are recorded in the first device; The determining module is further configured to, in response to the recording in the first device of the corresponding relationship between the second antenna as the sending antenna, the first antenna as the receiving antenna, and the target calibration delay, use the target calibration delay as the calibration delay from the second antenna to the first antenna.
17. The first device according to any one of claims 11 to 16, characterized in that, The first message is a Fine Time Measurement (FTM) frame, and the second message is an acknowledgment frame.
18. The first device according to any one of claims 11 to 17, characterized in that, The first device further includes a calibration module; The sending module is further configured to send a third message to a third device using a third antenna; The receiving module is further configured to receive a fourth message from the third device using a fourth antenna, and the third antenna and the fourth antenna are different antennas in the first device; The calibration module is configured to calibrate the recording time when the first device sends the third message and / or the recording time when the first device receives the fourth message according to the calibration delay from the third antenna to the fourth antenna, so as to obtain an indication of the second transceiver delay, where the second transceiver delay is the delay between the time when the first device sends the third message and the time when the first device receives the fourth message, and the calibration delay from the third antenna to the fourth antenna is the delay when the first device receives the radio signal sent by the third antenna using the fourth antenna; The sending module is further configured to send an indication of the second transceiver delay to the third device.
19. The first device according to claim 18, characterized in that, The indication of the second transceiver delay is the value of the second transceiver delay; or, the indication of the second transceiver delay includes the transmission timestamp when the first device sends the third message and the reception timestamp when the first device receives the fourth message; Among them, the transmission timestamp of the third message sent by the first device is obtained by calibrating the recording moment of the first device sending the third message based on the calibration delay from the third antenna to the fourth antenna, and / or the reception timestamp of the fourth message received by the first device is obtained by calibrating the recording moment of the first device receiving the fourth message based on the calibration delay from the third antenna to the fourth antenna.
20. The first device according to claim 18 or 19, characterized in that, ΔT4 = t6 - t5 - ΔT3; Among them, ΔT4 is the second transceiver delay, t5 is the recording moment of the first device sending the third message, t6 is the recording moment of the first device receiving the fourth message, and ΔT3 is the calibration delay from the third antenna to the fourth antenna.
21. A first device, characterized in that, Including: A transceiver and multiple antennas; The transceiver is configured to send a calibration signal with a second antenna among the multiple antennas and receive the calibration signal with a first antenna among the multiple antennas. The first antenna and the second antenna are different antennas among the multiple antennas. The delay of the calibration signal is used to be measured and recorded as the calibration delay from the second antenna to the first antenna. The calibration delay from the second antenna to the first antenna is the delay for the first device to receive the calibration signal sent by the second antenna with the first antenna. The transceiver is further configured to receive a first message from a second device with the first antenna and send a second message to the second device with the second antenna. The transceiver is further configured to receive an indication of a first transceiver delay from the second device. The first transceiver delay is the delay between the time when the second device sends the first message and the time when the second device receives the second message. The transceiver is further configured to determine the round-trip time between the first device and the second device according to the calibration delay from the second antenna to the first antenna, the recording moment when the first device receives the first message, the recording moment when the first device sends the second message, and the first transceiver delay.
22. A first device, characterized in that, Including: A processor, a memory, a transceiver, and multiple antennas; The processor is configured to call a computer program stored in the memory and control the transceiver to send a calibration signal with a second antenna among the multiple antennas and receive the calibration signal with a first antenna among the multiple antennas. The first antenna and the second antenna are different antennas among the multiple antennas. The processor is further configured to measure the delay of the calibration signal and record the delay of the calibration signal in the memory as the calibration delay from the second antenna to the first antenna. The calibration delay from the second antenna to the first antenna is the delay for the first device to receive the calibration signal sent by the second antenna with the first antenna. The transceiver is configured to receive a first message from a second device with the first antenna and send a second message to the second device with the second antenna. The transceiver is further configured to receive an indication of a first transceiver time delay from the second device, where the first transceiver time delay is the time delay between the time when the second device sends the first message and the time when the second device receives the second message; The processor is further configured to call the computer program stored in the memory to determine the round-trip time between the first device and the second device according to the calibration time delay from the second antenna to the first antenna, the recording time when the first device receives the first message, the recording time when the first device sends the second message, and the first transceiver time delay.
23. A computer-readable storage medium, characterized in that, Instructions are stored on the computer-readable storage medium, and when the instructions are executed by the processor, the time measurement method according to any one of claims 1 to 10 is implemented.
24. A chip, characterized in that, The chip includes programmable logic circuits and / or program instructions, and when the chip runs, the time measurement method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Method for determining location of wireless devices
US20150382152A1
Combined fine timing measurement (FTM) and non-FTM messaging for estimating turn-around calibration factor
US20170367063A1