Synthesized ultrasonic sound-based bidirectional ranging protocol

The use of synthesized ultrasonic waveforms with gaps in bidirectional ranging protocols enhances the accuracy of distance measurement by overcoming noise and interference issues, allowing precise detection of signal times and improving measurement accuracy.

JP7853056B2Active Publication Date: 2026-04-28INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
INTERNATIONAL BUSINESS MACHINE CORPORATION
Filing Date
2022-08-22
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Conventional bidirectional ranging techniques face challenges in accurately detecting the exact moment of sound transmission and reception due to noise and interference, leading to false peaks in cross-correlation measurements, which affects the accuracy of distance measurement between wireless devices.

Method used

Implementing a bidirectional ranging protocol using synthesized ultrasonic sounds generated as a synthesis of waveforms temporally separated by a gap, forming a bipolar waveform, to enhance the detection of correct peaks in cross-correlation measurements.

Benefits of technology

This method enables precise detection of signal transmission and reception times with sub-millisecond accuracy, improving the measurement of distance between devices by facilitating clearer and more accurate peak detection in cross-correlation measurements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007853056000001
    Figure 0007853056000001
  • Figure 0007853056000002
    Figure 0007853056000002
  • Figure 0007853056000003
    Figure 0007853056000003
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 generally relates to a computerized method, device, and computer program product for determining the distance (range) between a pair of devices using a bidirectional ranging protocol. More specifically, the invention relates to a method for performing bidirectional ranging based on (near) ultrasonic sound generated as a synthesis of waveforms of cores temporally separated by a gap. [Background technology]

[0002] Bidirectional ranging techniques are commonly used to measure the distance between two wireless devices. In radio engineering, this technique utilizes the natural delay (also known as time of flight) that occurs during signal transmission 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) is computable. Next, the first node A receives an acknowledgment (i.e., a second signal) from the second node B. This acknowledgment 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 the acknowledgment, and set it up for transmission. Thus, a further signal propagation delay is computable by the first node A when it receives the acknowledgment signal from node B. The signal propagation delay is ultimately 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 bidirectional 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 a second node. In this case, the method is symmetrical in that the measurement results from node A to node B are mirrored at the second node, and this method is called symmetric bidirectional ranging.

[0005] In some cases, a bidirectional ranging method based on tone (i.e., sound) exchanged between two devices may be attempted. With conventional bidirectional ranging techniques, one problem is that both devices must be able to detect the exact moment when the sound is transmitted and received by the transmitter and receiver. Ideally, sub-millisecond accuracy is desired. Prior art methods typically attempt to achieve this by recording the sound before or during a protocol call, as described above, and then locating the transmitted fingerprint within that recording. Such methods look for significant (temporal) peaks in the cross-correlation measurement results obtained between a known transmitted waveform and the recorded signal. However, in practice, many false peaks exist in the cross-correlation measurement results due to noise and interference to the transmitted signal, such as multiple echoes (also known as the "multipath problem"). The ability to detect the correct peaks in the cross-correlation signal is crucial for the accuracy of the measurement. [Overview of the project]

[0006] According to a first aspect, the present invention is embodied as a method for determining the distance between two devices, namely, a first device and a second device, which may be wireless devices such as handheld devices. The method essentially revolves around implementing a bidirectional ranging protocol in the two devices. This protocol causes the two devices to transmit and receive signals for the purpose of determining the distance between them, as in known bidirectional ranging methods. However, in this case, each signal is a synthesized sound produced as a synthesis of two waveforms temporally separated by a gap, such that the synthesis forms a bipolar waveform. The gap is a zero or low-amplitude signal that substantially contrasts the two waveforms (with respect to amplitude). This generates a specific pattern in the correlated footprint, significantly facilitating the determination of flight time. Such a method can, fortunately, be used to measure social distancing (or social contact).

[0007] In another embodiment, the present 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. In accordance with the method described above, the processing means is configured to orchestrate the operation of the sound generator, transmitter, and receiver, and the device performs a bidirectional ranging protocol with a remote device.

[0008] In operation, a 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. A processing means is configured to obtain a comparen based on the received second signal, then correlate the expected signal with this comparen to determine the second time, and based on this, calculate the time interval between the first time and the second time. This comparen can, conveniently, be obtained based on both the first signal (transmitted) and the second signal (received). Another correlation operation can then be performed to precisely 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 its time interval. Each of the first and second signals is a synthesized sound produced as a synthesis of two waveforms temporally separated by a gap, so that the synthesis forms a bipolar waveform.

[0009] In the final embodiment, the present invention is embodied as a computer program product. The computer program product includes a computer-readable storage medium in which program instructions are embodied, the program instructions being executable by the processing means of the device, causing the device to execute a bidirectional ranging protocol in accordance with the above method.

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

[0011] [Figure 1A] This diagram schematically represents two devices (in this case, smartphones) that transmit and receive signals, as relating to embodiments of the present invention. [Figure 1B] This figure schematically shows selected components of such a device, as shown in the embodiment. [Figure 2] This figure shows a sequence of operations performed in two devices, such as those shown in Figure 1A, as part of a bidirectional distance measurement protocol according to an embodiment. [Figure 3A] This plot represents a synthesized sound generated in each device according to the embodiment, which is a synthesis of two waveforms separated by a gap, thereby forming a bipolar waveform. [Figure 3B] This plot represents a typical correlation measurement exhibiting a triple-peak pattern, as obtained by the device when correlating signals, as shown in the embodiment. [Figure 4] This flowchart shows the steps of a method for performing bidirectional distance measurement on both sides based on synthesized sound generated in a device, according to an embodiment. [Figure 5] This flowchart outlines the steps of a method for operating such a device for the purpose of measuring social distancing between users of such devices. This further method involves scanning nearby devices of a given device to implement a bidirectional ranging method, as illustrated in Figure 2 or Figure 4, as shown in the embodiment. [Figure 6] This flowchart shows how to repeatedly attempt to determine the distance between any two devices using the method shown in Figure 2 or Figure 4 in order to successfully determine the distance between devices according to the embodiment. [Modes for carrying out the invention]

[0012] The attached drawings show simplified representations of the device or parts thereof, relating to the embodiments. Similar or functionally similar elements in the drawings are assigned the same reference numeral unless otherwise noted.

[0013] Devices, computerization methods, and computer program products embodying the present invention are described below as non-limiting examples.

[0014] Referring to Figures 1 to 4, one aspect of the present invention concerning a method for determining the distance between two devices 1 and 2 is described first. This method and its variations are collectively referred to as "the Method." All reference numerals Sn refer to steps of the Method in the sequences and flowcharts of Figures 2, 4, 5, and 6, while the reference numbers relate to components of devices 1 and 2 shown in Figures 1 and 2. In the following description, for illustrative purposes, devices 1 and 2 are generally assumed to be handheld devices such as smartphones. The bidirectional distance measurement step is generally referred to as step S200 in the flowcharts of Figures 5 and 6. Figure 4 shows detailed steps of the bidirectional distance measurement method as shown in a preferred embodiment. Figure 2 shows the most important operations performed to determine the distance.

[0015] This method essentially relies on implementing a bidirectional ranging protocol S200 in two devices 1 and 2. As is common in the field to which this invention belongs, this protocol causes the two devices to transmit and receive signals. However, in this invention, each of these signals is a composite sound produced as a composite of two waveforms temporally separated by a gap, so that the synthesis forms a bipolar waveform. This makes it possible to significantly improve the measurement accuracy, as will be described in detail later.

[0016] Various embodiments of the above protocol are conceivable, in which signals are exchanged between a pair of devices and then processed by those 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 Figures 2 and 4). Subsequently, the first device 1 receives a second signal, i.e., a signal transmitted by the second device 2 after receiving the first signal in S203 (step S204a) (step S204 in Figures 2 and 4). Then, the first device 1 attempts to correlate the signals to determine the time interval between the first and second time, aiming to derive the distance between the two devices in S207-S209 (step S206). This time interval refers to 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 synthesized sound (i.e., speech) generated by the first device 1 and the second device 2, respectively (steps S202, S202a). That is, this sound is generated as a synthesis of two waveforms w1 and w2 separated (temporarily) by a gap g, as shown in Figure 3A. Each waveform may be, for example, an ultrasonic or near-ultrasonic waveform, for reasons to be explained later. That is, each sound is generated as a temporal synthesis, i.e., a continuous signal segment containing waveform w1, gap g, and another waveform w2. Thus, the resulting sound is a time-dependent bipolar signal, i.e., a signal with a time-dependent bipolar wave structure.

[0018] The gap g ideally corresponds to zero-amplitude signals, but may also contain noise ranging from low to very low amplitude levels. That is, the amplitude of the signal in gap g is significantly smaller than the amplitude of the signals corresponding to the two waveforms w1 and w2, if this is not negligible when compared. The signal-to-noise ratio (SNR) is typically at least greater than 10, but preferably greater than 20, for example, 30. SNR is also... dB = 10log 10Can be expressed in decibels, such as (SNR). SNR dB For example, it can be selected to ensure at least a 15 dB difference between the waveform and the gap, corresponding to an SNR of approximately 31.6. For example, if each of the waveforms has an average of -60 dB, the noise level should typically be less than -75 dB on average. Thus, a low or very low signal amplitude at the level of the gap g results in, in essence, a temporal gap between the two waveforms w1, w2 in the generated sound.

[0019] The preferred embodiment described above focuses on the first device 1 that executes steps S203 to S209 in the flow of FIG. 4. However, the mirror step is typically implemented in the second device 2, whereby the second device receives the first signal S203a, transmits the second signal S204a, and attempts to perform a correlation aimed at determining a second time interval between the reception time and the transmission time, also called the third time and the fourth time respectively in this document, at S206a. By determining the first time interval and the second time interval, devices 1 and 2 can derive the time of flight, and thus the distance between the two devices, at S209, S209a. Due to the symmetry of the operations performed in the two devices, such an embodiment can be regarded as a symmetric two-sided bidirectional ranging method.

[0020] Each of devices 1 and 2 can, in some cases, accurately determine the time to transmit its own signal. In this case, to accurately determine the reception time, it is sufficient for devices 1 and 2 to correlate the predicted signal (i.e., the signal expected to be received from another device) with the comparison number obtained by recording the received signal.

[0021] If the device cannot determine the transmission time with high accuracy, the number under comparison may further include recording the transmitted signal (in addition to recording the received signal), and the recordings S201, S201a must be started sufficiently early. In this case, the number under comparison includes recording both the transmitted and received signals. Thus, the time the signal was transmitted (t1 or t) 2’ To determine the transmission time (t1 or t in Figure 2) with high accuracy, each device 1, 2 may further correlate its own representation of the transmitted signal with the number being compared. This performs two correlation operations, one for determining the reception time and the other for determining the transmission time. The numbers being compared used by the two devices 1, 2 are called the first number being compared and the second number being compared, respectively. Finally, the first device 1 determines the transmission time (t1 or t in Figure 2). 2’ ) and reception time (t2 or t in Figure 2) 1’ The second device 2 determines the first time interval (Δ1 in Figure 2) between the reception time and the transmission time, while the second device 2 determines the second time interval (Δ2 in Figure 2) between the reception time and the transmission time.

[0022] In the above embodiment, each device 1, 2 correlates the number under comparison formed according to its own record with the representation of its own transmitted signal in S206, S206a, marks the corresponding transmission time in the record, and further correlates the number under comparison with the representation of the transmitted signal of the corresponding device in S206, S206a, marks the corresponding reception time as assumed in Figure 4. Next, each device 1, 2 calculates the time difference between those two times in S207, S207a. Subsequently, they transmit the time difference obtained accordingly to each other in S208, S208a, thereby determining the time of flight in S209, S209a. This time of flight is equal to half the absolute difference between the two time intervals obtained accordingly. That is, the time of flight is simply calculated as |Δ1-Δ2| / 2, where Δ1=t2-t1 and Δ2=t 2’ -t1. Then, the distance between the two devices can be easily derived from the time of flight based on the laws of physics. This last operation is usually simply the multiplication of the speed of sound in the air by the time of flight.

[0023] This method can be applied in particular to social distancing measurement. For example, as soon as it is determined that two devices may be within range, each of the above steps can be performed on the two devices 1 and 2. For this purpose, a pre-handshake can be performed S160, which makes it possible to determine which device will take the lead, as in the embodiments described below.

[0024] A particular advantage lies in the structure of the generated sound (i.e., waveform w1 - gap g - waveform w2), which allows for the full recognition of corresponding peaks in cross-correlation measurements. As shown in Figure 3B, this peak enables clearer, more accurate, and more precise detection in practice. Unlike other waveforms, which are typically used in conventional methods to generate a single central peak, the synthesized sound (Figure 3A) generated and transmitted here by each of the two devices 1 and 2 generates a triple-peak pattern when the signals are correlated, as illustrated in Figure 3B. The triple-peak pattern consists of a large peak p2 between two smaller peaks p1 and p3 separated by a gap, which has a known duration. The gap between one pair of p1 and p2 and the gap between the other pair of p2 and p3 are symmetrical and therefore have the same duration. This duration is determined by the gap g, which is itself predetermined. As a result, this helps in detecting the appearance of peaks in cross-correlation measurements obtained (in the time domain) for more accurate measurements of time of flight, as the basis for proximity calculations.

[0025] In other words, this method proposes implementing a bidirectional ranging method based on the exchange of specific composite waveforms transmitted and received as sound (i.e., speech). This method is useful because it can be used to accurately detect (e.g., with sub-millisecond precision) the time when signals are transmitted and received, and therefore to estimate the distance between two devices with greater accuracy.

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

[0027] All of this will be described in detail below with reference to specific embodiments of the present invention. Firstly, each of the two devices 1, 2 is preferably a handheld device, such as a mobile phone (smartphone), smartwatch, tablet, or personal assistant. In particular, when the method is performed to measure social contact, devices 1, 2 may also be dedicated devices forming or constituting, for example, an employee tag (pager) or badge. However, in variations, the method may be performed in larger devices, such as automobiles or other vehicles.

[0028] Each of the two devices 1 and 2 may include, for example, a speaker 15 and a microphone 16 for transmitting and recording signals. In addition, each device 1 and 2 may include, as necessary, a processing unit 11 (e.g., a central processing unit or CPU), main memory 12 (connected to the processing unit 11), long-term memory (not shown), and various controllers to operate the speaker and microphone as known by themselves. That is, the processing unit 11 is suitable for connecting to the speaker 15 and microphone 16 via a system bus and is capable of transmitting and receiving signals as necessary to carry out this method.

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

[0030] As shown in Figure 3A, each waveform w1 and w2 extends over a predetermined time segment ts1 and ts3, respectively. It is preferable that such time segments ts1 and ts3 have the same duration, i.e., ts1=ts3, as assumed in Figure 3A. Furthermore, it is preferable that the duration ts2 of the gap g is greater than ts=ts1=ts3. Making such a gap g longer than the duration ts of the waveforms w1 and w2 results in a well-decorrelated triple-peak pattern, where the central peak does not overlap with the side peaks, as shown in Figure 3B. Each of the two waveforms w1 and w2 may extend over a predetermined time segment ts=ts1=ts3, for example, but the gap ts2 can be a predetermined number of such time segments ts, i.e., ts2=a ts, where a>1. In addition, an additional gap (not shown) may occur before the first waveform w1. Similarly, further gaps (not shown) may occur after the second waveform w2. For example, the gap signals generated in each device 1, 2 can be padded with any zero-amplitude segments before and after each of the core waveforms w1, w2. In all cases, the cross-correlation of the corresponding sound signals generated accordingly generates a triple-peak pattern, which is useful for accurately identifying the timing of wave transmission and reception by both devices 1, 2.

[0031] The correlation operation performed can, in some cases, be carried out as the cross-correlation of two continuous functions representing the compared signals. However, in practice, the algorithm prefers to use discrete time series, which can be computed as C(s,t)=corr(X(s),Y(t)) for two variables X(s) and Y(t), and for all time lags s and t. Thus, the correlation is performed based on two vectors (two arrays of values), generating a further vector in the output. The maximum value of the correlation obtained in the output generates the relevant time, i.e., the time corresponding to the index corresponding to that maximum value. This correlation is most practically carried out 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 in relation to the index (and therefore also inverted in time).

[0032] The possible implementation (in 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 in the Apache Commons Math3.6 API.

[0034] In the embodiment, each of the two waveforms w1 and w2 (when used in S202 and S202a to generate synthesized sounds in devices 1 and 2) is an inaudible speech frequency. Thus, the resulting sound is inaudible to humans. This is particularly beneficial when the method is applied to social distancing, in which case devices 1 and 2 are typically handheld devices. In particular, this frequency may be an ultrasonic or near-ultrasonic frequency. Each of the two waveforms w1 and w2 is therefore an inaudible signal, typically formed in the inaudible low-frequency range (±18.5 to 20 kHz), which can be realized using conventional modern telephone speaker hardware but is inaudible to most people.

[0035] Two waveforms w1 and w2 can be formed by randomizing two ultrasonic frequencies, respectively, based on a predetermined seed. That is, each device 1 and 2 randomizes two ultrasonic frequencies based on some predetermined seed. These two frequencies may be the same at first. Then, each device produces two corresponding sounds for a predetermined duration, and the entire waveform is composed of a first waveform, a gap g of zero or low amplitude signals, and a second waveform.

[0036] In addition, instead of microphones and speakers, devices 1 and 2 may rely on other types of transducers, especially when ultrasonic frequencies are used. In that case, the receiving equipment may include a gyroscope or other types of transducers capable of picking up ultrasonic sounds.

[0037] In a bidirectional ranging method based on the exchange of data packets, relevant signal parameters may be included as part of the exchanged message. However, such a method is difficult to implement when the exchanged signal is an audio signal. Furthermore, such parameters can be conveniently transmitted over an S150 wireless communication channel established between two devices 1 and 2, as assumed in Figure 5.

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

[0039] This handshake is typically performed automatically as part of a bidirectional ranging protocol, even if it is performed on separate channels (S160). That is, the bidirectional signal is voice, which is propagated as sound waves, while the messages and data exchanged between the two devices 1 and 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 shown in Figures 2 and 4, the first device 1 is designated as the leader. Therefore, the first device 1 imposes specific signal parameters on the second device 2 and transmits them to the second device 2 via the established communication channel during the 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 operating time. Note that this time delay may, in some cases, be randomly selected by the first device 1 to mitigate the risk of collision with signals received from other devices, and that 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 the first message tm1, and a second time delay of 250 ms may be imposed before transmitting the response signal tm2. The recording duration is typically on the order of one second for each device 1, 2 to ensure that each recording captures both the transmitted signal and the response signal.

[0041] In the embodiment described above, the leader 1 imposes signal parameters and transmits them to the follower 2. In variations, some or all of these parameters may be predetermined and fixed as part of the protocol requirements. In other variations, the pre-handshake S160 may cause the two devices 1 and 2 to exchange their corresponding seeds, as well as the waveform and duration of the gap g, and it should be noted that this gap does not need 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 reader, and thus, upon completion of the handshake, at S160, it transmits the first signal to the second device 2 at S203. At the same time, each of the devices 1, 2 starts listening (i.e., recording) at S201, S201a immediately after the handshake is completed. Thus, the recording performed by each of the devices 1, 2 includes the fingerprints of both the transmitted signal and the received signal, whereby the device can determine the relevant time and time intervals with high precision. Note that the transmission S203 of the first signal may, in some cases, start immediately after the handshake is completed. In a variant, there is a timeout phase before the transmission S203 of the first signal, allowing sufficient time for the first device 1 to generate the first signal at S202 if necessary.

[0043] As shown in FIG. 2, the first device 1 generates the first signal (“Write(msg1)”) so that the audio signal tm1 is generated at S202, and then the first signal is transmitted as a sound wave by the first device at time t1 (also referred to herein as “the first time”) at S203. This signal is received by the second device 2 at time t 1’ (also referred to herein as “the third time”) at S203a. More precisely, the second device 2 records the signal tm1 via its microphone to obtain the audio signal rm1. After a time delay (pre-set and transmitted by the first device 1) has elapsed, the second device 2 transmits the second signal at time t 2’ (also referred to herein as “the fourth time”) at S204a. This signal is generated in due course at step S202a (“Write(msg2)”). Then, the audio signal tm2 is received by the first device 1 at time t2 (also referred to herein as “the second time”) at S204. That is, the first device 1 records the audio signal tm2 via its microphone and obtains the audio signal rm2 accordingly.

[0044] This allows both devices to record audio throughout the entire process. For this purpose, each device 1, 2 triggers audio recording via its respective microphone 16 in a timely manner to receive signals transmitted by the other device 2, 1 in S201, S201a. The embodiments illustrated in Figures 2 and 4 assume that each device 1, 2 begins recording immediately after the completion of the handshake S160. Such recordings are typically triggered for a limited duration, for example, up to an upper limit of the expected transmission cycle. In a variation, assuming that it is possible to know with high accuracy when each device 1, 2 transmitted its own signal, devices 1, 2 may attempt to record only the other's signal.

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

[0046] As already mentioned, each device 1, 2 may reconstruct a signal from its respective audio 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. This signal reconstruction may involve trimming, filtering (for noise), or amplification of the acquired audio sample, or a combination thereof. For example, the audio sample may first be trimmed (using a suitable heuristic to identify the expected pattern) using any suitable audio signal processing method known in the art to which this invention belongs, and then denoising, amplification, and, if necessary, clipping, leveling, etc. The reconstructed signal also provides a comparable number, also referred to in this document as the first comparable number (for the first device 1) and the second comparable number (for the second device 2). Finally, each device 1, 2 cross-correlates its reconstructed signal (the number being compared) with (i) its respective representation of its own transmitted and expected signal (the signal expected to be received by the handshake) S206, S206a. Each cross-correlation generates a triple-peak pattern as shown in Figure 3B. The central peak can be located with high temporal accuracy (with negligible error). This makes it possible to determine the relevant time (on each side) and therefore the corresponding time interval (on each side). Thus, the corresponding time of flight can be derived to determine the distance between the two devices.

[0047] Therefore, this makes it possible to determine the time of appearance in the triple peak pattern obtained from the correlation. The detection of the triple peak pattern in time is then used in S207, S207a to determine the time interval, i.e., the delta time lag between the transmission time and the reception time, shown as △1 and △2 in Figure 2. The time lag calculated by each side 1, 2 can then be transmitted to the other side over the wrapping communication channel in S208, S208a. In this way, each device 1, 2 can calculate the distance. In a modified example, one of the devices 1, 2 may send the time lag it has calculated to the other side, calculate the distance, and then reply with 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 is described in detail below. After a handshake S160 (Figure 5) in which the first device 1 is designated as the leader, the first device 1 starts recording S201 (and possibly after a timeout stage) and generates a first signal as a synthesized sound S202 as described above. In step S203, the first device 1 transmits the 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 the corresponding waveform through its microphone. In step S205, the signal is reconstructed from this audio recording, and the reconstructed signal provides the first number under comparison. Finally, device 1 correlates this number under comparison with each representation of the transmitted signal and the expected reception S206. Accordingly, in step S207, a time interval is determined and transmitted to the second device 2 over a pre-opened communication channel, for example via BLE S208. Similarly, the first device 1 receives the time interval determined by the second device 2, and this time interval is used in S209 to determine the distance value.

[0049] A simultaneous flow is performed by the second device designated as a follower during the handshake S160. Upon completion of the handshake, the second device 2 starts listening, triggering S201a, i.e., voice recording. The second device 2 receives the first signal via its microphone, S203a, and records it. At this point, device 2 has already generated the second signal (in this case, a synthesized sound), S202a, and transmits it via its speaker in step S204a. This signal is recorded by the second device 2. The suitable signal is then reconstructed from the voice recording, S205a, to obtain the second number under comparison. Finally, the second number under comparison is correlated by the second device 2 with the received signal and the transmitted signal, respectively, S206a, and the time interval is determined, 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 in S209a to calculate the distance value.

[0050] To successfully derive the distance value, several cycles may be required, for example, to overcome potential competition with other pairs present in the same space, or to improve this value, as will be explained below with reference to Figure 6. That is, the bidirectional ranging protocol may include one or more additional operating cycles S200. During each additional cycle, the first device 1 (leader) also sends a test signal (usually the same signal previously transmitted) to the second device 2 S203, receives a response signal (usually the same signal previously transmitted by the second device 2) S204, correlates those signals as described above S206, and determines the distance between the two devices 1 and 2 S207-S209. In this case as well, the mirror step is also possible in the second device 2.

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

[0052] As described above, performing several detection cycles may be useful in reaching a perceptible distance value. In addition, this can be used to improve resilience and adaptability in situations where three or more devices are interacting. In this regard, the method may include a self-verification mechanism using several suitable heuristics in step S220. For example, each device 1, 2 may check the calculated time interval against the expected value. These devices may at least verify whether a positive time lag was obtained, and it should be noted that voice communication interference may result in false detections, thereby causing inaccurate time lags.

[0053] As mentioned above, this method may be useful for measuring social distancing (i.e., social contact), thereby determining distance values ​​by each device 1, 2 for the purpose of building and updating contact history S210 S207-S209 (S207a-S209a). For this purpose, each device 1, 2 makes continuous contact with other devices determined to be at a sufficiently close distance S100-S120 S150, which will be described in detail below with reference to Figure 5.

[0054] Essentially, social distancing measurement can be achieved by continuously performing a bidirectional distance measurement method in S200 for each pair of devices (S120: yes) that are expected to be at a sufficiently close distance. The distance values ​​determined accordingly in S200 are then recorded in the history of each device 1, 2 in S210. This history can then be used to issue warning messages, etc., to the device user or an authority figure, or both. It is assumed that such methods described herein are performed with the user's consent and in accordance with applicable law.

[0055] A preferred flow is shown below. Note that this flow is assumed to be performed on a first device 1, and a similar flow may be performed on any device compliant with this protocol. First, device 1 searches for the presence of surrounding devices using, for example, a suitable BLE scanning protocol S100. Several remote devices may be discovered accordingly. In step S110, device 1 selects the next device, such as those listed in the scan results. Device 1 first looks up its own history S130 and checks whether the currently selected (remote) device is found in recent history S140. If it is found in recent history (S140: yes), there is no need to proceed further, and device 1 selects the next device in the scan list. If it is not found in 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. Subsequently, bidirectional distance measurement is performed (S200), and the determined distance value is stored in the history of 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 interaction with the currently selected device. If the radio signal power indicates sufficient proximity (S120: yes), device 1 proceeds further (steps S130, S140, etc.). If it does not indicate sufficient proximity (S120: no), it selects another device in the scan list.

[0057] The embodiments described above have been briefly explained with reference to the accompanying drawings and can accommodate numerous modifications. Several combinations of the above features can be considered. For example, in a particularly preferred embodiment, each device 1, 2 is a smartphone including a speaker 15 and a voice microphone 16. In addition, each device is configured to generate a unique synthesized sound (as described above) to measure the time of flight to another similarly configured device. That is, the waveforms of 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 of which are generated using some predetermined seeds. Such frequencies are ultrasonic or near-ultrasonic and make transmission inaudible to humans. The three aforementioned segments have predetermined durations, with the gap having the longest duration, as described above.

[0058] With more detailed reference to Figures 1A and 1B, other embodiments of the present invention relating to devices 1 and 2 are described below. These embodiments of devices have already been described with reference to the present method. They are described only briefly below.

[0059] Each device 1, 2 comprises a processing unit 11, for example, a CPU. Various components are connected to the CPU via, for example, a system bus and a controller (not shown). In particular, devices 1, 2 comprise a sound generator 14, a transmitter 15 (for example, a speaker), and a receiver 16 (for example, a voice microphone). In addition, a memory 12 is typically connected to the CPU, as is common in the field to which this invention belongs. All such components are known in themselves, but need to be appropriately configured, programmed, etc., to perform this method. The memory 12 may include a computerized method stored in the form of program code instructions (software), which, once loaded into the main memory and executed, cause the CPU to orchestrate the operation of the sound generator 14, transmitter 15, and receiver 16, enabling devices 1, 2 to perform a bidirectional distance measurement protocol S200 to remote devices 2, 1, as described above with reference to this method.

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

[0061] The final aspect relates to a computer program product for determining the distance between two devices. This computer program product comprises a computer-readable storage medium in which program instructions are embodied. Such instructions can be stored in the long-term memory of devices 1 and 2, as described above, for the purpose of performing, for example, a method as described herein. That is, such program instructions are executable by processing means 11 of devices 1 and 2, as described above with reference to Figures 2 and 4 to 6, causing the processing means 11 to execute a bidirectional distance measurement protocol.

[0062] To understand that the present invention may be a method, device, or computer program product, or a combination thereof. This computer program product may include a computer-readable storage medium having computer-readable program instructions for causing a processor to carry out aspects of the present invention.

[0063] A computer-readable storage medium can be a tangible device capable of holding and storing instructions used by an instruction execution device. A computer-readable storage medium may, but is not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, 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 disks (DVDs), memory sticks, floppy(R) disks, mechanical encoding devices such as punched cards or grooved structures on which instructions are recorded, and any suitable combination of the above. As used herein, computer-readable storage media should not be interpreted as themselves being radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses passing through optical fiber cables), or transient signals such as electrical signals transmitted by wires.

[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 external storage device via a network such as the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof. This network may include copper transmission cables, optical transmission fibers, wireless transmissions, 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 computer-readable program instructions from the network and transfers those computer-readable program instructions for storage in the computer-readable storage medium within each computing / processing device.

[0065] The computer-readable program instructions for performing the operation of the present invention may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, configuration data for integrated circuits, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk(R) and 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 standalone software package, partially on the user's computer, further partially on a remote computer, or entirely on a remote computer or server. In the latter case, 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, an electronic circuit including, for example, a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA) may be personalized by executing computer-readable program instructions by utilizing state information of computer-readable program instructions in order to perform aspects of the present invention.

[0066] Aspects of the present invention will be described herein with reference to flowcharts or block diagrams, or both, of methods, systems, and computer program products according to embodiments of the present invention. It will be understood that each block in the flowcharts or block diagrams, or both, and any combination of blocks in the flowcharts or block diagrams, or both, can be implemented by computer-readable program instructions.

[0067] The computer-readable program instructions described above may be provided to a processor of a general-purpose computer, a dedicated computer, or another programmable data processing device to create a machine, such that instructions executed via the processor of a computer or other programmable data processing device create means for performing functions / operations explicitly shown in a flowchart or block diagram, or both. These computer-readable program instructions may also be stored in a computer-readable storage medium containing instructions, such that the storage medium containing the instructions comprises a product containing instructions that perform modes of functions / operations explicitly shown in a flowchart or block diagram, or both, and can be made to function in a particular way for a computer, a programmable data processing device, or other device, or a combination thereof.

[0068] The computer-readable program instructions described above may also be loaded into a computer, other programmable data processing device, or other device to create a computer execution process in which instructions executed on a computer, other programmable device, or other device perform functions / operations explicitly shown in a flowchart or block diagram, or both.

[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 flowchart or block diagram may represent a module, segment, or portion of instructions containing one or more executable instructions for performing a specialized logical function. In some alternative embodiments, the functions described in the blocks may occur in an order different from the order shown in the drawings. For example, two blocks shown consecutively may actually be executed almost simultaneously, or the blocks may be executed in reverse order, depending on the functions they relate to. It will also be recognized that each block in the block diagram or flowchart, or both, and combinations of blocks in the block diagram or flowchart, or both, can be implemented by a system based on specialized hardware that performs a specialized function or operation, or a combination of specialized hardware and computer instructions.

[0070] While the present invention has been described with reference to a limited number of embodiments, modifications, 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 invention. In particular, features (device or method forms) described in or shown in the drawings of a given embodiment or modification may be combined with or substituted with other features in another embodiment, modification, or drawing without departing from the scope of the invention. Thus, various combinations of features described with reference to any of the above embodiments or modifications may still be intended to exist within the scope of the appended claims. Furthermore, many minor modifications may be made without departing from the scope to adapt the teachings of the invention to specific situations or materials. Thus, the present invention is not limited to the specific embodiments disclosed, and is intended to include all embodiments within the scope of the appended claims. In addition, many other modifications other than those explicitly mentioned above may be intended.

Claims

1. A method for determining the distance between two devices, wherein the method is: A method comprising the two devices performing a bidirectional ranging protocol in which they measure the distance, the bidirectional ranging protocol causing the two devices to transmit and receive signals, each of which is a synthesized sound produced as a combination of two waveforms temporally separated by a gap so as to form a bipolar waveform, and the bidirectional ranging protocol causing at least one of the two devices to perform a correlation measurement based on the synthesized sound to determine the distance.

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, Executing the aforementioned bidirectional ranging protocol means that the first device, The steps include transmitting the first signal to the second device at a first time point, The steps include receiving the second signal transmitted by the second device in response to the reception of the first signal at a second time point, The steps include: correlating the signal expected as the second signal with the first signal to be compared, which is obtained based on the received second signal, to calculate a first time interval between the first time and the second time, and deriving the distance between the two devices accordingly; The method according to claim 1, which causes a set to be executed.

3. In the first device, the set of steps is The triggering of audio recording before transmitting the first signal, wherein the first signal to be compared is obtained by recording both the transmitted first signal and the received second signal, The method further includes correlating the representation of the first signal with the first signal to be compared to determine the first time, wherein the expected signal is correlated with the first signal to be compared to determine the second time, and the first device determines the first time interval as the difference between the determined second time and the determined first time. The method according to claim 2.

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

5. Executing the aforementioned bidirectional distance measurement protocol is performed by the second device, The second signal to be compared is obtained by triggering audio recording before receiving the first signal transmitted by the first device, and recording both the first signal received and the second signal transmitted by the second device, The representations of both the signal expected as the first signal and the second signal are correlated with the second signal to be compared, and the time when the first signal was received and the time when the second signal was transmitted by the second device are determined, respectively. Accordingly, a second time interval is determined as the difference between the determined times. The second time interval is transmitted to the first device. To have them do it further, The method according to claim 3.

6. The first device is The steps include receiving the second time interval, The steps include subtracting the second time interval from the first time interval to derive the flight times of the first and second signals, and determining the distance between the two devices accordingly. The method according to claim 5, further comprising performing the set comprising the set.

7. The method according to 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 according to claim 7, wherein the two waveforms are formed as ultrasonic frequency sounds by randomizing two ultrasonic frequencies based on a predetermined seed.

9. As part of the protocol, the method The method according to claim 2, further comprising performing a pre-handshake between the two devices on a wireless communication channel established between the two devices, wherein the first device is designated as the leader, and accordingly transmits the first signal to the second device upon completion of the handshake.

10. Executing the bidirectional ranging protocol involves performing one or more further cycles of operation, each of which involves performing the set of steps, The method according to 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 established communication channel during the pre-handshake.

11. The first device is Determining one or more parameters of a set consisting of the seed, the duration of the time segment, the duration of the gap, and the time delay before transmitting the second signal, During the pre-handshake, the determined one or more parameters are transmitted to the second device via the established communication channel. The method according to claim 9, further comprising carrying out the method described above.

12. The method described above is The method according to claim 11, further comprising randomly determining the time delay using the first device.

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

14. Each of the two aforementioned devices is a handheld device. The resulting sound is inaudible to humans, so that each of the two waveforms has an inaudible sound frequency. The method according to claim 2.

15. Each of the two devices includes a speaker, a microphone, and processing means connected to the speaker and the microphone, and the first device is The first signal is transmitted through each of the speakers, and the second device receives the first signal through its respective microphone. The second signal transmitted through the speaker of the second device is received via each of the microphones. Each of these processing means correlates the expected signal with the first signal to be compared, determines the first time interval, and derives the distance between the two devices. The method according to claim 14.

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

17. A method for measuring social distancing according to claim 1, wherein the method is performed in the first device, Continuous contact with any second device that is determined to be at a sufficiently close distance, For each second device that is in contact, the bidirectional ranging protocol is performed. Methods that include...

18. It is a device, Equipped with processing means, Connected to the aforementioned processing means is, Sound generator, Transmitter, and It is a receiver, The processing means is configured to orchestrate the operation of the sound generator, the transmitter, and the receiver, enabling the device to execute a bidirectional ranging protocol in which the device and the remote device are involved when measuring the distance, and in operation, The sound generator generates a first signal, The transmitter transmits the first signal to the remote device at a first time. The receiver receives a second signal from the second device at a second time interval. The processing means, Based on the received second signal, the first signal to be compared is obtained. The signal expected to be the second signal is correlated with the first signal to be compared to calculate the time interval between the first time and the second time, and the distance between the two devices is derived accordingly. A device in which each of the first signal and the second signal is a synthesized sound produced as a combination of two waveforms temporally separated by a gap so as to form a bipolar waveform.

19. The sound generator, The two waveforms are formed as ultrasonic frequency sounds by randomizing two ultrasonic frequencies based on a predetermined seed, The two waveforms and the gap are configured such that each of the two waveforms extends over a predetermined time segment shorter than the duration of the gap. The device according to claim 18, configured to perform the following:

20. A computer program for causing a computer to perform the method described in any one of claims 1 to 16.

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