[sdiy] PWM audio distortion explanation

Richie Burnett rburnett at richieburnett.co.uk
Tue Jun 28 18:46:23 CEST 2016

When you vary the duty ratio of a pulse train you are modulating the amplitudes of all of the harmonic components in its spectrum as shown by that graph with all the different coloured sine waves on it. (That's why oscillator PWM sounds so interesting on an analogue synthesiser.)

Try putting an AM radio receiver tuned to the PWM carrier frequency (or one of its harmonics) next to your next PWM audio experiment if you're not convinced :-)  You'll hear distorted audio because the modulation it's not a linear relationship. 


Sent from my Xperia SP on O2

---- Tom Wiltshire wrote ----

>That's very interesting and right up my street, but unfortunately I don't get past the first sentence:
>"At its most basic level, PWM is amplitude modulation (AM) of a carrier frequency (the PWM frequency)."
>Why? PWM doesn't change the amplitude at all, as far as I can see. The *average* amplitude, maybe, but that's not the same thing, and it seems like a bit of a jump from this initial claim to then go "…so then this maths applies!". Does it? Why?
>Amplitude modulation of pulse trains has some other name I'm sure (oh, look! It does: http://en.wikipedia.org/wiki/Pulse-amplitude_modulation )
>The width of the pulses is what's being modulated here, not the amplitude. If they're going to convince me that those two are equivalent, I want a bit of explanation of how that works.
>On 28 Jun 2016, at 13:21, rburnett at richieburnett.co.uk wrote:
>> Stumbled upon this good explanation of why simple PWM inherently distorts audio reproduction:
>> http://www.openmusiclabs.com/learning/digital/pwm-dac/pwm-distortion-analysis/
>> Might make interesting reading for anyone who's used a PIC or Arduino to generate audio waveforms using PWM, and been left scratching their head for an explanation for unexpected distortion products.
>> -Richie,
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at dropmix.xs4all.nl
>> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>Synth-diy mailing list
>Synth-diy at dropmix.xs4all.nl

More information about the Synth-diy mailing list