loudspeaker distortions measurement in matlab

Dear DIYers,

I have developed a system identification /adaptive filtering approach FSAF, which (R2.0) is capable of speaker measurements using any excitation, such as music.

The main advantage over MLS/chirp is that FSAF linearises the loudspeakers at the true working area on real signal, and produces a non-LTI (Linear Time-Invariant) residual which you can examine both visually and aurally (.wav) in "fine print".

Here is ADAM F5 on 1 min from Mozart Piano Concerto, at 80dBSPL@1m:
aoTX80dBC50cm-mzrt-5.png


aoTX80dBC50cm-mzrt-6.png


https://www.mathworks.com/matlabcentral/fileexchange/83363-fast-subband-adaptive-filtering-fsaf
You'll need to read fsaf.4.pdf chapter 3 for spkid.m methods descriptions.
The same chapter also contains comparisons with old MLS / chirp methods.
You don't need to understand the underlying math to run the spkid.m class functions.
The license for FSAF is GPL.
The home version of Matlab costs $75, plus sigpro toolbox.
You may be able to run the spkid.m in Octave with some modifications (I have not tried it).

Hope it helps,
MZ
 
  • Like
Reactions: 6 users
Hi,
thanks for posting it, this is very interesting! I read the manual 4 chapter 3 and it looks extensive, although most of it went over my head as need to get more signal processing knowledge, like basics :D

For the limited knowledge I have I can imagine applications for this like evaluating effect of directivity, have look at distortion with real music while experimenting with current drive / increased series impedance, and perhaps even somehow develop some FIR filter to address some LTI issues addressable (see Dave Gunness temporal EQ stuff).

More importantly, perhaps some of the libraries/functions could help to make better quasi anechoic measurements at home? Now I have to use ~4ms windowing for the responses measured in living room and resolution is quite poor < 1kHz, getting rid of some reflections in the measured impulse response to get longer windowing would be cool, mo resolution for crossover work with VituixCad :) No idea if this is related in anyway. Well, cool stuff anyway!
 
Thank you for your kind words! No, the LTI issues are related to the RIR inversion which is a separate issue I do not deal with. Quasi-anechoic measurements in a living room are best achieved with a pair of cardio mics, (2nd-order mic) calibrated for a given distance, see spkid.mic_eq_sos(...) method. IMHO, the below 1kHz response is best tracked as the top of the ridge of the SFTF impulse response, see spkid.rir_arete_plot(...). You may be also interested in https://www.mathworks.com/matlabcen...peakers-for-aec-measurement-and-linearization containing
  • ADAM X-ART F5
  • ADAM X-ART F5 AMT tweeter
  • AIYIMA MJD4
  • AIYIMA 3.5" silk film 12 Ohm 50W
  • Bowers & Wilkins CWM-650 tweeter
  • Focal PS130F
  • Goldwood Sound GW-205-W
  • Goldwood Sound GT-501
  • HIVI Research DM-7500
  • Infinity 4032
  • LABO LB-PS1401D
  • PYLE PRO PDBT19
  • SB Acoustics SB12CACS25-4
  • Sounderlink AMT-920 (aka NEO8)
  • Vifa (Tymphany) NE95W-04
  • JmLAB Spectral 908.1 as the reference.
characterization of real speech/music performance, together with the limit of improvements using the current drive (by properly correlating the current and mic signals) which differ from driver to driver quite a lot.
 
  • Like
Reactions: 2 users
Very interesting but very hard to read these graphs 🙂 need to spend some time to understand..
A) Anyway correct me if i am wrong. This method is good that it shows distortion with real world signal, but bad because there is no SNR reduction like in sine sweep and very quiet environment required?
B) What conclusions you made from calculating distortions for current drive? My finding is that current drive cleans higher order harmonics. I did measure only few drivers but it looks like pattern.
 
mbrennwa: There shall be a blue download button near the top right corner.... but I am afraid you may need to register on Mathworks Community.
Baffles: I agree, It's not easy to find a balance between a few graphs with many curves on each and many graphs with a few curves on it. I hear you and will make adjustments in future revisions.
A. No, it's Mean Square Error (MSE) optimal in all conditions, Kernel Least Squares is the BLUE: Best Linear [Un]biased Estimator. 1) there is always a tradeoff between observation time, excitation power, and noise: MSE~||x||/(sigma*sqrt(T) 2) it's much easier to listen to non-linear residuals when distortions are above the noise floor 3) A loudspeaker is not a stationary device, it changes with the signal. To learn the most about distortions at a certain point, you may want to shink the learning interval as much as possible (2...3 RT60), and here low noise comes in handy. 4) IMHO, sine sweep is deceiving - it measures fewer distortions of a loudspeaker than there are out there.
B. that the current drive "softens" the loudspeaker distortions, as it should because AFAIK any current drive is effectively a feedback control. The bandwidth of the feedback loop shall matter a lot.
 
Quasi-anechoic measurements in a living room are best achieved with a pair of cardio mics, (2nd-order mic) calibrated for a given distance, see spkid.mic_eq_sos(...) method.

Could you expand on this method a bit, please? I'm not following how such a setup would be done.
IMHO, the below 1kHz response is best tracked as the top of the ridge of the SFTF impulse response, see spkid.rir_arete_plot(...).
If you could describe this in more detail too, please.

Thanks!
 
Could you expand on this method a bit, please? I'm not following how such a setup would be done.
The theory of beamforming could be found in many sources. Differential mic arrays are well described by Gary W.Elko in the book 'Audio Signal Processing for Next Gen Multimedia" of which illegal scans can be easily found ... somewhere. Essentially, you are looking for the simplest setup - which is a 2 mic endfire "delay and sum" mic array. Both mics have to be equalized to match a reference omni by spectral shape and gain. The distance between mics shall be integer*(c/fs)=N*7.1mm to avoid fractional sampling. Cardio falloff is not too bad for 30 deg.


PB070082.jpg


You may use more mics - but the number of things that can go wrongs go disproportionally to the benefits.
PB070084.jpg


Another way to improve the directivity index of a cardio mic is to increase curvilinear distance like in:
PB070011.jpg


The SPK + Room IR can be represented in Gabor-like time-frequency domain, with a spectrogram whose window width grows ~1/f below 1kHz. The top of the ridge characterizes the spk itself, the falling slope - room. For JmLab 908.1 Spectral (with woofer port closed) at a distance of 2.2m it looks like this:
fofTB80dBC220cm-wnse-4.jpg

If you attempt to take a usual FR (50cm, 100cm, 170cm, 220cm), you'll get the results of variable ugliness, like this:
foTX80dBC220cm-distance-7.jpg

More technical details can be found on pages 34/35+ in part 4 (fsaf.4.pdf). I am sorry if my explanations require too much signal-processing knowledge. I wish I knew how to explain it in a few words to a layman ... but I don't.
 
  • Like
Reactions: 1 users
The theory of beamforming could be found in many sources...
Thank you very much for the detailed explanation, and again for making an excellent too available to the DIY community! As well as the pictures, and text recommendation, those were most appreciated.

I don't have a background in signal-processing, but I have been dabbling in beamforming for speaker measurement, so your explanation wasn't too hard to follow.