# Understanding ECG Filtering

A common problem in ECG interpretation is the removal of unwanted artifact and noise. To help with this our cardiac monitors provide a means to filter the ECG recording. Most cardiac monitors will choose the appropriate filter based on the situation. When performing routine monitoring, where only the cardiac rhythm is important, the filters applied are known as monitor mode filters. When performing a 12-Lead, which requires a high fidelity tracing, the filters applied are known as diagnostic mode filters. Beyond this, little emphasis is placed on understanding ECG filtering. This gap in education leads to problems for both experienced and inexperienced interpreters.

## Signal Processing Basics

The frequency of a signal measures the cyclic rate or repetition, and is measured in Hertz (Hz). A frequency of 1 Hz means a signal repeats itself every one second. Our hearts produce electrical activity recorded by electrodes as a signal. The sinoatrial node fires at roughly 50 to 90 beats per minute, and for the sake of this post we will say 60 beats per minute is the happy median. This means the heart has a fundamental frequency of 1 Hz at this heart rate. Therefore, all of the ECG components (P, QRS, and T) will occur at or above this frequency.

Because the ECG signal repeats itself, each time the heart cycles through systole and diastole, we can break it down into individual waves or harmonics. This process of breaking down a signal into a series of sine waves is known as Fourier AnalysisUsing the property of superposition, if you add together enough of these harmonics you can recreate the original signal.

Each of the harmonics (sine waves) have a certain amplitudefrequency, and phase. Amplitude is the magnitude of the signal, measured on the ECG in millivolts (mV). Frequency was discussed previously, and is the rate of repetition of the signal. Lower frequency harmonics have higher amplitudes, and higher frequency harmonics will have lower amplitudes. Therefore, the low frequency ECG components play the largest role in observed amplitude on the ECG.

Phase can be thought of as the delay before the signal begins. Think of a group singing Row Your Boat, where each person starts after the previous. We can say that if two singers match that they are in phase, and two who are at different parts of the song are out of phase:

## What electrical signals are recorded by the ECG?

Like we said, the ECG signal is comprised of multiple sources. The recording is made through electrodes on the skin, which capture more than just the electrical activity of the heart. The primary electrical components captured are the myocardium, muscle, skin-electrode interface, and external interference.

The common frequencies of the important components on the ECG:

• Heart rate: 0.67 – 5 Hz (i.e. 40 – 300 bpm)
• P-wave: 0.67 – 5 Hz
• QRS: 10 – 50 Hz
• T-wave: 1 – 7 Hz
• High frequency potentials: 100 – 500 Hz

The common frequencies of the artifact and noise on the ECG:

• Muscle: 5 – 50 Hz
• Respiratory: 0.12 – 0.5 Hz (e.g. 8 – 30 bpm)
• External electrical: 50 or 60 Hz (A/C mains or line frequency)
• Other electrical: typically >10 Hz (muscle stimulators, strong magnetic fields, pacemakers with impedance monitoring)

The skin-electrode interface requires special note, as it is the largest source of interference, producing a DC component of 200-300 mV. Compare this to the electrical activity of your heart, which is in the range of 0.1 to 2 mV! The interference seen from this component is magnified by motion, either patient movement, or respiratory variation.

## How does Fourier Analysis relate to ECG filtering?

Filtering on an ECG is done four fold: high-pass, low-pass, notch, and common mode filtering. High-pass filters remove low frequency signals (i.e. only higher frequencies may pass), andlow-pass filters remove high frequency signals. The high-pass and low-pass filters together are known as a bandpass filter, literally allowing only a certain frequency band to pass through. The notch filter is used to eliminate the line frequency and is usually printed on the ECG (e.g. ~60 Hz). Common mode rejection is often done via right-leg drive, where an inverse signal of the three limb electrodes are sent back through the right leg electrode.

All filters introduce distortion in the resulting output signal. This distortion can be in amplitude or phase. Filters found in cardiac monitors need to be real time and thus cannot tolerate delays. Because of this, the filter output exhibits non-linear characteristics due to their required shorter delays. Basically, they distort different frequencies differently causing phase distortion. If the filters were applied during post-processing, where real-time output of the signal is unnecessary, the design of these filters can be linear which minimizes phase distortion.

Low-pass filters on the ECG are used to remove high frequency muscle artifact and external interference. They typically attenuate only the amplitude of higher frequency ECG components. Analog low-pass filtering has a noticeable affect on the QRS complex, epsilon, and J-waves but do not alter repolarization signals.

High-pass filters remove low-frequency components such as motion artifact, respiratory variation, and baseline wander. Unlike low-pass filters, analog high-pass filters do not attenuate much of the signal. However, analog high-pass filters suffer from phase shift affecting the first 5 to 10 harmonics of the signal. This means that a 0.5 Hz high pass filter, which is a lower frequency than the myocardium produces, still can affect frequencies up to 5 Hz!

Compare the ST/T-waves between the raw V1 (blue) and filtered V1 (red). Common monitor mode 1 Hz analog high-pass filter was simulated using GNU Octave 3.6 and a 4th order Butterworth filter.

Remember that lower harmonics are of a larger amplitude than the higher harmonics, so any distortion to their phase is magnified on a real-time ECG. Studies have found that ECG’s with baseline alterations to the normal vectors of depolarization and repolarization feature greater distortion with high-pass filtering.

If a linear-phase high-pass filter is used, such as on a post-processed ECG, the frequency cutoff can be as high as 0.67 Hz without affecting ventricular repolarization at normal heart rates. However, because this filter design requires delays which do not permit real time display of the ECG signal, they are not commonly used in cardiac monitors. If a non-linear high-pass filter is used, the cutoff should be set to 0.05 Hz in order to minimize distortion to the ST-segment (10 times 0.05 Hz is 0.5 Hz, which is below physiological heart rates).

## Putting it All Together

1. Use a frequency setting appropriate for your equipment and clinical setting. Most 12-Lead ECG’s should be acquired at 0.05 – 150 Hz for full fidelity ST-segments and late potentials (such as epsilon or J-waves). A decent compromise with 0.05 – 40 Hz or 0.05 – 100 Hz can be used if muscle artifact is severe, provided you’re aware of the amplitude distortions which will occur.

2. Always read the frequency settings and calibration pulse when interpreting an ECG. These provide valuable information in order to accurately interpret the ECG!

References

• Buenda-Fuentes, F., Arnau-Vives, M., & Arnau-Vives, A (2012). High-Bandpass Filters in Electrocardiography: Source of Error in the Interpretation of the ST Segment. ISRN Cardiology.
• Venkatachalam, K. L., Herbr, J. E., Herbrandson, J. E., son, & Asirvatham, S. J (2011). Signals and signal processing for the electrophysiologist: part I: electrogram acquisition Circulation. Arrhythmia And Electrophysiology, 4(6), 965-73. doi:10.1161/CIRCEP.111.964304
• Venkatachalam, K. L., Herbr, J. E., Herbrandson, J. E., son, & Asirvatham, S. J (2011). Signals and signal processing for the electrophysiologist: part II: signal processing and artifact Circulation. Arrhythmia And Electrophysiology, 4(6), 974-81. doi:10.1161/CIRCEP.111.964973

• Brooks Walsh says:

“Because of this, the filter output exhibits non-linear characteristics due to their required shorter delays. … If the filters were applied during post-processing, where real-time output of the signal is unnecessary, the design of these filters can be linear which minimizes phase distortion.”

Is this why signal-averaged ECGs work out so nicely?

• Christopher says:

Brooks,

Basically yes! They use a bidirectional filter, a technique that is phase neutral, which cannot be run in real-time. Signal-averaged ECG’s also use a “template” of the cardiac cycle taken from 5-10 complexes. This representative complex is then filtered much like a normal ECG, however, if they’re looking for ventricular late potentials the high-pass will be on the order of 25 Hz! Obviously they’ll miss out on ST/T-wave changes with that setup, but that’s not their goal. Late potentials on the ECG are typically marred by low-pass filtering meant to remove muscle artifact. By taking the average of a number of complexes they can more easily reject the interference from the muscle.

• Anna Marie Kenward says:

Hi! There.
We use MAC 5500 ECG machines at my hospital. My colleagues and I have found that if we have too much artifact we can’t get rid of, that by cancelling the transmit and print, and saving the ECG to the machine, we can then go to the file manager, select that ECG and then ask it to print a copy. Whereupon, a perfect copy emerges without any artifact shown, although the words ‘poor quality ECG, interpretation may be affected’, are still there. We cannot see any change in the ECG’s at all yet clearly one has been filtered and the other not. We would like to know how this can be and what if any differences can be expected and what to note on the copy so that doctors know there has been a filter applied.

Many thanks.

• Christopher says:

Anna,

That is a great question, I’ll have to ask around. On the bottom of the printed ECG should be the filter settings used. Usually this will be after the paper speed and gain on a GE Marquette printing. If the frequency range looks like 0.05 Hz to 40 Hz (or higher), you’ll be Ok!

Potentially during post-processing it is using bidirectional filtering, which does not exhibit phase distortion. But I cannot be sure of this, so I’m going to try and find out.

Great question!

• THANK YOU Christopher!

• Robert says:

HR 80 Bpm
P 112ms
PR 156ms
QRS 89ms
Qt/qtc 373/431ms
P/QR/S/T 32/29/59
RV5/SV1 1.333/1.718ms
Hi there,
Is there anything wrong with this ecg.

• Matt says:

Hi
I wondered if you might have a reference/resource for the frequencies of the different ECG components/interference?

• Great review. Am I correct that since the common frequency for the P wave = 0.67-5 Hz — that IF the HIGH-pass filter is set at 0.5 instead of 0.05 — that because of the possibility of “phase shift” — that inscription of P waves may be suboptimal (and that this may therefore make assessment of P wave consistency and morphology suboptimal)? THANKS!