PCM to PWM conversion 101

I think that what I was missing is the fact that at low signal levels, the sign of the load current is determined by the ripple rather than the signal, so you get an ultrasonic error rather than one at an audible frequency, except at very high volumes.

A 0.8 V peak-peak (is it peak-peak or peak?) square wave in the middle of the audio band in quiet surroundings would have been very audible ..
Oh yes, at light load currents, there could be multiple zero crossings due to the HF ripple, and maybe this rubbish then acts as "dither" to mask non-linearity of the system.

Yes, the 0.8V on its own maybe audible along with several of its harmonics, but in presence of say 100Vpp of the same frequency, it's just peanuts..
 
OK, then it's 80 mW, 79 dB SPL and 82 dB SPL. If it were at a frequency somewhere between 1 kHz and 10 kHz and if it were at a place where people work, according to Dutch law, the employer would have to provide hearing protection, but the employees would not be obliged to use it. Fortunately it's ultrasonic at low signal levels.
 
Last edited:

TNT

Member
Joined 2003
Paid Member
The advantage of having lots of loop gain and including the output filter in the loop are low distortion and a flat frequency response, even when you use cheap coils and when the load impedance is not exactly what you designed the output filter for (reactive loudspeaker instead of a purely resistive test load, for example).

Like the article says and confirming what newvirus2008 wrote on this thread, the people who worked on that amplifier found out they could more easily make a high-order loop with lots of loop gain if the loop filter was made digital. Hence they went for that approach. I guess it is also more easily adaptable to different output stages and filter parameters.
I get the larger FB loop. But thats really OT isn't :)

But how about the PCM->PWM step instead of PCM->A->PWM...

//
 
I don't understand the question, so it is difficult for me to answer it.

The only reasons I can think of for doing PCM to PWM conversion in a mixed-signal manner are that you need to include feedback from an analogue signal, like in a class-D amplifier with feedback, or need a time resolution that you can't make digitally.

Otherwise the most accurate method is just a purely digital sigma-delta modulator with embedded purely digital pulse width modulator. The errors caused by rounding off the pulse widths to multiples of some high-frequency clock period can then be shaped out of the band of interest, and there are no offsets or component tolerances to worry about.
 
Dear TNT,

Post-filter feedback can also be done using the digital hysteresis modulator and a fast ADC for sampling the output analogue signal. However, to get a constant switching frequency (like PWM), the hysteresis band needs to be varied in a parabolic manner (according to input signal), which is very easy to do in the digital domain. The 1-bit result then drives the output to get results similar to PWM, without the issues of stability that you seem to be worried about.
 

TNT

Member
Joined 2003
Paid Member
OK, I'm looking at it as a comparison between these different functional block schemes. Both entail of course feedback from analog side but say not necessarily behind the output filter. The discussion seemed to be about the class-d amp output filter included in the FB loop or not - this is what I thought was OT - but maybe its not... Anyways - what is the gain between a and b below (both using FB of course at least as in a "normal class-d amp).

I'm after to understand the potential processing gain of b, if any?

a) PCM -> analog -> PWM (class-d amp)
b) PCM -> PWM (class d-amp)

Maybe my question just reveals my ignorance in the matter... :)

//
 
With the analogue in between, there are errors related to PCM=>analogue, errors entirely within the analogue domain and then the errors related to analogue to PWM conversion. For example, the resistors and capacitors in the analogue filter have thermal noise and non-linearity respectively. A few others are:

  • The resistor has a small parasitic capacitance in parallel to it.
  • The capacitor has one small (ESR) and one large resistance (leakage) each in series and parallel respectively.
  • The capacitor has a series inductance and resonance frequency beyond which it becomes inductive.
  • Both the resistor and the capacitor exhibit tolerances and ageing (drift) effects.
  • Gain, phase and interpolation errors due to the analogue filtering.
  • The analogue PWM conversion that follows is inherently non-linear. There are double Fourier series expansions for PWM in the following book (if you're interested). https://books.google.co.in/books/about/Pulse_Width_Modulation_for_Power_Convert.html

On the other hand, option (b) involves processing only numbers. And given the technological developments in semiconductors it's possible to carry out the required processing with vanishingly small error, when compared to option (a).
 

TNT

Member
Joined 2003
Paid Member
I'm sorry if I have confused matters. I just wanted to understand what the gain is to go PCM-PWM compared to use a DAC and a class-D amp. Irrespectively of feedback topology.

I liked your list NW2k8 - thanks! I also see the up and down sides. Question is is if up>down :)

//
 
Dear TNT, please understand that PCM to PWM is just a modulator, not an alternative to an entire Class-D amplifier. As you're possibly already aware of, a lot more in addition to a modulator is required to make a complete amplifier, and those things are really capable of influencing the outcome of your comparison.

Also, many aspects like operating philosophy, power level, modulation method, loop-gain, compensation scheme, topology etc. differ among analogue Class-D amplifiers.

And since we're looking for fidelity of the system as a whole, the answer is tricky (I think) and we have to try both ways to find out which one wins. However, one thing looks very clear to me: feedback is necessary either way.

BTW, here's one more reason to choose digital and that is, electromagnetic interference.
 
I'm sorry if I have confused matters. I just wanted to understand what the gain is to go PCM-PWM compared to use a DAC and a class-D amp. Irrespectively of feedback topology.

I liked your list NW2k8 - thanks! I also see the up and down sides. Question is is if up>down :)

//
The only gain I see is cheap.

All DACs and ADCs have their sound. So it's better to pick and choose the sound you like in that stage, then follow it with something you also like. You could one day toss the class D amp and go tubes, still keeping the DAC and its sound you like.

I'm on the cheap side. D amp with embedded PCM-PWM, DSP and USB adapter + powersupply DIY'd for <$300. I have to like the sound of the USB-I2S-PCM-PWM part, because I'm stuck with it; there's no teasing apart the PCM-PWM section embedded in the chip. Fortunately, I do like the sound and enjoy the convenience of the DSP and 4 power outputs, running a two-way speaker system.

I know with more $, I could do better. I'd have to build crossovers though or build an analog, op-amp based electronic crossover. Would that take away from the SQ added by better DAC and Amplifiers? Who knows...
 
Yes, digital circuits generate much more electromagnetic interference than analogue circuits ;)

Sure, they do, but the EMI from the power stage (which is much higher) is equally applicable to both analogue and digital methods. Besides, it's also important to see how the EMI from the amplifier (that increases with power level) affects its own control system.

Once the output is properly filtered and A/D converted, the digital controller then doesn't have to bother about the EMI issues while processing the numbers. I have experienced this advantage myself when I shifted from analogue to digital control for a motor drive inverter. In my opinion, very high power applications can be professionally and flawlessly controlled only in the digital domain.
 
Well, not exactly, something like 10-20kHz is sufficient when it comes to motor drives, whereas the ISR runs at switching frequency, triggered by means of the interrupt generated by the PWM terminal count. There is often no frequency or phase relationship between switching frequency and A/D clocking. However, the switching frequency is often chosen to be a 6th multiple of the fundamental frequency.

But I think the internal processing rates in digital class-D modulators are integral multiples of the switching frequency. Correct me if I'm wrong.