Audio signal modulation method and system, and sound system

By performing envelope detection and dynamic modulation of audio signals, the problem of traditional audio power consumption is solved, and the power consumption waste of traditional audio power is achieved. The audio quality and output efficiency are taken into account, and the sound quality caused by common mode voltage switching is reduced. decline.

CN119255154AActive Publication Date: 2025-01-03SUZHOU LINK-IC CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional Class D audio power is used to play music without music and has a large inductor ripple current, high static power consumption, and the signal output swing is limited when the low volume signal is used. The high common mode voltage leaves the output signal too much for the swing, which wastes power consumption. There are many, and it is difficult to take into account both audio quality and output efficiency.

Method used

By performing envelope detection of the audio signal to be played, determine its type is low volume, medium volume or large volume, and select power priority mode or sound quality priority mode according to the type, perform pulse width modulation of the audio signal, and dynamically adjust the common mode voltage to optimize Power consumption and sound quality.

Benefits of technology

Ensure audio quality in sound quality in sound quality priority mode, reduce power consumption in power priority mode, take into account the high efficiency of the amplifier output, and reduce the sound quality drop by reducing the frequency of common mode voltage switching, improving the overall performance of the amplifier output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119255154A_ABST
    Figure CN119255154A_ABST
Patent Text Reader

Abstract

The invention provides an audio signal modulation method and an audio signal modulation system, and the method comprises the steps: carrying out the envelope detection of a to-be-played audio signal, and obtaining an envelope value of the to-be-played audio signal; determining the type of the to-be-played audio signal and a corresponding modulation mode based on the envelope value of the to-be-played audio signal; when the audio signal to be played is the small volume signal, determining the modulation mode as a power priority mode; when the to-be-played audio signal is a medium volume signal, determining the modulation mode as a tone quality priority mode, and when the to-be-played audio signal is a large volume signal, determining the modulation mode as required; and pulse width modulation is performed on the audio signal to be played based on the debugging mode, so that the audio quality output by the power amplifier is preferentially ensured in the tone quality priority mode, the power amplifier is allowed to reduce power consumption in a certain range in the power priority mode, and the high output efficiency of the power amplifier is ensured.
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 an audio signal modulation method, an audio signal modulation system and a sound system. Background Art

[0002] In the traditional pulse width modulation technology of Class D audio amplifiers, the pulse width modulator uses the BD modulation mode to modulate the audio signal into a PWM pulse waveform. The common mode of the pulse width modulation is fixed to 1 / 2 of the full swing of the triangle wave generator, so that the duty cycle of the output common mode is 50%. The output stage of the Class D audio amplifier is coupled to an LC filter to filter out the switching signal when the Class D audio amplifier outputs medium and high power audio to reduce EMI.

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

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

[0005] (2) When the power amplifier outputs audio signals of small or medium volume, the signal output swing is limited, and the high common-mode voltage leaves too much room for the output signal to swing, resulting in a lot of power waste.

[0006] Therefore, how to ensure the audio quality of the power amplifier output while ensuring the high output efficiency of the power amplifier has become a technical problem that urgently needs to be solved in the industry. Summary of the invention

[0007] The present invention provides an audio signal modulation method, 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 and how to ensure the 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, comprising:

[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] Determining a modulation type of the audio signal to be played based on an envelope value of the audio signal to be played, wherein the modulation type includes a low volume type, a medium volume type, and a high volume type;

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

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

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

[0015] Pulse width modulation is performed on the audio signal to be played based on the expected debugging mode.

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

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

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

[0019] The to-be-played audio signal is pulse-width modulated based on a second common-mode voltage, wherein a voltage value of the second common-mode voltage is less than a 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 by using a first-order low-pass filter includes: obtaining the signal envelope value of the audio signal to be played according to a response speed alpha of the first-order low-pass filter and a value input of the audio signal to be played:

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

[0023] Wherein, 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 by using 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] Wherein, 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 reverse coefficient of the second-order low-pass filter, a[2] is the second reverse coefficient of the second-order low-pass filter, and a[3] is the third reverse coefficient of the second-order low-pass filter.

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

[0028] Providing a first preset amplitude and a second preset amplitude, wherein the first preset amplitude corresponds to a high volume type, and the second preset amplitude corresponds to a low volume type;

[0029] Extracting the audio signal to be played within a preset observation time window, and performing comparative processing to obtain a ratio of the audio signal to be played that is higher than a first preset amplitude, and a ratio of the audio signal to be played that is higher than a second preset amplitude;

[0030] Determining an envelope level of the audio signal to be played based on a proportion of the audio signal to be played that is higher than a first preset amplitude and a proportion of the audio signal to be played that is higher than a second preset amplitude;

[0031] Obtain envelope value ranges 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 envelope value ranges corresponding to different envelope levels, the envelope value range of the audio signal to be played is determined.

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

[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, pulse width modulation is performed 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, timing the time during which 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, pulse width modulation is performed on the audio signal to be played based on the expected debugging mode;

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

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

[0040] The to-be-played audio signal receiving module is used to receive the to-be-played audio signal;

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

[0042] A modulation mode determination module is used 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 including 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 expected debugging mode of the audio signal to be played is the power priority mode; when the modulation type is the medium volume type, determine that the expected debugging mode of the audio signal to be played is the sound quality priority mode; when the modulation type is the high volume type, determine that the expected debugging mode of the audio signal to be played is the sound quality priority mode or the power priority mode;

[0043] The pulse width modulation module is used to perform pulse width modulation on the audio signal to be played based on the expected debugging mode.

[0044] According to a third aspect of the present invention, there is provided an audio system, comprising:

[0045] A digital IO interface, used for decoding the audio signal to be played according to the transmission protocol;

[0046] A modulation mode switching module, comprising 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, wherein the pulse width modulation signal includes common mode voltage adjustment information;

[0047] A volume control module, used for receiving the audio signal to be played and adjusting the digital gain of the audio signal to be played;

[0048] A digital-to-analog converter, used for receiving the audio signal to be played after adjusting the digital gain, and converting the audio signal to be played into an audio analog signal;

[0049] An amplifier, used for receiving the audio analog signal and performing analog gain on the audio analog signal;

[0050] A pulse width 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;

[0051] A loudspeaker is used to convert the audio pulse width signal into a sound wave signal.

[0052] The technical solution of the present invention provides an audio signal modulation method 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 a power priority mode; when the audio signal to be played is a medium-volume signal, the modulation mode is determined to be a sound quality priority mode, and when the audio signal to be played is a high-volume signal, the modulation mode is determined according to needs; based on the above-mentioned debugging mode, pulse width modulation is performed on the audio signal to be played, so that the present invention gives priority to ensuring the audio quality output by the power amplifier in the sound quality priority mode, and allows the power amplifier to reduce power consumption within a certain range in the power priority mode, thereby ensuring that the output efficiency of the power amplifier is high.

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

[0054] In addition, in the sound system provided by the technical solution of the present invention, the transmission protocol is parsed through the 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 the digital gain is adjusted, 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 is based on the pulse width The modulation signal modulates the audio analog signal after analog gain and outputs a corresponding PWM signal; the speaker converts the PWM signal into a sound wave signal, thereby using the audio signal to be played to determine the corresponding debugging mode, and the pulse width modulator determines the common mode voltage during modulation based on the debugging mode, thereby adjusting the output duty cycle of the speaker to avoid the problem of large inductor ripple current and low speaker efficiency caused by a large output duty cycle of the speaker when the volume signal is small, and utilizes the characteristic that the sound quality of large volume signals is reduced to prioritize the power and efficiency of the speaker when the volume signal is large, and ensures the sound quality restoration of the speaker when the medium volume signal is suitable or the large volume signal that requires sound quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

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

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

[0058] Figure 3 is a schematic flow chart of a method for modulating an audio signal in an embodiment of the present invention;

[0059] Figure 4 is a schematic flow chart of a method for detecting envelope values ​​with relatively low accuracy in an embodiment of the present invention;

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

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

[0062] Fig.11 2 is a waveform diagram of the working effect of an embodiment of the present invention;

[0063] Fig.12 is a flow chart of a method for determining a debugging mode in an embodiment of the present invention;

[0064] Fig.13 is a simulation waveform diagram of the current debugging mode in an embodiment of the present invention;

[0065] Fig.14 is a block diagram of an audio signal modulation system in an embodiment of the present invention;

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

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

[0068] Description of reference numerals:

[0069] 20-receiving module of audio signal 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 DESCRIPTION

[0081] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection 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-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

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

[0084] Before filing this application, the applicant has conducted a thorough study of the existing audio signal modulation method, and proposed that in order to solve the existing audio signal modulation method, when the power amplifier is not currently playing music, the inductor ripple current in the circuit is still very large, there is a high static power consumption problem, and when the power amplifier outputs a small volume audio signal, the signal output swing is limited, the high common-mode voltage leaves too much margin for the output signal swing, and the power consumption is wasted. The solution is generally to dynamically adjust the common-mode duty cycle so that it changes in steps as the audio signal becomes larger, so that the required common-mode voltage is dynamically calculated in real time through the audio signal to be played, and reflected in the pulse width modulation process, so that the current audio signal can be played as lossless as possible.

[0085] However, in actual implementation, please refer to Figure 1 The waveform diagram shown 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 sinusoidal signal. The common-mode voltage changes periodically at a certain moment of the sinusoid. Glitches appear on the waveform at the moment of change, which indicates a decrease in audio quality.

[0086] Please refer to Figure 2The waveform diagram shown in FIG. 1 shows a schematic diagram of THDN of an audio signal in different modes, including data of Total Harmonic Distortion plus Noise (THDN) measured by an Audio Precision Analyzer (AP) as the output signal changes, where:

[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 common-mode voltage;

[0089] BD, which can be understood as a balanced drive mode, has a common-mode duty cycle fixed at 50%;

[0090] 1SPW can be understood as a low duty cycle driving mode, in which the common mode duty cycle is less than 50%, generally around 15%, thereby optimizing static power consumption.

[0091] exist Figure 2 It can be seen that when the audio signal to be played is a conventional low-frequency sinusoidal signal, the problem of frequent switching of the common-mode voltage causing glitches is irrelevant to the signal size (or power size) of the audio signal to be played, and frequent switching of the common-mode voltage is prone to occur in the Hybrid mode, which will lead to a higher THDN data. The overall effect is worse than the two fixed common-mode duty cycle modes (i.e., BD and 1SPW), and it is difficult to guarantee the audio quality of the power amplifier output;

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

[0093] In view of this, the present invention proposes a new audio signal modulation method, 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, thereby solving the above problems.

[0094] The embodiment of the present invention provides a modulation method for an audio signal, which is applied to a class D power amplifier, comprising:

[0095] Receiving an audio signal to be played;

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

[0097] Determining a modulation type of the audio signal to be played based on an envelope value of the audio signal to be played, wherein the modulation type includes a low volume type, a medium volume type, and a high volume type;

[0098] When the modulation type is a low volume type, determining that the expected debugging mode of the audio signal to be played is the power priority mode;

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

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

[0101] Pulse width modulation is performed on the audio signal to be played based on the expected debugging mode.

[0102] The modulation type of the audio signal to be played may be understood as the power consumption or power type of the audio signal to be played.

[0103] Regarding determining that the expected 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 a high volume type, this is because, under high power (i.e., high volume type), the audio quality itself will be greatly reduced, and power becomes important instead. In this case, the sound quality priority mode can be selected to ensure the sound quality restoration of the high volume signal as much as possible, or the power priority mode can be selected to utilize the characteristic of the reduced sound quality of the high volume signal to ensure the power and efficiency of the power amplifier under the high volume signal;

[0104] In actual implementation, the expected debugging mode of the audio signal to be played may also be preferentially selected as the sound quality priority mode.

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

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

[0107] In order to make the above-mentioned objects, features and beneficial effects of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0108] As a specific implementation, please refer to Figure 3 , Figure 3 A flow chart of the above audio signal modulation method is shown, comprising:

[0109] S11: receiving an audio signal to be played;

[0110] S12: performing envelope detection on the audio signal to be played to obtain an envelope value of the audio signal to be played;

[0111] S13: based on the envelope value of the audio signal to be played, determining the modulation type of the audio signal to be played, if the modulation type is a low volume type, entering S14; if the modulation type is a medium volume type, entering S15; if the modulation type is a high volume type, entering S16;

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

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

[0114] and enter S17;

[0115] S16: Determine that the expected 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 expected debugging mode, and return to S11.

[0117] The step S12 of obtaining the envelope value of the audio signal to be played is described in detail 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 by using 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] Wherein, 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 by using a second-order low-pass filter includes: obtaining the signal envelope value of the audio signal to be played at time sequence n according to the signal input[n-2] of the audio signal to be played at time sequence n-2, the signal input[n-1] at time sequence n-1, and the signal input[n] at time sequence 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] Wherein, 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 reverse coefficient of the second-order low-pass filter, a[2] is the second reverse coefficient of the second-order low-pass filter, and a[3] is the third reverse 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 hardware performance.

[0126] When the hardware performance is poor, one implementation method is to refer to Figure 4 , Figure 4 A flow chart of a method for detecting an envelope value with lower precision is shown, which is used to perform envelope detection on the audio signal to be played to obtain the envelope value of the audio signal to be played, including:

[0127] S121: providing a first preset amplitude and a second preset amplitude, wherein the first preset amplitude corresponds to a high volume type, and the second preset amplitude corresponds to a low volume type;

[0128] S122: extracting the audio signal to be played within a preset observation time window, and performing comparison processing to obtain a ratio of the audio signal to be played that is higher than a first preset amplitude, and a ratio of the audio signal to be played that is higher than a second preset amplitude;

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

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

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

[0132] Now let's further explain how to set the expected debugging mode:

[0133] In one implementation, step S17 includes:

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

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

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

[0137] As an example, see Figure 5 to Figure 7 , Figure 5 to Figure 7 The waveform diagram of the pulse width modulation process in the sound quality priority mode is shown, and the data are all normalized, where:

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

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

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

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

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

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

[0144] Please refer to Figure 5 (a) and Figure 5 (b) shows that the common mode voltages of the first common mode voltage and the triangular voltage signal are both 0.5 V, and when the modulation type of the audio signal to be played is a mute type, the output duty cycle of the corresponding pulse width modulation signal is 50%;

[0145] Under ideal conditions, the audio signal modulated by this mode is free of distortion and has the best sound quality. However, when the amplifier is not currently playing music, there will be a large inductor ripple current in the circuit, resulting in 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 are both 0.5 V, which are normalized values. In actual implementation, the voltage values ​​can be set according to actual needs.

[0147] Please continue to refer to Figure 6 From the waveform diagram of (b), it can be seen that when the modulation type of the audio signal to be played is a 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, and the high common-mode voltage leaves too much room for the output signal swing. There will also be a large inductor ripple in the circuit, resulting in a lot of power waste and low efficiency.

[0148] Please continue to refer to Figure 7 (b) shows that when the modulation type of the audio signal to be played is a high volume type, the current audio signal can be played as losslessly as possible, while taking into account high efficiency;

[0149] Similarly, when the modulation type of the audio signal to be played is a medium volume type, the current audio signal can be played as losslessly as possible while maintaining high efficiency.

[0150] In order to improve the power amplifier efficiency when the modulation type of the audio signal to be played is a mute type or a 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] The to-be-played audio signal is pulse-width modulated based on a second common-mode voltage, wherein a voltage value of the second common-mode voltage is less than a voltage value of the first common-mode voltage.

[0152] As an example, see Figure 8 to Figure 10 , Figure 8 to Figure 10 The waveform diagram of the pulse width modulation process in the power priority mode is shown, and the data are all normalized, where:

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

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

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

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

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

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

[0159] Please refer to Figure 8 (a) and Figure 8 (b) shows that the voltage value of the second common mode voltage is 0.2 V, which is less than the voltage value of the first common mode voltage of 0.5 V. In this case, the output duty ratio 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 is 0.2V, and the voltage value of the first common-mode voltage is 0.5V, both of which are normalized values. In actual implementation, the voltage value of the second common-mode voltage and the voltage value of the first common-mode voltage can be set according to actual needs.

[0161] Please continue to refer to Fig. 9 From the waveform diagram (b), it can be seen that when the modulation type of the audio signal to be played is a 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, it will not affect the output sound quality.

[0162] Please continue to refer to Fig.10(a) shows that when the modulation type of the audio signal to be played is a high volume type, the audio signal to be played will be clipped during the modulation process. Please continue to refer to Fig.10 (b) In this case, although the efficiency of the subsequent power amplifier is still high, the sound quality will decrease. At this time, it is necessary to consider the mode selection according to the needs.

[0163] Of course, the present invention is not limited to two modes, that is, the expected debugging modes corresponding to the low volume type, the medium volume type and the high volume type can be different from each other, and a balanced mode can be set corresponding to the medium volume type, and the balanced mode is:

[0164] The audio signal to be played is pulse-width modulated based on a 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, each modulation type corresponds to a different expected debugging mode, and the specific setting method can be described in the above method, which will not be repeated here.

[0166] Now combined Fig.11 The working effect of the present invention is described. Fig.11 The working effect waveform diagram of the embodiment of the present invention shows the waveform of the audio signal output by the power amplifier when the audio signal to be played is a conventional low-frequency sinusoidal signal (a 10 Hz sinusoidal signal in the figure); since the frequency of the audio signal to be played is low, the result oscillation is easy to occur in a general system;

[0167] However, in Fig.11 It can be seen from the example 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 no burrs appear on the waveform before and after the common mode voltage changes. Therefore, the present invention can reduce the switching frequency of the common mode voltage, thereby reducing the number of times the sound quality deteriorates due to switching the common mode voltage, thereby ensuring the audio quality of the subsequent power amplifier output.

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

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

[0170] When the current debugging mode is the same as the expected debugging mode, pulse width modulation is performed 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, timing the time during which 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, pulse width modulation is performed on the audio signal to be played based on the expected debugging mode;

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

[0174] As a specific implementation, please refer to Fig.12 , Fig.12 A flow chart showing a method for determining a debugging mode in step S17 is shown, comprising:

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

[0176] S172, determining 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, proceeding to S173; if not, proceeding to S174;

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

[0178] S174: timing the time during which the audio signal to be played is in the expected debugging mode;

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

[0180] S176: performing pulse width modulation on the audio signal to be played based on the expected debugging mode, and returning 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 combined Fig.13 right Fig.12 The pulse width modulation effect is illustrated in FIG. Fig.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 of the schematic waveform of the current debugging mode can represent different expected debugging modes. Fig.13 In the example, the current debugging mode includes low power priority mode 1, sound quality priority mode 0 and high power priority mode.

[0184] Please refer to Fig.13 The technical solution of the present invention switches the common-mode voltage (i.e. switches the debugging mode) only after the duration of the expected debugging mode reaches the preset duration, so that the present invention can reduce the switching frequency of the common-mode voltage, reduce the number of times the sound quality deteriorates due to switching the common-mode voltage, and ensure the audio quality of the subsequent power amplifier output.

[0185] In addition, please refer to Fig.14 The embodiment of the present invention further provides an audio signal modulation system, comprising:

[0186] The to-be-played audio signal receiving module 20 is used to receive the to-be-played audio signal;

[0187] The envelope detection module 21 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;

[0188] The modulation mode determination module 22 is used to determine the modulation type of the audio signal to be played based on the envelope value of the audio signal to be played, wherein 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, the expected debugging mode of the audio signal to be played is determined to be the power priority mode; when the modulation type is the medium volume type, the expected debugging mode of the audio signal to be played is determined to be the sound quality priority mode; when the modulation type is the high volume type, the expected debugging mode of the audio signal to be played is determined to be the sound quality priority mode or the power priority mode;

[0189] The pulse width modulation module 23 is used 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 also used to obtain the current debugging mode and the expected debugging mode; when the current debugging mode is the same as the expected debugging mode, pulse width modulation is performed 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, the time that the audio signal to be played is in the expected debugging mode is timed; when the duration of the expected debugging mode reaches a preset duration, pulse width modulation is performed 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, pulse width modulation is performed on the audio signal to be played based on the current debugging mode.

[0191] In addition, please refer to Fig.15 The embodiment of the present invention further provides a sound system, comprising:

[0192] A digital IO interface 31, used for decoding the audio signal to be played according to the transmission protocol;

[0193] The modulation mode switching module 32 includes the above-mentioned audio signal modulation system, and is used to output a pulse width modulation signal according to the audio signal to be played, wherein the pulse width modulation signal includes common mode voltage adjustment information;

[0194] The volume control module 33 is used 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 is used to receive the audio signal to be played after the digital gain is adjusted, and convert the audio signal to be played into an audio analog signal;

[0196] An amplifier 35, used for receiving the audio analog signal and performing 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] Speaker 37, used to convert the audio pulse width signal into a sound wave signal

[0199] As a specific implementation, the sound system is a Class D audio amplifier sound system, please refer to Fig.16 , also includes:

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

[0201] The volume configuration module 38 is used to obtain the digital gain size and the analog gain size 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 size and the analog gain size of the audio signal to be played;

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

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

[0205] Therefore, in actual use, the present invention can avoid the problem of large inductor ripple current and low speaker efficiency caused by a large speaker output duty cycle when the volume signal is small, and utilize the characteristic that the sound quality of a large volume signal is reduced to give priority to ensuring the power and efficiency of the speaker when the volume signal is large, and ensure the sound quality restoration of the speaker when a medium volume signal is suitable or a large volume signal that requires sound quality.

[0206] In summary, the embodiments of the present invention obtain the envelope value of the audio signal to be played by performing envelope detection on the audio signal to be played; determine the type of the audio signal to be played and its corresponding modulation mode based on the envelope value of the audio signal to be played; when the audio signal to be played is a low-volume signal, determine the modulation mode to be the power priority mode; when the audio signal to be played is a medium-volume signal, determine the modulation mode to be the sound quality priority mode, and when the audio signal to be played is a high-volume signal, determine the modulation mode as needed; based on the above-mentioned debugging mode, pulse width modulation is performed on the audio signal to be played, so that the present invention gives priority to ensuring the audio quality output by the power amplifier in the sound quality priority mode, and allows the power amplifier to reduce power consumption within a certain range in the power priority mode, thereby ensuring that the output efficiency of the power amplifier is high.

[0207] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for modulating an audio signal, characterized in that: include: 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; Determining a modulation type of the audio signal to be played based on an envelope value of the audio signal to be played, wherein the modulation type includes a low volume type, a medium volume type, and a high volume type; When the modulation type is a low volume type, determining that the expected debugging mode of the audio signal to be played is the power priority mode; When the modulation type is a medium volume type, determining that the expected debugging mode of the audio signal to be played is the sound quality priority mode; When the modulation type is a high volume type, determining that the expected debugging mode of the audio signal to be played is the power priority mode or the sound quality priority mode; Pulse width modulation is performed on the audio signal to be played based on the expected debugging mode.

2. The method for modulating an audio signal according to claim 1, characterized in that: Performing pulse width modulation on the audio signal to be played based on the sound quality priority mode includes: The to-be-played audio signal is pulse-width modulated based on a first common-mode voltage, where the first common-mode voltage is a common-mode voltage of a triangular voltage signal.

3. The method for modulating an audio signal according to claim 2, characterized in that: Performing pulse width modulation on the audio signal to be played based on the power priority mode includes: The to-be-played audio signal is pulse-width modulated based on a second common-mode voltage, wherein a voltage value of the second common-mode voltage is less than a voltage value of the first common-mode voltage.

4. The method for modulating an audio signal according to claim 1, characterized in that: 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.

5. The method for modulating an audio signal according to claim 4, characterized in that: The method for obtaining the envelope value of the audio signal to be played by using 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: env=env·(1-alpha)+abs(input)·alpha Wherein, env is the signal envelope value of the audio signal to be played, and 0 <alpha<1。 6. The method for modulating an audio signal according to claim 4, characterized in that: The method for obtaining the envelope value of the audio signal to be played by a second-order low-pass filter includes: obtaining the signal envelope value of the audio signal to be played at time sequence n according to the signal input[n-2] of the audio signal to be played at time sequence n-2, the signal input[n-1] at time sequence n-1, and the signal input[n] at time sequence n: 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] Wherein, 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 reverse coefficient of the second-order low-pass filter, a[2] is the second reverse coefficient of the second-order low-pass filter, and a[3] is the third reverse coefficient of the second-order low-pass filter.

7. The method for modulating an audio signal according to claim 4, characterized in that: The method of 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, wherein the first preset amplitude corresponds to a high volume type, and the second preset amplitude corresponds to a low volume type; Extracting the audio signal to be played within a preset observation time window, and performing comparative processing to obtain a ratio of the audio signal to be played that is higher than a first preset amplitude, and a ratio of the audio signal to be played that is higher than a second preset amplitude; Determining an envelope level of the audio signal to be played based on a proportion of the audio signal to be played that is higher than a first preset amplitude and a proportion of the audio signal to be played that is higher than a second preset amplitude; Obtain envelope value ranges corresponding to different envelope levels, and the envelope value range corresponding to each envelope level is different; Based on the envelope level of the audio signal to be played and envelope value ranges corresponding to different envelope levels, the envelope value range of the audio signal to be played is determined.

8. The audio signal modulation method according to any one of claims 1 to 7, characterized in that: Performing pulse width modulation on the audio signal to be played based on the expected debugging mode includes: Obtaining the current debugging mode and the expected debugging mode; When the current debugging mode is the same as the expected debugging mode, pulse width modulation is performed 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, timing the time during which the audio signal to be played is in the expected debugging mode; When the duration of the expected debugging mode reaches a preset duration, pulse width modulation is performed on the audio signal to be played based on the expected debugging mode; When the expected duration of the debugging mode does not reach the preset duration, pulse width modulation is performed on the audio signal to be played based on the current debugging mode.

9. An audio signal modulation system, characterized in that: include: The to-be-played audio signal receiving module is used to receive the to-be-played audio signal; An envelope detection module, used to perform envelope detection on the audio signal to be played, and obtain an envelope value of the audio signal to be played; A modulation mode determination module, used to determine the modulation type of the audio signal to be played based on the envelope value of the audio signal to be played, wherein the modulation type includes a low volume type, a medium volume type and a high volume type; When the modulation type is a low volume type, determining that the expected debugging mode of the audio signal to be played is the power priority mode; when the modulation type is a medium volume type, determining that the expected debugging mode of the audio signal to be played is the sound quality priority mode; when the modulation type is a high volume type, determining that the expected debugging mode of the audio signal to be played is the sound quality priority mode or the power priority mode; The pulse width modulation module is used to perform pulse width modulation on the audio signal to be played based on the expected debugging mode.

10. A sound system, characterized in that: include: A digital IO interface, used for decoding the audio signal to be played according to the transmission protocol; A modulation mode switching module, comprising the audio signal modulation system as claimed in claim 9, for outputting a pulse width modulation signal according to the audio signal to be played, wherein the pulse width modulation signal includes common mode voltage adjustment information; A volume control module, used for receiving the audio signal to be played and adjusting the digital gain of the audio signal to be played; A digital-to-analog converter, used for receiving the audio signal to be played after adjusting the digital gain, and converting the audio signal to be played into an audio analog signal; An amplifier, used for receiving the audio analog signal and performing analog gain on the audio analog signal; A pulse width 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; A loudspeaker is used to convert the audio pulse width signal into a sound wave signal.

Citation Information

Patent Citations

  • Audio power amplifier circuit, power limiting method thereof and electronic equipment

    CN111901725A

  • Audio power amplifier circuit, power limiting method thereof and electronic equipment

    CN113179089A

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

    CN113411072A

  • Common-mode voltage dynamic modulation circuit and method and D-type audio power amplifier

    CN114531117A

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

    CN115473499A