Patent Description:
In many applications there is a need to determine a distance between a first device and a second device. It is, e.g., known to perform distance measurements using different methods such as using a tape-measure, a laser-based range finder, or a sonar. The different methods have their pros and cons.

The inventors of the present invention have realized that there is a need for an additional method of determining a distance between a first device and a second device, especially for the case of determining a distance between devices of a system of devices mounted in a building.

<CIT> discloses interactive toys. A relative distance between the toys may be determined based on analyzing sound signals.

<CIT> discloses a sonar target simulator.

In view of the above, it is an object of the present invention to provide a method of determining a distance between a first device and a second device.

According to the invention a method for determining a distance between a first networked electronic device and a second networked electronic device is provided. The first networked electronic device has a first loudspeaker and a first microphone. The second networked electronic device has a second loudspeaker and a second microphone. The method comprises emitting, using the first loudspeaker, a first sound signal. The first sound signal comprises a first measuring wave having a first frequency carried on a first carrier wave having a first carrier frequency. The first carrier frequency is higher than the first frequency. The method further comprises receiving, using the second microphone, the first sound signal. The method further comprises defining, at the second electronic device, a second sound signal. The second sound signal comprises a second measuring wave carried on a second carrier wave. The second measuring wave has the same frequency as the first measuring wave. Hence, the second measuring wave has the first frequency. The second carrier wave has a second carrier frequency different from the first carrier frequency. A phase of the second measuring wave is set such that it simulates a reflection of the first measuring wave on the second networked electronic device. The method further comprises emitting, using the second loudspeaker, the second sound signal. The method further comprises receiving, using the first microphone, the second sound signal. The method further comprises calculating the distance between the first networked electronic device and the second networked electronic device based on a phase shift between the emitted first measuring wave and the received second measuring wave. The first and second sound signals are sinusoidal amplitude modulated.

In line with the above, the inventors have realized that by using properties of sound, a distance between two devices each equipped with a loudspeaker and a microphone can be determined. This by looking at a phase shift of a low frequency periodic measuring wave carried on a sound-based carrier wave. The low frequency periodic measuring wave might even be below <NUM>. In order to determine distances in the range of <NUM> to <NUM> the frequency of the measuring wave needs to be <NUM>-<NUM>. That since the wavelength of the measuring wave needs to be longer than half the distance between the two devices. Most loudspeakers cannot reproduce waves having such low frequencies. By using a carrier wave emitting a measuring wave having as low frequency as discussed above is provided for.

The first and second carrier waves may have a carrier frequency in a range of <NUM>-<NUM><NUM>.

Defining the second sound signal comprises setting the phase of the second measuring wave to be same as a phase of the first measuring wave of the by the second microphone received first sound signal.

Setting the phase of the second measuring wave may comprises determining the phase of the second measuring wave based on a processing time of a circuitry at the second networked electronic device analyzing the first sound signal in order to determine the phase of the received first measuring wave.

Defining and emitting the second sound signal may comprise emitting a candidate second sound signal; shifting, while listening with the second microphone, the phase of the second measuring wave of the candidate second sound signal until the phases of the received first measuring wave and the second measuring wave of the candidate second sound signal match up; and upon the phases of the received first measuring wave and the second measuring wave of the candidate second sound signal matching up, emitting the second sound signal as having the matched-up phase.

According to the invention a system for determining a distance between a first networked electronic device and a second networked electronic device is provided in appended claim <NUM>.

The above-mentioned features of the method, when applicable, apply to this system as well. In order to avoid undue repetition, reference is made to the above.

A further scope of applicability will become apparent from the detailed description given below. However, it should be understood that the detailed description and specific examples are given by way of illustration only.

It is to be understood that the terminology used herein is for purpose of describing particular embodiments only, and is not intended to be limiting.

The above and other aspects will now be described in more detail, with reference to appended figures. The figures should not be considered limiting; instead they are used for explaining and understanding.

As illustrated in the figures, the sizes of layers and regions may be exaggerated for illustrative purposes and, thus, are provided to illustrate the general structures.

<FIG> illustrates a system <NUM> of networked electronic devices <NUM> mounted in a building <NUM>. Such a networked electronic device is schematically illustrated in <FIG>. Each networked electronic device <NUM> has a loudspeaker <NUM> and a microphone <NUM>. Examples of such networked electronic devices <NUM> are networked loudspeakers, networked monitoring cameras and/or networked access control devices. In addition to the loudspeaker <NUM> and a microphone <NUM>, the networked electronic device <NUM> may comprise circuitry <NUM>, a memory <NUM> and a communication module <NUM>. The communication module <NUM> is configured to send and/or receive data via a communication network to which the networked electronic device <NUM> is connected. The circuitry <NUM> is configured to carry out overall control of functions and operations of the networked electronic device <NUM>. The circuitry <NUM> may include a processor, such as a central processing unit (CPU), microcontroller, or microprocessor. The processor is configured to execute program code stored in the memory <NUM>, in order to carry out functions and operations of the networked electronic device <NUM>. The memory <NUM> may be one or more of a buffer, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, a random access memory (RAM), or another suitable device. In a typical arrangement, the memory <NUM> may include a non-volatile memory for long term data storage and a volatile memory that functions as system memory for the networked electronic device <NUM>. The memory <NUM> may exchange data with the circuitry <NUM>, the loudspeaker <NUM>, the microphone <NUM> and/or the communication module <NUM> over a data bus <NUM>. Functions and operations of the networked electronic device <NUM> may be embodied in the form of executable logic routines (e.g., lines of code, software programs, etc.) that are stored on a non-transitory computer readable medium (e.g., the memory <NUM>) of the networked electronic device <NUM> and are executed by the circuitry <NUM> (e.g., using the processor). Furthermore, the functions and operations of the networked electronic device <NUM> may be a stand-alone software application or form a part of a software application that carries out additional tasks related to the networked electronic device <NUM>. The functions and operations may be considered a method that the networked electronic device <NUM> is configured to carry out. Also, while the functions and operations may be implemented in software, such functionality may as well be carried out via dedicated hardware or firmware, or some combination of hardware, firmware and/or software.

For some applications, such as during commissioning of the system <NUM> of networked electronic devices <NUM>, distances between the different networked electronic devices <NUM> are to be determined. Various methods for determining distance exist as of today, e.g., tape-measure, a laser-based range finder, or a sonar. However, none of them are optimal for determining a distance between two networked electronic devises <NUM> being mounted in a building <NUM>.

The inventors of the present invention have realized that properties of sound can be used in determining a distance between two networked electronic devices 100a, 100b each equipped with a loudspeaker and a microphone. This will now be discussed in connection with <FIG> and <FIG>. <FIG> schematically illustrates using properties of sound for determining a distance between two networked electronic devices 100a, 100b and <FIG> is a block diagram of a method for determining a distance between the first electronic device 100a and the second electronic device 100b.

A first networked electronic devices 100a is instructed to emit S402, via its loudspeaker, a first sound signal <NUM> comprising a first measuring wave <NUM> having a first frequency carried on a first carrier wave <NUM> having a first carrier frequency. The first sound signal <NUM> is illustrated along the "Forward path" in <FIG>.

A second networked electronic device 100b, within earshot of the first sound signal <NUM>, is set to, via its microphone, listen to the first sound signal <NUM>. Hence, the second networked electronic device 100b is set to receive S404 the first sound signal.

Upon receipt of the first sound signal <NUM>, the second networked electronic device 100b is set to, via its loudspeaker, emit S406 a second sound signal <NUM> having a second measuring wave <NUM>. The second measuring wave <NUM> has the same first frequency as the first measuring wave <NUM> but carried on a second carrier wave <NUM> having a second carrier frequency different from the first carrier frequency. The second sound signal <NUM> is illustrated along the "Return path" in <FIG>. By using the second carrier frequency different from the first carrier frequency the second sound signal <NUM> may be differentiated from echoes of the first sound signal <NUM> from other structures.

Further, the second networked electronic device 100b is set to shift a phase of the second measuring wave <NUM> so that it simulates a reflection of the first measuring wave <NUM> on the second networked electronic device 100b. That is, the phase of the second measuring wave <NUM> is to be set to be same as a phase of the first measuring wave <NUM> at the second networked electronic device 100b. Hence, the second networked electronic device 100b is set to define the second sound signal <NUM> such that a phase of the second measuring wave <NUM> is set such that it simulates a reflection of the first measuring wave <NUM> on the second networked electronic device 100b. The second sound signal <NUM> may be defined using circuitry of the second networked electronic device 100b. Hence, the second networked electronic device 100b is set to answer with a second sound signal <NUM> comprising a second measuring wave <NUM> having the same phase as the first measuring wave <NUM> of the incoming first sound signal <NUM>. That is, the second networked electronic device 100b is set to simulate a reflection of the first measuring wave <NUM>. However, in order to distinguish the simulated reflection from real reflections on other structures, the second networked electronic device 100b is set to carry the second measuring wave <NUM> on a second carrier wave <NUM> having a carrier frequency different from the carrier frequency of the first sound signal <NUM>. In other words, defining the second sound signal <NUM> comprises setting the phase of the second measuring wave <NUM> to be same as a phase of the first measuring wave <NUM> of the by the second microphone of the second networked electronic device 100b received first sound signal <NUM>. Setting the phase of the second measuring wave <NUM> may comprise determining the phase of the second measuring wave <NUM> based on a processing time of a circuitry at the second networked electronic device 100b analyzing the first sound signal <NUM> in order to determine the phase of the received first measuring wave <NUM>. Doing so the phase of the second measuring wave <NUM> can be timed with the phase of the received first measuring wave <NUM>. Alternatively, or in combination, defining and emitting the second sound signal <NUM> may comprise: i) emitting a candidate second sound signal, ii) shifting, while listening with the second microphone of the second networked electronic device 100b, the phase of the second measuring wave of the candidate second sound signal until the phases of the received first measuring wave <NUM> and the second measuring wave of the candidate second sound signal match up, and iii) upon the phases of the received first measuring wave <NUM> and the second measuring wave of the candidate second sound signal matching up, emitting the second sound signal <NUM> as having the matched-up phase.

The first networked electronic device 100a is then set to, via its microphone 120a, listen to the second sound signal <NUM>. Hence, the first networked electronic device 100a is set to receive S408 the second sound signal.

A distance between the first networked electronic device 100a and the second networked electronic device 100b can then be determined based on a phase shift between the, at the first networked electronic device 100a, emitted first measuring wave <NUM> and the, at the first networked electronic device 100a, received second measuring wave <NUM>. This since such a phase shift will depend on the distance between the first and second networked electronic devices 100a, 100b. The distance, D, between the first and second networked electronic devices 100a, 100b can be expressed as: <MAT> where ΔΦ is the phase shift [expressed in radians] and λ is the wavelength of the measuring wave defined as: <MAT> where f is the frequency of the measuring waves <NUM>, <NUM>, i.e., the first frequency discussed above. This under the assumption that the distance between the first and second networked electronic devices 100a, 100b is within half a wavelength. Hence, the distance D between the first networked electronic device 100a and the second networked electronic device 100b is calculated S410 based on a phase shift between the emitted first measuring wave <NUM> and the received second measuring wave <NUM>. The calculating S410 is preferably made by circuitry of the first networked electronic device 100a. However, the calculating S410 can be made at any other device having computational capabilities and being connected to the first networked electronic device 100a so that the phase shift or information for calculating the phase shift may be communicated thereto.

Assuming the workable range for the distance one would want to measure is between <NUM> and <NUM>, then the first frequency should be in the range of <NUM> and <NUM>. The frequency for the first and second carrier waves <NUM>, <NUM> shall be higher than the first frequency, hence typically above <NUM>. An upper limit for the frequency of the first and second carrier waves <NUM>, <NUM> is typically <NUM><NUM>. As mentioned above, the first and second carrier waves <NUM>, <NUM> are set to have different carrier frequencies. By using different carrier frequencies for the different carrier waves <NUM>, <NUM> the second sound signal <NUM> may be differentiated from echoes of the first sound signal <NUM> from other structures in the building. Further, an identity of the networked electronic devices <NUM> can be encoded by assigning a specific carrier frequency to a specific networked electronic device. Typically, the first and second sound signals <NUM>, <NUM> are sinusoidal amplitude modulated signals. However, any periodic signal that can be carried by a carrier wave would work.

The person skilled in the art realizes that the present invention by no means is limited to what is explicitly described above.

For example, in some applications both the first and the second networked electronic devices are fixedly mounted in the building. In other applications the first electronic device may be a portable electronic device, such as a mobile phone.

Claim 1:
A method for determining a distance between a first networked electronic device (100a) having a first loudspeaker and a first microphone and a second networked electronic device (100b) having a second loudspeaker and a second microphone, the method comprising:
emitting (S402), using the first loudspeaker, a first sound signal (<NUM>) comprising a first measuring wave (<NUM>) having a first frequency carried on a first carrier wave (<NUM>) having a first carrier frequency being higher than the first frequency, wherein the first sound signal (<NUM>) is sinusoidal amplitude modulated;
receiving (S404), using the second microphone, the first sound signal (<NUM>);
the method further comprising:
defining, at the second electronic device (100b), a second sound signal (<NUM>) comprising a second measuring wave (<NUM>) having the first frequency carried on a second carrier wave (<NUM>) having a second carrier frequency different from the first carrier frequency, wherein the second sound signal (<NUM>) is sinusoidal amplitude modulated and wherein defining the second sound signal (<NUM>) comprises setting the phase of the second measuring wave (<NUM>) to be same as a phase of the first measuring wave (<NUM>) of the by the second microphone received first sound signal (<NUM>) thereby a phase of the second measuring wave (<NUM>) is set such that it simulates a reflection of the first measuring wave (<NUM>) on the second networked electronic device (100b);
emitting (S406), using the second loudspeaker, the second sound signal (<NUM>);
receiving (S408), using the first microphone, the second sound signal (<NUM>); and
calculating (S410) the distance between the first networked electronic device (100a) and the second networked electronic device (100b) based on a phase shift between the emitted first measuring wave (<NUM>) and the received second measuring wave (<NUM>).