Author Topic: Bandpass Filter Design  (Read 7370 times)

0 Members and 1 Guest are viewing this topic.

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?
 

Online Benta

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

Online Benta

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

Online Benta

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