Why would you put your input amplifier in front of your filtering for an ECG signal?

Am I missing some important reason why you would do the signal conditioning in this order?

Yes you are...

The front-end differential amplifier will be chosen such that it has a common-mode rejection level of many tens of dB, quite possibly in the region of 80 dB.

This diff amp converts a differential signal into a single-ended signal and any common-mode interference will be largely ignored.

If you were to put filters on both legs of the diff amp, to avoid a balance mismatch you would have to choose components (such as capacitors and resistors) that were matched to at least an equivalent level of -80 dB.

You could regard 1% capacitors as having potentially a difference in value of 2% and that, in dB terms could be regarded as -20 log(50) = -34 dB. In other words, you would never get decent differential common-mode performance with filters on each leg before the diff-amplifier.


I'll second @Andy's answer, and I'd like to add one thing.

A passive low-pass filter between the electrodes and the InAmp is called for. I put the cutoff frequency somewhere in the kHz region.

block diagram with low-pass filter between electrodes and instrumentation amplifier

InAmps have a great CMRR at low frequencies, but the CMRR degrades at higher frequencies (above 3kHz-10kHz depending on the chip). Rectification at high frequencies is another concern for InAmps. A high frequency signal may get rectified by InAmp's input stage and then appear as a DC offset.
(More in this app note: Analog Devices MT-070. In-Amp Input RFI Protection.)

Since the EKG signal is low so the high frequency can be filtered out even with somewhat mismatched passive components.


Andy and Nick offered great answers. Let me try to beef them up just a little.

First, the math says that amplifying then filtering is equivalent to filtering then amplifying. This, of course, applies to the ideal situation, so lets discuss the non-idealities.

The BIG one here, IMO, is saturation. If the noise is so big that it saturates your amplifier, all bets are off. You lose signal. Does this bother us here?? Not really. We usually leave the gain of that InAmp stage low enough to deal with 100mV or so of DC electrode offset, so gain is modest and we're unlikely to saturate.

Next concern involving non-idealities, as already mentioned, is Common Mode noise and CMRR. We want the CMRR in the pass band to be excellent. If we hurt the CMRR in the pass band, we decrease SNR. I'm not totally with Nick on the prefiltering in the kHz range, but I usually follow manufacturer guidelines for RF filtering, and maybe even go a decade in frequency below their recommendations. When I build these filters, I often use X2Y caps to try to keep the caps well-matched.

Lastly, let's think about the signal path all the way to the signal in the body. The impedance of the electrode/skin interface will always vary, and every design needs to take that into account. Because of the tremendous input impedance of today's InAmps, this isn't quite as big a deal as it used to be. In fact, to meet NFPA99 hospital safety standards (when I know I have to bring a device through clinical engineering for inspection) I often put a big honking resistor on each electrode lead to guarantee compliance (<10 microamps)given a failure of Rail voltage at the amp inputs. I match those resistors well, but it probably doesn't make as much difference as I like to think it does, especially given mismatch at the electrode, so to some extent, we're kidding ourselves to make believe that just because we don't throw a filter in before the amp that the signal paths of all electrode leads are well matched -- they're just well matched enough. Variations here, however, can make nailing the cutoff frequency of a filter we choose to put here a bit iffy.

Throw Driven-Leg into the mix, and you're probably about 20dB better. InAmps aren't what they were in John Webster's day. We have inexpensive units with impedances that he could only dream about.

The way I approach such issues is to get my differential signal converted to single-ended as soon as I possibly can, treating as gingerly as I can get away with right up until the Instrumentation Amp with modest gain, and after that, I do whatever I want. With good part selection, you can really get microvolt-level noise with millivolt-level signals.

As a last point, Nick's point about ESD protection is a good one. For my stuff, I don't particularly care, but have you ever wondered how clinical ECG units don't just pop when a patient is defibrillated? Thousands of volts presented to the inputs, and a well-designed unit just laughs and goes about it's business.