Book: The Art of VA Filter Design 2.1.2

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

Post

stratum wrote:If the intended audience for the book is DSP experts only, probably no changes are required as these points are probably obvious to them, otherwise it would be better if they were addressed in a future revision. Not that the "uninitiated" will ever fully understand the VA filter bible, but you know, it does not have to be as cryptic as the book of revelation :-)
Well this has been debated with Vadim Zavalishin, here and possibly other forums, and he is of the firm opinion that the book is an entry level text. This isn't to discredit his work, which is highly influential, but I guess he has his own concept of beginner level.

Post

he has his own concept of beginner level.
That's fine, but the modifications I have suggested can be written at that level without making the book yet another "newbies' guide to dsp" and perhaps even experts could benefit from it. One problem is that the book gives no glimpse of the fact that numerical methods are actually in use as an implementation method for these filters, effectively making the usage of the VA filters 'circuit simulators' (*). A second problem, a more theoretical one without much practical relevance perhaps, is the fact that 'classical DSP' has a notion of its own truth which is tied to integral transforms in such a way that the z-transform and the sampling theory establishes a new domain, or a parallel univese in which one could live in isolation from the 'other' reality, so the speak, and it would be nice if the two approaches could be contrasted (**). From the perspective of VA filters, the dsp realm is an "approximation", whereas from the perspective of classical DSP it is another domain with its own truth. In practice the approximation presented by VA design method actually results better filters for some purposes, and this presents two different perspectives on mathematical truth, one practical, the other could perhaps be called, "Platonic" - these are entirely different concerns. It is interesting to note that, from the perspective of these platonists, the fact that trapezoidal integration corresponds to BLT or the fact evaluation formula for a recursive filter contains an integral is totally irrelevant for their theory as they wouldn't view it as being an integral at all as a discrete domain does not have such concepts, and they wouldn't be concerned with it, so they actually do miss a few interesting truths while seeking the ultimate, the most beautiful truth in their own platonic realm, so to speak. It would be nice to read what Vadim thinks about the subject, and this could make an interesting chapter on its own.

(*) They are actually simulators even without that, because the idea of a discrete domain is abandoned. This is a fact that should be explicitly stated and is related to the 'second problem'.

(**) This is not to say that every book, or the most books written from a classical DSP perspective pay attention to its foundation, for example in 'Introduction to Signal Processing' by S.J.Orfanidis, we see no explanation of z-transform whatsoever, and it is merely presented as a tool. The fact that one can explain seems to be a new tradition that starts with Steven W. Smith's dspguide. The book 'art of VA filter design' is actually similar in that aspect, but is at another level as you say or perhaps it would be more appropriate to say that the method of explanation is different and relies more on the ability of the reader to follow equations. Another property of it is that it is focused on its own business and mostly ignores what the rest of the literature says. Like everybody is living in their own realm and they do not talk to each other.
~stratum~

Post

stratum wrote:...
Wow, that has been quite some feedback, thanks!

What I have to say though, the main feedback points seem to suggest to write a book from a different angle and for a somewhat different audience than it was intended. I definitely do not want to say that such suggested approach is bad or wrong, quite on the contrary, however, this wasn't and still isn't the goal of writing this book.

The book clearly assumes the knowledge of the necessary math (which by some standards is not much math knowledge at all). As this is a pretty short book, I don't see much point turning it into another math text, except where I wanted to present those math concepts from a different angle (which I did in Chapter 1). Same goes for numeric methods. So the book is supposed to contain the material which is not found elsewhere. But it doesn't assume much preliminary DSP knowlegde, definitely not the one of filter design, in that sense it's a beginner DSP book.

I also specifically tried to stay away as much as possible from the classical DSP, as my intention was to present a different approach to tackle the whole subject. Ideally I'd wish that the reader is either unaware of or temporarily forgets the knowledge of the classical filter DSP theory while reading this book. If someone wants to write another book, comparing the two approaches, such effort would be highly welcome ;)

Best,
Vadim

PS. And big thanks for the typos headsup!

Post

stratum wrote:2) In the discussion of the trapezoidal integration and BLT, it would be better if a completely separate "classical DSP" usage of z-transform and BLT was added as an appendix or as a preceding chapter, so that the two approaches could be clearly contrasted. You know, one begins with an analog prototype which is a ready to use filter design and is a compromise between certain conflicting requirements, makes a substituion from s to z which is just a mapping from a "classical DSP" perspective and then extracts parameters for a recursive filter from the transfer function H(z) and while the resulting filter may have serious numerical errors, the design job finishes at that point. At the moment, there is a discussion of BLT in the same chapter, but the fact that it is in the same chapter, overlapping with the discussion of VA filters is confusing unless one is informed about the typical usage of BLT in more classical point of view. I can see that there is a need for the overlapping discussion, but there is a "pedagogical" problem here, so to speak, and the problem is not solved by simply stating that 'the discussion of the basic concepts of discrete-time signal representation and processing' is outside the scope of the book, because the problem is not at such a basic level as there is a whole academical literature that completely ignores the methods mentioned in the book. Their perspective needs to be made explicit in a separate chapter, their methods need to be exposed and their limitations need to be shown, and a whole new chapter with solution proposals should begin, and if the discussion of BLT needs to be duplicated and if yet another introduction to the z-transform with a different formulation will be required, so be it. Combining the two creates a too condensed presentation.
As a dedicated answer to this comment. "Combining the two" was never the intention. I guess it feels for you like a mixture of the two, because you are probably aware of the classical usage of the BLT in the filter design. However, if you temporarily try to forget about that knowledge, you should see the whole BLT stuff from another angle, where BLT is just a formal mapping, not any kind of filter design method. So, there is actually no mixture.

Post

Hi,

Thanks for your reply.

Actually a clarification about the problem (2) perhaps can even be made as a footnote, and what needs to be clarified is the fact that the meaning of the word 'discretization' in the sense of the VA filter book is quite different from the classical dsp usage. Unfortunately this also requires an explanation of integral transforms as it is required for understanding the classic sense, as it results with the creation of a different domain (the z domain) whereas the VA filter usage results with a numerical approximation of the s-domain and there are still z variables in the equations (as that is the same z in a different role). I am not sure how the problem might or should be handled. It is almost impossible to ignore the classical DSP literature, but that literature ignores the integrals that are presented in the chapter 3 of the VA book as in their view it's a discrete signal and there is nothing to integrate, as the fact that the signal actually was samples taken from a continuous one is not only forgotten but it is also denied by saying that it has an infinitely repeating spectra, then one can only calculate the summation of discrete values and the triangular area used in trapezoidal integration is undefined(*), it's not a part of the conception of discrete signals. This is a very fundamental difference. There are very few self contained books that would repeat the essence of an whole academic curriculum and I am not aware of any that does that in addition to providing an alternative view. Perhaps I wasn't even supposed to be reading your book if these things do not require a clarification for its target audience. The introduction of chapter 3 actually does give a glimpse of these differences, but overthrowing of a "literature wide default setting" perhaps should be done with a bold statement, perhaps even in bold, who knows. What's odd about this situation is that perhaps it is the classical view that should ring alarm bells instead, but it has became the default due to the fact that sampling was considered to be multiplication of the continuous signal by an impulse train and an application of continuous fourier transform on the result further strengthened this position, giving a way to the sampling theorem, thus it's hard to argue against. Discrete versions of Fourier and Laplace transforms were a natural extension of this kind of thinking I guess. That this particular 'discretization' is not the VA filter way can be empasized by using another word, perhaps 'simulation' would be a good one, or perhaps a paragraph that summarize the classical position would create adequate contrast. I can see that this paragraph and the equations that follow are intended to do the same thing:
Theoretical DSP texts typically state that discrete-time signals have periodic frequency spectra. This might be convenient for certain aspects of theoretical analysis such as analog-to-digital and digital-to-analog signal conversion, but it’s highly unintuitive otherwise. It would be more intuitive, whenever talking of a discrete-time signal, to imagine an ideal DAC connected to this signal, and think that the discrete-time signal represents the respective continuous-time signal produced by such DAC. Especially, since by sampling this continuous-time signal we obtain the original discrete-time signal again. So the DAC and ADC conversions are exact inverses of each other (in this case). Now, the continuous-time signal produced by such DAC doesn’t contain any partials above the Nyquist frequency.
But it is saying a lot in a very condensed form, because its purpose isn't stated: That we'll soon be breaking a few more rules.

Since you are of the opinion that it is already a "beginner" level book, perhaps this feature could be enhanced a little by making a few explicit statements about the method.

(*) Some would say the area between adjacent samples is zero, but it doesn't change the overall picture.

Best,
~stratum~

Post

stratum wrote:...
You definitely made me thinking about your arguments, but still didn't convince yet. Particularly I'm not convinced by your specific suggestions. Again, not because I think they are bad, but I don't think they fit well the intention and the spirit of the book. That said, I'm definitely going to think more in the back of my mind about the issues you raised. This is one of the most elaborated pieces of feedback I ever got on my book, and I highly value it.

However, I'm still under the impression that you're trying to read the book from the standpoint of classical DSP and that may be part of the problem. The book presents a different angle of view on the same things and often the same formulas and it's simply not possible to understand the book text from a classical angle. I also don't know if there can be a "continuous morphing" from one POV to the other (or if such intermediate POVs can make any sense). What IMHO should occur is a comparison of the two POVs. They should co-exist and each one should be used when appropriate or useful.

Another related issue is that, especially when in the middle of some material, which didn't yet come together into an integral piece of knowledge, I can easily imagine confusion caused by such text. However I don't think such confusion is something too specific. Personally, when reading texts on a competely new subject, sometimes I get stopped by some particular paragraph or a formula and it can take me sometimes days, if not weeks to grasp the full meaning of it. Sometimes it helps to simply read further, to get a glance at the bigger picture, but it's rarely fully solving the understanding problem and I have to return back to the place which caused the problem later.

Such situations are likely to occur when there is a related aspect of fundamental understanding. Thus, I think they do not represent a specific problem of the text (even though maybe some texts, including mine, could have expressed the relevant place in a different, possibly better manner), but rather the fact that it may take a while to grasp the contained idea. Some texts even do not highlight the respective areas at all, or maybe sometimes my understanding of what are the key aspects of the information differs from the understanding of the author. In case of the paragraph you qouted, this paragraph and the following formulas are a fundamental part of understanding the material. You could say that in a way the whole DSP knowledge is implicitly contained therein ;) Maybe the text is overcondensed compared to some other texts, but one could probably say the same about the entire book, and to be consistent, the whole book would need to be rewritten.

OTOH, it seems to me that the text perfectly works for you, despite the complaints. One of the big problems IMHO about many texts is that sometimes people simply read through them, getting an _impression_ they understood them, whereas there is no real understanding. The fact that my book raises a lot of questions in your head and the fact that it seems you are successfully finding the answers seems to me to imply that it stimulates a true understanding on your side, rather than simply remembering the formulas and some rules. Thus the text seems to be fulfilling its primary goal, so why changing "a running system"? ;)

Post

OTOH, it seems to me that the text perfectly works for you, despite the complaints.
Hi,

That's true but it wasn't always the case. If I was alone, probably I wouldn't be able to undersand it. In a few months ago there was a few heated debates here about what is supposed to be meant by BLT or MZT mapping or how Fourier transform was supposed to be understood. (Somebody had wanted to learn how to use BLT, and somebody else had an intuitive idea of Fourier transform as being correlation, but didn't have much understanding of how it worked, there were many answers in the thread as a reply, but no real answer with an explanation that actually did explain anything.)

I had made a few bold statements about the first, that there is nothing to understand about BLT or MZT, i.e. mapping is mapping, just plug the variables and do the algebra, and found a dspguide style explanation (albeit it wasn't a scholarly written one) for the latter (the question if Fourier transform == correlation) using a few wiki articles about orthonormal functions. My ignorance surprised many, but somehow I won those arguments. Miles and mystran helped to extend the explanation to the Laplace transform.

It has turned out that the confusion about BLT was related to the way 'discretization' was formulated in your book, and that the Fourier transform could in fact be explained in very simple terms, but somehow that explanation wasn't easily found in a beginner level book. Somebody even joked that the idea of an "integral transforms for dummies" style explanation is hillarious and there was no way that it could work, but it did. I have already quoted what Orfanidis thinks about the subject: That these are just tools that the student should probably be familiar from another course. That probably was a proper statement for his time, but nowadays musicians are playing with these 'serious toys' and interdisciplinary work is getting to be common. Years ago I had participated in a cognitive science program as a MSc study - there people were expected to understand linguistics, philosophy, computer science and psychology at the same time. The same people. Did it work? Not for me, but was an interesting experience nevertheless. It works for some people if they somehow manage to concentrate on one of these fields and "fake" the rest.

Anyway, returning back the VA filters, those discussions were the time I had learnt a few things - by trying to explain them. Understanding didn't emerge from just reading. Perhaps I could say 'just reading a book' has actually worked "reasonably" well for the case of classical DSP, but it took a very long time. Understanding your book required Miles saying, "these are circuit simulators!" or something like that. Then the mystery was resolved, almost immediately. It didn't even took 10 seconds. Sure the book still contains many things that I do not yet understand, but they are not the main thing. Now I can read it slowly with patience, as you recommend, because the main source of confusion is cleared.

These probably are not the problems of the 'target audience', perhaps they are, I'm not sure. Sure I can find a few electrical engineers who wouldn't be able to explain the Fourier transform, for example. I deal with one occasionally and he still couldn't learn linux shell scripting. If they continue to read only Orfanidis, I'm sure they won't be able to figure out much anytime soon. You know, if every lecture refers to another one saying "that you are supposed to be familiar with this thing from somewhere else", some things never get be explained. In the end the calculus teacher (the last relevant one in charge) will be thinking: "err, integration over orthonormal functions is zero, therefore the mapping is reversible and there is nothing to explain, this formula looks obvious to me, so probably it is obvious to my students".

I do not know if I could explain the situation. It's not that you are supposed to solve the problem, but a few 'beginner level' footnotes here and there might change a lot. It should, because simply saying "these are circuit simulators!" did.

Best,
~stratum~

Post

stratum wrote:...
Thanks for your further input (even if it doesn't result in immediate reaction on my side, as I said, I need to think about this). Still I'd like to make a few remarks regarding my viewpoint on the things you mentioned.

Probably, based on the knowledge you already have, you are assigning more meaning to the words in my book than they are actually supposed to have. Regarding the use of the word "discretization", it's used more or less in its literal meaning (switching from continuous to discrete time), with no particular discretization approach or method being immediately implied. Yes, the book presents a particular discretization approach which is different from classic DSP texts, but I'm not sure if classic DSP text should be given the right to "usurp" such a general term ;) Actually the word "discretization" taken out of context is not supposed to mean any particular approach, it can mean any or all of them.

Same goes for BLT. Often the term BLT is used to describe a particular discretization method, but its original meaning simply describes a mapping.

Talking about "circuit simulation". To an extent the book is using this as a starting point, but, as you could have noticed there are not many references to circuits. In fact, the book is presenting a number of continuous-time models (which may be but not necessarily are related to real circuits) and the way to built their discrete-time versions. Maybe the words "circuit simulation" clicked for you somehow, but this is not what the book is specifically or solely about. In fact, if I had been writing a book about circuit simulation, this would've been a very different book.

Regarding Fourier transform. As with many other things (like filter design), there is not a single way to look at things. Fourier transform can be thought of in many different ways: invertible integral transform, rotation in infinite-dimensional linear space or as representation of a function as an infinite sum of sinusoids (where the latter has the corresponding understanding in terms of the linear space as expansion in respect to the sinusoidal basis). For different persons different ways of understanding may be easier to grasp. Ideally one should be able to grasp them all and to switch from one to the other at will based on the needs. For the purposes of the text of my book I believe the most fitting one is the sum of sinusoids, which is explicitly presented in Chapter 1.

Regards,
Vadim

Post

These seem to be valid points.
Anyway, what matters for me now is that here is a book I couldn't read before but now I can. I am not sure I recall everything that has led to this change. The "Aha moment" seems to be triggered by a word which pointed out to the different senses that the word 'discretization' might have, but it's the past now. Thanks for the discussion I guess there is nothing more to say.

Regards,
~stratum~

Post

Hello Vadim, I am attempting to use the trapezoidal integrator as described in the book to replace the naive integrator in a 1-pole MZ lowpass filter. I apply the a0 coef to the input (along with the 0.5 scaling), but the b1 coef is ambiguous. If I place b1 directly after the unit delay, I get the "normal" aliased response of the MZ, except the gain of the filter output decreases to 0.5 when tuned to nyquist, and rises to 1 near 0 Fc. Yet if I place the b1 on the output sum, with feedback to the input sum, I get the normal gain, except with the zero notch at nyquist. I would like to make the first case work, but I'm not sure how. Compared to the naive integrator, it doesn't work the same.

Post

camsr wrote:Hello Vadim, I am attempting to use the trapezoidal integrator as described in the book to replace the naive integrator in a 1-pole MZ lowpass filter. I apply the a0 coef to the input (along with the 0.5 scaling), but the b1 coef is ambiguous. If I place b1 directly after the unit delay, I get the "normal" aliased response of the MZ, except the gain of the filter output decreases to 0.5 when tuned to nyquist, and rises to 1 near 0 Fc. Yet if I place the b1 on the output sum, with feedback to the input sum, I get the normal gain, except with the zero notch at nyquist. I would like to make the first case work, but I'm not sure how. Compared to the naive integrator, it doesn't work the same.
Hello,

I don't know what's an MZ lowpass filter. Do you mean MZT? In that case I'm still not sure which topology are we talking about. So would you care to provide more info?

Post

camsr wrote:Hello Vadim, I am attempting to use the trapezoidal integrator as described in the book to replace the naive integrator in a 1-pole MZ lowpass filter. I apply the a0 coef to the input (along with the 0.5 scaling), but the b1 coef is ambiguous. If I place b1 directly after the unit delay, I get the "normal" aliased response of the MZ, except the gain of the filter output decreases to 0.5 when tuned to nyquist, and rises to 1 near 0 Fc. Yet if I place the b1 on the output sum, with feedback to the input sum, I get the normal gain, except with the zero notch at nyquist
The zero at nyquist is what you want, usually, and is the normal behavior. It's a useful property, can help reduce aliasing downstream (e.g. suppose you saturate the filter output later on).

Richard
Synapse Audio Software - www.synapse-audio.com

Post

The topology is this one..
y[n]=a0*x[n]+b1*y[n-1]
b1 = exp(-2pi(fc/fs)), a0 = 1-b1
I assume this is matched z because of the FR aliasing, and lack of nyquist zero. The trapezoindal form is the TDF2.

I thought I could just replace the naive integration step as a "block" like described in the book with the trapezoidal integrator. I verified my implementation and it is indeed an integrator. I'm just trying to get the matched z type of response from it. I do understand if this is not possible (or maybe "different") because the trap integrator does reject nyquist frequency.

Post

camsr wrote:The topology is this one..
y[n]=a0*x[n]+b1*y[n-1]
b1 = exp(-2pi(fc/fs)), a0 = 1-b1
I assume this is matched z because of the FR aliasing, and lack of nyquist zero. The trapezoindal form is the TDF2.

I thought I could just replace the naive integration step as a "block" like described in the book with the trapezoidal integrator. I verified my implementation and it is indeed an integrator. I'm just trying to get the matched z type of response from it. I do understand if this is not possible (or maybe "different") because the trap integrator does reject nyquist frequency.
To begin with, I'd like to ask, where do you identify the naive integration step?
u[n]=a0*x[n]
y[n]=u[n] + b1*y[n-1]
The second equation is not exactly the equation of a naive integrator. That one would have been
y[n]=u[n]*T + y[n-1]
Since b1!=1 what you have is already a leaky integrator aka 1-pole lowpass (non-unity gain in this case, since you dropped the a0). And then I assume you replace it with a trapezoidal integrator. So you swap a non-unity-gain lowpass with an integrator. Or did I misunderstand you?

Furthermore, I'm not an expert in MZT, but I doubt that your filter is strictly MZT. Obtaining its transfer function:
y=a0*x+b1*z^-1*y
y*(1-b1*z^-1)=a0*x
y/x=a0/(1-b1*z^-1)
y/x=a0*z/(z-b1)
you have one additional zero at 0 which wouldn't have been there in the MZT filter, if I understand the method correctly. Although the difference is only in the phase.

I am also not sure if a trapezoidal integrator based structure could be tweaked into the MZT response. Maybe it can, but what would be the point? If you want an MZT response, simply use an MZT filter.

Post

I was thinking of how the naive step in the filter I'm using works, the b1 turns the naive integrator to a leaky integrator, and the a0 is the DC gain adjustment. I thought it might be possible to apply a0 and b1 in the same way to the trapezoidal integrator, and it is, just not in the way I expected. I'm hoping to make a 1p lowpass with improved accuracy in both frequency and phase near nyquist, but I do realize the tradeoffs involved. I'm not adept with figuring out the transfer functions like you did, but I'll study what you said and see what I can do!

Post Reply

Return to “DSP and Plugin Development”