Automatic accurate correction method and system for sound equalizer
Through the automatic precision correction method of the audio equalizer, FFT transformation and interpolation processing are used to calculate the filter coefficients and input the second-order IIR filter, the problem of inconsistent sound quality in different environments is solved, and efficient and high-precision sound quality correction and personalized adjustment are achieved.
Patent Information
- Application Number
- CN202510696585.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-05-28
AI Technical Summary
Existing audio systems are difficult to achieve efficient and high-precision sound quality correction in different environments, and are easily disturbed by human factors and are inefficient.
By playing the swept audio signal and performing FFT fast Fourier transform, smoothing and interpolation processing, ambient audio signals are collected and processed accordingly, setting the fitted target points and interpolation processing is performed, the correction signal is obtained, the filter coefficients are calculated and input into the second-order IIR filter, the loss of the audio signal in the space is cancelled and the sound field is realized.
It realizes efficient and high-precision audio equalizer correction, reduces interference from human factors, supports personalized adjustments, and improves the consistency of sound quality and listening experience.
Smart Images

Figure CN120568247A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of sound control technology, and in particular to a method and system for automatic and precise calibration of an audio equalizer. Background Art
[0002] As consumers' demands for sound quality continue to rise, traditional audio systems face unprecedented challenges. Sound quality depends not only on the quality of the audio source but also on a combination of factors, including the acoustic characteristics of the playback environment, the physical properties of the speakers, and the sound quality requirements of different usage scenarios. Different playback environments significantly impact the audio frequency response. Even for the same playback equipment, sound waves can experience significant variations in reflection, refraction, and absorption in different spaces (such as home theaters, in-car environments, and outdoor venues) due to factors such as room geometry, building materials, and furniture layout. This environmental interference with the sound field causes the audio signal's frequency response to deviate from its original state, resulting in a significant deviation from the original frequency response of the audio source. For example, in a car, due to the confined and irregular shape of the space, sound waves are prone to complex reflections and standing waves, which seriously affect the clarity and balance of the sound quality.
[0003] To address these issues, existing technologies typically employ audio equalizers for compensation. However, equalizer parameter adjustment often relies on the experience of the tuner, inevitably subject to human interference and subjective bias, resulting in low efficiency. Therefore, a method and device for automatic, precise calibration of an audio equalizer is needed that is efficient, highly accurate, and immune to human interference while supporting personalized adjustments.
[0004] In summary, existing calibration technologies are difficult to avoid interference from human factors, are prone to subjective bias, and are also inefficient. Therefore, a method is needed to solve the above problems. Summary of the Invention
[0005] The present disclosure provides a method and system for automatic and precise calibration of an audio equalizer, which is used to solve the technical problems in the prior art of difficulty in avoiding interference from human factors, prone to subjective deviations, and low efficiency.
[0006] According to a first aspect of the present disclosure, a method for automatically and accurately calibrating an audio equalizer is provided, comprising:
[0007] Playing the swept frequency audio signal by a playing device, and processing the swept frequency audio signal to obtain a standard audio signal, wherein the processing includes FFT fast Fourier transform, smoothing and interpolation;
[0008] The acquisition device acquires audio signals in the environment to obtain a primary test signal, and processes the primary test signal to obtain a secondary test signal, wherein the processing includes FFT fast Fourier transform, smoothing and interpolation;
[0009] Set the fitting target point and perform interpolation processing to obtain the fitting target signal;
[0010] Obtaining a correction signal based on the standard audio signal, the secondary test signal and the fitting target signal;
[0011] Acquire a center frequency sequence, a compensation center frequency sequence, a gain coefficient sequence, a compensation gain coefficient sequence, and a bandwidth information sequence of an equalizer according to the correction signal;
[0012] Calculating filter coefficients and a frequency response curve of the filter according to the center frequency sequence, the gain coefficient sequence, the bandwidth information sequence, and the compensation center frequency sequence;
[0013] An interaction matrix is constructed based on the frequency response curve and the compensation gain sequence to obtain an actual optimal gain sequence, and correction filter coefficients are calculated according to the actual optimal gain sequence, the center frequency sequence, and the bandwidth information sequence;
[0014] The correction filter coefficients are input into a second-order IIR filter to offset the loss of the audio signal propagating in space and achieve accurate correction of the sound field.
[0015] According to a second aspect of the present disclosure, there is provided an automatic and precise calibration system for an audio equalizer, comprising:
[0016] a standard audio signal generation module, the standard audio signal generation module being configured to play a swept frequency audio signal through a playback device and simultaneously process the swept frequency audio signal to obtain a standard audio signal, the processing including FFT (Fast Fourier Transform), smoothing, and interpolation;
[0017] A test signal acquisition module, the test signal acquisition module is used to acquire audio signals in the acquisition environment of the acquisition device to obtain a primary test signal, and process the primary test signal to obtain a secondary test signal, the processing including FFT, smoothing and interpolation;
[0018] A fitting target signal generation module, which is used to set fitting target points and perform interpolation processing to obtain a fitting target signal;
[0019] A correction signal acquisition module, configured to obtain a correction signal based on the standard audio signal, the secondary test signal, and the fitting target signal;
[0020] an equalization parameter extraction module, the equalization parameter extraction module being configured to obtain a center frequency sequence, a compensation center frequency sequence, a gain coefficient sequence, a compensation gain coefficient sequence, and a bandwidth information sequence of the equalizer according to the correction signal;
[0021] A filter design module, the filter design module being used to calculate filter coefficients and a frequency response curve of a filter according to the center frequency sequence, the gain coefficient sequence, the bandwidth information sequence, and the compensation center frequency sequence;
[0022] An interactive optimization module, the interactive optimization module being used to construct an interactive matrix based on the frequency response curve and the compensation gain sequence, obtain an actual optimal gain sequence, and calculate correction filter coefficients according to the actual optimal gain sequence, the center frequency sequence, and the bandwidth information sequence;
[0023] The correction filter module is used to input the correction filter coefficients into a second-order IIR filter to offset the loss of the audio signal propagating in space and achieve accurate correction of the sound field.
[0024] One or more technical solutions provided in the present disclosure have at least the following technical effects or advantages: playing a swept frequency audio signal through a playing device, and processing the swept frequency audio signal at the same time to obtain a standard audio signal, wherein the processing includes FFT fast Fourier transform, smoothing and interpolation; an acquisition device acquires an audio signal in an environment to obtain a primary test signal, and processes the primary test signal to obtain a secondary test signal, wherein the processing includes FFT fast Fourier transform, smoothing and interpolation; setting a fitting target point and performing interpolation processing to obtain a fitting target signal; obtaining a correction signal based on the standard audio signal, the secondary test signal and the fitting target signal; According to the correction signal, the center frequency sequence, compensation center frequency sequence, gain coefficient sequence, compensation gain coefficient sequence and bandwidth information sequence of the equalizer are obtained; the filter coefficients and frequency response curve of the filter are calculated based on the center frequency sequence, gain coefficient sequence and bandwidth information sequence and the compensation center frequency sequence; an interaction matrix is constructed based on the frequency response curve and the compensation gain sequence to obtain the actual optimal gain sequence, and the correction filter coefficients are calculated according to the actual optimal gain sequence, the center frequency sequence and the bandwidth information sequence; the correction filter coefficients are input into the second-order IIR filter to offset the loss of the audio signal propagating in space and achieve accurate correction of the sound field. This solves the technical problems in the existing technology that human interference is difficult to avoid, subjective bias is easily generated, and efficiency is low. It achieves the technical effect of an audio equalizer that is efficient, high-precision, not subject to human interference, and supports personalized adjustment.
[0025] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the present disclosure or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely exemplary, and a person of ordinary skill in the art can obtain other drawings based on the provided drawings without any creative work.
[0027] Figure 1 A flowchart of a method for automatic and precise calibration of an audio equalizer provided in an embodiment of the present application;
[0028] Figure 2 A schematic diagram of the structure of an automatic and precise calibration system for an audio equalizer provided in an embodiment of the present application;
[0029] Figure 3 A structural block diagram of a single second-order filter provided in an embodiment of the present application;
[0030] Figure 4 A schematic diagram of the equalizer cascade provided in an embodiment of the present application.
[0031] Explanation of the reference numerals: standard audio signal generating module 11 , test signal acquiring module 12 , fitting target signal generating module 13 , correction signal acquiring module 14 , equalization parameter extracting module 15 , filter designing module 16 , interactive optimization module 17 , correction filtering module 18 . DETAILED DESCRIPTION
[0032] The following description of exemplary embodiments of the present disclosure is provided in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0033] Example 1: The present disclosure provides an automatic and accurate calibration method for an audio equalizer, which is referred to Figure 1 For illustration, the methods include:
[0034] S1: Playing a swept frequency audio signal through a playback device, and processing the swept frequency audio signal to obtain a standard audio signal, wherein the processing includes FFT (Fast Fourier Transform), smoothing, and interpolation;
[0035] Specifically, the playback device plays a swept-frequency audio signal and processes the swept-frequency audio signal to obtain a standard audio signal. Since the swept-frequency audio signal is a time-domain signal and cannot participate in subsequent algorithm calculations, it needs to be converted into a frequency-domain signal before it can be used in subsequent calculations. The swept-frequency audio signal is subjected to an FFT fast Fourier transform, and the FFT is calculated to obtain the spectrum amplitude and phase information, converting the swept-frequency audio signal in the time domain into the frequency domain. At the same time, the signal is spectrally smoothed and interpolated to generate a continuous and smooth standard audio signal to reduce data and facilitate subsequent calculations and displays.
[0036] S2: The acquisition device acquires audio signals in the environment to obtain a primary test signal, and processes the primary test signal to obtain a secondary test signal, wherein the processing includes FFT, smoothing, and interpolation;
[0037] Specifically, a microphone or other collection device captures the audio signal in the environment in real time to generate a primary test signal. This signal typically contains ambient noise, the target sound source, and other interference components. Similarly, a Fast Fourier Transform (FFT), smoothing, and interpolation are performed on the primary test signal to generate a secondary test signal.
[0038] S3: Set the fitting target point and perform interpolation processing to obtain the fitting target signal;
[0039] Furthermore, step S3 of this application also includes:
[0040] Set the fitting target points that need to be adjusted based on the current user preference configuration and audio content;
[0041] The linear interpolation method is used to interpolate the fitting target points to obtain the fitting target signal.
[0042] Specifically, the fitting target points that need to be adjusted are determined based on user preferences (such as equalizer presets, volume balance or scene modes) and audio content characteristics (such as music type, vocal frequency distribution), such as selecting low-frequency enhancement, mid-frequency clarity improvement or high-frequency ductility optimization. Fitting target points are usually defined in the form of discrete frequency points or time nodes, representing the audio characteristics expected by the user. A smooth transition calculation is performed between fitting target points through linear interpolation. For example: if the user requires a +6dB increase in the low frequency band (60Hz), 0dB in the mid-frequency band (1kHz), and a -3dB attenuation in the high frequency band (10kHz), the system will interpolate linearly between adjacent frequency points (such as 60Hz to 1kHz, 1kHz to 10kHz) to generate a continuous fitting target signal.
[0043] S4: obtaining a correction signal based on the standard audio signal, the secondary test signal and the fitting target signal;
[0044] Furthermore, step S4 of this application also includes:
[0045] Obtain the standard audio signal, the secondary test signal and the fitting target signal, and calculate the correction signal. The specific formula is:
[0046] C(f)=S(f)-(F(f)-(T(f));
[0047] Where C(f) represents the calibration signal, S(f) represents the fitting target signal, F(f) represents the secondary test signal, and T(f) represents the standard audio signal.
[0048] Specifically, a standard audio signal, a secondary test signal, and a fitted target signal are obtained. The standard signal represents a pure reference signal under ideal conditions, the secondary test signal represents the test signal output after actual transmission, which contains interference such as device distortion and environmental noise, and the fitted target signal represents the target signal that the system is expected to output. The correction signal is obtained by difference calculation. The main function of the correction signal C(f) is to perform reverse compensation on the system. For example, if the test signal F(f) is severely attenuated in a certain frequency band, C(f) will increase the gain in this frequency band so that the final output is close to the target signal S(f). If the test signal F(f) contains nonlinear distortion, C(f) can suppress the distortion component through spectral adjustment.
[0049] S5: Acquire a center frequency sequence, a compensation center frequency sequence, a gain coefficient sequence, a compensation gain coefficient sequence, and a bandwidth information sequence of an equalizer according to the correction signal;
[0050] Furthermore, step S5 of this application also includes:
[0051] Acquire the correction signal, perform amplitude limiting processing on the correction signal, set the signal that does not exceed the amplitude limiting interval as a non-flat segment signal, and set the signal that exceeds the amplitude limiting interval as a flat segment signal;
[0052] For the non-flat signal, the peaks and troughs of the signal are selected as extreme points. For the flat signal, the extreme points are determined by an equidistant sampling method. The m extreme points are integrated into an extreme point set. The horizontal coordinates of the extreme points are extracted to form a center frequency sequence. The vertical coordinates of the extreme points are extracted to form a gain coefficient sequence. The horizontal coordinates of the extreme points are the center frequencies, and the vertical coordinates are the gain coefficients.
[0053] Perform compensation calculation on the extreme point set, insert a compensation point between every two extreme points, and generate an extreme point optimization set, where the abscissa of the compensation point is the geometric mean of adjacent center frequencies, and the ordinate of the compensation point is the arithmetic mean of adjacent gain coefficients. There are a total of 2m-1 extreme points in the extreme point optimization set;
[0054] The abscissa of each extreme point in the extreme point optimization set is extracted to a compensation center frequency sequence, and the ordinate is extracted to a compensation gain coefficient sequence.
[0055] The bandwidth coefficient B is determined based on the center frequency sequence. The specific formula is:
[0056] B m =P×B′ m ;
[0057] Where P is the adjustment factor, m represents the index value of the center frequency sequence, and B m is the bandwidth coefficient corresponding to the mth center frequency, B' m It is an intermediate variable used for formula reduction. In specific cases, B' m The values are:
[0058]
[0059] Among them, m is the index value of the center frequency, ω gm is the mth normalized digital angular frequency in the center frequency sequence;
[0060] ω gm The calculation formula is:
[0061]
[0062] where f m is the center frequency, m is the index value of the center frequency sequence, f s is the sampling frequency of the system. In the current case, the specific value is 96000.
[0063] The value of the adjustment factor p in the specific situation is:
[0064]
[0065] Combine m bandwidth coefficients into a bandwidth coefficient sequence.
[0066] Specifically, a correction signal calculated from a standard audio signal, a secondary test signal, and a fitted target signal is obtained and amplitude-limited to produce a non-flat segment signal and a flat segment signal. For the non-flat segment signal, due to its inherent volatility, the peaks and troughs are directly selected as extreme points. For the flat segment signal, since the slope is zero, extreme points cannot be directly determined, so equidistant sampling is used to select extreme points. Assuming that a total of m extreme points are selected, these m extreme points are integrated into an extreme point set. The horizontal and vertical coordinates of the extreme points are extracted, with the horizontal coordinate serving as the center frequency and integrated into the center frequency sequence, and the vertical coordinate serving as the gain coefficient and integrated into the gain coefficient sequence. Based on this set of extreme points, a bit-addition compensation calculation is performed to determine the additional center frequencies and gain coefficients to improve the accuracy of the equalizer. Based on the m extreme points obtained, a compensation point is inserted between each two extreme points, for a total of m-1 compensation points. The horizontal coordinate of a compensation point is the geometric mean of the horizontal coordinates of the two adjacent extreme points, and the vertical coordinate is the arithmetic mean of the vertical coordinates of the two adjacent points. Integrate the extreme points and compensation points into the extreme point optimization set. At this time, there are 2m-1 extreme points after compensation calculation. Extract the horizontal and vertical coordinates of each point in the extreme point optimization set to obtain the compensation center frequency sequence and compensation gain coefficient sequence.
[0067] The bandwidth coefficient is calculated based on the center frequency sequence. When the index does not cover the bandwidth data, the bandwidth data is supplemented by the default value or adjacent data. The specific calculation process is: First, the normalized digital angular frequency is obtained based on the center frequency data. The specific formula is: Where m represents the index value of the center frequency, and f m is the center frequency, f s is the sampling frequency of the system, which is 96000 in the current case; secondly, according to ω gm The value of the adjustment factor P corresponding to each bandwidth is determined by gm+1 With ω gm The ratio is greater than 1.3, then the value of P is In other cases, the value of the adjustment factor P is 0.373*ω gm Finally, the bandwidth coefficient B is obtained according to the normalized digital angular frequency and the adjustment factor. The specific formula is B m =P×B' m , where B' m It is an intermediate variable used for formula reduction. In specific cases, B' m The values are: Finally, all bandwidth data are integrated into the bandwidth coefficient sequence.
[0068] Furthermore, step S5 of this application also includes:
[0069] Obtain the correction signal and set the limit range to [+12dB, -18dB];
[0070] The portion of the signal that exceeds the limiting interval is subjected to limiting processing to generate a flat segment signal, wherein the flat segment signal exists at the gain extreme value of the interval.
[0071] A signal that does not exceed the clipping interval is defined as a non-flat segment signal, and the non-flat segment signal exists in the original waveform.
[0072] Specifically, the correction signal is presented as a coherent, complete waveform, with the center frequency on the horizontal axis and the gain coefficient on the vertical axis. The signal's limiting interval is set to [+12dB, -18dB]. The signal within this interval retains its original waveform, while the portion outside this interval is represented only by a straight line. Signals above this interval are represented by a straight line with a vertical coordinate of +12dB, while signals below this interval are represented by a straight line with a vertical coordinate of -18dB. Based on the signal graph obtained after limiting, the portion retaining the original waveform is defined as the non-straight segment signal, while the straight portion is defined as the straight segment signal.
[0073] S6: Calculating filter coefficients and a frequency response curve of the filter according to the center frequency sequence, the gain coefficient sequence, the bandwidth information sequence, and the compensation center frequency sequence;
[0074] Furthermore, step S6 of this application also includes:
[0075] Replace the gain coefficient sequence value to 12dB;
[0076] The conversion gain coefficient sequence is a linear gain coefficient sequence, and the conversion formula is: G = 10^(g / 20), where g is the gain coefficient;
[0077] The calibration gain sequence is obtained based on the linear gain coefficient sequence, and the formula is G B =G c , where c is the coefficient, and the specific value is c = 0.249;
[0078] The center frequency sequence is converted into a digital angular frequency sequence with normalized center frequency. The conversion formula is: where f i is the center frequency, i is the index value of the center frequency sequence, f s is the sampling frequency of the system. In the current case, the specific value is 96000.
[0079] The filter coefficients are determined based on the center frequency normalized digital angular frequency sequence, linear gain coefficient sequence, calibration gain sequence, and bandwidth coefficient sequence. The specific formula is: b0=1+Gβ, b1=-2cos(ω c ), b2=1-Gβ, a0=1+β, a1=-2cos(ω c ), a2=1-β, where ω c is the digital angular frequency normalized to the center frequency, G is the linear scale gain coefficient corresponding to the current center frequency, and β is the intermediate variable of the bandwidth, which is used to reduce the formula. The specific value of β is:
[0080]
[0081] Among them, B is the bandwidth coefficient, G is the linear scale gain coefficient corresponding to the current center frequency, G B is the calibration gain, which represents the linear gain coefficient after coefficient multiplication at bandwidth B;
[0082] The conversion formula for converting the compensation center frequency sequence into a digital angular frequency sequence normalized by the compensation center frequency is: where f p is the compensation center frequency, p is the index of the compensation center frequency sequence, f s is the sampling frequency of the system. In the current case, the specific value is 96000.
[0083] The frequency response of a single filter is calculated based on the obtained filter coefficients and the digital angular frequency sequence normalized by the compensation center frequency. The specific formula is:
[0084]
[0085] Among them, b0, b1, b2 are the numerator coefficients of the filter, a0, a1, a2 are the denominator coefficients of the filter, z is the complex frequency domain variable of the discrete system, z = e jωTs ;
[0086] The overall frequency response is obtained based on the frequency response of a single filter. An equalizer is formed by cascading multiple second-order filters. The overall frequency response of the equalizer is the product of m single second-order filters. The specific formula is: Among them H m (e jωTs ) is the transfer function of a second-order filter, G0 is the gain factor, which represents the overall gain of multiple cascaded filters, which is a scalar constant here, ω is the digital angular frequency normalized by the compensation center frequency, j is the imaginary unit, and j 2 =-1,e j is the rotation vector of the complex exponential function, f s is the sampling frequency, Represents the sampling interval.
[0087] Specifically, the value of the replacement gain coefficient sequence is 12 dB, which is used to initialize the calculation of the filter coefficient. It should be noted that the value of this sequence will be repeatedly overwritten in the subsequent calculation process for iterative calculation to optimize the filter coefficient.
[0088] Since the gain coefficient obtained by the correction signal is in logarithmic scale, and the subsequent calculation process requires variables in linear scale, the gain coefficient sequence is converted from logarithmic scale to linear scale to obtain a linear gain coefficient sequence. The specific conversion formula is G = 10^(g / 20), where g is the gain coefficient. The calibration gain sequence G is further calculated based on the obtained linear gain. B , the formula is G B =G c , where c is the coefficient, and the specific value is c=0.249.
[0089] Get the center frequency sequence, and obtain the normalized digital angular frequency sequence based on the sequence. The calculation formula is: where f i is the center frequency, i is the index value of the center frequency sequence, f s is the sampling frequency of the system. In the current case, the specific value is 96000.
[0090] The filter coefficients are determined based on the obtained center frequency normalized digital angular frequency sequence, linear gain coefficient sequence, calibration gain sequence, and bandwidth coefficient sequence. There are m groups of filter coefficients in total, and each group has 6 coefficients, namely, numerator coefficients b0, b1, b2, and denominator coefficients a0, a1, a2. The specific calculation formulas for each value are b0=1+Gβ, b1=-2cos(ω c ), b2=1-Gβ, a0=1+β, a1=-2cos(ω c ), a2=1-β, where ω c is the digital angular frequency normalized to the center frequency, G is the linear scale gain coefficient corresponding to the current center frequency, and β is the intermediate variable of the bandwidth, which is used to reduce the formula. The specific value of β is:
[0091] Among them, B is the bandwidth coefficient, G is the linear scale gain coefficient corresponding to the current center frequency, G B is the calibration gain, which represents the linear gain coefficient after coefficient multiplication at bandwidth B. Since the entire gain coefficient sequence will be continuously iterated, the linear gain coefficient sequence G, the calibration gain sequence G B And the value of β will also change accordingly, which will cause the coefficients of the filter to be continuously updated and optimized, and eventually tend to the ideal value.
[0092] The frequency response curve is obtained based on the filter coefficients and compensation center frequency sequence obtained in this calculation. The specific process is as follows: First, the compensation center frequency sequence is converted into a digital angular frequency sequence normalized by the compensation center frequency. The conversion formula is: where f p is the compensation center frequency, p is the index of the compensation center frequency sequence, f s is the sampling frequency of the system, and in this case the specific value is 96000. Secondly, the complex frequency domain variable z of the discrete system is obtained according to the digital angular frequency sequence normalized by the compensation center frequency, and the specific value is z=e jωTs Since there are 2m-1 compensation center frequencies in total, the value of z is also 2m-1. Then, the frequency response of a single filter is calculated based on the obtained m groups of filter coefficients and the complex frequency domain variables z of the 2m-1 discrete systems. The specific formula is It should be noted that each set of filter coefficients will calculate 2m-1 H(z) values, and the 2m-1 H(z) values obtained by the same set of filters constitute a filter frequency response curve. Now there are m sets of filter coefficients, so m frequency response curves will be obtained in the end. Finally, the overall frequency response is obtained based on the frequency response of a single filter. The formula is H(e jωTs ) is H(z), m represents the index value, and G0 is the gain factor, which represents the overall gain of multiple cascaded filters. It is a scalar constant here and is always equal to 1 in the current case.
[0093] S7: constructing an interaction matrix based on the frequency response curve and the compensation gain sequence to obtain an actual optimal gain sequence, and calculating correction filter coefficients according to the actual optimal gain sequence, the center frequency sequence, and the bandwidth information sequence;
[0094] Furthermore, step S7 of this application also includes:
[0095] Construct the interaction matrix D according to the frequency response curve, and the matrix is specifically assigned D k,n =20log 10 │H n (K)│ / g p , where k represents the index value of the digital angular frequency normalized by the compensation center frequency, totaling 2m-1, n is the index value of the frequency response curve, totaling m, g p =12dB;
[0096] Calculate the initial optimal gain sequence g opt1 , the formula is: g opt1 =D + t=(D T D) -1 D T t, where D +is the pseudo-inverse matrix of D, D T is the transpose of D, t is the compensation gain coefficient sequence;
[0097] Recalculate the frequency response curve based on the initial optimal gain sequence, and let g p =g opt1 , and then obtain the new interaction matrix D 1 Through the interaction matrix D 1 Get the actual optimal gain sequence g of the filter opt2 ;
[0098] The filter coefficients are recalculated based on the actual optimal gain sequence to obtain accurately corrected filter coefficients.
[0099] Specifically, the interaction matrix D is constructed according to the frequency response curve, and the matrix is specifically assigned to D k,n =20log 10 │H n (K)│ / g p , where k represents the index value of the digital angular frequency normalized by the compensation center frequency, totaling 2m-1, n is the index value of the initial frequency response curve, totaling m, g p is a gain coefficient sequence with a length of m and a value of 12dB when the gain coefficient is initialized.
[0100] Calculate the initial optimal gain sequence g based on the constructed interaction matrix D opt1 , the specific calculation process is: Get the pseudo inverse matrix D + , the result of multiplying the pseudo-inverse matrix and the interaction matrix is the identity matrix; get the transposed matrix D T , transpose matrix is also a matrix operation method, for example, matrix The transposed matrix of Obtain the compensation gain coefficient sequence, which is obtained from the extreme value optimization point set in the correction signal, and contains the gain coefficients after compensation calculation, totaling 2m-1; obtain the initial optimal gain sequence g according to the interaction matrix, pseudo-inverse matrix, transposed matrix, and compensation gain coefficient sequence opt1 , the specific formula is g opt1 =D + t=(D T D) -1 D Tt, the initial optimal gain sequence is the intermediate value of the actual optimal gain solved in the matrix iterative calculation process. The sequence contains m gain coefficients, which need to be substituted back into the calculation process of the filter coefficient to transform the initial optimal gain sequence into a linear gain coefficient sequence, and then obtain the calibration gain sequence. The filter coefficients are re-determined based on the digital angular frequency sequence normalized by the center frequency, the bandwidth coefficient sequence, the updated linear gain coefficient sequence and the calibration gain sequence, and a new frequency response curve is generated. Similarly, a new interaction matrix D is constructed according to the new frequency response curve response. 1 . With the new interaction matrix D 1 For the processing object, repeat the calculation process of the interaction matrix D to obtain the actual optimal gain sequence g opt2 , this sequence is the final data obtained in this step, which is used to substitute back into the calculation process of the filter coefficients to finally calculate the accurately corrected filter coefficients.
[0101] S8: Inputting the correction filter coefficients into a second-order IIR filter to offset the loss of the audio signal propagating in the space and achieve accurate correction of the sound field.
[0102] Specifically, by inputting the precisely corrected filter coefficients into a second-order IIR filter and updating its coefficients, rapid correction of the ambient sound field under test is achieved, effectively improving listening quality and comfort. After completing a precise calibration, the correction signal can be modified based on the change in the fitting target point, and the calculation can be repeated to achieve personalized support to meet the individual needs of different users, equivalent to adjusting a standard equalizer under standard conditions.
[0103] In the second embodiment, based on the same inventive concept as the automatic and precise calibration method of an audio equalizer in the above embodiment, the present application also provides an automatic and precise calibration system for an audio equalizer, see the attached Figure 2 , the system comprising:
[0104] A standard audio signal generating module 11 is configured to play a swept frequency audio signal through a playback device and simultaneously process the swept frequency audio signal to obtain a standard audio signal, wherein the processing includes FFT (Fast Fourier Transform), smoothing, and interpolation;
[0105] A test signal acquisition module 12 is configured to acquire audio signals in an acquisition environment of the acquisition device, obtain a primary test signal, and process the primary test signal to obtain a secondary test signal, wherein the processing includes FFT, smoothing, and interpolation;
[0106] A fitting target signal generation module 13 is used to set a fitting target point and perform interpolation processing to obtain a fitting target signal;
[0107] a correction signal acquisition module 14, configured to obtain a correction signal based on the standard audio signal, the secondary test signal, and the fitting target signal;
[0108] an equalization parameter extraction module 15, configured to obtain a center frequency sequence, a compensation center frequency sequence, a gain coefficient sequence, a compensation gain coefficient sequence, and a bandwidth information sequence of the equalizer according to the correction signal;
[0109] A filter design module 16, configured to calculate filter coefficients and a frequency response curve of a filter according to the center frequency sequence, the gain coefficient sequence, the bandwidth information sequence, and the compensation center frequency sequence;
[0110] An interactive optimization module 17 is configured to construct an interactive matrix based on the frequency response curve and the compensation gain sequence, obtain an actual optimal gain sequence, and calculate correction filter coefficients according to the actual optimal gain sequence, the center frequency sequence, and the bandwidth information sequence;
[0111] The correction filter module 18 is used to input the correction filter coefficients into a second-order IIR filter to offset the loss of the audio signal propagating in space and achieve accurate correction of the sound field.
[0112] The technical features of the above embodiments can 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 specification.
[0113] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for automatic and precise calibration of an audio equalizer, characterized in that: The method comprises: Playing the swept frequency audio signal by a playing device, and processing the swept frequency audio signal to obtain a standard audio signal, wherein the processing includes FFT fast Fourier transform, smoothing and interpolation; The acquisition device acquires audio signals in the environment to obtain a primary test signal, and processes the primary test signal to obtain a secondary test signal, wherein the processing includes FFT fast Fourier transform, smoothing and interpolation; Set the fitting target point and perform interpolation processing to obtain the fitting target signal; Obtaining a correction signal based on the standard audio signal, the secondary test signal and the fitting target signal; Acquire a center frequency sequence, a compensation center frequency sequence, a gain coefficient sequence, a compensation gain coefficient sequence, and a bandwidth information sequence of an equalizer according to the correction signal; Calculating filter coefficients and a frequency response curve of the filter according to the center frequency sequence, the gain coefficient sequence, the bandwidth information sequence, and the compensation center frequency sequence; An interaction matrix is constructed based on the frequency response curve and the compensation gain sequence to obtain an actual optimal gain sequence, and correction filter coefficients are calculated according to the actual optimal gain sequence, the center frequency sequence, and the bandwidth information sequence; The correction filter coefficients are input into a second-order IIR filter to offset the loss of the audio signal propagating in space and achieve accurate correction of the sound field.
2. The automatic and precise calibration method for an audio equalizer according to claim 1, wherein: Set the fitting target point and perform interpolation processing to obtain the fitting target signal, including: Set the fitting target points that need to be adjusted based on the current user preference configuration and audio content; The linear interpolation method is used to interpolate the fitting target points to obtain the fitting target signal.
3. The automatic and precise calibration method for an audio equalizer according to claim 1, wherein: Obtaining a correction signal based on the standard audio signal, the secondary test signal, and the fitting target signal, comprising: Obtain the standard audio signal, the secondary test signal and the fitting target signal, and calculate the correction signal. The specific formula is: C(f)=S(f)-(F(f)-(T(f)); Where C(f) represents the calibration signal, S(f) represents the fitting target signal, F(f) represents the secondary test signal, and T(f) represents the standard audio signal.
4. The automatic and precise calibration method for an audio equalizer according to claim 1, wherein: Acquiring a center frequency sequence, a compensation center frequency sequence, a gain coefficient sequence, a compensation gain coefficient sequence, and a bandwidth information sequence of an equalizer according to the correction signal, including: Acquire the correction signal, perform amplitude limiting processing on the correction signal, set the signal that does not exceed the amplitude limiting interval as a non-flat segment signal, and set the signal that exceeds the amplitude limiting interval as a flat segment signal; For the non-flat signal, the peaks and troughs of the signal are selected as extreme points. For the flat signal, the extreme points are determined by an equidistant sampling method. The m extreme points are integrated into an extreme point set. The horizontal coordinates of the extreme points are extracted to form a center frequency sequence. The vertical coordinates of the extreme points are extracted to form a gain coefficient sequence. The horizontal coordinates of the extreme points are the center frequencies, and the vertical coordinates are the gain coefficients. Perform compensation calculation on the extreme point set, insert a compensation point between every two extreme points, and generate an extreme point optimization set, where the abscissa of the compensation point is the geometric mean of adjacent center frequencies, and the ordinate of the compensation point is the arithmetic mean of adjacent gain coefficients. There are a total of 2m-1 extreme points in the extreme point optimization set; Extracting the horizontal coordinates of each extreme point in the extreme point optimization set to a compensation center frequency sequence, and the vertical coordinates to a compensation gain coefficient sequence; The bandwidth coefficient B is determined based on the center frequency sequence. The specific formula is: B m =P×B′ m ; Where P is the adjustment factor, m represents the index value of the center frequency sequence, and B m is the bandwidth coefficient corresponding to the mth center frequency, B' m It is an intermediate variable used for formula reduction. In specific cases, B' m The values are: Among them, m is the index value of the center frequency, ω gm is the mth normalized digital angular frequency in the center frequency sequence; ω gm The calculation formula is: where f m is the center frequency, m is the index value of the center frequency sequence, f s is the sampling frequency of the system. In the current case, the specific value is 96000. The value of the adjustment factor p in the specific situation is: Combine m bandwidth coefficients into a bandwidth coefficient sequence.
5. The automatic and precise calibration method for an audio equalizer according to claim 4, wherein: Acquiring the correction signal, performing a limiting process on the correction signal, setting the signal that does not exceed the limiting interval as a non-flat segment signal, and the signal that exceeds the limiting interval as a flat segment signal, including: Obtain the correction signal and set the limit range to [+12dB, -18dB]; The portion of the signal that exceeds the limiting interval is subjected to limiting processing to generate a flat segment signal, wherein the flat segment signal exists at the gain extreme value of the interval. A signal that does not exceed the clipping interval is defined as a non-flat segment signal, and the non-flat segment signal exists in the original waveform.
6. The automatic and precise calibration method for an audio equalizer according to claim 1, wherein: Calculating filter coefficients and a frequency response curve of a filter according to the center frequency sequence, the gain coefficient sequence, the bandwidth information sequence, and the compensation center frequency sequence includes: Replace the gain coefficient sequence value to 12dB; The conversion gain coefficient sequence is a linear gain coefficient sequence, and the conversion formula is: G = 10^(g / 20), where g is the gain coefficient; The calibration gain sequence is obtained based on the linear gain coefficient sequence, and the formula is G B =G c , where c is the coefficient, and the specific value is c = 0.249; The center frequency sequence is converted into a digital angular frequency sequence with normalized center frequency. The conversion formula is: where f i is the center frequency, i is the index value of the center frequency sequence, f s is the sampling frequency of the system. In the current case, the specific value is 96000. The filter coefficients are determined based on the center frequency normalized digital angular frequency sequence, linear gain coefficient sequence, calibration gain sequence, and bandwidth coefficient sequence. The specific formula is: b0=1+Gβ, b1=-2cos(ω c ), b2=1-Gβ, a0=1+β, a1=-2cos(ω c ), a2=1-β, where ω c is the digital angular frequency normalized to the center frequency, G is the linear scale gain coefficient corresponding to the current center frequency, and β is the intermediate variable of the bandwidth, which is used to reduce the formula. The specific value of β is: Among them, B is the bandwidth coefficient, G is the linear scale gain coefficient corresponding to the current center frequency, G B is the calibration gain, which represents the linear gain coefficient after coefficient multiplication at bandwidth B; The conversion formula for converting the compensation center frequency sequence into a digital angular frequency sequence normalized by the compensation center frequency is: where f p is the compensation center frequency, p is the index of the compensation center frequency sequence, f s is the sampling frequency of the system. In the current case, the specific value is 96000. The frequency response of a single filter is calculated based on the obtained filter coefficients and the digital angular frequency sequence normalized by the compensation center frequency. The specific formula is: Among them, b0, b1, b2 are the numerator coefficients of the filter, a0, a1, a2 are the denominator coefficients of the filter, z is the complex frequency domain variable of the discrete system, z = e jωTs ; The overall frequency response is obtained based on the frequency response of a single filter. An equalizer is formed by cascading multiple second-order filters. The overall frequency response of the equalizer is the product of m single second-order filters. The specific formula is: Among them H m (e jωTs ) is the transfer function of a second-order filter, G0 is the gain factor, which represents the overall gain of multiple cascaded filters, which is a scalar constant here, ω is the digital angular frequency normalized by the compensation center frequency, j is the imaginary unit, and j 2 =-1,e j is the rotation vector of the complex exponential function, f s is the sampling frequency, Represents the sampling interval.
7. The method for automatic and precise calibration of an audio equalizer according to claim 1, wherein: An interaction matrix is constructed based on the frequency response curve and the compensation gain sequence to obtain an actual optimal gain sequence, and correction filter coefficients are calculated according to the actual optimal gain sequence, the center frequency sequence, and the bandwidth information sequence, including: Construct the interaction matrix D according to the frequency response curve, and the matrix is specifically assigned D k,n =20log 10 │H n (K)│ / g p , where k represents the index value of the digital angular frequency normalized by the compensation center frequency, totaling 2m-1, n is the index value of the frequency response curve, totaling m, g p =12dB; Calculate the initial optimal gain sequence g opt1 , the formula is: g opt1 =D + t=(D T D) -1 D T t, where D + is the pseudo-inverse matrix of D, D T is the transpose of D, t is the compensation gain coefficient sequence; Recalculate the frequency response curve based on the initial optimal gain sequence, and let g p =g opt1 , and then obtain the new interaction matrix D 1 Through the interaction matrix D 1 Get the actual optimal gain sequence g of the filter opt2 ; The filter coefficients are recalculated based on the actual optimal gain sequence to obtain accurately corrected filter coefficients.
8. An automatic and precise calibration system for an audio equalizer, characterized in that: The system comprises: a standard audio signal generation module, the standard audio signal generation module being configured to play a swept frequency audio signal through a playback device and simultaneously process the swept frequency audio signal to obtain a standard audio signal, the processing including FFT (Fast Fourier Transform), smoothing, and interpolation; A test signal acquisition module, the test signal acquisition module is used to acquire audio signals in the acquisition environment of the acquisition device to obtain a primary test signal, and process the primary test signal to obtain a secondary test signal, the processing including FFT, smoothing and interpolation; A fitting target signal generation module, which is used to set fitting target points and perform interpolation processing to obtain a fitting target signal; A correction signal acquisition module, configured to obtain a correction signal based on the standard audio signal, the secondary test signal, and the fitting target signal; an equalization parameter extraction module, the equalization parameter extraction module being configured to obtain a center frequency sequence, a compensation center frequency sequence, a gain coefficient sequence, a compensation gain coefficient sequence, and a bandwidth information sequence of the equalizer according to the correction signal; A filter design module, the filter design module being used to calculate filter coefficients and a frequency response curve of a filter according to the center frequency sequence, the gain coefficient sequence, the bandwidth information sequence, and the compensation center frequency sequence; An interactive optimization module, the interactive optimization module being used to construct an interactive matrix based on the frequency response curve and the compensation gain sequence, obtain an actual optimal gain sequence, and calculate correction filter coefficients according to the actual optimal gain sequence, the center frequency sequence, and the bandwidth information sequence; The correction filter module is used to input the correction filter coefficients into a second-order IIR filter to offset the loss of the audio signal propagating in space and achieve accurate correction of the sound field.
Citation Information
Patent Citations
Loudspeaker sound field balancing equipment
CN108462921A
Loudspeaker sound field equalization automatic calibration method and device
CN109803218A
Self-adaptive equalizer compensation method of vehicle-mounted sound equipment
CN110913305A
Playing frequency response adaptive equalization method and device
CN119521072A
Fully parametric equalizer
US20060114979A1
Cited By
TCN-based vehicle-mounted audio equalizer compensation method and system
CN121099239A
