EEG data preprocessing and filtering.
이전 댓글 표시
Hi, I have EEG data that looks like this:

The steps that I followed for preprocessing are:
- data = data-mean(data)
- bandpassfilt = designfilt('bandpassiir','FilterOrder',10, 'HalfPowerFrequency1',0.2,'HalfPowerFrequency2',50, 'SampleRate',512); dataout = filter(bandpassfilt,data);
- 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일
0 개 추천
I see nothing wrong with the logic.
댓글 수: 3
绿柳
2024년 1월 31일
Firstly the DC component is removed, then a specific frequency range is preserved and finally possible power line interference is eliminated.
Pri
2024년 1월 31일
绿柳
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
2024년 3월 28일
0 개 추천
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.
카테고리
도움말 센터 및 File Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!