Putting the "Butter" into Butterworth:   what makes a filter a Butterworth? - Page 1
Forum section: electronics / beginners

author: SilverSolder
author_rank: Super Contributor
timestamp: January 16, 2022, 02:14:57 pm
content: I'm struggling to understand what it is that makes a Butterworth filter a Butterworth filter...For example, let's take a 2nd order low pass filter, with two cascaded filter sections. Let's pick 1KHz cut-off frequency for the example.In LTSpice, it looks something like this:The question is basically this: Is this a Butterworth filter characteristic - why, or why not?

author: mawyatt
author_rank: Super Contributor
timestamp: January 16, 2022, 02:49:34 pm
content: First off, note the -3dB "Corner" is not 1KHz when you cascade as you've shown. At 1KHz you have -6dB.This response is because the 2 filter poles are on the real axis, whereas a Butterworth 2nd Order has two complex poles.Edit: What you've shown has a normalized transfer function of 1/(S^2 + 2*S +1), whereas a 2nd Order Butterworth should be 1/(S^2 + sqrt(2)*S +1)Best,

author: TimFox
author_rank: Super Contributor
timestamp: January 16, 2022, 03:14:06 pm
content: Note that the classical named filter types (e.g., Butterworth, Chebyshev, etc.) are based on sets of orthogonal polynomials that are useful for other purposes as well.

author: SilverSolder
author_rank: Super Contributor
timestamp: January 16, 2022, 03:28:44 pm
content: Is it fair to say that the 2nd order Butterworth polynomial can only be implemented with purely passive components if you include inductors (Cauer topology)?...and that if you use only RC stages, you need an op amps in the mix with positive feedback involved (e.g. Sallen-Key topology)?

author: mawyatt
author_rank: Super Contributor
timestamp: January 16, 2022, 03:30:46 pm
content: No, the Butterworth is easily implemented in passive or active form, the Sallen Key being an active example. Ellipitcs can also be implemented in both passive and active form, as can Chebyshev and Inverse Chebyshev.Edit: As mentioned earlier it's best to understand that all these filter terminologies like Butterworth, Bessel and so on are mathematical relationships, and implementations like Active, Passive, Sallen-Key, Ladder, Pi, T, LC, RC are how the filter is physically realized.Best,

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 16, 2022, 05:44:39 pm
content: The main characteristic of Butterworth filters, as I know them, is that they have a "maximally flat" frequency response. That implies a specific kind of transfer functions. The key is to obtain a filter that has no ripple, and that has the flattest response possible in the frequency band that you don't want attenuated.While the cascaded filter you showed is not a Butterworth second-order filter, it's still a second-order filter with -40 dB/decade attenuation.As an exercise, you can compare the frequency response of 3 types of filters (there are of course others!) to *see* the differences:- The one you showed, with two cascaded, active, first-order filters;- Two cascaded passive RC filters (followed or not by an opamp - it won't matter here as long as the output load is infinite as in your simulation - so for sim. purposes, U2 can also be removed in your first example);- The typical Butterworth filter around a single opamp.

author: Benta
author_rank: Super Contributor
timestamp: January 16, 2022, 05:54:12 pm
content: Quote from: SilverSolder on January 16, 2022, 03:28:44 pmDon't start on Cauer, you'll be completely in over your head. And Cauer is not a topology, it's a transfer function.In a passive filter, you need components that will provide both positive and negative 90 degrees phase shift. This can only be done using both capacitors and inductors.In an active filter, amplifiers in combination with capacitors and resistors can do the job. It's got nothing to do with positive feedback, it's just implementing a transfer function.

author: Benta
author_rank: Super Contributor
timestamp: January 16, 2022, 05:57:24 pm
content: Quote from: SiliconWizard on January 16, 2022, 05:44:39 pmThey have a "maximally flatamplituderesponse" in the pass band.Frequency response can be other things as well, eg, phase or group delay.

author: Benta
author_rank: Super Contributor
timestamp: January 16, 2022, 06:21:16 pm
content: SilverSolder, we need to start from basics here.In linear filter design, the first step is determining what the filter should do in:- The pass band.- The transistion band.- The stop band.- ...This determines the order and type of filter transfer function needed (the complex polynomium). Parameter examples are transistion band steepness, amplitude linearity/flatness, phase response, group delay, impulse response just to name some.There is no "one size fits all", it's all about compromises that you as engineer must weigh against each other.When this is fixed THEN you can start thinking about topologies:- Passive: L, Pi, T...- Active: MFB, Sallen-Key, state-variable, negative-feedback etc.Get this fixed in your mind

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 16, 2022, 06:37:20 pm
content: To be exact: IIRC, the derivation of Butterworth is fixing N derivatives at DC to zero. This might seem irrelevant, but polynomials being as they are, stacking up that many causes the local point to be very flat, while significantly constraining the dropoff outside of that point. The other part of the definition being, it still has an overall LPF characteristic, and is all poles, i.e. of the form H = 1 / q(ω) where q is some polynomial and H is the transfer function.And as it turns out, the solutions q, of various order (corresponding to N derivatives zero), give the family of Butterworth polynomials, which also give a maximally-flat transfer curve when applied here. There is some peaking due to any given complex pole pair, but they are placed just so that the peak of one falls in the roll-off of another, and so forth. You can't have a steeper/sharper cutoff (asymptote) without incurring some passband ripple (Chebyshev) and thus violating the derivatives condition, or a flatter group delay without losing sharpness (Bessel), and again violating the condition in the other direction.Other interesting characteristics: the filter is invertible, in the sense that the input impedance is maximally well-behaved: the cutoff is inductive for L-input, capacitive for C-input, with no phase reversals. Two complementary (low/high pass, as given by a simple transformation) filters can be paired together to give a diplexing filter of constant input resistance. (This isn't quite the same as a Linkwitz-Riley filter, used in audio to fade seamlessly between two speakers -- there are additional phase/amplitude conditions defining that.)Tim

author: Benta
author_rank: Super Contributor
timestamp: January 16, 2022, 07:21:34 pm
content: Quote from: T3sl4co1l on January 16, 2022, 06:37:20 pmThis is only true for passive filters, and only for some topologies. Don't muddy the waters, please.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 16, 2022, 08:14:11 pm
content: Yes, passive LC filters to be clear. Active filters don't matter much as any input impedance can be resolved by simply buffering the input.What mud? Why you always gotta be so negative and knee-jerk, man?Tim

author: Benta
author_rank: Super Contributor
timestamp: January 16, 2022, 08:30:43 pm
content: Quote from: T3sl4co1l on January 16, 2022, 08:14:11 pmSorry, I don't mean to be. On the contrary, I'm here to be helpful.But the OP is on thin ice here, and throwing atotallyobscure aspect into the discussion when we're trying to get the absolute basics right is to my mind not helpful. Pick your audience correctly.

author: emece67
author_rank: Frequent Contributor
timestamp: January 17, 2022, 01:00:13 am
content: .

author: SilverSolder
author_rank: Super Contributor
timestamp: January 17, 2022, 01:15:50 am
content: Talk about opening a can of worms, LOL!So let's say we have some very picky filter requirement that is impossible to implement (approximate) sufficiently well with analog components.Does that also mean it is impossible to implement digitally e.g. in a DSP? - or does using a DSP open up new possibilities for implementing transfer functions that did not exist before?

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 17, 2022, 01:31:21 am
content: Quote from: SilverSolder on January 17, 2022, 01:15:50 amDepends on what it is.As an exercise, try to implement a shelf filter with an analog circuit. Not that trivial.Doing this with a biquad is trivial.

author: emece67
author_rank: Frequent Contributor
timestamp: January 17, 2022, 01:48:43 am
content: .

author: SilverSolder
author_rank: Super Contributor
timestamp: January 17, 2022, 02:06:25 am
content: The light is beginning to dawn!The Sallen-Key filter appears to have the correct Butterworth response, after moving the poles apart by Sqrt(2).The op amp cascade and the passive filter behave the same (Linkwitz style low pass).

author: Benta
author_rank: Super Contributor
timestamp: January 17, 2022, 08:10:39 pm
content: I'm slowly getting a migraine.And now poor Linkwitz is being pulled into it.How on earth did you get the idea that dividing/multiplying the capacitor values with 0.707 would result in a Butterworth response? No math supports this. It looks "almost right, but not quite".My first recommendation: stop throwing names around, when you don't have the faintest idea what they stand for. Butterworth, Sallen-Kay, Linkwitz... who's next on your list?Second: learn basic complex algebra. Or at the very least complex arithmetic. It's not difficult.Alternatively, work with canned equations. TI has a couple of excellent application notes on the subject:https://www.ti.com/lit/an/sloa024b/sloa024b.pdfhttps://www.ti.com/lit/an/sloa049b/sloa049b.pdfCheers.

author: SilverSolder
author_rank: Super Contributor
timestamp: January 17, 2022, 09:09:13 pm
content: Quote from: Benta on January 17, 2022, 08:10:39 pmI looked at the component values you suggested for a LP2 Butterworth Sallen-Key filter in the other thread (reproduced below). Then I looked at the polynomial that @mawyatt showed earlier in this thread, and understood that really what characterises a filter is the position of the poles on the circle. From that, I came up with the shortcut filter calculation in Ltspice because I'm too lazy to do filter calculations - using this shortcut, we can place a pair of poles anywhere on the circle, pretty much. So now we only need to know one characteristic number to identify a filter type for Sallen Key - it is 0.707 for Butterworth, and 1 for Linkwitz-Riley cascaded low pass. We might be able to find the magic numbers for other filter types too. Makes sense?If you look at the results, I would say the "unsupported by mathematics" shortcut is pretty much 100% accurate. Maybe take a second look at the mathematics and you will be able to explain why it works, instead of insisting that it doesn't?

author: Benta
author_rank: Super Contributor
timestamp: January 17, 2022, 10:20:15 pm
content: Oh dear.The "name dropping" just won't stop, will it? Now Riley is on the list.Anyway, it looks interesting. I don't have the time to look at it now, but will come back when possible.Just for your reference: the "Linkwitz-Riley" filter has nothing to do with cascading first-order filters. It's somewhat more sophisticated.

author: SilverSolder
author_rank: Super Contributor
timestamp: January 17, 2022, 11:34:29 pm
content: Here's the list of "magic numbers" for the Sallen-Key sim:1.00 Simple cascade of first order filters0.865 Maximally flat delay (Bessel)0.707 Maximally flat amplitude (Butterworth)0.383 3dB peak (Chebychev?)What appears to be happening is that moving the poles apart changes the damping factor "d" of the filter. Polynomial S^2 + dS + 1

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 18, 2022, 01:52:19 am
content: Quote from: Benta on January 17, 2022, 10:20:15 pmYou seem to have missed this passage:Quote from: emece67 on January 17, 2022, 01:00:13 amOP seems to be applying the terminology promptly and consistently, and the above information has not been disputed or corrected so there would be no reason to expect otherwise. I don't get what you're blaming them of.SilverSolder: for higher order filters, in the active filter case, the poles can simply be placed as needed for each pair, and standard filter tables give the coefficient for each pair. That coefficient gives, whatever it gives -- damping factor, imaginary component, Q factor, etc. These are all equivalent (one defines the other), but have different values so which one is applicable must be clear. In any case, follow the scaling formulas given with the table (or, use a calculator that automates all this for you).The one catch is, if you do an odd-order filter, you can put the single real pole* out in front as a passive RC. This is in turn loaded by the input impedance of the filter connected to it, so all its values change as well. Obviously, this can be avoided at the expense of one additional op-amp (follower), if so desired. Easy enough to demonstrate in your simulation -- you'll find that by adding the real pole out front, you can make the complex pole just a bit sharper (peakier) while maintaining flatness (Butterworth-ish transfer function); which is, I forget how much exactly, a sqrt(3) or something?*Poles fall on a semicircle, so evenly dividing that arc by an odd number leaves exactly one on the real axis (midpoint of the arc). Even order has all complex pole pairs.For additional poles beyond this, of course you'll get other roots and powers. There's a certain pattern or symmetry to them, though it's hard to grasp (and, rightfully so, it's ultimately about factoring polynomials).For the passive network, very hand-wavingly: when the network can be bisected, the impedance ratio between that section (i.e., Zo = sqrt(L/C)) and its surroundings, defines a system Q factor, and thus a damping ratio or what have you. The Q factor of each section, is the same as the Q factor required for each pole pair in the active filter.This is a hand-waving explanation, because it's hard to bisect a general ladder network, and for the most part, all values interact with each other, so that it doesn't make sense to consider a given section in isolation, you most likely have to work with the whole.It's easiest seen, I think, in terms of a network of coupled resonators: when the Q factor is high and the coupling is small, the bandwidth and peaking due to any given resonator, or pair thereof, is at its simplest: the system Q goes as 1/(coupling factor). Simply put, as long as the component Q is large enough to ignore (X >> R), then it will be damped by the system (source and/or load resistance), and thus we can design some desired amount of damping (filter sharpness).There used to be a web calculator that did exactly this, showing the coupling factors for a N-order matrix of resonators, of given filter type -- which I thought was interesting as it's simultaneously not that useful (it leaves a ton of work, going from coupling factors to a real design; and at the frequencies where you'll be relying on resonators, that means mechanical design at that!), and yet also one of the most basic, yet abstract, demonstrations of how filters are formulated -- a set of resonators and couplings.Like, this kind of explains it, it works with coupling factors -- but notice the response is skewed a bit, because the coupling isn't fixed, but frequency-dependent (coupling cap!), and so the asymptotes are asymmetrical. When using the same coupling factors with transformers (coupled inductors), the response is symmetrical. (Or with resistors, but then you get all the insertion loss.)https://www.ivarc.org.uk/uploads/1/2/3/8/12380834/2._qandkmethod.pdfthere are a number of other calculators (online right now) too, mostly working with the same form as well.I don't know that this... really helps, intuitively speaking? I'd say it was formative, for me, simultaneously not really understanding the form of such a thing ("what the heck is this matrix, I just want L's and C's..!?"), while also reducing it to its simplest form: a series of coupling factors, symmetrical between ports, and proportioned according to the filter type.Or that this is even wanted, as the question [so far] concerns active filters -- which are simpler, for all the reasons the above has made obvious.Irregardless, to wrap this up; you can transform such a design, into an LPF (or any other, or vice versa), and so also understand that an LPF is also a chain of coupled resonators -- heavily skewed (to a full passband for one asymptote!) by its construction (alternating L/C ladder), and it's just a lot harder to tease out what counts as a resonator, because everything is tightly coupled, which is also why the response is so hard to tune by adjusting components one at a time.Or, put very simply, tuning single components is a poor way to do it because the cutoff frequency goes as 1/sqrt(L*C) and varying one random inductor at a time, affects Fc in part, but also the Q of everything around it, as well as itself. So, yeah.Or alternately, going the direct route: simply solving for the transfer function in terms of component values, we find the value of each and every component shows up in the coefficient for basically every power of ω. So not only is it hard to go back and solve for any L or C value in the first place, but that's on top of solving the damn polynomial (which is nontrivial). So we simply go to the filter tables -- prepared for us by those wizened in the arcanum of filtersandcomputers -- and select what L and C we need based on the prototype. And finally, tweak around that to arrive at standard commercial values. (Fortunately, passive filters aren't too unstable with respect to component tolerances; the Sallen-Key type is a bit more critical however.)Tim

author: emece67
author_rank: Frequent Contributor
timestamp: January 18, 2022, 10:35:55 am
content: .

author: SilverSolder
author_rank: Super Contributor
timestamp: January 18, 2022, 01:45:39 pm
content: Quote from: emece67 on January 17, 2022, 01:00:13 amThank you for the comprehensive response. It prompted me to actually read a few of books on analog filter design to enable me to actually understand your reply, which has done me a lot of good!

author: SilverSolder
author_rank: Super Contributor
timestamp: January 18, 2022, 01:59:49 pm
content: Quote from: T3sl4co1l on January 18, 2022, 01:52:19 amThis is a very deep rabbit hole, and I am trying to take an engineering approach to understanding filters and the math behind them.I am not that good at math, so looking at equations and polynomials doesn't immediately aid my understanding - in fact it doubles the workload: understanding the filter intuitively, and understanding the math, and understanding how the two are connected!I liked your link to the top-coupled resonators. Made me think of the the old classic film about waves by Dr. J.N. Shive - isn't his demonstration machine really a series of coupled mechanical resonators?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 18, 2022, 07:10:14 pm
content: Quote from: SilverSolder on January 18, 2022, 01:59:49 pmNot quite -- I think if you move the whole structure together at once, or slowly, you'll see it's static in any position. Well, probably not, that would be hard to do mechanically, wouldn't it? Analogously we might have a transmission line which is static at any potential (when moved together, or slowly enough from a point that standing waves are irrelevant), but which isn't hard to construct; to introduce the equivalent mechanical stability property, we need a restoring force that acts slowly over time: a shunt resistance or inductance, depending on which analogy we're implementing (voltage :: position or velocity).As for the wave behavior, it's a chained spring-mass system, so is a lowpass lumped equivalent transmission line. An ideal transmission line can be viewed as infinite poles (i.e., lowpass) at infinity; which is to say, an ideal transmission line doesn't have a cutoff (bandwidth is infinite), but despite those poles being at infinity, the infinite number of them adds up to a finite delay (phase proportional to frequency) at finite frequencies. (So, there's some infinity-of-infinitesimals magic there.) We can approximate that infinite series as a finite series of repeated poles [at finite frequency], as long as they give a cutoff higher than our bandwidth of interest. (It's not an efficient method, in terms of delay per stage at given bandwidth -- so is rarely used in practice. But it does work, as you can see!)Whereas, if the nodes were relatively rigidly sprung to the base, with only weak coupling between them -- it would be directly a mechanical coupled-resonator system.But in the more general sense, using the LPF/BPF transformation -- it is equivalent that way. You can also imagine, say you short out every other node: then the remaining inbetween nodes are free to move, sprung against the two (so the connecting springs / inductors act in parallel to ground), and a simple resonance is supported by that node. This is kind of a contrived situation (we have to short out adjacent nodes to measure this resonance as such), but it works in the sense that any given node moves with respect to the nodes around it.The lightly-coupled resonators structure has a direct analog in, well, anything that's coupled lightly; take for example, a chain of pendulums hanging from a string that itself is free to move slightly. Mind that we usually illustrate such systems in a transient manner -- setting them at random displacements say, and letting the system ring down -- for which, we expect high frequencies (large differences between adjacent nodes?) to die out quickly as they propagate up and down the system, while low-frequency modes persist for much longer (hence the system seems to synchronize over time). Note also this is different from the synchronized-metronomes system, which is a driven system (there are clock springs providing power to the system) -- it's still a case of an array of coupled resonators, but the repeated pole is on the real axis (which is to say, the amplitude doesn't decay).(More exactly, it's a nonlinear system, where the pole's real component varies left or right depending on amplitude; at smaller amplitudes, the poles shift to the right half-plane where amplitude grows, while at larger amplitudes, the poles shift to the left and amplitude shrinks. In cyclic steady state, the poles lie on the imaginary axis, neither growing nor shrinking in amplitude over time.)Tim