Loudspeaker control method, chip, storage medium and electronic equipment
By adjusting the filter parameters to fit the voltage displacement transfer function of the speaker, the problem of being unable to quickly and accurately establish a voltage displacement model in the prior art is solved, and the safe driving and high loudness output of the speaker are realized.
Patent Information
- Application Number
- CN202411232969.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-13
AI Technical Summary
The prior art cannot quickly and accurately establish a voltage displacement transfer model of the speaker, causing the vibration displacement of the diaphragm to exceed the specified amplitude, which may damage the speaker.
By obtaining the voltage displacement transfer function curve and frequency response curve of the speaker, adjusting the filter parameters to fit the voltage displacement relationship to the maximum extent, simplifying the voltage displacement transfer model into a filter cascade, and reducing modeling time and calculation links.
It realizes the rapid and accurate establishment of a voltage displacement transfer model, timely adjustment of the driving voltage, protects the safety of the speaker, and prevents the vibration displacement of the diaphragm from exceeding the specified amplitude.
Smart Images

Figure CN119136116A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of loudspeakers, and in particular to a loudspeaker control method, chip, storage medium and electronic device. Background Art
[0002] As an acoustic-to-electric converter, the speaker includes structures such as a diaphragm, a voice coil, and a magnet. When a driving voltage is applied to the speaker, a magnetic field is generated in the voice coil due to electromagnetic induction. This magnetic field can interact with the magnet to generate thrust or suction to cause the diaphragm to vibrate, causing the diaphragm to displace and emit sound. At the same vibration frequency, the greater the driving voltage, the greater the vibration displacement of the diaphragm and the louder the sound. Due to the limitations of the diaphragm's process and materials, the vibration displacement of the diaphragm cannot exceed the specified amplitude. If the driving voltage is not limited, the vibration displacement of the diaphragm will exceed the specified amplitude, which may cause damage to the speaker.
[0003] Therefore, in order to ensure that the vibration displacement of the diaphragm does not exceed the specified amplitude while the speaker has high loudness, it is necessary to control the driving voltage of the speaker and then output it, that is, to protect the vibration displacement of the diaphragm. In some specific implementations, the driving voltage and diaphragm displacement (hereinafter referred to as voltage displacement) applied to the speaker can be modeled to establish a voltage-displacement transfer function. Therefore, based on the voltage-displacement transfer function and the driving voltage applied to the speaker, the vibration displacement of the diaphragm under the driving voltage can be determined, and it can be judged whether the vibration displacement of the diaphragm exceeds the specified amplitude. If it exceeds, it is necessary to adjust the driving voltage applied to the speaker so that the vibration displacement of the diaphragm does not exceed the specified amplitude under the adjusted driving voltage.
[0004] Therefore, how to quickly and accurately establish a voltage-displacement transfer model is a technical problem that needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present application provide a speaker control method, chip, storage medium and electronic device to solve the technical problem that a voltage-displacement transfer model cannot be established quickly and accurately.
[0006] In a first aspect, an embodiment of the present application provides a control method for a speaker, comprising: obtaining a first voltage-displacement transfer function curve and at least one frequency response curve of the speaker; adjusting parameters of each frequency response curve in the at least one frequency response curve until the similarity between each adjusted frequency response curve and a corresponding part in the first voltage-displacement transfer function curve is greater than a similarity threshold; determining a second voltage-displacement transfer function curve of the speaker based on the adjusted multiple frequency response curves; and determining a target voltage signal of the speaker based on a target vibration displacement amplitude of the speaker and the second voltage-displacement transfer function curve.
[0007] In some optional implementations of the first aspect, at least one frequency response curve includes a first frequency response curve of the first filter and a second frequency response curve of the second filter; a first parameter of the first frequency response curve is adjusted until a similarity between the adjusted first frequency response curve and a first part of the first voltage-displacement transfer function curve is greater than a first similarity threshold; a second parameter of the second frequency response curve is adjusted until a similarity between the adjusted second frequency response curve and a second part of the second voltage-displacement transfer function curve is greater than a second similarity threshold; wherein a frequency corresponding to the first part is higher than a frequency corresponding to the second part.
[0008] In some optional implementations of the first aspect, obtaining a first voltage-displacement transfer function curve of a speaker includes: obtaining a first driving voltage signal and a first vibration displacement signal of the speaker under a swept-frequency voltage signal; performing envelope processing on the first driving voltage signal and the first vibration displacement signal, respectively; and determining a first voltage-displacement transfer function curve based on the first driving voltage signal and the first vibration displacement signal after envelope processing.
[0009] In some optional implementations of the first aspect, a first voltage-displacement transfer function curve is determined based on the first driving voltage signal and the first vibration displacement signal after enveloping, including: determining the first voltage-displacement transfer function curve based on the ratio of the first driving voltage signal and the first vibration displacement signal after enveloping.
[0010] In some optional implementations of the first aspect, the first parameter includes at least one of a cutoff frequency, a first gain, and a quality factor.
[0011] In some optional implementations of the first aspect, the first frequency response curve includes a first curve portion and a second curve portion, and a first traversal range of the first parameter is determined by the first curve portion and the second curve portion; wherein the frequency corresponding to the first curve portion is less than the frequency corresponding to the second curve portion.
[0012] In some optional implementations of the first aspect, a first traversal range of the first parameter is determined by the first curve portion and the second curve portion, including: based on multiple displacement amplitudes in the first curve portion and the second curve portion, respectively determining a sub-traversal range of the first gain and a sub-traversal range of the cutoff frequency; based on the sub-traversal range of the first gain and the sub-traversal range of the cutoff frequency, determining a sub-traversal range of the quality factor; based on the sub-traversal range of the first gain, the sub-traversal range of the cutoff frequency, and the sub-traversal range of the quality factor, determining the first traversal range.
[0013] In some optional implementations of the first aspect, a first sub-traversal range of the cutoff frequency is determined based on multiple displacements in the second curve portion, including: determining a center frequency point based on a maximum value among multiple displacement amplitudes of the second curve portion; determining a first sub-traversal range of the cutoff frequency based on the center frequency point and a preset frequency interval.
[0014] In some optional implementations of the first aspect, based on multiple displacement amplitudes in the first curve portion and the second curve portion, a second sub-traversal range of the first gain is determined, including: based on the first displacement amplitude in the first curve portion and the second displacement amplitude in the second curve portion, a center gain is determined; wherein the first displacement amplitude is determined based on multiple displacement amplitudes in the first curve portion whose displacement amplitude change is less than the first change amplitude, and the second displacement amplitude is determined based on multiple displacement amplitudes in the second curve portion whose displacement amplitude change is less than the second change amplitude; based on the center gain and a preset gain interval, the second sub-traversal range of the first gain is determined.
[0015] In some optional implementations of the first aspect, determining a third sub-traversal range of the quality factor based on the first sub-traversal range and the second sub-traversal range includes: determining the third sub-traversal range of the quality factor based on a ratio of the first sub-traversal range to the second sub-traversal range.
[0016] In some optional implementations of the first aspect, the second parameter includes at least one of a peak frequency, a second gain, and a bandwidth.
[0017] In some optional implementations of the first aspect, the second frequency response curve includes a third curve portion and a fourth curve portion, and a second traversal range of the second parameter is determined by the third curve portion and the fourth curve portion; wherein the frequency corresponding to the third curve portion is less than the frequency corresponding to the fourth curve portion.
[0018] In some optional implementations of the first aspect, a second traversal range of the second parameter is determined by the third curve portion and the fourth curve portion, including: determining the peak frequency based on multiple displacement amplitudes in the third curve portion; determining the second gain based on the multiple displacement amplitudes in the third curve portion and the fourth curve portion; determining the second traversal range of the bandwidth based on the third curve portion, the peak frequency and the second gain.
[0019] In some optional implementations of the first aspect, determining the peak frequency based on multiple displacement amplitudes in the third curve portion includes: determining the peak frequency based on a maximum value of the multiple displacement amplitudes in the third curve portion.
[0020] In some optional implementations of the first aspect, a second gain is determined based on multiple displacement amplitudes in the third curve portion and the fourth curve portion, including: determining the second gain based on a third displacement amplitude in the third curve portion and a fourth displacement amplitude in the fourth curve portion, wherein the third displacement amplitude is determined based on multiple displacement amplitudes in the third curve portion whose displacement amplitude change is less than the third change amplitude, and the fourth displacement amplitude is determined based on multiple displacement amplitudes in the fourth curve portion whose displacement amplitude change is less than the fourth change amplitude.
[0021] In some optional implementations of the first aspect, the target vibration displacement amplitude is a specified amplitude of the speaker, and the method further includes: controlling the vibration of the speaker based on a second driving voltage signal, wherein the second driving voltage signal is less than the target voltage signal, and the vibration displacement amplitude of the speaker driven by the second driving voltage signal is less than the target vibration displacement amplitude.
[0022] In a second aspect, the present application provides a chip, which is used to execute the above-mentioned first aspect and any possible implementation of the speaker control method of the first aspect.
[0023] In a third aspect, the present application provides a computer-readable storage medium having instructions stored thereon, which, when executed on an electronic device, enables the electronic device to implement the above-mentioned first aspect and any possible method for controlling a speaker of the first aspect.
[0024] In a fourth aspect, the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device; and a processor, which is one of the processors of the electronic device, for executing the instructions stored in the memory to implement the above-mentioned first aspect and any possible implementation of the speaker control method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 According to some embodiments of the present application, a schematic flow chart of a method for controlling a speaker is shown;
[0026] Figure 2 According to some embodiments of the present application, a voltage-displacement transfer function curve of a general universal loudspeaker is shown;
[0027] Figure 3 According to some embodiments of the present application, a schematic flow chart of a method for modeling a voltage displacement of a loudspeaker is shown;
[0028] Figure 4 According to some embodiments of the present application, a schematic diagram of a frequency response curve of a low-shelf filter is shown;
[0029] Figure 5According to some embodiments of the present application, a schematic diagram of a frequency response curve of a peak filter is shown. DETAILED DESCRIPTION
[0030] The illustrative embodiments of the present application include, but are not limited to, a speaker control method, a chip, a storage medium, and an electronic device.
[0031] The following first introduces the terms involved in this application.
[0032] (1) Envelope: A curve that reflects the amplitude change of a high-frequency signal. For example, if you connect the peak points of a high-frequency signal over a period of time, the two lines above and below are the envelope. When a high-frequency signal is amplitude modulated by a low-frequency signal, the low-frequency signal becomes the envelope of the high-frequency signal.
[0033] (2) A low-shelf filter, also known as a low-pass filter, is an electronic filtering device that allows signals below the cutoff frequency to pass through and blocks signals above the cutoff frequency from passing through.
[0034] (3) Peak filter: Also known as high-pass filter, low-cut filter, low-resistance filter, it is an electronic filter device that allows signals above the cutoff frequency to pass through and attenuates signals below the cutoff frequency. Peak filters can filter out unnecessary low-frequency components in the signal, or filter out low-frequency interference.
[0035] (4) Transfer function: A mathematical expression that describes the relationship between a system’s input and output. For example, the transfer function of a low-pass filter can describe the output amplitude and phase changes of the input signal after it passes through the filter at different frequencies.
[0036] (5) Impedance transfer function: A function that describes the relationship between the input impedance and output impedance of a system.
[0037] The following is a brief introduction to some methods for establishing voltage-displacement transfer models.
[0038] In some specific implementations, the voltage signal and current signal of the speaker are measured in real time, and the impedance transfer function of the speaker at the current moment is calculated based on the calculation formula of the voltage signal, current signal and impedance, and the voltage displacement transfer model is determined based on the impedance transfer function. However, since the voltage displacement transfer function cannot be accurately calculated based on the impedance transfer function, the error of this method is relatively large.
[0039] In some other specific implementations, the vibration displacement of the diaphragm under different driving voltages is measured, and the transfer function is estimated based on the relationship between the driving voltage and the vibration displacement, and the transfer function is converted to obtain the numerator and denominator of the discrete transfer function, and the numerator and denominator are used as the coefficients of the numerator and denominator of the recursive (Infinite Impulse Response, IIR) filter, respectively, to obtain the voltage displacement transfer function. However, this method is relatively complicated and takes a long time to model. In addition, since there are multiple structures to choose from for the conversion process of the transfer function, the calculated IIR filter type is not fixed, and the corresponding numerator and denominator coefficient ranges are not fixed, which may cause the filter to be unstable or the error is too large, resulting in modeling failure.
[0040] In other specific implementations, the voltage displacement transfer function is estimated by using a sweep voltage signal input to the speaker and using a laser rangefinder to test the vibration displacement of the diaphragm under different sweep voltages, using methods such as least squares parameter identification. However, this estimation method has a large amount of calculations, and the type of filter generated is not fixed, resulting in the inability to predict the zero and pole positions of the filter, which easily leads to the instability of the generated filter.
[0041] Therefore, as mentioned above, the existing method for establishing a voltage-displacement transfer model cannot establish the voltage-displacement transfer model quickly and accurately.
[0042] To this end, an embodiment of the present application provides a control method for a loudspeaker. In the method, a voltage-displacement transfer function is simulated by a low-shelf filter and a peak filter, and by adjusting the parameters of the low-shelf filter, such as adjusting the gain, quality factor, and cutoff frequency of the low-shelf filter, and by adjusting the gain, peak frequency, bandwidth, and other parameters of the peak filter, the voltage-displacement relationship curve is fitted to the greatest extent, and the voltage-displacement transfer model is simplified to the form of a cascade of one or several filters. In this way, the calculation links for estimating the transfer function can be reduced, and the time for modeling can be reduced, so that the voltage-displacement transfer function can be obtained quickly and accurately. In addition, when the driving voltage of the loudspeaker is too large, the driving voltage can be adjusted in time based on the voltage-displacement transfer function, which is beneficial to protecting the safety of the loudspeaker.
[0043] Combine the following Figure 1 , the control method of the speaker mentioned in the embodiment of the present application is described in detail. Figure 1 As shown, the control method of the speaker may include:
[0044] 101: Obtain a first voltage-displacement transfer function curve and at least one frequency response curve of a speaker.
[0045] It can be understood that the first voltage-displacement transfer function curve may be a target transfer function curve for modeling, that is, a frequency response curve that the filter needs to match.
[0046] In some optional implementations, the first voltage-displacement transfer function curve can be determined in the following manner: obtaining the first driving voltage signal and the first vibration displacement signal of the speaker under the swept frequency voltage signal, and performing envelope processing on the first driving voltage signal and the first vibration displacement signal, that is, connecting the peak value of the first driving voltage signal and the peak value of the first vibration displacement signal, respectively, to obtain two envelope lines, and determining the first voltage-displacement transfer function curve based on the ratio of the two envelope lines.
[0047] like Figure 2 As shown in FIG. 1 , a voltage-displacement transfer function curve of a general-purpose speaker is shown. Although the voltage-displacement transfer function curves of different types of speakers are slightly different, the relationship between displacement and frequency is similar. Figure 2 As shown, it can be understood that in the low-frequency stage, for example, the frequency is between 0-100Hz, the displacement of the speaker has a creep effect, which is manifested in the voltage-displacement transfer function curve as follows: the lower the frequency, the greater the displacement, and the displacement at low frequencies as shown in the voltage-displacement transfer function curve is tilted. In the mid-frequency stage, for example, the frequency is between 100Hz-1000Hz, the displacement of the speaker at point A reaches a peak value, and point A is called the resonant frequency point. In the high-frequency stage exceeding the resonant frequency point A, the higher the frequency, the smaller the displacement.
[0048] Therefore, in some optional implementations, in order to reduce the influence of creep effect on the voltage-displacement transfer function, a peak filter may be used to fit the voltage-displacement transfer function curve at the low-frequency stage. And, in order to avoid the displacement amplitude being too small, a low-shelf filter may be used to fit the voltage-displacement transfer function curve at the medium-high frequency stage. Therefore, at least one frequency response curve may include a first frequency response curve of a first filter and a second frequency response curve of a second filter, wherein the first filter may be a low-shelf filter and the second filter may be a peak filter.
[0049] In some other optional implementations, at least one frequency response curve may also include a first frequency response curve, a second frequency response curve and a third frequency response curve, wherein, in the low-frequency stage, the first frequency response curve may be used to fit the voltage-displacement transfer function curve, in the medium-frequency stage, the second frequency response curve may be used to fit the voltage-displacement transfer function, and in the high-frequency stage, the third frequency response curve may be used to fit the voltage-displacement transfer function.
[0050] 102: Adjust parameters of each frequency response curve in at least one frequency response curve until the similarity between each adjusted frequency response curve and a corresponding portion of the first voltage-displacement transfer function curve is greater than a similarity threshold.
[0051] It can be understood that, since there is a creep effect in the displacement of the loudspeaker at the low frequency stage, a peak filter can be used to fit the voltage displacement transfer function curve at the low frequency stage, that is, the first part is the low frequency part of the voltage displacement transfer function curve. Moreover, since the higher the frequency is at the high frequency stage, the smaller the displacement of the diaphragm in the loudspeaker is, a low shelf filter can be used to fit the voltage displacement transfer function curve at the mid-high frequency stage, that is, the second part is the mid-high frequency part of the voltage displacement transfer function curve. Therefore, when at least one frequency response curve includes a first frequency response curve of a first filter and a second frequency response curve of a second filter, a first parameter of the first frequency response curve can be adjusted until the similarity between the adjusted first frequency response curve and the first part of the first voltage displacement transfer function curve is greater than a first similarity threshold. Furthermore, a second parameter of the second frequency response curve can be adjusted until the similarity between the adjusted second frequency response curve and the second part of the first voltage displacement transfer function curve is greater than a second similarity threshold. Wherein, the frequency corresponding to the first part is higher than the frequency corresponding to the second part.
[0052] In some optional implementations, the first parameter includes at least one of a cutoff frequency, a first gain, and a quality factor. The second parameter includes at least one of a peak frequency, a second gain, and a bandwidth.
[0053] 103: Determine a second voltage-displacement transfer function curve of the speaker based on the adjusted multiple frequency response curves.
[0054] 104: Determine a target voltage signal of the speaker based on the target vibration displacement amplitude of the speaker and the second voltage-displacement transfer function curve.
[0055] It can be understood that after the voltage-displacement transfer function of the speaker is determined, the speaker can be driven to vibrate based on the second driving voltage signal. Driven by the second driving voltage signal, the vibration displacement amplitude of the diaphragm in the speaker is less than the specified amplitude of the speaker.
[0056] Combine the following Figure 3 The following is a flow chart of the voltage displacement modeling method of the loudspeaker in this application. Figure 3 As shown, the method comprises the following steps:
[0057] 301: Obtain a sampling signal of a swept frequency input voltage and a corresponding displacement output of a loudspeaker.
[0058] In some specific implementations, a voltmeter can be used to measure the swept frequency input voltage applied to the speaker (i.e., the swept frequency voltage signal, the first driving voltage signal mentioned above), and a laser rangefinder can be used to measure the acquisition signal of the displacement output corresponding to the diaphragm in the speaker under the swept frequency input voltage (i.e., the first vibration displacement signal mentioned above).
[0059] 302: Calculate the voltage displacement curve.
[0060] It can be understood that the voltage-displacement transfer function curve can be obtained by taking the envelopes of the swept frequency input voltage and the corresponding displacement output acquisition signal and dividing them.
[0061] The voltage displacement curve may include a peak filter fitting transfer function curve and a low shelf filter fitting transfer function curve. Moreover, the voltage displacement transfer function curve is a modeled target transfer function curve, that is, a frequency response curve to be matched by the filter.
[0062] 303: Determine a first traversal range of a first parameter set of a low shelf filter.
[0063] It can be understood that the first parameter set of the low-shelf filter may include parameters such as the cutoff frequency, the first gain (hereinafter referred to as gain) and the quality factor of the low-shelf filter.
[0064] For example, Figure 4 Figure 2 shows a frequency response curve diagram of a low shelf filter. Figure 4 As shown in the figure, the horizontal axis represents the frequency (Hz) and the vertical axis represents the displacement amplitude (dB). Figure 4 , frequency response curves of different sizes of cutoff frequency, gain and quality factor are shown. For example, the frequency response curves of the first group of low-shelf filters have a gain of 35dB, a cutoff frequency of 800Hz, and a quality factor of 1.5; the frequency response curves of the second group of low-shelf filters have a gain of 35dB, a cutoff frequency of 800Hz, and a quality factor of 1; the frequency response curves of the third group of low-shelf filters have a gain of 35dB, a cutoff frequency of 600Hz, and a quality factor of 1; the frequency response curves of the fourth group of low-shelf filters have a gain of 38dB, a cutoff frequency of 600Hz, and a quality factor of 1.
[0065] It can be understood that, referring to the frequency response curves of the first set of low-shelf filters and the second set of low-shelf filters, when the gain and cutoff frequency of the low-shelf filters are the same, the smaller the quality factor, the smaller the displacement amplitude of the diaphragm. For example, in the frequency response curve of the first set of low-shelf filters, the maximum displacement amplitude is the displacement corresponding to point B. In the frequency response curve of the second set of low-shelf filters, the maximum displacement amplitude is the displacement corresponding to point C. When the quality factor becomes smaller, the displacement corresponding to point C is smaller than the displacement corresponding to point B.
[0066] It can be understood that, referring to the frequency response curves of the third and fourth low-shelf filters, when the cutoff frequency and quality factor of the low-shelf filter are the same, the greater the gain, the greater the displacement amplitude at the low-frequency stage. For example, in the frequency response curve of the third low-shelf filter, the displacement amplitude at the low-frequency stage is 36dB. In the frequency response curve of the fourth low-shelf filter, the displacement amplitude at the low-frequency stage is 40dB. When the gain increases, the displacement amplitude at the low-frequency stage increases.
[0067] It can be understood that, referring to the frequency response curves of the second and third low-shelf filters, when the gain and quality factor of the low-shelf filter are the same, the smaller the cutoff frequency, the smaller the frequency corresponding to the maximum displacement amplitude. For example, the frequency corresponding to the maximum displacement amplitude point D in the frequency response curve of the third low-shelf filter is smaller than the frequency corresponding to the maximum displacement amplitude point C in the frequency response curve of the second low-shelf filter.
[0068] 304: Determine, within a first traversal range, a model of a low-shelf filter having a matching degree with a first portion of the voltage-displacement transfer function curve higher than a first similarity threshold.
[0069] It can be understood that within the first traversal range, a model of a low-shelf filter whose matching degree with the first part of the voltage-displacement transfer function curve is higher than a first similarity threshold can be found, wherein the first part of the voltage-displacement transfer function curve can represent a low-shelf filter fitting transfer function curve.
[0070] As mentioned above, the low-shelf filter is to boost or attenuate the frequencies below the cutoff frequency as a whole. Figure 4 By adjusting the quality factor, gain, cutoff frequency and other parameters of the low-shelf filter, the frequency response curve of the speaker can be matched. For example, after setting the parameters of the low-shelf filter, the low-shelf filter coefficient can be obtained through the formula of the low-shelf filter and the frequency response diagram of the corresponding low-shelf filter can be drawn, so that it can be compared with the target frequency response diagram (i.e., the displacement voltage transfer function curve), and the parameters of the low-shelf filter can be continuously adjusted to find the model of the low-shelf filter with the highest matching degree.
[0071] It can be understood that in the intermediate frequency stage, the frequency corresponding to the maximum displacement amplitude point is the cut-off frequency band area, that is, the center frequency point mentioned in this application. According to the center frequency point and the preset frequency interval, for example, [-100Hz, 100Hz], the traversal range of the cut-off frequency is determined, that is, the first sub-traversal range mentioned in this application. For example, Figure 4 As shown, in the frequency response curve of the first set of low-shelf filters, the frequency of point B corresponding to the point with the maximum displacement amplitude is the cut-off frequency band area. In the frequency response curve of the second set of low-shelf filters, the frequency of point C corresponding to the point with the maximum displacement amplitude is the cut-off frequency band area.
[0072] It can be understood that the center gain can be determined based on the first displacement amplitude in the first curve part and the second displacement amplitude in the second curve part; wherein the first displacement amplitude is determined based on multiple displacement amplitudes in the first curve part whose displacement amplitude changes are less than the first change amplitude, and the second displacement amplitude is determined based on multiple displacement amplitudes in the second curve part whose displacement amplitude changes are less than the second change amplitude. And the traversal range of the gain is determined based on the center gain and the preset gain interval, such as [-6dB, 6dB]. That is, the difference between the displacement value at the flat part of the low-frequency stage and the displacement value at the flat part of the high-frequency stage is taken as the center value of the gain traversal, that is, the second sub-traversal range mentioned in this application. In some embodiments, when the creep effect in the low-frequency stage is strong, the traversal range of the gain can be appropriately increased. For example, in the frequency response curve of the first group of low-shelf filters, the displacement amplitude at the flat part of the low-frequency stage is 36dB, and the displacement amplitude at the flat part of the high-frequency stage is 1dB. The displacement amplitude difference of 35dB can be taken as the center value of the gain traversal. For another example, in the frequency response curve of the fourth group of low-shelf filters, the displacement amplitude at the flat part of the low-frequency stage is 40dB, and the displacement amplitude at the flat part of the high-frequency stage is 1dB. The displacement amplitude difference of 39dB can be used as the center value of the gain traversal.
[0073] It can be understood that the third sub-ergodic range of the quality factor can be determined based on the ratio of the first sub-ergodic range to the second sub-ergodic range. The quality factor can also be determined based on the linear value of the ratio of the displacement at the cutoff frequency to the displacement of the compensation gain (a gain value compensated for accurately obtaining the gain value), that is, the third sub-ergodic range mentioned in the present application.
[0074] It can be understood that the frequency response curve of the low shelf filter can be scaled N times according to the overall gain of the low shelf filter, so that the low shelf filter matches the mid-high frequency part of the collected signal corresponding to the displacement output of the loudspeaker under the driving of the swept input voltage.
[0075] The first sub-ergodic range, the second sub-ergodic range, and the third sub-ergodic range are integrated to obtain a first ergodic range of a first parameter set of a low-shelf filter.
[0076] It can be understood that the cutoff frequency, gain, quality factor and compensation gain to be traversed are used as parameters of the low shelf filter, the spectrum of the low shelf filter under the parameters is plotted, the frequency response curve is compared with the target frequency response curve (i.e., the voltage-displacement transfer function curve of the speaker), the error is calculated, and a set of parameters of the low shelf filter with the smallest error is found, thereby obtaining a set of optimal low shelf filter models.
[0077] 305: Determine a second traversal range of a second parameter set of the peak filter.
[0078] It can be understood that the second parameter set of the peak filter may include parameters such as the bandwidth, peak frequency and second gain (hereinafter referred to as gain) of the peak filter.
[0079] As mentioned above, at the low frequency stage, peak filter fitting is adopted; within a certain range, the cutoff frequency, gain and quality factor of the low shelf filter are determined by traversing the range.
[0080] For example, Figure 5 Figure 2 shows a frequency response curve diagram of a peak filter. Figure 5 As shown in the figure, the horizontal axis represents the frequency (Hz) and the vertical axis represents the displacement amplitude (dB). Figure 5 In the figure, bandwidths, peak frequencies and gains of different sizes are shown. For example, the frequency response curves of the first group of peak filters have a gain of 3dB, a peak frequency of 15Hz, and a bandwidth of 50Hz; the frequency response curves of the second group of peak filters have a gain of 5dB, a peak frequency of 15Hz, and a bandwidth of 100Hz; the frequency response curves of the third group of peak filters have a gain of 7dB, a peak frequency of 10Hz, and a bandwidth of 30Hz; the frequency response curves of the fourth group of peak filters have a gain of 7dB, a peak frequency of 1Hz, and a bandwidth of 30Hz.
[0081] Understandable, reference Figure 5 , the displacement of the frequency response curve of the third group of peak filters is the largest, for example, the displacement corresponding to point E in the frequency response curve of the third group of peak filters is the largest. The displacement of the frequency response curve of the first group of peak filters is the smallest, for example, the displacement corresponding to point F in the frequency response curve of the first group of peak filters is the smallest.
[0082] 306 : Determine, within a second traversal range, a model of a peak filter having a second portion of a matching degree with a second portion of the voltage-displacement transfer function curve that is higher than a second similarity threshold.
[0083] It can be understood that within the second traversal range, a peak filter model having a matching degree with the second part of the voltage displacement curve higher than a second similarity threshold can be searched, wherein the second part of the voltage displacement transfer function curve can represent a peak filter fitting transfer function curve.
[0084] By adjusting the gain, peak frequency, bandwidth and other parameters of the peak filter, the frequency response curve of the speaker can be matched. For example, after setting the parameters of the peak filter, the peak filter coefficient can be obtained through the formula of the peak filter and the frequency response diagram of the corresponding peak filter can be drawn, so that it can be compared with the target frequency response diagram (i.e., the displacement voltage transfer function curve), and the parameters of the peak filter can be continuously adjusted to find the model of the peak filter with the highest matching degree.
[0085] It can be understood that at the low frequency, i.e., the third curve portion, the frequency corresponding to the maximum point of the displacement amplitude is used as the peak frequency of the peak filter. For example, in the frequency response curve of the third group of peak filters, the frequency corresponding to the maximum point E of the displacement amplitude is used as the peak frequency of the peak filter. For another example, in the frequency response curve of the first group of peak filters, the frequency corresponding to the maximum point F of the displacement amplitude is used as the peak frequency of the peak filter.
[0086] It can be understood that the peak frequency can be determined based on multiple displacement amplitudes in the third curve part; the second gain can be determined based on multiple displacement amplitudes in the third curve part and the fourth curve part; the second traversal range of the bandwidth can be determined based on the third curve part, the peak frequency and the second gain. That is, the difference between the displacement amplitude at the low frequency and the displacement amplitude at the high frequency flat is used as the gain of the peak filter. For example, in the frequency response curve of the third group of peak filters, the displacement amplitude at the low frequency is 7dB, the displacement amplitude at the high frequency flat is 0dB, and the displacement amplitude difference of 7dB is used as the gain of the peak filter. For another example, in the frequency response curve of the first group of peak filters, the displacement amplitude at the low frequency is 3dB, the displacement amplitude at the high frequency flat is 0dB, and the displacement amplitude difference of 3dB is used as the gain of the peak filter.
[0087] It can be understood that the bandwidth traversal range can be set according to the influence range of the creep effect in the low-frequency period, for example, the low-frequency stage is set as the bandwidth traversal range, that is, the second traversal range mentioned in this application.
[0088] It can be understood that the bandwidth, gain and peak frequency to be traversed are used as parameters of the peak filter, and the frequency response curve of the peak filter is drawn. The frequency response curve is compared with the target frequency response curve (that is, the voltage-displacement transfer function curve of the speaker), and the error is calculated. The set of parameters of the peak filter with the smallest error is found, thereby obtaining a set of optimal peak filter models.
[0089] It can be understood that the matching order of the low shelf filter and the peak filter can be exchanged, that is, the peak filter model with the highest matching degree can be searched first and then the low shelf filter model with the highest matching degree can be searched.
[0090] Then, the voltage-displacement transfer function curve of the loudspeaker may be determined based on the low shelf filter model or the peak filter model.
[0091] It can be understood that based on the low shelf filter model or the peak filter model, one or more filters are cascaded, and the second driving voltage signal of the speaker, that is, the real-time voltage signal of the speaker, is adjusted according to the acquired voltage-displacement transfer function curve.
[0092] Through the above method, by continuously adjusting the parameters of the filter, the frequency response curve after the low-shelf filter and the peak filter are cascaded is infinitely close to the corresponding displacement voltage transfer function curve, thereby obtaining the cascade filter model of the peak filter and the low-shelf filter with the best matching degree, and using the filter model as the voltage displacement model of the speaker. In this way, the calculation link of estimating the transfer function is reduced, and the modeling time is reduced. When the driving voltage of the speaker is too large, the driving voltage can be adjusted in time based on the voltage displacement transfer function, thereby protecting the safety of the speaker. And because the coefficient calculation of the peak filter and the low-shelf filter has a fixed formula, the risk of modeling failure is avoided.
[0093] The present application also mentions a chip, which is used in the speaker control method mentioned in the present application.
[0094] This embodiment is a chip implementation method corresponding to the above method embodiment, and this embodiment can be implemented in conjunction with the method implementation method. The relevant technical details mentioned in the method implementation method are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the method implementation method.
[0095] The present application also mentions a computer-readable storage medium, on which instructions are stored. When the instructions are executed on an electronic device, the electronic device implements the speaker control method mentioned in the present application.
[0096] This embodiment is a computer-readable storage medium implementation method corresponding to the above method embodiment, and this embodiment can be implemented in conjunction with the method implementation method. The relevant technical details mentioned in the method implementation method are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the method implementation method.
[0097] The present application also mentions an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device; and a processor, which is one of the processors of the electronic device, for executing the instructions stored in the memory to implement the speaker control method mentioned in the present application.
[0098] This embodiment is an electronic device implementation corresponding to the above method embodiment, and this embodiment can be implemented in conjunction with the method implementation. The relevant technical details mentioned in the method implementation are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the method implementation.
[0099] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0100] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.
[0101] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0102] Although the present application has been illustrated and described with reference to certain embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.
Claims
1. A method for controlling a speaker, It is characterized in that include: Obtaining a first voltage-displacement transfer function curve and at least one frequency response curve of a speaker; Adjusting parameters of each frequency response curve in the at least one frequency response curve until the similarity between each adjusted frequency response curve and a corresponding portion of the first voltage-displacement transfer function curve is greater than a similarity threshold; Determining a second voltage-displacement transfer function curve of the speaker based on the adjusted multiple frequency response curves; A target voltage signal of the speaker is determined based on the target vibration displacement amplitude of the speaker and the second voltage-displacement transfer function curve.
2. The method according to claim 1, It is characterized in that The at least one frequency response curve includes a first frequency response curve of the first filter and a second frequency response curve of the second filter; adjusting a first parameter of the first frequency response curve until a similarity between the adjusted first frequency response curve and a first portion of the first voltage-displacement transfer function curve is greater than a first similarity threshold; and adjusting a second parameter of the second frequency response curve until a similarity between the adjusted second frequency response curve and a second portion of the second voltage-displacement transfer function curve is greater than a second similarity threshold; wherein a frequency corresponding to the first portion is higher than a frequency corresponding to the second portion.
3. The method according to claim 1, It is characterized in that The obtaining of a first voltage-displacement transfer function curve of the speaker comprises: Acquire a first driving voltage signal and a first vibration displacement signal of the speaker under a swept frequency voltage signal; performing envelope processing on the first driving voltage signal and the first vibration displacement signal respectively; The first voltage-displacement transfer function curve is determined based on the enveloped first driving voltage signal and the first vibration displacement signal.
4. The method according to claim 3, It is characterized in that The step of determining the first voltage-displacement transfer function curve based on the enveloped first driving voltage signal and the first vibration displacement signal comprises: The first voltage-displacement transfer function curve is determined based on the ratio of the first driving voltage signal to the first vibration displacement signal after envelope taking.
5. The method according to claim 2, It is characterized in that The first parameter includes at least one of a cutoff frequency, a first gain, and a quality factor.
6. The method according to claim 5, It is characterized in that The first frequency response curve includes a first curve portion and a second curve portion, and a first traversal range of a first parameter is determined by the first curve portion and the second curve portion; The frequency corresponding to the first curve portion is smaller than the frequency corresponding to the second curve portion.
7. The method according to claim 6, It is characterized in that Determining a first traversal range of a first parameter by using the first curve portion and the second curve portion includes: Determining a sub-ergodic range of the first gain and a sub-ergodic range of the cutoff frequency respectively based on a plurality of displacement amplitudes in the first curve portion and the second curve portion; Determining a sub-ergodic range of the quality factor based on a sub-ergodic range of the first gain and a sub-ergodic range of the cutoff frequency; The first ergodic range is determined based on a sub-ergodic range of the first gain, a sub-ergodic range of the cutoff frequency, and a sub-ergodic range of the quality factor.
8. The method according to claim 7, It is characterized in that The determining of a first sub-traversal range of the cut-off frequency based on a plurality of displacements in the second curve portion comprises: Determining a center frequency point based on a maximum value among a plurality of displacement amplitudes of the second curve portion; Based on the center frequency point and the preset frequency interval, a first sub-traversal range of the cut-off frequency is determined.
9. The method according to claim 8, It is characterized in that The determining of a second sub-ergodic range of the first gain based on a plurality of displacement amplitudes in the first curve portion and the second curve portion comprises: Determine a center gain based on a first displacement amplitude in the first curve portion and a second displacement amplitude in the second curve portion; wherein the first displacement amplitude is determined based on a plurality of displacement amplitudes in the first curve portion whose displacement amplitude variation is less than a first variation amplitude, and the second displacement amplitude is determined based on a plurality of displacement amplitudes in the second curve portion whose displacement amplitude variation is less than a second variation amplitude; Based on the central gain and a preset gain interval, a second sub-traversal range of the first gain is determined.
10. The method according to claim 9, It is characterized in that The determining, based on the first sub-traversal range and the second sub-traversal range, a third sub-traversal range of the quality factor comprises: Based on the ratio of the first sub-ergodic range to the second sub-ergodic range, a third sub-ergodic range of the quality factor is determined.
11. The method according to claim 2, It is characterized in that The second parameter includes at least one of a peak frequency, a second gain, and a bandwidth.
12. The method according to claim 11, It is characterized in that The second frequency response curve includes a third curve portion and a fourth curve portion, and a second traversal range of the second parameter is determined by the third curve portion and the fourth curve portion; The frequency corresponding to the third curve portion is smaller than the frequency corresponding to the fourth curve portion.
13. The method according to claim 12, It is characterized in that The determining a second traversal range of the second parameter by using the third curve portion and the fourth curve portion includes: determining the peak frequency based on a plurality of displacement amplitudes in the third curve portion; determining the second gain based on a plurality of displacement amplitudes in the third curve portion and the fourth curve portion; The second traversal range of the bandwidth is determined based on the third curve portion, the peak frequency, and the second gain.
14. The method according to claim 13, It is characterized in that The step of determining the peak frequency based on a plurality of displacement amplitudes in the third curve portion comprises: The peak frequency is determined based on a maximum value among a plurality of displacement amplitudes of the third curve portion.
15. The method according to claim 13, It is characterized in that The determining the second gain based on a plurality of displacement amplitudes in the third curve portion and the fourth curve portion comprises: determining the second gain based on a third displacement amplitude in the third curve portion and a fourth displacement amplitude in the fourth curve portion, Among them, the third displacement amplitude is determined based on multiple displacement amplitudes in the third curve part whose displacement amplitude change is less than the third change amplitude, and the fourth displacement amplitude is determined based on multiple displacement amplitudes in the fourth curve part whose displacement amplitude change is less than the fourth change amplitude.
16. The method according to claim 1, It is characterized in that The target vibration displacement amplitude is a specified amplitude of the speaker, The method further comprises: The speaker vibration is controlled based on a second driving voltage signal, wherein the second driving voltage signal is smaller than the target voltage signal, and the vibration displacement amplitude of the speaker driven by the second driving voltage signal is smaller than the target vibration displacement amplitude.
17. A chip, It is characterized in that The chip is used to execute the speaker control method according to any one of claims 1 to 16.
18. A computer-readable storage medium, It is characterized in that The readable storage medium stores instructions, and when the instructions are executed on an electronic device, the electronic device implements the speaker control method according to any one of claims 1 to 16.
19. An electronic device, It is characterized in that include: a memory for storing instructions to be executed by one or more processors of the electronic device; and a processor, which is one of the processors of the electronic device, configured to execute instructions stored in the memory to implement the speaker control method according to any one of claims 1 to 16.
Citation Information
Cited By
Voltage measurement method and device for dual-drive loudspeaker, and medium
CN120499578A
