A binaural phase calibration noise reduction system and earphone based on in-band ultrasonic communication
Patent Information
- Application Number
- CN202610366224.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-24
- Publication Date
- 2026-08-28
AI Technical Summary
[0003]然而,现有的TWS耳机在双耳协同降噪方面存在固有的技术局限性:
本发明的一种基于带内超声通讯的双耳相位校准降噪系统及耳机,通过建立独立的声学通讯链路,利用超声波在空气或人体骨骼中传播,能有效免疫电磁干扰,无论是在地铁、商场等电磁环境复杂的场景下,均能保持稳定的同步连接;同时,通过直接测量声波信号的相位变化来推算时钟漂移,能够实现更低的时钟同步精度。
Smart Images

Figure CN122661640A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of acoustic signal processing and wireless communication technology, specifically to a binaural phase calibration noise reduction system and headphones based on in-band ultrasonic communication. Background Technology
[0002] With the rapid development of wireless audio technology, true wireless stereo (TWS) earphones have become mainstream products in the modern consumer electronics market. Currently, TWS earphones with active noise cancellation (ANC) play an important role in dealing with environmental noise and improving the listening experience.
[0003] However, existing TWS earbuds have inherent technical limitations in terms of binaural collaborative noise cancellation:
[0004] Clock asynchrony issue: Since the left and right earbuds of TWS earphones are physically separate, each has its own independent local clock source (such as a crystal oscillator). Although the Bluetooth protocol provides a certain synchronization mechanism, physical errors and clock drift are inevitable between the two independent crystal oscillators.
[0005] Consequences of phase mismatch: In high-precision signal processing, especially for directional noise cancellation or spatial audio playback, microsecond-level sampling clock deviations can cause the phases of the left and right ear signals to be inaccurately aligned. This phase mismatch directly prevents the reverse sound waves of the noise reduction system from accurately canceling out the noise peaks, and may even cause phase inversion and superposition in certain frequency bands, thus increasing noise; it also leads to blurred sound image localization, affecting the user's immersive experience.
[0006] To address the synchronization issue, existing technologies typically rely on Bluetooth radio frequency (RF) signals for handshake synchronization. However, RF signals are highly susceptible to interference from external electromagnetic environments (such as Wi-Fi, microwave ovens, or other Bluetooth devices), and the processing latency of the Bluetooth protocol stack exhibits jitter, making it difficult to meet the high-precision synchronization requirements at the acoustic level. Some high-end solutions attempt to add ultra-wideband chips or near-field magnetic induction hardware, but this undoubtedly significantly increases the size, power consumption, and manufacturing cost of the headphones.
[0007] Therefore, how to achieve high-interference, high-precision clock synchronization and phase calibration between the left and right earphones using existing acoustic devices without increasing additional hardware costs is a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0008] In order to overcome the shortcomings and deficiencies of the existing technology, the purpose of this invention is to provide a binaural phase calibration noise reduction system and headphones based on in-band ultrasonic communication. By reusing the existing sound generation and reception units of the headphones, and using in-band ultrasonic waves that are inaudible to the human ear as synchronization pilots, low-cost and high-precision binaural clock synchronization and dynamic calibration of noise reduction parameters can be achieved.
[0009] This invention is achieved through the following technical solution: A binaural phase calibration noise reduction system based on in-band ultrasonic communication includes a first earphone device and a second earphone device. The first earphone device and the second earphone device establish a pairing connection through a wireless communication protocol. The first earphone device includes a first signal processing unit and a first electroacoustic transducer. The second earphone device includes a second acoustic-electroacoustic transducer and a second signal processing unit. The first signal processing unit is used to superimpose an ultrasonic pilot signal with a frequency between the upper limit of human hearing threshold and the hardware response cutoff frequency onto the audio signal to be played, and drive the first electroacoustic transducer to radiate outward. The second acoustic-electric transducer is used to receive external ambient sound and the ultrasonic pilot signal; The second signal processing unit calculates the sampling clock deviation between the first and second earphone devices by analyzing the ultrasonic pilot component in the received signal, and adjusts the parameters of the active noise cancellation filter accordingly.
[0010] In conjunction with the first aspect, the second signal processing unit is further configured to perform a phase calibration method, the phase calibration method comprising the following steps: S100. The first earphone device generates a single-frequency continuous wave or linear frequency modulated wave as an ultrasonic pilot signal, mixes it with the main audio bitstream, and plays it through a speaker; S200. The microphone of the second earphone device acquires the mixed sound wave signal and performs discrete sampling on the signal; S300. The second earphone device uses an orthogonal demodulation algorithm to separate the in-phase and quadrature components of the ultrasonic pilot signal from the acquired signal and calculates the instantaneous phase observation value at the current moment. S400. Based on the instantaneous phase observations at multiple consecutive moments, construct a phase-time evolution function and calculate the sampling frequency deviation rate of the first earphone device relative to the second earphone device; S500. Based on the calculated sampling frequency deviation rate, a dynamic fractional delay compensation coefficient is generated and applied to the inverting filter of the active noise cancellation system to synchronize the phase of the noise cancellation signals of the left and right headphones.
[0011] In conjunction with the first aspect, further, in step S300, the instantaneous phase observation value at the current moment is calculated using a sliding window discrete Fourier transform model, the mathematical algorithm of which is as follows:
[0012] in, Indicates the first The instantaneous phase angle calculated from each analysis frame; It is the arctangent function; Indicates the first The index in the frame is The discrete sampling point values; Indicates the length of the sampling points in the sliding window; It is a complex exponential rotation factor; Indicates the carrier frequency of the ultrasonic pilot signal; This indicates the sampling frequency of the analog-to-digital converter at the receiving end; The imaginary unit; and These represent the imaginary and real parts of a complex number, respectively.
[0013] In conjunction with the first aspect, further, in step S400, the calculation of the sampling frequency deviation rate is obtained by performing linear regression on the phase-dewinded data using the least squares method, which satisfies the following higher-order functional relationship: The goal is to solve for the deviation rate. This makes the following cost function Minimize:
[0014] The optimized solution is:
[0015] in: This represents the estimated normalized sampling clock skew rate; Indicates the first Each observed phase value Continuous phase value after dewinding ; Indicates the time interval between adjacent observation frames; Indicates the first The absolute time of each observation; These are the arithmetic mean of time and phase, respectively; This represents the total number of historical frames used for regression analysis.
[0016] In conjunction with the first aspect, further, by transmitting ultrasonic pulses bidirectionally, combined with clock deviation rate... The following modified two-way ranging algorithm is used to calculate the physical sound path distance between the first and second earphone devices. :
[0017] in, The physical distance between the two headphones; The speed of sound in air at the current ambient temperature; The local time for sending the first pulse to the first earpiece; The local time for the second earpiece to receive the first pulse; To restore the local time of the second pulse for the second earpiece; The local time at which the first earpiece receives the second pulse; The normalized sampling clock skew rate is calculated in step S400.
[0018] In conjunction with the first aspect, further, in step S500, the inverting filter acting on the active noise reduction system is designed as a fractional-delay all-pass filter, and its filter coefficients... The update algorithm is as follows: Let the cumulative time difference that needs to be compensated at the current moment be... The corresponding discrete delay is The Sinc function truncation and windowing algorithm is then used to generate the filter coefficients.
[0019] in, For the fractional delay filter One tap coefficient; For Hamming window functions; This is the real-time delay amount, including both integer and fractional parts. The order of the filter; This is the Singer function.
[0020] In conjunction with the first aspect, the phase calibration method further includes step S001, which is performed prior to step S100: The signal-to-noise ratio (SNR) spectral distribution at different candidate frequency points is determined by solving the following maximized functional. :
[0021] in, The calculated optimal pilot frequency; The preset ultrasonic frequency band range for the system; The preset pilot transmission energy; Environmental noise signal In the The short-time Fourier transform spectral amplitude of the frame; The average number of frames sampled for ambient noise. This is a function for searching the maximum value of the independent variable.
[0022] In conjunction with the first aspect, further, in step S100, the transmission amplitude is updated according to the received signal strength fed back by the second earphone device using the following exponential smoothing control algorithm:
[0023] in, The launch amplitude is updated in real time; The optimal target response amplitude preset for the receiving end; For the receiving end The signal values at each sampling point; This is the length of the power integration window; The convergence factor has a range of values. It is used to control the smoothness of adjustment.
[0024] Secondly, the present invention discloses a Bluetooth headset equipped with a binaural phase calibration noise reduction system as described above.
[0025] The beneficial effects of this invention are: The present invention discloses a binaural phase calibration noise reduction system and headphones based on in-band ultrasonic communication. By establishing an independent acoustic communication link and utilizing ultrasonic waves to propagate in the air or human skeleton, it can effectively resist electromagnetic interference and maintain a stable synchronous connection in complex electromagnetic environments such as subways and shopping malls. At the same time, by directly measuring the phase change of the sound wave signal to calculate the clock drift, it can achieve lower clock synchronization accuracy.
[0026] In addition, this invention does not require adding an extra dedicated communication chip to the headphones. It utilizes the headphones' original speaker to play ultrasonic pilot signals and the noise-canceling microphone to receive ultrasonic pilot signals. The hardware functions are expanded through the system's built-in software algorithm, which effectively reduces production costs and system power consumption. Attached Figure Description
[0027] The present invention will be further described with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present invention. For those skilled in the art, other drawings can be obtained based on the following drawings without creative effort.
[0028] Figure 1 This is a schematic diagram of a binaural phase calibration noise reduction system according to an embodiment of the present invention.
[0029] Figure 2 This is a flowchart of a phase calibration method according to an embodiment of the present invention.
[0030] Figure Labels First headphone device--100, first signal processing unit--110, first electroacoustic transducer--120, second headphone device--200, second electroacoustic transducer--210, second signal processing unit--220. Detailed Implementation
[0031] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0032] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0033] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0034] Example 1 like Figure 1 As shown, this embodiment discloses a binaural phase calibration noise reduction system based on in-band ultrasonic communication, which is mainly applied in true wireless stereo headphones. The system includes a first earphone device 100 and a second earphone device 200. In practical use, the first earphone device 100 and the second earphone device 200 typically correspond to the left and right earbuds worn by the user, respectively. The two establish a pairing connection through a wireless communication protocol (such as Bluetooth 5.2 or LE Audio protocol) to transmit audio data streams and control signals.
[0035] The first earphone device 100 serves as a signal transmitter and integrates a first signal processing unit 110 and a first electroacoustic transducer 120.
[0036] The first signal processing unit 110 can specifically be a DSP (Digital Signal Processor) module integrated in the Bluetooth SoC chip, which is configured to perform signal modulation functions. Specifically, when the first headset device 100 is ready to play music or call audio, the first signal processing unit 110 will superimpose a specific ultrasonic pilot signal at the digital domain end of the main audio signal to be played (whose frequency range is typically 20Hz-20kHz).
[0037] In this embodiment, to ensure a seamless experience, the frequency of the ultrasonic pilot signal is set between the upper limit of the human hearing threshold (approximately 20kHz) and the hardware response cutoff frequency (typically the physical limit of the speaker diaphragm, such as 24kHz-40kHz). Preferably, the ultrasonic pilot signal is a single-frequency continuous sine wave with a frequency of 21kHz-23kHz or a low-energy linear frequency modulated signal.
[0038] The first electroacoustic transducer 120, specifically a speaker assembly such as a dynamic driver, balanced armature driver, or planar magnetic driver, is connected to the first signal processing unit 110. It is used to convert the mixed electrical signal containing the ultrasonic pilot signal into a sound wave signal and radiate it outward. This means that while the first headphone device 100 is playing music that the user can hear, it is also continuously broadcasting a synchronization calibration signal that the user cannot hear.
[0039] The second earphone device 200 serves as a signal receiver and integrates a second acoustic-electric transducer 210 and a second signal processing unit 220.
[0040] The second acoustic transducer 210 is specifically a feedback microphone located inside the earphone or a feedforward microphone located outside the earphone. This microphone has a wide frequency response range (covering at least 24kHz) and is capable of simultaneously receiving external ambient noise, music played by the first earphone device 100, and the aforementioned ultrasonic pilot signal that is inaudible to the human ear.
[0041] The second signal processing unit 220 is also a DSP module integrated into the Bluetooth SoC of the second headphone device. It is electrically connected to the second acoustic-electric transducer 210 and is configured to perform the core algorithm for phase calibration.
[0042] Specifically, the second signal processing unit 220 internally runs a demodulation and control program. When the second acoustic transducer 210 acquires the mixed acoustic signal, the second signal processing unit 220 filters out the audio components using a digital filter (such as a bandpass filter) and separately extracts the ultrasonic pilot component. Since the first earphone device 100 and the second earphone device 200 use their own independent local crystal oscillators as clock sources, there will inevitably be a slight sampling clock deviation between them. The second signal processing unit 220 calculates the precise sampling clock deviation value between the two earphone devices by continuously monitoring the phase change of the received ultrasonic pilot signal.
[0043] Based on the calculated sampling clock deviation, the second signal processing unit 220 dynamically adjusts the parameters of the inverting filter in its internal active noise reduction algorithm (e.g., adjusting the group delay or coefficients of the filter) to compensate for the phase drift caused by clock asynchrony.
[0044] With the above structure, this embodiment achieves the establishment of a high-precision acoustic synchronization link independent of Bluetooth radio frequency using existing acoustic devices without adding additional hardware (such as UWB chips or induction coils), thereby ensuring extremely high phase consistency between the two ears when performing active noise cancellation processing.
[0045] Example 2 like Figure 2 As shown, this embodiment further discloses a binaural phase calibration method based on the above system. This method utilizes the acoustic link between the first earphone device 100 and the second earphone device 200 to achieve precise synchronization of the sampling clock. The specific processing flow includes the following steps: Step S100: Modulation and transmission of the ultrasonic pilot signal. The signal processing unit of the first earphone device 100 first generates a high-frequency pilot signal. In this preferred embodiment, in order to achieve a balance between signal-to-noise ratio and inaudibility, we select a frequency... A single-frequency continuous wave is used as the pilot frequency.
[0046] The pilot signal is directly superimposed on the audio bitstream (such as a music signal) in the digital domain at an extremely low amplitude (e.g., -40dBFS). The mixed signal is then amplified by a DAC (digital-to-analog converter) and a power amplifier before driving the speaker unit to play the signal. Since 22050Hz exceeds the upper limit of human hearing, users will only hear normal music and will not perceive the pilot signal.
[0047] Step S200: Acquisition and Discretization of Mixed Sound Waves. The second headphone device 200 continuously acquires external sound waves through its high-sensitivity microphone (such as a feedforward or feedback microphone). The acquired sound waves include not only ambient noise and musical reverberation, but also ultrasonic pilot signals that have attenuated after propagation through the air.
[0048] The analog electrical signal output from the microphone is discretized into a digital sequence via an ADC (analog-to-digital converter). It should be noted that in order to capture ultrasound signals, the sampling rate of the ADC is... The Nyquist sampling theorem must be satisfied, for example, by setting it as follows: .
[0049] Step S300: Quadrature demodulation and instantaneous phase calculation. In order to extract the weak pilot phase from the complex background noise, the second signal processing unit 220 processes the acquired digital sequence. Perform a sliding window discrete Fourier transform.
[0050] Specifically, the system utilizes the principle of quadrature demodulation to decompose the received signal into a real part (in-phase component) and an imaginary part (quadrature component). For the first... Each analysis frame contains instantaneous phase observations. Calculated using the following formula:
[0051] Through the above calculations, the system can obtain the precise phase angle of the pilot signal when it arrives at the second earphone, in frames (e.g., one frame every 10ms).
[0052] Step S400: Estimation of sampling clock drift rate. Due to physical errors in the crystal oscillators of the first and second earphones, the calculated phase... It is not constant, but rather exhibits a linear drift trend over time.
[0053] In this step, the system collects continuous... Phase data of a frame (e.g., within the past 500ms) is first subjected to phase dewinding to eliminate... The transition is then performed to obtain a continuous phase curve. Subsequently, the least squares method is used to perform linear regression analysis on this curve, and its slope represents the sampling frequency deviation rate between the two devices.
[0054] The preferred estimation model is as follows: the goal is to find the optimal deviation rate. This makes the sum of squares of the phase prediction error... Minimum. By solving this optimization problem, the normalized clock skew value can be obtained.
[0055] Step S500: Calculate the deviation rate based on the fractional delay collaborative compensation. Then, the system can calculate the cumulative time difference between the audio signals of the left and right ears at the current moment. To eliminate this time difference, the second earphone device does not directly adjust the crystal oscillator frequency (which would cause hardware instability), but instead adjusts the parameters of the active noise cancellation filter bank.
[0056] This embodiment employs fractional delay filter technology. The system calculates the delay amount in real time. (Including integer and decimal parts), dynamically update the tap coefficients of the all-pass filter using a function windowing algorithm. :
[0057] By connecting this time-varying filter in series in the ANC processing path, it is equivalent to introducing a precise negative delay in the digital domain, thereby forcibly aligning the noise reduction wavefronts of the left and right headphones at the physical acoustic level and achieving microsecond-level phase synchronization.
[0058] In order to extract from a mixed signal containing high-intensity music signals and ambient noise To accurately extract weak ultrasonic pilot information, this embodiment employs a digital orthogonal demodulation method based on single-frequency discrete Fourier transform. Compared to the traditional bandpass filtering zero-crossing detection method, this method offers higher noise immunity and phase linearity.
[0059] Specifically, the second signal processing unit 220 is internally configured with a length of The sliding analysis window. The window length... The selection of [the appropriate frequency] needs to strike a balance between frequency selectivity and time resolution. In this embodiment, it is preferable to set [the appropriate frequency] to [the appropriate time]. The number of sampling points corresponding to a duration of approximately 5ms to 10ms (e.g., when the sampling rate is...). hour, The value range is from 240 to 480 points.
[0060] For each data frame entering the analysis window, the DSP performs the following complex correlation operations:
[0061] in, Indicates the first The instantaneous phase angle calculated from each analysis frame represents the phase state of the ultrasonic pilot signal at the moment it reaches the receiver (second earphone); The arctangent function is used to convert rectangular coordinates in the complex plane. Converted to angle values in polar coordinates, the range of values is typically [missing information]. ; Indicates the first The index in the frame is The discrete sampling point values; Indicates the length of the sampling points in the sliding window; It is a complex exponential twitch factor; Indicates the carrier frequency of the ultrasonic pilot signal; This indicates the sampling frequency of the analog-to-digital converter at the receiving end; The imaginary unit; and These represent the imaginary and real parts of a complex number, respectively.
[0062] The specific execution process of the above formula at the hardware level is as follows: Local oscillator generation: The DSP internally stores or generates a sine wave lookup table in real time, corresponding to the real part reference signal after the Euler formula expansion. and imaginary part reference signal .
[0063] Sample data in the window By multiplying the corresponding cosine reference signal point by point and summing the results, we obtain the real part of the correlation value, i.e. This process is physically equivalent to projecting the input signal onto the in-phase axis and extracting the energy component that is in phase with the pilot signal.
[0064] Sample data in the window By multiplying the values point-by-point with the corresponding negative and positive sinusoidal reference signals and summing them, we obtain the imaginary part of the correlation value, i.e. Physically, this process is equivalent to projecting the input signal onto orthogonal axes, using the four-quadrant arctangent function. Calculate the argument of the complex vector. .
[0065] Using the algorithm described above, even if the amplitude of the ultrasonic pilot signal is much lower than that of the music signal (e.g., a signal-to-noise ratio of -20dB), due to the integral accumulation effect, the music and noise signals at non-pilot frequencies will cancel each other out (approaching zero) in the complex plane due to phase randomness, while... Pilot signals of the same frequency will coherently superimpose their energies. Therefore, the calculated... It can accurately reflect the precise phase state of the ultrasonic wave reaching the second earphone device at that moment.
[0066] It should be noted that, in order to further suppress spectral leakage, the input data can be further processed before performing the above summation operation. Weighted by Hamming or Hanning windows, this is a technical variation that is foreseeable to those skilled in the art and is also covered within the scope of protection of this embodiment.
[0067] After processing in step S300, the system obtains a series of discrete instantaneous phase observations. However, due to the physical characteristics of the hardware crystal oscillator, the sampling clock deviation is not a fixed constant, and single observations are easily affected by sudden acoustic noise (such as knocking sounds). Therefore, this embodiment does not directly use the single-frame phase difference, but instead employs a statistical estimation model based on the least squares method to calculate the sampling frequency deviation rate.
[0068] This step specifically includes the following two sub-processes: 1. Phase dewinding Because the output range of the arctangent function is limited to... Within the interval, when the true phase of the ultrasonic pilot signal continuously accumulates for more than At that time, the observed value It will happen Periodic jumps (i.e. from) Mutation This jagged, non-linear data cannot be directly used for slope calculation.
[0069] Therefore, the second signal processing unit 220 first executes the dewinding algorithm: detecting the phase difference between two adjacent frames. .like Then add all subsequent phase values. ;like Then reduce .
[0070] After processing, the system obtains a monotonically changing continuous phase sequence. .
[0071] 2. Linear regression solution bias rate Under ideal synchronization, continuous phase Regarding time The graph of the function should be a line with a slope of The straight line. When there is a sampling clock offset. When the actual slope becomes .
[0072] To extract this tiny slope change from noisy data, this embodiment constructs a length of The observation buffer queue stores the most recent The time point of that moment and corresponding phase .
[0073] The system establishes the following least squares cost function. The aim is to find the best This minimizes the sum of the squared distances from all observation points to the fitted line:
[0074] By taking the partial derivative of the function and setting it to zero, this embodiment uses the following analytical solution formula to directly calculate the normalized deviation rate in the DSP:
[0075] In the formula, The average value of the time series. This represents the average value of the phase sequence.
[0076] in, ω is the angular frequency of the ultrasonic pilot signal; It is the frame index (1 to ...) within the current regression window. ); This represents the total number of historical frames in the regression analysis; This is the initial phase intercept.
[0077] The calculation result It has extremely high accuracy. For example, if the calculation result... This indicates that the sampling clock of the second earphone device is 10 ppm faster than that of the first earphone device. This parameter will be used as a key control variable and transmitted in real time to step S500 for updating the coefficients of the fractional delay filter, thereby achieving closed-loop phase locking.
[0078] In advanced applications of TWS earbuds (such as dynamic rendering of the Head-Related Transfer Function (HRTF) in Spatial Audio, or accurate detection of wearing status), the system often needs to know not only the phase deviation between the left and right ears, but also the precise physical distance between the left and right earbuds. Existing distance estimation methods mostly rely on the signal strength index (RSSI) of Bluetooth radio frequency, which typically has an error of up to decimeters or even meters, failing to meet the requirements of acoustic algorithms.
[0079] To address this issue, the method in this embodiment further includes a two-way acoustic ranging and time delay calibration step. This step cleverly reuses the aforementioned high-precision clock skew rate... By combining the flight time of the ultrasonic pulse in the air, the precise physical sound path distance between the first and second earphone devices was calculated. .
[0080] The specific implementation process is as follows: The system periodically enters ranging mode. First, the first signal processing unit 110 of the first earphone device 100 generates a broadband ultrasonic pulse (e.g., an extremely short chirp signal with a center frequency of 22kHz) and records the precise timestamp of the local timer at that moment. And the pulse is emitted through a speaker.
[0081] After the microphone of the second earphone device 200 captures the ultrasonic pulse, its internal second signal processing unit 220 performs matched filtering to accurately lock the peak value of the pulse and records the timestamp of its local timer at that moment. .
[0082] Subsequently, the second earpiece device generates a response ultrasonic pulse after a fixed internal processing delay (turn-around time), and records the timestamp of the transmission moment. And it emits signals outward through its loudspeaker.
[0083] The microphone of the first earphone device 100 receives the response pulse, performs peak detection, and records the local timestamp of the reception time. .
[0084] At this point, the first and second earphone devices exchange the timestamps recorded above via a Bluetooth data link. The DSP control unit utilizes the current ambient air speed of sound constant preset in the firmware. (e.g., 343 m / s), and combined with the sampling clock deviation rate that has been accurately calculated in step S400. Run the following modified two-way ranging algorithm:
[0085] Because the local timers of the first and second earphones are misaligned in absolute time, direct one-way subtraction will produce a huge random error. This step adopts a two-way communication design, through the formula... The algebraic operations of the terms perfectly offset the absolute startup time difference between the two devices.
[0086] More importantly, in traditional two-way ranging algorithms, during the time the second earpiece waits to send a response pulse, its clock speed differs from the first earpiece due to differences in crystal oscillator physical characteristics. This introduces a cumulative ranging error that is difficult to eliminate. This embodiment innovatively uses the frequency deviation rate extracted in step S400... As a compensating factor A calculation formula was introduced to correct this clock drift error from the digital level.
[0087] Using the above algorithm, the system of this invention can achieve accurate binaural physical distance measurement with an error of less than 1 cm, using only existing ordinary microphones and speakers, without adding any UWB ranging chips. Measurement results It can be further incorporated into the spatial audio sound field rendering engine, thereby providing users with an extremely accurate 3D immersive listening experience.
[0088] The high-precision normalized sampling clock skew rate output by step S400 is obtained. Subsequently, the second headphone device 200 enters the phase closed-loop control stage. Since simply discarding or copying audio sampling points (i.e., integer point compensation method) will produce popping sounds that are perceptible to the human ear and cannot solve the microsecond-level phase mismatch problem, the second signal processing unit 220 in this embodiment adopts an all-pass filter design based on fractional delay technology to directly perform sub-sampling level dynamic compensation on the active noise cancellation control link in the digital domain.
[0089] The specific implementation process is as follows: First, the DSP controller calculates the clock skew rate in real time. Perform time integration to calculate the time from the synchronization start time to the current time. The cumulative absolute time difference between the first and second headphone devices Its mathematical expression is:
[0090] Subsequently, combined with the system's audio sampling rate This time difference is converted into discrete sampling point delays. :
[0091] The result obtained here Typically, it is a non-integer consisting of an integer part and a fractional part (e.g., 5.67 sampling points), which means that the second earphone needs to introduce a fractional delay accurate to 0.67 points in its local ANC link to be fully aligned with the noise-canceling wavefront of the first earphone.
[0092] To achieve this non-integer delay in a finite-length impulse response (FIR) filter, this embodiment utilizes the Shannon interpolation theorem and employs a Sinc function truncation windowing algorithm to generate the tap coefficients of the FIR filter in real time. To suppress the Gibbs effect and frequency domain ripple caused by finite-length truncation, a Hamming window is preferred for smoothing. The complete mathematical algorithm for updating its coefficients is as follows:
[0093] in, It is the instantaneous sampling clock deviation rate calculated in step S400; The system sampling rate; For the fractional delay filter One tap coefficient; For Hamming window functions; This is the real-time delay amount, including both integer and fractional parts. The order of the filter; For the Singer function; It is a tap index (usually from) ); It represents the total order / length of the filter.
[0094] During system operation, the second signal processing unit 220, in a background thread mode, determines the latest delay amount. Update the above filter coefficients regularly. .
[0095] The updated coefficients are seamlessly loaded into the ANC inverse filter path of the second earphone device. When the noise signal collected by the microphone is processed by this fractional delay filter, the resulting inverse cancelling sound wave undergoes a highly precise translation on the time axis, thus perfectly compensating for the phase drift caused by the independent clock sources of both ears. Through the above collaborative compensation steps, the noise reduction consistency and spatial sound field reproduction of the dual-ear TWS earphones are significantly improved across a wide frequency range.
[0096] In complex real-world applications (such as shopping malls, subways, or industrial environments), there may be high-frequency noise or other man-made ultrasonic sources (such as ultrasonic detectors in some security equipment) present in the environment. If the first earphone device uses a fixed single frequency (e.g., 22kHz) to transmit the pilot signal, and this frequency is submerged by environmental noise, the second earphone device will be unable to successfully calculate the phase, leading to synchronization failure.
[0097] To overcome this technical deficiency and further improve the robustness and anti-interference capability of the system, this embodiment further includes an optimal pilot frequency adaptive selection step S001 before performing the above step S100. This step S001 is executed collaboratively by the first signal processing unit 110 and / or the second signal processing unit 220, and the specific process is as follows: During the initial establishment of a wireless connection or periodic quiet intervals, the second acoustic transducer (microphone) collects pure ambient noise signals from the current environment. The system is for continuous Data frames (e.g.) Short-time Fourier transform was performed on noise data (frames, with a cumulative duration of approximately 200 milliseconds) to analyze the background noise energy distribution in the high-frequency band.
[0098] The system sets the candidate frequency range to be: (Preferably, the frequency band is set to 20kHz to 24kHz, which is both inaudible and within the microphone's linear response range.) The DSP iterates through all frequency resolutions within this range, for each frequency... Calculate its continuity Average noise power of a frame .
[0099] Subsequently, combined with the system's preset constant pilot transmission energy The DSP solves the following maximized functional to calculate the expected signal-to-noise ratio at each candidate frequency:
[0100] in, The calculated optimal pilot frequency; The preset ultrasonic frequency band range for the system; To convert the linear power ratio to a logarithmic value in decibels; The preset pilot transmission energy; Environmental noise signal In the The short-time Fourier transform spectral amplitude of the frame; The average number of frames sampled for ambient noise. This is a search function for the maximum value of the independent variable.
[0101] Through the above-mentioned higher-order function search, the system can accurately locate the frequency point of the noise energy valley in the broadband spectrum. For example, if the system calculates that the SNR at 21.5kHz is 5dB, while the SNR at 23.2kHz reaches 18dB, then the DSP determines that 23.2kHz is the optimal anti-interference frequency in the current environment.
[0102] Sure The system then writes this parameter into the register of the first signal processing unit 110. In the subsequent step S100, the first headphone device will use the dynamically selected carrier frequency. To generate ultrasonic pilot signals.
[0103] By introducing this adaptive selection mechanism, this system achieves channel sniffing and intelligent frequency hopping functions. Even if the wearer moves in different electroacoustic environments, the headphones can always establish a high signal-to-noise ratio acoustic synchronization link in the optimal frequency band, fundamentally ensuring the extremely high success rate and stability of the binaural phase calibration algorithm.
[0104] During actual use of TWS earbuds, the acoustic transmission path between the left and right earbuds is not constant. For example, chewing movements, head rotation, or interference from obstructions such as long hair or hats can cause dynamic changes in the acoustic attenuation of the air and bone conduction paths. If the first earbud consistently transmits ultrasonic pilot signals at a constant power, the signal-to-noise ratio of the signal received by the second earbud will drop sharply when the acoustic path attenuation increases, leading to a deterioration in phase calculation accuracy. Conversely, when the acoustic path is unobstructed, excessively high constant transmission power will result in unnecessary power consumption waste.
[0105] To address the aforementioned issues, the method in this embodiment further includes a closed-loop amplitude gain control step. This step dynamically adjusts the transmission amplitude of the ultrasonic pilot signal in step S100 in real time by introducing an out-of-band feedback link based on the Bluetooth Low Energy protocol. .
[0106] The specific implementation process is as follows: Within each control cycle of system operation (e.g., every 50 milliseconds), the second signal processing unit 220 of the second earphone device 200 (receiver) extracts the separated ultrasonic pilot signal in real time. The DSP utilizes a length of... The root mean square amplitude of the current received signal is calculated using a sliding power integration window, and used as an indicator of the received signal strength.
[0107] in, For the receiving end The signal values at each sampling point are calculated. After the calculation is completed, the second earphone device sends the RMS observation value back to the first earphone device 100 via the Bluetooth control channel.
[0108] After receiving the feedback, the first signal processing unit 110 inside the first earphone device 100 compares the actual response amplitude with the system's preset optimal target response amplitude. A comparison is made. To prevent severe oscillations and overshoot during the adjustment process, this embodiment employs a method with a convergence factor. The exponential smoothing control algorithm is used to update the emission amplitude at the next time step. :
[0109] in, The launch amplitude is updated in real time; The optimal target response amplitude preset for the receiving end; For the receiving end The signal values at each sampling point; This is the length of the power integration window; The convergence factor has a range of values. It is used to control the smoothness of adjustment.
[0110] When the acoustic path is suddenly blocked, leading to If the error term within the parentheses in the above formula is greater than 1, the first earphone device will gradually increase the transmission energy of the ultrasonic pilot signal in an exponentially smooth manner over the following few cycles until the signal strength at the receiving end recovers to [the specified value]. The signal level is horizontal; conversely, if the received signal is too strong, the transmitter will gradually reduce the energy.
[0111] By implementing the aforementioned closed-loop algorithm, the system of this invention can adapt to the complex and ever-changing wearing micro-environment. This not only ensures that the second earphone device always operates within the optimal signal-to-noise ratio range to maintain high-precision clock synchronization, but also keeps the ultrasonic emission power consumption of the first earphone device to the minimum necessary limit, effectively extending the overall battery life.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the essence and scope of the technical solutions of the present invention.
Claims
1. A binaural phase calibration noise reduction system based on in-band ultrasonic communication, comprising a first earphone device and a second earphone device, wherein the first earphone device and the second earphone device establish a pairing connection through a wireless communication protocol, characterized in that, The first headphone device includes a first signal processing unit and a first electroacoustic transducer, and the second headphone device includes a second electroacoustic transducer and a second signal processing unit; The first signal processing unit is used to superimpose an ultrasonic pilot signal with a frequency between the upper limit of human hearing threshold and the hardware response cutoff frequency onto the audio signal to be played, and drive the first electroacoustic transducer to radiate outward. The second acoustic-electric transducer is used to receive external ambient sound and the ultrasonic pilot signal; The second signal processing unit calculates the sampling clock deviation between the first and second earphone devices by analyzing the ultrasonic pilot component in the received signal, and adjusts the parameters of the active noise cancellation filter accordingly.
2. The binaural phase calibration noise reduction system based on in-band ultrasonic communication according to claim 1, characterized in that, The second signal processing unit is configured to perform a phase calibration method, the phase calibration method comprising the following steps: S100. The first earphone device generates a single-frequency continuous wave or linear frequency modulated wave as an ultrasonic pilot signal, mixes it with the main audio bitstream, and plays it through a speaker; S200. The microphone of the second earphone device acquires the mixed sound wave signal and performs discrete sampling on the signal; S300. The second earphone device uses an orthogonal demodulation algorithm to separate the in-phase and quadrature components of the ultrasonic pilot signal from the acquired signal and calculates the instantaneous phase observation value at the current moment. S400. Based on the instantaneous phase observations at multiple consecutive moments, construct a phase-time evolution function and calculate the sampling frequency deviation rate of the first earphone device relative to the second earphone device; S500. Based on the calculated sampling frequency deviation rate, a dynamic fractional delay compensation coefficient is generated and applied to the inverting filter of the active noise cancellation system to synchronize the phase of the noise cancellation signals of the left and right headphones.
3. The binaural phase calibration noise reduction system based on in-band ultrasonic communication according to claim 2, characterized in that, In step S300, the instantaneous phase observation value at the current moment is calculated using a sliding window discrete Fourier transform model, and its mathematical algorithm is as follows: in, Indicates the first The instantaneous phase angle calculated from each analysis frame; It is the arctangent function; Indicates the first The index in the frame is The discrete sampling point values; Indicates the length of the sampling points in the sliding window; It is a complex exponential rotation factor; Indicates the carrier frequency of the ultrasonic pilot signal; This indicates the sampling frequency of the analog-to-digital converter at the receiving end; The imaginary unit; and These represent the imaginary and real parts of a complex number, respectively.
4. The binaural phase calibration noise reduction system based on in-band ultrasonic communication according to claim 2, characterized in that, In step S400, the sampling frequency deviation rate is calculated by performing linear regression on the phase-dewinded data using the least squares method, which satisfies the following higher-order functional relationship: The goal is to solve for the deviation rate. This makes the following cost function Minimize: The optimized solution is: in: This represents the estimated normalized sampling clock skew rate; Indicates the first Each observed phase value Continuous phase value after dewinding ; Indicates the time interval between adjacent observation frames; Indicates the first The absolute time of each observation; These are the arithmetic mean of time and phase, respectively; This represents the total number of historical frames used for regression analysis.
5. A binaural phase calibration noise reduction system based on in-band ultrasonic communication according to claim 4, characterized in that, By transmitting ultrasonic pulses bidirectionally, combined with clock deviation rate The following modified two-way ranging algorithm is used to calculate the physical sound path distance between the first and second earphone devices. : in, The physical distance between the two headphones; The speed of sound in air at the current ambient temperature; The local time for sending the first pulse to the first earpiece; The local time for the second earpiece to receive the first pulse; To restore the local time of the second pulse for the second earpiece; The local time at which the first earpiece receives the second pulse; The normalized sampling clock skew rate is calculated in step S400.
6. A binaural phase calibration noise reduction system based on in-band ultrasonic communication according to claim 2, characterized in that, In step S500, the inverting filter acting on the active noise cancellation system is designed as a fractional-delay all-pass filter, and its filter coefficients... The update algorithm is as follows: Let the cumulative time difference that needs to be compensated at the current moment be... The corresponding discrete delay is The Sinc function truncation and windowing algorithm is then used to generate the filter coefficients. in, For the fractional delay filter One tap coefficient; For Hamming window functions; This is the real-time delay amount, including both integer and fractional parts. The order of the filter; This is the Singer function.
7. A binaural phase calibration noise reduction system based on in-band ultrasonic communication according to claim 2, characterized in that, The phase calibration method further includes step S001, which is performed before step S100: The signal-to-noise ratio (SNR) spectral distribution at different candidate frequency points is determined by solving the following maximized functional. : in, The calculated optimal pilot frequency; The preset ultrasonic frequency band range for the system; The preset pilot transmission energy; Environmental noise signal In the The short-time Fourier transform spectral amplitude of the frame; The average number of frames sampled for ambient noise. This is a function for searching the maximum value of the independent variable.
8. A binaural phase calibration noise reduction system based on in-band ultrasonic communication according to claim 2, characterized in that, In step S100, the transmission amplitude is updated according to the received signal strength fed back by the second earphone device using the following exponential smoothing control algorithm: in, The launch amplitude is updated in real time; The optimal target response amplitude preset for the receiving end; For the receiving end The signal values at each sampling point; This is the length of the power integration window; The convergence factor has a range of values. It is used to control the smoothness of adjustment.
9. A Bluetooth headset, characterized in that, The device is equipped with a binaural phase calibration noise reduction system as described in any one of claims 1-8.
