FSAF (Fast subband adaptive filtering) measurement

John Mulcahy

REW Author
Thread Starter
Joined
Apr 3, 2017
Messages
7,907
This thread is for discussion of the FSAF measurement process. The FSAF process was developed by by Michael Tsiroulnikov aka Michael Zrull. See See Michael Zrull (2020) Fast Subband Adaptive Filtering (FSAF) MATLAB Central File Exchange and Michael Tsiroulnikov (2022) Loudspeakers for AEC: Measurement and Linearization, MATLAB Central File Exchange. FSAF measurement allows total distortion + noise (TD+N) to be measured for any test signal, including clips of music. REW's implementation of FSAF allows measurement with noise signals (white, pink, brown) or a section of a file, which can be WAV, AIFF, Flac or MP3. Help for FSAF measurement is here.

FSAF measurement works very well, but there is an important caveat: the process is very sensitive to clock rate differences and clock rate stability. The best results are obtained when using the same audio interface for both output and input, so there is only one clock source. If the input and output devices are different REW can use timing markers before and after the measurement signal to apply clock rate correction. Even with rate correction applied the results are heavily affected by the stability of the clock sources. USB microphones which rely on the USB clock are not suitable for FSAF measurement as the USB clock is not stable. That means, for example, UMIK-1, UMM-6 and Omnimic are not suitable for FSAF measurements. It is possible to use a USB mic which has an internal clock source, such as UMIK-2.
 
Last edited:

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
John, good afternoon. I tried FSAF. More precisely, I began to understand. If you specify a wav file to import that only has one track, REW asks which channel to import. Further. In this situation, you can specify an empty import channel with nothing in it. And REW accepts this. Then you can make a measurement that ends in error.

Can REW recognize imported files as single-channel and set the channel number of the content itself?
 

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
Also, if you select the correct channel with content and take a measurement, the message 'Maximum number of iterations exceeded' began to appear. Although I took about 10 measurements yesterday, there was no such message.
 

Attachments

  • err FSAF.txt
    1.3 KB · Views: 9

John Mulcahy

REW Author
Thread Starter
Joined
Apr 3, 2017
Messages
7,907
Can REW recognize imported files as single-channel and set the channel number of the content itself?
No, it would have to load all the data from all channels first to do that. If your data is mono why not save a mono file?
 

John Mulcahy

REW Author
Thread Starter
Joined
Apr 3, 2017
Messages
7,907
the message 'Maximum number of iterations exceeded' began to appear
That's from ending up with a matrix that can't be inverted. Can you attach the WAV files for the excitation and mic data? They will be in the log files temp folder (or the FSAF folder if you have set that). The excitation filename starts exc- and the mic starts mic-, both followed by the UUID of the measurement they relate to.
 

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
Files from the REW folder.
 

Attachments

  • temp.zip
    16.7 MB · Views: 49

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
Now when I try to open a channel without data, I get a message that the channel has no data, and REW continues to work.

If in the REW sound card settings I specify output R and reference output L, then both will be played through L.
 

John Mulcahy

REW Author
Thread Starter
Joined
Apr 3, 2017
Messages
7,907
Those don't appear to be error files. FSAF only sends signals on the measurement output, its timing markers (if used) are only for sample rate adjustment. The FSAF excitation should be broadband. To limit the range of the excitation output signal use the filter options.
 

Tikkidy

New Member
Joined
Feb 22, 2019
Messages
29
Hi John,

Fascinating. Can't wait to try it!
Now, I previously chatted to you about measuring distortion. Since then, I've looked at it a little more closely.

Turns out it was a multitude of things, including software drivers for the audio interface, the test amplifier, as well as the microphone. And of course, the test environment and test methodology.

So since that time, I've upgraded my measurement chain/process.

Along the way I came across interesting things that you may be interested in- a potential mic candidate for FSAF- please check your email.

best regards
Thanh.
Australia
 
Last edited:

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
John, good afternoon. I keep getting the screenshot message. Adjusting the signal level on the amplifier does not change anything. How to proceed?
 

Attachments

  • Er mess ASAF.JPG
    Er mess ASAF.JPG
    75.8 KB · Views: 45

John Mulcahy

REW Author
Thread Starter
Joined
Apr 3, 2017
Messages
7,907
Per the message, adjust the Level setting on the Measure dialog so that the digital data does not clip.
 

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
I tried changing the level in the measurement window, it didn't change anything.
 

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
However, in the soundcard window I did not select the reference input. His indicator showed clipping. And when I chose it, the reference input level became real, and a reaction to the level change appeared in the measurement window. But there is nothing connected to the reference input.
 

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
After switching to the FSAF measurement, at some point the SPL and Impedance buttons disappear in the measurement window.
 

John Mulcahy

REW Author
Thread Starter
Joined
Apr 3, 2017
Messages
7,907
I tried changing the level in the measurement window, it didn't change anything.
Again, per the message, the output level has to be some amount below -12 dBFS to avoid digital clipping at the output. The crest factor of the pink noise is somewhere around 13 to 14 dB, so the peaks are that much higher than the rms level.

However, in the soundcard window I did not select the reference input. His indicator showed clipping.
REW is only driving the output, whatever happens on the input is due to your system and its configuration.

After switching to the FSAF measurement, at some point the SPL and Impedance buttons disappear in the measurement window.
FSAF is only for SPL measurements, so the buttons are not used and not shown.
 

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
REW is only driving the output, whatever happens on the input is due to your system and its configuration.
We are talking about a situation where the reference input is not selected at all, neither analogue 1 nor analogue 2. Because it is not used for the current measurement. And because his choice for some reason was reset from previous use. When I selected it, either analog 1 or analog 2, even though it is not required for the current measurement, REW stopped seeing clipping.
 

John Mulcahy

REW Author
Thread Starter
Joined
Apr 3, 2017
Messages
7,907
The message you posted had nothing to do with the input, the message title is "Output signal likely to clip".
 

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
This is true. But, until I explicitly selected the loopback input, changing (decreasing) the level in the soundcard window and in the measurement window caused a clipping message. To repeat this situation, you need to reset the loopback input selection so that it says 'input not selected'.
 

John Mulcahy

REW Author
Thread Starter
Joined
Apr 3, 2017
Messages
7,907
To repeat this situation, you need to reset the loopback input selection so that it says 'input not selected'.
Makes no difference for me, works normally with it saying "Choose a loopback input" or selecting either of the inputs.
 

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
I discovered that the file for saving settings, rewprefs.txt, was missing from the "C:\Users\myname\REW" folder. And the soundcard fell off several times. Now everything works as it should. For any loopback inputs and when the loopback input is not selected. Also at the output level, -9 dB, at which REW previously detected clipping.
 

John Mulcahy

REW Author
Thread Starter
Joined
Apr 3, 2017
Messages
7,907
Also at the output level, -9 dB, at which REW previously detected clipping
That's not a detection, it is from measuring the peak value of the test signal and so knowing that the output will clip in the digital data before reaching the interface.
 

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
That's not a detection, it is from measuring the peak value of the test signal
Thanks for clarifying. Since publishing the screenshot in post 10, I have not changed anything in the soundcard, nor in the amplifier, nor in the REW levels, nor in the file with the test signal (it is inside REW, I do not have access to it). However, there was a problem before, but now there is none. I will suspect that when a soundcard falls off, anything can happen. Therefore, the soundcard fell off - you need to reconnect. But I didn't do it. I'm sorry for the trouble.
 

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
John, hello. Will FSAF work not for acoustic measurement, but for electrical measurement of amplifier distortion?
 

sm52

Member
Joined
Mar 14, 2019
Messages
1,000
Thank you. I took FSAF, acoustic, and regular sweep measurements. Distortion levels differ by a factor of 10. Sweep shows 0.3%, FSAF 5-7%. The measurement conditions are the same. How do I know if I did the FSAF measurement correctly? What is the right signal level to choose? I noticed that as the signal level increases, at first the noise and distortion levels decrease, but after a certain value, on the contrary, they begin to increase. On my amplifier, out of a full scale of 100 units it is 48.
 
Top Bottom