[Eeglablist] Filter Issue

Andreas Widmann widmann at uni-leipzig.de
Tue Jan 10 07:37:39 PST 2006


Dear Muluh,

> I have some issues on the filter used by eeglab. Does anyone know the
> appropriate number of points to use for a  bandpass filtering? When I
> use 1, 2, 3, etc. it attenuates my amplitude as in the figures in the
> attachment, but with a 10 point bandpass filtering, the amplitude
> attenuation disappears. I am not quite sure using the 10 point bandpass
> filtering is the right gain for the high pass filter of 0.1Hz and low
> pass of 15Hz (i.e. bandpass filter of 0.1-15Hz).
Filtering EEG data with FIR filters of very small order does usually not 
give meaningful results.

You can visualize the magnitude response of the FIR filters currently 
implemented in EEGLAB with some lines of code:
filterorder = 1;
fs = 250; % sampling frequency (Hz)
lowcutoff = 0.1; % Hz
highcutoff = 15; % Hz
transitionbandwidth = 0.15; % Fractional width of transition band
                             % (hardcoded in EEGLAB)
f = [0 (lowcutoff - lowcutoff * transitionbandwidth) lowcutoff ...
     highcutoff (highcutoff + highcutoff * transitionbandwidth) ...
     fs / 2] / (fs / 2);
figure;
freqz(firls(filterorder, f, [0 0 1 1 0 0]), 1, [], fs);

As you can see you have a gain of about -12 dB in the passband for an 
order 1 (2 point) filter (sampling frequency was guessed).

However, the transition band width realized by a FIR filter is a 
function of the filter order (and window type in case of window based 
FIR filters). E.g., in case of a Hamming window based sinc FIR filter 
(which is roughly comparable to the one implemented in EEGLAB with 
firls) transition band width can be estimated as (3.3 / filterorder) * fs.

Thus, in theory you would need an order 5500 filter to reach your 
highpass and an order 368 filter to reach your lowpass specifications.

Additionally, bandpass filtering (in particular with higher filter 
orders) is discouraged in EEGLAB due to the fractional definition of 
transition band width: When the filters transition band width defined by 
the filter order is smaller than the transition region defined in EEGLAB 
firls often produces an overshoot in the transition region.

Regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3190 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20060110/47345ce8/attachment.bin>


More information about the eeglablist mailing list