3dB/0.5 pole filter?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

I'm not a coder, as such, so in my ignorance I wonder if it is at all possible to design filter circuits with slopes smaller than 6dB? or 8.3, for example..

thanks :)

Post

Poles are just input values (in the case of a filter transfer function a complex number) that cause an equation to output infinity. So talking about 0.5 poles doesn't really make sense.

On the other hand if you can imagine a 3db low pass filter response, or 8.3, or whatever, then you can model that. Perhaps using curve fitting techniques, or some other method.

Post

Single pole will give you 6dB/octave, so that's your basic building block, you can't really split it.

What you can do is use multiple 6dB/octave shelving filters placed at fixed distance from each other on the log-freq grid (eg. something like 2 such one-pole shelves per octave will do the trick quite "perfectly" although you can improve the quality further by using more) and then you can control the slope freely (up to 6dB/octave) by adjusting the gain of the shelves.

Given that you need something like 15-20 one-poles (per channel) to do this over the 20-20kHz audible range (about 10 octaves) with more or less "transparent" results, I'd really suggest doing this with DSP rather than building a circuit.. but like... it works. If you don't mind some ripple, then using less stages is also possible. It's also worth noting that it turns out that the 3dB/octave happens to be the worst-case in terms of error, which means whatever setup can give you acceptable results for 3dB/octave will also handle anything else at least as well. :)

Post

There are a few methods for obtaining arbitrary-slope digital filters.
  • Construct your desired frequency response and compute the IFT to get its (infinite/noncausal) impulse response. Window it and optionally compute its minimum phase form to sacrifice phase correctness for time delay. This will have zero poles. A disadvantage is that IRs are usually only helpful if your cutoff and slope are fixed.
  • Construct a frequency response and approximate it using curve fitting through composition of simpler filters (mystran's suggestion above). Biquad filters are sufficient and fast. This method doesn't preserve phase at all, if you're concerned about that.
  • Realize that a 6.02dB/oct filter is just a derivative (resp. -6.02dB/oct is integration). Use a method of discrete fractional calculus to compute the -0.5th derivative, and you have a -3dB/oct filter. To get a cutoff frequency and knee instead of just a straight line in your Bode plot, split the input signal into two bands (with a HP and LP filter), pass one through the fractional filter, and mix the result.
  • I haven't thought this one through, but you could construct an all-pass filter that transitions from arg=0 to arg=pi at your given slope somehow and add it to the original signal to cancel high frequencies. I think this method is essentially the same as trying to construct any digital filter, but it's a different way of looking at it.
  • There are of course many others that I haven't thought of before. Maybe someone has done it in the analog realm, and you could just model that.
VCV Rack, the Eurorack simulator

Post

I don't think I ever saw a 3 dB/oct filter in analog realm...

Post

Do you know what's going on with the Rossum Evolution? http://www.rossum-electro.com/products/evolution/ (I don't own it.) It can't do less than 3 poles but claims "continuous voltage control of the number of filter poles". Am I misunderstanding that "continuous" means noninteger number of poles? Is the module cheating by simply mixing the 3-pole and 4-pole signals if you specify 3.5 poles for example?
VCV Rack, the Eurorack simulator

Post

http://architexte.ircam.fr/textes/Helie14c/index.pdf
Simulation of fractional-order low-pass filters, Thomas Hélie

In this paper, a new family of low-pass filters has been proposed. It allows the tuning of the cutoff frequency between 20 Hz and 20 kHz and that of the filter attenuation between 0 and -6 decibels per octave, separately and independently from one another. The realization of this family required to optimize finite dimensional approximations of an exact “diffusive representation” of the filters.

In practice, a simulation has been obtained using 13 one-poles filters, the poles of which exclusively depend on the desired cutoff frequency, and using a linear combination of their 13 outputs, the coefficients of which exclusively depend on the desired filter attenuation. This structure guarantees the stability even for time-varying parameters. In this case and with this choice, the simulation renders the memory effect due to the time variation of the cutoff frequency whereas, for the attenuation, it locally renders the output as if the attenuation had been the current value from the initial time. The results are accurate on the complete frequency range.

Post

Passive analog pinking filters (nominally 3 dB per oct) typically used 3 or 4 cascaded, un-buffered first-order, RC lowpass filters followed by an output buffer to present high impedance to the filter network and low impedance to the output jack.

Here is an example. I think a lot of old sources just copied one another, perhaps each time twiddling the slide rule for a few minutes to see if the previous plagarism could be "further improved". :)

https://www.electronicdesign.com/analog ... -generator

From what little I understand, the reason it works with so few stages in analog is that usually "ideal" RC lowpass or highpass filters want to be driven by "as near zero ohm source impedance practical" and be buffered by "as near infinite output impedance as is practical".

As you let the source impedance get too high or let the destination impedance get too low (or both), the response deviates from ideal and becoming a worse and worse performing droopy filter.

So I think the analog pinking filter had interactive loading between the stages to degrade a 3 or 4 pole response down to a droopy -3 dB per octave.

It is easy to see this maddening "filter response considering source and dest impedance" in passive speaker crossover design where the source impedance isn't always "real close to zero" and the output impedance is in the same ballpark as the other components in the crossover network. It seems pretty easy to screw up and make funky-dB-per-octave passive speaker crossovers.

Maybe "non-ideal" source and dest impedances could be somehow modeled in ZDF filters to degrade their performance like "bad analog circuits"? Dunno. If so, maybe only 3 or 4 ZDF one-poles could make as good approximation as the simple passive analog circuits? Dunno much about it.

I vaguely recall a long-ago post RBJ post on music-dsp mailing list, so far as I recall he explained about how to make "very low-Q" IIR filters for tasks like this. Too lazy to look it up. Typically a Q of 0.5 is as low as you go, but crappy circuit design can make the Q lots smaller! :)

Post

Well this is fascinating, thank you everybody. :)

@matt42 - like I said, I'm not a coder and I probably don't use the right words in the right way in this respect. I can imagine these things, but I do not have enough of a grasp on the relevant maths to build, which is why I opened the conversation here so I could hear other people talking about it in the correct way using the correct words.

@mystran - this is very interesting, yes, I could probably build something like this. I think I would probably use some technique to collapse/expand the filter frequency range as well as the gain, for sonic flexibility.

@EvilDragon - thanks :) have you not played with the Evolution product portico posted? "A Genus control that allows continuous voltage control of the number of filter poles (from 3 to 6 poles), essentially allowing real-time variation of Evolution’s effective cutoff slope from 18dB/oct to 36dB/oct." Sounds interesting - I wonder why they couldn't offer down to 12dB/oct

@vortico - man, I know _some_ of those words! But yes, IR's wouldn't really work in my case, and wouldn't flexible enough.. (unless they are dynamically generated, and that's a touch beyond my abilities), discrete fractional calculus (I'm going to have to look that up), I think I see what you mean about the modified all-pass filter.. (going to have to read up on that as well)

@Ivan_C - fascinating stuff - so some super-clever dude at IRCAM thought of this 8 years ago, did all the maths and none of it has been realised in the 'real' world? From what I can make of the paper, it does look like he's using the cascade of filters to create the fractional-order filter, so maybe that is the only way. I wonder if he ever got round to looking at resonant fractional-order filter..

Post

I'm kind of surprised (surprised in the sense that I've never tried to build such a filter myself and it seems to go against my intuition) that a chain of first order filters is seemingly the preferred solution.

If I get the chance I'll see how close I can get with a biquad/biquads

Post

JCJR wrote:Passive analog pinking filters (nominally 3 dB per oct) typically used 3 or 4 cascaded, un-buffered first-order, RC lowpass filters followed by an output buffer to present high impedance to the filter network and low impedance to the output jack.

Here is an example. I think a lot of old sources just copied one another, perhaps each time twiddling the slide rule for a few minutes to see if the previous plagarism could be "further improved". :)

https://www.electronicdesign.com/analog ... -generator

From what little I understand, the reason it works with so few stages in analog is that usually "ideal" RC lowpass or highpass filters want to be driven by "as near zero ohm source impedance practical" and be buffered by "as near infinite output impedance as is practical".

As you let the source impedance get too high or let the destination impedance get too low (or both), the response deviates from ideal and becoming a worse and worse performing droopy filter.

So I think the analog pinking filter had interactive loading between the stages to degrade a 3 or 4 pole response down to a droopy -3 dB per octave.

It is easy to see this maddening "filter response considering source and dest impedance" in passive speaker crossover design where the source impedance isn't always "real close to zero" and the output impedance is in the same ballpark as the other components in the crossover network. It seems pretty easy to screw up and make funky-dB-per-octave passive speaker crossovers.

Maybe "non-ideal" source and dest impedances could be somehow modeled in ZDF filters to degrade their performance like "bad analog circuits"? Dunno. If so, maybe only 3 or 4 ZDF one-poles could make as good approximation as the simple passive analog circuits? Dunno much about it.

I vaguely recall a long-ago post RBJ post on music-dsp mailing list, so far as I recall he explained about how to make "very low-Q" IIR filters for tasks like this. Too lazy to look it up. Typically a Q of 0.5 is as low as you go, but crappy circuit design can make the Q lots smaller! :)
Absolutely fascinating stuff JCJR, many thanks - I can conceptually see how mis-feeding electrical circuits expecting a certain 'pressure' of signal could result in flabby-ly responding components; if I had the equipment and environment to build and test this stuff, I surely would.

I'm not sure any of the standard modular DSP environments emulate electronics well enough (except possibly Spice? or Reaktor core..) to just build an unstable circuit..

You have given me a lot of food for thought, and a lot of things to read up.. I wonder if any developers will choose to explore these unstable filter designs in commercial synths/effects. I notice Cytomic's Scream internal diodes and other components can be altered with the use of external files, but since I don't have it, I can't experiment.

Post

CinningBao wrote:You have given me a lot of food for thought, and a lot of things to read up.. I wonder if any developers will choose to explore these unstable filter designs in commercial synths/effects. I notice Cytomic's Scream internal diodes and other components can be altered with the use of external files, but since I don't have it, I can't experiment.
Hi CinningBao. Please take my comments skeptically as I'm not an authority.

I don't think you would call "sub-optimal analog passive filter networks" unstable. Especially if such networks do not contain inductors or "artificial inductors" they are stable as a brick-- They just have limp response curves. :)

But sometimes a limp response curve is what an engineer would want, such as a pinking filter to turn white noise into pink noise, -3 dB per octave. So I think the low parts count versions of such are smart old analog engineers cunningly intentionally designing limp circuits which just happen to be -3 dB per octave limp over the audio band.

I don't know if anyone ever made a tunable pinking filter, but one could copy one of the old example circuits and put "voltage controlled resistor" elements of one or the other kind to replace the resistors then it could be swept. But because the typical pinking filters were intended to filter the entire audio band at that slope, sweeping that exact circuit might not have strong audible effect.

In other words the three or four pole passive analog pinking filter was designed to be "fairly pink" from maybe 20 to 20 kHz (or a narrower band) and would probably need more parts to continue the -3 dB slope beyond that range. So sweeping that exact filter would be somewhat audible because swept higher, it would stop being -3 dB / oct in low freqs (perhaps a flatter bass response). Swept lower, it would stop being -3 dB / oct in high freqs (perhaps a gradually higher-slope HF response above some breakpoint). But over several octaves of sweep the mids ought to sound about the same, offering only subtle tonal variation to the ear, though the overall output amplitude would rise if you sweep the filter higher and the overall output amplitude would fall if you sweep it lower..

A swept pinking filter would maybe need modifying so it is fairly flat-response below a corner frequency and then pink above the corner frequency, so you could sweep the corner up and down similar to steeper swept lowpass filters. Even then possibly a "fairly subtle" audible effect.

I never mastered the math well enough to remember it well, but analog passive filter networks made of resistors, capacitors and inductors are analyzed by EEs with s-domain transfer function equations. You can google it and find lots of explanations, plus there are many textbooks about this. Some people take to the math better than others. The "s" is a complex variable with real and imaginary parts, so when it comes to doing algebra with the equations, it follows somewhat fancier rules than simple real algebra. A lot of references assume that the reader ALREADY KNOWS that s is a complex variable. So if the reader DOES NOT KNOW about that then he can get easily confused trying to follow the math.

Those s domain transfer function equations encapsulate the phase and amplitude response for all frequencies in one handy little (mind-numbing) equation.

So a practitioner could take that simple four-capacitor pinking filter in the article I linked and construct an s-domain transfer function equation describing it. Furthermore, the s-domain equation could be converted into a z-domain (digital "discrete" audio) equivalent, for instance using bilinear transform. Then the coefficients from the z-domain equation would in theory (and probably in practice) be able to be placed into simple IIR computer filter code and get about the same limp response. It is "most similar" for audio bandwidth at higher sample rates. At 44.1 k or 48 k samplerate there are analog-vs-digital differences that get noticeable in the higher frequencies, blamed on the bilinear transform "frequency warping".

Mystran mentioned cascades of shelving filters. A shelving lowpass filter mixes part of the input audio along with part of the filter output to give an "adjustably limp" response.

Maybe mixing thataway for a shelf gives exactly the same result as "loading down" the output of a passive analog filter network? Or maybe they both give limp responses, but the nature of the limp responses are completely different? Dunno.

Post

EvilDragon wrote:I don't think I ever saw a 3 dB/oct filter in analog realm...
Most analog "pinking" filters are actually red (6 dB) filters but rarely two shelving filters have been used to produce "approximately reddish-pink".
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

JCJR wrote:Maybe mixing thataway for a shelf gives exactly the same result as "loading down" the output of a passive analog filter network? Or maybe they both give limp responses, but the nature of the limp responses are completely different? Dunno.
Unfortunately you're talking about pure fantasy here. You get 20 dB per decade or nothing. There is no "half way filter" regardless of impedance or so on. It's simply impossible.

The way the filters work is nothing like what you imagine: it's rather a simple matter of amplitudes. You're just mixing multiple 6dB (or multiples of) slopes and the resulting slope is that combination of "steps".

For example let's imagine we're working with ideal 6 dB slopes (trapezoidal edges). So we have our first stage set at 100 Hz. At 200 Hz the amplitude is now - 6dB.

It would be nice if I could quickly plot the graphs of this stuff but maybe later...

So we set up another stage at 200 Hz this time and mix it at -3 dB amplitude with the first stage. We'll now have a "wobble" with a step that flattens to -3 dB at 200 Hz then continues at 6 dB beyond that point. If we want to improve the slope we can add more filters.

The ideal result is one filter per octave but that isn't needed usually since our ears are barely sensitive enough to detect differences in a 6 dB slope to begin with. So alternatively we can allow for more "wobble" in the slope and space our filters out like 100 Hz, 1000 Hz, 10000 Hz at the correct amplitudes of -10, -20, -30 dB instead.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

aciddose wrote:
JCJR wrote:Maybe mixing thataway for a shelf gives exactly the same result as "loading down" the output of a passive analog filter network? Or maybe they both give limp responses, but the nature of the limp responses are completely different? Dunno.
Unfortunately you're talking about pure fantasy here. You get 20 dB per decade or nothing. There is no "half way filter" regardless of impedance or so on. It's simply impossible.

The way the filters work is nothing like what you imagine: it's rather a simple matter of amplitudes. You're just mixing multiple 6dB (or multiples of) slopes and the resulting slope is that combination of "steps".

For example let's imagine we're working with ideal 6 dB slopes (trapezoidal edges). So we have our first stage set at 100 Hz. At 200 Hz the amplitude is now - 6dB.

It would be nice if I could quickly plot the graphs of this stuff but maybe later...

So we set up another stage at 200 Hz this time and mix it at -3 dB amplitude with the first stage. We'll now have a "wobble" with a step that flattens to -3 dB at 200 Hz then continues at 6 dB beyond that point. If we want to improve the slope we can add more filters.

The ideal result is one filter per octave but that isn't needed usually since our ears are barely sensitive enough to detect differences in a 6 dB slope to begin with. So alternatively we can allow for more "wobble" in the slope and space our filters out like 100 Hz, 1000 Hz, 10000 Hz at the correct amplitudes of -10, -20, -30 dB instead.
Thanks Aciddose. A "properly output buffered" RC lowpass, so far as I know, will be -3 dB at Fc (the freq where the impedance of the resistor and capacitor are equal), and about -6 dB one octave higher. And then it will settle down to about -6 dB per octave above [Fc + 1 octave]. So the properly buffered first-order filter is "in the rough ballpark of -3 dB per octave" for 1 or 2 octaves, depending on how picky you are about expectations. Loosely speaking it is "about -3 dB per octave" from about [Fc - 1 octave] up to [Fc + 1 octave]. It "makes sense" in analog where folks often use 5+ percent tolerance components and only have a few dozen standard choices of component values. :)

Even if the ultimate 20 dB per decade might still hold in a "loaded down" RC circuit, the transition shape between "flat" and "-6 dB/oct" gets wider and sloppier the more you load it down. Along with more insertion loss and such.

Breadboard a cascade of 2 or 4 simple RC lowpass, each stage 10 kohm resistors, 0.016 uF caps.

_A_ Drive the cascade completely un-buffered from a 10 kohm source into a 10 kohm destination and plot the curve.
_B_ Now put fet opamp voltage follower buffers on the input and output and in-between each RC stage and plot the response.

The fully-buffered version will be a less-droopy better response over several octaves in the middle around Fc. The un-buffered version will make you want to cry. :)

Post Reply

Return to “DSP and Plugin Development”