Class d amplifier resolution

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I'm no technical expert but need some basic understanding.

I know the basics of class d amplification, and have always been told that there is no loss in signalresolution. In a danish forum the debate his come up again.

What is the truth. If we have an analogue controlled PWM amplifier. Does the triangle wave oscillator limit the incoming signal so the resolution at the output is not a "copy" of the input. I digital I know we have less resolution, than the original analogue signal (audible or not).
 
In theory no digitization or PWMing of an analog signal can be equal to just analog.

Factor in a 500KHz+ switching frequency or 24 bit digitization.

Will you be able to tell the difference.

I know I can't.

Thanks do you have some more details about this.

The PWM do not have a fixed with - it can actually have any with possible, so I don't understand why it's not equal (or can be equal).

For subwoofer duty you can have 60 khz switching frequency - will that then be a amplifier with very very low resolution? If so, I have misunderstood something.
 
AX tech editor
Joined 2002
Paid Member
I'm no technical expert but need some basic understanding.

I know the basics of class d amplification, and have always been told that there is no loss in signalresolution. In a danish forum the debate his come up again.

What is the truth. If we have an analogue controlled PWM amplifier. Does the triangle wave oscillator limit the incoming signal so the resolution at the output is not a "copy" of the input. I digital I know we have less resolution, than the original analogue signal (audible or not).

The important thing to remember is that just as in a DAC, a class D has a filter at the output which reconstitutes the signal. There's no loss of resolution. This can be easily checked by measuring the output noise and distortion.

Some amps like the nCore are even better than the best class A in this respect.

Another gotcha is to think that because analog is, well, analog, it has infinite resolution. Again, this is not true, ultimately the resolution is limited by distortion and noise. If your noise is 60dB (1/1000) below the signal, your resolution cannot be better than that, analog or digital or class D (which of course is analog amplification; nothing digital in class D).

Jan
 
Last edited:
What I think I would like to see, is the waveform before and after amplification

Will it still be a perfect sinewave or will it be almost perfect. If the curve between the triangle wave (where the triangle "cuts" the sinewave), will still be perfect after the output filter, then why. I still quite understand it. My logic tells me, that the triangle will make the curve straight. The in my mind the amplified sinewave will be recreated by very small peaces of straight line, instead of perfect curves from the original sinewave.

Any comments?
 

TNT

Member
Joined 2003
Paid Member
Say that there where indeed traces of lines, there corresponding frequency content would still always be higher than the switch frequency so if your not a bat.... anyways, the "straight lines" are filtered away on the output. Any residuals of any "straight lines" will show in a spectral analysis and as such as good ol' distortion.

Fourier rules ;)

It's all in the distorsion and noise figures - promise!

What is a perfect distorsion figure (sinewave) for you?

And you are talking about distorsion even if you dont use that word.

But yes - the output can never be better than what the precision of the triangle wave generator produces - it need to be perfect or it will create distorsion on the output. That is not a concept fault or a "straight line" problem however.

//
 
Last edited:
I have this picture
350px-PWM%2C_3-level.svg.png


from this source
https://en.wikipedia.org/wiki/Pulse-width_modulation

I think this is also in line with your last sentence. Lets say the original signal has a noise floor of 100 dB, then If the precision of the triangle wave generator is as good as the original signal in terms of noise, then the sinewave will be identical (but attenuated od course)

And if that is correct, then I don't understand why anyone will make a subwoofer class d amp with a low precision triangle wave generator of lets say 60 kHz.
Unelss the ratio between the longer waves below 500 Hz and the lower frequency gives the same precision as in the higher audio frequencies.
 
Last edited:
AX tech editor
Joined 2002
Paid Member
Well, if sampling at 44.1k is 'good enough' for CD, why would sampling at 60k not be good enough for a sub?

You can't look at this in isolation - the filter is an essential part of it.

In the picture above it looks like the signal (red) stays constant between two pulses, which it does not, thanks to the filter.

Jan
 
Lets say the original signal has a noise floor of 100 dB, then If the precision of the triangle wave generator is as good as the original signal in terms of noise, then the sinewave will be identical (but attenuated od course)

It is practically impossible to analyse this precisely in head. One of my teachers spent some month with calculating spectra of different PWM methods in 1977, and finally with the aid of long computer-hours he could came up with quantitative conclusions. But now in the 21th century you can easily simulate a PWM modulator. And if you do it, you will find that the spectra contains the original modulating signal, switching frequency, harmonics of the switching freq, and sidebands around the "carrier" and harmonics that are similar to those of Frequency Modulation. Those sidebands are infinite, spreads over the entire freq domain, but their magnitude drops fast, and at a distance they lost in the noise floor. The width of the sidebands increases with increasing modulation frequency, and to keep them above baseband (or under noise floor) switching frequency needs to be higher than (about) 10 times the highest modulating signal.

In every other meaning the resolution of PWM is unlimited.

And if that is correct, then I don't understand why anyone will make a subwoofer class d amp with a low precision triangle wave generator of lets say 60 kHz.

I don't know what do you mean low precision, but the purpose of low switching freq is achieving high efficiency and low EMI. Quality is not an issue below 200 Hz, can be qood enough at fsw=60 kHz.
 
Well, if sampling at 44.1k is 'good enough' for CD, why would sampling at 60k not be good enough for a sub?

You can't look at this in isolation - the filter is an essential part of it.

In the picture above it looks like the signal (red) stays constant between two pulses, which it does not, thanks to the filter.

Jan

The red signal is flux density (B) given in Tesla, while you apply the PWM Voltage shown on the graph on an inductor. It is precise.

You can look at the PWM signal without the filter (also you can send it to the speaker), but you have to look at its spectra, not the bare waveform. On the waveform you can never see small differences, but on the spectra you can. And on the spectra you can separate what is audible and what is not. Inside the baseband a naked PWM and the reconstructed signal look exactly the same, so dealing with reconstruction filter to judge on PWM is not needed. At least in simulation. Some spectrum analysers may need bandwidth limit.

While in most basic questions you are right, there are many mistakes in details, for example ClassD can be digital also, etc...


Very good! Thanks for this link!
 
While in most basic questions you are right, there are many mistakes in details, for example ClassD can be digital also, etc...

Thanks for that very enlightning post. I'm not sure if you mean that a class D amplifier can be digital or?

I have read some more - no I got to the comparator

If I read this

https://en.wikipedia.org/wiki/Comparator

Then a class D amplifier is digital

But if I read this

http://www.ti.com/lit/ug/slau508/slau508.pdf

It seems more that it is (or can be) analog

Is it how you feed the comparator that determines if the output is analog or digital?
 
AX tech editor
Joined 2002
Paid Member
Thanks for that very enlightning post. I'm not sure if you mean that a class D amplifier can be digital or?

I have read some more - no I got to the comparator

If I read this

https://en.wikipedia.org/wiki/Comparator

Then a class D amplifier is digital

But if I read this

http://www.ti.com/lit/ug/slau508/slau508.pdf

It seems more that it is (or can be) analog

Is it how you feed the comparator that determines if the output is analog or digital?

It's always analog. Everything in a class D amp is analog - volts, time, amps.

A digital amp is an amp that processes numbers like '45' or '66'. Those numbers can be coded in binary like '00100110' or something.

Of course you can build a class D amp that accepts a digital (numbers) input like an S/PDIF signal.

Jan
 
Thanks for that very enlightning post. I'm not sure if you mean that a class D amplifier can be digital or?

Digital or analog. Not defined by term ClassD.


I have read some more - no I got to the comparator

If I read this

https://en.wikipedia.org/wiki/Comparator

Then a class D amplifier is digital

But if I read this

http://www.ti.com/lit/ug/slau508/slau508.pdf

It seems more that it is (or can be) analog

Is it how you feed the comparator that determines if the output is analog or digital?

Digital signal means: the information carrier physical quantity has predefined discrete values, and any other value is invalid, should be considered as the closest valid value.

But not only Voltage can carry information. It can be Current, Frequency, Phase, or Duty Cycle (or any physical quantity). In our case duty cycle is the information carrier, it represents audio signal. If the timing can be varied only in discrete steps (for example in 1ns steps), then it is digital, but if it can be any value then it is analog. There are both analog and digital ClassD amps, TI has many of both.
 
What kind of application is the comparator in class d amplifier

Applications

Null detectors

Zero-crossing detectors

Relaxation oscillator

Analog-to-digital converters - I guess this it not it

Window detectors - This will be my guess :)
A comparator in ClassD amp is simply a comparator, it compares modulating signal to triangle wave. But comparing 2 signal is mathematically equivalent to subtracting one from other and deciding polarity of the result, so you may call it a zero crossing detector. For example the same way I use histeresys-free "digital" inverter (logic gate) as comparator in my amp designs. (And yet it is still analog.)
 
Last edited:
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.