# How to filter power line noise from ECG?

currently i'am trying to get rid off power line noise (50/60 Hz) from an ecg.

Specification:

• Bandwidth of the ecg 0.05 - 150 (achieving this with a butterworth second order bandpass)
• sampling rate 500 Hz

What filters did i try to remove 50/60 Hz noise?

• Butterworth bandstop 6th order bandwidth (+/-0.5 Hz up to +/2 Hz)
• Notch filter placeing zeros at z = e^(+/-j*2*pi*f_notch/f_sample)
• Notch filter with additional poles with same angular as zeros at distance to unit circle with r= 0.5 up to 0.7

What did happen?

• Butterworth filter causes ringing in the ecg signal
• Notch filter with only zeros causes ringing in the ecg signal
• Notch filter with additional poles causes an "overshoot" in the QRS-complex

What is the problem? (I think)

Actually my ecg signal contains information arround 50 Hz due to the phase response (and group delay) of the applied filters, i get this kind of distoration. I mean you clearly remove information from the signal it makes absolutely sense it gets "destroyed".

My question (finally)

Is there are a "better" way to remove 50/60 Hz noise? Secondly i was thinking to take the ringing effect and try to smooth it out (maybe savitzky golay filter?)

Best regards

• Have you tried an adaptive line canceller ? have a look at widrow strearns adaptive signal processing. Note that (almost?) every attempt will distort your original signal to some degree... – Fat32 Nov 10 at 2:00
• Thank you for your answer. Yes i tried adaptive filter with reference and without reference signal ( delay your noisy signal). The results wasnt that great. But maybe my code and parameters are not optimal. I'am not an expert in adaptive filter, actually tried it the first time. – Stephan Nov 12 at 8:53