 A warm welcome to the 40th lecture on the subject of multirate digital signal processing and wavelets and in this lecture we take over once again from an interesting set of presentations that have taken place in the last few lectures. We intend in this lecture as the title suggests to look at what are called n-band filter banks, essentially a generalization of two-band filter banks and subsequently we intend to look ahead. Perhaps more appropriately, we intend to look back and then look ahead. Look back at where we are in the subject and then look ahead to see what more we can learn. So in some sense, this lecture is intended to be a kind of stop, a kind of point where we sit down and reflect, a point where we look back at what we have done and we take stock of where we are and see where we can go from here. Now somewhere down the line when we discussed filter banks, we made it clear that we were actually looking at one particular stream in filter banks where the down sampling and the up sampling factors were two. In fact, all the while when discussing filter banks, we have been looking at a down sampling and up sampling factor of 2 save for one or two lectures where we made some kind of a generalization. We established some general principles for down sampling by arbitrary factors of integer m, but we did not really analyze in depth. What we intend to do today first is to take one new case where the integer m is equal to 3 and analyze in depth the ideal filter bank for the case m equal to 3 or what is called a three band filter bank. And I believe that if we understand the three band filter bank in depth, we would understand generalizations to any m. Subsequently, we shall see more and more directions that we can explore starting from this point in our study. So, let us come to the first issue that we wish to address today namely the three band filter bank. And what we intend to do here is to look at the ideal three band filter bank for which I shall first put down a structure and then proceed from there. So, the ideal three band filter bank or for that matter any three band filter bank would be a structure that looks like this on the analysis side. So, first let us look at the analysis side. Essentially, we have the same situation, we have three filters let us call them H0z, H1z and H2z followed by a down sampling of three. Now this is true for any uniform three band filter bank, uniform actually refers to the fact that we have the same band or band length of all the filters here. And on the synthesis side, we have in some sense the transpose of this structure which would look like this, you will have an upsampling by three followed by a filter and this is true for each of the branches. The outputs are all summed here and if on the analysis side we call the input X what we expect to get here and we call this output Y is the same as X if the system is a perfect reconstruction system. So, let us write that down, if the three band system is a perfect reconstruction system Y is equal to X well of course, we do admit a few modifications of X and we should just recall them for a couple of minutes. We do not mind if X is scaled by a constant, we do not mind if X is delayed by a constant delay of course, what we mean is an integer delay which operates uniformly at all times. We also do not mind actually if there is an easily invertible modification that is not perfect reconstruction, but we can of course do away with an invertible modification if it occurs, but that is the subject of a different lecture. But the moment we will talk about the ideal system which is in general a perfect reconstruction system. So, what would an ideal three band filter bank look like? In the ideal three band filter bank the first thing of course is that H0 and G0 are the same and so too for H1 and G1, H2 and G2 and in fact we can draw the ideal frequency responses of each of these filters. So, H0Z has the following ideal frequency response. So, as you can see H0 is an ideal low pass filter with a cut off of pi by 3. Now H1 is an ideal band pass filter between pi by 3 and 2 pi by 3. So, it would have a frequency response that looks like this and finally H2 would be an ideal high pass filter with a cut off of 2 pi by 3. So, of course as we expect the three filters together H0, H1 and H2 in some sense cover all of the frequency axis from 0 to pi. The first of them of course is a low pass filter, the second a band pass filter and the third a high pass filter. Essentially we have divided the frequency axis between 0 and pi into 3 parts a generalization from the two band filter bank. Now, as in the case of the ideal two band filter bank it will help us if we analyze this ideal filter bank with a so called prototype sequence or a prototype discrete time Fourier transform. So, that we get our ideas very clear as to what happens, but before that we need to see the effect of down sampling and up sampling on the frequency response. So, up sampling is easy to deal with, let us recall what happens when we up sample. So, you will recall that if you have let us say an A z being fed into an up sampler by a factor of 3 what emerges is A z cubed and if you look at the frequency domain for this A e raised to power j omega is transformed on up sampling into A e raised to power j 3 omega. So, essentially there is a compression of the frequency axis by a factor of 3. So, just to take an example suppose we had a spectrum that looks like this, so this is our typical prototype spectrum as you recall. If you have a spectrum which looks like this of course needless to say this would be periodically repeated at every multiple of 2 pi on up sampling by a factor of 3 we would have a spectrum that looks like this. So, I need to of course mark out the points pi by 3 2 pi by 3 and pi and essentially what happens is there is a compression by a factor of 3. So, the original spectrum is squeezed to occupy the range between minus pi by 3 and pi by 3 and then of course the same thing is brought to 2 pi by 3 and also to minus 2 pi by 3. So, of course if I choose to call this part of the spectrum alpha and this part of the spectrum alpha conjugate as would be the case when the underlying sequence is real then you have alpha here alpha conjugate there alpha here alpha conjugate here again and alpha here and alpha conjugate here again and now of course the conjugate relationship is still obeyed because as you can see this part and this part are complex conjugates this part and this part are complex conjugates and this part and this part are also complex conjugates. complex conjugate relation is still maintained after compression by a factor of 3. So, so much so for what happens when we up sample by 3. Now, we need to analyze what happens when we down sample by 3. So, you see effectively down sampling by 3 creates aliases of the original spectrum. What we expect is that we are going to have the original spectrum shifted and added. And in a way that is true because you will recall that down sampling by 3 amounts to multiplying first by a sequence which is 1 at every multiple of 3. So, at 0 it is 1, at 3 it is 1, at 6 it is 1 and so on, at minus 3 and so on, so forth behind and 0 elsewhere and so on. So, it amounts to multiplying first multiply by this then essentially throw away the 0s. And if you recall since this is a periodic sequence we could express it in terms of its inverse discrete Fourier transform or if you take one period of this periodic sequence we could take its we could take its discrete Fourier transform and then bring it back using the inverse. And that would give us a useful representation for the sequence in the form of modulates. So, it is easy to see that this periodic sequence can be written summation k going from 0 to 2 e raised to power minus j 2 pi by 3 times k n and of course divided by 3. So, effectively what we have done is to multiply the original sequence by this periodic sequence. Subsequently we reduce the z cube to z. So, what we are saying in effect is we have taken if we down sample a of n by 3 it is equivalent to multiplying a n by one-third summation k going from 0 to 2 e raised to power minus j 2 pi by 3 times k n and it is easy to deal with this in the z domain. So, we can find the z transform of this very easily this is not all this is not complete. So, equivalent to multiplying by this followed by replace z by z raised to power one-third in the z domain of course that is what is meant by throwing away the zeros. So, we recognize that after you do this you already have a function of z cube there. Now, let us do this in the z domain. So, if a n has the z transform a z and of course the discrete time Fourier transform e a e raised to power j omega then a n times one-third summation k going from 0 to 2 e raised to power minus j 2 pi by 3 times k n is going to have the z transform one-third a z e raised to power j 2 pi by 3 times k that is easy to see summed over all k of course. And of course following that what we are doing is to replace z by z to the power 1 by 3 and therefore, when a n in the z domain is subjected to down sampling by 3 what we obtain is all in all one-third summation k going from 0 to 2 a z raised to one-third times e raised to power j 2 pi by 3 times k a very important result in its own right. And we need to interpret this in the frequency domain first. So, in the frequency I mean the sinusoidal frequency domain. So, in the sinusoidal frequency domain a e raised to power j omega when subjected to down sampling by 3 results in one-third summation k going from 0 to 2 a e raised to power j omega by 3 times e raised to power j 2 pi by 3 times k. Now, we need to interpret this is a little more difficult to interpret unlike the case of up sampling where the interpretation was very simple. We simply compressed the whole thing by a factor of 3, but here there is a summation involved there is of course, an expansion involved there is a translation involved. So, we need to interpret this step by step. So, let us look at this expression here you see what we have here is a e raised to power j omega by 3 e raised to power j 2 pi by 3 times k. For the moment let us forget about omega by 3 here and let us focus our attention on this j into 2 by 2 pi by 3 times k. In fact, if we do not write omega by 3 here let us first write omega and see what happens. So, consider a e raised to power j omega times a e raised times e raised to power j 2 pi by 3 times k is of course, essentially a e raised to power j omega plus 2 pi by 3 times k well actually does not matter minus or plus because anyway we are going to cover the 3 values 0, 1 and 2 modulo 3. So, this essentially means shift on the frequency axis by 2 pi by 3 all multiples of 2 pi by 3. So, you see is equal to 0, 1, 2. So, essentially what it means is take the original spectrum, take the original spectrum and shift it by 2 pi by 3 into 1, take the original spectrum and shift it by 2 pi by 3 into 2 and add all of these. So, summation k equal to 0 to 2 a e raised to power j omega e raised to power j 2 pi by 3 times k essentially means shift the original spectrum, original DTFT by 0, 2 pi by 3 and 4 pi by 3 and add these 3 shifted versions of the spectrum. Now, of course, multiplication by 1 by 3 here is a minor issue it only means scale the spectrum by a factor of 1 by 3, but now the last step is to replace omega by omega by 3 and that is essentially an expansion step. So, what we are saying is after the shifting and adding scale vertically by 3 rather by one third and horizontally pitch by a factor of 3 and that completes the frequency domain effect of down sampling by 3. Now, to fix our ideas let us see what happens on the low pass branch when we take the prototype spectrum. So, with the prototype spectrum what I mean by a prototype spectrum is a spectrum which is very easy to understand where we have distinct frequencies with distinct amplitudes. It is a simplest case of a spectrum where we have distinct amplitudes for distinct frequencies and we have omitted the phase altogether. So, we have a straight line from going down from 0 frequency to pi and to minus pi on the other side and we assume 0 phase to make matters simple. Let us call the underlying sequence here x of n. So, we have the spectrum capital X e raised to power j omega and we subject the spectrum to the low pass branch in the ideal 3 band filter bank. So, the low pass branch is essentially low pass filter ideal low pass filter with a cut off of pi by 3 followed by a down sampler and of course, then we have the analysis and synthesis side following this analysis side. This is the analysis side, but we will do the analysis of the synthesis side afterwards or we will look at the synthesis part afterwards. Let us see what happens when we subject x to this part of the analysis filter bank. So, of course, when x e raised to power j omega is subjected to the ideal low pass filter, we know what happens with a cut off of pi by 3. The upcoming spectrum looks like this with a 1 here and this is of course, of height 2 by 3. Now, let us see how this would react when subjected to the down sample by a factor of 3. So, when down sample by 3 what happens? Let us constructed piece by piece. So, we have this original spectrum. So, to speak which goes down to 2 by 3 here. Now, as expected it is translated to every multiple of 2 pi by 3. You must visualize that this is repeated periodically at every multiple of 2 pi. So, what we have between minus pi and pi is also present between pi and 3 pi is also present between minus 3 pi and minus pi and for the moment since we are now accustomed to dealing with this periodic discrete time Fourier transform, we shall straight away write down the result. So, of course, the shift by 2 pi by 3 is easy to visualize. In fact, what happens is that this is brought instead of a 0 to 2 pi by 3 and there we go. But what is also equally easy to understand when we just little more difficult to understand is that when we shift by 4 pi by 3 what we are actually doing is to bring this back to lie between minus pi and minus pi by 3. So, shifting forward by 4 pi by 3 is equivalent to shifting back by 2 pi by 3 that is because all the shifts are modulo 2 pi. Remember there is a periodicity of 2 pi in the discrete time Fourier transform. So, all our shifts are modulo 2 pi, they are circular in that sense. So, shifting forward by 4 pi by 3 is equivalent to shifting backward by 2 pi minus 4 pi by 3 which is 2 pi by 3 again. So, there we are. What we obtain in shifting by 4 pi by 3 is the same spectrum brought back to lie between minus pi and minus pi by 3. So, this is what happens when we down sample by 3 on the low pass branch. And now we could take a minute to identify the original spectrum. This is really the original spectrum so to speak the original spectral component. And this is an alias here and so is this. Now of course, this is not all. After doing this we do two more things. The first thing is to scale vertically by a factor of 1 by 3. And secondly to scale horizontally by a factor of 3 which means to stretch by a factor of 3. Let me take both the steps at once. So, we get essentially this 1 becomes 1 third, 2 third becomes 2 third becomes 2 ninth and it is 2 ninth all the way there. Moreover, this pi by 3 is brought to pi minus pi by 3 is brought to minus pi. And all of these again shift similarly. So, what we get all in all after down sampling by 3 is the following. This is 1 by 3 there, this is 2 by 9 and of course, there is a stretching here too. Now of course, it is easy to see what happens when we subject it to up sampling by 3. So, when we up sample this by 3 again we go back here. So, you will realize that an up sampling by 3 what is happening is a compression on the frequency axis by a factor of 3. So, we see something very similar to what we had at the output of the down sampler except that there is a factor of 3 on the vertical axis. So, here we go. So, the shape is all the same except that this is now 1 by 3 at the top and 2 by 9 there. Now once we see it so clearly on this diagram it is very easy to understand what happens when we subject it to the action of the synthesis filter. So, synthesis filter is again an ideal low pass filter cut off pi by 3 and once again we recognize if we will that this was really the so called original spectrum and these were the carbon copies of the aliases. So, what the synthesis filter does is essentially to retain the original and destroy the aliases and therefore what we have left after the synthesis filter. So, once we subject this to up sampling by 3 and then the synthesis filter the ideal low pass filter with a cut off pi by 3 what we get here is essentially the original spectrum, but multiplied by a factor of 1 by 3 that is all that is the only change 1 by 3 there and 2 by 9 here. So, in fact we did this analysis of the low pass branch carefully because if we understand this analysis then almost all the analysis for the 3 band filter bank becomes crystal clear. Now it will help for us to do the analysis of the middle branch to fix our ideas further. So, what did we observe in general on the low pass branch the effect of the analysis part and the synthesis part is first to isolate the region between 0 and pi by 3 and then to reconstruct the same after creating aliases in between. Now we must again spend a couple of minutes in understanding why those aliases get created. The aliases get created because we wish to retain the total amount of data you see what we are doing is first to decompose in the frequency domain on each of the branches. Subsequently we do not want the overall amount of data to increase. So, whatever be the effective number of samples per unit time at the input of each of the analysis filters is reduced to one third at the outputs of each of the down samplers. So, total amount of information or data per unit time remains the same 3 times one third. On the synthesis side we are going from these multiple streams of data emerging from each of the down samplers back to the original data by reconstruction. Now let us look again at the middle branch that would give us an insight because the middle branch is something very peculiar to the 3 band filter bank. We did not have an equivalent concept in the 2 band filter bank and of course on the analysis side the middle branch is essentially a band pass filter between pi by 3 and 2 pi by 3 an ideal band pass filter of course followed by a down sampler of 3. And let us take again that prototype spectrum and see what happens when we subjected to this analysis middle branch. So if we take the prototype spectrum x e raise the power j omega subjected to the action of the band pass filter between pi by 3 and 2 pi by 3 we would of course get remnant only between pi by 3 and 2 pi by 3. This would be 2 by 3 here and 1 by 3 there. Now as usual on down sampling by a factor of 3 we would be taking this spectrum this remnant spectrum after band pass filtering shifting it by every multiple of 2 pi by 3 and adding up these shifted versions. Now let me sketch what happens when we do so and I need to expand the figure to explain properly. Remember this is the original part of the spectrum so to speak and so I will darken it. And I could call this spectral portion alpha and this spectral portion alpha conjugate. Now we would shift this by 2 by 3 and by 4 pi by 3 2 pi by 3 and by 4 pi by 3. So remember that all shifts are modulo 2 pi. So we could think of shifting first backwards by 2 pi by 3 and then forward by 2 pi by 3 that is the same thing as shifting by 2 pi by 3 and 4 pi by 3 either forward or backward. When we shift this backward by 2 pi by 3 what we are going to get is this coming here so something like this. So we have an alpha appearing here. Now when we shift this forward by 2 pi by 3 of course it goes outside the range pi and that would be taken care of anyway when we consider you know the modulo is here. So now let us consider what happens when we shift this forward by 2 pi by 3. So when we shift this forward by 2 pi by 3 we bring this here. Now here it is convenient to do one forward shift and another forward shift. So when we shift this once forward by 2 pi by 3 we bring this alpha bar here. When we shift it again once more we get the alpha bar here. When we shift this backward by 2 pi by 3 we brought it here and when we shift once again by 2 pi by 3 we bring it here. So we get another alpha there. Now you can see very easily that once again we have the complex conjugate property being obeyed. So we have alpha, alpha bar here. If it is alpha bar there it is alpha here of course this is alpha here it is alpha bar there and if it is alpha bar there it is alpha here. Not only that now we can also see what happens on the synthesis side. On the synthesis side these aliases are removed. So this is an alias these are aliases here. So and this is also an alias here and an alias there. So without repeating all the discussion I can straight away summarize once again. The synthesis filter which is essentially a band pass filter once again between pi by 3 and 2 pi by 3 following an up sampler would retain the original and throw away the aliases. You see remember on down sampling what is going to happen is this is going to be scaled by a factor of 1 by 3 on the vertical this is going to get expanded by a factor of 3 on the horizontal. On up sampling by 3 it is going to get contracted once again. So after down sampling by 3 and up sampling by 3 you come back here except with a scaling of a factor of 1 by 3. I have not shown all those details again here I have left it for you to complete those details but we understand what happens. So after this after the synthesis filter the original is again retained and the aliases removed. Now I leave it for you as a student to complete the analysis for the third branch in the 3 band filter bank. It is very similar and if one goes through it carefully it would help fix one's ideas completely. What we have done here is to analyze the ideal 3 band filter bank and actually now that you have done it you can see that going to the m band case for m greater than 3 is extremely simple at least conceptually. But rest assured going from ideal to practical is a very big job in the 3 band filter bank and even more so in higher order filter banks. In fact it is a big job for two reasons one is designing the filters in the discrete time filter bank and the second is to interpret the generalization of the multi resolution analysis. What do we mean by a multi resolution analysis? When we talk about the 3 band case for example in the 2 band case essentially the multi resolution analysis imply that you would have a peel off of one subspace every time. Now as you can see you have a peel off of 2 subspaces each time there are 2 detailed subspaces so if you go back to the case of the 2 band filter bank or the dietic multi resolution analysis each time we took the low pass version or the low pass branch and iterated on it and the interpretation was that we took the course information and decompose it further into course and specific information to that scale. Now what we are saying is going down coarser each time implies peeling off 2 parts of specific information at that scale a so called middle frequency information and a so called high frequency information and this is the case for m equal to 3 for larger m of course there are m minus 1 subspaces being peeled off each time. So of course we could look at these in greater detail in subsequent lectures. Now what is it else that we wish to do in subsequent lectures? We would like also to look at more applications we would like to look at the generalizations not only to n band but also to multi dimensions and of course we might want to look at generalizations to the cases where the up sampling and the down sampling is rational rather than integer. So with this then we shall look forward to some more expositions on wavelet cell multirate signal processing in subsequent lectures and conclude this 40th lecture. Thank you.