Azzera filtri
Azzera filtri

ECG signal baseline drift correction

6 visualizzazioni (ultimi 30 giorni)
Sabaudian
Sabaudian il 3 Giu 2022
Commentato: Mathieu NOE il 8 Giu 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 Commento
Sabaudian
Sabaudian il 6 Giu 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

Accedi per commentare.

Risposte (1)

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

Accedi per commentare.

Categorie

Scopri di più su Discrete Multiresolution Analysis in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by