Powerline interference in ECG
28 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (3)
Satheeshkumar
am 16 Nov. 2024
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 Kommentare
Star Strider
am 16 Nov. 2024
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 Kommentare
Siehe auch
Kategorien
Mehr zu Single-Rate Filters finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

