# Have we decided on a definition for THD ?

Discussion in 'Electronic Design' started by Adam S, Nov 21, 2006.

1. ### Adam SGuest

I was writing a little program that needs to calculate Total Harmonic
Distortion of a waveform. When I go to refresh my memory of what the
heck THD is, I get conflicting explanations. From what I can find on the
web there are two variants. One definition expresses THD as ratio of
_power_ , and other in ratio of _RMS_ volts. Since power is proportional
to RMS volts squared the two definitions are obviously not equal. Last
time I checked, x != x^2.

These web pages offer the power ratio explanation:
http://en.wikipedia.org/wiki/Total_harmonic_distortion
http://www.sweetwater.com/expert-center/glossary/t--THD

While these web pages offer the RMS ratio explanation:
http://www.vk1od.net/SquareWave/THD.htm
http://www.tonmeister.ca/main/textbook/node549.html
http://www.birds-eye.net/definition/acronym.cgi?what+is+THD=Total+Harmonic+Distortion&id=1153665296

So which is it guys ?

2. ### EeyoreGuest

When expressed as dB it makes no difference of course.

In fact, when expressed as dB it's not tricky to see why some 'old chestnuts' like accepting 0.1% THD
as inaudible are so wrong ( it's only -60dB ).

I go by the voltage method for the percentage value and all the test gear I know does too.

Graham

3. ### EeyoreGuest

http://www.rane.com/note145.html

It's *voltage*.

Graham

4. ### Phil AllisonGuest

** Where THD is expressed as a percentage, the ratio is in terms of
voltages.

Commercial THD meters do NOT use "true rms" meters, but average responding
ones calibrated to give the rms value for a sine wave = 1.1111 times the
average rectified value. The fundamental or test frequency is removed from
the signal under test and any residual signal measured, including noise, in
the range up to about 100 kHz.

The sites you quoted show how to convert a spectrum analysis table into a
THD figure in -dB or percentage.

There is no confusion anywhere except YOUR wrong interpretation.

........ Phil

6. ### EeyoreGuest

I've temporarily edited it.

Note that power and voltage ratios don't give the same dB value. 1/2 power = -3dB but 1/2 voltage =
-6dB.

There's the clue as to why it's wrong to use power ratios for THD..

Graham

7. ### EeyoreGuest

I've done something temporary.

Graham

8. ### Adam SGuest

power is proportional to RMS voltage squared.
so to get a ratio of power between two signals, a and , b, you sum the
square of the RMS values in a, and divide by sum of the square of the
RMS values in b.

i.e
power_ratio = Va1^2 + Va2^2 +... / Vb1^2 + Vb2^2 + ...

where Va1, Va2,.. is RMS level of each component in signal,a , and
Vb1,Vb2,... is RMS level of each component in signal b.

To get ratio of RMS voltages between signals a, and b.

RMS_ratio = sqrt( Va1^2 + Va2^2 +... ) / sqrt(Vb1^2 + Vb2^2 +...)

So you see this has is nothing to do about interpretation. They are
clearly not the same. Put simply , power_ratio = RMS_ratio^2

9. ### RobertGuest

As long as the Impedances are the same where the two Voltages are being
measured the two methods are the same.

Robert

10. ### Phil AllisonGuest

** The confusion is all in your silly interpretation.

Of course power ratios and voltage ratios produce different numbers, no-one
even hinted otherwise.

Where THD is expressed as a percentage, the ratio is in terms of voltages -
this is a *decades old* convention.

Where THD is expressed in -dBs, the ratio is that of two powers.

1% = -40dB

0.1 % = - 60 dB

0.01% = -80 dB

Capice ?

......... Phil

11. ### Phil AllisonGuest

"Robert"

** The time honoured convention is to ONLY quote THD of a sine wave signal
as a percentage when the ratio is that of two voltages.

It must never be quoted as the percentage ratio of two powers - lest you
be considered as yet another snake oil con artist quoting grossly inflated
numbers.

........ Phil

12. ### EeyoreGuest

What *2 impedances* are you rambling on about ?

Voltage has nothing to do with impedance.

Graham

13. ### joseph2kGuest

Neither one. The actual definition _is_ in terms of power (correctly).
Typical measurement is usually done in terms of voltage. The key idea is,
that it is not in terms of absolute volts / watts / amperes / VA but in the
difference in spectral content of harmonics before and after. Then all of
the ratios are based on the the level of the fundamental at the output for
the output measurement, and on the level of harmonics relative the
fundamental at the input. Volts, Amperes, Watts and all that factor out.

14. ### Phil AllisonGuest

"joseph2k"

** Will someone out there track this monumental FUCKING MORON down
to whatever vermin infested shit hole he is lurking in and SHOOT the
VILE **** in the head ???

......... Phil

15. ### EeyoreGuest

Whose definition ?

Typical ? ALL THD measurements are done this way.

No they don't. Percentages never do.

Graham

16. ### PeteSGuest

I think he's referring to the fact that 20log10 V2/V1 is equivalent to
10log10 P2/P1 provided the resistance (not impedance) that V2 and V1
are developed across *are equal*.

It's a pretty straightforward definition.

Note - the derivation below is simple and if you're offended by
simplicity, then skip it

dB = 10log10 P2/P1, so dB = 10log10 (V2^2/R2) / (V1^2/R1)

doing a little transposition
dB = 10log10 (V2^2R1)/(V1^2R2). If R1 and R2 are equal, then they
cancel, leaving

dB = 10log10 V2^2 / V1^2, -> 10log10 (V2/V1)^2

As log x^2 = 2 log x, then
dB = 20log10 V2/V1(provided the resistances were equal).

Cheers

PeteS

17. ### Michael A. TerrellGuest

Pathetic loser. Begging for someone to do what you don't have the
balls to do. No wonder you have no friends. In civilized nations you
would be charged with truing to hire a hit man, and spend the rest of
your useless life in prison, till your cell mate got fed you and killed
you to get some peace and quiet. On the other hand, you wouldn't have
to walk the streets looking for men, anymore.

--
Service to my country? Been there, Done that, and I've got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida

18. ### EeyoreGuest

They have cannibalism in prisons now ?

Graham

19. ### JamieGuest

Yes, Red meat on fridays..!