This application claims the priority benefit of Chinese Patent Application Serial Number 202111459996.9, filed on Dec. 2, 2021, the full disclosure of which is incorporated herein by reference.
The application relates to a wireless earphone, in particular, to a sonic ranging method for a wireless earphone and a mobile phone.
At present, wireless earphones are made smaller and smaller, and consequently easy to get lost. Therefore, a locating mechanism of the earphone is required. At present, a commonly used method is to generate audible signals by the earphone speaker, so that the users may hear to find. However, the method does not indicate specific range and it is still difficult in finding.
Meanwhile, with the development of stereo technology, the head posture may be required to implement various applications, such as adjusting the sound intensity of left and right headphones according to the head posture, or generating stereo effects. In a presently known solution, the attitude of user head is detected through a 3-axis gyroscope. The solution, however, requires additional chips, excessive cost and power consumption, and additional space.
To solve the above technical problems, the embodiment of the present application provides a wireless earphone, a mobile phone, and a wireless ranging method for the wireless earphone and the mobile phone.
In the embodiment of the invention, the wireless earphone comprises an acoustic receiver module, a microprocessor, and a speaker module. The acoustic receiver module is used to receive ambient sound. The microprocessor is connected to the acoustic receiver module to process the ambient sound and generate a digital output signal. The speaker module is connected to the microprocessor, controlled by the microprocessor, and plays sound according to the digital output signal.
The mobile phone embodiment of the present application comprises an acoustic receiver module, a processor, a speaker module, and a memory device. The acoustic receiver module may receive ambient sound. The processor is connected to the acoustic receiver module to process the ambient sound and generate a digital output signal. The speaker module is connected to the processor, controlled by the processor, and plays sound according to the digital output signal. The memory device stores a delay compensation parameter, and the delay compensation parameter comprises a length of signal processing time required by the mobile phone and the wireless earphone to process the first audio sequence and a second audio sequence. When the mobile phone performs an acoustic response test on the wireless earphone, the processor generates a first audio sequence in the first time slot and plays it through the speaker module. The acoustic receiver module receives ambient sound and converts the ambient sound into a digital input signal to the processor. When the processor recognizes that the digital input signal comprises a second audio sequence transmitted from the wireless earphone, the processor estimates a distance between the wireless earphone and the mobile phone according to a length of elapsed time started from the first time slot and the delay compensation parameter.
In a further embodiment, the application proposes a sonic ranging method for mobile phone and wireless earphone. Firstly, the mobile phone performs an acoustic response test on the wireless earphone, comprising: the mobile phone generates a first audio sequence and plays it at a first time slot, and the wireless earphone generates a second audio sequence and plays it after recognizing the first audio sequence. When the mobile phone recognizes the second audio sequence, the mobile phone estimates the length of elapsed time according to the time difference between a current time slot and the first time slot. When the mobile phone obtains the length of elapsed time, the mobile phone determines the distance between the wireless earphone and the mobile phone according to the delay compensation parameter and the length of elapsed time.
In a further embodiment, the wireless earphone and the mobile phone perform a calibration procedure to obtain the delay compensation parameter. The calibration procedure comprises the following steps. Firstly, the wireless earphone is positioned at a first distance from the mobile phone, and the mobile phone performs an acoustic response test on the wireless earphone to obtain a first round-trip response time. Next, the wireless earphone is positioned at a second distance from the mobile phone, and the mobile phone performs the acoustic response test on the wireless earphone to obtain a second round-trip response time. Finally, the delay compensation parameter is deducted according to the difference between the first distance and the second distance, and the difference between the first round-trip response time and the second round-trip response time.
In a more specific embodiment, after the mobile phone generates the first audio sequence, the first audio sequence is first converted to an analog signal to be amplified and played through the speaker module of the mobile phone.
In a more specific embodiment, when the mobile phone performs the acoustic response test on the wireless earphone, the mobile phone may first send a wireless signal to notify the wireless earphone to turn on an audio listening function. When the wireless earphone starts the audio listening function, ambient sound is received, filtered, noise canceled, echo canceled, and digitized to generate a digital signal. Thus, the wireless earphone identifies whether the first audio sequence is included in the digital signal. When the wireless earphone recognizes that the digital signal contains the first audio sequence, it generates the second audio sequence, controls the speaker module in the wireless earphone to amplify and play sounds comprising the second audio sequence.
In a further embodiment, the mobile phone may regularly perform the acoustic response test on the wireless earphone to track changes of the distance, so as to implement corresponding functions according to the characteristics of the distance changes. For example, the mobile phone may control the wireless earphone to adjust the sound field effects, volume control, jump forward, jump backward, start playing, or stop playing.
It should be understood, however, that this summary may not contain all aspects and embodiments of the present invention, that this summary is not meant to be limiting or restrictive in any manner, and that the invention as disclosed herein will be understood by one of ordinary skill in the art to encompass obvious improvements and modifications thereto.
The features of the exemplary embodiments believed to be novel and the elements and/or the steps characteristic of the exemplary embodiments are set forth with particularity in the appended claims. The Figures are for illustration purposes only and are not drawn to scale. The exemplary embodiments, both as to organization and method of operation, may best be understood by reference to the detailed description which follows taken in conjunction with the accompanying drawings in which:
The present invention will now be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the invention are shown. This present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this present invention will be thorough and complete, and will fully convey the scope of the present invention to those skilled in the art.
Certain terms are used throughout the description and following claims to refer to particular components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but function. In the following description and in the claims, the terms “include/including” and “comprise/comprising” are used in an open-ended fashion, and thus should be interpreted as “including but not limited to”. “Substantial/substantially” means, within an acceptable error range, the person skilled in the art may solve the technical problem in a certain error range to achieve the basic technical effect.
The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustration of the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.
Moreover, the terms “include,” “contain,” and any variation thereof are intended to cover a non-exclusive inclusion. Therefore, a process, method, object, or device that comprises a series of elements not only include these elements, but also comprises other elements not specified expressly, or may include inherent elements of the process, method, object, or device. If no more limitations are made, an element limited by “include a/an . . . ” does not exclude other same elements existing in the process, the method, the article, or the device which comprises the element.
In the following embodiment, the same reference numerals are used to refer to the same or similar elements throughout the invention.
In the embodiment of wireless earphone 200 in
The mobile phone 100 of
The speaker module 102 may be a speaker with a sound amplification function. In a more specific embodiment, the speaker module 102 may include a digital to analog converter (not shown) to convert the digital output signal generated by the mobile phone into an analog signal to be played through an amplifier. In other words, the speaker module 102 is connected to the processor 110 and is controlled by the processor 110 to play sound according to the digital output signal.
The memory device 106 stores a delay compensation parameter. The wireless transceiver 108 may support a variety of wireless protocols, such as Bluetooth, Wireless Fidelity (Wi-Fi), or near end communication (NFC). Similarly, since the present application focuses on the distance measurement method without using additional circuit elements, the detailed circuit design in the above acoustic receiver module 104, processor 110, speaker module 102, memory device 106, and wireless transceiver 108 are taken as known implementations that will not be introduced in detail herein.
One of the features of the application is that the provision of a delay compensation parameter. The delay compensation parameter is calculated by the mobile phone 100 through a calibration procedure with the wireless earphone 200, used to present the length of time required to process signals other than the time taken in sound wave transmissions. That is, the delay compensation parameter comprises the time spent by the mobile phone 100 and wireless earphone 200 in internal signal processing during wireless distance measurement.
When the mobile phone 100 performs an acoustic response test on the wireless earphone 200, the processor 110 generates a first audio sequence at the first time slot to be played through the speaker module 102. Next, the acoustic receiver module 104 receives ambient sound and generates a digital input signal to the processor 110. When the wireless earphone 200 responds a second audio sequence upon reception of the ambient sound comprising the first audio sequence. The processor 110 may estimate a round-trip time of the response by recognizing the second audio sequence transmitted from the wireless earphone 200. Specifically, the processor 110 estimates the length of elapsed time according to the time difference between the current time slot and the first time slot. Thereafter, the length of elapsed time is corrected according to the delay compensation parameter in memory device 106, and then the distance between the wireless earphone 200 and the mobile phone is estimated according to the formula of sound transmission in the air.
In a more specific embodiment, when the mobile phone performs the acoustic response test on the wireless earphone 200, it may first notify the wireless earphone 200 to turn on the audio listening function with the wireless signal. When the wireless earphone 200 turns on the audio listening function, it starts to receive ambient sound, filters the ambient sound, performs noise cancellation, echo cancellation, and digitalization on the ambient sound to generate a digital signal. Thus, the wireless earphone 200 identifies whether the first audio sequence is included in the digital signal. When the wireless earphone 200 recognizes that the digital signal contains the first audio sequence, a second audio sequence is generated. The wireless earphone 200 controls the speaker module in the wireless earphone 200 to amplify and play sound comprising the second audio sequence.
Considering the impact on human ears during the test, the transmitted sound wave frequency may be below 20 Hz, or above 20000 Hz, or a combination of multiple frequencies in the above range.
The following describes the algorithm of sound wave response time in combination with
That is, the internal signal processing delay from wireless earphone 200 to mobile phone 100 is formulated:
T
ETMR
=T
ET+
T
MR
The internal signal processing delay from mobile phone 100 to wireless earphone 200 is formulated:
T
MTER
=T
MT+
T
ER
The delay compensation parameter is presented:
T
OFFSET
=T
MTER
+T
ETMR
The internal processing delay difference between the two is
T
ΔTR
=T
MTER−
T
ETMR
Hence,
T
MTER
=
+T
ETMR
The total delay from the wireless earphone 200 to the mobile phone 100 is TME, formulated as:
T
ME−
T
TR+
T
ET+
T
MR
=T
TR+
T
ETMR
The total delay from the mobile phone 100 to the wireless earphone 200 is TEM, and the formula is:
T
EM=
T
TR+
T
MT+TER=TTR+TMTER=TTR+TΔTR+TETMR
Thus, the round-trip time between the mobile phone 100 and the wireless earphone 200 is presented as:
T
MEM=2*TTR+TΔTR+2*TETMR
When the mobile phone 100 starts the acoustic response test, a time stamp To of the current time slot is recorded. The first audio sequence is generated and played through the speaker module 102. The first audio sequence may be encoded by pulse signals, and the sound carrying the first audio sequence may be transmitted at a specific frequency. When the wireless earphone 200 receives the sound through the acoustic receiver module 204, the microprocessor 210 decodes the sound to identify the first audio sequence. When the microprocessor 210 confirms the receipt of the first audio sequence, it generates a second audio sequence, and the speaker module 202 plays sound carrying the second audio sequence. The second audio sequence may also be encoded by pulse signals and carried by a soundwave of a specific frequency. The sound received by the acoustic receiver module 104 in the mobile phone 100 is decoded and recognized by processor 110. When the processor 110 confirms the receipt of the second audio sequence, the current time slot is recorded as a time stamp T1. Thus, the round-trip time between the mobile phone 100 and the wireless earphone 200 is formulated:
T
MEM
=T
1
−T
0
In other words, the total elapsed time from sending the first audio sequence to confirming the second audio sequence is:
2*TTR1+TΔTR+2*TETMR1=TMEM
Deducting the internal signal processing time of mobile phone 100 and wireless earphone 200, the actual sound transmission time between mobile phone 100 and wireless earphone 200 is formulated as:
T
A
=T
TR1 =(TMEM−TΔTR+2*TEMTR1))/2
Then, the known sonic transmission speed formula is considered as:
v=331+0.6t
Wherein t is the Celsius temperature.
The sound speed v is obtained according to the sound speed formula, and the distance between the mobile phone 100 and the wireless earphone 200 may be estimated by multiplying the actual sound transmission time TA.
L
A
=v*T
A
According to the formula, the distance LA of wireless earphone 200 corresponding to mobile phone 100 can be estimated. Since the wireless earphone 200 of the left and right ears exists independently, the above ranging methods may be operated separately. In addition, since the ambient temperature contributes to the sonic formula, the mobile phone 100 of the embodiment of the application may also estimate the ambient temperature at that time through a sensor or online weather query functions, so as to improve the accuracy of distance measurement.
First, in step 401, the calibration procedure is started. The calibration procedure may be carried out at the factory, or alternatively, the software application (APP) may be provided for users to calibrate by themselves. In step 403, the wireless earphone 200 and the mobile phone 100 are separated by a first distance. In step 405, the mobile phone 100 performs an acoustic response test on the wireless earphone 200 to obtain a first round-trip response time.
For example, the distance between mobile phone 100 and wireless earphone 200 is fixed to L1, and the acoustic response test is performed to obtain the first round-trip response time TL1
T
L1=2*TTRL1+TΔTR+2*TETMR
Next, in step 407, the wireless earphone 200 and the mobile phone 100 are separated by a second distance. In step 409, the mobile phone 100 performs the acoustic response test on the wireless earphone 200 to obtain a second round-trip response time.
For example, the distance between mobile phone 100 and wireless earphone 200 is fixed to L2, and the acoustic response test is performed to obtain the second round-trip response time TL2
T
L2=2*TTRL2+TΔTR+2*TETMR
Finally, in step 411, the delay compensation parameter TOFFSET is deducted according to the difference between the first distance and the second distance, and the difference between the first round-trip response time and the second round-trip response time.
Given that the distance L2=2*L1, the transfer time is assumed to be:
T
TRL2=2*TTRL1
Therefore, the delay compensation parameter TOFFSET may be calculated by the following formula:
2*TTRL1=TL2−TL1
T
TRL1=(TL2−TL1)/2
TOFFSET−TΔTR+2*TETMR=TL1−2*TTRL1
It can be concluded that the delay compensation parameter TOFFSET is the total time required for the mobile phone 100 and the wireless earphone 200 to process the first audio sequence and the second audio sequence.
In step 501, the mobile phone 100 starts an acoustic response test on the wireless earphone 200. In step 503, the mobile phone 100 records the current time slot as the first timestamp, generates the first audio sequence, and plays sound containing the first audio sequence through the speaker module 102 of the mobile phone. In step 505, the microprocessor 210 in the wireless earphone 200 decodes the received sound. In step 507, if the microprocessor 210 of the wireless earphone 200 recognizes the first audio sequence, proceed to step 509 to generate a second audio sequence, and plays sound containing the second audio sequence through the speaker module 202. If the first audio sequence is not recognized in step 507, continue to step 505. In step 511, after the mobile phone 100 sends the first audio sequence, the acoustic receiver module 104 also continuously listens to a response, wherein the processor 110 decodes received ambient sound. In step 513, if the mobile phone 100 recognizes the second audio sequence generated by the wireless earphone 200, proceed to step 515 to record the current time slot as the second timestamp. The second timestamp subtracting the first timestamp renders the total round-trip response time, and thus the acoustic response test is complete.
Usually, the wireless earphone 200 and the mobile phone 100 are connected by Bluetooth limited by an effective distance no more than 100 meters. Therefore, the theoretical sound transmission time will not exceed half a second. The acoustic response test of the embodiment may set a time limit. If no response is received beyond the time limit, the test is deemed failed. For example, if the second audio sequence of the response is not recognized in step 513, it is determined in step 517 whether the reception time exceeds a time limit. If the time limit has not been exceeded, repeat step 511. If the time is exceeded, it is determined that the acoustic response test is failed in step 519. Since soundwave transmission is taken as the main test method in the embodiments, low-frequency sound is preferable for testing as they can survive long distance deterioration and generates less disturbance to human ears.
In step 601, the mobile phone 100 may periodically and continuously perform the sonic ranging method shown in
In step 701, the left wireless earphone and the right wireless earphone regularly perform the sonic ranging method for each other as shown in
In a further embodiment, the method may be combined with a three-axis gyroscope in wireless earphone 200 to improve the accuracy of head pose detection.
In a further embodiment, the corresponding relationship between the time length and the distance measured in the calibration procedure may be stored in a data table. Thus, after the subsequent ranging program estimates the sound wave transmission time, the distance may be estimated directly by looking up the data table instead of calculating through the sonic formula. In addition, during calibration, to reduce the errors caused by attitude variations of the mobile phone 100, multiple mobile phone attitudes may be adapted in the acoustic response test. The measurement results may be further filtered to reduce the measurement error.
In a further embodiment, the ranging step may be carried out several times continuously, and the distance may be determined only after filtering, so as to reduce the measurement error and jitter.
To sum up, the sonic ranging method provided in the application may enable the mobile phone 100 to confirm the distance or attitude of the wireless earphone 200 without adding new hardware, so as to run a variety of applications.
It is to be understood that the term “comprises”, “comprising”, or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device of a series of elements not only include those elements but also comprises other elements that are not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element defined by the phrase “comprising a . . . ” does not exclude the presence of the same element in the process, method, article, or device that comprises the element.
Although the present invention has been explained in relation to its preferred embodiment, it does not intend to limit the present invention. It will be apparent to those skilled in the art having regard to this present invention that other modifications of the exemplary embodiments beyond those embodiments specifically described here may be made without departing from the spirit of the invention. Accordingly, such modifications are considered within the scope of the invention as limited solely by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
202111459996.9 | Dec 2021 | CN | national |