Literature recommendation for DSP controlled Class D audio - Page 1
Forum section: electronics / projects

author: Yansi
author_rank: Super Contributor
timestamp: January 12, 2016, 12:04:04 am
content: Hello!Would you please recommend me a suitable literature or application note for DSP controlled Class D audio amp?I know, there are thousands of papers out there, but I am looking mostly for this:let's assume we use a PWM modulation scheme (easiest in any signal controller). If we want switching frequency high, we get only low bit resolution. Now we can look at it as an oversampling, as the PWM frequency can be a multiple of the audio sampling frequency.My intuition says, that there has to be a way, how to utilize the oversampling to increase bit depth of the modulation. I am looking for a description of such algorithm, that could be used. (Considering I haven't made up a nonsense). Unfortunatelly I haven't had much success finding suitable PWM Class D with DSP literature. Maybe I don't know the right keyword to look it up.Is something like I want possible, or is it a nonsense?Thank you for advice,Yan

author: diyaudio
author_rank: Frequent Contributor
timestamp: January 12, 2016, 07:43:40 am
content: Quote from: Yansi on January 12, 2016, 12:04:04 amThere is no need for excessively high switching frequencies (from an audio point of view nothing at all), a class-d amplifier needs to switch the modulator (self oscillating or clocked) at least twice the Nyquist Theorem in order to reconstruct the entire audio spectrum, however its generally sampled at 8 times higher, 44Khz * 8 = 352KHz, this is to avoid aliasing and over come switching losses in the system and mostly to accommodate the demodulator output filter i.e based on the material of the core, and reduce turn counts for the ouput coil most just enough turns to fill the entire core with a number of full turns (depending on the material)There is no other audible benefit using high switching frequencies, only from a electrical design point of view.You better off studying and mastering Analog Modulators and appreciating how analogue self oscillating modulators automatically compensate with power supply variations and different loads. once you have mastered Analog Modulators then start with DSP its near impossible to do it in reverse.

author: Kalvin
author_rank: Super Contributor
timestamp: January 12, 2016, 11:26:01 am
content: You may find this helpful to get started:http://www.analog.com/library/analogDialogue/archives/40-06/class_d.pdf- Pulse-density modulation (PDM) is preferred over PWM- 1-bit sigma-delta modulation is a form of PDM- Sigma-delta modulation is essentially a form of oversamplingHere is one particular app note with the all magic keywords"PWM and Class-D Amplifiers with ADSP-BF535 Blackfin® Processors"http://www.analog.com/media/en/technical-documentation/application-notes/EE242Rev2Jan1106.pdf

author: Yansi
author_rank: Super Contributor
timestamp: January 13, 2016, 09:09:48 am
content: Hard to guess, as without much experience wih these, one cannot estimate such figures. Limited by computational power, just common mixed signal microcontroller with some basic DSP instructions (SIMD mostly) and FPU. Considering some application running on the background, so not much computational power left.I know, no exact requirements, I'd just want to toy around with it a bit.PWM is less computation hungry, than software pin toggling (PDM) as I've seen in some appnotes. But rather interesting idea would be to use an SPI peripheral to produce the 1-bit stream :-)

author: Kalvin
author_rank: Super Contributor
timestamp: January 13, 2016, 10:34:59 am
content: Here is one design using attiny45:http://rdimitrov.twistedsanity.net/blog/show.php?entry=Microcontroller%20Class%20D%20Amplifier,%20Rev2Here is another one:http://www.georgegardner.info/electronics/class-d-avr.html

author: diyaudio
author_rank: Frequent Contributor
timestamp: January 13, 2016, 11:12:04 am
content: Quote from: Kalvin on January 13, 2016, 10:34:59 ambah! IMHOI've seen this before, sadly it doesn't even cut it, in fact its based on a 20 year olf class-d design concept, with the integrator/sampler part substituted with "modern" microcontroller design using the ADC and PWM section (limited to a 10-bit ADC resolution).12V so the output is limited to 12^2/4(ohms) = 36 RMS, however the output power is not the aim nor is THD here.. so we leave it at that. (be warned though) if you decide to change the specifications example the output power, (say even to 50watts) all the critical aspects currently being ignored to switching designing will come into play at high power, like snubbing, di/dt taming at the gates, parasitics, output load variation and how the system reacts to it, closed loop design, control theory "compensation"...And its all Analogue Electronics...it feels bad to even call that a class-d amplifier, but technically it is "switching" and it does "amplify"

author: Kalvin
author_rank: Super Contributor
timestamp: January 13, 2016, 11:42:25 am
content: It is not definitely high quality audio, but it can be used as an example that even a small, cheap and very simple microcontroller can be used as a crude class D amplifier without complex digital signal processing algorithms or specific DSP instruction set.