Automatic audio equipment debugging method and system based on curve comparison

By playing a standard sound source, collecting frequency response curves and comparing them, and using a greedy iterative algorithm to optimize audio parameters, the problem of low efficiency in manual debugging of audio equipment is solved, and efficient and accurate automated debugging is achieved.

CN121509889APending Publication Date: 2026-02-10SHANGHAI MOSHON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511736652.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

In existing technologies, the audio parameter adjustment of audio devices relies on manual listening, which is inefficient and dependent on experience, making it difficult to achieve efficient and accurate automated adjustment.

Method used

By controlling the device under test to play a standard sound source, the measured frequency response curve based on the frequency domain is collected and generated. The amplitude and phase are compared, and the audio parameters are optimized using a greedy iterative algorithm to achieve automated debugging.

Benefits of technology

It improves the efficiency, accuracy, and reliability of audio equipment debugging, reduces debugging costs, and enables automated optimization of audio parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121509889A_ABST
    Figure CN121509889A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of audio debugging, and particularly relates to an audio equipment automatic debugging method and system based on curve comparison. The audio equipment automatic debugging method comprises the following steps: controlling equipment to be tested to play a standard sound source to obtain a target sound signal; collecting the target sound signal, and generating an actual measurement frequency response curve based on a frequency domain through preprocessing; performing amplitude and phase comparison on the actually measured frequency response curve and a preset target curve to obtain an amplitude error and a phase error; and according to the amplitude error and the phase error, a greedy iterative algorithm is adopted to optimize the audio parameters of the to-be-tested equipment, so that automatic debugging of the audio parameters is realized, the debugging efficiency, reliability and accuracy are improved, and the debugging cost is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of audio debugging, and in particular to an audio device automatic debugging method and system based on curve comparison. BACKGROUND

[0002] In the manufacturing process of products with audio functions (such as smart speakers, video cameras with calling functions, etc.), the final audio performance debugging is a key link to ensure product quality and user experience. The audio signal link is usually composed of digital-to-analog converters (DACs), audio amplifiers, speakers, etc., and digital audio signals are transmitted outward through digital-to-analog converters (DACs), audio amplifiers, and speakers. However, due to the following reasons:

[0003] 1. Tolerance of audio devices: there are inherent manufacturing tolerances in core components such as speakers and audio amplifiers;

[0004] 2. Structural assembly differences: small assembly differences exist in the cooperation of speakers and sound cavities, the damping of sound holes, and the internal acoustic structure;

[0005] 3. Device aging and drift: the parameters of components may drift during operation and aging;

[0006] These factors result in objective individual differences in the output sound pressure level (SPL) and frequency response curve (FR) of products of the same batch and model.

[0007] Therefore, each product needs to be fine-tuned for its audio parameters (such as EQ equalizer, gain, etc.) on the production line before it leaves the factory, so that its output characteristics approach the "fidelity" state or meet the preset target frequency response curve and distortion index. This work has become a key step to improve product consistency and quality.

[0008] Currently, a large number of production lines still generally use traditional manual sound listening debugging methods, which mainly rely on experienced engineers or technicians to listen to test music and view audio curves through the human ear, subjectively judge the quality of sound, and manually adjust the audio parameters on the software interface. This traditional method requires a large amount of manual operation and relies on personnel experience, which has become a bottleneck for improving production efficiency and product quality.

[0009] Therefore, it is necessary to provide a technical solution that can automatically debug audio parameters. SUMMARY

[0010] To solve the above technical problems, the present application provides an audio device automatic debugging method and system based on curve comparison.

[0011] The application provides an audio device automatic debugging method based on curve comparison, comprising the following specific steps.

[0012] A standard sound source is played by a to-be-tested device to obtain a target sound signal.

[0013] The target sound signal is collected, and a measured frequency response curve based on a frequency domain is generated through preprocessing.

[0014] The measured frequency response curve is compared with a preset target curve in amplitude and phase to obtain amplitude error and phase error.

[0015] According to the amplitude error and the phase error, a greedy iteration algorithm is used to optimize the audio parameters of the to-be-tested device.

[0016] In a possible implementation, before the standard sound source is played by the to-be-tested device, the measuring microphone and the collection channel used for collecting the target sound signal are calibrated by using the standard sound source.

[0017] In a possible implementation, the process of collecting the target sound signal is performed in a soundproof box.

[0018] In a possible implementation, the target sound signal is collected, and a measured frequency response curve based on a frequency domain is generated through preprocessing, specifically comprising the following steps.

[0019] The target sound signal is collected to obtain an original time domain signal.

[0020] The original time domain signal is subjected to a direct current offset processing to obtain a first time domain signal.

[0021] The first time domain signal is subjected to a windowing processing to obtain a second time domain signal.

[0022] The second time domain signal is subjected to an FFT calculation to obtain a measured frequency response curve based on a frequency domain.

[0023] In a possible implementation, the measured frequency response curve comprises a frequency amplitude curve and a frequency phase spectrum curve.

[0024] The second time domain signal is subjected to an FFT calculation to obtain a measured frequency response curve based on a frequency domain, specifically comprising the following steps.

[0025] The second time domain signal is subjected to an FFT calculation to obtain a frequency domain signal function.

[0026] An amplitude value function is calculated according to the frequency domain signal function.

[0027] The amplitude value function is converted into a decibel value function to obtain a frequency amplitude curve.

[0028] According to phase information of the frequency domain signal function, a frequency phase spectrum curve is obtained.

[0029] In a possible implementation, the preset target curve includes a preset amplitude curve and a preset phase curve.

[0030] When the measured frequency response curve is compared with the preset target curve in amplitude and phase, the frequency amplitude curve is compared with the preset amplitude curve to obtain an amplitude error, and the frequency phase spectrum curve is compared with the preset phase curve to obtain a phase error.

[0031] In a possible implementation, the frequency amplitude curve is expressed by the following formula:

[0032] ;

[0033] wherein f k is an actual frequency of the kth frequency point, |X(k)| is an amplitude value of the kth frequency point, |X ref | is a reference amplitude.

[0034] In a possible implementation, the frequency phase spectrum curve is expressed by the following formula:

[0035] ;

[0036] wherein f k is an actual frequency of the kth frequency point, Im[X(k)] is an imaginary part of a complex frequency domain value of the kth frequency point, and Re[X(k)] is a real part of the complex frequency domain value of the kth frequency point.

[0037] In a possible implementation, the error calculation method used when the amplitude and phase are compared includes a frequency-by-frequency amplitude error calculation and a global L2 norm or A weighted error calculation.

[0038] The application further provides an audio device automatic debugging system based on curve comparison, comprising:

[0039] A sound source playing module is configured to control a standard sound source to be played by a device to be tested, so as to obtain a target sound signal.

[0040] A signal collecting and analyzing module is configured to collect the target sound signal and generate a measured frequency response curve based on a frequency domain through pre-processing.

[0041] A curve comparison module is configured to compare the measured frequency response curve with a preset target curve in amplitude and phase, so as to obtain an amplitude error and a phase error.

[0042] A parameter optimization module is configured to optimize audio parameters of the device to be tested by using a greedy iteration algorithm according to the amplitude error and the phase error.

[0043] The technical solution provided by this invention has at least the following beneficial effects:

[0044] By controlling the device under test to play a standard sound source, and collecting and preprocessing to generate a measured frequency response curve based on the frequency domain, the amplitude and phase of the curve are compared with the preset target curve. Finally, a greedy iterative algorithm is used to optimize the audio parameters of the device under test, thereby realizing automated debugging of audio parameters. This not only improves debugging efficiency, reliability and accuracy, but also effectively reduces debugging costs. Attached Figure Description

[0045] Figure 1 This is a flowchart of an automatic audio device debugging method based on curve comparison provided in an embodiment of this application. Detailed Implementation

[0046] To enhance understanding of the present invention, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. These embodiments are only used to explain the invention and do not limit the scope of protection of the invention.

[0047] Please refer to Figure 1 The present invention provides an automatic audio device debugging method based on curve comparison, which includes the following specific steps:

[0048] S100: Controls the device under test to play a standard sound source to obtain the target sound signal.

[0049] In this embodiment, the standard sound source can be a standard audio sample provided by a standard audio sample library, such as a 20Hz-20KHz linear sweep signal, pink noise, and other specific samples.

[0050] In one possible implementation, before controlling the device under test to play a standard sound source, the measurement microphone and acquisition channel used to acquire the target sound signal are calibrated using the standard sound source.

[0051] In this embodiment, the measuring microphone can be a multi-channel microphone array, and the acquisition channel can consist of a preamplifier and an audio acquisition card. After the system starts up, a self-test is performed, and the measuring microphone and acquisition channel are calibrated using a standard sound source to ensure the accuracy of the measurement reference.

[0052] S200: Acquire the target sound signal and generate a measured frequency response curve based on the frequency domain through preprocessing.

[0053] In this embodiment, the acquisition of the target sound signal can be achieved by a high-precision audio acquisition module, which can consist of a multi-channel microphone array, a preamplifier, and an audio acquisition card. Preprocessing can be performed by an automated control and processing module. The raw acquisition signal obtained from the target sound signal is a time-domain signal. The core purpose of preprocessing the raw acquisition signal is to eliminate key invalid interference and calculation errors, while converting the time-domain signal into high-fidelity frequency-domain data that can be used for subsequent curve comparison. The accuracy of the preprocessed data directly determines the accuracy of the subsequent curve comparison. The automated control and processing module can consist of an industrial PC or embedded industrial control unit, equipped with audio analysis software and related debugging algorithm units.

[0054] In one possible implementation, the process of acquiring the target sound signal is carried out in a soundproof box.

[0055] In this embodiment, the data acquisition is performed in a soundproof box, which can effectively eliminate environmental noise interference.

[0056] In one possible implementation, step S200 specifically includes:

[0057] The target sound signal is acquired to obtain the original time-domain signal;

[0058] The original time-domain signal is subjected to DC offset removal processing to obtain the first time-domain signal;

[0059] The first time-domain signal is windowed to obtain the second time-domain signal;

[0060] Perform FFT calculation on the second time-domain signal to obtain the measured frequency response curve based on the frequency domain.

[0061] In this embodiment, when removing DC offset, the mean time domain of the original time domain signal is calculated and subtracted from each acquisition point to remove the invalid DC offset component and restore the true low-frequency signal.

[0062] The formula for calculating the time-domain mean of the original time-domain signal is:

[0063] ;

[0064] The formula for calculating the first time-domain signal after DC offset removal is as follows:

[0065] ;

[0066] Where x(n) is the original time-domain signal acquired, n is the sampling point index, 0≤n≤N-1, N is the total number of samples, i.e. the number of FFT points, and both n and N are integers.

[0067] Windowing can smooth signal edges, reduce spectral leakage, and improve frequency resolution. Here, the Hanning window can be used for calculation.

[0068] .

[0069] S300: Compare the measured frequency response curve with the preset target curve in terms of amplitude and phase to obtain the amplitude error and phase error.

[0070] In this embodiment, the amplitude and phase comparison operations can be completed by an automated control and processing module.

[0071] In one possible implementation, the measured frequency response curve includes a frequency amplitude curve and a frequency phase spectrum curve;

[0072] Performing FFT calculations on the second time-domain signal to obtain the measured frequency response curve based on the frequency domain includes the following steps:

[0073] Perform FFT calculation on the second time-domain signal to obtain the frequency-domain signal function;

[0074] Calculate the amplitude value function based on the frequency domain signal function;

[0075] The amplitude function is converted into a decibel function to obtain the frequency amplitude curve;

[0076] The frequency-phase spectrum curve is obtained based on the phase information of the frequency domain signal function.

[0077] In this embodiment, the formula for calculating the frequency domain signal function obtained by performing FFT calculation on the windowed signal is as follows:

[0078] ;

[0079] Where k is the frequency index, 0≤k≤N-1, and X(k) is the complex frequency domain value of the k-th frequency point.

[0080] The amplitude value function used to calculate the amplitude value is expressed by the following formula:

[0081] ;

[0082] Where Re[X(k)] is the real part of the complex frequency domain value, and Im[X(k)] is the imaginary part of the complex frequency domain value.

[0083] In one possible implementation, the preset target curve includes a preset amplitude curve and a preset phase curve;

[0084] When comparing the measured frequency response curve with the preset target curve in terms of amplitude and phase, the amplitude error is obtained by comparing the frequency amplitude curve with the preset amplitude curve, and the phase error is obtained by comparing the frequency phase spectrum curve with the preset phase curve.

[0085] In this embodiment, the preset amplitude curve can be A. target (f) represents the expected amplitude curve of a standard audio signal. The frequency amplitude curve can be represented by A. measure (f) represents the audio amplitude curve obtained after preprocessing and FFT of the actual acquired signal. In the amplitude error, the single-frequency amplitude error ΔA(f) is... k )=A measure (f k )-A target (f k ).

[0086] The preset phase curve can be used with Φ target (f) represents the expected phase curve of a standard audio signal. The frequency phase spectrum curve can be represented by Φ. measure (f) represents the audio phase curve obtained after preprocessing and FFT of the actual acquired signal. In the phase error, the point-by-point phase error E... Φ (f)=Φ measure (f)-Φ target (f). To prevent overcorrection of frequency points with small phase errors, if |E Φ (f)|≤E Φ_threshod Then set E Φ (f)=0. E Φ_threshod A predefined phase threshold.

[0087] In one possible implementation, the frequency amplitude curve is expressed by a formula, i.e., a decibel value function, as follows:

[0088] ;

[0089] Among them, f k Let |X(k)| be the actual frequency of the k-th frequency point, and |X(k)| be the amplitude value of the k-th frequency point. ref |As a reference range, A(f) k The amplitude value at the calculated k-th frequency point (i.e., the amplitude value of the measured frequency response curve, used to compare with the preset amplitude curve A) is... target (f k (to be compared).

[0090] In this embodiment, A measure (f)=A(f k Reference range | X refTypically, the maximum amplitude across the entire frequency range, or the output amplitude of a standard sound source, is used to ensure that the dB value is a relative amplitude. k The calculation formula is as follows:

[0091] ;

[0092] Among them, F s Where N is the sampling rate and N is the number of FFT points.

[0093] It should be noted that the parameters of FFT (sampling rate F) s The number of FFT points N determines the frequency resolution Δf=F s / N determines the analysis accuracy across the entire audio frequency range. For example, the sampling rate F s =96kHz, FFT points N=32768, then Δf=96000 / 32768≈2.93Hz. This provides approximately 3Hz intervals within the 20Hz~20kHz frequency band, sufficient for frequency-by-frequency optimization in audio tuning. The index k corresponding to 20Hz... 20Hz =20×32768 / 96000≈6.83, rounded down, k=7 (corresponding to a frequency of approximately 20.51Hz). 20kHz corresponds to index k. 20kHz =20000×32768 / 96000≈682.67, rounded down, k=682 (corresponding to a frequency of approximately 19997.07Hz). The number of effective frequency points corresponding to 20Hz~20kHz is N=682–7+1=676.

[0094] In one possible implementation, the frequency phase spectrum curve is expressed by the following formula:

[0095] ;

[0096] Among them, f k Let X(k) be the actual frequency of the k-th frequency point, Im[X(k)] be the imaginary part of the complex frequency domain value of the k-th frequency point, and Re[X(k)] be the real part of the complex frequency domain value of the k-th frequency point.

[0097] In this embodiment, Φ(f) k ) can provide data for phase error comparison, Φ measure (f k )=Φ(f k It should be noted that, in addition to amplitude, the phase characteristics of audio (the delay of the signal at different frequencies) also affect the listening experience (e.g., phase consistency in a multi-channel system). Therefore, phase information Φ(f) needs to be output simultaneously with the FFT calculation. k ).

[0098] In one possible implementation, the error calculation methods used when performing amplitude and phase comparisons include frequency-by-frequency amplitude error calculation and global L2 norm or A-weighted error calculation.

[0099] S400: Based on the amplitude error and the phase error, a greedy iterative algorithm is used to optimize the audio parameters of the device under test.

[0100] In this embodiment, the device under test (DUT) is equipped with a debugging interface (for writing EQ parameters, filter parameters, etc.). The automation control and processing module is connected to the DUT's debugging interface via a communication interface circuit (such as USB, UART serial port, etc.). The automation control and processing module is used to implement the greedy iterative algorithm and to write optimized audio parameters to the DUT. In specific implementation, phase error correction uses a second-order all-pass filter, which only corrects the phase and has no effect on the amplitude.

[0101] In one specific implementation, the error calculation method used during amplitude comparison is global A-weighted error calculation. After obtaining the amplitude error and phase error through step S300, if the global A-weighted amplitude error E... total Greater than the specified error threshold E target And the number of amplitude adjustments did not exceed the specified threshold T. e To correct the amplitude error, the procedure is as follows:

[0102] Calculate the weighting error E for all EQ bands. n And error contribution C n Find the EQ frequency band n with the largest error contribution;

[0103] Calculate the A-weighted average error of the selected frequency band, and calculate the EQ adjustment gain ΔGain according to the formula;

[0104] Calculate the A-weighted error weighted standard deviation σ of the selected frequency band. n And calculate the Q value of the new EQ for that channel. new ;

[0105] Set the EQ parameters that were just calculated, and return to step S200 to resample and re-verify the adjustment effect;

[0106] If the amplitude error correction is complete, then begin correcting the phase error: calculate the global phase error E. Φ_total If the error is greater than the specified error threshold E Φ_target And the number of phase error adjustments did not exceed the specified threshold T. Φ If the phase error continues to be adjusted, the procedure is as follows:

[0107] Scan the entire frequency band and find the frequency point f with the largest phase error. φc =argmax(Δφn As the correction center point for this phase iteration, the phase difference needs to be corrected to be -Δφ. c ;

[0108] The frequency point [f] that needs to be corrected in this phase correction iteration is calculated according to the formula. L ,f R Using Q and Q values, create a second-order all-pass filter (APF). fφc (f c Q φc ,-Δφ c ), and add it to the cascaded filter bank for phase correction. Simultaneously, the set of frequencies already corrected [f] L ,f R Remove it from the overall frequency list to prevent it from being scanned again in the next iteration;

[0109] Return to step S200 to perform a new error calculation and verify the effect.

[0110] The above process forms a closed-loop feedback loop (collection-analysis-adjustment-verification), which continues until the audio output performance fully meets the preset target requirements. After debugging, the system automatically records the final parameters, comparison of indicators before and after debugging, product serial number, and other information, and generates a test report. The data can be uploaded to the factory's Manufacturing Execution System (MES) to achieve quality traceability and production data visualization.

[0111] The present invention also provides an automatic audio device debugging system based on curve comparison, comprising:

[0112] The sound source playback module is used to control the device under test to play a standard sound source and obtain the target sound signal;

[0113] The signal acquisition and analysis module is used to acquire the target sound signal and generate a measured frequency response curve based on the frequency domain through preprocessing.

[0114] The curve comparison module is used to compare the measured frequency response curve with the preset target curve in terms of amplitude and phase to obtain the amplitude error and phase error.

[0115] The parameter optimization module is used to optimize the audio parameters of the device under test using a greedy iterative algorithm based on the amplitude error and the phase error.

[0116] The above embodiments should not limit the present invention in any way. All technical solutions obtained by equivalent substitution or equivalent conversion fall within the protection scope of the present invention.

Claims

1. An automatic audio device debugging method based on curve comparison, characterized in that, The specific steps include the following: Control the device under test to play a standard sound source to obtain the target sound signal; The target sound signal is acquired, and a measured frequency response curve based on the frequency domain is generated through preprocessing. The measured frequency response curve is compared with the preset target curve in terms of amplitude and phase to obtain the amplitude error and phase error. Based on the amplitude error and the phase error, a greedy iterative algorithm is used to optimize the audio parameters of the device under test.

2. The automatic audio device debugging method according to claim 1, characterized in that, Before controlling the device under test to play a standard sound source, the method also includes calibrating the measurement microphone and acquisition channel used to acquire the target sound signal using the standard sound source.

3. The automatic audio device debugging method according to claim 1, characterized in that, The process of acquiring the target sound signal is carried out in a soundproof box.

4. The automatic audio device debugging method according to claim 1, characterized in that, The target sound signal is acquired, and a measured frequency response curve based on the frequency domain is generated through preprocessing. This process includes the following steps: The target sound signal is acquired to obtain the original time-domain signal; The original time-domain signal is subjected to DC offset removal processing to obtain the first time-domain signal; The first time-domain signal is windowed to obtain the second time-domain signal; Perform FFT calculation on the second time-domain signal to obtain the measured frequency response curve based on the frequency domain.

5. The automatic audio device debugging method according to claim 4, characterized in that, The measured frequency response curve includes the frequency amplitude curve and the frequency phase spectrum curve; Performing FFT calculations on the second time-domain signal to obtain the measured frequency response curve based on the frequency domain includes the following steps: Perform FFT calculation on the second time-domain signal to obtain the frequency-domain signal function; Calculate the amplitude value function based on the frequency domain signal function; The amplitude function is converted into a decibel function to obtain the frequency amplitude curve; The frequency-phase spectrum curve is obtained based on the phase information of the frequency domain signal function.

6. The automatic audio device debugging method according to claim 5, characterized in that, The preset target curve includes a preset amplitude curve and a preset phase curve; When comparing the measured frequency response curve with the preset target curve in terms of amplitude and phase, the amplitude error is obtained by comparing the frequency amplitude curve with the preset amplitude curve, and the phase error is obtained by comparing the frequency phase spectrum curve with the preset phase curve.

7. The automatic audio device debugging method according to claim 5, characterized in that, The frequency amplitude curve is expressed by the following formula: ; Among them, f k Let |X(k)| be the actual frequency of the k-th frequency point, and |X(k)| be the amplitude value of the k-th frequency point. ref |This is a reference range.

8. The automatic audio device debugging method according to claim 5, characterized in that, The frequency-phase spectrum curve is expressed by the following formula: ; Among them, f k Let X(k) be the actual frequency of the k-th frequency point, Im[X(k)] be the imaginary part of the complex frequency domain value of the k-th frequency point, and Re[X(k)] be the real part of the complex frequency domain value of the k-th frequency point.

9. The automatic audio device debugging method according to claim 1, characterized in that, The error calculation methods used when performing amplitude and phase comparisons include frequency-by-frequency amplitude error calculation and global L2 norm or A-weighted error calculation.

10. An automatic audio device debugging system based on curve comparison, characterized in that, include: The sound source playback module is used to control the device under test to play a standard sound source and obtain the target sound signal; The signal acquisition and analysis module is used to acquire the target sound signal and generate a measured frequency response curve based on the frequency domain through preprocessing. The curve comparison module is used to compare the measured frequency response curve with the preset target curve in terms of amplitude and phase to obtain the amplitude error and phase error. The parameter optimization module is used to optimize the audio parameters of the device under test using a greedy iterative algorithm based on the amplitude error and the phase error.