 A very warm welcome to the 12th lecture on the subject of wavelets and multirate digital signal processing. Let us spend a minute on what we had done in the previous lecture. We had looked at the two band filter bank in the previous lecture and we had written down a set of conditions based on what happens when you go past a down sampler and an up sampler in the z domain. So, let us put down the conditions once again or let us in effect put down the relation between the input and the output in the z domain where it is valid to use the z domain which is true in many circumstances. So, let us summarize what we had derived the last time. We said to a two channel filter bank input x n its z transform now I will use this script z to denote the z transform capital X z output Y n with z transform capital Y z now incidentally we suppress the regions of convergence. So, we do not explicitly mention the regions of convergence analysis side h 0 z the so called low pass filter and h 1 z the high pass filter synthesis side g 0 z low pass filter g 1 z high pass filter. So, this is the circumstance of course, you know where the down samplers and up samplers are the relation between Y z and X z is as follows. We have Y z is tau 0 z X z plus tau 1 z X of minus z and recall that we had called this the alias term and therefore, tau 1 z was called the alias system function. I put system function in inverted commas I must emphasize here you know when there is an alias term the word system function is actually a misnomer one should not use the term system function because the system is not linear and shift invariant. On the other hand if tau 1 z is 0 the system becomes linear and shift invariant. So, this is something that we must now take note of tau 1 z equal to 0 is essentially what is called the condition for alias cancellation and we note the system becomes linear and shift invariant. Now, we had looked at one possibility under which tau 1 z could be 0 and we had said the most general possibility can be accommodated by what is called a cancelling term R z let us put that down again. We said tau 1 z is essentially the function or the expression half g 0 z h 0 minus z plus g 1 z h 1 minus z and tau 1 z equal to 0 means essentially that g 0 z by g 1 z must be minus h 1 of minus z divided by h 0 of minus z and the simple case is equate the numerator and denominator. So, equate if you equate the numerator you get g 0 z is plus minus h 1 minus z and g 1 z is correspondingly minus or respectively plus h 0 minus z. We had also interpreted these expressions in the ideal case if h 0 z for example, was the ideal low pass filter then this would become an ideal high pass filter as we expect and if h 1 is the ideal high pass filter this would become the ideal low pass filter all with a cut off of pi by 2. So, in that sense we have a need interpretation for the ideal case even if the filter is not ideal we have a reasonable interpretation in the sense that we could always take this to be a non ideal low pass filter with a cut off of pi by 2 and this would again become a reasonably close filter high pass with cut off pi by 2 and vice versa for this. If this is a high pass filter with cut off pi by 2 then this becomes a reasonable low pass filter with cut off pi by 2 whatever it be. Let us now of course, consider the second condition you see this is Elias cancellation with Elias cancellation we are assuming that there is linear linearity and shift in variance in the system there is a linear shift in variance system there what is the system function there if tau 1 z is equal to 0 then you have y z is equal to tau 0 z x z and we are saying effectively that tau 0 z is the system function in the true sense. So, this is an LSI system with system function tau 0 z. Now, you see one of the things that one needs to worry about is what should tau 0 z be tau 0 z is also modifying experience for the input and ultimately we want decomposition and reconstruction. So, in reconstruction we want except to be almost the same as y z if not quite if not identical at least they must be tolerable changes what are these tolerable changes that we can allow or more appropriately what can we and what should we tolerate here that is what we need to think about what can be and what should we tolerate well if we are talking about time systems then we have to tolerate a delay first let me explain this intuitively and then let me put it down mathematically the filter does some processing it takes some time to process at the analysis side and at the synthesis side. Now, you need finite time to process at the analysis side you need finite time to reconstruct at the synthesis side. So, if you want no other change between the input and the output at least you have to accept the change of a delay to allow for some time to process. So, if we do not want any other change at least we should allow for a term of the form z to the power minus d in tau naught z the other thing that we do not mind allowing is an overall multiplicative constant after all we do not mind if the whole input sequence is multiplied by some constant c because we can always multiply by 1 by c at the output it is a simple operation to do a simple amplifier or attenuator that is not very difficult to do. So, we do not mind if the whole LSI system that we have here after Elias cancellation multiplies by a constant and delays by d and that is exactly what we shall now put down mathematically. So, we are saying in a perfect reconstruction system we allow we should say we allow tau 0 z to be of the form some constant times z raise the power minus d is a constant ideally we would have liked tau 0 z equal to 1 for all z essentially an identity system. Now, that would as I explained before make the system non causal. So, this allowance of z raise the power minus d of course, d is positive here is allowed because of causality we will take the example again as I said of the Haar MRA and the filter bank corresponding to the Haar MRA. Once again we will see if we understand the Haar case we understand a lot of things at once. So, let us put down the filters for the Haar case. So, in the Haar case we had the following filters analysts. So, this is H 0 and this is H 1 synthesis you know remember on the synthesis side at that time we had said we will allow for a plus minus ambiguity here. Let us keep that ambiguity and you will see why that ambiguity is needed this is G 0 and this is G 1. Let us write down tau 1 z here tau 1 z by definition is of course, G 0 z H 0 minus z plus G 1 z H 1 minus z and with our definitions of G 0 H 0 G 1 and H 1 we have the right hand side becoming simply half G 0 is 1 plus z inverse H 0 minus z is 1 minus z inverse by 2. Now, here we have a plus minus ambiguity G 1 z is of course, 1 minus z inverse by 2. Now, here we have a plus minus ambiguity G 1 z is of course, 1 minus z inverse and H 1 minus z is 1 plus z inverse by 2. Now, you know when you look at this carefully you notice why we want this ambiguity there we want this to become 0 and therefore, it is obvious that the minus sign should be chosen the plus sign will not give us a 0. So, for Ilias cancellation it is very clear that G 1 z must be equal to minus 1 minus z inverse and not plus. So, therefore, now let us freeze our G 0 G 1 H 0 and H 1 for the hard case and now let us verify the perfect reconstruction condition or verify tau 0 z indeed tau 0 z is obviously G 0 z H 0 z plus G 1 z H 1 z and when we expand this we get 1 plus z inverse the whole squared by 2 minus 1 minus z inverse the whole squared by 2 and this is easy to evaluate essentially gives us half into half and we can use the A plus B into A minus B kind of expression and we have 1 by 4 A plus B is 1 plus z inverse plus 1 minus z inverse and A minus B is 1 plus z inverse minus 1 plus z inverse. So, 2 z inverse and here of course, 2 z inverse and here of course, z inverse cancels and here we have z inverse surviving and all in all this is equal to 1 simple and elegant. In fact, it is 1, but with a factor of z inverse. So, C 0 is equal to 1 and you have a z inverse there. So, the tau 0 z all in all is z inverse what does this mean essentially only a delay of one sum the constants have already been accommodated. So, C 0 becomes 1 now why was this delay required as I said this delay is required on account of causality. If we did not want this delay to be there we would need non causality either on the analysis or on the synthesis side. So, for example, if I do not want this z inverse term I must multiply the output by z in other words I must shift the output backward by one sum that means, G 0 and G 1 would now become non causal filters wherever causality is not an issue. So, for example, suppose we are dealing with spatial data then this is not a problem we can get tau 0 z exactly equal to 1 without the z inverse term, but where causality is an issue as it is when you are dealing with time data then we cannot do this. Now, in fact, in this case let us also dissect the situation and understand a little better. Let us put down the condition that we had written for a Li's cancellation in the specific and simplest case and see if it holds here. So, indeed we had suggested that the simplest possibility of Li's cancellation is when G 0 z is either plus or minus h 1 of minus z and in the hard case we have h 1 z is essentially half 1 plus or 1 minus z inverse rather and therefore, h 1 of minus z would be half 1 plus z inverse. So, you will notice that G 0 z is indeed plus h 1 of minus z, but without this factor of half. Now, you know that factor of half is not an issue at all you remember that more generally we had written down the following requirements. We had said that more generally for Li's cancellation we need G 0 z to be plus or minus some R z times h 1 minus z and G 0 z to be plus or minus G 1 z to be correspondingly minus or plus R z times h 0 minus z and in particular you could choose R z to be a constant. So, in particular for the hard case we have chosen R z to be equal to 2 a constant and in fact I can also check for the second expression G 1 z in the hard case should then be minus h 0 of minus z or rather with a factor of 2 so 2 times and indeed minus 2 times h 0 minus z is minus 2 times half into 1 minus z inverse which is correct. So, things have all fallen into place it is convenient I once again point out how beautifully one can understand several concepts at once when one takes the specific example of the Haar. The Haar MRA embeds in it several concepts explained in a simple way but of course we cannot be content with the Haar and we shall slowly understand why. The first step in understanding this is to understand where the Haar is the baby and where we need to grow further why is the Haar is just the beginning of a family of multi resolution analysis in what sense is it the simplest case towards that objective let us look at that low pass filter and that high pass filter from a slightly different perspective what does it do to a certain class of sequences let us see that. Let us put the following question what does the Haar do to constant sequences in other words consider x n equal to some constant say c 1 for all n extreme case how would the outputs of the various points in the Haar filter bank look. So, it is very easy to see that if you take the Haar MRA I would not keep writing the filters again I will just show them symbolically I have h 0 here I have h 1 there and if I take just the analysis side it is very easy to verify that the output here is going to be the 0 sequence in fact I will take just a minute and verify it essentially h 1 z operates 1 minus 0 inverse and this essentially means the operation x n minus x n minus 1 by 2 which is identically 0 for all n. So, this is a very significant observation we are making we are saying on the Haar filter bank if there is any constant component in the input it is destroyed on the high pass branch this is a slightly different way of looking at the Haar filter bank. In fact, now we will go one step further in the Haar filter bank I had one term of the form 1 minus 0 inverse suppose I had two such terms what would happen. So, let us put that down we will consider a cascade of 1 minus 0 inverse terms. So, you know you have a system like this 1 minus 0 inverse fed into 1 minus 0 inverse and so on. We shall now prove a very simple and a very elegant result we shall show that every cascaded every instance of 1 minus z inverse in the cascade reduces a polynomial sequence to 1 degree lower. So, you know I am looking at the situation from a slightly different perspective now I am not talking about frequencies or sinusoids anymore I am saying suppose you think of an input sequence as having polynomial components. Now, where on earth do you encounter a polynomial kind of expansion well we know about the Taylor series after all the Taylor series is essentially a polynomial expansion of an input and when we make a polynomial expansion of the input and we subject a few terms in this polynomial expansion to the action of 1 minus 0 inverse we have an interpretation that we are talking about here. So, you know visualize a region in which you are talking about the sequence being and you know. So, let the sequence for example come from an analytic continuous function and let then that function be expanded in a Taylor series around a certain point which means you have polynomial terms. Now, let those polynomial terms be subjected to the action of this cascade of 1 minus 0 inverse that is the situation in which we should visualize ourselves it is a different way of expanding an input anyway. So, putting that context in perspective coming back to the polynomial. So, we will show that if I feed any polynomial of the form say a 0 n to the power of capital M plus a 1 n to the power m minus 1 and so on up to a m which is a polynomial input sequence every time we subject this polynomial to 1 1 minus 0 inverse what is going to happen? So, let subject it to 1 first time we subject it we are doing this happening in this process it is very clear that when we expand this the coefficient of n to the power of m is easy to evaluate it is essentially a 0 I mean you know you know have the term a 0 n raise the power of m coming from here and the term a 0 n minus 1 to the power of m which contributes the coefficient of n raise the power of m here and that coefficient is again a 0. So, a 0 minus a 0 which is 0. So, that is interesting each time we subject this polynomial sequence to the action of 1 minus 0 inverse we are reducing the degree of the polynomial by 1. In fact, let me illustrate this by taking a sequence which is polynomial of degree 1 and let us subject it to the action of this filter. So, you have essentially something like say let us take a concrete example. So, let us take 3 times n plus 5 and let us subject it to the action of 1 minus 0 inverse to fix our ideas what emerges here is essentially 3 n plus 5 minus 3 n minus 1 plus 5 and that is easy to evaluate it is essentially 3 n plus 5 minus 3 n plus 3 minus 5 and that is just 3 for all n. So, you have brought the degree of the polynomial down by 1 you had a degree 1 polynomial now you have a degree 0 polynomial that is exactly what happens for any degree polynomial. So, what we just showed a minute ago and I will put back that discussion is that the coefficient of the highest power n to the power m vanishes. Therefore, when this sequence goes into z raise to the power minus 1 minus 1 or 1 minus z inverse. So, to speak you only have n raise to the power m minus 1 and lower degree terms left. So, now, we have just proved a simple lemma each instance of 1 minus z inverse brings the polynomial degree down by 1. So, in other words in a certain sense the more 1 minus z inverse terms you have and by the way we will soon see these terms are going to be on the high pass branch not on the low pass branch you know 1 minus z inverse when we substitute z equal to e raise to the power of j omega vanishes at omega equal to 0 let us verify them. So, when we take 1 minus z inverse and substitute z equal to e raise to the power j omega we get 1 minus e raise to the power j omega and when we put omega equal to 0 we get this is equal to 0. So, in other words this is 0 d c. So, to speak 0 at 0 frequency 0 response at 0 frequency this cannot possibly be low pass in its behavior. So, it must be high pass in other words if you do want terms of this kind 1 minus z inverse they must only be present in the high pass filter they cannot be terms present in the low pass filter otherwise you know you would have a 0 response at 0 frequency ridicules for a low pass filter. In fact, what we are now going to build up is a whole family of multi resolution analysis in which you have more and more 1 minus z inverse terms in the high pass branch and that is in fact very well known as what is called the do bash family in multi resolution analysis. So, let us write that down we now intend to build what is called the do bash family you know this name is actually the name of a mathematician scientist whatever you might want to call her and the full name is this I believe this is correctly pronounced as do bash, but I could be wrong I think we could just probably say the overseas and be content. So, anyway we now intend to build the do bash filter banks. So, do bash MRAs and the feature of these do bash MRAs is that as we go to senior members of the family as we go to increasing seniority there are more and more 1 minus z inverse terms. So, on the high pass branch we are effectively canceling or killing higher and higher order polynomials. So, the other way of looking at it is if you are canceling or killing them on the high pass branch they must go to the low pass branch. So, we are retaining more smoothness on the low pass branch that is another way of looking at it and in addition to doing this we also want the same kind of analysis and synthesis filters. So, all this together leads us to a special class of filter banks which we shall now put down explicitly and these filter banks are called conjugate quadrature filter banks. So, we are looking at one class of what are called conjugate quadrature filter banks. Now, the describing equations of these conjugate quadrature filter banks are very simple we start from the Elias cancellation condition. The Elias cancellation condition says g 0 z needs to be essentially h 1 of minus z and we have the freedom to put plus or minus here. Similarly, g 1 z needs to be correspondingly minus or plus h 0 minus z. Now, taking inspiration from the Haar let us take the following choice g 1 z is minus h 0 minus z and therefore, g 0 z is equal to minus h 0 minus z. Now, g 0 z is then plus h 1 of minus z. Now, you know we will keep away the factor of 2 for the moment because after all that factor can be absorbed in the c 0 that we have allowed. So, with this substitution what do we get? The tau 0 z then of course, tau 1 z is identically 0 by construction, but tau 0 z takes the following form then tau 0 z takes the form half g 0 z which is essentially h 1 minus z times h 0 z plus minus h 0 minus z times h 1 z. So, we have an interesting situation here. We have this h 0 z h 1 minus z product you know h 1 z is essentially a high pass filter h 1 minus z therefore, essentially becomes or aspires to become a low pass filter with a cut off of pi by 2. So, here you essentially have a cascade of two low pass filters with cut off pi by 2 and correspondingly this becomes the cascade of high pass filters with cut off pi by 2 and you are effectively saying that the overall system function with this cascade of low pass filters of cut off pi by 2 and this pair of high pass filters with cut off pi by 2 must go towards a perfect reconstruction situation that is the interpretation of this equation here. So, we now focus on h 1 z you see if we look at the Haar once again there is a relation between h 0 and h 1. In fact, what we are trying to say is we of course, need to relate the synthesis to the analysis for the purpose of alias cancellation, but now we have a perfect reconstruction requirement. So, we want this tau 0 z to essentially go to a delay and a multiplying constant. Now that means you need a relation between h 1 and h 0 and one simple thing to do is to make h 0 z related to h 1 minus z that is what we have actually done in the Haar. If you look at it carefully in the Haar case h 1 minus z is essentially 1 plus z inverse by 2. So, you know h 1 minus z and h 0 z are very closely related. Now let us generalize this. In fact, the only catch is you know we will later on need to make a little adjustment here. So, at this moment even if we simply accept h 1 minus z to be equal to you see in the Haar case this is equal to h 0 z, but we may need to make a little adjustment here. So, what we will do is we shall in general note that h 1 or other h 0 should be related to h 1 minus z. So, in the Haar case they are equal, but in general we will ask for a relation a very close relationship. The other way of saying it is that if you replace z by minus z in h 0 you should get the h 1. So, what we are saying is choose h 1 to be derived from or to be slightly modified from h 0 of minus z modified in what way. So, in fact you know here again there is a little bit of an issue. What I am now going to do is to put down a choice for h 1 by knowledge or by an exposure to the filter banks that I have and justify it later. So, you will have to bear with me for a little while not too long may be just about a lecture. I shall put down the choice here I shall partially justify the choice in this lecture and completely justify the choice in the next lecture where we once again look at the whole system in total. So, let us choose h 1 z not to be h 0 of minus z, but h 0 of minus z inverse and we will also allow for the possibility of a z raised to power d here. So, we will say minus t we will allow for this possibility. If we do that in fact we can verify for the case of h it is very easy for the hr case. Let us take z inverse times h 0 of minus z inverse and indeed h 0 of minus z inverse for the hr case is essentially 1 minus z by 2 and then it will be equal if I take z inverse times h 0. So, if I multiply this by z inverse multiply both sides by z inverse I have essentially z inverse minus 1 by 2. So, we are doing well now let us make this the most general case. So, we will consider h 1 z to be of this form z to the power of minus t h 0 minus z inverse and write down the tau 0 z for this tau 0 z would become half then h 0 z h 1 of minus z. So, h 1 of minus z becomes minus 1 raised to power minus d times h 0 z inverse. Now, minus you see you have g 0. So, again now you have g 0 and let me put back the expression for you just for convenience. We want tau 0 z to be this h 1 minus z times h 0 z for which we have this term h 0 z into h 1 minus z. So, you have z raised to d there and minus h 0 minus z times h 1 z and h 1 z we have accepted to be z raised to power minus d times h 0 minus z inverse. So, we have z raised to power minus z inverse. Now, what we intend to do in the next lecture is essentially to look at this expression. So, we have h 0 z h 0 z inverse here, h 0 minus z h 0 minus z inverse there, the z raised to power minus d terms there and of course, you have a minus 1 raised to power minus d here and a minus 1 here. We need to choose d strategically it is clear and then we also need to put some conditions on h 0. So, this indeed becomes a perfect reconstruction situation. We shall complete this in the next lecture and take it further from there. Thank you.