 A warm welcome to the 43rd session on the subject of wavelets and multirate digital signal processing. In this session, we continue with our recent series of tutorial sessions and the objective of this session is to give a tutorial on the uncertainty product. We will first recall the meaning and the significance of the uncertainty product and subsequently we shall use this tutorial session to calculate a few sample uncertainty products. So, with that little introduction then, let me begin with the tutorial here. Now, let me recall briefly the context, the uncertainty principle as we know it, which essentially says that there is a bound on simultaneous time and frequency localization. So, essentially one cannot localize as much as one wants simultaneously in time and frequency. In fact, you will recall that we had derived a lower bound on the product of the time variance and the frequency variance in one of the lectures of this course. I shall not go through the derivation again, but I shall put before you once again the basic result that we had derived in that lecture. So, we had shown in that lecture that one could define for a time centered function time variance, which we called sigma t squared of x as the L 2 norm of t times x t the whole squared divided by the L 2 norm of x t the whole squared. Now, remember this is for a time centered function, that means a function whose time center is 0. Just to complete the discussion, let us recall the meaning of the time center. In fact, let us recall the premise on which this whole idea of variance was based. We said that x t divided by the norm squared of x t. So, if we considered mod x t squared divided by the L 2 norm of x t the whole squared, this constitutes a probability density function. In fact, that is obvious because if you integrate this it must be 1 over all t and naturally it is non negative by very construction. So, one can think of the mean of this distribution and the variance associated with this distribution. Now, when we say time centered, what we mean is that the mean of this function is 0. So, let us write that down time centered anyway. The time center in general would be essentially t times mod x t squared divided by the norm of x t the whole squared integrated on all t and we call this time centered t 0 and when we say a function is time centered, we mean t 0 equal to 0. Similarly, of course, we can talk about frequency density and frequency center. So, let us just complete the discussion by defining the frequency density. So, if x t has the Fourier transform x cap omega, omega is the angular frequency then mod x cap omega squared divided by the norm of x cap omega in L 2 R the whole squared is the frequency density and of course, one can conceive of a mean and a variance in terms of frequency 2. So, one can talk about the frequency mean which is essentially frequency center or frequency mean a manner very similar to the case of time and of course, when you say it is frequency centered, you mean omega naught equal to 0. So, let us write that down and we can similarly define the frequency variance. So, the frequency variance would be the L 2 norm of omega x cap omega the whole squared divided by the L 2 norm of x cap omega the whole squared. Of course, for omega naught equal to 0, if that is not the case then one needs to take a moment a second moment around omega equal to omega naught. So, this is a little recapitulation of the ideas of time and frequency variance. Now, what we had established in that earlier lecture was that the time for an L 2 R function anyway we need to consider functions of finite energy. So, for an L 2 R function the time variance multiplied by the frequency variance is lower bounded and in fact, we had established that lower bound. We noted that if you took the time variance and the frequency variance in terms of angular frequency, then that lower bound was 0.25 or 1 by 4. So, the lower bound is 0.25. Now, we had also looked at a couple of examples at that time of how we calculate the time variance, the frequency variance and the uncertainty product. What we intend to do today is to look at a few more examples to understand the calculation of this uncertainty product little better. So, with that little recapitulation of the concepts, let us go on straight away to an example. So, example 1 let us calculate the uncertainty product of e raised to power minus mod t for all t. So, of course, we need to do a little bit of homework first. We need to verify that this function is an L 2 R. We need to check whether it is centered in time and frequency and then we could proceed to the calculation of the product as we wanted. So, you see looking at the function itself, it is obvious if we call x t equal to e raised to power minus mod t, then integral mod x t squared d t over all t, you see you could for the moments sketch the function. So, this is how the function looks. It is a double exponential. It is obvious that x t is symmetric about t equal to 0. So, it is a real and even function in time. Now, a real and even function in time has a real and even Fourier transform too. So, it is obvious that this function is both time and frequency centered. It is symmetric about t equal to 0. It is Fourier transform is symmetric about omega equal to 0. So, we could straight away conclude that this function x t is real and even. Hence, it is both time and frequency centered. Now, I must emphasize one point here in this tutorial session. One must check that a function is time and frequency centered before one proceeds to make a calculation of variance. Otherwise, one can land up with very incorrect results. In case a function is not time centered or not frequency centered, it is useful to first center it. That is not difficult to do. Recall in the derivation of the uncertainty principle, we also had prescriptions for how we could create time centered and frequency centered functions starting from those that were not. Time centering is easy. Once you identify the actual time center, just shift it by that time center to make it centered. Frequency centering in time implies multiplication by a complex exponential essentially modulation. So, shifting of course, you could conceive of frequency centering as shifting on the frequency axis, but the equivalent operation in time is to modulate by a complex exponential. So, anyway here we do not need to do it, but in general one must be careful to do it. So, now, let us come down to calculating its time variance. Now, to calculate the time variance and anyway also to calculate the frequency variance, we need to calculate first the L 2 norm of the function. So, let us do that first. You see it is very easy. The L 2 norm of the function is easily seen to be 2 times the integral from 0 to infinity through symmetry e raise the power minus 2 t d t and that is 2 e raise the power minus 2 t by minus 2 from 0 to infinity which is very easily seen to be 2 by 2 or 1. And therefore, the norm of the function here, the L 2 norm of the function is clearly seen to be 1. Now, we need to calculate the L 2 norm squared of t x t or L 2 norm squared more precisely which is now this is not too difficult to do. Let us do it. In fact, we could easily see that integral t x t the whole squared in magnitude can again be calculated separately in the negative and positive side and they are equal. So, it is very easily seen to be 2 times the integral from 0 to infinity t e raise the power minus t the whole squared integrated with respect to t. Now, you see this is an integral which requires a little bit of work to evaluate by using integration by parts. So, let us see how to evaluate it. So, this is of course, so we consider the integral t e raise the power minus t the whole squared d t. Let us consider the indefinite integral first that is t squared e raise the power minus 2 t d t and that can be seen to be by parts. So, you know since the indefinite integral we evaluated by parts first. So, we will keep this as it is and differentiate this. So, we will continue to differentiate this to eliminate the polynomial here and integrating or differentiating this is no problem at all. So, it is always convenient to differentiate this so as to do away with the power of the polynomial. So, keep as it is here integrate this minus 2 times t e raise the power minus 2 t by 2 by minus 2 d t and of course, we can integrate this once again. So, now again we integrate by parts. So, we could strike away and we have a plus sign coming here we strike away the 2's. So, this gives us essentially we need to calculate integral t e raise the power minus 2 t d t from 0 to infinity and this becomes well you keep this as it is integrate this and then differentiate the first term and integrate the second and there we are. Of course, everywhere we need to substitute limits, but we will do this later. So, although these limits need to apply to both of these quantities here we will put the limits later. So, at the moment we will again consider the indefinite integral here as we require from the step in the past. So, essentially we were trying to calculate t e raise the power minus 2 t d t here and the limits shall be substituted in the end. So, now all in all the indefinite integral becomes as follows it has the following terms it has this term first. So, t squared by minus 2 e raise the power minus 2 t plus now I will continue later essentially plus this quantity here, but this quantity has been simplified here. Therefore, we have minus t by 2 e raise the power minus 2 t plus half e raise the power minus 2 t plus half e raise the power minus 2 t d t. So, this is the entire indefinite integral t squared by minus 2 e raise the power minus 2 t plus minus t by 2 e raise the power minus 2 t plus half e raise the power minus 2 t integrated. Now we can substitute the limits at this stage and in fact if we only care to look at the terms here. You see if we look at the limit from 0 to infinity here at t equal to 0 this term is 0 as t tends to infinity this goes to 0. Of course, one might argue that this tends to infinity, but a polynomial is always less dominating than an exponential that can be shown of course, by L'Hopital's rule also. So, I leave it to you to show that if you take the limit as t tends to plus infinity of t squared e raise the power minus 2 t it would go to 0 and the same holds for the term t e raise the power minus 2 t. So, therefore what we have here is when we take the indefinite integral and we substitute now the integral from 0 to infinity t squared e raise the power minus 2 t d t we essentially get e raise the power minus 2 t d t integrated from 0 to infinity and that is easy to calculate that is essentially e raise the power minus 2 t by minus 2 integrated from 0 to infinity and that is easily seen to be half into half and remember what we want is not this we want twice of this. So, therefore the time variance is 2 times the integral from 0 to infinity t squared e raise the power minus 2 t d t which is 2 into half into half which is half. So, there we have the time variance ready for us. Now, we need to calculate the frequency variance of this function and here again I shall recall an important idea there. Now, you know it might seem again that to calculate the frequency variance you need to calculate the Fourier transform that is not true to calculate the frequency variance we might do as well to look at what it means in time. So, let us recall that the frequency variance is essentially the L 2 norm omega x cap omega the whole squared divided by the L 2 norm of x cap omega the whole square, but then using passable's theorem I could always insert a j here and interpret this using passable's theorem as also this. So, one could first write this as the square of the L 2 norm of j omega x cap omega divided by the square of the square of the square of the L 2 norm of x cap omega and now with passable's theorem this becomes essentially the L 2 norm of d x t d t the whole squared divided by the L 2 norm of x t the whole squared. Of course, you will recall there is a factor of 2 pi which has got cancelled here. Therefore, we have a very easy job before us we can calculate the frequency variance essentially by looking at the time derivative this is convenient when the time derivative is convenient. So, in this case when you consider x t is e raise to the power minus mod t then d x t d t is essentially e raise to the power minus t times minus 1 for t greater than 0 and of course, for t less than 0 this would be e raise to the power t and therefore, it would be e raise to the power of t for t less than 0. So, of course, you know the equal to can be captured in either of them. So, it is said there is a discontinuity in the derivative actually. But anyway it does not matter because we are only interested in the integral. So, now if we consider the L 2 norm the L 2 norm of d x t d t the whole squared is actually the same as the L 2 norm of x t in this case that is because they are related through a factor of plus or minus 1 on either side. So, when we take the norm or the norm squared this factor of plus minus 1 has no effect and therefore, the frequency variance in this case turns out in fact, we know what that L 2 norm is 2 the L 2 norm we remember was 1 essentially and therefore, the frequency variance turns out to be 1. The time variance we have calculated before turns out to be half and therefore, the uncertainty product for this function turns out to be half into 1 which is 0.5 and as expected it is greater than 0.25. So, there we are we have one tutorial example here of calculation of the uncertainty product and we can see that for this function as expected the uncertainty product is more than the minimum that it can be which is 0.25 and we are not surprised because this function as we can see is discontinuous in its first derivative. In a certain sense the more discontinuous a function is either in itself or in its derivative the more trouble it gives to the uncertainty product. In fact, we saw that if there was a discontinuity in the function itself the uncertainty product is divergent it tends to infinity. Take the example of the Haar wavelet or the Haar scaling function the uncertainty product there tends to infinity because of the discontinuity. In fact, it does not matter whether the discontinuity is in frequency or in time. Remember there is a certain duality about the uncertainty product whatever methodology we have established here to calculate the uncertainty product can be done either in frequency or in time depending on what is convenient. So, if the function is neatly described in the frequency domain and if it is easy to find the derivative in the frequency domain one is welcome to start from the frequency domain in calculating the frequency variance first and then come to the time domain by using the principle of duality. Anyway that a part let us now consider another function which would hopefully do a little better namely a raised cosine function. Let me define that raised cosine function. We define the raised cosine function as xt equal to 1 plus cos t for t between minus pi and plus pi and 0 else. Let us sketch it notionally we should draw an axis in between like this and we need to draw a smooth cosine function like this. Now it is obvious why it is called a raised cosine it is as if there was a cosine or rather one whole cycle of a cosine raised so that it becomes positive. This raised cosine function has a lot of significance in digital communication. It so happens that this is one of the pulses often chosen conceptually or in reality for transmission of digital information. So, it is a monotone function modulation waveform or modulation and demodulation waveform of choice. Now we expect that if that is the case it should do well in terms of its uncertainty product and that is exactly what we shall now investigate. So, let us look at its uncertainty product. Let us consider its L 2 norm of course, we expected to be finite again this function is real and even and therefore, we can use symmetry to calculate its L 2 norm squared twice the integral from 0 to pi mod xt squared dt and that is a very easy integral to evaluate. So, we work out the steps here 1 plus cos square t plus twice cos t integrated with respect to t and of course, cos square t can again be written in terms of cos 2 t. So, there we are. So, let us consider we can do a little bit of simplification here. So, you see look at the terms here we have a constant we have another constant here we have integral cos 2 t dt and cos t dt and we are going to integrate them from 0 to pi. Now the integral of the cosine function from 0 to pi is of course, 0 we know that if we take the integral of cos t from 0 to pi you have as much positive as negative area. So, let us sketch that. So, cos t from 0 to pi would look like this and in fact, cos 2 t would go through 2 cycles rather 2 half cycles this is cos t this is cos 2 t and therefore, we have a 0 integral over 0 to pi. So, if we put back the limits in this integral here if I integrate from 0 to pi we can drop this term and this term here and we are left only with this term. So, we are left only with integral from 0 to pi 1 plus half dt which is 3 by 2 times pi and of course, what we want is not this, but twice of this. And therefore, we have the L 2 norm of x the whole squared is 2 times 3 by 2 pi which is 3 pi. Now we calculate the time variance and once again to calculate the time variance we note that this function is real and even and therefore, it is already time centered because it is real it is frequency centered too. In fact, its Fourier transform is also expect to be real and even. So, we do not have to do too much of work. The function is already time and frequency centered we must make it a point to note this every time we calculate an uncertainty product it should be a practice to note this. In some cases it could be time and frequency centered because it is real and even in some other cases we need to explicitly look at mod x t squared and come to a conclusion about the center and center it if it is not. Now in this particular case as I said it would be easier to first deal with the frequency domain. So, let us calculate the frequency variance first. Now to calculate the frequency variance we need to first calculate the L 2 norm of dx t dt and this is easy to do. In fact, we can write down dx t dt very conveniently. dx t dt is essentially d dt of 1 plus cos t which is minus sin t and it is very easy to calculate its L 2 norm the whole squared. Essentially it becomes 2 times integral from 0 to pi sin squared t dt and this integral is easy to evaluate in terms of sin 2 t or cos 2 t. So, it is 2 times integral from 0 to pi 1 minus cos 2 t by 2 dt and once again if we note that the integral of cos 2 t dt from 0 to pi is 0 what we have is essentially integral from 0 to pi dt which is pi and therefore, we have a very neat result for the frequency domain variance. The frequency variance just becomes essentially pi by 3 pi or 1 by 3. Now we need to calculate the time variance and that requires a little more work. I shall indicate the calculations here. So, to calculate the time variance we need integral t squared mod x t squared dt which essentially is integral t squared 1 plus cos t the whole squared dt and of course, one can make use of symmetry here that is not a problem. Let me do that. So, in fact, let us first calculate the indefinite integral. It will be easier to work with the indefinite integral first. So, let us expand this. Let us get integral t squared 1 plus cos t the whole squared dt to be integral t squared 1 plus again the same thing cos square t. So, I will just skip a step by writing 1 plus cos 2 t by 2 plus twice cos t dt. So, of course, now we have a set of integrals of the form a power of 2 say t squared times cos some m t dt. So, we need to evaluate integrals of this kind. Now what I am going to do is to indicate for you the approach to finding such integrals and I shall leave a little bit of calculation for you to do in the end. So, typically what we need is to calculate an integral of this kind say t squared cos m t dt where m is an integer that is not terribly important, but anyway that is what it is and that is easy to do. It is essentially keep this as it is integrate this. So, we have t squared sin m t divided by m minus integral differentiate this integrate this with respect to t. Now we need again to consider integral t times sin m t dt and we can do that by parts as well. Let me rewrite it integral t sin m t dt is essentially keep this as it is integrate this that is minus cos m t by m minus differentiate this integrate this dt and this is easy to complete. This is essentially minus t by m cos m t plus sin m t by m squared. So, now we have the indefinite integral properly constructed. Let us make use of the calculation to write down an overall expression here. So, we have t squared cos m t dt is all this and we have simplified this here. Let us write down the integral in total. So, there we are we have the total expression here. Now let us look at the terms that we have in the integral. We have a t squared cos 2 t dt term and we have a t squared cos t dt term here. So, if we use this expression here let us write down explicitly what they are. You know the t squared cos 2 t dt terms are essentially going to give you t squared sin 2 t and so on. So, you have t squared sin 2 t and of course, t squared and you see we are going to take limits at the two extremes. So, you see without doing too much of calculation let us look at what these limits would give us. Now take this for example, the integral is going to run from 0 to pi. So, as far as the sin terms are concerned sin of 0 and sin of any multiple of pi is automatically 0. So, we do not need to look at the contribution of this at all. The sin terms do not contribute. It is only the cos term which might contribute at the two extremes. What we are saying in effect is we essentially require this and this and we have taken note that when we do this when we calculate those two terms wherever there is a t anyway it is 0 at 0. So, these drop out wherever there is a pi the sin at a multiple of pi is 0. So, therefore, you see all that we need to do is to consider. So, you see sin at 0 is 0 sin at a multiple of pi is 0. So, these two terms drop out we need to look at only this term for 2 t of course, again we have cos of 2 pi and cos of 0 whatever it is. So, let us write down the two expressions. So, essentially what we are saying is we need to consider only now even here if we look at it carefully let us take for example, m equal to 1. We have 2 t cos t from 0 to pi and of course, at 0 it is 0 at pi anyway of course, this is cos pi which is minus 1. So, we get only one term. So, it is 2 pi cos pi for m equal to 2 we would have 2 t by 2 square which is 4 cos 2 t from 0 to pi and of course, at 0 it is 0 at pi it is 2 by 4 times pi times cos 2 pi which is 1. So, it is half pi. So, here you have 2 pi cos pi which is minus 2 pi and here we have half of pi. Now, I am going to leave a little bit of calculation for you to do and complete. What I would now like you to do is to calculate the time variance based on these integrals. It is easy to do it is just a matter of substitution now and to compare the time variance with 0.25 there should be a little bit of excitement left for the student and I am kind of giving you a hint of what will happen. Let me sketch the function once again for you. Recall that the function look like this a kind of bell if you might call it that and kind of exaggerating the n's is minus pi and plus pi here and this is at 0. Now, you will see that the derivative is 0 at minus pi 0 at pi and also of course, in the centre. So, there is a certain additional smoothness that this function has over and above the function e raise the power minus mod t. Therefore, we expect that this function should have a lower uncertainty product then e raise the power minus mod t and indeed when one actually carries out this calculation one would see the product would be a little closer to 0.25 than the earlier one. With this then I leave this calculation for you to perform and we end this tutorial session on the note that you could now consider a few more such functions may be with more than one cycle and calculate a few more time frequency products to understand them better. Thank you.