How we perceive non-linear distortions

I performed other experiments/simulations in relation to the previous two posts. What I found is that basically the hypothesis about constant distortions in frequency is correct; the distortions should be higher on the second and third harmonics and very low in the others. It is also important to add information about the phases of these distortions. If we measure phase values close to that of a system without memory effect (see the link of my previous post), we are in an optimal situation. Different values does not mean that the device behaves badly, but only that the effect on distortions, and then its sound, is more unpredictable.
Any comment is welcome.
 
The wave form of non-linear distortion itself (fundamental notched out) defines the perceived sonic impression - check out therefore the attached diagrams found in various measurements from "STEREOPHILE" in post #2 under
https://www.diyaudio.com/community/...st-possible-thd-n-really-the-best-way.367692/
As long as non linear distortion waveform is only sinusoidal (without sawtooth character and spike mixture), sound is always good, even THD+N Value is above 1-2% (look to the mentioned diagrams and description of sound in the corresponding test review).
Datasheets from vintage and modern op-amp IC's (e. g. from TI) don't publish this diagrams - otherwise it would be much more easy to find out the suited types for audio phono and line stages.
 
The wave form of non-linear distortion itself (fundamental notched out) defines the perceived sonic impression - check out therefore the attached diagrams found in various measurements from "STEREOPHILE" in post #2 under
https://www.diyaudio.com/community/...st-possible-thd-n-really-the-best-way.367692/
As long as non linear distortion waveform is only sinusoidal (without sawtooth character and spike mixture), sound is always good, even THD+N Value is above 1-2% (look to the mentioned diagrams and description of sound in the corresponding test review).
Datasheets from vintage and modern op-amp IC's (e. g. from TI) don't publish this diagrams - otherwise it would be much more easy to find out the suited types for audio phono and line stages.

There is a lot of interesting information in the linked post.
However, one aspect that I would like to highlight is that distortions, beyond background noise, almost never have a “purely” sinusoidal trend. Rather, one should quantify “how much” they deviate from this. What is overlooked is that n order distortion also determines components of n-2, n-4, n-6 order an so on. This means that odd-order distortions, even only of the third order, introduce also a distortion component at the same frequency as the fundamental. And this component:
  • It is of a not negligible level, several dB higher than the level of the considered harmonic.
  • It has phase 0 or 180 degrees (so it expands or compresses the fundamental) in the case of devices with negligible memory effects; values different otherwise.
Thus, the “shape” of distortion that is derived from measurements by suppressing the fundamental with a notch filter does not reflect the actual distortion introduced by the device. This makes it harder to correlate listening sensations with distortion measurements. I explained these effects in detail in the post I already reported through several simulations.
 
Last edited:
That delayed energy from the cone flexing as well as air pressure and box vibrations displace the coil, and that these laggy vibrations should be allowed to ring freely (dissipated naturally by the air load and mechanical damping) and that the corresponding delayed voltages that appear should not be short-circuited with a low output impedance.

Or telling people that short-circuiting the coil does not damp it or absorb vibrations. Rather, it tends to reflect echoes in much the same way that an immovable concrete wall causes balls thrown at it to bounce right back.

That attempting some kind of back-EMF 'control' of the speaker cone does not work because of the delay. That delays change the phase of the signal. Therefore, negative feedback is incapable of stopping them, unless it is somehow intelligently filtered in an active speaker setting. Depending on factors entirely out of an amplifier designer's control, a speaker builder could use a 6" woofer and build a box with 20cm walls and a certain set of resonant frequencies. Or they could build another loudspeaker with a different set of resonant frequencies.
This is the part of the OP I found to be interesting. Then the conversation flip-flopped around to DACs, preamps, active motion control on woofers...whatever happened to this idea? Admittedly, I didnt even realize how old this thread is initially reading through...

As undoubtedly the speakers one uses interact with their amplifier and the common knowledge that the speaker is the most distorting of all audio chain components, one would think - considering the vastness of what could be upstream - that the speaker / amplifier system interaction would be a good place for focus.

Just going to bi-amp eliminates the bass driver resonance from amplifier damping for the upper band amp, provided of course cross is well above any driver Fs used in the HF portion of the speaker. This doesnt mean however that the amp sees nothing from the driver back-EMF while playing music, just different than what it would see in the FR speaker situation.

What if you used one amplifier output to deliberately drive current back into the output of a second amplifier, in an idle state (input short)? Undoubtedly, the second amplifier will react to that stimulus, which may give a clue as to how it behaves regarding driver back-EMF interaction. What's the harmonic profile across the audio spectrum in that case? Same as it is when tested normally? Maybe.

Or perhaps such a test opens a door to why certain amp/speaker combos are precious. Or why the L-pad introduction works as OP mentioned. Or why some prefer physical crossovers, vs multi-amplifier direct connect driven by line level filters. Anyway, a thought I might not have had if I saw this thread back in '21.

IM on a tone being produced by amplifier B when driven by a different tone via current from amplifier A? Back-EMF from sound just played hangover effect on the sound currently playing - a dynamic phenomena and good candidate for non-linear classification of distortion. If its possible for such a thing to exist. (Coffee is done, I've been called to make breakfast, which I'm late for already)
 
...one aspect that I would like to highlight is that distortions, beyond background noise, almost never have a “purely” sinusoidal trend. Rather, one should quantify “how much” they deviate from this.

Yet typical FFT measurements are not without their limitations: https://purifi-audio.com/2019/12/07/amfm/ ...Any thoughts going forward to improve measurements and or to better interpret measurements that are reasonably doable?
 
Yet typical FFT measurements are not without their limitations: https://purifi-audio.com/2019/12/07/amfm/ ...Any thoughts going forward to improve measurements and or to better interpret measurements that are reasonably doable?

Good question!
In my small way, I’m working on it, at least for the field of amplifier measurements, and it’s not easy at all. A few thoughts below.
  • Signals in the time and frequency domain are interchangeable, meaning there is no loss of information in switching between them. It should be noted that analysis in the frequency domain should also consider phase information, which is systematically overlooked. The underlying problem is that it is not easy to derive useful information from it for the effects on perception.
  • To understand how similar two signals are there is already a statistical indicator, the correlation coefficient. Here the problem is that it is necessary to perfectly synchronize the source and measured signal, and in any case the contribution to the fundamental would always "escape".
  • From the module and phase measurements of single-tone distortions you can easily derive the actual shape of distortions in the case of systems with negligible memory effects (see the usual post in the previous link). For those with memory effects you need more complex models (Volterra Kernel), to explore.
  • To more easily correlate measurements to the effects on perception a promising path is that of time analysis applied to transients, where our auditory system is much more sensitive than frequency content. This involves comparing the derivatives of the signals, always in relation to the approach of the previous point.
In short, there is still a long way to go ...
 
What if you used one amplifier output to deliberately drive current back into the output of a second amplifier, in an idle state (input short)? Undoubtedly, the second amplifier will react to that stimulus, which may give a clue as to how it behaves regarding driver back-EMF interaction. What's the harmonic profile across the audio spectrum in that case? Same as it is when tested normally? Maybe.
Been there, done that, it is rich in low hanging fruit. Will write more about it tonight if you're interested.
 
...I am not saying anything new by stating that what can have an effect on the perceived sound is not the absolute value of THD, but the relationship between the different harmonics that contribute to its determination. In order to better understand "how it sounds" a preamp in a "black box" approach, it is important to measure the trend of the different harmonics both as a function of frequency and the level of the input signal...

It was reported by an audio consultant and dac designer, Rob Watts, that a preamp's perceived sound was influenced by choice of power cords. The cause of the 'power cord effect' was correlated with measurements of noise floor modulation (an audio signal dependent change in the noise floor of a typical audio FFT). Fitting the preamp with an RF power filter at the AC inlet reportedly fixed the problem.

The takeaway for me is that signal-correlated-noise in analog amplifiers can also be a factor in perceived sound quality (that is to say, its not just an issue related to delta-sigma modulators). Mode conversion of noise may also be a factor:
http://www.sigcon.com/Pubs/edn/Diff... element within,of transmission at that point.
https://www.diyaudio.com/community/...ormance-cmos-audio-op-amp.335416/post-6640167
https://www.ti.com/lit/an/sboa128a/...91482&ref_url=https%3A%2F%2Fwww.google.com%2F
https://resources.altium.com/p/guide-mode-conversion-its-causes-and-solutions
 
Last edited:
Oh yeah! I'd like to read about what you've done. Let me know where it is, as threads around here get past me at the speed of sound. Thanks!
It's a very simple yet powerful method, and I hope Pinox will find it interesting.

Let's take an amplifier, and build a distortion model for it. Intuitively, distortion will depend both on output voltage and output current. Neglecting the power supply and other stuff. Now, transistor properties don't change much as long as Vce/Vds is reasonably high. A transistor will work pretty much the same with Vce of 15V or 40V. So, as a simplification, as long as the output isn't too close to the rails, it makes sense to consider distortion due to output voltage and output current separately. The final result should be close to the sum of both. It's not exact, but thinking about these two distortions separately means we can minimize them both without one obscuring the other.

All standard measurements are only concerned with total distortion, and output current dependent distortion is almost never studied separately. I wonder why, because it's very easy to do and you don't even need expensive gear. All you need is a soundcard, another amp, a resistor, and python.

Output voltage dependent distortion is mostly Early effect, nonlinear capacitances in devices, stuff like that. Unless the amp is badly designed and the input stage runs out of current, or it slews, It's all mostly low order, going down with level, because the transfer function is pretty smooth. When the output voltage swings from -10V to +10V, not much happens really. The VAS current is going to increase by a tiny bit, some hFe's are gonna change by a minuscule amount, some Cbc change a little bit... If feedback is low, maybe it makes wildly high THD like 0.1%, and no-one cares, JFET buffers with that THD sound fine, tubes with that THD sound fine, etc.

In contrast, output current dependent distortion is basically the crossover. Swinging from -1A to +1A output current, a lot more stuff happens than swinging +/-10V output voltage. For example, transistors turn on and off. That's a huge event. Current gain of the output stage changes from the product of top transistor and top driver hFe, to bottom transistor and bottom driver hfe, with a transition zone where both are active. Capacitances move a lot also. Output stage gm, and its output impedance, change a lot.

My point is this stuff that happens when the current changes sign, in the crossover, is going to be pretty similar no matter at what output voltage it occurs. With a resistive load it'll be at zero volts, but with a loudspeaker current is not in phase so the crossover occurs at a random output voltage. But it's still pretty much the same crossover no matter at what output voltage it happens. So we might as well make it happen at zero volts without input signal, which makes it a lot easier to measure.

If you stick a signal in the input of the amp, you'll get the sum of all the distortions at the output, which makes it hard to know whether any specific blip in the FFT comes from current- or voltage- dependent stuff.

But if you inject a current into the output, while grounding the input, then the output of the amp is entirely the current dependent distortion. With a perfect amp, it would be zero. So any voltage there that is not zero is distortion. Some of it will be due to linear resistances, like wires, but if you put the probe close enough to the output stage, before the output inductor, the voltage at the output will be mostly distortion. It can't hide behind the output voltage.

So you can remove from the shopping list: notch filter, super low THD source, super low THD ADC, audio precision, fancy soundcard, etc. All unnecessary.

So you connect the two amps with a resistor, ground the input of the DUT amp, and have the other amp inject current through the resistor. But surely we need a low distortion measurement amp, right? Well no need for a fancy amp either. The DUT amp output is a virtual ground, so we can use a stereo amp to inject two signals, one per channel, and observe the intermodulation at the output of the DUT amp... while both test amps only see one frequency and produce no intermodulation. In addition, the nonlinear output impedance of the test amp is added to the resistor between the two amps, so it is diluted and doesn't show up.

Also I measured the output stages open loop.

Anyway. I did not use FFT. For the current, I just used a large amplitude low frequency sine with a low amplitude high frequency sine on top.

The large slow sine sets the output current. The small HF sine wiggles around it. It is, as we say, a "small variation" around an "operating point". So with a bit of python, it spits out the transfer function directly aka Vout=F(Iout), which is not interesting. Its derivative, however, is interesting, because it's the dynamic output impedance, something like 1/gm.

Note an amplifier is not a time-invariant system and it does not have a time-invariant transfer function. For example if the top output transistor heats up during the positive side of the signal, when the output goes to zero again, the next crossover will be different than the previous crossover when the transistor was cold, because the bias will not be the same. With this non-FFT system this is no problem : it just plots the transfer function going up, and the one going down.

------> https://www.diyaudio.com/community/threads/power-amp-output-stage-measurements-shootout.374367/
 
Last edited:
  • Like
Reactions: Pinox67 and Markw4
noise floor modulation (an audio signal dependent change in the noise floor of a typical audio FFT)
If it shows up as noise floor in FFT... doesn't mean it's noise as it is usually understood (hissssssss). Many non periodic signals have a broad/flat frequency distribution: random clicks'n'pops, the switching frequency of a DC-DC or SMPS varying randomly according to load, gated noise (even if the gating is periodic).

Here we have a digital sine wave with a tiny bit of noise to get a FFT noise floor at around -150dB (blue). Then I added small gated noise pulses (top plot shows a zoom on the sinewave when it happens) and that's the orange FFT. It has a perfectly flat noise floor, even though the noise looks periodic, it is not because the bursts occur at periodic intervals but their values are random.

1659138750263.png
 
But if you inject a current into the output, while grounding the input, then the output of the amp is entirely the current dependent distortion. With a perfect amp, it would be zero. So any voltage there that is not zero is distortion. Some of it will be due to linear resistances, like wires, but if you put the probe close enough to the output stage, before the output inductor, the voltage at the output will be mostly distortion. It can't hide behind the output voltage.
Hey, thanks for writing all that out! I didnt recognize your username and figured you must be the guy doing the "output stage shootout" and then saw the link at the reply's end. Although it's all tied together, I'm more interested in the output Z of an amplifier from the perspective of how it loads the speaker's back EMF; after all, it is working together as a system. That I would have to believe involves the feedback loop, as in the case where a forced current is applied, it will sense that and try to correct.

I like the idea of a small sine on top of a larger one; I assume when you say dynamic impedance it's changes in the output impedance responding to the small sine, as the big one - causing the dynamic part - moves through a cycle.

Output inductors having magnetic memory, output transistors having a thermal memory; these phenomena are a bit beyond my playing level in audio these days. I've no doubt they matter.

I'm more at the level of given an amplifier with a tranny tap of 8 Ohms, a damping factor of 20; is that damping factor as consistent as, say, the frequency response of the whole amplifier? Are the amp's distortion characters different when the feedback loop is "backfed" versus operating the amp in the normal way? Is there a damping factor frequency / distortion profile that a given speaker would "like" sonically, versus a flat, hard 10k / -100db from DC to light? Is there a way to get a toe in the door of why some amp / speaker combos sound better through measurement of what the speaker could do to the amplifier when playing music?

Obviously testing with an 8 Ohm resistive load puts nothing back into the amplifier output EMF wise. When people say I've got this special load I use to test an amplifier, or, I design an amp's feedback for a real speaker load, isnt this a way to see / design how an amp is reacting to back EMF? No reaction / ability to drive anything one would think to be a brute force ideal, but perhaps how it sounds doesnt let us off that simply.
 
I like the idea of a small sine on top of a larger one; I assume when you say dynamic impedance it's changes in the output impedance responding to the small sine, as the big one - causing the dynamic part - moves through a cycle.
Yes. Dynamic output impedance is dVout/dIout, ratio of small variations around an operating point.
Are the amp's distortion characters different when the feedback loop is "backfed" versus operating the amp in the normal way?
Usually no, it's the same. Unless the amp has circuits bootstrapped to the output which interpret "involuntary" changes in output voltage due to complex speaker current as "voluntary" changes in output voltage (ie, driven by the frontend of the amp according to the input signal). This shows up in an output impedance measurement.

Is there a damping factor frequency / distortion profile that a given speaker would "like" sonically, versus a flat, hard 10k / -100db from DC to light? Is there a way to get a toe in the door of why some amp / speaker combos sound better through measurement of what the speaker could do to the amplifier when playing music?
Well you could do a frequency response and distortion measurement with the loudspeaker attached. That will tell you immediately if the voltage on the speaker is different between the amp that makes it sound good, and the amp that makes it sound bad. I've done it and the speaker's current had so much THD (like 20% in the bass) the distortion performance on the amp was determined mostly by its output impedance. Wear earmuffs.
 
More stuff for Pinox's project:

OMG this amp has 0.01% THD surely you're not hearing 0.01% right?

What if it's actually 1% THD 1% of the time? Same average, but different difference! As we all know "time and frequency representations are interchangeable" (mathematically proven) but once you start averaging stuff to get a lower noise floor, it's no longer that clear... Let's check out this blameless amp, complete with transformer and rectifier. No-one's gonna hear those -100dB harmonics, right?

1659268631069.png


OK. So what I did is make it play a 1kHz 2Vpeak sinewave (in simulation) and instead of doing the FFT on the whole result, I did the FFT on each period, thus plotting the THD of each period of that sinewave. Does it have the same THD on each period, does it produce identical periods on the output, calibrated like mass produced burgers on a conveyor belt, down to the microgram of saturated fat, no matter what period we look at? Looking at the plot below, where the X axis is which 1kHz period we're looking at, and the Y axis is its THD, I'm sure no-one can notice when the rectifier diodes are turning on...

distortion hiding 02 supply.png


Oops, that was embarrassing. Turns out that amp is going to sound quite different whether the diodes are on or off. FFT averaging over a long period will hide this in inverse proportion to the diode duty cycle. Now, of course, the mess from the diodes depends on the state of charge on the supply caps, and that depends on what it played before. So I added a current sink to draw more current from the caps to get bigger spikes and more conduction time, and of course stepped it, with the appropriate rainbow plot.

distortion hiding 03 supply.png


Well it sure looks like it does something. The time where the diodes stop conducting is the nice -90dB THD in the lower right corner. This is the same amp that posted around -100dB on second and third harmonics in the first pic, and now it's popping -70's but only on one period out of ten, because it's 1kHz signal and 100Hz rectifier pulses.
 
Another example of too much averaging hiding what we're trying to measure is IMD. Quoting Audio Precision...
The stimulus is a strong low-frequency interfering signal (f1) combined with a weaker high frequency signal of interest (f2). f1 is usually 60 Hz and f2 is usually 7 kHz, at a ratio of f1_f2=4:1. The stimulus signal is the sum of the two sine waves. In a distorting DUT, this stimulus results in an AM (amplitude modulated) waveform, with f2 as the “carrier” and f1 as the modulation.
In analysis, f1 is removed, and the residual is bandpass filtered and then demodulated to reveal the AM modulation products. The rms level of the modulation products is measured and expressed as a ratio to the rms level of f2. The SMPTE IMD measurement includes noise within the passband, and is insensitive to FM (frequency modulation) distortion.

In this case, the amp spends most of its time with only one output transistor active, because the low-frequency signal has high amplitude. It spends only a little time near the interesting points, which are turn-on and turn-off of output transistors. Accordingly, the subsequent averaging dilutes the distortion due to these phenomena and makes it look much smaller than it actually is. A much more interesting measurement is to measure the distortion of the small signal according to DC output current. Ironically, the test signal is the same, all you got to do is remove the LF signal after it has done its job of setting the output current, and check the THD on each period of the HF signal.

Here each curve is the THD of the low amplitude sine. X axis is the DC offset current. Each curve is a bias setting. It's the same blameless amp as above.

1659271659686.png


Mr. Soyjack proudly points at the distortion minimum at zero output current, which is where all "THD versus output level" measurements are being made. I would argue that a much more useful measurement would be the maximum worst case THD on that small sine over all possible values of output current, which is up to 20dB higher, on the two bumps on either side.

So let's look at a THD versus level plot. It looks so good without any offset! But add as much as a couple tens of mA of output current, and you get the other set of curves, which represent the real distortion of the amplifier, up to 25dB higher...

1659273250475.png
 
....those that were on average more pleasant to listen to have the following characteristics:
Thanks for that! For an outlier example, that well corresponds to a 5 watt pentode mode 6LU8 on the bench. The dominant 1 watt harmonic is second at ~0.35%, third is around 0.03% with all higher harmonics 90dB or greater below fundamental. It maintains this to half power above 200 Hz. It's far and away the best sounding iteration.
Interestingly, every variation of AC filament power degraded the sound. Spectral analysis showed that the resultant low level 'bwaaaaaa' audible only within 6" of the woofer added steady state intermodulation skirts to all input signals. Presumably that's why.