I got this question asked in an interview. The question is quoated "what is the difference between even length and odd length FIR " . It's a confusing question. Anyone has a good answer to it? Thanks a lot ~
The difference between even length and odd length FIR ?
Started by ●August 1, 2005
Reply by ●August 1, 20052005-08-01
"daka" <miranda.wu@gmail.com> wrote in message news:1122933805.795462.212060@o13g2000cwo.googlegroups.com...>I got this question asked in an interview. > The question is quoated "what is the difference between even length and > odd length FIR " . > It's a confusing question. Anyone has a good answer to it? > Thanks a lot ~ >Hello Daka, Your interviewer probably made an assumption that your filter was linear phase. Then you can make some general statements. I.e., the delay is (N+1)/2, so odd length filters have integral delay. And even length filters have an extra 1/2 sample delay. Linear phase also means can can have two types of symmetry among the coefficients. Namely symmetric and antisymmetric. Antisymmtric filters add a 90 degree phase shift in addition to the delay afforded by (N+1)/2 samples. Also some constraints happen to the magnitude repsonse. sym, odd length -> no constraints sym, even length -> response at 1/2 sample rate must be zero. asym, odd length -> response at 0 and 1/2 sample rate must be zero asym, even length -> response at 0 must be zero IHTH, Clay
Reply by ●August 1, 20052005-08-01
"Clay S. Turner" <Physics@Bellsouth.net> writes:> "daka" <miranda.wu@gmail.com> wrote in message > news:1122933805.795462.212060@o13g2000cwo.googlegroups.com... >>I got this question asked in an interview. >> The question is quoated "what is the difference between even length and >> odd length FIR " . >> It's a confusing question. Anyone has a good answer to it? >> Thanks a lot ~ >> > > Hello Daka, > > > Your interviewer probably made an assumption that your filter was linear > phase. Then you can make some general statements. I.e., the delay is > (N+1)/2,Counterexample: h[n] = delta[n] has N = 1 and a delay of zero. Should be (N-1)/2. -- % Randy Yates % "And all that I can do %% Fuquay-Varina, NC % is say I'm sorry, %%% 919-577-9882 % that's the way it goes..." %%%% <yates@ieee.org> % Getting To The Point', *Balance of Power*, ELO http://home.earthlink.net/~yatescr
Reply by ●August 1, 20052005-08-01
"Randy Yates" <yates@ieee.org> wrote in message news:ek9dyv3e.fsf@ieee.org...> "Clay S. Turner" <Physics@Bellsouth.net> writes: > >> "daka" <miranda.wu@gmail.com> wrote in message >> news:1122933805.795462.212060@o13g2000cwo.googlegroups.com... >>>I got this question asked in an interview. >>> The question is quoated "what is the difference between even length and >>> odd length FIR " . >>> It's a confusing question. Anyone has a good answer to it? >>> Thanks a lot ~ >>> >> >> Hello Daka, >> >> >> Your interviewer probably made an assumption that your filter was linear >> phase. Then you can make some general statements. I.e., the delay is >> (N+1)/2, > > Counterexample: h[n] = delta[n] has N = 1 and a delay of zero. > > Should be (N-1)/2. > --Thanks. Yes (N-1)/2 is correct for the delay. However I believe my other comments are true. Of course my fingers get ahead of my brain sometimes and mistakes result. Clay
Reply by ●August 2, 20052005-08-02
"Clay S. Turner" <Physics@Bellsouth.net> wrote in message news:_VxHe.1209$jq.798@bignews3.bellsouth.net...> > "daka" <miranda.wu@gmail.com> wrote in message > news:1122933805.795462.212060@o13g2000cwo.googlegroups.com... >>I got this question asked in an interview. >> The question is quoated "what is the difference between even length and >> odd length FIR " . >> It's a confusing question. Anyone has a good answer to it? >> Thanks a lot ~ >> > > Hello Daka, > > > Your interviewer probably made an assumption that your filter was linear > phase. Then you can make some general statements. I.e., the delay is > (N+1)/2, so odd length filters have integral delay. And even length > filters have an extra 1/2 sample delay. Linear phase also means can can > have two types of symmetry among the coefficients. Namely symmetric and > antisymmetric. Antisymmtric filters add a 90 degree phase shift in > addition to the delay afforded by (N+1)/2 samples. > > Also some constraints happen to the magnitude repsonse. > > sym, odd length -> no constraints > > sym, even length -> response at 1/2 sample rate must be zero. > > asym, odd length -> response at 0 and 1/2 sample rate must be zero > > asym, even length -> response at 0 must be zeroClay, I don't follow the last two ... Fred
Reply by ●August 2, 20052005-08-02
Fred Marshall wrote:> "Clay S. Turner" <Physics@Bellsouth.net> wrote in message > news:_VxHe.1209$jq.798@bignews3.bellsouth.net... > > > > "daka" <miranda.wu@gmail.com> wrote in message > > news:1122933805.795462.212060@o13g2000cwo.googlegroups.com... > >>I got this question asked in an interview. > >> The question is quoated "what is the difference between even length and > >> odd length FIR " . > >> It's a confusing question. Anyone has a good answer to it? > >> Thanks a lot ~ > >> > > > > Hello Daka, > > > > > > Your interviewer probably made an assumption that your filter was linear > > phase. Then you can make some general statements. I.e., the delay is > > (N+1)/2, so odd length filters have integral delay. And even length > > filters have an extra 1/2 sample delay. Linear phase also means can can > > have two types of symmetry among the coefficients. Namely symmetric and > > antisymmetric. Antisymmtric filters add a 90 degree phase shift in > > addition to the delay afforded by (N+1)/2 samples. > > > > Also some constraints happen to the magnitude repsonse. > > > > sym, odd length -> no constraints > > > > sym, even length -> response at 1/2 sample rate must be zero. > > > > asym, odd length -> response at 0 and 1/2 sample rate must be zero > > > > asym, even length -> response at 0 must be zero > > Clay, > > I don't follow the last two ...If a FIR filter is antisymmetric, the coefficients add up to 0. So the DC coefficient in the transfer function is 0. Rune
Reply by ●August 2, 20052005-08-02
daka wrote:> I got this question asked in an interview. > The question is quoated "what is the difference between even length and > odd length FIR " . > It's a confusing question. Anyone has a good answer to it? > Thanks a lot ~ >I was going to say "an even length filter has a number of elements that can be divided by 2" -- but I mostly deal with motion control, and consequently IIR filters. I've found it very effective when interviewing for work (because I've found it very disarming when interviewing for workers) to come out point-blank and say "gee, I don't know that" when asked a question that completely stumps me. I'll usually ask for a bit of explanation. If they can explain part of it and I can guess the rest then I get a few points. If they start explaining it and I can say "Oh! What you're calling the Gnorbnitz equation is what I learned as the Lagrabnabber Transform!" then I earn almost as many points as if I just started rattling on. The principal here is that if it was some go/no-go thing then you blew it when you walked into the interview without that knowledge. If you try to spread BS about something you don't know then you'll lose credibility with everything else. If you're up front about what you don't know then you'll gain points for being a straightforward kind of guy. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●August 2, 20052005-08-02
"Tim Wescott" <tim@seemywebsite.com> wrote in message news:11ev4mn6r0l363@corp.supernews.com...> "Oh! What you're calling the Gnorbnitz equation is what I learned as > the Lagrabnabber Transform!"I found that sentence amusing! (My spellchecker has no suggestions for those words.)
Reply by ●August 2, 20052005-08-02
"Rune Allnor" <allnor@tele.ntnu.no> wrote in message news:1122971699.302236.5890@o13g2000cwo.googlegroups.com...> > Fred Marshall wrote: >> "Clay S. Turner" <Physics@Bellsouth.net> wrote in message >> news:_VxHe.1209$jq.798@bignews3.bellsouth.net... >> > >> > "daka" <miranda.wu@gmail.com> wrote in message >> > news:1122933805.795462.212060@o13g2000cwo.googlegroups.com... >> >>I got this question asked in an interview. >> >> The question is quoated "what is the difference between even length >> >> and >> >> odd length FIR " . >> >> It's a confusing question. Anyone has a good answer to it? >> >> Thanks a lot ~ >> >> >> > >> > Hello Daka, >> > >> > >> > Your interviewer probably made an assumption that your filter was >> > linear >> > phase. Then you can make some general statements. I.e., the delay is >> > (N+1)/2, so odd length filters have integral delay. And even length >> > filters have an extra 1/2 sample delay. Linear phase also means can >> > can >> > have two types of symmetry among the coefficients. Namely symmetric and >> > antisymmetric. Antisymmtric filters add a 90 degree phase shift in >> > addition to the delay afforded by (N+1)/2 samples. >> > >> > Also some constraints happen to the magnitude repsonse. >> > >> > sym, odd length -> no constraints >> > >> > sym, even length -> response at 1/2 sample rate must be zero. >> > >> > asym, odd length -> response at 0 and 1/2 sample rate must be zero >> > >> > asym, even length -> response at 0 must be zero >> >> Clay, >> >> I don't follow the last two ... > > If a FIR filter is antisymmetric, the coefficients add up to 0. > So the DC coefficient in the transfer function is 0. > > RuneRune, When writing, I switched in midstream from thinking that "asym" meant asymmetric instead of antisymmetric. So, of course .... we agree. Now what about the zero at fs/2? Fred
Reply by ●August 2, 20052005-08-02
Hello Fred, Sorry about my cryptic shorthand. I was in a rush to a photoclub meeting when I wrote that. Rune hit the nail on the head that at DC, your signal is simply ...,1,1,1,1,1,1,1,1,1,1,... so passing this thru an FIR filter you are in effect just adding up all of the FIR's coefs.. Now for fs/2 your signal is ...,-1,1,-1,1,-1,1,-1,1,-1,... And an odd length antisymmtric FIR filter's coefs can be written as ...,-c,-b,-a,0,a,b,c, ... so the resulting convolution ends up being simply zero. For an even length antisymmetric linear FIR filter, there is no restriction at fs/2 IHTH, Clay






