Author Topic: Bandpass Filter Design  (Read 6903 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?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5877
  • 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: 2223
  • 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
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5877
  • 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. 
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • 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
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5877
  • 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 »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5877
  • 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
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Bandpass Filter Design
« Reply #25 on: May 02, 2018, 03:52:41 pm »
Unless you want a Linkwitz-Riley crossover filter, that just happens to use squared butterworth response.
 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Re: Bandpass Filter Design
« Reply #26 on: May 02, 2018, 04:26:27 pm »
Quote
show me the circuit and post your simulation (if it is an LTSpice file)
I'm more used to Proteus since I learned with it.
But the image with the circuit and frequency response are attached below.

In the case where fc is not the same for how do I know fc? Let's say I have a LPF with fc1 = 10kHz and another LPF with  fc2 = 50kHz, the final fc it's equal to the smallest one or is there some kind of equation?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5877
  • Country: de
Re: Bandpass Filter Design
« Reply #27 on: May 02, 2018, 04:51:01 pm »
Unless you want a Linkwitz-Riley crossover filter, that just happens to use squared butterworth response.

Actually, a Linkwitz-Riley can use any squared response. I've built a fourth-order Linkwitz-Riley with Bessel response.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5877
  • Country: de
Re: Bandpass Filter Design
« Reply #28 on: May 02, 2018, 04:59:39 pm »
Quote
show me the circuit and post your simulation (if it is an LTSpice file)

In the case where fc is not the same for how do I know fc? Let's say I have a LPF with fc1 = 10kHz and another LPF with  fc2 = 50kHz, the final fc it's equal to the smallest one or is there some kind of equation?

This is where Bode plots and asymptotes come in. Your example would (assuming second order filters) result in a filter with a cutoff at 10 kHz with 40 dB/dec roll off, the roll off increasing to 80 dB/dec at 50 kHz.

I'm suspicious of your Sallen-Key filter, R3 seems way too high. Shouldn't it be 100 ohms?
 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Re: Bandpass Filter Design
« Reply #29 on: May 02, 2018, 05:07:44 pm »
his is where Bode plots and asymptotes come in. Your example would (assuming second order filters) result in a filter with a cutoff at 10 kHz with 40 dB/dec roll off, the roll off increasing to 80 dB/dec at 50 kHz.
So if I want a better roll-off isn't better to use the same fc? So I get 80 db/dec roll off?
Or are there any advantages or reasons to use different fc?

I'm suspicious of your Sallen-Key filter, R3 seems way too high. Shouldn't it be 100 ohms?

I'm using the values that are on the actual circuit, I have an old post that I explain a little how I got to this circuit.
Not sure if the author was knowing what they were doing, because there are a lot of mistakes on the circuit, as resistors and capacitors grounded on both pins.

There are capacitors on the output of each opamp going to ground, which for me is weird since it decreases the slew-rate of the opamp. Not sure if there any motive to use capacitors like that on the output of the opamps.
I will post the whole circuit some time, it's just that I'm taking it by parts to focus and learn in depth about it and electronic in general.  ^-^
« Last Edit: May 02, 2018, 05:13:15 pm by Rigolon »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Bandpass Filter Design
« Reply #30 on: May 02, 2018, 05:28:59 pm »
his is where Bode plots and asymptotes come in. Your example would (assuming second order filters) result in a filter with a cutoff at 10 kHz with 40 dB/dec roll off, the roll off increasing to 80 dB/dec at 50 kHz.
So if I want a better roll-off isn't better to use the same fc? So I get 80 db/dec roll off?
Or are there any advantages or reasons to use different fc?

I'm suspicious of your Sallen-Key filter, R3 seems way too high. Shouldn't it be 100 ohms?

I'm using the values that are on the actual circuit, I have an old post that I explain a little how I got to this circuit.
Not sure if the author was knowing what they were doing, because there are a lot of mistakes on the circuit, as resistors and capacitors grounded on both pins.

There are capacitors on the output of each opamp going to ground, which for me is weird since it decreases the slew-rate of the opamp. Not sure if there any motive to use capacitors like that on the output of the opamps.
I will post the whole circuit some time, it's just that I'm taking it by parts to focus and learn in depth about it and electronic in general.  ^-^

I ran your circuit using LTSpice and a LT1058 (close enough) and got the same -3db frequency you got.  I think Benta is right.  Changing R3 to 100 ohms gives a -3dB of 1kHz
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Bandpass Filter Design
« Reply #31 on: May 02, 2018, 05:32:53 pm »
Replace it with 0ohm. That is what should be there. (Sallen key 2nd order, bessel Q=0.5 fc=1.5kHz, R1=R2=10k, C1=C2=10n)  :-//
 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Re: Bandpass Filter Design
« Reply #32 on: May 02, 2018, 05:50:38 pm »
Yansi
I actually don't intend on using this kind of filter, it's just that it got me curious and since my main objective is to learn, and thanks to you guys I already learned a lot more than I did in my classes few years ago.

Just so that it won't get forgotten in all the information and no one anwsers I will copy my last question:
So if I want a better roll-off isn't better to use the same fc? So I get 80 db/dec roll off?
Or are there any advantages or reasons to use different fc?

 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Bandpass Filter Design
« Reply #33 on: May 02, 2018, 06:01:15 pm »
Yansi
I actually don't intend on using this kind of filter, it's just that it got me curious and since my main objective is to learn, and thanks to you guys I already learned a lot more than I did in my classes few years ago.

Just so that it won't get forgotten in all the information and no one anwsers I will copy my last question:
So if I want a better roll-off isn't better to use the same fc? So I get 80 db/dec roll off?
Or are there any advantages or reasons to use different fc?

If you have four poles, it doesn't matter where they are...once you get a decade beyond the highest frequency pole, you will be rolling off at 80dB/dec.
The advantage of using a different fc for each stage is that you can achieve one of the classic filter approximations (butterworth, chebyshev, etc).
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Bandpass Filter Design
« Reply #34 on: May 02, 2018, 06:02:29 pm »
Combining the same filter twice means -6dB at the cutoff frequency, meaning a different -3dB cuttoff point.  Simply put: Combining two same filters with a -3dB cutoff fc will result in a different -3dB cutoff frequency.

Higher order filters (bessel,  cebysev, butterworth) require different pole positions, can not be approximated with a repeated block. Try some online calculators to see the results.

Do not attempt more than 3rd order sallen key filter, the component precision required will become impractical. Higher orders need more sallen key stages.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Bandpass Filter Design
« Reply #35 on: May 02, 2018, 06:32:09 pm »
Replace it with 0ohm. That is what should be there. (Sallen key 2nd order, bessel Q=0.5 fc=1.5kHz, R1=R2=10k, C1=C2=10n)  :-//

The reason he is using the modified SK is to compensate for GBW of the opamp.  In one of the earlier posts, he references the TI application note discussing this.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5877
  • Country: de
Re: Bandpass Filter Design
« Reply #36 on: May 02, 2018, 06:36:32 pm »
So if I want a better roll-off isn't better to use the same fc? So I get 80 db/dec roll off?
Or are there any advantages or reasons to use different fc?

Refer back to my post #18.
You keep focusing on fc, but this is not relevant for the single filter stages. The only fc that's interesting is the fc of the complete filter cascade. The individual stages will have different fc and often different Q.
This is why you need to use the pole tables for the different responses (Butterworth, Bessel etc.). Each second-order section gets its own set of complex conjugate poles.

Any filter type (Bessel etc., Cauer excepted) will at the end all have the same rolloff depending on filter order, the difference is what happens below and above the cutoff frequency.
 

Offline Nitrousoxide

  • Regular Contributor
  • *
  • Posts: 156
  • Country: au
Re: Bandpass Filter Design
« Reply #37 on: May 03, 2018, 11:19:23 am »
In the case where fc is not the same for how do I know fc? Let's say I have a LPF with fc1 = 10kHz and another LPF with  fc2 = 50kHz, the final fc it's equal to the smallest one or is there some kind of equation?

I believe you can take the geometric mean of the two cascaded centre frequencies. i.e. sqrt(10*50) = 22.3607.

edit: As mentioned before a bode plot would give you better information.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Bandpass Filter Design
« Reply #38 on: May 03, 2018, 01:23:52 pm »
In the case where fc is not the same for how do I know fc? Let's say I have a LPF with fc1 = 10kHz and another LPF with  fc2 = 50kHz, the final fc it's equal to the smallest one or is there some kind of equation?

I believe you can take the geometric mean of the two cascaded centre frequencies. i.e. sqrt(10*50) = 22.3607.

edit: As mentioned before a bode plot would give you better information.

It depends on how fc is defined.  Is it the -3dB point?  That would be typical.  Think about this...
If you have a single pole LP filter with a -3dB point at 10kHz, then cascade it with a single pole LP filter having a -3dB point at 50kHz, will the -3dB frequency increase above 10kHz?

Now, if compare terms of the standard second-order polynomial: s2 + W0/Q S + W02 to s2 + 2W1W2 S + W1W2 then W0 is geometric mean of W1 and W2
« Last Edit: May 03, 2018, 01:32:25 pm by Wimberleytech »
 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Re: Bandpass Filter Design
« Reply #39 on: May 03, 2018, 06:38:01 pm »
Quote
You keep focusing on fc, but this is not relevant for the single filter stages. The only fc that's interesting is the fc of the complete filter cascade. The individual stages will have different fc and often different Q.
This is why you need to use the pole tables for the different responses (Butterworth, Bessel etc.).

I've actually never worked with these tables before, I asked about the fc because I was thinking how to build each stage using the math, but I guess doing this is more to researchers or experts on the matter. Since my goal is to learn about electronics in general and try to work as a developer someday, the best thing I do is to keep more simple and use tools that are already there. It's just that I get excited and want to learn all the details  :-/O.

In the case where fc is not the same for how do I know fc? Let's say I have a LPF with fc1 = 10kHz and another LPF with  fc2 = 50kHz, the final fc it's equal to the smallest one or is there some kind of equation?

I believe you can take the geometric mean of the two cascaded centre frequencies. i.e. sqrt(10*50) = 22.3607.

edit: As mentioned before a bode plot would give you better information.

It depends on how fc is defined.  Is it the -3dB point?  That would be typical.  Think about this...
If you have a single pole LP filter with a -3dB point at 10kHz, then cascade it with a single pole LP filter having a -3dB point at 50kHz, will the -3dB frequency increase above 10kHz?

Now, if compare terms of the standard second-order polynomial: s2 + W0/Q S + W02 to s2 + 2W1W2 S + W1W2 then W0 is geometric mean of W1 and W2

I see.
I thought fc was always the -3dB point, didn't know that are other ways to define it.


 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Bandpass Filter Design
« Reply #40 on: May 03, 2018, 11:28:00 pm »
Your second order lowpass filter with the two different frequencies has a very droopy rolloff. It starts cutting well below its -3dB cutoff frequency and gradually increases its slope until it has a 12dB per octave slope  well above its -3dB cutoff frequency.
I show a Butterworth response that has a MUCH sharper rolloff than yours.
 

Offline LvW

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: de
Re: Bandpass Filter Design
« Reply #41 on: May 04, 2018, 05:19:48 pm »
Rigolon - I just have entered the discussion about bandpass filters, and I must admit that I did not read all the contributions.

I think I am rather familiar with filters (I have published a book in German about filters) and I, therefore, ask you if your problems have been solved at the time being?

If not or if you not quite satisfied with the situation, you should give again a short overview about your requirements (filter specification):
Order of transfer function, center frequency and bandwidth.
If the order is unknown to you, you should specify damping requirements.
 

Offline Nitrousoxide

  • Regular Contributor
  • *
  • Posts: 156
  • Country: au
Re: Bandpass Filter Design
« Reply #42 on: May 05, 2018, 11:26:55 am »
If the order is unknown to you, you should specify damping requirements.

Alternatively, you could also specify the filter passband and stopband gain, bandwidth and ripple. (Ripple will be affected by the normalised transfer function coefficients, i.e. Butterworth for maximally flat). A good picture:

 

Offline RigolonTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: 00
Re: Bandpass Filter Design
« Reply #43 on: May 09, 2018, 04:16:06 pm »
Nitrousoxide - Thx for the tip.

LvW - Sorry for the late response, I live in a small town and when starts to rain it gets impossible to get online. Anyway, my questions so far were all awnsered, but as things go by I come back to ask some more questions  ;D.
For now I will work on what I've learned here and research a bit about zero-phase filters. If there are any bibliography you guys could suggest on this topic I would appreciate it.
 

Offline LvW

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: de
Re: Bandpass Filter Design
« Reply #44 on: May 10, 2018, 08:41:40 am »
"zero-phase filters" ...please, can you give some explanation about the meaning of this expression? (Non-inverting bandpass?)
 

Offline Nitrousoxide

  • Regular Contributor
  • *
  • Posts: 156
  • Country: au
Re: Bandpass Filter Design
« Reply #45 on: May 10, 2018, 09:35:34 am »
"zero-phase filters" ...please, can you give some explanation about the meaning of this expression? (Non-inverting bandpass?)

All filters have an associated phase response. Analog filters, or filters implemented in the continuous time domain have non-linear phase, it is a product of topologies and the nature of capacitive and inductive elements. Filters that are implemented in the digital domain, depending on the design and implementation technique (A large topic, ask if you want to know more) a filter may have a linear (FIR) or a non-linear phase (IIR).

However, focusing on FIR filters for this example. Their usual topology consists of summed, weighted delay elements (convolution). This will introduce a delay of N filter taps (or coefficients). Zero phase filtering corrects for this, shifting the signal back by N samples.

So it can be said that a zero phase filter is a linear phase filter with a phase slope of 0, this can only be done in the digital domain.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf