Powerline interference in ECG
조회 수: 7 (최근 30일)
이전 댓글 표시
Could anyone help me with a code for removing 50 Hz in ECG with a notch filter?I'm using this code for now, but the attenuation doesn't seem enough to notice any difference in the signal. Perhaps another kind of filter would do better?
ECG=signal; Fs=300; Fo=50; Fon=Fo/Fs;
f1=45; f2=55; Bz=fir1(2000,[f1/Fs f2/Fs ],'stop'); y2=filter(Bz,1,b);
figure; plot(ECG); figure; plot(y2);
댓글 수: 0
답변 (3개)
Satheeshkumar
2024년 11월 16일
Rejection of 60 Hz power-line interference from ECG signals. Write a Matlab program to implement the notch filter. Apply the filter to the signal in the data file ecg 60hz 200.dat available at DSP, dat files. Plot the ECG signal before and after filtering. Study the nature of the artifacts in the noisy signal and in the output of the filter
댓글 수: 0
Star Strider
2024년 11월 16일
Try this —
Fs = 256; % Signal Sampling Frequency
Fn = Fs/2; % Nyquist Frequeency
Ws = [59 61]/Fn; % Passband Frequencies
Wp = Ws+[-1 1]/Fn; % Stopband Freqnencies
Rp = 1; % Passband Ripple (dB)
Rs = 60; % Stopband Ripple (Attenuation) (dB)
[n, Wp] = ellipord(Wp, Ws, Rp, Rs); % Calculate Filter Order
[z,p,k] = ellip(n, Rp, Rs, Wp, 'stop'); % Design Filter
[sos,g] = zp2sos(z, p, k); % Implement Filter As Second-Order-Seection
figure
freqz(sos, 2^20, Fs) % Filter Bode Plot
figure
freqz(sos, 2^20, Fs) % Filter Bode Plot (Deetail)
set(subplot(2,1,1), 'Xlim',[55 65], 'XTick',55:65)
set(subplot(2,1,2), 'Xlim',[55 65], 'XTick',55:65)
Make appropriate changes to work with your signal.
.
댓글 수: 0
참고 항목
카테고리
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!