ECG signal baseline drift correction

29 visualizaciones (últimos 30 días)
Sabaudian
Sabaudian el 3 de Jun. de 2022
Comentada: Mathieu NOE el 8 de Jun. de 2022
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 comentario
Sabaudian
Sabaudian el 6 de Jun. de 2022
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

Iniciar sesión para comentar.

Respuestas (1)

Mathieu NOE
Mathieu NOE el 7 de Jun. de 2022
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 comentarios
Sabaudian
Sabaudian el 7 de Jun. de 2022
Ok, but I want to do it with the Wavelet Transform
Mathieu NOE
Mathieu NOE el 8 de Jun. de 2022
ok - i will let someone else answer it , as I don't have this toolbox

Iniciar sesión para comentar.

Categorías

Más información sobre Discrete Multiresolution Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by