FFT windowing and frequency response resolution - diyAudio
Go Back   Home > Forums > Loudspeakers > Multi-Way

Multi-Way Conventional loudspeakers with crossovers

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 22nd September 2013, 06:33 AM   #1
diyAudio Member
 
Join Date: Mar 2007
Location: California
Default FFT windowing and frequency response resolution

Due to some inadvertent thread hijacking of another thread, I thought I would move the topic here into its own thread. To recap, start reading at this link to the "other" thread and continue for pages and pages.

We've been discussing the process of windowing an impulse response taken on a loudspeaker in a room, where echos or reflections of the direct sound are observed some time (e.g. 5 ms) after the arrival of the initial impulse. These contaminate the results. In order to create a "quasi anechoic" frequency response from the impulse, it is first "windowed" using a start and end gate. Only the signal between the two gates is used to generate the frequency response.

Because of the properties of the inverse FFT used to go from the time (impulse response) to the frequency (frequency response) domain, the finite window of data used (e.g. 5ms) creates a "lower limit" below which no frequency information is contained in the signal, and even if your signal processing program (e.g. ARTA, HOLM, etc) spit out some number for the frequency response below the minimum frequency determined by the window, it is nonsense.

The debate is whether or not padding the end of the windowed data with zeros can increase the effective window length, giving you "more" resolution in the frequency domain, at least above the minimum frequency determined by the original window length.

Game on!
  Reply With Quote
Old 22nd September 2013, 07:23 AM   #2
diyAudio Member
 
Join Date: Mar 2007
Location: California
I thought I would post the results of an interesting experiment that I did to look into the windowing effect a little more deeply.

The set up is an outboard A/D-D/A converter and a MiniDSP 2x4. I connected an output channel of the converter to the input of the MiniDSP and then routed the MiniDSP output back to the input of the converter to loop through the MiniDSP. Then I used my Active Crossover Designer tools to create a set of filters that would represent a woofer, including HF rolloff at 5kHz, a breakup peak at 4kHz, 6dB of baffle step, and the ultimate LF rolloff at 50Hz. In this way I can model a driver's frequency response, and generate an impulse from a known response without the presence of reflections or echos.

Next I used ARTA to obtain the impulse response of the system. This is shown below:
Click the image to open in full size.

Using a fixed "start" gate at 2.8mS (just before the appearance of the impulse), I then varied the "end" gate to create several different window lengths. The windows used were:
2.5ms = 400 Hz cutoff
5.0ms = 200 Hz cutoff
12.8ms = 100 Hz cutoff
22.8ms = 50 Hz cutoff
120ms = ~10Hz cutoff

The different frequency responses are shown in the figure below.
Click the image to open in full size.

There is not really too much that is surprising here. There is no change to the high frequency data, only the low frequency end of the response is experiencing changes.


What if we throw in a high Q peak? I used a Q=20 +6dB peak at 2.1k Hz and repeated the process. First up, the impulse response:
Click the image to open in full size.

Now we have some ringing in the impulse caused by the high Q peak.
Let's see what happens when we use the same set of window lengths:
Click the image to open in full size.

Again, the same changes in the low frequency part of the response are seen, but now we have some changes to the high Q peak. The bandwidth of this peak is pretty narrow, about 200 Hz wide. The 2.5ms (400 Hz) window is only partly resolving the peak, but it still picks it up partly. The 5ms (200 Hz) window does a pretty good job of representing the high Q peak. Longer windows completely capture the peak. This is because enough of the impulse, including the part generated by the high Q peak, fall within the windows used here. Note that not all of the high Q ringing must be captured within the window for the peak to be adequately resolved. For instance, the 5ms window has an end gate at 7.8ms where the ringing is still present.


What if the peak is at a lower frequency, for instance close to the minimum resolved frequency? To test this I moved the Q=20, +6dB peak to 300 Hz and repeated the process. The impulse response is shown below:
Click the image to open in full size.

Now we have a more challenging problem. The impulse is not dying out very quickly.
Let's see what happens if we repeat our windowing of this impulse:
Click the image to open in full size.

Now the 2.5ms, 5ms, and 10ms windows do not result in the feature being captured adequately. Even a 20ms window isn't great and only the VERY long 100ms window really gets it. In this case the ringing in the impulse response continues for too long to make it possible to capture the feature in the frequency response, if the measurement was taken in this way. Probably only an outdoor ground plane measurement in a LARGE open area would make it possible to gather 100+ ms of reflection free impulse response data.


So, what does all of this mean?

Well, for one, we are lucky that we don't really ever encounter a high Q peak at low frequencies! Some larger woofers with metal cones might have a high Q breakup peak, but it is likely to be over 1-2kHz. But even if the peak is narrow, if it is at a relatively high frequency it's impulse will die out fast enough to be captured by a window that is a practical length even if the width of the peak is similar to the minimum resolved frequency.

In the vast majority of cases, a real world loudspeaker should behave similar to the initial example and the windowing effects will be very benign. In fact, here is the impulse response for a real loudspeaker taken in a small (4m x 4m x 2.5m) room, for which the window was about 5ms:
Click the image to open in full size.

As you can see, the initial impulse has died out except some low frequency oscillation. The 5ms window is perfectly adequate for describing the data.


.
  Reply With Quote
Old 22nd September 2013, 08:28 AM   #3
mabat is offline mabat  Czech Republic
diyAudio Member
 
Join Date: Sep 2004
Location: Prague
Quote:
2.5ms = 400 Hz cutoff
5.0ms = 200 Hz cutoff
12.8ms = 100 Hz cutoff
22.8ms = 50 Hz cutoff
120ms = ~10Hz cutoff
Why do you still call it cutoff, when it's just the resolution of the whole data?
With 5 ms gate there is basically the same amount of information between 0 - 200Hz as is between 200 and 400Hz, 750 - 950Hz, just as between 2000 and 2200Hz, etc.

That's the reason why it is much less of a problem as the frequency rises - the resolution is the same as this absolute number (200Hz in case of 5ms gate) across the bandwidth. At 10 kHz it is just a very small fraction of an octave. Not so at 400Hz. This simply comes from the FFT and there's nothing you can do with that.

As if you zero pad to much larger data set, there will be no cutoff. If there are 1000 points for 20kHz bandwidth, the first point after DC (0 Hz) will be at 20Hz and this is not the cutoff, it's just the next point after DC (which is also computed by the FFT). The next is 40Hz, etc... It will just "approximate" the above 5ms data with higher data density, i.e. it will look smooth. Take 100,000 points and you have almost a line. But still coarse line, regarding the underlying data if they were truncated too soon.
__________________
Marcel

Last edited by mabat; 22nd September 2013 at 08:58 AM.
  Reply With Quote
Old 22nd September 2013, 09:24 AM   #4
mabat is offline mabat  Czech Republic
diyAudio Member
 
Join Date: Sep 2004
Location: Prague
One more thing to add. If the impulse response itself ceases to zero in 5ms, it just means that the system itself is very smooth and the inherent 200Hz-smoothing made by FFT with 5ms of this data will not further affect it's frequency response - you can smooth straight line how you want, with no effect. Take 100 ms with this impulse at the beginning (i.e. add zeroes) and the frequency response will look the same, of course. Than there's simply nothing to improve by the "higher resolution" of the larger data set.


- I don't feel I have something more to say here.
__________________
Marcel

Last edited by mabat; 22nd September 2013 at 09:35 AM.
  Reply With Quote
Old 22nd September 2013, 05:09 PM   #5
gedlee is offline gedlee  United States
diyAudio Member
 
gedlee's Avatar
 
Join Date: Dec 2004
Location: Novi, Michigan
Charley - thanks very enlightening discussion and right on in every regard. Marcel still does not seem to "get it", but maybe he will some day.
  Reply With Quote
Old 22nd September 2013, 05:18 PM   #6
mabat is offline mabat  Czech Republic
diyAudio Member
 
Join Date: Sep 2004
Location: Prague
Quote:
Originally Posted by gedlee
I have gating, I don't need an anechoic chamber - that's the point!! An anechoic measurement would be identical to mine above 200 Hz.
You can't prove this claim without anechoic chamber, right?
__________________
Marcel
  Reply With Quote
Old 22nd September 2013, 05:27 PM   #7
gedlee is offline gedlee  United States
diyAudio Member
 
gedlee's Avatar
 
Join Date: Dec 2004
Location: Novi, Michigan
I made this comment in the other thread but I will make it again here because it is important. As a speaker gets better and better, i.e. a more and more compact impulse response with a flatter and flatter frequency response, the measurement errors from gating become less and less. This means that poor speaker benefit from these errors, but better speakers do not.

Perhaps one should always show the actual impulse response before windowing so that users of the data can see if there is a potential for a bad window implementation. I would certainly be willing to do this. I'm not trying to hide anything.
  Reply With Quote
Old 22nd September 2013, 05:31 PM   #8
gedlee is offline gedlee  United States
diyAudio Member
 
gedlee's Avatar
 
Join Date: Dec 2004
Location: Novi, Michigan
Quote:
Originally Posted by mabat View Post
You can't prove this claim without anechoic chamber, right?
I am not sure that is true, but in any case I am not interested in proving anything. I know the facts.
  Reply With Quote
Old 22nd September 2013, 05:34 PM   #9
mabat is offline mabat  Czech Republic
diyAudio Member
 
Join Date: Sep 2004
Location: Prague
No, if you KNEW, you could prove it, right away. But you DON'T really know, because you have only data from in-room response, gated to 5 ms. That's what this is all is about
__________________
Marcel
  Reply With Quote
Old 22nd September 2013, 06:21 PM   #10
d a o is offline d a o  Denmark
diyAudio Member
 
Join Date: Apr 2010
Location: Jutland
Gating was never promised to be perfect but
XX many studies have shown that it is what comes closest

Not many people have access to "Anechoic chamber" and very few are so large* that it can be used for sub bass

PS no people are living in a "Anechoic chamber"So why measure a speaker there?
Gating remove the room influence, in other words, probably the best choice* anyone can use

Thanks to R. Heyser
__________________
Greetings Hans
www.diyaudio.dk/
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FFT and Windowing JMB Multi-Way 25 2nd September 2013 02:55 PM
in-room frequency response & transient response MCPete Multi-Way 1 8th October 2011 07:31 AM
Number of taps vs. frequency resolution for fir filters Dan_E10 Digital Source 3 20th June 2008 09:09 PM
Phase response and imaging / resolution Branwell Multi-Way 9 25th October 2004 02:00 PM
Doubts on Phase Response and Frequency Response dumrum Multi-Way 11 5th April 2004 11:39 AM


New To Site? Need Help?

All times are GMT. The time now is 03:34 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2