Distance measuring method and device, computer readable storage medium
By combining multiple ranging methods and performing weighted calculations within the sub1G/sub1.5G frequency band, the problem of insufficient ranging accuracy and range within the ISM band was solved, achieving higher accuracy and a wider range of ranging effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAXIN MICROELECTRONICS SHANGHAI CO LTD
- Filing Date
- 2026-04-16
- Publication Date
- 2026-06-12
AI Technical Summary
Existing ranging methods based on wireless communication are subject to interference from wireless communication methods such as Bluetooth and WIFI in the ISM band, resulting in poor ranging accuracy and range.
By combining multiple ranging methods (multi-carrier phase difference, received signal strength indication, and time of arrival), ranging is performed in the sub1G/sub1.5G frequency band, and weighted calculations are used to improve ranging accuracy and range.
By combining multiple ranging methods and selecting frequency bands, ranging accuracy and range are significantly improved, while interference is reduced.
Smart Images

Figure CN122194119A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ranging technology, and in particular to a ranging method and apparatus, and a computer-readable storage medium. Background Technology
[0002] In daily life, commonly used electronic devices (such as mobile phones and smartwatches) usually have built-in positioning modules to achieve positioning functions. Ranging methods based on wireless communication include various implementations, such as ranging methods based on multi-carrier phase difference (MCPD), ranging methods based on round-trip time (RTT), and ranging methods based on received signal strength indication (RSSI).
[0003] Currently, the aforementioned wireless communication-based ranging methods typically operate in the Industrial, Scientific and Medical (ISM) band. Within the ISM band, other wireless communication methods such as Bluetooth and Wi-Fi also exist, leading to spectrum congestion and significant interference, which affects ranging accuracy and range. Summary of the Invention
[0004] The purpose of this invention is at least to provide a ranging method and apparatus, and a computer-readable storage medium, which can improve ranging accuracy.
[0005] In a first aspect, the present invention provides a ranging method, comprising: after determining that a ranging operation has been initiated, receiving a first ranging signal sent by a peer device; the first ranging signal including first timestamp information; based on the first ranging signal, obtaining a first ranging result using a multi-carrier phase difference method, obtaining a second ranging result using a received signal strength indication method, and obtaining a third ranging result using the first timestamp information and a time of arrival method; configuring weight parameters for the first ranging result, the second ranging result, and the third ranging result respectively, and performing a weighted calculation on the first ranging result, the second ranging result, and the third ranging result to obtain a first distance with the peer device.
[0006] After receiving the first ranging signal from the peer device, a first ranging result is obtained using a multi-carrier phase difference method, a second ranging result is obtained using a received signal strength indication method, and a third ranging result is obtained based on a first timestamp and arrival time method. Appropriate weighting coefficients are assigned to the first, second, and third ranging results, and a weighted calculation is performed to obtain the first distance. Therefore, the local device only needs to receive the first ranging signal to obtain ranging results from three different ranging methods, thus determining the first distance with the peer device. Using three different ranging methods to obtain three different ranging results, and then using these three different ranging results to determine the first distance with the peer device, improves the accuracy of the obtained first distance compared to using only a single ranging method.
[0007] The remote device can transmit the first ranging signal on the sub-1G / sub-1.5G frequency band, and correspondingly, the local device receives the first ranging signal on the sub-1G / sub-1.5G frequency band. Compared with the current ISM band, the sub-1G / sub-1.5G frequency band supports fewer wireless communication methods, and the first ranging signal is less susceptible to interference, thus improving the accuracy of the obtained first distance and increasing the ranging range.
[0008] Optionally, the step of performing a weighted calculation on the first ranging result, the second ranging result, and the third ranging result to obtain the first distance with the peer device includes: the first distance is: α×D1+β×D2+γ×D3; where: α is the first weight coefficient, D1 is the first ranging result, β is the second weight coefficient, D2 is the second ranging result, γ is the third weight coefficient, and D3 is the third ranging result; α, β, and γ are all greater than 0 and α+β+r=1.
[0009] Optional, α≥γ≥β.
[0010] Optionally, after obtaining the first ranging result, the ranging method further includes: sending the first distance to the peer device; receiving a second distance sent by the peer device, the second distance being obtained by the peer device based on a second ranging signal, and the second ranging signal being sent after determining to start the ranging operation; and determining the final distance between the peer device and the peer device based on the first distance and the second distance.
[0011] Determining the final distance to the peer device based on the first and second distances can further improve the accuracy of the ranging results.
[0012] Optionally, the ranging method further includes: determining an estimated distance between the device and the peer device based on the second ranging result and / or the third ranging result; and calibrating the first ranging result based on the estimated distance.
[0013] Optionally, determining the estimated distance between the device and the peer device based on the second ranging result and / or the third ranging result includes: if the first ranging signal is a narrowband signal, determining the estimated distance based on the second ranging result; or if the first ranging signal is a wideband signal, determining the estimated distance based on the third ranging result.
[0014] Based on the second and / or third ranging results, the first ranging result is corrected to obtain a more accurate first ranging result, and thus the obtained first distance is also more accurate.
[0015] Optionally, the second ranging result includes: the arithmetic mean of ranging results obtained at different frequency points using the received signal strength indication method; the third ranging result includes: the arithmetic mean of ranging results obtained at different frequency points based on the first timestamp information and the arrival time method.
[0016] Secondly, the present invention provides a ranging device, comprising: a receiving unit, configured to receive a first ranging signal sent by a peer device after determining that a ranging operation has been initiated; the first ranging signal includes first timestamp information; a ranging unit, configured to obtain a first ranging result based on the first ranging signal by employing a multi-carrier phase difference method, obtaining a second ranging result by employing a received signal strength indication method, and obtaining a third ranging result by employing the first timestamp information and an arrival time method; and a processing unit, configured to configure weight parameters for the first ranging result, the second ranging result, and the third ranging result respectively, and perform a weighted calculation on the first ranging result, the second ranging result, and the third ranging result to obtain a first distance with the peer device.
[0017] Thirdly, the present invention also provides a computer-readable storage medium, which is a non-volatile storage medium or a non-transient storage medium, on which a computer program is stored, wherein the computer program is executed by a processor to perform the steps of any of the above-described ranging methods.
[0018] Fourthly, the present invention also provides another ranging device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor executes the steps of any of the ranging methods described above when running the computer program. Attached Figure Description
[0019] Figure 1This is a flowchart of a ranging method according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating an application scenario of a ranging method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a ranging device according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a ranging device in an embodiment of the present invention. Detailed Implementation
[0020] As described in the background section, common wireless communication-based ranging methods typically operate in the ISM band. Since other wireless communication methods, such as Bluetooth and Wi-Fi, also exist in the ISM band, they can interfere with the ranging signals used by these methods. Furthermore, ranging is usually performed using only one method (such as MCPD-based ranging, RSSI-based ranging, RTT-based ranging, etc.), and the results obtained from a single ranging method are significantly affected by interference.
[0021] In summary, current ranging methods based on wireless communication have poor ranging accuracy and a small ranging range.
[0022] In this embodiment of the invention, the local device only needs to receive the first ranging signal to obtain the ranging results obtained by three different ranging methods, and then obtain the first distance with the remote device. By using three different ranging methods to obtain three different ranging results, and then using the three different ranging results to determine the first distance with the remote device, the accuracy of the obtained first distance can be improved compared to using only a single ranging method.
[0023] Furthermore, in this embodiment of the invention, the peer device can transmit a first ranging signal on the sub-1G / sub-1.5G frequency band, and correspondingly, the local device receives the first ranging signal on the sub-1G / sub-1.5G frequency band. Compared to the current ISM band, the sub-1G / sub-1.5G frequency band supports fewer wireless communication methods, and the first ranging signal is subject to less interference, thus improving the accuracy of the obtained first distance and increasing the ranging range.
[0024] To make the above-mentioned objectives, features and beneficial effects of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0025] This invention provides a ranging method, referring to... Figure 1 The following will provide a detailed explanation through specific steps.
[0026] In practice, the following ranging method can be executed by a controller (such as a microcontroller, central processing unit, etc.) with data processing capabilities in the local device. This controller can also be referred to as a control unit, control module, control group, processor, processing unit, or other chip or circuit capable of data processing. The following ranging method can also be executed by the local device; the following explanation uses the local device executing the ranging method as an example.
[0027] In practice, the aforementioned local device can be used to measure the distance between itself and the remote device. Both the local and remote devices are ranging devices, which can be intelligent electronic devices such as smart wearable devices or mobile phones.
[0028] The terms "local device" and "remote device" are relative concepts. The local device receives ranging signals sent by the remote device.
[0029] Reference Figure 2 The diagram illustrates an application scenario of a ranging method according to an embodiment of the present invention. If ranging device 1 sends a ranging signal to ranging device 2, then ranging device 2 is the local device, and testing device 1 is the peer device corresponding to testing device 2. If ranging device 2 sends a ranging signal to ranging device 1, then ranging device 1 is the local device, and ranging device 1 is the peer device corresponding to ranging device 2.
[0030] In this embodiment of the invention, the ranging method described below can be applied to SUB1.5GHz (such as the 1.4GHz civilian frequency band for drones) and SUB1GHz industrial wireless frequency band. In some embodiments, the ranging method described below can also be applied to the ISM band.
[0031] Step 101: After confirming the start of the ranging operation, receive the first ranging signal sent by the peer device.
[0032] In this embodiment of the invention, the local device and the remote device can pre-agree to initiate a ranging operation. Once the ranging operation is initiated, the remote device can send a first ranging signal; correspondingly, the local device receives the first ranging signal sent by the remote device after initiating the ranging operation.
[0033] In specific implementation, the first ranging signal may include first timestamp information, which can be used to characterize the transmission time of the first ranging signal sent by the peer device. Upon receiving the first ranging signal, the local device can determine the transmission time of the first ranging signal sent by the peer device.
[0034] In practice, when ranging is required, the local device and the remote device can agree to initiate the ranging operation by sending a trigger signal. Alternatively, the local device and the remote device can initiate the ranging operation at a predetermined period. Or, both the local device and the remote device can receive the ranging command sent by the base station and initiate the ranging operation respectively.
[0035] Step 102: Based on the first ranging signal, obtain the first ranging result, the second ranging result, and the third ranging result.
[0036] In this embodiment of the invention, after receiving the first ranging signal, the local device can use a multi-carrier phase difference method to obtain a first ranging result, use a received signal strength indication method to obtain a second ranging result, and use the first timestamp information and the arrival time method to obtain a third ranging result.
[0037] In practice, the peer device can transmit the first ranging signal on different frequencies. Correspondingly, the local device can receive the first ranging signal on different frequencies. The peer device and the local device can pre-agree on the frequency hopping frequency.
[0038] For example, the frequency points agreed upon by the peer device and the local device for frequency hopping include frequency points 1 to 4. The peer device transmits a first ranging signal on frequency point 1, and the local device receives the first ranging signal on frequency point 1; the peer device transmits a first ranging signal on frequency point 2, and the local device receives the first ranging signal on frequency point 2; the peer device transmits a first ranging signal on frequency point 3, and the local device receives the first ranging signal on frequency point 3; the peer device transmits a first ranging signal on frequency point 4, and the local device receives the first ranging signal on frequency point 4.
[0039] Based on the first ranging signal received at different frequencies, the local device obtains the phase value corresponding to each frequency point, and thus obtains the first ranging result.
[0040] Taking the peer device transmitting the first ranging signal at the first frequency (frequency f1) and the second frequency (frequency f2) as an example, the first ranging result can be obtained. for: (1) Where c is the speed of light. for 1 and The difference of 2, 1 represents the phase value measured at the first frequency point. 2 represents the phase value measured at the second frequency point.
[0041] When the peer device sends the first ranging signal on multiple frequency points, the specific principle and process of obtaining the first ranging result can be referred to the description of the MCPD method in the technology, which will not be repeated here.
[0042] In practice, the RSSI method is used to obtain the ranging result corresponding to a certain frequency point. It can be: (2) in, For wireless environment fading factor, For receiving signal strength indication, is the ranging correction value; rssi is the average RSSI value of the first ranging signal received by the local device from the remote device at this frequency.
[0043] In practical applications, it is known that the wireless environment fading factor This parameter describes the attenuation of wireless signals during propagation and characterizes the relationship between path loss and distance. Wireless environmental fading factor. The value depends on the specific wireless environment.
[0044] For example, in free space, the wireless environment fading factor The value is 2; in urban environments, there are many obstacles and buildings, and the wireless environment fading factor is high. The value ranges from 2.7 to 3.5; in suburban environments, the wireless environmental fading factor... The value ranges from 3 to 5.
[0045] In practical applications, the aforementioned wireless environment fading factors It can be preset based on specific application scenarios. Alternatively, the aforementioned wireless environment fading factor... It can be known in advance through measurement.
[0046] The aforementioned received signal strength indication r1 is the received signal strength indication obtained when the local device receives the first ranging signal sent by the remote device, provided that the distance between the local device and the remote device is 1 meter. The value of r1 can be obtained through pre-measurement.
[0047] In specific implementation, the above... This is the ranging correction value, also known as the reference distance correction value, which can be 1 meter or other values. The aforementioned wireless environment fading factor... The specific meanings and values of the received signal strength indicator r1, ranging correction value d0, etc. can be found in the descriptions of RSSI methods in the existing technology, and will not be elaborated here.
[0048] In practice, the RTT method is used to obtain the ranging result corresponding to a certain frequency point. It can be: (3) Where t1 is the time point when the peer device sends the first ranging signal on this frequency, t2 is the time point when the local device receives the first ranging signal, t3 is the time point when the local device sends a feedback signal to the peer device after receiving the first ranging signal, t4 is the time point when the peer device receives the feedback signal, and c is the speed of light.
[0049] In practice, the local device and the remote device can select frequency points from a preset frequency point list in order of increasing physical channel identifier to send the first ranging signal.
[0050] Alternatively, the local device and the remote device can select frequency points sequentially from a preset frequency point list according to the physical channel identifier from high to low order to send the first ranging signal.
[0051] Alternatively, the local device and the remote device can use a random frequency hopping method to select a frequency from a preset frequency list to send the first ranging signal.
[0052] Since the peer device transmits the first ranging signal at different frequencies, the local device can obtain ranging results obtained using the RSSI method and the RTT method at different frequencies. The arithmetic mean of the ranging results obtained using the RSSI method at different frequencies is used to obtain the second ranging result; the arithmetic mean of the ranging results obtained using the RTT method at different frequencies is used to obtain the third ranging result.
[0053] For example, the peer device transmits the first ranging signal on four frequency points. The local device uses the RSSI method on frequency point 1 to obtain ranging result 1, on frequency point 2 to obtain ranging result 2, on frequency point 3 to obtain ranging result 3, and on frequency point 4 to obtain ranging result 4. The arithmetic mean of ranging result 1, ranging result 2, ranging result 3, and ranging result 4 is calculated to obtain the second ranging result.
[0054] In practical applications, it is known that when the distance between the local device and the remote device is far, the multi-carrier phase difference algorithm has the problem of phase ambiguity, and cannot accurately or even obtain the first ranging result between the local device and the remote device.
[0055] In this embodiment of the invention, the second ranging result and / or the third ranging result can be used as an aid to determine the estimated distance between the local device and the remote device based on the second ranging result and / or the third ranging result; further, based on the estimated distance, the first ranging result calculated by the multi-carrier phase difference algorithm is determined.
[0056] In practical implementation, when the first ranging signal is a narrowband signal (e.g., frequency less than 1MHz), the second ranging result calculated using the RSSI method has higher accuracy and is less susceptible to interference. Therefore, the second ranging result can be used to determine the first ranging result.
[0057] When the first ranging signal is a broadband signal (e.g., with a frequency greater than 1MHz), the bandwidth of the first ranging signal is large and the timestamp is relatively accurate. Therefore, the first ranging result can be determined based on the third ranging result.
[0058] In this embodiment of the invention, the arithmetic mean of the second and third distance measurement results can also be used as the estimated distance to determine the first distance measurement result.
[0059] Step 103: Perform a weighted calculation on the first ranging result, the second ranging result, and the third ranging result to obtain the first distance to the peer device.
[0060] In this embodiment of the invention, weighting coefficients can be configured for the first ranging result, the second ranging result, and the third ranging result, respectively. Specifically, the weighting coefficient corresponding to the first ranging result is the first weighting coefficient, the weighting coefficient corresponding to the second ranging result is the second weighting coefficient, and the weighting coefficient corresponding to the third ranging result is the third weighting coefficient.
[0061] The first distance between the local device and the remote device is obtained by weighting the first distance measurement result, the second distance measurement result, and the third distance measurement result: α×D1+β×D2+γ×D3; where: α is the first weight coefficient, D1 is the first distance measurement result, β is the second weight coefficient, D2 is the second distance measurement result, γ is the third weight coefficient, and D3 is the third distance measurement result; α, β, and γ are all greater than 0 and α+β+r=1.
[0062] In specific implementations, the first weighting coefficient α, the second weighting coefficient β, and the third weighting coefficient γ can be equal or unequal. In some embodiments, the relationship between α, β, and γ can be: α ≥ γ ≥ β.
[0063] In practice, if the first weighting coefficient, the second weighting coefficient, and the third weighting coefficient are not completely equal, then the specific values of the first weighting coefficient, the second weighting coefficient, and the third weighting coefficient can be related to the accuracy of the corresponding ranging method.
[0064] In practical applications, it is known that the multi-carrier phase difference method yields the highest accuracy for the first ranging result, followed by the time-of-arrival method for the third ranging result, and the received signal strength indication method yields the lowest accuracy for the second ranging result. Therefore, the first weighting coefficient can be set to be the largest, the second weighting coefficient to be the smallest, and the third weighting coefficient to be between the first and second weighting coefficients, i.e., α > γ > β.
[0065] In this embodiment of the invention, after obtaining the first distance, the local device can also send the first distance to the peer device. After determining to initiate the ranging operation, the local device can also send a second ranging signal to the peer device, which may carry a second timestamp information. Upon receiving the second ranging signal, the peer device can use the ranging method provided in steps 101 to 103 above to obtain the second distance between itself and the local device. The peer device then sends the second distance to the local device. Based on the first distance and the second distance, the local device determines the final distance between itself and the peer device.
[0066] Continue to refer to Figure 2 Distance measuring device 1 and distance measuring device 2 initiate distance measuring operations. Distance measuring device 2 sends a first distance measuring signal to distance measuring device 1, and distance measuring device 1 sends a second distance measuring signal to distance measuring device 2. Based on steps 101-103, distance measuring device 1 obtains a first distance with distance measuring device 2; distance measuring device 2, based on steps 101-103, obtains a second distance with distance measuring device 1. Distance measuring device 1 sends the obtained first distance to distance measuring device 2, and distance measuring device 2 sends the obtained second distance to distance measuring device 1. Thus, distance measuring device 1 and distance measuring device 2 can obtain the same final distance.
[0067] In this embodiment of the invention, the ranging device may include: a sub1G radio frequency module, a modulation and demodulation module, a phase calculation module, an RSSI calculation module, a distance calculation module, and a control module, etc.
[0068] Reference Figure 3 A schematic diagram of a ranging device according to an embodiment of the present invention is provided. The specific working process of the ranging device 1 described above is described below.
[0069] In practical implementation, the sub1G radio frequency module of ranging device 1 can be used to transmit and receive radio frequency signals in a specified frequency band, and convert the received radio frequency signals into baseband signals. Ranging device 1 can receive a first ranging signal through the sub1G radio frequency module, convert the first ranging signal into a corresponding baseband signal, and output it to the modulation and demodulation module.
[0070] The modulation and demodulation module receives the baseband signal output from the sub1G RF module and performs data demodulation processing to obtain the data carried within it. The data carried in the first ranging signal includes the first timestamp information. The modulation and demodulation module sends the first timestamp information to the distance calculation module.
[0071] The phase calculation module can calculate the phase of the received first ranging signal based on the data demodulated by the modulation and demodulation module, and output the obtained phase of the first ranging signal to the distance calculation module.
[0072] The RSSI calculation module can calculate the RSSI corresponding to the received first ranging signal based on the data demodulated by the modulation and demodulation module, and output the RSSI to the distance calculation module.
[0073] The distance calculation module can calculate a first ranging result based on the phase output by the phase calculation module; it can calculate a second ranging result based on RSSI; and it can calculate a third ranging result based on the first timestamp information. The distance calculation module can then send the first, second, and third ranging results to the control module.
[0074] The control module can obtain the first distance between itself and the peer device based on the first distance measurement result, the second distance measurement result, and the third distance measurement result.
[0075] The sub1G RF module can also receive the baseband signal output from the modem module and convert it into an RF signal before transmitting it. If the baseband signal output by the modem module is determined after the ranging operation is started, then the RF signal transmitted by the sub1G RF module is the second ranging signal.
[0076] The sub1G RF module can also receive RF signals carrying the second distance from the peer device and convert them into corresponding baseband signals. The modulation and demodulation module obtains the second distance from the baseband signal and outputs it to the control module. The control module calculates the arithmetic mean of the first distance and the second distance as the final distance between ranging device 1 and the peer device.
[0077] In practical implementation, the aforementioned distance calculation module can be integrated into the control module. Within the control module, software is used to calculate the first, second, and third distance measurement results.
[0078] In specific implementation, the specific process of obtaining the second distance and the final distance for the ranging device 2 can be referred to the specific process of obtaining the first distance and the final distance for the ranging device 1 described above.
[0079] In summary, in this embodiment of the invention, the local device only needs to receive the first ranging signal to obtain the ranging results from three different ranging methods, and thus obtain the first distance between itself and the remote device. By using three different ranging methods to obtain three different ranging results, and then using these three different ranging results to determine the first distance with the remote device, the accuracy of the obtained first distance can be improved compared to using only a single ranging method.
[0080] In addition, data transmission and reception are performed using the sub-1GHz or sub-1.5GHz bands. Compared to the current ISM bands, the sub-1GHz or sub-1.5GHz bands support fewer wireless communication methods, resulting in less interference with the first ranging signal. Therefore, the accuracy of the obtained first distance can be improved, and the ranging range can be increased.
[0081] Reference Figure 4 The present invention provides a ranging device 40 according to an embodiment of the invention, comprising: a receiving unit 401, a ranging unit 402, and a processing unit 403, wherein: The receiving unit 401 is configured to receive a first ranging signal sent by the peer device after determining that the ranging operation has been started; the first ranging signal includes first timestamp information. The ranging unit 402 is used to obtain a first ranging result based on the first ranging signal by using a multi-carrier phase difference method, to obtain a second ranging result by using a received signal strength indication method, and to obtain a third ranging result by using the first timestamp information and the arrival time method. The processing unit 403 is configured to assign weight parameters to the first ranging result, the second ranging result, and the third ranging result, and to perform a weighted calculation on the first ranging result, the second ranging result, and the third ranging result to obtain a first distance with the peer device.
[0082] In specific implementation, the specific execution process of the above-mentioned receiving unit 401, ranging unit 402 and processing unit 403 can be referred to steps 101 to 103, which will not be elaborated here.
[0083] In specific implementation, the modules / units included in the various devices and products described in the above embodiments can be software modules / units, hardware modules / units, or a combination of both.
[0084] For example, for various devices and products applied to or integrated into a chip, each module / unit can be implemented using hardware methods such as circuits, or at least some modules / units can be implemented using software programs that run on a processor integrated within the chip, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits; for various devices and products applied to or integrated into a chip module, each module / unit can be implemented using hardware methods such as circuits, and different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components of the chip module, or at least some modules / units can be implemented using hardware methods such as circuits. The components can be implemented using software programs that run on the processor integrated within the chip module. The remaining (if any) modules / units can be implemented using hardware methods such as circuits. For various devices and products applied to or integrated into the terminal, each of its components / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or in different components within the terminal. Alternatively, at least some modules / units can be implemented using software programs that run on the processor integrated within the terminal, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits.
[0085] This invention also provides a computer-readable storage medium, which is a non-volatile or non-transient storage medium, storing a computer program thereon. When the computer program is run by a processor, it executes the steps of the ranging method provided in any of the above embodiments.
[0086] This invention also provides another ranging device, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor runs the computer program, it executes the steps of the ranging method provided in any of the above embodiments.
[0087] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include ROM, RAM, disk, or optical disk, etc.
[0088] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.
Claims
1. A distance measurement method, characterized in that, include: After confirming the start of the ranging operation, the system receives a first ranging signal sent by the peer device; the first ranging signal includes a first timestamp information. Based on the first ranging signal, a first ranging result is obtained by using a multi-carrier phase difference method, a second ranging result is obtained by using a received signal strength indication method, and a third ranging result is obtained by using the first timestamp information and the arrival time method. Weight parameters are configured for the first ranging result, the second ranging result, and the third ranging result, and a weighted calculation is performed on the first ranging result, the second ranging result, and the third ranging result to obtain the first distance with the peer device.
2. The ranging method as described in claim 1, characterized in that, The step of performing a weighted calculation on the first ranging result, the second ranging result, and the third ranging result to obtain the first distance with the peer device includes: The first distance is: α×D1+β×D2+γ×D3; Wherein: α is the first weighting coefficient, D1 is the first ranging result, β is the second weighting coefficient, D2 is the second ranging result, γ is the third weighting coefficient, and D3 is the third ranging result; α, β, and γ are all greater than 0 and α+β+r=1.
3. The ranging method as described in claim 2, characterized in that, α≥γ≥β.
4. The ranging method as described in claim 1, characterized in that, After obtaining the first ranging result, the following is also included: Send the first distance to the peer device; and receive a second distance sent by the peer device, the second distance being obtained by the peer device based on a second ranging signal, and the second ranging signal being sent after determining to start the ranging operation; Based on the first distance and the second distance, the final distance between the device and the peer device is determined.
5. The ranging method as described in claim 1, characterized in that, Also includes: Based on the second ranging result and / or the third ranging result, determine the estimated distance between the device and the peer device; Based on the estimated distance, the first ranging result is calibrated.
6. The ranging method as described in claim 5, characterized in that, Determining the estimated distance to the peer device based on the second ranging result and / or the third ranging result includes: The first ranging signal is a narrowband signal, and the estimated distance is determined based on the second ranging result; The first ranging signal is a broadband signal, and the estimated distance is determined based on the third ranging result.
7. The ranging method as described in claim 1, characterized in that, The second ranging result includes: the arithmetic mean of ranging results obtained at different frequency points using the received signal strength indication method; the third ranging result includes: the arithmetic mean of ranging results obtained at different frequency points based on the first timestamp information and the arrival time method.
8. A ranging device, characterized in that, include: The receiving unit is used to receive the first ranging signal sent by the peer device after determining that the ranging operation has been started; The first ranging signal includes first timestamp information; The ranging unit is used to obtain a first ranging result based on the first ranging signal by using a multi-carrier phase difference method, a second ranging result by using a received signal strength indication method, and a third ranging result by using the first timestamp information and the arrival time method. The processing unit is configured to assign weight parameters to the first ranging result, the second ranging result, and the third ranging result, and to perform a weighted calculation on the first ranging result, the second ranging result, and the third ranging result to obtain a first distance with the peer device.
9. A computer-readable storage medium, wherein the computer-readable storage medium is a non-volatile storage medium or a non-transient storage medium, and a computer program is stored thereon, characterized in that, When the computer program is run by the processor, it performs the steps of the ranging method according to any one of claims 1 to 7.
10. A ranging device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor runs the computer program, it performs the steps of the ranging method according to any one of claims 1 to 7.