ECG去除基线漂移代码 参考Comparisons of Different Approaches for Removal of Baseline Wander from ECG Signal

% 去除基线漂移
% 参考文献:Comparisons of Different Approaches for Removal of Baseline Wander from ECG Signal 
clc;clear;close all;
load ECG_sample_noisy.mat
fs=ECGinfo.Fs_ECG1;
x = ECG1;  %(1:2000);
  fs=ECGinfo.Fs_ECG2;
  x = ECG2;  %(1:2000);


% IIR high pass filter, Butterworth Order 2, fc=0.5Hz
d1 = designfilt('highpassiir', 'FilterOrder', 2, 'HalfPowerFrequency', ...
               .5, 'SampleRate', 360, 'DesignMethod', 'butter');
%freqz(d1);
out_iir = filter(d1,x);
figure(4);
plot(x); title('original waveform');
figure(5);
plot(out_iir); title('IIR High pass Filtering');

% FIR high pass filter, order 400, Kaiser window
d2 = designfilt('highpassfir', 'FilterOrder', 400, 'CutoffFrequency', ...
               0.5, 'SampleRate', 360, 'DesignMethod', 'window', ...
               'Window', {'kaiser&

你可能感兴趣的:(生理信号分析,算法,人工智能)