A Feedback Filter Design Method for Active Noise Cancelling Headphones
By designing a feedback filter using a two-step optimization strategy and a penalty function, the problem of balancing noise reduction width and depth in active noise-canceling headphones was solved, resulting in better noise reduction performance and stability, and simplifying the design process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU NATCHIP SCI & TECH CO LTD
- Filing Date
- 2023-06-15
- Publication Date
- 2026-07-03
AI Technical Summary
The feedback filter design of existing active noise-canceling headphones is difficult to optimize both noise cancellation width and depth at the same time, which affects stability and makes it difficult to achieve the best effect simultaneously.
A two-step optimization strategy is adopted: first, the width control filter bank is optimized using a genetic algorithm, and then the depth control filter bank is optimized using the simplex method. A penalty function is combined to ensure the stability of the control filter, and a feedback filter is designed.
While ensuring the width of noise reduction, we further deepen the noise reduction, improve the noise reduction experience of headphones, simplify the design process, and optimize the design results.
Smart Images

Figure CN116743113B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of headphone technology, and in particular to active noise cancellation for headphones, specifically relating to a feedback filter design method for active noise cancellation headphones. Background Technology
[0002] Active noise-canceling headphones, as one of the most popular personal hearing protection devices, are widely used in various noisy environments in people's daily lives. The controller of active noise-canceling headphones plays an inverse noise signal through the headphone speaker to reduce the noise intensity at the eardrum.
[0003] Early active noise cancellation was based on control theory for filter design. It mainly fits the filter transfer function by adjusting the positions of zeros and poles, thereby ensuring the stability of the control filter and having a certain noise reduction performance. However, its noise reduction depth and width are often not optimal.
[0004] Based on whether the filter is time-varying, filters can be divided into fixed filters and adaptive filters. Based on the filter structure, they can be divided into feedforward control filters and feedback control filters. Based on optimization methods and filter structures, adaptive feedback control filters can theoretically achieve better noise reduction width and depth. However, in practice, due to stability considerations, there is often a trade-off between noise reduction width and noise reduction depth, making it difficult to simultaneously satisfy both. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a feedback filter design method for active noise-canceling headphones. By employing a two-step optimization strategy of width and depth, the noise reduction depth is further increased while ensuring the noise reduction width.
[0006] The specific steps of the method of this invention are as follows:
[0007] Step (1) Determine the transfer function P(f) of the secondary path;
[0008] Step (2) Set the open-loop transfer function L(f) = C(f)P(f) of the headphone noise cancellation system, and the closed-loop sensitivity function. Where C(f) is the transfer function of the control filter, which is determined by the sequence of control filter parameters x, and the sequence of control filter parameters x = [G h1 Q1 g1 … h K Q K g K ], is a filter bank consisting of K second-order filters, where K = 4 to 6, and G is the linear gain controlling the filter bank, (h k Q k g k ) represents the relevant parameters of the k-th bisecond-order filter, where k = 1, ..., K;
[0009] Step (3) Determine the penalty term Penalty(x) required to optimize the control filter parameter sequence x;
[0010] Step (4) divides the parameter sequence x of the control filter consisting of K second-order double filters into the first J width control filter groups x. w and the subsequent KJ depth control filter banks x d The two parts correspond to the subsequent two-step optimization scheme, x = [x w x d ]; where the width-controlled filter bank x w =[G h1 Q1 g1…h J Q J g J ], depth control filter bank x w =[h J+1 Q J+1 g J+1 … h K Q K g K ], J = 3 ~ (K-1);
[0011] Step (5) Construct the width optimization objective J w (x w The genetic algorithm is used to solve the width-controlled filter bank x. w The parameter sequence of the width control filter is obtained.
[0012] Step (6) Construct the deep optimization objective J d (x), all filters are optimized using the Nelder-Mead method, to achieve the desired result. Let x be the initial values of the first J filters, i.e. And fix the search range of the first J filters as The final control filter parameter sequence is obtained. Δ represents the search range;
[0013] Step (7) uses the final control filter parameter sequence As a control filter for active noise cancellation in headphones.
[0014] Furthermore, the specific method of step (1) is as follows:
[0015] The headphone speaker plays a white noise signal s(n), and the headphone's error microphone collects this signal to obtain the white noise y(n) collected at time n;
[0016] Initialize the secondary path estimation filter coefficients c iLet i = 1, ..., I, where I is the order of the secondary path estimation filter; calculate the output of the secondary path estimation filter. Calculate the error e(n) = y(n) - r(n); update the secondary path estimation filter coefficients c based on the Least Mean Square (LMS) algorithm. i (n+1)=c i (n)+μe(n)s(ni), algorithm step size P s It is the power of the white noise signal s(n);
[0017] Save the coefficients of the secondary path estimation filter at the moment the white noise signal ends playing from the headphone speaker. Perform an M-point Fourier transform on the coefficients of the final secondary path estimation filter to obtain the secondary path transfer function P(f), with the frequency sequence as follows. f s This is the microphone sampling rate.
[0018] Furthermore, in step (3), the penalty item Among them, the penalty function 'a' represents a variable; ||·|| ∞ This indicates the calculation of the infinite norm. W1, W2, and W3 are the window functions corresponding to the low, medium, and high frequencies in the amplitude constraint, respectively. W4 and W5 are the window functions corresponding to the low and high frequencies in the phase constraint, respectively. γ1, γ2, and γ3 are the amplitude constraint parameters, and their ranges are set as follows: and γ4 and γ5 are phase constraint parameters, and their range settings are as follows: and ∠ represents the phase operation.
[0019] Furthermore, the specific method for step (5) is as follows: Where ||·||2 represents the calculation of the 2-norm, λ1 is the width optimization weighting factor, 0.01≤λ1≤0.1, W w Optimize the corresponding window function for the set width; solve the width-controlled filter bank x using a genetic algorithm. w When the number of iterations of the genetic algorithm reaches the preset maximum number of iterations, the parameter sequence of the width control filter is obtained.
[0020] The specific method for step (6) is: J d (x)=λ2min{S(f)W d}+Penalty(x); where min{·} is the minimum value operation, λ2 is the depth optimization weighting factor, 0.01≤λ2≤0.1, W dThe window function is optimized for the given depth; all filters are optimized using the Nelder-Mead method. The initial values for the first J filters of x are the initial sequence of the filter parameter sequence. The search range of the first J filters is fixed. When the number of iterations of the simplex method reaches the preset maximum number of iterations, the final control filter parameter sequence is obtained.
[0021] This invention proposes an active noise reduction feedback filter design method. While ensuring the stability of the control filter through a penalty function, it balances the two indicators of noise reduction width and noise reduction depth through a two-step optimization strategy of width and depth, and further increases the noise reduction depth while ensuring the noise reduction width.
[0022] The beneficial effects of the method of the present invention include:
[0023] (1) Compared with the “control theory-based” method, the penalty function is used as a constraint to ensure the stability of the control filter. It does not require adjusting the positions of poles and zeros to fit the transfer function of the control filter, which simplifies the design steps and optimizes the design results.
[0024] (2) Compared with the “single-step optimization target” method, the two-step optimization strategy of width and depth balances the two indicators of noise reduction width and noise reduction depth. While ensuring the noise reduction width, the noise reduction depth is further deepened, which can achieve a better headphone noise reduction experience. Attached Figure Description
[0025] Figure 1 This is a flowchart illustrating the present invention. Detailed Implementation
[0026] To facilitate understanding of the present invention and to make the above-mentioned objects, features, and advantages of the present invention more apparent, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention, and preferred embodiments are shown in the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of the present invention. The present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention; therefore, the present invention is not limited to the specific embodiments disclosed below.
[0027] like Figure 1 A feedback filter design method for active noise-canceling headphones is described below:
[0028] Step (1) The headphone speaker plays a white noise signal s(n), and the headphone's error microphone collects the signal to obtain the white noise y(n) collected at time n; in this embodiment, the white noise playback frequency is 48KHz.
[0029] Initialize the secondary path estimation filter coefficients c i Let i = 1, ..., I, where I is the order of the secondary path estimation filter; calculate the output of the secondary path estimation filter. Calculate the error e(n) = y(n) - r(n); update the secondary path estimation filter coefficients c based on the Least Mean Square (LMS) algorithm. i (n+1)=c i (n)+μe(n)s(ni), algorithm step size P s It is the power of the white noise signal s(n).
[0030] The coefficients of the secondary path estimation filter at the moment the white noise signal ends playing from the headphone speaker are saved. An M-point Fourier transform (M = 8192 in this embodiment) is performed on the coefficients of the final secondary path estimation filter to obtain the secondary path transfer function P(f), with the following frequency sequence: f s For the microphone sampling rate, in this embodiment, f s =48KHz.
[0031] Step (2) Set the open-loop transfer function L(f) = C(f)P(f) of the headphone noise cancellation system, and the closed-loop sensitivity function. Where C(f) is the transfer function of the control filter, which is determined by the sequence of control filter parameters x, and the sequence of control filter parameters x = [G h1 Q1 g1 … h K Q K g K ], which is a filter bank composed of K second-order dual filters, where K = 4 to 6. In this embodiment, the number of filters in the filter bank is set to K = 4, and the types of each second-order dual filter are, in order, low-profile filter, high-profile filter, high-profile filter, and high-profile filter. G is the linear gain controlling the filter bank, (h k Q k g k ) are the relevant parameters of the k-th bisecond-order filter, k = 1, 2, 3, 4.
[0032] Step (3) Determine the penalty term required to optimize the control filter parameter sequence x. penalty function 'a' represents a variable. ∞This indicates the calculation of the infinite norm. W1, W2, and W3 are window functions corresponding to the low, medium, and high frequencies in the amplitude constraint, respectively. W4 and W5 are window functions corresponding to the low and high frequencies in the phase constraint, respectively. γ1, γ2, and γ3 are amplitude constraint parameters, and their ranges are set as follows: and In this embodiment, it is set to and γ4 and γ5 are phase constraint parameters, and their range settings are as follows: and In this embodiment, it is set to and ∠ represents the phase operation.
[0033] Step (4) divides the parameter sequence x of the control filter consisting of K second-order double filters into the first J width control filter groups x. w and the subsequent KJ depth control filter banks x d The two parts correspond to the subsequent two-step optimization scheme, x = [x w x d ]; where the width-controlled filter bank x w =[G h1 Q1 g1…h J Q J g J ], depth control filter bank x w =[h J+1 Q J+1 g J+1 … h K Q K g K ], J = 3.
[0034] Step (5) Construct the width optimization target Where ||·||2 represents the calculation of the 2-norm, λ1 is the width optimization weighting factor, 0.01≤λ1≤0.1, W w Optimize the corresponding window function for the set width; solve the width-controlled filter bank x using a genetic algorithm. w When the number of iterations of the genetic algorithm reaches the preset maximum number of iterations, the parameter sequence of the width control filter is obtained. In this embodiment, the width optimization weighting factor λ1 = 0.01, the maximum number of iterations of the genetic algorithm is 30, the genetic algorithm population size is 128000, and the crossover probability is 0.5.
[0035] Step (6) Construct the deep optimization objective J d (x)=λ2min{S(f)W d}+Penalty(x); where min{·} is the minimum value operation, λ2 is the depth optimization weighting factor, 0.01≤λ2≤0.1, in this embodiment, the depth optimization weighting factor λ2=0.01, W d The window function is optimized for the given depth; all filters are optimized using the Nelder-Mead method. The initial values for the first J filters of x are the initial sequence of the filter parameter sequence. The search range of the first J filters is fixed. Δ represents the search range, Δ = [0.1 100 0.1 2 100 0.1 2 100 0.1 2]. When the number of iterations of the simplex method reaches the preset maximum number of iterations, the final control filter parameter sequence is obtained.
[0036] Step (7) uses the final control filter parameter sequence As a control filter for active noise cancellation in headphones.
[0037] It should be understood that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and are not intended to limit the invention. The scope of protection of this application is not limited thereto.
Claims
1. A method for designing a feedback filter for active noise-canceling headphones, characterized in that, Specifically as follows: Step (1) Determine the transfer function P(f) of the secondary path; Step (2) Set the open-loop transfer function L(f) = C(f)P(f) of the headphone noise cancellation system, and the closed-loop sensitivity function. Where C(f) is the transfer function of the control filter, which is determined by the sequence of control filter parameters x, and the sequence of control filter parameters x = [G h1 Q1 g1 … h K Q K g K ], is a filter bank consisting of K second-order filters, where K = 4 to 6, and G is the linear gain controlling the filter bank, (h k Q k g k ) represents the relevant parameters of the k-th bisecond-order filter, where k = 1, ..., K; Step (3) Determine the penalty term Penalty(x) required to optimize the control filter parameter sequence x; Step (4) divides the parameter sequence x of the control filter consisting of K second-order double filters into the first J width control filter groups x. w and the subsequent KJ depth control filter banks x d Two parts, namely x = [x w x d ]; where the width-controlled filter bank x w =[G h1 Q1 g1 … h J Q J g J ], depth control filter bank x w =[h J+1 Q J+1 g J+1 … h K Q K g K ], J = 3 ~ (K-1); Step (5) Construct the width optimization objective J w (x w The genetic algorithm is used to solve the width-controlled filter bank x. w The parameter sequence of the width control filter is obtained. Step (6) Construct the deep optimization objective J d (x), all filters are optimized using the simplex method, to achieve the desired result. Let x be the initial values of the first J filters, i.e. And fix the search range of the first J filters as The final control filter parameter sequence is obtained. Δ represents the search range; Step (7) uses the final control filter parameter sequence As a control filter for active noise cancellation in headphones.
2. The feedback filter design method for active noise-canceling headphones as described in claim 1, characterized in that, The specific method for step (1) is as follows: The headphone speaker plays a white noise signal s(n), and the headphone's error microphone collects this signal to obtain the white noise y(n) collected at time n; Initialize the secondary path estimation filter coefficients c i , i = 1, ..., I, where I is the order of the secondary path estimation filter; Calculate the output of the secondary path estimation filter Calculate the error e(n) = y(n) - r(n); update the secondary path estimation filter coefficients c based on the least mean square algorithm. i (n+1)=c i (n)+μe(n)s(ni), algorithm step size P s It is the power of the white noise signal s(n); Save the coefficients of the secondary path estimation filter at the moment the white noise signal ends playing from the headphone speaker. Perform an M-point Fourier transform on the coefficients of the final secondary path estimation filter to obtain the secondary path transfer function P(f), with the frequency sequence as follows. f s This is the microphone sampling rate.
3. The feedback filter design method for active noise-canceling headphones as described in claim 2, characterized in that: In step (3), the penalty item Among them, the penalty function 'a' represents a variable; ||·|| ∞ This indicates the calculation of the infinite norm. W1, W2, and W3 are the window functions corresponding to the low, medium, and high frequencies in the amplitude constraint, respectively. W4 and W5 are the window functions corresponding to the low and high frequencies in the phase constraint, respectively. γ1, γ2, and γ3 are the amplitude constraint parameters, and their ranges are set as follows: and γ4 and γ5 are phase constraint parameters, and their range settings are as follows: and ∠ represents the phase operation.
4. The feedback filter design method for active noise-canceling headphones as described in claim 3, characterized in that, The specific method for step (5) is as follows: Where ||·||2 represents the calculation of the 2-norm, λ1 is the width optimization weighting factor, 0.01≤λ1≤0.1, W w Optimize the corresponding window function for the set width; solve the width-controlled filter bank x using a genetic algorithm. w When the number of iterations of the genetic algorithm reaches the preset maximum number of iterations, the parameter sequence of the width control filter is obtained.
5. The feedback filter design method for active noise-canceling headphones as described in claim 3, characterized in that, The specific method for step (6) is: J d (x)=λ2min{S(f)W d }+Penalty(x); where min{·} is the minimum value operation, λ2 is the depth optimization weighting factor, 0.01≤λ2≤0.1, W d Optimize the corresponding window function for the given depth; solve all filters using the simplex method to achieve the desired result. The initial values for the first J filters of x are the initial sequence of the filter parameter sequence. The search range of the first J filters is fixed. When the number of iterations of the simplex method reaches the preset maximum number of iterations, the final control filter parameter sequence is obtained.