필터 지우기
필터 지우기

How to handle ECG muscle noise artifacts correctly ?

조회 수: 12 (최근 30일)
Spectro
Spectro 2021년 4월 2일
댓글: Star Strider 2021년 4월 2일
I'm trying to process ECG recordings taken by Holter (bipolar chest leads) during simulations in virtual reality. Therefore, people move a lot when measuring so I often encounter movement and muscle artifacts. What is the best approach or what filter design should be used to efficiently suppress the EMG artifacts which overlap the R waves. I will be happy for any advice. Thank you in advance (attachment is sample of used signal).

채택된 답변

Star Strider
Star Strider 2021년 4월 2일
I would use a bandpass filter.
Example —
D = load('ecg.mat');
EKG = D.ecg;
L = numel(EKG);
Fs = 125; % Use Actual Sampling Frequency
tv = linspace(0, L, L)/Fs; % Time Vector
Fn = Fs/2;
EKGmc = EKG-mean(EKG);
FTEKG = fft(EKGmc)/L;
Fv = linspace(0, 1, fix(L/2)+1)*Fn;
Iv = 1:numel(Fv);
figure
plot(Fv, abs(FTEKG(Iv))*2)
grid
xlim([0 1])
title('Fourier Transform')
EKGfilt = bandpass(EKG, [0.03 0.2]);
figure
subplot(2,1,1)
plot(tv, EKG)
grid
title('Unfiltered')
subplot(2,1,2)
plot(tv, EKGfilt)
grid
ylim([-0.5 1.5])
title('Bandpass Filtered')
xlabel('t')
Use the Fourier transform plot to guide the filter design.
  댓글 수: 2
Spectro
Spectro 2021년 4월 2일
편집: Spectro 2021년 4월 2일
I was thinking mainly about the filters like Butterworth, Chebbyshev etc. because I know they exist in matlab. I didn't know about this one (bandpass();). It handled the signal quite well. Thank you for your quick response and I appreciate your help.
Star Strider
Star Strider 2021년 4월 2일
As always, my pleasure!
It is straightforward to design filters using command-line funcitons. I prefer elliptic filters (the ellip function and its firends) since it is computationally more efficent than the others.
That would go something like this:
Fs = 125;
Fn = Fs/2;
Wp = [0.03 0.2]/Fn;
Ws = Wp.*[0.95 1.05];
Rs = 50;
Rp = 1;
[n,Wn] = ellipord(Wp,Ws,Rp,Rs);
[z,p,k] = ellip(n,Rp,Rs,Wp);
[sos,g] = zp2sos(z,p,k);
figure
freqz(sos, 2^16, Fs)
set(subplot(2,1,1), 'XLim',[0 0.5])
set(subplot(2,1,2), 'XLim',[0 0.5])
EKGfilt = filtfilt(sos, g, EKG);
Use the corredct value for ‘Fs’. The rest automaticaly scales with it, so no other changes are necessary, unless the desired performance is different than in this filter.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Analog Filters에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by