 design an FIR filter of length 2n plus 1 by truncation. Now the obvious thing to do impulse response of the FIR filter let us call it h FIR of n well I think we should call it small h. So we will use small h because we are using capital H for the frequency responses. So clearly FIR n is h ideal n for n between minus capital N and plus capital N and 0 else is the obvious way to do it retain the samples from minus capital N to plus capital N throw away the rest. Now this is equivalent this is equivalent to multiplying the ideal impulse response by other function which is one between minus capital N and plus capital N and 0 outside. So this is equivalent h FIR n is equal to h ideal n times V n. V n is called a window function please V instead of W for window W is likely to be confused with omega and I do not want to use W for that reason. So we will use V. So V n in this case is equal to 1 for n between plus N and minus N and 0 else that is obvious. So multiplied by a function which is 1 in the range where you are retaining the samples and by 0 in the range where you are throwing away the sample that is an obvious way. Now why this approach or why this perspective is useful to us is because it immediately gives us a clue how we can identify the scars that are produced in this truncation. I said that when you cut something I mean that is to be expected when you cut something it is going to leave a scar. What scar does it leave on the frequency response is what we now need to understand. And the obvious thing to do is to see what happens when you multiply two sequences in the time domain as interpreted in the frequency domain. Now we have done this when we discussed the discrete time Fourier transform. At that time we had just mentioned that this multiplication property would be useful when we did talk about FIR filter design but now we are actually coming down to the brass stalks of where this is useful. So obviously if you were to take the ideal response h ideal of N has the frequency response or the DTFT given by h ideal of omega. VN has a certain DTFT which we will calculate in a minute and we call it capital V of omega. And obviously the discrete time Fourier transform of h FIR which we shall in a minute denote by h capital H FIR omega, human as follows. H FIR omega is as we know 1 by 2 pi integral over a contiguous range of pi we could choose the principle interval minus pi to pi. Well you know we have a choice we could either move V or we could move h ideal. Let us choose to move V we will see why that is better. H ideal lambda times capital V omega minus lambda D lambda. So it is like a convolution on the frequency axis a restricted convolution evaluated between minus pi and pi we have derived this property before. Now let us calculate to get a feel of how V omega looks let us actually calculate it. So V omega looks like this. It is a discrete time Fourier transform summation N going from minus N plus N 1 that is the value of VN in that region and 0 outside e raised to power minus j omega N. Now we can expand this. It is e raised to power j omega N plus e raised to power plus j omega N minus 1 plus and so on plus 1 plus e raised to power minus j omega and all this up to e raised to power minus j omega N. And obviously this is the geometric progression with the first term equal to e raised to power j omega N and the common ratio equal to e raised to power minus j omega. And therefore we can calculate this discrete time Fourier transform by using the sum of a finite geometric progression. One ratio e raised to power minus j omega first term or leading term e raised to power j omega N and that is e raised to power j omega N 1 minus e raised to power minus j omega 2 N plus 1 that is the number of terms that there are divided by 1 minus e raised to power minus j omega. This is the sum. Now we can do a little bit of work to get this in the form of a sign by a sign. So we can rewrite this as e raised to power j omega N times e raised to power minus j omega 2 N plus 1 by 2 2 j sin into omega 2 N plus 1 by 2 divided by e raised to power minus j omega by 2 2 j sin omega by 2. We can do this by extracting e raised to power minus half of this e raised to power half this argument common from the numerator and e raised to power half of this argument common from the denominator. That is what we have done here e raised to be e raised to half this argument common in the numerator and e raised to half this argument common in the denominator. And the rest of course is 2j sin as you can see. Now it is not at all difficult to evaluate this part of the expression. All that we need to do is to add these indices, add these powers. So it is e raised to the power j omega n minus j omega into 2n plus 1 by 2 minus j omega by 2. That is easy to do. And it is very easy to see that it adds to 0. And therefore this leaves you with just a 1, a unity factor. And the 2j is cancelled. And therefore what is left with us is v omega turns out to be sin omega into 2n plus 1 by 2 divided by sin omega by 2. A very, very important expression indeed. We can sketch this. Both of them begin with 0 at omega equal to 0. As far as the denominator is concerned, it goes all the way up to omega equal to pi that is sin pi by 2 which is 1. So it takes only a one quarter of a cycle between 0 and pi. As far as the numerator is concerned it takes 2n plus 1 quarter cycles. So that is a little more difficult to visualize. So the denominator is like this. Please remember it is very easy to see v omega is equal to v minus omega. That is very easy to see. You also notice that this impulse response, this sorry this window function vn is real and even. So hf, v, vn and v minus n are the same. And of course vn is real. A real and even sequence has a real and even discrete time Fourier transform. And that is what you of course observe here. This Fourier transform, this discrete time Fourier transform is indeed real and even as expected. I need to work, I am quite satisfied working on the positive side of omega and then mirroring it on the negative. Now as far as the numerator goes, it begins with 0 and then there are plus 1 quarter cycles. One thing is guaranteed. Since the number of quarter cycles is odd, you are definitely going to end with either plus 1 or minus 1. That is you are going to end either here or here. Now it depends. If n is equal to 0, you are going to end with plus 1. If n is equal to 1, you are going to end with sin 3 pi by 2 which is minus 1. Again you go to plus 1. So it is all, you see as n goes from 0 onwards, 0, 1, 2, you alternate between plus 1 and minus 1 at the ending. So you see the beauty is that you are always going to end at 1 divided by 1 or minus 1 divided by 1. As far as the beginning is concerned, we can find out. Now the beginning means at omega equal to 0. What happens to the, what happens to v omega at omega equal to 0? Now here again, we do not need to use the expression, phi omega n by 2 and so on. You see v at 0 is obviously equal to 2 n plus 1. Why? Because it is just a sum of 1s. Now of course you could always take the limit and that limit is of course, it is equal of course to the limit as omega tends to 0 of sin omega 2n plus 1 by 2 divided by sin omega by 2. You could do that. So of course it is a continuous analytic function. But you do not need to do that. You could evaluate it directly at omega equal to 0. So it is very clear that there is going to be an oscillation. This window is going to, the window discrete time Fourier transform is going to exhibit an oscillation. v omega is going to show a pattern like this. This time I will draw it all the way from minus pi to pi. It is going to have what is called the main loop and then it is going to have a decreasing character. It will either end this way or this way. A plus 1 if n is even and a minus 1 if n odd and mirrored on this side. These oscillations are going to decrease because this begins from 2n plus 1. They are going to decrease because the denominator decreases. The denominator increases I am sorry. So that is very obvious. I mean you see the denominator as you can see is increasing from 0 to pi and the numerator is oscillatory and therefore the fraction would be decreasing in the amplitude of the oscillations. And finally it would reach either plus 1 or minus 1 here. This is the nature of the discrete time Fourier transform of this window function. Now there are two features that characterize. Of course you know where this first null would come. This first null would come where omega into 2n plus 1 by 2 reaches the value of pi or omega reaches the value 2 pi by 2n plus 1 and the negative of that point gives you the other null or the first null. So it is very clear that the window discrete time Fourier transform has what is called the main lobe. This is the main lobe and it has side lobes. This is the first principle side lobe and these are the other auxiliary side lobes. So there is a principle side lobe and the word principle is meaningful because this is the most significant side lobe in terms of height. That is to be expected because the denominator steadily decreases from steadily increases or 1 by the denominator steadily decreases. The denominator sin omega by 2 steadily increases from 0 to pi. So it is expected that the first side lobe is going to be the most significant immediately after the main lobe. So you have a main loop followed by side lobes. And of course you know how wide these side lobes are and you know where the main lobe ends. That is not too difficult to work out. This for example would be the point where omega into 2n plus 1 by 2 reaches the value 2 pi and therefore you can go on. In fact it is not too difficult to see that this would be twice this value 4 pi divided by 2n plus 1. So we have main lobes and side lobes. The window DTFT has a main lobe and side lobes and we shall now see what role this main lobe and side lobe play in creating scars on the ideal frequency response. As we have decided to do fix the ideal frequency response first, you have omega c and minus omega c and pi and minus pi. Now what I shall do is to move the window spectrum and to do that it is much easier for us to draw the window spectrum on a separate sheet of paper. We exaggerate it by drawing the main lobe and side lobe in prominence and the others are kind of you know they are of course there but we drawn this. This is the main lobe and the side lobes. Let us place this here and now let us move as we expect to do. You see now this is the lambda axis as you desire. Now this we should instead of calling it V omega we call it V omega minus lambda and then we have lambda here and obviously this point is where omega minus lambda equal to 0 or lambda equal to omega. So this originally 0 point is actually the lambda equal to omega point. Now it is moving. Is that right? So you see now we need to move omega all the way beginning from minus pi all the way up to plus pi here. That is how we need to move it and what we need to do at every step is to calculate the area under the product of these functions. You have the ideal response you have this window response you multiply them and then calculate the area under that product and of course then divide by 2 pi and so on. The division by 2 pi is just a constant multiplication all over. So we will not pay so much of attention to that. We will just pay attention to how much is the area in the product of these functions. If you look at it when omega is equal to minus pi as is the case here what is the situation? The situation is that if the main knob is small enough and what you mean by small enough is that capital N is large enough. So you have chosen not too small a filter length. If capital N is reasonable and what is reasonable you have to actually test out. But if it is large enough then the main knob width is small enough and if it is small enough so are the side lobes. So what it really means is that around omega equal to pi when this is the situation it is only a few side lobes that are coming into this one part. You see if you look at it the product of these functions is simply that part of the window response at which falls between minus omega c and plus omega c that is the product the rest of it is chopped anyway. So it is essentially this window spectrum as much of it as overlaps between minus omega c and plus omega c integrated that is the quantity at any value of omega. So at omega equal to minus pi it is only a few far away side lobes which are getting in which are coming into the past band and therefore that area is small. Not only that as I move this now we are going to start moving this as we move this by the way the next main lobe you will argue that this is a periodic function you must not forget it is periodic. So the next such main lobe is going to occur 2 pi away. So when this is at minus pi the next main lobe is at pi so anyway it is not going to bring in everything into the past band even so. So it is alright for us to look only at this set of main lobe and side lobes you know because the other one is 2 pi away so it is not going to interfere anyway. Now as you start bringing this from omega equal to minus pi towards minus omega c what is going to happen for some time is that it is just these weak side lobes that are going to come into the past band and what is the consequence of these weak side lobes of course the side lobes become stronger and stronger as omega approaches minus omega c. So the total area that is captured in the past band is going to be oscillatory because you have some side lobes that are negative some side lobes that are positive. So there is going to be some negative area contribution and some positive area contribution and initially those areas are going to be very small later on those areas are going to grow in quantity. As you come towards omega equal to minus omega c it is the more important side lobes and finally the most important side lobe which is going to play a role in the area and afterwards it is going to be the edge of when you when you reach the edge of the main lobe here then it is the main lobe which is going to start entering the past band and then we are going to have a totally different situation. Now we shall take up from this point in the next lecture to see what happens and then come to a conclusion about the nature of the frequency response that results when we so truncate. So thank you.