Modified second-order low pass filter (third order?) - Page 1
Forum section: electronics / projects

author: hatte
author_rank: Contributor
timestamp: February 02, 2020, 02:33:24 pm
content: 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 standardOpAmp-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.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 02, 2020, 03:24:46 pm
content: 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

author: SiliconWizard
author_rank: Super Contributor
timestamp: February 02, 2020, 03:34:34 pm
content: 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.)

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 02, 2020, 04:24:48 pm
content: Put an RC out in front. Calculator:http://sim.okawa-denshi.jp/en/Sallenkey3Lowkeisan.htmQuote from: SiliconWizard on February 02, 2020, 03:34:34 pmIt'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.htmis 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).QuoteYup, 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

author: hatte
author_rank: Contributor
timestamp: February 02, 2020, 04:26:06 pm
content: Quote from: SiliconWizard on February 02, 2020, 03:34:34 pmOf 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?

author: hatte
author_rank: Contributor
timestamp: February 02, 2020, 05:01:40 pm
content: 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.

author: Benta
author_rank: Super Contributor
timestamp: February 02, 2020, 05:43:53 pm
content: 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).

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 02, 2020, 06:11:25 pm
content: 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

author: bson
author_rank: Unknown
timestamp: February 02, 2020, 09:24:13 pm
content: 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.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 02, 2020, 09:37:11 pm
content: Quote from: bson on February 02, 2020, 09:24:13 pmUnity-gain is fine for an SK filter. Driving 5.5K is wasteful though.

author: hatte
author_rank: Contributor
timestamp: February 03, 2020, 12:43:57 pm
content: Quote from: bson on February 02, 2020, 09:24:13 pmMy 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?

author: ogden
author_rank: Super Contributor
timestamp: February 03, 2020, 01:12:33 pm
content: Why don't you design filter from scratch:https://www.analog.com/designtools/en/filterwizard/https://webench.ti.com/filter-design-tool/filter-type

author: hatte
author_rank: Contributor
timestamp: February 03, 2020, 06:00:43 pm
content: Quote from: ogden on February 03, 2020, 01:12:33 pmBecause 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.

author: hatte
author_rank: Contributor
timestamp: February 03, 2020, 06:04:44 pm
content: A filter design like this, with a ridiculously high Q factor would provide the filter properties that I am looking for.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 03, 2020, 06:28:07 pm
content: Quote from: hatte on February 03, 2020, 06:04:44 pmLike this perhaps.

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: February 03, 2020, 09:57:00 pm
content: I did this a while back-http://www.conradhoffman.com/4_pole_LP.zipEverybody 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.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 03, 2020, 10:51:40 pm
content: Quote from: Conrad Hoffman on February 03, 2020, 09:57:00 pmI 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?

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: February 04, 2020, 12:51:50 am
content: 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.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 04, 2020, 01:51:53 am
content: Quote from: Conrad Hoffman on February 04, 2020, 12:51:50 amThat's what I figured. Thanks.