System and method for determining distance between networked electronic devices
By utilizing speakers and microphones to transmit and receive the phase shift of low-frequency periodic measurement waves between networked electronic devices, the difficulty in determining the distance between devices within a building in the prior art is solved, and accurate distance measurement is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2026-03-03
AI Technical Summary
Existing technologies are ineffective at determining the distance between networked electronic devices installed in buildings, especially when using measuring tapes, laser rangefinders, or sonar.
The distance between devices is calculated by using the speakers and microphones of networked electronic devices to transmit and receive sound signals, and by using the phase shift of low-frequency periodic measurement waves. Specifically, the measurement waves are carried at different carrier frequencies and the phase is set to simulate reflected waves, and the phase shift is calculated to determine the distance.
A method for accurately measuring the distance between devices within a range of 1 meter to 50 meters is provided, avoiding the limitations of traditional methods and applicable to devices installed in buildings.
Smart Images

Figure CN117890897B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to determining the distance between networked electronic devices. Specifically, it relates to determining such distances using the characteristics of sound emitted and received by the networked electronic devices using their speakers and microphones. Background Technology
[0002] In many applications, it is necessary to determine the distance between a first device and a second device. For example, different methods (such as using a measuring tape, laser rangefinder, or sonar) are known to be used for distance measurement. Each of these different methods has its advantages and disadvantages.
[0003] The inventors of this invention have realized the need for an additional method for determining the distance between a first device and a second device, particularly for determining the distance between devices in a system of devices installed in a building. Summary of the Invention
[0004] In view of the above, the object of the present invention is to provide a method for determining the distance between a first device and a second device.
[0005] According to a first aspect, a method is provided for determining the distance between a first networked electronic device and a second networked electronic device. The first networked electronic device has a first speaker and a first microphone. The second networked electronic device has a second speaker and a second microphone. The method includes using the first speaker to emit a first sound signal. The first sound signal includes a first measurement wave having a first frequency carried on a first carrier having a first carrier frequency. The first carrier frequency is higher than the first frequency. The method further includes using the second microphone to receive the first sound signal. The method further includes defining a second sound signal at the second electronic device. The second sound signal includes a second measurement wave carried on a second carrier. The second measurement wave has the same frequency as the first measurement wave. Therefore, the second measurement wave has the first frequency. The second carrier has a second carrier frequency different from the first carrier frequency. The phase of the second measurement wave is configured such that it simulates a reflection of the first measurement wave at the second networked electronic device. The method further includes using the second speaker to emit the second sound signal. The method further includes using the first microphone to receive the second sound signal. The method further includes calculating the distance between the first networked electronic device and the second networked electronic device based on the phase shift between the emitted first measurement wave and the received second measurement wave.
[0006] Consistent with the above, the inventors have realized that the distance between two devices, each equipped with a speaker and a microphone, can be determined by using the characteristics of sound. This is achieved by observing the phase shift of a low-frequency periodic measurement wave carried on a sound-based carrier wave. This low-frequency periodic measurement wave can even be below 20 Hz. To determine a distance in the range of 1 m to 50 m, the frequency of the measurement wave needs to be between 3 Hz and 160 Hz. This is because the wavelength of the measurement wave needs to be longer than half the distance between the two devices. Most speakers cannot reproduce waves with such low frequencies. The measurement wave is provided by transmitting a carrier wave with the low frequency of the measurement wave discussed above.
[0007] The first and second carriers can have carrier frequencies in the range of 200 Hz to 20000 Hz.
[0008] Defining the second sound signal may include setting the phase of the second measurement wave to be the same as the phase of the first measurement wave of the first sound signal received by the second microphone.
[0009] Setting the phase of the second measurement wave may include determining the phase of the second measurement wave based on the processing time of the circuit analyzing the first audio signal at the second networked electronic device, so as to determine the phase of the received first measurement wave.
[0010] Defining and transmitting a second sound signal may include: transmitting a candidate second sound signal; while listening with a second microphone, shifting the phase of a second measurement wave of the candidate second sound signal until the phase of the received first measurement wave matches the phase of the second measurement wave of the candidate second sound signal; and transmitting a second sound signal having the matched phase when the phase of the received first measurement wave matches the phase of the second measurement wave of the candidate second sound signal.
[0011] According to a second aspect, a system for determining the distance between a first networked electronic device and a second networked electronic device is provided. The system includes: a first networked electronic device having a first speaker and a first microphone; and a second networked electronic device having a second speaker and a second microphone. The first networked electronic device further includes a first circuit configured to: define a first sound signal comprising a first measurement wave having a first frequency carried on a first carrier, the first carrier having a first carrier frequency higher than the first frequency; and drive the first speaker to emit the first sound signal. The second networked electronic device further includes a second circuit configured to: analyze the first sound signal when the first sound signal is registered by the second microphone; define a second sound signal comprising a second measurement wave having a first frequency carried on a second carrier, the second carrier having a second carrier frequency higher than the first frequency and different from the first carrier frequency, wherein the phase of the second measurement wave is set such that it simulates a reflection of the first measurement wave of the first sound signal on the second networked electronic device; and drive the second speaker to emit the second sound signal. The first circuit of the first networked electronic device is further configured to: analyze the second sound signal when the second sound signal is registered by the first microphone; determine a phase shift between the emitted first measurement wave and the received second measurement wave; and calculate the distance between the first networked electronic device and the second networked electronic device based on the determined phase shift.
[0012] The aforementioned features of this method, when applicable, also apply to the second aspect. For the avoidance of unnecessary repetition, please refer to the above content.
[0013] The further applicability will become apparent from the detailed description given below. However, it should be understood that the detailed description and specific examples are given only by way of illustration.
[0014] It should be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. It should be noted that, as used in the specification, the articles “a,” “the,” and “the” are intended to mean the presence of one or more elements, unless the context clearly indicates otherwise. Thus, for example, references to “a unit” or “the unit” can include several devices, etc. Furthermore, the terms “comprising,” “including,” “containing,” and similar words do not exclude other elements or steps. Attached Figure Description
[0015] The above and other aspects will now be described in more detail with reference to the accompanying drawings. The drawings should not be considered limiting; rather, they are intended for interpretation and understanding.
[0016] As illustrated in the accompanying drawings, for illustrative purposes, the dimensions of layers and regions may be exaggerated and thus provided to illustrate the general structure. The same reference numerals refer to the same elements throughout.
[0017] Figure 1 The schematic map illustrates a system of networked electronic devices installed in a building.
[0018] Figure 2 A schematic map illustrates networked electronic devices.
[0019] Figure 3 The schematic map illustrates a method for determining the distance between two networked electronic devices using sound characteristics.
[0020] Figure 4 This is a block diagram of a method for determining the distance between a first electronic device and a second electronic device. Detailed Implementation
[0021] The invention will now be described more fully below with reference to the accompanying drawings, in which presently preferred embodiments of the invention are illustrated. However, the invention may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided to be thorough and complete and to fully convey the scope of the invention to those skilled in the art.
[0022] Figure 1 The diagram illustrates a system 10 of a networked electronic device 100 installed in building 50. This networked electronic device is schematically illustrated in... Figure 2Each networked electronic device 100 has a speaker 110 and a microphone 120. Examples of such networked electronic devices 100 are networked speakers, networked surveillance cameras, and / or networked access control devices. In addition to the speaker 110 and microphone 120, the networked electronic device 100 may also include circuitry 130, memory 140, and a communication module 150. The communication module 150 is configured to send and / or receive data via a communication network to which the networked electronic device 100 is connected. The circuitry 130 is configured to perform overall control of the functions and operations of the networked electronic device 100. The circuitry 130 may include a processor such as a central processing unit (CPU), a microcontroller, or a microprocessor. The processor is configured to execute program code stored in memory 140 to perform the functions and operations of the networked electronic device 100. Memory 140 may be one or more of a buffer, flash memory, hard disk drive, removable media, volatile memory, non-volatile memory, random access memory (RAM), or other suitable devices. In a typical arrangement, memory 140 may include non-volatile memory for long-term data storage and volatile memory serving as system memory for the networked electronic device 100. Memory 140 may exchange data with circuitry 130, speaker 110, microphone 120, and / or communication module 150 via data bus 160. The functions and operations of the networked electronic device 100 may be embodied in executable logic routines (e.g., lines of code, software programs, etc.) stored on a non-transitory computer-readable medium (e.g., memory 140) of the networked electronic device 100 and executed by circuitry 130 (e.g., using a processor). Furthermore, the functions and operations of the networked electronic device 100 may be standalone software applications or part of a software application that performs additional tasks associated with the networked electronic device 100. These functions and operations may be considered as a method, and the networked electronic device 100 may be configured to perform that method. Additionally, while these functions and operations may be implemented in software, such functions may also be executed via dedicated hardware or firmware, or a combination of hardware, firmware, and / or software.
[0023] For some applications, such as during the commissioning of system 10 of networked electronic devices 100, it is necessary to determine the distance between different networked electronic devices 100. Various methods exist for determining distances, such as measuring tapes, laser rangefinders, or sonar. However, none of these are optimal for determining the distance between two networked electronic devices 100 installed in building 50.
[0024] The inventors of this invention have realized that the characteristics of sound can be used when determining the distance between two networked electronic devices 100a and 100b, each equipped with a speaker and a microphone. This will now be discussed in conjunction with... Figure 3 and Figure 4 Let's discuss this. Figure 3 The schematic map illustrates the use of sound characteristics to determine the distance between two networked electronic devices 100a and 100b, and Figure 4 This is a block diagram of a method for determining the distance between a first electronic device 100a and a second electronic device 100b.
[0025] The first networked electronic device 100a is instructed to transmit a first sound signal 300 via its speaker, S402. The first sound signal 300 includes a first measurement wave 310 carrying a first frequency on a first carrier 320 having a first carrier frequency. Along Figure 3 The "forward path" diagram shows the first sound signal 300.
[0026] A second networked electronic device 100b, within the audible range of the first audio signal 300, is configured to listen to the first audio signal 300 via its microphone. Therefore, the second networked electronic device 100b is configured to receive the first audio signal in S404.
[0027] Upon receiving the first audio signal 300, the second networked electronic device 100b is configured to transmit, in S406, a second audio signal 350 having a second measurement wave 360 via its speaker. The second measurement wave 360 has the same first frequency as the first measurement wave 310, but is carried on a second carrier 370 having a second carrier frequency different from the first carrier frequency. Along... Figure 3 The “return path” diagram illustrates the second audio signal 350. By using a second carrier frequency that is different from the first carrier frequency, the second audio signal 350 can be distinguished from the echo of the first audio signal 300 from other structures.
[0028] Furthermore, the second networked electronic device 100b is configured to shift the phase of the second measurement wave 360 such that it simulates the reflection of the first measurement wave 310 on the second networked electronic device 100b. That is, at the second networked electronic device 100b, the phase of the second measurement wave 360 is set to be the same as the phase of the first measurement wave 320. Therefore, the second networked electronic device 100b is configured to define a second audio signal 350 such that the phase of the second measurement wave 360 is set to simulate the reflection of the first measurement wave 310 on the second networked electronic device 100b. The circuitry of the second networked electronic device 100b can be used to define the second audio signal 350. Therefore, the second networked electronic device 100b is configured to respond using a second audio signal 350 comprising a second measurement wave 360 having the same phase as the first measurement wave 310 of the incoming first audio signal 300. That is, the second networked electronic device 100b is configured to simulate the reflection of the first measurement wave 310. However, in order to distinguish the simulated reflection from real reflections on other structures, the second networking electronic device 100b is configured to carry a second measurement wave 360 on a second carrier 370 having a carrier frequency different from that of the first audio signal 300. In other words, defining the second audio signal 350 includes setting the phase of the second measurement wave 360 to be the same as the phase of the first measurement wave 310 of the first audio signal 300 received by the second microphone of the second networking electronic device 100b. Setting the phase of the second measurement wave 360 may include determining the phase of the second measurement wave 360 based on the processing time when the circuit at the second networking electronic device 100b analyzes the first audio signal 300, in order to determine the phase of the received first measurement wave 310. In doing so, the phase of the second measurement wave 360 can be timed with the phase of the received first measurement wave 310. Alternatively or in combination, defining and transmitting the second audio signal 350 may include: i) transmitting a candidate second audio signal; ii) while listening with a second microphone of the second networking electronic device 100b, shifting the phase of a second measurement wave of the candidate second audio signal until the phases of the received first measurement wave 310 and the second measurement wave of the candidate second audio signal match; and iii) when the phases of the received first measurement wave 310 and the second measurement wave of the candidate second audio signal match, transmitting the second audio signal 350 having the matched phase.
[0029] Then, the first networked electronic device 100a is configured to listen to the second audio signal 350 via its microphone 120a. Therefore, the first networked electronic device 100a is configured to receive the second audio signal in S408.
[0030] Then, the distance between the first networked electronic device 100a and the second networked electronic device 100b can be determined based on the phase shift between the first measurement wave 310 emitted at the first networked electronic device 100a and the second measurement wave 360 received at the first networked electronic device 100a. This is because this phase shift will depend on the distance between the first networked electronic device 100a and the second networked electronic device 100b. The distance D between the first networked electronic device 100a and the second networked electronic device 100b can be expressed as:
[0031]
[0032] Where Δφ is the phase shift [expressed in radians], and λ is the wavelength of the measured wave, defined as:
[0033]
[0034] in The frequencies of the measured waves 310 and 360 are the first frequencies discussed above. This is done under the assumption that the distance between the first networked electronic device 100a and the second networked electronic device 100b is within half the wavelength. Therefore, the distance D between the first networked electronic device 100a and the second networked electronic device 100b is calculated in S410 based on the phase shift between the transmitted first measured wave 310 and the received second measured wave 360. Calculation S410 is preferably performed by the circuitry of the first networked electronic device 100a. However, calculation S410 can be performed at any other device that has computing capabilities and is connected to the first networked electronic device 100a so that it can transmit phase shifts or information for calculating phase shifts.
[0035] Assuming the feasible distance to be measured is between 1 meter and 50 meters, the first frequency should be in the range of 160 Hz to 3.3 Hz. The frequencies of the first carrier 320 and the second carrier 370 should be higher than the first frequency, and therefore typically above 200 Hz. The upper limit of the frequencies of the first carrier 320 and the second carrier 370 is typically 20,000 Hz. As mentioned above, the first carrier 320 and the second carrier 370 are set to have different carrier frequencies. By using different carrier frequencies for the different carriers 320 and 370, the second audio signal 350 can be distinguished from the echo of the first audio signal 300 from other structures in the building. Furthermore, the identity of the networked electronic device 100 can be encoded by assigning a specific carrier frequency to a specific networked electronic device. Typically, the first audio signal 300 and the second audio signal 350 are sinusoidal amplitude-modulated signals. However, any periodic signal that can be carried by a carrier can also work.
[0036] Those skilled in the art will recognize that the present invention is by no means limited to the content explicitly described above. On the contrary, many modifications and variations are possible within the scope of the present invention.
[0037] For example, in some applications, both the first and second networked electronic devices are fixedly installed in a building. In other applications, the first electronic device may be a portable electronic device, such as a mobile phone.
[0038] Furthermore, those skilled in the art, when practicing the claimed invention, can understand and implement various variations by studying the accompanying drawings and this disclosure.
Claims
1. A method for determining the distance between a first networked electronic device having a first speaker and a first microphone and a second networked electronic device having a second speaker and a second microphone, the method comprising: The first loudspeaker is used to emit a first sound signal comprising a first measurement wave having a first frequency carried on a first carrier wave, the first carrier wave having a first carrier frequency higher than the first frequency, wherein the first sound signal is sinusoidally amplitude modulated. The second microphone is used to receive the first sound signal; The method further includes: The second networked electronic device defines a second audio signal including a second measurement wave having the first frequency carried on a second carrier, the second carrier having a second carrier frequency different from the first carrier frequency, wherein the second audio signal is sinusoidally amplitude modulated, and wherein defining the second audio signal includes: setting the phase of the second measurement wave to be the same as the phase of the first measurement wave of the first audio signal received by the second microphone, such that the phase of the second measurement wave is set to simulate the reflection of the first measurement wave on the second networked electronic device; The second speaker is used to emit the second sound signal; Using the first microphone to receive the second sound signal; and The distance between the first networked electronic device and the second networked electronic device is calculated based on the phase shift between the transmitted first measurement wave and the received second measurement wave.
2. The method according to claim 1, wherein, The first frequency of the first measurement wave and the second measurement wave is in the range of 3 Hz to 160 Hz.
3. The method according to claim 1, wherein, The first carrier and the second carrier have carrier frequencies in the range of 200Hz to 20000Hz.
4. The method according to claim 1, wherein, Setting the phase of the second measurement wave includes: The phase of the second measurement wave is determined based on the processing time of the first audio signal analyzed by the circuit at the second networked electronic device, so as to determine the phase of the received first measurement wave.
5. The method according to claim 1, wherein, Limiting and transmitting the second sound signal includes: Transmit the candidate second sound signal; While listening with the second microphone, the phase of the second measurement wave of the candidate second sound signal is shifted until the phase of the received first measurement wave matches the phase of the second measurement wave of the candidate second sound signal; and When the phase of the received first measurement wave matches the phase of the second measurement wave of the candidate second sound signal, the second sound signal having the matched phase is transmitted.
6. A system for determining the distance between a first networked electronic device and a second networked electronic device, the system comprising: The first networked electronic device has a first speaker and a first microphone; as well as The second networked electronic device has a second speaker and a second microphone; The first networked electronic device further includes a first circuit, which is configured to: The definition includes a first sound signal carrying a first measurement wave with a first frequency on a first carrier wave, the first carrier wave having a first carrier frequency higher than the first frequency, wherein the first sound signal is sinusoidally amplitude modulated, and Drive the first speaker to emit the first sound signal; The second networked electronic device further includes a second circuit, which is configured to: The first sound signal is analyzed when it is registered by the second microphone; The definition includes a second audio signal carrying a second measurement wave having the first frequency on a second carrier, the second carrier having a second carrier frequency higher than the first frequency and different from the first carrier frequency, wherein the second audio signal is sinusoidally amplitude modulated, and wherein defining the second audio signal includes: setting the phase of the second measurement wave to be the same as the phase of the first measurement wave of the first audio signal received by the second microphone, such that the phase of the second measurement wave is set such that it simulates the reflection of the first measurement wave of the first audio signal on the second networked electronic device; and Drive the second speaker to emit the second sound signal; The first circuit of the first networked electronic device is further configured as follows: The second sound signal is analyzed when it is registered by the first microphone; Determine the phase shift between the transmitted first measurement wave and the received second measurement wave; and The distance between the first networked electronic device and the second networked electronic device is calculated based on the determined phase shift.
7. The system according to claim 6, wherein, The first frequency of the first measurement wave and the second measurement wave is in the range of 3 Hz to 160 Hz.
8. The system according to claim 6, wherein, The first carrier and the second carrier have carrier frequencies in the range of 200Hz to 20000Hz.
Citation Information
Patent Citations
Method and system for determining a position of a microphone
CN110320498A
Method and system for locating mobile device relative to vehicle
CN110988798A