# Is ideal band pass filter (brick wall filter) linear phase? [duplicate]

I'm very new in digital signal processing. I have multiple sensors and the way I filters the signals in post processing is:

1. take FFT of the signals.
2. put zero on out range of interesting frequency (like brick wall filter).
3. take IFFT of the spectrum.

I repeat this for each sensor, and compare the phase relation between them in time traces. Thus, the phase must not shift during the filtering process. I wonder the above method distorts the phase or not. Is the ideal band pass filter linear phase?

• this is not a process running continuously, is it? __ or are you doing these three steps once to a piece of data? Oct 5 '18 at 23:46
• – user28715
Oct 6 '18 at 0:54
• I did this in post processing, it's not a real time. Oct 6 '18 at 2:22

## 1 Answer

Assuming you are refering to LTI (linear time-invariant) systems to implement the filter.

The impulse response $$h[n]$$ of the ideal brickwall bandpass filter : $$H(\omega) = \begin{cases} 1 ~~~,~~~ |\omega-\omega_c| is $$h[n] = 2 \cos(\omega_c n) \frac{ \sin(W n) }{ \pi n }$$

which is real and even symetric about origin; i.e., $$h[n] = h[-n]$$, hence it's a zero-phase (in the passband), but noncausal filter.

When this impulse response is truncated and shifted right enough to make it causal: $$h_c[n] = h[n-d]$$ then the resulting bandpass filter will be linear phase in the passband: $$H_c(\omega)= e^{-j\omega d} H(\omega)$$ with a linear phase term of $$\phi(\omega) = -\omega d$$

The phase is not defined for those frequencies where the frequency response is zero.

Note that the truncated filter is no more the ideal filter. Also note that you cannot shift the ideal filter to make it causal (requires infinite shift). And finally note that the zero-phase ideal filter is also a linear phase filter.