butterworth and baseline removal filtering
조회 수: 13 (최근 30일)
이전 댓글 표시
Hello. I want to apply butterworth and baseline wandering removal filter on ECG signal. I searched mathworks and found this solution;
does anybody knows what are this variables? such as{ a, b ,Wn , N }
and why the formula of Wn is diffrent :Wn = 12*2/f and Wn=[f1 f2]*2/fs ?
I didn't understand the meaning of the comments
% ======================= start filtered ============================= %%
Wn = 12*2/fs;
N = 3; % order of 3 less processing
[a,b] = butter(N,Wn,'low'); % bandpass filtering
ecg_l = filtfilt(a,b, signal);
%%%% baseline wander filter
f1=0.5; % cuttoff low frequency to get rid of baseline wander
f2=15; % cuttoff frequency to discard high frequency noise
Wn=[f1 f2]*2/fs; % cutt off based on fs
N = 3; % order of 3 less processing
[a,b] = butter(N,Wn); % bandpass filtering
ecg_new = filtfilt(a,b, signal);
댓글 수: 0
답변 (1개)
Star Strider
2023년 2월 23일
편집: Star Strider
2023년 2월 23일
The ‘baseline wander filter’ is a bandpass filter with a passband of 0.5 to 15 Hz. (This is too restrictive in my opinion. The upper passband should likely be about 45 Hz.)
Also, if you design such a filter, the appropriate butter call is:
[z,p,k] = butter(n,Wn);
[sos,g] = zp2sos(z,p,k);
(to be certain that the filter is stable, use zp2sos to create a second-order-section implementation), then:
ecg_filt = filtfilt(sos, g, signal);
to filter it.
EDIT — Corrected typographical errors.
.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Digital Filter Design에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!