 So, warm welcome to the 37th lecture on the subject of wavelets and multirate digital signal processing. Recall that in the previous lecture, we had discussed one way to analyze a general system with analysis and synthesis filters namely the approach of polyphase decomposition. Essentially, polyphase decomposition is a time domain approach where we recognize that all sequences in question whether the input sequence, the output sequence, the filter impulse responses could be thought of as comprising of as many sub sequences as the number by which the sequence is decimated and interpolated that is the down sampling and the up sampling factor. So, for example, if we have down sampling and up sampling by a factor of 2, we think of the odd and the even numbered points on all the sequences in question. The input sequence, the output sequence and the filter impulse response sequences. Based on this decomposition, we identify the relation between the output polyphase components as we call them and the input polyphase components through the filter polyphase components. So, essentially the polyphase approach which we built up in great detail in the previous lecture was a recognition of the relationship between the input polyphase components and the output polyphase components. Naturally, this is difficult to do purely in time and therefore, one needs to go to a transformed domain. What we have done was to identify this relationship essentially in the z domain. Further, we had noted that the condition for perfect reconstruction amounts to a condition on the product of the polyphase matrices corresponding to the analysis side and the synthesis side. So, when we look at the product matrix and if we wish that the output and the input polyphase components essentially replicate one another, we need to put a condition on the entries and I shall before I proceed to discuss the other approach today complete that discussion by putting the condition the requirement down explicitly. So, in the lecture today, we intend to look at the other approach namely the modulation analysis which we shall illustrate using a 3 band filter bank, but before that as I said we shall complete the discussion on the polyphase approach by writing down explicitly the requirement on the product matrix. Further, we shall in the later part of this lecture begin a discussion on applications of time frequency analysis of wavelengths of filter banks and so on and involved in these applications are actually several students who have taken the course for credit in the current semester. I shall put before the audience today some of these students who have investigated some applications in depth and done a very good job, we shall only look at a very brief introduction to their applications today and discuss them in depth in a subsequent lecture. So, with that perspective on the lecture today, let us begin to complete the first part of the discussion namely the final step in the polyphase approach. Now, recall that we had the output polyphase vector of order m which was a product of two matrices, the synthesis polyphase matrix and the analysis polyphase matrix and here we had the input polyphase vector, all these were order m, m here is the factor of down sampling and up sampling. Now, we could look at the product of these two matrices here. So, when we take the product of the synthesis polyphase matrix and the analysis polyphase matrix, we get a composite matrix square in nature and of size equal to the input of that matter the output polyphase vector of order m. So, it is very easy to see that the product of the synthesis and analysis polyphase matrices of order m is a square matrix. Size m cross m and the question that we are trying to answer is what should this square matrix be for perfect reconstruction. Now, the answer is very easy after all what does perfect reconstruction mean? It means that the output must be a delayed possibly delayed and a scaled version of the input. In other words, for perfect reconstruction we require y z the z domain is some constant times z raise to the minus t times x z and all that we need to do is to look at the relationship between the polyphase components on either side. So, if we decompose y z and x z, y z in the form summation k going from 0 to m minus 1, z raise the power z raise the power z raise to the power minus k y k m z raise to the m and similarly for x, we can now establish a relation term by term. So, we have summation k going from 0 to m minus 1, y k m z raise to the m times z raise to the minus k is c 0 z raise to the minus t times z raise to the minus t times summation k equal to 0 to m minus 1 z raise to the power minus k x k m z raise to the power m. Now, all that we need to do is to take this z raise to the minus d inside and combine it with z raise to the power minus k. So, we have that becomes c 0 summation k going from 0 to m minus 1 z raise the power minus d plus k x k m z raise to the m and now all that we need to do is to separate d plus k. So, you see d is fixed for all k, if you look at this d plus k essentially carries out a rearrangement of the poly phase components. So, what it does you know let me take an example. Suppose m is equal to 2 let us write down to fix our ideas. Suppose m for variety instead of 2 let us take it to be equal to 3 and let us take d to be equal to 5. So, let us make a table k can of course, take the values 0 1 and 2. So, k plus d will take the values 5 6 and 7 and 5 is clearly equivalent to 2 6 is equivalent to 0 and 7 is equivalent to 1 modulo 3. Therefore, in this specific example where m is equal to 3 and d is equal to 5 the effect is to take the 0 th component of the 0 th poly phase component of order 3 of the input and map it to the 2 th number 2 poly phase component of the output. The 1 number poly phase component of the input get maps gets mapped to the 0 number poly phase component of the output and number 2 gets mapped to number 1. Essentially what we have is a cyclic rearrangement of the poly phase components and therefore, if we look at the product matrix what we require is that every row and every column must have only one non zero entry that non zero entry must be identical for each of the rows of that matter each of the columns. In other words, if you take every row and if you take every column there is exactly one non zero entry that entry is identical. It is same entry repeated the constant factor in each of these entries is c 0 and of course, the additional delay or the additional shift that we have depends on d. For example, in this case where d was equal to 5 the additional shift you know there will be there will be a factor of z raised to power minus 3 coming in. So, each of the poly phase components in addition to being rearranged in this way is multiplied by z raised to power minus 3 on the up sampled scale and if we replace z raised to power of m by z it is equivalent to multiplication by z inverse. So, this is the summary of the relationship between the input and the output poly phase components. Let us write it down explicitly. For perfect reconstruction the synthesis matrix times the analysis of the poly phase synthesis matrix poly phase must be of the following form. Each row and column has exactly one entry of the form c 0 z raised to power minus l. l essentially comes from d it depends on d. For example, with d equal to 5 and m equal to 3 and m equal to 3 is equal to 3 and poly phase vectors and matrices written in z cubed. So, we have the flexibility of writing the poly phase matrices in z cubed or just in z. If we write them in z cubed then l is equal to 3. If written in z then l is equal to 1. Now of course, this was meant to be illustrative. So, I leave it as an exercise for the student to work out a few more such examples. And in fact, at this point I shall raise a question, but not answer it immediately. And the question is if we have not obtained perfect reconstruction, but if the analysis synthesis system together becomes a linear shift invariant system. That means, one can equivalently treat the output as being acted upon rather the output as the result of the input being acted upon by a linear shift invariant system with a certain transfer function. What can we say about the entries of this product matrix when this linear shift invariance is present in the overall analysis synthesis structure? Can we attribute a certain structure to this product matrix? As I said I only raise the question at this point, but do not answer it right away. We leave it for reflection and possible answering at a later stage. Anyway with that discussion on the polyphase approach, let us now take the second approach that we had mentioned the last time namely the modulation approach. Now as I said the polyphase approach is essentially a time domain approach. The modulation approach is as we will see essentially a frequency domain approach if we like to call it that way. And the modulation approach essentially proceeds as follows. We look at one branch, so let us say the l th branch small l. We have the analysis filter h l z a down sampler by a factor of m and up sampler by a factor of m followed by a synthesis filter g l z and we wish to establish the relation across this. So, in other words all these branches with difference synthesis filters g l z are going to come together in summation to form y z. So, we could call this y l z and we shall write an expression for y l z in terms of x z here using a modulation paradigm. Now the idea behind the modulation paradigm is to look at the combination of these two operations here down sampling by m and up sampling by m as we noted even before is essentially multiplication by a periodic sequence. Let us call it as p m n, p m n is 1 whenever n is a multiple of m and 0 else. Now in the modulation approach we think of the process of down sampling followed by up sampling as modulation by a sequence and that sequence is again broken into its component sequences each of which is an exponential. The reason why we choose the exponential is because it is easy to analyze what happens in the z domain when we multiply by an exponential and how can we express such a sequence in terms of exponentials? Well we take recourse to the idea of the discrete Fourier transform. So, we fix our attention on one period of this periodic sequence. We take the discrete Fourier transform of this period that tells us the components of one period along so to speak different modulators. Let me do that what I am saying is consider one period p m n restricted to 0 to m minus 1 and take its t f t that is easy to calculate. The d f t is capital P or let us write p tilde for convenience p tilde m as a function of k if you like essentially a dot product of one period of the sequence with the exponentials. W m here being defined as e raised to the power j 2 pi by m. Now we know how to reconstruct p m n from its discrete Fourier transform but before that let us evaluate this expression. This expression is very easy to evaluate. It has only one non-zero term in the summation and that is p m 0. So, in fact p m tilde k simply becomes 1 for k going from 0 to m minus 1 and therefore, reconstruction is very easy p m n in fact not just in the region between 0 and m minus 1 but everywhere is 1 by m summation k going from 0 to m minus 1 1 times W m raised to the power n k for all n. Essentially we have done an inverse t f t here. Having said this now it is very easy to see what we are doing to the input sequence. You see if we look at this branch once again if we take this branch and look at it carefully once again we know what has happened here. Essentially there is a modulation of the sequence here by a periodic sequence. We can write down the z transform of the sequence here with great ease and we can also write down the z transform of the sequence here by using the principle of modulation. So, let us write down at each point. We have x z there after being processed by H L z we have x z times H L z. Now, this is modulated by 1 by m summation k going from 0 to m minus 1 W m raised to the power k m and recall that when we modulate a sequence by alpha 1 by m raised to the power of n z is replaced by z alpha inverse in the z transform. If we use this property repeatedly and note that the z transform is a linear operator then we have x z H L z there after down sampling and up sampling. What we obtain is that is 1 by m summation k going from 0 to m minus 1 x z W m raised to the minus k times H L z W m raised to the power minus k. So, therefore, we have m modulates of the input being acted upon by corresponding m modulates of the analysis filter and now we know what happens when this is subjected to g z that is very easy. So, what we have here essentially is y L z the L th branch carries on it g L z times summation k going from 0 to m minus 1 x z minus 1 x z W m raised to the power minus k times H L z W m raised to the power minus k. Now, we could write this in matrix vector form. So, we could write a vector of y L here and we could write down what is called a modulation matrix and a modulation vector. The modulation vector here of course, it is the input which creates a modulation vector and the modulation vector is going to be of size m cross 1. The size of this vector here of y L is going to be as many as the number of branches here and of course, what is then going to be done is to add up all of these to obtain the output. Let us write down a typical row of the modulation matrix the L th row of the modulation matrix is essentially g L times g L z times H L z to the power z into omega W m to the power of 0 H L z W m to the power minus 1 and so on up to H L z W m to the power minus m minus 1. So, essentially the modulation vector here is modulates of the analysis filter multiplied by the synthesis filter. Now, it is very easy to put down a condition for perfect reconstruction or at least shift invariant reconstruction. So, for perfect reconstruction we first want alias cancellation and alias cancellation essentially means no contribution from x z W m raise the power minus k for k not equal to 0. The only contribution we desire is for the case where k is equal to 0 and if we go back to the structure of modulation here. So, if we look at the structure once again what we are asking for is that the first element of this vector must encounter a corresponding non possibly non 0 column, but all the other elements of this vector must encounter 0 columns here and therefore, what we are asking for essentially is that the first first column of the modulation matrix is the only non 0 column. Well, the other way of looking at it is well this is a very stringent requirement. So, this is sufficient, but of course as we can see it is not necessary. The slightly more relaxed condition would be in summing up all the y l z we would like the other terms to be cancelled. So, what we are saying really is if we take the sums of all the after all what we are going to do is to take the sums of the columns here in the modulation matrix when reconstructing the output from the input. In these sums we are going to involve essentially terms x z x z W m to the power 1 2 3 and up to m minus 1 the sums corresponding to the terms other than k equal to 0 must be 0. So, although 0 columns is a good thing to have that would be possible only in the ideal case and therefore, we would in general ask not for 0 columns, but columns with sum to 0. So, a more general condition is sums of columns in the modulation matrix equal to 0 for all k not equal to 0. Now, before we conclude the discussion on this approach of modulation to fix our ideas let us consider the concrete case where we have a 3 channel filter bank with m equal to 3. Let us write down the modulation matrix explicitly. So, the modulation matrix is going to have the form well you know it is easy to write down as a diagonal matrix times another matrix H 0 z H 0 z W 3 H 0 z or if you like W 3 inverse and H 0 z W 3 to the power minus 2. Similarly, H 1 H 2 in the column 2nd and column 3rd here what we would then desire of course, G 0 z multiplies each of the the first row G 1 z the second row and G 2 z the third row. So, what we would ask for is that G 0 z or rather G L z times H L z raise the power W 3 to the power minus k summed for L going from 0 to 2 must be 0 for k equal to 1 and 2. So, essentially what we are asking for is that these columns would sum to 0 here in the product. Now of course, we can actually carry out an exercise to write down the ideal filters for the 3 band filter bank and build the idea from there and I encourage the class to work out this exercise. Consider the ideal 3 band 3 channel filter bank where the analysis and synthesis filters are each triple band filters. So, the low pass filter there is an ideal filter with pass band from 0 to pi by 3, the middle filter is a band pass filter with pass band from pi by 3 to 2 pi by 3 and the last one is an ideal high pass filter with pass band from 2 pi by 3 to pi and work out the modulation terms explicitly to see how they come together and cancel Elias terms. As I said we have been doing a lot of concepts all this while and my objective in a couple of the subsequent lectures is to introduce some applications particularly applications that have been investigated by the class that was taught this subject this semester. I have invited to this lecture some of the groups of students who have done an excellent job in their application assignments specifically we have two groups that will present themselves today very briefly and in greater detail in a subsequent lecture. Today's will be a trailer so to speak just an introduction to their applications. The two applications that we are going to look at is first an application on face recognition and another application on data basis or data mining without taking the thunder away from the people who are going to introduce the application today. Let me now hand over to the students who are going to briefly introduce the application today and discuss in depth later. Thank you. As a part of course work we the students of this course have looked at some of the applications that include domains like biomedical engineering, image processing, audio signal processing, a few applications in mathematics and a few applications in data mining. In fact the application today that I am going to present is from image processing. My name is Ronak Shah and the topic that we are going to cover is face recognition through wave packet analysis. So, there are two keywords here one is face recognition and the other is wave packet analysis. Now why face recognition? We can look this particular keyword as biometric authentication problem but the problem is face recognition incorporates change in signals so faces can be changed abruptly. So, this will be a difficulty if we go for biometric authentication whereas some other signals like retina and fingerprint they cannot be changed or morphed so easily. So, face recognition as that case has limited application in biometric authentication. So, where do we require it? We require face recognition in some part as activity analysis. Let us say we are looking at a surveillance application in which we have to man some particular region in which no persons are allowed. In that case if we go for face detection and recognition we can get a very good hand over the particular region. So, that we can say that somebody entered at this particular time and what he was doing. So, we can basically go for activity tracking as well as abnormality detection. So, what that person was doing is also applicable in that case. What we are looking at is face detection as well as recognition whereas these things are always coupled face detection and recognition approaches are always different like face detection when we go for we are looking for those features which are common to all faces whereas in case of face recognition we are looking at features which are different across faces. So, this problem can be decoupled in that sense and we are only going to look at face recognition here. So, here it is assumed that some region of some region of image that contains face is given to us and we are only going to do face recognition. As I said there are two keywords one is face recognition and another is wave packet analysis. Now why wavelet based approach and not other approach? If we look at typical face image it contains nose, eyes, mouth etcetera and these are in focus when we look at different scales in different subspaces because they contain different frequencies as well as spatial regions. So, we need to go for decorrelation in spatial as well as in frequency domain. So, this is the ideal application this is the signal where we need to look into time as well as frequency localization. So, that is where we are looking into wavelet domain. Now, wavelet gives better representation in terms of time and frequency that is fine that will be required for classification. So, why wavelet packet analysis? Now as we know if you pick features if these features are decorrelated as we get in wavelets but if they are more rich in terms of information we can classify it better and that is what we do with wavelet packet analysis. With wavelet packet analysis we are not only decomposing low frequency bands, but we are also decomposing the bands which are at high frequencies and this gives richer representation for the face image. So, there are two things here we are decorrelating in space as well as in frequency domain and we are getting better representation. So, what we need to do is given an image we need to decompose by wavelet wave packet analysis and then we can represent it by features and these features are well decorrelated. So, we can do a very good classification. The only problem that stands now is with the dimensionality see if we decompose this image into let us say multiple sub bands let us say some 10 or 15 sub bands the data that we have for classification is immense and as we know like the curse of dimensionality that requires a lot of images for classification and that we cannot do. So, one thing we can do is we can go for moments based approach and we can take only first and second movement mean and variance with features and then we can classify that we can do. So, this is just a showcase I am going to show a few slides in which there are some results of decomposition and some basic retrieval we are going to see detail approach in subsequent lectures. So, this is the basic wave packet analysis we can see. So, given a face image we can decompose it into approximation and detail subspaces how this is done and which filters are utilized that we are going to see in detail subsequent lectures. So, this is level one decomposition in level 2 decomposition we can similarly decompose approximation as well as detail subspaces. So, we will get some 16 subspaces in which one will be approximation and some 15 will be detail subspaces. Now, we need to generate features for this as I said we are going to use mean and variance only for feature representation. Now, come to think of this when we utilize Euclidean distance we generally have features which are not mean and variance together because we need we are now looking towards PDFs probability density functions rather than individual values. So, we need a distance metric which takes care of mean as well as variance. So, normal Euclidean distance will not perform better in that case. So, we need to go for some other distance and that will be utilized later that I will talk about later in subsequent lectures. Now, I am going to show some of the decomposition results this is just for introduction. So, we can see given an original image like this Lena in the face image we can decompose into different bands here we can see this is the approximation sub image or other subspace. So, we can see some of the details very clearly and these are the like all other 15 are detail subspaces. So, they basically capture some high frequencies. Now, the problem with this original images if we go for approximation we cannot capture low frequency the DC because we need to take care of lighting condition as well. So, this approximation so, in that case we cannot utilize low and high frequencies as we traditionally use in wave packet analysis. So, what we are going to use will be again in subsequent lectures and I am going to show some of the results and I will conclude this showcase for this particular application we have used Yale database. So, given an image like this which has different expression like Yale image Yale database contains some 15 subjects and 11 different expressions and lighting conditions. So, if you get better results here like your algorithm must be robust in that case. So, given a query image like this we either need to retrieve images of the same class like this, but as we can see expressions are different all the when lighting conditions are also different or for other application we might go for given a single image where either only interested in let us say the class to which it belongs or we are interested in all the images. So, in later case we can go for activity analysis and first case we are going for recognition problem traditionally. So, this is what I am going to present in subsequent lecture in detail and with this I will conclude the showcase. Good morning the topic of our presentation for this application assignment is application of wavelet in data mining. I am Orko Choudhury and my other group member is Kunalsha. In today's world we need to deal with the huge amount of data for a lot of practical purposes and data mining is a subject better to say it is an ensemble of the methods or tools which we use to deal with huge amount of data efficiently for our own purposes. Now, this dealing with data involves two things one is storing it with the help of an efficient data structure and second is a retrieval of data from the data structure as for our own purpose. Now, for this purpose when we have to store and retrieve the data the user basically interacts with the data structure by the help of some queries and responses. Now, in practice when we have a large amount of time series data the queries that are generally encountered are not point queries rather they are the queries which spends over some larger duration of time such as I am if I am having a data structure which says that I am having the stock prices the daily stock prices of a company over a particular period of time then the queries which generally we encounter are something like this on which months the stock prices had a rising trend or on which weeks the stock prices suddenly had a deep dip. So, in order to get this data we need to do some post processing on the raw data and we get the output of this queries this way we interact with the data structure and we get the output. Now, here we can think that now in this case of this application assignment we can think that why we are correlating wavelet with this type of situations. Now, we all know that wavelet transform on a signal gives us the information at various levels of trends at better to say at various levels of abstraction and with the various translates and various scales. Now, if you practically look at a data structure where the raw data can be thought of as a sequence or signal better to say then we can think that we are also interested in various translates and scales of the signal in particular if we say our daily stock price data as a sequence then depending on our queries we can say that we are interested in various translates on the data such as we are interested in a data two months back or we are interested in a data six months back. So, this two months six months these are different translates at the same time we can also explain it in this way that we are interested in a data at different scales such as we are interested in a in a weekly data around two months back. So, in that case that two months becomes a translate and the week becomes a scale similarly we are interested in a monthly data two years back. So, in that case that monthly data becomes the scale and the two years back that two years becomes the translation parameter. So, based on this analogy we found that wavelet can be used very efficiently in this situation to deal with this type of analysis and in this case if we use wavelet then we need a very little post processing to analyze this type of data because whatever data mining technique we use our main aim is directed on two things. The first one is that we need a least memory crunchy data structure and the second one is we need the least amount of post processing that is the post processing complexity becomes very less. So, if we use wavelet in this case our post processing complexity reduces drastically because if we have to do the response if we have to answer to the query based on only the raw data then we have to do a lot of amount of post processing. Now, let us have a deeper look in what we have exactly done in our application assignment we have basically done the trend and surprise analysis of a time series data. We have done the trend and surprise analysis of a time series data at various levels of abstraction and for this purpose we have used a particular data structure which is called a trend and surprise abstraction tree in acronym it is called a TSI tree and it is it looks like something like this at this x node it is something like a tree and the root node and the top at the top level this root node which is the x node it is the original sequence itself and now all the subsequent nodes this one a 1 d 1 a 2 d 2 these nodes are obtained by discrete wavelet transform of its parent node and in this way we constructed tree which is called a TSI tree and as we go down this tree by taking the discrete wavelet transform at this level again we take the d w t on a and we get this a 2 and d 2 again we take d w t on a 2 we get a 3 d 3 and so on we can proceed in this way the number of levels as what we want now when we go down each level it is something like we are increasing the all level of abstraction by 1 level each and whenever we need a trend or surprise at any level say at this level. So, first we need to extract out this node here and each node corresponds to a 1 particular sequence. So, first we need to extract out this node and from this node with some further post processing we have to find the trend information corresponding to this level the almost similar to apply to the surprise information also if we have to extract out the surprise information at this abstraction level. So, we need to first figure out this d 2 node and from d 2 node we have to do the post processing to get our surprise extraction. Now the next part of our job is that we have to implement this thing in a memory efficient manner. Now for this purpose it is important to look into that matter that at the first appearance it may appear that we need to store this whole variability into our memory for our operation. But it is a little deeper look we will say that we do not need all the nodes to store in the memory if we store only these leaf nodes we can generate any of the intermediate nodes from which we can start our calculation and so only this leaf nodes are enough to get any of the intermediate nodes. So, we just need to store only the leaf nodes and for further on we have compared to more algorithms which are known as node dropping and coefficient dropping which talks about further compressing the leaf node information. So, that to get a more memory efficient implementation of this method. So, this is the whole outline of our work that which we have done and we will elaborate it in further details in the subsequent presentation. Thank you. So, we saw two very interesting introductions to applications by Ronak Shah and Orko Chaudhary. Of course, both of these students and their groups would present the application, the results, the concepts in much greater depth in a subsequent lecture. What we intend to do today was to raise the curiosity of the student to want to understand these applications better and we shall satisfy that curiosity in a subsequent lecture. Thank you.