Active noise reduction method, device and system of earphone and earphone
By updating the filter coefficients in the headphones and optimizing the frequency response, the problem of poor noise reduction effect of traditional active noise reduction headphones is solved, achieving more efficient noise reduction effect and better user experience.
Patent Information
- Application Number
- CN202411679416.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-11
AI Technical Summary
Traditional active noise reduction headphones have the problem of poor noise reduction effect, especially when the headphones are worn in a change, the traditional fixed filter coefficient and adaptive filter coefficient methods cannot effectively improve the noise reduction effect.
By introducing a filter unit into the headset, the filter coefficient is updated in response to the change of the headset's wear state, and the frequency response of the main and secondary paths is optimized based on the frequency response before and after the update to improve the noise reduction effect.
This method can effectively improve the noise reduction effect of the headphones and adapt to changes in the wearable state of the headphones. It does not require users to manually switch the active noise reduction mode, which improves the noise reduction experience and intelligence.
Smart Images

Figure CN119603596A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of noise reduction processing technology, and in particular to an active noise reduction method, device, system and earphone for earphones. Background Art
[0002] When reducing noise, active noise reduction headphones can use filters with fixed filter coefficients or adaptive filter coefficients to achieve feedforward noise reduction, feedback noise reduction, and mixed mode noise reduction. However, traditional active noise reduction methods have the problem of poor noise reduction effect. Summary of the invention
[0003] Based on this, it is necessary to provide an active noise reduction method, device, system and headphones for headphones that can improve the noise reduction effect of headphones in response to the above technical problems.
[0004] In a first aspect, in one embodiment, the present application provides an active noise reduction method for headphones, the headphones including a filter unit, and the method including:
[0005] In response to a change in the wearing state of the headset, if it is determined that the filter coefficient needs to be updated currently, updating the filter coefficient of the filter unit;
[0006] Based on the frequency responses of the filter unit before and after the filter coefficient is updated, the primary channel frequency response and the secondary channel frequency response of the earphone in the wearing state are obtained;
[0007] According to the frequency response of the primary path and the secondary path, the filter unit is optimized when the earphone is in the wearing state.
[0008] In one of the embodiments, the headset further includes a reference microphone and an error microphone;
[0009] Determine whether the filter coefficients need to be updated, including:
[0010] In response to the current ear canal frequency response not being disturbed, if the current noise reduction amount does not meet the preset threshold, it is determined that the filter coefficient needs to be updated; the ear canal frequency response is obtained based on the frequency response of the error microphone and the frequency response of the reference microphone when the earphone is in normal working state.
[0011] In one embodiment, based on the frequency response of the filter unit before and after the filter coefficient is updated, the primary channel frequency response and the secondary channel frequency response of the earphone in the wearing state are obtained, including:
[0012] Based on the ear canal transfer function, determining a first association relationship according to the frequency response of the filter unit before the filter coefficient is updated and the current ear canal frequency response;
[0013] Based on the ear canal transfer function, determining a second association relationship according to the frequency response of the filter unit after the filter coefficient is updated and the ear canal frequency response after the filter coefficient is updated;
[0014] According to the first correlation relationship and the second correlation relationship, the primary path frequency response and the secondary path frequency response are obtained.
[0015] In one embodiment, when the filter unit is a feedforward filter, the ear canal transfer function is as follows:
[0016]
[0017] in, For ear canal frequency response, The frequency response of the main channel. is the secondary path frequency response, is the frequency response of the feedforward filter;
[0018] When the filter unit includes a feedforward filter and a feedback filter, the ear canal transfer function is as follows:
[0019]
[0020] in, For ear canal frequency response, The frequency response of the main channel. is the secondary path frequency response, is the frequency response of the feedforward filter, is the frequency response of the feed-back filter.
[0021] In one embodiment, the filter unit includes a first filter arranged in a first path and a second filter arranged in a second path; updating the filter coefficients of the filter unit includes:
[0022] According to the working conditions of the first path and the second path, filter coefficients of the first filter and the second filter are updated in a fade-in and fade-out manner;
[0023] The fade-in and fade-out method includes gradually adjusting the filter gains of the first filter and the second filter with a preset step size.
[0024] In one embodiment, updating the filter coefficients of the first filter and the second filter in a fade-in and fade-out manner includes:
[0025] If the first path is not in working state and the second path is in working state, perform the following steps:
[0026] Using the corresponding filter coefficient of the filter unit after the filter coefficient is updated as the filter coefficient of the first filter, and opening the first path;
[0027] Based on the preset step size, the filter gain of the first filter is increased while the filter gain of the second filter is decreased until the filter gain of the first filter reaches the preset gain, and then the second path is closed.
[0028] In one embodiment, the filter unit of the earphone in the wearing state is optimized, including:
[0029] The frequency response of the optimized filter unit is obtained through an iterative algorithm until the minimum mean square error between the frequency response of the optimized filter unit and the frequency response of the main path and / or the frequency response of the secondary path is minimized.
[0030] In a second aspect, in one embodiment, the present application further provides an active noise reduction device for headphones, the headphones including a filter unit, and the device including:
[0031] A feedforward filter update module, for responding to a change in the wearing state of the headset, and updating the filter coefficient of the filter unit if it is determined that the filter coefficient needs to be updated at present;
[0032] The primary and secondary channel frequency response calculation module is used to obtain the primary channel frequency response and the secondary channel frequency response of the earphone in the wearing state based on the frequency response of the filter unit before and after the filter coefficient is updated;
[0033] The optimization and update module is used to optimize the filter unit of the earphone when it is in the wearing state according to the primary channel frequency response and the secondary channel frequency response.
[0034] In a third aspect, in one embodiment, the present application further provides an active noise reduction system for headphones, the system comprising: a filter unit, an error microphone, a reference microphone, and a control module for executing the method steps described in any one of the method embodiments in the first aspect;
[0035] Wherein, the control module is respectively connected to the filter unit, the error microphone and the reference microphone.
[0036] In a fourth aspect, in one embodiment, the present application further provides a headset, comprising the active noise reduction system of the headset as described in the embodiment of the third aspect above.
[0037] The active noise reduction method, device, system and headphones of the above-mentioned headphones can respond to changes in the wearing state of the headphones. If it is determined that the filter coefficient needs to be updated, the filter coefficient of the filter unit is updated; then, based on the frequency response of the filter unit before and after the filter coefficient update, the primary channel frequency response and the secondary channel frequency response of the headphones in the wearing state can be obtained, and according to the primary channel frequency response and the secondary channel frequency response, the filter unit of the headphones in the wearing state is optimized. This application can effectively improve the noise reduction effect of the headphones. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A diagram of an application environment of an active noise reduction method for headphones in one embodiment;
[0040] Figure 2 is a schematic flow chart of an active noise reduction method for headphones in one embodiment;
[0041] Figure 3 A schematic diagram of a flow chart for determining that filter coefficients currently need to be updated in one embodiment;
[0042] Figure 4 It is a schematic diagram of a process of obtaining a primary path frequency response and a secondary path frequency response in one embodiment;
[0043] Figure 5 A schematic diagram of a modeling process of a noise reduction process in one embodiment;
[0044] Figure 6 A schematic diagram of a modeling process of a noise reduction process in another embodiment;
[0045] Figure 7 A schematic diagram of a flow chart of updating filter coefficients in one embodiment;
[0046] Figure 8 A schematic diagram of a flow chart of updating filter coefficients in another embodiment;
[0047] Fig. 9 A schematic diagram of a modeling process for updating filter coefficients in one embodiment;
[0048] Fig.10 A schematic diagram of a process of iteratively optimizing a filter unit in one embodiment;
[0049] Fig.11 is a structural block diagram of an active noise reduction device for headphones in one embodiment;
[0050] Fig.12 FIG. 4 is a structural block diagram of an active noise reduction system of headphones in one embodiment. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application 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 application and are not used to limit the present application.
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0053] It is to be understood that terms such as “first”, “second”, etc. in the present application are only used to distinguish similar objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.
[0054] It will be understood that “at least one” means one or more, and “plurality” means two or more.
[0055] When used herein, the singular forms "a", "an", and "said / the" may also include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" and the like specify the presence of stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. At the same time, the term "and / or" used in this specification includes any and all combinations of the relevant listed items.
[0056] When using active noise reduction headphones to reduce noise, the active noise reduction headphones can achieve feedforward noise reduction, feedback noise reduction and mixed mode noise reduction by using filters with fixed filter coefficients or adaptive filter coefficients.
[0057] However, on the one hand, due to the different ear shapes and wearing conditions of each person, the above-mentioned traditional fixed filter coefficient active noise reduction method may not achieve the best noise reduction experience. On the other hand, the traditional ear canal adaptive noise reduction solution (i.e., the filter using adaptive filter coefficients) also has the following disadvantages:
[0058] ① Every time the ear canal (wearing) changes, you need to manually switch the active noise reduction mode and restart the active noise reduction function.
[0059] ② The traditional real-time ear canal adaptive noise reduction solution uses algorithms such as LMS (Least Mean Squares) or NLMS (Normalized Least Mean Squares) to track changes in the ear canal in real time, so the stability of the algorithm has a greater impact on the sense of hearing. Among them, the LMS algorithm may encounter the problem of gradient noise amplification when processing large input signals, and its convergence speed is slow when the input signal is small; the NLMS algorithm depends on the amplitude of the input signal. If the amplitude of the input signal changes greatly, it may affect the stability and convergence speed of the algorithm.
[0060] ③ When adjusting and switching the active noise reduction mode, the traditional real-time ear canal adaptive noise reduction solution needs to go through a fluctuation process in which the noise reduction effect changes from weak to strong, which affects the noise reduction experience of the headphones and results in poor noise reduction effect.
[0061] The flow detection method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown in the figure, the earphone includes a filter unit 102 .
[0062] Optionally, the filter unit 102 may include a feedforward filter and / or a feedback filter; the earphone may further include a reference microphone and an error microphone. The reference microphone may be used to measure the noise in the environment surrounding the earphone, and the error microphone may be used to detect the noise between the earphone and the human ear after the earphone is worn.
[0063] In an exemplary embodiment, Figure 2 As shown, the present application provides an active noise reduction method for headphones, and the method is applied to Figure 1 Taking the earphone in FIG. 1 as an example, the method includes the following steps 202 to 206. Among them:
[0064] Step 202: In response to a change in the wearing state of the headset, if it is determined that the filter coefficient needs to be updated, the filter coefficient of the filter unit is updated.
[0065] It is understandable that when the user wearing the earphones turns his head, talks, walks, etc., the wearing state of the earphones, such as the wearing position of the earphones and the structure of the ear canal, may change. Exemplarily, when the wearing state of the user's earphones does not change much (for example, turning the head, talking, etc.), the noise reduction amount of the earphones may be less affected, and the filter unit may not need to be adjusted at this time; when the wearing state of the user's earphones changes greatly (for example, walking, running, manually adjusting the wearing position of the earphones, etc.), the noise reduction amount of the earphones may be greatly affected, and the filter unit may be updated at this time.
[0066] Specifically, when the wearing state of the headset changes, if it is determined that the filter coefficient needs to be updated, the filter coefficient of the filter unit of the headset can be updated to meet the noise reduction requirements after the wearing state of the headset changes significantly.
[0067] Step 204: Based on the frequency responses of the filter unit before and after the filter coefficients are updated, the primary channel frequency response and the secondary channel frequency response of the earphone in the wearing state are obtained.
[0068] The filter unit can be used to filter and reduce the noise of the ambient sound. The primary path frequency response can be the acoustic transfer equation from the noise source to the human ear (when wearing headphones), and the secondary path frequency response can be the acoustic transfer equation from the headphone speaker to the human ear.
[0069] Optionally, the primary path frequency response and the secondary path frequency response of the earphone may be obtained according to the input data and the output data of the error microphone and the reference microphone.
[0070] A measurement audio signal can be played through the speaker of the headset, and the error microphone of the headset is used to receive and record the measurement audio signal; based on the input and output signal data of the above measurement audio signal, the secondary path frequency response of the headset can be obtained by deconvolution.
[0071] Optionally, a measurement audio signal can be played through a speaker at a fixed position in the external environment, and the reference microphone and error microphone of the headset are used to receive and record the measurement audio signal at the same time; based on the input and output signal data of the above measurement audio signal, the transfer equation from the speaker at a fixed position to the error microphone and the transfer equation from the speaker at a fixed position to the reference microphone can be obtained; based on the transfer equation from the speaker at a fixed position to the error microphone and the transfer equation from the speaker at a fixed position to the reference microphone, the primary path frequency response of the headset can be calculated. It can be understood that changes in the wearing state of the headset can cause changes in the primary path frequency response and the secondary path frequency response of the headset.
[0072] It should be understood that after the filter coefficient of the filter unit is updated, the filtering effect of the filter unit on the input signal will also change, thereby affecting the ear canal frequency response of the earphone, that is, affecting the noise reduction effect of the earphone. Optionally, the filter unit of the earphone may include a single feedforward filter, or include a feedforward filter and a feedback filter.
[0073] Specifically, based on the frequency responses of the filter unit before and after the filter coefficients are updated, the primary channel frequency response and the secondary channel frequency response when the earphone is in a wearing state can be obtained.
[0074] Step 206: Optimize the filter unit of the earphone when it is in the wearing state according to the primary path frequency response and the secondary path frequency response.
[0075] It can be understood that the noise reduction effect of the headphone before and after the filter coefficient is updated can be known based on the primary path frequency response and the secondary path frequency response. Exemplarily, based on the noise reduction effect of the headphone under different filter coefficients, the filter coefficient of the filter unit can be adjusted until the noise reduction effect reaches the expected value.
[0076] Specifically, the filter unit when the earphone is in the wearing state can be optimized according to the primary path frequency response and the secondary path frequency response.
[0077] The active noise reduction method of the above-mentioned headphones can respond to changes in the wearing state of the headphones. If it is determined that the filter coefficient needs to be updated, the filter coefficient of the filter unit is updated; then, based on the frequency response of the filter unit before and after the filter coefficient is updated, the primary channel frequency response and the secondary channel frequency response of the headphones in the wearing state can be obtained, and according to the primary channel frequency response and the secondary channel frequency response, the filter unit of the headphones in the wearing state can be optimized. In the above manner, the present application can adaptively adjust the filter coefficient of the filter unit according to the change of the wearing state of the headphones, and the user no longer needs to manually switch the active noise reduction mode and restart the active noise reduction function. The present application effectively improves the intelligence level and noise reduction effect of the active noise reduction function.
[0078] In one embodiment, the headset further includes a reference microphone and an error microphone. Figure 3 As shown, step 202, determining that the filter coefficients need to be updated currently, also includes the following step S302. Among them:
[0079] Step S302: In response to the current ear canal frequency response not being disturbed, if the current noise reduction amount does not meet a preset threshold, it is determined that the filter coefficient needs to be updated.
[0080] The ear canal frequency response is obtained based on the frequency response of the error microphone and the frequency response of the reference microphone when the earphone is in a normal working state. For example, the ear canal frequency response can be obtained based on the frequency response of the error microphone and the frequency response of the reference microphone according to the following formula 1:
[0081] (Formula 1)
[0082] in, For ear canal frequency response, is the frequency response of the error microphone, is the frequency response of the reference microphone, z is W(z) is the corresponding frequency response point (complex frequency variable). Optionally, the noise reduction amount may include the specific calculation result of the above ear canal frequency response at a specified frequency point in the frequency domain.
[0083] It should be understood that the interference of the ear canal frequency response may refer to the interference of some environmental factors that affect the ear canal frequency response of the earphone in a short period of time, such as wind noise blowing on the earphone. Since the noise in the cavity will be amplified, the wind will cause the E(z) / R(z) value to increase, but the user does not touch or adjust the earphone at this time, and this interference is only short-term and unstable for the ear canal frequency response. For example, the above-mentioned short-term unstable interference may also include: changes in air pressure when the earphone user opens and closes the door, body shaking when the earphone user rides in a vehicle, and user speech. It can be understood that if the filter unit is frequently updated for such short-term unstable interference, the performance of the earphone will be wasted and the noise reduction experience of the earphone user will be affected. Optionally, the ear canal frequency response or time domain data can be used to determine whether the sampling is interfered with by the external environment, and the above-mentioned interference to the ear canal frequency response can be eliminated by wind noise detection algorithms, etc.
[0084] Specifically, when the current ear canal frequency response is not disturbed or the disturbance is eliminated, in response to the current noise reduction amount not satisfying the preset threshold, it can be determined that the filter coefficient of the filter unit needs to be updated.
[0085] In one embodiment, if Figure 4 As shown, in step S204, based on the frequency response of the filter unit before and after the filter coefficient is updated, the primary channel frequency response and the secondary channel frequency response of the earphone in the wearing state are obtained, including the following steps S402 to S406. Among them:
[0086] Step S402: Based on the ear canal transfer function, a first correlation relationship is determined according to the frequency response of the filter unit before the filter coefficient is updated and the current ear canal frequency response.
[0087] Among them, the ear canal transfer function can characterize the corresponding noise reduction effect achieved based on the filter unit. Exemplarily, when the filter unit is a single feedforward filter, the ear canal transfer function can be obtained based on the primary path frequency response, the secondary path frequency response and the feedforward filter frequency response; when the filter unit includes a feedforward filter and a feedback filter, the ear canal transfer function can be obtained based on the primary path frequency response, the secondary path frequency response, the feedforward filter frequency response and the feedback filter frequency response.
[0088] Optionally, the first association relationship may represent the association relationship between the ear canal frequency response before the filter coefficient is updated, the primary path frequency response and the secondary path frequency response after the wearing state of the earphone is changed, and the frequency response of the filter unit before the filter coefficient is updated. It can be understood that the ear canal frequency response before the filter coefficient is updated can be calculated based on the frequency response of the error microphone and the frequency response of the reference microphone, and the filter unit is stored in a preset filter library and is also known; in the first association relationship, only the primary path frequency response and the secondary path frequency response after the wearing state of the earphone is changed are temporarily unknown.
[0089] Specifically, based on the ear canal transfer function, according to the frequency response of the filter unit before the filter coefficient is updated and the current ear canal frequency response, the first correlation relationship before the filter coefficient is updated can be determined.
[0090] Step S404: Based on the ear canal transfer function, a second association relationship is determined according to the frequency response of the filter unit after the filter coefficients are updated and the ear canal frequency response after the filter coefficients are updated.
[0091] Exemplarily, the second association relationship may represent the association relationship between the ear canal frequency response after the filter coefficient is updated, the primary path frequency response and the secondary path frequency response after the wearing state of the earphone is changed, and the frequency response of the filter unit after the filter coefficient is updated. It can be understood that the ear canal frequency response after the filter coefficient is updated can be calculated based on the frequency response of the error microphone and the frequency response of the reference microphone, and the filter unit is stored in the preset filter library and is also known; in the second association relationship, only the primary path frequency response and the secondary path frequency response after the wearing state of the earphone is changed are temporarily unknown.
[0092] Specifically, based on the ear canal transfer function, the second association relationship may be determined according to the frequency response of the filter unit after the filter coefficients are updated and the ear canal frequency response after the filter coefficients are updated.
[0093] Step S406: Obtain the primary path frequency response and the secondary path frequency response according to the first correlation relationship and the second correlation relationship.
[0094] Among them, on the one hand, before and after the filter unit is updated, since the wearing method of the earphone has not changed, the primary path frequency response in the first association relationship and the secondary path frequency response is the same; on the other hand, in the first association relationship and the second association relationship, the frequency response of the filter unit before and after the filter coefficient is updated, the current ear canal frequency response and the ear canal frequency response after the filter coefficient is updated are all known.
[0095] Specifically, according to the first association relationship and the second association relationship, the primary channel frequency response and the secondary channel frequency response when the earphone is currently in the wearing state can be calculated.
[0096] In one embodiment, when the filter unit is a feedforward filter, the ear canal transfer function is as follows:
[0097] (Formula 2)
[0098] in, For ear canal frequency response, The frequency response of the main channel. is the secondary path frequency response, is the frequency response of the feedforward filter. It can be understood that the noise reduction processing model based on the ear canal transfer function can refer to the following: Figure 5 Schematic diagram of the modeling process shown.
[0099] When the filter unit includes a feedforward filter and a feedback filter, the ear canal transfer function is as follows:
[0100] (Formula 3)
[0101] in, For ear canal frequency response, The frequency response of the main channel. is the secondary path frequency response, is the frequency response of the feedforward filter, is the frequency response of the feed-back filter. It can be understood that the noise reduction processing model based on the ear canal transfer function can refer to the following: Figure 6 Schematic diagram of the modeling process shown.
[0102] In order to further illustrate the present application, a specific example is given below. Taking the filter unit as a feedforward filter and a feedback filter as an example, the noise reduction processing model constructed based on the ear canal transfer function can be referred to Figure 6 The specific implementation process is as follows:
[0103] When the headphones are working normally, the data of the two microphones (reference microphone and error microphone) can be obtained in real time to obtain the reference microphone frequency response R(z) and the error microphone frequency response E(z). The ear canal frequency response in the current state of the headphones can be obtained from E(z) / R(z).
[0104] The frequency responses of the primary and secondary channels after the wearing state of the headphones changes are: , , at this time, the first correlation relationship constructed based on the ear canal transfer function can be expressed as follows:
[0105] (Formula 4)
[0106] in, is the current ear canal frequency response, This is the frequency response of the main channel after the wearing state of the headphones changes. This is the secondary path frequency response after the wearing state of the earphone changes. is the frequency response of the currently set feedforward filter, is the frequency response of the currently set feed-back filter. It can be understood that at this time , , is a known quantity, among which It can be calculated from the reference microphone frequency response R(z) and the error microphone frequency response E(z). Since the selection of the feedforward filter and the feedback filter are based on the preset filter library, it can also be directly known and .
[0107] Filter or eliminate the interference of unstable ear canal frequency response, such as eliminating the interference caused by environmental factors such as jitter, wind noise, and talking.
[0108] In the absence of interference from the ear canal frequency response, if the ear canal frequency response is different from the ear canal frequency response data stored in the previous round, and the noise reduction amount does not meet the preset threshold, it indicates that the current noise reduction effect is poor, and the filter coefficient of the filter unit needs to be updated to obtain a better noise reduction effect.
[0109] At this time, the filter coefficients of the switching feedforward filter are selected to obtain The second correlation relationship constructed based on the ear canal transfer function is as follows:
[0110] (Formula 5)
[0111] in, is the ear canal frequency response after the filter coefficients of the feedforward filter are updated, This is the frequency response of the main channel after the wearing state of the headphones changes. This is the secondary path frequency response after the wearing state of the earphone changes. is the frequency response of the feedforward filter after the filter coefficients are updated, is the frequency response of the currently set feedback filter. It can be understood that , , is a known quantity, among which It can still be calculated from the reference microphone frequency response R(z) and the error microphone frequency response E(z). Since the selection of the feedforward filter and the feedback filter after the filter update is also based on the preset filter library, it can also be directly known and .
[0112] Based on the above formula 4 (first correlation) and formula 5 (second correlation), the primary path frequency response and the secondary path frequency response after the wearing state of the earphone changes can be calculated. According to the obtained primary path frequency response and secondary path frequency response, the filter unit of the earphone in the wearing state can be further optimized.
[0113] It is understandable that, although in the above specific examples, only the filter coefficients of the feedforward filter are updated to obtain the primary path frequency response and the secondary path frequency response after the wearing state of the headset changes, based on the same calculation principle, the feedback filter or the feedforward filter and the feedback filter can also be updated at the same time, and the primary path frequency response and the secondary path frequency response after the wearing state of the headset changes can also be calculated. Since the principle is the same as the above specific examples, the relevant method steps of updating only the feedback filter or updating the feedforward filter and the feedback filter at the same time will not be repeated here.
[0114] In one embodiment, if Figure 7 As shown, the filter unit includes a first filter arranged in the first path and a second filter arranged in the second path. In step S202, the filter coefficients of the filter unit are updated, including the following steps S702. Among them:
[0115] Step S702, according to the working conditions of the first path and the second path, the filter coefficients of the first filter and the second filter are updated by fading in and out; wherein the fading in and out method includes gradually adjusting the filter gains of the first filter and the second filter with a preset step size.
[0116] Exemplarily, during normal operation of the filter unit, only one of the first path or the second path can perform filter processing on the signal; while during the update phase of the filter unit, both paths are enabled at the same time, and the filter coefficients of the first filter and the second filter are adjusted by fading in and out to achieve imperceptible update of the filter.
[0117] Specifically, when the filter coefficients of the filter unit need to be updated, the filter coefficients of the first filter and the second filter may be updated in a fade-in and fade-out manner according to the working conditions of the first path and the second path.
[0118] In one embodiment, if Figure 8 As shown, in step S702, the filter coefficients of the first filter and the second filter are updated in a fade-in and fade-out manner, including the following steps:
[0119] If the first path is not in working state and the second path is in working state, the following steps S802 to S804 are executed. Among them:
[0120] Step S802: Use the corresponding filter coefficient of the filter unit after the filter coefficient is updated as the filter coefficient of the first filter, and open the first path.
[0121] Among them, a new filter coefficient for updating the filter unit (i.e., the corresponding filter coefficient of the filter unit after the filter coefficient is updated) can be selected from a preset filter library. It can be understood that when the filter coefficient of the filter unit needs to be updated, since the first path is not in a working state, directly updating the filter coefficient of the first filter of the first path will not affect the original filtering noise reduction effect.
[0122] Specifically, when the filter unit needs to be updated and the first path is not in operation but the second path is in operation, the corresponding filter coefficients of the filter unit after the filter coefficients are updated are used as the filter coefficients of the first filter, and then the first path is turned on.
[0123] Step S804: Based on a preset step size, while increasing the filter gain of the first filter, the filter gain of the second filter is reduced until the filter gain of the first filter reaches a preset gain, and then the second path is closed.
[0124] It can be understood that, since the second path works normally before the filter coefficient is updated, the filter gain of the second filter maintains the preset gain; while the first path is closed at this time, the filter gain of the first filter is in a lower state. Optionally, when the first path and / or the second path are in the closed state, the filter gain of the first filter and / or the second filter can be 0.
[0125] Specifically, please refer to Fig. 9 As shown in the processing flow diagram, when the filter coefficient of the filter unit needs to be updated, the first channel and the second channel are both turned on, and the second filter of the second channel, which is in normal working state before the filter coefficient is updated, gradually reduces its filter gain (i.e., the second Gain in the figure) based on the preset step size; at the same time, in the first channel, the first filter using the new filter coefficient gradually increases its filter gain (i.e., the first Gain in the figure) with the same preset step size until the filter gain of the first filter reaches the preset gain. After the first filter is adjusted, the first channel is converted to a normal working state, and the second channel is closed accordingly to reduce the energy consumption of the earphone.
[0126] It should be noted that the first path and the second path are relative concepts. In practical applications, the first path may be in a normal working state, while the second path is in a closed state. When the filter unit is updated, the filter coefficients are updated by the steps of the same principle as the above method embodiment.
[0127] In traditional noise reduction technology, when switching filter coefficients, the noise reduction effect will first become weaker and then stronger, affecting the noise reduction experience of headphone users. However, through the above method, the noise reduction effect of the present application will gradually converge to the noise reduction effect after updating the filter coefficients, thereby avoiding the process of noise reduction effect fluctuations and effectively solving the problem of noise reduction effect first becoming weaker and then stronger during switching filter coefficients in traditional technology. In addition, fading in the new filter while fading out the old filter can effectively reduce the convergence time of the filter unit update, thereby improving the user's noise reduction experience.
[0128] In one embodiment, if Fig.10 As shown, in step S206, the filter unit of the earphone in the wearing state is optimized, including the following steps S102. Among them:
[0129] Step S102, obtaining the frequency response of the optimized filter unit through an iterative algorithm until the minimum mean square error between the frequency response of the optimized filter unit and the frequency response of the primary path and / or the frequency response of the secondary path is the smallest.
[0130] Optionally, the iterative algorithm may include a genetic ant colony algorithm.
[0131] In a possible implementation, if the filter unit is a single feedforward filter, a genetic ant colony algorithm is used in combination with the following formula 6 to minimize the minimum mean square error (MSE) between the primary path frequency response and the secondary path frequency response, so as to iteratively obtain a new feedforward filter with better performance.
[0132] (Formula 6)
[0133] in, is the minimum mean square error, is the frequency response of the new feedforward filter, is the secondary path frequency response, Frequency response for the main channel.
[0134] In a possible implementation, if the filter unit includes a feedforward filter and a feedback filter, a genetic ant colony algorithm is used in combination with the above formula 6 and the following formula 7 to minimize the minimum mean square error between the new feedforward filter and the primary path frequency response and the secondary path frequency response, and / or minimize the minimum mean square error between the new feedback filter and the secondary path frequency response, thereby iteratively obtaining a new feedforward filter and / or feedback filter with better performance:
[0135] (Formula 7)
[0136] in, is the minimum mean square error, is the frequency response of the new feed-back filter, This is the frequency response of the secondary path.
[0137] Optionally, if the filter unit includes a feedforward filter and a feedback filter, it may be selected to optimize and update only the feedforward filter, or optimize and update only the feedback filter, or optimize and update both the feedforward filter and the feedback filter.
[0138] Specifically, after obtaining the primary channel frequency response and the secondary channel frequency response in the current wearing state, a filter coefficient of a filter unit with better performance can be obtained through a preset iterative algorithm. By updating the filter coefficient of the current filter unit to the filter coefficient with better performance, the minimum mean square error between the frequency response of the optimized filter unit and the primary channel frequency response and / or the secondary channel frequency response can be minimized, thereby achieving a better active noise reduction effect.
[0139] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0140] Based on the same inventive concept, the embodiment of the present application also provides an active noise reduction device for headphones for implementing the active noise reduction method for headphones involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the active noise reduction device for one or more headphones provided below can refer to the limitations of the active noise reduction method for headphones above, and will not be repeated here.
[0141] In one embodiment, Fig.11 As shown, the present application also provides an active noise reduction device 110 for headphones, the headphones include a filter unit, and the device 110 includes:
[0142] The feedforward filter updating module 112 is used to update the filter coefficients of the filter unit in response to a change in the wearing state of the headset, if it is determined that the filter coefficients need to be updated currently.
[0143] The primary and secondary channel frequency response calculation module 114 is used to obtain the primary channel frequency response and the secondary channel frequency response when the earphone is in the wearing state based on the frequency response of the filter unit before and after the filter coefficient is updated.
[0144] The optimization and updating module 116 is used to optimize the filter unit of the earphone when it is in the wearing state according to the primary path frequency response and the secondary path frequency response.
[0145] In one of the embodiments, the earphone further includes a reference microphone and an error microphone; the feedforward filter update module 112 is further used to: in response to the current ear canal frequency response not being disturbed, if the current noise reduction amount does not meet a preset threshold, determine that the filter coefficient needs to be updated; the ear canal frequency response is obtained based on the frequency response of the error microphone and the frequency response of the reference microphone when the earphone is in normal working state.
[0146] In one embodiment, the primary and secondary channel frequency response calculation module 114 is further used to:
[0147] Based on the ear canal transfer function, a first correlation relationship is determined according to the frequency response of the filter unit before the filter coefficient is updated and the current ear canal frequency response; based on the ear canal transfer function, a second correlation relationship is determined according to the frequency response of the filter unit after the filter coefficient is updated and the ear canal frequency response after the filter coefficient is updated; based on the first correlation relationship and the second correlation relationship, the primary path frequency response and the secondary path frequency response are obtained.
[0148] In one embodiment, when the filter unit is a feedforward filter, the ear canal transfer function is as follows:
[0149]
[0150] in, For ear canal frequency response, The frequency response of the main channel. is the secondary path frequency response, is the frequency response of the feedforward filter;
[0151] When the filter unit includes a feedforward filter and a feedback filter, the ear canal transfer function is as follows:
[0152]
[0153] in, For ear canal frequency response, The frequency response of the main channel. is the secondary path frequency response, is the frequency response of the feedforward filter, is the frequency response of the feed-back filter.
[0154] In one embodiment, the filter unit includes a first filter arranged in the first path and a second filter arranged in the second path; the feedforward filter updating module 112 is further used for:
[0155] According to the working conditions of the first path and the second path, filter coefficients of the first filter and the second filter are updated in a fade-in and fade-out manner;
[0156] The fade-in and fade-out method includes gradually adjusting the filter gains of the first filter and the second filter with a preset step size.
[0157] In one embodiment, the feedforward filter update module 112 is further configured to:
[0158] If the first path is not in working state and the second path is in working state, perform the following steps:
[0159] Using the corresponding filter coefficient of the filter unit after the filter coefficient is updated as the filter coefficient of the first filter, and opening the first path;
[0160] Based on the preset step size, the filter gain of the first filter is increased while the filter gain of the second filter is decreased until the filter gain of the first filter reaches the preset gain, and then the second path is closed.
[0161] In one embodiment, the optimization update module 116 is further configured to:
[0162] The frequency response of the optimized filter unit is obtained through an iterative algorithm until the minimum mean square error between the frequency response of the optimized filter unit and the frequency response of the secondary path is minimized.
[0163] Each module in the active noise reduction device of the above-mentioned headset can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0164] In one embodiment, Fig.12 As shown, the present application also provides an active noise reduction system 120 for headphones, the system 120 includes: a filter unit 124, an error microphone 122, a reference microphone 126 and a control module 128 for executing any one of the method steps in the above method embodiments.
[0165] The control module 128 is respectively connected to the filter unit 124 , the error microphone 122 and the reference microphone 126 .
[0166] In one embodiment, the present application further provides a headset, comprising the active noise reduction system of the headset as described in the above system embodiment.
[0167] In one embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0168] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0169] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0170] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0171] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0172] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An active noise reduction method for headphones, characterized in that: The earphone comprises a filter unit, and the method comprises: In response to a change in the wearing state of the headset, if it is determined that the filter coefficient needs to be updated currently, updating the filter coefficient of the filter unit; Based on the frequency responses of the filter unit before and after the filter coefficients are updated, obtaining the primary channel frequency response and the secondary channel frequency response when the earphone is in a wearing state; The filter unit of the earphone in a wearing state is optimized according to the primary path frequency response and the secondary path frequency response.
2. The method according to claim 1, characterized in that The headset also includes a reference microphone and an error microphone; The determining that the filter coefficients need to be updated currently includes: In response to the current ear canal frequency response not being disturbed, if the current noise reduction amount does not meet a preset threshold, determining that the filter coefficient needs to be updated; The ear canal frequency response is obtained according to the frequency response of the error microphone and the frequency response of the reference microphone when the earphone is in a normal working state.
3. The method according to claim 2, characterized in that The method of obtaining the primary channel frequency response and the secondary channel frequency response of the earphone in the wearing state based on the frequency response of the filter unit before and after the filter coefficient is updated includes: Based on the ear canal transfer function, determining a first association relationship according to the frequency response of the filter unit before the filter coefficient is updated and the current ear canal frequency response; Based on the ear canal transfer function, determining a second association relationship according to the frequency response of the filter unit after the filter coefficient is updated and the ear canal frequency response after the filter coefficient is updated; The primary path frequency response and the secondary path frequency response are obtained according to the first association relationship and the second association relationship.
4. The method according to claim 3, characterized in that: When the filter unit is a feedforward filter, the ear canal transfer function is as follows: in, is the ear canal frequency response, is the main path frequency response, is the secondary path frequency response, is the frequency response of the feedforward filter; When the filter unit includes the feedforward filter and the feedback filter, the ear canal transfer function is as follows: in, is the ear canal frequency response, is the main path frequency response, is the secondary path frequency response, is the frequency response of the feedforward filter, is the frequency response of the feedback filter.
5. The method according to claim 1, characterized in that The filter unit includes a first filter arranged in a first path and a second filter arranged in a second path; and updating the filter coefficients of the filter unit includes: According to the working conditions of the first path and the second path, filter coefficients of the first filter and the second filter are updated in a fade-in and fade-out manner; The fade-in and fade-out method includes gradually adjusting the filter gains of the first filter and the second filter with a preset step size.
6. The method according to claim 5, characterized in that The updating of the filter coefficients of the first filter and the second filter by fading in and out includes: If the first path is not in working state and the second path is in working state, perform the following steps: Using the corresponding filter coefficient of the filter unit after the filter coefficient is updated as the filter coefficient of the first filter, and opening the first path; Based on the preset step size, the filter gain of the first filter is increased while the filter gain of the second filter is decreased until the filter gain of the first filter reaches a preset gain, and then the second path is closed.
7. The method according to any one of claims 1 to 6, characterized in that: The optimizing process of the filter unit when the earphone is in a wearing state comprises: The optimized frequency response of the filter unit is obtained through an iterative algorithm until the minimum mean square error between the optimized frequency response of the filter unit and the primary path frequency response and / or the secondary path frequency response is the smallest.
8. An active noise reduction device for headphones, characterized in that: The earphone comprises a filter unit, and the device comprises: A feedforward filter updating module, configured to update the filter coefficients of the filter unit in response to a change in the wearing state of the headset, if it is determined that the filter coefficients need to be updated currently; A primary and secondary channel frequency response calculation module, used to obtain the primary channel frequency response and the secondary channel frequency response of the earphone in a wearing state based on the frequency response of the filter unit before and after the filter coefficient is updated; The optimization and updating module is used to optimize the filter unit when the earphone is in a wearing state according to the primary path frequency response and the secondary path frequency response.
9. An active noise reduction system for headphones, characterized in that: The system comprises: a filter unit, an error microphone, a reference microphone, and a control module for executing the active noise reduction method of the earphone according to any one of claims 1 to 7; Wherein, the control module is respectively connected to the filter unit, the error microphone, and the reference microphone.
10. A headset, characterized in that: An active noise reduction system comprising the earphones as claimed in claim 9.