-->

EEG raw data band filtering using matlab

2020-07-22 17:38发布

问题:

I have some raw EEG data in csv files captured using Emotiv EPOC as part of experiments I am doing for my undergrad thesis. I uploaded one of the files here for reference. I wish to perform band pass filtering on the data in the certain bands

  • delta (1-4Hz)
  • theta (4-8Hz)
  • alpha (8-13Hz)
  • beta (13-30Hz)
  • and gamma (36- 40Hz)

As I am relatively new in Matlab, how can I do that? I am aware that similar questions already exist but they do not apply in my case as I am using Emotiv EPOC for EEG data capturing

回答1:

You may try to use EEGLab, an open source environment for electrophysiological signal processing with matlab. This toolbox accepts text input such as yours, and has several filtering method like

function EEGfiltered = eeg_filter(EEGinput,sample_freq,lcf,hcf,order);

% eeg_filter - apply a butterworth polynomial filter
% 
%   Usage : EEGfiltered = eeg_filter(EEGinput,sample_freq,lcf,hcf,order)
%
%   - input arguments 
%       EEGinput    : eeg data - M samples x N channels x P epochs
%       sample_freq : sampling frequency
%       lcf         : low cutoff frequency (highpass, default 0.01)
%       hcf         : high cutoff frequency (lowpass, default 40)
%       order       : butterworth polynomial order (default 2)
%
%   - output argument
%       EEGfiltered : filtered EEGinput;

Beware of the specificity of EEG data processing. For example, the filtfilt function baselines on the last point of the timeseries, so it is necessary to call eeg_baseline after filtering. Following the EEGLab tutorial will avoid many drawbacks.