Wednesday, April 3, 2013

ECG Filtering using MATLAB


 GoldStandard.mat
 % fourth order bandpass filter
 % GoldStandard.mat is a preloaded database ECG signal
 % the original signal is first combined with gaussian noise
 % after noise added the signal will pass through 0.03Hz-1.1Hz bandpass
 % filter,is a 4th order filter

 clear all;
 close all;
 load('GoldStandard.mat')
 subplot(211);
 plot(signal);
 sound('GlodStandard.mat');
 title('the original ECG signal');
 necg=awgn(signal,1,'measured');
 b1=[1 0 -1];
 a1=[1 -1.9955735726528454        0.99558400680448189        ];
 bp1=0.049039538429966834       *filter(b1,a1,necg);
 b2=[1 0 -1];
 a2=[1 -1.8603604222618464        0.87003045759154718        ];
 bp2=0.049039538429966834      *filter(b2,a2,bp1);
 subplot(212);
 plot(bp2);
 title('after filter');
 figure
 subplot(211);
 plot(necg);
 title('after noise adding');
 subplot(212);
 plot(bp1);
 title('after 1st section filter');


RESULT:
 


No comments:

Post a Comment

comment here