Hi Theo, It sounds like you are upset with me not addressing the original list of points you made, so let me do that for you now.
On 6 November 2013 22:13, Theo Verelst <theo...@theover.org> wrote: > > Andrew Simper wrote: >> >> 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: >> >> .... > > That's a lot of approximations and (to me !) unclear definitions on a row. > Granted I like it when Network Theory (the EE kind) from the 50s and 60s and > approximation methods from the 70s and 80s (for supercomputers) are put to > good use, but I hope you are aware of the following theoretical limitations: Can you please provide me a list of the approximations you think I've made that you are not happy with? Apart from applying numerical integration the rest of the algorithm makes no approximations and is derived from Nodal Analysis on idealized components and linear algebra, so there are no approximations. Are you talking about the general limitations of processing on a finite number of points? This is the music-dsp email list if you weren't aware, so those same limitations apply to every single thing people talk about here! > - sampling theory states you can work in the z domain, taking z^-1 as a > delay that can be used for integral approximations, but the reconstruction > filtering needed to make that integral *actually correct* is a prohibitively > difficult sinc (sin(t)/t) integration, and: It's always good to keep sampling theory in mind when working with digital systems. Here is a link for everyone: http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem In the material presented filtering is done on an already sampled set of points, and all the frequencies of the linear filtering via the svf and skf are kept below nyquist (the trapezoidal integration warps frequency and maps it to beep it below nyquist). Since the system is linear no harmonics are generated (apart from perhaps those caused by finite computation), so we are safely within the bounds specified by sampling theory, just like any other trapezoidal integrated linear filter, so I'm not sure why you bothered mentioning this at all since this applies equally to all dsp. > - using forward or other integration forms are going to sometimes make your > approximation scheme more stable in a control system (or an ongoing circuit > simulation) but are IN NO WAY going to make that integration error better > (except maybe by chance, or the opposite..). Numerical integration is a tradeoff of accuracy, computational effort, and stability, each different method has different things to offer. Being aware of the options is always a good thing so that informed decisions can be made when approaching each problem as to which is the best algorithm to use. In my examples I have tried to show people one option, trapezoidal, but also indicated other options are present as well that can easily fit into the same framework. This again seems to be a comment that isn't specific to the material presented, but just a generic comment about numerical integration so equally applies to all dsp that integrates, so all filters (things with caps or inductors or other time varying energy storage devices). > - Taking the currents through the capacitors as a measure for the network I used nodal analysis, so the currents over the amplifiers and capacitors are summed to solve the circuit. This is another name for KCL and is standard network theory. Do you have an observation to share about network theory? Perhaps there is a problem you would like to share on any shortcomings or issues you can see? The statement you made doesn't actually lead anywhere, and I'm not sure what point you are trying to make, so please help me out if you can (or anyone else that can see what Theo is trying to get at here, please help!) > - A state varying filter CANNOT just follow standard S-plane methods and > Z-transform equivalencies, because that theory is EXPLICITLY only valid for > stationary (non-dynamic) systems, and Please have a look at the algorithm and show me where I took a laplace transform to get to the discrete representation. The standard way circuit simulators solve (possibly non-linear) transient analysis does not use laplace transforms at all, but rather integrates the circuit equations directly. The statement you make sounds like a warning people about using DF1 biquads to me, which does operate through the laplace transform, and I couldn't agree more. The time varying behaviour of DF1 biquads is terrible because of this layer of abstraction. The methods I've shown avoids this by numerically integrating the circuit directly, so your circuit states are preserved as best as possible given the limitations of the numerical integration scheme. So again this is another point that has nothing specific to do with the material presented, but is actually a warning about other digital filter implementations. > - often changing the state of a filter system (or varying the > characteristics of some component) implies there are frequency modulations > taking place, which immediately lead to some amount (hopefully little!) of > Bessel spectrum components, which, unfortunately, have unbounded spectrum, > and therefore violate the "limited spectrum" rule of the main sampling theory. And finally, yes digital FM produces aliasing. Waveshaping also produces aliasing. Any other general statements about aliasing we should add? Did you get the impression impression that the material presented has a magic wand that anti-aliased FM? Again this is another generic statement that applies to all dsp that involves modulation and nothing specific to the algorithm presented. What is useful is that audio rate state changes are handled elegantly with these types of circuit integration techniques, which is completely unlike DF1 biquads where the states have been muddled by the layer of abstraction introduced through equating coefficients via the laplace transform. > I'm all for Open Source work, so widely available examples are great, but all > this EE stuff is theoretically no as easy as some seem to think! > > T.V. It is as theoretically as easy as any existing standard dsp techniques that operate through the laplace transform, and you can use these methods with any numerical integration scheme you want: forward euler, backward euler, gear, trapezoidal, simpsons, and the list goes on. The limitations of operating on a finite number of samples to represent you signal are universal, so all existing dsp theory (sampling theory, aliasing etc) is equally applicable. And a little snippet from another email: > He insulted run of the mill academic EE insights from decades ago,... Actually I've been trying to point out how useful run of the mill academic EE insights are for us people doing music-dsp, specifically those involving circuit simulation and numerical integration, no insults at all coming from me, only low level sarcasm for which I apologize, I'm really doing my best here under difficult circumstances. All the best, Andy -- 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