Author Topic: Modified second-order low pass filter (third order?)  (Read 2571 times)

0 Members and 1 Guest are viewing this topic.

Offline hatteTopic starter

  • Contributor
  • Posts: 18
  • Country: dk
Modified second-order low pass filter (third order?)
« on: February 02, 2020, 02:33:24 pm »
I have been looking at ways of improving the response of a low pass filter while keeping component count and costs to a minimum. The filter will be used to remove noise at frequencies above +/- 10 kHz, and phase changes and distortions are not important.

I have considered modifying a standard OpAmp-based second order filter:



Would adding a capacitor to the feedback not improve the frequency response (effectiveness) of the filter, turning it into a third-order filter?



I guess I could try to SPICE the filter, but I would like to hear, if you guys have other suggestions to achieve my objective.

« Last Edit: February 02, 2020, 02:40:15 pm by hatte »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Modified second-order low pass filter (third order?)
« Reply #1 on: February 02, 2020, 03:24:46 pm »
Yes, it appears to add another pole in the transfer function.  It complicates the math somewhat...and thus the design procedure. 

If you are driving into another high-impedance stage, you could follow the Sallen-Key architecture with another RC.

<<Update>>  As noted by the Wizard, indeed it does not add another pole although it would appear to by  affecting the gain term.  The effect is really to reduce the Q

« Last Edit: February 02, 2020, 03:57:15 pm by Wimberleytech »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: Modified second-order low pass filter (third order?)
« Reply #2 on: February 02, 2020, 03:34:34 pm »
Adding a cap in parallel to the negative feedback resistor won't change the order of the filter. You'll still get basically a second-order filter (-40 dB/decade), with a lowered cut-off frequency. The Q factor will also be lowered. With a properly choosen capacitance, you can actually limit the "peaking" effect of this basic sallen-key filter at the cut-off frequency. But it's still second-order.

A classic way of getting an higher-order filter is to cascade filters.

Going from the above sallen-key design, you could either add a passive RC filter in front of, or following it, depending on your constraints on input and output impedance. You'll get a 3-rd order filter with just 2 added passives. If you don't much care about phase response, it should do. (With the base sallen-key filter, you get a phase reversal beyond the cut-off frequency. With this added low-pass stage, it's slightly different.)
 
The following users thanked this post: hatte

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Modified second-order low pass filter (third order?)
« Reply #3 on: February 02, 2020, 04:24:48 pm »
Put an RC out in front.  Calculator:
http://sim.okawa-denshi.jp/en/Sallenkey3Lowkeisan.htm


Adding a cap in parallel to the negative feedback resistor won't change the order of the filter. You'll still get basically a second-order filter (-40 dB/decade), with a lowered cut-off frequency. The Q factor will also be lowered. With a properly choosen capacitance, you can actually limit the "peaking" effect of this basic sallen-key filter at the cut-off frequency. But it's still second-order.

It's interesting because at a glance it might seem to work, but because it's controlling the amp's gain itself, it's just making the feedback cap work less.  So it cancels out.  There will still be a pole-zero left over, I think?  The change in gain over that region being relatively tiny, due to the amp's relatively high gain.

Incidentally, it's good design practice to work on the assumption that your amps have limited bandwidth -- the standard S-K analysis omits this I believe, which can make for unfortunate problems when implementing a sharper, higher frequency design (you need fT >= Fc * Q for each stage in the filter, or thereabouts).

If you don't need noninverting operation, the multiple-feedback configuration:
http://sim.okawa-denshi.jp/en/MultipleFB3Lowkeisan.htm
is not just less sensitive to component values, but also accounts for amp bandwidth (because there's an intentional capacitor in that very location -- its value can be adjusted for amp fT).


Quote
Going from the above sallen-key design, you could either add a passive RC filter in front of, or following it, depending on your constraints on input and output impedance. You'll get a 3-rd order filter with just 2 added passives. If you don't much care about phase response, it should do. (With the base sallen-key filter, you get a phase reversal beyond the cut-off frequency. With this added low-pass stage, it's slightly different.)

Yup, in fact the phase reversal is due to feed-forward through the filter RCs, into the amp's output.  The output is not actually an ideal voltage source, but has some impedance all its own (typically 100s ohms).

There's also a zero, out in the cutoff band, due to limited amp gain.  The filter depends on feedback to work, and with finite gain, the feedback can't totally cancel the signal, in the stopband.  Typically stop band gain below -40dB from a single stage is reasonable.

Since a 2nd order filter is supposed to have a 180 degree phase shift well above cutoff, the introduction of un-shifted signal means it flips back, with a notch or null at some intermediate frequency where they briefly cancel.  The total stopband gain might still be ca. -40dB, but it'll be lumpy because of stuff like this.

The passive RC in front of the 3rd order helps a lot, as its performance can be better than the opamp's, at high frequencies (at and beyond fT).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: hatte

Offline hatteTopic starter

  • Contributor
  • Posts: 18
  • Country: dk
Re: Modified second-order low pass filter (third order?)
« Reply #4 on: February 02, 2020, 04:26:06 pm »
You'll still get basically a second-order filter (-40 dB/decade), with a lowered cut-off frequency.

Of course! However, choosing RgCf to match the filter corner frequency it would increase the attenuation, thus increasing the efficiency of the filter a little. Obviously, the effect is limited, if the gain of the circuit is small (as in the example: 2). Or am I still missing something?

 

Offline hatteTopic starter

  • Contributor
  • Posts: 18
  • Country: dk
Re: Modified second-order low pass filter (third order?)
« Reply #5 on: February 02, 2020, 05:01:40 pm »
Well, I might as well tell you what I will be using this low-pass filter for.

It will be used to "massage" a modulated PWM signal, generated by an MCU that is than sent to a buzzer/speaker (magnetic or Piezo), making it more pleasant to listen to, and reducing emitted high frequency noise. So the OpAmp can have dual purpose of driving the buzzer as well as being part of the low-pass filter.

The base (audio) PWM frequency will be around 3-5kHz with a duty cycle around 50% (close to the resonance frequency of most buzzers). But this PWM signal will be attenuated (logic AND) using a high frequency (>>50kHz) PWM signal, with a duty cycle of 0%-100% providing sound volume attenuation.

The low pass filter will have two purposes:
1. Filter away the high frequency PWM signal.
2. Reducing the high frequency components of the audio square wave signal, making it less "metallic". This could, in theory, be done using high frequency modulation, but that would require too much from the MCU.

A high quality factor, with a peak around the chosen audio frequency (3-5kHz) will assist with the (relative) attenuation of frequencies over the audio frequency.


I will publish bode plots of my experiments going forward.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6420
  • Country: de
Re: Modified second-order low pass filter (third order?)
« Reply #6 on: February 02, 2020, 05:43:53 pm »
There's no reason to aim for peaking at the cut off frequency, the final roll off will be exactly the same. Quite the opposite, in fact. A soft roll off might be more desirable here.

I agree that MFB filters have better properties, but this application is absolutely uncritical, and if you're more comfortable with Sallen-Key, fine.

Modifying the feedback circuit will bring nothing. If you want to increase order, cascading is the way forward, either with an RC section (=3rd order) or an additional active section (=4th order).

 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Modified second-order low pass filter (third order?)
« Reply #7 on: February 02, 2020, 06:11:25 pm »
Yeah, that'll be fine.  10kHz won't round off the audio much, to the ear; a lot of people can't even hear that high.  You may find a ~5kHz cutoff is more effective; but in any case that's just a matter of degree.

You might also consider a softer cutoff, like a single pole around 5k then the other two poles at 10k or more; or a pole-zero so the HF gets cut but not heavily attenuated.  The sound can be softer without being muddy or stuffy.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: hatte

Offline bson

  • Supporter
  • ****
  • Posts: 2497
  • Country: us
Re: Modified second-order low pass filter (third order?)
« Reply #8 on: February 02, 2020, 09:24:13 pm »
It won't work as a filter at all.  Bypassing Rf is the same as Rf=0Ω, which produces unity gain with Rg loading the output.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Modified second-order low pass filter (third order?)
« Reply #9 on: February 02, 2020, 09:37:11 pm »
It won't work as a filter at all.  Bypassing Rf is the same as Rf=0Ω, which produces unity gain with Rg loading the output.

Unity-gain is fine for an SK filter.  Driving 5.5K is wasteful though.
 

Offline hatteTopic starter

  • Contributor
  • Posts: 18
  • Country: dk
Re: Modified second-order low pass filter (third order?)
« Reply #10 on: February 03, 2020, 12:43:57 pm »
It won't work as a filter at all.  Bypassing Rf is the same as Rf=0Ω, which produces unity gain with Rg loading the output.

My point is, that if high frequencies have unity gain, while low frequencies have higher-than-unity gain, it will have SOME low pass filtering properties, depending on the overall gain (Rf/Rg). Why not use this effect in an application like this, where the opamp is required anyway, as a driver for a buzzer?
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
 

Offline hatteTopic starter

  • Contributor
  • Posts: 18
  • Country: dk
Re: Modified second-order low pass filter (third order?)
« Reply #12 on: February 03, 2020, 06:00:43 pm »
https://www.analog.com/designtools/en/filterwizard/
https://webench.ti.com/filter-design-tool/filter-type

Because I need to understand the design options available to me, preferably introducing as little new hardware as possible.
Once I have the relevant design options, I can start designing the filter.
 

Offline hatteTopic starter

  • Contributor
  • Posts: 18
  • Country: dk
Re: Modified second-order low pass filter (third order?)
« Reply #13 on: February 03, 2020, 06:04:44 pm »
A filter design like this, with a ridiculously high Q factor would provide the filter properties that I am looking for.


« Last Edit: February 03, 2020, 06:07:07 pm by hatte »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Modified second-order low pass filter (third order?)
« Reply #14 on: February 03, 2020, 06:28:07 pm »
A filter design like this, with a ridiculously high Q factor would provide the filter properties that I am looking for.



Like this perhaps.
 

Offline Conrad Hoffman

  • Super Contributor
  • ***
  • Posts: 2077
  • Country: us
    • The Messy Basement
Re: Modified second-order low pass filter (third order?)
« Reply #15 on: February 03, 2020, 09:57:00 pm »
I did this a while back- http://www.conradhoffman.com/4_pole_LP.zip

Everybody hates it because some variations will be very component sensitive, but it kills noise like nobodies business. I've had little trouble with the several I've built.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Modified second-order low pass filter (third order?)
« Reply #16 on: February 03, 2020, 10:51:40 pm »
I did this a while back- http://www.conradhoffman.com/4_pole_LP.zip

Everybody hates it because some variations will be very component sensitive, but it kills noise like nobodies business. I've had little trouble with the several I've built.

I ran your program (for fun) and then checked it in LTSPice.  Nice.

Does the program iterate to a solution, or is it solving a set of design equations?
 

Offline Conrad Hoffman

  • Super Contributor
  • ***
  • Posts: 2077
  • Country: us
    • The Messy Basement
Re: Modified second-order low pass filter (third order?)
« Reply #17 on: February 04, 2020, 12:51:50 am »
The program is a port of a Fortran program found in an old Burr-Brown book. When you get to 4th order the math becomes annoying. Can't remember, but I think it's more of a brute force numerical solution to a set of design equations. On a fast machine you can iterate a mighty long ways and nobody will notice! Of course, once you calculate the prototype for a given type, you don't need the program at all. Just apply the usual scaling.
« Last Edit: February 04, 2020, 12:55:32 am by Conrad Hoffman »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Modified second-order low pass filter (third order?)
« Reply #18 on: February 04, 2020, 01:51:53 am »
The program is a port of a Fortran program found in an old Burr-Brown book. When you get to 4th order the math becomes annoying. Can't remember, but I think it's more of a brute force numerical solution to a set of design equations. On a fast machine you can iterate a mighty long ways and nobody will notice! Of course, once you calculate the prototype for a given type, you don't need the program at all. Just apply the usual scaling.

That's what I figured.  Thanks.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf