Modulation Method, System and Audio System for Audio Signals

The audio signal modulation method in D-class amplifiers addresses inefficiencies by detecting signal envelopes to switch between power and audio quality modes, optimizing efficiency and quality through dynamic pulse width modulation.

CN119255154BActive Publication Date: 2025-07-15SUZHOU LINK-IC CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411287252.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2025-07-15
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

Traditional Class D audio power is used to play music without music. The inductance ripple current is high, the static power consumption is high, and the signal output swing is limited when outputting at low volume. The high common mode voltage leaves too much margin for the output signal swing, which wastes a lot of power consumption.

Method used

By performing envelope detection of the audio signal to be played, determining its type, and selecting the power priority mode or sound quality priority mode for pulse width modulation according to the type, dynamically adjusting the common mode voltage to optimize power consumption and sound quality.

Benefits of technology

Ensure audio quality in sound quality in the first-priority mode, reduce power consumption in the first-priority mode, take into account the amplifier output efficiency, reduce the common-mode voltage switching frequency, and improve the overall audio quality and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119255154B_ABST
    Figure CN119255154B_ABST
Patent Text Reader

Abstract

The present invention provides a modulation method for an audio signal and an audio signal modulation system. By performing envelope detection on the audio signal to be played, the envelope value of the audio signal to be played is obtained; based on the envelope value of the audio signal to be played, the type of the audio signal to be played and its corresponding modulation mode are determined; when the audio signal to be played is a low-volume signal, the modulation mode is determined to be the power priority mode; when the audio signal to be played is a medium-volume signal, the modulation mode is determined to be the sound quality priority mode, and when the audio signal to be played is a high-volume signal, the modulation mode is determined as needed; pulse width modulation is performed on the audio signal to be played based on the above debugging mode, so that the present invention can preferentially ensure the audio quality of the power amplifier output in the sound quality priority mode, and allow the power amplifier to reduce power consumption within a certain range in the power priority mode, thereby giving consideration to ensuring a relatively high output efficiency of the power amplifier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of loudspeakers, and in particular to a method for modulating an audio signal, an audio signal modulation system, and an audio system. Background Art

[0002] In the traditional pulse width modulation technology of class D audio power amplifiers, a pulse width modulator modulates an audio signal into a PWM pulse waveform in a BD modulation mode. The common mode of the pulse width modulation is fixed at 1 / 2 of the full swing of a triangular wave generator. Thus, the duty cycle of the output common mode is 50%. The output stage of the class D audio power amplifier is coupled to an LC filter to filter out switching signals when the class D audio power amplifier outputs medium and high power audio, thereby reducing EMI.

[0003] However, when outputting medium and high power audio, the inductor ripple current loss generated by the LC filter is the main component of the static power consumption. In the BD modulation mode, when the common mode duty cycle of the PWM pulse waveform approaches or equals 50%, the inductor ripple current loss generated by the LC filter is the largest. This leads to the following problems:

[0004] (1) When there is no music playing in the power amplifier currently, the inductor ripple current in the circuit is still very large, resulting in a problem of high static power consumption;

[0005] (2) When the power amplifier outputs a small volume audio signal, the signal output swing is limited, and the high common mode voltage leaves too much margin for the output signal to swing, resulting in more power consumption waste.

[0006] Therefore, how to ensure the audio quality of the power amplifier output while also ensuring a relatively high output efficiency of the power amplifier has become a technical problem that the industry urgently needs to solve currently. Summary of the Invention

[0007] The present invention provides a method for modulating an audio signal, an audio signal modulation system, and an audio system to solve the problem of how to ensure the audio quality of the power amplifier output while also ensuring a relatively high output efficiency of the power amplifier.

[0008] According to a first aspect of the present invention, there is provided a method for modulating an audio signal, including:

[0009] Receiving an audio signal to be played;

[0010] Performing envelope detection on the audio signal to be played to obtain an envelope value of the audio signal to be played;

[0011] Based on the envelope value of the audio signal to be played, determining a modulation type of the audio signal to be played, where the modulation type includes a small volume type, a medium volume type, and a large volume type;

[0012] When the modulation type is the low volume type, determine that the predicted debugging mode of the audio signal to be played is the power priority mode;

[0013] When the modulation type is the medium volume type, determine that the predicted debugging mode of the audio signal to be played is the sound quality priority mode;

[0014] When the modulation type is the high volume type, determine that the predicted debugging mode of the audio signal to be played is the power priority mode or the sound quality priority mode;

[0015] Perform pulse width modulation on the audio signal to be played based on the predicted debugging mode.

[0016] Optionally, performing pulse width modulation on the audio signal to be played based on the sound quality priority mode includes:

[0017] Perform pulse width modulation on the audio signal to be played based on a first common mode voltage, where the first common mode voltage is the common mode voltage of a triangular voltage signal.

[0018] Optionally, performing pulse width modulation on the audio signal to be played based on the power priority mode includes:

[0019] Perform pulse width modulation on the audio signal to be played based on a second common mode voltage, where the voltage value of the second common mode voltage is less than the voltage value of the first common mode voltage.

[0020] Optionally, the method for obtaining the envelope value of the audio signal to be played includes: obtaining the envelope value of the audio signal to be played through a first-order low-pass filter or a second-order low-pass filter.

[0021] Optionally, the method for obtaining the envelope value of the audio signal to be played through a first-order low-pass filter includes: obtaining the signal envelope value of the audio signal to be played according to the response speed alpha of the first-order low-pass filter and the value input of the audio signal to be played:

[0022] env = env·(1 - alpha)+abs(input)·alpha

[0023] where env is the signal envelope value of the audio signal to be played, and 0 < alpha < 1.

[0024] Optionally, the method for obtaining the envelope value of the audio signal to be played through a second-order low-pass filter includes: obtaining the signal envelope value of the audio signal to be played at time series n according to the signal input[n-2] of the audio signal to be played at time series n-2, the signal input[n-1] at time series n-1, and the signal input[n] at time series n:

[0025] env[n] = input[n]·b[1] + input[n-1]·b[2] + input[n-2]·b[3] - env[n-1]·a[2] - env[n-2]·a[3]

[0026] where b[1] is the first forward coefficient of the second-order low-pass filter, b[2] is the second forward coefficient of the second-order low-pass filter, b[3] is the third forward coefficient of the second-order low-pass filter, a[1] is the first backward coefficient of the second-order low-pass filter, a[2] is the second backward coefficient of the second-order low-pass filter, and a[3] is the third backward coefficient of the second-order low-pass filter.

[0027] Optionally, the method for performing envelope detection on the audio signal to be played and obtaining the envelope value of the audio signal to be played further includes:

[0028] Providing a first preset amplitude and a second preset amplitude, where the first preset amplitude corresponds to the large volume type and the second preset amplitude corresponds to the small volume type;

[0029] Extracting the audio signal to be played within a preset observation time window and performing comparison processing to obtain the proportion of the audio signal to be played higher than the first preset amplitude and the proportion of the audio signal to be played higher than the second preset amplitude respectively;

[0030] Based on the proportion of the audio signal to be played higher than the first preset amplitude and the proportion of the audio signal to be played higher than the second preset amplitude, determining the envelope level of the audio signal to be played;

[0031] Obtaining the envelope value range corresponding to different envelope levels, and the envelope value range corresponding to each envelope level is different;

[0032] Based on the envelope level of the audio signal to be played and the envelope value range corresponding to different envelope levels, determining the envelope value range of the audio signal to be played.

[0033] Optionally, performing pulse width modulation on the audio signal to be played based on the expected debugging mode includes:

[0034] Obtaining the current debugging mode and the expected debugging mode;

[0035] When the current debugging mode is the same as the expected debugging mode, perform pulse width modulation on the audio signal to be played based on the current debugging mode;

[0036] When the current debugging mode is different from the expected debugging mode, time the time when the audio signal to be played is in the expected debugging mode;

[0037] When the duration of the expected debugging mode reaches a preset duration, perform pulse width modulation on the audio signal to be played based on the expected debugging mode;

[0038] When the duration of the expected debugging mode does not reach the preset duration, perform pulse width modulation on the audio signal to be played based on the current debugging mode.

[0039] According to the second aspect of the present invention, there is provided an audio signal modulation system, including:

[0040] An audio signal to be played receiving module, configured to receive an audio signal to be played;

[0041] An envelope detection module, configured to perform envelope detection on the audio signal to be played to obtain an envelope value of the audio signal to be played;

[0042] A modulation mode determination module, configured to determine a modulation type of the audio signal to be played based on the envelope value of the audio signal to be played, where the modulation type includes a small volume type, a medium volume type, and a large volume type; when the modulation type is the small volume type, determine the expected debugging mode of the audio signal to be played as the power priority mode; when the modulation type is the medium volume type, determine the expected debugging mode of the audio signal to be played as the sound quality priority mode; when the modulation type is the large volume type, determine the expected debugging mode of the audio signal to be played as the sound quality priority mode or the power priority mode;

[0043] A pulse width modulation module, configured to perform pulse width modulation on the audio signal to be played based on the expected debugging mode.

[0044] According to the third aspect of the present invention, there is provided a sound system, including:

[0045] A digital IO interface, configured to decode the audio signal to be played according to a transmission protocol;

[0046] A modulation mode switching module, including the audio signal modulation system described in the second aspect of the present invention, configured to output a pulse width modulation signal according to the audio signal to be played, where the pulse width modulation signal includes common mode voltage adjustment information;

[0047] A volume control module, configured to receive the audio signal to be played and adjust the digital gain of the audio signal to be played;

[0048] A digital-to-analog converter, configured to receive the audio signal to be played after adjusting the digital gain and convert the audio signal to be played into an analog audio signal;

[0049] An amplifier, configured to receive the analog audio signal and perform analog gain on the analog audio signal;

[0050] A pulse width modulator, configured to perform pulse width modulation on the analog audio signal after analog gain based on the pulse width modulation signal and output a corresponding audio pulse width signal;

[0051] A speaker, configured to convert the audio pulse width signal into a sound wave signal.

[0052] In the audio signal modulation method and the audio signal modulation system provided by the technical solution of the present invention, by performing envelope detection on the audio signal to be played, the envelope value of the audio signal to be played is obtained; based on the envelope value of the audio signal to be played, the type of the audio signal to be played and its corresponding modulation mode are determined; when the audio signal to be played is a low-volume signal, the modulation mode is determined to be the power priority mode; when the audio signal to be played is a medium-volume signal, the modulation mode is determined to be the sound quality priority mode, and when the audio signal to be played is a high-volume signal, the modulation mode is determined as needed; pulse width modulation is performed on the audio signal to be played based on the above modulation mode. Thus, the present invention can preferentially ensure the audio quality of the power amplifier output in the sound quality priority mode, and allow the power amplifier to reduce power consumption within a certain range in the power priority mode, thereby giving consideration to ensuring a relatively high output efficiency of the power amplifier.

[0053] Further, when switching the modulation mode, the technical solution provided by the present invention compares and determines whether the current modulation mode is the same as the modulation mode. When the current modulation mode is the same as the modulation mode, pulse width modulation is performed on the audio signal to be played based on the current modulation mode; when the current modulation mode is different from the modulation mode, the time of the audio signal to be played in the modulation mode is timed, and pulse width modulation is performed on the audio signal to be played based on the modulation mode only when the duration of the modulation mode reaches a preset duration; otherwise, pulse width modulation is performed on the audio signal to be played based on the current modulation mode. Thus, the present invention can reduce the switching frequency of the common mode voltage, reduce the number of times of sound quality degradation caused by switching the common mode voltage, and ensure the audio quality of the subsequent power amplifier output.

[0054] In addition, in the audio system provided by the technical solution of the present invention, the transmission protocol is parsed through a digital IO interface, and the audio signal to be played is decoded; the modulation mode switching module includes the above-mentioned audio signal modulation system, which is used to output a pulse width modulation signal according to the audio signal to be played, and the pulse width modulation signal includes debugging mode information; the volume control module receives the audio signal to be played and adjusts the digital gain of the audio signal to be played; the digital-to-analog converter receives the audio signal to be played after adjusting the digital gain and converts the audio signal to be played into an audio analog signal; the amplifier receives the audio analog signal and performs analog gain on the audio analog signal; the pulse width modulator modulates the audio analog signal after analog gain based on the pulse width modulation signal and outputs the corresponding PWM signal; the speaker converts the PWM signal into a sound wave signal, so as to determine the corresponding debugging mode by using the audio signal to be played, and the pulse width modulator determines the common-mode voltage during modulation based on the debugging mode, thereby adjusting the duty cycle of the speaker output, avoiding the problem of large inductive ripple current and low speaker efficiency caused by a large duty cycle of the speaker output when the signal volume is small, and using the characteristic of reduced sound quality of the large-volume signal to give priority to ensuring the power and efficiency of the speaker when the signal volume is large, and ensuring the sound quality restoration degree of the speaker when the signal volume is medium or large and there is a need for sound quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0056] Figure 1 It is a waveform schematic diagram of an audio signal in the BTL mode in the prior art;

[0057] Figure 2 It is a THDN schematic diagram of audio signals in different modes in the prior art;

[0058] Figure 3 It is a flow schematic diagram of the audio signal modulation method in the embodiment of the present invention;

[0059] Figure 4 It is a flow schematic diagram of the method for detecting the envelope value with lower precision in the embodiment of the present invention;

[0060] Figures 5 to 7 It is a waveform schematic diagram of the pulse width modulation process in the sound quality priority mode in the embodiment of the present invention;

[0061] Figures 8 to 10It is a waveform diagram of the pulse width modulation process in the power priority mode in the embodiment of the present invention;

[0062] Figure 11 It is a waveform diagram of the working effect in the embodiment of the present invention;

[0063] Figure 12 It is a flowchart of the method for determining the debugging mode in the embodiment of the present invention;

[0064] Figure 13 It is a simulation waveform diagram of the current debugging mode in the embodiment of the present invention;

[0065] Figure 14 It is a block diagram of the audio signal modulation system in the embodiment of the present invention;

[0066] Figure 15 It is the block of the sound system in the embodiment of the present invention Figure 1 ;

[0067] Figure 16 It is the block of the sound system in the embodiment of the present invention Figure 2 ;

[0068] Description of reference numerals:

[0069] 20 - Audio signal receiving module to be played;

[0070] 21 - Envelope detection module;

[0071] 22 - Modulation mode determination module;

[0072] 23 - Pulse width modulation module;

[0073] 30 - TDM / I2S signal source;

[0074] 31 - Digital IO interface;

[0075] 33 - Volume control module;

[0076] 34 - Digital - to - analog converter;

[0077] 35 - Amplifier;

[0078] 36 - Pulse width modulator;

[0079] 37 - Speaker;

[0080] 38 - Volume configuration module. Detailed implementation manners

[0081] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0082] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above accompanying drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0083] The technical solutions of the present invention will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0084] Before filing this application, the applicant has conducted a full study on the existing audio signal modulation methods, and proposed that in order to solve the problems existing in the existing audio signal modulation methods, namely, when there is no music playing in the power amplifier currently, the inductor ripple current in the circuit is still very large, resulting in high static power consumption, and when the power amplifier outputs a small-volume audio signal, the signal output swing is limited, and the high common-mode voltage leaves too much margin for the output signal to swing, resulting in more power consumption waste. The solution is generally to dynamically adjust the common-mode duty cycle, making it change in a stepwise manner as the audio signal becomes larger, so as to calculate the required common-mode voltage in real time through the audio signal to be played, and reflect it in the pulse width modulation process, so that the current audio signal can be played with minimal loss.

[0085] However, in actual implementation, please refer to Figure 1 the waveform diagram shown, which shows the audio signal waveform output by one side of the power amplifier when the common-mode voltage changes in the BTL mode. It can be seen that the audio signal waveform is a conventional low-frequency sine signal, and the common-mode voltage changes periodically at a certain moment of the sine wave, and there are spikes on the waveform at the moment of change, which indicates a decline in audio quality.

[0086] Please refer to Figure 2The waveform diagram shown shows the THDN schematic diagram of audio signals in different modes, including data on the Total Harmonic Distortion plus Noise (THDN) measured by an Audio Precision (AP) analyzer varying with the output signal. Among them:

[0087] THDN can be understood as a percentage value. The lower the value, the better the sound quality.

[0088] Hybrid can be understood as a technology for dynamically adjusting the common-mode voltage.

[0089] BD can be understood as a balanced drive mode, in which the common-mode duty cycle is fixed at 50%.

[0090] 1SPW can be understood as a low-duty-cycle drive mode, in which the common-mode duty cycle is less than 50%, generally about 15%, so as to optimize the static power consumption.

[0091] In Figure 2 it can be seen that when the audio signal to be played is a conventional low-frequency sine signal, the problem of frequent switching of the common-mode voltage generating glitches has nothing to do with the magnitude (or power magnitude) of the audio signal to be played, and the common-mode voltage is prone to frequent switching in the Hybrid mode, which will result in higher THDN data and overall poorer performance than the two fixed common-mode duty cycle modes (i.e., BD and 1SPW), making it difficult to ensure the audio quality of the power amplifier output.

[0092] At the same time, although the 1SPW mode has a smaller difference in effect than the BD mode when the audio signal to be played is small, when the amplitude of the audio signal to be played is large, there will still be a problem of degraded sound quality.

[0093] In view of this, the present invention proposes a new modulation method for audio signals, which provides a power priority modulation mode and a sound quality priority modulation mode according to the envelope value of the audio signal to be played, so as to solve the above problems.

[0094] An embodiment of the present invention proposes a modulation method for audio signals, which is applied to a class D power amplifier and includes:

[0095] Receiving an audio signal to be played;

[0096] Performing envelope detection on the audio signal to be played to obtain the envelope value of the audio signal to be played;

[0097] Based on the envelope value of the audio signal to be played, determining the modulation type of the audio signal to be played, where the modulation type includes a small volume type, a medium volume type, and a large volume type;

[0098] When the modulation type is the low - volume type, determine that the predicted debugging mode of the audio signal to be played is the power - priority mode;

[0099] When the modulation type is the medium - volume type, determine that the predicted debugging mode of the audio signal to be played is the sound - quality - priority mode;

[0100] When the modulation type is the high - volume type, determine that the predicted debugging mode of the audio signal to be played is the power - priority mode or the sound - quality - priority mode;

[0101] Perform pulse - width modulation on the audio signal to be played based on the predicted debugging mode.

[0102] Wherein, the modulation type of the audio signal to be played can be understood as the power consumption or power type of the audio signal to be played.

[0103] Regarding determining that the predicted debugging mode of the audio signal to be played is the power - priority mode or the sound - quality - priority mode when the modulation type is the high - volume type, this is because at high power (i.e., high - volume type), the audio quality itself will decrease significantly, and power becomes important instead. In this case, either the sound - quality - priority mode can be selected to ensure the sound - quality restoration degree of the high - volume signal as much as possible, or the power - priority mode can be selected to utilize the characteristic that the sound quality of the high - volume signal decreases to ensure the power and efficiency of the power amplifier when the high - volume signal is present;

[0104] In actual implementation, it is also possible to preferentially select the predicted debugging mode of the audio signal to be played as the sound - quality - priority mode.

[0105] Thus, the technical solution of the present invention has no distortion in the signal modulated in the sound - quality - priority mode, and the sound - quality restoration degree is the best, ensuring the audio quality output by the power amplifier. In the power - priority mode, the inductor ripple current generated after the modulated signal is output to the power amplifier is small and the efficiency is high;

[0106] Wherein, when the modulation type is the low - volume type, the duty cycle modulated is relatively small, which is equivalent to allowing the power amplifier to reduce power consumption within a certain range, thereby ensuring a relatively high output efficiency of the power amplifier.

[0107] To make the above - mentioned objects, features, and beneficial effects of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention will be given with reference to the accompanying drawings.

[0108] As a specific implementation manner, please refer to Figure 3 , Figure 3 which shows the flowchart of the modulation method of the above - mentioned audio signal, including:

[0109] S11: Receive the audio signal to be played;

[0110] S12: Perform envelope detection on the audio signal to be played, and obtain the envelope value of the audio signal to be played;

[0111] S13: Based on the envelope value of the audio signal to be played, determine the modulation type of the audio signal to be played. If the modulation type is the low volume type, enter S14; if the modulation type is the medium volume type, enter S15; if the modulation type is the high volume type, enter S16;

[0112] S14: Determine that the predicted debugging mode of the audio signal to be played is the power priority mode; and enter S17;

[0113] S15: Determine that the predicted debugging mode of the audio signal to be played is the sound quality priority mode;

[0114] And enter S17;

[0115] S16: Determine that the predicted debugging mode of the audio signal to be played is the power priority mode or the sound quality priority mode; and enter S17;

[0116] S17: Perform pulse width modulation on the audio signal to be played based on the predicted debugging mode, and return to S11.

[0117] Regarding the obtaining of the envelope value of the audio signal to be played in step S12, the specific description is as follows:

[0118] In one implementation, the method for obtaining the envelope value of the audio signal to be played includes: obtaining the envelope value of the audio signal to be played through a first-order low-pass filter or a second-order low-pass filter.

[0119] In a specific implementation, the method for obtaining the envelope value of the audio signal to be played through a first-order low-pass filter includes: obtaining the signal envelope value of the audio signal to be played according to the response speed alpha of the first-order low-pass filter and the value input of the audio signal to be played:

[0120] env = env·(1 - alpha)+abs(input)·alpha

[0121] where env is the signal envelope value of the audio signal to be played, and 0 < alpha < 1.

[0122] In another specific implementation, the method for obtaining the envelope value of the audio signal to be played through a second-order low-pass filter includes: obtaining the signal envelope value of the audio signal to be played at time series n according to the signal input[n-2] of the audio signal to be played at time series n-2, the signal input[n-1] at time series n-1, and the signal input[n] at time series n:

[0123] env[n] = input[n]·b[1] + input[n-1]·b[2] + input[n-2]·b[3] - env[n-1]·a[2] - env[n-2]·a[3]

[0124] where b[1] is the first forward coefficient of the second-order low-pass filter, b[2] is the second forward coefficient of the second-order low-pass filter, b[3] is the third forward coefficient of the second-order low-pass filter, a[1] is the first backward coefficient of the second-order low-pass filter, a[2] is the second backward coefficient of the second-order low-pass filter, and a[3] is the third backward coefficient of the second-order low-pass filter.

[0125] Of course, the present invention does not limit how to obtain the envelope value of the audio signal to be played, and those skilled in the art can select a suitable calculation method according to the hardware performance.

[0126] When the hardware performance is poor, in one implementation, please refer to Figure 4 , Figure 4 shows a flowchart of a method for detecting the envelope value with low precision, which is used to perform envelope detection on the audio signal to be played and obtain the envelope value of the audio signal to be played, including:

[0127] S121: Provide a first preset amplitude and a second preset amplitude, where the first preset amplitude corresponds to the large volume type and the second preset amplitude corresponds to the small volume type;

[0128] S122: Extract the audio signal to be played within a preset observation time window and perform comparison processing to obtain the proportion of the audio signal to be played higher than the first preset amplitude and the proportion of the audio signal to be played higher than the second preset amplitude respectively;

[0129] S123: Determine the envelope level of the audio signal to be played based on the proportion of the audio signal to be played higher than the first preset amplitude and the proportion of the audio signal to be played higher than the second preset amplitude;

[0130] S124: Obtain the envelope value range corresponding to different envelope levels, and the envelope value ranges corresponding to each envelope level are different;

[0131] S125: Determine the envelope value range of the to-be-played audio signal based on the envelope level of the to-be-played audio signal and the envelope value ranges corresponding to different envelope levels.

[0132] Now, a further elaboration on how to set the expected debugging mode will be given:

[0133] In one implementation, step S17 includes:

[0134] Perform pulse-width modulation on the to-be-played audio signal based on the expected debugging mode to obtain a corresponding pulse-width modulation signal.

[0135] In this case, in one implementation, performing pulse-width modulation on the to-be-played audio signal based on the sound quality priority mode includes:

[0136] Perform pulse-width modulation on the to-be-played audio signal based on a first common-mode voltage, where the first common-mode voltage is the common-mode voltage of a triangular voltage signal.

[0137] As an example, please refer to Figures 5 to 7 , Figures 5 to 7 which shows a waveform diagram of the pulse-width modulation process in the sound quality priority mode. The data therein has been normalized, where:

[0138] Figure 5 (a) shows the waveform diagrams of the triangular voltage signal (i.e., triangular wave) and the to-be-played audio signal when the modulation type of the to-be-played audio signal is the mute type;

[0139] Figure 5 (b) shows the waveform diagram of the corresponding pulse-width modulation signal when the modulation type of the to-be-played audio signal is the mute type;

[0140] Figure 6 (a) shows the waveform diagrams of the triangular voltage signal (i.e., triangular wave) and the to-be-played audio signal when the modulation type of the to-be-played audio signal is the low volume type;

[0141] Figure 6 (b) shows the waveform diagram of the corresponding pulse-width modulation signal when the modulation type of the to-be-played audio signal is the low volume type;

[0142] Figure 7 (a) shows the waveform diagrams of the triangular voltage signal (i.e., triangular wave) and the to-be-played audio signal when the modulation type of the to-be-played audio signal is the high volume type;

[0143] Figure 7 (b) shows the waveform diagram of the corresponding pulse-width modulation signal when the modulation type of the to-be-played audio signal is the high volume type.

[0144] Now, please refer to Figure 5 (a) and Figure 5 (b) of the waveform diagrams. It can be seen that the common-mode voltages of the first common-mode voltage and the triangular voltage signal are both 0.5V. When the modulation type of the audio signal to be played is the mute type, the output duty cycle of the corresponding pulse-width modulation signal is 50%;

[0145] In an ideal state, the audio signal to be played modulated in this mode has no distortion and the best sound quality restoration. However, when there is no music playing in the power amplifier currently, there will be a large inductor ripple current in the circuit, resulting in problems of high static power consumption and low efficiency.

[0146] It should be understood that the common-mode voltages of the first common-mode voltage and the triangular voltage signal being both 0.5V are values that have both been normalized. In actual implementation, this voltage value can be set according to actual needs.

[0147] Please continue to refer to Figure 6 (b) of the waveform diagram. It can be seen that when the modulation type of the audio signal to be played is the low-volume type, the output duty cycle of the corresponding pulse-width modulation signal is relatively large; in this case, the signal output swing is limited, the margin left for the output signal to swing by the high common-mode voltage is too large, there will also be a large inductor ripple in the circuit, and more power is wasted, resulting in lower efficiency.

[0148] Please continue to refer to Figure 7 (b) of the waveform diagram. It can be seen that when the modulation type of the audio signal to be played is the high-volume type, it can make the current audio signal play with minimal loss and also has relatively high efficiency;

[0149] Similarly, when the modulation type of the audio signal to be played is the medium-volume type, it can also make the current audio signal play with minimal loss and also has relatively high efficiency.

[0150] In order to improve the power amplifier efficiency when the modulation type of the audio signal to be played is the mute type or the low-volume type, in one implementation, pulse-width modulation is performed on the audio signal to be played based on the power-priority mode, including:

[0151] Performing pulse-width modulation on the audio signal to be played based on a second common-mode voltage, where the voltage value of the second common-mode voltage is less than the voltage value of the first common-mode voltage.

[0152] As an example, please refer to Figures 8 to 10 , Figures 8 to 10 shows a waveform schematic diagram of the pulse-width modulation process in the power-priority mode, where the data therein have all been normalized, where:

[0153] Figure 8 (a) shows the waveform diagrams of the triangular voltage signal (i.e., triangular wave) and the audio signal to be played when the modulation type of the audio signal to be played is the mute type;

[0154] Figure 8 (b) shows the waveform diagram of the corresponding pulse width modulation signal when the modulation type of the audio signal to be played is the mute type;

[0155] Figure 9 (a) shows the waveform diagrams of the triangular voltage signal (i.e., triangular wave) and the audio signal to be played when the modulation type of the audio signal to be played is the low volume type;

[0156] Figure 9 (b) shows the waveform diagram of the corresponding pulse width modulation signal when the modulation type of the audio signal to be played is the low volume type;

[0157] Figure 10 (a) shows the waveform diagrams of the triangular voltage signal (i.e., triangular wave) and the audio signal to be played when the modulation type of the audio signal to be played is the high volume type;

[0158] Figure 10 (b) shows the waveform diagram of the corresponding pulse width modulation signal when the modulation type of the audio signal to be played is the high volume type.

[0159] Now, please refer to Figure 8 (a) and Figure 8 (b)'s waveform diagrams. It can be seen that the voltage value of the second common-mode voltage is 0.2V, which is less than the voltage value of the first common-mode voltage, 0.5V. In this case, the output duty cycle of the corresponding pulse width modulation signal is relatively small, and thus the corresponding inductor ripple current is small and the efficiency is high.

[0160] It should be understood that the voltage value of the second common-mode voltage being 0.2V and the voltage value of the first common-mode voltage being 0.5V are both values after normalization processing. In actual implementation, the voltage values of the second common-mode voltage and the first common-mode voltage can be set according to actual needs.

[0161] Please continue to refer to Figure 9 (b)'s waveform diagram. It can be seen that when the modulation type of the audio signal to be played is the low volume type, the output duty cycle of the corresponding pulse width modulation signal is relatively small, the corresponding inductor ripple current is also small, the power amplifier efficiency is high, and at the same time, the output sound quality is not affected.

[0162] Please continue to refer to Figure 10(a) waveform diagram. It can be seen that when the modulation type of the audio signal to be played is the large volume type, during the modulation process, the audio signal to be played will be clipped. Please continue to refer to Figure 10 (b). In this case, although the efficiency of the subsequent power amplifier is still high, the sound quality will decline. At this time, it is necessary to consider the mode selection according to the requirements.

[0163] Of course, the present invention is not limited to two modes. That is, the expected debugging modes corresponding to the small volume type, medium volume type, and large volume type can be different from each other. Additionally, a balance mode corresponding to the medium volume type can be set. The balance mode is as follows:

[0164] Perform pulse width modulation on the audio signal to be played based on the third common mode voltage. The voltage value of the third common mode voltage is higher than the voltage value of the second common mode voltage, and the voltage value of the third common mode voltage is lower than the voltage value of the first common mode voltage.

[0165] Similarly, multiple modulation types can be set, and each modulation type corresponds to a different expected debugging mode. The specific setting method can be as described in the above method and will not be elaborated here.

[0166] Now in combination with Figure 11 the working effect of the present invention will be described. Figure 11 is a waveform schematic diagram of the working effect of an embodiment of the present invention, which shows the waveform of the audio signal output by one side of the power amplifier when the audio signal to be played is a conventional low-frequency sine signal (a sine signal of 10 Hz in the figure); due to the low frequency of this audio signal to be played, oscillation of the result is likely to occur in a general system;

[0167] However, in Figure 11 the example, it can be seen that the expected debugging mode changes from the sound quality priority mode 0 to the power priority mode 1. The common mode voltage remains unchanged after switching to the power priority mode 1, and there are no glitches in the waveform before and after the change of the common mode voltage. Thus, the present invention can reduce the switching frequency of the common mode voltage, and further reduce the number of times of sound quality decline caused by switching the common mode voltage, ensuring the audio quality output by the subsequent power amplifier.

[0168] In order to avoid the decline of the output audio quality caused by the change of the common mode voltage within a period of time, in one embodiment, step S17 includes:

[0169] Obtain the current debugging mode and the expected debugging mode;

[0170] When the current debugging mode is the same as the expected debugging mode, perform pulse width modulation on the audio signal to be played based on the current debugging mode;

[0171] When the current debugging mode is different from the expected debugging mode, time the time that the audio signal to be played is in the expected debugging mode;

[0172] When the duration of the expected debugging mode reaches a preset duration, perform pulse width modulation on the audio signal to be played based on the expected debugging mode;

[0173] When the duration of the expected debugging mode does not reach the preset duration, perform pulse width modulation on the audio signal to be played based on the current debugging mode.

[0174] As a specific implementation, please refer to Figure 12 , Figure 12 which shows a flowchart of the method for determining the debugging mode in step S17, including:

[0175] S171: Obtain the current debugging mode and the expected debugging mode;

[0176] S172, determine whether the current debugging mode is the same as the expected debugging mode; if the current debugging mode is the same as the expected debugging mode, go to S173; if not, go to S174;

[0177] S173: Perform pulse width modulation on the audio signal to be played based on the current debugging mode, and return to S171;

[0178] S174: Time the time that the audio signal to be played is in the expected debugging mode;

[0179] S175: Determine whether the duration of the expected debugging mode reaches the preset duration; if the duration of the expected debugging mode reaches the preset duration, go to S176; if the duration of the expected debugging mode does not reach the preset duration, go to S177;

[0180] S176: Perform pulse width modulation on the audio signal to be played based on the expected debugging mode, and return to S171;

[0181] Specifically, the expected debugging mode can be used as the new current debugging mode;

[0182] S177: Perform pulse width modulation on the audio signal to be played based on the current debugging mode, and return to S174.

[0183] Now, in combination with Figure 13 for Figure 12 the pulse width modulation effect shown, where Figure 13The simulation waveform diagram of the current debugging mode is shown, including the simulation signal of the audio signal to be played and the schematic waveform of the current debugging mode. The height and low of the schematic waveform of the current debugging mode can represent different expected debugging modes. In Figure 13 the example of

[0184] please refer to Figure 13 , the technical solution of the present invention only switches the common-mode voltage (i.e., switches the debugging mode) after the duration of the expected debugging mode reaches the preset duration. Therefore, the present invention can reduce the switching frequency of the common-mode voltage, reduce the number of times of the sound quality degradation caused by the switching of the common-mode voltage, and ensure the audio quality of the subsequent power amplifier output.

[0185] In addition, please refer to Figure 14 , the embodiment of the present invention also provides an audio signal modulation system, including:

[0186] An audio signal to be played receiving module 20, configured to receive an audio signal to be played;

[0187] An envelope detection module 21, configured to perform envelope detection on the audio signal to be played to obtain the envelope value of the audio signal to be played;

[0188] A modulation mode determination module 22, configured to determine the modulation type of the audio signal to be played based on the envelope value of the audio signal to be played. The modulation type includes a small volume type, a medium volume type, and a large volume type; when the modulation type is the small volume type, it is determined that the expected debugging mode of the audio signal to be played is the power priority mode; when the modulation type is the medium volume type, it is determined that the expected debugging mode of the audio signal to be played is the sound quality priority mode; when the modulation type is the large volume type, it is determined that the expected debugging mode of the audio signal to be played is the sound quality priority mode or the power priority mode;

[0189] A pulse width modulation module 23, configured to perform pulse width modulation on the audio signal to be played based on the expected debugging mode.

[0190] In a preferred embodiment, the pulse width modulation module 23 is further configured to obtain the current debugging mode and the expected debugging mode; when the current debugging mode is the same as the expected debugging mode, perform pulse width modulation on the audio signal to be played based on the current debugging mode; when the current debugging mode is different from the expected debugging mode, time the time of the audio signal to be played in the expected debugging mode; when the duration of the expected debugging mode reaches a preset duration, perform pulse width modulation on the audio signal to be played based on the expected debugging mode; when the duration of the expected debugging mode does not reach the preset duration, perform pulse width modulation on the audio signal to be played based on the current debugging mode.

[0191] In addition, please refer to Figure 15 , an embodiment of the present invention further provides an audio system, including:

[0192] A digital IO interface 31, configured to decode the audio signal to be played according to a transmission protocol;

[0193] A modulation mode switching module 32, including the above audio signal modulation system, configured to output a pulse width modulation signal according to the audio signal to be played, where the pulse width modulation signal includes common mode voltage adjustment information;

[0194] A volume control module 33, configured to receive the audio signal to be played and adjust the digital gain of the audio signal to be played;

[0195] A digital-to-analog converter 34, configured to receive the audio signal to be played after adjusting the digital gain and convert the audio signal to be played into an audio analog signal;

[0196] An amplifier 35, configured to receive the audio analog signal and perform analog gain on the audio analog signal;

[0197] A pulse width modulator 36 (i.e., a PWM modulator), configured to perform pulse width modulation on the audio analog signal after analog gain based on the pulse width modulation signal and output a corresponding audio pulse width signal;

[0198] A speaker 37, configured to convert the audio pulse width signal into a sound wave signal

[0199] As a specific implementation, the audio system is a class D audio power amplifier audio system. Please refer to Figure 16 , and further includes:

[0200] A TDM / I2S signal source 30, configured to send a first signal based on a TDM or I2S protocol, where the first signal includes the audio signal to be played;

[0201] A volume configuration module 38 is used to obtain the digital gain magnitude and the analog gain magnitude of the audio signal to be played.

[0202] In this case, the modulation mode switching module 32 is further used to determine the waveform of the audio signal to be played based on the digital gain magnitude and the analog gain magnitude of the audio signal to be played.

[0203] The volume control module 33 is further used to adjust the digital gain of the audio signal to be played according to the digital gain magnitude of the audio signal to be played.

[0204] The amplifier 35 is further used to perform analog gain on the audio analog signal according to the analog gain magnitude of the audio signal to be played.

[0205] Therefore, in actual use of the present invention, it is possible to avoid the problems of large inductive ripple current and low speaker efficiency caused by a large duty cycle of the speaker output when the signal is at a low volume, and by using the characteristic of reduced sound quality of high-volume signals, the power of the speaker is preferentially ensured at high volume to maintain its efficiency, and the sound quality restoration of the speaker is ensured for medium-volume signals that are suitable or high-volume signals that require good sound quality.

[0206] In summary, in the embodiments of the present invention, envelope detection is performed on the audio signal to be played to obtain the envelope value of the audio signal to be played; based on the envelope value of the audio signal to be played, the type of the audio signal to be played and its corresponding modulation mode are determined; when the audio signal to be played is a low-volume signal, the modulation mode is determined to be the power priority mode; when the audio signal to be played is a medium-volume signal, the modulation mode is determined to be the sound quality priority mode, and when the audio signal to be played is a high-volume signal, the modulation mode is determined as needed; pulse width modulation is performed on the audio signal to be played based on the above modulation mode. Thus, in the sound quality priority mode, the audio quality of the power amplifier output is preferentially ensured, and in the power priority mode, the power amplifier is allowed to reduce power consumption within a certain range, so as to ensure a relatively high output efficiency of the power amplifier.

[0207] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A modulation method for an audio signal, characterized in that, Including: Receiving an audio signal to be played; Performing envelope detection on the audio signal to be played to obtain an envelope value of the audio signal to be played; Based on the envelope value of the audio signal to be played, determining a modulation type of the audio signal to be played, where the modulation type includes a low volume type, a medium volume type, and a high volume type; When the modulation type is the low volume type, determining that a predicted debugging mode of the audio signal to be played is a power priority mode; When the modulation type is the medium volume type, determining that a predicted debugging mode of the audio signal to be played is a sound quality priority mode; When the modulation type is the high volume type, determining that a predicted debugging mode of the audio signal to be played is the power priority mode or the sound quality priority mode; Performing pulse width modulation on the audio signal to be played based on the predicted debugging mode; Wherein, performing pulse width modulation on the audio signal to be played based on the sound quality priority mode includes: Performing pulse width modulation on the audio signal to be played based on a first common mode voltage, where the first common mode voltage is a common mode voltage of a triangular voltage signal; Performing pulse width modulation on the audio signal to be played based on the power priority mode includes: Performing pulse width modulation on the audio signal to be played based on a second common mode voltage, where a voltage value of the second common mode voltage is less than a voltage value of the first common mode voltage.

2. The modulation method of the audio signal according to claim 1, characterized in that, A method for obtaining the envelope value of the audio signal to be played includes: obtaining the envelope value of the audio signal to be played through a first-order low-pass filter or a second-order low-pass filter.

3. The modulation method of the audio signal according to claim 2, characterized in that, A method for obtaining an envelope value of the audio signal to be played through a first-order low-pass filter includes: according to the response speed of the first-order low-pass filter and the value of the audio signal to be played obtain the signal envelope value of the audio signal to be played: Among them, is the signal envelope value of the audio signal to be played, and 0 < < 1.

4. The modulation method of an audio signal according to claim 2, characterized in that The method for obtaining the envelope value of the audio signal to be played through a second-order low-pass filter includes: according to the signal of the audio signal to be played at time series n - 2 , the signal at time series n - 1 and the signal at time series n to obtain the signal envelope value of the audio signal to be played at time series n: Among them, is the first forward coefficient of the second-order low-pass filter, is the second forward coefficient of the second-order low-pass filter, is the third forward coefficient of the second-order low-pass filter, is the second backward coefficient of the second-order low-pass filter, is the third backward coefficient of the second-order low-pass filter.

5. The modulation method of the audio signal according to claim 2, characterized in that, A method for performing envelope detection on the audio signal to be played to obtain the envelope value of the audio signal to be played further includes: Providing a first preset amplitude and a second preset amplitude, where the first preset amplitude corresponds to the high volume type and the second preset amplitude corresponds to the low volume type; Extracting the audio signal to be played within a preset observation time window and performing comparison processing to respectively obtain a proportion of the audio signal to be played higher than the first preset amplitude and a proportion of the audio signal to be played higher than the second preset amplitude; Based on the proportion of the audio signal to be played higher than the first preset amplitude and the proportion of the audio signal to be played higher than the second preset amplitude, determining an envelope level of the audio signal to be played; Obtaining an envelope value range corresponding to different envelope levels, and each envelope value range corresponding to different envelope levels is different; Based on the envelope level of the audio signal to be played and the envelope value range corresponding to different envelope levels, determining the envelope value range of the audio signal to be played.

6. The modulation method of an audio signal according to any one of claims 1 to 5, characterized in that Performing pulse width modulation on the audio signal to be played based on the predicted debugging mode includes: Obtaining a current debugging mode and the predicted debugging mode; When the current debugging mode is the same as the predicted debugging mode, performing pulse width modulation on the audio signal to be played based on the current debugging mode; When the current debugging mode is different from the predicted debugging mode, timing the time for the audio signal to be played to be in the predicted debugging mode; When the duration of the predicted debugging mode reaches a preset duration, perform pulse width modulation on the audio signal to be played based on the predicted debugging mode; When the duration of the predicted debugging mode does not reach the preset duration, perform pulse width modulation on the audio signal to be played based on the current debugging mode.

7. An audio signal modulation system, characterized in that Comprising: An audio signal to be played receiving module, configured to receive an audio signal to be played; An envelope detection module, configured to perform envelope detection on the audio signal to be played to obtain an envelope value of the audio signal to be played; A modulation mode determination module, configured to determine a modulation type of the audio signal to be played based on the envelope value of the audio signal to be played, where the modulation type includes a low volume type, a medium volume type, and a high volume type; When the modulation type is the low volume type, determine that the predicted debugging mode of the audio signal to be played is a power priority mode; when the modulation type is the medium volume type, determine that the predicted debugging mode of the audio signal to be played is a sound quality priority mode; when the modulation type is the high volume type, determine that the predicted debugging mode of the audio signal to be played is the sound quality priority mode or the power priority mode; Wherein, performing pulse width modulation on the audio signal to be played based on the sound quality priority mode includes: Performing pulse width modulation on the audio signal to be played based on a first common mode voltage, where the first common mode voltage is the common mode voltage of a triangular voltage signal; Performing pulse width modulation on the audio signal to be played based on the power priority mode includes: Performing pulse width modulation on the audio signal to be played based on a second common mode voltage, where the voltage value of the second common mode voltage is less than the voltage value of the first common mode voltage; A pulse width modulation module, configured to perform pulse width modulation on the audio signal to be played based on the predicted debugging mode.

8. An audio system, characterized in that, Comprising: A digital IO interface, configured to decode the audio signal to be played according to a transmission protocol; A modulation mode switching module, including the audio signal modulation system described in claim 7, configured to output a pulse width modulation signal according to the audio signal to be played, where the pulse width modulation signal includes common mode voltage adjustment information; A volume control module, configured to receive the audio signal to be played and adjust the digital gain of the audio signal to be played; A digital-to-analog converter, configured to receive the audio signal to be played with adjusted digital gain and convert the audio signal to be played into an audio analog signal; An amplifier, configured to receive the audio analog signal and perform analog gain on the audio analog signal; A pulse width modulator, configured to perform pulse width modulation on the audio analog signal with analog gain based on the pulse width modulation signal and output a corresponding audio pulse width signal; A speaker, configured to convert the audio pulse width signal into a sound wave signal.

Citation Information

Patent Citations

  • Pulse width modulation module, audio power amplifier circuit and electronic equipment

    CN113411072A

  • Duty cycle signal processing circuit, method and audio signal processing device

    CN115473499A