[SciPy-dev] RE: Remez algorithm
Chuck Harris
Chuck.Harris at sdl.usu.edu
Fri Apr 26 12:32:12 EDT 2002
Hi Travis
> -----Original Message-----
> From: Travis Oliphant [mailto:oliphant.travis at ieee.org]
> Sent: Tuesday, April 23, 2002 9:22 PM
> To: scipy-dev at scipy.org
> Subject: Re: [SciPy-dev] RE: Remez algorithm
>
> Have you seen the remez algorithm in the signal module?
>
> How does this one compare?
OK, I wrote a bandpass filter driver for my routine and spent some time going through the sigtool version and comparing it to mine for somewhat realistic
filter specs :
taps = 90
grid_density = 16
bands = [.011,.15,.175,.239,.261,.500]
desired = [0.,1.,0.]
weights = [1e3,1.0,1e3]
Some remarks and results:
1) the sigtools version requires a density of 32 to get accurate coefficients,
I suspect an off by one bug in its peak finding routine. In any case, I have
used 32 for the sigtools version and 16 for mine to get comparable results.
2) the sigtools version is significantly faster, the times for 100 iterations :
sigtools -- 1.5 sec
mine -- 13 sec
3) the sigtools version will use less memory, in this problem :
sigtools -- about 11KiB
mine -- about 259 KiB
4) the sigtools version does not return useful ancillary data, for instance,
it's usefull to know just how good the fit was so that a routine can use
it to make tradeoffs : number of taps, out of band rejection vs inband
ripple, etc.
5) the sigtools version restricts the band edges to the range 0--.5, which
makes it difficult, sometimes impossible, to design filters with complex
coefficients, a practical thing to do sometimes with rad hard parts
running $20K a pop. Mine goes out to 1.0.
6) the sigtools interface does not expose the function hooks available in
the Parks-McClellan routine. This makes it difficult to properly design
cascaded filters, or to design filters with more interesting shapes
than the three basic types available.
7) the code for the sigtools version would be heck to modify or use as the
basis of some other routine. It's convergence criteria are not clear; it
failed to converge on some problems, but I have no idea what this meant.
8) The sigtools version is limited to filter design.
Overall, I think that the sigtools version would work well for 99% of everyday
filter design tasks, it's the remaining 1% that I wish to see covered, at least
for my own uses.
Chuck
More information about the SciPy-Dev
mailing list