Hi, something that's bothered me for a long time is that some authors define THD in terms of a power ratio (power of the higher harmonics divided by the power of the fundemental) and other authors define THD in terms of an amplitude ratio (square root of the above definition).

Of course if you express it in dB then it makes no difference, but if you express it as a percentage then it's makes a huge difference depending on what definition is used? So what's considered the most correct definition when expressing as a percentage, is it a power ratio (as in "sum of V_n^2 divide V_1^2") or is it the square root of this?

BTW, by comparison of the dB and the percentage figures reported by RMAA (rightmark audio analyser) I'm nearly certain that RMAA uses the "amplitude ratio" definition rather than the "power ratio" definition. Is this pretty much universal for audio related THD% figures or are there people using power-ratio for THD% figured as well?

For a good example of the conflicting definitions take a look at the following link. This one actually has the two conflicting definitions listed one straight after the other and wrongly claims that they are "equivalent". Apparently that author thinks that a quantity and it's square-root are "equivalent", how brain-dead is that???

OK, here's a simple question. Say I have an original signal which is a 1 volt sine wave, I pass the signal through a device and it comes out with the 1 volt original signal plus an added 0.1 volts third harmonic. What's the THD, is it 10% or is it 1% ?

For a good example of the conflicting definitions take a look at the following link. This one actually has the two conflicting definitions listed one straight after the other and wrongly claims that they are "equivalent". Apparently that author thinks that a quantity and it's square-root are "equivalent", how brain-dead is that???

Yes and I added the paragraph beginning "Other definitions may be used. ..." on that page.

I still have the problem that for every site/book/author/etc that defines THD as a power ratio you can find another that defines it as the square-root of that (ie, as an amplitude ratio). I personally believe that the amplitude ratio is the "most correct" definition, and the one I expect when I read THD spec's. As just one example I know for certain that the well respected RMAA (rightmark audio analyser) uses the amplitude definition. This is not just a moot point, it has a huge impact on the numerical values of THD. For example a THD or -80dB is comparable with about *about 0.01% THD in RMAA, but if a power ratio was used it would have to be changed to 0.000001%, cant you see how seriously crazy and wrong that is!

So I'm actually in dispute with wikipedia's current definition but I resisted changing it completely and instead just added the extra paragraph about alternate definitions. I actually posted here to try and gain some more evidence about what definition is expected in the audio community when THD percentage figures are thrown around. I actually looking for more evidence before I go and edit the primary definition of THD on wikipedia and I would serious appreciate comment from anyone else here regarding what they think.

So back to the above simple problem, is the THD equal to 10% or is it 1% ? Personally I believe it is 10%, but by wikipedia's definition it is only 1%.

Some please give an opinion here. What definition to you normally expect for THD as percent.

It's been rather awhile since I had any engineering classes... Seems to me the discussion here is not about the definition of THD, but rather how it is expressed. Off hand I cannot recall any time where the context left any ambiguity. I see no real problem here.

It's been rather awhile since I had any engineering classes... Seems to me the discussion here is not about the definition of THD, but rather how it is expressed. Off hand I cannot recall any time where the context left any ambiguity. I see no real problem here.

The problem is that some text books define THD as an ampletude ratio while others define it as a power ratio. The latter is the square of the former so it makes a bloody big difference if expressed as a percent. It leaves a big ambiguity, for example every time I read a THD spec like "1% THD at 10W RMS" I dont know if that 1% coressponds to 40dB (ampletude ratio) or 20dB (power ratio). Since (as woody clarified) audio THD specs seem to always use ampletude ratio (0.1% is equiv to 60dB and not 30dB) then I wish this definition was made standard and that people would stop using the conflicting power ratio definition like on wikipedia.

Anyway the main purpose of this thread was to clarify which definition is commonly used (or assumed) when reading audio THD specification. I think we've now established that it is an ampletude ratio and not a power ratio. I think I'll go edit wikipedia again.

...Anyway the main purpose of this thread was to clarify which definition is commonly used (or assumed) when reading audio THD specification. I think we've now established that it is an ampletude ratio and not a power ratio. I think I'll go edit wikipedia again.

Make sure you use "amplitude" and not "ampletude".

By the way I think you nailed it: it's an amplitude ratio. Why? Because it's an obvious, simple-to-take measurement, dating back from when people didn't have a spectrum analyzer.

Nowadays when analyzing distortion in an amplifier, people prefer to use a spectrum analyzer that distinguishes noise and harmonics. But I don't think a spectrum analyzer snapshot would be very significant for most consumers, so the THD figures are still popular and likely to remain so in the future.

Probably the most widely used and respected audio measurement systems manufacturer is Audio Precision.In one of their tech notes is stated:

"Most audio Total Harmonic Distortion (THD) measurement systems are in fact Total Harmonic Distortion plus Noise (THD+N) analyzers. They operate by removing the fundamental from the test signal with a sharply tuned band reject or “notch” filter and measuring everything that remains. The amplitude of this “residual” is compared to the amplitude of the fundamental and the result is expressed as a percentage or dB figure."

AP might not have the final word on definitions, but they sure know what they are talking about

"Most audio Total Harmonic Distortion (THD) measurement systems are in fact Total Harmonic Distortion plus Noise (THD+N) analyzers. They operate by removing the fundamental from the test signal with a sharply tuned band reject or “notch” filter and measuring everything that remains. The amplitude of this “residual” is compared to the amplitude of the fundamental and the result is expressed as a percentage or dB figure."

AP might not have the final word on definitions, but they sure know what they are talking about

"Total Harmonic Distortion (THD): A measure of signal distortion which assesses the energy that occurs on harmonics of the original signal. It is specified as a percentage of the signal amplitude.

As an example, if a 12kHz signal is applied to the input, THD would look at energy on the output occurring at 24kHz, 36kHz, 48kHz, etc. and compare it to the energy occurring at 12kHz."

Yes another definition that is mixing up amplitude and power. That's what made me start this topic, it's really annoying to see all the different messed up definitions. There should just be the one definition.

No, for a resistive load the power ratio is always equal to the square of the amplitude ratio. This is true for sinusoids and other wave shapes as well.

Please give me more time to focus the whole question. Also I can check witch definition is used by some popular electronic CAD.

btw, when you talk about "resistive load" you are referring to a linear system, while THD is in essence a measure of the non-linearity of a system. The ratio between the squares of amplitudes of a square wave and a sinusoid it is not equal to the ratio of their power... think what can happens if their amplitude is equal!This is the reason because I don't understand the sense of using "amplitudes". However, there is a relationship between the square of the amplitudes of the harmonics and the power of the signal, and this can be used to define the THD using the amplitude of the harmonics... but I'm getting confused, I think I need to go over the Parseval theorem.

No, for a resistive load the power ratio is always equal to the square of the amplitude ratio. This is true for sinusoids and other wave shapes as well.

Please give me more time to focus the whole question. Also I can check witch definition is used by some popular electronic CAD.

btw, when you talk about "resistive load" you are referring to a linear system, while THD is in essence a measure of the non-linearity of a system.

A "resistive load" is a linear system, but a linear system is not necessarily resisitive. Loads with capacitive and inductive components are linear too. Active components such as transistors can introduce nonlinearity. In a linear system, if input X1(t) gives output Y1(t), and input X2(t) gives output Y2(t), then input A*X1(t) + B* X2(t) gives output A*Y1(t) + B*Y2(t); that is, output scales directly with input and superposition holds.

In AC terms, that means a pure sinusoidal input yields a pure sinusoidal output of the same frequency. In a resistive load, the phase will be the same. With a reactive component (capacitor or inductor), the phase will shift and the circuit will react differently to different frequencies, but it will still be linear.

However, THD is indeed a measure of nonlinearity.

QUOTE (uart @ Jan 1 2007, 03:13)

The ratio between the squares of amplitudes of a square wave and a sinusoid it is not equal to the ratio of their power... think what can happens if their amplitude is equal!

This is the reason because I don't understand the sense of using "amplitudes". However, there is a relationship between the square of the amplitudes of the harmonics and the power of the signal, and this can be used to define the THD using the amplitude of the harmonics... but I'm getting confused, I think I need to go over the Parseval theorem.

Wikipedia tells you that the most common way to calculate THD is in terms of a power ratio, but that when calculating % THD for audio applications it's more common to use amplitude ratio. I guess that's true. Stupid conventions. Anyway, if you express it in decibels, it's the same. Why? Suppose again you have amplitudes A and B. There are different formulas for decibels in amplitude ratios and power ratios. For amplitude ratio A/B, dB = 20log(A/B) (where log is log base 10). But for a power ratio, it is 10log(P1/P2). This takes care of the square. See it? 10log(P1/P2) = 10log(A^2/B^2) = 10log((A/B)^2) = 10*2log(A/B) = 20log(A/B).

All detailed definitions of the THD I saw on Internet (but Wikipedia) define the THD as the square root of the ratio between the power of the other harmonics to the fundamental. I looked for some detailed definitions using "THD definition parseval theorem" in google.

For a voltage signal, for instance, the ratio of the squares of the RMS voltages is equivalent to the power ratio:

This is correct, and it is equal to the definition given by wikipedia that doesn't use the square root, but I don't understand why the need of using RMS values, since we are using harmonics (sinusoids) and their RMS is Vnmax/sqrt(2), so the ratio sum(Vnrms^2)/V1rms is obliviously equal to sum(Vnmax^2)/V1max^2

Also, 2 documents mentioned by wikipedia define THD using the square root. The third (rane), is unclear to me:"Total harmonic distortion (THD) is then defined as the ratio of the rms voltage of the harmonics to that of the fundamental component."

What does exactly it mean "the ratio of the rms voltage of the harmonics"? maybe it is not sum(Vnrms), butsqrt(sum(Vnmax^2)) that is the rms of the harmonics, using the mathematical definition of root mean square!

After this research I think I have few doubts about THD ^^. I vote for the square root of the ratio of powers. The first definition at wikipedia is probably wrong.

What does exactly it mean "the ratio of the rms voltage of the harmonics"? maybe it is not sum(Vnrms), butsqrt(sum(Vnmax^2)) that is the rms of the harmonics, using the mathematical definition of root mean square!

The Data Conversion Handbook (Analog Devices, Inc., ed. Walt Kester) uses terms less loosely. It defines THD as "the ratio of the rms value of the fundamental signal to the mean value of the root-sum-square of its harmonics (generally, only the first five are significant). THD of an ADC is also generally specified with the input signal close to full-scale, although it can be specified at any level." (They probably mean to invert that ratio, though.) The source that said "the ratio of the rms voltage of the harmonics" was perhaps being a little imprecise. So the Data Conversion Handbook agrees with the conclusion you've arrived at and the equation image you linked.

QUOTE (Mercurio @ Jan 1 2007, 15:49)

After this research I think I have few doubts about THD ^^. I vote for the square root of the ratio of powers. The first definition at wikipedia is probably wrong.

My conclusion would be that the equation you linked is the correct way to compute THD based on amplitude, and that the amplitude-based specification seems to be what you're most likely to find, particularly in audio applications, and the way of calculating it that's most likely to be understood.

However, I don't know if I would say the first definition on wikipedia is wrong; I don't see any reason to doubt their assertion that some people use a THD based on power ratio rather than amplitude ratio and that "It is unfortunate that these two conflicting definitions of THD (one as a power ratio and the other as an amplitude ratio) are both in common usage." It's possible that they may overstate the number of people who use the power ratio; I don't really know.

However, I don't know if I would say the first definition on wikipedia is wrong; I don't see any reason to doubt their assertion that some people use a THD based on power ratio rather than amplitude ratio and that "It is unfortunate that these two conflicting definitions of THD (one as a power ratio and the other as an amplitude ratio) are both in common usage." It's possible that they may overstate the number of people who use the power ratio; I don't really know.

I simply didn't found any place, but wikipedia, where the definition doesn't use the square root. I found also that the THD% is obliviously defined as 100*THD

btw I think I must clarify: it is the square root of a ratio of (average) powers because the relationship that exists between the average power and the amplitude of the harmonics comes from a not so trivial theory.

Also I think it is much more simple to measure the average power of a signal after using a notch filter on the fundamental, than measuring all the single harmonics, while simulators certainly prefer to other way, since they already know the amplitude of each harmonic.

btw, when you talk about "resistive load" you are referring to a linear system, while THD is in essence a measure of the non-linearity of a system.

Huh? The system (eg amplifier) can be non-linear and the load still be linear, so stop making "red herring" distractions. A resistive load is simplest because it means that the THD in the voltage and current are both equal. Consider for example a load with series inductance, it's still linear and no problems to analyse but note that the THD in the current waveform will now be lower than the THD in the voltage waveform.

QUOTE

btw I think I must clarify: it is the square root of a ratio of (average) powers because the relationship that exists between the average power and the amplitude of the harmonics comes from a not so trivial theory.

Well it's well known and well understood by me, and I think it should be well understood by anyone who has studied THD calculations and also by anyone prepared to argue this point here. It's a very fundamental property of sinusoids of integer frequency multiple (that is, harmonics) that the mean square (MS) of the sum is equal to the sum of the mean squares. It is due to the "orthogonality" of these harmonics under integration over a period.

QUOTE

I simply didn't found any place, but wikipedia, where the definition doesn't use the square root. I found also that the THD% is obliviously defined as 100*THD

Well I've seen several text books which define it (as per wikipedia) without the square-root. Also when so many sources define it as a "power ratio" then I believe it implies a ratio of mean squares rather than a ratio of root mean squares.

QUOTE

This is correct, and it is equal to the definition given by wikipedia that doesn't use the square root, but I don't understand why the need of using RMS values, since we are using harmonics (sinusoids) and their RMS is Vnmax/sqrt(2), so the ratio sum(Vnrms^2)/V1rms is obliviously equal to sum(Vnmax^2)/V1max^2

Exactly. The ratio of peak/peak and RMS/RMS is the same. It's not only the same for sinusoids it's true for any wave-shape. Again it's a very basic mathematical property (linearity of integration), so again you are just throwing up distractions. BTW this is precisely why I referred to this originally as an "amplitude ratio", because the ratio of amplitudes is the same as the ratio of RMS values. So please, no more distractions from the point, I'm simply interested in whether or not the square-root should be used in the definition. I believe it should be used, (which makes THD a ratio of RMS quantities - same thing as a ratio of amplitudes) while others seem to think that it should be omitted, (which makes THD a ratio of Mean Squared quantities - same thing as a ratio of power). Got it!

Anyway since there seems to have been some confusion about what I'm referring to let me summarize one last time. The thing that is bothering me is that some authors define THD as a ratio of mean square values and other authors define it as a ratio of root mean square values. I believe there should just be one unambiguous definition and that it should be the ratio of RMS values, as that's what all audio THD specs I've ever read appear to use.

Due purely to history, it's either expressed in dB, just like SNR usually is, or it's expressed as the amplitude ratio, which can be calculated via 10^(db/20) just like you'd expect.

If it's percent, you multiply the amplitude ratio by 100, to make it percentage.

So, 1% -> 40dB, and so on.

Look I've got no problems with that, it's how I've always calcuated THD. But I do have a problem with people referring to it as a power ratio (and not including the square-root in the formula) when, as you've pointed out, it (the sqrt) clearly is required to give correct perentage figures.

So the Wikipedia definition is wrong as are numerous other texts and sources -YOU NEED THE SQUARE ROOT SIGN IN THE DEFINITION OTHERWISE 1% IS NOT 40dB IT'S ONLY 20dB. CAN'T ANYBODY BUT MYSELF SEE THAT!!!!!

Look I've got no problems with that, it's how I've always calcuated THD. But I do have a problem with people referring to it as a power ratio (and not including the square-root in the formula) when, as you've pointed out, it (the sqrt) clearly is required to give correct perentage figures.

So the Wikipedia definition is wrong as are numerous other texts and sources -YOU NEED THE SQUARE ROOT SIGN IN THE DEFINITION OTHERWISE 1% IS NOT 40dB IT'S ONLY 20dB. CAN'T ANYBODY BUT MYSELF SEE THAT!!!!!

Yup I agree. I think this is the only problem. Also wikipedia should give to a casual reader an easy way to understand the meaning of the number he read on the spec of his amplifier. It is not a conceptual problem about the THD, it never was.

p.s. about resistive load and linear system there was some misunderstanding because It isn't easy on a forum to know what is implicit. This your statement confused me "No, for a resistive load the power ratio is always equal to the square of the amplitude ratio. This is true for sinusoids and other wave shapes as well."