 So we saw so far, so we now understand. We can multiply the original ideal impulse response by a window function Vn, that window function could be rectangular, the window function could be triangular, the window function could be cosinosoidal and could have several other shapes. Now the question is why should we have other shapes? We were beginning to answer the question in the previous lecture but now we will complete the answer. Now we saw for the case of the rectangular window and we now also make the statement that this is true for most windows that there is in the DTFT of the window, DTFT of Vn which we will call V omega typically a main lobe and several side lobes. This is typical, side lobes of decreasing amplitude. In fact just to convince ourselves, let us see how you could obtain the discrete time Fourier transform of the triangular window. Now the triangular window can be obtained by convolving the rectangular window with itself. So if you have a rectangular window between minus capital N by 2 and plus capital N by 2, let us call this Vrn for rectangular and if we convolve Vrn with itself, we get Vtn or the triangular window which looks like this minus capital N to plus capital N. It goes maybe to the highest value in a triangular fashion at 0 and then drops on either side as you go to N. Needless to say here we assume that capital N is even to make matters simple. Now that is not necessary. I mean you could always conceive of a triangular window even if N is odd but here we will make matters simple to understand how the discrete time Fourier transform looks. Now when you convolve two sequences, the discrete time Fourier transforms are multiplied. So we know what the discrete time Fourier transform of Vrn is. We have calculated it the last time. It is dt of t is sin N by 2 plus 1 omega by 2. In fact 2 N by 2 plus 1 omega by 2 divided by sin omega by 2. We have seen that the last time. All that we need to do is last time we had calculated for a length of capital N and now N has been replaced by N by 2. Now you see the triangular window is therefore going to have the dt of t squared. Let us call this Vr capital Vr omega. So obviously Vtn is going to have the dt of t Vr omega squared and we can sketch that. So Vr omega had an appearance like this. We saw it the last time. Where upon Vt omega is going to have an appearance something like this. Now the beauty is Vt omega is going to be always non-negative because where if you treat the amplitude of this is 1. If you treat the, I mean if you, of course you remember that this was 2 N plus 1 or you know where N is the length or here it would be 2 into N by 2 plus 1 but let us call this height h whatever it be and let us call the small h or you know to distinguish let us call it capital H1 and small h1. So you see this is going to be h1 squared here and this is going to be small h1 squared and therefore one thing that you see is that the drop of height from the main lobe to the first or the principle side lobe is going to get squared when you go from the rectangular to triangular window. So for example I mean just to take an example suppose you happen to find that the height of the side lobe is some percentage of the main lobe height then treating that percentage of the fraction. So if that percentage is 20 percent I mean that is too small but anyway suppose that percentage is let us say 30 percent then you treat it as 0.3. So now you are going to have 0.3 the whole squared that is going to be lower that means the side lobes are going to be of squared lower height that means the side lobes in some sense have got suppressed but again not without a cost. You see we also see where the main lobe ends. This main lobe ends at the point 2 pi by capital N is not it? 2 pi by the this width is inversely proportional to the length of the window. So you know when now what is going to happen is that when the rectangular window had a length of capital N and when it has a length of capital N by 2 now this width is going to be more and of course this width and this width are equal because it is just the square. So therefore now the width has got doubled although the side lobes have been suppressed the width has got doubled for the same length. So when you open the rectangle with the triangular window of the same length the side lobe the first the principle side lobe and therefore all the other side lobes are suppressed to the square of the original rectangular window but the width has got doubled. So there is a compromise as you see between the width of the main lobe and the strength of the side lobes. So we note this. For the same length N going from the rectangular window to the triangular window means compromise between main lobe width and side lobe strength you can understand strength in different ways. We will see which specific way we should use later but one way to understand strength is the relative height of the side lobe as compared to the main lobe. Now you see why are we interested in this compromise? We now need to go back to what we were doing the last time. We need to see what exactly these main lobes and side lobes do in degrading the frequency response. And we now go back to the drawing that we had created the last time. We had tried to analyze the effects. So we said now by the way I would like to mention a very interesting innovation which one of the students in the class suggested Vivek Kumar. So you see last time we had written we had of course observed that we need to convolve. We need to make a periodic convolution. So we had this ideal impulse response here omega c and minus omega c and we needed to convolve it with so this is the ideal I mean sorry not the ideal frequency response of the low pass filter. We were trying to observe what happens in the case of the low pass filter and we also had and you know I need to move it so I am going to draw this on a separate sheet of paper. You also had this window spectrum v omega and now we have agreed we have seen two examples and for the moment we will say this is always true that you know you have main lobe and side lobes the window spectrum. Now we said that we have essentially to move one against the other and we can choose either to move the window spectrum over the ideal response or the ideal response over the window spectrum. Now you see how do you carry out the periodic convolution? One way to carry out a periodic convolution is to truncate the two periodic functions which you are trying to convolve periodically. Now that amounts to truncating one of them to one period. So you could either choose to truncate the ideal filter response to one period and retain the periodicity of the window spectrum or you could choose to truncate the window spectrum to one period and retain the periodicity of the ideal filter. So essentially a periodic convolution means to retain the periodicity of one of those periodic functions and to restrict the other only to one period and then convolve. Now that was an interesting observation by one of the students and we will do that now. So last time we are of course started justifying that we do not but here all that we need to do is to so you know let us essentially restrict the window spectrum to one period and we will keep the you know periodicity of the ideal filter. You could do it the other way also. So now let us see once again what happens when you convolve. So I will start moving this as we did the last time. So there we are. We saw that there are three regions that we need to deal with. One region is when the main now here we are moving the window spectrum and we have agreed that this variable should be called lambda here and this variable is also lambda and this is at the point lambda equal to omega here. So when omega is far enough so that it is essentially some of the weak side loops that fall into the pass band then what do we observe as omega goes from that point and allows these side loops to move into the pass band then the resulting frequency response is the integral of the part of this window response that falls within the pass band as you vary omega. So each omega you need to calculate an integral and integral of that part of the side loop which falls into the pass band. And as you can see this area is going to oscillate weakly because there is going to be sometimes a negative contribution and then sometimes a positive contribution and sometimes a negative contribution. So there is going to be you know a smooth movement from negative to positive to negative and what is there is that as you come as omega comes closer to the pass band edge here as omega comes closer to the pass band edge the stronger side loops come into the pass band and therefore that oscillation grows and grows to a point where the principle side loop has entered the pass band as is here. Afterwards there is only going to be a growth upwards because it is the main loop which is going to enter the pass band. The main loop contributes a huge area in comparison with all the other side loops. So once the main loop begins to enter this and there is a steady upward growth of the area of the frequency response. And this growth continues all the way up to where the main loop is within is entering the pass band. So right from here where you know main loop has just begun to enter up to the point where the main loop has completely entered you have a steady growth of area. So the frequency response rises at that point. After it has thus risen to a sufficiently high level then we have again just the side loops playing their game. So the principle side loop of course first plays its game and then the weaker side loops start entering and while the principle side loop enters some of the weaker side loops are leaving from the pass band and so on and so forth. So what can we see as an overall consequence of this movement of the window function over the ideal pass band? We see the following nature of the degraded frequency response. Far away around pi you would have some weak oscillations. Then you would have a strong movement upwards and then again a strong oscillation and weaker oscillations as you go to the center and then a strong oscillation and then a downward movement and then weaker oscillations again. So this is the part where the main loop is entering the pass band. This is the part where the main loop is in the pass band and these are the parts part A and A dash where the main loop is out of the pass band. Is that clear to everybody? What is more is that these oscillations are going to be stronger just as the main loop has entered and just as the main loop is leaving because the strongest side loops are either entering or leaving there and they become weaker towards the center. The strongest oscillations are just around this point of entry and the weaker oscillations are away. Is that clear to everybody? Yes, everybody understands this and now we can also see what results in each of these quantities. So how long would this region last? How long would this region last? This region would last as long as the main loop needs to enter and that means the width of the main loop plays a role in this region. How high would these oscillations be? These oscillations would be as high as the area under the principal side loops. So the oscillatory part, the oscillatory part what we can see very clearly is the oscillatory part or the ripples in the resultant frequency response are governed by the side loop area and the transition band. Now we will give up that name, the transition band is governed by the main loop width. Please note, the transition band is the part where you move from what is effectively the stop band here to the pass band here, the effective pass band and the movement from stop band to pass band is governed by the main loop width. The oscillations in the pass band or in the stop band are governed by the side loop area. The main loop width and side loop area is what plays a role in the quality of the response. Now we know why we have to choose between windows. We had the rectangular window, we could choose the triangular window, we could choose a cosine window, we could choose several other shapes and the whole game is a compromise between main loop width and side loop area. In fact we have seen that right in the case of the rectangular and triangular window. We can at least see the compromise of main loop width to see the change of side loop area requires a little more calculation but I in fact put it as an exercise for you. Approximate the side loop, the principle side loop area for the triangular window in comparison with the rectangular window for the same length n and show that when you move from a rectangular window to a triangular window of the same length n, you are actually making a compromise between main loop width and side loop area. The triangular window is going to have a longer width, a larger width, main loop width but the side loop area would come down and in fact different shapes would have a compromise. Now as I said it is not always a compromise in you know of inconvenience. People have designed windows strategically and window design is as much of an art as a science because what you would like to do ultimately is to gain both in terms of main loop width and side loop area. Can you have less main loop width and less side loop area? Well you cannot do too much in that direction but you can do a little bit and we shall see in the next lecture one systematic approach to designing windows which in some sense offer a good compromise between main loop width and side loop area. Thank you.