 Hello everyone, I am Prashant S. Malge, Assistant Professor, Department of Electronics Engineering WID Swalapur. Today, we will see how to design a fire filter using frequency sampling method, the learning outcome. At the end of this session, student will be able to design a fire filter using frequency sampling technique. Now, let us consider this example. Consider a filter with a desired frequency response given by h d e raise to j omega, which is equal to e raise to minus j 3 omega from omega between 0 to pi by 2 and will be 0 for pi by 2 to pi. For this given desired frequency response, we need to determine the filter coefficients h of n, where the size m is given as 7 using type 1 frequency sampling method. First of all, we will plot this frequency response. So, we know that this h d e raise to j omega is a periodic function with period 0 to 2 pi. Now, it is from 0 to pi by 2 it is e raise to minus j 3 omega, the magnitude of this is 1. So, up to pi, so will be equal to 1 and from 0 to or pi by 2 to pi, it is equal to 0. So, as the same thing is periodic with period 2 pi. So, on this side, the 3 pi by 2 to 2 pi it will be 1. So, this is the magnitude response of your desired frequency response. Now, to design it within using frequency sampling method, we obtain the coefficients of DFT coefficients by sampling this inner range of 0 to 2 pi at. So, h k we get by using h d e raise to j omega, where omega equal to omega k, where this omega k is equal to 2 pi by m k, where k is equal to 0 to m minus 1. So, in this case, the value of m is equal to 7. So, therefore, this will be omega k equal to 2 pi by 7 k, where k equal to 0 to 6. So, using this, we obtain the DFT coefficients. So, with k equal to 0, this is the first sample, when k equal to 1, this omega k will be 2 pi by 7, k equal to 2, this omega k will be equal to 4 pi by 7. Now, this value 4 pi by 7 is more than pi by 2 means it somewhere it will fall here, when k equal to 1, it is 2 pi by 7 means this will fall somewhere here. So, k equal to 0, k equal to 1, this is k equal to 2, with k equal to 3 it will be omega k equal to 6 pi by 7, somewhere which is which is still less than pi. So, it will fall somewhere here, with k equal to 4, it will be 8 pi by 7. So, it will be more than pi somewhere here, with k equal to 5, it will be 10 pi by 7. So, still it will be because 3 pi by 2 is more than, so it should be more than 10.5. So, still it is will fall somewhere here, when k equal to 6, it is 12 pi by 7. So, it will fall somewhere here. So, this is k 7 sorry 6. So, it means what for k equal to 1, k equal to 0 that is omega k equal to 0 and k equal to 6. So, we will get these samples, for rest of the cases that is for k equal to 2, k equal to 3, 4 and 5, the sample points will be 0. So, therefore, we can get H of k will be equal to H d k, where k is omega k sorry H d e raise to j omega, omega k equal to 2 pi by 7 k. So, now H d e raise to j omega is basically e raise to minus 3 j omega. So, it will be equal to e raise to minus j 3 omega k with k equal to 0 to 6. So, therefore, this H k will be equal to, when k equal to 0 this is or in general if I put omega k equal to 2 pi by 7, this will be minus j 6 pi k by 7, k equal to 0, k equal to 1. It is 0 for k equal to as we have seen from this k equal to 2, 3, 4 and 5. So, 2, 3, 4, 5 and once again it is equal to e raise to minus j 6 pi k by 7, when k equal to 6. So, this is what where we get the coefficients of this DFT. So, these are known as the DFT coefficients. In frequency sampling method, we obtain the impulse response H of n by taking the I DFT of this. So, therefore, H of n is equal to 1 upon m k equal to 0 to m minus 1 H k e raise to j 2 pi n k upon m, where n is equal to 0 to m minus 1. So, if we substitute these values 1 upon m, now for k equal to 0 rather this is equal to k equal to 0 to m minus 1. This value is e raise to minus j 6 pi k by 7 into e raise to j 2 pi n k by 7. So, this is the value of H of n. So, from this we obtain the impulse response as H of n is equal to 1 upon 7 summation k equal to 0 to m minus 1. So, from this e raise to here this pi k by 7 is common rather 2 pi k by 7 is common. So, 2 pi k by 7 is n minus 3. So, if we substitute the value of n for k equal to 0 1 and 6. So, if we substitute the value of k equal to 1 it will become when k is 1 this is sorry k equal to 0 this will be 1 plus when k equal to 1 it is e raise to j when it is 1 2 pi by 7 n minus 3 plus when k equal to 6 it will be e raise to j 12 pi k by 7 n minus 3. So, now for H n to be real your H of k and H of m minus k must be complex conjugate of each other. So, now if you look at from this. So, this and this must be complex conjugate of each other. So, now if I write e raise to j 12 pi k by 7 n minus 3 which is equal to e raise to j this 12 pi I can write as 14 pi minus 2 14 pi minus 2 pi by 7 k n minus 3 which is equal to this is 7 2. So, separating these two terms we will get this as e raise to j 14 by 7 it is 2 pi k n minus 3 into e raise to minus j 2 pi by 7 k n minus 3 ok I am sorry this k will not be there. So, it is e raise to minus j 2 pi n minus 3 now this part for any value of n where n is an integer is always equal to 1. So, therefore, this is equal to e raise to minus j 2 pi by 7 n minus 3. So, substituting this in this equation we get it as H of n equal to 1 by 7 1 plus e raise to j 2 pi by 7 n minus 3 plus e raise to minus j 2 pi by 7 n minus 3. So, if you look at this e raise to j 2 pi by 7 n minus 3 and 2 pi by 7 n minus 3. So, this is we can simply write this as 1 plus 2 cos of 2 pi by 7 n minus 3 because this is e raise to j theta plus e raise to minus j theta divided by 2 if I take. So, this will be 2 cos of 2 pi. So, this is what is the impulse response. So, therefore, your H of n will be equal to 1 by 7 1 plus 2 cos 2 pi by 7 n minus 3. So, this is the value of impulse response H of n for our filter. So, here we have to obtain this H of n for n equal to 0 to 6. So, we will get 7 samples and so this is how we can design the filter by using frequency sampling method. So, it means just to revise this reference. Thank you.