My touhgts on ZDF

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

Post

Ok, i dive into it.
Im reading The Arts of VA from scracth trying to get my head around this ZDF thing.
This is what i picked up.

Short version:
ZDF is like transforming implicit equation to explicit equations. Nothing new.

Long V:
ZFD is a "solution" for the "not really that big problem" wich the (backwards) eulers method has https://en.wikipedia.org/wiki/Backward_Euler_method, that is to be implicit. So, you need first to know the actual value to calculate the actual value.
This is called an "Algebraic Loop".

So, you need to fix this. How? Brute force -> By putting a z-1 delay somewhere to get the ball rolling.


Here's a nice reading about algebraic loops:
https://blogs.mathworks.com/simulink/20 ... ory-block/
and
https://www.mathworks.com/matlabcentral ... solve-them

Whit an explicit method like; https://en.wikipedia.org/wiki/Linear_multistep_method , or with the "ZFD" or other explicit method, you end up with a handfull of equation that you need to solve but the solution is explicit, so its correct.

So, ZFD is like an expliciting method made into a block diagram.
This is good for simulations, not for real time processing. When doing DSProcessing on a chip, you cant be there solving matrix equations while doing all the fx procesing in real time.. or can you?

So you end up white convolution of the filter or the system you are tryin to simulate, thats why some much MACs around on the DSP world.

What i mean.. if you need a two sample delay multiplied by a coeff.. you dont simulate the equation and let your DSP solve for it (wich, you can, but its impractical).. you just write vectors, indexes, and MACs. The same for a 2048 taps delay. You cant have 2048 ode solver in real time.

So, the ZFD is good only (for now..) for simulation propouses, and i think that is good only enough for multisetp simulators.. not fixed step.

My .02$

Post

I'm guessing that you haven't actually used ZDF for anything because if you had you wouldn't be saying that it is good only for "simulation purposes". You should probably read something a little more focused on the actual methodology instead of Matlab.

https://urs.silvrback.com/zero-delay-feedback

Here's another one, it takes a different tack. This three part series talks a little more about the non-linear, and part 2 specifically notes that the numerical integration takes between 3 and 8 cycles.

http://www.radiofreerobotron.net/blog/2 ... le-filter/

Vadim is using the trapezoidal method and with linear filters it's pretty damn dope. Note that time step is a very important consideration, and sometimes we have to use oversampling to lessen the distance of our jumps in order to maximize stability and convergence, although this is more of a concern with non-linear vs linear applications.

Post

Consider the usage required of the filter, in some circumstances ZDF is completely unnecessary, and sometimes it's a help. If you are attempting to get some kind of improvements near the nyquist range, consider that ZDF may just complicate things, where oversampling is more straightforward. ZDF boosts accuracy of a filter tuning/curve, but in a non-linear application may have drawbacks with complexity, which is what forward euler + oversampling avoids.

Post

- ZDF is just one possible angle to look at implicit integration schemes, mathematically there is no difference
- When comparing ZDF to implicit integration, it's more natural to compare to trapezoidal rather than backward-Euler (because that's what it usually is)
- By stimulating working in graphical form, ZDF tends to make you explicitly aware of the internal structures, present in the system. This affects both analysis and solution.
- ZDF is highly practical, however, as with implicit integration, you might need to do some manual optimization of the computation routines to improve the performance (e.g. ZDF 1-pole lowpass can be done in 4 operations)
- ZDF is not there to completely replace the solving of matrix equations arising in implicit integration, it's simply an alternative
- If you prefer to think of filters in terms of delays, ZDF is probably not for you
- In music DSP we are pretty concerned with smooth time-varying responses of the filters. Integration and differentiation are related to smoothness, delays aren't.
- Oversampled explicit schemes are an obvious easy alternative to both ZDF and implicit integration. Besides the obvious CPU load increase from oversampling, there are increased precision requirements (at a certain sampling rate you might not be able to use floats anymore, and will have to use doubles), which may increase the CPU load even further
- YMMV

Post

SISKO wrote:This is good for simulations, not for real time processing.
Absolutely wrong.

Post

SISKO wrote: ZFD is a "solution" for the "not really that big problem" wich the (backwards) eulers method has https://en.wikipedia.org/wiki/Backward_Euler_method, that is to be implicit. So, you need first to know the actual value to calculate the actual value.
This is called an "Algebraic Loop".
You generally want to use trapezoidal method instead of Euler, because it's way better and doesn't really cost anything extra.
So, you need to fix this. How? Brute force -> By putting a z-1 delay somewhere to get the ball rolling.
This will ruin your phase relationships and the whole point of the "ZDF" approach (which is really just the same thing as using implicit integration) is to avoid such bogus delays.
Whit an explicit method like; https://en.wikipedia.org/wiki/Linear_multistep_method , or with the "ZFD" or other explicit method, you end up with a handfull of equation that you need to solve but the solution is explicit, so its correct.
ZDF (not ZFD!) is nothing more than implicit integration, that's the whole point and yes, you DO want to solve a matrix equation on per-sample basis. That's the whole point! Whether you solve it explicitly from a matrix, or otherwise is not really important, the important part is that you do solve it, rather than trying to fudge with the system to make an explicit solution possible.

In fact, if you want to use iterative methods (eg. Newton) for non-linearities, you want to solve the matrix equation once per iteration (or at least approximate it, but for relatively small systems the exact iteration is cheap enough that it can be worth it in terms of faster convergence).

I would also like to point out that this "ZDF" business is in fact very much related to actual simulation of analog circuits or similar. The whole point is that we want to run simulation in real-time.

Post

Z1202 wrote:- ZDF is just one possible angle to look at implicit integration schemes, mathematically there is no difference
- When comparing ZDF to implicit integration, it's more natural to compare to trapezoidal rather than backward-Euler (because that's what it usually is)
- By stimulating working in graphical form, ZDF tends to make you explicitly aware of the internal structures, present in the system. This affects both analysis and solution.
- ZDF is highly practical, however, as with implicit integration, you might need to do some manual optimization of the computation routines to improve the performance (e.g. ZDF 1-pole lowpass can be done in 4 operations)
- ZDF is not there to completely replace the solving of matrix equations arising in implicit integration, it's simply an alternative
- If you prefer to think of filters in terms of delays, ZDF is probably not for you
- In music DSP we are pretty concerned with smooth time-varying responses of the filters. Integration and differentiation are related to smoothness, delays aren't.
- Oversampled explicit schemes are an obvious easy alternative to both ZDF and implicit integration. Besides the obvious CPU load increase from oversampling, there are increased precision requirements (at a certain sampling rate you might not be able to use floats anymore, and will have to use doubles), which may increase the CPU load even further
- YMMV
I see it now. Ive never need to resolve a differential equation in real time. I do see filters as delays!

Thanks for all the comments!

Post Reply

Return to “DSP and Plugin Development”