SYSTEM AND METHOD FOR MEASURING PROXIMITY BETWEEN DEVICES USING ACOUSTICS

A method includes emitting a sound by a first device. The method also includes receiving a recorded sound at the first device, where the recorded sound includes a recording of the emitted sound by a second device. The method further includes determining an intermediate frequency (IF) signal based on the emitted sound and the recorded sound. The method also includes determining a distance between the first device and the second device based on a frequency of the IF signal and one or more characteristics of the emitted sound. In addition, the method includes presenting the determined distance.

TECHNICAL FIELD

This disclosure relates generally to wireless systems. More specifically, this disclosure relates to a system and method for measuring proximity between devices using acoustics.

BACKGROUND

Along with the rapid growth of Internet-of-Things (IoT), more and more applications have started to leverage the capabilities of heterogeneous devices to create new and immersive experiences. Traditional computing devices (such as desktop and laptop computers) and newer intelligent computing devices (such as smartphones, tablets, and wearables like smart watches and earbuds) are being connected together in collaborative ways to enable new services that previously were not possible. At the same time, with increasing focus on privacy issues (and sometimes on cloud dependency and cost), device-to-device communication and collaboration has become an important topic. Distance awareness (such as knowledge of the physical distance between devices, sometimes referred to as proximity awareness) is an important consideration to facilitate device-to-device communication and collaboration.

SUMMARY

This disclosure provides a system and method for measuring proximity between devices using acoustics.

In a first embodiment, a method includes emitting a sound by a first device. The method also includes receiving a recorded sound at the first device, where the recorded sound includes a recording of the emitted sound by a second device. The method further includes determining an intermediate frequency (IF) signal based on the emitted sound and the recorded sound. The method also includes determining a distance between the first device and the second device based on a frequency of the IF signal and one or more characteristics of the emitted sound. In addition, the method includes presenting the determined distance.

In a second embodiment, an electronic device includes at least one processing device configured to control the electronic device to emit a sound. The at least one processing device is also configured to receive a recorded sound, where the recorded sound includes a recording of the emitted sound by a second device. The at least one processing device is further configured to determine an IF signal based on the emitted sound and the recorded sound. The at least one processing device is also configured to determine a distance between the electronic device and the second device based on a frequency of the IF signal and one or more characteristics of the emitted sound. The electronic device also includes at least one display configured to show the determined distance.

In a third embodiment, a non-transitory machine-readable medium contains instructions that when executed cause at least one processor of an electronic device to control the electronic device to emit a sound. The medium also contains instructions that when executed cause the at least one processor to receive a recorded sound, where the recorded sound includes a recording of the emitted sound by a second device. The medium further contains instructions that when executed cause the at least one processor to determine an IF signal based on the emitted sound and the recorded sound. The medium also contains instructions that when executed cause the at least one processor to determine a distance between the electronic device and the second device based on a frequency of the IF signal and one or more characteristics of the emitted sound. In addition, the medium contains instructions that when executed cause the at least one processor to control at least one display to show the determined distance.

DETAILED DESCRIPTION

FIGS.1through9, discussed below, and the various embodiments of this disclosure are described with reference to the accompanying drawings. However, it should be appreciated that this disclosure is not limited to these embodiments and all changes and/or equivalents or replacements thereto also belong to the scope of this disclosure.

As discussed above, more and more applications have started to leverage the capabilities of heterogeneous devices to create new and immersive experiences. Traditional computing devices (such as desktop and laptop computers) and newer intelligent computing devices (such as smartphones, tablets, and wearables like smart watches and earbuds) are being connected together in collaborative ways to enable new services that previously were not possible. At the same time, with increasing focus on privacy issues (and sometimes on cloud dependency and cost), device-to-device communication and collaboration has become an important topic. Distance awareness (such as knowledge of the physical distance between devices, sometimes referred to as proximity awareness) is an important consideration to facilitate device-to-device communication and collaboration.

Typically, for wireless-enabled devices, the distance between two devices can be “sensed” (such as estimated) using one or more wireless interfaces, such as WiFi, Bluetooth, and ultra-wideband (UWB) interfaces. However, on many conventional devices currently available, distance measurement using WiFi and Bluetooth is based on wireless signal strength measurements, which typically fluctuate and are vulnerable to noise. Therefore, the corresponding distance measurements may not be accurate. Conversely, while UWB has greater accuracy in distance measurement than WiFi or Bluetooth, UWB is not available in many devices.

Acoustic sensing, which uses one or more speakers and microphones, is an emerging technology for sensing the distance between devices. Acoustic sensing has attracted much attention as it usually offers better accuracy than WiFi or Bluetooth and can be performed using only one or more microphones and one or more speakers that are already widely available on most modern computing devices. In most traditional acoustic sensing frameworks, the speaker(s) and microphone(s) either belong to the same mobile device (such as onboard speaker(s) and microphone(s) of a smartphone) or belong to two peer mobile devices (such as two smartphones). However, the former makes it difficult to measure relatively long ranges (such as several meters) because the speaker(s) and the microphone(s) cannot be placed apart by a suitable distance. The latter offers flexibility in the placement of the speaker(s) and the microphone(s), but it is not very compatible with the scenario of a single user because a single user usually owns only one of the same type of mobile device.

This disclosure provides various techniques for measuring proximity between devices using acoustics. As described in more detail below, the disclosed systems and methods play one or more sounds from at least one speaker and record the sound(s) using at least one microphone. In some embodiments, the speaker and the microphone can belong to a mobile device and an acoustic device, respectively. In other embodiments, the speaker and the microphone can belong to the acoustic device and the mobile device, respectively. In both modes, the mobile device and the acoustic device can be connected via a radio-frequency (RF) module (such as Bluetooth, WiFi, UWB, etc.) to transmit audio data. Moreover, the disclosed systems and methods provide multiple approaches for automatically detecting ambient noise and improving signal-to-noise ratio (SNR) to an appropriate level at the cost of just a small amount of delay. This enables the disclosed embodiments to self-adapt to various environments having different levels of noise.

In recent times, increasing numbers of individuals own increasingly rich wireless devices (such as smart watch, earbuds, smart speakers, and the like) that have at least one on-board speaker and at least one microphone. Often, multiple devices (such as a smartphone and N wireless acoustic devices like earbuds, a smart watch, a smart speaker, etc.) are used together by one individual as a connected system. Accordingly, some embodiments of this disclosure use such connected system devices for proximity measurement.

Compared to prior techniques, the disclosed embodiments are robust enough to improve acoustic proximity measurement in various physical configurations. In addition, the disclosed embodiments perform successfully when exposed to environments having different level of noise. This makes these embodiments ideal for real-world applications, such as detecting nearby devices, avoiding circumstances of forgetting devices, and practicing social distancing.

Note that while some of the embodiments discussed below are described in the context of use in consumer electronic devices (such as smartphones), this is merely one example. It will be understood that the principles of this disclosure may be implemented in any number of other suitable contexts and may use any suitable devices.

FIG.1illustrates an example network configuration100including an electronic device according to this disclosure. The embodiment of the network configuration100shown inFIG.1is for illustration only. Other embodiments of the network configuration100could be used without departing from the scope of this disclosure.

According to embodiments of this disclosure, an electronic device101is included in the network configuration100. The electronic device101can include at least one of a bus110, a processor120, a memory130, an input/output (I/O) interface150, a display160, a communication interface170, or a sensor180. In some embodiments, the electronic device101may exclude at least one of these components or may add at least one other component. The bus110includes a circuit for connecting the components120-180with one another and for transferring communications (such as control messages and/or data) between the components.

The processor120includes one or more of a central processing unit (CPU), an application processor (AP), or a communication processor (CP). The processor120is able to perform control on at least one of the other components of the electronic device101and/or perform an operation or data processing relating to communication. In some embodiments, the processor120can be a graphics processor unit (GPU). As described in more detail below, the processor120may perform one or more operations for measuring proximity between devices using acoustics.

The memory130can include a volatile and/or non-volatile memory. For example, the memory130can store commands or data related to at least one other component of the electronic device101. According to embodiments of this disclosure, the memory130can store software and/or a program140. The program140includes, for example, a kernel141, middleware143, an application programming interface (API)145, and/or an application program (or “application”)147. At least a portion of the kernel141, middleware143, or API145may be denoted an operating system (OS).

The kernel141can control or manage system resources (such as the bus110, processor120, or memory130) used to perform operations or functions implemented in other programs (such as the middleware143, API145, or application147). The kernel141provides an interface that allows the middleware143, the API145, or the application147to access the individual components of the electronic device101to control or manage the system resources. The application147may support one or more functions for measuring proximity between devices using acoustics as discussed below. These functions can be performed by a single application or by multiple applications that each carry out one or more of these functions. The middleware143can function as a relay to allow the API145or the application147to communicate data with the kernel141, for instance. A plurality of applications147can be provided. The middleware143is able to control work requests received from the applications147, such as by allocating the priority of using the system resources of the electronic device101(like the bus110, the processor120, or the memory130) to at least one of the plurality of applications147. The API145is an interface allowing the application147to control functions provided from the kernel141or the middleware143. For example, the API145includes at least one interface or function (such as a command) for filing control, window control, image processing, or text control.

The I/O interface150serves as an interface that can, for example, transfer commands or data input from a user or other external devices to other component(s) of the electronic device101. The I/O interface150can also output commands or data received from other component(s) of the electronic device101to the user or the other external device.

The display160includes, for example, a liquid crystal display (LCD), a light emitting diode (LED) display, an organic light emitting diode (OLED) display, a quantum-dot light emitting diode (QLED) display, a microelectromechanical systems (MEMS) display, or an electronic paper display. The display160can also be a depth-aware display, such as a multi-focal display. The display160is able to display, for example, various contents (such as text, images, videos, icons, or symbols) to the user. The display160can include a touchscreen and may receive, for example, a touch, gesture, proximity, or hovering input using an electronic pen or a body portion of the user.

The communication interface170, for example, is able to set up communication between the electronic device101and an external electronic device (such as a first electronic device102, a second electronic device104, or a server106). For example, the communication interface170can be connected with a network162or164through wireless or wired communication to communicate with the external electronic device. The communication interface170can be a wired or wireless transceiver or any other component for transmitting and receiving signals.

The electronic device101further includes one or more sensors180that can meter a physical quantity or detect an activation state of the electronic device101and convert metered or detected information into an electrical signal. For example, one or more sensors180include one or more cameras or other imaging sensors for capturing images of scenes. The sensor(s)180can also include one or more buttons for touch input, a gesture sensor, a gyroscope or gyro sensor, an air pressure sensor, a magnetic sensor or magnetometer, an acceleration sensor or accelerometer, a grip sensor, a proximity sensor, a color sensor (such as a red green blue (RGB) sensor), a bio-physical sensor, a temperature sensor, a humidity sensor, an illumination sensor, an ultraviolet (UV) sensor, an electromyography (EMG) sensor, an electroencephalogram (EEG) sensor, an electrocardiogram (ECG) sensor, an infrared (IR) sensor, an ultrasound sensor, an iris sensor, or a fingerprint sensor. The sensor(s)180can further include an inertial measurement unit, which can include one or more accelerometers, gyroscopes, and other components. In addition, the sensor(s)180can include a control circuit for controlling at least one of the sensors included here. Any of these sensor(s)180can be located within the electronic device101.

The first external electronic device102or the second external electronic device104can be a wearable device or an electronic device-mountable wearable device (such as an HMD). When the electronic device101is mounted in the electronic device102(such as the HMD), the electronic device101can communicate with the electronic device102through the communication interface170. The electronic device101can be directly connected with the electronic device102to communicate with the electronic device102without involving with a separate network. The electronic device101can also be an augmented reality wearable device, such as eyeglasses, that include one or more imaging sensors.

The first and second external electronic devices102and104and the server106each can be a device of the same or a different type from the electronic device101. According to certain embodiments of this disclosure, the server106includes a group of one or more servers. Also, according to certain embodiments of this disclosure, all or some of the operations executed on the electronic device101can be executed on another or multiple other electronic devices (such as the electronic devices102and104or server106). Further, according to certain embodiments of this disclosure, when the electronic device101should perform some function or service automatically or at a request, the electronic device101, instead of executing the function or service on its own or additionally, can request another device (such as electronic devices102and104or server106) to perform at least some functions associated therewith. The other electronic device (such as electronic devices102and104or server106) is able to execute the requested functions or additional functions and transfer a result of the execution to the electronic device101. The electronic device101can provide a requested function or service by processing the received result as it is or additionally. To that end, a cloud computing, distributed computing, or client-server computing technique may be used, for example. WhileFIG.1shows that the electronic device101includes the communication interface170to communicate with the external electronic device104or server106via the network162or164, the electronic device101may be independently operated without a separate communication function according to some embodiments of this disclosure.

The server106can include the same or similar components110-180as the electronic device101(or a suitable subset thereof). The server106can support to drive the electronic device101by performing at least one of operations (or functions) implemented on the electronic device101. For example, the server106can include a processing module or processor that may support the processor120implemented in the electronic device101. As described in more detail below, the server106may perform one or more operations to support techniques for measuring proximity between devices using acoustics.

FIG.2illustrates an example system200and an example technique for measuring proximity between devices using acoustics according to this disclosure. For ease of explanation, the system200is described as being implemented using one or more components of the network configuration100ofFIG.1described above, such as the electronic devices101,102, and104. However, this is merely one example, and the system200could be implemented using any other suitable device(s) and in any other suitable system(s).

As shown inFIG.2, the system200includes a mobile device202and multiple acoustic devices204a-204n. The mobile device202can represent (or be represented by) the electronic device101ofFIG.1. In some embodiments, the mobile device202is a smartphone, tablet, or the like. The acoustic devices204a-204nrepresent devices that are capable of generating and emitting sound, such as earbuds or smart speakers. The acoustic devices204a-204ncan represent (or be represented by) others of the electronic devices ofFIG.1, such as the electronic devices102and104. WhileFIG.2is shown with multiple (N>1) acoustic devices204a-204n, some embodiments may include only one acoustic device (N=1).

The mobile device202is relatively proximate to each of the acoustic devices204a-204n. For example, the distance between the mobile device202and each of the acoustic devices204a-204ncan be as little as 5 mm or less or as large as a few meters or more. In particular, the distance between the mobile device202and each of the acoustic devices204a-204ncan be small enough that sound emitted from one of the devices202,204a-204ncan be detected at other ones of the devices202,204a-204n. Each of the mobile device202and the acoustic devices204a-204ncan include an RF module206(which can represent or be represented by the communication interface170ofFIG.1), one or more speakers208, and one or more microphones210.

InFIG.2, a first technique for measuring proximity between devices using acoustics and the system200is shown. In the first technique, the mobile device202emits one or more sounds, such as from the speaker208. In some embodiments, the sounds include one or more frequency-modulated continuous-wave (FMCW) chirps. The sounds are conveyed through the air as sound waves and are received at one or more of the acoustic devices204a-204n, such as by one or more microphones210of each acoustic device204a-204n. Each acoustic device204a-204nrecords the sounds, and one or more of the acoustic devices204a-204nwirelessly transmits the recorded sounds back to the mobile device202as sound data via the RF module206. After the mobile device202receives the recorded sound data from the acoustic device(s)204a-204n, the mobile device202determines one or more intermediate frequency (IF) signals based on the emitted sounds and the recorded sound data. The mobile device202can also determine a distance between the mobile device202and one or more of the acoustic devices204a-204nusing the frequency of the IF signal(s) and one or more characteristics of the emitted sounds (such as the duration and bandwidth of the FMCW chirps, etc.). Further details of the determination of IF frequency signals and distances are provided below. The determined distance can be presented to a user, such as by showing the distance on a display of the mobile device202(like on the display160).

By receiving recorded sound data from each of the acoustic devices204a-204n, the mobile device202can simultaneously or sequentially calculate a distance to each of N acoustic devices204a-204n. In some embodiments, the system200can used this distance measurement technique to track the movement of the mobile device202relative to each acoustic device(s)204a-204nand provide one or more location-aware services. For example, if two or more of the acoustic devices204a-204nare televisions, the system200can be used to determine the television closest to the mobile device202in preparation for streaming a video from the mobile device202to the closest television.

FIG.3illustrates another example technique for measuring proximity between devices using acoustics in the system200ofFIG.2according to this disclosure. In this technique, the acoustic devices204a-204nare used as the sound emitters, and the mobile device202is used as the sound receiver. As shown inFIG.3, the mobile device202wirelessly transmits, via the RF module206, sound data to the acoustic devices204a-204n. The transmitted sound data represents N-channel sounds for the N acoustic devices204a-204nto play. In some embodiments, the N-channel sounds include FMCW chirps on only one channel (such as FMCW chirps to be emitted by only one of the acoustic devices204a-204n), where the other channels are muted to avoid interference of the sound. The sounds from the unmuted acoustic device204a-204nare conveyed through the air as sound waves and are received at the mobile device202, such as by the microphone210. The mobile device202records the sounds and determines one or more IF signals based on the sound data transmitted by the mobile device202and the recorded sounds received by the mobile device202. The mobile device202can also determine a distance between the mobile device202and the acoustic device204a-204nthat emitted the sounds using the frequency of the IF signal(s) and one or more characteristics of the recorded sounds (such as the duration and bandwidth of the FMCW chirps, etc.).

The distance measurement technique can be repeated in another round, with the mobile device202transmitting sound data with a different active channel of the N-channel sounds for a different acoustic device204a-204nto play. The distance measurement technique can be repeated for N rounds until each of the acoustic devices204a-204nhas emitted FMCW chirps. Similar to the technique described inFIG.2, the technique ofFIG.3can be used to track the movement of the mobile device202and provide location-aware services, such as streaming a video from the mobile device202to the closest television.

AlthoughFIGS.2and3illustrate one example of a system200and various examples of techniques for measuring proximity between devices using acoustics, various changes may be made toFIGS.2and3. For example, the system200could include any number of each component in any suitable arrangement. In general, computing and communication systems come in a wide variety of configurations, andFIGS.2and3do not limit the scope of this disclosure to any particular configuration. Also, while described as involving a specific sequence of operations, various operations of the techniques described with respect toFIGS.2and3could overlap, occur in parallel, occur in a different order, or occur any number of times (including zero times). In addition, the specific operations shown inFIGS.2and3are examples only, and other techniques could be used to perform each of the operations shown inFIGS.2and3.

FIG.4illustrates an example process400for measuring proximity between devices using acoustics according to this disclosure. For ease of explanation, the process400shown inFIG.4is described as involving the use of the system200shown inFIGS.2and3. However, the process400shown inFIG.4could be used with any other suitable device(s) and in any other suitable system(s)

As shown inFIG.4, a user (such as a user of the mobile device202and the acoustic devices204a-204n) selects either the mobile device202or the acoustic devices204a-204nto be a sound player in operation401. This can include, for example, the user making a device selection on a graphical user interface (GUI) of the mobile device202. This selection determines which of the proximity measurement techniques described inFIGS.2and3will be used for distance measurement. The user arranges the mobile device202and the acoustic devices204a-204ntogether in physical proximity in operation403. Based on the user selection, either the mobile device202or the acoustic devices204a-204nplay one or more sounds (such as FMCW chirps) as part of one of the proximity measurement techniques described earlier.

The user can initiate measurement of the distance between the mobile device202and the acoustic devices204a-204nin operation405using one of the proximity measurement techniques described earlier. This can include, for example, the user moving one or more of the mobile device202or the acoustic devices204a-204nto determine different distances or achieve a desired distance. The proximity measurement technique can automatically adapt to different levels of environmental noise in operation407using an adaptive control algorithm. Multiple adaptive control algorithms are described in greater detail below. After adequate FMCW chirps are received, the mobile device202can obtain the measured distance and show the distance on the GUI display of the mobile device202in operation409.

AlthoughFIG.4illustrates one example of a process400for measuring proximity between devices using acoustics, various changes may be made toFIG.4. For example, while shown as a series of steps, various steps inFIG.4could overlap, occur in parallel, occur in a different order, or occur any number of times.

FIG.5illustrates an example framework500for measuring proximity between devices using acoustics according to this disclosure. For ease of explanation, the framework500is described as being implemented in the mobile device202to perform the process400described above. However, this is merely one example, and the framework500could be implemented using any other suitable process(es) and device(s) and in any other suitable system(s).

As shown inFIG.5, the framework500includes a proximity measurement application502and an operating system (OS) framework504. The proximity measurement application502is a user-facing application that implements many of the functions of the proximity measurement process400. Such functions include synchronizing the mobile device202and the acoustic devices204a-204n, initiating and controlling a user interface (UI) agent510, executing a device synchronization module520, creating and executing a sound manager530, and creating and executing a sound processor540.

The OS framework504operates at the OS level of the mobile device202to facilitate the execution of the proximity measurement application502in the mobile device202. The OS framework504leverages at least one audio module (such as the speaker208and the microphone210) and at least one communication module (such as the RF module206) of the mobile device202to implement sound transmitting, receiving, and playing. The OS framework504includes any suitable software, firmware, hardware, or combination of these to facilitate execution of a user-facing application and communication with other devices, such as the acoustic devices204a-204n. In some embodiments, the OS framework may be an ANDROID framework. However, other suitable OS types are possible and within the scope of this disclosure.

The UI agent510represents a GUI for showing distance information from the proximity measurement application502and interacting with the user. In some embodiments, the user uses the UI agent510to initiate or stop synchronization of the mobile device202and the acoustic devices204a-204n, indicate which of the mobile device202and the acoustic devices204a-204nwill play a sound, and initiate or stop the proximity measurement process400. The UI agent510can show the process of synchronization/measurement and the measured distance on a display of the mobile device202. The UI agent510can include any additional or alternative functions for interacting with the user.

The device synchronization module520can be used as needed to synchronize the mobile device202and the acoustic devices204a-204n. As is typical for electronic devices, the mobile device202and the acoustic devices204a-204ncan each have its own clock. Over time, the clocks may slowly become out of sync, which is often referred to as clock drift. To ensure that the process400performs as accurately as possible, the mobile device202can use the device synchronization module520to eliminate the clock drift and avoid cumulative distance measurement error.

The device synchronization module520supports any suitable process for reducing or eliminating clock drift between devices. In some embodiments, the device synchronization module520supports a calibration process522that can be performed before distance measurement. During the calibration process522, the proximity measurement application502instructs the user to place the mobile device202and the acoustic devices204a-204nin proximity to each other. The proximity measurement application502collects FMCW chirps from the acoustic devices204a-204n, which are used for calibration. In some embodiments, the steps of the calibration process522are shown on the UI agent510.

The sound manager530includes an FMCW generation module532, which generates the FMCW chirp data. The sound manager530also includes an acoustic device selection module534, which selects which acoustic device204a-204nis to be unmuted (if needed) before playing a sound (such as is described inFIG.3). In some embodiments, the bandwidth of the FMCW chirps is fixed (such as from 1 kHz to 7 kHz), but the FMCW generation module532can adjust the duration and number of the chirps according to feedback from an adaptive control module546(described below). The generated FMCW chirps can be played by the speaker208of the mobile device202, recorded by the microphone210on the acoustic devices204a-204n, and transmitted back to the mobile device202(via the RF module206) for processing (such as described inFIG.2). Alternatively, the generated FMCW chirps can be transmitted to and played by one or more acoustic devices204a-204n, which can be recorded and processed by the mobile device202(such as described inFIG.3). In some embodiments, the sound manager530is started and stopped by the UI agent510. Additionally or alternatively, the sound manager530can call the sound processor540to process the FMCW sounds.

The sound processor540processes the FMCW sounds recorded by the microphone210or emitted by the speaker208in order to perform acoustic ranging. Here, acoustic ranging is synonymous with proximity measurement and refers to estimating the distance between the mobile device202and one or more of the acoustic devices204a-204n. The sound processor540also receives and processes clock drift information from the device synchronization module520for synchronization of the mobile device202and the acoustic devices204a-204n. In this example, the sound processor540includes an acoustic ranging algorithm542, an SNR estimation module544, and the adaptive control module546.

FIG.6illustrates an example acoustic ranging algorithm542according to this disclosure. As shown inFIG.6, the acoustic ranging algorithm542can be a ranging fast Fourier transform (FFT) algorithm. In a chart600, the horizontal axis represents time, and the vertical axis represents frequency. It is assumed, for the sake of simplicity, that there is zero noise.

At time “0,” a played sound601is emitted, such as by the speaker208of the mobile device202. The played sound601represents a sound that can include FMCW chirps as described above. The played sound601has a duration of T and changes (such as increases) in frequency over time. The frequency bandwidth of the played sound601is denoted as “BW.” Both T and BW can be constant for a fixed set of FMCW chirps. The played sound601is received at another device, such as by the microphone210at one of the acoustic devices204a-204n, as a received (Rx) sound602. Due to the speed of sound and the distance between the mobile device202and the acoustic device204a-204n, the sound602is delayed from the played sound601by time td.

Using the FFT algorithm, the sound processor540mixes the Rx sound602with the played sound601to produce an IF signal603, whose frequency is the difference between the instantaneous frequencies of the played sound601and the Rx sound602. If there is a constant distance between the mobile device202and the acoustic device204a-204n, the two signals601-602result in an IF signal603of constant frequency tone fd. Using the frequency tone fdof the IF signal603, the sound processor540can determine the range (such as distance) between the mobile device202and the acoustic device204a-204n. In some embodiments, the distance d can be calculated according to the following.

Here, Vsis the speed of sound.

The SNR estimation module544can perform SNR estimation in the frequency domain in order to reduce SNR in the acoustic ranging algorithm542. Here, SNR is defined as the ratio of signal power to noise power. In order to calculate SNR, the SNR estimation module544can calculate the frequency spectrum of the mixed IF signal603. Due to the ambient noise around the mobile device202and the acoustic device(s)204a-204nand multi-path effects, the frequency spectrum may have non-zero values on almost all frequency components. When SNR is high, the power of the highest frequency component is more prominent than when SNR is low. Let Yrrepresent the Fourier transform of the Rx sound602, S represent the frequency bins of the played sound601, and N represent the frequency bins of the noise. In some cases, the SNR can be calculated as follows.

The adaptive control module546provides control information for use by the FMCW generation module532to adjust a duration and/or a number of chirps in the played sound601. For example, the adaptive control module546can use the estimated SNR from the SNR estimation module544to provide the control information, which can include instructions for either (1) quantitative chirp duration adjustment or (2) quantitative chirp number adjustment. These two possibilities are now described.

FIG.7illustrates an example quantitative chirp duration adjustment according to this disclosure. In quantitative chirp duration adjustment, the chirp duration of a played sound can be increased to improve SNR. Consider that the received signal Xr[n] is composed of the played sound Xp[n] and the noise σ[n], as represented by Xr[n]=Xp[n]+σ[n]. When the chirp duration increases, the power of the noise (assuming it is Gaussian white noise) will remain unchanged, but the power of the IF signal will increase proportionally.

As shown inFIG.7, a chart700compares the signals601-603fromFIG.6to revised signals701-703, including a revised played sound701, a revised Rx sound702, and a revised IF signal703. The revised signals701-703represent a longer chirp duration over the original signals601-603. The duration of the original played sound601is T1, and the duration of the revised played sound701is T2, which is longer than T1. Similarly, the original Rx sound602and the revised Rx sound702have durations of T1and T2, respectively. If the mobile device202and the acoustic device(s)204a-204ndo not move relative to each other, the time delay tdremains a constant.

The original IF signal603and the revised IF signal703have frequency tones f1and f2that, for a fixed distance d, can be determined by

respectively. When T1>>tdand T2>>td, the original IF signal603is approximately a sinusoid of frequency f1and duration T1in the time domain. Similarly, the revised IF signal703is approximately a sinusoid of frequency f2and duration T2in the time domain. In that case, the power of the original chirp P1and the power of the revised chirp P2have the relationship

The power of the noise may not change, so the SNR of the original chirp SNR1and the SNR of the revised chirp SNR2can have the relationship

This relationship enables the adaptive control module546to increase or decrease SNR by increasing or decreasing the chirp duration. For example, to increase SNR by 10 log10α, the adaptive control module546can change the chirp duration from T to αT. The quantitative chirp duration adjustment algorithm enables the framework500to trade off a small amount of latency for better ranging accuracy. In most real-world implementations, this is acceptable because distance measurement is typically tolerant of such small delays. Meanwhile, the adjustment is quick because the target chirp duration can be calculated quantitatively and is adjusted only once for a specific distance.

FIG.8illustrates an example quantitative chirp number adjustment according to this disclosure. In quantitative chirp number adjustment, the number of played chirps in the played sound can be increased to improve SNR, rather than increasing the duration of the played sound.

As shown inFIG.8, a chart800illustrates that, instead of only one played sound801being emitted (such as by the speaker208of the mobile device202), there are multiple (N) played sounds801emitted in a sequence. The N played sounds801are received as N Rx sounds802, and N IF signals803can be determined as discussed above. When SNR is lower than a predefined threshold, the adaptive control module546can stack the range FFT results from the N played sounds801into a matrix and perform a doppler FFT. Since the distance to measure does not change significantly during a short period of time, the N played sounds801add up constructively, making the power of the resulting signal N times as large as that of one signal. However, the power of the noise does not change. Thus, to increase SNR by at least 10 log10α, the number of chirps can be increased, such as to at least a times as large as the original number.

AlthoughFIGS.5through8illustrate one example of a framework500for measuring proximity between devices using acoustics and related details, various changes may be made toFIGS.5through8. For example, while the framework500is described with various examples of modules, algorithms, and operations, other embodiments could include other modules, algorithms, and/or other operations. Also, while the framework500is described as being implemented in the mobile device202, one or more of the components of the framework500could be implemented in one or more of the acoustic devices204a-204n.

Note that the operations and functions shown in or described with respect toFIGS.2through8can be implemented in an electronic device101, server106, mobile device202, acoustic device(s)204a-204n, or other device(s) in any suitable manner. For example, in some embodiments, the operations and functions shown in or described with respect toFIGS.2through8can be implemented or supported using one or more software applications or other software instructions that are executed by the processor120of the electronic device101, server106, mobile device202, acoustic device(s)204a-204n, or other device(s). In other embodiments, at least some of the operations and functions shown in or described with respect toFIGS.2through8can be implemented or supported using dedicated hardware components. In general, the operations and functions shown in or described with respect toFIGS.2through8can be performed using any suitable hardware or any suitable combination of hardware and software/firmware instructions.

FIG.9illustrates an example method900for measuring proximity between devices using acoustics according to this disclosure. For ease of explanation, the method900shown inFIG.9is described as involving the use of the system200shown inFIGS.2and3and the framework500shown inFIG.5. However, the method900shown inFIG.9could be used with any other suitable framework(s) and device(s) and in any other suitable system(s).

As shown inFIG.9, a sound is emitted by a first device at step901. This could include, for example, the mobile device202emitting a sound, such as the played sound601. A recorded sound is received at the first device at step903. The recorded sound includes a recording of the emitted sound by a second device. This could include, for example, the mobile device202receiving a recorded sound, such as the Rx sound602, where the recorded sound is recorded by one or more of the acoustic devices204a-204nand transmitted as sound data to the mobile device202via the RF module206.

An IF signal is determined based on the emitted sound and the recorded sound at step905. This could include, for example, the mobile device202determining the IF signal603based on the played sound601and the Rx sound602. A distance between the first device and the second device is determined based on a frequency of the IF signal and one or more characteristics of the emitted sound at step907. This could include, for example, the mobile device202determining a distance between the mobile device202and one or more of the acoustic devices204a-204nbased on a frequency of the IF signal603and the duration and/or bandwidth of the FMCW chirps in the played sound601. The determined distance is presented at step909. This could include, for example, the mobile device202presenting the determined distance on a display of the mobile device202.

AlthoughFIG.9illustrates one example of a method900for measuring proximity between devices using acoustics, various changes may be made toFIG.9. For example, while shown as a series of steps, various steps inFIG.9could overlap, occur in parallel, occur in a different order, or occur any number of times.

Note that the various embodiments of this disclosure can be applied in a variety of use cases and achieve high accuracy. For example, experimental results show that the measurement error in some embodiments is less than 5 mm for a measured distance of 1 m and less than 2 cm for a measured distance of 5 m. Note, however, that these values are for illustration only and can vary depending on the implementation. Also, some embodiments can be used to measure the distance between two devices, and an alert can be generated when the distance is too small (such as less than a threshold distance). This can be useful for social distancing in order to encourage devices (and thus users) to stay apart. The opposite determination can also be useful. For instance, in some embodiments, an alert can be generated when the distance is too large (such as greater than a threshold distance). This may be useful in various scenarios, such as when a smartphone is moving away from a connected smart watch and an alert can be generated notifying the user (so the user does not forget the smart watch). In particular embodiments, when the watch is moving away from the phone (or vice versa), the phone or watch can automatically lock itself. In addition, in some embodiments, a device can build a profile of nearby devices to provide richer context including distances. For example, a device can derive its location from nearby devices if the distances and the locations of the nearby devices are known.