How to design an accurate bandpass filter for Electrocardiography application ?

Posted on 2011-10-23
Last Modified: 2012-05-12
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
Question by:adkry
    LVL 82

    Assisted Solution

    by:Dave Baldwin
    This 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.
    LVL 26

    Assisted Solution

    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:


    Author Comment

    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 ?

    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
    LVL 26

    Accepted Solution

    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.

    Author Comment

    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.

    LVL 82

    Assisted Solution

    by:Dave Baldwin
    Here 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 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.

    Author Closing Comment

    Thanks guys, your comments perfectly answered my questions :D
    LVL 82

    Expert Comment

    by:Dave Baldwin
    You're welcome, glad to help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    This is about my first experience with programming Arduino.
    If you want to move up through the ranks in your technology career, talent and hard work are the bare necessities. But they aren’t enough to make you stand out. Expanding your skills, actively promoting your accomplishments and using promotion st…
    Where to go on the main page to find the job listings. How to apply to a job that you are interested in from the list that is featured on our Careers page.
    Introduction to GIMP:  GNU Image Manipulation Program. It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now