Cheap non-linear zero-delay filters

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

Post

mystran wrote:You can have exactly the same frequency response up-to aliasing. That's impulse invariance transform. Should be straight-forward to prove that since sinc is infinite you can't have exactly the same frequency response as the band-limited version of the finite order ration transfer function H(s) except in degenerate special cases.
AFAIK impulse invarinat transform is same as sampling impulse response which would result in aliased spectrum of discrete version compared to contionus.

I don't know if I got you right for the other part, but if I want to match "relevant" parts of the spectrum (up to fs/2) than I would have to band limit H(s) and H*(z) as well (since H*(z)=H*(exp(jwT)) has infite spectrum as well, just that it's periodic).


mystran wrote: The whole stiffness thing sucks as a concept. Honestly.
Me too, I'm sorry that I brought it up (on second reading I figured out that authors cant even agree whether contionus time problem is stiff or numerical solution is stiff or something completly different)

Post

mystran wrote:edit: I think your instantaneous instability is somewhat ill-conditioned though. If you force the analog system to have finite feedback slew-rates (no matter how fast) and you then take BLT of the system, the freq-warping will push the finite slew-rates to frequencies which we can represent and the problem goes away. Now consider that in real circuits you have finite slew-rates for everything and as soon as you include these as part of your model you are safe.
I'm not sure I can follow your argument. You can't take a Fourier transform of an unstable system's output signal, thus the frequency response argument can't be applied. And if you take the (inverse) Laplace transform instead, you have to take it "far enough to the right" of the imaginary axis, and there you would cross the bilinear transform's pole, as explained in the book. So it's "meaningful signal in, garbage out"

Edit: I think you can construct such case even with a 1-pole filter by specifying a sufficiently large negative cutoff value.
Last edited by Z1202 on Thu Jun 14, 2012 10:54 am, edited 1 time in total.

Post

urosh wrote:
mystran wrote: The whole stiffness thing sucks as a concept. Honestly.
Me too, I'm sorry that I brought it up (on second reading I figured out that authors cant even agree whether contionus time problem is stiff or numerical solution is stiff or something completly different)
Couldn't resist highlighting the unintended pun :) Hopefully I didn't offend anyone, otherwise please accept my apologies :)

Post

Z1202 wrote:Couldn't resist highlighting the unintended pun :) Hopefully I didn't offend anyone, otherwise please accept my apologies :)
People that can't laugh at their own expense really rally frighten me. Not to mention that what I actually (and unintentionally) wrote is actually true.

...

Anyway this whole talk got me thinking so I came up with this hypothesis 'bout stability of special class of non-LTI systems. I will start with something I'm familiar with - lets say that you have circuit that is consisted of only resistive and reactive elements (lets say only resistors, capacitors and inductors). Lets also assume that each resistor is described with Rn = Rn0*kn(t) where kn(t) is some positive continuous time function that represents "drivers" and lets also assume that system have M inputs denoted fm(t). Now, such system will always (with some borderline exceptions) be exponentially stable (i.e. response to initial conditions will -> 0 when t->infinity). No rigorous proof for this but logic is simple: as long as all dissipative elements (resistors in this case) are not 0 in infinite time intervals system will always loose energy because of dissipative elements. Since energy is only introduced in system through inputs, system response on itself will always decay.

It's easy for me to construct such "lossy" system od differential equations (I simply make up passive circuit with desired properties and find out system equations) but it would be interesting to find what would be mathematical criterion/definition for "lossy" system of diff. equations. What would be even more interesting is equivalent for discrete situation (system of difference equations). Also take note about bolded part in previous paragraph, negative resistances would throw whole story out of the window (it is sort of this story: in matrix representation where y' = A*y, some eigenvalues of A would have positive real parts; in similar language, above hypothesis claims that system will be stable if eigenvalues have negative real parts even if system coefficients are time variant).

This has somewhat limited use for music DSP. Bunch of VCF cores can be represented as time variant passive systems but all of topologies I'm familiar with require at least buffer to introduce resonance and even unity gain buffer (even lossy one!) would throw energy conservation concept out of the window.

This whole story is simple to generalise for non linear system - simply, (old) concept of dynamic resistance is introduced so instead of "driver" input resistance Rn is dependent on voltage across that resistor (and you can have both, local and independent input dependence of resistance).
So what is real difference between strictly non linear system and strictly time variant system for this case? It only come up in numeric computation. With strictly nonlinear system (that is, one with local dependency) you could possibly end up with implicit equations where equal strictly time variant system could be explicit. In that case (additional) errors are introduced because of approximations. However, and this is important part, nonlinear system will still be stable (approximation of system response would be wrong, more or less, but bounded never the less).


...

sidenote:
This whole story (stability of time variant linear system) doesn't hold up any more as soon as you introduce active elements. Classic EE example (and one most of you are familiar with so might find this interesting) is one stage of cascaded OTA filter (lets call it 1pOTA). 1pOTA is (from ee point of view) simply basic operational amplifier where you change GBW by external control voltage (current). Classical parameter for OpAmp is slew rate. If you hit input differential pair with high enough voltage first stage (gm cell) will saturate, that is start to act as current source (that is what DPS implementations try to model in fact). This effect is dependent of type, level and frequency of input signal. If you drive ti with square wave of large enough amplitude and high enough frequency you will end up with (in perfect case) perfect triangle wave at output. Now, thing is you can never have perfectly symetric opamp, you have DC offsets, slightly different slew rates for positive and negative inputs and stuff like that. Result is that you have DC buildup at output - if you drive hard 1pOTA long enough output will hit one or other power rail. So even first order system is not stable in BIBO sense. While you can make things quite a bit more symetric in digital domain you don't get out of the jail for free. First, errors will acucumulate (if not perfectly equally distributed around 0) and even more important, if you have any DC offset in input signal effect will be same.
edit: this example I gave is nice illustration of problems with nonlinear systems - 1pOTA response will always decay if you remove input (that is, system response to initial conditions) as long as offsets are small enough that input pair is in fairly linear range so system might seem stable, but with some inputs output will explode never the less.

EDIT, important one this time: I tried to analyse situation with 1pOTA in more detail. First thing, I looked for "passive" equivalent. That's simple actually: 1pOTA behaves the same as simple RC low pass with nonlinear resistor - current through resistor is Ir = r(Vr) where Vr is voltage across resistor and r(x) is some function, in this case scaled tanh(). So system equation is C*y' = R*tanh(x-y). Lets model OTA asymmetry with constant term k inside tanh. Thus we get C*y' = R*tanh(x-y+k). So, even "passive" system will explode, contrary to hypothesis above.

It easy to see what happens - if we expand right side into polynomial one constant term appears - that means that resistor will output some current even when input is 0. This can be seen as violation of energy conservation principle described above - passive, lossy circuit is actually not passive, lossy anymore since energy source is introduced inside of circuit. You can simply view this as additional "hidden" input and 1pOTA will behave perfectly normal with some small DC at input. So how and when does circuit explode? Lets make one more equivalence: asymmetric resistor from above can be modeled with "perfectly lossy" resistor and constant current source. Lets neglect input, we now have constant current source, capacitor and lossy nonlin resistor in parallel. When you drive capacitor with ideal constant current source you get integrator. But we have resistor in parallel which should dissipate energy. Problem is behavior of this particular resistor: when voltage across resistor increase it's resistance (dv/di) increase as well. Higher resistance, less it dissipate. So asymptotically system does not converge (actually, I remember from casual reading about stability concepts in control system theory about such cases where decaying system does not actually asymptotically converge). OTOH, idea i have is that it would be possible to keep system stable by finding "hidden" inputs and eliminating them (blow up of OTA is solvable by introduction "virtual" high value linear resistor across nonlinear one; in that case system output will converge, but on some high DC value; bigger problem is how to deal with numerical errors - some error correction scheme would be mandatory one way or another)
Last edited by urosh on Thu Jun 14, 2012 12:08 pm, edited 1 time in total.

Post

urosh wrote:
mystran wrote:You can have exactly the same frequency response up-to aliasing. That's impulse invariance transform. Should be straight-forward to prove that since sinc is infinite you can't have exactly the same frequency response as the band-limited version of the finite order ration transfer function H(s) except in degenerate special cases.
AFAIK impulse invarinat transform is same as sampling impulse response which would result in aliased spectrum of discrete version compared to contionus.

I don't know if I got you right for the other part, but if I want to match "relevant" parts of the spectrum (up to fs/2) than I would have to band limit H(s) and H*(z) as well (since H*(z)=H*(exp(jwT)) has infite spectrum as well, just that it's periodic).
Yeah, the "relevant" part is the band-limited spectrum which you can't have have exactly. But you can have the aliased versions (which is exact, but useless).

Post

Actually the band-limited exact response is still useful as a theoretical construct because while you can't have it exactly, you can certainly do arbitrarily close approximations.

Post

Just a random thought:

Suppose you have O(n^2) additive oscillator. All it does is to generate sines at multiples of base frequency, and sum them together to form an oscillator (Saw, Square, Triangle, etc.).

Evidently, you have immediate control over amplitude of each "frequency" (each generated sine). In such a case, could we implement a filter not in usual manner, but as an amplitude mask? Could the problem of zero-delay just gone away in this case?

Post

V@dіm wrote:Just a random thought:

Suppose you have O(n^2) additive oscillator. All it does is to generate sines at multiples of base frequency, and sum them together to form an oscillator (Saw, Square, Triangle, etc.).

Evidently, you have immediate control over amplitude of each "frequency" (each generated sine). In such a case, could we implement a filter not in usual manner, but as an amplitude mask? Could the problem of zero-delay just gone away in this case?
That's how additive synths generally implement filtering. In order to emulate classical analog filters, in principle you need to adjust not only the amplitudes, but phases as well. Anyway, this theoretically works only in the LTI case, that is, no modulations, no nonlinearities. In practice, the modulations, especially not too fast ones, will probably work. No idea, whether you can implement nonlinear behavior of the analog prototype in a reasonable way. The theoretical background for this is the following: the amplitude and phase response concepts are formally defined only for the LTI case.

Edit: I don't think zero delay is such a big problem to justify the need for "additive filtering" :)

Post

I think this thread is getting a little off-topic. Or is it just me?
Has anybody here ever tried doing something like a Wasp filter? Kinda strange that it can't self-oscilate.

Post

Ichad.c wrote:I think this thread is getting a little off-topic. Or is it just me?
Has anybody here ever tried doing something like a Wasp filter? Kinda strange that it can't self-oscilate.
Provided the schematics on the net are correct it's a 2-pole lowpass & you can use the model I posted some pages back with minor modifications. Just the feedback path and nonlinearities look a bit different. You can also take karrikuh's model and reduce it to 2 poles, if you want the tanh sections on each stage.

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

Post

Richard_Synapse wrote: Provided the schematics on the net are correct it's a 2-pole lowpass & you can use the model I posted some pages back with minor modifications. Just the feedback path and nonlinearities look a bit different. You can also take karrikuh's model and reduce it to 2 poles, if you want the tanh sections on each stage.
Richard
Thanks for the suggestions - a reductions seems more practical/easier to me. Also wondering what type of distortion the CMOS produce...
And why it can't self-oscilate, is the distortion element delibrately blocking it?

Post

Okay found a reasonable paper on the transfer curves and characteristics - even though they are idealized.

http://www.fairchildsemi.com/an/AN/AN-88.pdf

Still wondering about the non self-oscillation. And also - is it made like a standard SV or more like a Sallen-Key? Sorry my EE skills suck.

Andrew

Post

Btw I was looking for something else and I found [this]. Unfortunately Google doesn't want to find me anything else related to that [edit: nevermind, found some related stuff].

Post

Ichad.c wrote:Still wondering about the non self-oscillation. And also - is it made like a standard SV or more like a Sallen-Key? Sorry my EE skills suck.

Andrew
It's SVF. SVFs don't normaly selfoscilate (you can add some bits to achieve selfoscilation).

Post

Random thought regarding "instantaneous instability": if one solves the system as homogeneous, then it doesn't matter if there are local instantaneous instabilities as long as all the denominators of the final solution are strictly positive (or strictly negative depending on which way you write the system).

Post Reply

Return to “DSP and Plugin Development”