FIR help

topic posted Thu, May 4, 2006 - 10:58 AM by  Glenn
Having googled this to death....

Can someone please explain to me, in the plainest english possible, how to calculate coefficients for an FIR filter? Given a general idea of what frequency I want at the top and bottom of the passband, and only really caring a little bit about what the transition bandwidth is, how does one, step by step, create the coefficients?

My suspicion is that you create sine waves at some regular frequency interval between the low and high, and then mix and normalise somehow. Can someone validate/confirm this for me? Also, if this is the case, should the progression of frequencies be logarithmic or linear?
posted by:
Glenn
New York
  • Re: FIR help

    Fri, May 5, 2006 - 2:48 PM
    Glen,

    I asked the DSP guy here at work and here is his answer:

    There isn't a simple answer. I refer you to this:

    www.dspguru.com/info/faqs/fir/design.htm

    Methods 2 and 3 are the only ones that could be done by hand, and that would only be for the easy cases. Your friend is close. The IDFT converts from frequency back to time.

    From www.eetimes.com/editorial/...n9912.html:
    The calculation of coefficients takes four steps. First, specify the desired frequency response. Second, specify the implementation conditions to enable the realization of the filter in hardware. For example, the filter must contain a finite number of taps, limited precision (data and coefficient word width), and real (as opposed to complex) coefficients. Third, take the inverse discrete Fourier transform (IDFT) to get the filter's impulse response. The impulse response values are the FIR filter's coefficients. Last, weight the coefficients by multiplying the impulse response by a "windowing" function to reduce distortion (side lobes, for example) caused by the finite duration of the impulse response. Following this procedure, implement the filter and verify that the realized frequency response is as desired.

    I just use Matlab.
    • Re: FIR help

      Sat, May 6, 2006 - 9:38 AM
      That helps.

      The "Just use <insert application here>" solution has been seen a lot. The difficulty is that the application I wish to develop is, at least partilly, to be a parametric eq. As such, I'd need to be able to generate new coefficients when the parameters change.

      Thank you very much.
      • Re: FIR help

        Wed, September 20, 2006 - 3:04 PM
        Might be too late to bump this post. Check out the book DAFX Ch.2.3... there's closed form solutions for the coefficients on those pages.... don't have a printer or anything so you'll have to search.
        But ya these equations they provide are only for a 2nd order FIR.. if you want a steeper slope on the freq curve you're probably gonna have a hard time deriving some equations.

        t