## Tim stinchcombe – diode ladder filters (including the pretension to 18db)

[ Update 02 Aug 2010: Since I receive quite a lot of hits from various forum discussions about the relative merits of Roland filters, and their different topologies, I thought I would include a link to Florian Anwander ‘s useful summary page of Roland filters, just for reference—there is much interesting and useful information there!]

Note that it is highly non-normalized; ω c is as for H tb below, and k is the resonance (and please excuse the clumsy ‘line wrap’—I don’t think LaTeX has a standard way to do that…). Difference between low pass filter and high pass filter I must stress that this is all based on SPICE simulation, so take it for what its worth: I was hoping to check its veracity against some real hardware, an Analogue Solutions TBX-303, a TB-303 clone, but I had some niggly little problems doing so, and thus I temporarily shelved working on this some time ago (the problems have been overcome now though).]

[ Update 19 Feb 2009: I am continuing to look at the TB-303 filter in greater detail, concentrating on the high-pass effects that all the coupling caps around the feedback loop introduce. High pass filter gain It is clear that not accounting for them, as this and the filter pole animations page currently do, is to miss out on some very significant affects, as they turn the transfer function into a nine-pole monstrosity, with five new zeroes to match. High pass filter c code The five new poles are all clustered at a low frequency, around 10Hz or so, and as such do not materially affect the conclusions drawn on the main low-pass effects presented in these pages (though they do make the main resonant peak frequency-dependent).

Sallen key high pass filter calculator However, as most are inside the feedback loop, they create another resonant peak at this frequency, and I feel the effects of this must reach into the audible range, so to neglect them (in any digital implementation, say) is likely to miss out on some of the character of the filter. High pass filter garageband Hopefully in a few weeks I will be able to make available a small summary of what I’ve learned so far, with a more comprehensive treatment to follow later!]

[ Update 26 Oct 2008: I have now updated my Moog ladder paper, and it does now include the derivation of the transfer functions of (some of) the diode ladder filter variants.]

The success of the Moog transistor ladder filter quickly gave rise to a number of ‘look-alikes’, which employed diodes in the ladder in order to circumvent the Moog patent. **Guitar high pass filter** Two of the better-known examples are the Roland TB-303 filter:

and the EMS filter, as used in the VCS3 (and probably other models)—this is the 4-pole ’18dB’ one; later filters had 5 poles, and were labelled ’24dB’:

Notice that there are small differences between the two: the EMS filter has a chain of three diodes at the top of each arm of the ladder, and all capacitor values are equal; in the TB-303 the lowest capacitor is half the value of the other three, and at the top of the ladder is a single pair of transistors, biased at a common point, which effectively act like a single diode in each arm of the ladder.

Aside from these differences, superficially they both look similar to the transistor ladder filter structure, but the move from transistors to diodes has implications in the way the circuit operates, and in one sense this leads to the loss of a certain amount of ‘elegance’ too: the resistor chain used to bias the transistors in the Moog ladder means that the voltages at each filter section are separated, which effectively means that the sections are buffered from each other; this ‘isolation’ is simply not present in the diode ladder, giving it a quite different transfer function (it is much harder to derive), and which in turn means the pole placement and their subsequent movement with increasing resonance is also quite different from the transistor version.

Deriving the transfer function requires a good deal of tedious algebraic manipulation, and is incredibly error-prone. High pass filter circuit design I also increased the number of terms that needed tracking through all the manipulation by introducing quantities which helped keep it more general. **Digital high pass filter** With: C 1 the value of the lowest capacitor in the ladder; C the other three capacitors; d the number of diodes in the chain at the top of each arm; a substituted as

for convenience, where V T is the usual thermal voltage and I f the current drawn out the bottom of the ladder (which defines the cut-off frequency), it is possible to arrive at the following general expression for the transfer function H(s) (which I’ve inverted to rid the nasty long fraction):

(Note that this is just for the ladder ‘core’ itself—no feedback or resonance is involved here.) If we take the simplest case (not shown here) of one diode at the top, and all capacitors equal, i.e. **High pass filter design in matlab** d = 1 and C 1 = C, this will give

Some plots of the poles of this function are to be found on the filter pole animations page. High pass filter for speakers It has been derived elsewhere (diligent searching of the web and the Synth DIY archives will probably uncover it), and it is the one most normally given as the ‘transfer function of a diode ladder filter’—however it is not the full story.

The denominator of this isn’t a million miles away from that of H 1 above, but note that all the poles have moved, but some by only a small amount:

Intuitively, halving the bottom capacitor should increase the cut-off frequency, as the smaller cap value has a greater impedance, and so more of the signal (at a fixed frequency) should make it up the ladder, rather than being shorted through the cap. Corner frequency high pass filter This is borne out by the analysis: eliminate aC between the two ω c expressions, and it can be seen that that for H tb is 2 0.25 = 1.189 times that for H 1. High pass filter experiment To further convince myself of the efficacy of my analysis, I did the following: I entered the core part of the TB-303 filter into SIMetrix, only I set all four capacitors to the same value, 33nF, and ran an AC analysis at one particular cut-off frequency; exported the plot data to Excel, and multiplied the frequency component by 1.189; re-imported the data into SIMetrix, and added the curve to the plot; halved the bottom capacitor, setting it to 16.5nF, and ran another analysis. High pass filter calculator passive The following plot shows the result: the trace predicted by the analysis ‘correction’, and the second simulation run are nearly identical:

Plotting both the normalized responses of | H 1(ωj)| and | H tb(ωj)| (via Mathematica) shows just how close they are—the red trace is H 1, with the equal capacitors, the blue is H tb, with the bottom cap halved, as the TB-303:

My point in all this? My suspicions are that halving the lowest capacitor is not based on any aural consideration of how the filter sounds. High pass filter in photoshop One often sees comments to the effect that ‘halving the lowest capacitor moves that section’s pole up an octave’. Second order high pass filter Well yes and no: ‘yes’, because as mentioned above, the overall frequency response will shift upwards; ‘no’ in that there is no simple relationship between each filter section and the poles. Low pass filter and high pass filter pdf This is because there is no buffering between each section, and so it is not possible to consider them in isolation. Simple high pass filter This is also borne out by the comparison of pole values above: after re-normalization, any such ‘doubled’ pole would appear as ×1.682 (=2 0.75), and the other three as ×0.841 (=2 -0.25) their old values, and there is clearly no such relationship seen between the poles above. High pass digital filter Certainly, if you were to arrange a filter with capacitors that could be switched between half and full value, then you probably would feel that it sounded different at the different switch positions, but from this analysis, changing the bottom cap is closely equivalent to shifting the whole response of the filter up or down in frequency, merely doing the same as if you had adjusted the offset pot which sets the relative position of the cut-off frequency (assuming such a pot exists, which is very likely). High pass filter calculator speaker If you took two otherwise identical filters, but one with the bottom cap halved, the other not, and calibrated them both to have the same cut-off at the same CV in, then I suspect you would have to work pretty hard to tell which is which from the sound of the filters alone.

I think the reason for halving the capacitor is more likely to be some sort of stability consideration: whilst running SPICE simulations in SIMetrix in preparation for this page, I noticed that at high frequencies (low MHz and above), something horrid was happening, which is odd since they were mostly AC analyses, and in my experience it is a lot harder to upset a SPICE AC analysis when compared to, say, a transient analysis. High pass filter matlab image processing However I have not been able to spend much time on what the cause of the apparent instability in the simulation is, so I really do not know. High pass filter graph 14.12.09: I’m reasonably certain that what I was seeing was numerical instability in the simulation: in order to ignore the unwanted effects of coupling capacitors one often makes them ludicrously large— terafarads for example—but then this can cause numeric problems, due to trying to cope with both stupidly large and normal, picofarad-sized values.

The later ’24dB’ EMS filter: this seems like good a point to mention this filter. Rc high pass filter derivation (My analysis here is based on the Analogue Solutions RS500e ‘authorized copy’ of this filter—I have not seen any actual EMS schematics of this variant, but the 18dB variant does match the VCS3 schematics I have seen very closely, so I have no reason to believe that the 24dB version deviates in any significant way from the EMS original.) The ’24dB’ variant is actually a 5-pole filter, so nominally 30dB/octave attenuation in the stopband: however this is achieved by stringing a 100Ω resistor in series with a 100nF capacitor between the cathodes of the bottom pair of diodes in the ladder (D16 and D23 in the image above). High pass filter schematic The extra capacitor gives the fifth pole, but the effect of the resistor is to introduce a zero into the numerator of the transfer function, at approximately 16kHz. High pass filter formula Thus the 30dB attenuation gets turned back up to 24dB before it really gets going—this is all happening above the useful audio range, so I again feel this must be for some sort of stability reason, and nothing to do with any kind of aural consideration of how the filter sounds (and again, I have not had the time to investigate this premise any further).

Returning now to the transfer function of the (early) EMS filter, put d = 3 and C 1 = C in the general form, reflecting the equal value capacitors and the three diodes at the top:

The effect of d = 3, i.e. High pass filter fl studio the three diodes in the chain at the top of the ladder, is most apparent by the increased gain, the ‘3’ in the numerator, and the coefficients are now markedly different from before. High pass filter pioneer If we ignore the extra gain, plots of H 1 (red), and H ems (blue) do now show some difference:

[I nearly entitled this section ‘debate’, but that is not really a good word to use here—there simply is no debate: these filters are 4 th-order, 4-pole, 24dB/octave attenuation low-pass filters, plain and simple.]

Start reading about the Roland TB-303 and it will not be long before you come across mention of its ’18dB 3-pole lowpass filter’—apparently even Roland themselves described the filter as having these properties. High pass rc filter calculator A similar story could also be told of the early EMS filter. Gimp high pass filter One can only guess at the motives of both Roland and EMS for doing so: high on the list would be that this reasonably well describes the behaviour of the filter, in that the transition from the passband to stopband starts earlier, and lasts longer than, the (then) more-usual 4-pole filter (such as the Moog transistor ladder), so that the ‘corner’ in the frequency response is altogether a less pronounced affair ( comparison plots and animations); another reason might be to try and highlight the fact that these filters are different from the competition’s filters, and hence by implication, better in some way; less likely is the idea that they would want the filters to be seen as different from the Moog ladder from the patent-infringement point of view (one would expect patent lawyers to be better informed than to be taken in by this). High pass filter 80hz But whatever the reasons, these filters simply are not 18dB 3-pole filters: by all means they could be described as behaving more like 18dB/octave, rather than 24dB/octave, in the main region in which they are used (this could be said of many other filters though, yet isn’t), but they simply cannot escape the fact that they are 4 th-order, 4-pole, 24dB/octave filters, and calling them anything else is at best misleading, and at worse, just plain incorrect. High pass filter excel If you owned a Porsche 911, but only drove it at 40mph to pick up the shopping on a Saturday afternoon, and somebody asked you what it is, you wouldn’t say “it is a Saturday run-around”, you’d probably say something like “it is a 150mph+ high-performance sports car”, or maybe even “it is a 150mph+ high-performance sports car, but generally I only use it as a Saturday run-around”—just because you don’t use it for what it was normally intended doesn’t stop it being what it is.

Impact of the fourth pole. Butterworth high pass filter design There was a little dialogue over at reddit.com as to whether the impact of the largest pole is mostly above the frequency where the response drops below the ‘noise floor’ of the filter, and hence possibly why this pole could be ‘discarded’, with the filter being regarded as ’18 dB’. Design a high pass filter It is a relatively simple matter to plot the frequency response of just the three lower poles, and to compare this against the 4-pole version: in the following plot the blue curve is of the function H tb given above (i.e. *High pass filter rc circuit* with all poles present), and the red trace is that formed when the largest pole, (-3.24,0), is omitted (and having been re-normalized)—it is quite apparent that due to the closeness of the fourth pole to all the others, it is making a significant contribution to the overall shape of the response, at frequencies well inside the region of interest, and so it shouldn’t be ignored:

2. 80hz high pass filter Do some SPICE simulations: from a simplified circuit of the core of the TB-303 filter ( schematic here for the more curious), here is a (rather busy) plot from SIMetrix of the output from each stage as we go up the ladder:

The vertical mauve lines are at approximately 61kHz and 122kHz, i.e. Design high pass filter an octave apart (arbitrarily chosen so that the horizontal lines didn’t clash with any grid lines). How to use high pass filter The following table gives the values of the y-intercepts of each curve where they cut the mauve lines, and hence the resulting gradients:

We observe that it is 4, so fourth-order. **High pass filter using op amp** If we want to know how much the signal is attenuated an octave above some frequency ω 1, say, we need to calculate:

For ω 1 well into the stopband, it can be shown that it is this highest order term in the denominator that dominates, hence we can approximate as

In volume 4, issue 18, of The Institution of Engineering and Technology’s Engineering & Technology magazine, I made a small contribution to an article that reports on attempts to emulate analogue hardware digitally, the TB-303 getting a particular mention: Sines of Reality, Vol 4, Issue 18, 24 Oct-6 Nov 2009, pp32-35.