help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does fir2 do such strange thing for odd filter order (even numbe


From: Mike Miller
Subject: Re: Why does fir2 do such strange thing for odd filter order (even number of taps)?
Date: Wed, 12 Nov 2014 21:32:55 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

Hi Lev,

On Wed, Nov 12, 2014 at 14:05:52 +0300, Lev Serebryakov wrote:
>  And I don't understand "Add zeros to interpolate by 2, then pick the
> odd values below." part. Why does it do this
> interpolate-and-take-odd-values? Why it is required only for even
> number of taps? Why does it takes odd values? Is it critical, or even
> ones will work too?
> 
>  I've read several textbooks, articles and tutorials about FFT-based
> FIR designing, and no one mention special processing for even number
> of taps (odd order). Every source I read is in agreement with method,
> which is used for even order — mirror specter, take ifft(), rotate. It
> is clear. And second branch is complete mistery for me.

Have you read about the differences between type I and type II FIR
filters? A type II filter is a symmetric filter with an odd order. This
is what this second case in fir2.m that you are asking about is dealing
with.

The interpolate-ifft-decimate is done to get the half-sample group delay
necessary for a type II filter. If that's not clear, I'd recommend
stepping through the function or doing a simple version of it yourself
to see what the results look like at each step.

>  I've found this old post
> 
> http://octave.1599824.n4.nabble.com/fir1-bug-for-odd-orders-td4642204.html
> 
>  But it doesn't explain anything to me, as I don't know which "the
> long standing bug about fir1" it refers to, and could not find this
> bug in current bugtracker (yes, it is very old post in discontinued
> mailing list).

I don't know about this either, that was before my time working with
Octave.

HTH,

-- 
mike

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]