0
$\begingroup$

I have the target filter response in the form of (bin #, value) for every fft bin, for Magnitude and Phase. As an example, (bin 100, +12dB) for Magnitude and (bin 100, -90 degrees) for Phase.

How do I generate the corresponding FIR filter coefficients?

$\endgroup$
1
  • 3
    $\begingroup$ Reconstruct the complex frequency response for each FFT bin, do an IFFT and you get an impulse response which is the FIR coefficients. $\endgroup$
    – ZR Han
    May 25 at 7:04

1 Answer 1

1
$\begingroup$

Define your frequency response with $N$ complex-valued samples (real parts and imaginary parts). The first sample, $F(0)$, is associated with zero Hz. The last sample, $F(N-1)$, is associated with $(N-1)F_s/N$ Hz. Make sure the $F(m)$ frequency samples are conjugate symmetrical. Then perform the inverse DFT (IDFT) of the complex-valued $F(m)$ sequence.

If your $F(m)$ sequence is truly conjugate symmetrical then the imaginary parts of your IDFT results will be VERY small in value. (In theory the imaginary parts of your IDFT results should be zero-valued.) After performing your IDFT, ignore the imaginary parts of your IDFT results.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.