 Good morning to all of you and welcome to this fourth lecture on the subject of digital signal processing, its applications. We have two lectures where we have not really answer any questions from the class and therefore let us begin this lecture by first asking whether you have any questions which need to be addressed. So I would request you to raise your hand and ask the question, I will repeat the question and I will answer the question in sequence, yes. So yes I have one question from here, so the question is there was a reference to analytic signals in the class, what exactly are analytic signals, analytic signals are signals which have continuous derivatives of all orders, the signal itself is continuous, its derivative is continuous, its second derivative is continuous that means in some sense an analytic signal is just about as smooth as you can get, it is the smoothest possible, it is a class of signals, analytic signals form a class of signals which are as smooth as they can be, they have infinite number of continuous derivatives, yes, any other questions, yes. Yes, yes, yes, that is a very good question, so the question is when you sample a signal our reasoning was that the original spectrum is repeated at every multiple of the sampling frequency, is not it, you take the original Fourier transform of the signal move it to every multiple of the sampling frequency then you reflect it or mirror image it and put it also at every sampling frequency and all these copies are added together to give you what constitutes the sample signal and the question that is asked is does this not mean that a sample signal has infinite energy because you have so many infinite copies all of them contain some finite energy, so therefore the sum of all of them must diverge in terms of energy, well the answer is yes. In fact what happens when you sample, let us see, so what we are doing here is first answering some questions, is not it, so you see take sampling, in sampling what are you doing, you have this original continuous signal, let us assume your sampling interval is t that means you take a sample here and what do you mean by taking a sample essentially take a very narrow pulse and multiply it by the value of the signal at this point then take another such narrow pulse and multiply it by the value of the signal at a point spaced t from there and repeat this for every such spacing of t and so on, is not it, now what really is this pulse, where is this pulse going, you know let us focus our attention on the point of sampling, what was happening when you added all those synosoids, when we took a pure sine wave and we sampled it and we looked at the point of sampling considering that many sine waves have the same samples at those points, we said all of them when they come together they form the, you know they add constructively at the points of sampling and destructively elsewhere, is not it, what happens at the points of sampling, they add constructively that means the amplitude starts diverging, is not it and of course at all other points they add destructively, so it is over an infinitesimally narrow region that you have a constructive interference, everywhere else it is destructive. Now how do we represent this process, we represent this process by a limiting concept called an impulse, what is an impulse, an impulse can be construed as an object, note I am not quite calling it a function, I am calling it an object, it is a generalized function, which has a width of delta and a height of 1 by delta and delta goes towards 0, what it means is you maintain the area, the area of the impulse is unity, the area is maintained, but if you look at the energy or what can be called the energy here may be a little unfairly, the energy is essentially see how do you, now what do you mean by energy, you must think of this as a voltage being applied to a 1 ohm resistance, so the current flowing in that resistance would be 1 by delta, right over that interval of delta, so how much of power would be consumed, it would be 1 by delta squared times R, right that is 1 and what is the total energy for, this happens for a time delta, so total energy consumed is 1 by delta the whole squared into delta, which is 1 by delta, so it is 1 by delta squared into delta and this diverges, so the energy in the impulse diverges as delta tends, so you see for an impulse is the energy tends to infinity and that actually is what is happening in sampling, so in the limit if you take idealized sampling you are actually talking about an infinite energy process, but of course sampling is never ideal, so what happens in practices you do not have impulses, you have pulses, so they have finite energy for any small but not 0 delta, 1 by delta squared times delta is a finite quantity, right, so in practice you have finite sampling intervals and therefore you do not quite get idealized sampling and the manifestation in the frequency domain is that all the copies do not have the same height, moreover hopefully if your pulses are narrow enough, the original spectrum, the first, the main, the real, you know the true person, the true spectrum is not affected seriously, but all other copies are distorted by the process of sampling, so that the answer is yes, in fact sampling is indeed an infinite energy process and we have to treat it like that, good, very good. Any other questions before we proceed, yes there is a question there, the question is what is the difference between an analog signal and digital signal, well the main difference is that the independent variable in an analog signal is continuous and a digital signal is discrete, but when you say digital signals, strictly speaking it is also the dependent variable which is discrete, so maybe the question should be reframed as what are the differences between analog signals, discrete variable signals and digital signals, an analog signal has the independent and dependent variable continuous, a discrete variable signal has the independent variable discrete or sampled, but the dependent variable is continuous and that is the kind of situation we will deal with, a digital signal notionally has both the independent variable and the dependent variable as discrete, yes, any other questions, yes there is a question there, so the question is for a digital signal is it necessary that the independent variable be discrete, well yes, normally we expect to deal with situations in a digital signal where the independent variable is discrete, right, I mean it is almost, it is very rarely that we would think, so normally when we say digital signal we are talking about discrete, independent variable, discrete dependent variable, yes any other questions, yes, well we will take a question, yeah, constructive and destructive interference, constructive and destructive interference means all of them come together to annul one another, so they go towards 0, when they add, as you add more and more and more terms they all fall to 0, they all cancel one another out in the sum, that is what destructive interference means, in fact the word destructive interference can be thought of as in the context of waves, you know when you have many waves which come together they could either add constructively or destructively, if they add constructively their amplitudes go up, if they add destructively their amplitudes go down, the sum of the, the sum has an amplitude which keeps falling as you bring in more and more terms, that is what I meant by destructive interference, yes, so the question is what is the difference between a Fourier series and a Fourier transform, well a Fourier series applies only to a periodic signal, right, so it is only when a signal is periodic that you can talk about its Fourier series, that too of course it satisfies certain conditions called the Dirichlet conditions in addition to being periodic we would not go into that nicety here, anyway for reasonable periodic signals which are not too peculiar you may allow me to say that, you can decompose them as a sum of sine waves all of whom have frequencies which are multiples of the frequency of the original periodic signal, now the amplitudes and phases of those sine waves constitute what is called the Fourier series representation, now take an a periodic signal, an a periodic signal can be thought of as a periodic signal with its period tending to infinity and therefore the fundamental frequency tends towards 0 and that means instead of having a collection of discrete frequencies those frequencies come infinitely close, infinitely similarly distant from one another and therefore instead of a discrete set of points on the frequency axis we now need to deal with the whole continuous frequency axis and that becomes the Fourier transform, okay, yeah, yes please, yeah, yeah, could you repeat the last part of your question why do you need two variables, all right, so I will repeat the question briefly or I will try and put the question in context, you see the question is when we were trying to understand the effect of sampling we introduced you know what we call a rock round multiple that is we introduced the term 2 pi nk and we said if you add 2 pi nk to the phase it makes no difference to the to the sine wave at all that is how we analyze that is there are several sine waves which have the same samples and the question is why did we need to put n times k there, well we need to put n times k because I need one time index and the other one you know to give you the multiplicity of possible sine waves which can come in, so k is the index which gives you the multiplicity of sine waves which can play a role there and n is the index which tells me the variation in time, right, so I need a time index and a multiplicity index together, right, I need to I mean nk together makes an integer but I need to recognize that there are two kinds of multiplicities which I can bring in, two kinds of you know ambiguities, right, one is well it is not really time I would not call it an ambiguity it is essentially just a function of time but the ambiguity comes from k is that right, yeah, so any other questions that, yes, yes, yes, well the question is if I am sampling a band pass signal which filter should I use, well he is asking me to answer the challenge which I want, right, that is a part of your challenge, yes, any other questions, okay, good, so write down your answer, now any other questions, yes, now let us take questions from other people also, yes, yes, you see the question is if I wish to analyze a periodic signal do I first need to take a Fourier series and then construct the Fourier transform vice versa, well you know these are actually more matters of representation, what is more important is that you understand what you are doing, when you are taking a Fourier series you are thinking of the periodic signal as a combination of sine waves, now it does not matter whether you write them in one way or the other on the frequency act, what is important is that you appreciate that when you go to the Fourier series you are essentially thinking of the signal as a combination of discrete sine waves, sine wave with discrete frequencies and then whatever you do should be done with that understanding, it does not matter how you represent it, I mean those are only, I mean cosmetic points, how you represent it or those are not as important as understanding what you are inherently doing, I would always encourage a student to understand what he is doing in the transform domain rather than worry about the representation so much, yes, yes, any other questions before we proceed to discuss further, yes, we will take maybe just a couple of questions, yes, yes, yes, that is a good question, so the question is you know if you were to sample with a finite pulse not an infinite pulse, so you know here let me go back to this drawing, here I am talking about a pulse with width delta and height 1 by delta, if I were to sample with delta not equal to 0 here, right, so I am saying sample with delta not equal to 0, right or delta finite non-zero, how would I analyze this, well I will give you the main steps, right, the analysis would proceed as follows, think of the following periodic signal, so here we have a periodic signal, we assume that delta is much smaller than the sampling interval, we can write a Fourier series for this periodic signal. Now the change that you need to make in your copies is that if this delta were to tend to 0 then all the copies are of the same amplitude and the phase of the copies I have already explained how to get, on the other hand when you have a situation like this where you have a finite pulse each copy occurs at a multiple of the sampling frequency which is also a Fourier series component that Fourier series component has an amplitude and a phase, so the copy at that component, the copy at that multiple of the sampling frequency is modified in amplitude and phase by the Fourier series term at that multiple, so the answer is write down the Fourier series for this, find out the Fourier series component at each multiple of the sampling frequency, the component the copy which is brought to that multiple of the sampling frequency is modified in amplitude and phase by the Fourier series term falling on that multiple of the sampling, okay, so that means typically what would happen is the Fourier series terms would decay as you go away from 0, so you would find the copies also decay in amplitude and of course would also undergo a change of phase and what is more is you know it depends on now there are two ways of doing it, one way is you just gate the signal for some time, there is a subtle difference between these two things, you just allow the signal to pass for a small interval of time and chop it away, that is one way to do this, the other way is not to gate it but to capture the value of the signal at a point in time and hold it for a short while, now there is a very fundamental difference in the way you analyze these two and as is my habit I shall leave the difference to you as a challenge, how do you distinguish the two cases in the spectral domain, my answer is I will give you a brief answer to the question, the brief answer is when you gate it, that means when you allow it to pass for a short interval and then stop it, then you do exactly what I said a couple of minutes ago, you know you just multiply the copies by the Fourier series component but when you hold, when you sample and hold then you have trouble because not only are you multiplying the copy you are also distorting that copy, you are also distorting that copy by you know the spectrum of the pulse, so I leave this to you as a challenge, suppose I were to do these two different things, how would they differ in what happens on the frequency axis, so it is a you know it is a I mean for it would need to be analyzed based on a basic exposure to signal and system but anyway I am not expecting that you know you I am not thinking of it as a part of the syllabus but since somebody posed the question I put this to you as a challenge with this hint, yes by the way I encourage students to write down their attempts to the challenging problems and submit them, oral discussions are alright but you know I give credit when the solution is written down reasonably and submitted, is that right, yes maybe we can take just one question if there is any other and then we will continue with our discussion, yes, yes any other question, you have a question, okay, so the question is suppose I took a 0.7 kilohertz sinusoid and sampled it at 1.4 kilohertz, then you know the first mirror image would be at 1.4 minus 0.7, so the original signal and the mirror image overlap and with opposite phase, right and therefore we expect them to cancel, that is what very often happens, you know they cancel, in fact they cancel depending on where you sample and in fact this is easier understood in the time domain, suppose I were to take a sinusoid, now when you say that the sinusoid has a frequency of 0.7 kilohertz and you are sampling at 1.4 kilohertz, another way to interpret this is that you have a sampling rate twice of the frequency, in other words in every period you would have two samples, now the original spectral components, sinusoidal component and the mirror image would cancel one another if you sampled here, it would give you all 0 samples, on the other hand if you were to sample here, they would not cancel one another, so it is not obvious that they would cancel one another, it would depend on the point of sampling, but there is a potential problem of their cancelling one another, if you happen to begin the sampling from a 0 crossing, okay, alright. Now that was several questions, we can of course encourage more questions in subsequent lectures and not only in subsequent lectures in this lecture as well as we proceed, so from now onwards it should be made, now I was very happy that you know we had several questions come up from the class, in future too we must make this course a dialogue and not a monologue as I have told you in the first lecture, we insist and we think it is very important that you should participate wholeheartedly in the discussion for otherwise the classroom would not be as effective as it should, so we shall make this practice, so whenever you have a question you do not have to wait until I explicitly invite questions, whenever there is a question in between you must raise your hand and we shall attend to that question and decide how to deal with it at that point in time.