Cheap non-linear zero-delay filters

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

urosh wrote: That's perfectly normal. Salen-Key topology has highest sensitivity to component variation of all "classical" filter topologies (that's why you will not see many high-Q SK filters around). In K35 filter overdrive will cause high modulation of dynamic resistance of junctions (which combined with caps determines tuninig) and loopgain of resonance path (and resonance is already highly dependant on core RC sections) .
How would the equations below need to be modified to get that kind of behavior?
Richard_Synapse wrote:dy1/dt = f*(in - y1 - g(r*y2))
dy2/dt = f*(y1 - y2 + g(r*y2))

where 'r' is resonance, 'g()' is the nonlinear function. Certainly additional equations are needed to improve the sound, I keep it as simple as possible. Any suggestions welcome!

Post

Unbuffering the stages would be a first step, probably more work is required. Overall I guess you'd need at least 3 equations, unless you find a way to approximate the desired behavior.

Richard
Synapse Audio Software - www.synapse-audio.com

Post

A random Q that has been bugging me...
Why is Trapezoidal Rule chosen in these situations? I've seen in papers (in the simple capacitor and inductor case) that some use Backwards Euler.
So what's the difference/drawbacks between the two?

Post

Ichad.c wrote:A random Q that has been bugging me...
Why is Trapezoidal Rule chosen in these situations? I've seen in papers (in the simple capacitor and inductor case) that some use Backwards Euler.
So what's the difference/drawbacks between the two?
I havent read the thread or know about the subject, but based on the above question only, I guess these refer to are various methods of numerical integration. The differences between different integration methods are accuracy and stability. Accuracy means exactly what you guess: how accurate the result is. Stability is about whether such errors tend to accumulate or not.
~stratum~

Post

Ichad.c wrote:A random Q that has been bugging me...
Why is Trapezoidal Rule chosen in these situations? I've seen in papers (in the simple capacitor and inductor case) that some use Backwards Euler.
So what's the difference/drawbacks between the two?
Trapezoidal Rule maps the analog frequency response to the digital one with some frequency axis warping. Backward and forward Euler do not, the deviation of the digital result from the analog one is more "random". They suffer from the same problem as the naive method described in the VA Filters book (actually the naive method might be equivalent to the forward Euler, not sure, never bothered to check).

Post

Ichad.c wrote: Why is Trapezoidal Rule chosen in these situations?
Good all-round properties.
Check this, scroll down to see comparison between Forward Euler and Trapezoidal. As you can see, Forward Euler can blow up easily, Trapezoidal is stable when system (which you try to solve numerically) is stable.
OTOH, Backward Euler has better properties than Trapezoidal but it is implicit method, so it requires additional steps to solve implicit equation.

Post

Z1202 wrote:(actually the naive method might be equivalent to the forward Euler, not sure, never bothered to check).
AFAIK, forward Euler === "naive integrator"

Post

Backward Euler only makes sense if you can't compute the n-1 derivative efficiently for some reason. Even then it makes no sense to me, as BDF2 should be better at no extra cost.

Richard
Synapse Audio Software - www.synapse-audio.com

Post

urosh wrote:OTOH, Backward Euler has better properties than Trapezoidal but it is implicit method, so it requires additional steps to solve implicit equation.
Would you mind to explain which exact properties are better? If you refer to being "more stable" then it doesn't mean "better" in the music DSP context.

Edit: for music DSP purposes what is important is a. preservation of the frequency response except for warping and b. exact preservation of the stability (so that particularly selfoscillation boundary turns into selfoscillation boundary)

Edit2: Trapezoidal is also implicit

Edit3: actually, a. implies b. :)

Post

@Vadim just curious if you or Stephan ever maybe update the Reaktor Advanced Filters in Core User Library package with the new filter design?
miedex

Post

Thanks all, that makes more sense now. Also found thiis cost-table comparison in David Yeh's Thesis:DIGITAL IMPLEMENTATION OF MUSICAL DISTORTION
CIRCUITS BY ANALYSIS AND SIMULATION. Still trying to digest all the information in it... x = required oversampling btw.

Code: Select all

Method   X   f-calls   Avg f-calls/sample
FE       38  1         38.0
BE       8   2n        28.8
TR       8   1+2n      36.8
BDF2     8   2n        28.8


Post

urosh wrote: OTOH, Backward Euler has better properties than Trapezoidal but it is implicit method, so it requires additional steps to solve implicit equation.
What exactly are the "better properties"?

Both methods are implicit.

Implicit Euler is first order, and trapezoidal is second order. Additionally:
Wikipedia wrote: The second Dahlquist barrier states that the trapezoidal rule is the most accurate amongst the A-stable linear multistep methods. More precisely, a linear multistep method that is A-stable has at most order two, and the error constant of a second-order A-stable linear multistep method cannot be better than the error constant of the trapezoidal rule.
Implicit Euler maps stable poles to stable poles. Trapezoidal shares this property (A-stability), but additionally maps unstable poles to unstable poles, which is important when you want self-oscillation. So we not only have the most accurate possible A-stable (linear multi-step) method, it also happens to preserve stability properties exactly.

Considering the cost of calculating either is pretty much the same, I can't really see any property whatsoever that would favor Implicit Euler.

Post

Z1202 wrote:Would you mind to explain which exact properties are better?
I was referring to math stuff, not music DSP in particular. My bad 'bout implying TR is explicit.

Post

mystran wrote:Trapezoidal shares this property (A-stability), but additionally maps unstable poles to unstable poles, which is important when you want self-oscillation.
I have this system of two diff. equations (you can say it's cousin of a filter) that burst into chaos behavior when you try to solve it numerically. And continuous system is most certainly not chaotic. I wouldn't mind chaotic behavior but with some parameter values it grinds to a halt ( stabilise at some constant value).
BTW poles and frequency response have meaning for dominantly linear systems. If you have system with strong nonlinearity I guess you would have to envision some different way to characterize desired behavior of discrete system.

Post

mystran wrote:Considering the cost of calculating either is pretty much the same, I can't really see any property whatsoever that would favor Implicit Euler.
Since Trapezoidal is a combination of Forwards and Backwards Euler, I suppose it can blow up when trying to solve stiff systems.

Richard
Synapse Audio Software - www.synapse-audio.com

Post Reply

Return to “DSP and Plugin Development”