Disclosure of Invention
In view of this, the present invention provides a driving apparatus and a driving method for a speaker, and an electronic device, which effectively solve the technical problems in the prior art and improve the situation that the speaker generates piano noise.
In order to achieve the purpose, the technical scheme provided by the invention is as follows:
a driving apparatus of a speaker, comprising: a dynamic range control unit, a delay unit and a multiplier;
the Dynamic Range Control unit is used for accessing an audio input signal, generating corresponding speed data of a diaphragm of the loudspeaker according to the audio input signal, and performing corresponding DRC (Dynamic Range Control) on the speed data to adjust output adjustment gain to the multiplier;
the delay unit is used for delaying and outputting the audio input signal to the multiplier;
and the multiplier is used for multiplying the delayed audio input signal by the adjusting gain and outputting the multiplied signal to the loudspeaker for driving.
Optionally, the dynamic range control unit includes: a speed generator and DRC circuit;
the speed generator is used for generating the speed data after the audio input signal is accessed, and the DRC circuit is used for carrying out corresponding DRC adjustment on the speed data and outputting an adjustment gain to the multiplier.
Optionally, the speed generator is according to the formula:
converting the accessed audio input signal into the speed data, wherein v(s) is the speed data, u(s) is the audio input signal, Bl is a product of magnetic induction and coil length of the speaker, R is a direct current resistance of the speaker, L is an equivalent inductance of the speaker, m is a mass of a coil of the speaker, R is a mechanical damping of the speaker, 1/c is a mechanical spring coefficient of the speaker, and s is a complex parameter variable of laplace transform.
Optionally, the DRC circuit includes: the device comprises a gain calculation module and a gain processing module;
the gain calculation module is used for calculating the adjustment gain in real time by referring to the accessed speed data and threshold data; the gain processing module is configured to set a compression time and a release time based on the adjusted gain.
Optionally, the adjustment gain is a fixed value or an adjustable value.
Correspondingly, the invention also provides a driving method of the loudspeaker, which comprises the following steps:
accessing an audio input signal;
generating corresponding speed data of a diaphragm of the loudspeaker according to the audio input signal;
performing corresponding DRC adjustment on the speed data to output an adjustment gain;
and multiplying the delayed audio input signal by the adjusting gain and outputting the multiplied signal to the loudspeaker for driving.
Optionally, generating speed data according to the audio input signal comprises:
according to the formula:
converting the audio input signal into the speed data, wherein v(s) is the speed data, u(s) is the audio input signal, Bl is a product of magnetic induction and coil length of the speaker, R is a direct current resistance of the speaker, L is an equivalent inductance of the speaker, m is a mass of a coil of the speaker, R is a mechanical damping of the speaker, 1/c is a mechanical spring coefficient of the speaker, and s is a complex parameter variable of laplace transform.
Correspondingly, the invention also provides electronic equipment which comprises a loudspeaker and the driving device of the loudspeaker.
Optionally, the electronic device includes a mobile terminal.
Compared with the prior art, the technical scheme provided by the invention at least has the following advantages:
the invention provides a driving device and a driving method of a loudspeaker and an electronic device, comprising: a dynamic range control unit, a delay unit and a multiplier; the dynamic range control unit is used for accessing an audio input signal, generating corresponding speed data of a diaphragm of the loudspeaker according to the audio input signal, and performing corresponding DRC adjustment on the speed data to output an adjustment gain to the multiplier; the delay unit is used for delaying and outputting the audio input signal to the multiplier; and the multiplier is used for multiplying the delayed audio input signal by the adjusting gain and outputting the multiplied signal to the loudspeaker for driving.
According to the technical scheme, the corresponding speed data of the diaphragm of the loudspeaker is predicted in real time according to the audio input signal; when the predicted speed data is larger than the threshold data, performing corresponding DRC adjustment on the speed data to output an adjustment gain, multiplying the adjustment gain by the delayed audio input signal, and outputting the result to a loudspeaker for driving, so that the speed data of a vibrating diaphragm of the loudspeaker cannot exceed the threshold data, and the purpose of improving the condition that the loudspeaker generates piano noise is achieved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As described in the background, small speakers are used on a large scale in the market of mobile phone terminals. However, in the conventional small speaker, when the velocity of the mode is relatively high, piano noise is easily generated in the speaker. Under the condition that the requirement of the modern society for the audibility of the sound effect of the mobile phone is higher and higher, the problem of piano noise of the small loudspeaker is more and more serious.
Based on this, the embodiment of the invention provides a driving device and a driving method for a loudspeaker and an electronic device, which effectively solve the technical problems in the prior art and improve the condition that the loudspeaker generates noise.
To achieve the above object, the technical solutions provided by the embodiments of the present invention are described in detail below, specifically with reference to fig. 1 to 5.
Referring to fig. 1, a schematic structural diagram of a driving apparatus of a speaker according to an embodiment of the present invention is shown, where the driving apparatus includes: a dynamic range control unit 100, a delay unit 200 and a multiplier 300.
The dynamic range control unit 100 is configured to access an audio input signal, generate corresponding speed data of a diaphragm of the speaker according to the audio input signal, perform corresponding DRC adjustment on the speed data, and output an adjustment gain to the multiplier 300.
The delay unit 200 is configured to delay and output the audio input signal to the multiplier 300.
And the multiplier 300 is configured to multiply the delayed audio input signal by the adjustment gain and output the multiplied signal to the speaker 400 for driving.
It should be noted that, in the embodiment of the present invention, two paths of control are performed on the audio input signal, where one path is to perform corresponding gain processing on the audio input signal to obtain an adjustment gain, and the other path is to delay the audio input signal for a certain time and then output the delayed audio input signal, so that the delayed audio input signal is multiplied by the adjustment gain. That is, in the technical solution provided in the embodiment of the present invention, it takes a certain time to perform gain processing on the audio input signal to obtain the adjustment gain, and in order to ensure that the audio input signal multiplied by the adjustment gain is the audio input signal that is initially input before performing the gain processing, the audio input signal is delayed and output to be multiplied by the adjustment gain, and preferably, the delay time is equal to the time required to obtain the minimum adjustment gain by performing the gain processing.
It can be understood that, in the driving apparatus provided in the embodiment of the present invention, the audio input signal may be a voltage signal. Predicting corresponding speed data of a diaphragm of the loudspeaker in real time according to the audio input signal; when the predicted speed data is larger than the threshold data, the invention can carry out corresponding DRC adjustment on the speed data to output the adjustment gain, and multiplies the adjustment gain by the delayed audio input signal and outputs the multiplication result to the loudspeaker for driving, thereby ensuring that the speed data of the vibrating diaphragm of the loudspeaker does not exceed the threshold data and achieving the purpose of improving the condition that the loudspeaker generates piano noise.
The driving device provided by the embodiment of the invention comprises a delay unit, and the delay unit is used for delaying and outputting the audio input signal to the multiplier, so that when the audio input signal is multiplied by the gain, the gain is the expected adjustment gain. Wherein, the processing gain of the signal in the digital audio signal processing can not be changed suddenly, and the gain can be adjusted to the expected adjustment gain through a slow change of a time interval; in the process of gain adjustment, it must be ensured that the signal input to the speaker does not cause the speaker to generate piano noise; therefore, the driving device provided by the embodiment of the invention is provided with a delay unit, and when the audio input signal is multiplied by the gain, the gain is the adjusted gain obtained by the gain processing.
Referring to fig. 2, a schematic structural diagram of another driving apparatus for a speaker according to an embodiment of the present invention is shown, where the driving apparatus according to the embodiment of the present invention includes: a dynamic range control unit 100, a delay unit 200 and a multiplier 300.
The dynamic range control unit 100 is configured to access an audio input signal, generate corresponding speed data of a diaphragm of the speaker according to the audio input signal, perform corresponding DRC adjustment on the speed data, and output an adjustment gain to the multiplier 300.
The delay unit 200 is configured to delay and output the audio input signal to the multiplier 300.
And the multiplier 300 is configured to multiply the delayed audio input signal by the adjustment gain and output the multiplied signal to the speaker 400 for driving. The dynamic range control unit 100 provided in the embodiment of the present invention includes: a speed generator 111 and a DRC circuit 112.
The speed generator 111 is configured to generate the speed data after accessing the audio input signal, and the DRC circuit 112 is configured to perform a corresponding DRC adjustment on the speed data and output an adjustment gain to the multiplier 300.
The following describes a specific principle of the velocity generator according to an embodiment of the present invention with reference to fig. 3, where fig. 3 is an equivalent model of a speaker according to an embodiment of the present invention. Wherein, R is the direct current resistance of the loudspeaker, and L is the equivalent inductance of the loudspeaker. Bl is the product of the magnetic induction of the loudspeaker and the coil length; and, v is the speed, i is the current, Blv derived by Bl v is the back electromotive force, Bli derived by Bl i is the ampere force. L2 and R2 are inductance and resistance equivalent to the eddy current effect of the loudspeaker at high frequency, and the influence of the two parameters on the equivalent model of the loudspeaker is small and can be ignored. m is the mass of the coil of the loudspeaker, r is the mechanical damping of the loudspeaker, and 1/c is the mechanical spring coefficient of the loudspeaker.
There are two loops in the equivalent model of the loudspeaker, the voltage loop on the left in fig. 3 and the force loop on the right in fig. 3. The mathematical expression can be expressed as:
wherein U (t) is the real-time input voltage value, I (t) is the real-time current value, and x (t) is the real-time displacement of the loudspeaker vibration mode.
Converting the two expressions into Laplace domain (S domain) expressions by using the system knowledge of the digital signal:
the velocity model of the diaphragm of the loudspeaker is established as follows:
the relationship between velocity v(s) and displacement x(s) is:
and (5) combining the three formulas of the laplace domain, and eliminating I(s) and x(s) to obtain the expression v(s) related to U(s):
for a loudspeaker of a specific specification, Bl, c, R, m, L, R are all linear parameters, which can be directly measured as known quantities. Therefore, by the above equation, the real-time velocity of the loudspeaker mode can be predicted from the input real-time voltage data. That is, the speed generator provided by the embodiment of the present invention is according to the formula:
converting the accessed audio input signal into the speed data, wherein v(s) is the speed data, u(s) is the audio input signal, Bl is a product of magnetic induction and coil length of the speaker, R is a direct current resistance of the speaker, L is an equivalent inductance of the speaker, m is a mass of a coil of the speaker, R is a mechanical damping of the speaker, 1/c is a mechanical spring coefficient of the speaker, and s is a complex parameter variable of laplace transform.
Referring to fig. 4, a schematic structural diagram of a driving apparatus of a speaker according to another embodiment of the present invention is shown, where the driving apparatus according to the embodiment of the present invention includes: a dynamic range control unit 100, a delay unit 200 and a multiplier 300.
The dynamic range control unit 100 is configured to access an audio input signal, generate corresponding speed data of a diaphragm of the speaker according to the audio input signal, perform corresponding DRC adjustment on the speed data, and output an adjustment gain to the multiplier 300.
The delay unit 200 is configured to delay and output the audio input signal to the multiplier 300.
And the multiplier 300 is configured to multiply the delayed audio input signal by the adjustment gain and output the multiplied signal to the speaker 400 for driving. The dynamic range control unit 100 provided in the embodiment of the present invention includes: a speed generator 111 and a DRC circuit 112.
The speed generator 111 is configured to generate the speed data after accessing the audio input signal, and the DRC circuit 112 is configured to perform a corresponding DRC adjustment on the speed data and output an adjustment gain to the multiplier 300.
Also, the DRC circuit 112 provided by the embodiment of the present invention includes: the device comprises a gain calculation module and a gain processing module.
The speed generator 111 sends the speed data to a gain calculation module, which is used for calculating the adjustment gain in real time by referring to the accessed speed data and threshold data; the gain processing module is configured to set a compression time and a release time based on the adjusted gain.
It should be noted that the adjustment gain provided by the embodiment of the present invention may be a fixed value; the adjustment gain may also be a dynamic adjustment value responsive to the size of the speed data, i.e., the adjustment gain is smaller as the speed data exceeds the threshold data.
That is, the adjustment gain is an adjustable value, and the adjustment gain is reversely changed along with the change trend of the speed data exceeding the threshold data, that is, the adjustment gain is relatively smaller when the speed data exceeds the threshold data, compared with the adjustment gain when the speed data exceeds the threshold data; and the adjustment gain is relatively larger when the speed data exceeds the threshold data more than when the speed data exceeds the threshold data less than the threshold data. . The embodiment of the invention does not specifically limit the adjustable range of the adjusting gain, can be specifically designed according to the actual DRC algorithm, and only needs to meet the requirement that the larger the speed data output by the speed generator exceeds the threshold data, the smaller the finally obtained adjusting gain. And the compression time provided by the embodiment of the invention is the time for compressing the gain to the expected gain, and the release time is the time for releasing the gain to the expected gain, so that the gain can be smoothly transited to the expected gain by setting certain compression time and release time, and the condition of sudden gain change is avoided.
It can be understood that, the DRC circuit provided by the embodiment of the present invention calculates the adjustment gain in real time with reference to the accessed speed data and the threshold data; and the DRC circuit outputs through the compression time set accordingly. Specifically, the gain calculation module calculates the adjustment gain in real time by referring to the speed data and the threshold data, wherein when the speed data is smaller than the threshold data, the output adjustment gain is 0dB (the Log domain 0 corresponds to the linear domain 1); and when the speed data is larger than the threshold value data, starting to reduce the gain to a preset adjustment gain, and ensuring that the speed data of the vibrating diaphragm of the loudspeaker does not exceed the threshold value data. The compression time provided by the embodiment of the invention is bound with the delay time of the delay unit, so that the delayed audio input signal is multiplied by the expected adjustment gain after the corresponding gain adjustment, and the speed data of the loudspeaker is ensured not to exceed the threshold data.
Correspondingly, an embodiment of the present invention further provides a loudspeaker driving method, which is a flowchart of the loudspeaker driving method provided in the embodiment of the present invention, with reference to fig. 5, where the loudspeaker driving method includes:
and S1, accessing the audio input signal.
And S2, generating corresponding speed data of the diaphragm of the loudspeaker according to the audio input signal.
And S3, performing corresponding DRC adjustment on the speed data to output an adjustment gain.
And S4, multiplying the delayed audio input signal by the adjusting gain and outputting the multiplied signal to the loudspeaker for driving.
It should be noted that, the present invention performs two-way control on the audio input signal, wherein one way is to perform corresponding gain processing on the audio input signal to obtain an adjustment gain, and the other way is to delay the audio input signal for a certain time and then output the delayed audio input signal, so that the delayed audio input signal is multiplied by the adjustment gain. That is, in the technical solution provided by the present invention, it takes a certain time to gain process the audio input signal to obtain the adjustment gain, and in order to ensure that the audio input signal multiplied by the adjustment gain is the audio input signal that is initially input before the gain process is performed, the audio input signal is delayed and output to be multiplied by the adjustment gain, and preferably, the delay time is equal to the time required to obtain the minimum adjustment gain by performing the gain process.
It can be understood that, in the driving apparatus provided in the embodiment of the present invention, the audio input signal may be a voltage signal. Predicting corresponding speed data of a diaphragm of the loudspeaker in real time according to the audio input signal; when the predicted speed data is larger than the threshold data, the invention can carry out corresponding DRC adjustment on the speed data to output the adjustment gain, and multiplies the adjustment gain by the delayed audio input signal and outputs the multiplication result to the loudspeaker for driving, thereby ensuring that the speed data of the vibrating diaphragm of the loudspeaker does not exceed the threshold data and achieving the purpose of improving the condition that the loudspeaker generates piano noise.
The driving device provided by the embodiment of the invention comprises a delay unit, and the delay unit is used for delaying and outputting the audio input signal to the multiplier, so that when the audio input signal is multiplied by the gain, the gain is the expected adjustment gain. Wherein, the processing gain of the signal in the digital audio signal processing can not be changed suddenly, and the gain can be adjusted to the expected adjustment gain through a slow change of a time interval; in the process of gain adjustment, it must be ensured that the signal input to the speaker does not cause the speaker to generate piano noise; therefore, the driving device provided by the embodiment of the invention is provided with the delay unit, and the gain is ensured to be adjusted when the audio input signal is multiplied by the gain.
In an embodiment of the present invention, the generating speed data from the audio input signal provided by the present invention comprises:
according to the formula:
converting the audio input signal into the speed data, wherein v(s) is the speed data, u(s) is the audio input signal, Bl is a product of magnetic induction and coil length of the speaker, R is a direct current resistance of the speaker, L is an equivalent inductance of the speaker, m is a mass of a coil of the speaker, R is a mechanical damping of the speaker, 1/c is a mechanical spring coefficient of the speaker, and s is a complex parameter variable of laplace transform.
Correspondingly, the invention further provides electronic equipment, and the electronic equipment comprises a loudspeaker and the driving device of the loudspeaker provided by any one of the embodiments.
Optionally, the electronic device provided in the embodiment of the present invention includes a mobile terminal, and may further include other electronic devices having the speaker and the driving device of the speaker provided in any of the above embodiments, and the type of the electronic device is not particularly limited in the present invention.
The invention provides a driving device and a driving method of a loudspeaker and an electronic device, comprising: a dynamic range control unit, a delay unit and a multiplier;
the dynamic range control unit is used for accessing an audio input signal, generating corresponding speed data of a diaphragm of the loudspeaker according to the audio input signal, and performing corresponding DRC adjustment on the speed data to output an adjustment gain to the multiplier; the delay unit is used for delaying and outputting the audio input signal to the multiplier; and the multiplier is used for multiplying the delayed audio input signal by the adjusting gain and outputting the multiplied signal to the loudspeaker for driving.
According to the technical scheme, the corresponding speed data of the diaphragm of the loudspeaker is predicted in real time according to the audio input signal; when the predicted speed data is larger than the threshold data, the invention can carry out corresponding DRC adjustment on the speed data to output the adjustment gain, and multiplies the adjustment gain by the delayed audio input signal and outputs the multiplication result to the loudspeaker for driving, thereby ensuring that the speed data of the vibrating diaphragm of the loudspeaker does not exceed the threshold data and achieving the purpose of improving the condition that the loudspeaker generates piano noise.
The driving device provided by the embodiment of the invention comprises a delay unit, and the delay unit is used for delaying and outputting the audio input signal to the multiplier, so that when the audio input signal is multiplied by the gain, the gain is the expected adjustment gain. Wherein, the processing gain of the signal in the digital audio signal processing can not be changed suddenly, and the gain can be adjusted to the expected adjustment gain through a slow change of a time interval; in the process of gain adjustment, it must be ensured that the signal input to the speaker does not cause the speaker to generate piano noise; therefore, the driving device provided by the embodiment of the invention is provided with the delay unit, and the gain is ensured to be adjusted when the audio input signal is multiplied by the gain.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.