Hi guys, the work that Andrew did is of course a classic way to implement discretization of any analog filter by not considering any s-domain analysis, but discretizing directly from time domain differential eqs. I think it is useful for people here not having a Master's degree education to review from time to time those concepts and that's why I think it should be well accepted. Being in the linear modeling field, I would rather have analized the filter in the classic virtual analog way, reaching an s-domain transfer function which has the main advantage that is ready to many discretization techniques: bilinear (trapezoidal), euler back/fwd, but also multi step like AdamsMoulton etc. Once you have the s-domain TF you just need to push in s the correct formula involving z and simplify the new H(z) which is read to be implemented in DF1/2.
What I would say more about this method is that , since it is intrinsicly a biquad, you not only have to prewarp the cutoff fc but also the Q. In such cases I typically use the analog s-domain TF and then also compensate the Q via the very famous RBJ cookbook (compute the analog Q and redesign the digital biquad with the fc, Q and gain params). Compensating the Q is important not only because you prevent the stretching as your cutoff reaches Nyquist but also because it minimizes the same stretch at different sampling frequency. Nonetheless I would like to ask Andrew if he has time to show how he deals with a tanh-like nonlinearity with his approach: I think that it would be very interesting also and raise the level of the discussion to a higher one. Ciaoo Marco -----Messaggio originale----- Da: music-dsp-boun...@music.columbia.edu [mailto:music-dsp-boun...@music.columbia.edu] Per conto di Andrew Simper Inviato: mercoledì 6 novembre 2013 10:46 A: A discussion list for music-related DSP Oggetto: [music-dsp] Trapezoidal integrated optimised SVF v2 Here is an updated version of the optimised trapezoidal integrated svf which bundles up all previous state into equivalent currents for the capacitors, which is how I solve non-linear circuits (although this solution is just the linear one that I'm posting here). The only thing to note that with trapezoidal integration you have gain terms of g = tan(pi*cutoff/samplerate) which become very large with high cutoff, so care needs to be taken if these "g" terms stand alone since the scaling can get large and could impact numerical performance: http://www.cytomic.com/files/dsp/SvfLinearTrapOptimised2.pdf Here is a similar thing done for a Sallen Key low pass: http://www.cytomic.com/files/dsp/SkfLinearTrapOptimised2.pdf Please note there is absolutely nothing new here, this is all standard circuit maths that has been around for ages, and all the maths behind it was invented by people like Netwon, Leibnitz, and Euler, they deserve all the credit and came up with ways of solving not just this linear case but also the non-linear case. Depending on what you are doing trapezoidal may not be the best integrator to use so most systems of solving these equations support several types of integrator. Here are some handy references: http://en.wikipedia.org/wiki/Capacitor http://en.wikipedia.org/wiki/Nodal_analysis http://qucs.sourceforge.net/tech/node26.html http://www.ecircuitcenter.com/SPICEtopics.htm Please let me know if there are any mistakes. Enjoy! Andy -- cytomic - sound music software -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp