Method and device for detecting distortion of loudspeaker and medium
By using a combined excitation technology of target frequency and tiny excitation signals in the speaker, combined with fast Fourier transform analysis, the harmonic distortion of the speaker is accurately detected, which solves the problem of environmental noise impact and improves the reliability of the detection results.
Patent Information
- Application Number
- CN202510549350.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, it is difficult for speakers to effectively reduce the impact of environmental noise on harmonic distortion during testing, resulting in inaccurate detection results.
By energizing the speaker with the first excitation signal and the micro excitation signal of the target frequency to generate sound, collecting the response signal through the microphone, analyzing the signal spectrum using algorithms such as Fast Fourier Transform to determine the harmonic distortion after the speaker removes noise, including total harmonic distortion and higher order harmonic distortion.
The impact of ambient noise on speaker harmonic distortion is reduced, and the accuracy and reliability of distortion detection are improved.
Smart Images

Figure CN120343482A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the technical field of loudspeakers, and more particularly, to a method, apparatus, and medium for detecting distortion of a loudspeaker. Background Art
[0002] In recent years, with the rapid development of communication technologies and the continuous improvement of people's living standards, mobile communication devices have been increasingly used by consumers. To meet various needs of people, loudspeakers have become essential accessories in mobile communication devices. There are many types of loudspeakers that can be applied inside mobile communication devices. Although they work in different ways, ultimately they all generate mechanical vibrations to push the surrounding air, causing fluctuations in the air medium to achieve the conversion of "electricity - force - sound". Due to reasons such as the structure, materials, and processes of the loudspeaker, various distortion situations may occur during the actual use of the loudspeaker. Among them, the most common type of distortion is harmonic distortion. Harmonic distortion refers to the situation where when a sinusoidal signal of a certain frequency is input to the loudspeaker, in the sound signal output by the loudspeaker, in addition to the fundamental component of the input signal, second harmonics, third harmonics, etc. also appear. The appearance of harmonic distortion signals will make people feel inharmonious and harsh in hearing, affecting people's auditory experience. Therefore, in order to ensure the quality of mobile communication devices, manufacturers will test various performance indicators of the loudspeaker before installing it.
[0003] However, the performance indicators of the anechoic chamber or acoustic enclosure used for loudspeaker testing are determined by their size and structure, and it is impossible to completely achieve the effect of full anechoic. Environmental noise has a greater impact on the low - frequency distortion test of micro - loudspeakers. Summary of the Invention
[0004] An object of embodiments of the present disclosure is to provide a new technical solution for reducing the influence of environmental noise when detecting the distortion of a loudspeaker.
[0005] According to a first aspect of embodiments of the present disclosure, there is provided a method for detecting distortion of a loudspeaker, including:
[0006] Exciting the loudspeaker to emit sound with a first excitation signal of a target frequency, and collecting a first response signal of the first excitation signal through a microphone;
[0007] Exciting the loudspeaker to emit sound with a small excitation signal of the target frequency, and collecting a second response signal of the small excitation signal through the microphone;
[0008] Determining, according to the first response signal and the second response signal, the harmonic distortion corresponding to the target frequency after removing noise from the loudspeaker, where the harmonic distortion includes total harmonic distortion and / or higher - order harmonic distortion.
[0009] Optionally, determining the harmonic distortion corresponding to the target frequency after noise removal of the speaker according to the first response signal and the second response signal includes:
[0010] Determining a first fundamental sound pressure corresponding to the fundamental wave of the first response signal and first harmonic sound pressures corresponding to harmonics of each order in a first order set; the first order set includes positive integers greater than 1;
[0011] Determining second harmonic sound pressures corresponding to harmonics of each order in the first order set of the second response signal;
[0012] Obtaining the harmonic distortion according to the first fundamental sound pressure, the first harmonic sound pressures, and the second harmonic sound pressures.
[0013] Optionally, the harmonic distortion includes total harmonic distortion;
[0014] Obtaining the total harmonic distortion according to the first fundamental sound pressure, the first harmonic sound pressures, and the second harmonic sound pressures includes:
[0015] Obtaining a total harmonic sound pressure after noise removal according to the first harmonic sound pressures and the second harmonic sound pressures;
[0016] Obtaining the total harmonic distortion according to the total harmonic sound pressure and the first fundamental sound pressure.
[0017] Optionally, obtaining the total harmonic sound pressure after noise removal according to the first harmonic sound pressures and the second harmonic sound pressures includes:
[0018] For each order corresponding to the first order set, determining a square difference between the corresponding first harmonic sound pressure and second harmonic sound pressure;
[0019] Determining a square root of a sum of the square differences corresponding to each order of the first order set as the total harmonic sound pressure.
[0020] Optionally, obtaining the total harmonic distortion according to the total harmonic sound pressure and the first fundamental sound pressure includes:
[0021] Determining a sum of squares of the first fundamental sound pressure and the total harmonic sound pressure;
[0022] Determining a ratio between the total harmonic sound pressure and the sum of squares as the total harmonic distortion.
[0023] Optionally, the harmonic distortion includes high-order harmonic distortion;
[0024] Obtaining the high-order harmonic distortion according to the first fundamental sound pressure, the first harmonic sound pressures, and the second harmonic sound pressures includes:
[0025] Based on the first harmonic sound pressure and the second harmonic sound pressure, a higher-order harmonic sound pressure after noise removal is obtained;
[0026] Based on the higher-order harmonic sound pressure, the higher-order harmonic distortion corresponding to the target frequency after noise removal of the loudspeaker is determined.
[0027] Optionally, the obtaining the higher-order harmonic sound pressure after noise removal based on the first harmonic sound pressure and the second harmonic sound pressure includes:
[0028] For each order in the second order set, a square difference between the corresponding first harmonic sound pressure and the second harmonic sound pressure is determined; wherein, the second order set is a subset of the first order set, and the second order set includes positive integers greater than a set value;
[0029] The square root of the sum of the square differences corresponding to each order in the second order set is determined as the higher-order harmonic sound pressure.
[0030] Optionally, the method further includes:
[0031] A first swept-frequency signal is obtained, wherein the first swept-frequency signal includes first excitation signals of multiple frequencies, and the multiple frequencies include the target frequency;
[0032] The multiple frequencies of the first swept-frequency signal are traversed, and a tiny excitation signal corresponding to the currently traversed frequency is added after the first excitation signal of the currently traversed frequency to obtain a second swept-frequency signal;
[0033] The exciting the loudspeaker to emit sound with the first excitation signal of the target frequency, and collecting a first response signal of the first excitation signal through a microphone; exciting the loudspeaker to emit sound with the tiny excitation signal of the target frequency, and collecting a second response signal of the tiny excitation signal through the microphone includes:
[0034] The exciting the loudspeaker to emit sound with the second swept-frequency signal, and collecting a first response signal of the first excitation signal corresponding to each frequency and a second response signal of the tiny excitation signal corresponding to each frequency through the microphone.
[0035] According to a second aspect of the present disclosure, a distortion detection device for a loudspeaker is provided, including:
[0036] A first excitation module, configured to excite the loudspeaker to emit sound with a first excitation signal of a target frequency, and collect a first response signal of the first excitation signal through a microphone;
[0037] A second excitation module, configured to excite the loudspeaker to emit sound with the tiny excitation signal of the target frequency, and collect a second response signal of the tiny excitation signal through the microphone;
[0038] A distortion detection module, configured to determine, according to the first response signal and the second response signal, the harmonic distortion corresponding to the target frequency after the noise of the speaker is removed, where the harmonic distortion includes total harmonic distortion and / or high-order harmonic distortion.
[0039] According to a third aspect of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in the first aspect of the present disclosure is implemented.
[0040] Through the embodiments of the present disclosure, the speaker is excited to emit sound by a first excitation signal at a target frequency, and a first response signal of the first excitation signal is collected by a microphone. The speaker is excited to emit sound by a minute excitation signal at the target frequency, and a second response signal of the minute excitation signal is collected by the microphone. According to the first response signal and the second response signal, the harmonic distortion corresponding to the target frequency after the noise of the speaker is removed is determined, so that the influence of the noise on the harmonic distortion of the speaker can be reduced, and the obtained distortion detection result of the speaker is more accurate and reliable.
[0041] Other features and advantages of the present invention will become clear through the following detailed description of the exemplary embodiments of the present invention with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings incorporated in the specification and constituting a part of the specification illustrate embodiments of the present invention and, together with the description, are used to explain the principles of the present invention.
[0043] Figure 1 is a block diagram of a distortion detection system of a speaker according to an embodiment of the present disclosure;
[0044] Figure 2 is a flowchart of a distortion detection method of a speaker according to an embodiment of the present disclosure;
[0045] Figure 3 is a block diagram of a distortion detection device of a speaker according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] Now, various exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be noted that: unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions and values set forth in these embodiments do not limit the scope of the present invention.
[0047] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present invention, its application, or its use.
[0048] Known technologies, methods, and devices that are known to those of ordinary skill in the relevant art may not be discussed in detail, but in appropriate cases, the technologies, methods, and devices should be regarded as part of the specification.
[0049] In all examples shown and discussed here, any specific value should be construed as merely exemplary and not as a limitation. Thus, other examples of the exemplary embodiments may have different values.
[0050] It should be noted that like reference numerals and letters denote like items in the following figures, and thus, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0051] <System Embodiment>
[0052] The present disclosure provides a distortion detection system for a speaker, as Figure 1 shown, the distortion detection system 1000 may include a sound card 1100, a first power amplifier 1200, a microphone 1300, a second power amplifier 1400, and a distortion detection device 1500.
[0053] In this embodiment, the distortion detection device 1500 may output an excitation signal to the first power amplifier 1200 through the sound card 1100. The first power amplifier 1200 amplifies the excitation signal and then excites the speaker 2000 to emit sound. The microphone 1300 collects the response signal of the excitation signal. After the second power amplifier 1400 amplifies the response signal, the amplified response signal is sent to the distortion detection module 1500 through the sound card. The distortion detection module 1500 performs distortion detection on the speaker 2000 based on the excitation signal and the response signal.
[0054] In some embodiments, the distortion detection device 1500 may be provided by a host computer.
[0055] In some embodiments, the distortion detection system 1000 further includes an impedance box connected between the first power amplifier 1200 and the speaker 2000. The distortion detection device 1500 may detect the input current of the speaker according to the impedance of the impedance box and the voltage of the excitation signal output by the first power amplifier 1200.
[0056] <Method Embodiment>
[0057] The present disclosure provides a distortion detection method for a speaker, and the distortion detection method for the speaker may be implemented by a detection device.
[0058] Figure 2 It is a flowchart of the distortion detection method for a speaker according to an embodiment of the present disclosure.
[0059] AsFigure 2 As shown, the method includes steps S2100 to S2300 as follows:
[0060] Step S2100, exciting the speaker to emit sound with a first excitation signal at a target frequency, and collecting a first response signal of the first excitation signal through a microphone.
[0061] In this embodiment, the first response signal may be a signal collected by the microphone during the process of exciting the speaker to emit sound with the first excitation signal at the target frequency.
[0062] The target frequency in this embodiment may be one or more frequencies. The plurality in this embodiment may be at least two.
[0063] In the case where the target frequency is multiple frequencies, it may be to obtain a first response signal corresponding to each frequency.
[0064] Step S2200, exciting the speaker to emit sound with a minute excitation signal at the target frequency, and collecting a second response signal of the minute excitation signal through a microphone.
[0065] In this embodiment, the second response signal may be a signal collected by the microphone during the process of exciting the speaker to emit sound with the minute excitation signal at the target frequency.
[0066] In this embodiment, the voltage of the minute excitation signal may be much smaller than the voltage of the first excitation signal. For example, the voltage of the minute excitation signal may be 100 mV, and the voltage of the first excitation signal may be 5 V.
[0067] Furthermore, the frequency response decibel value of the minute excitation signal is less than the decibel value of the general quiet environment noise, so as to replace the environmental noise with the minute excitation signal.
[0068] In this embodiment, the signal duration, cycle number, and octave of the first excitation signal and the minute excitation signal at the same frequency are the same.
[0069] In the case where the target frequency is multiple frequencies, it may be to obtain a second response signal corresponding to each frequency.
[0070] In this embodiment, the execution order of step S2100 and step S2200 is not limited.
[0071] In the case where the target frequency is multiple frequencies, for each frequency of the target frequency, the speaker can be excited to emit sound with the first excitation signal of that frequency, and the first response signal of the first excitation signal can be collected through a microphone. The speaker can be excited to emit sound with a minute excitation signal of that frequency, and the second response signal of the minute excitation signal can be collected through a microphone. Finally, the first response signal and the second response signal corresponding to each frequency of the target frequency are obtained. Alternatively, it can also be that the speaker is first excited to emit sound with the first excitation signal of each frequency of the target frequency, and the first response signal corresponding to each frequency of the target frequency is collected through a microphone. The speaker is excited to emit sound with the minute excitation signal of each frequency of the target frequency, and the second response signal corresponding to each frequency of the target frequency is collected through a microphone.
[0072] In some embodiments, before performing step S2100, the method may further include: obtaining a first sweep signal, where the first sweep signal includes first excitation signals of multiple frequencies, and the multiple frequencies include the target frequency; traversing the multiple frequencies of the first sweep signal, and adding a minute excitation signal corresponding to the currently traversed frequency after the first excitation signal of the currently traversed frequency to obtain a second sweep signal.
[0073] In this embodiment, the sweep signal is a signal whose frequency changes regularly with time. The frequency of the sweep signal changes continuously and periodically with time within a certain range.
[0074] In this embodiment, it can also be that a minute excitation signal corresponding to the currently traversed frequency is added before the first excitation signal of the currently traversed frequency.
[0075] Furthermore, the first excitation signal of the currently traversed frequency and the minute excitation signal of the currently traversed frequency are consistent in signal duration, number of cycles, and octave.
[0076] On this basis, exciting the speaker to emit sound with the first excitation signal of the target frequency, and collecting the first response signal of the first excitation signal through a microphone, exciting the speaker to emit sound with the minute excitation signal of the target frequency, and collecting the second response signal of the minute excitation signal through a microphone, may include: exciting the speaker to emit sound with the second sweep signal, and collecting the first response signal of the first excitation signal corresponding to each frequency and the second response signal of the minute excitation signal corresponding to each frequency through a microphone.
[0077] Step S2300, determining the harmonic distortion corresponding to the target frequency after the speaker removes noise according to the first response signal and the second response signal.
[0078] Among them, the harmonic distortion includes total harmonic distortion and / or high-order harmonic distortion.
[0079] In this embodiment, a tiny excitation signal is used to replace the ambient noise. Then, the second response signal can be used as the ambient noise signal.
[0080] When the target frequency is multiple frequencies, it can be that when the first response signal and the second response signal corresponding to any one of the frequencies are obtained, the harmonic distortion of the speaker corresponding to the frequency after removing the noise is obtained.
[0081] When the target frequency is multiple frequencies, determining the harmonic distortion of the speaker corresponding to the target frequency after removing the noise according to the first response signal and the second response signal may include: traversing multiple frequencies, and determining the harmonic distortion of the speaker corresponding to the currently traversed frequency according to the first response signal and the second response signal corresponding to the currently traversed frequency.
[0082] Through the embodiments of the present disclosure, the speaker is excited to emit sound with the first excitation signal of the target frequency, and the first response signal of the first excitation signal is collected by a microphone. The speaker is excited to emit sound with a tiny excitation signal of the target frequency, and the second response signal of the tiny excitation signal is collected by a microphone. According to the first response signal and the second response signal, determining the harmonic distortion of the speaker corresponding to the target frequency after removing the noise can reduce the influence of the noise on the harmonic distortion of the speaker, making the obtained distortion detection result of the speaker more accurate and reliable.
[0083] The following takes determining the harmonic distortion of the speaker corresponding to a frequency according to the first response signal and the second response signal as an example for illustration.
[0084] In some embodiments, determining the harmonic distortion of the speaker corresponding to the target frequency after removing the noise according to the first response signal and the second response signal includes steps S2310 to S2330 as follows:
[0085] Step S2310, determining the first fundamental sound pressure corresponding to the fundamental wave of the first response signal and the first harmonic sound pressure corresponding to the harmonics of each order in the first order set; the first order set includes positive integers greater than 1.
[0086] In this embodiment, the first order set may include n - 1 consecutive positive integers, specifically integers between [2, n]. Where n is a positive integer greater than 1.
[0087] Specifically, it can be that the first response signal is subjected to spectrum analysis through algorithms such as fast Fourier transform (FFT) to obtain the spectrogram of the first response signal; then, according to the spectrogram, the first fundamental sound pressure corresponding to the fundamental wave and the first harmonic sound pressure corresponding to the harmonics of each order in the first order set are identified.
[0088] Step S2320: Determine the second harmonic sound pressure of each order of harmonics in the first order set corresponding to the second response signal.
[0089] In this embodiment, it may be to perform spectral analysis on the first response signal through algorithms such as fast Fourier transform (FFT) to obtain the spectrogram of the second response signal; then identify the second fundamental wave sound pressure corresponding to the fundamental wave and the second harmonic sound pressure corresponding to each order of harmonics in the first order set according to the spectrogram.
[0090] Step S2330: Obtain the harmonic distortion according to the first fundamental wave sound pressure, the first harmonic sound pressure, and the second harmonic sound pressure.
[0091] In this embodiment, the second harmonic sound pressure of the harmonic corresponding to the i-th order can be considered as the influence of environmental noise on the first harmonic sound pressure of the harmonic corresponding to the i-th order. Wherein, i is any integer between [2, n].
[0092] In an embodiment where the harmonic distortion includes total harmonic distortion, obtaining the harmonic distortion according to the first fundamental wave sound pressure, the first harmonic sound pressure, and the second harmonic sound pressure includes: obtaining the total harmonic sound pressure after removing noise according to the first harmonic sound pressure and the second harmonic sound pressure; obtaining the total harmonic distortion according to the total harmonic sound pressure and the first fundamental wave sound pressure.
[0093] In this embodiment, it may be to calculate the harmonic sound pressure of each order after removing the noise energy by using the principle of non-coherent wave superposition.
[0094] In this embodiment, obtaining the total harmonic sound pressure after removing noise according to the first harmonic sound pressure and the second harmonic sound pressure includes: for each order in the first order set, determining the square difference between the corresponding first harmonic sound pressure and the second harmonic sound pressure; determining the square root of the sum of the square differences of each order in the first order set as the total harmonic sound pressure.
[0095] Specifically, the total harmonic sound pressure after removing noise can be obtained through the following formula:
[0096]
[0097] Wherein, TD′ represents the total harmonic sound pressure after removing the noise energy, H i represents the first harmonic sound pressure corresponding to the harmonic of the i-th order, H i ′ represents the second harmonic sound pressure corresponding to the harmonic of the i-th order.
[0098] In this embodiment, obtaining the total harmonic distortion according to the total harmonic sound pressure and the first fundamental wave sound pressure includes: determining the sum of the squares of the first fundamental wave sound pressure and the total harmonic sound pressure; determining the ratio between the total harmonic sound pressure and the sum of the squares as the total harmonic distortion.
[0099] Specifically, the total harmonic distortion corresponding to the target frequency after noise removal can be obtained through the following formula:
[0100]
[0101] Among them, THD represents the total harmonic distortion corresponding to the target frequency after noise removal, TD′ represents the total harmonic sound pressure after noise energy removal, and H1 represents the first fundamental wave sound pressure.
[0102] Through this embodiment, the total harmonic distortion corresponding to the target frequency after noise removal of the speaker can be determined, the influence of noise on the total harmonic distortion of the speaker can be reduced, and the obtained distortion detection result of the speaker is more accurate and reliable.
[0103] In an embodiment where the harmonic distortion includes high-order harmonic distortion, according to the first fundamental wave sound pressure, the first harmonic wave sound pressure, and the second harmonic wave sound pressure, obtaining the high-order harmonic distortion may further include: obtaining the high-order harmonic sound pressure after noise removal according to the first harmonic wave sound pressure and the second harmonic wave sound pressure; determining the high-order harmonic distortion corresponding to the target frequency after noise removal of the speaker according to the high-order harmonic sound pressure.
[0104] The order of the high-order harmonics in this embodiment can be determined according to actual needs. For example, the order of the high-order harmonics can be an order greater than or equal to m.
[0105] In this embodiment, obtaining the high-order harmonic sound pressure after noise removal according to the first harmonic wave sound pressure and the second harmonic wave sound pressure includes: for each order in the corresponding second-order set, determining the square difference between the corresponding first harmonic wave sound pressure and the second harmonic wave sound pressure; where the second-order set is a subset of the first-order set, and the second-order set includes positive integers greater than or equal to a set value; determining the square root of the sum of the square differences corresponding to each order in the second-order set as the high-order harmonic sound pressure.
[0106] In this embodiment, the set value can be set in advance according to the application scenario or specific requirements. For example, the set value can be m. Then, the second-order set can be integers between [m, n]. Among them, m is an integer greater than or equal to 10 and less than n.
[0107] Specifically, the high-order harmonic sound pressure after noise removal can be obtained through the following formula:
[0108]
[0109] Among them, TD″ represents the high-order harmonic sound pressure after noise energy removal, H j represents the first harmonic wave sound pressure corresponding to the harmonic of the jth order, H j ′ represents the second harmonic wave sound pressure corresponding to the harmonic of the jth order, m is the set value, and m≥10.
[0110] In some embodiments, determining the higher-order harmonic distortion corresponding to the target frequency after the speaker removes noise according to the higher-order harmonic sound pressure may include: determining the sum of the squares of the first fundamental sound pressure and the total harmonic sound pressure; determining the ratio between the higher-order harmonic sound pressure and the sum of the squares as the higher-order harmonic distortion.
[0111] Specifically, the higher-order harmonic distortion corresponding to the target frequency after removing noise can be obtained through the following formula:
[0112]
[0113] where HOHD represents the total harmonic distortion corresponding to the target frequency after removing noise, TD″ represents the higher-order harmonic sound pressure after removing the noise energy, and H1 represents the first fundamental sound pressure.
[0114] Through this embodiment, the higher-order harmonic distortion corresponding to the target frequency after the speaker removes noise can be determined, reducing the influence of noise on the higher-order harmonic distortion of the speaker, making the obtained distortion detection result of the speaker more accurate and reliable.
[0115] <Device Embodiment>
[0116] The present disclosure provides a distortion detection device for a speaker, as Figure 3 shown, the distortion detection device 3000 of the speaker includes a first excitation module 3100, a second excitation module 3200, and a distortion detection module 3300.
[0117] The first excitation module 3100 is configured to excite the speaker to emit sound with a first excitation signal at the target frequency, and collect a first response signal of the first excitation signal through a microphone.
[0118] The second excitation module 3200 is configured to excite the speaker to emit sound with a small excitation signal at the target frequency, and collect a second response signal of the small excitation signal through the microphone.
[0119] The distortion detection module 3300 is configured to determine the harmonic distortion corresponding to the target frequency after the speaker removes noise according to the first response signal and the second response signal, where the harmonic distortion includes total harmonic distortion and / or higher-order harmonic distortion. In some embodiments, the distortion detection module 3300 is configured to:
[0120] determine a first fundamental sound pressure corresponding to the fundamental wave of the first response signal and first harmonic sound pressures corresponding to harmonics of each order in a first order set; the first order set includes positive integers greater than 1;
[0121] determine second harmonic sound pressures corresponding to harmonics of each order in the first order set for the second response signal;
[0122] Based on the first fundamental sound pressure, the first harmonic sound pressure, and the second harmonic sound pressure, the harmonic distortion is obtained.
[0123] In some embodiments, the harmonic distortion includes total harmonic distortion; obtaining the total harmonic distortion based on the first fundamental sound pressure, the first harmonic sound pressure, and the second harmonic sound pressure includes:
[0124] Based on the first harmonic sound pressure and the second harmonic sound pressure, the total harmonic sound pressure after noise removal is obtained;
[0125] Based on the total harmonic sound pressure and the first fundamental sound pressure, the total harmonic distortion is obtained.
[0126] In some embodiments, obtaining the total harmonic sound pressure after noise removal based on the first harmonic sound pressure and the second harmonic sound pressure includes:
[0127] For each order corresponding to the first order set, determine the square difference between the corresponding first harmonic sound pressure and the second harmonic sound pressure;
[0128] Determine the square root of the sum of the square differences of each order corresponding to the first order set as the total harmonic sound pressure.
[0129] In some embodiments, obtaining the total harmonic distortion based on the total harmonic sound pressure and the first fundamental sound pressure includes:
[0130] Determine the sum of the squares of the first fundamental sound pressure and the total harmonic sound pressure;
[0131] Determine the ratio between the total harmonic sound pressure and the sum of the squares as the total harmonic distortion.
[0132] In some embodiments, the method further includes:
[0133] Based on the first harmonic sound pressure and the second harmonic sound pressure, the high-order harmonic sound pressure after noise removal is obtained;
[0134] Based on the high-order harmonic sound pressure, determine the high-order harmonic distortion corresponding to the target frequency after noise removal of the speaker.
[0135] In some embodiments, obtaining the high-order harmonic sound pressure after noise removal based on the first harmonic sound pressure and the second harmonic sound pressure includes:
[0136] For each order corresponding to the second order set, determine the square difference between the corresponding first harmonic sound pressure and the second harmonic sound pressure; wherein, the second order set is a subset of the first order set, and the second order set includes positive integers greater than a set value;
[0137] Determine the square root of the sum of the squared differences corresponding to each order in the second order set as the high-order harmonic sound pressure.
[0138] In some embodiments, the harmonic distortion includes high-order harmonic distortion;
[0139] Obtaining the high-order harmonic distortion according to the first fundamental wave sound pressure, the first harmonic sound pressure, and the second harmonic sound pressure further includes:
[0140] Obtain a first swept-frequency signal, where the first swept-frequency signal includes first excitation signals at multiple frequencies, and the multiple frequencies include the target frequency;
[0141] Traverse the multiple frequencies of the first swept-frequency signal, and add a minute excitation signal corresponding to the currently traversed frequency after the first excitation signal at the currently traversed frequency to obtain a second swept-frequency signal.
[0142] Exciting the loudspeaker to emit sound with the first excitation signal at the target frequency, and collecting a first response signal of the first excitation signal through a microphone; exciting the loudspeaker to emit sound with the minute excitation signal at the target frequency, and collecting a second response signal of the minute excitation signal through the microphone, includes:
[0143] Exciting the loudspeaker to emit sound with the second swept-frequency signal, and collecting a first response signal of the first excitation signal corresponding to each frequency and a second response signal of the minute excitation signal corresponding to each frequency through the microphone.
[0144] <Embodiment of the readable storage medium>
[0145] This embodiment provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method described in any method embodiment of the present disclosure is executed.
[0146] The present invention may be a system, a method, and / or a computer program product. The computer program product may include a computer-readable storage medium having thereon computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0147] A computer-readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer-readable storage medium can be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punch card or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium as used herein is not construed to be a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.
[0148] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to respective computing / processing devices, or can be downloaded to an external computer or an external storage device through a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include a copper transmission cable, an optical fiber transmission, a wireless transmission, a router, a firewall, a switch, a gateway computer, and / or an edge server. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.
[0149] The computer program instructions for performing the operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine - related instructions, microcode, firmware instructions, state - setting data, or source code or object code written in any combination of one or more programming languages, including object - oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer - readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand - alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via an Internet service provider through the Internet). In some embodiments, by using the state information of the computer - readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field - programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer - readable program instructions to implement various aspects of the present invention.
[0150] Aspects of the present invention are described herein with reference to the flowchart and / or block diagram of a method, apparatus (system), and computer program product according to embodiments of the present invention. It should be understood that each block of the flowchart and / or block diagram, and combinations of blocks in the flowchart and / or block diagram, can be implemented by computer - readable program instructions.
[0151] These computer - readable program instructions can be provided to a processor of a general - purpose computer, a special - purpose computer, or other programmable data - processing apparatus to produce a machine such that the instructions, when executed by the processor of the computer or other programmable data - processing apparatus, create a means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer - readable program instructions can also be stored in a computer - readable storage medium, which causes a computer, a programmable data - processing apparatus, and / or other devices to operate in a particular manner, so that the computer - readable medium storing the instructions includes a manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0152] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, causing a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process such that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in one or more blocks of the flowchart and / or block diagram.
[0153] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a segment of code, or a portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or acts, or by a combination of dedicated hardware and computer instructions. As will be apparent to those of ordinary skill in the art, implementations using hardware, software, or a combination of software and hardware are equivalent.
[0154] The embodiments of the present invention have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of the terms used herein is intended to best explain the principles of the embodiments, the practical application, or the improvement of technologies in the market, or to enable other ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A method for detecting distortion of a speaker, characterized in that, Including: Exciting the speaker to emit sound with a first excitation signal at a target frequency, and collecting a first response signal of the first excitation signal through a microphone; Exciting the speaker to emit sound with a minute excitation signal at the target frequency, and collecting a second response signal of the minute excitation signal through the microphone; Determining, according to the first response signal and the second response signal, the harmonic distortion corresponding to the target frequency after noise removal from the speaker, where the harmonic distortion includes total harmonic distortion and / or high-order harmonic distortion.
2. The method according to claim 1, characterized in that The determining, according to the first response signal and the second response signal, the harmonic distortion corresponding to the target frequency after noise removal from the speaker includes: Determining a first fundamental sound pressure corresponding to the fundamental wave of the first response signal and first harmonic sound pressures corresponding to harmonics of each order in a first order set; the first order set includes positive integers greater than 1; Determining second harmonic sound pressures corresponding to harmonics of each order in the first order set in the second response signal; Obtaining the harmonic distortion according to the first fundamental sound pressure, the first harmonic sound pressures, and the second harmonic sound pressures.
3. The method according to claim 2, wherein The harmonic distortion includes total harmonic distortion; The obtaining the total harmonic distortion according to the first fundamental sound pressure, the first harmonic sound pressures, and the second harmonic sound pressures includes: Obtaining a total harmonic sound pressure after noise removal according to the first harmonic sound pressures and the second harmonic sound pressures; Obtaining the total harmonic distortion according to the total harmonic sound pressure and the first fundamental sound pressure.
4. The method according to claim 3, wherein The obtaining the total harmonic sound pressure after noise removal according to the first harmonic sound pressures and the second harmonic sound pressures includes: For each order corresponding to the first order set, determining the square difference between the corresponding first harmonic sound pressure and second harmonic sound pressure; Determining the square root of the sum of the square differences corresponding to each order in the first order set as the total harmonic sound pressure.
5. The method according to claim 4, characterized in that, The obtaining the total harmonic distortion according to the total harmonic sound pressure and the first fundamental sound pressure includes: Determining the sum of the squares of the first fundamental sound pressure and the total harmonic sound pressure; Determining the ratio between the total harmonic sound pressure and the sum of the squares as the total harmonic distortion.
6. The method according to claim 2, wherein The harmonic distortion includes high-order harmonic distortion; The obtaining the high-order harmonic distortion according to the first fundamental sound pressure, the first harmonic sound pressures, and the second harmonic sound pressures includes: Obtaining a high-order harmonic sound pressure after noise removal according to the first harmonic sound pressures and the second harmonic sound pressures; Determining the high-order harmonic distortion corresponding to the target frequency after noise removal from the speaker according to the high-order harmonic sound pressure.
7. The method according to claim 6, wherein The obtaining the high-order harmonic sound pressure after noise removal according to the first harmonic sound pressures and the second harmonic sound pressures includes: For each order corresponding to a second order set, determining the square difference between the corresponding first harmonic sound pressure and second harmonic sound pressure; where the second order set is a subset of the first order set, and the second order set includes positive integers greater than a set value; Determining the square root of the sum of the square differences corresponding to each order in the second order set as the high-order harmonic sound pressure.
8. The method according to claim 1, wherein The method further includes: Obtain a first swept-frequency signal, wherein the first swept-frequency signal includes first excitation signals of multiple frequencies, and the multiple frequencies include the target frequency; Traverse the multiple frequencies of the first swept-frequency signal, and add a minute excitation signal corresponding to the currently traversed frequency after the first excitation signal of the currently traversed frequency to obtain a second swept-frequency signal; The step of exciting the loudspeaker to emit sound with the first excitation signal of the target frequency and collecting a first response signal of the first excitation signal through a microphone; exciting the loudspeaker to emit sound with the minute excitation signal of the target frequency and collecting a second response signal of the minute excitation signal through the microphone includes: Exciting the loudspeaker to emit sound with the second swept-frequency signal, and collecting a first response signal of the first excitation signal corresponding to each frequency and a second response signal of the minute excitation signal corresponding to each frequency through the microphone.
9. A distortion detection device for a loudspeaker, characterized in that Includes: A first excitation module, configured to excite the loudspeaker to emit sound with the first excitation signal of the target frequency and collect a first response signal of the first excitation signal through a microphone; A second excitation module, configured to excite the loudspeaker to emit sound with the minute excitation signal of the target frequency and collect a second response signal of the minute excitation signal through the microphone; A distortion detection module, configured to determine the harmonic distortion corresponding to the target frequency after the loudspeaker removes noise according to the first response signal and the second response signal, where the harmonic distortion includes total harmonic distortion and / or high-order harmonic distortion.
10. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and the computer program, when executed by a processor, implements the method according to any one of claims 1 to 8.
Citation Information
Cited By
Sound pressure detection method and sound detection system
CN120881497A