Two-sided two-way ranging protocol based on synthetic ultrasonic sounds

The bidirectional ranging protocol using synthesized sound waveforms with gaps improves measurement accuracy by generating a triple peak pattern, addressing the issues of noise and interference in conventional methods to achieve precise distance determination.

JP2024531937AActive Publication Date: 2024-09-03INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2024507902
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-08-25
Filing Date
2022-08-22
Publication Date
2024-09-03
Estimated Expiration
2042-08-22

AI Technical Summary

Technical Problem

Conventional two-way ranging methods using sound signals face challenges in accurately determining the time of transmission and reception due to noise and interference, leading to false peak detection and reduced measurement accuracy.

Method used

A bidirectional ranging protocol utilizing synthesized sounds composed of waveforms separated by gaps generates a bipolar waveform, facilitating precise time-of-flight determination by producing a distinct triple peak pattern in cross-correlation measurements.

Benefits of technology

This approach enhances measurement accuracy to sub-millisecond precision by clearly identifying the correct peak in cross-correlation signals, enabling precise distance estimation between devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024531937000001
    Figure 2024531937000001
Patent Text Reader

Abstract

A method for determining a distance between two devices, which may be wireless devices such as handheld devices. The method performs a two-sided two-way ranging protocol in the two devices. The protocol has the two devices transmit and receive signals using a two-way ranging method for the purpose of determining a distance between the two devices. Here, each of the signals is a composite sound generated as a combination of two waveforms separated in time by a gap to form a bipolar waveform. The gap is a zero or low amplitude signal, contrasting the two waveforms. A particular pattern in the correlation footprint facilitates determining the time of flight. The method can be used to measure social distancing.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates generally to a computerized method, device, and computer program product for determining the range between a pair of devices using a two-sided two-way ranging protocol, and in particular to a method for two-way ranging based on (near) ultrasonic sounds generated as a composite of core waveforms separated in time by a gap. [Background technology]

[0002] Two-way ranging techniques are commonly used to measure the distance between two wireless devices. In radio engineering, this technique utilizes the delay that naturally occurs during signal transmission (also known as time of flight) to determine the distance between two devices such as stations. For example, a first signal is transmitted from a first node A to a second node B. The time difference between the transmission from the first node and the reception at the second node (called the signal propagation delay) can be calculated. The first node A then receives an acknowledgement (i.e., the second signal) from the second node B. This acknowledgement is transmitted after some processing time (called the processing delay), i.e., the time required for the second node B to process the incoming first signal, generate an acknowledgement, and set it up for transmission. Thus, a further signal propagation delay can be calculated by the first node A upon receiving the acknowledgement signal from node B. The signal propagation delay is finally used to determine the distance between the two nodes.

[0003] This method is two-sided in that only two nodes are involved in measuring the distance between them. It is two-sided in that a first signal (also called a test signal, e.g. a test packet) is sent from one of the two devices, and then a second signal (an acknowledgment) is sent from the other of the two devices.

[0004] The above process is typically mirrored at the second node. In this case, the method is symmetric in that the measurements from node A to node B are mirrored at the second node, and the method is called symmetric double-sided two-way ranging.

[0005] One may wish to implement a two-way ranging method based on tones (i.e., sounds) exchanged between two devices. With conventional two-way ranging techniques, one problem is to be able to detect the exact moment when the sound is transmitted and received by the transmitter and receiver on both sides. Ideally, sub-millisecond accuracy is desired. Prior art methods typically attempt to achieve this by recording the voice before or during a call of the protocol as described above, and then locating a transmission fingerprint in the recording. Such methods look for significant (temporal) peaks in a cross-correlation measurement taken between a known transmitted waveform and a recorded signal. However, in practice, there are many false peaks in the cross-correlation measurement due to factors such as noise and interference on the transmitted signal, e.g., multiple echoes (also known as the "multipath problem"). Being able to detect the correct peaks in the cross-correlation signal is important for the accuracy of the measurement. Summary of the Invention

[0006] According to a first aspect, the invention is embodied as a method for determining the distance between two devices, i.e. a first device and a second device, which may be wireless devices, such as a handheld device. The method essentially revolves around performing a two-sided two-way ranging protocol in the two devices. This protocol causes the two devices to transmit and receive signals with the aim of determining the distance between the two devices, as in known two-way ranging methods. However, in this case, each of the signals is a composite sound generated as a combination of two waveforms separated in time by a gap, such that the combination forms a bipolar waveform. The gap is a zero or low amplitude signal, making the two waveforms substantially contrast (in terms of amplitude). This gives rise to a specific pattern in the correlation footprint, significantly facilitating the determination of the time of flight. Such a method can be advantageously used to measure social distancing (or social contact).

[0007] According to another aspect, the invention is embodied as a device comprising a processing means, and a sound generator, a transmitter, and a receiver, each connected to the processing means, the processing means configured to orchestrate the operation of the sound generator, the transmitter, and the receiver in accordance with the method described above, such that the device performs a two-sided two-way ranging protocol with a remote device.

[0008] In operation, the device transmits a first signal to a remote device at a first time. The device then receives a second signal transmitted by a second device at a second time. The processing means is configured to obtain a comparand based on the received second signal, and then correlates the expected signal with this comparand to determine a second time, based on which the time interval between the first and second times is calculated. Note that this comparand may be advantageously obtained based on both the first signal (transmitted) and the second signal (received). Another correlation operation may then be performed to accurately determine the first time, i.e. the time when the first signal was transmitted. The distance between the two devices is finally determined according to the time interval. Each of the first and second signals is a composite sound generated as a composition of two waveforms separated in time by a gap such that the composition forms a bipolar waveform.

[0009] According to a final aspect, the invention is embodied in a computer program product comprising a computer readable storage medium having embodied thereon program instructions executable by a processing means of a device to cause the device to perform a double-sided two-way ranging protocol in accordance with the method described above.

[0010] The above and other objects, features and advantages of the present invention will become apparent from the following detailed description of illustrative embodiments thereof, which should be read in connection with the accompanying drawings, which are for clarity in aiding those skilled in the art in understanding the invention in conjunction with the detailed description. The drawings include: [Brief description of the drawings]

[0011] [Figure 1A] FIG. 1 is a schematic diagram of two devices (here smartphones) transmitting and receiving signals according to an embodiment of the present invention. [Figure 1B] FIG. 2 is a schematic diagram illustrating selected components of such a device, according to an embodiment. [Diagram 2] A diagram showing a sequence of operations performed in two devices such as those shown in FIG. 1A as part of a two-sided two-way ranging protocol, according to an embodiment. [Figure 3A] 11A-11C are plots representing a composite sound as produced at each device, where the sound is a composite of two waveforms separated by a gap, thereby forming a bipolar waveform, according to an embodiment. [Figure 3B] 1 is a plot illustrating a typical correlation measurement exhibiting a triple peak pattern as may be obtained by a device when correlating a signal according to an embodiment. [Figure 4] 1 is a flow chart illustrating method steps for performing two-sided two-way ranging based on synthetic sound generated at a device, according to an embodiment. [Diagram 5] Fig. 4 is a flow chart showing the general steps of a method of operating devices for the purpose of measuring social distancing between users of such devices, the further method comprising, in an embodiment, scanning for devices in the vicinity of a given device for implementing a two-way ranging method as illustrated in Fig. 2 or Fig. 4. [Figure 6] 5 is a flow chart showing how to repeatedly attempt to determine the distance between any two devices using a method such as that shown in FIG. 2 or FIG. 4 in order to successfully determine the distance between the devices, according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] The accompanying drawings depict simplified representations of devices or portions thereof according to embodiments, in which like or functionally similar elements are assigned the same reference numbers unless otherwise noted.

[0013] Devices, computerized methods and computer program products embodying the invention are described below by way of non-limiting examples.

[0014] With reference to Figures 1-4, one aspect of the present invention relating to a method for determining the distance between two devices 1, 2 is first described. It should be noted that this method and its variants are collectively referred to as "the method". All reference signs Sn refer to steps of the method in the sequences and flow charts of Figures 2, 4, 5, and 6, while the reference numbers relate to the components of devices 1, 2 shown in Figures 1 and 2. In the following description, it is generally assumed that devices 1, 2 are handheld devices such as smartphones for illustration purposes. The two-way ranging step is generally referred to as step S200 in the flows of Figures 5 and 6. Figure 4 shows the detailed steps of the two-way ranging method as in the preferred embodiment. Figure 2 shows the most important operations performed to determine the distance.

[0015] The method essentially relies on the execution of a two-sided bidirectional ranging protocol S200 in two devices 1, 2. As is usual in the field to which the invention belongs, this protocol causes the two devices to transmit and receive signals. However, in the present invention, each of these signals is a composite sound generated as a composition of two waveforms separated in time by a gap, such that the composition forms a bipolar waveform. This allows to significantly improve the measurement accuracy, as will be explained in more detail below.

[0016] Various embodiments of the above protocol can be envisaged, in which signals are exchanged between a pair of devices and then processed by the devices to determine a distance value. In a preferred embodiment, one of the two devices (e.g. the first device 1) transmits a first signal to the second device 2 at a first time (step S203 in Fig. 2 and Fig. 4). The first device 1 then receives a second signal (step S204 in Fig. 2 and Fig. 4), i.e. a signal transmitted by the second device 2 after receiving the first signal in S203 (step S204a). The first device 1 then attempts to correlate the signals (step S206) in order to determine the time interval between the first and second times with a view to deriving the second time and, accordingly, the distance between the two devices in S207-S209. This time interval is referred to as the first time interval in this document, for reasons that will become clear later.

[0017] Importantly, each of the first and second signals is a composite sound (i.e., a voice) generated (steps S202, S202a) at the first device 1 and the second device 2, respectively. That is, the sound is generated as a composition of two waveforms w1, w2 separated (in time) by a gap g, as shown in FIG. 3A. Each waveform may be, for example, an ultrasonic or near-ultrasonic waveform, for reasons that will be explained later. That is, each sound is generated as a temporal composition, i.e., a continuous signal segment including a waveform w1, a gap g, and another waveform w2. The resulting sound is therefore a time-dependent bipolar signal, i.e., a signal having a time-dependent bipolar wave structure.

[0018] The gap g ideally corresponds to a zero amplitude signal, but may also contain noise at low to very low amplitude levels. That is, the amplitude of the signal in the gap g is significantly smaller than the amplitude of the signals corresponding to the two waveforms w1, w2, if not negligible when compared. The signal-to-noise ratio (SNR) is typically at least greater than 10, but preferably greater than 20, e.g., 30. The SNR may also be expressed as the SNR dB =10log 10It can be expressed in decibels as (SNR). dB may be selected to ensure at least a 15 dB difference between the waveforms and the gap, corresponding to an SNR of approximately 31.6, for example. If each of the waveforms averages -60 dB, then the noise level should typically be less than -75 dB on average. Thus, low or very low signal amplitudes at the level of the gap g will result in, in effect, a time gap between the two waveforms w1, w2 in the generated sound.

[0019] The preferred embodiment described above focuses on the first device 1 performing steps S203-S209 in the flow of Fig. 4. However, the mirror steps are typically performed in the second device 2, whereby the second device receives a first signal S203a, transmits a second signal S204a, and attempts to perform a correlation aimed at determining a second time interval between the receive time and the transmit time, also referred to herein as a third time and a fourth time, respectively, S206a. With the first and second time intervals determined, the devices 1, 2 can derive the time of flight and thus the distance between the two devices S209, S209a. Due to the symmetry of the operations performed in the two devices, such an embodiment can be considered as a symmetric double-sided two-way ranging method.

[0020] Each device 1, 2 is possibly able to determine with high precision the time when it transmits its own signal. In this case, it is sufficient for the device 1, 2 to correlate the predicted signal (i.e. the signal it expects to receive from the other device) with a comparand obtained by recording the received signal, in order to determine the reception time with high precision.

[0021] If the device cannot determine the transmission time with high accuracy, its comparands may further include recording the transmitted signal (in addition to recording the received signal), and recording S201, S201a must start early enough. In this case, the comparands include recording of both the transmitted and received signals. In this way, the time when the signal was transmitted (t1 or t 2’ ) with high accuracy, each device 1, 2 may further correlate its own representation of the transmitted signal with a comparand. Thereby, two correlation operations are performed, one correlation operation aimed at determining the time of receipt and the other one aimed at determining the time of transmission. The comparand numbers used by the two devices 1, 2 are called the first comparand and the second comparand respectively. Finally, the first device 1 determines the time of transmission (t1 or t in Fig. 2). 2’ ) and the reception time (t2 or t 1’ 2), while the second device 2 determines a first time interval (Δ1 in FIG. 2) between the reception time and the transmission time.

[0022] In the above embodiment, each device 1, 2 correlates the comparand numbers formed according to its own records with the representation of its own transmitted signal S206, S206a, marking the corresponding transmission times in its records, and further correlates the comparand numbers with the representation of the transmitted signal of the corresponding device S206, S206a, marking the corresponding reception times as assumed in FIG. 4. Then, each device 1, 2 calculates the time difference between those two times S207, S207a. They then transmit the time difference obtained accordingly to each other S208, S208a, whereby the time of flight can be determined S209, S209a. This time of flight is equal to half the absolute difference between the two time intervals obtained accordingly. That is to say, the time of flight is simply calculated as |Δ1-Δ2| / 2, where Δ1=t2-t1 and Δ2=t 2’ -t1. The distance between the two devices can then be easily derived from the time of flight, based on the laws of physics. This last operation is usually just a multiplication of the speed of sound in air and the time of flight.

[0023] The method may be applied in particular to social distancing measurements. For example, the above steps may be performed in two devices 1, 2 as soon as it is determined that the two devices may be in range. For that purpose, a pre-handshake may be performed S160, which allows to determine which device will take the lead, as in the embodiments described below.

[0024] A particular advantage is the structure of the generated sound (i.e. waveform w1 - gap g - waveform w2), which allows a full recognition of the corresponding peak in the cross-correlation measurement. This peak allows a clearer, more precise and more accurate detection in practice, as shown in Fig. 3B. Unlike other waveforms, as usually used in conventional methods to generate a single central peak, the synthetic sound generated and transmitted here by each of the two devices 1, 2 (Fig. 3A) gives rise to a triple-peak pattern when correlating the signals, as illustrated in Fig. 3B. The triple-peak pattern means a large peak p2 between two small peaks p1, p3 with a gap between them, this gap having a known duration. The gap between p1 and p2 on the one hand and between p2 and p3 on the other hand is symmetrical and therefore has the same duration. This duration is determined by the gap g, which is itself pre-determined. This in turn aids in the detection of the appearance of a peak in the cross-correlation measurement obtained (in the time domain) for a more precise measurement of the time of flight, as a basis for the proximity calculation.

[0025] In other words, the present technique proposes to implement a two-way ranging method based on the exchange of certain synthetic waveforms transmitted and received as sound (i.e., voice). This technique can be advantageously used to detect precisely (e.g., with sub-millisecond accuracy) when a signal is transmitted and received, thus allowing a more accurate estimation of the distance between two devices.

[0026] As mentioned above, conventional methods typically attempt to achieve this by looking for prominent peaks in the cross-correlation signal. However, this usually leads to false peak detection due to noise and interference. In contrast, the present approach makes it easier to find the "right" peak in the cross-correlation footprint, allowing for more accurate measurements.

[0027] All this will be explained in detail below with reference to a particular embodiment of the invention. Firstly, each of the two devices 1, 2 is preferably a handheld device, for example a wireless device such as a mobile phone (smartphone), a smartwatch, a tablet or a personal assistant. In particular, when the method is carried out to measure social contacts, the devices 1, 2 may also be dedicated devices forming part of or constituting, for example, an employee tag (pager) or badge. However, in a variant, the method may be implemented in a larger device, for example a car or other vehicle.

[0028] Each of the two devices 1, 2 may include, for example, a speaker 15 and a microphone 16, respectively, for transmitting and recording signals. In addition, each device 1, 2 may comprise a processing means 11 (for example a central processing unit or CPU), a main memory 12 (connected to the processing means 11), a long-term memory (not shown), and various controllers, as required, for operating the speaker and microphone as known per se. That is, the processing means 11 is suitable to be connected to the speaker 15 and microphone 16 via a system bus, enabling them to transmit and receive signals, as required, for carrying out the method.

[0029] In particular, the first device 1 may transmit S203 a first signal via its speaker 15 and the second device 2 may detect S203a the first signal via its respective microphone 16. A second signal is then transmitted S204a via the speaker 15 of the second device 2 and received S204 at the first device 1 via the microphone 16 of the first device 1. Finally, with a view to deriving a first time interval, the first device 1 may attempt to correlate S206 by its respective processing means 11 its recording (forming a first comparand) with (i) a representation of the first signal and (ii) an expected signal. As mentioned above, similar steps can be performed at the second device 2 to derive a second time interval.

[0030] As shown in FIG. 3A, each waveform w1, w2 extends over a predefined time segment ts1, ts3, respectively. Such time segments ts1 and ts3 preferably have the same duration, i.e., ts1=ts3, as assumed in FIG. 3A. Furthermore, the duration ts2 of the gap g is preferably greater than ts=ts1=ts3. Making such gap g longer than the duration ts of the waveforms w1, w2 results in a well-decorrelated triple peak pattern, where the central peak does not overlap with the side peaks, as shown in FIG. 3B. Each of the two waveforms w1, w2 may extend over, for example, a predefined time segment ts=ts1=ts3, but the gap ts2 may be a predefined number a of such time segments ts. That is, ts2=a ts, where a>1. In addition, an additional gap (not shown) may occur before the first waveform w1. Similarly, a further gap (not shown) may occur after the second waveform w2. For example, the gap signals generated at each device 1, 2 may be padded with optional zero amplitude segments before and after each of the core waveforms w1, w2. In all cases, cross-correlation of the signals corresponding to the resulting tones accordingly produces a triple peak pattern that can be used and beneficially used to identify with high accuracy the timing of wave transmission and reception by both devices 1, 2.

[0031] It should be noted that the correlation operation performed may possibly be performed as a cross-correlation of two continuous functions representing the compared signals. However, in practice, the algorithm preferably uses discrete time series, which can be calculated for two variables X(s) and Y(t) and for all time lags s and t as C(s,t)=corr(X(s),Y(t)). Thereby, the correlation is performed on the basis of two vectors (two arrays of values) and generates at the output a further vector. The maximum of the correlation values ​​obtained at the output generates the relevant time, i.e. the time corresponding to the index corresponding to said maximum. This correlation is most practically performed as a convolution, i.e. corr(X(s),Y(t))=convolve(X(s)),reverse(Y(t)), where reverse(Y(t)) corresponds to the inverted value of Y(t), i.e. the value inverted with respect to the index (and therefore also inverted in time).

[0032] A possible implementation (Python) is as follows (the correlation function is defined as "xcorr2"): a. static public double[]xcorr2(double[]a,double[]b,String type){ b. double[]revb=ArrayUtils.clone(b); c.ArrayUtils.reverse(revb); d. double[]c = new double[]{}; e. switch(type.toLowerCase()){ f.case(”full”): g. c=MathArrays.convolve(a,revb); h.break; i. case(”valid”): j.c = convolveValid(a,revb); k.break; l. case(”same”): m. c=MathArrays.convolve(a,revb); n. break; o.} p.return c; q.}

[0033] The convolution function ("MathArrays.convolve") may be similar to the function \Apache Commons Math3.6 API.

[0034] In an embodiment, each of the two waveforms w1, w2 (when used for S202, S202a to generate the synthetic sound in each device 1, 2) is an inaudible audio frequency. Thus, the resulting sound is inaudible to humans. This is particularly beneficial when the method is applied to social distancing, where the devices 1, 2 are typically handheld devices. In particular, this frequency may be an ultrasonic or near-ultrasonic frequency. Each of the two waveforms w1, w2 is therefore an inaudible signal, typically formed in the inaudible low frequency range (±18.5-20kHz) that is inaudible to most people, although it is possible to achieve it using conventional modern telephone speaker hardware.

[0035] The two waveforms w1, w2 may be specifically formed by randomizing two ultrasonic frequencies, respectively, based on a predefined seed. That is, each device 1, 2 randomizes the two ultrasonic frequencies based on some predefined seed. The two frequencies may initially be the same. Then, each device triggers two corresponding sounds for a predefined duration, constructing the overall waveform as a combination of the first waveform, a zero or low amplitude signal gap g, and the second waveform.

[0036] It should be noted that instead of a microphone and a speaker, the devices 1, 2 may rely on other types of transducers, particularly when ultrasonic frequencies are used, in which case the receiving equipment may include a gyroscope or other type of transducer capable of picking up ultrasonic sounds.

[0037] In two-way ranging methods based on the exchange of data packets, relevant signal parameters may be included as part of the exchanged messages. However, such an approach is difficult to implement when the exchanged signals are voice signals. Moreover, such parameters may be conveniently transmitted over the S150 wireless communication channel established between the two devices 1, 2, as assumed in FIG. 5.

[0038] In this embodiment, as mentioned above, the method may further include performing a pre-handshake S160 between the two devices 1, 2 over the wireless communication channel established in step S150, as seen in Figure 5. This communication channel is preferably established S150 in accordance with a wireless technology standard such as Wi-Fi, Bluetooth, and Bluetooth Low Energy (BLE), with BLE being assumed in the accompanying drawings.

[0039] This handshake is typically performed automatically as part of a two-way ranging protocol S160, even if performed on a separate channel. That is, the two-way signal is voice propagated as sound waves, while the messages and data exchanged by the two devices 1, 2 are propagated as radio waves. As a result of this handshake, one of the two devices is designated as the leader and the other device is designated as the follower.

[0040] As in Fig. 2 and Fig. 4, the first device 1 is designated as a reader. Thus, the first device 1 imposes certain signal parameters on the second device 2 and transmits them to the second device 2 through the established communication channel during a pre-handshake S160. Such parameters may include, in particular, a seed (if necessary to randomize the ultrasonic frequency), the duration of the waveform and gap g, and a time delay before transmitting the second signal S204a. This time delay may be, for example, approximately 250 ms. This time delay must be sufficiently larger than the expected single activation time. It should be noted that this time delay may possibly be randomly selected by the first device 1 to reduce the risk of collisions with signals received from other devices, and that the device 1 may interact with several remote devices simultaneously. More precisely, this time delay may be the sum of a minimum pre-set duration and a random duration. For example, a first time delay of 50 ms may be applied before transmitting a first message tm1 and a second time delay of 250 ms may be imposed before transmitting a reply signal tm2. The recording duration is typically on the order of 1 second for each device 1, 2 to ensure that each recording captures both the transmitted signal and the reply signal.

[0041] In the embodiment described above, the leader 1 imposes the signal parameters and forwards them to the follower 2. In a variant, some or all of these parameters may be pre-determined and fixed as part of the requirements of the protocol. In another variant, the pre-handshake S160 may cause the two devices 1, 2 to exchange their corresponding seeds, as well as the duration of the waveform and gap g, it being noted that this gap does not have to be the same for the transmitted and received signals.

[0042] Referring again to FIG. 2, it is assumed that the first device 1 is designated as the leader and therefore, once the handshake is completed S160, it transmits a first signal to the second device 2 S203. At the same time, each device 1, 2 starts listening (i.e. recording) S201, S201a immediately after the handshake is completed. In this way, the recording performed by each device 1, 2 includes a fingerprint of both the transmitted and received signals, which allows the devices to determine the relevant times and time intervals with high accuracy. It should be noted that the transmission of the first signal S203 may possibly start immediately after the handshake is completed. In a variant, there is a timeout phase before the transmission of the first signal S203, allowing the first device 1 sufficient time to generate the first signal S202 if necessary.

[0043] As can be seen in Fig. 2, the first device 1 generates a first signal ("Write(msg1)") S202 such that an audio signal tm1 is generated, which is then transmitted by the first device S203 as a sound wave at time t1 (also referred to as "first time" in this document). 1’ (also referred to in this document as "third time") S203a by the second device 2. More precisely, the second device 2 records the signal tm1 via its microphone to obtain the audio signal rm1. After a time delay (predefined and transmitted by the first device 1), the second device 2 receives the signal tm1 at time t 2’ (also referred to in this document as "fourth time") S204a. This signal is generated in step S202a in time ("Write(msg2)"). The audio signal tm2 is then received by the first device 1 at time t2 (also referred to in this document as "second time") S204. That is, the first device 1 records the audio signal tm2 via its microphone and obtains the audio signal rm2 accordingly.

[0044] Thereby, both devices record audio throughout the entire process. For this purpose, each device 1, 2 triggers audio recording via its respective microphone 16 in time to be able to receive S201, S201a, the signals transmitted by the other device 2, 1. The embodiment illustrated in figures 2 and 4 assumes that each device 1, 2 starts recording immediately after completing the handshake S160. Such recording is typically triggered only for a limited duration, for example an upper limit on the expected transmission cycle. In a variant, the devices 1, 2 may try to record only the signals of the other party, assuming that they can know with high accuracy at what time the devices 1, 2 transmitted their own signals.

[0045] The process shown in Fig. 2 may be implemented in particular as follows: First, a handshake is performed S160. Then the first device 1 starts recording S201 upon completion of the handshake and transmits its signal 50 ms later S203. The second device 2 similarly starts recording S201a upon completion of the handshake, but transmits its signal only 250 ms later S204a according to the parameters transmitted by the first device 1 during the handshake. The first device 1's recording includes its own transmission, which is then transmitted by the second device 2. Similarly, the second device 2's recording includes a transmission from device 1, which is then transmitted by device 2.

[0046] As already mentioned, each device 1, 2 may reconstruct the signal from its respective voice recording in order to later cross-correlate the reconstructed signal with the expected representation of the other party's signal and its own transmission. For this purpose, the seed and duration set during the handshake may be used. It should be noted that this signal reconstruction may involve trimming, filtering (for noise) and / or amplification of the acquired voice samples. For example, the voice samples may first be trimmed (using suitable heuristics to identify expected patterns), then denoised, amplified and, if necessary, clipped, smoothed, etc., using any suitable voice signal processing method known in the art. The reconstructed signal also provides a comparand, also referred to in this document as the first comparand (for the first device 1) and the second comparand (for the second device 2). Finally, each device 1, 2 cross-correlates its reconstructed signal (comparand) with (i) its own transmission and respective representations of the expected signal (the signal expected to be received by the handshake) S206, S206a. Each cross-correlation produces a triple peak pattern as shown in FIG. 3B. The central peak can be located in time with high accuracy (with negligible error). This allows the relative time (on each side) and therefore the corresponding time interval (on each side) to be determined. Corresponding times of flight can then be derived to determine the distance between the two devices.

[0047] This therefore allows the time of appearance in the triple peak pattern obtained from the correlation to be determined. The detection in time of the triple peak pattern is then used to determine the time interval, i.e. the delta time lag between the transmission time and the reception time, denoted in FIG. 2 by Δ1 and Δ2 S207, S207a. The time lag calculated by each side 1, 2 can then be communicated S208, S208a to the other side on the wrapping communication channel. In this way, each device 1, 2 can calculate the distance. In a variant, one of the devices 1, 2 may send the time lag calculated by it to the other side, for which it calculates the distance and then sends back the calculated distance, and the corresponding device derives the time lag and then the distance.

[0048] Figure 4 shows a preferred flow of operation, which will be explained in detail below. After a handshake S160 (Figure 5) in which the first device 1 is designated as a leader, the first device 1 starts recording S201 (possibly after a timeout phase) and generates a first signal as a synthetic sound, as described above S202. In step S203, the first device 1 transmits a first signal through its speaker. This signal is recorded by the second device 2. The first device 1 then receives a response signal in step S204, i.e. records a corresponding waveform through its microphone. In step S205, the signal is reconstructed from this audio recording, the reconstructed signal providing a first comparand. Finally, the device 1 correlates this comparand with the respective representations of the transmitted signal and the expected reception S206. A time interval is determined accordingly in step S207 and transmitted S208 to the second device 2 on a previously opened communication channel, for example via BLE. Similarly, the first device 1 receives the time interval determined by the second device 2, which is used to determine S209 the distance value.

[0049] A simultaneous flow is performed in the second device designated as a follower during the handshake S160. At the completion of the handshake, the second device 2 starts listening S201a, i.e. triggers voice recording. The second device 2 receives the first signal via its microphone S203a and records it. At this point, the device 2 has already generated S202a a second signal (again a synthetic sound) which it transmits via its speaker in step S204a. This signal is recorded by the second device 2. Then the suitable signal is reconstructed from the voice recording S205a to obtain a second comparand. Finally, the second comparand is correlated S206a by the second device 2 with each of the received and transmitted signals to determine the time intervals S207a. This time interval is passed to the first device in step S208a and the time lag calculated by the first device 1 is passed to the second device 2 which calculates a distance value S209a.

[0050] To successfully derive the distance value, several cycles may be required, for example to overcome potential conflicts with other pairs present in the same space, or to improve this value, as will be described below with reference to Fig. 6. That is, the two-way ranging protocol may include one or more additional operation cycles S200. During each additional cycle, the first device 1 (reader) again transmits a test signal (usually the same signal as previously transmitted) to the second device 2 S203, receives a response signal (usually the same signal as previously transmitted by the second device 2) S204, and correlates the signals S206, as described above, to determine the distance between the two devices 1, 2 S207-S209. Again, the mirroring steps can be performed in the second device 2.

[0051] As further seen in FIG. 6, each further cycle is preferably triggered after a timeout has elapsed (S220: no, S230: no), see step S240. This timeout is preferably chosen randomly by the first device 1 S240. More precisely, the timeout may comprise a pre-set part and a random part. This timeout is then communicated to the second device 2 via a communication channel, for example as pre-established S150 to allow a pre-handshake S160, or re-established as necessary. That is, the two devices 1, 2 may agree to use a random timeout duration before retrying the distance determination, in order to prevent potential collisions with signals transmitted from other devices if necessary, in case each device 1, 2 may simultaneously interact with several remote devices. Such a cycle may be repeated as necessary to obtain a successful determination of a distance value. If it is determined that the distance determination is successful (step S220: yes), the algorithm can return to a default mode, e.g., the device searches for the presence of other devices (i.e., returns to step S100 of FIG. 5). Preferably, the protocol specifies a maximum number of attempts (step S230). If this number is exceeded (S230: yes), the cycle is aborted and the device returns to a default mode (e.g., returns to step S100 of FIG. 5).

[0052] Performing several detection cycles as described above may be useful to arrive at a perceptible distance value. In addition, this may be used to improve resilience and adaptability in situations where three or more devices come to interact. In that regard, it should be noted that the method may include a self-validation mechanism using some suitable heuristics in step S220. For example, each device 1, 2 may check the calculated time interval against an expected value. It should be noted that the devices may at least validate whether a positive time lag has been obtained, and that voice communication interference may result in a false detection and thereby an inaccurate time lag.

[0053] As recalled above, the method may be beneficially implemented to measure social distancing (i.e., social contact), whereby distance values ​​are determined S207-S209 (S207a-S209a) by each device 1, 2 for purposes of building and updating a contact history S210. To this end, each device 1, 2 successively contacts S150 other devices S100-S120 that are determined to be in sufficiently close proximity, as will be described in more detail below with reference to FIG.

[0054] Essentially, social distancing measurements can be achieved by successively performing a two-sided bidirectional distance measurement method S200, i.e. for each pair of devices expected to be in close enough proximity (S120: yes). The distance values ​​determined in S200 accordingly are then recorded in the history of each device 1, 2 S210. This history can thus be used to issue warning messages or the like to the device users and / or authorities. It is envisaged that such methods described herein are performed with the consent of the users and in accordance with applicable law.

[0055] A suitable flow is shown below. Note that this flow is assumed to be executed in a first device 1, and a similar flow can be executed in any device that complies with this protocol. First, device 1 searches for the presence of surrounding devices, for example using a suitable BLE scanning protocol S100. In response, some remote devices can be discovered. In step S110, device 1 selects the next device as listed in the scan result. Device 1 first looks up its own history S130 and checks whether the currently selected (remote) device is found in the recent history S140. If it is found in the recent history (S140: yes), there is no need to go further and device 1 selects the next device in the scan list. If it is not found in the recent history (S140: no), device 1 sets up a communication channel (e.g., a BLE channel) with the currently selected device S150 and performs a handshake as described above S160. Two-way ranging is then performed S200 and the determined distance value is stored in the history of the device 1.

[0056] As further illustrated in Figure 5, device 1 may first check whether the received signal strength indicator (RSSI) indicates a proximity that may require testing before initiating an interaction with the currently selected device. If the power of the wireless signal indicates sufficient proximity (S120: Yes), device 1 proceeds further (steps S130, S140, etc.). If it does not indicate sufficient proximity (S120: No), device 1 selects another device in the scan list.

[0057] The above embodiment has been briefly described with reference to the accompanying drawings and may accommodate a number of variants. Several combinations of the above features may be contemplated. For example, in a particularly preferred embodiment, each device 1, 2 is a smartphone including a speaker 15 and an audio microphone 16. In addition, each device is configured to generate a unique synthetic sound (as described above) and measure the time of flight to another similarly configured device. That is, the waveforms of the two cores are combined to form a unique sound including a first frequency segment, a second segment of zero amplitude (or very low level noise), and a third frequency segment, both the first and third frequencies being generated using some predefined seeds. Such frequencies are ultrasonic or near-ultrasonic, making the transmission inaudible to humans. The three above-mentioned segments have predefined durations, with the gap having the longest duration, as described above.

[0058] Further aspects of the invention will now be described with more particular reference to Figures 1A and 1B, which relate to devices 1, 2. Aspects of this device have already been described with reference to the method. These will now only be described briefly.

[0059] Each device 1, 2 comprises processing means 11, e.g. a CPU. The various components are connected to the CPU, e.g. via a system bus and a controller (not shown). In particular, the devices 1, 2 comprise a sound generator 14, a transmitter 15 (e.g. a speaker) and a receiver 16 (e.g. an audio microphone). In addition, a memory 12 is typically connected to the CPU, as is usual in the field to which the invention belongs. All such components are known per se, but need to be appropriately configured, programmed etc. to be able to carry out the method. The memory 12 may include a computerized method stored in the form of program code instructions (software) which, when loaded into the main memory and executed, cause the CPU to orchestrate the operation of the sound generator 14, the transmitter 15 and the receiver 16 to enable the devices 1, 2 to carry out S200 a two-sided two-way ranging protocol with respect to the remote devices 2, 1, as described above with reference to the method.

[0060] In particular, the sound generator 14 may be configured to form two waveforms w1, w2 as ultrasonic frequency tones by randomizing the two ultrasonic frequencies, respectively, based on a predefined seed. The generator 14 may be further designed to configure the two waveforms w1, w2 with a gap g of zero amplitude (or noise level) to generate a composite sound. As mentioned above, each bipolar waveform w1, w2 preferably extends over a time segment that is smaller than the duration of the gap g. In this way, the device 1 can transmit and receive signals (and reconstruct suitable signals) to determine the distance between the device and a remote device.

[0061] A final aspect relates to a computer program product for determining the distance between two devices. The computer program product comprises a computer readable storage medium having program instructions embodied therein. Such instructions may for example be stored in a long term memory of the devices 1, 2 as described above for the purpose of performing a method as described herein. That is to say, such program instructions are executable by the processing means 11 of the devices 1, 2 to cause the processing means 11 to perform a two-sided two-way ranging protocol as described above with reference to Figures 2 and 4-6.

[0062] As will be appreciated, the present invention may be a method, device, and / or computer program product, which may include a computer readable storage medium having computer readable program instructions for causing a processor to implement aspects of the present invention.

[0063] A computer readable storage medium may be a tangible device capable of holding and storing instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. A non-exhaustive list of more specific examples of computer readable storage media includes portable computer diskettes, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical coding devices such as punch cards or groove ridge structures on which instructions are recorded, and any suitable combination of the above. As used herein, a computer-readable storage medium should not, itself, be construed as being a ephemeral signal, such as an electric wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., light pulses passing through a fiber optic cable), or an electrical signal transmitted by an electrical wire.

[0064] The computer readable program instructions described herein may be downloaded from a computer readable storage medium to each computing / processing device or to an external computer or storage device over a network, such as the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof. The network may comprise copper transmission cables, optical transmission fiber, wireless transmission, routers, firewalls, switches, gateway computers, or edge servers, or a combination thereof. A network adapter card or network interface in each computing / processing device receives the computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.

[0065] The computer readable program instructions for carrying out the operations of the present invention may be either assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, configuration data for an integrated circuit, or source or object code written in any combination of one or more programming languages, including object oriented programming languages ​​such as Smalltalk®, C++, and procedural programming languages ​​such as the “C” programming language or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer, and also partially on a remote computer, or entirely on a remote computer or server. In the latter situation, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be to an external computer (e.g., via the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may execute computer readable program instructions to personalize the electronic circuitry by utilizing state information of the computer readable program instructions to perform aspects of the invention.

[0066] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, systems, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer readable program instructions.

[0067] The computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, executed by the processor of the computer or other programmable data processing apparatus, create means for performing the functions / operations specified in the blocks of the flowcharts and / or block diagrams. These computer readable program instructions may further be stored on a computer readable storage medium, such that the computer readable storage medium having the instructions stored thereon comprises an article of manufacture including instructions implementing aspects of the functions / operations specified in the blocks of the flowcharts and / or block diagrams, causing the computer, programmable data processing apparatus, or other device, or combination thereof, to function in a particular manner.

[0068] The above computer readable program instructions may further be loaded into a computer, other programmable data processing apparatus, or other device to cause the computer, other programmable apparatus, or other device to perform a series of operational steps, so as to create a computer-implemented process, such that the instructions, which execute on a computer, other programmable apparatus, or other device, perform the functions / operations specified in the flowchart and / or block diagram blocks.

[0069] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowcharts or block diagrams may represent a module, segment, or portion of instructions that includes one or more executable instructions for implementing a specialized logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the drawings. For example, two blocks shown in succession may in fact be executed substantially simultaneously, or the blocks may be executed in reverse order, depending on the functionality involved. It will also be appreciated that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that executes a specialized function or operation, or executes a combination of dedicated hardware and computer instructions.

[0070] Although the present invention has been described with reference to a limited number of embodiments, variants, and accompanying drawings, it will be understood by those skilled in the art that various modifications may be made and equivalents may be substituted without departing from the scope of the present invention. In particular, features described in a given embodiment, variant, or illustrated in a drawing (either in device or method form) may be combined with or substituted for other features in another embodiment, variant, or drawing without departing from the scope of the present invention. Thus, various combinations of the features described with respect to any of the above embodiments or variants may be contemplated to remain within the scope of the appended claims. Moreover, many minor modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from its scope. Thus, the present invention is not limited to the particular embodiments disclosed, but it is intended to include all embodiments within the scope of the appended claims. In addition, many other variations other than those explicitly mentioned above may be contemplated.

Claims

1. 1. A method for determining a distance between two devices, the method comprising:

23. A method according to claim 22, comprising: performing a two-sided, two-way ranging protocol, the two devices transmitting and receiving signals, each of the signals being a composite sound generated as the combination of two waveforms separated in time by a gap, such that the combination forms a bipolar waveform.

2. the two devices include a first device and a second device; the transmitted signal and the received signal include a first signal and a second signal; Performing the two-sided two-way ranging protocol includes having the first device: transmitting the first signal to the second device at a first time; receiving, at a second time, the second signal transmitted by the second device upon receipt of the first signal; correlating an expected signal with a first comparand, the first comparand being obtained based on the received second signal to determine a first time interval between the first and second times and deriving a distance between the two devices accordingly; The method of claim 1 , further comprising: executing a set of:

3. At the first device, the set of steps comprises: triggering an audio recording before transmitting the first signal, the first comparand being obtained by recording both the transmitted first signal and the received second signal; and correlating a representation of the first signal with the first comparand to determine the first time, the expected signal being correlated with the first comparand to determine the second time, and the first device determining the first time interval as the difference between the determined second time and the determined first time. The method of claim 2.

4. 4. The method of claim 3, wherein the representation of the first signal and the expected signal are correlated with the first comparand to obtain respective cross-correlated signals, each cross-correlated signal having a triple peak pattern exhibiting two smaller peaks separated by a larger peak.

5. Executing the two-sided two-way ranging protocol includes: triggering an audio recording prior to receiving the first signal transmitted by the first device to obtain a second comparand by recording both the first signal received by the second device and the second signal transmitted; correlating both the expected signal and the representation of the second signal with the second comparand to determine the time when the first signal was received and the time when the second signal was transmitted by the second device, respectively, and determining a second time interval accordingly as the difference between the determined times; transmitting the second time interval to the first device; Further, The method according to claim 3.

6. The first device comprises: receiving the second time interval; subtracting the second time interval from the first time interval to derive a time of flight of the first signal and the second signal and determining a distance between the two devices accordingly; The method of claim 5 , further comprising:

7. The method of claim 1 , wherein each of the two waveforms extends over a predetermined time segment, and the duration of the gap is greater than the predetermined time segment.

8. The method of claim 7, wherein the two waveforms are formed as ultrasonic frequency tones by randomizing two ultrasonic frequencies, respectively, based on a predetermined seed.

9. As part of the protocol, the method further comprises:

3. The method of claim 2, further comprising: performing a pre-handshake between the two devices over a wireless communication channel established between the two devices, the first device being designated as a leader and, in response, transmitting the first signal to the second device upon completion of the handshake.

10. performing the two-way ranging protocol includes performing one or more additional cycles of operations, each of the additional cycles including performing the set of steps; 10. The method of claim 9, wherein each of the cycles is triggered after a timeout has elapsed, the timeout being randomly selected by the first device and communicated to the second device via the communication channel established during the pre-handshake.

11. The first device comprises: determining one or more parameters of a set consisting of the seed, a duration of the time segment, a duration of the gap, and a time delay before transmitting the second signal; communicating the one or more parameters determined during the pre-handshake to the second device over the established communication channel; 10. The method of claim 9, further comprising:

12. The method further comprising: The method of claim 11 , further comprising randomly determining, by the first device, the time delay.

13. 10. The method of claim 9, wherein the communication channel is established according to a wireless technology standard that is one of Bluetooth, Bluetooth Low Energy, and Wi-Fi.

14. each of the two devices is a handheld device; each of said two waveforms having inaudible audio frequencies such that the resulting sound is inaudible to humans; The method of claim 2.

15. Each of the two devices includes a speaker, a microphone, and a processing means connected to the speaker and the microphone, and the first device is transmitting the first signal via its respective speaker such that the second device receives the first signal via its respective microphone; receiving, via its respective microphone, the second signal transmitted via the speaker of the second device; correlating, by its respective processing means, the expected signal with the first comparand to determine the first time interval and derive the distance between the two devices. The method of claim 14.

16. The method of claim 2 , further comprising: at the second device, transmitting the second signal only after a predetermined time delay has elapsed.

17. 2. The method of measuring social distancing according to claim 1, comprising, in the first device: successively contacting any second device determined to be in sufficiently close proximity; performing said two-sided two-way ranging protocol for each contacted second device; A method comprising:

18. A device, comprising: A processing means is provided, Connected to the processing means are: Sound generator, Transmitters, and A receiver, The processing means is configured to orchestrate operation of the sound generator, the transmitter and the receiver to enable the device to perform a two-sided two-way ranging protocol with a remote device, in operation comprising: the sound generator generating a first signal; the transmitter transmitting the first signal to the remote device at a first time; the receiver receiving a second signal from the second device at a second time; The processing means: obtaining a first comparand based on the received second signal; correlating an expected signal with the first comparand to determine a time interval between the first time and the second time and, accordingly, a distance between the two devices; 11. A device, wherein each of the first signal and the second signal is a composite sound generated as a combination of two waveforms separated in time by a gap, such that the combination forms a bipolar waveform.

19. The sound generator is forming the two waveforms as ultrasonic frequency tones by randomizing each of the two ultrasonic frequencies based on a predetermined seed; configuring the two waveforms and the gap such that each of the two waveforms extends over a predetermined time segment that is less than a duration of the gap; 20. The device of claim 18 configured to:

20. 1. A computer program product for determining a distance between two devices, said computer program product comprising a computer readable storage medium having embodied thereon program instructions executable by a processing means of each of said two devices, said program instructions comprising:

1. A computer program product that executes a two-sided two-way ranging protocol, causing the two devices to transmit and receive signals, each of the signals being a composite sound generated as the combination of two waveforms separated in time by a gap, such that the combination forms a bipolar waveform.

Citation Information

Patent Citations

  • Ultrasonic distance measuring instrument

    JP1990223882A

  • Distance-measuring apparatus and position-measuring apparatus using ultrasonic waves, and program for them

    JP2003028956A

  • Distance / ranging by determining rf phase delta

    JP2004507714A

  • Positioning system, data processing device, data processing method, program, positioning target device, and peripheral device

    JP2019168291A

  • Method and apparatus for correcting velocity-induced range estimate phase errors in a two-tone monopulse CW radar

    US20060071847A1