 Welcome to the second lecture on the subject of digital signal processing and its applications. In the first lecture, a very brief lecture, we had essentially introduced the theme of digital signal processing. In fact, let me make a remark here having completed the discussion in the first lecture. We had said that our objective in this course is essentially to discretize the independent variable and make do with that discretization, looks like a very simple task. After all, you are just seemingly constructing an equivalent signal and obviously then constructing equivalent systems whatever that might mean and you are carrying out the same task as you would on the so-called continuous signal or analog signal as the literature would call it on the corresponding sample signal. The task is much more difficult than it seems at first glance and it would take us quite some lectures to build up the whole framework in which we can do this. We intend to begin doing this from the lecture today. Now let us first put down the objective of the lecture today and then expand upon that subsequently to look at how we are going to build up ideas in the future. So in today's session, the objective is to answer the following question. What is a satisfactory way in which we may discretize a signal? Need to put this question down in so many words because we need also to identify a little more rigorously what we mean by some terms that we have used. Two important terms which we need to expand upon are satisfactory and discretize. We understand these terms intuitively but we need to bring about a slightly more formal understanding of these terms. Now let us take the first term satisfactory, what we mean by satisfactory? Well by and large what we mean by satisfactory is not losing information so to speak, not losing something that is critical. So you see we need to ask whether the process of discretization causes us to lose something and if so what does it cause us to lose? The second term as I mentioned that we need to identify and understand is the term discretize. What exactly do we mean by discretize? Of course we have an intuitive understanding. To our understanding discretize means use only the values of the signal at chosen values of the independent variable. Very often this process has been called the process of sampling. So for example let us take an audio signal. An audio signal the independent variable is time and the simplest thing to do is to choose the values of the signal at uniformly spaced points. So suppose we have this I will just sketch an audio signal. Let us assume that there is a voltage waveform corresponding to the audio signal. In fact now let us start using some notation. We shall denote the independent variable without any loss of generality by T. In fact very frequently the independent variable would indeed be time and therefore we shall use T to denote the independent variable. Also without any really serious loss of generality we will use X of T to denote the independent variable, the dependent variable. So X of T as a function of T. Now again let us go back to the definition that we had just put down. Discretize means use only the values of the signal at chosen values of the independent variable. So we have to put down a process of choice. What is the process of choice? The most obvious of the processes is to choose what is called uniform sampling. Uniform sampling means take values of the independent variable which are spaced with the same spacing between any two successive instance. So for example let us go back to the signal that we drew a minute ago. Let T be what is called the sampling period here and let this be the point small t equal to 0. What we are saying in effect is we are going to take the values of the signal at T, T, T, T, T, T, T, T and so on on this side and at minus T minus 2 T and so on on this side. So we are going to use these values which we would call samples and of course we want them to satisfy that basic definition that we had when we spoke about being satisfactory. Satisfactory meant not losing something that is critical and we need now to understand what it is that is critical or how we can judge whether we are losing something that is critical or not. Now let me spend a minute in putting down an approach. You see what we are first going to do is to try and answer this question in the context of one of the most used or one of the most frequently referred to wave forms in the literature the sinusoid. I shall say a lot about the sinusoid or the sine wave as it is popularly called at different points in this course but at this point in time I want to spend a couple of minutes in if you may want to call it that extolling the virtues of the sine wave and the reason why we base our thinking in signal processing or at least in a first course on signal processing on the sine wave so much are signal processing engineers or people who undergo research undertake research in signal processing so much are they formed of the sine wave that they tend to think of all reasonable signals as comprised of sine waves. Now you may wonder why this is the case why the sine wave why not a square wave why not a triangular wave why not some other peculiar kind of wave form which might also have some interesting characteristics well one of the important reasons is that the sine wave is probably one of the smoothest functions that one can encounter in nature smoothest in the sense that if you look at the derivative of a sine wave it is a sine wave of the same frequency add to sine waves of the same frequency and you get a sine wave of the same frequency when you integrate a sine wave take the indefinite integral of a sine wave of a particular frequency you get a sine wave of the same frequency. So sine waves in that sense have a persistence in their existence under several operations differentiation, integration, summation of sine waves of the same frequency and what is beautiful is that when you are talking about sine waves and if you are dealing with sine waves of a particular frequency under these operations the frequency remains unchanged. Now, let me just to convince you about the salient nature of the sine wave in this context. Pick a couple of other waves to show the contrast. So, let us take the triangular wave in contrast. You can visualize this being repeated. Now, visualize another triangular wave of the same frequency, but displaced. Now, of course, same frequency, I buy same frequency. Firstly, of course, I mean that this wave is periodically repeated and that the period is the same. So, you know this period from here to here is maintained. Let us call that period T1. I draw another triangular wave perhaps of a different amplitude if you please, but the same frequency. It is a little displaced here and this interval is also T. Do not worry too much if the drawing is not so accurate. It is a sense which is to be conveyed. Now, it is very, now of course, this would you know continue downwards here and this would again go upwards there and so on. You could continue and complete this. Anyway, the idea that I am trying to bring out here is that when you add these two sine waves or rather non-sine waves, when you add these two periodic functions, what you get is of course, a collection of straight lines. So, you know how to add waveforms like this. You would have to first divide it into segments which comprise of straight lines of the same kind. Let us take this segment for example. Here you have a sum of two straight lines which is going to be another straight line and of course, you know when you have two points on a straight line, the straight line is determined completely. So, at this point for example, you would have essentially this and at this point you would have the sum of this and this. You would have to take essentially you know if this height is h here, then you would have to place h above here like this and join this while I will do that by using a dot and a dash. Now after that, you could sum up these two segments of the straight line and you can keep doing this. I mean you have to keep dividing this triangular wave or pair of triangular waves into small segments each of which are straight lines and you know the straight lines do not change in that segment. So, you know here the straight line is changed from here. So, you cannot include this part and this part in the same segment. You have to use different segments and the moment one of the straight lines changes or the moment one of the small straight line segments comes to an end, you need to change the segment over which you are adding. So, anyway you can see that here again you will have another sum of that kind. So, you know here it is going to be this plus this or twice of this you know whatever it is and you know you can keep drawing I mean I will not complete this I will leave it to you as an exercise to complete the sum, but what is not too difficult to see is that when you add these two triangular waves albeit of the same frequency they do not give you a triangular wave of the same frequency that is what we lose when we talk about triangular waves. Now of course something very similar is seen in the context of square waves I shall just make one drawing to explain this to you. So, perhaps if you were to take two square waves of the same frequency let me use two square waves where the positive and negative periods are equal I will just draw a couple of periods of these and this can continue here this can continue there. Now if you just displace this, you know let us displace it if you like by half of the you know half of the half period if you like to call it that. So, you can visualize that this is how it would look and you can complete this. Now it is very easy to add these two square waves adding square waves is very easy of course you can use the same idea there are small segments here of straight lines and you can add straight lines when you add two straight lines you get a straight line that is easy to do. Now for example let us take numbers here for variety suppose this is 4 and this is minus 4 and therefore if this is for variety half of that amplitude 2 and minus 2 then in this region you would have 4 minus 2. So, you would have just 2. So, I will just show a dot and dash here and here you would have 4 plus 2 that is 6 and this could then continue you can keep drawing this you know. So, here it would be of course minus 4 plus 2. So, you have minus 2. So, again I leave it to you as an exercise to complete the sum. Anyway for square waves being added we have the same problem and I think we should put it down in so many words. When we add two triangular waves or square waves of the same frequency or of the same period we do not get the same kind of wave. Of course you know they look like combinations of straight line segments that is all right, but they are definitely not square waves as we knew them in the beginning or triangular waves as we knew them in the beginning.