 A warm welcome to the first tutorial session on the subject of wavelets and multirate signal processing in which we begin the exercise of working out a few examples which would illustrate the ideas that we have discussed conceptually in the course. It is important in a course like this firstly to understand concepts in depth and secondly to understand how to apply them in the case of specific examples or situations. Keeping their objective in mind we begin today by taking a tutorial set of examples on some of the basic concepts which we built up towards the earlier part of this course namely the idea of piecewise constant approximation, the idea of the spaces L 2 R L 1 R and so on, the idea of successive approximation across the ladder of subspaces of L 2 R, the idea of incremental information and how it relates to sequences applied to filter banks. So, let me specifically put before you the problem that I shall solve before you today to illustrate some of these ideas. Now, in this session here we are going to consider the following problem consider the functions the following two functions and I am going to draw the two functions before you. Function 1 we shall call x 1 t and it looks like this it is a straight line between 0 and 1 and 0 and minus 1 and symmetry. So, it is easy to see that this function is described by 1 minus modulus of t for t between minus 1 and 1 and 0 else. And we will christen this function we will call it x 1 t we will similarly consider another function for variety we will call it x 2 t and we will define it to lie only on one side of 0. So, we have x 2 of t is e raise the power minus t for t greater than equal to 0 and 0 else. So, we take two examples essentially an example of a discontinuous function and an example of a continuous function. This one the one which we saw earlier was a continuous function although not differentiable and we shall do the ladder analysis the ladder subspace analysis on each of them. So, let us sketch x 2 t also for completeness x 2 t would appear like this 0 until this point and then it rises to 1 and then drops exponential. Now, the first thing that we would like to verify as a tutorial exercise is that each of these functions belongs to L 2 r belongs to the space of square integrable functions although trivial we should complete this exercise to understand the problem completely. So, of course, the first is very easy you see. So, the first the first question or question one if you would like it to be is verify that these belong to L 2 r or these belong to the space of square integrable functions very easy, but let us complete it. In fact, let us make the question a little more in terms of what it asks and let us say find their norms in L 2 r at least that is a little bit of work to do. So, the two problems can be taken together there is no difficulty here. In fact, we can see that the norm square actually of x 1 in L 2 r would be given as the integral over all t mod x 1 t square d t. Now, this is easy to calculate. In fact, looking at the symmetry it is clear that this is two times the integral from 0 to 1 1 minus t the whole squared d t, but then if we make the replacement of variable lambda is 1 minus t. We have this is twice lambda squared minus lambda minus t lambda again lambda would go from 1 to 0, but because we absorb the minus sign it goes from 0 to 1. So, it is a simple transformation I am skipping one step and this is a very easy integral to evaluate. So, this is 2 by 3 this is the norm squared. So, of course, just to complete the discussion we will realize that the norm of this function I must make it clear the norm of x 1 in L 2 r which we write like this squared is 2 by 3 and therefore, the norm itself is square root of 2 by 3 positive square root simple enough. Now, we take the second function we find norm similarly of x 2 squared and that is easy to calculate it is e raise the power minus t squared d t integrated from 0 to infinity and that is an easy integral to evaluate. It is essentially e raise the power minus 2 t d t integrated from 0 to infinity and that is e raise the power minus 2 t by minus 2 from 0 to infinity and that is half. And therefore, it is very clear that the norm of x 2 in L 2 r is 1 by square root of 2 positive square root of 2 this was the easy part of the exercise. So, we of course, you know in calculating these norm we have already verified that the functions belong to L 2 r. Now, we would like to apply the idea of piecewise constant approximation on them. So, let us find the projection of each of these functions on the space v 0 as we know it in the hard multi resolution analysis. So, what we shall do is to look at these 2 functions from the point of view of the hard multi resolution analysis. So, question 2 before us is obtain their projection on the space v 0 in the hard multi resolution analysis. What does it mean to obtain the projections in the space v 0? It means make a piecewise constant approximation on intervals of length 1. And in fact, the standard intervals of length 1 the standard intervals of length 1 are the intervals 0 to 1 1 to 2 2 to 3 and so on. And of course, in the negative side minus 1 to 0 minus 2 to minus 1 minus 3 to minus 2 and so on so forth. Now, if we go back to the function x 1 t we shall see that it is extremely easy to see the nature of the piecewise constant approximation that we would get in other words the projection on v 0. So, x 1 t looks like this and it is all laid out for us. You see it is very easy to see that if I take the standard intervals beyond 1. So, 1 to 2 or 2 to 3 or 3 to 4 and so on ad infinitum there and minus 2 to minus 1 minus 3 to minus 2 and so on ad infinitum backwards the piecewise constant approximation on all of those is 0. So, there is a non 0 piecewise constant approximation only on 2 of the intervals namely minus 1 to 0 and 0 to 1. So, so much so for x 1 t non 0 to 0 projection only in the interval minus 1 to plus 1 and it is very easy to calculate this constant here. So, therefore, the piecewise constant approximation in minus 1 to 0 is equal to that in 0 to plus 1 from the symmetry and it is further very easy to calculate it is simply the average of the function there. It is the average of the function each of these intervals and that is easy to calculate it is essentially again 1 minus t d t integrated from 0 to 1 and it is not at all difficult to see that this is equal to half. So, the average of the function in each of these intervals is half and therefore, we have the following as the projection of the function on the space v 0. So, projection now we will use this notation projection of x 1 t on v 0 looks like this. So, we will we will denote it by p r o j on v 0 of x 1 and it would look like this essentially a constant and equal to half between minus 1 and 1 and 0 else. Now, we shall similarly find the projection of the function x 2 t on the space v 0 and here of course, it is going to be a semi infinite length function. We are going to have non-zero projection values on the positive side of t and 0 projection values on the negative side of t that is easy to see I do not need to repeat the argument for that or the explanation for that. So, you see consider the interval n to n plus 1 consider the standard unit interval. So, the average of the function e raise the power minus t on this interval is easy to calculate it is essentially just e raise the power minus t d t integrated from n to n plus 1 and that is simply e raise the power minus t divided by minus 1 taken from n to n plus 1 and we can easily write this down. It is e raise the power minus n minus e raise the power minus n plus 1 where upon we could extract e raise the power minus n common and there we are. To understand this piecewise constant approximation, let us sketch the constants that we get the approximation would look something like this. So, what I am drawing now is the projection on v 0 of the function x 2. So, I will show a few intervals here of course, the projection is 0 until 0 between 0 and 1 it takes the value 1 minus e raise the power minus 1. So, this height here is 1 minus e inverse and you can get a rough feel of how much that is that is about 1 minus 1 divided by 2.7 or something of the kind. So, one can get a good feel of how much this should be. Now, after that the constants in the standard intervals decrease exponentially. So, let me call this value alpha then this is going to be e raise the power minus 1 times alpha here. So, about 1 by 2.7 times alpha. This is going to be e raise the power minus 2 times alpha. So, each time you are going to multiply by an additional e inverse. So, it is going to be an exponentially decaying series of constants here and this indeed is the projection. Now, just for completeness we must verify that this indeed belongs to L 2 R as well though it is not surprising it must, but just to fix our ideas just to understand that we are doing things correctly. Let us verify that this again belongs to L 2 R indeed the integral over all t of this projection magnitude square d t is going to be e raise the power minus n 1 minus e inverse 1 minus the whole squared integrated with respect to t from 0 to 1 let us say or from n to n plus 1. Essentially over unit interval note that this is nothing to do with t here. So, integrated over unit time could be 0 to 1 anywhere else and this is summed over all n all positive n. So, it is very easy to see what this is. This is essentially summation over n going from 0 to infinity e raise the power minus n 1 minus e inverse the whole squared multiplied by 1. Now, that is a very easy integral to very easy summation to evaluate. It is very easy to see that this is a geometric series here and that is what I meant when I said that if you look at the constants they form an exponential sequence on their own. Incidentally this is something that I wish to draw one's attention to in the context of exponentials. Even on projection of an exponential on the spaces V m for all integer m we get exponential sequences. So, exponentials in going from continuous to discrete remain exponential in nature. We are illustrating this with this exam anyway. So, it is very easy to evaluate this. This is essentially nothing but 1 minus e inverse the whole squared. Now, the first term is 1 the first term in the series is 1. The common ratio is e to the power minus 2 and therefore, this is the sum and of course, this is finite. Therefore, the projection also belongs to L to R nothing that surprises us, but we have done our job to verify. Now, let us go to the next question. The next question is to project these functions on the space V 1. So, question 3 obtain their projections on the space V 1 in of course, in the higher multi resolution analysis. I wish to draw your attention to some important issues here. You see what we have done for V 0 and V 1 can later be generalized to any V m, but it helps to start with a specific example. That is why we are looking at V 0 and we are looking at P 1 and we intentionally are looking at two successive subspaces in the ladder to understand the idea of incremental information too. So, let us not forget where we are going when we are doing this exam. Now, V 1 of course, you will recall is the space of piecewise constant functions on intervals of length half 2 raised to the power minus 1 and of course, we have the standard intervals there. The standard intervals are the intervals 0 to half half to 1 1 to 1 and a half 3 by 2 to 2 and so on so forth on the positive side and then minus half to 0 minus 1 to minus half minus 3 by 2 to minus 1 and so on on the negative side. So, again I do not need to go through any discussion to convince you that before minus 1 and after 1 the projection would be 0 for the function x 1 t. For the function x 2 t of course, the projection is going to be 0 for t less than 0. What is of interest to us is only the projection for t greater than 0 in the context of x 2 t and the projection between minus 1 and plus 1 for the function x 1 t. So, with that remark let us find out the projection of x 1 t on the space V 1. Now, essentially we could use symmetry again. We can calculate only for t greater than 0 and in this interval between 0 and 1 we must consider two half intervals. So, we consider the interval from 0 to half and that of course, gives us 1 minus t dt from 0 to half which of course, I can simplify by using the lambda replacement. So, it is lambda minus d lambda where lambda is 1 minus t, but remembering that you have a minus t lambda there let me write it. So, it is minus d lambda, but then when lambda is when t is 0 then lambda is of course, 1 and when t is half then lambda is half 2. So, it is half to 1 lambda d lambda very easy integral to evaluate. It is essentially lambda squared by 2 taken from half to 1. And that is half 1 squared minus half squared there we are. So, you see there is a little now this is the integral that we require, but remember when we take the average we must also divide by the interval length. So, everywhere I need to make this little correction I need to multiply it by 2 or divide by half. So, this 2 goes away and therefore, the piecewise constant value on the interval 1 or 0 to half the first interval is 3 by 4. Similarly, we can calculate the piecewise constant approximation on the interval half to 1 and I shall not repeat all the discussion I will simply write down the value. It is essentially 1 by half integral half to 1 1 minus t d t which is easily calculated to be 1 by 4 and we could sketch this projection in total now. So, it is 3 by 4 there and 1 by 4 here from symmetry it would also be 3 by 4 between minus half and 0 and 1 by 4 between minus 1 and minus half. We would also like to get our ideas clear about incremental information about taking dot products using dot products to calculate coefficients and so on. For example, let us look at this projection here and let us draw on the same graph the projection of x 1 on the space v 0 which I will show in dotted here. You will recall that this value is half. Obviously, if I were to take the difference of these 2 functions it would give me the projection on the space w 0 the standard space w 0 in the R multi resolution analysis. So, the projection of x 1 on the space w 0 can be obtained in 2 different ways and we are going to show both those ways here. It can be obtained as projection on v 0 of x 1 minus projection on v 1 of x 1. Of course, to project on w 0 you would take the negative. So, you would subtract the projection of x 1 on v 0 from the projection on v 1 of x and I can easily draw that graphically. If I were to subtract this dotted line from the solid line it is very easy to see I would get a function that looks like this. Let me sketch it. So, it would be positive in this part of the axis of t and negative here and of course, the value here is 3 by 4 minus 2 by 4. So, we have you see the value here is it is the difference here. So, what is noteworthy here of course, and we expect that to happen is that this difference and this difference are the same. This height and this height as expected are the same and each of them is equal to 1 by 4. So, we have 1 by 4 there and minus 1 by 4 here. It is very easy to express this in terms of psi t that also illustrates to us the idea of a basis. This is essentially 1 by 4 psi t minus 1 by 4 psi t minus 1 by 4 psi t plus 1. Recall that psi t plus 1 would essentially be the standard Haar wavelet. So, let me draw that this is the standard Haar wavelet. Now, it is easy to visualize that if I take this Haar wavelet shift it. So, that it occupies the interval minus 1 to 0 which essentially means writing down psi of t plus 1 and multiplied by minus 1 by 4 you get this part of the function. So, that is this contribution. So, this term essentially contributes this part of the function here and this term here contributes this part of the function. So, here we illustrated the idea of the incremental subspace the subspace w 0 in the Haar multi resolution analysis. Now, let us do the same exercise for the function x 2 t. So, we will calculate the projection on v 1 of the function x 2 and for this again we need to consider the standard interval n into half up to n plus 1 into half. So, on this interval the piecewise constant approximation is 1 divided by half integrated from n into half to n plus 1 into half here is the power minus t dt. Of course, needless to say here we have n greater than equal to 0 easy to calculate this is essentially 2 times integral n by 2 to n plus 1 by 2 e raise the power minus t dt and that is e raise the power minus t again by minus 1 from n by 2 to n plus 1 by 2 a very easy to calculate. Integral to evaluate a very easy substitution to make that is e raise the power minus n by 2 minus e raise the power minus n plus 1 by 2 of course, multiplied by 2. So, we need to keep the 2 intact must not forget the 2. Now, again of course, 1 under 1 notices the exponential nature of this 2. So, this is 2 times e raise the power minus n by 2 taken common 1 minus e raise the power minus half. So, again an exponential sequence this further illustrates the idea that when we project the exponential function on any of these subspaces V m in the higher multi resolution analysis we get an exponential sequence 2. So, exponentials replicate themselves in discretization anyway on a similar note we could find the projection of this function x 2 in the space w 0. Now, we need to do a little work here rather than just blindly calculating integrals and putting down constants. Let us instead use the knowledge that we have gained from the calculation in x 1 to calculate this projection in x 2. So, we need to consider the specific interval n to n plus 1. You see we know that the projection of x 2 in the space w 0 in the space w would essentially require a multiple of psi t in the interval the standard in unit interval n to n plus 1. So, we will have to put here a multiple of psi t. In fact, psi t minus n. So, we would need to translate psi t to occupy this interval here and we would need to multiply it by a suitable constant to get the specific value of the projection or the function in this region. Now, how would we do that? You see if we know the projection between n and n plus half and the projection between n plus half and n plus 1 we could essentially subtract the projection in v 0 from the projection in v 1 that is the piecewise constant approximation on each of these half intervals to get the projection on w 0. So, essentially the factor by which we must multiply psi t minus n is the piecewise constant approximation between n and n plus half minus the piecewise constant approximation between n and n plus 1. So, let us write that down. What we are saying in effect is that the constant by which we must multiply psi t minus n is essentially the average over n to n plus half is essentially the average over n to n plus half minus the average over n to n plus 1. And that is easy to calculate too, indeed n to n plus half when we average the function it is essentially integral e raise the power minus t d t integrated from n to n plus half and that is e to the power minus t by minus 1 from n to n plus half. And we can easily calculate this it is e raise the power minus n into 1 minus e raise the power minus half. We of course know what the average is over n to n plus 1. And therefore, the multiplying factor for psi t minus n is essentially e raise the power minus n into 1 minus e raise the power minus half minus e raise the power minus n 1 minus e raise the power minus 1. And of course, we can simplify that let us e raise the power minus n. What is important here is that once again we get an exponential sequence. So, in fact the projection on w 0 of the function x 2 in terms of t is summation n going from 0 to infinity to n minus half psi of t minus n multiplied by this constant. Let us call this constant d n interestingly enough d n is again exponential in nature. In fact, again it is a decaying exponential sequence though not specifically important from the point of view of wavelet analysis this is another observation once again. For exponential sequences interestingly enough for exponential functions or exponentially decaying functions to be more precise we observe something interesting. The projections on all of these on all the V m's in the R M R A and the projection on the W m's are all exponentially decaying piecewise constants. I mean this is an informal way of saying it what I am saying is they are all of course piecewise constant as expected but the constants decay exponentially. The projections on the V's are actually exponentially decaying and they retain the same sign. So, here you notice that they all have the same sign they are all non-negative the as far as the projection on w 0 is concerned here of course, the alternate after all the projections I mean the piecewise constants are positive for one half interval and the negative for the other half interval that is a minor matter but there is an exponential character there. Now, I leave it as an exercise and this is something that we can do very easily show that d n can also be obtained by taking the inner product essentially the inner product of x 2 t with psi t minus n it is also obtainable as an inner product. In fact, we could probably do that this inner product x 2 t with psi of t minus n would essentially be the integral of e raise to power minus t d t from n to n plus half minus the integral of e raise to power minus t d t from n plus half to n plus 1 and that is easily calculated to be e raise to power minus t by minus 1 integrated from n to n plus half subtract from it the integral from n plus half to n plus 1 that is easily seen to be e raise to power minus n minus e raise to power minus n plus half minus e raise to power minus n plus half minus e raise to power minus n plus 1 and we can rearrange this to get d n and I leave that rearrangement as an exercise. Now, I continue this process I would like to find the projection of x 2 t on the other spaces v m and other spaces w m for both these functions. So, let us take the next exercise the next question obtaining general the projection on v m of the function x 1 first for m less than 0 first. So, let us for example, v minus 1 v minus 2 and so on. So, let us take v minus 1 for example, v minus 1 is essentially the space of piece wise constants on intervals of length 2. Now, here we need to take the standard intervals of length 2. So, for example, we would take the intervals 0 to 2, 2 to 4 and so on and of course, minus 2 to 0 and so on so forth. So, you see on 0 to 2 when we average the function x 1 t what we get essentially is integral x 1 t from 0 to 2 d t divided by 2 and that is half integral 0 to 1 1 minus 0 to 2 d t divided by 2 and minus t d t we have calculated this before that is half, but this would be one-fourth in all. So, in other words it is very easy to see that if I take the piece wise constant approximation of the function x 1 t on intervals of on the standard intervals of length 2 I would have one-fourth in this region and 0 outside. So, this is projection of x 1 t on the space v minus 1 and in fact, I could draw the most general projection here. I could consider projection of the function x 1 on the space v m for any m less than 0 and we expect that that projection would be non-zero. So, let us take for example, m is equal to minus 2 it would be non-zero up to 2 square that is from 0 to 4. So, 2 raise the power minus m here and minus 2 raise the power minus m there. The piece wise constant value on this interval would be one-fourth into 2 raise the power of m and it would be 0 else. Now, what is clear is that one could of course, find the projection on the w m's for m less than 0 by taking a difference. So, for example, the projection on w minus 1 is the projection on v 0 minus the projection on v minus 1. So, one can go on calculating that and I leave that to you as an exercise. Similarly, one could find the projection on v 2, on v 3, on v 4 and so on by taking averages on smaller and smaller intervals and I leave that to you as an exercise too. So, I shall conclude this session by putting down a couple of exercises that you must do to understand this problem better. The exercises are as follows. Continue this process to obtain projection on w m of x 1 for m less than 0. Secondly, repeat for x 2 t. In other words, find the projection of x 2 t on the space v m, m greater than 0 and m less than 0 in general. And finally, obtain the projection on the space w m of the function x 2 again for m less than 0 and m greater than 0 separately. To really understand the Haar multi-resolution analysis and to grasp completely the idea of projection on successive larger subspaces it helps to take a few examples. I have held your hand through a couple of examples here and I do hope that you will complete these exercises to fix your understanding of this ladder. With that then, we conclude this tutorial session and we hope to meet again in other tutorial sessions and in other exposes. So, we will have a few expositions and it is essentially sessions where we expose the student to efforts by other students attempts to solve the problem by selecting a few illustrative examples based on wavelets and filter banks. So that not only does one learn concepts, but one also learns how to apply them. We conclude the tutorial here. Thank you.