フィルターのクリア

ECG signal baseline drift correction

6 ビュー (過去 30 日間)
Sabaudian
Sabaudian 2022 年 6 月 3 日
コメント済み: Mathieu NOE 2022 年 6 月 8 日
I'm at the start of learning signal processing.
I'm trying to denoising this ECG signal using Wavelet Trasform to correct the baseline drift. This is my attempt, but I am very doubtful about it. I do not know if my attempt is correct or not (the signal does not seems so). I need an advice from someone more experienced than me, so in this way I can understand better and improve my work.
%--Load Real signal--%
load ('100m.mat');
RealECG = val/200;
Fs = 360; % Hz
L = length(RealECG); % Signal Length
TimeInterval = 10; % sec
T = linspace(0,TimeInterval,L); % time axis
%--Plot--%
figure (1); plot(T, RealECG); grid on;
title('ECG Signal'); xlabel('time (sec)'); ylabel('voltage (mV)');
%% Correction of the wandering baseline of the ecg signal
wv = 'db9';
[c,l] = wavedec(RealECG,8,wv);
nc = wthcoef('a',c,l);
rec = waverec(nc,l,wv);
figure(2); plot(T,rec); grid on;
title('WT Baseline Correction');
xlabel('time (sec)'); ylabel('voltage (mV)');
  1 件のコメント
Sabaudian
Sabaudian 2022 年 6 月 6 日
Since nobody wants to reply, you can at least redirect me to some material that can clarify the concepts related to the Wavelet transorm and how to use it to correct the baseline

サインインしてコメントする。

回答 (1 件)

Mathieu NOE
Mathieu NOE 2022 年 6 月 7 日
hello
a simple high pass filter suffices
%--Load Real signal--%
load ('100m.mat');
RealECG = val/200;
Fs = 360; % Hz
L = length(RealECG); % Signal Length
TimeInterval = 10; % sec
T = linspace(0,TimeInterval,L); % time axis
%--Plot--%
figure (1); plot(T, RealECG); grid on;
title('ECG Signal'); xlabel('time (sec)'); ylabel('voltage (mV)');
%% Correction of the wandering baseline of the ecg signal
% wv = 'db9';
% [c,l] = wavedec(RealECG,8,wv);
% nc = wthcoef('a',c,l);
% rec = waverec(nc,l,wv);
% some high pass filtering % baseline correction
N = 2;
fc = 1; % Hz
[B,A] = butter(N,2*fc/Fs,'high');
rec = filtfilt(B,A,RealECG);
figure(2); plot(T,rec); grid on;
title('WT Baseline Correction');
xlabel('time (sec)'); ylabel('voltage (mV)');
  2 件のコメント
Sabaudian
Sabaudian 2022 年 6 月 7 日
Ok, but I want to do it with the Wavelet Transform
Mathieu NOE
Mathieu NOE 2022 年 6 月 8 日
ok - i will let someone else answer it , as I don't have this toolbox

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDiscrete Multiresolution Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by