CN104104344A - Class-D audio frequency amplifier and pulse width modulation method thereof - Google Patents
- ️Wed Oct 15 2014
CN104104344A - Class-D audio frequency amplifier and pulse width modulation method thereof - Google Patents
Class-D audio frequency amplifier and pulse width modulation method thereof Download PDFInfo
-
Publication number
- CN104104344A CN104104344A CN201410330486.5A CN201410330486A CN104104344A CN 104104344 A CN104104344 A CN 104104344A CN 201410330486 A CN201410330486 A CN 201410330486A CN 104104344 A CN104104344 A CN 104104344A Authority
- CN
- China Prior art keywords
- pulse width
- module
- low
- interpolation
- modulation Prior art date
- 2014-07-11 Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 239000010752 BS 2869 Class D Substances 0.000 title claims abstract 4
- 238000000034 method Methods 0.000 title claims description 25
- 238000007493 shaping process Methods 0.000 claims abstract description 29
- 238000001914 filtration Methods 0.000 claims abstract description 26
- 238000012544 monitoring process Methods 0.000 claims abstract description 14
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 claims abstract description 9
- 238000005070 sampling Methods 0.000 claims description 36
- 238000012545 processing Methods 0.000 claims description 18
- 238000004364 calculation method Methods 0.000 claims description 14
- RUPBZQFQVRMKDG-UHFFFAOYSA-M Didecyldimethylammonium chloride Chemical compound [Cl-].CCCCCCCCCC[N+](C)(C)CCCCCCCCCC RUPBZQFQVRMKDG-UHFFFAOYSA-M 0.000 claims description 6
- 230000004044 response Effects 0.000 claims description 6
- 230000005236 sound signal Effects 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 230000000694 effects Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 4
- 238000013459 approach Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000010219 correlation analysis Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000001228 spectrum Methods 0.000 description 2
- 230000001629 suppression Effects 0.000 description 2
- LHMQDVIHBXWNII-UHFFFAOYSA-N 3-amino-4-methoxy-n-phenylbenzamide Chemical compound C1=C(N)C(OC)=CC=C1C(=O)NC1=CC=CC=C1 LHMQDVIHBXWNII-UHFFFAOYSA-N 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000012067 mathematical method Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Landscapes
- Amplifiers (AREA)
Abstract
A class-D audio frequency amplifier comprises a digital logic PWM (pulse width modulation) module, a class-D amplifier power amplifier tube and a low-pass filter and is characterized in that the digital logic PWM module comprises an initiative access interface module, a digital pulse width modulation module, a pre-warning and monitoring module and a PWM signal generation module in sequential connection; the initiative access interface module is used for initiatively acquiring PCM (pulse code modulation) audio data; the digital pulse width modulation module comprises an interpolation and filtration module, a modulation pulse computing module and a low order excision and noise shaping module in sequential connection.
Description
Technical Field
The invention belongs to the field of D-class audio amplifiers, and particularly relates to a digital logic Pulse Width Modulation (PWM) module applied to a D-class audio amplifier and a pulse width modulation method thereof.
Background
Class D audio amplifiers have since been proposed in 1958, due to their natural high efficiency compared to class A, B, AB amplifiers and the like, and the recent gradual popularity of handheld devices, class D amplifiers have naturally gained more widespread use and attention. And with the progress of semiconductor technology and technology, some original problems are better solved.
The basic principle of class D audio amplifiers is to compare an audio signal with a triangular (Triangle) or SAW-TOOTH (SAW-TOOTH) signal to modulate it into a series of pulse width signals, which are used to switch the gates of two complementary CMOS amplifiers to output signals to a speaker, and to add a low pass filter to filter out high frequency harmonics.
All class D amplifier modulation techniques encode information about an audio signal into a series of pulses. Typically, the pulse width is related to the amplitude of the audio signal, and the pulse spectrum includes both useful audio signal pulses and unwanted (but unavoidable) high frequency components. The so-called Pulse Width Modulation (Pulse Width Modulation) is a technique of modulating the amplitude of an analog audio signal into the Width of a series of rectangular pulses. The switching frequency (fSW, triangular) of most class D amplifiers is typically between 250kHz and 1.5MHz to reduce the requirements for output filtering. After the signal is amplified by the amplifying circuit, the high-frequency component in the signal is filtered out, and then the required audio signal can be obtained. Since in this case the transistor operates in the switched state, in which the efficiency of the transistor is high, and in the fully on state the current through the transistor is high and the voltage drop is low, and in the off state the current through the transistor is low, so that the power consumed by the power transistor itself is low, ideally 0, this is why class D amplifiers can achieve high efficiency. Compared with an A, B, AB class amplifier, the A class amplifier has the minimum distortion, the maximum quiescent point working current and the minimum efficiency; the class B amplifier has larger distortion, minimum quiescent point working current and higher efficiency; the AB class amplifier has medium distortion, medium quiescent point working current and medium efficiency; class D amplifiers are not operating point-different, but are new amplifiers with completely different operating principles, also known as digital amplifiers.
Nevertheless, in many cases, the class D amplifier is a pure analog circuit. The main difficulty is that the direct processing of digital audio data, typically up to 44.1 or 48khz, does not yield an accurate relationship with the corresponding triangular or sawtooth carrier signal, i.e. the pulse width length corresponding to the modulation obtained in the comparison of the signal in the analog implementation with the sawtooth in the comparator. In addition, the distortion of class D amplifiers is mainly caused by:
pulse width error and quantization error at sampling;
dead zone and delay of the drive tube;
the conduction time of the power amplifier tube and the body diode are recovered;
non-linearity of output filter inductance and capacitance;
generally, the larger the output power of a class D amplifier, the larger its distortion. In the design part of digital logic, the first two distortion problems can be controlled and handled to some extent. The "dead zone" is due to the inconsistency of the power stage transistors, for example, if the upper and lower transistors cannot be turned on and off simultaneously, but are turned on simultaneously. It is easy to cause a short circuit of the power supply. To avoid this, a dead time setting of the conduction is generally adopted. That is, the transistor is not turned on immediately when the turn-on pulse comes, but is delayed and then turned on. This delay time is called the dead zone. After the dead zone is adopted, although the simultaneous conduction of the upper pipe and the lower pipe can be avoided, the signal distortion can be caused.
The core technical effect of the invention is to obtain the effect of natural sampling which is comparable to the effect of analog realization, and to fully utilize the advantages of a digital circuit to intervene and control the process of audio playing to obtain better effect.
Disclosure of Invention
The invention firstly discloses a D-class audio amplifier, which comprises a digital logic Pulse Width Modulation (PWM) module, a D-class amplifier power amplifier tube and a low-pass filter, and is characterized in that the digital logic PWM module comprises an active access interface module, a digital PWM module, an early warning and monitoring module and a PWM signal generation module which are sequentially connected; the active access interface module is used for actively acquiring PCM audio data; the digital pulse width modulation module comprises an interpolation and filtering module, a modulation pulse width calculation module and a truncation low-order and noise shaping module which are connected in sequence; wherein:
the interpolation and filtering module is used for performing interpolation processing on the PCM audio data by a plurality of interpolation multiples L, and meanwhile, performing low-pass filtering on the audio data after the interpolation processing and outputting the audio data to the modulation pulse width calculation module; the interpolation processing of the PCM audio data is also called oversampling interpolation, and the purpose of the interpolation processing is to meet the requirement of switching frequency, and the higher switching frequency enables the modulated higher harmonic component to be filtered more conveniently through a low-pass filter, so that the signal is well restored, and the signal quality is improved;
the modulation pulse width calculation module is used for performing digital modulation on the audio data subjected to interpolation filtering by taking a sawtooth wave as a carrier wave through a pseudo sampling method to obtain pulse width data and outputting the pulse width data to the cutting low-order and noise shaping module; the pseudo-sampling method is to approximate a real data curve through polynomial interpolation and then calculate a 'natural sampling point' through Newton iteration so as to obtain the pulse width length which is enough to approximate a real value;
the low-order cutting and noise shaping module also comprises a filter, the low-order cutting and noise shaping module is used for cutting the low order of pulse width data obtained after digital modulation, the low order cutting and noise shaping module is used for shaping the noise generated after low-order cutting through the filter and then outputting the shaped noise to the early warning and monitoring module, a coefficient table of the low-order cutting and noise shaping filter is also realized by using a RAM (random access memory) so as to be conveniently and flexibly adjusted through software, the order and the coefficient of the low-order cutting and noise shaping filter are determined according to the relation between the maximum frequency of an audio signal and the switching frequency and the requirement for noise suppression, and the reason for cutting the low order is that the working frequency of an actual circuit cannot be used for timing the pulse width (such as the pulse width value of 16bit or 24 bit) of the required frequency response precision, and the problem of noise after cutting needs to be eliminated by the method;
the early warning and monitoring module is used for carrying out emergency treatment on a high level value which is wrong for a long time, controlling the dead time of the power amplifier tube, monitoring the maximum and minimum values of pulse width data and carrying out forced silent output setting, and the early warning and monitoring module judges that silent output is an important control mode according to certain conditions, for example, when monitoring that audio data continuously exceeds a set threshold value in set time, or forced silent output is carried out when a working mode is switched, and the like, the early warning and monitoring module is a powerful means for effectively reducing harmful noise output of a terminal;
the PWM signal generating module is used to generate a pulse width signal according to the pulse width data after the noise shaping process, and the PWM signal generating module can be connected to the subsequent MOSFET power amplifier circuit as the pulse width signal output by the modulation comparator in the general analog implementation scheme to form a general class D audio amplifier, and can be connected to the full-bridge or half-bridge power pair transistor.
Furthermore, according to the class D audio amplifier, the interpolation and filtering module is a linear low-pass ripple finite impulse response filter with a multiphase structure, the interpolation multiple L is 8, and a coefficient table thereof is stored in a RAM memory, so that the effect can be adjusted more flexibly and conveniently. The window length (TAP) of the filter can be determined according to parameters such as a pass band, a stop band, and a corresponding ripple rejection rate meeting application requirements.
Furthermore, the passband frequency Fpass of the filter is 19Khz, the stopband frequency Fstop is 23Khz, the minimum passband attenuation Apass is 0.001dB, the minimum stopband attenuation Astop is 100dB (16-bit precision), and the sampling frequency Fs is 352.8 Khz.
Further, the sawtooth wave can adopt a back sawtooth wave.
The D-class audio amplifier disclosed by the invention obtains a modulated digital pulse width signal through three indispensable and interrelated mathematical processing modules, namely interpolation, pulse width length calculation and noise shaping after low order truncation, reduces distortion and greatly inhibits noise. The purpose of oversampling interpolation is to meet the requirement of switching frequency, and the higher switching frequency enables the modulated higher harmonic component to be filtered more conveniently through a low-pass filter, so that the signal is well restored, and the signal quality is improved; approximating a real data curve through polynomial interpolation, and calculating a 'natural sampling point' through Newton iteration so as to obtain a pulse width length which is enough to approximate a real value; finally, the pulse width length value is subjected to truncation filtering by noise shaping logic, so that the digital pulse width length is output at regular time in an achievable frequency range, the three links are closely related together, and on the basis of mathematical theory analysis, the higher harmonic is suppressed at a sufficiently low level, and the audio signal is excellently recovered.
In addition, the invention also discloses a pulse width modulation method of the D-type audio amplifier, which realizes the pulse width modulation according to the D-type audio amplifier, and specifically comprises the following steps:
the method comprises the following steps: actively acquiring PCM audio data;
step two: carrying out interpolation processing on the PCM audio data by a plurality of interpolation multiples L, and simultaneously carrying out low-pass filtering on the audio data after the interpolation processing;
step three: digitally modulating the audio data subjected to interpolation filtering by taking a sawtooth wave as a carrier wave by using a pseudo-natural sampling method to obtain pulse width data;
step four: performing noise shaping processing on the pulse width data, cutting the low order of the pulse width data obtained after the digital modulation in the step three, and shaping the noise generated after the low order is cut through a filter;
step five: and D, performing the PWM signal generation module on the pulse width data processed in the step four to generate a pulse width signal.
Further, it may be desirable that the interpolation multiple is 8.
Further, the low-pass filtering parameters in the step two are: the passband frequency Fpass is 19Khz, the stopband frequency Fstop is 23Khz, the minimum passband attenuation Apass is 0.001dB, the minimum stopband attenuation Astop is 100dB (16-bit precision), and the sampling frequency Fs is 352.8 Khz.
Further, the sawtooth wave is a back sawtooth wave.
Drawings
FIG. 1 is a structure of a class D audio amplifier using pulse width modulation of digital logic
FIG. 2 is a block diagram of the basic structure of a pulse width modulation design for digital logic
FIG. 3 is a block diagram of the basic structure of an interpolation and filtering module
FIG. 4 is a block diagram of the basic structure of a pulse width calculation module
FIG. 5 is a block diagram of the basic structure of noise shaping logic
FIG. 6 is a normalized magnitude response index of a digital linear low-pass ripple finite impulse response filter
FIG. 7 is a comparison of natural and uniform sampling
FIG. 8 is a functional diagram of truncation and noise shaping
Detailed Description
One embodiment of the invention is:
as shown in the class D audio amplifier shown in fig. 1, the pulse width modulation PWM module of the digital logic is located in the audio amplifier, that is, PCM audio digital data is obtained from a digital signal source or a storage area, and processed to obtain a pulse width modulation signal, which is output to the power amplifier circuit to drive audio playing.
Fig. 2 illustrates a structure of a digital logic PWM module, which includes an access interface, an interpolation and filtering module, a PWM pulse width calculation module, a cut-off low-order and noise shaping module, an early warning and monitoring module, and a PWM signal generation module.
The data interface can be an APB slave interface in an AMBA chip architecture standard, audio data can be transmitted to the slave interface through a CPU or a DMA master module, and a buffer formed by FIFO (first in first out) is arranged in the data interface so as to facilitate a subsequent module to control the sampling rate of the audio data.
The interpolation and filtering module is connected behind the access interface and performs 8 times (8x) of interpolation processing in the first stage, namely sample point values of the signals are expanded to 8 times by interpolation, and interpolation processing is performed while filtering interpolation data is performed so as to reduce distortion of audio signals and inhibit influence of higher harmonic components;
a modulation pulse width calculation module connected behind the interpolation and filtering module, which modulates the sawtooth wave according to the result of 8x interpolation, approaches the function of the signal curve according to a certain number of sampling points by adopting the process of modulation by a pseudo-natural sampling method, and then obtains the intersection point of the signal curve and the sawtooth wave carrier according to the result to obtain the digital representation of the pulse width length meeting the precision requirement;
since the modulation sampling rate Fs becomes an audio sampling rate of 8 times after the 8x interpolation sampling, and the maximum audio sampling rate is 44.1Khz, Fs is 352.8Khz, since a pulse is modulated correspondingly in each unit period of the modulation sampling rate, and then the indication value of the pulse width length is added to achieve a certain precision, if the precision of 16 bits is achieved according to this example, the frequency of the required clock of timing counting is as high as 23Ghz, which is impossible for an actual circuit, after the pulse width calculation module obtains the indication value of the pulse width length, the low bit of the length needs to be intercepted, and the intercepted low bit needs to be filtered and fed back to the input to compensate the influence caused by the interception of the low bit, which is called "noise shaping".
After the three steps as described above are taken, the pulse width length of the digital representation satisfying the 16-bit precision will be found, and the final result will be represented by 8-bit data.
The data processed by the early warning and monitoring module is the 8-bit data output by the digital logic of the pulse width modulation, because the signal of the pulse width modulation is converted into the pulse driving power amplifier tubes one by one, the real power is consumed, if the data is wrong, not only the problem of audio playing is probably caused, but also the power amplifier circuit is probably damaged by the overhigh power output for a long time. Thus, a "maximum pulse width threshold", "maximum pulse width threshold off consecutive times", or a "time window" may be set to meter the "high level output duty cycle" over such a length of time window to monitor for a dangerously high level, high power output. In addition, the read-only registers "maximum effective output pulse width", "minimum effective output pulse width", and "average effective output pulse width" are provided, and the interval of the output modulation pulse width can be observed. And provides a clearing function, so that the software can conveniently select a required time period to carry out the statistics. A 'forced pulse width output value' setting is provided to facilitate testing and mute control, as well as cooperate with mode switching. When the full-bridge power amplifier circuit is driven, the dead time setting is needed, the smaller the dead time is, the smaller the distortion caused by the smaller the dead time is, but the dead time is within the allowable range of the power amplifier transistor, so the setting is increased, and the flexibility of the circuit is improved.
Finally, the length value of the modulation pulse width is sent to a PWM signal generation module, and the PWM signal generation module converts the length value of the modulation pulse width into a final PWM signal. It should be mentioned that the frequency of the count clock of the module should be 352.8khz x256 (corresponding to an 8-bit representation) or 90.3 Mhz.
The following mainly describes the implementation of three links of digital pulse width modulation:
interpolation and filtering
How the digital linear low-pass ripple finite impulse response filter (low-pass impulse FIR) in the interpolation and filtering module is designed is described below. As shown in fig. 6, some of the parameters necessary to determine the filter are listed. According to the actual requirement, a group of parameters is determined as follows:
passband frequency Fpass ═ 19 Khz;
stop band frequency Fstop ═ 23 Khz;
the minimum passband attenuation is 0.001 dB;
the minimum stop-band attenuation is Astop-100 dB (16-bit precision);
the sampling frequency Fs is 352.8 Khz.
Then, the order of the transfer function of the estimation filter can be estimated according to the following formula, one is the Kaiser (Kaiser) formula:
<math><mrow> <mi>N</mi> <mo>≈</mo> <mfrac> <mrow> <mo>-</mo> <mn>20</mn> <msub> <mi>log</mi> <mn>10</mn> </msub> <msqrt> <msub> <mi>δ</mi> <mi>p</mi> </msub> <msub> <mi>δ</mi> <mi>s</mi> </msub> </msqrt> <mo>-</mo> <mn>13</mn> </mrow> <mrow> <mn>14.6</mn> <mrow> <mo>(</mo> <msub> <mi>ω</mi> <mi>s</mi> </msub> <mo>-</mo> <msub> <mi>ω</mi> <mi>p</mi> </msub> <mo>)</mo> </mrow> <mo>/</mo> <mn>2</mn> <mi>π</mi> </mrow> </mfrac> </mrow></math>
(formula 1)
Secondly, the Hermann-Rabiner-Chan formula:
<math><mrow> <mi>N</mi> <mo>≈</mo> <mfrac> <mrow> <msub> <mi>D</mi> <mo>∞</mo> </msub> <mrow> <mo>(</mo> <msub> <mi>δ</mi> <mi>p</mi> </msub> <mo>,</mo> <msub> <mi>δ</mi> <mi>s</mi> </msub> <mo>)</mo> </mrow> <mo>-</mo> <mi>F</mi> <mrow> <mo>(</mo> <msub> <mi>δ</mi> <mi>p</mi> </msub> <mo>,</mo> <msub> <mi>δ</mi> <mi>s</mi> </msub> <mo>)</mo> </mrow> <msup> <mrow> <mo>[</mo> <mrow> <mo>(</mo> <msub> <mi>ω</mi> <mi>s</mi> </msub> <mo>-</mo> <msub> <mi>ω</mi> <mi>p</mi> </msub> <mo>)</mo> </mrow> <mo>/</mo> <mn>2</mn> <mi>π</mi> <mo>]</mo> </mrow> <mn>2</mn> </msup> </mrow> <mrow> <mrow> <mo>(</mo> <msub> <mi>ω</mi> <mi>s</mi> </msub> <mo>-</mo> <msub> <mi>ω</mi> <mi>p</mi> </msub> <mo>)</mo> </mrow> <mo>/</mo> <mn>2</mn> <mi>π</mi> </mrow> </mfrac> </mrow></math>
(formula 2)
Wherein,
D∞(δp,δs)=[a1(log10δp)2+a2(log10δp)+a3]log10δs
-[a4(log10δp)2+a5(log10δp)+a6]
(formula 3)
And,
F(δp,δs)=b1+b2[log10δp-log10δs](formula 4)
The parameter values in equations 3 and 4 are as follows,
a1=0.005309,a2=0.07114,a3=-0.4761,
a4=0.00266,a5=0.5941,a6=0.4278,
b1=11.01217,b2=0.51244
the normalized corner boundary frequency is such that,
(formula 5)
(formula 6)
The tolerance for the ripple within the pass-band,
Apass=-20log10(1-2δp)
(formula 7)
Astop=-20log10(δs) (formula 8)
Obtaining N which is approximately equal to 480.3 according to a Hermann-Rabiner-Chan formula; according to the Kaiser formula, N.apprxeq.479.7 is determined to be 481 order.
To reduce the computational complexity, a multi-phase structure (Polyphase) FIR filter is also required. The relationship of input and output thereof can be expressed by the following equation:
(formula 9)
Wherein the filter coefficients are cycled according to the following law,
gm(n) ═ h (nL + m ≦ L) (equation 10)
Since an interpolation filter of 8x has been chosen, L is 8. In this case, the original low-pass linear ripple FIR is combined into small filters of 8 phases, with the input being the maximum 44.1Khz audio data, and the output being converted to 8x 352.8Khz up-sampled audio data.
The order of 488 can be obtained by slightly adjusting the parameter minimum stop-band attenuation to Astop 102.2dB, so that the order of the small filter of each phase only needs 488/8-61.
Since the audio up-sampling rate is 352.8Khz, which is much lower than the common operating frequency of the Mhz stage of a typical digital circuit, the computation of each up-sampling point for each small filter can be completely time-shared, and the discrete convolution computation of the filter is realized by a multiply-add-accumulate structure, as shown in fig. 3. The logic for processing the calculation needs to be higher than 352.8KhzX 61-21.5208 Mhz, so that the requirements can be met by properly increasing the calculation frequency according to the control beat and the data delay buffering condition.
(II) calculation of modulation pulse width modulated by sawtooth wave carrier
With respect to Natural sampling pulse width modulation (Natural-PWM), the corresponding term is Uniform sampling pulse width modulation (Uniform-PWM), which is contrasted as shown in fig. 7.
The uniform sampling obviously cannot conform to the actual signal curve, and according to correlation analysis, the uniform sampling introduces harmonic components in the baseband frequency spectrum of the signal, so that corresponding audio signal distortion is caused.
Then, according to the correlation analysis, comparing the triangle wave, the Leading edge sawtooth wave (Leading edge) and the Trailing edge sawtooth wave (Trailing edge) carrier, the triangle wave carrier has a significant suppression effect on the harmonic component of the sideband in the analysis, but since the harmonic component of the sideband is reduced to the required range through the filter of the aforementioned module and the triangle wave has two oblique sides, two cross points need to be calculated for each up-sampling period, and therefore the implementation is complicated, so the triangle wave carrier is not used in the digital pulse width modulation. Although the fourier analysis is comparable to the leading and trailing edges, the trailing edge sawtooth carrier is used because the trailing edge sawtooth is more prevalent.
The pseudo-natural sampling method is a method of finding a function approximating a signal curve from a signal sampling point value by a mathematical method, and obtaining the position of the intersection between the signal curve and a sawtooth wave. What is referred to herein is a fitting method of polynomial approximation.
The nth order polynomial expression for sampling n +1 samples is,
p(xi)=yi=a0+a1x+a2x2+…+anxn,i=0,1,2,…,n
(formula 11)
The samples satisfy the condition x0< x1< x2< … < xn.
The values are substituted into the sample points to obtain,
<math><mrow> <mover> <mi>X</mi> <mo>‾</mo> </mover> <mi>a</mi> <mo>=</mo> <mover> <mi>y</mi> <mo>‾</mo> </mover> </mrow></math>
(formula 12)
Wherein,
<math><mrow> <mover> <mi>X</mi> <mo>‾</mo> </mover> <mo>=</mo> <mo>[</mo> <msubsup> <mi>x</mi> <mi>i</mi> <mi>j</mi> </msubsup> <mo>]</mo> <mo>,</mo> <mi>i</mi> <mo>,</mo> <mi>j</mi> <mo>=</mo> <mn>0,1</mn> <mo>,</mo> <mo>·</mo> <mo>·</mo> <mo>·</mo> <mi>n</mi> </mrow></math>
<math><mrow> <mi>a</mi> <mo>=</mo> <msup> <mrow> <mo>[</mo> <msub> <mi>a</mi> <mn>0</mn> </msub> <mo>,</mo> <msub> <mi>a</mi> <mn>1</mn> </msub> <mo>,</mo> <mo>·</mo> <mo>·</mo> <mo>·</mo> <mo>,</mo> <msub> <mi>a</mi> <mi>n</mi> </msub> <mo>]</mo> </mrow> <mi>T</mi> </msup> <mo>,</mo> <mover> <mi>y</mi> <mo>‾</mo> </mover> <mo>=</mo> <msup> <mrow> <mo>[</mo> <msub> <mi>y</mi> <mn>0</mn> </msub> <mo>,</mo> <msub> <mi>y</mi> <mn>1</mn> </msub> <mo>,</mo> <mo>·</mo> <mo>·</mo> <mo>·</mo> <mo>,</mo> <msub> <mi>y</mi> <mi>n</mi> </msub> <mo>]</mo> </mrow> <mi>T</mi> </msup> </mrow></math>
that is, a so-called vandermonde matrix, and a polynomial function can be determined by obtaining coefficients of a polynomial in accordance with the following equation.
(formula 13)
This example uses an 8 th order polynomial with n being 8.
The amplitude of the sawtooth wave sum p (x) is not made to range between [ -1,1], and the analytic function of the sawtooth wave is,
s ( x ) = 2 T x - ( 1 + 2 n )
(formula 14)
Where T is an upsampling period (352.8Khz) and n is the current sampling period. The constructor function is as follows,
<math><mrow> <mi>f</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> <mo>=</mo> <mi>p</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> <mo>-</mo> <mi>s</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> <mo>=</mo> <msub> <mi>a</mi> <mn>0</mn> </msub> <mo>+</mo> <msub> <mi>a</mi> <mn>1</mn> </msub> <mi>x</mi> <mo>+</mo> <msub> <mi>a</mi> <mn>2</mn> </msub> <msup> <mi>x</mi> <mn>2</mn> </msup> <mo>+</mo> <mo>·</mo> <mo>·</mo> <mo>·</mo> <mo>+</mo> <msub> <mi>a</mi> <mi>n</mi> </msub> <msup> <mi>x</mi> <mn>8</mn> </msup> <mo>-</mo> <mrow> <mo>(</mo> <mfrac> <mn>2</mn> <mi>T</mi> </mfrac> <mi>x</mi> <mo>-</mo> <mrow> <mo>(</mo> <mn>1</mn> <mo>+</mo> <mn>2</mn> <mi>n</mi> <mo>)</mo> </mrow> <mo>)</mo> </mrow> </mrow></math>
(formula 15)
The root of the function is solved according to Newton-Raphson iteration, namely the intersection point of the signal curve and the sawtooth wave,
<math><mrow> <msub> <mi>x</mi> <mrow> <mi>n</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> <mo>=</mo> <msub> <mi>x</mi> <mi>n</mi> </msub> <mo>-</mo> <mfrac> <mrow> <mi>f</mi> <mrow> <mo>(</mo> <msub> <mi>x</mi> <mi>n</mi> </msub> <mo>)</mo> </mrow> </mrow> <mrow> <msup> <mi>f</mi> <mo>′</mo> </msup> <mrow> <mo>(</mo> <msub> <mi>x</mi> <mi>n</mi> </msub> <mo>)</mo> </mrow> </mrow> </mfrac> <mo>,</mo> <mi>n</mi> <mo>≥</mo> <mn>0</mn> </mrow></math>
(formula 16)
The iteration starting point is the central point of the sampling period, and the iteration times are 3 times.
(III) truncation and noise shaping
The pulse width length data calculated by the pulse width modulation is 16 bits, and finally the pulse width length of 8 bits is obtained according to the preliminary analysis in the module description.
As shown in fig. 8, the low order bits of the filter h (z) are processed and feedback compensated to the input, thereby achieving the purpose of noise shaping.
The filter function is as follows,
H(z)=a1z-1+a2z-2+a3z-3+a4z-4+a5z-5(formula 17)
Wherein,
a1=5,a2=-10,a3=10,a4=-5,a5=1
the technical details of the pulse width modulation PWM module of the whole digital logic are approximately the same, and the core technical effect is to obtain the effect which is comparable to natural sampling in analog implementation, and to fully utilize the advantages of a digital circuit to intervene and control the process of audio playing, so as to obtain better effect. Thus, although the examples describe mathematical approaches to achieving the desired results, it is clear that a specific implementation is not limited to these approaches and parameters, and that any modifications are possible and desirable to achieve the desired results without departing from the scope of the present invention.
Claims (8)
1. A kind of D class audio amplifier, include a digital logical pulse width modulation PWM module, a D class amplifier power amplifier tube, a low-pass filter, characterized by that the said digital logical pulse width modulation PWM module includes a initiative fetch interface module, a digital pulse width modulation module, a prewarning and monitoring module and a PWM signal generation module connected sequentially;
the active access interface module is used for actively acquiring PCM audio data;
the digital pulse width modulation module comprises an interpolation and filtering module, a modulation pulse width calculation module and a truncation low-order and noise shaping module which are connected in sequence;
wherein:
the interpolation and filtering module is used for performing interpolation processing on the PCM audio data by a plurality of interpolation multiples L, and meanwhile, performing low-pass filtering on the audio data after the interpolation processing and outputting the audio data to the modulation pulse width calculation module;
the modulation pulse width calculation module is used for carrying out digital modulation on the audio data subjected to interpolation filtering by taking a sawtooth wave as a carrier wave by using a pseudo sampling method to obtain pulse width data and outputting the pulse width data to the cutting low-order and noise shaping module;
the low-order cut-off and noise shaping module also comprises a filter, the low-order cut-off and noise shaping module is used for cutting the low order of the pulse width data obtained after digital modulation, and the low-order cut-off and noise shaping module is used for shaping the noise generated after low-order cutting-off and outputting the noise to the early warning and monitoring module;
the early warning and monitoring module is used for carrying out emergency treatment on a high level value which is wrong for a long time, controlling the dead time of the power amplifier tube, monitoring the maximum value and the minimum value of pulse width data and carrying out forced silent output setting;
the PWM signal generation module is used for generating a pulse width signal according to the pulse width data after the noise shaping processing.
2. The class-D audio amplifier of claim 1, wherein the interpolation and filtering module is a linear low-pass ripple finite impulse response filter with a multiphase structure, and the interpolation multiple L is 8.
3. Class D audio amplifier according to claim 2, characterized in that the filter has a passband frequency Fpass of 19Khz, a stopband frequency Fstop of 23Khz, a minimum passband attenuation of Apass of 0.001dB, a minimum stopband attenuation of Astop of 100dB (16 bits precision), and a sampling frequency Fs 352.8 Khz.
4. The class D audio amplifier of claim 1, wherein said sawtooth is a post-sawtooth.
5. A method of pulse width modulation for a class D audio amplifier, characterized in that the class D audio amplifier according to claim 1 implements pulse width modulation, in particular:
the method comprises the following steps: actively acquiring PCM audio data;
step two: carrying out interpolation processing on the PCM audio data by a plurality of interpolation multiples L, and simultaneously carrying out low-pass filtering on the audio data after the interpolation processing;
step three: digitally modulating the audio data subjected to interpolation filtering by taking a sawtooth wave as a carrier wave by a pseudo sampling method to obtain pulse width data;
step four: performing noise shaping processing on the pulse width data, cutting the low order of the pulse width data obtained after the digital modulation in the step three, and shaping the noise generated after the low order is cut through a filter;
step five: and D, performing the PWM signal generation module on the pulse width data processed in the step four to generate a pulse width signal.
6. The pulse width modulation method of claim 5 wherein said interpolation factor is 8.
7. The pwm method according to claim 6, wherein the low-pass filtering parameters in step two are: the passband frequency Fpass is 19Khz, the stopband frequency Fstop is 23Khz, the minimum passband attenuation Apass is 0.001dB, the minimum stopband attenuation Astop is 100dB (16-bit precision), and the sampling frequency Fs is 352.8 Khz.
8. The pulse width modulation method of claim 5 wherein the sawtooth waveform is a post-sawtooth waveform.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410330486.5A CN104104344A (en) | 2014-07-11 | 2014-07-11 | Class-D audio frequency amplifier and pulse width modulation method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410330486.5A CN104104344A (en) | 2014-07-11 | 2014-07-11 | Class-D audio frequency amplifier and pulse width modulation method thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104104344A true CN104104344A (en) | 2014-10-15 |
Family
ID=51672200
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410330486.5A Pending CN104104344A (en) | 2014-07-11 | 2014-07-11 | Class-D audio frequency amplifier and pulse width modulation method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104104344A (en) |
Cited By (4)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105827256A (en) * | 2016-04-11 | 2016-08-03 | 河海大学常州校区 | Mobile GSM (Global System for Mobile Communication) and GSM-R (GSM for railways) interference inhibition system and method based on digital filtering |
CN108649935A (en) * | 2018-05-03 | 2018-10-12 | 成都黎声科技有限公司 | A kind of system and method that digital audio and video signals are directly modulated into PWM waveform |
CN110896305A (en) * | 2018-09-12 | 2020-03-20 | 半导体元件工业有限责任公司 | Pulse width demodulator |
CN111800726A (en) * | 2020-06-28 | 2020-10-20 | 荣成歌尔电子科技有限公司 | Remote signal transmission device and remote signal transmission system |
Citations (5)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060145755A1 (en) * | 2004-12-31 | 2006-07-06 | Princeton Technology Corporation | Square wave modulation design for a class-D audio amplifier |
US20060250183A1 (en) * | 2005-05-09 | 2006-11-09 | Texas Instruments Incorporated | Systems and methods for driving an output transistor |
US20080143436A1 (en) * | 2006-12-15 | 2008-06-19 | Bin Xu | All-digital class-d audio amplifier |
CN101485082A (en) * | 2006-07-07 | 2009-07-15 | Nxp股份有限公司 | Class D audio amplifier |
CN101662262A (en) * | 2008-08-25 | 2010-03-03 | 台湾积体电路制造股份有限公司 | Class d amplifier control circuit and method |
-
2014
- 2014-07-11 CN CN201410330486.5A patent/CN104104344A/en active Pending
Patent Citations (5)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060145755A1 (en) * | 2004-12-31 | 2006-07-06 | Princeton Technology Corporation | Square wave modulation design for a class-D audio amplifier |
US20060250183A1 (en) * | 2005-05-09 | 2006-11-09 | Texas Instruments Incorporated | Systems and methods for driving an output transistor |
CN101485082A (en) * | 2006-07-07 | 2009-07-15 | Nxp股份有限公司 | Class D audio amplifier |
US20080143436A1 (en) * | 2006-12-15 | 2008-06-19 | Bin Xu | All-digital class-d audio amplifier |
CN101662262A (en) * | 2008-08-25 | 2010-03-03 | 台湾积体电路制造股份有限公司 | Class d amplifier control circuit and method |
Non-Patent Citations (5)
* Cited by examiner, † Cited by third partyTitle |
---|
LUO SHUMENG 等: "A digital input class-D audio amplifier with sixth-order PWM", 《JOURNAL OF SEMICONDUCTORS》 * |
WAN-RONE LIOU 等: "Integrated low-voltage filter-less class-D Audio power amplifier with PWM DC/DC buck converter", 《2010 INTERNATIONAL CONFERENCE ON COMMUNICATIONS, CIRCUITS AND SYSTEMS(ICCCAS)》 * |
于泽琦: "数字音频D类功放的误差在线校正方法", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
徐景: "D类音频功率放大器的研究与设计", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
陈源: "用于数字音频放大器的预失真算法", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (5)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105827256A (en) * | 2016-04-11 | 2016-08-03 | 河海大学常州校区 | Mobile GSM (Global System for Mobile Communication) and GSM-R (GSM for railways) interference inhibition system and method based on digital filtering |
CN108649935A (en) * | 2018-05-03 | 2018-10-12 | 成都黎声科技有限公司 | A kind of system and method that digital audio and video signals are directly modulated into PWM waveform |
CN110896305A (en) * | 2018-09-12 | 2020-03-20 | 半导体元件工业有限责任公司 | Pulse width demodulator |
CN110896305B (en) * | 2018-09-12 | 2024-05-28 | 半导体元件工业有限责任公司 | Pulse Width Demodulator |
CN111800726A (en) * | 2020-06-28 | 2020-10-20 | 荣成歌尔电子科技有限公司 | Remote signal transmission device and remote signal transmission system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7847651B2 (en) | 2010-12-07 | Method of and apparatus to generate pulse width modulated signal from sampled digital signal by chaotic modulation |
EP0890221B1 (en) | 2007-07-04 | Conversion of a pcm signal into a upwm signal |
CN108832917B (en) | 2021-09-03 | Spread spectrum modulation method for filtering-free digital D-class audio power amplifier |
US8306106B2 (en) | 2012-11-06 | Multi-edge pulse width modulator with non-stationary residue assignment |
EP2509218B1 (en) | 2019-07-10 | System and method for generating a pulse-width modulated signal |
WO2007087568A2 (en) | 2007-08-02 | Systems and methods for improving performance in a digital amplifier by adding an ultrasonic signal to an input audio signal |
CN104104344A (en) | 2014-10-15 | Class-D audio frequency amplifier and pulse width modulation method thereof |
CN101390287A (en) | 2009-03-18 | Digital PWM amplifier with simulation-based feedback |
CN102355209A (en) | 2012-02-15 | Amplifier employing interleaved signals for PWM ripple suppression |
CN1866728B (en) | 2011-06-01 | Digital amplifier, pulse width modulator thereof and method for reducing pop noise for the same |
CN110957983A (en) | 2020-04-03 | A three-frequency pseudo-random variable spread spectrum modulation method and a filter-free pulse width modulator constructed by the method |
EP1441447B1 (en) | 2009-12-02 | D/a converter and output amplifying circuit |
EP1418667A1 (en) | 2004-05-12 | Multi-level class-D amplifier by means of 3 physical levels |
US8116368B2 (en) | 2012-02-14 | PWM signal generator, PWM signal generating device, and digital amplifier |
JP2004032501A (en) | 2004-01-29 | Apparatus and method for digital signal conversion |
US7317758B2 (en) | 2008-01-08 | PCM-to-PWM converter |
CN104639481A (en) | 2015-05-20 | Multi-band signal processing method and equipment |
US7492848B2 (en) | 2009-02-17 | Method and apparatus for efficient multi-stage FIR filters |
JP3801118B2 (en) | 2006-07-26 | Class D amplifier |
CN117388806B (en) | 2024-03-19 | Real-time variable bandwidth interference signal generation method and device based on FPGA |
CN103888091B (en) | 2017-06-06 | For the correcting harmonic distortion method of DAB D class power amplifiers |
CN109756193B (en) | 2023-04-28 | Class D digital audio power amplifier system using spread spectrum modulation for PWM wave modulation |
US6933872B2 (en) | 2005-08-23 | Digital/analog converter circuit with a device for compensating nonlinear distortions |
US7391346B1 (en) | 2008-06-24 | Switching amplifier system and method |
JP2003079135A (en) | 2003-03-14 | Dc-dc converter |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
2014-10-15 | C06 | Publication | |
2014-10-15 | PB01 | Publication | |
2014-11-12 | C10 | Entry into substantive examination | |
2014-11-12 | SE01 | Entry into force of request for substantive examination | |
2017-07-21 | WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20141015 |