[sdiy] Measuring THD of a sine wave

Ben Bradley ben.pi.bradley at gmail.com
Sat Nov 12 20:08:56 CET 2022


As you may have discovered from reading some of the material offered,
there are many ways to measure distortion. The AP equipment is surely
great stuff (though I've never used or even seen it in real life), but
it's expensive and likely overkill for what most of us need for
synths.

Surely there's some freeware audio software that can record (like
Audacity) a signal and/or do the filtering and calculations to get
THD. Wikipedia has the "exact formula" for THDin its article:
https://en.wikipedia.org/wiki/Total_harmonic_distortion

What exactly are you wanting to do? Make a sine output on a VCO?
There are triangle-to-sine converter schematics that work "moderately"
well. If it's for a LFO, a twin-T or phase-shift sine oscillator with
a variable resistor may be good enough.

You should be aware of something not widely discussed with THD in
relation to audio, that the audible amount of distortion is often NOT
proportional to the THD number. When present at the same levels,
Higher harmonics (say, 5th and above) are much more audible than lower
ones. This is due to the ear's masking effect - the 2nh harmonic is
only one octave away from the fundamental, and it has to be a
substantial proportion of the fundamental level to be audible while
the fundamental is sounding. THD may be a good "technical"
specification, but don't take it as a good indicator of one thing
sounding better than another.

Here's a long (9,900 posts) discussion of designing a low distortion
oscillator (though fixed frequency and not voltage controlled), and
many measurement techniques are discussed. The whole diyaudio site is
good for info, discussions (and opinions!) on this type of thing:
https://www.diyaudio.com/community/threads/low-distortion-audio-range-oscillator.205304/

On Fri, 11 Nov 2022 at 19:42, Tiago Ventura via Synth-diy
<synth-diy at synth-diy.org> wrote:
>
> Greetings folks!
>
> The technical literature in general, *whenever* it bumps into the
> topic of sine wave generation techniques the difficulty of generating
> such a signal is always mentioned. And then, several techniques and
> circuits are presented and analyzed. The THD% of these circuits are
> mentioned for comparison purposes.
>
> How the heck are these distortion levels measured or calculated in practice?
> What are the main techniques and procedures applied in order to
> measure the total harmonic distortion (THD%) of a given sine wave?
>
> The idea of using a second sine wave as a comparative reference of
> what is "pure" is pretty obvious, but what kind of source would be
> able to present an acceptable "purity" for this purpose? (a digital
> source sounds ridiculous for this but I can't think about anything
> else!)
>
> Remembering that it is essential to also calculate the accuracy of
> this measurement. Are there other alternative techniques for making
> such a measurement? Is there anything available in the technical
> literature exploring this subject?
>
> Any thoughts/comments/suggestions would be greatly appreciated.
>
> Tiago Ventura
>
> Greetings from Porto Alegre/Brazil
> -30.03376474999071, -51.238242916392814
> https://www.instagram.com/psychoincorp/
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
> Selling or trading? Use marketplace at synth-diy.org


More information about the Synth-diy mailing list