# Relation between THD and spectral leakage or number of samples

So I'm studying data acquisition and on the lab had to perform an experiment involving sampling a sinusoidal signal of frequency 1100 Hz, 70 samples and sampling frequency 22000 Hz.

Now I can clearly see that I'll have spectral leakage in this case because 1100/(22000/70) is not a natural number. Nevertheless I was able to compute a frequency of 1173 .69 Hz which corresponds to an error of 6.67% using weighed frequency method. I think this a pretty decent result. What is intriguing me is the total harmonic distortion which is evaluated at -14.75 dB. Is this a low value? What exactly is THD measuring here? Can someone help interpret the THD meaning? Thank you!

• Can you add units to your numbers please. I think you mean the sine wave was 1100 Hz and that i was sampled at 22 kHz but I'm unsure about the 70 number and how it is used in your calculation. – Andy aka Nov 7 '19 at 13:19
• Done, 70 is adimensional, it is just the number of samples – Granger Obliviate Nov 7 '19 at 13:22
• If you are sampling 1100 Hz at 22 kHz then there are exactly 20 samples per cycle and this should produce zero error in the computed frequency and a massive negative number in THD. I don't know where you went wrong. – Andy aka Nov 7 '19 at 13:26
• It's because of the number of samples, it causes spectral leakage – Granger Obliviate Nov 7 '19 at 13:29
• With 70 samples / cycle, your frequency resolution is 1.4% How did you get 6.7% error? THD is usually in % or RMS ratio of all harmonics to fundamental so -15dB not low. << -60 dB might be low for signal quality. – Tony Stewart Sunnyskyguy EE75 Nov 7 '19 at 15:07