EEG data preprocessing and filtering.

12 次查看(过去 30 天)
Hi, I have EEG data that looks like this:
The steps that I followed for preprocessing are:
  1. data = data-mean(data)
  2. bandpassfilt = designfilt('bandpassiir','FilterOrder',10, 'HalfPowerFrequency1',0.2,'HalfPowerFrequency2',50, 'SampleRate',512); dataout = filter(bandpassfilt,data);
  3. bandstopfilt = designfilt('bandstopiir','FilterOrder',10, 'HalfPowerFrequency1',59,'HalfPowerFrequency2',61, 'SampleRate',512); dataout2 = filter(bandstopfilt,dataout);
After filtering the signal looks like this:
I wanted to know if I am following the right steps or should I change anything?
Thank you!

回答(2 个)

绿柳
绿柳 2024-1-31
I see nothing wrong with the logic.
  3 个评论
Pri
Pri 2024-1-31
The beginning of the signal looks unstable to me as it is oscillating a lot at high amplitude. Is that a problem? While using the data should I remove some samples from the beginning or use it as it is?
绿柳
绿柳 2024-3-28
Sorry to see your follow up question too late. Your idea is reasonable, generally in EEG signals in the beginning part of the setup becomes a dummy trial and does not participate in the analysis.

请先登录,再进行评论。


Star Strider
Star Strider 2024-3-28
It seems to me that one or both filters are not designed correctly. The filtered result does not appear to be similar to the input, and may only reflect ‘ringing’ in the filter.
If you have not already done so, the correct way to begin is to calculate the fft of the original signal, preferally zero-padding it to increase the frequency resolution using the nextpow2 function. Then design the filters using that information to define the appropriate passbands and stopbands.

类别

Help CenterFile Exchange 中查找有关 EEG/MEG/ECoG 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by