フィルターのクリア

butterworth and baseline removal filtering

13 ビュー (過去 30 日間)
yasaman
yasaman 2023 年 2 月 23 日
編集済み: Star Strider 2023 年 2 月 23 日
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);

回答 (1 件)

Star Strider
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.)
To get the appropriate arguments for butter, first use the buttord function.
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.
I prefer elliptic (ellipord, ellip) filters for their computational efficiency.
EDIT — Corrected typographical errors.
.

カテゴリ

Help Center および File ExchangeDigital Filter Design についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by