How can we measure all the physically possible distortions that are audible, e.g. is THD + IMD enough, or do we need more than that (as is clearly the case with lossy compression algorithms, for example)?
You are correct that the problem of arbitrary (non-linear) distortion is not measurable in the general case. That is, one could very well design an active speaker with a very clever DSP which looks for a very specific pattern in the input signal, and if it sees it, substitutes the input signal with a copy of
Justin Bieber's Baby stored in the DSP's memory. An infinitely pedantic person will successfully argue that this
does count as distortion, because it's an alteration of the signal that is related to the input (since it was triggered by it). I'm sure everyone here will agree that would be distortion of the most evil, most offensive kind, yet you'd be hard-pressed to find any kind of standard measurement suite that will detect it. What you showed with that lossy digital compression demo (which I found quite neat, by the way) illustrates the same basic problem.
This issue arises because we treat the Device Under Test as a complete "black box" with no known properties. In order to make progress we need to understand the kind of distortion the DUT is expected to produce (which requires relaxing the "black box" assumption) and test specifically for these. So, for example, in the case of speakers, that would be stuff like force factor, suspension stiffness, thermal effects, Doppler effect, turbulence, rub & buzz, etc. basically, we deduce the kinds of distortion we should expect by working from first principles and looking at the physical behaviour of the speaker, and/or audible issues that people typically object to in listening tests. (Note that this is not an exact science, sadly, because it's impossible to know with 100% accuracy what exactly is physically going on inside the speaker in a particular situation, nor to design listening tests that will shine light on every potential problem.)
Once we know what kinds of distortion we should test for, then we can come up with stimuli specifically designed to trigger such distortion, and we measure the response to these stimuli. (This part is not necessarily trivial either. For example, measurement of impulsive distortion such as rub & buzz requires very specific kinds of stimuli and analysis.)
Klippel wrote a large number of
papers that go into the various (known) kinds of speaker non-linear distortion in a truly excruciating amount of detail. There are also freely available
webinars that are being organized as we speak where Wolfgang Klippel himself gives lectures on these topics. The papers are very technical, so it's not for the faint of heart. The webinars are more accessible and quite interesting but they go on for hours and hours. I'll admit I don't understand most of these issues myself, and I wouldn't expect anyone to unless they're very familiar with speaker design. To give you an idea of what to expect, this is just a
summary slide before a grinning Wolfgang Klippel proceeds to drown you in a sea of technical detail:
So the only question that we can meaningfully discuss (until we gather more data, e.g. IMD measurements or beyond) is whether it is theoretically possible for a speaker driver to have greater IMD than its THD chart would suggest.
Yes. For example Doppler effect induced distortion cannot be induced from a single-tone (THD) stimulus, you need at least two tones. If I remember correctly there are few other cases as well.
Let's bring Wolfgang here again:
In fact, on the topic of non-linear distortion, I remember at some point (not sure when) Wolfgang said something along the lines of "if you're only going to do one test, it should be Multi-Tone Distortion, that will give you the most information" (as opposed to a single-tone THD test which is what
@amirm is currently doing). Of course, how to relate the results of such a test to perception of sound quality is another matter entirely.
The webinars are structured around a new international standard for the measurement of speakers,
IEC 60268-21, published in 2018, that seems to cover a wide variety of stuff, including linear/small-signal and non-linear/large-signal measurements. That's probably the way to go for consistent, reproducible non-linear distortion measurements. I haven't looked at the standard myself though.