Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Zero Delay Feedback Filter

DSP related issues, mathematics, processing and techniques

Re: Zero Delay Feedback Filter

Postby tulamide » Thu Mar 03, 2016 1:02 pm

stw wrote:This is a quote from martins post earlier in this thread:
martinvicanek wrote:For even order N we have i = 1, 2, ..., N/2 biquads with
Q_i = 0.5/cos(alpha_i)
where the alpha_i are spread uniformly over (0,Pi/2):
alpha_i = (i - 0.5)*Pi/N


You can obtain the Q values from this, e.g :

1 biquad: i=1; N=2; Qi = 0.707
2 biquads: First: i=1; N=4; Qi = 0.541 Second: i=2; N=4; Qi = 1.307
...

or take it directly from the various filter examples martin already posted! ;)


Thank you very much, stw.
I was afraid of getting a quite technical answer. The thing is, I don't know what all of this means. There's the zero delay feedback filter, and it outputs lowpass/hipass/bandpass/etc. There's an input labeled "Resonance (>0)". I would like to have a value for this resonance input that is equivalent to "no resonance".

I don't see any Q there. I don't know what biquad means for this filter. I don't know what N means. I'm totally lost here.

Is there no way to have an exact value for exactly this zdf filter with all its outputs? I don't even dare to ask, what value would refer to Resonance = 127/100%/1.0 on other synths... :oops:
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2686
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Zero Delay Feedback Filter

Postby stw » Thu Mar 03, 2016 1:58 pm

Ok, then a more "construction set" description...

Consider one of the ZDF filter modules as one biquad filter. The Q value is the resonance part of it.
To get a flat response ( = 0 resonance) from your biquad filter you'll need the values from the quoted function.
If you use one filter module you have to take the value from the first example in my post (0.707) to get in fact "0" resonance.
If you're going to combine more filter modules to get a steeper filter curve these Q values change.
E.g if you connect two ZDF modules in serial (resulting into a 4 [= 'N' in the quotation] pole filter) the first module takes 0.541 and the second 1.307 as Q (=resonance) values.
To increase resonance you have to add any value to these initial Q settings.
Since there's no upper limit for the resonance it's up to your taste what you consider as 100%. It could be an addition of 1, 10 or 100. Just take into account that the magnitude at your cutoff frequency increases the higher your res value is. (e.g. a res value of 3 causes approximately a 10db boost. )
Just try what fits your needs best. I'd consider a useful range something between 3 and 9.

Hope this makes it a bit less confusing?
stw
 
Posts: 111
Joined: Tue Jul 13, 2010 11:09 am

Re: Zero Delay Feedback Filter

Postby martinvicanek » Thu Mar 03, 2016 3:29 pm

I am not sure if "Resonance = 127" on one synth means the same thing on another synth, most likely not. On the other hand, the Q Factor is a standard concept with a well-defined meaning, see https://en.wikipedia.org/wiki/Q_factor. I might have caused some of the confusion by labeling the pin as "Resonance" while, in fact, it is just Q.
User avatar
martinvicanek
 
Posts: 1315
Joined: Sat Jun 22, 2013 8:28 pm

Re: Zero Delay Feedback Filter

Postby tulamide » Thu Mar 03, 2016 4:28 pm

stw wrote:Ok, then a more "construction set" description...

Consider one of the ZDF filter modules as one biquad filter. The Q value is the resonance part of it.
To get a flat response ( = 0 resonance) from your biquad filter you'll need the values from the quoted function.
If you use one filter module you have to take the value from the first example in my post (0.707) to get in fact "0" resonance.
If you're going to combine more filter modules to get a steeper filter curve these Q values change.
E.g if you connect two ZDF modules in serial (resulting into a 4 [= 'N' in the quotation] pole filter) the first module takes 0.541 and the second 1.307 as Q (=resonance) values.
To increase resonance you have to add any value to these initial Q settings.
Since there's no upper limit for the resonance it's up to your taste what you consider as 100%. It could be an addition of 1, 10 or 100. Just take into account that the magnitude at your cutoff frequency increases the higher your res value is. (e.g. a res value of 3 causes approximately a 10db boost. )
Just try what fits your needs best. I'd consider a useful range something between 3 and 9.

Hope this makes it a bit less confusing?

These explanations make a few things clear. 2 poles per filter in serial, i is then half of the number N of course. The more filters I use, the steeper the resulting filter. And for each filter a seperate Q is to be calculated to get zero resonance in the end.

But I can't recreate the values you got. I get different results and I don't know why. Here's my calculation in detail:
(1)
i = 1
N = 4
alpha_i = (1 - 0.5) * Pi / N = 0.5 * Pi / N = 1.5707963267948966 / N = 0.39269908169872415
Qi = 0.5 / cos(0.39269908169872415) = 0.5 / 0.999976512175 = 0.5000117441883454

(2)
i = 2
N = 4
alpha_i = (2 - 0.5) * Pi / N = 1.5 * Pi / N = 4.7123889803846899 / N = 1.178097245096172475
Qi = 0.5 / cos(1.178097245096172475) = 0.5 / 0.999788616191 = 0.500105714250781

Is it really the cosine? Or do I need to convert alpha_i to some other range before taking the cosine?
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2686
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Zero Delay Feedback Filter

Postby martinvicanek » Thu Mar 03, 2016 6:13 pm

Tulamide, sorry, those are radians, not degrees. You can see that from pi entering in the cosine argument.
User avatar
martinvicanek
 
Posts: 1315
Joined: Sat Jun 22, 2013 8:28 pm

Re: Zero Delay Feedback Filter

Postby tulamide » Thu Mar 03, 2016 6:33 pm

:o :shock: :oops: :oops:

Now I have what I need to work with the calculations. I thank you both, stw (for your patience by explaining it in more depth) and Martin (for the existence of this filter and the wiki link)! :)
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2686
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Zero Delay Feedback Filter

Postby martinvicanek » Fri Mar 04, 2016 2:38 am

tulamide wrote:1) Frequency goes from 0 - 1, am I right that 1 refers to Nyquist?
Right, that's the FS standard. (I would have preferred Pi for the (dimensionless) Nyquist frequency but I was too late. :mrgreen: )
tulamide wrote:3) Attenuation: What exactly is it used for? What is the difference of using attenuation opposed to gain after the filter?
You are probably referring to the peaking EQ filter in here. Perhaps "Peak Gain" would be a more appropriate term than Attenuation. Note that this is different from an overall gain factor because a peaking EQ primarily boosts or cuts frequencies near the peak while other frequencies are essentially left at unity gain.
User avatar
martinvicanek
 
Posts: 1315
Joined: Sat Jun 22, 2013 8:28 pm

Re: Zero Delay Feedback Filter

Postby martinvicanek » Fri Mar 04, 2016 2:47 am

noisenerd wrote:
martinvicanek wrote:There are various options for introducing nonlinearities to saturate self-oscillation. The simplest would be to make 1/Q increase with |BP|, I think. Haven't actually done it, but tanh or tanh^-1 isn't cheap. Note that you have an implicit equation to solve, it's a bit harder than just calculate tanh for some given argument. Vadim also suggests simpler functions but the expressions are still awkward.


Sorry to dredge up an old post, but could you please elaborate on this a bit for a noob? If it sounds good, I'll pay the CPU cost.

Sorry about my late response. ;) The Source of all this is Vadim's Book The Art of VA Filter Design. Refer to section 5.5 for nonlinearities in the SVF.
User avatar
martinvicanek
 
Posts: 1315
Joined: Sat Jun 22, 2013 8:28 pm

Re: Zero Delay Feedback Filter

Postby noisenerd » Fri Mar 04, 2016 4:46 am

martinvicanek wrote:Sorry about my late response. ;) The Source of all this is Vadim's Book The Art of VA Filter Design. Refer to section 5.5 for nonlinearities in the SVF.


No worries... I've been studying that very book and referring to your FS implementation of this and Mystran's "cheap" ladder filter, which have been immensely helpful in understanding it. So in a way, you've answered without saying anything. :)

Btw, for others who may be interested in this subject, it's also worth checking out Urs Heckman's blog (not sure if it's been mentioned elsewhere on this forum, apologies if so) :

https://urs.silvrback.com/
noisenerd
 
Posts: 69
Joined: Sun Feb 14, 2016 11:31 pm

Re: Zero Delay Feedback Filter

Postby RJHollins » Fri Mar 04, 2016 10:03 am

Thanks for the LINKS Guys !
8-)
RJHollins
 
Posts: 1567
Joined: Thu Mar 08, 2012 7:58 pm

Previous

Return to DSP

Who is online

Users browsing this forum: No registered users and 23 guests