 ## Filter Pole Animations

[The following assumes a certain familiarity with s-notation, what the transfer function of a filter is, what its poles and zeroes are, and Bode/frequency response curves etc. Of the many books on filters I have, when I have a problem or need to remind myself of something, I find the book I normally reach for first is 'Design of Analog Filters', Rolf Schaumann & Mac E. van Valkenburg (Oxford University Press, 2001).]

## Standard 4-pole low-pass filter, e.g. Moog transistor ladder

Many filters used within synthesizers are based around four cascaded, buffered, first-order sections, and so have the (normalized) transfer function of [Derivation and detailed analysis of this transfer function for the transistor ladder, and for the other diode ladder filters below, may be found in my Moog ladder paper]. Not only the Moog transistor ladder works out to have this, but also many filters based around chips such as the CEM3320, SSM2040, and probably the SSM2044 too (diode ladders are a different matter though, as we'll see below). Normally the output is fed back round to the input, providing a means of varying the resonance of the filter, and generally allowing it to oscillate when the gain is high enough. The overall transfer function then becomes where k is the feedback gain. Due to the relatively simple nature of this function, the poles can be found analytically: when k = 0, they are real and coincident at (-1,0); increasing k > 0, they immediately become complex and move away from each other, at 45 degrees from the x-axis, in a large 'X' pattern; when k = 4, the right-most pair hit the imaginary axis, and the filter will be oscillating. The following gif shows the locus of the poles: clicking it will yield an animated version, as k is varied from 0 to 4 and back again: (I've used a bit of 'tweaking' here to get the even spacing: k is not varying linearly, but as 4(x/20)4, as x goes from 0 to 20 in integer steps, and back again.)

The next gif gives an idea of what the surface of the (absolute value) of the transfer function looks like - each of the poles pulls the surface upwards. It is plotted only for the left-hand complex plane (s = σ + ωj), so the 'slice' down the imaginary axis (at the right, σ = 0, so s = ωj) is close to the normal frequency response (or Bode plot) of the filter, only note that I have plotted '20 log' for the vertical axis (I simply think this looked better than not), and the horizontal axis (both axes in fact) is linear rather than the normal log one you would use for a frequency response. Clicking the image will again yield an animated version, again as k is varied from 0 to 4 and back again, in which you can see how the pole movement causes the increasing 'corner peaking', i.e. resonance, as the poles approach the imaginary axis, and also how this causes the 'dip' in the passband, a feature many see as a failing of this filter topology: (Note also the light blue/dark blue patches are where the bounding box has truncated the surface.)

The transfer function of diode ladder filters is a good deal more complicated to work out than the standard 4-pole filter above, and depending on the exact configuration - number of diodes at the top of the ladder (1 or 3 often seen), and often one sees the bottom capacitor half the others - the coefficients in the function can be quite different too. However, I dare say they are all 'much of a muchness' when it comes to the general shape of the locus of the poles, so here I am going to stick to one of the simplest: all capacitors equal, and one diode at the top of the ladder, giving a transfer function of and when we add in some feedback k, The pole behaviour as k varies is quite different. For k = 0 we get four real poles spread out along the real axis: (-3.53,0), (-2.35,0), (-1.0,0) and (-0.12,0). As k increases, these move together in two pairs: the right-hand pair meet first, and then become complex and curve away from the real axis; and then so does the other pair. When k reaches about 18, the right-most pair hit the imaginary axis, and again the filter will oscillate. The static picture below illustrates this - clicking it will again yield an animated version, with k varying from 0 to 18 and back: The surface of the transfer function itself looks considerably different from that above. The closeness of the one pole to the imaginary axis means that the diode ladder filter rolls-off more quickly than the standard (transistor ladder) four-pole. Again, click for an animated version: ## Diode vs. transistor Bode plot comparison

The animation shown by clicking the gif below shows both the diode and standard frequency responses, albeit with a linear frequency scaling - these are thus the slices down the imaginary axes of the 3-D plots above, so that both the common features with the 3-D plots can be seen, and also the differences between the filters. Blue is standard, red is diode; varying from 'no resonance', k = 0, to 'full resonance' ≡ k = 4 standard, k = 18 diode: Here we have the same thing, only using the normal logarithmic scale for frequency. The steeper initial roll-off of the diode filter (red) is apparent, looking like it 'cuts the corner', leading to probably why some people (erroneously) refer to the TB-303 filter as '18dB/octave'... ...but opening the plot out shows that both traces do ultimately converge, and make no mistake about it, that roll-off is 24dB/octave (further elucidation on the 18dB vs. 24dB nonsense): ## 4th order Butterworth

Whilst I was at it, I decided to look at the 4th order Butterworth response, to see how the poles keep the passband so flat. When Butterworth published his paper in 1930 I don't suppose he based it on any intuitive feel for how the surface might look, but from the above, it seems reasonable that if we arrange poles in a circle, equally spaced from the origin (the odd 16th roots of unity in this case), then they will exert an 'equal pull' on the passband and keep it flat (note: vertical scale is '20 log' again)... ...which is better emphasised by cutting it in half: Unfortunately the right half-plane poles would give stability problems, but it turns out that if we merely throw them away, the resulting transfer function still results in a flat passband (the amplitude response of the 4 pole case is just the square root of that using all eight, and since the eight gives a gain of '1' in the passband, it still remains as 1 after the rooting). Here is the surface 'bridging' the imaginary axis... ...and once again if we slice it down the middle, the flat passband is again observed: By definition there is no concept of resonance for this filter, but I wondered what it would look like as the distance of the poles from the origin is altered - this is tantamount to altering the cut-off frequency, and clicking the image above gives an animation showing just how steady and 'unrippled' the passband remains.

## Second order responses

I also found it instructive to look at the generalized second-order sections, starting with the low-pass, The following picture shows the poles for k = 3 (arbitrarily chosen) down to 0: with k decreasing but greater than 2, the poles are real, and move towards each other, until at k = 2 they become coincident at (-1,0); below 2 they become complex, and move around the unit circle until at k = 0 they reach the imaginary axis, and the filter will oscillate. Click the image for an animated version (as the others, it reverses when the imaginary axis is hit). Like the diode ladder case above, when the poles are real, the low-pass response is very rounded (the system is 'underdamped'). The interesting stuff starts when the poles become complex, and the increased resonance is seen with the peaks in the slice down the imaginary axis (as before, that basically represents the frequency response) - clicking the image yields an animation, with k varying from 3 to 0 back to 3 again: The band-pass response arises when a zero is added in, in the form of an 's' in the numerator: This pulls the surface down at the origin; at higher frequencies the s in the numerator cancels the square on 's2' in the denominator, and so the final roll-off looks like a single pole section, with only 6dB/octave attenuation (as usual, click for the animation): Finally, for the high-pass version, with two zeroes now, this completely nullifies the square in the denominator at high frequencies, thus giving no attenuation at all; the two zeroes pull down strongly at the origin, thus completing the high-pass action (click for the animation): Comparison of some second-order low-pass frequency responses (with varying resonance) against the standard 4-pole filter shown above, also yields another interesting difference. The first set of plots below is for the second-order section, with a variety of curves for k between 2 and 0: the peaks are reasonably well aligned as the resonance increases, and combining this view with the relative simplicity of the algebraic analysis, it seems to me that there is a tendency to talk about the cut-off frequency or resonant frequency of the filter. Below that is a similar plot for the 4-pole standard filter, with its k from 0 to 4: notice now that there is a much greater spread of where the peaks occur. For this latter case, when there is some resonance, k > 0, how do we decide what the resonant frequency or the cut-off frequency of the filter actually is? (And I may be missing a point here: I am far from an expert in this stuff, and so I am quite willing to be corrected!) Sample traces at varying resonance for the 4-pole standard filter: how do we define the cut-off/resonant frequency here?: [Page last updated: 14 Dec 2009]