Automatic frequency response adjustment method, device, equipment and storage medium for sound reinforcement equipment
By generating a Farina exponential logarithmic sweep frequency signal with amplitude pre-compensation, and combining frequency domain deconvolution and frequency response smoothing, the frequency domain equalization weights are automatically solved, thus solving the measurement accuracy and consistency problems of frequency response calibration in sound reinforcement systems. This achieves efficient and accurate frequency response calibration, suitable for mass production and rapid on-site deployment of sound reinforcement equipment.
Patent Information
- Application Number
- CN202611033273.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-11-17
AI Technical Summary
Existing frequency response calibration schemes for sound reinforcement systems have shortcomings in terms of signal-to-noise ratio measurement, equalization security, frequency band mapping accuracy, and anti-interference capability. They are difficult to balance efficiency, accuracy, and consistency at the same time, which seriously restricts the large-scale deployment and rapid on-site commissioning of high-quality sound reinforcement systems.
By employing the Farina exponential logarithmic sweep excitation signal with amplitude pre-compensation, and through generation, recording, timing alignment, frequency domain deconvolution, and frequency response smoothing, the pure attenuation type frequency domain equalization weight sequence is solved, achieving fully automated frequency response calibration, avoiding repeated manual adjustments, eliminating cross-domain conversion and downsampling biases, and suppressing nonlinear distortion interference.
It achieves a fully automated closed-loop process for frequency response calibration of sound reinforcement equipment, improves measurement accuracy and calibration consistency, avoids the risks of signal clipping and device overload, and is suitable for mass production and rapid on-site deployment.
Smart Images

Figure CN123123782A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of audio processing technology, and more specifically, to an automatic frequency response adjustment method, apparatus, device, and storage medium for a sound reinforcement device. Background Technology
[0002] In applications such as professional sound reinforcement, conference audio, smart speakers, and car audio systems, multiple factors, including differences in speaker units, cabinet structure, acoustic characteristics of the installation environment, and microphone parameters, can cause the final frequency response of the sound reinforcement system to deviate from the design target, affecting the listening experience. To achieve a flat or desired target frequency response, the system's frequency response needs to be calibrated.
[0003] Currently, the commonly used frequency response calibration schemes in the industry are mainly divided into two categories: manual adjustment schemes and automatic measurement calibration schemes.
[0004] Manual tuning relies on the experience of the sound engineer, involves subjective adjustments segment by segment, and has a long tuning cycle, poor consistency, and high cost.
[0005] Automatic measurement and calibration utilizes excitation signals such as frequency sweeping to measure the system's frequency response and then calculate equalization parameters. However, this method has the following drawbacks: linear frequency sweeping signals have a fast sweeping speed and low energy at high frequencies, while they have a slow sweeping speed and high energy at low frequencies, resulting in uneven signal-to-noise ratio across the entire frequency band and poor high-frequency measurement accuracy. The equalization calculation widely employs direct inverse filtering (target ÷ measured), which applies excessive gain to the measured low-frequency bands, easily causing digital clipping distortion and even mechanical overload of the loudspeaker. When high-resolution frequency response is mapped to the limited equalization frequency points in hardware, the energy of the lost frequency band is directly extracted, and the dB-domain arithmetic average violates the linear superposition law of acoustic energy, both of which cause systematic frequency response shifts. Furthermore, single measurements are susceptible to random interference such as environmental background noise, resulting in large fluctuations in equalization weights and insufficient robustness.
[0006] In summary, existing frequency response calibration schemes for sound reinforcement systems have significant shortcomings in terms of signal-to-noise ratio measurement, equalization safety, frequency band mapping accuracy, and anti-interference capability. Both manual debugging and automatic measurement schemes cannot simultaneously achieve efficiency, accuracy, and consistency, which seriously restricts the large-scale deployment and rapid on-site debugging of high-quality sound reinforcement systems. Summary of the Invention
[0007] To overcome the significant shortcomings of existing frequency response calibration schemes for sound reinforcement systems in terms of signal-to-noise ratio measurement, equalization security, frequency band mapping accuracy, and anti-interference capability, this invention provides an automatic frequency response adjustment method, device, equipment, and storage medium for sound reinforcement equipment. The technical solution adopted by this invention is as follows.
[0008] In a first aspect, the present invention provides an automatic frequency response adjustment method for a sound reinforcement device, comprising: Generate a Farina exponential logarithmic sweep excitation signal with amplitude pre-compensation; Acquire target frequency sweep recordings and measured frequency sweep recordings, wherein the target frequency sweep recording is the sound recorded by the frequency sweep excitation signal generated when played in the target scene, and the measured frequency sweep recording is the sound recorded by the frequency sweep excitation signal generated when played in the scene to be calibrated; Align the timing of the target sweep frequency recording and the measured sweep frequency recording, and extract the effective response interval; Based on the generated sweep frequency excitation signal, the impulse response is obtained by frequency domain deconvolution of the two sets of sweep frequency recordings, and the frequency response is solved by the two sets of impulse responses. Frequency response smoothing was performed on the two sets of frequency responses to obtain two sets of smoothed frequency response curves, namely the target frequency response curve and the measured frequency response curve. Based on the target frequency response curve and the measured frequency response curve, frequency band downsampling is performed in the linear amplitude domain to solve a set of pure attenuation type frequency domain equalization weight sequence; wherein, the frequency domain equalization weight sequence is used to write into the equalization filter module of the sound reinforcement device to be calibrated in order to complete the frequency response parameter configuration, wherein the sound reinforcement device to be calibrated is the sound reinforcement device in the scene to be calibrated.
[0009] In one implementation, the process of generating the Farina exponential logarithmic sweep excitation signal with amplitude pre-compensation includes: Configure sampling frequency f s Given the sweep start frequency f1, sweep end frequency f2, and total sweep duration T, calculate the total number of sampling points. Generate discrete time series ; Define sweep rate factor Calculate the instantaneous phase The original swept frequency signal is generated by integrating the instantaneous frequency over time. ; Calculate instantaneous frequency Generate amplitude compensation envelope Peak normalization of the envelope yields Compensated frequency sweep signal ; The compensated scanning signal S1(n) is faded in and out and the signal is normalized to obtain the generated sweep frequency excitation signal.
[0010] In one embodiment, the process of performing fade-in / fade-out and signal normalization on the compensated scan signal S1(n) to obtain the generated sweep frequency excitation signal includes: A linear fade-in / fade-out window of preset duration is applied to the beginning and end of the signal, the peak value is normalized and the signal is limited, and zero-value sampling points are added at the beginning and end to reserve a response buffer, so as to obtain the final generated sweep frequency excitation signal S(n).
[0011] In one embodiment, the process of smoothing the two sets of frequency responses to obtain two sets of smoothed frequency response curves, namely the target frequency response curve and the measured frequency response curve, includes: Let the smoothing granularity be... Octave, for each frequency point f k Determine the upper and lower limits of the smoothing bandwidth: , The smoothed frequency response curve is obtained by taking the arithmetic mean of all dB values within the interval. The target response and the measured response should be processed in exactly the same way to obtain the target smooth frequency response and the measured smooth frequency response.
[0012] The target response and the measured response should be processed in exactly the same way to obtain the target smooth frequency response and the measured smooth frequency response.
[0013] In one implementation, the process of performing frequency band downsampling in the linear amplitude domain based on the target frequency response curve and the measured frequency response curve, and solving for a set of pure attenuation-type frequency domain equalization weight sequences, includes: The two sets of smooth frequency responses are converted from the dB domain to the linear amplitude domain to obtain the target amplitude sequence and the measured amplitude sequence in the linear domain. Assuming the target EQ module supports a total of K frequency bands and the highest calibration frequency is f2, then the bandwidth of a single frequency band is... Based on the frequency resolution of the original frequency response Calculate the number of original frequency points corresponding to each EQ band. Extract the effective frequency range covering K frequency bands, and divide the linear amplitude sequence into segments... Divide the sample into blocks, and take the arithmetic mean within each block to obtain the target amplitude after downsampling. Compared with the measured amplitude ; Solve for the initial weights, adding a small amount to avoid division by zero: ; Multiplying the initial weights by a preset gain scaling factor G compensates for the calibration intensity in pure attenuation mode, and forcibly truncating the weights to the [0.0, 1.0] interval, yields the pure attenuation frequency domain equalization weight sequence: .
[0014] In one implementation, the process of performing frequency band downsampling in the linear amplitude domain based on the target frequency response curve and the measured frequency response curve, and solving for a set of pure attenuation-type frequency domain equalization weight sequences, further includes: Add a zero point to the beginning of the pure attenuation type frequency domain equalization weight sequence to make the total length match the hardware register index; The first two frequency points are forced to zero to suppress low-frequency noise and DC bias, and the final output is a pure attenuation-type frequency domain equalization weight sequence W. eq [k].
[0015] In one embodiment, the process of aligning the timing of the target sweep recording and the measured sweep recording signals and extracting the timing of the aligned signal from the effective response interval includes: Using the original excitation signal s(n) as a reference, the time delay offset of the response signal is obtained through cross-correlation operation: .
[0016] In a second aspect, the present invention provides an automatic frequency response adjustment device for a sound reinforcement equipment, comprising: The generation module is used to generate the Farina exponential logarithmic sweep excitation signal with amplitude pre-compensation; The acquisition module is used to acquire target frequency sweep recordings and measured frequency sweep recordings. The target frequency sweep recording is the sound recorded from the frequency sweep excitation signal generated during playback in the target scene. The measured frequency sweep recording... The sound is the sound recorded by the sweep frequency excitation signal generated during playback in the scene to be calibrated; The interception module is used to align the timing of the target frequency sweep recording and the measured frequency sweep recording and to intercept the effective response interval. The processing module is used to perform frequency domain deconvolution on two sets of frequency-sweeped recordings based on the generated frequency-sweeping excitation signal to obtain the impulse response, and then use the two sets of impulse responses to solve for the frequency response; it performs frequency response smoothing on the two sets of frequency responses to obtain two sets of smoothed frequency response curves, namely the target frequency response curve and the measured frequency response curve; based on the target frequency response curve and the measured frequency response curve, it performs frequency band downsampling in the linear amplitude domain and solves for a set of pure attenuation-type frequency domain equalization weight sequence; wherein, the frequency domain equalization weight sequence is used to write into the equalization filter module of the sound reinforcement device to be calibrated to complete the frequency response parameter configuration, and the sound reinforcement device to be calibrated is the sound reinforcement device in the scene to be calibrated. Thirdly, the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method of any of the above embodiments.
[0017] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the method of any of the above embodiments.
[0018] In this invention, a Farina exponential logarithmic sweep frequency signal with amplitude pre-compensation is generated and played and recorded in both a reference system manually tuned to its optimal state and a new system to be calibrated. After time alignment, deconvolution to extract the impulse response, and octave smoothing to obtain the target and measured frequency response curves, frequency band downsampling is performed in the linear amplitude domain, and the pure attenuation type frequency domain equalization weights are solved. Finally, the signal is automatically written into the new device to complete the frequency response calibration. This invention achieves a fully automated closed-loop process from measurement to calibration, avoiding repeated manual adjustments. It adopts a unified linear amplitude domain calculation architecture and a downsampling mechanism based on hardware EQ frequency band block averaging, eliminating cross-domain conversion and downsampling deviations and improving physical accuracy. By generating pure attenuation weights through gain pre-scaling and truncation in the [0,1] interval, it approximates the target frequency response while fundamentally avoiding the signal clipping and device overload risks caused by gain enhancement. In addition, by utilizing the characteristic of harmonics and main pulses being separated in the time domain after Farina sweep frequency deconvolution, a pure linear impulse response can be obtained, effectively suppressing the interference of system nonlinear distortion on frequency response measurement. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the overall process of one of the embodiments of the present invention.
[0020] Figure 2 This is an overall flowchart of the automatic frequency response adjustment method for equipment according to one embodiment of the present invention.
[0021] Figure 3 This is a schematic diagram of the overall structure of Embodiment 2 of the present invention. Detailed Implementation
[0022] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0023] It should be noted that the terms "first, second, ..." used in the embodiments of the present invention are merely used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, ..." can be interchanged in a specific order or sequence where permissible. It should be understood that the objects distinguished by "first, second, ..." can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. Example 1
[0024] Please see Figure 1 , Figure 1This is a flowchart illustrating an automatic frequency response adjustment method for a sound reinforcement device according to Embodiment 1 of the present invention. The method includes steps S110, S120, S130, S140, S150, and S160. It should be noted that steps S110, S120, S130, S140, S150, and S160 are merely reference numerals used to clearly explain the embodiment and the accompanying drawings. Figure 1 The correspondence is not intended to limit the order of steps in this embodiment.
[0025] Step S110: Generate a Farina exponential logarithmic sweep excitation signal with amplitude pre-compensation; Step S120: Obtain the target sweep frequency recording and the measured sweep frequency recording, wherein the target sweep frequency recording is the sound recorded by the sweep frequency excitation signal generated when played in the target scene, and the measured sweep frequency recording is the sound recorded by the sweep frequency excitation signal generated when played in the scene to be calibrated. Step S130: Align the timing of the target sweep frequency recording and the measured sweep frequency recording with the signal timing and extract the effective response interval; Step S140: Based on the generated sweep frequency excitation signal, perform frequency domain deconvolution on the two sets of sweep frequency recordings to obtain the impulse response, and use the two sets of impulse responses to solve for the frequency response; Step S150: Perform frequency response smoothing on the two sets of frequency responses to obtain two smoothed frequency response curves, namely the target frequency response curve and the measured frequency response curve. Step S160: Based on the target frequency response curve and the measured frequency response curve, perform frequency band reduction in the linear amplitude domain. Sampling is performed to solve for a set of pure attenuation frequency domain equalization weight sequences; wherein, the frequency domain equalization weight sequences are used to write into the equalization filter module of the sound reinforcement device to be calibrated in order to complete the frequency response parameter configuration, wherein the sound reinforcement device to be calibrated is the sound reinforcement device in the scene to be calibrated.
[0026] In this application, Farina sweep frequency refers to the exponential logarithmic sweep frequency signal, which is a sweep frequency test signal whose instantaneous frequency increases exponentially with time. It is a classic method for measuring the impulse response of acoustic systems and can achieve uniform sweep speed and high signal-to-noise ratio measurement across the entire frequency band.
[0027] Step S110 first requires generating a Farina exponential logarithmic sweep excitation signal with amplitude pre-compensation. Ordinary linear sweeps have a fast sweep speed and low energy at high frequencies, and a slow sweep speed and high energy at low frequencies, resulting in poor signal-to-noise ratio and large errors in high-frequency measurements, making them unsuitable for high-precision calibration. This method uses a Farina exponential logarithmic sweep with amplitude pre-compensation. While ordinary sweep signals have a constant amplitude, in this process, the signal is "shaped" during generation. Amplitude pre-compensation means adjusting the amplitude envelope according to frequency during signal generation, before the signal is even emitted, making low-frequency energy stronger and high-frequency energy weaker. This ensures uniform excitation energy across the entire frequency band, consistent measurement signal-to-noise ratio, and balanced measurement accuracy at both high and low frequencies, providing a reliable data foundation for high-precision calibration.
[0028] In one embodiment, the process of generating the Farina exponential logarithmic sweep excitation signal with amplitude pre-compensation in step S110 includes: steps S111, S112, S113 and S114.
[0029] Step S111, configure the sampling frequency f s Given the sweep start frequency f1, sweep end frequency f2, and total sweep duration T, calculate the total number of sampling points. ; Step S112, define the sweep rate factor Calculate the instantaneous phase The original swept frequency signal is generated by integrating the instantaneous frequency over time. ; Step S113, calculate the instantaneous frequency Generate amplitude compensation envelope Peak normalization of the envelope yields Compensated frequency sweep signal ; Step S114: Perform fade-in / fade-out and signal normalization on the compensated scan signal S1(n) to obtain the generated sweep frequency excitation signal.
[0030] The following process embeds the corresponding core mathematical formulas into the code implementation, providing a complete algorithmic logic for this solution; unified symbol definition: f s f1 is the sampling frequency, f2 is the sweep start frequency, f3 is the sweep end frequency, and T is the total sweep duration. For numerically stable small quantities (used to avoid numerical problems such as division by zero and logarithmic singularities) .
[0031] Step S111, Parameter initialization: Configure sampling frequency f s Given the sweep start frequency f1, sweep end frequency f2, and total sweep duration T, calculate the total number of sampling points. Generate discrete time series .
[0032] Step S112, Generating the original exponential frequency sweep: Define the frequency sweep rate factor Used to control the exponential growth rate of instantaneous frequency; calculates instantaneous phase. The original swept frequency signal is obtained by integrating the instantaneous frequency over time. .
[0033] Step S113, Amplitude pre-compensation processing: Calculate instantaneous frequency Generate amplitude compensation envelope Peak normalization of the envelope yields Compensated frequency sweep signal This ensures that the excitation energy is evenly distributed across the entire frequency band.
[0034] In step S114, a very short fade-in and fade-out is usually added to the generated signal to avoid physical impact on the speaker at the beginning and end of playback.
[0035] In one implementation, step S114, which involves performing fade-in / fade-out and signal normalization on the compensated scan signal S1(n) to obtain the generated sweep frequency excitation signal, includes: A linear fade-in / fade-out window of preset duration is applied to the beginning and end of the signal, the peak value is normalized and the signal is limited, and zero-value sampling points are added at the beginning and end to reserve a response buffer, so as to obtain the final generated sweep frequency excitation signal S(n).
[0036] Step S114, perform fade-in / fade-out and signal normalization: apply a linear fade-in / fade-out window of preset duration to the beginning and end of the signal to suppress high-frequency impacts caused by signal jumps (preferably set to a linear fade-in / fade-out duration of 0.5 seconds); perform peak normalization and amplitude limiting on the signal, and supplement the beginning and end with zero-value sampling points to reserve a response buffer (preferably set to supplement the beginning and end with zero-value sampling points for 0.5 seconds as well), to obtain the final excitation signal S(n).
[0037] This method employs exponential-logarithmic frequency sweep with a uniform sweep speed along the logarithmic frequency axis. Combined with amplitude pre-compensation, it can offset the inherent high-frequency energy attenuation of exponential frequency sweep, achieving consistent signal-to-noise ratio across the entire frequency band and solving the problem of insufficient high-frequency measurement accuracy in ordinary linear frequency sweep. At the same time, fade-in and fade-out processing avoids signal abrupt changes that could damage the speaker unit, while also reducing the interference of measurement transient artifacts on the impulse response.
[0038] In step S120, the frequency response of the sound reinforcement equipment in the current sound field environment is manually adjusted to the optimal state. The sound reinforcement equipment (microphone + speaker) in the optimal state (this optimal state is the target scene) is applied, and the generated sweep frequency signal is played to obtain the target sweep frequency recording. In the sound field environment of the new scene to be calibrated, which includes the use of a new microphone, speaker and / or room, the generated sweep frequency signal is played to obtain the sweep frequency recording under the new sound field.
[0039] Dual-scene response acquisition: Play the excitation signal under the baseline optimal sound field and sound reinforcement equipment conditions to record the target response or obtain the target scanning recording. Play the same excitation signal in the scenario to be calibrated, and record the measured response or the measured frequency sweep recording. .
[0040] Step S130 involves using the original sweep signal as a "ruler" to find the precise delay between the two recordings through cross-correlation, removing the leading silence to align their times, and then truncating the effective portion according to the length of "sweep duration + reverberation tail" to finally obtain a pair of time-synchronized and clean comparison recordings.
[0041] Specifically, effective interval truncation: remove invalid silent segments and environmental interference segments at the beginning and end of the recorded signal, and retain the effective interval containing the complete frequency sweep response; Timing alignment: Using the original excitation signal S(n) as a reference, the time delay offset of the response signal is obtained through cross-correlation calculation. The timing of the excitation and response is aligned according to the time delay offset to ensure the phase accuracy of subsequent deconvolution.
[0042] In this method, removing invalid silent segments can reduce the length of subsequent FFT operations, improve computational efficiency, and avoid irrelevant noise interference; timing alignment eliminates the transmission delay of the playback-recording link, ensures the accurate position of the impulse response obtained from deconvolution, and avoids energy dispersion and phase deviation.
[0043] Step S140 is to deconvolve in the frequency domain to obtain the impulse response.
[0044] FFT length selection: The smallest integer power of 2 greater than or equal to len(s) + len(y) is taken as the FFT length N. fft, Avoid aliasing in circular convolutions. Here, FTT (Fast Fourier Transform) is a fast algorithm for implementing the Discrete Fourier Transform, used for rapid conversion between time-domain and frequency-domain signals; len is the function for calculating the "length" of the signal.
[0045] Frequency domain deconvolution: Perform FFT on the excitation signal and response signal respectively to obtain S(k) and Y(k); solve the system frequency response by the conjugate division method, and add numerically stable small quantities. Avoid division by zero: , Where S*(k) is the complex conjugate of S(k), The power spectrum of the excitation signal. Deconvolution is the signal processing procedure that inversely derives the system's impulse response from the system's input signal and output response.
[0046] Impulse inversion extraction: Perform an inverse FFT transform on H(k) and take the real part to obtain the time-domain impulse response: The effective range of the main pulse is extracted, and the natural harmonic separation characteristic of the Farina method is used to remove the nonlinear harmonic components before the main pulse, retaining the pure linear impulse response. Here, IFFT stands for Fourier Transform, and Re is an abbreviation for Realpart, which is a mathematical operation that extracts the real part of a complex number.
[0047] Frequency response calculation: Perform N on the impulse response fft Point FFT, extract the positive frequency single-sided spectrum, and convert it to decibel scale: .
[0048] The frequency domain deconvolution method is based on FFT, which has a much higher computational efficiency than time domain deconvolution, making it suitable for embedded devices and mass production calibration scenarios. Farina sweep deconvolution can separate the nonlinear harmonic components of the system to the time domain before the main pulse, which can then be removed by time-domain windowing. This effectively suppresses the interference of system nonlinear distortion on frequency response measurement and improves measurement accuracy. In addition to octave smoothing, other smoothing methods such as moving average and Savitzky-Golay smoothing can also be used in step S150 for frequency response smoothing. As long as the random fluctuations of the frequency response curve can be suppressed and the overall trend can be preserved, they can all be adapted to the weight calculation process of this scheme.
[0049] In one embodiment, step S150, which involves smoothing the two sets of frequency responses to obtain two smoothed frequency response curves, namely the target frequency response curve and the measured frequency response curve, includes steps S151 and S152.
[0050] Step S151, set the smoothing granularity as... Octave, for each frequency point f k Determine the upper and lower limits of the smoothing bandwidth: , The smoothed frequency response curve is obtained by taking the arithmetic mean of all dB values within the interval. Step S152: Perform the same processing on the target response and the measured response to obtain the target smooth frequency response and the measured smooth frequency response.
[0051] This implementation uses octave smoothing, which eliminates curve spikes caused by environmental standing waves and circuit noise, avoids drastic changes in subsequent EQ weights, makes the equalization curve smoother and easier to achieve, and improves the stability of the calibration results. Here, EQ (Equalization) is an audio processing method that corrects system frequency response deviations by adjusting the gain of different frequency bands.
[0052] In step S160, the measured frequency response curve is the system frequency response measured using a swept-frequency signal under the current environment, and the target frequency response curve is the ideal frequency response that the system is expected to achieve. This step first uses the linear amplitude domain. The calculations here are performed on the "linear amplitude" scale, not the commonly used decibels (dB). Decibels are logarithmic, and addition and subtraction correspond to linear multiplication and division. In the linear domain, the measured value can be directly divided by the target value to obtain a multiplier (e.g., 0.5 times or 2 times). This multiplier is the subsequent weight, making the calculation more direct. Then, the frequency band is downsampled. Instead of calculating a weight for every tiny frequency point (e.g., thousands of points in an FFT), the frequency axis is merged into dozens of wider frequency bands according to human auditory perception characteristics (e.g., 1 / 3 octave). This reduces the computational load, makes the adjustment smoother, and avoids over-correction of noise caused by individual outliers.
[0053] Solving for a set of purely attenuated frequency domain equalization weights is the core constraint and output of the entire method.
[0054] Frequency domain equalization weighting: This involves calculating a gain coefficient (weight) for each downsampled frequency band. For example, the 100Hz-200Hz band needs to be multiplied by 0.8; the 1kHz-2kHz band needs to be multiplied by 1.2.
[0055] Pure attenuation type: This is a very crucial constraint. It mandates that all calculated weights must be ≤1 (in the linear domain). This means that if the measured frequency response is higher than the target in a certain frequency band (i.e., the energy is too strong), the weight is set to a value less than 1 (e.g., 0.7), and attenuation occurs. If the measured frequency response is lower than the target in a certain frequency band (i.e., the energy is insufficient), the weight is not set to a "boost" value greater than 1, but is directly set to 1 (i.e., no boost, only no attenuation).
[0056] In one implementation, step S160, which involves performing frequency band downsampling in the linear amplitude domain based on the target frequency response curve and the measured frequency response curve, and solving for a set of pure attenuation-type frequency domain equalization weight sequences, includes steps S161, S162, S163, and S164.
[0057] Step S161: Convert the two sets of smooth frequency responses from the dB domain to the linear amplitude domain to obtain the target amplitude sequence and the measured amplitude sequence in the linear domain. Step S162, assuming the total number of frequency bands supported by the target EQ module is K, and the highest calibration frequency is f2, then the bandwidth of a single frequency band is... Based on the frequency resolution of the original frequency response Calculate the number of original frequency points corresponding to each EQ band. Extract the effective frequency range covering K frequency bands, and divide the linear amplitude sequence into segments... Divide the sample into blocks, and take the arithmetic mean within each block to obtain the target amplitude after downsampling. Compared with the measured amplitude ; Step S163, solve for the initial weights, adding a small amount to avoid division by zero: ; Step S164: Multiply the initial weights by a preset gain scaling factor G to compensate for the calibration intensity in pure attenuation mode, and forcibly truncate the weights to the [0.0, 1.0] interval to obtain the pure attenuation frequency domain equalization weight sequence: .
[0058] In this embodiment, step S161, converting the dB domain to the linear amplitude domain: converting the two sets of smooth frequency responses from the dB domain to the linear amplitude domain ensures the physical consistency of energy calculation. The target amplitude sequence and the measured amplitude sequence in the linear domain are obtained.
[0059] Step S162, equal bandwidth band division and downsampling: Assume the total number of frequency bands supported by the target EQ module is K, and the highest calibration frequency is f2, then the bandwidth of a single frequency band is... Based on the frequency resolution of the original frequency response Calculate the number of original frequency points corresponding to each EQ band. Extract the effective frequency range covering K frequency bands, and divide the linear amplitude sequence into segments... Divide the sample into blocks, and take the arithmetic mean within each block to obtain the target amplitude after downsampling. Compared with the measured amplitude .
[0060] Step S163, Initial Equilibrium Weight Calculation: Calculate the initial weights using "target amplitude ÷ measured amplitude", adding a small amount to avoid division by zero. .
[0061] Step S164, Gain Scaling and Pure Attenuation Truncation: Multiply the initial weights by a preset gain scaling factor G (preferably G=1.8) to compensate for the calibration intensity in pure attenuation mode; forcibly truncate the weights to the [0.0, 1.0] interval to obtain pure attenuation weights: .
[0062] The gain scaling factor G in the weight calculation is not limited to a fixed value of 1.8. It can be adaptively adjusted according to the dynamic margin of the equipment: when the dynamic margin is sufficient, it can be appropriately increased to improve the frequency response fitting degree, and when the dynamic range is tight, it can be appropriately decreased to enhance safety.
[0063] In one embodiment, step S160, which involves performing frequency band downsampling in the linear amplitude domain based on the target frequency response curve and the measured frequency response curve, and solving for a set of pure attenuation-type frequency domain equalization weight sequences, further includes steps S165 and S166.
[0064] Step S165: Add one zero point to the beginning of the pure attenuation type frequency domain equalization weight sequence so that the total length matches the hardware register index. Step S166: Force the first two frequency points to zero to suppress low-frequency noise and DC bias, and finally output a pure attenuation-type frequency domain equalization weight sequence W. eq [k].
[0065] In this implementation, boundary processing and output are as follows: A zero point is added to the beginning of the weight sequence to match the total length with the hardware register index; the first two frequency points (DC and extremely low frequency) are forcibly set to zero to suppress low-frequency noise and DC bias, and finally, the EQ weight sequence W is output. eq [k].
[0066] In step S160, the linear amplitude domain block arithmetic mean strictly conforms to the linear superposition law of acoustic energy. Compared with direct sampling or dB domain averaging, it eliminates systematic calculation bias, and the frequency band energy characterization is more accurate after downsampling, resulting in higher frequency response fitting accuracy for the final EQ calibration. In existing technologies, inverse filtering gain enhancement is prone to causing clipping and overload. This method generates pure attenuation weights by pre-scaling the gain and truncating the [0,1] interval. The pure attenuation weight design eliminates the risk of digital clipping distortion and speaker mechanical overload caused by gain enhancement in principle. It does not require reserving global dynamic margin and maximizes the preservation of system output loudness. The gain scaling factor can improve the calibration fitting degree under safety constraints, balancing safety and calibration effect. The length and format of the output weights directly match the hardware EQ module without additional conversion, making it highly practical for engineering implementation and directly applicable to mass production calibration.
[0067] Finally, the calculated EQ weight sequence is written into the equalization filter module of the sound reinforcement equipment to be calibrated to complete the frequency response parameter configuration. Then, the frequency domain transmission characteristics of the calibrated system satisfy: Hcalibrated(k)=Hmea(k)∙weq[k], and the measured frequency response is made close to the target frequency response by frequency domain weighting. Finally, preferably, the frequency sweep signal can be played again to collect the calibrated response and backtest the frequency response fitting degree to form a calibration closed loop verification.
[0068] For scenarios with higher stability requirements, multiple independent measurement weighted averaging steps can be added, and the EQ weights obtained from multiple measurements can be taken as an arithmetic average; the number of measurements can be flexibly adjusted according to the need for balancing calibration accuracy and time consumption.
[0069] In this way, the entire process of measurement, calculation and loading is completed automatically, eliminating the need for manual segment-by-segment debugging, greatly improving calibration efficiency and adapting to mass production and rapid field deployment scenarios; closed-loop backtesting can promptly identify abnormal measurement data, preventing invalid calibration results from flowing into subsequent stages and ensuring the consistency of calibration quality.
[0070] In this method, a Farina exponential logarithmic sweep signal with amplitude pre-compensation is generated and played and recorded in both a reference system manually tuned to its optimal state and a new system to be calibrated. After time alignment, deconvolution to extract the impulse response, and octave smoothing to obtain the target and measured frequency response curves, frequency band downsampling is performed in the linear amplitude domain, and the pure attenuation type frequency domain equalization weights are solved. Finally, the signal is automatically written into the new device to complete the frequency response calibration. This method realizes a fully automated closed-loop process from measurement to calibration, avoiding repeated manual adjustments. The unified calculation architecture in the linear amplitude domain and the downsampling mechanism based on hardware EQ band averaging eliminate cross-domain conversion and downsampling deviations, improving physical accuracy. By generating pure attenuation weights through gain pre-scaling and truncation in the [0,1] interval, the signal clipping and device overload risks caused by gain increase are avoided at the source while approximating the target frequency response. In addition, by utilizing the characteristic of harmonics and main pulses being separated in the time domain after Farina sweep deconvolution, a pure linear impulse response can be obtained, effectively suppressing the interference of system nonlinear distortion on frequency response measurement. Example 2
[0071] Corresponding to the method in Example 1, such as Figure 3 As shown, the present invention also provides an automatic frequency response adjustment device 3 for a sound reinforcement device, comprising: a generation module 310, an acquisition module 320, an interception module 330, and a processing module 340.
[0072] The generation module 310 is used to generate a Farina exponential logarithmic sweep frequency excitation signal with amplitude pre-compensation; The acquisition module 320 is used to acquire target frequency sweep recordings and measured frequency sweep recordings, wherein the target frequency sweep recording is the sound recorded by the frequency sweep excitation signal generated when played in the target scene, and the measured frequency sweep recording is the sound recorded by the frequency sweep excitation signal generated when played in the scene to be calibrated. The interception module 330 is used to align the timing of the target sweep frequency recording and the measured sweep frequency recording with the signal timing and to intercept the effective response interval. The processing module 340 is used to perform frequency domain deconvolution on two sets of frequency-sweeping recordings based on the generated frequency-sweeping excitation signal to obtain impulse responses, and to solve for the frequency response using the two sets of impulse responses; to perform frequency response smoothing on the two sets of frequency responses to obtain two sets of smoothed frequency response curves, namely the target frequency response curve and the measured frequency response curve; and to perform frequency band downsampling in the linear amplitude domain based on the target frequency response curve and the measured frequency response curve to solve for a set of pure attenuation type frequency domain equalization weight sequence; wherein, the frequency domain equalization weight sequence is used to write into the equalization filter module of the sound reinforcement device to be calibrated to complete the frequency response parameter configuration, and the sound reinforcement device to be calibrated is the sound reinforcement device in the scene to be calibrated.
[0073] In one implementation, the generation module performs the process of generating the Farina exponential logarithmic sweep excitation signal with amplitude pre-compensation, including: configuring the sampling frequency f. s Given the sweep start frequency f1, sweep end frequency f2, and total sweep duration T, calculate the total number of sampling points. Generate discrete time series ; Define sweep rate factor Calculate the instantaneous phase The original swept frequency signal is generated by integrating the instantaneous frequency over time. ,
[0074] Calculate instantaneous frequency Generate amplitude compensation envelope Peak normalization of the envelope yields Compensated frequency sweep signal ,
[0075] The compensated scan signal s1(n) is faded in and out and the signal is normalized to obtain the generated sweep frequency excitation signal.
[0076] In one implementation, the process of performing fade-in / fade-out and signal normalization on the compensated scan signal s1(n) to obtain the generated sweep frequency excitation signal includes: A linear fade-in / fade-out window of preset duration is applied to the beginning and end of the signal, the peak value is normalized and the signal is limited, and zero-value sampling points are added at the beginning and end to reserve a response buffer, so as to obtain the final generated sweep frequency excitation signal s(n).
[0077] In one implementation, the processing module performs frequency response smoothing on the two sets of frequency responses to obtain two sets of smoothed frequency response curves, namely the target frequency response curve and the measured frequency response curve, including: Let the smoothing granularity be... Octave, for each frequency point f k Determine the upper and lower limits of the smoothing bandwidth: , The smoothed frequency response curve is obtained by taking the arithmetic mean of all dB values within the interval. The target response and the measured response should be processed in exactly the same way to obtain the target smooth frequency response and the measured smooth frequency response.
[0078] In one implementation, the processing module performs the process of performing frequency band downsampling in the linear amplitude domain based on the target frequency response curve and the measured frequency response curve, and solving for a set of pure attenuation-type frequency domain equalization weight sequences, including: The two sets of smooth frequency responses are converted from the dB domain to the linear amplitude domain to obtain the target amplitude sequence and the measured amplitude sequence in the linear domain. Assuming the target EQ module supports a total of K frequency bands and the highest calibration frequency is f2, then the bandwidth of a single frequency band is... Based on the frequency resolution of the original frequency response Calculate the number of original frequency points corresponding to each EQ band. Extract the effective frequency range covering K frequency bands, and divide the linear amplitude sequence into segments... Divide the sample into blocks, and take the arithmetic mean within each block to obtain the target amplitude after downsampling. Compared with the measured amplitude ; Solve for the initial weights, adding a small amount to avoid division by zero: ; Multiplying the initial weights by a preset gain scaling factor G compensates for the calibration intensity in pure attenuation mode, and forcibly truncating the weights to the [0.0, 1.0] interval, yields the pure attenuation frequency domain equalization weight sequence: .
[0079] In one implementation, the process of the processing module performing the step of performing frequency band downsampling in the linear amplitude domain based on the target frequency response curve and the measured frequency response curve, and solving for a set of pure attenuation-type frequency domain equalization weight sequences, further includes: Add a zero point to the beginning of the pure attenuation type frequency domain equalization weight sequence to make the total length match the hardware register index; The first two frequency points are forced to zero to suppress low-frequency noise and DC bias, and the final output is a pure attenuation-type frequency domain equalization weight sequence w. eq [k].
[0080] In one embodiment, the process of aligning the timing of the target sweep recording and the measured sweep recording signals and extracting the timing of the aligned signal from the effective response interval includes: Using the original excitation signal s(n) as a reference, the time delay offset of the response signal is obtained through cross-correlation operation: .
[0081] In this device, a Farina exponential logarithmic sweep frequency signal with amplitude pre-compensation is generated and played and recorded in both a reference system manually tuned to its optimal state and a new system to be calibrated. After time alignment, deconvolution to extract the impulse response, and octave smoothing to obtain the target and measured frequency response curves, frequency band downsampling is performed in the linear amplitude domain, and the pure attenuation type frequency domain equalization weights are solved. Finally, the signal is automatically written into the new device to complete the frequency response calibration. This device realizes a fully automated closed-loop process from measurement to calibration, avoiding repeated manual adjustments. It adopts a unified linear amplitude domain calculation architecture and a downsampling mechanism based on hardware EQ frequency band block averaging, eliminating cross-domain conversion and downsampling deviations and improving physical accuracy. By generating pure attenuation weights through gain pre-scaling and truncation in the [0,1] interval, it approximates the target frequency response while fundamentally avoiding the signal clipping and device overload risks caused by gain boosting. In addition, by utilizing the characteristic of harmonics and main pulses being separated in the time domain after Farina sweep frequency deconvolution, a pure linear impulse response can be obtained, effectively suppressing the interference of system nonlinear distortion on frequency response measurement. Example 3
[0082] This invention also provides a storage medium storing computer instructions that, when executed by a processor, implement the automatic frequency response adjustment method for the sound reinforcement device described in any of the above embodiments.
[0083] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, random access memory (RAM), read-only memory (ROM), magnetic disks, or optical disks.
[0084] Alternatively, if the integrated units of the present invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, terminal, or network device, etc.) to execute all or part of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, RAM, ROM, magnetic disks, or optical disks.
[0085] Corresponding to the computer storage medium described above, one embodiment also provides a computer device, which includes a memory, an encoder, and a computer program stored in the memory and executable on the encoder, wherein the encoder executes the program to implement any of the automatic frequency response adjustment methods for sound reinforcement devices described in the above embodiments.
[0086] The aforementioned computer equipment generates a Farina exponential logarithmic sweep frequency signal with amplitude pre-compensation. This signal is played and recorded in both a manually optimized reference system and a new system to be calibrated. After time alignment, deconvolution to extract the impulse response, and octave smoothing to obtain the target and measured frequency response curves, it performs frequency band downsampling in the linear amplitude domain and solves for pure attenuation-type frequency domain equalization weights. Finally, the data is automatically written to the new device to complete the frequency response calibration. This computer equipment achieves a fully automated closed-loop process from measurement to calibration, avoiding repeated manual adjustments. It employs a unified linear amplitude domain calculation architecture and a downsampling mechanism based on hardware EQ band averaging, eliminating cross-domain conversion and downsampling deviations and improving physical accuracy. By generating pure attenuation weights through gain pre-scaling and truncation in the [0,1] interval, it approximates the target frequency response while fundamentally avoiding the signal clipping and device overload risks caused by gain enhancement. Furthermore, by utilizing the time-domain separation of harmonics and the main pulse after Farina sweep frequency deconvolution, a pure linear impulse response can be obtained, effectively suppressing the interference of system nonlinear distortion on frequency response measurement.
[0087] 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.
[0088] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. An automatic frequency response adjustment method for a sound reinforcement device, characterized in that, include: Generate a Farina exponential logarithmic sweep excitation signal with amplitude pre-compensation; Acquire target frequency sweep recordings and measured frequency sweep recordings, wherein the target frequency sweep recording is the sound recorded by the frequency sweep excitation signal generated when played in the target scene, and the measured frequency sweep recording is the sound recorded by the frequency sweep excitation signal generated when played in the scene to be calibrated; Align the timing of the target sweep frequency recording and the measured sweep frequency recording, and extract the effective response interval; Based on the generated sweep frequency excitation signal, the impulse response is obtained by frequency domain deconvolution of the two sets of sweep frequency recordings, and the frequency response is solved by the two sets of impulse responses. Frequency response smoothing was performed on the two sets of frequency responses to obtain two sets of smoothed frequency response curves, namely the target frequency response curve and the measured frequency response curve. Based on the target frequency response curve and the measured frequency response curve, frequency band downsampling is performed in the linear amplitude domain to solve a set of pure attenuation type frequency domain equalization weight sequence; wherein, the frequency domain equalization weight sequence is used to write into the equalization filter module of the sound reinforcement device to be calibrated in order to complete the frequency response parameter configuration, wherein the sound reinforcement device to be calibrated is the sound reinforcement device in the scene to be calibrated.
2. The automatic frequency response adjustment method for sound reinforcement equipment according to claim 1, characterized in that, The process of generating the Farina exponential logarithmic sweep excitation signal with amplitude pre-compensation includes: Configure sampling frequency f s Given the sweep start frequency f1, sweep end frequency f2, and total sweep duration T, calculate the total number of sampling points. Generate discrete time series ; Define sweep rate factor Calculate the instantaneous phase The original swept frequency signal is generated by integrating the instantaneous frequency over time. ; Calculate instantaneous frequency Generate amplitude compensation envelope Peak normalization of the envelope yields Compensated frequency sweep signal ; The compensated scanning signal S1(n) is faded in and out and the signal is normalized to obtain the generated sweep frequency excitation signal.
3. The automatic frequency response adjustment method for sound reinforcement equipment according to claim 2, characterized in that, The process of performing fade-in / fade-out and signal normalization on the compensated scanning signal S1(n) to obtain the generated sweep frequency excitation signal includes: A linear fade-in / fade-out window of preset duration is applied to the beginning and end of the signal, the peak value is normalized and the signal is limited, and zero-value sampling points are added at the beginning and end to reserve a response buffer, so as to obtain the final generated sweep frequency excitation signal S(n).
4. The automatic frequency response adjustment method for sound reinforcement equipment according to claim 1, characterized in that, The process of smoothing the two sets of frequency responses to obtain two smoothed frequency response curves, namely the target frequency response curve and the measured frequency response curve, includes: Let the smoothing granularity be... Octave, for each frequency point f k Determine the upper and lower limits of the smoothing bandwidth: , The smoothed frequency response curve is obtained by taking the arithmetic mean of all dB values within the interval. The target response and the measured response should be processed in exactly the same way to obtain the target smooth frequency response and the measured smooth frequency response.
5. The automatic frequency response adjustment method for sound reinforcement equipment according to claim 1, characterized in that, The process of performing frequency band downsampling in the linear amplitude domain based on the target frequency response curve and the measured frequency response curve, and solving for a set of pure attenuation-type frequency domain equalization weight sequences, includes: The two sets of smooth frequency responses are converted from the dB domain to the linear amplitude domain to obtain the target amplitude sequence and the measured amplitude sequence in the linear domain. Assuming the target EQ module supports a total of K frequency bands and the highest calibration frequency is f2, then the bandwidth of a single frequency band is... Based on the frequency resolution of the original frequency response Calculate the number of original frequency points corresponding to each EQ band. Extract the effective frequency range covering K frequency bands, and divide the linear amplitude sequence into segments... Divide the sample into blocks, and take the arithmetic mean within each block to obtain the target amplitude after downsampling. Solve for the initial weights, adding a small amount to avoid division by zero: ; Multiplying the initial weights by a preset gain scaling factor G compensates for the calibration intensity in pure attenuation mode, and forcibly truncating the weights to the [0.0, 1.0] interval, yields the pure attenuation frequency domain equalization weight sequence: .
6. The automatic frequency response adjustment method for sound reinforcement equipment according to claim 5, characterized in that, The process of performing frequency band downsampling in the linear amplitude domain based on the target frequency response curve and the measured frequency response curve, and solving for a set of pure attenuation-type frequency domain equalization weight sequences, further includes: Add a zero point to the beginning of the pure attenuation type frequency domain equalization weight sequence to make the total length match the hardware register index; The first two frequency points are forced to zero to suppress low-frequency noise and DC bias, and the final output is a pure attenuation-type frequency domain equalization weight sequence W. eq [k].
7. The automatic frequency response adjustment method for sound reinforcement equipment according to claim 1, characterized in that, The process of aligning the timing of the target frequency sweep recording and the measured frequency sweep recording signals and extracting the timing of the aligned signals from the effective response interval includes: Using the original excitation signal S(n) as a reference, the time delay offset of the response signal is obtained through cross-correlation operation: .
8. An automatic frequency response adjustment device for a sound reinforcement system, characterized in that, include: The generation module is used to generate the Farina exponential logarithmic sweep excitation signal with amplitude pre-compensation; The acquisition module is used to acquire target frequency sweep recordings and measured frequency sweep recordings, wherein the target frequency sweep recording is the sound recorded by the frequency sweep excitation signal generated when played in the target scene, and the measured frequency sweep recording is the sound recorded by the frequency sweep excitation signal generated when played in the scene to be calibrated. The interception module is used to align the timing of the target frequency sweep recording and the measured frequency sweep recording and to intercept the effective response interval. The processing module is used to perform frequency domain deconvolution on two sets of frequency-sweeping recordings based on the generated frequency-sweeping excitation signal to obtain the impulse response, and then use the two sets of impulse responses to solve for the frequency response; the two sets of frequency responses are smoothed to obtain two sets of smoothed frequency response curves, namely the target frequency response curve and the measured frequency response curve; based on the target frequency response curve and the measured frequency response curve, frequency band downsampling is performed in the linear amplitude domain to solve for a set of pure attenuation type frequency domain equalization weight sequence; wherein, the frequency domain equalization weight sequence is used to write into the equalization filter module of the sound reinforcement device to be calibrated to complete the frequency response parameter configuration, and the sound reinforcement device to be calibrated is the sound reinforcement device in the scene to be calibrated.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
