From: jeff227 on
Has anyone come up with a "cookbook" for simple FIR filters similar to
RBJ's IIR cookbook?

I am looking for audio filters (i.e., mild rolloff, fast compute) using
relatively short FIRs (50 coeffs max). Reason for FIR is that I need
linear phase. Reason for cookbook is that I need to calculate the
coefficients as part of the routine (so the filter will work at different
sample rates). Window-based FIRs would probably be most efficient for
audio purposes.

I have started compiling bits of code for Window-based FIRs but it would
nice not to re-invent the wheel if a "cookbook" already exists!

Thank you.


From: Rune Allnor on

jeff227 skrev:
> Has anyone come up with a "cookbook" for simple FIR filters similar to
> RBJ's IIR cookbook?
>
> I am looking for audio filters (i.e., mild rolloff, fast compute) using
> relatively short FIRs (50 coeffs max). Reason for FIR is that I need
> linear phase. Reason for cookbook is that I need to calculate the
> coefficients as part of the routine (so the filter will work at different
> sample rates). Window-based FIRs would probably be most efficient for
> audio purposes.
>
> I have started compiling bits of code for Window-based FIRs but it would
> nice not to re-invent the wheel if a "cookbook" already exists!

Cookbooks on FIR filter window designs are all over the place; get an
intermediate-level text on DSP (Oppenheim, Schafer & Buck or
Proakis & Manolakis).

Now, your requirements for the FIR might not go very well with
window design. You might have to llok into the Parks-McClellan
algorithm to get filters that meet all your specs.

Rune

From: Ron N. on
Rune Allnor wrote:
> jeff227 skrev:
> > Has anyone come up with a "cookbook" for simple FIR filters similar to
> > RBJ's IIR cookbook?
> >
> > I am looking for audio filters (i.e., mild rolloff, fast compute) using
> > relatively short FIRs (50 coeffs max). Reason for FIR is that I need
> > linear phase. Reason for cookbook is that I need to calculate the
> > coefficients as part of the routine (so the filter will work at different
> > sample rates). Window-based FIRs would probably be most efficient for
> > audio purposes.
> >
> > I have started compiling bits of code for Window-based FIRs but it would
> > nice not to re-invent the wheel if a "cookbook" already exists!
>
> Cookbooks on FIR filter window designs are all over the place; get an
> intermediate-level text on DSP (Oppenheim, Schafer & Buck or
> Proakis & Manolakis).
>
> Now, your requirements for the FIR might not go very well with
> window design. You might have to llok into the Parks-McClellan
> algorithm to get filters that meet all your specs.

The IIR cookbook filters can be calculated quickly with only a few
common transcendental function evaluations or table lookups
needed. remez is hardly on the same order if filter generation
time is a more important constraint than filter passband/stopband
quality.

Just off the top of my head, how about a windowed sinc with
a pre-calculated window. Change the width of the sinc to change
the passband width, Spiral the phase of the sinc to change the
center frequency. Seems to require on the order of only a
couple table lookups and a few MACs per tap, for an arbitrary
(3 degree of freedom) filter with it's quality limited by the
window shape.

What would be the next better recipe given the same computational
time constraints? Is there a recipe that could generate a FIR
filter with even less computation?


IMHO. YMMV.
--
rhn A.T nicholson d.0.t C-o-M

From: Ben Jackson on
On 2006-12-06, jeff227 <rocksonics(a)earthlink.net> wrote:
> I have started compiling bits of code for Window-based FIRs but it would
> nice not to re-invent the wheel if a "cookbook" already exists!

The ultimate cookbook is Matlab, or the free clone Octave (with the DSP
stuff from Octave-forge). You still want the book for the principles,
but there's no need to re-implement the design code.

--
Ben Jackson AD7GD
<ben(a)ben.com>
http://www.ben.com/
From: Sastry on
Also, I think is something like a Handbook of Filter Design or
something like that by Sanjit K Mitra.

Ben Jackson wrote:
> On 2006-12-06, jeff227 <rocksonics(a)earthlink.net> wrote:
> > I have started compiling bits of code for Window-based FIRs but it would
> > nice not to re-invent the wheel if a "cookbook" already exists!
>
> The ultimate cookbook is Matlab, or the free clone Octave (with the DSP
> stuff from Octave-forge). You still want the book for the principles,
> but there's no need to re-implement the design code.
>
> --
> Ben Jackson AD7GD
> <ben(a)ben.com>
> http://www.ben.com/