[FieldTrip] Filter Order for High Pass Filter
widmann at uni-leipzig.de
Sat Sep 26 11:04:30 CEST 2015
the filter order defines how steep or shallow the transition between passband and stopband is (in the frequency response). The higher the steeper.
For the Fieldtrip default Butterworth IIR filter this is -6 dB/oct per order (the order is doubled internally due to forward and backward filtering, so actually -12 dB/oct per order). For extreme filters (0.1 Hz highpass) Butterworth filters sometimes have stability issues (accumulating rounding errors). There’s now a strategy implemented dealing with these cases iirc.
The order of IIR and FIR filters must not be directly compared. For FIR filters the order is the impulse response length minus one. Thus, to compare IIR and FIR the impulse response length should be compared. The above Butterworth filter has an impulse response length of 7880 points to be doubled due to forward and backward filtering (-1; 15759 points). A corresponding FIR filter (500 Hz, Hamming window) only requires 8251 points. As most EEG textbooks explicitly recommend shorter filters over longer filters you might want to consider applying a FIR filter (e.g., cfg.hpfilttype = 'firws‘; cfg.hpfiltdir = 'onepass-zerophase';).
> Am 26.09.2015 um 00:17 schrieb Max Cantor <Max.Cantor at Colorado.EDU>:
> Hi all,
> I used to be mcantor at umich.edu, now I'm max.cantor at colorado.edu, but I'm the same Max Cantor as before :).
> That out of the way, here is my question:
> In the these threads -
> The issue of fieldtrip's ability to do low valued high pass filters is addressed, and I was successfully able to implement a a bpfilter of [0.1 50] hz using a filter order of 1, and I compared it to my new lab's eeglab pipeline's ERP for a given subject and was able to get a more or less identical output. However, it's been awhile since I've read some of the nitty gritty signal processing, and I forget what exactly this means or what the significance of it is.
> Even though I was able to more or less replicate their current pipeline, I'd still like to understand what exactly setting the filter order is doing and what the significance of it may be. If anyone can explain this to me or set me in the right direction (a suggested chapter in Steve Luck or Matt Cohen's book, or a good article, for instance), I would greatly appreciate it.
> Max Cantor
> Graduate Student
> Cognitive Neuroscience of Language Lab
> University of Colorado Boulder
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
More information about the fieldtrip