# FFT frequency bands and filtering

I don't really understand FFTs, and filtering neither. I hope I can explain my confusion in a way that is not too confusing for you to understand.

consider the following example: I have an EEG signal, and am interested in the frequency bands from 1 to 40 Hz.

• if I apply a LP filter at 40, and a HP at 1, my signal of interest would be distorted around the beginning and end because of the filter's transition band. right? why does it have a transition band at all, and how does it work? is a filter a sum of sine waves in the specified frequency range? (sorry, seems like a basic question, still I couldn't find an answer to it)

• now to get the FFT of different frequency bands in the 1-40Hz range, I could either first bandpass filter the specific ranges and apply FFT to each (e.g. to 1-4,4-8,8-12,12-20). however, this would lead to a distorted result in each band, because of the transition bands, right?

if on the other hand, I do FFT over the whole 1-40 range, and then just 'extract' the results from 8-12 etc, the results would be more accurate? and how would the extraction mathematically work, is it just the mean of all values at the frequencies between 8 and 12?

I hope you can help me understand these things

Regarding the transition band of the lowpass and highpass filters; an ideal filter would indeed have zero transition bandwidth but it would also have infintely many filter coefficients in its impulse response. In practice you will have a finite length approximation to that infinite length impulse response, as a result the practical filer will have non-zero transition bandwidth. In case of an FIR (finite impulse response) implementation, the longer the impulse response the narrower will be the transition bandwidth. As a result of this nonzero transition band of the finite length FIR filter, the resulting frequency response will display deviations from the ideal response through the transition band, you should (and can) take this into account. You can also consider using IIR based recursive filters, but that will still have a transition band, in additon to the nonlinear phase distortion being introduced, which doesn't exist for a typical (symmetric) linear phase FIR filter.

Regarding your second question on the spectral analysis of the filtered signal through its FFT, you first obtain a long enough signal observation window and then take a dense enough FFT of the filter output, so that you can focus on any region withn 1 Hz to 40 Hz depending on your interest. Assuming that your sampling rate is $F_s$ samples per second, then an $N$-point FFT would provide you an equivalent analog frequency resolution of $$\Delta f = \frac{F_s}{N}$$ where each frequency bin, in Hz, would be located at $$f_k = \frac{F_s}{N} k ~~,~~ \text{for}~ k=0,1,...,N-1$$ Note that FFT of real valued input signal would have conjugate symmetric complex output, so only the first half (roughly) carries relevant information from $f=0$ to $f=F_s/2$

Note that your spectral resolution is fundamentally limited by your observation window length i.e., FFT length does not improve frequency resolution, but merely interpolates the already resolved spectrum.