필터 지우기
필터 지우기

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 CenterFile Exchange에서 Discrete Multiresolution Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by