martinvicanek wrote:Furthermore the filter is realized using trapezoidal integration, which is superior to the usual Euler integration. Trapezoidal integration, however, results in delayless loop
Nice summary. Thanks. I need a few confirmations from you before digging into this. Clearly the topology consists in two cascaded "integrators", whose outputs get fed back to a central summation point. Such feedback remaining globally negative, it prevents the two integrators outputs from reaching infinite values. Everything is thus tight, under self-control. Stability can be guaranteed. Such is the Universal State Variable Filter, barely implemented in flesh as it requires three op-amps. The two "integrators" role, is to imprint into the schematic, the great "filtering" idea that the output gain and phase must vary with frequency. The way such variation gets orchestrated (high selectivity, low selectivity), only depends the way the feedback gets organized : how much 1st-order feedback, and how much 2nd-order feedback. The fact that there are two cascaded integrators inside, provides a big advantage. Represent that the output of the second integrator, is delivering the 2nd-order lowpass transfer function. Consequently, its input, actually the output of the first integrator, is delivering the corresponding 2nd-order bandpass transfer function. And, consequently, the input of the first integrator, must have been the corresponding 2nd-order highpass signal. Thus, a same schematic is constantly delivering the three fundamental signals : lowpass, highpass, and bandpass that are corresponding to a common Fc and common Q. Consequently, in case one is allocating extra money for hooking a circuitry acting as output buffer and mixer, one can mix the three outputs in various arbitrary proportions between [-1 and +1] for synthesizing all possible 2nd-order transfer functions : notch, shelving, Linkwitz bass boost, allpass (pure phase shifter), etc.
IMO, the first lesson about analog signal processing and filtering should consist in describing the Universal State Variable Filter, the way I just did.
The second lesson could consist into learning what's a Butterworth filter and Bessel filter, lowass, highpass, and bandpass.
The third lesson could consist in telling a) that one can derive a "short" universal filter that's embedding one integrator instead of two, that's delivering all possible 1st-order transfer functions, and telling also b) that there is no use in designing a 4th-order or 5th-order etc. Universal Variable Filter, as all Nth-order transfer functions, always can get decomposed into 2nd-order and 1st-order transfer functions, put one after the other. This way one can easily build in modular form, high-order transfer functions like Butterworth, Chebyshev, Bessel, Cauer, and high-order paired transfer functions like Hilbert pairs.
The fourth lesson could consist in telling that there exist many cost-optimized shortcuts allowing to implement 2nd-order and Nth-order transfer functions without relying on staged Universal Filters. One can tell about the Sallen-Key topology, Multiple-Feedback topology, etc.
The fifth lesson could consist in telling that beyond the Universal State Variable topology, Sallen-Key topology and Multiple-Feedback topology, there exist another class of active filters consisting in p-transposed passive filters, requiring p-transposed capacitors synthesized using op-amps. One can thus build high order p-transposed passive filters, only costing one opamp per p-transposed capacitor. Provided the p-transposed capacitor is ground-referred.
Nowadays, digital is everywhere. Nowadays, one can compute billions of delays, additions and multiplications per second. So comes the fundamental question : how to compute integrators, behaving like the analog integrators that one is requiring for implementing the Universal State Variable Filter?
It's easy, albeit remaining inaccurate because in digital, we are due to ignore the (analog) input values that are existing between the digitized samples. The integrator will thus transform into a plain simple digital accumulator. Upon booting, you initialize the accumulated value to zero. In other words, you compute [acc <- 0]. In operation, you treat each new incoming sample this way : first you compute [acc <- acc + in], then you deliver the newly computed [acc] value as output. Very simple indeed, albeit remaining inaccurate, like all sampling systems are.
Hal Chamberlin authored this in his book, as early as 1980.
https://www.amazon.com/Musical-Applications-Microprocessors-Hayden-microcomputer/dp/0810457539Now that we managed to build some kind of integrator, let's deal with other stuff that's required for implementing the Universal State Variable filter, in digital.
You apply digital amplification (multiply by a constant greater than one), when wanting to quickly integrate, and when wanting to establish a strong feedback path. You apply digital attenuation (multiply by a constant smaller than one), when wanting to slowly integrate, and when wanting to establish a weak feedback path.
It then suffices to grab the three signals (highpass, bandpass, lowpass) for mixing them in digital domain using various weights, for synthesizing the particular 2nd-order transfer function that you are targeting.
Now that the context got precisely defined, everybody knowing what he is talking about, I would like to gain more knowledge about the pitfall and refinements.
Of course, the digital accumulator will become a better imitation of the analog integrator, in case one is relying on a doubled or quadrupled sampling frequency.
1. In such context, what is "trapezoidal integration"?
Is it conceivable to reach a better integrator imitation, without doubling the sampling frequency, and without systematically relying on mean values of consecutive samples?
Systematically relying on mean values of consecutive samples , equates IMO to lowpass filtering the accumulator data, which IMO may cause a stability issue (the two integrators put in series, with feedback), and a transfer function distortion.
2. In such context, and in function of what "trapezoidal integration" is, what is the "delayless loop" algorithmic difficulty that one is incurring when implementing the digital Universal State Variable Filter topology?
I have a difficulty in understanding what you wrote, Martin. Sorry. Please show me the way using kind of caveman language. Sorry.
Have a nice day.