DSPRelated.com
Forums

FIR Filter Question

Started by I. R. Khan September 21, 2004
Thanks Fred and Jerry for your help.

If the magnitude response of a filter is
H(w) = pi  sin(w/2) - sin(w), where w is frequency,
then does this filter has linear phase, and how much is the delay?

If you plot H(w), you will find that it is a differentiator, more accurate
at higher frequencies.

If response is H(w) = sin(w/2), then I can understand that this filter has
coefficients {-1, 1}, and if it is H(w) = sin(w), then coefficients are {-1,
0, 1}. But I am unable to understand it in this form. Please comment on
whether this filter can be implemented in time or frequency domian or both?

These differentiators are presented in IEEE T. CAS 36(6) 890-893, 1989.

Regards,
Ishtiaq.

"I. R. Khan" <ir_khan@hotmail.com> wrote in message 
news:2ri622F1amb7hU1@uni-berlin.de...
> Thanks Fred and Jerry for your help. > > If the magnitude response of a filter is > H(w) = pi sin(w/2) - sin(w), where w is frequency, > then does this filter has linear phase, and how much is the delay? > > If you plot H(w), you will find that it is a differentiator, more accurate > at higher frequencies. > > If response is H(w) = sin(w/2), then I can understand that this filter has > coefficients {-1, 1}, and if it is H(w) = sin(w), then coefficients are > {-1, > 0, 1}. But I am unable to understand it in this form. Please comment on > whether this filter can be implemented in time or frequency domian or > both? > > These differentiators are presented in IEEE T. CAS 36(6) 890-893, 1989.
Ishtiaq,
> If the magnitude response of a filter is > H(w) = pi sin(w/2) - sin(w), where w is frequency, > then does this filter has linear phase, and how much is the delay?
Well, because you say this is the "magnitude response" there's no phase information. So, except in special cases, there may not be enough information to answer the question about phase and delay.
> If response is H(w) = sin(w/2), then I can understand that this filter has > coefficients {-1, 1}, and if it is H(w) = sin(w), then coefficients are > {-1, > 0, 1}. But I am unable to understand it in this form. Please comment on > whether this filter can be implemented in time or frequency domian or > both?
It seems to me that you've answered your own question. You have the frequency response and you have the filter coefficients - which are also the values of the unit sample response ("impulse response") in the time domain. Actually I believe your second assertions are incorrect. If H(w) = sin(w/2) then H(w) is odd and h(t) would be purely imaginary. Ditto for H(w) = sin(w). So, I believe you will find that you need to specify H(w) = -jsin(w) to get those real coefficients. I'm unclear as to what you don't understand. If there are two unit samples spaced 1 sample distance apart then you will get a sinousoid of the lowest possible frequency in the transform. If they are spaced two samples apart, you will get a sinusoid that is double that frequency, etc.... Maybe it's easier to visualize if you start in the time domain with .. 0 0 0 -1 1 0 0 0 .. unit sample spacing of 1 where time=0 occurs between the two unit samples. and .. 0 0 0 -1 0 1 0 0 0 .. unit sample spacing of 2 where time=0 occurs at the center zero. Note that the first example has samples spaced at T but they are separated from t=0 by KT+T/2 where K is an integer. Perhaps better said is that the first one, in order to beDoubling the sample rate will make that more apparent: .. 0 0 0 0 0 0 -1 0 1 0 0 0 0 0 0 .. unit sample spacing of 2 and .. 0 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 0.. unit sample spacing of 4 For something like matlab or scilab you would actually write these to get purely imaginary transforms as: [1 0 0 0 0 0 0 -1] t= T 3T (N-1)T and [0 1 0 0 0 0 0 -1] t= T 3T (N-1)T so that they have antisymmetry around t=0 and t=N or. As you probably know, these can be viewed as periodic sequences that look like this: [1 0 0 0 0 0 0 -1 1 0 0 0 0 0 0 -1......] t= T 3T NT [0 1 0 0 0 0 0 -1 0 1 0 0 0 0 0 -1 .....] t= T 2T 4T NT The symmtetry is more obvious around NT so you have to visualize the "wrap" from t=0 to t=NT in the length N sequences. Fred