THD question REW 5.20 Beta 29

Chuck Zwicky

New Member
Thread Starter
Joined
Sep 8, 2017
Messages
42
Looking at the Distortion tab of a sweep I made on a piece of outboard gear, I can see the distortion is rising significantly with frequency, normal due to the nature of the device, but the number displayed for total THD seems odd, the highest "THD H2..9" is 24dB below the fundamental, but the number displayed in the legend is 550.2%
According to my calculations the figure should be around 6.3%THD

Is there a preference I have set incorrectly somewhere, or it this a bug?
Screen Shot 2019-12-01 at 11.30.50.jpg
 
Last edited:

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
I suspect the cause is that the level of the fundamental at the harmonic frequency is being used as the reference (sensible for responses that are not flat) and since the response drops off very sharply above 20k the level of the fundamental is very low at the frequencies of the 3rd and 4th harmonics.
 

Chuck Zwicky

New Member
Thread Starter
Joined
Sep 8, 2017
Messages
42
I suspect the cause is that the level of the fundamental at the harmonic frequency is being used as the reference (sensible for responses that are not flat) and since the response drops off very sharply above 20k the level of the fundamental is very low at the frequencies of the 3rd and 4th harmonics.

Thank you for the reply John.

I'm not sure if I understand, but in the hope of understanding what's happening here I have made two more measurements (see attached screenshots), both using a 96kHz sample rate, in the first I set the measurement sweep from 1Hz to 48,000Hz, and in the second the measurement sweep only goes from 1Hz to only 20,000Hz, note that the THD at 4kHz is listed as "240.2%" in the first and only 0.0057 when the sweep was limited to 20kHz:

Screen Shot 2019-12-01 at 17.27.06.jpg



Screen Shot 2019-12-01 at 17.27.22.jpg
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
Have a look at the help for the "Use harmonic frequency as ref" option. Percentage figures are relative to the fundamental. That may be the level of the fundamental at which the figure is shown (e.g. 4.02 kHz for the images above) or the level at which the harmonic arises (8.04 kHz for the second, 12.06 kHz for the 3rd etc). For responses which are flat (such as electronic equipment in its passband) it doesn't matter since the level will be the same, for responses that are not flat using the harmonic frequency as the ref can remove the effects of the response variation within the passband of the device, but runs into limitations when the harmonics fall beyond the passband where the fundamental level is low.. There is more discussion on that topic in the help examples.
 

Chuck Zwicky

New Member
Thread Starter
Joined
Sep 8, 2017
Messages
42
Thank you, that was precisely what was happening. However, if I select "Plot Harmonics at Harmonic frequency" (which seems like a more accurate representation of what is happening?), the reported THD is again "through the roof", showing "197.2%" THD even though in the following examples the THD is more than 35dB lower than the fundamental.

EDIT: I re-read the help page: "When plotting harmonics at the harmonic frequency the harmonic frequency is used as the reference, regardless of the state of Use harmonic frequency as ref. "

Any chance that we could have "Plot Harmonics at Harmonic frequency" without having the harmonic frequency used as the reference? I feel like this would give the most accurate view of what is happening...

I'm still not sure I understand why this all works exactly as expected if I limit the measurement sweep range to 20kHz and seems to go completely haywire if I extend the sweep beyond 20kHz?

Somehow the answer is there in your reply "runs into limitations when the harmonics fall beyond the passband where the fundamental level is low", but I'm not quite getting it.. (is it computing them from the fundamental?)

I guess what I am hoping to see is all the artifacts of the distortion and nonlinearity as they are present within the passband of the device, and in the proper relationship at any given frequency, rather than harmonics which are shifted down several octaves, if I'm understanding the default plotting of them?
 
Last edited:

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
When you limit the sweep to 20 kHz there is no data at the harmonic frequencies above 10 kHz for the 2nd harmonic, 6.67 kHz for the 3rd etc.

Percentage distortion at a frequency is the level of the harmonic as a percentage (i.e. divided by) by the level of the fundamental at the chosen frequency. Traditionally the level of the fundamental at the frequency of interest is used, so the level at 1 kHz when looking at the 1 kHz distortion levels. Temme's argument is that it is not sensible to use that frequency for the harmonics when the fundamental where the harmonic arises is different in level. For example, if the fundamental at 2 kHz is 10 dB higher that means all 2 kHz content for the system gets 10 dB more gain from the linear response than at 1 kHz, including any harmonics that fall at 2 kHz. Continuing to use 1 kHz as the reference level for the 2nd harmonic, for example, would then mean the 2nd harmonic would be reported as 10 dB higher than it really is, since 10 dB of that 2 kHz harmonic's level comes from the system's linear gain. That 10 dB isn't non-linear distortion. The opposite also applies, if the level of the fundamental at 2 kHz is 10 dB lower then using the 1 kHz level as reference would mean the 2nd harmonic level being shown 10 dB lower than it really is, since it has been reduced by 10 dB by the linear gain of the system at 2 kHz. Using the harmonic frequency as reference fixes that problem. When using the harmonic frequency as reference you are seeing very high levels for harmonics which are occurring beyond the point the linear response has rolled off, so the fundamental level is very low. What confounds that situation is the noise floor of sweep measurements, which rises with frequency. Your original plot shows that the harmonic levels have themselves fallen into the measurement's noise floor, so you really shouldn't be paying any attention to the reported levels there.

An alternative for your case, where the linear response is smooth if not flat, is to use the RTA, which has far lower noise floor, shows harmonics at the frequencies they occur and doesn't use the harmonic frequency as the reference.
 

Chuck Zwicky

New Member
Thread Starter
Joined
Sep 8, 2017
Messages
42
Thank you very much for that reply, John, it clarified things greatly.
If I'm understanding this correctly, then by not selecting "Plot Harmonics at Harmonic frequency" we have a "snapshot" of the spectral balance at any given frequency which is, in a sense "frequency agnostic", much like using an old distortion analyzer and notching the fundamental to measure the level of the residual harmonics on a meter. My initial confusion here was somewhat similar to a 1st year physics student trying to grasp Heisenberg's uncertainty principle - the instantaneous THD represented at any single point in the sweep is only accurate for that single point, as calculated in the legend below the data, while requiring the user to ignore the visual representation of the shifted harmonics, whereas the overall performance of the DUT might be best visualized by not shifting the harmonics to the fundamental frequency...?


PS: Where can I learn more about Temme?
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
I added the option to plot harmonics at their frequency of occurrence following a discussion on the SBAF forum. I haven't seen it elsewhere, but perhaps other packages offer it. The norm is to show distortion with the harmonics shifted to the fundamental, which makes for easier visual identification of the harmonic levels for a given frequency without having to scour the whole plot.

Where can I learn more about Temme?
The internet? :) The relevant paper is referenced in the help, "How to graph distortion measurements" presented by Steve F. Temme at the 94th AES convention in March 1993.
 
Top Bottom