problem with filtering ECG signal

조회 수: 7 (최근 30일)
sereen masalha
sereen masalha 2020년 12월 16일
hello, As you can see in the figure the signal isn't being filtered by the BPF( we can see basline wander noise ). Any suggestions on the frequencies that should be used in the filter? thank you so much !
function [clean_signal,fs] = clean_ECG(signal,T)
sig1 = dlmread('part1.txt','',1,0) ;
L1 = sig1(:,1) ;
L3 = sig1(:,2) ;
L2 = sig1(:,3) ;
f = 200; %Hz sampling frequency according to nyquest
T1 = 57.754; T2 = 62.59 ; T3 = 35.942; % according to the biopac
fs = length(signal)/T; % the sampling frequency for our signal Lead 2
signal = reshape(signal,1,[]);
%% designing zero order FIR filters :
% baseline wander noise - HPF with cuttof frequency 0.5 Hz
% EMG noise - LPF with cuttof frequency 100 Hz
% BPF between 0.5 - 100 Hz
BPF = bandpass(signal,[0.5 100],200);
%% POWER LINE INTERFERENCE noise - window based Stop Band Filter with cuttof frequencies 59.5 Hz and 60.5 Hz
fmax = 60.5; fmin = 59.5;
wp= 2*fmax/f;
ws= 2*fmin/f;
SPF = fir1(1,[ws wp],'stop');
% applying the filter:
y1 = filtfilt(SPF,1,BPF);
clean_signal = filter(SPF,1,BPF);
%}
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Digital Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by