Author Topic: Self-Oscillating Analog-to-PWM Converter for Class-D  (Read 3864 times)

0 Members and 1 Guest are viewing this topic.

Offline Evan.CornellTopic starter

  • Regular Contributor
  • *
  • Posts: 189
  • Country: us
Self-Oscillating Analog-to-PWM Converter for Class-D
« on: December 31, 2019, 02:43:46 pm »
Can anyone explain to me how the attached circuit works? This comes from https://www.psemi.com/pdf/app_notes/an72.pdf

I am interested in how to set PWM frequency, how component selection affects accuracy of the PWM pulse width (and thus, measurable distortion), etc.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5570
  • Country: va
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #1 on: December 31, 2019, 03:47:16 pm »
LT1016 comparator is wired as an oscillator where the R33/R34 with C29 set the frequency. The voltage at emitter changes the outputs duty. The transistor is a buffer only.
« Last Edit: December 31, 2019, 04:04:33 pm by imo »
Readers discretion is advised..
 

Offline Evan.CornellTopic starter

  • Regular Contributor
  • *
  • Posts: 189
  • Country: us
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #2 on: December 31, 2019, 03:58:35 pm »
Purpose of D1-D3, D7? They would seem to limit the input voltage range, at first glance.

Is C6 there for Q1 buffer amp stability or something like that?
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5570
  • Country: va
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #3 on: December 31, 2019, 04:08:33 pm »
Above is the LTSpice simulation you may play with.
Diodes are limiters (2.8Vp-p), the voltage at emitter should be at 2.5V idle, imho.
C6 - perhaps stability or low pass..
Readers discretion is advised..
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #4 on: December 31, 2019, 04:14:12 pm »
To better understand this, if you haven't already, the key would be to take a look at LT1016's datasheet. (Don't you love it when symbols used on schematics bear no meaning at all, such as here with this LT1016 represented as a box? It would look a lot clearer to me if they had used the typical vendor's symbol... it's basically a fast comparator with complementary outputs.) https://www.analog.com/en/products/lt1016.html

I think the main parameter that will influence the average oscillation frequency is R35. R35 basically provides the positive feedback that allows the circuit to oscillate. Frequency will typically increase as R35 is increased. Keep in mind the oscillation frequency will not be quite fixed (thus I talked about average) here, so this is not exactly pure PWM. More like some kind of PDM.

Attached is a quick simulation I made (LTSpice) so you can try things. I've added a very crude low-pass filtering of the output so you get an idea of the reconstructed signal. Of course it will require some more serious filtering. I suppose it's going to feed a power output stage if it's for a class-D amp, so you'd need to take this into account to get a realistic of the end distortion. You can further add your power stage and a model of speaker into this simulation and make some simulated measurements.


 

Offline Evan.CornellTopic starter

  • Regular Contributor
  • *
  • Posts: 189
  • Country: us
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #5 on: December 31, 2019, 06:32:55 pm »
So I've been doing some FFT analysis in LTSpice on just the LT1016 oscillator circuit (deleting the BJT circuit). The sine wave source of course has an FFT floor around -280dB, no surprise there. But the PWM output barely breaks -75dB for the noise floor even down at audible band. Are the resistor values (10s of kOhms) responsible for this high noise floor, or more the characteristics of the LT1016?
 

Offline Evan.CornellTopic starter

  • Regular Contributor
  • *
  • Posts: 189
  • Country: us
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #6 on: January 02, 2020, 03:44:30 pm »
Thoughts on simulation FFT noise floor level, anyone?
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #7 on: January 02, 2020, 04:04:36 pm »
So I've been doing some FFT analysis in LTSpice on just the LT1016 oscillator circuit (deleting the BJT circuit). The sine wave source of course has an FFT floor around -280dB, no surprise there. But the PWM output barely breaks -75dB for the noise floor even down at audible band. Are the resistor values (10s of kOhms) responsible for this high noise floor, or more the characteristics of the LT1016?

Did you directly run an FFT analysis on the PWM output with no additional filtering?

The linearity of this pretty simple self-oscillating converter is not that great IMO, so I kind of doubt you'll get better than this, but I'd be curious to see how it could be improved while keeping it simple.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #8 on: January 02, 2020, 04:34:31 pm »
Here's a pretty simple variant of a PDM modulator I implemented years ago. (I think I already posted it but can't find the thread anymore.)
A benefit is that it's low part count, and very easy to analyze formally. (Guess you could say it's basically a free-running, first-order 1-bit sigma-delta modulator.)
As it is, it's free-running - will yield PDM frequencies in ~10-20MHz range with the components shown, but you can always add a fixed clock source and a flip-flop to make the output synchronous if required. The benefit of a free-running design, aside from its simplicity, is that it yields sort of a "spread spectrum", which could be a slight benefit EMI-wise I guess.

Note that it's powered with a 3.3V supply in this example, but if you up it to 5V, you'll get much better performance - average PDM freq will be a bit higher as well. At 5V, FFT analysis of the output with a 1kHz, 1Vpp input signal: worst harmonic relative level is lower than -100dB. Of course, the average freq at 15-20Mhz is a bit high to drive a power stage here - losses could be a problem. But for transmitting audio with a digital signal, it's extremely simple and still pretty good I think (that was my application.)
« Last Edit: January 02, 2020, 04:43:54 pm by SiliconWizard »
 
The following users thanked this post: Evan.Cornell

Offline Evan.CornellTopic starter

  • Regular Contributor
  • *
  • Posts: 189
  • Country: us
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #9 on: January 02, 2020, 05:00:10 pm »
I did run FFT directly on PWM output and additionally on output with AES17 20kHz filter (someone reverse engineered AudioPrecision AES17 lpf box component values). Filtered output had the desired reduction above 20kHz, but nothing thru the audio band, as expected.

Where do you think dedicated triangle wave + comparator modulator lies in terms of linearity, compared to self-oscillating, and then your own PDM modulator?
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #10 on: January 02, 2020, 05:15:47 pm »
I did run FFT directly on PWM output and additionally on output with AES17 20kHz filter (someone reverse engineered AudioPrecision AES17 lpf box component values). Filtered output had the desired reduction above 20kHz, but nothing thru the audio band, as expected.

Where do you think dedicated triangle wave + comparator modulator lies in terms of linearity, compared to self-oscillating, and then your own PDM modulator?

A (very) good triangle wave generator-based design would probably be better, especially for generating PWM signals (both PDM modulators discussed here are not really PWM, not fixed-frequency), at lower modulation frequencies. But implementing a good triangle generator is not trivial if you want to go all discrete.

Both the design you posted and mine generate relatively high-freq signals. Yours at around 1MHz, mine a decade higher... this would cause issues as I said to drive power output stages. Driving power MOSFETs in the 10MHz range requires care to avoid unacceptable losses.

In practical implementations, I still think a sigma-delta modulator would yield the best results and keep part number low. Mine is pretty simple, but you could get better results implementing one with higher order on a CPLD or FPGA for instance. But the thing to consider is the modulation frequency - sigma-delta modulators would  tend to work best at higher frequencies, which makes power stages a bit trickier/more expensive to design.
 
The following users thanked this post: Evan.Cornell

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #11 on: January 02, 2020, 06:52:33 pm »
FYI here is another self-oscillating audio-to-PWM converter using an asynchronous sigma-delta modulator : https://www.eevblog.com/forum/projects/simple-lifi-transmitting-audio-signal-with-a-led/msg2282771/#msg2282771

This was for a different application but I would be interested to know how these different approaches (PDM vs true PWM via clocked or asynchronous sigma-delta) compare in class-D applications.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3930
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #12 on: January 02, 2020, 07:23:45 pm »
Thing is, PWM based class D amplifiers suck big time and I wouldn't even bother trying. *

PDM on the other hand, is a different matter.

And do not forget to include a global feedback, including (preferably) even the output reconstruction filter. Having a good open-loop linear modulator is great, but useless in the end.

EDIT: * Linear voltage-to-PWM modulator by itself is useless, as the output linearity will suffer severely by adding a power stage, for example by adding a dead time and non-equal channel paths or Ton/Toff times of transistors.
« Last Edit: January 02, 2020, 07:33:21 pm by Yansi »
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #13 on: January 02, 2020, 07:58:53 pm »
Thing is, PWM based class D amplifiers suck big time and I wouldn't even bother trying. *

PDM on the other hand, is a different matter.

And do not forget to include a global feedback, including (preferably) even the output reconstruction filter. Having a good open-loop linear modulator is great, but useless in the end.

EDIT: * Linear voltage-to-PWM modulator by itself is useless, as the output linearity will suffer severely by adding a power stage, for example by adding a dead time and non-equal channel paths or Ton/Toff times of transistors.

Yes but a linear voltage-to-PWM modulator does not introduce a quantization noise like in PDM so in principle much lower clock frequencies can be used ?  Actually I also tried a PDM version of the transmitter in my li-fi project with clocked 1-bit sigma-delta and I had to increase the frequency by a factor of 10 to get rid of the noise.  I would say PDM can only be better if a clever noise shaping is done digitally.

Edit:
I just found this article: https://www.eetimes.com/class-d-audio-amplifiers-what-why-and-how-part-5/#
« Last Edit: January 02, 2020, 08:01:26 pm by pwlps »
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3930
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Self-Oscillating Analog-to-PWM Converter for Class-D
« Reply #14 on: January 02, 2020, 08:08:22 pm »
Does not work like that I think.  Quantization noise will still be there in form of a jitter (timing issues especially the power stage. You can't make infinitely short pulse, neither any longer than the PWM period is set.

PWM makes for an inefficient modulation, usually requiring more transitions for describing the same signal. Also, signal tracking will be worse than with a PDM.

Most class D amps are constructed as somewhere in between fixed frequency PWM and fixed clock gated PDM. 

The simplest and most scalable form of modulator is with the second order integration (see for example IRS2092). This type of modulator is very reliable and gives very good results.  Straight PWM won't touch it.

//EDIT: Regarding your article you've found:
Quote
"An alternative to PWM is pulse-density modulation (PDM), in which the number of pulses in a given time window is proportional to the average value of the input audio signal. Individual pulse widths cannot be arbitrary as in PWM, but are instead “quantized” to multiples of the modulator clock period. 1 bit sigma-delta modulation is a form of PDM."

PDM does not need to have any clock and does not need to be quantized to a modulator clock.  Again, see the second order integration loop, like the IRS2092 has.  The frequency changes with the signal, as required.

It is similar to comparing PWM (SVPWM) modulation in a motor drive to a DTC, with the latter one being superior in the fast signal tracking ability.
« Last Edit: January 02, 2020, 08:12:01 pm by Yansi »
 
The following users thanked this post: pwlps


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf