Self-Oscillating Analog-to-PWM Converter for Class-D - Page 1
Forum section: electronics / projects

author: Evan.Cornell
author_rank: Regular Contributor
timestamp: December 31, 2019, 02:43:46 pm
content: Can anyone explain to me how the attached circuit works? This comes fromhttps://www.psemi.com/pdf/app_notes/an72.pdfI am interested in how to set PWM frequency, how component selection affects accuracy of the PWM pulse width (and thus, measurable distortion), etc.

author: iMo
author_rank: Super Contributor
timestamp: December 31, 2019, 03:47:16 pm
content: 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.

author: Evan.Cornell
author_rank: Regular Contributor
timestamp: December 31, 2019, 03:58:35 pm
content: 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?

author: iMo
author_rank: Super Contributor
timestamp: December 31, 2019, 04:08:33 pm
content: 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..

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 31, 2019, 04:14:12 pm
content: 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.htmlI 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.

author: Evan.Cornell
author_rank: Regular Contributor
timestamp: December 31, 2019, 06:32:55 pm
content: 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?

author: Evan.Cornell
author_rank: Regular Contributor
timestamp: January 02, 2020, 03:44:30 pm
content: Thoughts on simulation FFT noise floor level, anyone?

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 02, 2020, 04:04:36 pm
content: Quote from: Evan.Cornell on December 31, 2019, 06:32:55 pmDid 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.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 02, 2020, 04:34:31 pm
content: 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.)

author: Evan.Cornell
author_rank: Regular Contributor
timestamp: January 02, 2020, 05:00:10 pm
content: 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?

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 02, 2020, 05:15:47 pm
content: Quote from: Evan.Cornell on January 02, 2020, 05:00:10 pmA (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.

author: pwlps
author_rank: Frequent Contributor
timestamp: January 02, 2020, 06:52:33 pm
content: 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/#msg2282771This 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.

author: Yansi
author_rank: Super Contributor
timestamp: January 02, 2020, 07:23:45 pm
content: 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.

author: pwlps
author_rank: Frequent Contributor
timestamp: January 02, 2020, 07:58:53 pm
content: Quote from: Yansi on January 02, 2020, 07:23:45 pmYes 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/#

author: Yansi
author_rank: Super Contributor
timestamp: January 02, 2020, 08:08:22 pm
content: 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:QuotePDM 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.