Author Topic: Bandpass Filter Design  (Read 6875 times)

0 Members and 1 Guest are viewing this topic.

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Bandpass Filter Design
« on: April 27, 2018, 11:52:22 am »
Hello,

I've been working on a project that has 2 low pass filter (LPF) and 2 high pass filter (HPF) to make a band pass filter (BPF). I am using Sallen-key topology.
My question is: If sallen-key is a second order filter, when using 2 low pass it's considered a 4th order low pass filter and the same for the high pass. So my band pass filter, which has a 4th order LPF and a 4th order HPF, is a 4th order BPF or an 8th order?

If it's an 8th order the transfer function is the product of each filter transfer function correct? [Hlp1(s)*Hlp2(s)*Hhp1(s)*Hhp2(s)]
But what is the transfer function if the filter is considered to be 4th order?

And for last, should I use buffer stages between each filter?
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5867
  • Country: de
Re: Bandpass Filter Design
« Reply #1 on: April 27, 2018, 12:51:52 pm »
First, don't use Sallen-Key, there are better filters, eg, MFB.

To your second question: if you have two identical second-order filters cascaded, it's a 4th order filter with a second-order squared response. This is probably not what you want.
A true 4th order filter will have two different sets of complex conjugate poles. These poles will depend on your desired response, eg, Butterworth, Bessel etc.
The low-pass/high-pass combo you are describing would normally not be called an 8th order filter, as the cutoff frequencies are different.

No reason to use buffers if your opamps are good.

« Last Edit: April 27, 2018, 01:32:10 pm by Benta »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Bandpass Filter Design
« Reply #2 on: April 27, 2018, 01:10:00 pm »
Go here: http://www.analog.com/designtools/en/filterwizard/

When I was first introduced to filter design, it was all tables.  Active filters of anything other than 2nd order were implemented with gyrators or leap frog.  Now, somebody has done the work for you.
 
The following users thanked this post: tron9000, mtdoc, Mr. Scram

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2216
  • Country: mx
Re: Bandpass Filter Design
« Reply #3 on: April 27, 2018, 01:41:15 pm »
Either that, or solve polynomials in the s-plane.  >:D
 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Re: Bandpass Filter Design
« Reply #4 on: April 27, 2018, 05:02:26 pm »
Thanks for everyone's answer.

I will try using MFB, made some research and saw that it's better than sallen-key for LPF and BPF. Thx for the tip.
So a true 4th order filter is a filter with same cutoff frequency but different poles (i.e. different capacitors and resistors combination for each stage)?
Since I want to go for linear phase response I guess my best choice should Bessel right?

@Wimberleytech
Thx for the link I've been using some similar tools, but my goal is to also learn the math, the problem is that I haven't done this "more advanced" type of math in a few years, so I'm a little rusty.

@Schimitt Trigger
As said previously solving the polynomials is what I want to do, but I'm making a lot of mistakes since I have to remember a lot from my classes  ;D
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5867
  • Country: de
Re: Bandpass Filter Design
« Reply #5 on: April 27, 2018, 08:10:13 pm »

I will try using MFB, made some research and saw that it's better than sallen-key for LPF and BPF. Thx for the tip.
So a true 4th order filter is a filter with same cutoff frequency but different poles (i.e. different capacitors and resistors combination for each stage)?
Since I want to go for linear phase response I guess my best choice should Bessel right?

Last Q first: yes, the Bessel transfer function is optimized for linear phase... at the cost of amplitude rolloff.

Finding the poles for a Bessel filter is not trivial, but if you search there are tables available.
Yes, your 2nd order filter sections will be different.
 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Re: Bandpass Filter Design
« Reply #6 on: April 30, 2018, 11:34:42 am »
Some few more questions:

Can I use different topology to design a n order filter (e.g. LP Sallen-key and an integrator amplifier to make a 3rd order)?

I may be very wrong here, but from what I researched the type of filter I want is determined by the Q factor (Butterwhorth  it's 0.707), not sure what is the Q for bessel yet, but I guess 0.58?
But using this filter wizard: http://www.beis.de/Elektronik/Filter/ActiveLPFilter.html) I saw that when designing an even order filter the Q should the product of the Q from the second order filters is close to 0.707 and when designing an odd order filter the Q product is around 1, why is that?
(At least for butterworth)

Any good links or papers I can read on designing Bessel Filters?
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Bandpass Filter Design
« Reply #7 on: April 30, 2018, 01:42:34 pm »
Some few more questions:

Can I use different topology to design a n order filter (e.g. LP Sallen-key and an integrator amplifier to make a 3rd order)?
If you mean by 'integrator" an RC added to a 2nd order Sallen-Key, then yes you can but there are better topologies.

Quote

I may be very wrong here, but from what I researched the type of filter I want is determined by the Q factor (Butterwhorth  it's 0.707), not sure what is the Q for bessel yet, but I guess 0.58?
But using this filter wizard: http://www.beis.de/Elektronik/Filter/ActiveLPFilter.html) I saw that when designing an even order filter the Q should the product of the Q from the second order filters is close to 0.707 and when designing an odd order filter the Q product is around 1, why is that?
(At least for butterworth)

Any good links or papers I can read on designing Bessel Filters?

In terms of filters, Q is only meaningful for a second-order denominator.  For higher-order filters, that is the wrong way to think about the problem.

Bessel, Butterworth, Chebyshev, eliptic, etc, are all approximation functions derived based on certain criteria (e.g., maximally flat for Butterworth).  It is difficult to know what you really want to do, but now I am guessing you want to be able to derive the Bessel function from first principles.  Otherwise, you would go find it published in a gazillion different locations and just use it.  I have a few books on my shelf that cover this stuff, but it is the "dusty shelf" of books written before there were calculators and likely all of the authors are dead.

In the IIR world, the LP filter design process is more or less something like this.
Define pass band and stop band parameters
Pick the approximation that meets these parameters (Butterworth, Cheby Type I, Cheby Type II...)
Get the polynomial from a reference
Break it into second-order polynomials (this can be tricky, see below)
Pick a second-order active filter topology and associated design equations for the components
The way you generated the second-order polynomials will impact component spread, noise, dynamic range, sensitivity.
In this process, if you need BP or HP, you do what is called a "frequency transformation" to convert from e.g., LP to BP

The book I suggest is "Modern Filter Design Active RC and Switched Capacitor" by Ghausi and Laker 
« Last Edit: April 30, 2018, 01:46:00 pm by Wimberleytech »
 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Re: Bandpass Filter Design
« Reply #8 on: April 30, 2018, 03:00:48 pm »
If you mean by 'integrator" an RC added to a 2nd order Sallen-Key, then yes you can but there are better topologies.
I asked because I saw in a circuit(not sure where this circuit is from) but it has a integrator amplifier followed by a sallen-key, followed by a differentiator amplifier and for last a simple active rc filter. Not sure why use 3 OpAmps for a 1st order but it's how the circuit on the board is.

Quote
The book I suggest is "Modern Filter Design Active RC and Switched Capacitor" by Ghausi and Laker
Thx.

IIR Filter are digital filters right? I actually need an analog filter.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Bandpass Filter Design
« Reply #9 on: April 30, 2018, 03:05:29 pm »


IIR Filter are digital filters right? I actually need an analog filter.

No, IIR filters are analog filters.  Digital filters can be FIR or IIR.  All of my comments have applied to analog filters.
For reference, FIR filters are made with just zeros.  You cannot make an all zero analog filter but it is easily done digitally.  Digital filters can emulate analog filters (IIR filters) in the sampled-data domain.  Switched-capacitor filters are really analog filters implemented in the sample data domain.
 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Re: Bandpass Filter Design
« Reply #10 on: April 30, 2018, 04:08:11 pm »
I see, thx.
Have a lot of thing to google for now.  :scared: hahahaha
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: Bandpass Filter Design
« Reply #11 on: April 30, 2018, 04:33:30 pm »
Go here: http://www.analog.com/designtools/en/filterwizard/

When I was first introduced to filter design, it was all tables.  Active filters of anything other than 2nd order were implemented with gyrators or leap frog.  Now, somebody has done the work for you.
Thanks, that's actually helpful.
 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Re: Bandpass Filter Design
« Reply #12 on: April 30, 2018, 07:14:47 pm »
So I've been having fun with some filters and trying to understand the math and all.
I tried with a Sallen-key that i never saw before. @Wimberleytech actually you were the one that helped me see that it was a Sallen-key, from a old post of mine.
The only thing that I found about something like that was this: http://www.ti.com/lit/an/sbaa237/sbaa237.pdf
But in my case the resistor wasn't to compensate the GBW.

Circuit Attached. And I got down to the transfer function (I guess  :D):
H(s)=(s*R3*C1 + 1)/[s2*R1*R2*C1*C2 + s*(R1*C1+R2*C1+R3*C1) +1]

I got stuck on this point, how do I find the corner frequency of this function? I never saw a LPF with a zero.
I simulated and plotted and it's in fact a LPF, and R3 has influence on fc. It's just that I don't see how to go on with the math.
From what I found on my old notes from my classes i am using this function as general function for 2nd order filters:
H(s) = N(s)/(s2/w2n + s/Qwn + 1]

where N(s) determines the type of filter:
N(s) = k; is a LPF
N(s) = k*s2/w2n; is a HPF
N(s) = k*s/Qwn; is a BDF
N(s) = k*(1 - s2/w2n); is a notch filter



« Last Edit: April 30, 2018, 07:45:07 pm by Rigolon »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Bandpass Filter Design
« Reply #13 on: April 30, 2018, 08:42:57 pm »
The zero in the modified SK compensates for the roll off of the op amp.  For an ideal opamp, the filter is still a LPF but with some peaking (depending on where the zero lies) and a first-order roll off (-20dB/decade).
 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Re: Bandpass Filter Design
« Reply #14 on: April 30, 2018, 09:02:45 pm »
The zero in the modified SK compensates for the roll off of the op amp.

I'm having trouble to understand this, the roll off shouldn't impact on the corner frequency right? If I want a better roll off I'll have to use a higher order filter, correct? For example, if I use two identical Sallen-key LPF I will have a 4th order filter (I know that it's better to not use identical filters) and have a better roll off than just 1 SK LPF.

But this resistor is actually impacting on my corner frequency, I just can't find the equation for the corner frequency. All equations that I find/calculate doesn't include that resistor.


 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Bandpass Filter Design
« Reply #15 on: April 30, 2018, 11:14:23 pm »
The zero in the modified SK compensates for the roll off of the op amp.

I'm having trouble to understand this, the roll off shouldn't impact on the corner frequency right? If I want a better roll off I'll have to use a higher order filter, correct? For example, if I use two identical Sallen-key LPF I will have a 4th order filter (I know that it's better to not use identical filters) and have a better roll off than just 1 SK LPF.

But this resistor is actually impacting on my corner frequency, I just can't find the equation for the corner frequency. All equations that I find/calculate doesn't include that resistor.

If you put an opamp in unity-gain configuration and observe its frequency response, you will see that it approximates a first-order response with a corner frequency at the unity-gain-bandwidth frequency (e.g., 1 MHz for a 741).  So, an opamp is a FILTER!!

So if you build a filter around an opamp, the frequency response of the amp itself comes into play.  That is what the zero is compensating for in the TI article. 
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
Re: Bandpass Filter Design
« Reply #16 on: May 01, 2018, 01:44:53 am »
Jumping in the middle of this conversation...

Here is a passive LC Filter Design option that I've used:   https://www-users.cs.york.ac.uk/~fisher/lcfilter/
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Bandpass Filter Design
« Reply #17 on: May 01, 2018, 01:21:22 pm »
Jumping in the middle of this conversation...

Here is a passive LC Filter Design option that I've used:   https://www-users.cs.york.ac.uk/~fisher/lcfilter/

Yes indeed!  And how appropriate that you should post.

One you have an RLC prototype, you can replace inductors and capacitors with active RC integrators using the LEAPFROG technique.

RLC ladder filters are the least sensitive to component tolerance.

LEAPFROG is not efficient in terms of active components (one opamp for every pole or zero).  It is also difficult to troubleshoot when not working right.

https://en.wikipedia.org/wiki/Leapfrog_filter
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5867
  • Country: de
Re: Bandpass Filter Design
« Reply #18 on: May 01, 2018, 04:42:11 pm »
So a true 4th order filter is a filter with same cutoff frequency but different poles (i.e. different capacitors and resistors combination for each stage)?

Just to give you a flavour of how to work with the filter poles: the poles are always in the left side of the complex plane (except Cauer filters).
For a Butterworth response, it's especially simple: all poles are equally spaced on a circle with centre at 0,0.
For a second-order response they're at 135 and 225 degrees.
For a third-order they're at 120, 180 and 240 degrees.
For a fourth order they're at 112.5, 157.5, 202.5 and 247.5 degrees.
And so on.
IIRC, the Bessel and Chebychev poles are placed on an ellipse. Tables will help here.


Cheers.
« Last Edit: May 01, 2018, 04:51:14 pm by Benta »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Bandpass Filter Design
« Reply #19 on: May 01, 2018, 05:58:21 pm »
So a true 4th order filter is a filter with same cutoff frequency but different poles (i.e. different capacitors and resistors combination for each stage)?

Just to give you a flavour of how to work with the filter poles: the poles are always in the left side of the complex plane (except Cauer filters).
For a Butterworth response, it's especially simple: all poles are equally spaced on a circle with centre at 0,0.
For a second-order response they're at 135 and 225 degrees.
For a third-order they're at 120, 180 and 240 degrees.
For a fourth order they're at 112.5, 157.5, 202.5 and 247.5 degrees.
And so on.
IIRC, the Bessel and Chebychev poles are placed on an ellipse. Tables will help here.


Cheers.

Very nice explanation.  I don't think you meant to imply that Cauer (aka eliptic) filters can have poles on the imaginary axis.  There are zeros on the imaginary axis in Cauer filters (and Chebyshev Type II), but not poles.
 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Re: Bandpass Filter Design
« Reply #20 on: May 02, 2018, 11:27:40 am »
Thx Wimberleytech and Benta, it's this kind stuff that I want to learn.  ;D

Another question, maybe this one is obvious:
- When analyzing a circuit with several stages of filtering, can I look at each stage individually or should I just look at the Input on the first stage and the output from the last?
« Last Edit: May 02, 2018, 11:45:52 am by Rigolon »
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5867
  • Country: de
Re: Bandpass Filter Design
« Reply #21 on: May 02, 2018, 01:31:11 pm »
It's much easier to extract the poles if you look at each first/second order stage separately.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Bandpass Filter Design
« Reply #22 on: May 02, 2018, 01:32:15 pm »
Thx Wimberleytech and Benta, it's this kind stuff that I want to learn.  ;D

Another question, maybe this one is obvious:
- When analyzing a circuit with several stages of filtering, can I look at each stage individually or should I just look at the Input on the first stage and the output from the last?

You can analyze each stage by itself and take the product of the impulse response of all stages to get the final transfer function IF each stage is isolated by a unity-gain buffer with infinite input impedance and zero output impedance.  Does not have to be really infinite and really zero, but high compared to the other impedances in the circuit.  When active biquad filters are cascaded, you have this situation because the output of each stage has essentially zero output impedance.
 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Re: Bandpass Filter Design
« Reply #23 on: May 02, 2018, 02:49:24 pm »
I see, If the stages are not isolated what I will have to do to get the TF?

About that modified Sallen-key, I used the values that are on the circuit where I saw this kind of filter and found the poles approximately  s' = - 840 and s"=-120,000. Which gives the cutoff frequencies of approximately fc' = 133.56Hz and fc" = 18,965Hz. But simulating it I got the -3dB at 12.7kHz, at 18.9kHz it's -4.3dB. It's this plausible?

One more (maybe obvious) question:
- When cascading filters I have to use the same corner frequency for each?
« Last Edit: May 02, 2018, 02:52:46 pm by Rigolon »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Bandpass Filter Design
« Reply #24 on: May 02, 2018, 03:43:51 pm »
I see, If the stages are not isolated what I will have to do to get the TF?
Yes, you will have to analyze the whole circuit
Quote

About that modified Sallen-key, I used the values that are on the circuit where I saw this kind of filter and found the poles approximately  s' = - 840 and s"=-120,000. Which gives the cutoff frequencies of approximately fc' = 133.56Hz and fc" = 18,965Hz. But simulating it I got the -3dB at 12.7kHz, at 18.9kHz it's -4.3dB. It's this plausible?
show me the circuit and post your simulation (if it is an LTSpice file)
Quote

One more (maybe obvious) question:
- When cascading filters I have to use the same corner frequency for each?
No, see my sketch
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf