 A warm welcome to the 31st lecture on the subject of wavelets and multirate digital signal processing. Over the past few lectures, we have been looking at variants of the wavelet transform or of time frequency analysis. In fact, we have looked so far at the short time Fourier transform, the continuous wavelet transform, discretization of the continuous wavelet transform in scale and then in translation. Then, we have considered the specific case of dyadic discretization and uniform discretization of translation. I mean dyadic discretization of scale and a corresponding uniform discretization of the translation parameter. Following that, we have brought in the possibility of biorthogonal multiresolution analysis and we took inspiration for biorthogonal MRA or biorthogonal multiresolution analysis by considering the need to construct splines piecewise polynomial functions. So, essentially we looked at the possibility of piecewise polynomial interpolation and when we went from piecewise constant which gave us the hard multiresolution analysis to piecewise linear, we noted that we had two options. Either we use the same analysis and synthesis filters, essentially the same analysis and synthesis scaling functions and wavelets or we make the synthesis side different from the analysis side and over the past two lectures, we realized that if we insisted on constructing an orthogonal multiresolution analysis with piecewise linear scaling functions and wavelets, we had a very difficult task before us. Of course, it is achievable, we can get an orthogonal multiresolution analysis from piecewise linear functions, but it is extremely cumbersome to construct those scaling functions and wavelets. Moreover, they are of infinite length, we lose compact support. Now, if we wish to stick to compactly supported scaling functions and wavelets or rather we wish to stick correspondingly to finite impulse response filters on the analysis and synthesis side, then we need to bring in a variant of the multiresolution analysis called bi-orthogonal multiresolution analysis. We have so far introduced the bi-orthogonal multiresolution analysis only from the perspective of the filter bank and for the moment we intend to remain there. Later, we shall look at its implication in continuous time or in iteration. At this moment, we wish to look at one more variant of the multiresolution analysis and this time it is a variant on the iteration of the filter bank. This is called the wave packet transform and therefore, today's lecture is appropriately titled the wave packet transform. Now, the idea behind the wave packet transform is very simple. So far, when constructing the dyadic discrete wavelet transform, when constructing a dyadic multiresolution analysis, we have always insisted on decomposing the so called approximation subspace and let me put graphically before you this notion from the point of view of the ladder of subspaces about which we have been speaking very often. So, you will recall that we have always been talking of this ladder of subspaces v 0 contained in v 1 contained in v 2 and so on so forth add infinitum upwards and v minus 1 contained in v 0 v minus 2 in v minus 1 and so on downwards and at every time we have peeled off an incremental subspace. So, for example, we have always chosen to decompose the approximation subspace into v 0 and w 0 for example, when we talk about v 1. Now similarly, when we talk about v 2, we have v 2 being decomposed into v 1 and w 1 and so on so forth. So, it is always the approximation subspace that is decomposed the detail subspace or what you call the incremental subspace not decomposed in the wave packet transform our objective is to get around this limitation. So, what we intend to do is to decompose the incremental subspace as we do the approximation subspace. So, for example, when we decompose v 1 into v 0 and w 0, we also intend to decompose w 0 in the next step or if we go one step higher. Let me show you the drawing here when we decompose v 2 into v 1 and w 1 and when we further decompose v 1 into v 0 and w 0, we also wish to consider the possibility of decomposing w 1 into 2 subspaces in an appropriate manner. So, let us write down in one sentence the idea behind the wavelet or wave packet transform decompose the incremental or detailed subspace also. Now, towards this objective the simplest approach would be to look at the filter bank structure. So, in fact, this time instead of starting from the basis or the continuous time functions, let us begin instead from the filter bank. So, let us assume that you have this sequence representing the function in an approximation subspace. For simplicity, let us take the subspace v 2. So, let us assume that you have the sequence of coefficients in the expansion of a given function of L 2 R in terms of the basis of v 2. Now, remember that the filter bank essentially operates on these coefficients and creates the coefficients of expansion in v 1 and w 1 using the low pass and the high pass analysis filters. So, in other words, the filter bank is iterated on the low pass branch. Suppose, we also choose to iterate the filter bank on the high pass branch, essentially that is what is going to give us the so called wave packet transform. So, let us first investigate starting from the ideal. Let us look at the ideal frequency domain behavior that we are talking about here. So, what I am saying is this, in the discrete wavelet transform, we take the sequence of coefficients as the input to the filter bank. We subject it to the analysis low pass filter and analysis high pass filter and down sample by 2. What we get here is the coefficients in the lower approximation space and what we get here is the coefficients in the detailed space or incremental space. Now, the next time we take this entire structure and put it here. So, we have a structure like this. Let me call this analysis low pass filter as a l and let me call this a h the analysis high pass filter. What I am saying is we put a l here and a h there and this is what gives us the discrete wavelet transform. So, this part constitutes a discrete wavelet transform of course, with this down sample and left where it is. So, if you look at two steps in the discrete wavelet transform, these are the incremental coefficients at the first level of decomposition. These are the incremental coefficients at the second level of decomposition. These were the initial approximation coefficients. Here, you would get approximation coefficients at the first level of decomposition and here you get approximation coefficients at the second level of decomposition. What we are suggesting is do the same thing here and what do you get here? This is what we are trying to ask. So, this is additional and this is what we are trying to investigate. What would happen when you do this? So, let us consider these to be the ideal filters that we try and use in the filter bank. So, suppose we have all ideal filters, consider ideal analysis low pass filters and high pass filters. So, we will call them I a l ideal analysis low pass and I a h ideal analysis high pass and let us draw the filter bank that we are going to investigate. Let us take a prototype spectrum. A prototype spectrum is an example of a spectrum where we can clearly see what happens at every point in the decomposition. So, this is the prototype input spectrum. We subject this. This is the input here. We apply this to I a l and I a h. We down sample these and let us give names everywhere. So, this input we shall call the point x 0. We will use capital letters because we are going to work in the spectral domain all the while. We will call the spectra x 1 and x 2 at these points and we will continue from here in naming the spectra. So, we have x 1 is further subjected to I a l and I a h with a down sampling by 2 here again and we get x 3 here and x 4 and the same thing is done to x 1 and x 2. So, we take x 2 subjected to the operation of I a l I a h down sample by 2 and obtain x 5 and x 6 and we wish to study the spectra of x 5 x 6 x 3 x 4 x 2 and x 1. Let us go about this task. Now, x 1 and x 2 are very easy. In fact, we can write down the spectra in just one step and let us first put down very clearly the frequency responses I a l and I a h are respectively ideal for the spectra. Low pass and high pass filters discrete time filters of course with cut off pi by 2 and therefore, it is very easy to write down the spectrum at x 1 and x 2. You see let me put back those 2 before you. So, if we take x 1 here we have the input x 0 subjected to low pass filtering. That means the spectrum between 0 and pi by 2 is going to get extracted. We have done this before. So, I am not repeating all the details. So, if you wish maybe for simplicity what we could do is to write x 1 1 here. So, we will work out x 1 1 first for simplicity and x 2 1 here and from x 1 1 we shall go to x 1 and from x 2 1 we shall go to x 2. So, x 1 1 is very easy x 1 1 is going to have a spectrum like this. After all x 1 1 is obtained by subjecting the input to an ideal low pass filter with a cut off of pi by 2. So, that is very easy to determine. So, this is the spectrum at x 1 1 and similarly the spectrum at x 2 1. Now, to determine the spectra at x 1 and x 2 we have to be a little careful. We have to note that in down sampling the following happens. We translate the spectrum by every multiple of 2 pi by 2 that is pi. So, we translate the spectrum by pi and add the original spectrum to its translates by pi. So, if we put back the spectra x 1 1 and x 1 x 2 1. So, you can see that when we translate this by pi and remember that this is periodically repeated at every multiple of 2 pi. So, whatever you are saying between minus pi and pi is also going to be present between pi and 3 pi and between minus pi and minus 3 pi and so on. This entire block is going to be placed to lie around pi and of course, what was placed around minus 2 pi would appear here. So, all in all the spectrum x 1 would look like this. We have done this before, but it is good to recall and recapitulate. There is also factor of half. So, this is the spectrum not of x 1, but of x 1 upsample by 2. So, it is at this point that we have this spectrum and now if you wish to construct the spectrum at this point all that you do is to invert the operation of the upsample which you can do. The upsampler is invertible. So, you just stretch this independent variable by a factor of 2. The spectrum of x 1 will look like this and the spectrum at x 2 can similarly be reasoned out. So, spectrum at x 2 will appear like this. So, first we will construct the spectrum at x 2 upsample by 2. We originally had this and this was repeated. This whole structure was repeated at every multiple of 2 pi. So, when we translate by pi, this is going to be reproduced here. So, we will get this pattern here and this is going to be brought here. So, this is the spectrum after upsampling and therefore, if we consider the spectrum just of x 2 it would look like this. Important point to be emphasized at this stage. You see what we need to do is to establish a correspondence between segments of the original spectrum x and the spectra x 1 and x 2 and we shall do that immediately here. So, in fact let us mark out the spectral segments of the original spectrum. Let us call this spectrum or this segment of the spectrum alpha and this segment shall correspond to be called alpha prime or alpha double dash if you like. We call this beta and we call this beta double dash here. So, we have four segments from pi by 2 to pi which is the segment alpha from 0 to pi by 2 which is the segment beta from minus pi by 2 to 0 which is the segment beta double prime and from minus pi to minus pi by 2 which is the segment alpha double and I would like to mark alpha beta beta double prime and alpha double prime in the spectra of x 2 and x 1. Let me do that. Now, you will recall that it is essentially alpha and alpha double prime which has gone into the spectrum of x 2. However, this actually if you recall is alpha double prime it has come from alpha double prime. So, this is alpha double prime here not alpha and similarly this part is actually from here and therefore, this is alpha and not alpha double prime. Of course, there is an expansion there is an expansion of alpha double prime to fill 0 to pi and there is an expansion of alpha again to fill minus pi to 0. On a similar note if you look at the spectrum of x 1 this part of the spectrum here between 0 and pi is actually the spectrum beta. So, this is beta here and beta double prime from the original spectrum has found its place here. Of course, they are again expanded as before. If we mark out the segments of the x spectrum we notice that the high pass segments have of course, gone to the high pass branch, but there has been an important change. You know notionally if you look at the segment alpha this part you know the downward part is actually the higher of the frequencies. This part is the frequencies around pi and this part is actually the frequencies between pi by 2 and 3 pi by 4. On the other hand when we look at the spectrum x 2 what was originally you see in alpha this part actually corresponded to the higher frequencies, but here they have manifested as lower frequencies and this part actually corresponded to the lower side of the frequency which have now been manifested as higher frequencies. So, there has been an inversion of the frequency. Now, one must look at the difference between what has happened in x 2 and what has happened in x 1. You see if you look at x 1 on the other hand and if you focus your attention on the segment beta then this part would actually be the higher of the frequencies and this the lower of the frequencies in beta and as expected if you look back at the spectrum of x 1 here. So, I will flash both the figures I have the spectrum of x 1 here and I have the original segments of the x spectrum here. So, the higher of the frequencies have been retained as the higher of the frequencies here. The lower of the frequencies have been retained as the lower of the frequencies here. So, as far as x 1 goes there is no frequency inversion. As far as x 2 goes there is a frequency inversion. By frequency inversion I mean a reverse of the order of frequencies. As you move from pi by 2 to pi on the original frequency axis in the spectrum of x you are actually going in the reverse direction from pi towards 0 in the spectrum of x 2. Let us make a note of this. It is a very important conclusion we have drawn. So, what we are saying is that as you go from pi by 2 towards pi in x 2 you are actually going from pi towards 0 and therefore there is a frequency inversion. On the contrary when you look at x 1 in x when you go from 0 to pi by 2 in x 2 you are actually going from x 1 you are going from 0 to pi. So, there is no frequency inversion here and this also explains why there is this little asymmetry between the low and the high pass branches. And that is the reason why we had postponed a discussion on this possibility of iterating on the high pass branch for a while. When we iterate on the low pass branch when we subject the decomposed sequence again to low and high pass filtering what we get is intuitively meaningful in the frequency domain. But when we subject the high pass decomposed sequence to low and high pass filtering what we get is a little against our intuition. So, it is like this you know notionally what we are saying is if you start from here the spectrum 0 to pi subjected to the ideal analysis low pass filter here, ideal analysis high pass filter there and down sample by 2 at this step of course you get 0 to pi by 2 in this order 0 towards pi by 2 what you get here is pi by 2 to pi, but in the reverse order. So, pi to pi by 2 so inverted not inverted and now if you iterate again. So, this was x 1 of course this is x 2 here when you iterate x 1 which is 0 to pi by 2 subjected to the ideal analysis low pass, ideal analysis high pass and down sample by 2 what you are going to get here at x 3 and x 4 is going to be as follows. This is going to be the spectrum the original spectrum from 0 to pi by 4 as expected on the other hand what you are going to get here is indeed pi by 4 to pi by 2, but inverted. So, you are going to get pi by 2 towards pi by 4 so there is an inversion here there is no inversion here and the same thing is going to happen in x 2. So, x 2 we are going to begin from pi by 2 from pi towards pi by 2 and when this is subjected to the action of the ideal analysis low pass and ideal analysis high pass followed by a down sampling by 2 what we are going to get here is of course, pi to 3 pi by 4 without an inversion, but there is already been one inversion. So, we have to bear with that so I would not write here not inverted because actually there is already an inversion here then and that inversion is retained here, but interestingly what we get here is going to be what is between 3 pi by 4 and pi by 2, but once again inverted and therefore, we are going to get pi by 2 towards 3 pi by 4 back again. So, it was once inverted and once more inverted and therefore, we get back the spectrum between pi by 2 and 3 pi by 4 without an inversion here and this was once inverted and not inverted here. So, it remains inverted so you know in x 5 and x 6 x 5 here and x 6 here and in x 3 here and x 4 here there is something slightly counter intuitive x 3 is obtained as expected after two steps of low pass filtering low pass filtering with ideal low pass filters of cut off pi by 2, but there is also a down sampling after each low pass filter. What we get at x 3 is very well within our intuition we get the first one fourth of the spectrum. So, as expected when we subject the input to a low pass operation with cut off pi by 2 you are going to get the spectrum between 0 and pi by 2 when you again subjected to a low pass operation with cut off pi by 2 you are going to get half of that spectrum after down sampling. So, as expected here at x 3 we get the spectral component between 0 and pi by 4 on the other hand, but at x 4 we have to reason out you see it is kind of intuitive and kind of not the intuitive part is that you are subjecting the input to a low pass operation first with cut off pi by 2. So, as expected you would have got the spectrum between 0 and pi by 2 now you are subjecting it to a high pass operation between pi by 2 and pi. So, that manifests as taking the second half of the spectrum, but between pi by 4 and pi by 2. So, that part is intuitive the non-intuitive part which has come about as a result of down sampling is that there is an inversion. So, as you see at x 4 we indeed get the spectrum between pi by 4 and pi by 2, but there is an inversion here. So, the inversion has been caused by the down sampling operation a consequence of aliasing. On the other hand if you look at the component in x 2 there is an entirely different story you know in x 2 we already have a frequency inversion here. Now, x 2 has been obtained by high pass filtering. So, of course as expected it takes the spectrum between pi by 2 and pi. Now, we would have expected that after low pass filtering we should have got actually the lower of the of the frequencies between pi by 2 and pi. So, we should have got the frequency between pi by 2 and 3 pi by 4 after the low pass branch. We would have intuitively expected that, but what we actually get as you see is the components between 3 pi by 4 and pi and also inverted. So, this is kind of counter intuitive on two counts. It is counter intuitive because what you are getting after high and low pass filtering is not the spectrum between pi by 2 and 3 pi by 4, but the spectrum between 3 pi by 4 and pi also inverted. And then again on the high pass branch we would have expected that once we have done a high pass operation we should have got the spectra between pi by 2 and pi. And then on one more high pass operation we should have got the higher of the spectral components namely the spectral components between 3 pi by 4 and pi, but on the other hand what we actually get is the components between 3 pi by 4 and pi by 2 or rather between pi by 2 and 3 pi by 4. So, these are the lower of the spectral components and this is again counter intuitive because here we get the lower of the spectral components the components between pi by 2 and 3 pi by 4 and they are not inverted. So, what we get as the spectral components after decomposing or iterating the ideal analysis filter bank on the high pass branch is indeed very counter intuitive. It is counter intuitive on two counts. The low pass after high pass gives you not the lower part, but the higher part of the frequencies. And the high pass after high pass gives you not the higher part but the lower part of the frequencies. What is more the output of the low pass filter here after the high pass initial high pass operation leading to x 2 is inverted and the low pass the high pass followed by high pass is not inverted. So, you know it is a little troubles. Let us summarize the components that we have got it is rather important because you know it is a little counter intuitive, but once we realize that this is happened as a consequence of aliasing. You see in x 2 we are operating entirely on the aliased components. In fact, the down sampling was very important there. It was as a consequence of down sampling that we could subsequently operate the low and high pass filters. Had we not down sampled these aliased components would have not been created and it is on the aliased components that the low and high pass filter operate and that is why this counter intuitive result. Anyway, let us write down these results very, very clearly. So, what we are saying in effect is x 3 is essentially the components from 0 to pi by 4 not inverted. x 4 is the components from pi by 2 to pi by 4 inverted. x 5 is the components from pi to 3 pi by 4 and inverted is the components from pi by 2 to 3 pi by 4 not inverted. If you will have it this essentially is the ideal wave packet transform here. So, in fact, this is one complete step of the wave packet transform, but this is the ideal wave packet transform. We are talking about ideal analysis low pass and high pass filters here. Of course, synthesis is very easy. The filter bank is assumed to be a two channel perfect reconstruction filter bank. So, wherever we put an analysis filter bank we can reconstruct by putting the synthesis filter bank. So, reconstruction from the wave packet transform is not a difficult job at all. All that you do is to put the up samplers followed by the synthesis low and high pass filters and each time you do that you get an annulment of the analysis part. So, here we put the whole analysis structure twice once and then once again on after down sampling. If you put the synthesis structure once you would get x 1 and x 2 I mean once if you put the synthesis structure once on x 3 and x 4 you would get x 1. If you put the synthesis structure once on x 5 and x 6 you would get back x 2. Once you have x 1 and x 2 if you put the synthesis structure back on x 1 and x 2 you get back the original spectrum x. So, reconstruction from the wave packet transform is not difficult at all. Let us for completeness write it down so that we do not make a mistake. What we are saying is if you take x 3 and x 4 and if you up sample and put the ideal analysis low pass filter here, ideal analysis high pass filter here you would get almost x 1 actually half x 1. And similarly if you take x 5 and x 6 and put back the ideal synthesis structure you would get back half x 2. Now, you do not note that I have written I a l here I a h here as also here I did not need to use a separate ideal synthesis low pass the same as the ideal analysis low pass. So, the same ideal filters came back here and once of course you have half x 1 and half x 2 available to you you can reconstruct x back again there we are simple. So, reconstruction from the wave packet transform is no trouble at all of course when it is ideal. In fact, even if it is not ideal if we have a perfect reconstruction synthesis filter bank we have the job done. Now, what happens if we apply this structure to the Haar MR we need to look at that little more carefully you know that would involve the following things. It would involve understanding what are the basis functions when we extend this to the Haar MR. Let me explain what I mean here what I am saying is this you know when we made a decomposition of v 1 into v 0 and w 0 the basis functions in v 1 are phi 2 t minus n, n over all the integers the basis functions in v 0 are phi t minus n, n over all the integers and the basis functions in w 0 are psi t minus n, psi is the Haar wavelet. In fact, this is nothing specific to Haar in any multi resolution analysis if you have the scaling function phi and the wavelet function psi then this is true. Now, let us extend this to two levels of decomposition. So, suppose we had v 2 being decomposed into v 1 and w 1 and then v 1 into v 0 and w 0. Now, here we have phi 4 t minus n. So, I would not keep writing n over all the integers that is understood everywhere. So, this would have the basis functions phi 4 t minus n over all integer n this would have the basis functions phi 2 t minus n over all integer n this would have the basis functions psi 2 t minus n over all integers n this of course, we know what their basis functions are this would be phi t minus n over all integers n and this one would have psi t minus n over all integer n. The question that we are asking is as follows. Suppose, we do happen to decompose this in the wave packet transform then what are the basis functions here and here can those basis functions be obtained by translation of a single so called generating function. So, for example, the scaling functions generate the approximation subspaces the wavelet functions generate the incremental subspaces can we generalize this if we decompose the incremental subspaces can each of them be regarded as being generated by translates of a single generating function. What are these generating functions how do we obtain them from the scaling functions remember we could obtain the wavelet functions from the scaling functions by taking a linear combination of dilates and translates of the scaling function. The Haar wavelet for example, is a linear combination of the Haar scaling function contracted by a factor of 2 can we also obtain these generating functions for these decomposed incremental subspaces in terms of the scaling functions appropriately contracted all these questions need to be answered and we shall answer them in the next lecture. Thank you.