# What is meant by Two pass FIR Filter?? (A basic question)

I have a confusion about what does a two pass FIR (bandpass) filter with order 40 means?? Passband frequencies are [8 13]. Type 2 FIR is same as two pass??

I have check some previous literature which shows Linear-phase FIR filter can be divided into four basic types.

TYPE I symmetric length is odd

TYPE II symmetric length is even

TYPE III anti-symmetric length is odd

TYPE IV anti-symmetric length is even

But according to mathworks ([firtype][1]) [1]: https://jp.mathworks.com/help/signal/ref/firtype.html

Type 1 - Symmetric factor with even degree

Type 2 - Symmetric factor with odd order

Type 3 - Asymmetric coefficient with even order

Type 4 - Asymmetric coefficient with odd order

kindly correct me if my understanding is wrong : Length = (Order-1)/ 2

If Type II is two-pass then the order of the filter will be even or Odd??

You can't in general categorize a two-pass filter in any of those listed filter types. "Two-pass" means that the filter processes the data in two passes; the output of the first pass is used as the input of the second pass.

The two-pass filter's impulse response is the convolution of the impulse responses of the filters in the two passes. This comes from the algebraic properties of convolution:

$$\text{output}= f*(f*\text{input}) = (f*f)*\text{input},$$

where $*$ denotes convolution and $f$ is the impulse response of a single pass. The two passes have an identical impulse response to match your description. Because convolution is equivalent to multiplication in the frequency domain, the two-pass filter's frequency response will be the square of the frequency response of a single pass.

With infinite impulse response (IIR) filters, also a configuration where the second filter processes the data backwards can be useful, and the two filters may be connected in parallel so that the outputs from the two passes are summed to form the composite filter output. Such configurations are not useful with FIR filters.

• Thank you for reply. Kindly correct me if i am wrong, so if i have a signal let's say x and i design a filter using filtfilt my output will be like this: y = filtfilt(b,x), final output=y^2; – Abeeha Jun 26 '18 at 7:49
• I'm assuming you use MATLAB or Octave. No, filtfilt is not useful with FIR filters and y^2 (or safer to use the element-wise y.^2) is squaring the signal (which is wrong), not the frequency response. – Olli Niemitalo Jun 26 '18 at 7:55
• My requirement is to use two-pass FIR filter because FIR are stable as compared to IIR – Abeeha Jun 26 '18 at 7:55
• I have to do zero phase filtering that's why i use filtfilt , for example d = designfilt('bandpassfir', 'FilterOrder',48 'StopbandFrequency1',7.5, 'PassbandFrequency1',8, 'PassbandFrequency2',12, 'StopbandFrequency2',12.5, ... 'DesignMethod','ls', ... % Design method 'StopbandWeight1',1, 'PassbandWeight', 0.01, ... 'StopbandWeight2',1, ... 'SampleRate',1000) ; then y=filtfilt (d,x); – Abeeha Jun 26 '18 at 8:00
• Yes, then you have a two-pass filter. But it's probably not the optimal one considering that the design method is not that of a two-pass filter. – Olli Niemitalo Jun 26 '18 at 10:00