I need to calculate a series of coefficients for several FIR filters having 96 taps is there a standard or set formula for calculating these, it is a low pass filter.

  • $\begingroup$ There are many methods. It depends on what you want. The most straightforward method is a window design. If you have Matlab/Octave or any other package, you'll have lots of design routines to choose from. Add some more information to your question to make it easier for us to answer it appropriately. Have a look at this answer, and search for "FIR filter design" on this site. $\endgroup$ – Matt L. Jan 20 '16 at 10:59
  • $\begingroup$ Thanks Matt, I am as you can see new to this and I am not a DSP person but need to understand a little better what the code requirements will be for a development project. We are using an AD7760 ADC for front end signal capture and processing this in a BF533 processor where X correlation will be done to check the signal (valid or not valid) before passing out the data via UART port. The frequency of data is 100 kHz. $\endgroup$ – MontyB Jan 20 '16 at 11:51
  • $\begingroup$ If you are just getting started with FIR filters and don't have access to Matlab or Octave, I would suggest the IowaHills web site. It’s free FIR filter design program uses Parks McClellan, Rectangular Windows, or Frequency Sampling to synthesize FIR filters. The program isn't as sophisticated as Matlab, but it will show you rather quickly how the various filter design parameters affect a filter (tap count, bandwidth, transition bandwidth, linear phase or minimum phase, etc). It also has example code for FIR and IIR filter design and example implementation code. $\endgroup$ – user5108_Dan Jan 20 '16 at 11:57
  • $\begingroup$ Monty, take all this information and ask yourself a new question: Given this platform, what kind of filter do I need? Then, research, and when you have encountered a specific problem, come back to dsp.SE and ask a new, precise question :) $\endgroup$ – Marcus Müller Jan 20 '16 at 12:03
  • $\begingroup$ also, doing cross correlation on that processor is not possible unless you know how to employ DSP tricks (hint: look up fast correlation using FFT); I'm afraid there's no way around you getting a quick introduction to DSP by reading a good textbook. $\endgroup$ – Marcus Müller Jan 20 '16 at 12:05

is there a standard or set formula for calculating these, it is a low pass filter.

No. There's very many approaches to filter design, and it very much depends on what you want to achieve with your filter.

Things like:

  • What do you need as a low pass filter? Is it important to have linear phase?
  • Is it going to be narrow, or wide? (i.e. is the stopband bigger or smaller than half of the input bandwidth)
  • Is it going to be implemented in hard- or software?
  • What about numerical precision? If software: fixed or floating point? SIMD'ability? Enforcing linear phase to be able to exploit coefficient symmetry?
  • What's more important:
    • Passband ripple?
    • strength of the strongest sidelobe?
    • Cumulative stopband power leakage?
    • Maximum steepness for given length?
    • Numerical stability (i.e. well-conditioned taps)?
    • ...

Now, assuming you "just" want a FIR for usage with e.g. Python, you go ahead and use your favourite scientific/signal processing toolkit, and use one of the many window design methods. Often, things will get automatically chosen correctly for you. In essence, scipy has an extensive documentation on its filter design routines, and I urge you to look at that.

  • $\begingroup$ Much appreciate your answer marcus, the signal source is data that has a frequency of 100 kHz (can also be 80 khz, 50 kHz or 20 kHz) and after amplification and some anti aliasing filtering is fed to an AD 7760 ADC Delta Sigma with FIR filter the 24 bit data from the ADC is fed into a BF533 blackfin processor where cross correlation will be made and then passed out to the UART port. The coefficients for each of the received frequencies be programmed to AD7760 prior to whatever frequency is about to be received, this will be achieved from the BF533 over SPI as the 7760 provides this feature. $\endgroup$ – MontyB Jan 20 '16 at 12:00
  • $\begingroup$ @MontyB that's an awful lot of information, and this means you got quite a bit of designing to do if you want to build an optimal filter. So, go wild! $\endgroup$ – Marcus Müller Jan 20 '16 at 12:02
  • $\begingroup$ Indeed, LOL, I have an uphill task to do on this one, hence I am seeking some wise mans/womans knowledge and guidance. Thanks for your input, it is very much appreciated. $\endgroup$ – MontyB Jan 20 '16 at 12:23

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.