# dealing with Huge Length (Order) FIR filters

I'm studying a project.

My signal is audio 8KHz Mono, 8 bits in Low frequencies 70Hz until 1200Hz.

When I perform the calculus with the transition band is very narrow (Transition Frequency) my Order results are (according to proposed window):

For this Example the worst case:

DeltaFrequency = 1.060180596543088 Hz
dNormalizedDeltaFreq= 1.060180596543088/8000


How is calculated the Order? My Answer is below, check the PD!

• Rectangular: 6793
• Hamming:24903
• Hanning:23393
• Kaiser:27353
• Blackman:41503

If I try to use 16KHz, before orders will be doubled!

Then, I want to use Hardware only to perform the filtering FIR process, and I'm worry about of Time needed to perform this functionalities.

COMMENT1:

Reduce Sampling Frequency is not optional, I need to deal with 1200Hz signals too!

PD: (This is not question!)

    if (windowType.toLowerCase().equals("rectangular")) {
Size = (int)Math.ceil(0.9/dNormalizedDeltaFreq);
}
if (windowType.toLowerCase().equals("hamming")) {
Size = (int)Math.ceil(3.3/dNormalizedDeltaFreq);
}
if (windowType.toLowerCase().equals("hanning")) {
Size = (int)Math.ceil(3.1/dNormalizedDeltaFreq);
}
if (windowType.toLowerCase().equals("kaiser")) {
//      Mitra's book Handbook for Digital Signal Processing quotes Kaiser with a
//      simple estimate: N = [-20*log10(sqrt(dp*ds)) - 13]/[14.6(ws - wp)/2pi]
double Att = 60.0;
Size = (int)Math.ceil((Att - 7.95)/(14.36*dNormalizedDeltaFreq));
}
if (windowType.toLowerCase().equals("blackman")) {
Size = (int)Math.ceil(5.5/dNormalizedDeltaFreq);
}


QUESTION 1: it is feasible to use a FIR filter of this Order?

QUESTION 2: Which single device (hardware) help me perform this function?

QUESTION 3: How could be calculated the delay time?

• Why do you need such a narrow transition band? – Matt L. Nov 11 '15 at 20:53
• I agree with Matt: It's very rare that you need filters with a transition region of about 1Hz. Where did you get that requirement from? – Peter K. Nov 11 '15 at 21:00
• I need to separate Low frequencies for 73.416191Hz (from LowCutFrequency 71.32617550580552 until HihgCutFrequency 75.5674506101949) and 77.781745 Hz (from LowCutFrequency 75.5674506101949 until HihgCutFrequency 80.06092505632031), As you can see HihgCutFrequency is equal to LowCutFrequency for contiguous Frequecies, then if I increase the separation between bands then I lose information within the same! – Anita Nov 11 '15 at 21:07

There are three different implementations of FIR filters that I am aware of.

The first is the basic "transversal" FIR in which you sum up the terms of the summation directly. It gets very expensive if $L$, the FIR length, gets long.

The second is the so-called "fast convolution" in which the FIR impulse response is zero-padded to a longer length and the DFT is applied to it once. Then there are two slightly different procedures, "overlap-add" (OLA) or "overlap-save" (OLS, sometimes called "overlap-scrap" which I think is more descriptive) to process blocks of the input into blocks of the output.

Both of these methods are well covered in textbooks.

A third method, not really covered in textbooks at all, is the "Truncated IIR" filters (TIIR) and this might apply in your case. The simplest example of a TIIR filter is the moving-sum or moving-average that you might find in cascade-integrate-comb (CIC) filters. They have recursion in them, but they are not, mathematically, IIR. Their IIR impulse response gets cancelled or truncated.

If you're trying to implement a long FIR that is a sliding rectangular window (that's a moving sum) or a sliding Hann window or sliding Hamming window, you can do that very efficiently with a TIIR. A sliding Blackman is a little harder and I don't think TIIR will work for a sliding Kaiser.

I have to go now, but I will return with some references. Or send me an email (it's easy to find) and I will send you copies of the references I have including a "how-to" paper I wrote about how to do biquad TIIR filters in general.

• Thank you!, may I mistake but I have discarded concepts IIR Filters, only Want to use FIR!, But I need more information for the second, Please put a Link about this with practical examples: I have 20 years of not working with DSP. :( – Anita Nov 11 '15 at 21:13
• do you understand how to make an efficient moving-average or moving-sum filter? you're not gonna add up all those terms for each and every sample. you will have a delay line, an accumulator, and add the new sample in the accumulator and subtract the old sample (that falls off the edge in the delay line) from the accumulator. can you picture that? if so, that is a simple TIIR and it is FIR. – robert bristow-johnson Nov 11 '15 at 21:20