Active noise reduction filter generation method, storage medium and earphone

The transfer function is calculated through an adaptive filtering algorithm and an active noise reduction filter is generated, which solves the problem of difficulty in obtaining accurate transfer functions in the existing technology, improves the noise reduction efficiency and accuracy, and enhances the noise reduction effect.

CN114339513BActive Publication Date: 2024-12-17SHENZHEN BLUETRUM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111225489.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2024-12-17
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

Existing active noise reduction headphones have difficulties in obtaining accurate physical acoustic paths and playing transfer functions of acoustic paths, resulting in large estimation errors in the noise reduction acoustic paths, affecting the noise reduction effect.

Method used

By obtaining the physical noise reduction signal after the noise signal is passed through the headphones and the mixed signal after the noise signal is played in a straight-through state, the transfer function is calculated using an adaptive filtering algorithm to generate an active noise reduction filter, avoiding the physical and playback acoustic paths accurate measurement.

Benefits of technology

It improves noise reduction efficiency and accuracy, reduces transfer function calculation errors, and enhances noise reduction effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114339513B_ABST
    Figure CN114339513B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of active noise reduction, and discloses a method for generating an active noise reduction filter, a storage medium, and headphones. The method comprises: obtaining a physical noise reduction signal and a mixed signal, calculating an input signal according to the mixed signal and the physical noise reduction signal, adaptively filtering the input signal and the physical noise reduction signal according to an adaptive filtering algorithm, obtaining a transfer function, and generating an active noise reduction filter according to the transfer function. On the one hand, the present embodiment does not need to accurately measure the transfer function of the physical acoustic path or the playback acoustic path, and an active noise reduction filter can be generated according to an adaptive algorithm so as to actively reduce noise, thereby improving noise reduction efficiency. On the other hand, since there is no need to measure the transfer function of the physical acoustic path or the playback acoustic path, the measurement error of the above two is not introduced, thereby improving the noise reduction accuracy and noise reduction effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of active noise reduction, and in particular to a method for generating an active noise reduction filter, a storage medium and headphones. Background Art

[0002] Active noise reduction headphones can generate an active noise reduction signal with an amplitude equal to and a phase opposite to that of the noise signal, so that the active noise reduction signal can offset the noise signal, thereby achieving the purpose of noise reduction.

[0003] See also Figure 1 , active noise reduction headphones include two important acoustic paths, namely the physical acoustic path P(z) from the noise source to the human ear (when wearing headphones), and the playback acoustic path G(z) from the headphone speaker to the human ear. Here, in order to achieve active noise reduction, the noise reduction acoustic path of the active noise reduction filter is H(z). Assuming that the transfer function of the acoustic path P(z) is H1, the transfer function of the noise reduction acoustic path H(z) is H2, and the transfer function of the acoustic path G(z) is H3, we have Figure 1 It can be seen that the relationship between the three transfer functions is: P(z)=H(z)*G(z).

[0004] Assuming that the noise signal is x(n), the noise level after physical noise reduction heard when wearing headphones is: d(n)=x(n)*p(n), where p(n) is the time domain expression of P(z).

[0005] When the noise reduction function of the active noise reduction headphones is turned on, the residual noise signal e(n) heard by the human ear is shown in the following formula. Ideally, the residual noise should be 0, that is:

[0006] e(n)=y 2 (n)-d(n)

[0007] =y 1 (n)*g(n)-x(n)*p(n)

[0008] =x(n)*h(n)*g(n)-x(n)*p(n)

[0009] =0

[0010] where g(n) is the time domain expression of G(z).

[0011] In order to obtain the transfer function H2 of the noise reduction acoustic path H(z), the usual practice is to obtain the transfer function H1 and the transfer function H3 respectively, and then obtain the transfer function H2 based on the transfer function H1 and the transfer function H3. This approach requires obtaining the transfer function H1 and the transfer function H3 first, but it is relatively difficult to obtain accurate P(z) and G(z), because P(z) is related to directionality, the position of the speaker playing the sound source, and the type of sound source played; G(z) also varies from person to person, and each person's way of wearing headphones, the shape of the auricle, and other external factors are different, so G(z) will also be different. Therefore, it is relatively difficult to obtain accurate P(z) and G(z), and two errors will be introduced when measuring the transmission path of P(z) and G(z). Finally, when estimating the transfer function H2, due to the superposition effect of the errors of P(z) and G(z), the error of estimating the transfer function H2 will be greatly increased. Summary of the invention

[0012] An object of an embodiment of the present invention is to provide a method for generating an active noise reduction filter, a storage medium and headphones, so as to solve the technical defects of the above-mentioned prior art.

[0013] In a first aspect, an embodiment of the present invention provides a method for generating an active noise reduction filter, comprising:

[0014] Acquire a physical noise reduction signal, where the physical noise reduction signal is a signal received by a feed-back microphone after the noise signal passes through the earphone;

[0015] Acquire a mixed signal, where the mixed signal is a signal received by the feed-back microphone when the same noise signal is played and the earphone plays the through signal in a through state;

[0016] Calculating an input signal according to the mixed signal and the physical noise reduction signal;

[0017] Adaptively filtering the input signal and the physical noise reduction signal according to an adaptive filtering algorithm to obtain a transfer function;

[0018] An active noise reduction filter is generated according to the transfer function.

[0019] Optionally, generating an active noise reduction filter according to the transfer function includes:

[0020] According to the transfer function, the frequency response parameters and the frequency response curve of the FIR filter are calculated;

[0021] Generate parameters of an n-order IIR filter according to the frequency response parameters of the FIR filter;

[0022] An active noise reduction filter is generated according to the parameters of the n-th order IIR filter, wherein n is a positive integer.

[0023] Optionally, generating parameters of an n-order IIR filter according to the frequency response parameters of the FIR filter includes:

[0024] According to the frequency response parameters of the FIR filter and the set filter order n, in combination with the inverse discrete Fourier transform algorithm, the parameters of the n-order IIR filter are generated.

[0025] Optionally, generating an active noise reduction filter according to the parameters of the n-order IIR filter includes:

[0026] According to the parameters of the n-order IIR filter, in combination with a discrete Fourier transform algorithm, the frequency response parameters of the n-order IIR filter are calculated;

[0027] A frequency response curve of the n-order IIR filter is generated according to the frequency response parameters of the n-order IIR filter.

[0028] According to the frequency response curve of the n-order IIR filter, the parameters of the n-order IIR filter are reduced to the parameters of the m-order IIR filter, where m is a positive integer and 2 <m<n;

[0029] An active noise reduction filter is generated according to the parameters of the m-th order IIR filter.

[0030] Optionally, generating an active noise reduction filter according to the m-order IIR filter parameters includes:

[0031] Converting the transfer function corresponding to the parameters of the m-order IIR filter into a quadratic fractional model of a plurality of second-order IIR filters cascaded;

[0032] An active noise reduction filter is generated according to the parameters of the plurality of second-order IIR filters.

[0033] Optionally, the through signal is a noise signal sampled by a feedforward microphone.

[0034] Optionally, calculating the input signal according to the mixed signal and the physical noise reduction signal includes:

[0035] The physical noise reduction signal is subtracted from the mixed signal to obtain an input signal.

[0036] Optionally, the adaptive filtering algorithm includes a normalized least mean square algorithm, and the adaptive filtering is performed on the input signal and the physical noise reduction signal according to the adaptive filtering algorithm to obtain a transfer function including:

[0037] According to the normalized least mean square algorithm, the input signal and the physical noise reduction signal are adaptively filtered to obtain a transfer function.

[0038] In a second aspect, an embodiment of the present invention provides a storage medium storing computer executable instructions, wherein the computer executable instructions are used to enable an electronic device to execute the above-mentioned method for generating an active noise reduction filter.

[0039] In a third aspect, an embodiment of the present invention provides a headset, including:

[0040] at least one processor; and,

[0041] a memory communicatively connected to the at least one processor; wherein,

[0042] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for generating an active noise reduction filter.

[0043] In the method for generating an active noise reduction filter provided in an embodiment of the present invention, a physical noise reduction signal is obtained, which is a signal received by a feed-back microphone after the noise signal passes through the earphone, and a mixed signal is obtained, which is a signal received by the feed-back microphone when the same noise signal is played and the earphone plays the pass-through signal in a pass-through state. According to the mixed signal and the physical noise reduction signal, an input signal is calculated, and according to an adaptive algorithm, the input signal and the physical noise reduction signal are adaptively filtered to obtain a transfer function, and an active noise reduction filter is generated according to the transfer function. Therefore, on the one hand, this embodiment does not need to accurately measure the transfer function of the physical acoustic path or the playback acoustic path, and an active noise reduction filter can be generated according to the adaptive algorithm so that active noise reduction can be achieved, thereby improving noise reduction efficiency. On the other hand, since there is no need to measure the transfer function of the physical acoustic path or the playback acoustic path, the measurement error of the above two is not introduced, thereby improving the noise reduction accuracy and noise reduction effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0045] Figure 1 An architectural diagram of the acoustic path provided for the existing technology;

[0046] Figure 2a A schematic diagram of the structure of an earphone provided by an embodiment of the present invention;

[0047] Figure 2b for Figure 2a An architectural diagram of the acoustic path of the earphone shown;

[0048] Figure 3 A schematic diagram of a flow chart of a method for generating an active noise reduction filter provided by an embodiment of the present invention;

[0049] Figure 4 for Figure 3 The schematic diagram of the process of S35 shown;

[0050] Figure 5 To adopt Figure 3 A schematic diagram of a first effect of noise reduction by an active noise reduction filter shown;

[0051] Figure 6 To adopt Figure 3 A schematic diagram of a second effect of noise reduction by an active noise reduction filter shown;

[0052] Figure 7 A schematic diagram of the circuit structure of an earphone provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0054] It should be noted that, if there is no conflict, the various features in the embodiments of the present invention can be combined with each other, all within the scope of protection of the present invention. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in the present invention do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0055] The embodiment of the present invention provides a headset. Figure 2a The earphone 100 includes a housing 10 and a feedforward microphone 11 , an active noise reduction filter 12 , a speaker 13 , a feedback microphone 14 and a controller 15 mounted on the housing 10 .

[0056] The feedforward microphone 11 is installed outside the housing of the headset 100 and is used to sample the noise signal played by the noise source 16. The noise signal is received by the feedback microphone 14 through the housing 10. The noise source 16 can be any form of noise source, such as a speaker, etc. The noise signal can be any suitable form of noise, such as swept frequency noise or pink noise, etc.

[0057] It can be understood that the signal after the noise signal passes through the housing 10 is sampled by the feedback microphone 14 , and this signal can be regarded as a signal after physical noise reduction, that is, a physical noise reduction signal.

[0058] The active noise reduction filter 12 is controlled by the controller 15 and generates an active noise reduction signal through the speaker 13, wherein the controller 15 controls the working state of the active noise reduction filter 12 according to the noise signal sampled by the feedforward microphone 11. For example, when the feedforward microphone 11 samples the noise signal, the controller 15 can start the active noise reduction function of the active noise reduction filter 12; when the feedforward microphone 11 does not sample the noise signal, the controller 15 can turn off the active noise reduction function of the active noise reduction filter 12.

[0059] The speaker 13 is used to play the active noise reduction signal. Ideally, the amplitude of the active noise reduction signal is equal to that of the noise signal and the phase is opposite. When the active noise reduction function of the active noise reduction filter 12 is turned off by the controller 15, the through signal is not processed by the active noise reduction filter 12 and can be directly transmitted to the outside through the speaker 13. When the active noise reduction function of the active noise reduction filter 12 is activated by the controller 15, the through signal is processed by the active noise reduction filter 12 to obtain the active noise reduction signal, and the active noise reduction signal is transmitted to the outside through the speaker 13.

[0060] It is understandable that the speaker 13 may introduce a transfer function. As mentioned above, in order to achieve the purpose of active noise reduction, the prior art needs to calculate this transfer function.

[0061] The feedback microphone 14 is used to sample the physical noise reduction signal after the noise signal passes through the housing 10 , and / or to sample the active noise reduction signal played by the speaker 13 .

[0062] The controller 15 is integrated with an adaptive noise reduction algorithm module, which can control the active noise reduction filter 12 to perform adaptive filtering and noise reduction according to the signals sampled by the feedforward microphone 11 and / or the feedback microphone 14. For example, first, the noise signal of the noise source 16 is received by the feedback microphone 14 after passing through the housing 10, that is, the feedback microphone 14 receives the physical noise reduction signal, and the controller 15 records the physical noise reduction signal.

[0063] Next, the controller 15 turns off the active noise reduction function of the active noise reduction filter 12, that is, sets the working state of the active noise reduction filter 12 to the pass-through state. In the pass-through state, the pass-through signal generated by the controller 15 is not processed in any way, but is directly transmitted to the speaker 13 through the active noise reduction filter 12, and then transmitted to the outside through the speaker 13.

[0064] Next, the noise source 16 plays the same noise signal. When the feedforward microphone 11 transmits the sampled noise signal to the controller 15, the controller 15 synchronously controls the active noise reduction filter 12 to send a pass-through signal to the speaker 13 in a pass-through state. The speaker 13 plays the pass-through signal. Then, the feedback microphone 14 receives a mixed signal formed by mixing the pass-through signal and the physical noise reduction signal. That is, the mixed signal is obtained by superimposing the pass-through signal and the physical noise reduction signal. The pass-through signal can be the noise signal collected by the feedforward microphone 11, or it can be an arbitrarily selected audio signal.

[0065] See also Figure 2b , A(z) is the acoustic path of the noise signal u(n) transmitted to the feed-back microphone after passing through the housing 10, wherein A(z) may be the acoustic path of the unknown system. G(z) is the acoustic path of the active noise reduction filter 12 in the pass-through state, the noise signal u(n) is collected by the feed-forward microphone 11 and transmitted to the active noise reduction filter 12 and the speaker 13 in sequence, and the noise signal u(n) may be used as a pass-through signal.

[0066] At time t1, the controller 15 suspends the operation of the active noise reduction filter 12. After the noise signal u(n) passes through the acoustic path A(z), a physical noise reduction signal d(n) can be obtained, and the physical noise reduction signal d(n) can be received by the feedback microphone 14.

[0067] At time t2, the controller 15 sets the working state of the active noise reduction filter 12 to the through state, and controls the noise source 16 to play the same noise signal u(n) as at time t1. The feedforward microphone 11 samples the noise signal u(n), and after the sampled noise signal u(n) passes through the acoustic path G(z), a mixed signal f(n) can be obtained, that is, the sampled noise signal u(n) is input into the active noise reduction filter 12 as a through signal. In the through state, the active noise reduction filter 12 transmits the through signal to the speaker 13, so that the speaker 13 outputs the through signal. The feedback microphone 14 simultaneously samples the mixed signal f(n) formed by the superposition of the through signal and the physical noise reduction signal, and transmits the mixed signal f(n) to the controller 15. The controller 15 subtracts the physical noise reduction signal d(n) from the mixed signal f(n) to obtain the input signal x(n).

[0068] The controller 15 constructs an active noise reduction acoustic path B(z) for the active noise reduction filter 12, wherein the transfer function H0 of the active noise reduction acoustic path B(z) is calculated by the controller 15 based on the input signal x(n) and the physical noise reduction signal d(n) in combination with the adaptive filtering algorithm, and the controller 15 calculates the digital filter parameters based on the transfer function H0, and fills the digital filter parameters into the active noise reduction filter 12. For example, the controller 15 obtains the reference output y(n) based on the input signal x(n) in combination with the adaptive filtering algorithm, and the reference output y(n) is subtracted from the physical noise reduction signal d(n) to obtain the error e(n). The error e(n) is fed back to the adaptive filtering algorithm module of the controller 15, and the adaptive filtering algorithm module adjusts the transfer function H0 of the active noise reduction acoustic path B(z) again until the error e(n) is close to or equal to 0, and the transfer function H0 at this time is recorded. Subsequently, in the application process, if a noise signal is encountered, the active noise reduction filter 12 can effectively and actively reduce the noise signal to avoid the interference of the noise signal to the user.

[0069] From the above description, it can be seen that, compared with the prior art, this embodiment does not need to measure the transfer functions H1 and H3 of two acoustic paths, but only needs to measure or adjust one acoustic path, that is, only the transfer function H0 of the active noise reduction filter needs to be measured to achieve the purpose of active noise reduction.

[0070] As another aspect of the present invention, the present invention provides a method for generating an active noise reduction filter. Figure 3 , the method S300 for generating an active noise reduction filter includes:

[0071] S31, obtaining a physical noise reduction signal, where the physical noise reduction signal is a signal received by a feed-back microphone after the noise signal passes through the earphone;

[0072] S32, obtaining a mixed signal, where the mixed signal is a signal received by the feed-back microphone when the same noise signal is played and the earphone plays the through signal in a through state;

[0073] As an example but not a limitation, the through signal is an audio signal played by the headset in the through state, wherein the through signal can be a noise signal sampled by a feedforward microphone, and since the transmission environment or medium of the noise signal sampled by the feedforward microphone is the same as that of the physical noise reduction signal, it is beneficial for subsequent steps to quickly and efficiently calculate the optimal transfer function. It is understandable that the through signal can also be an arbitrarily selected audio signal.

[0074] S33, calculating an input signal according to the mixed signal and the physical noise reduction signal;

[0075] In some embodiments, the headset may perform any appropriate processing on the mixed signal and the physical noise reduction signal to obtain the input signal. In some embodiments, the headset subtracts the physical noise reduction signal from the mixed signal to obtain the input signal.

[0076] S34, performing adaptive filtering on the input signal and the physical noise reduction signal according to an adaptive filtering algorithm to obtain a transfer function;

[0077] In some embodiments, the adaptive filtering algorithm includes a normalized least mean square algorithm. S34 includes: adaptively filtering the input signal and the physical noise reduction signal according to the normalized least mean square algorithm to obtain a transfer function. For example:

[0078] The vector form of the normalized least mean square algorithm weight update is:

[0079] w(n+1)=w(n)+μ(n)x(n)e(n)

[0080] Among them, w(n) is the weight vector at the nth iteration, w(n+1) is the weight parameter vector updated based on w(n), x(n) is the input vector at the nth iteration, and e(n) is the error between the reference output of the active noise reduction filter and the physical noise reduction signal at the nth iteration. μ(n) is the step size factor. The value of μ affects the convergence speed and error of the active noise reduction filter. The step size in the normalized least mean square algorithm is a time-varying quantity and is defined as follows:

[0081]

[0082] in, is the power of the signal estimated at time n, α is the corrected step size constant, 0<α<2, δ>0. It is a very small constant. Its purpose is to avoid the situation where the denominator is zero when x(n)=0, and also to avoid a large step size when the input signal power is too small. Here, the value is δ=0.00001.

[0083] Please combine Figure 2b , the reference output y(n) is expressed as:

[0084] y(n)=x(n)·w(n) T

[0085] Wherein, w(n) is the weight coefficient of the active noise reduction filter, and the error signal between the reference output of the active noise reduction filter and the physical noise reduction signal is:

[0086] e(n)=d(n)-y(n)

[0087] In the filter optimization design, a minimum cost function or a performance index is used to measure the quality of the filter, and the most commonly used index is the mean square error, which is also called the mean square error criterion. It can be expressed as follows:

[0088] E{e 2 (n)}=E{[d(n)-y(n)] 2}

[0089] Among them, E{e 2 (n)} is the mean square error, d(n) represents the physical noise reduction signal, y(n) represents the signal after the input signal x(n) is processed by the active noise reduction filter, and e(n) represents the error between the reference output of the filter and the physical noise reduction signal when the input x(n) is input. According to the above formula, the headset searches for the optimal filter weight coefficient w(n) so that the y(n) signal is infinitely close to d(n), and the error signal e(n) is infinitely close to 0, at which point the mean square error reaches the minimum value.

[0090] Derivative the weight vector to get the gradient of the mean square error

[0091]

[0092] In order to optimize the performance of the filter designed based on the normalized minimum mean square error criterion, it is necessary to find the minimum value on the error performance surface, thereby obtaining the optimal filter parameters. On the error performance surface, search along the tangent direction of the surface, that is, the negative gradient direction, and adjust the filter weight coefficient w(n) along the negative gradient direction of w(n). Let the filter tap weight vector obtained by the nth iteration be w(n), and let the mean square error obtained by this iteration be ε(n), then the filter coefficient obtained by the n+1th iteration can be calculated by the following formula:

[0093]

[0094] in is the gradient vector at this iteration, is the direction vector of this iteration, μ(n) is the step size used in the nth iteration, also known as the convergence factor. Accurately calculate the gradient is very difficult, a rough but effective calculation The method is to directly take the error squared e 2 (n) is the mean square error E{e 2 (n)}, that is:

[0095]

[0096] in, for:

[0097]

[0098] The mean square error estimate is:

[0099]

[0100] So the update method of the active noise reduction filter tap parameters is obtained as follows:

[0101] w(n+1)=w(n)+2μ(n)e(n)x(n)

[0102] When the mean square error is minimized, the optimal filter weight coefficient vector W is obtained, that is, the output signal vector Y = X·W, and the transfer function Because an FIR filter is used, filter parameters b=W and a=1 are obtained, and therefore a transfer function formed by filter parameters a and b can be obtained.

[0103] S35: Generate an active noise reduction filter according to the transfer function.

[0104] In summary, on the one hand, this embodiment does not need to accurately measure the transfer function of the physical acoustic path or the playback acoustic path, and can generate an active noise reduction filter according to the adaptive algorithm so as to actively reduce noise, thereby improving the noise reduction efficiency. On the other hand, since there is no need to measure the transfer function of the physical acoustic path or the playback acoustic path, the measurement error of the above two is not introduced, thereby improving the noise reduction accuracy and noise reduction effect.

[0105] In some embodiments, see Figure 4 , S35 includes:

[0106] S351, calculating the frequency response parameters and frequency response curve of the FIR filter according to the transfer function;

[0107] S352, generating parameters of an n-order IIR filter according to the frequency response parameters of the FIR filter;

[0108] S353: Generate an active noise reduction filter according to the parameters of an n-th order IIR filter, where n is a positive integer.

[0109] In step S351, in some embodiments, the headset can calculate the frequency response parameters of the FIR filter based on the transfer function in combination with a discrete Fourier transform algorithm, and draw a frequency response curve of the FIR filter based on the frequency response parameters of the FIR filter.

[0110] In step S352, in some embodiments, the earphone generates the parameters of an n - order IIR filter according to the frequency response characteristic parameters of the FIR filter and the set filter order n, in combination with the inverse discrete Fourier transform algorithm. Among them, the frequency response characteristic parameters include the h1 parameter and the w1 parameter. h1 contains the frequency responses of N equally - spaced frequency points in the corresponding interval of the discrete system, where N is a positive integer, and w1 are the values of the N equally - spaced frequency points. Then, according to h1 and w1, the desired IIR filter order n is set, and the inverse discrete Fourier transform is performed to obtain the new IIR filter parameters b_new and a_new. That is, the parameters b_new and a_new of the IIR filter can form an n - order IIR filter.

[0111] In step S353, in some embodiments, the earphone calculates the frequency response parameters of the n - order IIR filter according to the parameters of the n - order IIR filter, in combination with the discrete Fourier transform algorithm. According to the frequency response parameters of the n - order IIR filter, the frequency response curve of the n - order IIR filter is generated. According to the frequency response curve of the n - order IIR filter, the parameters of the n - order IIR filter are reduced to the parameters of an m - order IIR filter, where m is a positive integer and 2 < m < n. According to the parameters of the m - order IIR filter, an active noise - cancelling filter is generated.

[0112] For example, in step S352, the parameters b_new and a_new of the n - order IIR filter can be obtained. The discrete Fourier transform is performed to obtain the frequency response characteristic parameters of the discrete system. The frequency response characteristic parameters include h21 and w21, and the frequency response curve is plotted. The IIR filter order i less than n is designed. According to the frequency response characteristic parameters and the set filter order i, the inverse discrete Fourier transform is used to obtain the parameters of the i - order IIR filter. The obtained parameters of the i - order IIR filter are b_new21 and a_new21. According to the parameters b_new21 and a_new21 of the i - order IIR filter, the discrete Fourier transform is performed to obtain its frequency response characteristic parameters h31 and w31, and the frequency response curve is plotted.

[0113] The frequency response curve of the i - order IIR filter is compared with the frequency response curve of the n - order IIR filter for similarity. If the similarity degree is less than or equal to the preset similarity threshold, the value of i is increased to obtain a new i value, and then the above - mentioned method is used to obtain the frequency response curve of the new i - order IIR filter.

[0114] The frequency response curve of the new i - order IIR filter is compared with the frequency response curve of the n - order IIR filter, and so on, until the order of the IIR filter is reduced to m. If the similarity degree is greater than the preset similarity threshold, the order reduction is successful. It is judged whether i is equal to m. If it is equal to m, then record i = m. If it is not equal to m, assign n = i, set i to the order expected by the user, and then use the above - mentioned method to obtain the frequency response curve of the new i - order IIR filter.

[0115] For example, the earphone generates a 512-order IIR filter frequency response curve based on the FIR filter frequency response curve. The earphone first sets i=64, and obtains a 64-order IIR filter frequency response curve according to the above method.

[0116] The earphone compares the similarity between the 512th-order IIR filter frequency response curve and the 64th-order IIR filter frequency response curve. If the similarity is less than or equal to the preset similarity threshold, the order reduction fails. The reason for the failure is that the order difference between the 64th-order IIR filter and the 512th-order IIR filter is too large, and the 64th-order IIR filter cannot be used to represent the 512th-order IIR filter. Therefore, the order of the fitted filter is increased.

[0117] Therefore, the 64th order is increased to the 128th order, and the 128th order IIR filter frequency response curve is used to fit the 512th order IIR filter frequency response curve. If the similarity is greater than the preset similarity threshold, the order reduction is successful.

[0118] Since the 128th-order IIR filter consumes a lot of power and is still difficult to implement in practical applications, it is necessary to repeat the above steps and downgrade the 128th-order IIR filter to 64th-order, and then to 16th-order, and so on.

[0119] In some embodiments, m=16. Since it is still difficult to implement a 16th-order IIR filter in engineering, it is also necessary to convert the 16th-order IIR filter into multiple second-order IIR filters in cascade form. In some embodiments, the headset converts the transfer function corresponding to the parameters of the m-order IIR filter into a quadratic fraction model of a cascade of multiple second-order IIR filters, and generates an active noise reduction filter based on the parameters of the multiple second-order IIR filters. For example, the headset converts the m-order IIR filter into multiple second-order IIR filters in cascade form according to the function tf2sos, and generates an active noise reduction filter based on the parameters of the multiple second-order IIR filters.

[0120] In order to demonstrate the noise reduction effect of the active noise reduction filter provided by this embodiment, this paper combines Figure 5 and Figure 6 Explain separately, among which, Figure 5 In FIG. 5 , the first curve 51 represents the external noise received by the physical noise reduction artificial ear, and the second curve 52 represents the residual noise received by the feed-back microphone under the action of the active noise reduction filter. Figure 6 In FIG. 6 , the third curve 61 represents the external noise received by the physical noise reduction artificial ear, and the fourth curve 62 represents the residual noise received by the feed-back microphone under the action of the active noise reduction filter.

[0121] The performance indicators of active noise reduction headphones generally include noise reduction bandwidth and noise reduction depth. Noise reduction bandwidth refers to the range of noise frequencies that the headphones can handle. Since different types of sounds have different frequencies, the larger the noise reduction bandwidth, the more frequencies it covers, and the more types of sounds the headphones can reduce. Noise reduction depth refers to how much the volume of noise of a certain frequency can be reduced. The larger the value, the better the noise reduction effect. Generally, the maximum value of the noise reduction depth is used as the noise reduction depth of the entire headphone. The noise reduction bandwidth indicates the types of sounds that can be processed. The actual effect of the noise reduction after processing is determined by the noise reduction depth at that frequency. Figure 5 and Figure 6 It can be seen that the noise reduction bandwidth is between 50hz-5khz and 50hz-10khz respectively, and the noise reduction depth is roughly in the range of 20-35dB. The noise reduction bandwidth and noise reduction depth of this active noise reduction algorithm are quite impressive and have certain practical value.

[0122] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present invention, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.

[0123] See also Figure 7 , Figure 7 FIG. 1 is a schematic diagram of a circuit structure of an earphone provided by an embodiment of the present invention. Figure 7 As shown, the headset 700 includes one or more processors 71 and a memory 72. Figure 7 A processor 71 is taken as an example.

[0124] The processor 71 and the memory 72 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0125] The memory 72 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the method for generating an active noise reduction filter in the embodiment of the present invention. The processor 71 implements the function of the method for generating an active noise reduction filter provided in the above method embodiment by running the non-volatile software programs, instructions and modules stored in the memory 72.

[0126] The memory 72 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 72 may optionally include a memory remotely arranged relative to the processor 71, and these remote memories may be connected to the processor 71 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0127] The program instructions / modules are stored in the memory 72 , and when executed by the one or more processors 71 , the method for generating an active noise reduction filter in any of the above method embodiments is executed.

[0128] The embodiment of the present invention further provides a storage medium, wherein the storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors, such as Figure 7 A processor 71 in the embodiment may enable the one or more processors to execute the method for generating an active noise reduction filter in any of the above method embodiments.

[0129] An embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by headphones, the headphones execute any one of the methods for generating an active noise reduction filter.

[0130] The above described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0131] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating an active noise reduction filter, applied to headphones, the headphones comprising a housing, a feedforward microphone, an active noise reduction filter, a speaker, a feedback microphone, and a controller, wherein the feedforward microphone is mounted outside the housing, characterized in that: The generation method comprises: Acquire a physical noise reduction signal, where the physical noise reduction signal is a signal received by a feed-back microphone after the noise signal passes through the earphone; Obtaining a mixed signal, the mixed signal being a signal received by the feed-back microphone when the same noise signal is played and the headset plays the through signal in a through state; wherein, in the through state, the controller uses the noise signal sampled by the feed-forward microphone as the through signal and transmits it directly to the speaker through the active noise reduction filter, so that the speaker outputs the through signal; Calculating an input signal according to the mixed signal and the physical noise reduction signal; Adaptively filtering the input signal and the physical noise reduction signal according to an adaptive filtering algorithm to obtain a transfer function; An active noise reduction filter is generated according to the transfer function.

2. The method according to claim 1, characterized in that Generating an active noise reduction filter according to the transfer function includes: Calculating the frequency response parameters and frequency response curve of the FIR filter according to the transfer function; Generating parameters of an n-order IIR filter according to the frequency response parameters of the FIR filter; An active noise reduction filter is generated according to the parameters of the n-th order IIR filter, where n is a positive integer.

3. The method according to claim 2, characterized in that Generating parameters of an n-order IIR filter according to the frequency response parameters of the FIR filter includes: According to the frequency response parameters of the FIR filter and the set filter order n, in combination with the discrete Fourier inverse transform algorithm, the parameters of the n-order IIR filter are generated.

4. The method according to claim 2, characterized in that Generating an active noise reduction filter according to the parameters of the n-th order IIR filter includes: Calculating the frequency response parameters of the n-order IIR filter based on the parameters of the n-order IIR filter in combination with a discrete Fourier transform algorithm; Generating a frequency response curve of the n-order IIR filter according to the frequency response parameters of the n-order IIR filter; According to the frequency response curve of the n-order IIR filter, the parameters of the n-order IIR filter are reduced to the parameters of the m-order IIR filter, where m is a positive integer and 2 <m<n; An active noise reduction filter is generated according to the parameters of the m-th order IIR filter.

5. The method according to claim 4, characterized in that Generating an active noise reduction filter according to the m-order IIR filter parameters includes: Converting the transfer function corresponding to the parameters of the m-order IIR filter into a quadratic fraction model of a cascade of multiple second-order IIR filters; An active noise reduction filter is generated according to the parameters of the plurality of second-order IIR filters.

6. The method according to any one of claims 1 to 5, characterized in that The calculating the input signal according to the mixed signal and the physical noise reduction signal includes: The physical noise reduction signal is subtracted from the mixed signal to obtain an input signal.

7. The method according to any one of claims 1 to 5, characterized in that The adaptive filtering algorithm includes a normalized least mean square algorithm. The adaptive filtering algorithm is used to adaptively filter the input signal and the physical noise reduction signal to obtain a transfer function including: Adaptively filtering the input signal and the physical noise reduction signal according to a normalized least mean square algorithm to obtain a transfer function.

8. A storage medium, characterized in that: Computer-executable instructions are stored, and the computer-executable instructions are used to enable an electronic device to execute the method for generating an active noise reduction filter according to any one of claims 1 to 7.

9. A headset, 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, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method for generating an active noise reduction filter according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Active noise reduction method, device, chip, active control system, and storage medium

    CN110402540A

  • Active noise reduction method, active noise reduction device and half-in-ear active noise reduction earphone

    CN113421540A