---------- Forwarded message ---------- From: Andrew Simper <a...@cytomic.com> Date: 11 February 2013 17:32 Subject: Re: [music-dsp] 24dB/oct splitter To: A discussion list for music-related DSP <music-dsp@music.columbia.edu>
I've done an example of using trapezoidal integration on a linear RC circuit: https://cytomic.com/technical-papers Deriving the SVF is pretty much the same but is slightly more complicated since you need to solve two equations. Some initial signal to noise results comparing various LR4 implementations on a 20 second input of a sum of sins 20, 200, 2000, 20000 hz, all input and output buffers used f32 numbers -- key: svfad = three 2 pole leapfrog/svf f64 ops=36 states=9 coeffs=5 svfbd = one 4 pole leapfrog f64 ops=27 states=5 coeffs=6 df1d = four 2 pole df1 f64 ops=36 states=16 coeffs=10 svfaf = three 2 pole leapfrog/svf f32 ops=36 states=9 coeffs=5 svfbf = one 4 pole leapfrog f32 ops=27 states=5 coeffs=6 df1f = four 2 pole df1 f32 ops=36 states=16 coeffs=10 snrhp = signal to noise ratio of the high pass output snrlp = signal to noise ratio of the low pass output all snr measuremts are done against the svfad output Cutoff 20hz Sample rate 48k: svfbd snrhp=inf svfbd snrlp=inf df1d snrhp=147.864 df1d snrlp=157.529 svfaf snrhp=127.343 svfaf snrlp=124.258 svfbf snrhp=119.142 svfbf snrlp=118.422 df1f snrhp=57.3166 df1f snrlp=51.2566 Cutoff 20hz Sample rate 192k svfbd snrhp=277.635 svfbd snrlp=295.698 df1d snrhp=147.722 df1d snrlp=165.186 svfaf snrhp=117.998 svfaf snrlp=115.415 svfbf snrhp=94.2746 svfbf snrlp=87.9547 df1f snrhp=21.9079 df1f snrlp=15.8652 So basically if your sample rate is low you can use a all f32 4 pole leapfrog design for an LR4 crossover and still have an SNR of 118 dB, but if you need to support higher sample rates like 192 khz you could use three f32 2 pole leapfrog/svf filters for an SNR of 115 dB, but if that isn't good enough then you'll need to go to double precision. If that is the case you may as well use an f64 4 pole leapfrog since it has the lowest cpu and you can modulate the cutoff smoothly. As you can see using df1 with f32 is a bad idea no matter what the sample rate. All the best, Andy -- cytomic - sound music software On 10 February 2013 12:52, Andrew Simper <a...@cytomic.com> wrote: >>> >>> i just did a quick check on the "Trapazoidal SVF", and it is identical to >>> using Bilinear Transform without pre-warping and applying BLT directly to >>> the analog filter. so it does not increase the order as it first appeared >>> to me to do. >>> >>> >>> it literally substitutes (assuming T=1): >>> >>> >>> s^-1 <--- (1/2)(1 + z^-1)/(1 - z^-1) >>> >>> >> >> In the example I did do a directly substitution on "s" like this, but that >> was to avoid derving the correct trapezoidal integration, since that >> requires circuit mathematics that I didn't have time to explain. I'll do a >> full RC circuit as an example so everyone can follow from first principles, >> which is what I always use. This way is more powerful since trapezoidal just >> becomes another numerical integration method to try, and not necessarily the >> best one in all situations. >> > > I forgot about this web page outlines how to apply different numerical > integration methods to circuits: > > http://www.ecircuitcenter.com/SpiceTopics/Transient%20Analysis/Transient%20Analysis.htm > > From memory they have a sign error on the page, which should be easy to find > if you work through the example. > > All the best, > > 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