A ranging method and apparatus
By acquiring and filtering sampled data from multiple antenna channels, and then fitting the data, the problem of ranging instability caused by frequency-selective fading of the signal was solved, achieving higher accuracy and robustness in ranging.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2021-11-02
- Publication Date
- 2026-07-03
AI Technical Summary
Existing ranging methods are susceptible to frequency-selective fading during signal propagation, resulting in poor robustness and unstable ranging results.
By acquiring sampling data from multiple antenna channels, usable antenna channels are selected, and a piecewise linear algorithm is used to merge the data for fitting, calculating the distance between devices to resist the effects of signal fading.
This improves the accuracy and robustness of distance measurement, ensuring the accuracy and stability of distance measurement results.
Smart Images

Figure CN116068490B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more particularly to a ranging method and apparatus. Background Technology
[0002] Ranging technology is increasingly used in daily life, bringing many conveniences and changes. Currently, one ranging method involves bidirectional frequency hopping and interactive signal measurement at multiple frequencies. Since the measurement signal undergoes phase changes during propagation, the distance can be calculated by relating the phase difference between different frequencies to the distance. However, a major drawback of this method is its susceptibility to frequency-selective fading, resulting in poor robustness. Summary of the Invention
[0003] This application provides a ranging method and apparatus, which can improve the robustness of ranging results.
[0004] In a first aspect, a ranging method is provided, the method comprising: acquiring first measurement information and second measurement information, wherein the first measurement information includes multiple sets of sampled data obtained by sampling back-echo measurement signals received by a first device through multiple antenna channels of a single antenna, and the second measurement information includes multiple sets of sampled data obtained by a second device through measurement signals received by a second device through multiple antenna channels of each of multiple antennas; and determining the distance between the first device and the second device based on the first measurement information and the second measurement information.
[0005] For example, the ranging method can be applied to a first device, a second device, or a third device. The third device can be a device independent of the first and second devices.
[0006] For example, the ranging method can be specifically applied to a unit with processing function in a first device, a second device, or a third device.
[0007] In the above technical solution, data collected from multiple antennas can be combined to measure the distance between the first and second devices, which not only ensures that the ranging delay meets the requirements, but also improves the accuracy and robustness of the ranging.
[0008] In conjunction with the first aspect, in some implementations of the first aspect, the first measurement information further includes an antenna identifier and an antenna channel identifier corresponding to each set of sampled data obtained by the first device, and the second measurement information further includes an antenna identifier and an antenna channel identifier corresponding to each set of sampled data obtained by the second device. Determining the distance between the first device and the second device based on the first measurement information and the second measurement information includes: filtering available antenna channels of the first device based on the first measurement information, and filtering available antenna channels of the second device based on the second measurement information, wherein the available antenna channels are non-frequency selective fading channels; merging data collected by the first device and the second device on the same available antenna channel to obtain target sampled data; fitting the target sampled data to obtain at least one target fitting curve according to a sequence piecewise linear algorithm; and determining the distance between the first device and the second device based on the at least one target fitting curve.
[0009] The available antenna channel can be understood as: the amplitude of the measurement signal transmitted through the available antenna channel will not experience abnormal attenuation and / or the phase will not experience significant distortion.
[0010] In the above technical solution, considering that different antennas have different fading channels, the available antenna channels of the first device are selected based on the first measurement information, and the distance between the first device and the second device is calculated based on the sampled data using a piecewise linear algorithm. This can resist the sampling data errors caused by partial channel fading, thereby further improving the accuracy of ranging.
[0011] In conjunction with the first aspect, in some implementations of the first aspect, the step of filtering out the available antenna channels of the first device based on the first measurement information includes: obtaining the phase value corresponding to the data collected by the first device through each antenna channel of the single antenna based on the first measurement information; performing linear fitting on the phase value corresponding to the data collected by the first device through each antenna channel of the single antenna to obtain a fitting curve of the first device with respect to the phase value corresponding to the data collected by each antenna channel; and filtering out the available antenna channels of the first device based on the slope of the fitting curve of the first device with respect to the phase value corresponding to the data collected by each antenna channel.
[0012] For example, if the slope of the fitting curve of the phase value corresponding to the data collected by the first device with respect to the first antenna channel does not change much, the first antenna channel can be considered as a usable antenna channel of the first device.
[0013] The embodiments of this application do not limit the number of available antenna channels of the first device.
[0014] In conjunction with the first aspect, in some implementations of the first aspect, the step of filtering out the available antenna channels of the first device based on the first measurement information includes: obtaining the amplitude corresponding to the data collected by the first device through each antenna channel of the single antenna based on the first measurement information; calculating the average value of the amplitude corresponding to the data collected by the first device through each antenna channel of the single antenna; and filtering out the available antenna channels of the first device based on the average value of the amplitude corresponding to the data collected by the first device through each antenna channel of the single antenna.
[0015] In the above technical solution, considering the consistency between channel fading and signal strength, the amplitude corresponding to the data collected by each antenna channel can also be used to filter available antenna channels.
[0016] In conjunction with the first aspect, in some implementations of the first aspect, the step of filtering out the available antenna channels of the second device based on the second measurement information includes: obtaining, based on the second measurement information, the phase value corresponding to the data collected by the second device through each antenna channel of the multi-antenna system; obtaining a fitting curve of the second device with respect to the phase value of the data collected by the second device through each antenna channel of the multi-antenna system; and filtering out the available antenna channels of the second device based on the slope of the fitting curve of the second device with respect to the phase value of the data collected by the second device through each antenna channel.
[0017] In conjunction with the first aspect, in some implementations of the first aspect, the step of filtering out the available antenna channels of the second device based on the second measurement information includes: obtaining the amplitude corresponding to the data collected by the second device through each antenna channel of the multi-antenna system based on the second measurement information; calculating the average value of the amplitude corresponding to the data collected by the second device through each antenna channel of the multi-antenna system; and filtering out the available antenna channels of the second device based on the average value of the amplitude corresponding to the data collected by the second device through each antenna channel of the multi-antenna system.
[0018] In conjunction with the first aspect, in some implementations of the first aspect, merging the data collected by the first device and the second device on the same available antenna channel to obtain target sampling data includes: adding the phase values corresponding to the data collected by the first device and the second device on the same available antenna channel to obtain the target sampling data.
[0019] In conjunction with the first aspect, in some implementations of the first aspect, when there are multiple target fitting curves, determining the distance between the first device and the second device based on the at least one target fitting curve includes: determining the first target fitting curve among the multiple target fitting curves as the optimal target fitting curve, wherein the average amplitude of the data collected on the multiple antenna channels corresponding to the first target fitting curve is the largest; and determining the distance between the first device and the second device based on the optimal target fitting curve.
[0020] By employing the above technical solution, when there are multiple target fitting curves, the optimal target fitting curve is selected based on the signal strength of the measurement signals transmitted through each antenna channel. The distance between the first and second devices is then determined based on the optimal target fitting curve. This further improves the accuracy of distance measurement.
[0021] In conjunction with the first aspect, in some implementations of the first aspect, the frequency points of the measurement signals transmitted by the multiple antenna channels corresponding to one of the multiple antennas are partially the same as or different from the frequency points of the measurement signals transmitted by the multiple antenna channels corresponding to another of the multiple antennas.
[0022] In conjunction with the first aspect, in some implementations of the first aspect, the frequency points of the multiple measurement signals transmitted by the multiple antenna channels corresponding to each antenna are not the same.
[0023] Secondly, a communication method is provided, the method being applied to a second device, the second device including multiple antennas, each of the multiple antennas corresponding to multiple antenna channels, the method including: receiving a measurement signal sent by a first device through each of the multiple antenna channels corresponding to each antenna according to a time-division multiple operation mode of the multiple antennas and a frequency hopping mode of each antenna; sampling the measurement signal received by each antenna channel to obtain multiple sets of sampled data, the multiple sets of sampled data being used to determine the distance between the first device and the second device.
[0024] The multi-antenna time-division operating mode can be understood as the specific operating time of each antenna.
[0025] The frequency hopping mode of each antenna can be understood as the specific frequency point at which the measurement signal is transmitted on each antenna.
[0026] For example, the second device includes a high-speed switch, and the method further includes controlling the multi-antenna time-division operation via the high-speed switch.
[0027] In the above technical solution, the second device can measure the measurement signal through multiple antennas to obtain multiple sets of sampling data. This data can then be combined with the data collected from the multiple antennas to measure the distance between the first and second devices. This not only ensures that the ranging delay meets the requirements but also improves the accuracy and robustness of the ranging.
[0028] In conjunction with the second aspect, in some implementations of the second aspect, the frequency points of the measurement signals transmitted by the multiple antenna channels corresponding to one of the multiple antennas are partially the same as or different from the frequency points of the measurement signals transmitted by the multiple antenna channels corresponding to another of the multiple antennas.
[0029] In conjunction with the second aspect, in some implementations of the second aspect, the frequency points of the multiple measurement signals transmitted by the multiple antenna channels corresponding to each antenna are not the same.
[0030] In conjunction with the second aspect, in some implementations of the second aspect, the method further includes: sending echo measurement signals to the first device through the antenna channels of the received measurement signals, according to the multi-antenna time-division operating mode and the frequency hopping mode of each antenna.
[0031] In conjunction with the second aspect, in some implementations of the second aspect, the method further includes: acquiring first measurement information and second measurement information, wherein the first measurement information includes multiple sets of sampled data obtained by sampling the back-echo measurement signals received by the first device through multiple antenna channels of a single antenna, and the second measurement information includes multiple sets of sampled data obtained by the second device through the measurement signals received by the second device through multiple antenna channels of each of the multiple antennas; and determining the distance between the first device and the second device based on the first measurement information and the second measurement information.
[0032] For example, the ranging method can be specifically applied to a unit with processing capabilities in a second device.
[0033] For example, the second device can store (or cache) multiple sets of sampled data in the storage unit (or cache unit) of the second device. At this time, the second device can obtain multiple sets of sampled data, i.e., the second measurement information, from the storage unit (or cache unit) of the second device.
[0034] In the above technical solution, the second device can combine data collected from multiple antennas to measure the distance between the first and second devices, which not only ensures that the ranging delay meets the requirements, but also improves the accuracy and robustness of the ranging.
[0035] In conjunction with the second aspect, in some implementations of the second aspect, the first measurement information further includes an antenna identifier and an antenna channel identifier corresponding to each set of sampled data obtained by the first device, and the second measurement information further includes an antenna identifier and an antenna channel identifier corresponding to each set of sampled data obtained by the second device. Determining the distance between the first device and the second device based on the first measurement information and the second measurement information includes: filtering available antenna channels of the first device based on the first measurement information, and filtering available antenna channels of the second device based on the second measurement information, wherein the available antenna channels are non-frequency selective fading channels; merging data collected by the first device and the second device on the same available antenna channel to obtain target sampled data; fitting the target sampled data to obtain at least one target fitting curve according to a sequence piecewise linear algorithm; and determining the distance between the first device and the second device based on the at least one target fitting curve.
[0036] In the above technical solution, considering that different antennas have different fading channels, the second device filters out the available antenna channels of the first device based on the first measurement information, and calculates the distance between the first device and the second device based on the sampled data using a piecewise linear algorithm. This can resist the sampling data errors caused by partial channel fading, and further improve the accuracy of ranging.
[0037] In conjunction with the second aspect, in some implementations of the second aspect, the step of filtering out the available antenna channels of the first device based on the first measurement information includes: obtaining the phase value corresponding to the data collected by the first device through each antenna channel of the single antenna based on the first measurement information; performing linear fitting on the phase value corresponding to the data collected by the first device through each antenna channel of the single antenna to obtain a fitting curve of the first device with respect to the phase value corresponding to the data collected by each antenna channel; and filtering out the available antenna channels of the first device based on the slope of the fitting curve of the first device with respect to the phase value corresponding to the data collected by each antenna channel.
[0038] For example, if the slope of the fitting curve of the phase value corresponding to the data collected by the first device with respect to the first antenna channel does not change much, the first antenna channel can be considered as a usable antenna channel of the first device.
[0039] The embodiments of this application do not limit the number of available antenna channels of the first device.
[0040] In conjunction with the second aspect, in some implementations of the second aspect, the step of filtering out the available antenna channels of the first device based on the first measurement information includes: obtaining the amplitude corresponding to the data collected by the first device through each antenna channel of the single antenna based on the first measurement information; calculating the average value of the amplitude corresponding to the data collected by the first device through each antenna channel of the single antenna; and filtering out the available antenna channels of the first device based on the average value of the amplitude corresponding to the data collected by the first device through each antenna channel of the single antenna.
[0041] In the above technical solution, considering the consistency between channel fading and signal strength, the amplitude corresponding to the data collected by each antenna channel can also be used to filter available antenna channels.
[0042] In conjunction with the second aspect, in some implementations of the second aspect, the step of filtering out the available antenna channels of the second device based on the second measurement information includes: obtaining, based on the second measurement information, the phase value corresponding to the data collected by the second device through each antenna channel of the multi-antenna system; obtaining a fitting curve of the second device with respect to the phase value of the data collected by the second device through each antenna channel of the multi-antenna system; and filtering out the available antenna channels of the second device based on the slope of the fitting curve of the second device with respect to the phase value of the data collected by the second device through each antenna channel.
[0043] In conjunction with the second aspect, in some implementations of the second aspect, the step of filtering out the available antenna channels of the second device based on the second measurement information includes: obtaining the amplitude corresponding to the data collected by the second device through each antenna channel of the multi-antenna system based on the second measurement information; calculating the average value of the amplitude corresponding to the data collected by the second device through each antenna channel of the multi-antenna system; and filtering out the available antenna channels of the second device based on the average value of the amplitude corresponding to the data collected by the second device through each antenna channel of the multi-antenna system.
[0044] In conjunction with the second aspect, in some implementations of the second aspect, merging the data collected by the first device and the second device on the same available antenna channel to obtain target sampling data includes: adding the phase values corresponding to the data collected by the first device and the second device on the same available antenna channel to obtain the target sampling data.
[0045] In conjunction with the second aspect, in some implementations of the second aspect, when there are multiple target fitting curves, determining the distance between the first device and the second device based on the at least one target fitting curve includes: determining the first target fitting curve among the multiple target fitting curves as the optimal target fitting curve, wherein the average amplitude of the data collected on the multiple antenna channels corresponding to the first target fitting curve is the largest; and determining the distance between the first device and the second device based on the optimal target fitting curve.
[0046] Thirdly, a communication device is provided for executing the ranging method provided in the first aspect. Specifically, the device may include units and / or modules for executing the ranging method provided in the first aspect or any of the above implementations of the first aspect, such as a processing unit and / or a communication unit.
[0047] In one implementation, the device is a first device, a second device, or a third device. When the device is a first device, a second device, or a third device, the communication unit can be a transceiver, or an input / output interface; the processing unit can be at least one processor. Optionally, the transceiver can be a transceiver circuit. Optionally, the input / output interface can be an input / output circuit.
[0048] In another implementation, the device is a chip, chip system, or circuit in a first device, second device, or third device. When the device is a chip, chip system, or circuit in a first device, second device, or third device, the communication unit may be an input / output interface, interface circuit, output circuit, input circuit, pin, or related circuit on the chip, chip system, or circuit; the processing unit may be at least one processor, processing circuit, or logic circuit.
[0049] Fourthly, a communication apparatus is provided for executing the communication method provided in the second aspect. Specifically, the apparatus may include units and / or modules for executing the communication method provided in the second aspect or any of the above-described implementations of the second aspect, such as processing units and / or communication units.
[0050] In one implementation, the device is a second device. When the device is a second device, the communication unit can be a transceiver or an input / output interface; the processing unit can be at least one processor. Optionally, the transceiver can be a transceiver circuit. Optionally, the input / output interface can be an input / output circuit.
[0051] In another implementation, the device is a chip, chip system, or circuit in a second device. When the device is a chip, chip system, or circuit in a second device, the communication unit can be an input / output interface, interface circuit, output circuit, input circuit, pin, or related circuit on the chip, chip system, or circuit; the processing unit can be at least one processor, processing circuit, or logic circuit.
[0052] Fifthly, a communication device is provided, comprising: a memory for storing a program; and at least one processor for executing the computer program or instructions stored in the memory to perform the ranging method provided in the first aspect or any of the above-described implementations of the first aspect.
[0053] In one implementation, the device is a first device, a second device, or a third device.
[0054] In another implementation, the device is a chip, chip system, or circuit in a first device, a second device, or a third device.
[0055] A sixth aspect provides a communication device comprising: a memory for storing a program; and at least one processor for executing the computer program or instructions stored in the memory to perform the communication method provided in the second aspect or any of the above implementations of the second aspect.
[0056] In one implementation, the device is a second device.
[0057] In another implementation, the device is a chip, chip system, or circuit in a second device.
[0058] In a seventh aspect, this application provides a processor for executing the ranging method provided in the first aspect above, or for executing the communication method provided in the second aspect above.
[0059] Unless otherwise specified, or if it does not contradict its actual function or internal logic in the relevant description, the transmission and acquisition / reception operations involved in the processor can be understood as processor output and reception, input and other operations, or as transmission and reception operations performed by radio frequency circuits and antennas. This application does not limit them in this regard.
[0060] Eighthly, a computer-readable storage medium is provided, the computer-readable medium storing program code for execution by a device, the program code including a ranging method provided for performing the first aspect or any of the above-described implementations of the first aspect, or the program code including a communication method provided for performing the second aspect or any of the above-described implementations of the second aspect.
[0061] Ninthly, a computer program product containing instructions is provided, which, when run on a computer, causes the computer to execute the ranging method provided by the first aspect or any of the above-described implementations of the first aspect, or causes the computer to execute the communication method provided by the second aspect or any of the above-described implementations of the second aspect.
[0062] In a tenth aspect, a chip is provided, the chip including a processor and a communication interface, the processor reading instructions stored in a memory through the communication interface to execute the ranging method provided by the first aspect or any of the above-described implementations of the first aspect, or to execute the communication method provided by the second aspect or any of the above-described implementations of the second aspect.
[0063] Optionally, as one implementation, the chip further includes a memory storing computer programs or instructions. The processor is used to execute the computer programs or instructions stored in the memory. When the computer programs or instructions are executed, the processor is used to execute the ranging method provided by the first aspect or any of the above implementations of the first aspect, or the processor is used to execute the communication method provided by the second aspect or any of the above implementations of the second aspect.
[0064] Eleventhly, a communication system is provided, comprising a first device, a second device, and a third device, wherein the third device is used to perform the ranging method provided by the first aspect or any of the above implementations of the first aspect.
[0065] In a twelfth aspect, a communication system is provided, comprising a first device and a second device, the second device being configured to perform the communication method provided in the second aspect or any of the above implementations of the second aspect. Attached Figure Description
[0066] Figure 1 A schematic diagram of the structure of an example device provided in an embodiment of this application is shown.
[0067] Figure 2 A schematic diagram showing the measurement results of the two antennas is presented.
[0068] Figure 3 This illustration shows a schematic diagram of the channels corresponding to each antenna of an example device provided in an embodiment of this application.
[0069] Figure 4 A schematic flowchart of the ranging method provided in the embodiments of this application is shown.
[0070] Figure 5 This illustration shows a schematic diagram of a first device and a second device performing a first signal interaction according to an embodiment of this application.
[0071] Figure 6 This illustration shows a timing diagram of a first device and a second device transmitting and receiving signals according to an embodiment of this application.
[0072] Figure 7 A schematic flowchart illustrating an example of calculating the distance between a first device and a second device, provided in an embodiment of this application, is shown.
[0073] Figure 8 This illustration shows a phase fitting diagram of a signal transmitted via channel identifier 1-40 on antenna A, as provided in an embodiment of this application.
[0074] Figure 9 This illustration shows an example of amplitude fitting of a signal transmitted via channel identifier 1-40 on antenna A, according to an embodiment of this application.
[0075] Figure 10 A schematic diagram of linear fitting of multiple sets of distances between a first device and a second device is shown.
[0076] Figure 11 A schematic diagram of linear fitting of multiple sets of distances between another first device and a second device is shown.
[0077] Figure 12 A schematic flowchart of the ranging method provided in the embodiments of this application is shown.
[0078] Figure 13 A schematic flowchart of the communication method provided in an embodiment of this application is shown.
[0079] Figure 14 A schematic structural diagram of the device provided in the embodiments of this application is shown.
[0080] Figure 15 A schematic structural diagram of the device provided in the embodiments of this application is shown. Detailed Implementation
[0081] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0082] The technical solutions of this application embodiment can be applied to various communication systems, such as: Global System for Mobile Communication (GSM) system, Code Division Multiple Access (CDMA) system, Wideband Code Division Multiple Access (WCDMA) system, General Packet Radio Service (GPRS), Long Term Evolution (LTE) system, LTE Frequency Division Duplex (FDD) system, LTE Time Division Duplex (TDD) system, Universal Mobile Telecommunication System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX) communication system, future 5th generation (5G) systems, or new radio (NR), etc.
[0083] The device in the embodiments of this application can be a terminal device. This terminal device can refer to user equipment, access terminal, user unit, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent, or user equipment. The terminal device can also be a cellular phone, cordless phone, session initiation protocol (SIP) phone, wireless local loop (WLL) station, personal digital assistant (PDA), handheld device with wireless communication capabilities, computing device or other processing device connected to a wireless modem, vehicle-mounted device, wearable device, terminal device in future 5G networks, or terminal device in future evolved public land mobile networks (PLMNs), etc. The embodiments of this application do not limit this to these categories.
[0084] For example, Figure 1 A schematic diagram of the structure of a terminal device 100 provided in an embodiment of this application is shown.
[0085] For example, such as Figure 1As shown, the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0086] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0087] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0088] The controller can serve as the central nervous system and command center of the terminal device 100. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0089] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0090] In some embodiments, processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). The I2S interface can be used for audio communication. In some embodiments, processor 110 may include multiple I2S buses. Processor 110 can be coupled to audio module 170 via the I2S bus to realize communication between processor 110 and audio module 170. The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. The GPIO interface can be configured via software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The USB interface 130 is an interface compliant with the USB standard specification, specifically a Mini USB interface, a MicroUSB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used for data transfer between the terminal device 100 and peripheral devices.
[0091] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.
[0092] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via a USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the terminal device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141. The power management module 141 connects the battery 142, the charging management module 140, and the processor 110.
[0093] The wireless communication function of the terminal device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0094] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use on the terminal device 100.
[0095] In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0096] The wireless communication module 160 can provide solutions for wireless communication applications on the terminal device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc.
[0097] In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology.
[0098] Terminal device 100 implements display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0099] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), or a display panel made of materials selected from organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), minimized, microLEDs, micro-OLEDs, or quantum dot light-emitting diodes (QLEDs). In some embodiments, the terminal device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0100] Terminal device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0101] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the terminal device 100 by running the instructions stored in the internal memory 121.
[0102] Terminal device 100 can implement audio functions, such as music playback and recording, through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, and an application processor. The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. The receiver 170B, also called a "handpiece," is used to convert audio electrical signals into sound signals. The microphone 170C, also called a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. The headphone jack 170D is used to connect wired headphones.
[0103] A pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 180A can be located on the display screen 194. A gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100. A barometric pressure sensor 180C is used to measure barometric pressure. In some embodiments, the terminal device 100 calculates altitude using the barometric pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation. An accelerometer sensor 180E can detect the magnitude of acceleration of the terminal device 100 in various directions (generally three axes). A distance sensor 180F is used to measure distance. A fingerprint sensor 180H is used to collect fingerprints. A touch sensor 180K, also known as a "touch panel," can be located on the display screen 194. The touch sensor 180K and the display screen 194 together form a touch screen, also known as a "touchscreen." A bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from vibrating bone fragments in the human vocal cords. The 180M bone conduction sensor can also contact the human pulse and receive blood pressure signals.
[0104] Buttons 190 include a power button, volume buttons, etc. A motor 191 can generate vibration feedback. An indicator 192 can be an indicator light, used to indicate charging status, battery level changes, and also to indicate messages, missed calls, notifications, etc. A SIM card interface 195 is used to connect a SIM card.
[0105] Currently, commonly used ranging methods can be broadly categorized into three types: signal strength-based ranging methods, time-based ranging methods, and phase-based ranging methods. In signal strength-based ranging methods, the signal attenuates continuously with the propagation distance, and the degree of attenuation can be roughly described by the distance fading formula. This method is severely affected by the environment, especially indoors where multipath propagation, non-line-of-sight interference, and electromagnetic interference are prevalent, resulting in a very large variation in the measured signal strength for the same distance. Time-based ranging methods measure arrival time, time difference of arrival, or round-trip time to achieve the ranging objective. However, this method has extremely high hardware requirements, generally requiring nanosecond-level clock precision and a large signal bandwidth to ensure acceptable accuracy—both of which are difficult for general communication equipment to meet. Phase-based methods calculate distance by measuring the phase shift of the signal during flight. This method has lower hardware precision requirements, can be implemented on low-cost Bluetooth devices, and is much more robust than signal strength-based methods. Therefore, phase-based ranging methods are a more ideal choice for ranging.
[0106] Phase-based ranging methods require bidirectional frequency hopping across multiple frequencies to measure the phase change of the signal during propagation. A correlation exists between the phase difference at different frequencies and the distance, and the transmission and reception distance is calculated using the congruence theorem. However, a major drawback of this method is its susceptibility to frequency-selective fading, resulting in poor stability. Typically, in a single measurement, partial channel fading can cause severe signal errors, rendering the signal unusable. For example... Figure 2 This chart shows the measurement results for two antennas (Antenna 1 and Antenna 2). The horizontal axis represents the channel index (i.e., the number of channels) for the frequency hopping measurement, and the vertical axis represents the phase after unwinding. For example... Figure 2 As shown, antenna 1 is in Figure 2 The channel corresponding to the ellipse on the left side of the image shows fading. Antenna 2 is... Figure 2 The channel corresponding to the ellipse on the right side of the image shows fading. This indicates that both antennas experienced fading on parts of the channel. Furthermore, the fading channels differ between the different antennas.
[0107] Therefore, this application provides a ranging method that can improve the robustness of ranging results.
[0108] It should be understood that the channel involved in this application can also be referred to as an antenna channel.
[0109] This ranging method can be applied to communication systems comprising at least two devices. One device (e.g., the second device described below) is configured with multiple antennas, and the other device (e.g., the first device described below) is configured with one antenna.
[0110] This application does not limit the connection method between the two devices. For example, the two devices can be connected via Bluetooth.
[0111] It should be noted that when two devices are connected via Bluetooth to measure distance between them, this ranging method retains many of the advantages of Bluetooth ranging, such as low power consumption, low cost, and high availability.
[0112] In the following embodiments, the ranging method provided in this application is described using a first device as the active party and a second device as the passive party. It should be understood that in some embodiments, the first device can be the passive party and the second device can be the active party. The active party can be understood as the party that sends the ranging request. The passive party can be understood as the party that receives the ranging request. And / or, the active party can be understood as the party that sends the signal first. The passive party can be understood as the party that sends the signal later, that is, the party that sends a return signal after receiving the signal.
[0113] In the following embodiments, the ranging method provided in the embodiments of this application is described using the example of a first device configured with a first antenna and a second device configured with a second antenna and a third antenna.
[0114] In addition, the second device is also equipped with a switching mode. After the second device completes signal acquisition on the channel corresponding to the current antenna, it switches to another antenna to continue signal acquisition until signal acquisition on all channels is completed. Each channel corresponds to a frequency point, meaning that signals transmitted through different channels have different frequencies.
[0115] The channels corresponding to different antennas can partially overlap (intersect), completely overlap, or not overlap at all (orthogonal). This application does not limit this.
[0116] Figure 3 This is a schematic diagram of the channels corresponding to each antenna of an example device provided in an embodiment of this application. For example... Figure 3 As shown, if the device is configured with antennas a, b, and c, the channels corresponding to antennas a, b, and c can be orthogonal or intersecting.
[0117] In the embodiments of the application, the number of channels corresponding to each antenna is not limited.
[0118] To improve the accuracy of ranging measurements, each antenna is typically configured with multiple channels.
[0119] In the following embodiments, the ranging method provided in this application is described using the second antenna of the second device as the first channel and the second channel, and the third antenna as the second and third channels.
[0120] The ranging method provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0121] Figure 4 This is a schematic flowchart of the ranging method 300 provided in an embodiment of this application.
[0122] S310, the first device sends a ranging request message to the second device.
[0123] Accordingly, the second device receives the ranging request information from the first device.
[0124] The ranging request information is used to indicate the event number of a future event. This event number can be understood as the event's identifier.
[0125] When the event number is reached, that is, when the event arrives, both parties, namely the sender and receiver of the event number, will begin the interaction of constant tone extension (CTE) signals, i.e., S303.
[0126] It should be understood that the first signal, the second signal, and the third signal transmitted between the first device and the second device as described below are all CTE signals.
[0127] Optionally, after S301, method 300 may also include S302.
[0128] S320, the second device sends a response message to the first device regarding the ranging request information.
[0129] Accordingly, the first device receives a response to the ranging request information sent by the second device.
[0130] The response information to the ranging request information is used to indicate that the second device has received the ranging request information and / or that the second device is ready to receive the signal.
[0131] Following S320, the first device and the second device need to transmit measurement signals on multiple channels. For example, the specific interaction process of the first device and the second device transmitting measurement signals on multiple channels may include S330 to S360.
[0132] For ease of description, the measurement signal will be simplified to "signal" in the following text.
[0133] S330, the first device and the second device begin the first signal interaction.
[0134] Figure 5 This is a schematic diagram illustrating the first signal interaction between a first device and a second device, as provided in an embodiment of this application. Figure 5 As shown, S330 includes S331 to S336. S331 to S336 will be described in detail below.
[0135] S331, the first device sends a first mixing signal to the second device.
[0136] For example, the first device uses a first antenna to send a first mixed signal to the second device through a first channel.
[0137] To ensure that the initial phase difference of the signals transmitted from the first device to the second device is the same, a first oscillator can be set in the first device and kept oscillating continuously. The first device inputs a first signal into the first oscillator to modulate the first signal to obtain a first mixed signal.
[0138] At this time, if the phase of the first signal on the first device side is 0, then the phase of the first mixing signal is the phase generated by the first oscillator.
[0139] In some embodiments, in order to ensure that the frequency of the signal transmitted and the frequency of the received echo signal are the same on the first device side, a corresponding device, such as a phase-locked loop, can generally be set in the first device.
[0140] Accordingly, the second device receives the first mixing signal sent by the first device.
[0141] Specifically, the second device uses a second antenna to receive the first mixing signal sent by the first device through the first channel.
[0142] Similarly, in order to ensure that the initial phase difference of the signals transmitted between the second device and the first device is the same, a second oscillator can be set in the second device and the second oscillator can be kept oscillating continuously.
[0143] S332, the second device inputs the first mixing signal into the second oscillator to demodulate the first mixing signal to obtain the second signal.
[0144] For example, if the phase of the first signal on the first device side is 0, and the initial phase generated by the first oscillator is θ1, then the phase of the second signal obtained by the second device is φ. T1 It satisfies the following formula (1):
[0145]
[0146] Where θ1 is the initial phase of the first mixing signal sent by the first device, and θ2 is the initial phase generated by the second oscillator of the second device. k1 Let d be the frequency of the first signal, d be the distance between the first device and the second device, c be the speed at which the first signal propagates in a vacuum or medium, and Δt be the clock deviation between the first device and the second device.
[0147] S333, the second device samples the second signal to obtain a first set of sampled data on the second device side. The first set of sampled data on the second device side includes one or more data samples obtained from the second signal.
[0148] At this point, the second device can store the first set of sampled data from the second device side.
[0149] S334, the second device sends the first echo mixing signal to the first device.
[0150] For example, the second device uses a second antenna to send a first echo mixer signal to the first device through a first channel.
[0151] Specifically, the second device uses a second oscillator to modulate the second signal to obtain a first echo-mixed signal, and uses a second antenna to send the first echo-mixed signal to the first device through the first channel.
[0152] Similarly, in some embodiments, to ensure that the frequency of the signal received by the second device is the same as that of the transmitted echo signal, a corresponding device, such as a phase-locked loop, can generally be set in the second device. In this way, the frequency points of the first echo mixer signal and the first mixer signal are consistent.
[0153] Accordingly, the first device receives the first echo mixing signal sent by the second device.
[0154] For example, the first device uses a first antenna to receive a first echo-mixed signal sent by the second device through a first channel.
[0155] S335, the first device inputs the first echo mixer signal into the first oscillator to demodulate the first echo mixer signal to obtain the third signal.
[0156] For example, the phase of the third signal obtained by the first device is φ R1 It satisfies the following formula (2):
[0157]
[0158] S336, the first device samples the third signal to obtain a first set of sampled data on the first device side. The first set of sampled data on the first device side includes one or more data samples obtained from the third signal.
[0159] At this time, the first device can store the first set of sampled data from the first device side.
[0160] After S330, the first and second devices begin the second signal interaction, namely S340.
[0161] At this point, the second signal interaction between the first and second devices is similar to the first signal interaction, except that: 1. The first device uses the first antenna to send the first mixed signal to the second device through the second channel. 2. The second device uses the second antenna to receive the first mixed signal sent by the first device through the second channel. 3. After the second device sends the first echo signal to the first device, since all signals for all channels corresponding to the second antenna have been collected, the second device needs to switch the receiving antenna from the second antenna to the third antenna. Other details can be found in the descriptions of S331 to S336 above, and will not be repeated here.
[0162] A high-speed switch can be set in the second device to control the time-division operation between different antennas.
[0163] It should be understood that, in the embodiments of this application, the antenna switching time is between the time of sampling data and the time of transmitting signals.
[0164] The embodiments of this application do not limit the specific form of the time.
[0165] For ease of description, the data collected by the second device will be referred to as the second set of data collected by the second device side, and the data collected by the first device will be referred to as the second set of data collected by the first device side.
[0166] After the first device and the second device complete the second signal exchange, the first device and the second device begin the third signal exchange, namely S350.
[0167] At this point, the third signal interaction between the first and second devices is similar to the first signal interaction, except that: 1. The first device uses a first antenna to send a first mixed signal to the second device through a second channel. 2. The second device uses a third antenna to receive the first mixed signal sent by the first device through a second channel. Other details can be found in the descriptions of S331 to S336 above, and will not be repeated here.
[0168] For ease of description, the data collected by the second device will be referred to as the third set of data collected by the second device, and the data collected by the first device will be referred to as the third set of data collected by the first device.
[0169] After the first device and the second device complete the third signal exchange, the first device and the second device begin the fourth signal exchange, namely S360.
[0170] At this point, the fourth signal interaction between the first and second devices is similar to the first signal interaction, except that: 1. The first device uses the first antenna to send the first mixing signal to the second device through the third channel. 2. The second device uses the third antenna to receive the first mixing signal sent by the first device through the third channel. Other details can be found in the descriptions of S331 to S336 above, and will not be repeated here.
[0171] For ease of description, the data collected by the second device will be referred to as the fourth set of data collected by the second device, and the data collected by the first device will be referred to as the fourth set of data collected by the first device.
[0172] Figure 6 This is a timing diagram illustrating the transmission and reception of signals by a first device and a second device, as provided in an embodiment of this application. Figure 6 As shown, TX stands for transport and RX stands for receive. N represents the number of channels, i.e., the number of frequency modulations, and T represents the time required for signal exchange on a single channel.
[0173] Since the first device is equipped with one antenna, namely the first antenna, therefore, as Figure 6 As shown, the first device does not need to switch antennas, meaning that the first device always interacts with the measurement signal through the first antenna.
[0174] Since the second device is equipped with two antennas, namely a second antenna and a third antenna, therefore, as Figure 6 As shown, the second device needs to switch antennas after completing the measurement signal exchange on the second channel via the second antenna. Subsequently, the second device exchanges measurement signals via the third antenna. Therefore, antenna switching occurs within the frequency hopping time, meaning the antenna switching time lies between the data sampling time and the signal transmission time. After the first and second devices complete four signal exchanges, they can each send the collected data to the third device, allowing the third device to calculate the distance between the first and second devices. For detailed procedures, see S370 to S390.
[0175] In some embodiments, the third device and the first device may be a single device. In other embodiments, the third device and the second device are a single device. In still other embodiments, the third device is independent of the first device and the second device.
[0176] S370, the first device sends the first measurement information to the third device.
[0177] The first measurement information includes: the event number corresponding to the sampled data and the data collected by the first device.
[0178] The data collected by the first device includes: a first set of sampled data from the first device and its corresponding antenna identifier and channel identifier; a second set of sampled data from the first device and its corresponding antenna identifier and channel identifier; a third set of sampled data from the first device and its corresponding antenna identifier and channel identifier; and a fourth set of sampled data from the first device and its corresponding antenna identifier and channel identifier.
[0179] The first set of sampling data on the first device side includes: sampling data of the first signal on the first device side and sampling data of the first echo signal on the first device side.
[0180] The second set of sampling data on the first device side includes: sampling data of the second signal on the first device side and sampling data of the second echo signal on the first device side.
[0181] The third set of sampling data on the first device side includes: sampling data of the third signal on the first device side and sampling data of the third echo signal on the first device side.
[0182] The fourth set of sampling data on the first device side includes: sampling data of the fourth signal on the first device side and sampling data of the fourth echo signal on the first device side.
[0183] The antenna identifiers corresponding to the first set of sampled data, the second set of sampled data, the third set of sampled data, and the fourth set of sampled data on the first device side are all antenna identifiers.
[0184] The channel identifier corresponding to the first set of sampled data on the first device side is the first channel identifier, the channel identifier corresponding to the second set of sampled data on the first device side is the second channel identifier, the channel identifier corresponding to the third set of sampled data on the first device side is the second channel identifier, and the channel identifier corresponding to the fourth set of sampled data on the first device side is the third channel identifier.
[0185] S380, the second device sends the second measurement information to the third device.
[0186] The second measurement information includes: the event number corresponding to the sampled data and the data collected by the second device.
[0187] The data collected by the second device includes: the first set of sampled data from the second device and its corresponding antenna identifier and channel identifier; the second set of sampled data from the second device and its corresponding antenna identifier and channel identifier; the third set of sampled data from the second device and its corresponding antenna identifier and channel identifier; and the fourth set of sampled data from the second device and its corresponding antenna identifier and channel identifier.
[0188] The first set of sampling data on the second device side includes: sampling data of the first signal on the second device side and sampling data of the first echo signal on the second device side.
[0189] The second set of sampling data on the second device side includes: sampling data of the second signal on the second device side and sampling data of the second echo signal on the second device side.
[0190] The third set of sampling data on the second device side includes: sampling data of the third signal on the second device side and sampling data of the third echo signal on the second device side.
[0191] The fourth set of sampling data on the second device side includes: sampling data of the fourth signal on the second device side and sampling data of the fourth echo signal on the second device side.
[0192] The antenna identifier corresponding to the first set of sampled data on the second device side and the antenna identifier corresponding to the second set of sampled data on the second device side are both the identifier of the second antenna.
[0193] The antenna identifier corresponding to the third set of sampling data on the second device side and the antenna identifier corresponding to the fourth set of sampling data on the second device side are both the identifier of the third antenna.
[0194] The channel identifier corresponding to the first set of sampled data on the second device side is the first channel identifier, the channel identifier corresponding to the second set of sampled data on the second device side is the second channel identifier, the channel identifier corresponding to the third set of sampled data on the second device side is the second channel identifier, and the channel identifier corresponding to the fourth set of sampled data on the second device side is the third channel identifier.
[0195] The embodiments of this application do not limit the specific form of the sampling data. For example, the sampling data may be recorded waveform data.
[0196] This application does not limit the specific form of the antenna identifier. For example, the antenna identifier can also be implemented using an antenna index.
[0197] S390, the third device calculates the distance between the first device and the second device based on the first measurement information and the second measurement information.
[0198] In some embodiments, the third device may implement S370 using a linear piecewise algorithm.
[0199] Figure 7 This is a schematic flowchart illustrating an example of calculating the distance between a first device and a second device, provided as an embodiment of this application.
[0200] like Figure 7 As shown, S390 specifically includes S391 to S399. S391 to S399 are described in detail below.
[0201] S391, based on the data collected by the first device and the data collected by the second device, separate the phase value of each data collected by the first device and the phase value of each data collected by the second device.
[0202] For example, the phase value of the first set of data collected by the second device is φ T1i The phase value of the second set of data is φ T2j The phase value of the third set of data is φ. T3k The phase value of the fourth set of data is φ. T4m The phase value of the first set of data collected by the first device is φ. R1i The phase value of the second set of data is φ R2j The phase value of the third set of data is φ R3k The phase value of the fourth set of data is φ. R4m Where i is the number of data points in the first data group, j is the number of data points in the second data group, k is the number of data points in the third data group, and m is the number of data points in the fourth data group, and i, j, k, and m are all positive integers.
[0203] Optionally, in some embodiments, in S391, the amplitude of each data point collected by the first device side and the amplitude of each data point collected by the second device side can be separated based on the data collected by the first device side and the data collected by the second device side.
[0204] S392, the phase values of the data corresponding to each channel collected by the first device side and the second device side are fitted respectively to obtain the fitting curve.
[0205] The data corresponding to the first channel on the first device side includes the first set of data collected by the first device side. The data corresponding to the second channel on the first device side includes the second and third sets of data collected by the first device side. The data corresponding to the third channel on the first device side includes the fourth set of data collected by the first device side. Thus, after step S392, by fitting the phase values of the data corresponding to each channel collected by the first device side, three fitting curves can be obtained.
[0206] The data corresponding to the first channel on the second device side includes the first set of data collected by the second device side. The data corresponding to the second channel on the second device side includes the second and third sets of data collected by the second device side. The data corresponding to the third channel on the second device side includes the fourth set of data collected by the second device side. Thus, after step S392, by fitting the phase values of the data corresponding to each channel collected by the second device side, three fitting curves can be obtained.
[0207] S393, based on the curve fitted by S392, filters out available channels.
[0208] The available channel can be understood as a non-frequency selective fading channel. That is, the amplitude of the measurement signal transmitted through the available antenna channel will not experience abnormal attenuation and / or the phase will not experience significant distortion.
[0209] For example, it can be determined whether the slope of the fitted curve changes steadily. If the slope of the fitted curve changes steadily, then the channel is a usable channel. If the slope of the fitted curve changes abruptly, then the channel is an unusable channel, and in this case, it can be considered that the channel is experiencing fading.
[0210] For ease of description, the following description will use the example of the available channels on both the first and second device sides, which include all channels, namely the first channel, the second channel, and the third channel.
[0211] Channel fading is consistent with the strength (amplitude) of the signal transmitted on the channel.
[0212] Below, with Figure 8 and Figure 9 Taking this as an example, we will introduce the relationship between channel fading and the strength of the signal transmitted on the channel. Among them, Figure 8 This is a schematic diagram of phase fitting of a signal transmitted through channel identifier 1-40 of antenna A, as provided in an embodiment of this application. Figure 9 This is a schematic diagram illustrating the amplitude fitting of a signal transmitted via channel identifier 1-40 on antenna A, as provided in an embodiment of this application.
[0213] Depend on Figure 8 It can be seen that antenna A experiences channel fading on channels labeled 6-8, meaning that antenna A's usable channels are 1-5 and 9-40. From... Figure 9 It can be seen that the amplitude (strength) of the signal transmitted by antenna A on the channel labeled 6-8 is reduced. This demonstrates that channel fading is consistent with the strength (amplitude) of the signal transmitted on the channel. That is, the signal strength transmitted on a fading channel also decreases.
[0214] In another possible implementation, if the amplitude of each data acquired by the first device side and the amplitude of each data acquired by the second device side are obtained in S391, S392 and S393 can also be replaced by S392' and S393'.
[0215] S392' Calculate the average amplitude of the data corresponding to each channel collected by the first device side and the second device side respectively.
[0216] For a description of the data collected by the first and second devices for each channel, please refer to the relevant description in S392, which will not be repeated here.
[0217] After S392, the average amplitude of the data corresponding to each channel collected by the first device side and the second device side is 3 respectively.
[0218] S393': Based on the average amplitude of the data corresponding to each channel obtained in S392', select the available channels.
[0219] For example, it can be determined whether the average amplitude of the data corresponding to the channel is greater than or equal to a first preset value. If the average amplitude of the data corresponding to the channel is greater than or equal to the first preset value, then the channel is an available channel. If the average amplitude of the data corresponding to the channel is less than the first preset value, then the channel is an unavailable channel, and in this case, it can be considered that the signal strength corresponding to the data collected on the channel is weak.
[0220] S394, merge the phase values corresponding to the data collected by the first device side and the second device side on the same available channel to obtain the phase value corresponding to the data collected by each available channel.
[0221] Combining the phase values corresponding to the data collected from the first device side and the second device side on the same available channel is equivalent to adding the phase values corresponding to the data collected from the first device side and the second device side on the same available channel. For example, the phase value corresponding to the data collected from the first channel is φ. T1i +φ R1i The phase value φ corresponding to the data collected by the second channel. T2j +φ R2j and / or φ T3k +φ R3k The phase value corresponding to the data acquired by the third channel is φ. T4m +φ R4m .
[0222] S395, unwind the phase values corresponding to the data collected by each available channel to obtain the unwound phase values corresponding to the data collected by each available channel.
[0223] S396, fit the phase values corresponding to the data collected from each available channel after unwinding to obtain the fitting curve.
[0224] For example, S396 can be implemented using a piecewise linear algorithm. The steps of the piecewise linear algorithm are as follows:
[0225] Step 1: Divide the phase curve into segments. The phase curve is the curve showing the relationship between phase and channel.
[0226] Assuming the original sequence is of length N, in the initial stage the sequence is divided into N / 2 segments, and adjacent points are connected and merged into one segment. At this time, the resulting multi-segment broken line is naturally the optimal approximate phase curve, because all N points in the original sequence are on the straight line after segmentation.
[0227] Step 2: Continuously merge two adjacent segments and calculate the loss function between the corresponding point on the merged segment and the point on the original sequence until the loss function meets the preset condition, then stop merging the two adjacent segments.
[0228] For example, the preset condition could be that the loss function is less than or equal to a second preset value.
[0229] For example, the loss function can be the sum of the Euclidean distances between the corresponding point on the merged line segment and the point on the original sequence.
[0230] If Step 2 results in multiple line segments, Step 3 must be executed.
[0231] Step 3: Select the optimal line segment, which is the fitted curve described in S366.
[0232] For example, first calculate the average amplitude of the multiple channels corresponding to each line segment in the multiple line segments, and then determine the line segment corresponding to the multiple channels with the largest average amplitude as the optimal line segment.
[0233] S397, Based on the fitted curve obtained in S396, determine the distance between the first device and the second device.
[0234] For example, the distance between the first device and the second device is obtained based on the relationship between the slope of the fitted curve obtained in S396 and the distance.
[0235] The relationship between slope and distance can be expressed as:
[0236]
[0237] Where k is the slope and d is the distance.
[0238] Figure 10 and Figure 11 These are schematic diagrams illustrating the linear fitting of multiple sets of distances between the first and second devices, obtained according to method 300 and existing schemes, respectively. Among them, in... Figure 10 In this context, the distance between the first and second devices is 1.8m. Figure 11 In the middle, the distance between the first device and the second device is 3m.
[0239] Depend on Figure 10 and Figure 11It can be seen that, compared with the existing scheme, the ranging accuracy and stability of Method 300 are significantly improved.
[0240] Figure 12 This application provides a ranging method 400.
[0241] For example, the entity executing the ranging method 400 may be the first device, the second device, or the third device described above.
[0242] like Figure 12 As shown, the ranging method 400 includes S410 and S420. S410 and S420 are described in detail below.
[0243] S410, acquire the first measurement information and the second measurement information.
[0244] The first measurement information includes multiple sets of sampled data obtained by sampling the back-echo measurement signals received by the first device through multiple antenna channels of a single antenna, and the second measurement information includes multiple sets of sampled data obtained by the second device through the measurement signals received by the second device through multiple antenna channels of each of the multiple antennas.
[0245] Optionally, the frequency of the measurement signal transmitted by the multiple antenna channels corresponding to one of the multiple antennas may be the same as or different from the frequency of the measurement signal transmitted by the multiple antenna channels corresponding to another of the multiple antennas.
[0246] Optionally, the frequency points of the multiple measurement signals transmitted by the multiple antenna channels corresponding to each antenna are different.
[0247] S420, determine the distance between the first device and the second device based on the first measurement information and the second measurement information.
[0248] Optionally, the first measurement information may further include the antenna identifier and antenna channel identifier corresponding to each set of sampled data obtained by the first device, and the second measurement information may further include the antenna identifier and antenna channel identifier corresponding to each set of sampled data obtained by the second device.
[0249] Optionally, determining the distance between the first device and the second device based on the first measurement information and the second measurement information includes: filtering available antenna channels for the first device based on the first measurement information, and filtering available antenna channels for the second device based on the second measurement information, wherein the available antenna channels are non-frequency selective fading channels; merging data collected by the first device and the second device on the same available antenna channel to obtain target sampling data; fitting the target sampling data to obtain at least one target fitting curve according to a sequence piecewise linear algorithm; and determining the distance between the first device and the second device based on the at least one target fitting curve.
[0250] Optionally, in one possible implementation, the step of filtering out the available antenna channels of the first device based on the first measurement information includes: obtaining the phase value corresponding to the data collected by the first device through each antenna channel of the single antenna based on the first measurement information; performing linear fitting on the phase value corresponding to the data collected by the first device through each antenna channel of the single antenna to obtain a fitting curve of the first device with respect to the phase value corresponding to the data collected by each antenna channel; and filtering out the available antenna channels of the first device based on the slope of the fitting curve of the first device with respect to the phase value corresponding to the data collected by each antenna channel.
[0251] Optionally, in another possible implementation, the step of filtering out the available antenna channels of the first device based on the first measurement information includes: obtaining the amplitude corresponding to the data collected by the first device through each antenna channel of the single antenna based on the first measurement information; calculating the average value of the amplitude corresponding to the data collected by the first device through each antenna channel of the single antenna; and filtering out the available antenna channels of the first device based on the average value of the amplitude corresponding to the data collected by the first device through each antenna channel of the single antenna.
[0252] Optionally, in one possible implementation, the step of filtering out the available antenna channels of the second device based on the second measurement information includes: obtaining the phase value corresponding to the data collected by the second device through each antenna channel of the multi-antenna system based on the second measurement information; obtaining a fitting curve of the second device with respect to the phase value of the data collected by the second device through each antenna channel of the multi-antenna system; and filtering out the available antenna channels of the second device based on the slope of the fitting curve of the second device with respect to the phase value of the data collected by the second device through each antenna channel.
[0253] Optionally, in another possible implementation, the step of filtering out the available antenna channels of the second device based on the second measurement information includes: obtaining the amplitude corresponding to the data collected by the second device through each antenna channel of the multi-antenna system based on the second measurement information; calculating the average value of the amplitude corresponding to the data collected by the second device through each antenna channel of the multi-antenna system; and filtering out the available antenna channels of the second device based on the average value of the amplitude corresponding to the data collected by the second device through each antenna channel of the multi-antenna system.
[0254] Optionally, merging the data collected by the first device and the second device on the same available antenna channel to obtain target sampling data includes: adding the phase values corresponding to the data collected by the first device and the second device on the same available antenna channel to obtain the target sampling data.
[0255] Optionally, when there are multiple target fitting curves, determining the distance between the first device and the second device based on the at least one target fitting curve includes: determining the first target fitting curve among the multiple target fitting curves as the optimal target fitting curve, wherein the average amplitude of the data collected on the multiple antenna channels corresponding to the first target fitting curve is the largest; and determining the distance between the first device and the second device based on the optimal target fitting curve.
[0256] Figure 13 A communication method 500 is provided for embodiments of this application.
[0257] For example, the entity executing the communication method 500 may be the second device described above. The second device includes multiple antennas, each of which corresponds to multiple antenna channels.
[0258] like Figure 13 As shown, the ranging method 500 includes S510 and S520. S510 and S520 are described in detail below.
[0259] S510, according to the multi-antenna time-division working mode and the frequency hopping mode of each antenna, receives the measurement signal sent by the first device through each of the multiple antenna channels corresponding to each antenna.
[0260] The multi-antenna time-division operating mode can be understood as the specific operating time of each antenna.
[0261] The frequency hopping mode of each antenna can be understood as the specific frequency point at which the measurement signal is transmitted on each antenna.
[0262] For example, the second device may include a high-speed switch. The second device controls the time-division multiplexing operation of the multiple antennas via the high-speed switch.
[0263] For example, when antenna switching is required, the second device can switch antennas during the frequency hopping interval. That is, antenna switching always occurs between the end of the previous frequency interaction and the start of the next frequency interaction.
[0264] Optionally, the frequency of the measurement signal transmitted by the multiple antenna channels corresponding to one of the multiple antennas may be the same as or different from the frequency of the measurement signal transmitted by the multiple antenna channels corresponding to another of the multiple antennas.
[0265] Optionally, the frequency points of the multiple measurement signals transmitted by the multiple antenna channels corresponding to each antenna are different.
[0266] S520, sample the measurement signal received by each antenna channel to obtain multiple sets of sampled data.
[0267] The multiple sets of sampled data are used to determine the distance between the first device and the second device.
[0268] Optionally, the method 500 further includes S530.
[0269] S530, according to the multi-antenna time-division working mode and the frequency hopping mode of each antenna, the echo measurement signal is sent to the first device through the antenna channel of the received measurement signal.
[0270] In some embodiments, in order to save communication time between the first device and the second device and / or the power consumption of the second device, the interaction between a measurement signal and a return measurement signal can be realized when a certain antenna is in operation.
[0271] For example, if the first current antenna is currently in operating mode, and the first target antenna is transmitting a signal at the first frequency, and if the second current antenna is currently in operating mode, and the second target antenna is transmitting a signal at the second frequency, then in the current time period, the second device can first receive the measurement signal transmitted by the first device through the first target channel corresponding to the first frequency of the first current antenna. Afterwards, the second device can transmit a return measurement signal of the measurement signal back to the first device through the first target channel corresponding to the first frequency of the first current antenna. In the next time period, the second device can first receive the measurement signal transmitted by the first device through the second target channel corresponding to the second frequency of the second current antenna. Afterwards, the second device can transmit a return measurement signal of the measurement signal back to the first device through the second target channel corresponding to the second frequency of the second current antenna.
[0272] The above text combined Figure 3 and Figure 13 The method provided in this application is described in detail below, and will be combined with... Figure 14 and Figure 15 This application describes embodiments of the apparatus in detail. It is understood that, in order to achieve the functions described in the above embodiments, Figure 14 and Figure 15 The apparatus includes hardware structures and / or software modules corresponding to perform various functions. Those skilled in the art will readily recognize that, based on the units and method steps described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.
[0273] Figure 14 This is a schematic diagram of an example device provided for an embodiment of this application.
[0274] For example, such as Figure 14 As shown, the device 1200 includes a communication unit 1210 and a processing unit 1220.
[0275] In one possible implementation, the first, second, or third device described above includes the device 1200.
[0276] The communication unit 1210 is used to acquire first measurement information and second measurement information. The first measurement information includes multiple sets of sampled data obtained by sampling the back-echo measurement signals received by the first device through multiple antenna channels of a single antenna. The second measurement information includes multiple sets of sampled data obtained by the second device through the measurement signals received by the second device through multiple antenna channels of each of the multiple antennas. The processing unit 1220 is used to determine the distance between the first device and the second device based on the first measurement information and the second measurement information.
[0277] Optionally, the first measurement information further includes the antenna identifier and antenna channel identifier corresponding to each set of sampled data obtained by the first device, and the second measurement information further includes the antenna identifier and antenna channel identifier corresponding to each set of sampled data obtained by the second device. The processing unit 1220 is specifically used for: filtering out the available antenna channels of the first device according to the first measurement information, and filtering out the available antenna channels of the second device according to the second measurement information, wherein the available antenna channels are non-frequency selective fading channels; merging the data collected by the first device and the second device on the same available antenna channel to obtain target sampled data; fitting the target sampled data according to a sequence piecewise linear algorithm to obtain at least one target fitting curve; and determining the distance between the first device and the second device according to the at least one target fitting curve.
[0278] Optionally, in one example, the processing unit 1220 is further configured to: obtain the phase value corresponding to the data collected by the first device through each antenna channel of the single antenna based on the first measurement information; perform linear fitting on the phase value corresponding to the data collected by the first device through each antenna channel of the single antenna to obtain a fitting curve of the first device with respect to the phase value corresponding to the data collected by each antenna channel; and filter out the available antenna channels of the first device based on the slope of the fitting curve of the first device with respect to the phase value corresponding to the data collected by each antenna channel.
[0279] Optionally, in another example, the processing unit 1220 is further configured to: obtain the amplitude corresponding to the data collected by the first device through each antenna channel of the single antenna based on the first measurement information; calculate the average value of the amplitude corresponding to the data collected by the first device through each antenna channel of the single antenna; and filter out the available antenna channels of the first device based on the average value of the amplitude corresponding to the data collected by the first device through each antenna channel of the single antenna.
[0280] Optionally, in one example, the processing unit 1220 is further configured to: obtain, based on the second measurement information, the phase value corresponding to the data collected by the second device through each antenna channel of the multi-antenna system; obtain a fitting curve of the second device with respect to the phase value of the data collected by the second device through each antenna channel of the multi-antenna system; and filter out the available antenna channels of the second device based on the slope of the fitting curve of the second device with respect to the phase value of the data collected by the second device through each antenna channel.
[0281] Optionally, in another example, the processing unit 1220 is further configured to: obtain the amplitude corresponding to the data collected by the second device through each antenna channel of the multi-antenna according to the second measurement information; calculate the average value of the amplitude corresponding to the data collected by the second device through each antenna channel of the multi-antenna; and filter out the available antenna channels of the second device according to the average value of the amplitude corresponding to the data collected by the second device through each antenna channel of the multi-antenna.
[0282] Optionally, the processing unit 1220 is further configured to: add the phase values corresponding to the data collected by the first device and the second device with respect to the same available antenna channel to obtain the target sampling data.
[0283] Optionally, when there are multiple target fitting curves, the processing unit 1220 is further configured to: determine the first target fitting curve among the multiple target fitting curves as the optimal target fitting curve, wherein the average amplitude of the data collected on the multiple antenna channels corresponding to the first target fitting curve is the largest; and determine the distance between the first device and the second device based on the optimal target fitting curve.
[0284] Optionally, the frequency of the measurement signal transmitted by the multiple antenna channels corresponding to one of the multiple antennas may be the same as or different from the frequency of the measurement signal transmitted by the multiple antenna channels corresponding to another of the multiple antennas.
[0285] Optionally, the frequency points of the multiple measurement signals transmitted by the multiple antenna channels corresponding to each antenna are different.
[0286] In another possible implementation, the second device described above includes the apparatus 1200. The apparatus 1200 includes a plurality of antennas, each of which corresponds to a plurality of antenna channels.
[0287] The communication unit 1210 is used to receive the measurement signal sent by the first device through each of the multiple antenna channels corresponding to each antenna, according to the multi-antenna time-division working mode and the frequency hopping mode of each antenna; the processing unit 1220 is used to sample the measurement signal received by each antenna channel to obtain multiple sets of sampled data, and the multiple sets of sampled data are used to determine the distance between the first device and the second device.
[0288] Optionally, the frequency of the measurement signal transmitted by the multiple antenna channels corresponding to one of the multiple antennas may be the same as or different from the frequency of the measurement signal transmitted by the multiple antenna channels corresponding to another of the multiple antennas.
[0289] Optionally, the frequency points of the multiple measurement signals transmitted by the multiple antenna channels corresponding to each antenna are different.
[0290] Optionally, the communication unit 1210 is further configured to: send echo measurement signals to the first device through the antenna channel of the received measurement signals according to the multi-antenna time-division operating mode and the frequency hopping mode of each antenna.
[0291] Figure 15 This is another schematic structural diagram of a device provided in the embodiments of this application.
[0292] like Figure 15 As shown, the device 1300 includes a processor 1310 coupled to a memory 1320. The memory 1320 is used to store computer programs or instructions and / or data. The processor 1310 is used to execute the computer programs or instructions stored in the memory 1320, or to read the data stored in the memory 1320, to perform the methods in the above method embodiments.
[0293] Optionally, there may be one or more processors 1310.
[0294] Optionally, the memory 1320 may be one or more.
[0295] Alternatively, the memory 1320 can be integrated with the processor 1310, or it can be set separately.
[0296] Optionally, such as Figure 15 As shown, the device 1300 also includes a transceiver 1330 for receiving and / or transmitting signals. For example, a processor 1310 is used to control the transceiver 1330 to receive and / or transmit signals.
[0297] As one option, the device 1300 is used to implement the operations performed by the first device, the second device, or the third device in the various method embodiments described above.
[0298] For example, processor 1310 is used to execute computer programs or instructions stored in memory 1320 to implement the relevant operations of the first device in the various method embodiments described above. For example, Figure 4 , Figure 5 or Figure 12 The method performed by the first device in the illustrated embodiment.
[0299] For example, processor 1310 is used to execute computer programs or instructions stored in memory 1320 to implement the relevant operations of the second device in the various method embodiments described above. For example, Figure 4 , Figure 5 or Figure 13The method performed by the second device in the illustrated embodiment.
[0300] For example, processor 1310 is used to execute computer programs or instructions stored in memory 1320 to implement the relevant operations of the third device in the various method embodiments described above. For example, Figure 4 or Figure 5 The method performed by the third device in the illustrated embodiment.
[0301] It should be understood that the processor mentioned in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0302] It should also be understood that the memory mentioned in the embodiments of this application can be volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM). For example, RAM can be used as an external cache. By way of example and not limitation, RAM includes the following forms: static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0303] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) can be integrated into the processor.
[0304] It should also be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0305] The descriptions of the processes corresponding to the above-mentioned figures each have their own emphasis. For parts of a process that are not described in detail, please refer to the relevant descriptions of other processes.
[0306] This application also provides a computer-readable storage medium storing computer instructions for implementing the methods executed by the first device, the second device, or the third device in the above-described method embodiments.
[0307] This application also provides a computer program product comprising instructions which, when executed by a computer, implement the methods performed by the first device, the second device, or the third device in the above-described method embodiments.
[0308] This application also provides a communication system, which includes a first device and a second device from the embodiments described above. For example, the system includes... Figure 4 The first device and the second device in the illustrated embodiment.
[0309] This application also provides a communication system that includes the third device described in the preceding embodiments. For example, the system includes... Figure 4 The third device in the illustrated embodiment.
[0310] The explanations and beneficial effects of the relevant contents in any of the devices provided above can be found in the corresponding method embodiments provided above, and will not be repeated here.
[0311] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of apparatus or units may be electrical, mechanical, or other forms.
[0312] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. For example, the computer can be a personal computer, a server, or a network device, etc. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks, SSDs). For example, the aforementioned available media include, but are not limited to, USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, and other media capable of storing program code.
[0313] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method of distance measurement, characterized by, The method includes: Acquire first measurement information and second measurement information. The first measurement information includes multiple sets of sampled data obtained by sampling the back-echo measurement signals received by the first device through multiple antenna channels of a single antenna. The second measurement information includes multiple sets of sampled data obtained by the second device through the measurement signals received by the second device through multiple antenna channels of each of the multiple antennas. Based on the first measurement information and the second measurement information, the distance between the first device and the second device is determined; The first measurement information also includes the antenna identifier and antenna channel identifier corresponding to each set of sampled data obtained by the first device; the second measurement information also includes the antenna identifier and antenna channel identifier corresponding to each set of sampled data obtained by the second device. Determining the distance between the first device and the second device based on the first measurement information and the second measurement information includes: Based on the phase value or amplitude corresponding to the data collected by the first device, the available antenna channels of the first device are selected, and based on the phase value or amplitude corresponding to the data collected by the second device, the available antenna channels are selected, wherein the available antenna channels are non-frequency selective fading channels; The data collected by the first device and the second device on the same available antenna channel are merged to obtain the target sampling data; Based on the sequence piecewise linear algorithm, at least one target fitting curve is obtained by fitting the target sampled data. The distance between the first device and the second device is determined based on the at least one target fitting curve.
2. The method according to claim 1, characterized in that, The step of filtering out the available antenna channels of the first device based on the phase values corresponding to the data collected by the first device includes: Based on the first measurement information, obtain the phase value corresponding to the data collected by the first device through each antenna channel of the single antenna; Linear fitting is performed on the phase values corresponding to the data collected by the first device through each antenna channel of a single antenna to obtain the fitting curve of the first device with respect to the phase values corresponding to the data collected by each antenna channel; Based on the slope of the fitted curve of the phase value corresponding to the data collected by the first device for each antenna channel, the available antenna channels of the first device are selected.
3. The method according to claim 1, characterized in that, The step of filtering out the available antenna channels of the first device based on the amplitude corresponding to the data collected by the first device includes: Based on the first measurement information, obtain the amplitude corresponding to the data collected by the first device through each antenna channel of the single antenna; Calculate the average amplitude of the data collected by the first device through each antenna channel of a single antenna; Based on the average amplitude of the data collected by the first device through each antenna channel of a single antenna, the available antenna channels of the first device are selected.
4. The method according to any one of claims 1 to 3, characterized in that, The step of filtering out the available antenna channels of the second device based on the phase values corresponding to the data collected by the second device includes: Based on the second measurement information, obtain the phase value corresponding to the data collected by the second device through each antenna channel of the multi-antenna system; For the phase values corresponding to the data collected by the second device through each antenna channel of the multi-antenna system, a fitting curve of the phase values of the second device with respect to the phase values of the data collected by each antenna channel is obtained. Based on the slope of the fitted curve of the phase value corresponding to the data collected by the second device for each antenna channel, the available antenna channels of the second device are selected.
5. The method according to any one of claims 1 to 3, characterized in that, The step of filtering out the available antenna channels of the second device based on the amplitude corresponding to the data collected by the second device includes: Based on the second measurement information, obtain the amplitude corresponding to the data collected by the second device through each antenna channel of the multi-antenna system; Calculate the average amplitude of the data collected by the second device through each antenna channel of the multi-antenna system; Based on the average amplitude of the data collected by the second device through each antenna channel of the multi-antenna system, the available antenna channels of the second device are selected.
6. The method according to any one of claims 1 to 3, characterized in that, The step of merging the data collected by the first device and the second device on the same available antenna channel to obtain target sampling data includes: The target sampling data is obtained by adding the phase values corresponding to the data collected by the first device and the second device with respect to the same available antenna channel.
7. The method according to any one of claims 1 to 3, characterized in that, When there are multiple target fitting curves, determining the distance between the first device and the second device based on at least one target fitting curve includes: The first target fitting curve among the multiple target fitting curves is determined as the optimal target fitting curve, and the average value of the data collected on the multiple antenna channels corresponding to the first target fitting curve is the largest. The distance between the first device and the second device is determined based on the optimal target fitting curve.
8. The method according to any one of claims 1 to 3, characterized in that, The frequency points of the measurement signals transmitted by the multiple antenna channels corresponding to one of the multiple antennas may be the same as or different from the frequency points of the measurement signals transmitted by the multiple antenna channels corresponding to another of the multiple antennas.
9. The method according to any one of claims 1 to 3, characterized in that, The frequency points of the multiple measurement signals transmitted by the multiple antenna channels corresponding to each antenna are different.
10. A ranging device, characterized in that, include: A processor for executing a computer program stored in a memory to cause the apparatus to perform the ranging method as described in any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the ranging method as described in any one of claims 1 to 9.
12. A chip, characterized in that, It includes at least one processor and an interface circuit, the interface circuit being used to provide program instructions or data to the at least one processor, the at least one processor being used to execute the program instructions to implement the ranging method as described in any one of claims 1 to 9.