Feedback filter coefficient determination method, apparatus, and electronic device

By acquiring the transfer functions of the speaker and microphone and the filter transfer function, and combining the sound source and noise signals, the feedback filter coefficients are automatically determined, solving the problems of low efficiency and accuracy in the existing technology, and realizing efficient feedback filter coefficient optimization.

CN115499747BActive Publication Date: 2026-06-16SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
Filing Date
2022-09-16
Publication Date
2026-06-16

Smart Images

  • Figure CN115499747B_ABST
    Figure CN115499747B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a feedback filter coefficient determination method and device, and electronic equipment. The method comprises: obtaining a first transfer function between a loudspeaker and a microphone of a headset, the loudspeaker being arranged in the headset, and the microphone being arranged in an artificial ear; obtaining a filter transfer function of a feedback filter; determining a sound source signal and a noise signal; and determining a coefficient of the feedback filter according to the first transfer function, the filter transfer function, the sound source signal and the noise signal. The efficiency and accuracy of determining the feedback filter coefficient are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of signal processing technology, and in particular to a method, apparatus and electronic device for determining feedback filter coefficients. Background Technology

[0002] To minimize the amount of ambient noise a user can hear while wearing headphones, a filter can be incorporated into the headphones. This filter is applied to an internal model feedback structure (referred to as a feedback filter). The feedback filter generates a sound source signal with the same amplitude but opposite phase to the ambient noise. This sound source signal can cancel out the ambient noise, thus reducing it. To achieve optimal noise reduction, the coefficients of the feedback filter need to be adjusted.

[0003] In related technologies, feedback filter coefficients can be adjusted as follows: The parameters of each sub-filter in the feedback filter are manually adjusted to determine the frequency response of the adjusted feedback filter. Adjustment is complete when the frequency response of the feedback filter approaches that of the ideal feedback filter. The coefficients of the feedback filter are then determined based on the parameters of each sub-filter after adjustment. However, this process is inefficient because it requires manual adjustment of the parameters of each sub-filter to obtain the feedback filter coefficients. Manual adjustment cannot guarantee noise reduction performance for each frequency band and cannot simultaneously ensure accurate fitting of the amplitude and phase responses, leading to low accuracy in determining the filter coefficients. Summary of the Invention

[0004] This application provides a method, apparatus, and electronic device for determining feedback filter coefficients, in order to solve the problem of low efficiency and accuracy in determining feedback filter coefficients.

[0005] In a first aspect, embodiments of this application provide a method for determining the coefficients of a feedback filter, including:

[0006] Obtain a first transfer function between a speaker and a microphone in an earphone, wherein the speaker is disposed in the earphone and the microphone is disposed in an artificial ear;

[0007] Obtain the filter transfer function of the feedback filter;

[0008] Identify the sound source signal and the noise signal;

[0009] The coefficients of the feedback filter are determined based on the first transfer function, the filter transfer function, the sound source signal, and the noise signal.

[0010] In one possible implementation, determining the coefficients of the feedback filter based on the first transfer function, the filter transfer function, the sound source signal, and the noise signal includes:

[0011] The sound source signal is processed according to the first transfer function and the filter transfer function to obtain a first processed signal;

[0012] The coefficients of the feedback filter are determined based on the noise signal and the first processed signal.

[0013] In one possible implementation, determining the coefficients of the feedback filter based on the noise signal and the first processed signal includes:

[0014] Based on the noise signal and the error signal, determine the sensitivity function of the feedback filter;

[0015] Determine the target function based on the sensitivity function;

[0016] The coefficients of the feedback filter are determined based on the sensitivity function and the target function.

[0017] In one possible implementation, determining the sensitivity function of the feedback filter based on the noise signal and the error signal includes:

[0018] The ratio of the error signal to the noise signal is determined as the sensitivity function.

[0019] In one possible implementation, determining the target function based on the sensitivity function includes:

[0020] Determine multiple frequency points and the corresponding weighting coefficients for each frequency point;

[0021] The target function is determined based on the plurality of frequency points, the weighting coefficients corresponding to each frequency point, and the sensitivity function.

[0022] In one possible implementation, determining the coefficients of the feedback filter based on the sensitivity function and a preset target function includes:

[0023] Based on the sensitivity function of the i-th iteration, determine the i-th function value of the objective function of the i-th iteration;

[0024] The filter parameter values ​​in the feedback filter are adjusted according to the i-th function value to adjust the filter transfer function of the feedback filter, and the sensitivity function of the (i+1)-th iteration is determined according to the feedback filter after the filter transfer function is adjusted.

[0025] Wherein, i takes the values ​​1, 2, ..., N in sequence, and the latest filter parameter value of the feedback filter is determined as the coefficient of the feedback filter, and N is an integer greater than 1.

[0026] In one possible implementation, obtaining the filter transfer function of the feedback filter includes:

[0027] Obtain the transfer function of each sub-filter in the feedback filter;

[0028] The product of the transfer functions of each sub-filter is used to determine the filter transfer function of the feedback filter.

[0029] Secondly, embodiments of this application provide a feedback filter coefficient determination apparatus, the apparatus comprising:

[0030] A first acquisition module is used to acquire a first transfer function between a speaker and a microphone in an earphone, wherein the speaker is disposed in the earphone and the microphone is disposed in an artificial ear;

[0031] The second acquisition module is used to acquire the filter transfer function of the feedback filter;

[0032] The first determining module is used to determine the sound source signal and the noise signal;

[0033] The second determining module is used to determine the coefficients of the feedback filter based on the first transfer function, the filter transfer function, the sound source signal, and the noise signal.

[0034] In one possible implementation, the second determining module is specifically used for:

[0035] The sound source signal is processed according to the first transfer function and the filter transfer function to obtain a first processed signal;

[0036] The coefficients of the feedback filter are determined based on the noise signal and the first processed signal.

[0037] In one possible implementation, the second determining module is specifically used for:

[0038] Based on the noise signal and the error signal, determine the sensitivity function of the feedback filter;

[0039] Determine the target function based on the sensitivity function;

[0040] The coefficients of the feedback filter are determined based on the sensitivity function and the target function.

[0041] In one possible implementation, the second determining module is specifically used for:

[0042] The ratio of the error signal to the noise signal is determined as the sensitivity function.

[0043] In one possible implementation, the second determining module is specifically used for:

[0044] Determine multiple frequency points and the corresponding weighting coefficients for each frequency point;

[0045] The target function is determined based on the plurality of frequency points, the weighting coefficients corresponding to each frequency point, and the sensitivity function.

[0046] In one possible implementation, the second determining module is specifically used for:

[0047] Based on the sensitivity function of the i-th iteration, determine the i-th function value of the objective function of the i-th iteration;

[0048] The filter parameter values ​​in the feedback filter are adjusted according to the i-th function value to adjust the filter transfer function of the feedback filter, and the sensitivity function of the (i+1)-th iteration is determined according to the feedback filter after the filter transfer function is adjusted.

[0049] Wherein, i takes the values ​​1, 2, ..., N in sequence, and the latest filter parameter value of the feedback filter is determined as the coefficient of the feedback filter, and N is an integer greater than 1.

[0050] In one possible implementation, the second acquisition module is specifically used for:

[0051] Obtain the transfer function of each sub-filter in the feedback filter;

[0052] The product of the transfer functions of each sub-filter is used to determine the filter transfer function of the feedback filter.

[0053] Thirdly, this application provides a chip on which a computer program is stored, and when the computer program is executed by the chip, it implements the method as described in any of the first aspects.

[0054] Fourthly, this application provides a chip module on which a computer program is stored, and when the computer program is executed by the chip module, it implements the method described in any of the first aspects.

[0055] Fifthly, embodiments of this application provide an electronic device, including:

[0056] At least one processor; and

[0057] A memory communicatively connected to the at least one processor; wherein,

[0058] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in any of the first aspects.

[0059] In a sixth aspect, embodiments of this application provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method according to any one of the first aspects.

[0060] In a seventh aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method according to any one of the first aspects.

[0061] The feedback filter coefficient determination method, apparatus, and electronic device provided in this application acquire a first transfer function between a speaker and a microphone worn with headphones, as well as a filter transfer function of the feedback filter. Based on the first transfer function, the filter transfer function, the sound source signal, and the noise signal, the coefficients of the feedback filter are automatically determined. This eliminates the need for manual adjustment, improving the efficiency and accuracy of determining the feedback filter coefficients. Attached Figure Description

[0062] Figure 1 A schematic diagram illustrating the application scenarios provided in the embodiments of this application;

[0063] Figure 2 A flowchart illustrating a method for determining feedback filter coefficients provided in an embodiment of this application;

[0064] Figure 3 A schematic diagram illustrating the process of determining the sound source signal and the noise signal provided in an embodiment of this application;

[0065] Figure 4 A flowchart illustrating another method for determining feedback filter coefficients provided in an embodiment of this application;

[0066] Figure 5 A schematic diagram illustrating the working principle of the feedback filter provided in the embodiments of this application;

[0067] Figure 6 This is a schematic diagram of the structure of the feedback filter coefficient determination device provided in the embodiments of this application;

[0068] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0069] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0070] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0071] Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application. Please refer to [link / reference]. Figure 1 Filter 101 can be incorporated into the headphones. Filter 101 utilizes an in-ear model feedback structure. The headphones can be over-ear headphones, neckband headphones, wireless Bluetooth headphones, etc. When the user does not need to hear ambient noise and only hears the sound source played by the headphones, the headphones can generate a sound source signal with the same amplitude but opposite phase to the ambient noise through filter 101. The sound source signal can cancel out the ambient noise, at which point the user cannot hear the ambient noise. To achieve optimal noise reduction, the coefficients of the feedback filter need to be adjusted.

[0072] In related technologies, the parameters of each sub-filter in the feedback filter need to be manually adjusted to obtain the filter coefficients. This makes it impossible to guarantee the noise reduction effect of each frequency band and to ensure that the fitting results of the amplitude frequency response and phase frequency response are accurate at the same time. As a result, the efficiency and accuracy of determining the feedback filter coefficients are low.

[0073] In this embodiment, a first transfer function between the speaker and the microphone of the earphone is obtained, as well as the filter transfer function of the feedback filter. Based on the first transfer function, the filter transfer function, the sound source signal, and the noise signal, the coefficients of the feedback filter are automatically determined. This eliminates the need for manual adjustment, improving the efficiency and accuracy of determining the feedback filter coefficients.

[0074] The method described in this application will now be illustrated through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; identical or similar content will not be repeated in different embodiments.

[0075] Figure 2 This is a flowchart illustrating a method for determining feedback filter coefficients according to an embodiment of this application. Please refer to... Figure 2 The method may include:

[0076] S201. Obtain the first transfer function between the speaker and the microphone worn with headphones.

[0077] The execution subject of this application embodiment can be an electronic device, or a chip, chip module, or feedback filter coefficient determination device disposed in the electronic device. The feedback filter coefficient determination device can be implemented by software or by a combination of software and hardware. The electronic device can be a computer.

[0078] The speaker is located in the earphone, and the microphone is located in the artificial ear.

[0079] The first transfer function between the speaker and the microphone worn with headphones can be obtained through experimental testing.

[0080] The first transfer function can be obtained as follows: A swept-frequency signal is played from the headphone speaker. This signal travels through an acoustic path from the headphone speaker to the microphone in the artificial ear, passing through a digital-to-analog converter (DAC), a reconstruction filter, a power amplifier, a pre-amplifier, and an anti-aliasing filter. After processing by the DAC, the microphone receives the processed swept-frequency signal. A Fourier transform is performed on the processed swept-frequency signal, converting the time-domain signal into a frequency-domain signal. Based on the amplitude and phase frequency changes of the frequency-domain signal, the first transfer function between the speaker and the microphone in the headphones is determined. This process simulates the sound source heard by the human ear when wearing headphones. The swept-frequency signal can be a sine wave signal linearly increasing from 20Hz to 20kHz.

[0081] S202. Obtain the filter transfer function of the feedback filter.

[0082] A feedback filter can include one or more sub-filters. Multiple sub-filters are cascaded to form a feedback filter.

[0083] The filter transfer function of a feedback filter can be obtained as follows: obtain the transfer function of each sub-filter in the feedback filter; and determine the filter transfer function of the feedback filter by multiplying the transfer functions of each sub-filter.

[0084] For example, an internal model feedback filter includes three sub-filters. Sub-filter 1 has a transfer function of H1(z), sub-filter 2 has a transfer function of H2(z), and sub-filter 3 has a transfer function of H3(z). Therefore, the transfer function of the feedback filter is determined to be H1(z) × H2(z) × H3(z).

[0085] S203. Determine the sound source signal and noise signal.

[0086] The sound source signal can be the sound signal played by the headphone speaker. The noise signal can be the sound signal that the user hears while wearing headphones, excluding the sound source signal.

[0087] Below, in conjunction with Figure 3 This section explains the sound source signal and the noise signal. Figure 3 This is a schematic diagram illustrating the process of determining the sound source signal and noise signal according to an embodiment of this application. Please refer to... Figure 3 This includes speaker 301 and headphones 302. When a user uses headphones 302, the sound signal heard by the user is the sound source signal. If speaker 301 is also playing a sound signal when the user is using headphones 302, then in addition to the ambient sound signal (not shown in the figure), there is also the sound signal played by speaker 301. Therefore, it can be determined that the noise signal includes both the sound signal played by speaker 301 and the ambient sound signal.

[0088] S204. Determine the coefficients of the feedback filter based on the first transfer function, the filter transfer function, the sound source signal, and the noise signal.

[0089] The coefficients of the feedback filter can be determined as follows: the sound source signal is processed according to the first transfer function and the filter transfer function to obtain the first processed signal; the error signal is determined according to the noise signal and the first processed signal; and the coefficients of the feedback filter are determined according to the noise signal and the error signal.

[0090] The noise reduction effect is best when the frequency response of the feedback filter is close to that of the ideal feedback filter. A preset algorithm can be used iteratively to minimize the value of the objective function, thus making the frequency response of the feedback filter approximate that of the ideal feedback filter. Based on the value of the objective function obtained through iteration, the coefficients of the current feedback filter are determined and set as the coefficients of the feedback filter in the headphones.

[0091] The preset algorithm can be a global optimization algorithm. For example, the preset algorithm can be a genetic algorithm, a particle swarm optimization algorithm, or a differential evolution algorithm.

[0092] The feedback filter coefficient determination method provided in this application involves: obtaining a first transfer function between a speaker and a microphone worn with headphones; obtaining a filter transfer function of a feedback filter; determining a sound source signal and a noise signal; and determining the coefficients of the feedback filter based on the first transfer function, the filter transfer function, the sound source signal, and the noise signal. In this process, the coefficients of the feedback filter can be automatically determined based on the first transfer function, the filter transfer function, the sound source signal, and the noise signal. This eliminates the need for manual adjustment, improving the efficiency and accuracy of determining the feedback filter coefficients.

[0093] Based on any of the above embodiments, the following, in conjunction with Figure 4 The detailed process of determining the feedback filter coefficients is explained.

[0094] Figure 4 This is a flowchart illustrating another method for determining feedback filter coefficients provided in an embodiment of this application. Please refer to... Figure 4 The method may include:

[0095] S401, Obtain the first transfer function between the speaker and the microphone worn with headphones.

[0096] It should be noted that the execution process of S401 is the same as that of S201, and will not be repeated here.

[0097] S402. Obtain the filter transfer function of the feedback filter.

[0098] The product of the transfer functions of each sub-filter is used to determine the filter transfer function of the feedback filter.

[0099] The transfer function of a sub-filter can be determined based on its type. Each type of sub-filter corresponds to a transfer function of the same form.

[0100] For example, assuming the sub-filter is a shelving filter, its transfer function can be shown in Equation 1:

[0101]

[0102] Where H0(z) is the filter transfer function of the sub-filter. The parameters in Equation 1 can be determined by Equations 2, 3, and 4.

[0103] Formula 2: A=10 g / 40

[0104] Formula 3:

[0105] Formula 4:

[0106] Where g is the single-section gain; f is the center frequency; f s is the sampling frequency; Q is the quality factor.

[0107] S403. Determine the sound source signal and noise signal.

[0108] For example, if the sound signal played when a user is wearing headphones is y(n), then the sound source signal is identified as y(n). If the sound signal other than the sound source signal is d(n) when the user is wearing headphones, then the noise signal is identified as d(n).

[0109] S404. The sound source signal is processed according to the first transfer function and the filter transfer function to obtain the first processed signal.

[0110] The product of the first transfer function and the sound source signal can be used to determine the synthesized noise signal, and the product of the synthesized noise signal, the filter transfer function, and the secondary channel transfer function can be used to determine the first processed signal.

[0111] For example, the first transfer function is If the filter transfer function is A(z) and the source signal transfer function is Y(z), then the synthesized noise signal is... The first processed signal is F(z) = X(z)A(z)S(z).

[0112] S405. Determine the sensitivity function of the feedback filter based on the noise signal and the error signal.

[0113] The difference between the noise signal and the first processed signal can be determined as the error signal.

[0114] For example, if the noise signal is D(z) and the first processed signal is F(z), then the determination error signal is D(z)-F(z).

[0115] The relationship between the error signal and the first processing signal can be determined using Formula 5:

[0116]

[0117] The sensitivity function of the feedback filter can be determined using Equation 6:

[0118]

[0119] Where E(z) is the error signal; F(z) is the first processed signal; X(z) is the sound source signal; A(z) is the filter transfer function; and S(z) is the secondary channel. R(z) is the first transfer function; R(z) is the sensitivity function.

[0120] S(z) is an acoustic path that includes a loudspeaker to an artificial ear microphone, as well as a digital-to-analog converter, a reconstruction filter, a power amplifier, a pre-amplifier and an anti-aliasing filter, and an analog-to-digital converter. This is the first transfer function obtained through experimental testing and modeling.

[0121] If the first transfer function obtained from the modeling is completely consistent with the actual secondary channel, that is... At this point, the sensitivity function

[0122] S406. Determine the target function based on the sensitivity function.

[0123] The objective function can be determined as follows: determine multiple frequency points and the weighting coefficients corresponding to each frequency point; determine the objective function based on the multiple frequency points, the weighting coefficients corresponding to each frequency point, and the sensitivity function.

[0124] The objective function corresponding to the feedback filter can be determined using Equation 7:

[0125]

[0126] Among them, E obj The objective function is f. k The frequency at which the feedback filter operates; f stop is the upper frequency limit of the feedback filter's operation; w(f) is the weighting coefficient. See above for explanations of other relevant parameters.

[0127] f k f is any frequency within the frequency band in which the feedback filter operates. For example, if the feedback filter operates in the frequency band of 20Hz to 800Hz, then f k It can be any frequency within the range of 20Hz to 800Hz.

[0128] Based on the preset relationship, select f. k The value of f. k The value of f is determined. k The corresponding weighting coefficients. The preset relationship can be logarithmic, exponential, etc. For example, if the preset relationship is exponential, then f can be selected based on the trend of the logarithmic function. k The value of .

[0129] S407. Determine whether the iteration number i is a preset threshold.

[0130] If so, execute S409.

[0131] If not, proceed with S408.

[0132] To make the frequency response of the feedback filter approximate that of the ideal feedback filter, an iterative algorithm can be used to minimize the value of the objective function. This algorithm can be a global optimization algorithm.

[0133] S408. Adjust the filter parameter values ​​in the feedback filter to update the filter transfer function of the feedback filter.

[0134] The filter parameters of the sub-filter include the single-section gain g, the center frequency f, and the quality factor Q.

[0135] For example, a feedback filter includes two sub-filters. Sub-filter 1 has a center frequency of f1, a quality factor of Q1, and a single-section gain of g1. Sub-filter 2 has a center frequency of f2, a quality factor of Q2, and a single-section gain of g2. Therefore, the filter parameters for sub-filter 1 are f1, Q1, and g1. The filter parameters for sub-filter 2 are f2, Q2, and g2.

[0136] The transfer function of each sub-filter can be updated as follows: adjust the filter parameter values ​​of each sub-filter; update the transfer function of each sub-filter based on the adjusted filter parameter values.

[0137] For example, a feedback filter includes two sub-filters, with a preset minimum value of 0.1. Sub-filter 1 has filter parameters x1 = [f1, Q1, g1], and sub-filter 2 has filter parameters x2 = [f2, Q2, g2]. Based on the filter parameters x1 of sub-filter 1, its transfer function is determined to be A1(z). Based on the filter parameters x2 of sub-filter 2, its transfer function is determined to be A2(z). When minimizing the objective function, the objective function is obtained as follows: At this point, if determined The function value is 0.5. If the function value is not the preset minimum, then adjust the filter parameters of the two sub-filters. After adjustment, the filter parameter values ​​of sub-filter 1 are x1' = [f1', Q1', g1'], and the filter parameter values ​​of sub-filter 2 are x2' = [f2', Q2', g2']. Based on the adjusted filter parameter values ​​of sub-filter 1, update the transfer function of sub-filter 1 to A1'(z). Based on the adjusted filter parameter values ​​of sub-filter 2, update the transfer function of sub-filter 2 to A2'(z).

[0138] After S408, execute S403.

[0139] S409. Determine the coefficients of the feedback filter based on the current filter parameter values ​​in the feedback filter.

[0140] The filter parameter values ​​are cascaded to obtain the coefficients of the feedback filter.

[0141] For example, suppose a feedback filter consists of two sub-filters. Sub-filter 1 has a center frequency of f1, a quality factor of Q1, and a single-section gain of g1. Sub-filter 2 has a center frequency of f2, a quality factor of Q2, and a single-section gain of g2. Then, the filter parameter values ​​for sub-filter 1 can be determined as x1 = [f1, Q1, g1]. The filter parameter values ​​for sub-filter 2 can be determined as x2 = [f2, Q2, g2]. The coefficients of the two sub-filters are cascaded to obtain the coefficients of the feedback filter as X = [x1, x2, G]. Here, G is the gain.

[0142] The feedback filter coefficient determination method provided in this application involves obtaining a first transfer function and a filter transfer function. The sound source signal is processed based on the first transfer function and the filter transfer function to obtain a first processed signal. A sensitivity function of the feedback filter is determined based on the noise signal and the error signal. An objective function is determined based on the sensitivity function. The coefficients of the feedback filter are determined by minimizing the value of the objective function using a preset algorithm. In this process, the coefficients of the feedback filter can be automatically determined based on the first transfer function, the filter transfer function, the sound source signal, and the noise signal. This eliminates the need for manual adjustment, improving the efficiency and accuracy of determining the feedback filter coefficients.

[0143] Based on any of the above embodiments, the following, in conjunction with Figure 5 The process of determining the coefficients of the feedback filter is illustrated with an example.

[0144] Figure 5 This is a schematic diagram illustrating the working principle of the feedback filter provided in an embodiment of this application. Please refer to... Figure 5 It includes a speaker 501 and a microphone 502. The speaker 501 is used to play the sound source signal y(n), which... Z The Z-transform is Y(Z), and microphone 502 is used to receive the error signal e(n) generated between the sound source signal and the noise signal. d(n) is the noise signal to be eliminated, and its Z-transform is D(Z); S(z) is the actual secondary channel transfer function between the speaker and the microphone. The first transfer function is obtained by estimating S(z). A(z) is the filter transfer function of the feedback filter. The sound source signal y(n) passes through the first transfer function... The synthesized noise signal x(n) is obtained, and x(n) is transformed into X(z) by z-transform. x(n) passes through the filter transfer function A(z) and the primary channel transfer function S(z) of the feedback filter to obtain the first processed signal f(n). f(n) is transformed into F(z) by z-transform. e(n) is the error signal, and e(n) is transformed into E(z) by z-transform. The feedback filter is an internal model feedback filter.

[0145] Assume the feedback filter comprises two sub-filters. Initially, the filter parameters of sub-filter 1 are x1 = [f1, Q1, g1], and the filter parameters of sub-filter 2 are x2 = [f2, Q2, g2]. Based on the filter parameter values ​​x1 of sub-filter 1, its transfer function is determined to be H1(z). Based on the filter parameter values ​​x2 of sub-filter 2, its transfer function is determined to be H2(z). At this point, the transfer function of the feedback filter is A1(z) = H1(z) × H2(z).

[0146] The sensitivity function R1(z) for the first iteration can be determined using Equation 6:

[0147]

[0148] Assuming the actual secondary channel transfer function is the same as the first transfer function obtained from modeling, then at this time,

[0149] The first function value of the objective function in the first iteration can be determined using Formula 7.

[0150]

[0151] Based on the preset algorithm, determine Is it a preset minimum value? If so, then the filter parameter values ​​of each sub-filter are cascaded.

[0152] Adjust the filter parameters of each sub-filter. After adjustment, the filter parameters of sub-filter 1 are x1′=[f1′,Q1′,g1′], and the filter parameters of sub-filter 2 are x2′=[f2′,Q2′,g2′]. Based on the adjusted filter parameter values ​​of sub-filter 1, its transfer function is determined to be H1′(z). Based on the adjusted filter parameter values ​​of sub-filter 2, its transfer function is determined to be H2′(z). Therefore, the adjusted filter transfer function is A2(z)=H1′(z)×H2′(z).

[0153] The sensitivity function R2(z) for the second iteration can be determined using Equation 6:

[0154]

[0155] Assuming the actual secondary channel transfer function is the same as the first transfer function obtained from modeling, then at this time,

[0156] The second function value of the objective function in the second iteration can be determined using Formula 7.

[0157]

[0158] Repeat the above steps until the iteration number i reaches the preset threshold of 3000. At this point, the filter parameter values ​​of each sub-filter are cascaded to obtain the coefficients X = [x...]. n ,x n ,G]. Where G is the gain.

[0159] The feedback filter coefficient determination process provided in this embodiment illustrates the following steps: First, a first transfer function and the transfer functions of each sub-filter are obtained. The product of the transfer functions of each sub-filter is determined as the filter transfer function of the feedback filter. The sound source signal is processed based on the first transfer function and the filter transfer function to obtain a first processed signal. The sensitivity function of the feedback filter is determined based on the noise signal and the error signal. A target function is determined based on the sensitivity function. The coefficients of the feedback filter are determined by minimizing the value of the target function using a preset algorithm. In this process, the coefficients of the feedback filter can be automatically determined based on the first transfer function, the filter transfer function, the sound source signal, and the noise signal. No manual adjustment is required, improving the efficiency and accuracy of determining the feedback filter coefficients.

[0160] Figure 6 This is a schematic diagram of the feedback filter coefficient determination device provided in an embodiment of this application. The feedback filter coefficient determination device can be a chip or a chip module. Please refer to... Figure 6 The feedback filter coefficient determination device 10 may include:

[0161] The first acquisition module 11 is used to acquire a first transfer function between a speaker and a microphone in an earphone, wherein the speaker is disposed in the earphone and the microphone is disposed in an artificial ear;

[0162] The second acquisition module 12 is used to acquire the filter transfer function of the feedback filter;

[0163] The first determining module 13 is used to determine the sound source signal and the noise signal;

[0164] The second determining module 14 is used to determine the coefficients of the feedback filter based on the first transfer function, the filter transfer function, the sound source signal, and the noise signal.

[0165] The feedback filter coefficient determination device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0166] In one possible implementation, the second determining module 14 is specifically used for:

[0167] The sound source signal is processed according to the first transfer function and the filter transfer function to obtain a first processed signal;

[0168] The coefficients of the feedback filter are determined based on the noise signal and the first processed signal.

[0169] In one possible implementation, the second determining module 14 is specifically used for:

[0170] Based on the noise signal and the error signal, determine the sensitivity function of the feedback filter;

[0171] Determine the target function based on the sensitivity function;

[0172] The coefficients of the feedback filter are determined based on the sensitivity function and the target function.

[0173] In one possible implementation, the second determining module 14 is specifically used for:

[0174] The ratio of the error signal to the noise signal is determined as the sensitivity function.

[0175] In one possible implementation, the second determining module 14 is specifically used for:

[0176] Determine multiple frequency points and the corresponding weighting coefficients for each frequency point;

[0177] The target function is determined based on the plurality of frequency points, the weighting coefficients corresponding to each frequency point, and the sensitivity function.

[0178] In one possible implementation, the second determining module 14 is specifically used for:

[0179] Based on the sensitivity function of the i-th iteration, determine the i-th function value of the objective function of the i-th iteration;

[0180] The filter parameter values ​​in the feedback filter are adjusted according to the i-th function value to adjust the filter transfer function of the feedback filter, and the sensitivity function of the (i+1)-th iteration is determined according to the feedback filter after the filter transfer function is adjusted.

[0181] Wherein, i takes the values ​​1, 2, ..., N in sequence, and the latest filter parameter value of the feedback filter is determined as the coefficient of the feedback filter, and N is an integer greater than 1.

[0182] In one possible implementation, the second acquisition module 12 is specifically used for:

[0183] Obtain the transfer function of each sub-filter in the feedback filter;

[0184] The product of the transfer functions of each sub-filter is used to determine the filter transfer function of the feedback filter.

[0185] The feedback filter coefficient determination device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0186] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Please refer to... Figure 7 The electronic device 20 may include a memory 21 and a processor 22. Exemplarily, the memory 21 and the processor 22 are interconnected via a bus 23.

[0187] Memory 21 is used to store program instructions;

[0188] The processor 22 is used to execute the program instructions stored in the memory so that the electronic device 20 performs the method shown in the above method embodiment.

[0189] The electronic device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.

[0190] This application provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above-described method when executed by a processor.

[0191] This application embodiment may also provide a computer program product, including a computer program that, when executed by a processor, can implement the above-described method.

[0192] All or part of the steps in the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above-described method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), random access memory (RAM), flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.

[0193] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0194] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0195] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0196] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.

[0197] In this application, the term "comprising" and its variations can refer to non-limiting inclusion; the term "or" and its variations can refer to "and / or". The terms "first", "second", etc., in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

Claims

1. A method for determining the coefficients of a feedback filter, characterized in that, include: A first transfer function is obtained between a speaker and a microphone in an earphone, wherein the speaker is disposed in the earphone and the microphone is disposed in an artificial ear. The first transfer function is obtained by the following method: the earphone speaker plays a sweep frequency signal, the sweep frequency signal is processed through an acoustic path from the earphone speaker to the microphone in the artificial ear, the microphone receives the processed sweep frequency signal, a Fourier transform is performed on the processed sweep frequency signal to convert the time domain signal into a frequency domain signal, and the first transfer function is determined based on the amplitude and phase frequency changes of the frequency domain signal. To obtain the filter transfer function of the feedback filter, the following steps are required: Obtain the transfer function of each sub-filter in the feedback filter; determine the filter transfer function of the feedback filter by multiplying the transfer functions of each sub-filter. Identify the sound source signal and the noise signal; Determining the coefficients of the feedback filter based on the first transfer function, the filter transfer function, the sound source signal, and the noise signal includes: The sound source signal is processed according to the first transfer function and the filter transfer function to obtain a first processed signal; Determining the coefficients of the feedback filter based on the noise signal and the first processed signal includes: The sensitivity function of the feedback filter is determined based on the ratio of the noise signal to the error signal; wherein the error signal is the difference between the noise signal and the first processed signal. Determine the target function based on the sensitivity function; The coefficients of the feedback filter are determined based on the sensitivity function and the target function; The determination of the coefficients of the feedback filter based on the sensitivity function and the preset target function includes: Based on the sensitivity function of the i-th iteration, determine the i-th function value of the objective function of the i-th iteration; The filter parameter values ​​in the feedback filter are adjusted according to the i-th function value to adjust the filter transfer function of the feedback filter, and the sensitivity function of the (i+1)-th iteration is determined according to the feedback filter after the filter transfer function is adjusted. Wherein, i takes the values ​​1, 2, ..., N in sequence, and the latest filter parameter value of the feedback filter is determined as the coefficient of the feedback filter, and N is an integer greater than 1.

2. The method according to claim 1, characterized in that, Determining the target function based on the sensitivity function includes: Determine multiple frequency points and the corresponding weighting coefficients for each frequency point; The target function is determined based on the plurality of frequency points, the weighting coefficients corresponding to each frequency point, and the sensitivity function.

3. A feedback filter coefficient determination device, characterized in that, The device includes: A first acquisition module is used to acquire a first transfer function between a speaker and a microphone in an earphone, wherein the speaker is disposed in the earphone and the microphone is disposed in an artificial ear. The first transfer function is acquired by the following method: the earphone speaker plays a sweep frequency signal, the sweep frequency signal is processed through an acoustic path from the earphone speaker to the microphone in the artificial ear, the microphone receives the processed sweep frequency signal, the processed sweep frequency signal is subjected to a Fourier transform to convert the time domain signal into a frequency domain signal, and the first transfer function is determined based on the amplitude and phase frequency changes of the frequency domain signal. The second acquisition module is used to acquire the filter transfer function of the feedback filter; The second acquisition module is specifically used to acquire the transfer function of each sub-filter in the feedback filter; and to determine the filter transfer function of the feedback filter by multiplying the transfer functions of each sub-filter. The first determining module is used to determine the sound source signal and the noise signal; The second determining module is used to determine the coefficients of the feedback filter based on the first transfer function, the filter transfer function, the sound source signal, and the noise signal; The second determining module is specifically used to determine the coefficients of the feedback filter based on the noise signal and the first processed signal; The second determining module is specifically used to determine the sensitivity function of the feedback filter based on the ratio of the noise signal to the error signal; wherein the error signal is the difference between the noise signal and the first processed signal; determine the target function based on the sensitivity function; and determine the coefficients of the feedback filter based on the sensitivity function and the target function. The second determining module is specifically used to determine the i-th function value of the objective function of the i-th iteration based on the sensitivity function of the i-th iteration; adjust the filter parameter values ​​of each filter in the feedback filter according to the i-th function value to adjust the filter transfer function of the feedback filter, and determine the sensitivity function of the (i+1)-th iteration based on the feedback filter after the filter transfer function adjustment; wherein i takes the values ​​1, 2, ..., N in sequence, and the latest filter parameter value of the feedback filter is determined as the coefficient of the feedback filter, and N is an integer greater than 1.

4. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 or 2.

5. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, in, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 or 2.

6. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 or 2.