 Hello and welcome to this next lecture in the series on the topic of wavelets and multirate DSP and the topic which at a broader scale deals with the subject of joint time frequency analysis. This particular lecture we have titled as in search of scaling coefficients and we are going to see a very interesting journey and how we can follow the path by virtue of which we will be able to then find out appropriate scaling coefficients. But before that we are going to pick up from where we left in the last lecture and towards the end of the last lecture we saw one very interesting problem. In fact, to lead to that particular problem let us quickly revisit what we have done in last couple of lectures. We let down the framework of multi resolution analysis and then we realized that this particular framework gives us the power to actually move up the ladder or down the ladder. And now in real sense I can zoom in or zoom out of any part of the underlying signal or function that we are trying to analyze. This makes the entire assembly scalable and what different applications would demand the underlying framework to be scalable that also very briefly we saw in the last lecture. However, this powerful framework leads us to two important questions. Number one how do we go about selecting the mother wave light and what should be the scale of analysis? That is the first question and the second question is what is the procedure to calculate the scaling and wave light coefficients. We answered the first question partially. We are going to quickly close on few of the open ends from the last lecture and then we will move on to the second question that is finding out coefficients of scaling equation. In fact, that is the main subject matter that we are going to deal in this particular lecture. Very quickly from the slides in the last lecture we brought out the concept of dot product and correlation and we realized that this concept is not new to us. In fact, that is precisely what we have been doing when it comes to Fourier transform. And we saw few examples in the last lecture one of which is this particular signal which is again a stationary signal and there are two frequencies sin of 3 and cos of 8 and both these frequencies they exist all throughout the signal and that is why this signal is a stationary signal. And when we stimulated this signal with the basis function which is cos of 8, then we realized that there is huge amount of correlation. The correlation index is very high and that is because this particular frequency is actually present in the original signal. And when we take the dot product between the basis function and the underlying signal, then that gives us more positive part than negative part which is shown in green in this particular slide. And when we do the integration of this green part area under this green curve then that gives us a peak corresponding to that particular frequency. And that is how we will end up with two peaks corresponding to two frequencies present in this particular signal. So, this concept is not new to us. However, we are going to take this concept forward and brought the concept of vanishing moments to really understand significance of selecting an appropriate wavelet function. Towards the end of last lecture, we saw this problem. We know that in this particular function g of t, there is notable jump or discontinuity at t is equal to 0.5. We integrated this function g of t and we produced h of t and still we are able to see a cusp jump at t is equal to 0.5. We further did the integration of this h of t and we are able to produce f of t. And now this f of t appears smooth to bear eye. However, we realize that there is a jump which is a hidden jump now a hidden discontinuity at time t is equal to 0.5. And we did the analysis of this function using Haar mother wavelet and then Dobash two mother wavelet and Haar mother wavelet was not able to detect this discontinuity. And Dobash two was able to detect this discontinuity. We are going to understand the reason in greater depth through the framework of vanishing moments. So let us put down the framework first. We have already noted few points and that is for a wavelet say psi of t, the k th moment can be written as of course, over the interval minus infinity to plus infinity can be written as m of k integration from minus infinity to plus infinity x of k psi of x dx. And then we pose this question that why this is a measure of quality. And honestly speaking to answer this particular question we will go back to what we have been doing in the Fourier domain. So, from Fourier domain we know that the operational property for the n th derivative of the function goes like this. If this is the Fourier transform then it comes out to be this. So, this is the operational property. And then solving this further we can realize that indeed f n of 0 turns out to be this. Obviously, this would range from minus infinity to plus infinity where this is indeed the moment. And what does this indicate? This indicates something very very important. This in a way indicates the existence of m n moment of f w. It in a way indicates existence of m n moment of this f w which also indicates in a way the smoothness of the underlying function f of t about t 0 is equal to 0. And this is possible only if there exists the n th derivative there. So, that is the significance of this moment term. Now, let us try and understand the significance of moment when it comes to wavelet transform. And in fact, we wrote down last time as far as the vanishing moments are concerned they give us two beautiful things. Number one reduced computations. However, these reduced computations are of greater significance when we start dealing with the fast version of wavelet transform. That is how do we go from the discrete wavelet transform to fast wavelet transform. The second property is of greater significance as far as the subject of finding out the jumps and discontinuities that we are dealing currently. It has got something to do with detecting higher order derivatives. We are in a way going to focus on this second part. So, let us once again write down the formula of beta z k that we saw last time. And now we want to do the analysis. We want to really understand what kind of discontinuities possibly can be found out, seen, sensed and detected using a particular type of underlying wavelet function psi. See, one serious advantage of wavelet analysis with vanishing moments over the classical notation of derivatives is that they are defined only at the infinitesimal intervals. And that is that is one serious advantage of using the notion of wavelets. Remember, we are using waves as far as the basis functions of Fourier or rest of the transforms like Laplace and Z are concerned. And over here, we are talking about wavelets. We are letting the waves die out. And so, we are talking about good compact support. And we are going to make a good use of this fundamental property when it comes to vanishing moments. Well, one fundamental question could be why wavelet? Why not phi function, the scaling equation? Well, the answer of this question in a way is given. However, let us quickly see through the framework of correlation how it actually makes sense. A very quick example, let us say we are trying to analyze signal x of n. And x of n looks like this 1, 1, 1 and minus 1. And let us say I am passing this through a two band structure, where this is my low pass filter followed by a disseminator. And this is my high pass filter followed by a down sampler. Now, what really comes out? Let us evaluate first what comes out here. Since, the low pass analysis coefficients are half and half. So, for the first two coefficients in my input, it is going to be half plus half. And so, that is going to give me 1. For the next two coefficients, it will be again half plus half and that is once again going to give me 1. Then 1 and minus 1 and we are going to multiply both of them with half. So, half minus half that gives me 0. And then minus half plus half since this is cyclic, this is also equal to 0. So, what does this indicate? This clearly indicates that for a phi of t like this, where the coefficients are let us say half and half from 0 to half and then half to 1. There is good amount of similarity when we are talking about input to be 1 and 1. So, when input is 1 and 1, because the similarity or the correlation is high, I get 1 over here. Correspondingly, between this one and this one, the second and the third coefficient in my input, again the similarity is high, correlation index is high. And that is why I get 1 over here. And then between 1 and minus 1, obviously when I am trying to do the correlation of 1 and minus 1 with half and half, the correlation index is going to go down and it is 0 as can be seen here. So, what we get over here in a way is the correlation index between the function that we are trying to analyze and the basis that is getting used, basis or the kernel. We can correspondingly also find out what we will get over here to just convince ourselves more. So, I have 1 and 1 and now I have filter coefficients as half and minus half. So, 1 and 1 that will produce a 0, 1 and 1 will again produce a 0, 1 and minus 1. So, that is going to produce a 1 and then minus 1 and plus 1 that is again going to produce a minus 1. So, if we focus on this third coefficient, it gives us high correlation index and that is because we are comparing 1 and minus 1. And what is the nature of the basis function? Half and minus half. And so, in totality, we are trying to find out the parts in the underlying signal which are of greater correlation with the basis function that is used for doing the analysis. So, it is very natural if I want to find out the jump or discontinuity in the signal. I have to invariably look at the part which actually fluctuates fast. In other words, I should look at the basis function that contributes to my high pass filter. And that is why we are concentrating on psi of t and not phi of t. If the underlying application is denoising where I want to smooth out the information, then probably we will focus more on the low pass filtering part. That means, we will focus more on phi of t. But since we are looking at an application where the whole objective is to find out the underlying discontinuity or jump, we are focusing on psi of t. So, with this in our mind, let us go back to the formula once again. So, what we are saying is in this particular formula of beta z k. I can very well say that this is nothing else, but correlation between the wavelet and signal scale which is once again given by 1 upon 2 to the power z and position or translation of k upon 2 to the power z. And so it makes sense that this is a dot product or a correlation between this. And the moment we say that my underlying wavelet says psi of t has m 0 is equal to 0 and m 1 is equal to 0. So, what we are saying is the zeroth moment is 0 and the first moment is also equal to 0. We have taken just an arbitrary example. Then what that actually indicates is the wavelet coefficients beta z comma k, they can find out the correlation between only the wavelet with the second and the higher order derivatives of the underlying signal. So, this will be now the correlation between wavelet and second or higher. Higher order derivatives and this in a way represents what was happening in the last example. So, in the last example that we saw, Haar wavelet clearly missed the discontinuity because we did the integration twice. And in the last lecture we proved that as far as Haar wavelet is concerned only the zeroth moment vanishes. However, the first moment does not vanish when it comes to Haar wavelet and as a result of that in the last problem Haar wavelet was not able to detect the underlying discontinuity. We will close on this topic of vanishing moments and we will move further to answer the second interesting question that has been posed. We have been talking about Haar scaling equation and we have been talking about Haar wavelet function and correspondingly the Dovash family. The coefficients of the low pass and high pass filters are well known. However, where exactly do we get these coefficients from? Do we have a concrete procedure to find out such coefficients? What properties the scaling equation should obey and if we want to find out our own mother wavelet is that really possible? These are few of the interesting questions that comes to our mind. Well, finding out a new mother wavelet is a tall order, a very challenging task altogether. Because the new mother wavelet that one can think of designing should have some beautiful good properties on top of what is already existing. Otherwise we can take a sign wave just cut it so that only the first cycle remains and that is a wavelet. So, designing a new wavelet is easy, but designing a new useful wavelet is very challenging and comparing that wavelet against the existing Dovash and few of the other wavelets and then going one notch further is indeed very challenging. So, that probably is beyond the purview and scope of this particular lecture. However, we will lay down the procedure, we will understand what properties the scaling equation should obey and that will give us inspiration to take this topic further. So, now let us begin our journey in search of scaling equation. So, let us look at equation coefficients and now comes the interesting question we have been talking about wavelet transform. So, why are we not saying in search of coefficients of wavelet equation? Where are we saying that we want to first of all search the coefficients of scaling equation and this is obvious if we revisit the dilation equations. This is the dilation equation in time domain of phi of t and the dilation equation of psi of t looks like this and this clearly tells us that once we find out the coefficients of scaling equation, we can very easily find out then the corresponding coefficients of wavelet equation and that is because from the dilation equation we can clearly sense because of this phi of twice t I can very well understand that indeed phi of twice t minus k it belongs to v of 1 because of this this function once again belongs to v of 1. I have phi of 1 t 2 to the power 0. So, this belongs to v of 0 and this belongs to w 0. So, we have already written down that v of 1 is equal to v 0 plus w 0. In other words once we understand phi of twice t then using phi of twice t I can construct phi of t I can also construct psi of t and that is why the main focus is on finding out the coefficients of scaling equation. Now, in order to be able to achieve this let us go through few of the guiding theorems and there are three guiding theorems that will help us go through this procedure neatly and nicely. The first theorem looks like this for the scaling equation with the given non vanishing coefficients H of k where these coefficients would exist only between this given range then we can say that phi of x has a compact support and it is well contained in the given interval. So, your phi of x should first of all have this beautiful property of compact support this is the first guiding theorem. The second guiding theorem tells us if the scaling function phi of x has compact support on this given range and if phi of x minus k are linearly independent then H of n is equal to 0 beyond that particular range and then n capital N becomes the length of the sequence. This would also invoke one beautiful property which is the orthogonality property that will cover up very soon. And the third guiding theorem from the slides if the scaling coefficients H of k satisfy the condition for existence and orthogonality of phi of x then psi of x is equal to this and g of k are the coefficients of wavelet equation which can be derived from H of k which are the coefficients of scaling equation using this particular formula and they should be orthogonal in nature. So, the last property in a way once again poses the orthogonality condition on the mother wavelet. So, using these three guiding theorems we will try and find out the coefficients of scaling equation and in order to be able to do that these are the properties that the scaling coefficients will have to obey first three properties and these are the next three properties. Now, what is challenging is to really understand where exactly do we get these properties from and then try and make some sense by solving one example with the case study of Haar phi of t. So, we will do all that in the reminder of this lecture. So, let us begin with property one of phi of t and property one is summation of all the coefficients should be equal to square root of 2. This property in a way is dependent on what kind of normalization we make use of and the rest of the properties are in a way dependent on this property. So, we will first of all try and understand where exactly do we get this first property from and then we will take the study forward. So, we will start with once again the dilation equation which looks like this and now we will integrate both the sides from minus infinity to plus infinity. I can take out this summation outside integration and so, let me write it that way. So, we will have to solve this. So, the question is equal to what and we will put twice t minus k is equal to x and then clearly d t will be equal to d x by 2 and then I can say this integration. We will be equal to half it is very easy to see this. So, we will put this in this formula and so, what we will get is and now integration of phi of t phi of t is in a way responsible for giving us the low pass filter and psi of t gives us the high pass filter. So, as far as psi of t is concerned when we integrate psi of t the integration goes to 0, but that is not true in case of phi of t. So, this integration of phi of t from minus infinity to plus infinity should lead to what that is what is called as the normalizing factor and we will say let this lead to 1. So, this is the normalization that we have deployed you can also think of using some other constant than 1 and then what we are left with is this is again going to go to 1 my mistake this is again going to go to 1 and then 2 can be split into square root of 2 into square root of 2 and 1 square root will go away and that will give us the first property that is summation of all my scaling function coefficients should lead to square root of 2. However, we should note that this property holds true if we make use of this as the normalizing term. So, this is in a way dependent on this normalizing term let us refer back to the slides we have already seen and proved property number 1. Now, it is time to quickly prove property number 2 and 3. However, we will assume the existence of property number 5 and 6 and there is a reason as to why we will assume the very existence of property number 5 and 6 and when we will solve an example using her at that time will bring this out. However, it is very interesting to prove property number 2 and 3 and that is precisely what we will do quickly see property number 5 tells is that summation k h of k minus twice l h of k is equal to delta l 0. Now, let us in a way replace l by minus l let us do this exercise and by virtue of doing this we will prepare only for even terms. So, we will replace l by minus l and then divide summation over k into the even and odd parts and if we do that what we are left with is now we have replaced l by minus l and then summation k going from minus infinity to plus infinity h of k plus twice l because of the minus l term and then h of k. Now, separating even and odd terms will get something interesting will have delta. So, this is obviously my even term I would say h of twice k plus 1 this is my odd term and now we will have to sum over l from minus infinity to plus infinity. So, when we do that is equal to the double summation l and k and we have h of twice k plus twice l h of twice k plus 1. k plus h of twice k plus 1 plus twice l h of twice k plus 1 and we know what this is going to go to because there is only one non vanishing term which exists at l is equal to 0. So, this is going to go to 1 delta function and now I can very well write down 1 is equal to summation over k h of 2 k into bracket summation over l h of 2 k plus twice l plus summation over k h of twice k plus 1 summation over l h of twice k plus 1 plus twice k plus 1 plus twice l and now these inner parts can be solved by plugging in l for l minus k and then probably for those inner parts we can write summation over l h of twice k plus twice l is equal to plus twice l is equal to summation over l h of twice l and let us call that as a and then summation over l h of twice k plus 1 plus twice l is equal to summation over l h of twice l plus 1 and let us call that as b. So, if I plug these in here then h of twice k plus twice l is equal to h of twice l. So, I have h of twice k plus twice l and h of twice k for summation of k. So, instead of k you can imagine I have l it is just a matter of a variable and then looking at this and this particular equation we can combine them together and write down an equation in terms of a and b probably we can write that 1 is equal to a into a plus b into b that is 1 is equal to a square plus b square. So, this is clearly an equation of a circle and we are talking about the radius of 1. However, there are two unknowns a and b and we have just one equation. So, let us create another equation in order to be able to find out the values of a and b and that second equation comes out of the first property that we have seen that summation of h of k is equal to square root of 2. So, probably what we can do is we can once again split up this into or and even parts. So, this square root of 2 I can write it as twice k h of twice l plus k plus 1 and we already know what this is? This is my a and this is my b. So, now, we are in very interesting situation there are two unknowns and there are two equations a square plus b square is equal to 1 this is my first equation and a plus b is equal to square root of 2. This is my second equation and we can clearly understand what kind of situation we are talking about. If I have b on my y axis and a on x axis then I can very well draw a circle of unit radius and this r is equal to 1 and then the second equation I can also write as b is equal to minus a plus square root of 2 and compare that with y is equal to m x plus c and then we realize that for the second equation the slope is minus a and the y intercept is square root of 2. So, you can think of this as the one y intercept then it is very easy to see that this is going to be this line is going to be a tangent. And since this is a circle with radius of 1 we can also clearly see that this is one point where these two equations would hold true and that point would be 1 upon square root of 2 and 1 upon square root of 2. So, my a and b values are 1 upon square root of 2 and so both the values are 1 upon square root of 2. And now we have already written that summation of k or h of twice k is equal to a and 1 is 1 upon square root of 2. So, this gives me my second property let us call this as p 2 and then we have also realize that h of twice k plus 1 is also equal to b and my b value is also 1 upon square root of 2. So, this gives me my property number 3 and for property number 4 summation over k h of k bracket square this is indeed a square plus b square. So, the equation of a circle that we have already seen. So, in a way we have solved this and this is going to be equal to 1 and this gives me property number 4. Now, let us quickly verify these scaling coefficient properties for Haar scaling equation. We already know that in case of Haar phi of t h of 0 is equal to h of 1 is equal to 1 upon square root of 2. So, this is the normalized version of these coefficients and let us verify property number 1. So, property number 1 is the summation of h of k should go to square root of 2. In this case we have only 2 coefficients. So, this summation is going to run from k is equal to 0 to 1 of h of k that is h 0 plus h 1 which is 1 upon square root of 2 plus 1 upon square root of 2 and that leads us to square root of 2. So, first property obeyed then let us verify the second property p of 2 and we know that property number 2 is summation over k h of twice k should be equal to 1 upon square root of 2. Now, since we are talking about h of twice k there is only one possibility since there are only 2 coefficients and so we have only h of 0 which is equal to 1 upon square root of 2. So, this property is also obeyed correspondingly you can sense that property number 3 will also get very neatly and nicely obeyed because my h of 1 is equal to 1 upon square root of 2. Using these 2 I can clearly sense that property number 4 will also get obeyed because h 0 square plus h 1 square will give me 1 and so property number 4 is also obeyed. Now, what is really interesting to see how property number 5 will get obeyed that is the question property number 5 and how will this property get obeyed summation over k h of k minus twice l h of k equal to 1 upon square root of 2 delta 0 l. So, this in a way guarantees the orthogonality. Now, there are only 2 indices 0 and 1 and let us take the first case when k minus twice l is equal to 0 that is when k is equal to twice l. If l is not equal to 0 then k is equal to twice l which is greater than or equal to 2. Therefore, some vanishes unless l is equal to 0 and in that case k is also equal to 0 and then we can very well write down summation over k h of k minus 0 h of k is equal to 0. Which is equal to h of 0 into h of 0 which is 1 upon square root of 2 bracket square which is equal to 1 by 2. Also when k is equal to 0 we have h of k minus twice l which is h of 0 minus twice l which is 0 unless 1 by 2. So, this is the question property is l is equal to 0 and therefore, l has to be 0 and then we can say summation over k h of k into h of k is equal to h 0 square k is 0 and that gives us value of half. Let us quickly go through the second case as well because there are only 2 indices. So, the second case would be when k minus twice l but before that please remember. So, for the first case it is half and for the second case it is half. So, half plus half gives us 1 and that is how this property is indeed obeyed. Now, for the second case when k minus twice l is equal to 1 it in a way implies that k is equal to twice l plus 1. Now, if l is not equal to 0 then k will always be greater than or equal to 3. So, l has to be equal to 0 and that means k is going to be equal to 1. So, we have a situation where we have summation over k once again h of k into h of k that will give me h 1 square that is half. And for k to be equal to 1 l has to be once again be 0 else h of k minus twice l is equal to h of 1 minus twice l is going to go to 0. So, we have a situation where over the summation of k I have h of k minus 0 into h of k which is h 1 square which is indeed once again half and then total for k minus twice l and k minus twice l is equal to 1 and k is equal to 1. We are solving for the index of 1 once again turns out to be half plus half is equal to 1 and thus property number 5 is also obeyed. Thus, the coefficient of her scaling equation they indeed obey all these different properties. And once we in a way find out these scaling coefficients it is easy to then find out the coefficients of wavelet equation. Let us quickly do that and then we will stop. So, what we are saying is if g of k are the coefficients and g of k are the coefficients of my wavelet equation then these can be calculated from h of k and g of k will be equal to minus 1 to the power of k h of capital N minus k. How to select this capital N value? It is a very deep subject, but let us select capital N is equal to 1. This has to be some odd number and then formula becomes g of k is equal to minus 1 to the power of k h of 1 minus k. And now in case of her if we want to find out the corresponding g k values then it is very simple. For k is equal to 0 I would find out g of 0 to be equal to minus 1 to the power of 0 and h of 1 minus 0 that is 1. So, g of 0 will be equal to h of 1 and g of 1 for k is equal to 1 will be equal to minus 1 raise to 1 and h of 1 minus 1 that is 0. So, that is minus of h 0. So, g 0 will be h 1 and g 1 will be minus h of 0 which will be equal to 1 upon square root of 2 and minus 1 upon square root of 2. This is how we can go about finding out the coefficients of wavelet equation. So, what we saw in this particular lecture is a way a method to find out the corresponding properties which are to be obeyed by the coefficients of scaling equation. Once we find out those coefficients we can then go ahead and find out the coefficients of wavelet equation. And once we have scaling equation and wavelet equation with us then using the father that is scaling equation and mother which is mother equation or wavelet equation. We can then go about deriving the entire family corresponding to that particular mother wavelet. We will stop here and continue next time. Thank you.