3dB/0.5 pole filter?

DSP, Plug-in and Host development discussion.
User avatar
vortico
KVRist
249 posts since 19 Jul, 2008

Post Tue Aug 14, 2018 9:52 am

Yeah, filters in series multiplies the slope. Consider a linear one-pole filter H(s) = 1/(a-s). Two in series becomes H(s)^2 = 1/(a-s)^2, which is two-pole. The problem is that you can't digitally solve a fraction of a filter directly. However, you can Taylor expand (around s^-1) the transfer function H(s)^alpha = 1/(a-s)^alpha to get a rational function again, but this will be a poor approximation except for high order rational functions, which are often numerically and mathematically unstable.

Is OP asking about linear or nonlinear filters?
VCV Rack open-source virtual modular synthesizer

User avatar
aciddose
KVRAF
12128 posts since 7 Dec, 2004

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 10:15 am

The OP just wanted to know whether integrators were a fundamental mathematical concept like the unit and integers.

The unit is "1". There is no integer between "0" and "1".

Likewise, an integrator is a unit. There is no "1/2 pole" and this should be a revelation moment: How would you get half a pole?

We can easily write "0.5" but this hasn't changed the situation at all. There is no half unit. We've just changed the magnitude to 10^-1 and the number we're representing is actually just "5".
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.

User avatar
S0lo
KVRian
663 posts since 31 Dec, 2008

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 10:31 am

vortico wrote:Yeah, filters in series multiplies the slope. Consider a linear one-pole filter H(s) = 1/(a-s). Two in series becomes H(s)^2 = 1/(a-s)^2, which is two-pole. The problem is that you can't digitally solve a fraction of a filter directly. However, you can Taylor expand (around s^-1) the transfer function H(s)^alpha = 1/(a-s)^alpha to get a rational function again, but this will be a poor approximation except for high order rational functions, which are often numerically and mathematically unstable.
Sure it is :). I was trying to understand this phrase:
aciddose wrote:The important thing is: no, running two filters in series will not get you anywhere closer to "less slope" because in series the transfer functions are multiplied.

User avatar
vortico
KVRist
249 posts since 19 Jul, 2008

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 10:31 am

aciddose wrote:The OP just wanted to know whether integrators were a fundamental mathematical concept like the unit and integers.
Well, yes. This is the concept behind fractional calculus. Let D be the derivative operator. D^0 is identify, D^-1 is integration, and it turns out you can define D^alpha using a kind of overkill way, but the idea is not a bad one. It just turns out that the filter y(t) = D^alpha x(t) is noncausal and infinite in general (except for integer alpha), so truncation, windowing, and/or minimum phase forms are needed for it to be useful.
VCV Rack open-source virtual modular synthesizer

User avatar
aciddose
KVRAF
12128 posts since 7 Dec, 2004

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 10:41 am

S0lo wrote: Sure it is :). I was trying to understand this phrase:
aciddose wrote:The important thing is: no, running two filters in series will not get you anywhere closer to "less slope" because in series the transfer functions are multiplied.
A single integrator is a slope of "1" where we have 1/2 amplitude per octave as its asymptote. That is the basic unit.

Running filters in series multiplies them together. So if you have a gain of 1/2 at some point and you run the same filter twice this is now 1/2^2 = 1/4.

There is no way to get "less than 1/2" by running filters in series (less slope) because you'll always get more or equal slope.

The "pinking" filter we're interested in is 1/1.41 (sqrt(2)), not 1/2.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.

User avatar
S0lo
KVRian
663 posts since 31 Dec, 2008

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 10:55 am

aciddose wrote:
S0lo wrote: Sure it is :). I was trying to understand this phrase:
aciddose wrote:The important thing is: no, running two filters in series will not get you anywhere closer to "less slope" because in series the transfer functions are multiplied.
A single integrator is a slope of "1" where we have 1/2 amplitude per octave as its asymptote. That is the basic unit.

Running filters in series multiplies them together. So if you have a gain of 1/2 at some point and you run the same filter twice this is now 1/2^2 = 1/4.

There is no way to get "less than 1/2" by running filters in series (less slope) because you'll always get more or equal slope.

The "pinking" filter we're interested in is 1/1.41 (sqrt(2)), not 1/2.
It seams that we have a misunderstanding of what was "less" and "more". I was referring to -12db/oct as being "less" than -6db/oct. Clearly you meant more (absolute value). So yeah I agree. But also clearly I wasn't trying to have a less slope in the plots. I've started with 12db and morphed to MORE db.

User avatar
vortico
KVRist
249 posts since 19 Jul, 2008

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 10:59 am

Here h (in blue) is some lowpass filter in the analog domain (derived from coefficients of a digital filter). I take h^0.5 (in orange), compute its Padé approximant (in green) to the third order, and you can see it's pretty close. 4th order is dead-on (not shown).

Image
VCV Rack open-source virtual modular synthesizer

User avatar
S0lo
KVRian
663 posts since 31 Dec, 2008

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 11:12 am

vortico wrote:Here h (in blue) is some lowpass filter in the analog domain (derived from coefficients of a digital filter). I take h^0.5 (in orange), compute its Padé approximant (in green) to the third order, and you can see it's pretty close. 4th order is dead-on (not shown).

Image
It's a nice approach. Can you put a symbol instead of that 0.5 ? Would it evaluate?

What tool is this by the way?

User avatar
vortico
KVRist
249 posts since 19 Jul, 2008

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 11:44 am

Mathematica. Yes, there is always a closed form Pade approximant of rational functions raised to a symbol alpha. For example, the forward Euler digital filter to third order (writing z^-1 as z):
Image
Probably not a useful example but the simplest I could think of.
VCV Rack open-source virtual modular synthesizer

User avatar
S0lo
KVRian
663 posts since 31 Dec, 2008

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 11:56 am

vortico wrote:Mathematica. Yes, there is always a closed form Pade approximant of rational functions raised to a symbol alpha. For example, the forward Euler digital filter to third order (writing z^-1 as z):
Image
Probably not a useful example but the simplest I could think of.
Thats good, I used to use mathcad before. But I can't use it for commercial stuff. The version I have is academic. Now they turned to subscription with an outrageous fee.

User avatar
vortico
KVRist
249 posts since 19 Jul, 2008

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 11:58 am

You could do this by hand, I'm just busy/lazy.
VCV Rack open-source virtual modular synthesizer

User avatar
S0lo
KVRian
663 posts since 31 Dec, 2008

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 12:03 pm

vortico wrote:You could do this by hand, I'm just busy/lazy.
I'm umbearably slow and miss and slip too easily.

User avatar
aciddose
KVRAF
12128 posts since 7 Dec, 2004

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 12:39 pm

S0lo wrote: It seams that we have a misunderstanding of what was "less" and "more". I was referring to -12db/oct as being "less" than -6db/oct. Clearly you meant more (absolute value). So yeah I agree. But also clearly I wasn't trying to have a less slope in the plots. I've started with 12db and morphed to MORE db.
Yep I understood what you were saying. The difference though is that you can't approximate for example a 15 dB slope with series filters. You can start with 6 or 12, but once you add another you're already up to 18 even if in the transition it's closer to 15 for an instant.

After the frequency where it goes below 15 you can never get it up above that point again. So you're limited to two filters (n pole + 1 pole) and then you're stuck.

By adding them in parallel instead you can approximate any slope whether 15 or 109 with no limit in the frequency range or ripple. You can extend the range and decrease ripple by adding more poles to an infinite extent.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.

User avatar
S0lo
KVRian
663 posts since 31 Dec, 2008

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 1:06 pm

aciddose wrote:
S0lo wrote: It seams that we have a misunderstanding of what was "less" and "more". I was referring to -12db/oct as being "less" than -6db/oct. Clearly you meant more (absolute value). So yeah I agree. But also clearly I wasn't trying to have a less slope in the plots. I've started with 12db and morphed to MORE db.
Yep I understood what you were saying. The difference though is that you can't approximate for example a 15 dB slope with series filters. You can start with 6 or 12, but once you add another you're already up to 18 even if in the transition it's closer to 15 for an instant.

After the frequency where it goes below 15 you can never get it up above that point again. So you're limited to two filters (n pole + 1 pole) and then you're stuck.

By adding them in parallel instead you can approximate any slope whether 15 or 109 with no limit in the frequency range or ripple. You can extend the range and decrease ripple by adding more poles to an infinite extent.
Oh, no, no :) thats definitely not whats happening here. I can smoothly morph and stop at any slope in between. If you like I could send you the patch so you could test it your self.

Now you could argue that it's a curve and the area were it's a strait line is narrow and not so steep. Thats technically speaking yes, may be. But sound wise it is very different than the 12db and surly steeper and duller. You can see it clearly in the spectrum, about 2 octaves of high harmonics are eaten up. The whole curved slope is visually steeper. And the cut-off point stays intact.

Note this is just a quick rough and dirty patch that I made in less than 10 minutes. It can be done much more accurately with programming.

mystran
KVRAF
5166 posts since 12 Feb, 2006 from Helsinki, Finland

Re: 3dB/0.5 pole filter?

Post Tue Aug 14, 2018 2:29 pm

S0lo wrote:
vortico wrote:Mathematica. Yes, there is always a closed form Pade approximant of rational functions raised to a symbol alpha. For example, the forward Euler digital filter to third order (writing z^-1 as z):
Image
Probably not a useful example but the simplest I could think of.
Thats good, I used to use mathcad before. But I can't use it for commercial stuff. The version I have is academic. Now they turned to subscription with an outrageous fee.
Maxima is free and capable of doing Pade approximations.
If you'd like Signaldust to return, please ask Katinka Tuisku to resign.

Return to “DSP and Plug-in Development”