ECG spectrum wrong?
古いコメントを表示
Hi all,
I have a question about an EKG spectrum.
Someone gave me this ECG spectrum for an exercise.
I'm not sure but the spectrum looks weird.
You clearly see a 50 Hz tone and its harmonics.
The whole thing looks like a modulation.
I would say there was no anti aliasing filter used.
Or does an ECG spectrum with 50 Hz + harmonics look like that?
Thanks for the help.
Best Regards.
採用された回答
その他の回答 (3 件)
Daniel M
2019 年 10 月 29 日
I'm not sure how you're doing your notch filters, but try this:
Fs = 625; % or whatever your sampling frequency is.
Fn = Fs/2; % Nyquist frequency
numHarmonics = 4; % Let's do 50, 100, 150, 200, 250
lineFreq = 50; % Hz
for fq = ((0:numHarmonics)+1) * lineFreq
Fl = fq + [-1, 1]; % notch around Fl. Could try [-2, 2] if too tight
[z,p,k] = butter(6, Fl/Fn, 'stop');
sos = zp2sos(z,p,k);
data = filtfilt(sos, 1, data); % assumes data is [time x ... dimensions]
% overwrites data, and filters sequentially for each notch
end
Stephan Lallinger
2019 年 11 月 1 日
4 件のコメント
You may want to post this as a new question so more people can see it. But I have a few comments.
For your bandpass filter, try this
data = detrend(data); % remove the mean
[B, A] = butter(4, [0.5/(fs/2) 150/(fs/2)]);
filt_data = filtfilt(B,A,data);
As for notch filters, I either use the code I posted above, or the function ft_preproc_dftfilter() in the Fieldtrip toolbox. (It uses a similar approach to yours, which I'm not familiar with, so your issue could be something small.)
But your issue might be aliasing. What is your sampling frequency? If it is under 300, that could cause an issue with filter at 150 Hz.
Stephan Lallinger
2019 年 11 月 2 日
Daniel M
2019 年 11 月 2 日
Ok good idea to open a new question. I will look out for it, and see if others can give advice too. In the meantime, think you could post your data here? I'd like to tinker with it a bit.
Stephan Lallinger
2019 年 11 月 2 日
編集済み: Stephan Lallinger
2019 年 11 月 4 日
カテゴリ
ヘルプ センター および File Exchange で Bartlett についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!