An automatic fine correction method and system for an audio equalizer
By using an automatic correction method for audio equalizers, and employing FFT transform and filter coefficient calculation, the problems of human interference and low efficiency in audio systems are solved, achieving high-precision sound quality calibration and personalized adjustment.
Patent Information
- Application Number
- CN202510696585.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-05-28
AI Technical Summary
Existing audio system sound quality calibration technology is susceptible to human interference, resulting in subjective bias and low efficiency, making it difficult to achieve efficient and high-precision personalized adjustments.
By playing and acquiring audio signals, using FFT (Fast Fourier Transform), smoothing, and interpolation, a correction signal is obtained. The filter coefficients are calculated and input into a second-order IIR filter to offset the loss of audio signals in space, thus achieving accurate sound field correction.
It achieves efficient and high-precision audio equalizer calibration, reduces human interference, supports personalized adjustments, and improves the stability and consistency of sound quality.
Smart Images

Figure CN120568247B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio control technology, and in particular to an automatic and precise calibration method and system for an audio equalizer. Background Technology
[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 performance of the speakers, and the sound effect requirements of different usage scenarios. Different playback environments have a significant impact on audio frequency response characteristics. Even with the same playback device, the reflection, refraction, and absorption of sound waves will vary greatly in different spaces (such as home theaters, car interiors, and outdoor venues) due to differences in room geometry, building materials, and furniture arrangement. This environmental interference causes the frequency response characteristics of the audio signal to deviate from their original state, resulting in a significant discrepancy between the sound received by the listener and the original frequency response characteristics of the audio source. For example, in a car interior, due to the confined space and irregular shape, sound waves are prone to complex reflections and standing wave phenomena, severely affecting the clarity and balance of the sound quality.
[0003] In existing technologies, audio equalizers are typically used for compensation and adjustment to improve the aforementioned problems. However, equalizer parameter adjustments usually rely on the experience of the sound engineer, inevitably leading to human interference, subjective bias, and low efficiency. Therefore, there is a need for a method and device for automatic and precise correction of audio equalizers that is efficient, high-precision, unaffected by human factors, and supports personalized adjustments.
[0004] In summary, existing calibration techniques are susceptible to human error and subjective bias, and are also inefficient. Therefore, a method is needed to address these issues. Summary of the Invention
[0005] This disclosure provides an automatic and precise calibration method and system for audio equalizers, which solves the technical problems of existing technologies, such as unavoidable human interference, subjective bias, and low efficiency.
[0006] According to a first aspect of this disclosure, an automatic and precise calibration method for an audio equalizer is provided, comprising:
[0007] A frequency-sweeping audio signal is played through a playback device, and the frequency-sweeping audio signal is processed to obtain a standard audio signal. The processing includes FFT (Fast Fourier Transform), smoothing, and interpolation.
[0008] Audio signals from the environment are collected by a data acquisition device to obtain a first-level test signal. The first-level test signal is then processed to obtain a second-level test signal. The processing includes Fast Fourier Transform (FFT), smoothing, and interpolation.
[0009] Set the target points for fitting and perform interpolation to obtain the target signal for fitting;
[0010] Based on the standard audio signal, the secondary test signal, and the fitted target signal, a correction signal is obtained;
[0011] The center frequency sequence, compensated center frequency sequence, gain coefficient sequence, compensated gain coefficient sequence, and bandwidth information sequence of the equalizer are obtained based on the correction signal.
[0012] The filter coefficients and frequency response curves of the filter are calculated based on the center frequency sequence, gain coefficient sequence, bandwidth information sequence, and compensated center frequency sequence.
[0013] Based on the frequency response curve and the compensation gain sequence, an interaction matrix is constructed to obtain the actual optimal gain sequence. The correction filter coefficients are then 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 the second-order IIR filter to offset the loss of audio signal propagation in space, thereby achieving accurate correction of the sound field.
[0015] According to a second aspect of this disclosure, an automatic and precise calibration system for an audio equalizer is provided, comprising:
[0016] A standard audio signal generation module is used 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 includes FFT (Fast Fourier Transform), smoothing, and interpolation.
[0017] The test signal acquisition module is used to acquire audio signals in the environment through an acquisition device to obtain a first-level test signal, and to process the first-level test signal to obtain a second-level test signal. The processing includes FFT (Fast Fourier Transform), smoothing, and interpolation.
[0018] A target fitting signal generation module is used to set the target fitting point and perform interpolation processing to obtain the target fitting signal.
[0019] A correction signal acquisition module is used to obtain a correction signal based on the standard audio signal, the secondary test signal, and the fitted target signal;
[0020] An equalization parameter extraction module is used to obtain the center frequency sequence, compensation center frequency sequence, gain coefficient sequence, compensation gain coefficient sequence, and bandwidth information sequence of the equalizer based on the correction signal.
[0021] A filter design module is used to calculate the filter coefficients and frequency response curves of the filter based on the center frequency sequence, gain coefficient sequence, bandwidth information sequence, and compensation center frequency sequence.
[0022] An interactive optimization module is used to construct an interactive matrix based on the frequency response curve and the compensation gain sequence, obtain the actual optimal gain sequence, and calculate the correction filter coefficients according to the actual optimal gain sequence, the center frequency sequence, and the bandwidth information sequence.
[0023] A correction filter module is used to input the correction filter coefficients into a second-order IIR filter to offset the loss of audio signal propagation in space and achieve accurate sound field correction.
[0024] One or more technical solutions provided in this disclosure have at least the following technical effects or advantages: A frequency-sweeping audio signal is played through a playback device, and the frequency-sweeping audio signal is processed to obtain a standard audio signal, the processing including FFT (Fast Fourier Transform), smoothing, and interpolation; Audio signals from the environment are acquired through a acquisition device to obtain a primary test signal, and the primary test signal is processed to obtain a secondary test signal, the processing including FFT, smoothing, and interpolation; A fitting target point is set and interpolation processing is performed to obtain a fitting target signal; A correction signal is obtained based on the standard audio signal, the secondary test signal, and the fitting target signal. The equalizer's center frequency sequence, compensated center frequency sequence, gain coefficient sequence, compensated gain coefficient sequence, and bandwidth information sequence are obtained based on the correction signal. The filter coefficients and frequency response curve of the filter are calculated based on the center frequency sequence, gain coefficient sequence, bandwidth information sequence, and compensated center frequency sequence. An interaction matrix is constructed based on the frequency response curve and compensated gain sequence to obtain the actual optimal gain sequence. The correction filter coefficients are then calculated according to the actual optimal gain sequence, center frequency sequence, and bandwidth information sequence. These correction filter coefficients are input into a second-order IIR filter to offset the loss of audio signal propagation in space, achieving accurate sound field correction. This solves the technical problems of existing technologies, such as unavoidable human interference, subjective bias, and low efficiency. It achieves the technical effect of a high-efficiency, high-precision audio equalizer that is unaffected by human interference and supports personalized adjustments.
[0025] The above description is merely an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0027] Figure 1 A flowchart illustrating an automatic and precise calibration method for an audio equalizer provided in an embodiment of this application;
[0028] Figure 2 This application provides a schematic diagram of the structure of an automatic and precise calibration system for an audio equalizer.
[0029] Figure 3 A block diagram of a single second-order filter provided in an embodiment of this application;
[0030] Figure 4 This is a schematic diagram of equalizer cascading provided in an embodiment of this application.
[0031] Figure labeling: Standard audio signal generation module 11, test signal acquisition module 12, fitting target signal generation module 13, correction signal acquisition module 14, equalization parameter extraction module 15, filter design module 16, interactive optimization module 17, correction filtering module 18. Detailed Implementation
[0032] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0033] Example 1: An automatic and precise calibration method for an audio equalizer provided in this embodiment of the present disclosure, referred to below. Figure 1 The methods include:
[0034] S1: Play the swept frequency audio signal through the playback device, and process the swept frequency audio signal to obtain a standard audio signal. The processing includes FFT (Fast Fourier Transform), smoothing, and interpolation.
[0035] Specifically, the playback device plays a swept-frequency audio signal and processes it 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 for use in later calculations. An FFT (Fast Fourier Transform) is performed on the swept-frequency audio signal to calculate the spectral amplitude and phase information, converting the time-domain swept-frequency audio signal into the frequency domain. Simultaneously, spectral smoothing and interpolation are performed on the signal to generate a continuous and smooth standard audio signal, reducing data and facilitating subsequent calculations and display.
[0036] S2: Acquire audio signals from the environment through an acquisition device to obtain a first-level test signal, process the first-level test signal to obtain a second-level test signal, the processing including FFT (Fast Fourier Transform), smoothing and interpolation;
[0037] Specifically, audio signals from the environment are captured in real time using acquisition devices such as microphones to generate a primary test signal. This signal typically contains environmental noise, target sound sources, and other interference components. The primary test signal is then subjected to an FFT (Fast Fourier Transform), followed by smoothing and interpolation processing to generate a secondary test signal.
[0038] S3: Set the target points for fitting and perform interpolation to obtain the target signal for fitting;
[0039] Furthermore, step S3 of this application also includes:
[0040] Based on the current user preference configuration and audio content settings, the fitting target points that need to be adjusted are determined.
[0041] Linear interpolation is used to interpolate the fitted target points to obtain the fitted target signal.
[0042] Specifically, based on user preferences (such as equalizer presets, volume balance, or scene modes) and audio content characteristics (such as music genre and vocal frequency distribution), the system determines the target fitting points that need adjustment. For example, it might select low-frequency enhancement, mid-frequency clarity improvement, or high-frequency extension optimization. These target fitting points are typically defined as discrete frequency points or time nodes, representing the audio characteristics desired by the user. A smooth transition calculation is performed between the target fitting points using linear interpolation. For example, if the user requests a +6dB boost in the low-frequency range (60Hz), a 0dB maintenance in the mid-frequency range (1kHz), and a -3dB attenuation in the high-frequency range (10kHz), the system will interpolate linearly between adjacent frequency points (such as 60Hz to 1kHz, 1kHz to 10kHz) to generate a continuous target fitting signal.
[0043] S4: Based on the standard audio signal, the secondary test signal, and the fitted target signal, obtain the correction signal;
[0044] Furthermore, step S4 of this application also includes:
[0045] Obtain the standard audio signal, the secondary test signal, and the fitted target signal, and calculate the correction signal using the following formula:
[0046] ;
[0047] Where C(f) represents the correction signal, S(f) represents the fitted target signal, F(f) represents the secondary test signal, and T(f) represents the standard audio signal.
[0048] Specifically, the process involves acquiring a standard audio signal, a secondary test signal, and a fitted target signal. The standard signal represents a pure reference signal under ideal conditions. The secondary test signal represents the output test signal after actual transmission, which includes interference such as equipment distortion and environmental noise. The fitted target signal represents the desired final output signal of the system. A correction signal is obtained through difference calculation. The main function of the correction signal C(f) is to perform inverse 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 that frequency band, making the final output approximate the target signal S(f). If the test signal F(f) contains nonlinear distortion, C(f) can suppress the distortion components through spectral adjustment.
[0049] S5: Obtain the center frequency sequence, compensation center frequency sequence, gain coefficient sequence, compensation gain coefficient sequence, and bandwidth information sequence of the equalizer based on the correction signal;
[0050] Furthermore, step S5 of this application also includes:
[0051] The correction signal is acquired, and the correction signal is subjected to amplitude limiting processing. The signal that does not exceed the amplitude limiting range is defined as the non-flat segment signal, and the signal that exceeds the amplitude limiting range is defined as the flat segment signal.
[0052] For the non-flat segment signal, the peaks and troughs of the signal are selected as extreme points. For the flat segment signal, the extreme points are determined by the equidistant sampling method. The m extreme points are integrated into the extreme point set. The abscissa of the extreme points is extracted to the center frequency sequence, and the ordinate of the extreme points is extracted to the gain coefficient sequence. The abscissa of the extreme points is the center frequency, and the ordinate is the gain coefficient.
[0053] Compensation calculations are performed on the set of extreme points. Compensation points are inserted between every two extreme points to generate an optimized set of extreme points. The horizontal axis of the compensation point is the geometric mean of the adjacent center frequencies, and the vertical axis of the compensation point is the arithmetic mean of the adjacent gain coefficients. There are a total of 2m-1 extreme points in the optimized set of extreme points.
[0054] Extract the x-coordinate of each extreme point in the extreme point optimization set to the compensation center frequency sequence, and the y-coordinate to the compensation gain coefficient sequence.
[0055] The bandwidth coefficient B is determined based on the center frequency sequence, and the specific formula is as follows:
[0056] ;
[0057] Where P is the adjustment factor, and m represents the index value of the center frequency sequence. Let be the bandwidth coefficient corresponding to the m-th center frequency. As an intermediate variable, used for formula reduction, in specific situations The value is:
[0058] ;
[0059] Where m is the index value of the center frequency, ω gm This is the m-th normalized digital angular frequency in the center frequency sequence;
[0060] ω gm The calculation formula is:
[0061] ;
[0062] in is the center frequency, and m is the index value of the center frequency sequence. This is the system's sampling frequency, currently set to 96000.
[0063] Under specific circumstances, the value of the adjustment factor p is:
[0064] ;
[0065] Integrate m bandwidth coefficients into a bandwidth coefficient sequence.
[0066] Specifically, the correction signal is obtained by calculating from the standard audio signal, the secondary test signal, and the fitted target signal, and then subjected to amplitude limiting to obtain the non-flat segment signal and the flat segment signal. For the non-flat segment signal, since the signal itself has fluctuations, the peaks and troughs of the signal are directly selected as extreme points. For the corresponding flat segment signal, since the slope of the signal is 0, extreme points cannot be directly determined, so an equidistant sampling method is used to select extreme points. Here, it is assumed that a total of m extreme points are selected, and these m extreme points are integrated into an extreme point set. The horizontal and vertical coordinates of the extreme points are extracted, where the horizontal coordinate is integrated into the center frequency sequence as the center frequency, and the vertical coordinate is integrated into the gain coefficient sequence as the gain coefficient. Based on the obtained extreme point set, augmentation compensation calculation is performed to confirm another part of the center frequency and gain coefficient to improve the accuracy of the equalizer. According to the obtained m extreme points, compensation points are inserted between every two extreme points, for a total of m-1. The horizontal coordinate information of the compensation point is the geometric mean of the horizontal coordinates of two adjacent extreme points, and the vertical coordinate is the arithmetic mean of the vertical coordinates of two adjacent points. The extreme points and compensation points are integrated into an optimized extreme point set, resulting in a total of 2m-1 extreme points after compensation calculation. The x and y coordinates of each point in the optimized extreme point set are extracted to obtain the compensation center frequency sequence and the 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 using the default value or adjacent data. The specific calculation process is as follows: First, the normalized digital angular frequency is obtained based on the center frequency data, using the following formula: Where m represents the index value of the center frequency, It is the center frequency, The system's sampling frequency is currently 96000; secondly, according to ω gm The numerical value determines the adjustment factor P corresponding to each bandwidth. If ω gm+1 With ω gm When the ratio is greater than 1.3, the value of P is... In all other cases, the adjustment factor P was 0.373. ω gm Finally, the bandwidth coefficient B is obtained based on the normalized digital angular frequency and adjustment factor, using the following formula: ,in As an intermediate variable, used for formula reduction, in specific situations The value is: Finally, all bandwidth data is integrated into a bandwidth coefficient sequence.
[0068] Furthermore, step S5 of this application also includes:
[0069] The correction signal is acquired, and the amplitude limiting range is set to [+12dB, -18dB];
[0070] The portion of the signal exceeding the amplitude-limiting range is amplitude-limited to generate a flat segment signal, which exists as the gain extremum of the range.
[0071] Signals that do not exceed the amplitude limit range are defined as non-flat segment signals, which exist with the original waveform.
[0072] Specifically, the corrected signal is represented as a continuous and complete waveform, with the center frequency on the horizontal axis and the gain coefficient on the vertical axis. The signal is limited to a range of [+12dB, -18dB]. Within this range, the signal retains its original waveform, while the portion exceeding the range exists as a straight line. Signals above the range are represented by a straight line with a vertical axis of +12dB, and signals below the range are represented by a straight line with a vertical axis of -18dB. Based on the signal waveform obtained after limiting, the portion retaining the original waveform is defined as the non-flat segment, and the straight line portion is defined as the flat segment.
[0073] S6: Calculate the filter coefficients and frequency response curve of the filter based on the center frequency sequence, gain coefficient sequence, bandwidth information sequence, and compensation center frequency sequence;
[0074] Furthermore, step S6 of this application also includes:
[0075] Replace the gain coefficient sequence value with 12dB;
[0076] The conversion of the gain coefficient sequence to a linear gain coefficient sequence is given by the formula: G = 10^(g / 20), where g is the gain coefficient.
[0077] The calibration gain sequence is obtained based on the linear gain coefficient sequence, using the following formula: =G c , where c is a coefficient, specifically c = 0.249;
[0078] The formula for converting a center frequency sequence into a digital angular frequency sequence with a normalized center frequency is as follows: ,in is the center frequency, and i is the index value of the center frequency sequence. This is the system's sampling frequency, currently set to 96000.
[0079] The filter coefficients are determined based on the digital angular frequency sequence normalized to the center frequency, the linear gain coefficient sequence, the calibration gain sequence, and the bandwidth coefficient sequence. The specific formulas are: b0 = 1 + Gβ, b1 = -2cos(ω c ), b2=1-Gβ, a0=1+β, a1=-2cos(ω c ), a2=1-β, where ω c This is the digital angular frequency normalized to the center frequency, where G is the linear scale gain coefficient corresponding to the current center frequency, and β is an intermediate variable for bandwidth, used for formula reduction. The specific value of β is:
[0080] ;
[0081] Where B is the bandwidth coefficient, and G is the linear scale gain coefficient corresponding to the current center frequency. B For calibration gain, it represents the linear gain coefficient after conversion by coefficient product at bandwidth B;
[0082] The conversion formula is as follows: (This formula is used to convert the compensated center frequency sequence into a digital angular frequency sequence with the compensated center frequency normalized.) ,in is the compensated center frequency, and p is the index of the compensated center frequency sequence. This is the system's sampling frequency, currently set to 96000.
[0083] The frequency response of a single filter is calculated based on the obtained filter coefficients and the digital angular frequency sequence normalized to compensate for the center frequency. The specific formula is as follows:
[0084] ;
[0085] Where b0, b1, and b2 are the numerator coefficients of the filter, a0, a1, and a2 are the denominator coefficients of the filter, and z is the complex frequency domain variable of the discrete system, z = e jωTs ;
[0086] The overall frequency response is obtained from 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 individual second-order filters, as shown in the following formula: H m (e jωTs Let G(x) be the transfer function of a second-order filter, G0 be the gain factor representing the overall gain of multiple cascaded filters (a scalar constant in this case), ω be the digital angular frequency normalized to compensate for the center frequency, and j be the imaginary unit. 2 =-1,e j It is a rotation vector of the complex exponential function. It is the sampling frequency. , represents the sampling interval.
[0087] Specifically, the value of the gain coefficient sequence is replaced by 12dB to initialize the calculation of the filter coefficients. It should be noted that the value of this sequence will be repeatedly overwritten in subsequent calculations for iterative calculations, thereby optimizing the filter coefficients.
[0088] Since the gain coefficients obtained from the correction signal are logarithmically scaled, while subsequent calculations require variables on a linear scale, the gain coefficient sequence is converted from logarithmic 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 then calculated based on the obtained linear gain. B The formula is =G c , where c is a coefficient, specifically c=0.249.
[0089] Obtain the center frequency sequence, and from this sequence, obtain the normalized digital angular frequency sequence. The calculation formula is as follows: ,in is the center frequency, and i is the index value of the center frequency sequence. This is the system's sampling frequency, currently set to 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 a total of m groups of filter coefficients, each group containing 6 coefficients: 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 This is the digital angular frequency normalized to the center frequency, where G is the linear scale gain coefficient corresponding to the current center frequency, and β is an intermediate variable for bandwidth, used for formula reduction. The specific value of β is: Where B is the bandwidth coefficient, and G is the linear scale gain coefficient corresponding to the current center frequency. B For calibration gain, G represents the linear gain coefficient after coefficient product transformation at bandwidth B. Since the entire gain coefficient sequence is iterated continuously, the linear gain coefficient sequence G and the calibration gain sequence G... B The value of β will also change accordingly, which will lead to the continuous updating and optimization of the filter coefficients, eventually approaching the ideal value.
[0091] The frequency response curve is obtained based on the filter coefficients and the compensated center frequency sequence calculated in this study. The specific process is as follows: First, the compensated center frequency sequence is converted into a digital angular frequency sequence with the compensated center frequency normalized. The conversion formula is: ,in is the compensated center frequency, and p is the index of the compensated center frequency sequence. The sampling frequency of the system is 96000 Hz in the current case. Next, the complex frequency domain variable z of the discrete system is obtained from the digital angular frequency sequence normalized to the compensated center frequency; its specific value is z = e^(-π / 2). jωTs Since there are a total of 2m-1 compensation center frequencies, the value of z also has 2m-1 values. Next, based on the obtained m sets of filter coefficients and the 2m-1 complex frequency domain variables z of the discrete system, the frequency response of a single filter is calculated, using the following formula: It should be noted that each set of filter coefficients yields 2^m - 1 H(z) values. These 2^m - 1 H(z) values from the same set of filters constitute a frequency response curve for that filter. Since there are m sets of filter coefficients, m frequency response curves will ultimately be obtained. Finally, the overall frequency response is obtained based on the frequency response of each individual filter, using the following formula: H(e) jωTs H(z) represents the index value, and G0 is the gain factor, which represents the overall gain of multiple cascaded filters. Here, it is a scalar constant and is always equal to 1 in the current case.
[0092] S7: Construct an interaction matrix based on the frequency response curve and the compensation gain sequence to obtain the actual optimal gain sequence, and calculate the correction filter coefficients according to the actual optimal gain sequence, the center frequency sequence, and the bandwidth information sequence.
[0093] Furthermore, step S7 of this application also includes:
[0094] Construct an interaction matrix D based on the frequency response curve, and assign specific values to the matrix D. k,n =20log 10 │H n (K)│ / g p Where k represents the index value of the digital angular frequency normalized to the compensated center frequency, with a total of 2^m-1 values, n is the index value of the frequency response curve, with a total of m values, g p =12dB;
[0095] Calculate the initial optimal gain sequence g opt1 The formula is: g opt1 =D + t=(D T D) -1 D T t, where D +It is the pseudo-inverse matrix of D, D T It is the transpose of D. For the compensated gain coefficient sequence;
[0096] The frequency response curve is recalculated based on the initial optimal gain sequence, and g is set to... p =g opt1 This leads to the acquisition of a new interaction matrix D. 1 Through the interaction matrix D 1 Obtain the actual optimal gain sequence g of the filter opt2 ;
[0097] The filter coefficients are recalculated based on the actual optimal gain sequence to obtain the accurately corrected filter coefficients.
[0098] Specifically, an interaction matrix D is constructed based on the frequency response curve, and the matrix is assigned specific values D. k,n =20log 10 │H n (K)│ / g p Where k represents the index value of the digital angular frequency normalized to the compensated center frequency, with a total of 2^m-1 values; n is the index value of the initial frequency response curve, with a total of m values; g p This is a sequence of gain coefficients, with a length of m and a value of 12dB when the gain coefficients were initialized.
[0099] The initial optimal gain sequence g is calculated based on the constructed interaction matrix D. opt1 The specific calculation process is as follows: Obtain the pseudo-inverse matrix D. + The product of the pseudo-inverse matrix and the interaction matrix is the identity matrix; the transpose matrix D is obtained. T The transpose of a matrix is also a type of matrix operation, such as matrix transformation. The transpose matrix is ; Obtain the compensated gain coefficient sequence, which is derived from the extreme value optimization point set in the correction signal. This sequence contains 2m-1 gain coefficients after compensation calculation. ; Obtain the initial optimal gain sequence g based on the interaction matrix, pseudo-inverse matrix, transpose matrix, and compensated gain coefficient sequence. opt1 The specific formula is g opt1 =D + t=(D T D) -1 D TThe initial optimal gain sequence is an intermediate value obtained during the matrix iterative calculation to solve for the actual optimal gain. This sequence contains m gain coefficients, which need to be substituted back into the calculation of the filter coefficients to transform the initial optimal gain sequence into a linear gain coefficient sequence, thereby obtaining the calibration gain sequence. Based on the digital angular frequency sequence normalized to the center frequency, the bandwidth coefficient sequence, the updated linear gain coefficient sequence, and the calibration gain sequence, the filter coefficients are re-determined, and a new frequency response curve is generated. Similarly, a new interaction matrix D is constructed based on the new frequency response curve. 1 With the new interaction matrix D 1 To process the object, repeat the calculation process of the interaction matrix D to obtain the actual optimal gain sequence g. opt2 This sequence represents the final data obtained in this step, which is then used to substitute back into the calculation of the filter coefficients, ultimately yielding the precisely corrected filter coefficients.
[0100] S8: Input the correction filter coefficients into the second-order IIR filter to offset the loss of audio signal propagation in space and achieve accurate correction of the sound field.
[0101] Specifically, by inputting precisely calibrated filter coefficients into a second-order IIR filter, the filter coefficients of the second-order IIR filter are updated, enabling rapid calibration of the sound field of the test environment and effectively improving listening quality and comfort. After completing one precise calibration, the calibration signal can be changed by altering the fitted target point, and further calculations can be performed to achieve personalized support, meeting the individual needs of different users, equivalent to the calibration of a standard equalizer under standard conditions.
[0102] Example 2: Based on the same inventive concept as the automatic and precise calibration method for an audio equalizer in the foregoing examples, this application also provides an automatic and precise calibration system for an audio equalizer. Please refer to the appendix. Figure 2 The system includes:
[0103] The standard audio signal generation module 11 is used to play a swept-frequency audio signal through a playback device, and at the same time process the swept-frequency audio signal to obtain a standard audio signal. The processing includes FFT (Fast Fourier Transform), smoothing, and interpolation.
[0104] The test signal acquisition module 12 is used to acquire audio signals in the environment through an acquisition device to obtain a first-level test signal, and to process the first-level test signal to obtain a second-level test signal. The processing includes FFT (Fast Fourier Transform), smoothing, and interpolation.
[0105] The target fitting signal generation module 13 is used to set the target fitting point and perform interpolation processing to obtain the target fitting signal.
[0106] The correction signal acquisition module 14 is used to obtain a correction signal based on the standard audio signal, the secondary test signal, and the fitted target signal.
[0107] The equalization parameter extraction module 15 is used to obtain the center frequency sequence, compensation center frequency sequence, gain coefficient sequence, compensation gain coefficient sequence, and bandwidth information sequence of the equalizer based on the correction signal. The process of obtaining the center frequency sequence, compensation center frequency sequence, gain coefficient sequence, compensation gain coefficient sequence, and bandwidth information sequence of the equalizer based on the correction signal includes:
[0108] The correction signal is acquired, and the correction signal is subjected to amplitude limiting processing. The signal that does not exceed the amplitude limiting range is defined as the non-flat segment signal, and the signal that exceeds the amplitude limiting range is defined as the flat segment signal.
[0109] For the non-flat segment signal, the peaks and troughs of the signal are selected as extreme points. For the flat segment signal, the extreme points are determined by the equidistant sampling method. The m extreme points are integrated into the extreme point set. The abscissa of the extreme points is extracted to the center frequency sequence, and the ordinate of the extreme points is extracted to the gain coefficient sequence. The abscissa of the extreme points is the center frequency, and the ordinate is the gain coefficient.
[0110] Compensation calculations are performed on the set of extreme points. Compensation points are inserted between every two extreme points to generate an optimized set of extreme points. The horizontal axis of the compensation point is the geometric mean of the adjacent center frequencies, and the vertical axis of the compensation point is the arithmetic mean of the adjacent gain coefficients. There are a total of 2m-1 extreme points in the optimized set of extreme points.
[0111] Extract the x-coordinate of each extreme point in the extreme point optimization set to the compensation center frequency sequence, and the y-coordinate to the compensation gain coefficient sequence;
[0112] The bandwidth coefficient B is determined based on the center frequency sequence, and the specific formula is as follows:
[0113] ;
[0114] Where P is the adjustment factor, and m represents the index value of the center frequency sequence. Let be the bandwidth coefficient corresponding to the m-th center frequency. As an intermediate variable, used for formula reduction, in specific situations The value is:
[0115] ;
[0116] Where m is the index value of the center frequency, ω gmThis is the m-th normalized digital angular frequency in the center frequency sequence;
[0117] ω gm The calculation formula is:
[0118] ;
[0119] in is the center frequency, and m is the index value of the center frequency sequence. This is the system's sampling frequency, currently valued at 96000.
[0120] Under specific circumstances, the value of the adjustment factor p is:
[0121] ;
[0122] Integrate m bandwidth coefficients into a bandwidth coefficient sequence;
[0123] The filter design module 16 is used to calculate the filter coefficients and frequency response curves of the filter based on the center frequency sequence, gain coefficient sequence, bandwidth information sequence, and compensation center frequency sequence.
[0124] Interactive optimization module 17 is used to construct an interactive matrix based on the frequency response curve and the compensation gain sequence, obtain the actual optimal gain sequence, and calculate the correction filter coefficients according to the actual optimal gain sequence, the center frequency sequence, and the bandwidth information sequence.
[0125] The correction filter module 18 is used to input the correction filter coefficients into the second-order IIR filter to offset the loss of audio signal propagation in space and achieve accurate correction of the sound field.
[0126] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.
[0127] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded 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 includes: A frequency-sweeping audio signal is played through a playback device, and the frequency-sweeping audio signal is processed to obtain a standard audio signal. The processing includes FFT (Fast Fourier Transform), smoothing, and interpolation. Audio signals from the environment are collected by a data acquisition device to obtain a first-level test signal. The first-level test signal is then processed to obtain a second-level test signal. The processing includes Fast Fourier Transform (FFT), smoothing, and interpolation. Based on the current user preference configuration and the audio content settings, the fitting target points that need to be adjusted are calculated using linear interpolation to obtain the fitting target signal. Based on the standard audio signal, the secondary test signal, and the fitted target signal, a correction signal is obtained; The equalizer's center frequency sequence, compensated center frequency sequence, gain coefficient sequence, compensated gain coefficient sequence, and bandwidth information sequence are obtained based on the correction signal. The process of obtaining the equalizer's center frequency sequence, compensated center frequency sequence, gain coefficient sequence, compensated gain coefficient sequence, and bandwidth information sequence based on the correction signal includes: The correction signal is acquired, and the correction signal is subjected to amplitude limiting processing. The signal that does not exceed the amplitude limiting range is defined as the non-flat segment signal, and the signal that exceeds the amplitude limiting range is defined as the flat segment signal. For the non-flat segment signal, the peaks and troughs of the signal are selected as extreme points. For the flat segment signal, the extreme points are determined by the equidistant sampling method. The m extreme points are integrated into the extreme point set. The abscissa of the extreme points is extracted to the center frequency sequence, and the ordinate of the extreme points is extracted to the gain coefficient sequence. The abscissa of the extreme points is the center frequency, and the ordinate is the gain coefficient. Compensation calculations are performed on the set of extreme points. Compensation points are inserted between every two extreme points to generate an optimized set of extreme points. The horizontal axis of the compensation point is the geometric mean of the adjacent center frequencies, and the vertical axis of the compensation point is the arithmetic mean of the adjacent gain coefficients. There are a total of 2m-1 extreme points in the optimized set of extreme points. Extract the x-coordinate of each extreme point in the extreme point optimization set to the compensation center frequency sequence, and extract the y-coordinate of each extreme point in the extreme point optimization set to the compensation gain coefficient sequence; The bandwidth coefficient B is determined based on the center frequency sequence, and the specific formula is as follows: ; Where P is the adjustment factor, and m represents the index value of the center frequency sequence. This represents the bandwidth coefficient corresponding to the m-th center frequency in the center frequency sequence. As an intermediate variable, used for formula reduction, in specific situations The value is: ; Where m is the index value of the center frequency sequence, ω gm It is the normalized digital angular frequency corresponding to the m-th center frequency in the center frequency sequence; ω gm The calculation formula is: ; in is the center frequency, and m is the index value of the center frequency sequence. This is the system's sampling frequency, currently valued at 96000. Under specific circumstances, the value of the adjustment factor p is: ; Integrate m bandwidth coefficients into a bandwidth coefficient sequence; The filter coefficients and frequency response curves of the filter are calculated based on the center frequency sequence, gain coefficient sequence, bandwidth information sequence, and compensated center frequency sequence. Based on the frequency response curve and the compensation gain sequence, an interaction matrix is constructed to obtain the actual optimal gain sequence. The correction filter coefficients are then 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 audio signal propagation in space, thereby achieving accurate correction of the sound field.
2. The automatic and precise calibration method for an audio equalizer as described in claim 1, characterized in that, Based on the standard audio signal, the secondary test signal, and the fitted target signal, a correction signal is obtained, including: Obtain the standard audio signal, the secondary test signal, and the fitted target signal, and calculate the correction signal using the following formula: ; Where C(f) represents the correction signal, S(f) represents the fitted target signal, F(f) represents the secondary test signal, and T(f) represents the standard audio signal.
3. The automatic and precise calibration method for an audio equalizer as described in claim 1, characterized in that, The correction signal is acquired, and the correction signal is subjected to amplitude limiting processing. Signals that do not exceed the amplitude limiting range are defined as non-flat segment signals, and signals that exceed the amplitude limiting range are defined as flat segment signals. This includes: The correction signal is acquired, and the amplitude limiting range is set to [+12dB, -18dB]; Amplitude limiting is applied to the portion of the signal that exceeds the amplitude limiting range to generate a flat segment signal, which exists as the gain extremum of the range; Signals that do not exceed the amplitude limit range are defined as non-flat segment signals, which exist with the original waveform.
4. The automatic and precise calibration method for an audio equalizer as described in claim 1, characterized in that, The filter coefficients and frequency response curves of the filter are calculated based on the center frequency sequence, gain coefficient sequence, bandwidth information sequence, and compensated center frequency sequence, including: Replace the gain coefficient sequence value with 12dB; The conversion of the gain coefficient sequence to a linear gain coefficient sequence is given by the formula: G = 10^(g / 20), where g is the gain coefficient. The calibration gain sequence is obtained based on the linear gain coefficient sequence, using the following formula: =G c , where c is a coefficient, specifically c = 0.249; The formula for converting a center frequency sequence into a digital angular frequency sequence with a normalized center frequency is as follows: , where f m is the center frequency, and m is the index value of the center frequency sequence; The filter coefficients are determined based on the digital angular frequency sequence normalized to the center frequency, the linear gain coefficient sequence, the calibration gain sequence, and the bandwidth coefficient sequence. The specific formulas are: b0 = 1 + Gβ, b1 = -2cos(ω c ), b2=1-Gβ, a0=1+β, a1=-2cos(ω c ), a2=1-β, where ω c This is the digital angular frequency normalized to the center frequency, where G is the linear scale gain coefficient corresponding to the current center frequency, and β is an intermediate variable for bandwidth, used for formula reduction. The specific value of β is: ; Where B is the bandwidth coefficient, and G is the linear scale gain coefficient corresponding to the current center frequency. B For calibration gain, it represents the linear gain coefficient after conversion by coefficient product at bandwidth B; The conversion formula is as follows: (This formula is used to convert the compensated center frequency sequence into a digital angular frequency sequence with the compensated center frequency normalized.) ,in is the compensated center frequency, and p is the index of the compensated center frequency sequence; The frequency response of a single filter is calculated based on the obtained filter coefficients and the digital angular frequency sequence normalized to compensate for the center frequency. The specific formula is as follows: ; Where b0, b1, and b2 are the numerator coefficients of the filter, a0, a1, and a2 are the denominator coefficients of the filter, and z is the complex frequency domain variable of the discrete system, z = e jωTs ; The overall frequency response is obtained from 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 individual second-order filters, as shown in the following formula: H m (e jωTs Let G(x) be the transfer function of a second-order filter, G0 be the gain factor representing the overall gain of multiple cascaded filters (a scalar constant in this case), ω be the digital angular frequency normalized to compensate for the center frequency, and j be the imaginary unit. 2 =-1,e j It is a rotation vector of the complex exponential function. , represents the sampling interval.
5. The automatic and precise calibration method for an audio equalizer as described in claim 1, characterized in that, An interaction matrix is constructed based on the frequency response curve and the compensated gain sequence to obtain the actual optimal gain sequence. The correction filter coefficients are then calculated according to the actual optimal gain sequence, the center frequency sequence, and the bandwidth information sequence, including: Construct an interaction matrix D based on the frequency response curve, and assign specific values to the matrix D. k,n =20log 10 │H n (K)│ / g p Where k represents the index value of the digital angular frequency normalized to the compensated center frequency, with a total of 2^m-1 values, n is the index value of the frequency response curve, with a total of m values, 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 + It is the pseudo-inverse matrix of D, D T It is the transpose of D. For the compensation gain coefficient sequence; The frequency response curve is recalculated based on the initial optimal gain sequence, and g is set to... p =g opt1 This leads to the acquisition of a new interaction matrix D. 1 Through the interaction matrix D 1 Obtain the actual optimal gain sequence g of the filter opt2 ; The filter coefficients are recalculated based on the actual optimal gain sequence to obtain the accurately corrected filter coefficients.
6. An automatic and precise calibration system for an audio equalizer, characterized in that, The system includes: A standard audio signal generation module is used 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 includes FFT (Fast Fourier Transform), smoothing, and interpolation. The test signal acquisition module is used to acquire audio signals in the environment through an acquisition device to obtain a first-level test signal, and to process the first-level test signal to obtain a second-level test signal. The processing includes FFT (Fast Fourier Transform), smoothing, and interpolation. Based on the current user preference configuration and the audio content settings, the fitting target points that need to be adjusted are calculated using linear interpolation to obtain the fitting target signal. A correction signal acquisition module is used to obtain a correction signal based on the standard audio signal, the secondary test signal, and the fitted target signal; An equalization parameter extraction module is used to obtain the center frequency sequence, compensated center frequency sequence, gain coefficient sequence, compensated gain coefficient sequence, and bandwidth information sequence of the equalizer based on the correction signal. The process of obtaining the center frequency sequence, compensated center frequency sequence, gain coefficient sequence, compensated gain coefficient sequence, and bandwidth information sequence of the equalizer based on the correction signal includes: The correction signal is acquired, and the correction signal is subjected to amplitude limiting processing. The signal that does not exceed the amplitude limiting range is defined as the non-flat segment signal, and the signal that exceeds the amplitude limiting range is defined as the flat segment signal. For the non-flat segment signal, the peaks and troughs of the signal are selected as extreme points. For the flat segment signal, the extreme points are determined by the equidistant sampling method. The m extreme points are integrated into the extreme point set. The abscissa of the extreme points is extracted to the center frequency sequence, and the ordinate of the extreme points is extracted to the gain coefficient sequence. The abscissa of the extreme points is the center frequency, and the ordinate is the gain coefficient. Compensation calculations are performed on the set of extreme points. Compensation points are inserted between every two extreme points to generate an optimized set of extreme points. The horizontal axis of the compensation point is the geometric mean of the adjacent center frequencies, and the vertical axis of the compensation point is the arithmetic mean of the adjacent gain coefficients. There are a total of 2m-1 extreme points in the optimized set of extreme points. Extract the x-coordinate of each extreme point in the extreme point optimization set to the compensation center frequency sequence, and extract the y-coordinate of each extreme point in the extreme point optimization set to the compensation gain coefficient sequence; The bandwidth coefficient B is determined based on the center frequency sequence, and the specific formula is as follows: ; Where P is the adjustment factor, and m represents the index value of the center frequency sequence. This represents the bandwidth coefficient corresponding to the m-th center frequency in the center frequency sequence. As an intermediate variable, used for formula reduction, in specific situations The value is: ; Where m is the index value of the center frequency sequence, ω gm It is the normalized digital angular frequency corresponding to the m-th center frequency in the center frequency sequence; ω gm The calculation formula is: ; in is the center frequency, and m is the index value of the center frequency sequence. This is the system's sampling frequency, currently valued at 96000. Under specific circumstances, the value of the adjustment factor p is: ; Integrate m bandwidth coefficients into a bandwidth coefficient sequence; A filter design module is used to calculate the filter coefficients and frequency response curves of the filter based on the center frequency sequence, gain coefficient sequence, bandwidth information sequence, and compensation center frequency sequence. An interactive optimization module is used to construct an interactive matrix based on the frequency response curve and the compensation gain sequence, obtain the actual optimal gain sequence, and calculate the correction filter coefficients according to the actual optimal gain sequence, the center frequency sequence, and the bandwidth information sequence. A correction filter module is used to input the correction filter coefficients into a second-order IIR filter to offset the loss of audio signal propagation in space and achieve accurate sound field correction.
Citation Information
Patent Citations
Self-adaptive equalizer compensation method of vehicle-mounted sound equipment
CN110913305A