Filtering two channels ECG signals with sampling frequency of 1000 Hz using MATLAB
2 次查看(过去 30 天)
显示 更早的评论
Hello,
I have got my data set of values for Two Channels ECG Signals, but am new to MATLAB and i dont know how to filter it. I think i must be using Digital Signal Processing methods, because the data set are of discrete values (.mat tables)
Thanks
0 个评论
回答(1 个)
Star Strider
2016-8-8
The usual way of filtering EKG signals is to use a bandpass filter with a passband frequency of 2 to 100 Hz, and a stopband of 2 to 110 Hz. That should produce a stable filter. My filter design procedure is here: How to design a lowpass filter for ocean wave data in Matlab?
This designs a stable filter that should do what you want (eliminate base line wander and d-c offset, and high-frequency noise):
Fs = 1000; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
Wp = [1.5 100]/Fn; % Normalised Passband
Ws = [0.1 120]/Fn; % Normalised Stopband
Rp = 20; % Passband Ripple (dB)
Rs = 30; % Stopband Ripple (dB)
[n,Wn] = buttord(Wp,Ws,Rp,Rs); % Filter Order
[b,a] = butter(n,Wn); % Filter Coefficients
[sos,g] = tf2sos(b,a); % Second-Order-Section For Stability
figure(1)
freqz(sos, 4096, Fs) % Filter Bode Plot
Use the filtfilt function with ‘sos’ and ‘g’ to filter your EKG signal.
4 个评论
Star Strider
2016-8-9
I have no idea what your ‘ticktimes’ and ‘range’ data are or what you are doing.
I designed the standard EKG pre-processing filter everyone asks for, to filter out baseline offset and drift, and high-frequency noise. If your data have none of those, the output will be approximately the same as the input.
Your two-channel EKG data set are your EKG signals. There is nothing to ‘filter out’.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Single-Rate Filters 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!