0

This is a rather general set of questions.

  • I'm interested in knowing up to what orders, direct form FIR filters are considered useful for practical applications (both in hardware and software)?
  • What if fixed-point arithmetic is used?
  • Are FIR filters with several hundred or thousand fixed-point taps suitable for some problems, even if this is rare?
Gilles
  • 3,386
  • 3
  • 21
  • 28
sj07
  • 3
  • 3
  • 1
    For software based mastering equalizers it's not uncommon to use 64K taps using overlap add/save based FFT convolution. – keith Aug 07 '16 at 13:38
  • Thanks keith! Can you provide some references, please? – sj07 Aug 07 '16 at 14:16
  • Computational Complexity and Accuracy (plus stability) are main concerns. And hence real time or offline should also be stated for someone to be able to provide a more meaningful and useful answer. – Fat32 Aug 07 '16 at 15:08
  • 1
    Emulating concert hall reverb by convolution with the buildings impulse response often requires a FIR filter many tens of thousands of taps in length (depending on the size of the hall). Done by multiply overlapped add/save fast convolutions. – hotpaw2 Aug 07 '16 at 17:05
  • @sj07 asking for references for "you can do that": well, I can build you a 100,000 tap fir just now, and you can refer to me; but that won't really help you in any way, would it? you need to narrow down your applications a bit (as mentioned by Fat32, for example, live or offline? Sampling rates? complex/real? – Marcus Müller Aug 07 '16 at 17:37
  • @sj07 also, the longest filters I've actually seen in usage weren't part of high-quality systems, but were actually accidentally long - because someone used a filter design without actually considering whether the filter specs they used were reasonably strict; that leads to unnecessarily long filters. For example, I've seen someone use a ~200,000 tap filter where a 11-tap filter turned out to be sufficient – just because they never realized their design specs were totally "over the moon", until the system used up 90% of CPU at low sampling rates. – Marcus Müller Aug 07 '16 at 17:45
  • Not sure what references would be suitable. There are plenty of research papers on creating low tap FIR filters based on various optimization methods. However optimization methods are computationally intensive and so for long tap FIR filters it's normal to take the inverse Fourier transform of the frequency/phase specification you want (multiplied by something like a Kaiser window) and that gives you your FIR coefficients and for the that you can look in any text book on digital signal processing. As others have mentioned it would be good of you to explain what you're trying to achieve. – keith Aug 07 '16 at 18:14
  • Thank you everyone for the comments! I did not ask these questions with a specific target application in mind, really more out of curiosity to see up to what upper length limits FIR filters are used in practice. So basically, by references, I meant some concrete examples which are not a result of an accident. The computations can be live or offline, the coefficients real or complex, etc. if the target application allows it. I'm sorry for not being more specific. – sj07 Aug 07 '16 at 19:20

1 Answers1

1

All applications are bound to some notion of accuracy of the magnitude/phase response.

Given a FIR is a polynomial approximation to a desired magnitude and phase response:

  • The lower the number of taps, the poorer the approximation, but the lower the computational overhead.

  • The higher the number of taps, the better chance you have of a more accurate approximation (depending on your design approach), but the higher the computational overhead.

There's not much more can be said on the finer points unless you ask a more specific question at which point there are many people cleverer than me in this forum who will be able to give you some good pointers.

For instance FFT makes high order FIR filters possible as it is computationally efficient and has good numerical properties. High tap FIR filters aren't rare and I can vouch for them being used in audio (64K and 128K taps are common for some purposes).

Using fixed point arithmetic usually implies you are computationally bound by a chip without an efficient floating point arithmetic unit and the numerical properties of fixed point arithmetic tend to limit the accuracy of high order filters. So high order filters are not aided by fixed point arithmetic.

UPDATE, based on question in comments about upper limit on taps for fixed point:

I've only ever implemented FIR filters using floating point arithmetic, but I have written fixed point routines (for non FIR related applications) on a 32-bit 16 instruction RISC architecture in assembler. It's possible to get any precision you want by extending your arithmetic across words at the expense of clock cycles i.e. you can improve your precision in fixed point if necessary, but at some point you will hit the limit of your processing capability. So you ideally need to say what chip you're using, what language/libraries you're going to use, show us a graph of your ideal magnitude/phase response, what latency you're happy with and what input/output rate. It's impossible to give hard limits without some real constraints. It might be another question on SO perhaps...

keith
  • 906
  • 1
  • 7
  • 20
  • Thanks for the answer. For the last paragraph, I've seen a lot of examples where filters with fixed-point coefficients (taps) have lengths in the order of 20, 30, 50. What are some upper limits of these orders in practice? Are orders up to 200 useful? I understand that a precise answer depends on the application and the chip used and that it doesn't make sense to increase the number of taps from a certain value (which depends on the filter specification and the fixed-point format used). From your personal experience for instance, what is the largest fixed-point FIR filter you had to use? – sj07 Aug 07 '16 at 20:30
  • also see my answer to http://dsp.stackexchange.com/questions/31066/how-many-taps-does-an-fir-filter-need?rq=1 – Marcus Müller Aug 07 '16 at 21:10
  • I've updated my answer regarding upper limits on taps for fixed point arithmetic as I could not fit my reply in the comments. – keith Aug 08 '16 at 08:04
  • Again, thanks! I'm perfectly fine with this answer now. – sj07 Aug 08 '16 at 09:53