DSPRelated.com
Forums

need help - converting from a Frequency spectrum to a FIR filter

Started by Unknown September 8, 2005
Hello,

Im doing a room equalization project, at the moment by sweeping the
room with sine waves, and getting the frequeuncy response of the room.

I now have to convert from this 'room information' to a FIR filter (and
then an inverse FIR filter) that will be applied to sound sources to
compensate for the response of the room.

Any ideas anyone? How to get from FFT (magnitude and phase information)
into a FIR filter taps?

If my explanations aren't clear, please let me know.
Thanks,
Witek.

witek@dsp.sun.ac.za wrote:
> Hello, > > Im doing a room equalization project, at the moment by sweeping the > room with sine waves, and getting the frequeuncy response of the room. > > I now have to convert from this 'room information' to a FIR filter (and > then an inverse FIR filter) that will be applied to sound sources to > compensate for the response of the room. > > Any ideas anyone? How to get from FFT (magnitude and phase information) > into a FIR filter taps?
For a regularly sampled frequency spectrum, try this: h = 2*real(ifft(H)); where H is the vector of spectrum coefficients on the format H[k] = real(H) + j*imag(H) and has been zero-padded to twice the number of data samples. Rune
Rune,

Can you tell why is 2*real(ifft(H)) used?
Why does 2 appear here? I guess since 'h' is be real, ifft(H) will also
be real?

Junior.

witek@dsp.sun.ac.za schrieb:

> Hello, > > Im doing a room equalization project, at the moment by sweeping the > room with sine waves, and getting the frequeuncy response of the room. > > I now have to convert from this 'room information' to a FIR filter (and > then an inverse FIR filter) that will be applied to sound sources to > compensate for the response of the room. > > Any ideas anyone? How to get from FFT (magnitude and phase information) > into a FIR filter taps? > > If my explanations aren't clear, please let me know. > Thanks, > Witek.
Hi, room correction is more than a simple inverse filter. If you want to step into the room correction stuff I highly recommend www.duffroomcorrection.com There you will find a lot of things, including e.g. links to the DRC project of Denis Sbragion. There you find even source code for high sophisticated room correction Uli
<uli.brueggemann@gmail.com> wrote in message 
news:1126193768.444227.287980@f14g2000cwb.googlegroups.com...
> > witek@dsp.sun.ac.za schrieb: > >> Hello, >> >> Im doing a room equalization project, at the moment by sweeping the >> room with sine waves, and getting the frequeuncy response of the room. >> >> I now have to convert from this 'room information' to a FIR filter (and >> then an inverse FIR filter) that will be applied to sound sources to >> compensate for the response of the room. >> >> Any ideas anyone? How to get from FFT (magnitude and phase information) >> into a FIR filter taps? >> >> If my explanations aren't clear, please let me know. >> Thanks, >> Witek. > > > Hi, > > room correction is more than a simple inverse filter. > If you want to step into the room correction stuff I highly recommend > www.duffroomcorrection.com > There you will find a lot of things, including e.g. links to the DRC > project of Denis Sbragion. There you find even source code for high > sophisticated room correction > > Uli
Yes, something more sophisticated than inverse filtering seems in order. You know that the room response is dependent on the location of the receiver, yes? I'm not sure why Rune recommended h = 2*real(ifft(H)) instead of ifft(abs(H)) .... ... anyway, either one is sure to have zeros in it which are a bit problematic because the inverse becomes infinite. Fred
Junior wrote:
> Rune, > > Can you tell why is 2*real(ifft(H)) used? > Why does 2 appear here? I guess since 'h' is be real, ifft(H) will also > be real?
H is the vector of measured Fourier coefficients, as magnitude and phase. So the coefficients are complex-valued. You need a real-valued h, and have measured the colmplex-valued spectrum from DC to fs/2. Under those constraints the above formula gives the real-valued impulse response. Rune