 A warm welcome to the 28th lecture on the subject of wavelets and multirate digital signal processing. Let us spend a minute or two in recalling what we did in the previous lecture. We had in the previous lecture briefly introduced the need for thinking out of the box in the context of multi resolution analysis. Specifically, we had introduced some variants of the idea of multi resolution analysis and these variants that we had talked about where one where we do not insist on the synthesis and the analysis filter banks to be the same or for that matter we do not insist on an orthogonal filter bank. The second where we do not insist on iterating only on the low pass branch and third where we do not insist on FIR filters. Today we shall explore in greater depth the possibility of allowing different analysis and synthesis filter banks and in fact related to that is the idea of having different length low pass and high pass filters. After we complete our discussion on one such filter bank which has been accepted in the standards we shall also make it clear why such filter banks are attractive. So, with that then let us proceed to the main theme of the lecture today. You will recall that in the previous lecture we had briefly introduced the one the recent standard for data compression called JPEG 2000 joint photographic experts group standards introduced around the calendar year 2000 and we were going to talk about what is called the 5 3 filter bank and associated with it what is called the spline multi resolution analysis. Well just to put back a few points that we had talked about towards the end of the previous lecture we had seen that we could extend the dilation equation constituted for the R MRA namely phi 0 t is phi 0 2 t plus phi 0 2 t minus 1 by convolution with itself to get phi 1 t is half phi 1 2 t plus phi 1 2 t minus 1 plus half phi 1 2 t minus 2 and we had noted that if we look at the coefficients of this dilation equation diadic dilation equation. The coefficients essentially represent the filter half 1 plus z inverse the whole squared and in fact, phi 1 t is piecewise linearly. Now, an important observation is that as we convolve phi 0 t with itself repeatedly we seem to get piecewise polynomials of higher and higher degree and this notion of piecewise polynomial of higher and higher degree is what is captured in the word spline. So, let me put down a not so formal, but a reasonably clear definition of the word splines. Spline are polynomial pieces or piecewise polynomial functions. In fact, to be more precise they are piecewise polynomial interpolants functions that interpolate that join that complete in between samples using piecewise polynomials and as you can see there is a generalization here from the idea of piecewise constant approximation with which we began the discussion on the higher multi resolution analysis. Now, we also noted the shortcoming of phi 1 t. The shortcoming of phi 1 t is that it is not orthogonal to all integer translates. I must make one thing clear here phi 1 t is of course orthogonal to integer translates where the integers are multiples of 2. Let me sketch phi 1 t for you once again phi 1 t looks like this and it is of course orthogonal to phi 1 t minus m for m greater than 2, but it is not orthogonal to phi 1 t minus 1 and that is the catch point or that is the shortcoming here. When we say orthogonal to all integer translates we mean all integer translates we cannot excuse one, but then you know we will see after a while that although we cannot excuse that one integer translate where it is not orthogonal we can indirectly incorporate it to build a different paradigm of orthogonal multi resolution analysis, but that is a more difficult exercise. We agreed towards the end of the previous lecture first to take a slightly out of the box approach not to insist anymore on orthogonal multi resolution analysis and we shall take that approach first. In other words let us put down one of the low pass filters either on the synthesis or the analysis side to be exactly the filter that constitutes the coefficients of this dilation equation. Let us consider a filter bank a two band filter bank just to recapitulate some of our ideas what we are saying is we have this two band filter bank where the low pass filters are H 0 z and G 0 z on the analysis and synthesis sides respectively and the high pass filters are H 1 z and G 1 z again on the analysis and the synthesis sides respectively in here out there. So, what we are saying is let without loss of generality G 0 z equal to 1 plus z inverse the whole square. Now, I must before I proceed make an important remark about perfect reconstruction filter banks you know the question is we have chosen G 0 z to be 1 plus z inverse the whole square we could have as well chosen H 0 z to be 1 plus z inverse the whole square. An important question that we must answer is if I interchange the analysis and the synthesis side what difference does it make? Now, to answer that question let us look at the requirements of aliasing cancellation and perfect reconstruction. The aliasing cancellation requirement essentially says G 0 z H 0 minus z plus G 1 z H 1 minus z is 0. Now, if we replace it by minus z we would get H 0 z G 0 minus z plus H 1 z G 1 minus z is equal to 0. Now, let us keep this as one of our observations and take the second observation now namely that of the perfect reconstruction condition. The perfect reconstruction condition says G 0 z H 0 z plus G 1 z H 1 z is essentially of the form a constant and then a delay. Now, here we can interchange G and H as you notice in other words we could say H 0 z G 0 z plus H 1 z G 1 z is the same thing trivially true and now if I combine these two observations that I have made you will notice that this equation is an aliasing cancellation equation for the case when you have interchanged the analysis in the synthesis side. So, here the synthesis low pass filter has become the analysis low pass filter and the synthesis high pass filter has become the analysis high pass filter and this then becomes the aliasing cancellation condition for this interchanged filter bank. As far as the perfect reconstruction condition goes we do not need to do anything at all it is already an interchanged condition. So, if H 0 where the synthesis low pass and G 0 the analysis low pass and correspondingly if H 1 where the synthesis high pass and G 1 the analysis high pass we would still have this perfect reconstruction for this rearranged or exchanged two band filter bank as the case is and therefore, we have a very important conclusion that we draw here. Once the perfect reconstruction conditions are satisfied in a two band filter bank analysis and synthesis filters can be exchanged to give another perfect R P R stands for perfect reconstruction perfect reconstruction two band filter bank. A very important observation because it tells us that it is not so critical it is not so important which pair of filters we put on the analysis side and which pair of filters we put on the synthesis side as far as perfect reconstruction goes. But there is a subtle point here and that subtle point is if you look at the low if the low pass filters happen to be different on the two sides and if you use the low pass filters to construct a dilation equation a dyadic dilation equation I mean the coefficients of the low pass filter could be thought of as representative of the coefficients of a dilation equation that operates on the scaling function. So, if you visualize the two different scaling functions that come out of the analysis and the synthesis side it is quite possible that one of them is quote unquote smoother than the other and in that case one might want to decide which scaling function to put on the analysis side and which one to put on the synthesis side. A broad guideline is that it is desirable normally to put the smoother function on the synthesis side because if one uses smoother functions to synthesize one would get more appealing reconstruction after quantization that is an aside, but an important observation. But coming back to this spline filter bank that we are now going to build let us consider a two band filter bank as we have here with g 0 z as it were equal to 1 plus z inverse the whole square. Now, we shall take the alias cancellation equation first and we shall insist initially only unsatisfying the alias cancellation equation which tells us that g 0 z h 0 minus z plus g 1 z h 1 minus z is equal to 0. Now, we can rearrange this as you know to the following equation g 0 z by g 1 z is minus h 1 minus h 1 minus h 1 minus h 1 minus h 1 minus h 1 minus z by h 0 minus z and one simple choice to ensure alias cancellation is to choose numerator equal to numerator here and denominator equal to denominator and that is exactly what we shall do. We shall choose g 0 z equal to minus h 1 minus z and g 1 z is equal to minus h 0 minus z and therefore, the equations that we would get now we want to write all the equations in terms of g 0 and h 1 because once we know g 0 we know h 1. So, therefore, in our discussion here we would have minus h 1 minus z is 1 plus z inverse the whole square from here and therefore, we would have h 1 of z is minus of course, take the minus sign on the other side and replace z by minus z. So, 1 minus z inverse the whole square this is what we have. Now, we write down the perfect reconstruction condition as well. The perfect reconstruction condition says g 0 z h 0 z plus g 1 z h 1 z is a constant and a delay and we know h 1 and we know g 0. We are required to find h 0 h 1 minus and g 1. Here again we know that g 1 can be expressed in terms of h 0 in fact, we have the expression here. So, let us make a substitution of g 1 in terms of h 0 we essentially wish to obtain h 0. So, making this substitution we would have g 0 z h 0 z plus h 0 minus z well h 1 z, but h 1 z can again be expressed in terms of g 0 z. So, we leave it like that we know it is c 0 z raise the power minus t. In fact, let us write down h 1 in terms of g 0 notionally first. So, you know if you recall g 0 z is minus h 1 of minus z. Now, of course, we have an explicit expression for h 1, but what I wish to do is to bring out a property of this product here g 0 h 0 by making an explicit substitution. So, let me take h 1 z and rewrite it in terms of g 0 z. So, h 1 z would clearly be minus g 0 minus z and we can make that substitution here. So, we will substitute h 1 by minus g 0 minus z and all in all we then have something very interesting in terms of the samples of this product. So, now again we have a situation where we have a product of z transforms and then the same product of z transforms with z replaced by minus z. Let us see what we have here. So, you notice we have g 0 z h 0 z minus g 0 minus z h 0 minus z is essentially a constant and a delay. And if we choose to denote g 0 z h 0 z by another kappa 0 z, what we are saying in effect is kappa 0 z minus kappa 0 minus z is essentially a constant and a delay. And recall that this operation kappa 0 z minus kappa 0 minus z essentially brings up the odd samples and destroys the even samples. So, kappa 0 z minus kappa 0 minus z is c 0 z raise the power of minus t means that if we kill the even samples in the inverse z transform of kappa 0 z. So, we first kill the even samples because of this operation kappa 0 z minus kappa 0 minus z. And out of the remaining odd samples only one is non-zero and that is captured in this c 0 z raise the power of d. The c 0 z raise the power of d is the z transform of essentially the inverse z transform of kappa 0 with all the even samples killed and the odd samples left. That means among the odd samples the d th sample is equal to c 0. In fact, we can say something specific here we can say the d th sample is equal to c 0. And now our whole exercise is to impose this condition on the product kappa 0 z raise the power of minus h 0 z g 0 z amounting to kappa 0 z. Now to do that let us of course, recognize that we have too much of freedom here. In imposing Elias cancellation we have put down only two conditions we have constrained one of the filters. The other low pass filter is free for us to choose, but we must choose it strategically. Now you will recall the importance of the factors 1 plus z inverse or their higher powers. A factor of the form 1 plus z inverse ensures a 0 at z equal to minus 1 or e raise the power j omega equal to minus 1 or omega equal to pi. So, on the unit circle we are putting a 0 a null at pi pi or minus pi that is not an issue. Now this as you recall is one of the sufficient conditions to ensure that when we iterate such a low pass filter to produce a scaling function that iteration converges to a quote unquote smooth scaling function. So, it is one of the conditions that ensures what is called regularity of the iterated scaling function. In our choice of g 0 z we already have two factors 1 plus z inverse the whole squared. If we wish to bring at least some degree of symmetry on the analysis and synthesis side although we do not intentionally wish to bring complete symmetry only a little bit of symmetry. At least we can ensure that they have the same degree of regularity the same degree of smoothness in iteration. And therefore, we shall choose h 0 z also to have 2 0s at z equal to minus 1. In other words we shall choose h 0 z to have a factor 1 plus z inverse the whole squared. Now what we wish to do next is to look for the minimum possible solution which we can get to satisfy perfect reconstruction. So, as is always the case we start very parsimoniously very stingily we want to construct kappa 0 z. Now we already know that we have a 1 plus z inverse squared corresponding to g 0. We have a factor of 1 plus z inverse the whole squared in h 0 and we wish to introduce just as many additional 0s in h 0 as are required to satisfy the perfect reconstruction condition. And by the by one of the shortcomings of an orthogonal filter bank. In fact, if you look at the Dabash series of orthogonal filter banks of that matter if you look at the very conditions on perfect reconstruction and iris cancellation when we look at the filters in orthogonal filter bank. One can with a little effort it is a slightly difficult exercise, but with a little effort one can show that one cannot possibly get what is called linear phase. In other words the impulse response cannot possibly be symmetric I will give you a hint why that is so. For a symmetric impulse response in a finite impulse response filters the 0s must occur in reciprocal pairs. So, for every 0 inside the unit circle there must be a 0 outside the unit circle. Now this kind of a choice of reciprocal pair of 0s is just not possible when we construct the low pass filter in an orthogonal filter bank. I shall not dwell any further on the proof of why this is not possible or why this is true, but this is the central reason why one cannot get linear phase in an orthogonal filter bank beyond the very trivial and simple case of h r where the 0 lies on the unit circle. So, it is 1 plus z inverse there and 1 minus z inverse for the high pass filter 0 lies on the unit circle, but for any higher order multi resolution orthogonal analysis one just cannot get linear phase. And this is one of the reasons why as I said we wish to think out of the box we do not wish to confine ourselves to orthogonal multi resolution analysis. We would like to explore other options that is what we are doing here. So, if we do wish to bring in that additional degree of freedom we wish to explore the possibility of bringing in in such a way that linear phase can be ensured. So, what we shall do now is to introduce just one more degree of freedom in constructing h 0 in such a way that linear phase is maintained. In other words that the impulse response continues to be symmetric. So, parsimoniously in informal language stingily extending h 0 z to retain symmetry we shall therefore introduce as I said just one parameter. So, we will introduce a factor 1 plus h 0 small h 0 z inverse plus z raise the power minus 2. So, what I am saying is retain symmetry this is a symmetric factor and the only degree of freedom is this. And therefore, we have h 0 z is essentially 1 plus z inverse the whole squared times 1 plus h 0 z inverse plus z raise the power minus 2. Now, I am a couple of remarks you know in retaining symmetry I could have used the same constant let us say h 1 here and here and kept a constant h 0 here. So, apparently I would have had two degrees of freedom, but this factor h 1 here essentially scales the whole filter by a constant. Now, I am not really interested in scaling you know I could scale all the impulse responses by appropriate constants and thus change the constant c 0 that is not going to materially affect the nature of my filter bank. So, I am introducing only so many degrees of freedom as give me something novel in terms of nature of frequency response not in terms of the scaling constant c 0 which I can always adjust in the end. So, therefore, keeping only this degree of freedom here let us now impose the condition on g 0 h 0. Let us now consider the product g 0 h 0 and that product is going to be g 0 z h 0 z given by 1 plus z inverse the whole squared times 1 plus z inverse the whole squared times 1 plus h 0 z inverse plus z raise the power minus 2 and let me expand this 1 plus z inverse the whole squared times this is 1 plus z inverse the power 4. So, let me first expand 1 plus z inverse the power 4 essentially 1 plus 4 z inverse plus 6 z raise the minus 2 plus 4 z raise the power minus 3 plus z raise the power minus 4 and now I shall use the convenient notation of coefficients only. So, when I multiply this factor by the factor 1 h 0 1 you know. So, let us use this representation. So, I have 1 4 6 4 1 convolved with essentially you are multiplying 2 by 2. Z transforms amounting to convolving the sequences it would give me essentially 1 4 6 4 1 h 0 4 h 0 6 h 0 4 h 0 and h 0 and back again 1 4 6 4 1 and when I add them I have 1 minus 4 plus h 0 1 plus 4 h 0 plus 6 and you have 8 plus 6 h 0 1 plus 4 h 0 plus 6 4 plus h 0 and 1. This is the 0 h sum and therefore, you have the even samples here the second sample here fourth sample here the sixth sample here. We are not worried about the even samples we are going to kill them anyway in kappa 0 z minus kappa 0 minus z. What worries us is the odd sample let us mark them and we are required to retain only one odd sample. How can we do that? Notice that these are essentially the same sample. So, if I anal this sample I have achieved my objective essentially if we make 4 plus h 0 equal to 0 in other words h 0 equal to minus 4 we have retained only one odd sample. And therefore, let us make precisely that choice h 0 equal to minus 4 and therefore, h 0 z is essentially 1 plus z inverse the whole squared times 1 minus 4 z inverse plus z raise the power minus 2. Now, let us look at the degree of h 0 here h 0 z can be of course, expanded now you know we will use the same strategy we will convolve 1 to 1 convolved with 1 minus 4 1. So, we have 1 to 1 minus 4 minus 8 minus 4 and 1 to 1 1 minus 2 minus 6 minus 2 n 1. This is the impulse response of the other low pass filter as you notice again symmetric. And therefore, h 0 z would turn out to be 1 minus 2 z inverse minus 6 z raise to the minus 2 minus 2 z raise to the power minus 3 plus z raise to the power minus 4. Now, what we have just arrived in this discussion is a very important bi orthogonal filter bank. Let us look at the length of the impulse response of h 0. Obviously, the length is 5 and let us look at the length of the impulse response of g 0. Let me put down g 0 for completeness here. Obviously, the length of the impulse response is 3. So, let us write that explicitly length 5 and length 3 and that is precisely the reason why this filter bank that we have just arrived this perfect reconstruction filter bank that we have just brought out in this discussion is called a 5 3 filter bank. This is the celebrated 5 3 filter bank in JPEG 2000. Now, you know JPEG 2000 admits two kinds of filter banks a 5 3 filter bank and a 9 7 filter bank and now we know what 5 3 and 9 7 mean. They essentially refer to the lengths of the impulse responses. 5 3 means the impulse responses are of lengths 3 and 5. Now, which impulse responses as you can see you could think of them as the impulse responses of the two low pass filters or you could think of them as the impulse responses of the two high pass filters. It does not matter. You could also think of them as the lengths of the impulse responses of the analysis filters or the lengths of the impulse responses of the synthesis filters. In fact, let us put it down explicitly what the lengths are in this 5 3 filter bank. So, in the 5 3 filter bank as you recall h 0 has a length 5, g 0 has a length 3. Now, if this has a length 5 then the high pass filter on the synthesis side would also have a length 5 and if this has a length 3 the high pass filter on the analysis side would also have a length 3, analysis synthesis. So, this is the length distribution in a JPEG 2005 3 filter bank. Now, you know let us put down explicitly all the filters in the JPEG 2005 3 filter bank and for that let us just recall the relationships. We had g 0 z is minus h 1 of minus z. In other words h 1 z is minus g 0 minus z and therefore, h 1 z is going to turn out to be minus 1 minus z inverse the whole squared. Further g 1 z is h 0 of minus z and that would turn out to be 1 you know. So, wherever you have odd powers of z inverse the signs are going to get reversed. So, 1 plus 2 z inverse minus 6 z raise the power minus 2 plus 2 z raise the power minus 3 plus z raise the power minus 4. This is the high pass filter. You know in fact if you care to look at the impulse response and if you add up the impulse response coefficients 1 2 minus 6 2 and 1 you can see their sum is 0 and that is to be expected. After all the impulse response of a high pass filter which has a null at 0 frequency as many good high pass filters have must sum up to 0. It is very often the case that a high pass filter has its impulse response summing to 0 indicating that it has a null at 0 frequency and that is true in this case as well. In fact here the high pass filter has a double null at 0 frequency because it has a factor of 1 minus z inverse the whole squared. Anyway that a part we have now put down very clearly what the impulse responses are on the entire 5 3 jpeg 2000 filter bank. The aim of this exercise was to show you how one builds what is called a bi orthogonal filter bank and I wish to spend some time on discussing this notion of bi orthogonality. You know in the axioms of a multi resolution analysis we had put one of the axioms to be the scaling function must be orthogonal to its integer translates. Now if you construct the axioms with a scaling function from g 0 here namely phi 1 t that piecewise linear triangular function that we started with in this lecture it is obviously not true for that scaling function. So this g 0 by itself is not going to give us an orthogonal multi resolution analysis. What is the slight generalization that we need to make here then? Well the generalization is in terms of dealing with a pair of scaling functions. So you have one scaling function emerging from the synthesis side and one scaling function emerging from the analysis side from g 0 and from h 0. The orthogonality is actually when you take them together and so as to explain the idea little better let me start from a two dimensional space. You know in a two dimensional space if you have two orthogonal unit vectors let us say u 1 cap and u 2 cap then this forms an orthogonal system by itself. But suppose you do not have two orthogonal vectors you have a u 1 cap and a u 2 cap like this. They are unit vectors but not orthogonal. However of course they are linearly independent. Obviously these two unit vectors u 1 cap let us call them u 1 till day cap and u 2 till day cap. u 1 till day cap u 2 till day cap do form a basis in two dimensional space because they are linearly independent. But if I wish to obtain the coordinates so suppose I wish to take any vector let us say x in two dimensional space and I have this pair of unit vectors here u 1 till day cap and u 2 till day cap and I wish to express x as c 1 times u 1 till day cap plus c 2 times u 2 till day cap. How would I obtain the constants c 1 and c 2? I cannot do them by taking the dot product with respect to u 1 till day u 2 till day cap because they are not orthogonal that is the convenience of an orthogonal basis. What I can do however is to construct what is called a bi orthogonal basis. So, I could instead start from this basis u 1 till day cap and u 2 till day cap. Now I could take a vector which is perpendicular to u 2 but not to u 1 and let me show that one. Let me call this v 2 cap. So, v 2 cap is perpendicular to u 2 but not to u 1. Similarly I could have a vector perpendicular to u 1 but not to u 2 maybe this vector let me call it v 1 cap. Now if I were to take the dot product here if I come back to this if I take the dot product of x with v 1 cap here they would be u 1 would go away because of the dot product because of v 1 being perpendicular to u 1 cap but this c 2 would remain and similarly when I take the dot product with respect to v 2 cap here. So, if I take the dot product of x with respect to v 2 cap it would destroy the term of u 2 till day but retain the term of u 1 till day namely I would be able to obtain c 1 by taking the dot product of both sides of this equation with v 2 cap and I would be able to obtain c 2 by taking the dot product of both sides of this equation with v 1 cap and therefore, we say v 1 cap v 2 cap is a bi orthogonal basis a bi orthogonal basis to this basis. In fact, they are mutually bi orthogonal each of them is bi orthogonal to the other and in fact this is the idea that is generalized when one builds a bi orthogonal filter bank. This is one generalization one variant that we have introduced in two band filter banks. In the next lecture we shall introduce another variant. Thank you.