As part of a study of the effects of non-linear distortions in amplifiers, I came across an aspect that left me a little perplexed. This is the way in which the THD value (and also the IMD and TD+N) of the data collected by the standard measurements is calculated.
Measurement of distortions in static nonlinear systems
To introduce the discussion, let's start by summarizing what THD is: it represents the measure of harmonic distortion present in a signal. It is obtained by introducing a pure tone into the device under test, generally a sine wave at f1=1KHz, to then reveal the overall level of harmonic distortions at frequencies of 2f1, 3f1, etc. in the output signal. It is then calculated by the ratio between the RMS (Root Mean Square) value of all these harmonic distortions and the RMS value of the tones in the original signal.
With another indicator, the IMD, we can measure the overall level of intermodulation products that arise when using test signals typically consisting of two tones. If their frequencies are f1 and f2 we will have the new tones at frequencies if1±jf2, with i and j positive integers. These tones are in general non-harmonic. IMD is then calculated by the ratio between the RMS value of the overall intermodulation products and the RMS value of the tones in the original signal. It should be noted that in some measurement standards such as CCIF and SMPTE, for simplicity of calculation, some tones are neglected in the calculation.
Criticisms have been raised in the literature of the THD and IMD indicators as being too simple to be representative of the amount of distortion experienced by real musical signal. To bring the measurements closer to the real world, it can be adopted multitone test signals, where there will be a proliferation of harmonic distortions and above all of intermodulation products, which together form a sort of "carpet". Since it is very complex to separate them, the indicator that is used for this signal, the TD+N, does not distinguish them: it is the ratio between the RMS value of all distortions (including any noise) and the RMS value of all tones in the original signal. Generally, for all indicators the DC component is not considered in the calculations.With another indicator, the IMD, we can measure the overall level of intermodulation products that arise when using test signals typically consisting of two tones. If their frequencies are f1 and f2 we will have the new tones at frequencies if1±jf2, with i and j positive integers. These tones are in general non-harmonic. IMD is then calculated by the ratio between the RMS value of the overall intermodulation products and the RMS value of the tones in the original signal. It should be noted that in some measurement standards such as CCIF and SMPTE, for simplicity of calculation, some tones are neglected in the calculation.
But let's take a step back to identify the cause of the nonlinear distortion. This is due to the non-constancy of the g gain of the device for each level of the input signal. In other words, the input/output transfer curve f(x) of our device is not represented by a straight line (of slope g) in the working interval but has "imperfections". If we model this curve and calculate the output values for each value of the input signal we will be able to numerically simulate the behavior of our device for any signal. If we want to simulate a system that has 2nd and 3rd harmonic distortions, the transfer function f(x) can be modeled by a third degree polynomial:
In fact, by inserting a sinusoidal x(t) signal in this polynomial and carrying out the appropriate trigonometric transformations, we will have that the different addends control:
- a0: component in DC, normally null.
- a1x: amplification (of gain g) of the fundamental component (i.e. H1).
- a2x²: 2nd order distortion, consisting of two components:
- 2nd harmonic (HD2), out of phase by +90° or -90°;
- DC, of the same entity as HD2.
- a3x³: 3rd order distortion, consisting of two components:
- 3rd harmonic (HD3), 0° or 180° out of phase;
- contribution to the fundamental component (HD1), 9.5dB higher than HD3.
Therefore, it is appropriate to distinguish the distortion of order i, due to the i-th power addition of the transfer function, from the harmonic component of order i. To better establish the concepts, let's make an example. The following figure shows:
- The transfer function (left), relating to a mixed distortion of 2nd and 3rd order, with HD2 = -70dB and HD3 = -60dB, having a phase of 90° and 0° respectively; the gain g is unity.
- The non linear distortion undergone by a single tone (right): in blue the resulting curve, where a “compressive” effect can be seen, and in red the isolated distortion component.
In both graphs the curves are amplified by 40 times to better show the shape of the distortion. As explained above on the transfer function, the distortion curve in red is here composed of four harmonics: HD2 + DC, due to 2nd order distortion, and HD1 + HD3, due to 3rd order distortion.
Fig. 1 - Transfer function (left) and distortion on a single tone (right).
The one described is a simplified approach, capable of modeling non linear systems called static, without memory, i.e. the output value depends only on the instantaneous value of the input signal (except for the crossing time of the system), which constitutes the point starting point for the following considerations.
In the common calculation of the THD in the numerator here are considered only the values of HD2 and HD3, determining a value of -59.6dB, and the DC and HD1 are omitted. Now, if the DC component can be neglected, since it does not reach our speakers due to the decoupling capacitors between the electronic devices that block it, the same discourse is not applicable to the HD1 component, which instead crosses the entire audio chain downstream, and it is mainly responsible in this case for the compressive effect on the signal. Therefore, the THD value calculated in this way is not really representative of the entity of the distortion related to the red curve shown in the previous figure (actually, it is relative to the curve in green), although the definition of THD speaks of "all" harmonic distortion components, and not only "new". If HD1 were included in the calculation, we will have a THD of -50dB, almost 10dB higher.
Let's investigate the phenomenon better by verifying what happens for different mixes of distortion.
In the common calculation of the THD in the numerator here are considered only the values of HD2 and HD3, determining a value of -59.6dB, and the DC and HD1 are omitted. Now, if the DC component can be neglected, since it does not reach our speakers due to the decoupling capacitors between the electronic devices that block it, the same discourse is not applicable to the HD1 component, which instead crosses the entire audio chain downstream, and it is mainly responsible in this case for the compressive effect on the signal. Therefore, the THD value calculated in this way is not really representative of the entity of the distortion related to the red curve shown in the previous figure (actually, it is relative to the curve in green), although the definition of THD speaks of "all" harmonic distortion components, and not only "new". If HD1 were included in the calculation, we will have a THD of -50dB, almost 10dB higher.
Let's investigate the phenomenon better by verifying what happens for different mixes of distortion.
Fig. 2 - HD, “True-THD”, THD [dB] for more ratio of 3rd/2nd harmonic.
The figure illustrates the trend of distortions in dB as a function of the ratio between the levels of the 3rd and 2nd harmonic, with the latter set at -90dB. The red curve relates to the 2nd harmonic (HD2), constant, while the light blue curve shows the value of the 3rd harmonic (HD3), increasing. The resulting THD value for these 2 harmonics for each value of their ratio is represented by the dashed purple curve. Including in the calculation also HD1, shown in blue (parallel to HD3 and 10dB higher), we will have the “True-THD” curve shown in purple. This coincides with the “classic” THD value as long as the distortion is mainly 2nd order, while it is higher up to 10dB when 3rd order prevails; moreover, it begins to grow much earlier.
Figure 2b shows what happens if we observe the same quantities as a function of the input signal level for the transfer curve in Figure 1. Hence, HD2 = -70dB and HD3 = -60dB. The reference here is H1; if instead we considered H1+HD1 as a reference we would not have any “visible” impact in the curves.
Figure 2b shows what happens if we observe the same quantities as a function of the input signal level for the transfer curve in Figure 1. Hence, HD2 = -70dB and HD3 = -60dB. The reference here is H1; if instead we considered H1+HD1 as a reference we would not have any “visible” impact in the curves.
Fig. 2b - HD, “True-THD”, THD for input levels from -60dB to 0dB.
From the figure it is evident that the classic THD coincides with the True-THD for low input values, below -30dB; for higher levels the True-THD deviates up to 10dB, as in the previous graph. This is due to the fact that the effect of 3rd order distortion (and therefore both HD1 and HD3) at low levels is not felt very much, since it depends on the cube of the signal level, leaving "the field" at the 2nd order (HD2) which depends on the square of the signal level. It should be added that by increasing or decreasing the HD2 and HD3 values by the same amount (in dB), all curves translate respectively upwards or downwards. Therefore, the discrepancies between the classic THD and the True-THD depend on the relationships between the harmonics, not on the absolute values.
From what has been described it follows that not considering the harmonic HD1 in the calculation of the THD distorts its "representativeness" as an indicator for the overall amount of distortion suffered by the signal when the 3rd harmonic appears. More generally, we can say that it is not correct to compare THD values close to each other when the harmonics involved in its determination are of a different nature, i.e. mainly of even or odd order: there is a risk of committing gross errors of evaluation, since not considering HD1 can lead to differences of 10dB.
For the IMD there are no discrepancies given that HD1 is to be considered "harmonic" and therefore not included in the calculation of this indicator. Instead for the TD+N, which contemplates all forms of distortion, the discrepancy reappears. To get an idea, the following graph shows the simulation of the distortion suffered by a signal composed of 8 tones equally spaced in frequency from 5KHz to 12KHz, level at -18dB, when passing through a system with only 2nd order distortion (HD2 = -60dB) and in another with only 3rd order (HD3 = -60dB).
From what has been described it follows that not considering the harmonic HD1 in the calculation of the THD distorts its "representativeness" as an indicator for the overall amount of distortion suffered by the signal when the 3rd harmonic appears. More generally, we can say that it is not correct to compare THD values close to each other when the harmonics involved in its determination are of a different nature, i.e. mainly of even or odd order: there is a risk of committing gross errors of evaluation, since not considering HD1 can lead to differences of 10dB.
For the IMD there are no discrepancies given that HD1 is to be considered "harmonic" and therefore not included in the calculation of this indicator. Instead for the TD+N, which contemplates all forms of distortion, the discrepancy reappears. To get an idea, the following graph shows the simulation of the distortion suffered by a signal composed of 8 tones equally spaced in frequency from 5KHz to 12KHz, level at -18dB, when passing through a system with only 2nd order distortion (HD2 = -60dB) and in another with only 3rd order (HD3 = -60dB).
Fig. 3 - Signal and distortion (HD2 = -60dB) in the frequency domain for 8 tones @ 10KHz, 11KHz, …, 17KHz - Level = -18dB.
Fig. 4 - Signal and distortion (HD3 = -60dB) in the frequency domain for 8 tones @ 10KHz, 11KHz, …, 17KHz - Level = -18dB.
In both graphs all non linear distortion components are shown in orange, while the source signal in blue. The distortion components coinciding with the tones of the source signal, of different levels and of not exactly negligible entity, are evident. These tones would not be detected directly by any measurement. The comparison between the classic and real TD+N values is as follows:
- 2nd order (Fig. 3): Classic / True TD+N = -57.8dB / -57.5dB
- 3rd order (Fig. 4): Classic / True TD+N = -58.5dB / -52.5dB
Therefore, even in the case of the TD+N calculation, the differences are not always negligible, the value is underestimated and the discrepancy is higher when there are odd-order distortions.
In conclusion, beyond the difficulty of detecting directly the values of the distortions at the same frequencies of the test tones in the measurements, I cannot see any valid reason to neglect these harmonics in the calculation of the THD (and TD+N). These are in fact the main responsible for the compressive or expansive effects on the signal (in this thread more details). However, it would be possible to develop a more sophisticated dynamic model, (i.e., with memory) which contemplates arbitrary phase values of the distorsion, to estimate the entity of these harmonics from the values of the other harmonics detected and then correct the calculation of these indicators, at least for the simplest cases. Perhaps also providing additional test signals to facilitate this calculation.
[EDIT] Analysis updated here also for the dynamic model.
In conclusion, beyond the difficulty of detecting directly the values of the distortions at the same frequencies of the test tones in the measurements, I cannot see any valid reason to neglect these harmonics in the calculation of the THD (and TD+N). These are in fact the main responsible for the compressive or expansive effects on the signal (in this thread more details). However, it would be possible to develop a more sophisticated dynamic model, (i.e., with memory) which contemplates arbitrary phase values of the distorsion, to estimate the entity of these harmonics from the values of the other harmonics detected and then correct the calculation of these indicators, at least for the simplest cases. Perhaps also providing additional test signals to facilitate this calculation.
[EDIT] Analysis updated here also for the dynamic model.
Last edited: