• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1144
  • Last Modified:

How to design an accurate bandpass filter for Electrocardiography application ?

Hello Guys,

I need to design and build a bandpass filter amplifier for my ECG (ElectroCardiography) project. The band pass filter is to remove noise. Heart signals are between 0.5 and 150 Hz, therefore the bandpass filter should remove noise below 0.5 Hz and above 150 Hz.

I have designed a simple bandpass filter but it doesn't work as it should. It doesn't filter out signals of 200 or even 300 Hz, nor even 500, something is clearly wrong. I've designed it in MultiSim (by National Instruments). I've attached a snapshot of the circuit for you to have a look.

The equation I used was frequency = 1 / 2 * PI * Resistance * Capacitance

I've also attached screenshots for the output at 150 Hz and at 200 Hz , at 200 Hz the output should be reduced if not made zero.

I've used the LF351D because it has high-input-noise impedance so please in your advice try to consider the fact that I'm gonna be using that op-amp.

The question is, is what I did correct ? How can I design an advance bandpass filter which is accurate and reliabel and suitable for the ECG application ? Please help and advise

Thanks band-pass-filter-picture output-of-bp-filter-200-hz output-of-bp-filter-150-hz
  • 3
  • 3
  • 2
4 Solutions
Dave BaldwinFixer of ProblemsCommented:
This http://www.amazon.com/Active-Filter-Cookbook-Second-LANCASTER/dp/075062986X is the best book on active filters ever written.  My first edition copy is dated 1975.

Unity gain stable op-amps like the LF353 are better suited for filters in this range.  You have to allow too much gain for the LF351 to work properly.  You might be able to compensate the LF351 for unity gain stability.  In addition, filters that range over more than an octave or two are normally done as two stages.  One for the high-pass section and one for the low-pass.

A filter like you have drawn with only a single RC for low-pass and another for high-pass will have a 6db per octave rolloff which is not very steep.   For 150HZ low-pass like that, a 300Hz signal will only be 7db down from the midband.
The first step in designing a filter is to come up with the specifications.
The bandwidth is only the first step.  
You also have to decide what attenuation you need in the stop bands, and what attenuation and ripple you can tolerate in the pass band.
This suggests that you have to know what your noise is.  So you have to look at a real signal and do an FFT.

DaveBaldwin's advice is absolutely correct.   You need two filters:  One for the high-pass section and one for the low-pass.

Look at 2- or 4-pole Sallen-Key filters.  You can find design software on line:


Nothing against Don Lancaster, but if you really need to design a serious filter, this book has the data you need:

adkryAuthor Commented:
Hello DaveBaldwin,

Thank you so much for your great reply and helpful tips. I need to ask a few questions though. Could you please clarify what did you mean by "Unity gain stable op-amps" ? What did you mean by "You have to allow too much gain for the LF351 to work properly" ?

Thank you for your tip on separating the filter into a low-pass and a high-pass one. Also thanks for suggesting the LF353 however when I search, I found many types of it, which one is suitable for this ECG application ? http://www.datasheetcatalog.com/datasheets_pdf/L/F/3/5/LF353.shtml

You mentioned that my circuit won't get me a steep rolloff, so how can I achieve a steep roll-off ?

Thanks for your help much appreciated

Hello d-glitch,

Thank you so much for your great reply and helpful info. The attenuation I wish is very high attenuation in the stop bands (get the signal in the stop bands down to zero if possible), and no attenuation in the pass bands. What did you mean by ripple ?

I don't know the noise in my signal, I can't see a real signal unless I build the circuit, or should I build the circuit without the filter and then analyze the signal ? What do you mean by FFT ? and How can I do it ?

Are Sallen-Key filters the most suitable ? which type of it should I use ? i.e. Bessel ? Butterworth ? or Chebychev ?
Also I don't know what to fill in the fields you in that filter calculator. How many poles should use ? why 2 or 4 ?

Thanks for your suggestion on the book, I'll definitely check it out.

Sorry for the too many questions but if you can answer these questions I'll be very grateful since my understanding isn't exactly the best
Worried about phishing attacks?

90% of attacks start with a phish. It’s critical that IT admins and MSSPs have the right security in place to protect their end users from these phishing attacks. Check out our latest feature brief for tips and tricks to keep your employees off a hackers line!

At low frequencies and modest gains almost any op amp will work.
My standard general purpose op amp is the LF411 or 412 (single and dual).

You get a steeper roll off by adding more poles to your filter.

>> Should I build the circuit without the filter and then analyze the signal ?
      Yes, if you don't know how much filtering you will need.
      You could be wasting time over designing the filter, or wasting ever more time by underdesigning it.

If you can record the signal on a modern scope or computer, you should be able to run a Fast Fourier
Transform (FFT), to analyze the frequency content.

Sallen-Key circuit is a way to implement poles and zeroes that you need to make up a filter.
Butterworth is usually the most straight forward.  It has a flat pass-band.
Chebychev have the fastest roll off, but have ripples in the pass band.

You are not going to know how much filtering you need until you see your first raw signal.

If you build a 2- or 4-pole filter, it may any of not enough, perfect, or too much.
But you will be able to say that you tried.

But it is much better to analyze the problem, specify the requirements, and then meet them.
adkryAuthor Commented:
Hello D-glitch,

Thank you for your great answer. I will run an FFT and analyze it to see how much filtering do I need.

I believe I'll go for the Butterworth, since I'm later gonna use the output signal to apply signal processing on it, therefore it's better to have a consistent gain in the pass band.

Thanks for your help.

Dave BaldwinFixer of ProblemsCommented:
Here http://www.national.com/mpf/LF/LF353.html#Overview is a better source for the LF353 datasheet.  "Unity gain stable op-amps" can be configured with feedback for a circuit gain of 1 and not oscillate.  It looks like the LF351 http://www.national.com/opf/LF/LF351.html#Overview is "Unity gain stable" also so I guess I was remembering wrong.

@d-glitch's comment above is good advice.  In the end, you need to build the circuit to verify it.  Simulators and circuit analyzers can never tell you everything.
adkryAuthor Commented:
Thanks guys, your comments perfectly answered my questions :D
Dave BaldwinFixer of ProblemsCommented:
You're welcome, glad to help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now