1
votes

I want to do some modeling that will repeatedly call an iFFT. This will take as input a parametric model of the complex frequency response (amplitude, phase) and produce as output an impulse response. I would like to compare this to a "windowed" impulse response that I have measured for a loudspeaker in a room. The measured impulse can be characterized by an initial portion that corresponds to sound traveling directly through the air to the microphone that lasts a few millisecond, after which sounds that reflect off of the surfaces in the room (floor, walls, etc.) contaminates the signal. The uncontaminated portion is maybe 5% of the total measured impulse. I want to compare the impulse response that the iFFT generates from the frequency response to ONLY the uncontaminated portion of the measured impulse.

If needed I can calculate the entire impulse response from the frequency response and then just throw away 95% of the result but this seems to be very inefficient. The iFFT will be calculated many, many times (thousands probably) while my model is being optimized so I want to make sure that I can make it as efficient as possible. At this point my only option seems to be using FFTW and then just throwing away the data that is not needed (for lack of a better idea).

Is there a fast way to calculate the inverse FFT only for those time points of interest, e.g. not for the entire time span that the FFT can access? For instance, I may only need 5% of the time points. I am not intimately familiar with the computation of the FFT and iFFT, so I don't have insight on the answer to this question.

Edit: I rechecked, and if I record a 16k impulse at 96kHz, there are only about 475 samples of "good data" before the reflections contaminate the signal. This is just under 3% of the total recorded signal. How can I efficiently calculate only these 200 points from my frequency response???

1
If you're only looking for a small number of points, then you can just apply the DFT formula directly for those points. But unfortunately, that 5% is probably already too much for a sufficiently large FFT.Mysticial
This question might be better targeted towards the folks at dsp.stackexchange.comAndy

1 Answers

0
votes

Its all a matter of time-length and frequency-resolution.

If your original (measured) impulse response is under 512 samples, you may just use these 512 samples and calculate a 512 point-FFT. This will give you poor frequency-resolution, but you could interplate the spectrum if you wish.

In the other direction, just "downsample" your long spectrum to some 512 frequency bin-spectrum (for example take every 4th line) and do the inverse FFT, this will result in a short 512 sample impulse response.