Page 1 of 9

Zero Delay Feedback Filter

Posted: Sun Feb 23, 2014 12:45 pm
by martinvicanek
About 2 years ago people at KVR got excited about so-called zero delay feedback (ZDF or 0df) filters. Meanwhile, it appears that these filters have become a sort of de facto standard in music DSP, while direct form biquads, which we have been using all along, are generally being frowned upon (well, they frown on us Synthmakers anyway ;) ). Apart from marketing hype, ZDF filters do have some desirable properties, the most important one being fast modulation stability. (It took me a while to realize that two different filter implementations may have the same static transfer functions but when modulated they may behave quite differently.)

So maybe it's time to catch up a bit and reconsider using our good old RBJ Direct Form I biquad implementations? In the schematic below is a 2nd order ZDF filter along with some test modules with comparisons to various biquad implementations (Direct Forms I and II, as well as Transposed Direct Form II).

The Transfer Function module basically shows that the static (non-modulated) audio response of the filters is equivalent. The Modulation module (hehe) demonstrates how all biquad forms have problems with fast modulation, while the ZDF filter remains stable even at extreme settings. Please watch your ears/speakers while experimenting! Finally, the Step Response module shows limitations of the various biquad forms wrt numerical precision in the sub-audio range. This may be a concern if you want to lowpass filter noise for a random LFO. For cutoff frequencies of 1 s and less, the biquads simply go blank while the ZDF filter performs much better.

Oh, other good news is that ZDF is no worse in complexity or CPU load than the biquad forms. 8-)

Re: Zero Delay Feedback Filter

Posted: Sun Feb 23, 2014 1:32 pm
by KG_is_back
:o this is so cool... how does it work? black magic? I looked into the module and the A and B coefficients are static and from them some weird formula is derived and used in output adjustment...

Re: Zero Delay Feedback Filter

Posted: Sun Feb 23, 2014 3:02 pm
by martinvicanek
KG, thanks for asking, I should have posted some references for credit and explanation. The avalanche was set in motion by Vadim Zavalishin with his paper on virtual analog filters. The above schematic is based on a KVR post by mystran and another by Robin Schmidt.

Re: Zero Delay Feedback Filter

Posted: Sun Feb 23, 2014 5:51 pm
by KG_is_back
Oh now I get it.... those a0...b1 are used in tangent approximation... Still it is above my math skills to completely understand what's going on, but it reminds me a state variable filter a lot. So to gain peaking and shelving filters, I just have to mix the HP BP and LP certain way, right?

Re: Zero Delay Feedback Filter

Posted: Sun Feb 23, 2014 8:24 pm
by Jay
very cool! thanks for sharing this Martin!

Re: Zero Delay Feedback Filter

Posted: Sun Feb 23, 2014 8:46 pm
by Wishx
thank you !

Re: Zero Delay Feedback Filter

Posted: Sun Feb 23, 2014 10:14 pm
by MegaHurtz
TPT, chinese mathematics western world day today :)

Without peeping, well couldnt if I wanted to.
But Afaik, nothing to do with fancy things. just 2piing these :p
tpt.jpg
tpt.jpg (52.98 KiB) Viewed 56195 times

Re: Zero Delay Feedback Filter

Posted: Mon Feb 24, 2014 11:24 am
by stw
as usual brilliant work Martin! Thanks for sharing!
Really strange that filter designs which are identic in their static transfer function behave so different when modulated.
Another feature i found out while playing with it is that's it's pretty easy to get a notch filter with wide notches combinig HP and LP with low Q settings. Nice... :)

Re: Zero Delay Feedback Filter

Posted: Mon Feb 24, 2014 2:57 pm
by KG_is_back
I have another Idea that might be cool to look into... 90degree phase shifter. I've read somewhere that if you rotate Z-transform of a lowpass filter with cutoff near Nyquist, you can create 90degree phase shift across mayor part of spectrum. These ZDF filters seem to behave quite stable near 0 and nyquist frequency, so if this could be implemented it would be very cool. It would need complex-number math so that might complicate things a lot...

Re: Zero Delay Feedback Filter

Posted: Tue Feb 25, 2014 9:43 am
by MegaHurtz
Rotating Z transform is just a harder way to say sutract the lowpass from input to make highpass.
For not wanting to show how easy it is, reminds me of people explaing what a differential equation is.
Easy thats what :lol: Guess some people deserve credit "couch"

Edit: resonating a filter off key makes for a glassy sound imo, is that good? I dont know?
Personally more in love with that Z-spline Outsim did.