Active noise reduction debugging method, system, electronic device and storage medium
By using preset filters, fitting functions, and constrained nonlinear programming to fit test curves and generate debugging parameters, the complex debugging process of active noise reduction products is solved, and active noise reduction function debugging and filter configuration can be achieved by non-professionals.
Patent Information
- Application Number
- CN202210686996.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-16
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-06-16
AI Technical Summary
In the existing technology, the debugging process of active noise reduction products is complicated. It is difficult for non-professionals to complete the optimal configuration of filter parameters, resulting in the inability to effectively debug the active noise reduction function.
By using preset filters, fitting functions and constrained nonlinear planning, the test curve is fitted to generate debugging parameters, simplifying the fitting process so that non-professionals can also complete the debugging of the active noise reduction function.
The fitting process is simplified, the fitting efficiency and accuracy are improved, and non-professionals can also debug the active noise reduction function, thereby improving the filtering effect.
Smart Images

Figure CN115017717B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to an active noise reduction debugging method, an active noise reduction debugging system, an electronic device, and a computer-readable storage medium. Background Art
[0002] Products capable of active noise reduction typically undergo debugging to optimize their performance. Before debugging, the performance curve representing the active noise reduction function, obtained through actual testing, must be fitted to obtain the optimal filter parameters. This optimal filter parameter is then used to configure the filter for filtering the active noise reduction function. This filtered performance curve is then used to debug the active noise reduction function.
[0003] In the existing technology, the process of fitting the performance curve is relatively complicated, involving multiple filters, multiple steps, parameter calculations, etc., which makes it difficult for non-professionals to complete the fitting independently, and it is difficult to obtain the optimal parameter configuration of the filter, and thus it is impossible to debug the active noise reduction function. Summary of the Invention
[0004] In view of this, the present application aims to provide an active noise reduction debugging method, an active noise reduction debugging system, an electronic device and a computer-readable storage medium to reduce the complexity of fitting the active noise reduction function test results, so that non-professionals can also complete the fitting of the active noise reduction function test results, and then realize the debugging of the active noise reduction function.
[0005] In a first aspect, an embodiment of the present application provides an active noise reduction debugging method, comprising: obtaining a test curve of the active noise reduction function of a product to be tested, the test curve representing the noise reduction performance of the active noise reduction function; fitting the test curve based on a preset filter, a preset fitting function, and a preset constrained nonlinear planner to obtain a fitting result, the fitting result including debugging parameters for debugging the active noise reduction function; and debugging the active noise reduction function of the product to be tested based on the debugging parameters.
[0006] In the embodiment of the present application, by using a preset filter, a preset fitting function and a preset constrained nonlinear planner, it is possible to fit the test curve of the active noise reduction function of the product to be tested and obtain a fitting result. Compared with the existing technology, the intermediate steps and calculations of the fitting process can be effectively reduced, and there is no need to repeatedly fit the test curve manually, thereby simplifying the complexity of the fitting process, so that non-professionals can also complete the fitting of the active noise reduction function. The filter can then be configured according to the debugging parameters in the fitting result, and the configured filter can be used to filter the test curve of the product to be tested to obtain a curve that represents the active noise reduction function of the product to be tested itself after filtering, and then the active noise reduction function is debugged according to the filtered curve.
[0007] In one embodiment, the preset fitting function includes a boundary function; before fitting the test curve based on the preset filter, the preset fitting function and the preset constrained nonlinear planner, the method also includes: generating the boundary function, and the boundary function is the fitting end condition.
[0008] In an embodiment of the present application, by generating a boundary function as the fitting end condition, on the one hand, the fitting is terminated when the boundary function is satisfied, so that the fitting result can meet the boundary conditions; on the other hand, the fitting can be terminated when the boundary function is satisfied, avoiding repeated fitting resulting in excessively long fitting time, thereby improving the fitting efficiency.
[0009] In one embodiment, the fitting of the test curve based on a preset filter, a preset fitting function and a preset constrained nonlinear planner includes: fitting different parts of the test curve separately according to pre-set weight values for different parts of the test curve based on the preset filter, the preset fitting function and the preset constrained nonlinear planner.
[0010] In an embodiment of the present application, by setting weight values for different parts of the test curve in advance, different parts of the test curve are fitted according to the weight values of different parts of the test curve. This makes it possible to perform fitting control on different parts of the test curve to different degrees according to different weight values during fitting, and focus on fitting the parts with large weight values, thereby improving the fitting effect. For the parts with lower weight values, the importance of fitting is reduced, thereby improving the fitting efficiency.
[0011] In one embodiment, before fitting the test curve based on a preset filter, a preset fitting function and a preset constrained nonlinear planner, the method further includes: configuring the filter type according to the frequency range of the test curve; configuring the number n of filters according to the driving capability of the product to be tested; and configuring n filters of the filter type.
[0012] In practical applications, since different types of filters have different filtering effects on different frequency bands, in order to obtain better filtering effects during the fitting process, in the embodiments of the present application, by configuring the filter type according to the frequency range of the test curve, different types of filters can be used to filter different frequency bands of the test curve during fitting, thereby improving the filtering effect of the fitting process and further improving the fitting effect. By configuring the number of filters according to the driving capability of the product to be tested, as many filters as possible can be configured, thereby improving the filtering effect of the fitting process and improving the fitting efficiency.
[0013] In one embodiment, after configuring the number of filters according to the driving capability of the product to be tested, the method further includes: when initializing the filters, evenly dividing the frequency range of the test curve according to the number of filters to obtain multiple frequency bands corresponding to the number of filters; and evenly distributing the n filters in the multiple frequency bands according to their respective filter types.
[0014] In an embodiment of the present application, the frequency range of the test curve is evenly divided to obtain multiple frequency bands, and then a filter with good processing effect on the frequency band is distributed to each frequency band according to the filter type. In this way, each filter can only filter out the noise of the corresponding frequency band, thereby effectively improving the filtering efficiency of the filter, and at the same time reducing the frequency range of each filter to be fitted during fitting, thereby improving the fitting efficiency.
[0015] In one embodiment, the method further includes: setting a constraint range of the debugging parameter, where the constraint range is a value range of the output debugging parameter.
[0016] In an embodiment of the present application, by setting the constraint range of the debugging parameters, on the one hand, the output debugging parameters are within the constraint range, thereby effectively reducing the fitting results with large deviations. On the other hand, the debugging parameters can be within the constraint range, and the constraint range is the expected range set before fitting. Thus, the debugging parameters of the fitting output can be more in line with expectations. When setting the constraint range, it can also be set according to the test curve so that the output debugging parameters meet the range included in the test curve, thereby improving the fitting effect.
[0017] In one embodiment, obtaining a test curve obtained by testing the active noise reduction function of the product to be tested includes: testing the passive noise reduction performance of the product to be tested to obtain a first curve; testing the active noise reduction function to obtain a second curve; and obtaining the test curve based on the first curve, the second curve, and a preset noise reduction formula.
[0018] In an embodiment of the present application, by testing the passive noise reduction performance and the active noise reduction function, a first curve and a second curve are obtained respectively. By processing the first curve and the second curve based on a preset noise reduction formula, a test curve can be obtained that characterizes the actual noise reduction performance of the active noise reduction function of the product to be tested after removing the passive noise reduction performance. In this way, the influence of the passive noise reduction performance on the fitting of the test curve is reduced, and the fitting efficiency and accuracy are improved.
[0019] In one embodiment, the test curve is fitted based on a preset filter, a preset fitting function and a preset constrained nonlinear program to obtain a fitting result, including: inputting the preset filter, the preset fitting function and the test curve into the preset constrained nonlinear program for fitting to obtain an intermediate result; when it is determined that the intermediate result converges or the number of fittings reaches a preset number, the intermediate result is determined as the fitting result.
[0020] In an embodiment of the present application, a preset filter, a preset fitting function, and a test curve are input into a preset constrained nonlinear program for fitting. The preset constrained nonlinear program can perform multiple fittings, thereby obtaining multiple intermediate fitting results. When it is determined that the intermediate result has converged or the number of fittings has reached a preset number, the intermediate result is determined as the fitting result. In this way, a fitting result that meets the expectations can be obtained, that is, the optimal debugging parameters are obtained to debug the active noise reduction function of the product under test.
[0021] In a second aspect, an embodiment of the present application provides an active noise reduction debugging system, comprising: a testing device for obtaining a test curve of the active noise reduction function of a product to be tested, wherein the test curve characterizes the noise reduction performance of the active noise reduction function; a filter for filtering the test curve; a processing device connected to the filter, wherein the processing device is used to fit the test curve based on the filter, a preset fitting function, and a preset constrained nonlinear planner to obtain a fitting result, wherein the fitting result includes debugging parameters for debugging the active noise reduction function; the processing device is also used to control the filter to debug the active noise reduction function of the product to be tested based on the debugging parameters.
[0022] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the active noise reduction debugging method as described in the first aspect.
[0023] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium. When the computer program is run on a computer, the computer executes the active noise reduction debugging method as described in the first aspect.
[0024] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by practicing the above-mentioned technology of the present disclosure.
[0025] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments of the present invention are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0027] Figure 1 A flowchart of an active noise reduction debugging method provided in one embodiment of the present application;
[0028] Figure 2 A schematic diagram of the structure of an active noise reduction debugging system provided in one embodiment of the present application;
[0029] Figure 3 A schematic structural diagram of an electronic device provided in one embodiment of the present application.
[0030] Icons: test device 210; filter 220; processing device 230. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0032] See also Figure 1 , Figure 1 An active noise reduction debugging method is provided in an embodiment of the present application, and the active noise reduction debugging method includes the following steps.
[0033] S110: Obtain a test curve of the active noise reduction function of the product to be tested, where the test curve represents the noise reduction performance of the active noise reduction function.
[0034] In this embodiment, the test curve represents the noise reduction performance of the active noise reduction function of the product under test and is a curve showing the relationship between the frequency response and phase response of the product under test. It should be noted that the test curve is the performance curve of the active noise reduction function obtained by calculating the noise reduction performance of the product under test using a preset formula after testing the noise reduction performance of the product under test. It can be understood that the test curve is the test result of the noise reduction performance of the active noise reduction function of the product under test without any other filtering processing.
[0035] It should be understood that in actual applications, many products under test will have passive noise reduction capabilities (for example, the materials and structures used in the products have sound absorption and noise control effects). Passive noise reduction capabilities will not disappear regardless of whether the active noise reduction function is activated in the product under test. Therefore, in actual testing, when the active noise reduction function of the product under test is activated and the test is performed, the test results are actually the superposition of the noise reduction performance of the active noise reduction function and the passive noise reduction performance, and cannot accurately reflect the noise reduction performance of the active noise reduction function.
[0036] To this end, in one embodiment, to obtain a test curve for the active noise reduction function of the product under test, the passive noise reduction performance of the product under test can be tested to obtain a first curve, and the active noise reduction function can be tested to obtain a second curve. Then, based on the first and second curves and a preset noise reduction formula, a test curve is obtained.
[0037] It should be noted that to test the passive noise reduction performance of the product under test, the test can be performed without the active noise reduction function activated. To test the active noise reduction function, the product under test can be tested with the active noise reduction function activated without adding a filter, in order to obtain the test results of the product under test's active noise reduction function.
[0038] In this embodiment, a first curve is obtained by testing the passive noise reduction performance of the product under test, and a second curve is obtained by testing the active noise reduction function. The test curve is obtained by combining the first curve, the second curve, and a preset noise reduction formula. The first curve represents the passive noise reduction performance of the product under test, while the second curve represents the active noise reduction performance without a filter, obtained after the active noise reduction function is enabled (a superposition result that includes the passive noise reduction performance). The test curve is calculated using the preset noise reduction formula and represents the active noise reduction performance of the product under test (excluding the passive noise reduction performance).
[0039] In this embodiment, after obtaining the first curve and the second curve, the first curve can be represented as I0 and the second curve can be represented as I1.
[0040] I0=Noise*h(primary)
[0041] Wherein, I0 is the first curve, Noise is the noise coefficient, and h(primary) is the transfer function of noise through the earphone and the auricle.
[0042] I1=Noise*h(Primary)+Noise*1(IIR passthrough)*h(speak)
[0043] Where I1 is the second curve, Noise is the noise coefficient, h(primary) is the transfer function of sound through the earphone and the auricle, Noise*(IIR passthrough) is the noise in the IIR passthrough state, and h(speak) is the transfer function of noise received through the mic, broadcasted through the speaker, and then transmitted.
[0044] thus,
[0045] I0-I1=-N*h(speak)
[0046] In this embodiment, the preset noise reduction formula is:
[0047]
[0048] in, For the test curve, the meanings of other symbols are the same as above.
[0049] In summary, based on the passive noise reduction performance obtained from the test, the active noise reduction performance obtained from the test, and the preset noise reduction formula, a test curve representing the active noise reduction performance can be obtained. Thus, a test curve representing the actual noise reduction performance of the active noise reduction function of the product under test can be obtained. It is understandable that the specific implementation process of obtaining the test curve can refer to the existing technology, for example, using existing general active noise reduction debugging software (such as Soundcheck, etc.) for analysis, so the specific process and details will not be further expanded.
[0050] In one embodiment, after the test curve is obtained, the frequency band of the test curve that needs to be focused on fitting may be intercepted.
[0051] In this embodiment, since the range of the test curve may be large and the data of some frequency bands are not referenceable, the test curve can be intercepted according to the frequency response range (also called "frequency band") to fit the test curve of the intercepted frequency band. The intercepted frequency band can refer to different factors, such as the main operating frequency band of the product to be tested, the frequency band with more noise, etc. In some embodiments, the test curve within a preset frequency range can also be intercepted, such as the test curve within the 0-4kHz frequency response range.
[0052] S120 , fitting the test curve based on a preset filter, a preset fitting function, and a preset constrained nonlinear planner to obtain a fitting result, where the fitting result includes debugging parameters for debugging the active noise reduction function.
[0053] In one embodiment, fitting a test curve based on a preset filter, a preset fitting function, and a preset constrained nonlinear program to obtain a fitting result may include: inputting the preset filter, the preset fitting function, and the test curve into a preset constrained nonlinear program for fitting to obtain an intermediate result; when it is determined that the intermediate result converges or the number of fittings reaches a preset number, determining the intermediate result as the fitting result.
[0054] In this embodiment, the filter is used for filtering, that is, filtering out noise. During fitting, the noise in the test curve can be filtered out by the filter, so that a noise reduction performance curve of the active noise reduction function without noise interference can be obtained. It should be understood that the preset filter described in the embodiment of the present application is a simulated program or module that can realize the filtering function. For example, the physical filter used for actual debugging of the product to be tested can be various types of filters in the digital second-order IIR filter, and the preset filter can be a filter simulated by a program or module, such as a filter simulated by MATLAB.
[0055] In the present embodiment, the preset constrained nonlinear planner is a pre-built nonlinear programming model capable of setting a fitting function and constraints, and is used to plan the optimal solution for fitting a preset filter to a test curve. Wherein, the fitting result is the optimal parameter of the filter (i.e., the debugging parameter described in this application), and the filter is configured by using the debugging parameter in the fitting result so that the configured filter can filter out the noise in the test curve as much as possible, thereby obtaining a curve that characterizes the performance of the active noise reduction function after filtering, and then the product to be tested can be debugged according to the curve. For the construction of a constrained nonlinear planner or a constrained nonlinear programming model, reference can be made to the prior art, for example, a nonlinear programming model constructed using matlab (a programming software), etc., which will not be described in detail here.
[0056] In this embodiment, after the preset filter, the preset fitting function, and the test curve are input into the preset constrained nonlinear program, the preset constrained nonlinear program will perform multiple fittings, and each fitting can obtain an intermediate result. Since the result of the nonlinear program may reach the optimum at any point within the value range, the fitting process can be terminated when it is determined that the intermediate result has converged, and the converged intermediate result can be determined as the fitting result. If a converged intermediate result is not obtained after repeated fitting, in order to avoid wasting time and reducing efficiency due to repeated fitting, the intermediate result of the last fitting is determined as the fitting result when the number of fittings reaches the preset number.
[0057] Before fitting the test curve based on the preset filter, the preset fitting function and the preset constrained nonlinear planner, it is necessary to pre-configure the filter and the fitting function in the fitting process so that the preset constrained nonlinear planner can fit the optimal solution of the filter when debugging the active noise reduction function based on the preset filter and the preset fitting function (i.e., the debugging parameters in the fitting result).
[0058] In one embodiment, the process of presetting the filter may include: configuring the filter type according to the frequency of the test curve.
[0059] In this embodiment, different filters have different test ranges, resulting in differences in the test results of the active noise reduction function. For example, the high-shelf filter and the low-shelf filter have different test curve fitting effects for different frequencies. Therefore, the main operating frequency range of the active noise reduction function can be determined based on the frequency range of the test curve intercepted for fitting, so as to select a matching filter. Specifically, depending on the frequency range of the test curve, the selected filter can be one or more of peak-notch filter, low-shelf filter, high-shelf filter, etc.
[0060] In one embodiment, the process of presetting filters may further include: configuring the number of filters according to the driving capability of the product to be tested.
[0061] In this embodiment, using more filters can more accurately fit the test curve. However, since different products to be tested have different driving capabilities for the filters, when configuring the number of filters, the number of filters can be configured according to the driving capabilities of the product to be tested, and the number of filters is recorded as n.
[0062] Among them, since configuring a larger number of filters will prolong the fitting time, in some implementation situations, the number of filters n can be reasonably configured according to the needs of the actual project.
[0063] In one embodiment, the process of presetting the filter may further include: configuring the filter of n filter types.
[0064] In this embodiment, after the filter type and the number of filters are determined, the filters can be configured accordingly according to the filter type and the number of filters. Specifically, n filters are configured, and the types of these filters are the determined filter types.
[0065] In one embodiment, since multiple filters can be used, different combinations of filter types can be selected based on the frequency ranges of different parts of the test curve. Specifically, high-frequency filters and low-frequency filters are configured for different frequency response parts of the test curve. That is, a high-frequency filter is selected for the higher-frequency parts of the test curve, and a low-frequency filter is selected for the lower-frequency parts.
[0066] In one embodiment, after the filters are configured, all filters need to be initialized.
[0067] In this embodiment, initialization of the filter allows initial values to be set for each filter parameter. These initial values are generally parameters that are commonly used during fitting. This allows fitting to begin from these initial values, reducing the number of fitting cycles and improving fitting efficiency. The filter parameters that require initialization include at least the passband gain, sampling rate fs, and quality factor Q. It will be appreciated that these parameters are those required for filter tuning when fitting the active noise reduction function.
[0068] In one embodiment, when initializing the filter, the frequency range of the test curve is evenly divided according to the number of filters to obtain multiple frequency bands corresponding to the number of filters; and filters of n filter types are evenly distributed in the multiple frequency bands.
[0069] In this embodiment, since there are multiple filters, the multiple filters can be fitted to different frequency bands of the test curve respectively. Specifically, the frequency band intercepted by the test curve can be evenly divided first, and the test curve can be divided into a corresponding number of frequency bands according to the number of filters, and a filter can be configured in each frequency band so that each filter fits the test curve of the corresponding frequency band. For example, when n is 5 and the fitting frequency band is 0-4kHz, the fitting frequency band can be evenly divided into 5 frequency bands, and then 5 filters can be set in each frequency band respectively. When the filter types are inconsistent, filters of the filter type that matches the frequency range can be distributed according to the frequency range of each frequency band.
[0070] In one embodiment, when initializing the filter, a constraint range of the filter parameters may also be set, where the constraint range is the value range of the output filter parameters.
[0071] In this embodiment, since the constrained nonlinear program continuously performs fitting, a large number of fitting results are obtained. Therefore, constraints can be set for the filter parameters so that the filter parameters in the fitting results output by the constrained nonlinear program can meet the range of fitting the test curve. For example, for a test curve in the 0-4kHz frequency band, the range of the filter fs cannot exceed the fitting frequency band of the test curve, 0-4kHz, the range of gain is between -30dB and 30dB, and the Q value is between 0.25 and 5.
[0072] Thus, after configuring the filter type, number of filters, initialization, filter distribution, and setting the constraint range, the filter configuration is complete. At the same time, the fitting function also needs to be configured.
[0073] In one embodiment, the process of configuring the preset fitting function may include: generating a boundary function, where the boundary function is a fitting end condition.
[0074] In the present embodiment, since the constrained nonlinear program needs to determine whether it has converged, the constrained nonlinear program ends fitting when it has converged. Therefore, before fitting, a fitting end condition should be set. Specifically, a boundary function can be generated in advance based on the determined fitting end condition so that the constrained nonlinear program determines whether to end fitting according to the boundary function. Exemplarily, when using the constrained nonlinear program constructed by matlab, the boundary function can use an error function (error function).
[0075] In one embodiment, based on a preset filter, a preset fitting function, and a preset constrained nonlinear planner, different parts of the test curve may be fitted according to pre-set weight values for different parts of the test curve.
[0076] In this embodiment, when the product performs active noise reduction, the actual number of times it processes noise in different frequency bands (i.e., frequency ranges) varies. Therefore, weights can be set for different frequency ranges in the test curve to improve the fitting ratio of a certain frequency band during fitting, thereby achieving a focused fitting of a certain portion. In some embodiments, a loss function can be used to define fitting weights for different portions of the test curve.
[0077] S130: Debug the active noise reduction function of the product under test based on the debugging parameters.
[0078] In one embodiment, after obtaining the fitting result, the filter is configured based on the filter parameters in the fitting result (ie, the debugging parameters in the fitting result), and then the active noise reduction function of the product to be tested is debugged based on the configured filter.
[0079] In this embodiment, after obtaining the debugging parameters in the fitting results, a filter can be configured according to the debugging parameters, and the configured filter can be used to filter the active noise reduction function / test curve of the product to be tested to obtain a curve that represents the active noise reduction function of the product to be tested itself after filtering, and then the active noise reduction function can be debugged according to the filtered curve.
[0080] It should be noted that unlike the preset filters used in the previous fitting, the filters debugged based on the debugging parameters are physical filters, such as various types of filters in digital second-order IIR filters. Physical filters are used to debug the product under test. The preset filters used in the fitting are simulated filters, and the two need to be distinguished.
[0081] In some embodiments, the debugging parameters in the fitting results are the optimal configuration parameters for filtering the active noise reduction function of the product to be tested. However, since it is difficult to achieve fitting in the lower or higher frequency parts, such as the noise reduction effect of the filters before 100 Hz and after 2 kHz, is poor. Therefore, it is also necessary to adjust the configuration parameters of the filters in the corresponding frequency bands so that the parts of the test curve in the corresponding frequency range can obtain better noise filtering effects. For example, according to the degree of fit between the curve obtained after filtering with the filter of the optimal configuration parameters (i.e., the debugging parameters in the fitting results) and the test curve, adjust the gain value, Q value, etc. of the filter that fits the low-frequency part before 100 Hz in the test curve and the filter that fits the high-frequency part after 2 kHz. The specific debugging process can be adjusted according to the actual fitting effect, which will not be described in detail here.
[0082] In the embodiment of the present application, by using a preset filter, a preset fitting function and a preset constrained nonlinear planner, it is possible to fit the test curve of the active noise reduction function of the product to be tested and obtain a fitting result. This can effectively simplify the complexity of the fitting process, so that non-professionals can also complete the fitting of the active noise reduction function and further realize the debugging of the active noise reduction function.
[0083] In order to facilitate those skilled in the art to understand this solution, a specific embodiment is provided here for illustration.
[0084] First, obtain the test curve of the active noise reduction function of the product to be tested.
[0085] The test curve may be a curve obtained by testing using general active noise reduction debugging software such as soundcheck. The test curve is the relationship between frequency response and phase response, that is, in a two-dimensional coordinate system, the horizontal axis is frequency and the vertical axis is phase.
[0086] After the test curve is obtained, the test curve is intercepted to intercept the frequency range corresponding to the frequency that needs to be focused on fitting in the test curve, for example, 0-4kHz.
[0087] Next, configure the filter type and quantity. Specifically, you can use a single filter type or a combination of multiple types, choosing the right filter based on the available filter types. When configuring the number of filters, you can choose based on the drive capability of the product under test.
[0088] After configuring the number of filters and the filter type, the filters are initialized. Specifically, the gain value, fs value, and Q value in the filter parameters can be initialized to give the above parameters an initial value.
[0089] During the initialization process, each filter can be distributed to different positions in the test curve based on the number and type of filters, so that each filter fits different positions of the test curve. For example, for filters of the same type, five filters are set to five different positions within the 0-4kHz fitting frequency band. For filters of different types, the distribution is based on the filter type, for example, low-frequency filters are set to the low-frequency portion of the test curve.
[0090] For the filter, the constraint range of the filter configuration parameters should also be set, for example, the fs value range cannot exceed the fitting range of the test curve interception 0-4kHz, the gain value range is within -30db to 30db, and the Q value is between 0.25 and 5.
[0091] When configuring the filter, you also need to define the fitting function, including defining the boundary function (condition for fitting to end) and the fitting weight value. Specifically, you can define the Error function as the boundary function to set the boundary condition for fitting to end. Next, you can also define the weight value, that is, define the weight value corresponding to each different part of the test curve, so that when fitting, the weight value corresponding to each different part of the test curve is used to fit each different part of the test curve separately, thereby increasing the degree of fitting. Specifically, when defining the weight value, you can use the Loss function to define it.
[0092] Finally, the defined fitting function and the configured filter are input into the preset constrained nonlinear planner for fitting. The preset constrained nonlinear planner fits the test curve using the configured filter parameter values according to the boundary function and weight value in the fitting function to obtain the fitting result. In this way, the optimal configuration parameters of the filter (i.e., the debugging parameters in the fitting result) can be obtained. After setting the filter according to the optimal configuration parameters, a curve representing the active noise reduction function of the product under test itself after filtering the test curve can be presented. Users can debug the active noise reduction function of the filter parameters based on the filtered fitting curve.
[0093] Based on the same inventive concept, the present application also provides an active noise reduction debugging system, please refer to Figure 2 , Figure 2 This is a structural diagram of an active noise reduction debugging system provided in an embodiment of the present application. The active noise reduction debugging system includes:
[0094] A testing device 210 is used to obtain a test curve of the active noise reduction function of the product to be tested, wherein the test curve represents the noise reduction performance of the active noise reduction function;
[0095] Filter 220, used for filtering the test curve;
[0096] a processing device 230 connected to the test device and the filter, respectively, and configured to fit the test curve based on the filter, a preset fitting function, and a preset constrained nonlinear program to obtain a fitting result, wherein the fitting result includes debugging parameters for debugging the active noise reduction function;
[0097] The processing device 230 is further configured to control the filter based on the debugging parameters to debug the active noise reduction function of the product to be tested based on the debugging parameters.
[0098] In one embodiment, the processing device 230 is further configured to generate a boundary function, which is a fitting end condition.
[0099] In one embodiment, the processing device 230 is further configured to fit different parts of the test curve based on a preset filter, a preset fitting function, and a preset constrained nonlinear planner according to pre-set weight values for different parts of the test curve.
[0100] In one embodiment, the filters are of different types and there are multiple filters. Before fitting, the processing device 230 can configure the filter type according to the frequency range of the test curve; configure the number of filters n according to the driving capability of the product to be tested; and configure filters of n filter types.
[0101] In one embodiment, when initializing the filter, the processing device 230 is used to evenly divide the frequency range of the test curve according to the number of filters to obtain multiple frequency bands corresponding to the number of filters; and evenly distribute the n filters in the multiple frequency bands according to their respective filter types.
[0102] In one embodiment, before fitting, the processing device 230 is further configured to set a constraint range of the filter parameters, where the constraint range is a value range of the output filter parameters.
[0103] In one embodiment, the testing device 210 obtains a test curve of the active noise reduction function of the product to be tested, including: testing the passive noise reduction performance of the product to be tested to obtain a first curve; testing the active noise reduction function to obtain a second curve; and obtaining the test curve based on the first curve, the second curve and a preset noise reduction formula.
[0104] In one embodiment, the processing device 230 is further used to input a preset filter, a preset fitting function and a test curve into a preset constrained nonlinear planner for fitting to obtain an intermediate result; when it is determined that the intermediate result converges or the number of fittings reaches a preset number, the intermediate result is determined as the fitting result.
[0105] The embodiment of the present application also provides an electronic device, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the program, the method provided in the above embodiment is implemented. The specific implementation process of the method can be referred to Figure 1 The specific content will not be repeated here.
[0106] Figure 3 This is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application. The electronic device may be a server, but this is not a limitation. Figure 3 , the memory and processor in the electronic device can be connected through a system bus. And the memory can be a non-volatile storage medium, internal memory, etc. In addition, the electronic device can also include components such as input devices, display screens, and network interfaces, but this is not a limitation. The processor of the electronic device can be used to provide computing and control capabilities to support the operation of the entire electronic device. The input device of the electronic device can be used to input various parameters, the display screen of the electronic device is used for display, and the network interface of the electronic device is used for network communication. Those skilled in the art will understand that Figure 2 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0107] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed, the method provided in the above embodiment is executed.
[0108] The storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, or magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive (SSD)).
[0109] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0110] In addition, the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0111] Furthermore, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0112] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, various modifications and variations of the present application are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. An active noise reduction debugging method, characterized in that: include: Obtaining a test curve of an active noise reduction function of a product to be tested, wherein the test curve represents noise reduction performance of the active noise reduction function; Based on a preset filter, a preset fitting function, and a preset constrained nonlinear planner, the test curve is fitted to obtain a fitting result, wherein the fitting result includes debugging parameters for debugging the active noise reduction function; the preset constrained nonlinear planner is a pre-constructed nonlinear programming model with a set fitting function and constraints, and is used to plan an optimal solution for fitting the preset filter to the test curve; Debugging the active noise reduction function of the product to be tested based on the debugging parameters; Before fitting the test curve based on a preset filter, a preset fitting function, and a preset constrained nonlinear planner, the method further includes: configuring a filter type according to a frequency range of the test curve; configuring a number n of filters according to the driving capability of the product to be tested; and configuring n filters of the filter type.
2. The method according to claim 1, characterized in that The preset fitting function includes a boundary function; before fitting the test curve based on the preset filter, the preset fitting function and the preset constrained nonlinear planner, the method further includes: Generate the boundary function, which is the fitting end condition.
3. The method according to claim 2, characterized in that The fitting of the test curve based on the preset filter, the preset fitting function and the preset constrained nonlinear planner includes: Based on a preset filter, a preset fitting function and a preset constrained nonlinear planner, different parts of the test curve are fitted respectively according to the preset weight values of different parts of the test curve.
4. The method according to claim 1, wherein After configuring the number of filters according to the driving capability of the product to be tested, the method further includes: When initializing the filter, the frequency range of the test curve is evenly divided according to the number of filters to obtain a plurality of frequency bands corresponding to the number of filters; The n filters are evenly distributed in the multiple frequency bands according to their respective filter types.
5. The method according to claim 1, wherein The method further comprises: Set the constraint range of the filter parameters, where the constraint range is the value range of the output filter parameters.
6. The method according to claim 1, characterized in that The step of obtaining a test curve of the active noise reduction function of the product to be tested includes: Testing the passive noise reduction performance of the product to be tested to obtain a first curve; Testing the active noise reduction function to obtain a second curve; The test curve is obtained based on the first curve, the second curve and a preset noise reduction formula.
7. The method according to any one of claims 1 to 6, characterized in that The method of fitting the test curve based on the preset filter, the preset fitting function and the preset constrained nonlinear planner to obtain a fitting result includes: Inputting the preset filter, the preset fitting function and the test curve into the preset constrained nonlinear programming to perform fitting and obtain an intermediate result; When it is determined that the intermediate result converges or the number of fittings reaches a preset number, the intermediate result is determined as the fitting result.
8. An active noise reduction debugging system, characterized in that: include: A testing device, configured to obtain a test curve of an active noise reduction function of a product to be tested, wherein the test curve represents the noise reduction performance of the active noise reduction function; A filter, configured to filter the test curve; a processing device connected to the filter, the processing device being configured to fit the test curve based on the filter, a preset fitting function, and a preset constrained nonlinear planner to obtain a fitting result, wherein the fitting result includes debugging parameters for debugging the active noise reduction function; the preset constrained nonlinear planner is a pre-constructed nonlinear programming model with a set fitting function and constraints, and is configured to plan an optimal solution for fitting the test curve by the preset filter; The processing device is further configured to control the filter to debug the active noise reduction function of the product to be tested based on the debugging parameters; The processing device is used to configure the filter type according to the frequency range of the test curve; Configure the number of filters n according to the driving capability of the product to be tested; n filters of the filter type are configured.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that The readable storage medium stores a computer program, and when the computer program is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Digital noise reduction filter generation method, related equipment and readable storage medium
CN111866666A
Automatic production test method and device for active noise reduction earphone
CN113115195A