DSPRelated.com
Forums

Frequency response of an FIR filter

Started by I. R. Khan February 17, 2004
Hi all,

If h is the impulse response of an FIR filter then Sum[h(n) Exp(j w n)]
describes its frequency response. What is the range of n for an odd length
filter? Is it n = -N : N, or n = 0 : 2N? How about even-length filter; will
it be n = 0 : 2N-1 or n = -N/2 : N/2?

Regards,
Ishtiaq.

"I. R. Khan" <ir_khan@hotmail.com> writes:

> Hi all, > > If h is the impulse response of an FIR filter then Sum[h(n) Exp(j w n)] > describes its frequency response. What is the range of n for an odd length > filter? Is it n = -N : N, or n = 0 : 2N? How about even-length filter; will > it be n = 0 : 2N-1 or n = -N/2 : N/2?
It could be any of the above or something else yet. In general, the n in the sum you listed runs from negative infinity to positive infinity. The limiting factor is the non-zero extent of the impulse response h[n], and that simply depends on the system being represented. For example, let's say you are given a filter with response from n = -N to +N (an odd filter of length 2*N+1). If a delay of 2*N samples is added to that system, the new system still has length 2*N+1 but runs instead from N to 3*N, which is neither of your odd-length forms. -- % Randy Yates % "Remember the good old 1980's, when %% Fuquay-Varina, NC % things were so uncomplicated?" %%% 919-577-9882 % 'Ticket To The Moon' %%%% <yates@ieee.org> % *Time*, Electric Light Orchestra http://home.earthlink.net/~yatescr
> "I. R. Khan" <ir_khan@hotmail.com> writes: > > > Hi all, > > > > If h is the impulse response of an FIR filter then Sum[h(n) Exp(j w n)] > > describes its frequency response. What is the range of n for an odd
length
> > filter? Is it n = -N : N, or n = 0 : 2N? How about even-length filter;
will
> > it be n = 0 : 2N-1 or n = -N/2 : N/2?
Ishtiaq, It would help if you'd very carefully write the equation out completely. Then you'd have the answer: N H(w)=sum [h(n)*e^-jwn] where N is the number of individual coefficients in the filter polynomial expression. n=1 N is the number of coefficients in the filter. So, you see?, this answers the question. If you choose to change how this is implemented for efficiency, then you could change the number of multiplies and adds. Maybe that's what you were wondering. And then, it's not "odd length" or "even length" so much as it's "symmetrical" or "anti-symmetric" or not either one that makes the difference. Fred
Thanks Fred,

In fact the thing which confused me was representation of H in sin/cos forms
for (anti) symmetric filters.

Let h = {h1, h0, h1} be the impulse response, then

H1 = h1 e^jw + h0 + h1 e^(-jw )= h0 + 2h1 cos (w)

Or

H2 = h1 + h0 e^(-jw) + h1 e^(-2jw) = e^(-jw)[h0 + 2h1 cos (w)] = e^(-jw) H1

What is the importance of this e^(-jw)? How does it affect the magnitude and
phase responses? Is this some kind of measure of delay?

Regards,
Ishtiaq.

This is a multi-part message in MIME format.

------=_NextPart_000_01C6_01C3F584.3DA83D70
Content-Type: text/plain;
	charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable


"I. R. Khan" <ir_khan@hotmail.com> wrote in message =
news:c0ucjd$1asiv4$1@ID-198607.news.uni-berlin.de...
> Thanks Fred, >=20 > In fact the thing which confused me was representation of H in sin/cos =
forms
> for (anti) symmetric filters. >=20 > Let h =3D {h1, h0, h1} be the impulse response, then >=20 > H1 =3D h1 e^jw + h0 + h1 e^(-jw )=3D h0 + 2h1 cos (w) >=20 > Or >=20 > H2 =3D h1 + h0 e^(-jw) + h1 e^(-2jw) =3D e^(-jw)[h0 + 2h1 cos (w)] =3D =
e^(-jw) H1
>=20 > What is the importance of this e^(-jw)? How does it affect the =
magnitude and
> phase responses? Is this some kind of measure of delay?
The shifting property of the Fourier Transform where <-> refers to a = time<->frequency dual for:=20 f(t) <-> F[w] then:=20 f(t-t0) <-> F[w]e^-jwt0 So, yes, to multiply by e^-jwt0 in frequency represents a shift in time =
> is a delay (or advance) ... exactly.
Similarly: f(t)e^jw0t <-> F(w-w0) for a shift in frequency (which is less often = useful) Fred ------=_NextPart_000_01C6_01C3F584.3DA83D70 Content-Type: text/html; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-2022-jp"> <META content=3D"MSHTML 6.00.2737.800" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY> <DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3D"Courier New" size=3D2>"I. R. Khan" &lt;</FONT><A=20 href=3D"mailto:ir_khan@hotmail.com"><FONT face=3D"Courier New"=20 size=3D2>ir_khan@hotmail.com</FONT></A><FONT face=3D"Courier New" = size=3D2>&gt; wrote=20 in message </FONT><A=20 href=3D"news:c0ucjd$1asiv4$1@ID-198607.news.uni-berlin.de"><FONT=20 face=3D"Courier New"=20 size=3D2>news:c0ucjd$1asiv4$1@ID-198607.news.uni-berlin.de</FONT></A><FON= T=20 face=3D"Courier New" size=3D2>...</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2>&gt; Thanks Fred,<BR>&gt; = <BR>&gt; In fact=20 the thing which confused me was representation of H in sin/cos = forms<BR>&gt; for=20 (anti) symmetric filters.<BR>&gt; <BR>&gt; Let h =3D {h1, h0, h1} be the = impulse=20 response, then<BR>&gt; <BR>&gt; H1 =3D h1 e^jw + h0 + h1 e^(-jw )=3D h0 = + 2h1 cos=20 (w)<BR>&gt; <BR>&gt; Or<BR>&gt; <BR>&gt; H2 =3D h1 + h0 e^(-jw) + h1 = e^(-2jw) =3D=20 e^(-jw)[h0 + 2h1 cos (w)] =3D e^(-jw) H1<BR>&gt; <BR>&gt; What is the = importance=20 of this e^(-jw)? How does it affect the magnitude and<BR>&gt; phase = responses?=20 Is this some kind of measure of delay?<BR></FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2>The shifting property of the = Fourier=20 Transform where &lt;-&gt; refers to a time&lt;-&gt;frequency = dual</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2>for: </FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2>&nbsp; f(t) &lt;-&gt; = F[w]</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2>then: </FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2>&nbsp; f(t-t0) &lt;-&gt;=20 F[w]e^-jwt0</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3D"Courier New" size=3D2>So, yes, to multiply by e^-jwt0 = in=20 frequency represents a shift in time &gt; is a delay (or advance) ...=20 exactly.</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3D"Courier New" size=3D2>Similarly:</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2>&nbsp;f(t)e^jw0t &lt;-&gt; = F(w-w0) for a=20 shift in frequency (which is less often useful)</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3D"Courier New" size=3D2>Fred</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3D"Courier New" = size=3D2></FONT>&nbsp;</DIV></BODY></HTML> ------=_NextPart_000_01C6_01C3F584.3DA83D70--