Hi! By definition the FIR filter delay is: (N-1)/2 The halfband filter has every other sample exactly zero. If the first and the last sample of the filter are exactly zero. What is the delay of the filter? (N-1-2)/2 ? Thats not what I am getting. Why? Thanks! Atmapuri

# Halfband filter delay!

Started by ●September 21, 2003

Posted by ●September 21, 2003

"Atmapuri" <Janez.Makovsek@usa.net> wrote in message news:jzhbb.3458$2B6.666916@news.siol.net...> Hi! > > By definition the FIR filter delay is: (N-1)/2 > The halfband filter has every other sample exactly zero. > If the first and the last sample of the filter are > exactly zero. What is the delay of the filter? > > (N-1-2)/2 ? > > Thats not what I am getting. Why?Actually the definition you give is for a *symmetrical* FIR. Flat delay, linear phase. The delay of the filter depends on how you align the input and output with respect to time. In simple terms: Think of the FIR filter as being made up of a series of delays and adders. Joe, knowing that the end coefficients are zero, just doesn't implement them saving two delays and two adders. The delay of his filter is "x". Ludvik, not caring about this, goes ahead and uses the delays and adders. The delay of this filter is "y" which is greater than "x". Another example: Mike builds a filter with an input buffer of K samples. The delay of his implementation is at least (n-1)/2+K plus whatever he may do at the output. So, if the zero coefficients are implemented, the delay is greater than if they are not. A theoretical measure of delay might consider the zeros at the ends as part of the length of the filter and would be "correct". However, there is no purpose in having zeros at the ends of a filter - after all, you could have many zeros at the end. So, the effective filter stops at the ends of the non-zero coefficient sequence. If implemented as a shorter, non-zero, filter, the delay will be less. Consider this: For *any* symmetric FIR filter you can determine the delay as you've done. Let us take all the symmetric FIR filters which are non-zero at the ends. Now, put as large a delay you like at the input to the filter. This adds a delay of that size. The same delay could be inserted at the output of the filter; same result. Or, you could add delays at the input and at the output of various sizes - which changes the delay of the structure accordingly; that's the same as having zero coefficients at the ends. Fred

Posted by ●September 22, 2003

Fred Marshall wrote:> "Atmapuri" <Janez.Makovsek@usa.net> wrote in message > news:jzhbb.3458$2B6.666916@news.siol.net... >=20 >>Hi! >> >>By definition the FIR filter delay is: (N-1)/2 >>The halfband filter has every other sample exactly zero. >>If the first and the last sample of the filter are >>exactly zero. What is the delay of the filter? >> >>(N-1-2)/2 ? >> >>Thats not what I am getting. Why? >=20 >=20 > Actually the definition you give is for a *symmetrical* FIR. Flat dela=y,> linear phase. >=20 > The delay of the filter depends on how you align the input and output w=ith> respect to time. > In simple terms: > Think of the FIR filter as being made up of a series of delays and adde=rs.> Joe, knowing that the end coefficients are zero, just doesn't implement=them> saving two delays and two adders. The delay of his filter is "x". > Ludvik, not caring about this, goes ahead and uses the delays and adder=s.> The delay of this filter is "y" which is greater than "x". >=20 > Another example: > Mike builds a filter with an input buffer of K samples. The delay of h=is> implementation is at least (n-1)/2+K plus whatever he may do at the out=put.>=20 > So, if the zero coefficients are implemented, the delay is greater than=if> they are not. A theoretical measure of delay might consider the zeros =at> the ends as part of the length of the filter and would be "correct". > However, there is no purpose in having zeros at the ends of a filter - =after> all, you could have many zeros at the end. So, the effective filter st=ops> at the ends of the non-zero coefficient sequence. > If implemented as a shorter, non-zero, filter, the delay will be less. >=20 > Consider this: > For *any* symmetric FIR filter you can determine the delay as you've do=ne.> Let us take all the symmetric FIR filters which are non-zero at the end=s.> Now, put as large a delay you like at the input to the filter. This ad=ds a> delay of that size. The same delay could be inserted at the output of =the> filter; same result. Or, you could add delays at the input and at the o=utput> of various sizes - which changes the delay of the structure accordingly=;> that's the same as having zero coefficients at the ends. >=20 > Fred >=20 >=20Fred, It's late and I spent the day showing a grad student how to design a=20 hardware multiplier using one adder and [shift] registers. I'm therefore = probably addled, but despite that -- possibly even because of it -- I=20 have the temerity to disagree with you. Consider an n-tap FIR. The only=20 significant thing to say about it is that the first tap weight is non=20 zero. It has a certain delay; whatever. Every zero-weighted tap placed=20 at the beginning adds one sample time to that. Zero-weighted taps added=20 to the end don't affect the delay. Jerry --=20 Engineering is the art of making what you want from things you can get. =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF

Posted by ●September 22, 2003

Ok, Got it. Thanks... Atmapuri "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message news:gwmbb.1813$v22.1681601@feed2.centurytel.net...> > "Atmapuri" <Janez.Makovsek@usa.net> wrote in message > news:jzhbb.3458$2B6.666916@news.siol.net... > > Hi! > > > > By definition the FIR filter delay is: (N-1)/2 > > The halfband filter has every other sample exactly zero. > > If the first and the last sample of the filter are > > exactly zero. What is the delay of the filter? > > > > (N-1-2)/2 ? > > > > Thats not what I am getting. Why? > > Actually the definition you give is for a *symmetrical* FIR. Flat delay, > linear phase. > > The delay of the filter depends on how you align the input and output with > respect to time. > In simple terms: > Think of the FIR filter as being made up of a series of delays and adders. > Joe, knowing that the end coefficients are zero, just doesn't implementthem> saving two delays and two adders. The delay of his filter is "x". > Ludvik, not caring about this, goes ahead and uses the delays and adders. > The delay of this filter is "y" which is greater than "x". > > Another example: > Mike builds a filter with an input buffer of K samples. The delay of his > implementation is at least (n-1)/2+K plus whatever he may do at theoutput.> > So, if the zero coefficients are implemented, the delay is greater than if > they are not. A theoretical measure of delay might consider the zeros at > the ends as part of the length of the filter and would be "correct". > However, there is no purpose in having zeros at the ends of a filter -after> all, you could have many zeros at the end. So, the effective filter stops > at the ends of the non-zero coefficient sequence. > If implemented as a shorter, non-zero, filter, the delay will be less. > > Consider this: > For *any* symmetric FIR filter you can determine the delay as you've done. > Let us take all the symmetric FIR filters which are non-zero at the ends. > Now, put as large a delay you like at the input to the filter. This addsa> delay of that size. The same delay could be inserted at the output of the > filter; same result. Or, you could add delays at the input and at theoutput> of various sizes - which changes the delay of the structure accordingly; > that's the same as having zero coefficients at the ends. > > Fred > >

Posted by ●September 22, 2003

"Jerry Avins" <jya@ieee.org> wrote in message news:bklrvh$hkv$1@bob.news.rcn.net... Fred Marshall wrote:> "Atmapuri" <Janez.Makovsek@usa.net> wrote in message > news:jzhbb.3458$2B6.666916@news.siol.net... > >>Hi! >> >>By definition the FIR filter delay is: (N-1)/2 >>The halfband filter has every other sample exactly zero. >>If the first and the last sample of the filter are >>exactly zero. What is the delay of the filter? >> >>(N-1-2)/2 ? >> >>Thats not what I am getting. Why? > > > Actually the definition you give is for a *symmetrical* FIR. Flat delay, > linear phase. > > The delay of the filter depends on how you align the input and output with > respect to time. > In simple terms: > Think of the FIR filter as being made up of a series of delays and adders. > Joe, knowing that the end coefficients are zero, just doesn't implementthem> saving two delays and two adders. The delay of his filter is "x". > Ludvik, not caring about this, goes ahead and uses the delays and adders. > The delay of this filter is "y" which is greater than "x". > > Another example: > Mike builds a filter with an input buffer of K samples. The delay of his > implementation is at least (n-1)/2+K plus whatever he may do at theoutput.> > So, if the zero coefficients are implemented, the delay is greater than if > they are not. A theoretical measure of delay might consider the zeros at > the ends as part of the length of the filter and would be "correct". > However, there is no purpose in having zeros at the ends of a filter -after> all, you could have many zeros at the end. So, the effective filter stops > at the ends of the non-zero coefficient sequence. > If implemented as a shorter, non-zero, filter, the delay will be less. > > Consider this: > For *any* symmetric FIR filter you can determine the delay as you've done. > Let us take all the symmetric FIR filters which are non-zero at the ends. > Now, put as large a delay you like at the input to the filter. This addsa> delay of that size. The same delay could be inserted at the output of the > filter; same result. Or, you could add delays at the input and at theoutput> of various sizes - which changes the delay of the structure accordingly; > that's the same as having zero coefficients at the ends. > > Fred > >Fred, It's late and I spent the day showing a grad student how to design a hardware multiplier using one adder and [shift] registers. I'm therefore probably addled, but despite that -- possibly even because of it -- I have the temerity to disagree with you. Consider an n-tap FIR. The only significant thing to say about it is that the first tap weight is non zero. It has a certain delay; whatever. Every zero-weighted tap placed at the beginning adds one sample time to that. Zero-weighted taps added to the end don't affect the delay. Jerry, Your point that the trailing zero coefficients don't add to the filter output delay is a good one! My oversight. Then, in addition, you often don't *have* to implement the leading delays with zero coefficients. So, the leading ones depend on implementation and the lagging ones don't - as you've mentioned. Fred