Author Topic: Question: Cascading two Sallen-Key low pass filter elements?  (Read 3022 times)

0 Members and 1 Guest are viewing this topic.

Offline wnorcottTopic starter

  • Regular Contributor
  • *
  • Posts: 98
  • Country: us
  • I like making projects with the ESP32
Question: Cascading two Sallen-Key low pass filter elements?
« on: September 18, 2019, 05:17:48 pm »
Hello friends. I want to build for an audio system a subwoofer low pass filter using one dual op amp and Sallen-Key 2nd order low pass filter.   Subwoofer filters apparently  like a steep cutoff above the pass region to sound good, so I want 4th order filter.  Will use a dual op amp and want to use both amplifiers.   I can use an NE5332 or a TL072 or a JRC2068, LM2904 or several other op amps I have kicking around and am open to suggestions.  The power amps run on 24V DC so I would like to stick to that voltage for the preamp too.  The audio to be filtered are headphone outputs of an MP3 player or the line out of a bluetooth receiver.

For one filter section for a 250 Hz cutoff, it is Ra = Rb = 9K ohm, Ca = 100nF and Cb=50nF  in any case i can play with the cutoff from 200-250Hz.   I think I can just cascade two identical 2nd order filters like this to get one 4th order filter. [The tweeters if you will are full range speakers that do 200-20,000 Hz and sound great, they just don't do bass.   The subwoofer is on its own amplifier.  I will mix down the L and R channels to mono and use that as input to the subwoofer filter.]



Does this seem OK to you?    I read somewhere that the cutoff frequency of second filter should be adjusted a bit relative to the first one, did not say up- or down nor by how much.  Does it matter?   Suppose I just keep them identical.

Another alternative in mind was to use  just  one Sallen Key filter, then pass its output to a passive RC low pass filter, then into the remaining op amp as a  buffer amp.  Is that feasible and any pros/cons?  Thanks in advance.
On very rare occasions, you might notice an odor or see a puff of smoke or sparks vent from your product.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Question: Cascading two Sallen-Key low pass filter elements?
« Reply #1 on: September 18, 2019, 05:36:45 pm »
Two identical 2nd order filters of course make a 4th order filter, but with a somewhat non-optimal response.

You'll have to define for yourself which type of response your speaker needs:
1: maximally flat phase response (Bessel)
2: maximally flat frequency response (Butterworth)
3: maximally initial cutoff (Chebyschev)

For audio, I prefer Bessel due to the superior impulse response, but the cut off is somewhat soft.

Your choice.
 

Offline wnorcottTopic starter

  • Regular Contributor
  • *
  • Posts: 98
  • Country: us
  • I like making projects with the ESP32
Re: Question: Cascading two Sallen-Key low pass filter elements?
« Reply #2 on: September 18, 2019, 05:58:54 pm »
Thanks I will try the Bessel filter type then.  This is my first attempt, it will be for a boombox for DIY.  Sallen Key is one of those topics  you learn in class but I managed to go all these years without using one.

I did stumble across this filter calculator that does N order filters and it suggests components that are standard or close to standard values, like it chooses very standard cap sizes then gives resistor sizes that are 'close' to standard sizes, and could use trimpots as  the resitors in any case.

https://www.beis.de/Elektronik/Filter/ActiveLPFilter.html
On very rare occasions, you might notice an odor or see a puff of smoke or sparks vent from your product.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Question: Cascading two Sallen-Key low pass filter elements?
« Reply #3 on: September 18, 2019, 06:35:29 pm »
You have to distinguish between two things:
1: transfer function.
2: filter topology

The transfer function is a fractional polynomium (output/input) using complex numbers that describes the filter behaviour in amplitude and phase response. This is true for all linear filters.

The filter topology is the physical/electronic design of the filter. There are lots of filter topologies that will give the desired transfer function: MFB, Sallen-Key, biquad etc.

Depending on the application, you can choose what is best. Sallen-Key is popular because it's very easy to calculate and results in "nice" component values, but often has some significant deficiencies.

For this application, unity-gain Sallen-Key is fine.
« Last Edit: September 18, 2019, 06:37:11 pm by Benta »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Question: Cascading two Sallen-Key low pass filter elements?
« Reply #4 on: September 19, 2019, 12:07:59 am »
Note that you can always get one more order for free, because the odd-numbered pole is real-valued, meaning it doesn't need a gain element to make it resonate, it's just a passive RC.  Unfortunately the impedance of adding an RC, changes all the other values in the filter stage (of course!), so you need to calculate the values right the first time.  Ah well.  That's what calculators are for!

You may find a 3rd order filter is adequate, in which case you only need one opamp.  Otherwise, you might as well go for 5th order with two opamps.

This calculator does 3rd order:
http://sim.okawa-denshi.jp/en/Sallenkey3Lowkeisan.htm
You can adjust the calculated values for a somewhat lower Q, then using the 2nd order calculator, adjust for a somewhat higher Q; the product of both (the response of the two stages cascaded) should approximate the desired overall filter response.

You may consider the MFB configuration for the higher-Q stage: S-K is more sensitive to component value variations, which gets more problematic at higher Qs.  There's no other major outward difference, both need just as many resistors and capacitors, so it's nice to have the choice of both.

Otherwise, I think Analog Devices has a filter tool that does this?  Probably any active filter design tool will include the 3rd order trick, and will be able to calculate the correct values for both stages together without having to guess about each.

Note that you want a comparable highpass to avoid doubling up on low frequency content, i.e. to keep the overall response flat.  There may be something about phasing as well, because unfiltered mids/woofers will interfere with the sub, causing peaks and dips.  Which will vary by location of course, because sound.

Tim
« Last Edit: September 19, 2019, 12:10:30 am by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Question: Cascading two Sallen-Key low pass filter elements?
« Reply #5 on: September 19, 2019, 11:31:13 am »
Note that you want a comparable highpass to avoid doubling up on low frequency content, i.e. to keep the overall response flat.  There may be something about phasing as well, because unfiltered mids/woofers will interfere with the sub, causing peaks and dips.  Which will vary by location of course, because sound.

https://www.beis.de/Elektronik/Linear_X-Over/LinearAmplAndPhaseXOver.html
,
 
The following users thanked this post: T3sl4co1l

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Question: Cascading two Sallen-Key low pass filter elements?
« Reply #6 on: September 19, 2019, 06:46:39 pm »
That Beis guy knows just enough about filter simulators to be dangerous, but next to zero about mathematics and transfer functions.

The Linkwitz-Riley approach is well known and works as a topology, but is difficult to tune and cascades distortion to the tweeter range, which is undesirable. But with modern low distortion amps, this is not a major concern, except for purists.

An analysis of the Linkwitz-Riley crossover filter transfer function reveals that the cascading is unnecessary, and a parallel combination of LP- HP- and AP filters will do the same.

But I think this is overloading the OPs intentions, which probably were WOOM-WOOM-WOOM :)


 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Question: Cascading two Sallen-Key low pass filter elements?
« Reply #7 on: September 19, 2019, 06:53:43 pm »
You need a crossover, not just a low pass filter.

Linkwitz-Riley is the way to go.  (two identical 2nd order butterworth filters stacked one after another).
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Question: Cascading two Sallen-Key low pass filter elements?
« Reply #8 on: September 19, 2019, 07:22:57 pm »
You need a crossover, not just a low pass filter.

Linkwitz-Riley is the way to go.  (two identical 2nd order butterworth filters stacked one after another).

Please elaborate. What you're describing has nothing to do with Linkwitz-Riley, but just with a soggy filter response.

 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Question: Cascading two Sallen-Key low pass filter elements?
« Reply #9 on: September 19, 2019, 07:59:21 pm »
Benta,

Linkwitz-Riley crossover is a set of two filters: LP and HP of which both present a transfer function of a single (even order) butterworth filter squared. 
Putting two identical butterworth filters one after another, of course produces a squared transfer function for obvious reasons.

https://en.wikipedia.org/wiki/Linkwitz%E2%80%93Riley_filter
https://sound-au.com/project09.htm
https://www.tonmeister.ca/wordpress/2012/12/31/its-impossible-to-build-a-good-loudspeaker-part-1-crossovers/
etc...

So much for your soggy filter response. Anything  you want to add?

//EDIT: Note that the 3-way crossover in the second linked article is designed incorrectly, as the HF path is missing an all pass filter to correct for delay of the other split. ;)

//EDIT: Typos.
« Last Edit: September 19, 2019, 08:20:08 pm by Yansi »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Question: Cascading two Sallen-Key low pass filter elements?
« Reply #10 on: September 20, 2019, 04:51:50 pm »
Yansi, I'm perfectly aware of what a Linkwitz-Riley filter is, and what the rationale behind it is. I've designed several myself.

I challenged your assertion that it needs to be Butterworth filters. Bessel, Chebyshev and other responses work just as well.

The main point is, that at crossover there is not N x 90 degrees phase shift, but N x 180 degrees, so that a simple amplitude addition doesn't cause peaking.
This can be done in many ways: LP/HP, LP/AP+subtraction etc.

For a subwoofer LP, there's no reason at all to go for a second-order squared, a full 4th order filter is the better solution.

« Last Edit: September 20, 2019, 04:54:03 pm by Benta »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Question: Cascading two Sallen-Key low pass filter elements?
« Reply #11 on: September 21, 2019, 01:19:08 am »
A trivial proof that Chebyschev cannot be used:

The passband ripple in one channel must be balanced by stopband ripple in the other channel.

However, [type 1] Chebyschev does not exhibit stopband ripple.

Therefore a summed response cannot be flat.

Possibly an elliptical type can be designed in this way, but I wonder if the poles and zeroes can actually be placed in such a way that both amplitude and phase are correct for a flat overall response.  I don't have the tools to prove that, unfortunately...

Now, if you allow that there is ripple in the overall response, you can do whatever you please, and the phase constraint also goes away.

The easiest type to prove is the Butterworth, because it is self complementary.  This is also relevant to diplexers: a highpass and lowpass can be connected in parallel (using the respective singly-terminated prototypes) to give flat (constant Z) response.  No other type can be used in this way, because the complement of a lower-Q (Bessel-like) filter must have higher-Q poles (like a Chebyschev), and therefore zeroes in the impedance response, and therefore you can't simply connect another network in series or parallel to extract what energy would otherwise be reflected.  The Butterworth has an all-pole response in both transfer and impedance, and can therefore be connected in this way.

On a related note, I wonder what response cellphone base station diplexers have.  They use many poles and several zeroes, so they can't be constant-Z; but the antenna doesn't need to see constant Z, it can have power reflected at any bandstop frequency.  So long as the antenna still matches with the filter, of course.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5839
  • Country: de
Re: Question: Cascading two Sallen-Key low pass filter elements?
« Reply #12 on: September 21, 2019, 09:46:09 am »
It's true that it won't work with standard LP/HP filters.
LP/AP + subtraction does work.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf