A TOF ranging method and apparatus
By conducting multiple data communications between communication devices and recording time points, and combining this with the TWR-DS method to calculate distance, the problem of existing time-of-flight ranging methods being unable to measure distance at high speeds has been solved, thus realizing an efficient ranging method.
Patent Information
- Application Number
- CN202211640627.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-12-20
AI Technical Summary
Existing time-of-flight ranging methods involve relatively independent ranging processes for each measurement, which cannot meet the needs of high-speed ranging.
By controlling multiple data communications between the first and second communication devices, the initiation and reception times of each communication are recorded. After three data communications, the distance between the devices is calculated using the TWR-DS method, thus avoiding restarting the process for each distance measurement.
It improves ranging efficiency, making TOF ranging suitable for high-speed ranging scenarios, reduces the independence of the ranging process, and improves calculation frequency and accuracy.
Smart Images

Figure CN115792937B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of TOF ranging technology, and more particularly to a TOF ranging method and apparatus. Background Technology
[0002] Time-of-flight (TOF) ranging, broadly speaking, is a technique that measures the time it takes for an object, particle, or wave to travel a certain distance in a fixed medium, thereby gaining a deeper understanding of certain properties of ions or the medium. TOF ranging is a two-way ranging technique that uses the round-trip time of a data signal between a pair of transceivers to measure the distance between two points. Among existing wireless TOF ranging methods, UWB (Ultra-Wideband) ranging primarily uses two methods: TWR-SS (Single-sided Two-way Ranging) or TWR-DS (Double-sided Two-way Ranging). Each ranging process is relatively independent, requiring a fixed procedure to obtain the time-of-flight distance each time.
[0003] Existing time-of-flight ranging methods require at least three ranging communications to complete a single ranging measurement, and each ranging process is relatively independent, which cannot meet the needs of situations requiring high-speed ranging. Summary of the Invention
[0004] This invention provides a TOF ranging method and apparatus to solve the technical problem that existing time-of-flight ranging methods have relatively independent ranging processes for each measurement, making them unsuitable for high-speed ranging.
[0005] To address the aforementioned technical problems, embodiments of the present invention provide a TOF ranging method, comprising:
[0006] According to the first communication rule, the first communication device and the second communication device are controlled to complete multiple data communications, and the time points of each data communication initiated and received by the first communication device and the second communication device are recorded.
[0007] After each data communication is received, the distance between the first communication device and the second communication device is calculated according to the preset ranging rules and the TWR-DS method.
[0008] This invention controls multiple data communications between two communication devices through a first communication rule. After each data communication, the distance between the two communication devices can be calculated according to a preset ranging rule combined with the TWR-DS three-communication ranging method. By utilizing a common time point during distance calculation, the ranging process is avoided from having to restart for each measurement, thus improving efficiency and enabling TOF ranging to be applied to high-speed ranging.
[0009] Furthermore, the step of controlling the first communication device and the second communication device to complete multiple data communications according to the first communication rule specifically includes:
[0010] Establish a connection between the first communication device and the second communication device, and control the first communication device to complete multiple data communications to the second communication device according to the first communication rules until the number of data communications reaches a first threshold.
[0011] The first communication rule includes the following: the device initiating the next data communication is the device receiving the current data communication, and the device receiving the next data communication is the device initiating the current data communication.
[0012] This invention controls multiple data communications between a first communication device and a second communication device through a first communication rule. Each ranging measurement does not require starting an independent ranging communication process. The communication distance between the two communication devices is calculated based on the initiation and reception times of the data communication, so as to be applied to high-speed ranging scenarios.
[0013] Furthermore, after each received data communication, the distance between the first communication device and the second communication device is calculated according to a preset ranging rule and the TWR-DS method, specifically as follows:
[0014] Determine whether to start distance measurement based on the current number of data communications. If the current number of data communications is greater than or equal to three, then after each data communication received, calculate the distance between the first communication device and the second communication device according to the TWR-DS method.
[0015] This invention calculates the distance between two communication devices using the TWR-DS ranging method when the number of communication attempts exceeds three. This avoids the problem that the original TWR-DS ranging method, where each ranging step is relatively independent and therefore unsuitable for high-speed ranging, is not applicable to high-speed ranging.
[0016] Furthermore, if the current number of data communications is greater than or equal to three, then after each received data communication, the distance between the first communication device and the second communication device is calculated according to the TWR-DS method, specifically as follows:
[0017] If the current number of data communications is greater than or equal to three, then after the receiving device of this data communication receives the data communication, obtain the time points of all data communication initiation and data communication reception of this data communication and the previous two data communication.
[0018] The distance between the first communication device and the second communication device is calculated using the TWR-DS method and the time points mentioned above.
[0019] This invention calculates the current device's communication distance using the TWR-DS method by comparing the current data communication time point with the previous two data communication time points. This allows for distance measurement to be completed with each communication, eliminating the need to initiate a separate distance measurement communication process and improving distance measurement efficiency.
[0020] Furthermore, after calculating the distance between the first communication device and the second communication device according to the TWR-DS method and the time point, the method further includes:
[0021] If the receiving device for the current data communication is the second communication device, then the distance between the first communication device and the second communication device calculated in this data communication will be sent to the first communication device in the next data communication.
[0022] This invention uses the TWR-DS method to calculate the distance between two communication devices at a common time point, so that each distance measurement does not require starting a separate distance measurement process.
[0023] Secondly, embodiments of the present invention also provide a TOF ranging device, including: a communication module and a computing module;
[0024] The communication module is used to control the first communication device and the second communication device to complete multiple data communications according to the first communication rules, and to record the time points of each data communication initiated and received by the first communication device and the second communication device.
[0025] The calculation module is used to calculate the distance between the first communication device and the second communication device according to the preset ranging rules and the TWR-DS method after each data communication is received.
[0026] Furthermore, the communication module is specifically used for:
[0027] Establish a connection between the first communication device and the second communication device, and control the first communication device to complete multiple data communications to the second communication device according to the first communication rule until the number of data communications reaches the first threshold.
[0028] The first communication rule includes the following: the device initiating the next data communication is the device receiving the current data communication, and the device receiving the next data communication is the device initiating the current data communication.
[0029] Furthermore, the computing module is specifically used for:
[0030] Determine whether to start distance measurement based on the current number of data communications. If the current number of data communications is greater than or equal to three, then after each data communication received, calculate the distance between the first communication device and the second communication device according to the TWR-DS method.
[0031] Furthermore, the computing module is also used for:
[0032] Starting from the third data communication, after the receiving device in this data communication receives the data, obtain the time points of all initiation and reception of the previous three data communications.
[0033] The distance between the first communication device and the second communication device is calculated using the TWR-DS method and the time points mentioned above.
[0034] Furthermore, the computing module is also used for:
[0035] If the receiving device for the current data communication is the second communication device, then the distance between the first communication device and the second communication device calculated in this data communication will be sent to the first communication device in the next data communication. Attached Figure Description
[0036] Figure 1 This is a schematic flowchart of a TOF ranging method provided in an embodiment of the present invention;
[0037] Figure 2 A TWR-DS ranging schematic diagram of the TOF ranging method provided in this embodiment of the invention;
[0038] Figure 3 This is a data communication diagram of the TOF ranging method provided in an embodiment of the present invention;
[0039] Figure 4 This is a schematic diagram of a TOF ranging device provided in an embodiment of the present invention. Detailed Implementation
[0040] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0041] Example 1
[0042] Please refer to Figure 1 , Figure 1 A flowchart illustrating the TOF ranging method provided in this embodiment of the invention includes steps 101 to 102, as detailed below:
[0043] Step 101: Control the first communication device and the second communication device to complete multiple data communications according to the first communication rule, and record the time points of each data communication initiated and received by the first communication device and the second communication device;
[0044] In this embodiment, continuous, round-trip communication is achieved between the first and second communication devices, and the time point of each communication is recorded. The distance between the two communication devices can be calculated using the time point, thus completing the communication ranging.
[0045] In this embodiment, controlling the first and second communication devices to complete multiple data communications according to the first communication rule specifically includes:
[0046] Establish a connection between the first communication device and the second communication device, and control the first communication device to complete multiple data communications to the second communication device according to the first communication rule until the number of data communications reaches the first threshold.
[0047] The first communication rule includes the following: the device initiating the next data communication is the device receiving the current data communication, and the device receiving the next data communication is the device initiating the current data communication.
[0048] In this embodiment, a connection is established between the first communication device and the second communication device. The first communication rule specifically includes: First, controlling the first communication device to send a first data packet to the second communication device, recording the time point T1 when the first communication device sends the first data packet and the time point T2 when the second communication device receives the first data packet. Second, after receiving the first data packet, the second communication device sends a second data packet to the first communication device, recording the time point T3 when the second communication device sends the second data packet and the time point T4 when the first communication device receives the second data packet. Then, the first communication device sends a third data packet to the second communication device, recording the time point T5 when the first communication device sends the third data packet and the time point T6 when the second communication device receives the third data packet. This round-trip communication is repeated multiple times, with the initiating device of the next data communication being the receiving device of the current data communication, and the receiving device of the next data communication being the initiating device of the current data communication. The time points (T1, T2, T3, ..., T2n) of each data communication sent and received by the two communication devices are recorded.
[0049] In this embodiment, multiple data communications are controlled between the first and second communication devices through a first communication rule. Each ranging measurement does not require the start of an independent ranging communication process. The communication distance between the two communication devices is calculated based on the initiation and reception times of the data communication, so as to be applied to high-speed ranging scenarios.
[0050] Step 102: After each data communication is received, the distance between the first communication device and the second communication device is calculated according to the preset ranging rules and the TWR-DS method.
[0051] In this embodiment, after each data communication, the distance between the first communication device and the second communication device is calculated according to a preset ranging rule and the TWR-DS method, specifically as follows:
[0052] Determine whether to start distance measurement based on the current number of data communications. If the current number of data communications is greater than or equal to three, then after each data communication received, calculate the distance between the first communication device and the second communication device according to the TWR-DS method.
[0053] Please refer to Figure 2 , Figure 2 This is a schematic diagram of a TWR-DS ranging method provided in an embodiment of the TOF ranging method of the present invention.
[0054] In this embodiment, since the TWR-DS method requires at least three data communications, the TWR-DS method is specifically as follows: Device A sends a poll message and records the sending time T1; Device B receives the poll message and records the receiving time T2; Device B sends a response message and records the sending time T3; Device A receives the response message and records the receiving time T4; Device A sends an acknowledge message and records the sending time T5; Device B receives the acknowledge message and records the receiving time T6.
[0055] In this embodiment, the specific formula for measuring the distance T (i.e., communication time) between DeciveA and DeciveB according to the TWR-DS is as follows:
[0056]
[0057] Among them, T round1 =T4-T1; T round2 =T6-T3; T reply1 =T3-T2; T reply2 =T5-T4.
[0058] In this embodiment, the decision to begin calculating the distance between the two communication devices is based on the number of current data communications. If the number of current data communications is greater than or equal to three, the distance between the first and second communication devices is calculated based on the TWR-DS after each communication is completed.
[0059] In this embodiment, when the number of communications is greater than three, the distance between the two communication devices is calculated using the TWR-DS ranging method. This avoids the problem that the original TWR-DS ranging method has a relatively independent process for each ranging measurement, making it unsuitable for high-speed ranging.
[0060] In this embodiment, if the current number of data communications is greater than or equal to three, then after each received data communication, the distance between the first communication device and the second communication device is calculated according to the TWR-DS method, specifically as follows:
[0061] If the current number of data communications is greater than or equal to three, then after the receiving device of this data communication receives the data communication, obtain the time points of all data communication initiation and data communication reception of this data communication and the previous two data communication.
[0062] The distance between the first communication device and the second communication device is calculated using the TWR-DS method and the time points mentioned above.
[0063] Please refer to Figure 3 , Figure 3 This is a data communication diagram of a TOF ranging method provided in an embodiment of the present invention.
[0064] In this embodiment, if the current number of data communications is less than three, the time points of initiating and acquiring data communications are recorded, and the next data communication begins.
[0065] In this embodiment, if the current number of data communications is greater than or equal to three, then the time points of all initiated and received data communications for the current data communication and the previous two data communications are obtained. Assuming the current number of communications is four, then the time T7 of the initiated data communication and the time 8 of the received data communication for the current data communication are obtained, and the time points (T3, T4, T5, T6) of all initiated and received data communications for the previous two data communications are obtained. The distance between the two devices is calculated according to the TWR-DS method and the time point sequence (T3~T8).
[0066] In this embodiment, the communication distance of the current device is calculated using the TWR-DS method based on the time points of this data communication and the previous two data communication communications. This allows for distance measurement to be completed with each communication, eliminating the need to initiate a separate distance measurement communication process and improving distance measurement efficiency.
[0067] In this embodiment, by sharing a common time point, ranging is performed after each communication, eliminating the need for a three-step ranging process. After three data communications, ranging can be performed with each communication. This method is highly effective for monitoring trajectories of high-speed motion.
[0068] In this embodiment, after calculating the distance between the first communication device and the second communication device according to the TWR-DS method and the time point, the method further includes:
[0069] If the receiving device for the current data communication is the second communication device, then the distance between the first communication device and the second communication device calculated in this data communication will be sent to the first communication device in the next data communication.
[0070] In this embodiment, the ranging calculation is performed alternately on the first communication device and the second communication device, and then returned through the latest communication. In the communication data packet of the second communication device, each returned data includes not only the ID and the first three dynamic timestamps used for calculation by the second communication device, but also the current ranging calculation result.
[0071] In this embodiment, both the first communication device and the second communication device can calculate the distance. If the receiving device for this data communication is the second communication device and the first communication device is a monitoring device, then after the second communication device completes a data communication and calculates the distance, it will send the distance back to the first communication device in the next data communication.
[0072] In this embodiment, if the receiving device for this data communication is a first communication device, and the first communication device is a monitoring device, then the first communication device can calculate the distance itself according to the TWR-DS algorithm after completing a data communication. For example, when the fourth communication is completed, the first communication device records the node T8 of the received data communication; and the first communication device calculates the distance, that is, it combines the latest two timestamps (T7, T8) obtained in each communication to calculate the distance value at the current moment (using timestamps T3 to T8 for calculation). For distance measurement of moving objects, the calculation accuracy can be improved. This eliminates the need for the distance calculation to be performed at node T10 as in traditional distance measurement methods, which would otherwise take time for flight from T7 to T8, processing time from T8 to T9, and flight time from T9 to T10 before the calculation result is obtained, thus increasing the overall error result.
[0073] In this embodiment, the distance between the two communication devices can be calculated automatically for each data communication, which increases the calculation frequency and allows subsequent filtering algorithms to obtain sufficient data, thereby obtaining smoother data results.
[0074] In this embodiment, the TWR-DS method is used to calculate the distance between two communication devices at a common time point, so that each distance measurement does not require starting an independent distance measurement process.
[0075] Please refer to Figure 4 , Figure 4 A schematic diagram of a TOF ranging device provided in an embodiment of the present invention includes a communication module 401 and a calculation module 402, as detailed below:
[0076] The communication module 401 is used to control the first communication device and the second communication device to complete multiple data communications according to the first communication rules, and to record the time points of each data communication initiated and received by the first communication device and the second communication device.
[0077] The calculation module 402 is used to calculate the distance between the first communication device and the second communication device according to the preset ranging rules and the TWR-DS method after each data communication is received.
[0078] In this embodiment, the communication module is specifically used for:
[0079] Establish a connection between the first communication device and the second communication device, and control the first communication device to complete multiple data communications to the second communication device according to the first communication rule until the number of data communications reaches the first threshold.
[0080] The first communication rule includes the following: the device initiating the next data communication is the device receiving the current data communication, and the device receiving the next data communication is the device initiating the current data communication.
[0081] In this embodiment, the computing module is specifically used for:
[0082] Determine whether to start distance measurement based on the current number of data communications. If the current number of data communications is greater than or equal to three, then after each data communication received, calculate the distance between the first communication device and the second communication device according to the TWR-DS method.
[0083] In this embodiment, the computing module is further configured to:
[0084] Starting from the third data communication, after the receiving device of this data communication receives the data communication, obtain the time points of all the data communication initiation and data communication received in the previous three data communication sessions.
[0085] The distance between the first communication device and the second communication device is calculated using the TWR-DS method and the time points mentioned above.
[0086] In this embodiment, the computing module is further configured to:
[0087] If the receiving device for the current data communication is the second communication device, then the distance between the first communication device and the second communication device calculated in this data communication will be sent to the first communication device in the next data communication.
[0088] In this embodiment, the invention controls multiple data communications between two communication devices through a first communication rule. After each data communication, the distance between the two communication devices can be calculated according to a preset ranging rule combined with the TWR-DS three-communication ranging method. By utilizing a common time point during distance calculation, the ranging process is avoided from having to restart for each measurement, thus improving ranging efficiency and enabling TOF ranging to be applied to high-speed ranging.
[0089] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A TOF ranging method, characterized in that, include: The system controls the first and second communication devices to complete multiple data communications according to the first communication rule, and records the time points of each data communication initiated and received by the first and second communication devices; the first communication rule includes that the device initiating the next data communication is the device receiving the current data communication, and the device receiving the next data communication is the device initiating the current data communication. After each data communication is received, the distance between the first communication device and the second communication device is calculated according to the preset ranging rules and the TWR-DS method. Specifically, the distance measurement is started based on the current number of data communications. If the current number of data communications is greater than or equal to three, the distance between the first communication device and the second communication device is calculated according to the TWR-DS method after each data communication is received.
2. The TOF ranging method as described in claim 1, characterized in that, The process of controlling the first and second communication devices to complete multiple data communications according to the first communication rule specifically includes: Establish a connection between the first communication device and the second communication device, and control the first communication device to complete multiple data communications to the second communication device according to the first communication rules until the number of data communications reaches a first threshold.
3. The TOF ranging method as described in claim 1, characterized in that, If the current number of data communications is greater than or equal to three, then after each received data communication, the distance between the first communication device and the second communication device is calculated according to the TWR-DS method, specifically as follows: If the current number of data communications is greater than or equal to three, then after the receiving device of this data communication receives the data communication, obtain the time points of all data communication initiation and data communication reception of this data communication and the previous two data communication. The distance between the first communication device and the second communication device is calculated using the TWR-DS method and the time points mentioned above.
4. The TOF ranging method as described in claim 3, characterized in that, After calculating the distance between the first communication device and the second communication device according to the TWR-DS method and the time point, the method further includes: If the receiving device for the current data communication is the second communication device, then the distance between the first communication device and the second communication device calculated in this data communication will be sent to the first communication device in the next data communication.
5. A TOF ranging device, characterized in that, include: Communication module and computing module; The communication module is used to control the first communication device and the second communication device to complete multiple data communications according to the first communication rule, and to record the time point of each data communication initiated and received by the first communication device and the second communication device; the first communication rule includes that the initiating device of the next data communication is the receiving device of the current data communication, and the receiving device of the next data communication is the initiating device of the current data communication. The calculation module is used to calculate the distance between the first communication device and the second communication device according to the preset ranging rules and the TWR-DS method after each data communication is received. Specifically, it determines whether to start ranging based on the current number of data communications. If the current number of data communications is greater than or equal to three, then after each data communication is received, the distance between the first communication device and the second communication device is calculated according to the TWR-DS method.
6. The TOF ranging device as described in claim 5, characterized in that, The communication module is specifically used for: Establish a connection between the first communication device and the second communication device, and control the first communication device to complete multiple data communications to the second communication device according to the first communication rules until the number of data communications reaches a first threshold.
7. The TOF ranging device as described in claim 5, characterized in that, The computing module is also used for: Starting from the third data communication, after the receiving device in this data communication receives the data, obtain the time points of all initiation and reception of the previous three data communications. The distance between the first communication device and the second communication device is calculated using the TWR-DS method and the time points mentioned above.
8. The TOF ranging device as described in claim 7, characterized in that, The computing module is also used for: If the receiving device for the current data communication is the second communication device, then the distance between the first communication device and the second communication device calculated in this data communication will be sent to the first communication device in the next data communication.
Citation Information
Patent Citations
High precision UWB distance determination
EP3822662A1