Hi am leena i would like to get details on noise reduction of ecg signals matlab code . i last studied in the saintgits college and now am doing project of mca.i need help on this
Posts: 14,118
Threads: 61
Joined: Oct 2014
The Electrocardiogram (ECG) is a valuable signal recording the heart's electrical activity. The filtering quality of ECG signals directly affects the medical diagnosis. Since wavelet analysis can provide both time and frequency information, many nonlinear thresholding methods based on wavelet transform denoising have been applied to the noise reduction of ECG signals. However, most of these threshold shrinkage functions cannot adapt to different signals due to the fixed transition curve of threshold. Therefore, a novel genetic optimized wavelet thresholding approach (GOWT) is proposed in this paper. A quadratic curve thresholding function (QCTF) was devised to realize the smooth connection of threshold points. Moreover, in terms of the root mean square error and the filtering smoothness, a new genetic algorithm was devised to automatically search the optimal parameters of QCFT for different noisy signals. Finally, the GOWT was evaluated and compared with hard thresholding and soft thresholding by means of MIT-BIH arrhythmia database ECG records. The filtering results indicate that the GOWT can realize smooth threshold transition, avoiding the oscillation at the cutoff threshold point caused by the hard thresholding and the wavelet coefficient bias brought by the soft thresholding. Its adaptability to various signals has been strengthened by the genetic algorithm. The GOWT can find a trade-off between the smoothness and distortion of signal filtering, generating the desirable noise-free signal for feature extraction.
Posts: 636
Threads: 0
Joined: Jun 2016
% Create one period of ECG signal
x = ecg(500).';
y = sgolayfilt(x,0,5);
Fs = 1000;
[M,N] = size(y);
% Initialize scopes
TS = dsp.TimeScope('SampleRate',Fs,...
'TimeSpan',1.5,...
'YLimits',[-1 1],...
'ShowGrid',true,...
'NumInputPorts',2,...
'LayoutDimensions',[2 1],...
'Title','Noisy and Filtered Signals');
% Design lowpass filter
Fpass = 200;
Fstop = 400;
Dpass = 0.05;
Dstop = 0.0001;
F = [0 Fpass Fstop Fs/2]/(Fs/2);
A = [1 1 0 0];
D = [Dpass Dstop];
b = firgr('minorder', F, A, D);
LP = dsp.FIRFilter('Numerator',b);
% Design Highpass Filter
Fstop = 200;
Fpass = 400;
Dstop = 0.0001;
Dpass = 0.05;
F = [0 Fstop Fpass Fs/2]/(Fs/2); % Frequency vector
A = [0 0 1 1]; % Amplitude vector
D = [Dstop Dpass]; % Deviation (ripple) vector
b = firgr('minord', F, A, D);
HP = dsp.FIRFilter('Numerator', b);
% Stream
tic;
while toc < 30
x = .1 * randn(M,N);
highFreqNoise = step(HP,x);
noisySignal = y + highFreqNoise;
filteredSignal = step(LP,noisySignal);
step(TS,noisySignal,filteredSignal);
end
% Finalize
release(TS)