• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Speakers distortion

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,869
Likes
37,892
A very interesting thread that focuses the mind. What it tells me:

If you test at a fixed frequency, and you assume the room is linear, you know that any harmonics you measure are distortion. Of course the room may not be linear: the harmonics may come from vibrating objects or even flexing panels within the room.

Room reflections will mix with the fundamental and harmonics from the speaker and affect their measured amplitude, sometimes boosting the amplitude and sometimes reducing it. Any single measurement that includes reflections cannot tell you the proportion of distortion products relative to fundamental.

Multiple tests averaged with different mic positions and/or slightly different fundamental frequencies will probably improve the accuracy, but only by some unknown amount.

Near field measurement would be good because it reduces room effects but would only work properly at low test tone frequencies and low harmonic frequencies (wavelengths long compared to driver diameter), otherwise the fundamental and/or distortion products are attenuated (but possibly by a predictable and therefore compensate-able amount..?). To work best it would need a specialised microphone designed for high SPLs, otherwise it just trades off room effect uncertainty for higher microphone distortion.

There are several speaker distortion mechanisms, including cone break-up and Doppler distortion.

Distortion products caused by cone break-up will have nonlinear 'onset' and 'hysteresis' and their own peculiar dispersion characteristics. Shifts in test frequency and/or amplitude may cause these characteristics to change in unknown ways. These characteristics may be temperature and humidity dependent.

Conclusions:
Accurate measurements can only be made in properly anechoic conditions, but as to whether they are meaningful given the nature of cone break-up type distortion...

Never mind the difficulties in making meaningful measurements. What this says to me is that a notion I have often had about pre-distorting the signal using a neural network to compensate for speaker distortion is pie in the sky and wouldn't work, not least because I couldn't meaningfully create the training data and measure the results.

By far the most significant conclusion is that the speaker should be designed to avoid distortion in the first place. Designing a low distortion speaker would be much easier than measuring a speaker for distortion!

There are obvious methods for reducing speaker distortion. These methods may clash with traditional speaker design rules of thumb e.g. "Never place a crossover in the middle of the vocal range". Thankfully active DSP allows you to do this far more transparently than was ever possible previously. You probably also need to make space in your living room for a box that's a bit bigger than is fashionable.
Many of these are why I like panel speakers despite their shortcomings. The surface sound intensity is very low versus cones. It was thought they drove the entire surface evenly though modern measures indicate something more like chaotic shimmer of the panels which evens out at distance. Still easier to get low distortion inherent to the design.

OTOH, the Harman results that are most intriguing to me are the bookshelf and monitor speakers which basically have nothing below 100 hz. Their correlation coefficient was nearly 100% (was it like 99.3% IIRC) for tests vs listener preference. Yet the bass is about 30% of a person's evaluation of sound quality.
 
OP
Krunok

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,070
Location
Zg, Cro
This is the steady state response view of audio, but unfortunately it isn't going to work like that. In reality, what a cone will do when breaking up is highly complex, involving the history of the complex signal. Combine this with the corresponding complex dispersion effects and I think it is pointless to even try compensating for it. A small change of temperature and you would almost certainly be making it worse, anyway!

I don't think so. Speaers driver is not semiconductor so raise in coil temperature won't have much effect on drivers performance. If you were referring to ambient temperature.. well, I hope that was a joke! :)
 

Cosmik

Major Contributor
Joined
Apr 24, 2016
Messages
3,075
Likes
2,180
Location
UK
I don't think so. Speaers driver is not semiconductor so raise in coil temperature won't have much effect on drivers performance. If you were referring to ambient temperature.. well, I hope that was a joke! :)
Not a joke. Take some cone and/or surround material whose flexibility and other mechanical characteristics vary with temperature. Drive the cone with signals that cause it to cease to be pistonic, and it will flip into different types of behaviour that are affected by ambient temperature, and maybe even its own self-heating and cooling due to flexing. The key is not to drive the cone with such signals...
 
OP
Krunok

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,070
Location
Zg, Cro
Not a joke. Take some cone and/or surround material whose flexibility and other mechanical characteristics vary with temperature. Drive the cone with signals that cause it to cease to be pistonic, and it will flip into different types of behaviour that are affected by ambient temperature, and maybe even its own self-heating and cooling due to flexing. The key is not to drive the cone with such signals...

Unless you have some measurements to prove it I'll take it as a guesswork. I really don't believe room ambient temperature is any kind of serious factor here.
 
OP
Krunok

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,070
Location
Zg, Cro
Btw, what do you guys think would happen if DSP inserts measured 2nd and 3rd harmonics signals with opposite phase? Would that cause their cancellation when played?
 

Cosmik

Major Contributor
Joined
Apr 24, 2016
Messages
3,075
Likes
2,180
Location
UK
Btw, what do you guys think would happen if DSP inserts measured 2nd and 3rd harmonics signals with opposite phase? Would that cause their cancellation when played?
If the distortion is caused by cone break-up, different parts of the cone are flexing in different ways at any one moment. If you inject some harmonics, for a start you will get extra distortion of those harmonics being generated!

But you are also getting distortion components radiating from regions of the cone in different directions that vary over time. Even if you were to find a signal to inject that nulled out some of the harmonics at one point in space, as accumulated by a FFT (which is not the same as saying that it was working instantaneously at all times), a small movement of microphone - or ear - might give you an increase in those harmonics.

Really, trying to correct a transducer that has become an indeterminate combination of a gong and a bowl of jelly is not going to work.
 
OP
Krunok

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,070
Location
Zg, Cro
If the distortion is caused by cone break-up, different parts of the cone are flexing in different ways at any one moment. If you inject some harmonics, for a start you will get extra distortion of those harmonics being generated!

It doesn't matter why distortion is happening. The point is in cancelling its first 2 components.

And yes, I'm aware that I would get extra distortion when inserting 2 additional components of opposite phase but it will be of even smaller magnitude than 3rd and higher harmonics which we choose to ignore.

In engineering you have to focus on solving major issues, not finding a perfect solution that solves every possible issue. ;)

The point of using MMM is the same as when doing frequency response correction - it guarantes that you'll get the average in certain area so small movement of ear won't make any significant change. I really don't know why are you mentioning "small movement of microphone"? Instead of trying to make "philosophy" of MMM measurement process how about you try it by yourself and see how it works? ;)
 

Cosmik

Major Contributor
Joined
Apr 24, 2016
Messages
3,075
Likes
2,180
Location
UK
It doesn't matter why distortion is happening. The point is in cancelling its first 2 components.

And yes, I'm aware that I would get extra distortion when inserting 2 additional components of opposite phase but it will be of even smaller magnitude than 3rd and higher harmonics which we choose to ignore.

In engineering you have to focus on solving major issues, not finding a perfect solution that solves every possible issue. ;)

The point of using MMM is the same as when doing frequency response correction - it guarantes that you'll get the average in certain area so small movement of ear won't make any significant change. I really don't know why are you mentioning "small movement of microphone"? Instead of trying to make "philosophy" of MMM measurement process how about you try it by yourself and see how it works? ;)
I wish you the best of luck with it. Me, I'm implicitly preventing distortion in the first place by using active crossovers etc.
 

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,926
Likes
16,775
Location
Monument, CO
Why not? I think it would correct for a distortion harmonics affected by room.

Are you familiar how convolution engine corrects frequency response based on your measurement? This is the same thing except that level of the fundamental tone would be taken into account and 2nd and 3rd distortion harmonic would be canceled.

You can assume I have an inkling into convolution. I am not sure exactly what convolution engine you are addressing -- your distortion correction algorithm? Note distortion is nonlinear by definition so you must take that into account in any solution. EQ will reduce (or increase) the amplitude of harmonic distortion and everything else affected by the room (etc.) but that is not the same thing as canceling the distortion. If the room boosts or cuts the harmonic frequency then compensation can counter that; it does not eliminate the distortion. And as has been said many times by many folk, if you do single-frequency measurements, then you can use that compensation to more accurately estimate the distortion from your speaker (and whatever else is in the chain; all assumptions assume the speaker dominates the distortion, I think). Unless it manages to compensate phase and reflections it won't be completely accurate but should be close enough to get the magnitude.

I have lost track of your goal. Originally I thought it was to measure the distortion from the speakers. Now you appear to be targeting distortion compensation using look-up tables? Fred Irons (MIT) and some of his students at MIT (I think, decades ago) wrote about phase-plane compensation that would correct the distortion. It has been many years since I played with that technique, but did implement it, and it works. You need to characterize a fairly large set of signals (frequency, phase, amplitude) to create the table. Error compensation evolved once DSP was readily available and it became possible to process on the fly. These days, data converters use other techniques to linearize their performance. As a simple hairy-knuckled low-brow analog guy I am not really the right person to discuss compensation algorithms and all that jazz.

At any rate I was supposed to be off this week, but need to do a bit more work today, and do not feel this is going anywhere I can contribute. Good luck. Be sure to let us know what you implement and how it works!
 
OP
Krunok

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,070
Location
Zg, Cro
You can assume I have an inkling into convolution. I am not sure exactly what convolution engine you are addressing -- your distortion correction algorithm? Note distortion is nonlinear by definition so you must take that into account in any solution. EQ will reduce (or increase) the amplitude of harmonic distortion and everything else affected by the room (etc.) but that is not the same thing as canceling the distortion. If the room boosts or cuts the harmonic frequency then compensation can counter that; it does not eliminate the distortion. And as has been said many times by many folk, if you do single-frequency measurements, then you can use that compensation to more accurately estimate the distortion from your speaker (and whatever else is in the chain; all assumptions assume the speaker dominates the distortion, I think). Unless it manages to compensate phase and reflections it won't be completely accurate but should be close enough to get the magnitude.

I have lost track of your goal. Originally I thought it was to measure the distortion from the speakers. Now you appear to be targeting distortion compensation using look-up tables? Fred Irons (MIT) and some of his students at MIT (I think, decades ago) wrote about phase-plane compensation that would correct the distortion. It has been many years since I played with that technique, but did implement it, and it works. You need to characterize a fairly large set of signals (frequency, phase, amplitude) to create the table. Error compensation evolved once DSP was readily available and it became possible to process on the fly. These days, data converters use other techniques to linearize their performance. As a simple hairy-knuckled low-brow analog guy I am not really the right person to discuss compensation algorithms and all that jazz.

At any rate I was supposed to be off this week, but need to do a bit more work today, and do not feel this is going anywhere I can contribute. Good luck. Be sure to let us know what you implement and how it works!

I think I didn't explain my idea properly. I'm not sure the idea itself is sound, but from your post, as a start I believe I didn't explain it well, so let me try again:

Measuring phase:

Let's assume a single 500Hz tone is played by the speakers. I see 2 things happening there and both of them involve both, room and speaker. In fact, I don't think they need to be separated but rather treated as one, as both of them are affecting what I hear sitting at my LP.

So, first: the tone that should make 80dB of SPL at my LP actually is making 77dB as a result of speaker response not being linear and the room modes. Second: along with 500Hz tone few additional tones have been unintentionaly created and played by the speaker (summary effect of which we are calling THD). For the sake of this analisys let's assume there were only 2 of them, 2nd and 3rd harmonic. Their amplitude depends on the SPL of baseline 500Hz tone and their frequency is always 2*freq of base tone for 2nd harmonic distortion element and 3*freq of basse tone for 3rd harmonic distortion element.

Processing phase:

Let's assume we have created a lookup table which contains 2 independent variables (frequency and SPL/amplitude of the base tone) and 2 dependent value (SPL of 2*freq and SPL of 3*freq of base tone) which we measured.
Lets assume our table has resolution of 5dB for the SPL base tone variable.
Let's also assume our table has some appropriate freq resolution, probably in log scale for practical purposes.

We feed that table into convoluton engine in the same manner we feed it with FIR filter. At one slice of time convolution engines sees that it has to process 2 tones: 522Hz at 73dB and 1875Hz at 57 dB. Engine calculates amplitude correction for 522Hz and 1875 Hz base tones based on FIR filter as it normally does and modifies signal slice acccordingly. In addition, engine looks ap the "distortion response" table at the closest points (say it is 500Hz/75dB for the first tone and 2000Hz/60dB for the second tone). Engine reads from the table what are expected distortion harmonics amplitude of the tones to be generated by the speaker/room for those 2 base tones and inserts into signal slice the same tones as harmonic distortion components of those 2 base tones would be, but with the opposite phase (or applies some other more clever cancelling mechanism). Engine moves to next slice of time. And so it goes..

So, do you think it would work? :)
 

Cosmik

Major Contributor
Joined
Apr 24, 2016
Messages
3,075
Likes
2,180
Location
UK
Fred Irons (MIT) and some of his students at MIT (I think, decades ago) wrote about phase-plane compensation that would correct the distortion. It has been many years since I played with that technique, but did implement it, and it works. You need to characterize a fairly large set of signals (frequency, phase, amplitude) to create the table.
I found a link to ADC distortion compensation, but not speakers.

It includes the following statement:
Because of the wide range of static and dynamic error sources for ADCs, performance testing on a given converter should mimic the intended application as closely as possible. Unfortunately, no direct quantitative method exists for translating performance measured by one test into performance measured by another.

This, I believe, basically says: "You might be able to measure an ADC's performance using steady state waveforms in the frequency domain (for example), apply compensation, and measure it again using the same steady state waveforms. But don't imagine that this will automatically translate into instantaneously-correct compensation in an application that isn't based on steady state waveforms".

A very simple example: if I need my ADC to digitise a 1kHz sine wave reference, and notice that it produces some strong 2kHz spurious component in the signal, I can perfectly compensate for this by simply notch filtering the digitised signal at 1kHz. Or steeply low pass filter at some frequency below 2kHz. Or I can appear to correct the error by simply adding a suitable continuous level of 2kHz, in anti-phase to the spurious component, to the digitised signal - the Fourier transform will give the correct result. But it doesn't mean that the ADC is giving the correct output dynamically. If the 2kHz error was not, in fact, a continuous tone, but came in some form of enveloped pulsing, the dynamic output of the system will now be wrong even though an FFT accumulation appears correct. Clearly a system that appears perfect for a certain kind of steady state application may be giving the wrong output dynamically e.g. for music.

And an ADC is going to be much simpler to compensate than a speaker cone that is breaking up!
 

andreasmaaan

Master Contributor
Forum Donor
Joined
Jun 19, 2018
Messages
6,652
Likes
9,410
@Krunok I actually think the idea you’re describing doesn’t sound so different from the one Don mentioned. It would be interesting if anyone had a copy or link to those MIT papers.

I do think the effectiveness would be limited for the reasons Cosmik mentions, although - at least theoretically - i don’t see why it wouldn’t be possible to build a very sophisticated model of a transducer and compensate for its nonlinear (not only harmonic) distortion quite effectively.
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,869
Likes
37,892
I think I didn't explain my idea properly. I'm not sure the idea itself is sound, but from your post, as a start I believe I didn't explain it well, so let me try again:

Measuring phase:

Let's assume a single 500Hz tone is played by the speakers. I see 2 things happening there and both of them involve both, room and speaker. In fact, I don't think they need to be separated but rather treated as one, as both of them are affecting what I hear sitting at my LP.

So, first: the tone that should make 80dB of SPL at my LP actually is making 77dB as a result of speaker response not being linear and the room modes. Second: along with 500Hz tone few additional tones have been unintentionaly created and played by the speaker (summary effect of which we are calling THD). For the sake of this analisys let's assume there were only 2 of them, 2nd and 3rd harmonic. Their amplitude depends on the SPL of baseline 500Hz tone and their frequency is always 2*freq of base tone for 2nd harmonic distortion element and 3*freq of basse tone for 3rd harmonic distortion element.

Processing phase:

Let's assume we have created a lookup table which contains 2 independent variables (frequency and SPL/amplitude of the base tone) and 2 dependent value (SPL of 2*freq and SPL of 3*freq of base tone) which we measured.
Lets assume our table has resolution of 5dB for the SPL base tone variable.
Let's also assume our table has some appropriate freq resolution, probably in log scale for practical purposes.

We feed that table into convoluton engine in the same manner we feed it with FIR filter. At one slice of time convolution engines sees that it has to process 2 tones: 522Hz at 73dB and 1875Hz at 57 dB. Engine calculates amplitude correction for 522Hz and 1875 Hz base tones based on FIR filter as it normally does and modifies signal slice acccordingly. In addition, engine looks ap the "distortion response" table at the closest points (say it is 500Hz/75dB for the first tone and 2000Hz/60dB for the second tone). Engine reads from the table what are expected distortion harmonics amplitude of the tones to be generated by the speaker/room for those 2 base tones and inserts into signal slice the same tones as harmonic distortion components of those 2 base tones would be, but with the opposite phase (or applies some other more clever cancelling mechanism). Engine moves to next slice of time. And so it goes..

So, do you think it would work? :)
No unfortunately.

If the size of the harmonics at your LP is somewhat altered by build up of resonance or nulling, then your ear will mostly go by the first direct arrival while your method of compensation is not going to be correct for that. Unless I've missed where you think you are going to be able to filter out the direct vs reflected room differences.
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,869
Likes
37,892
@Krunok I actually think the idea you’re describing doesn’t sound so different from the one Don mentioned. It would be interesting if anyone had a copy or link to those MIT papers.

I do think the effectiveness would be limited for the reasons Cosmik mentions, although - at least theoretically - i don’t see why it wouldn’t be possible to build a very sophisticated model of a transducer and compensate for its nonlinear (not only harmonic) distortion quite effectively.
Yes, what you want is to have detailed anechoic measures of actual distortion from the speaker itself. If you can compensate for those, then effectively you are eliminating the effects of distortion before they get into the room. Then you can treat the room and everything else with no concern for distortion.

I believe a few of the RoomEQ devices do work like this for frequency response though I don't know if they do anything for distortion compensation.
 

andreasmaaan

Master Contributor
Forum Donor
Joined
Jun 19, 2018
Messages
6,652
Likes
9,410
Oh yes, I should have made clear: this type of compensation could work only for a transducer, not for a speaker in-room.

Also, any errors in predicting transducer nonlinearities would manifest as additional distortion in the output. So considering how complex and nonlinear transducers are, it would be difficult to do it well enough that the net outcome were positive and not the opposite.
 
OP
Krunok

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,070
Location
Zg, Cro
No unfortunately.

If the size of the harmonics at your LP is somewhat altered by build up of resonance or nulling, then your ear will mostly go by the first direct arrival while your method of compensation is not going to be correct for that. Unless I've missed where you think you are going to be able to filter out the direct vs reflected room differences.

I agree. But that goes for the frequency response correction of the base tone as well: if the size of the base tone is somewhat altered by build up of resonance or nulling you can simply forget that FIR filter will be able to do anything about it. But that still doesn't imply there is no sense in frequency response correction, so the same logic can be applied to "distortion correction" as well, right? It could still make sense to do it.. :D
 
OP
Krunok

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,070
Location
Zg, Cro
Oh yes, I should have made clear: this type of compensation could work only for a transducer, not for a speaker in-room.

Also, any errors in predicting transducer nonlinearities would manifest as additional distortion in the output. So considering how complex and nonlinear transducers are, it would be difficult to do it well enough that the net outcome were positive and not the opposite.

Of course, but again, isn't that the case with frequency response correction? Or you think distortion is by its nature harder to measure/correct in in-room scenario so only tranducer scenario would work?
 
Last edited:
OP
Krunok

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,070
Location
Zg, Cro
Yes, what you want is to have detailed anechoic measures of actual distortion from the speaker itself. If you can compensate for those, then effectively you are eliminating the effects of distortion before they get into the room. Then you can treat the room and everything else with no concern for distortion.

I believe a few of the RoomEQ devices do work like this for frequency response though I don't know if they do anything for distortion compensation.

But frequency response EQ works for in-room as well. Why exactly do you think it wouldn't work for the in-room scenario but only for anechoic?

But don't tell me that nulls/resonances of the room will screw the things up as that will happen anyway. I do admit that those nulls/resonance characteristic of the room make things much harder to measure, but if it works for frequency response I would really like to try if it would work for distortions as well.
 
OP
Krunok

Krunok

Major Contributor
Joined
Mar 25, 2018
Messages
4,600
Likes
3,070
Location
Zg, Cro
No unfortunately.

If the size of the harmonics at your LP is somewhat altered by build up of resonance or nulling, then your ear will mostly go by the first direct arrival while your method of compensation is not going to be correct for that. Unless I've missed where you think you are going to be able to filter out the direct vs reflected room differences.

I don't understand what you mean - as it was processed by DSP first direct arrival of tones would contain inverted phase harmonic distortion components.

No, I wouldn't filter the reflections. I took them into account when I was measuring distortions so I hope they will stay that way when I add inverted phase components.
 
Top Bottom