Powerline interference in ECG

15 次查看(过去 30 天)
Sara Cooper
Sara Cooper 2016-5-21
回答: Star Strider 2024-11-16,14:00
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);

回答(3 个)

Ullas
Ullas 2023-6-8
Hi, i need a code for pli removal in ecg signal

Satheeshkumar
Satheeshkumar 2024-11-16,4:12
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

Star Strider
Star Strider 2024-11-16,14:00
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)
Use the filtfilt function to do the actual filtering.
Make appropriate changes to work with your signal.
.

类别

Help CenterFile Exchange 中查找有关 Single-Rate Filters 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by