Maker Pro
Maker Pro

Class D audio amp

I am constructing a class D audio amp. The plans I have are using am LM393 dual comparator for mixing audio signal with high freq triangle wave. The response time of the 393 is 1.5μs. I suspect that if the response time is this lengthy, slew rate also is lengthy. My triangle wave is at 200KHz, time period 5μs. 1.5μs is a big chunk out of 2.5μs transition. I have 2 - AD811 on hand that produce my 200 KHz as an output very nicely. The AD811 were a bit pricey. Also it would be convenient to have dual amps in one package. Any suggestions as to comparator choice. Their outputs will drive an IR2110 MOSFET driver.
 
For your interest, here's the LTspice simulation of a PWM circuit using a transistor sawtooth generator with about a 250kHz frequency, along with a fast LT1720 comparator:
The Demod output is from a low-pass filter to show the demodulated PWM signal.

upload_2022-4-18_7-38-53.png
 
How does that affect linearity?
I would think it would be the linearity of the wave slope that determines the linearity.
I'm thinking that a 50% duty cycle of a square wave will produce a more accurate reproduction of the audio range signal. Maybe plug it in to your simulator and look for a bit of difference on the audio out.
 
I'm thinking that a 50% duty cycle of a square wave will produce a more accurate reproduction of the audio range signal.
How does whether its a triangle or a sawtooth affect the duty-cycle accuracy of the square-wave?
Either a triangle or a sawtooth will generate a 50% duty-cycle when the modulation input is 1/2 the PP voltage of either wave-shape.
 
How does whether its a triangle or a sawtooth affect the duty-cycle accuracy of the square-wave?
Either a triangle or a sawtooth will generate a 50% duty-cycle when the modulation input is 1/2 the PP voltage of either wave-shape.

You're right of course, but for a given frequency, the slope (dv/dt) of the ramp of a sawtooth of a given amplitude is only half as fast as that of the sides of a triangle.

But which augers for better accuracy/fidelity is another question entirely.
 

Harald Kapp

Moderator
Moderator
I tried to look up the difference of sawtooth vs. triangular in a class D amplifier. Found lots of personal opinions, little fundamental technical data.
In fact, some applications from renowned manufacturers use either sawtooth or triangular waveforms.

Then I came across this article. It also states that both carrier waveforms can be sed. It then goes on, however, to describe the relevant difference on pages 12 ff.: With a triangular waveform you effectively double the sampling rate which makes filtering at the output easier.
Distortion or linearity are not mentioned as an issue when choosing one carrier waveform over the other.
Probably the difference between the two is of purely theoretical interest once the carrier frequency is above a certain threshold.
 
Using a saw tooth will skew the PWM pulses leading to distortion.
The "skew" is just a shift in time of each PWM pulse from the center of the sawtooth.
Since that is a constant shift for each pulse, I don't see how that can add distortion to the modulated signal.
 
Probably the difference between the two is of purely theoretical interest once the carrier frequency is above a certain threshold.
It's been some time since I worked in this stuff, but from memory, the comparator without sample-and-hold implements what was called "natural sampling" which has advantages. Since the effective sampling rate is not significantly higher than the signal (low-pass) bandwidth, this may have some advantage. Sort of depends on the integrity that you need in the end.
For many applications, this, as suggested, might be just a theoretical concern.
Quite prepared to be wrong. Just from memory.
 
What "sample and hold" ?
Sorry, I assume this was a bit of a theoretical aside, of little practical impact.
.
It's a one-bit converter with "natural sampling". That is, the edges occur when the waveform crosses a threshold, there is no pre-defined sample time nor sample-and-hold as might be more normal in conversion.
Natural sampling, allowing the waveform to choose the sampling point had some advantages; the details or justification of which, I frankly can't remember. Regarding the sawtooth versus the triangle; could speculate that having two such times, may have advantages over having one.
 
Then I came across this article.
Actually, now that I have taken time to actually read some of the offered paper, it does introduce these concepts, natural versus uniform sampling, on page 9 and explains it somewhat.
In my terms, each upward or downward slope of your sawtooth takes a single sample between the times of the extremes. In this comparator approach the timing of that sample is determined by the waveform and the slope waveform. In more traditional conversion, the signal level would be samples at some point in the period and converted. The paper and reference [4] suggest this natural sampling has benefits.

effectively double the sampling rate
As pointed out, using a symmetrical up & down waveform effectively doubles the sample rate as you get one transition & natural sampling point on the up & one on the down.
 
Top