[SciPy-user] FIR filter, calculated with Remez exchange algorithm ?
Stef Mientki
s.mientki at ru.nl
Thu Apr 19 16:19:59 EDT 2007
ok, I got the answer (I think)
A slightly changed design, works perfect:
filt_4 = signal.remez (25, (0, 0.01, 0.2, 0.5), (0.01, 1))
The filterlength must be odd, because it's a high pass filter.
If the length is even, the respons at Nyquist is zero,
so my orginal example
filt_4 = signal.remez (24, (0, 0.01, 0.2, 0.49), (0.01, 1))
will try to create a transition band between 0.49 and 0.5,
which is much to steep for this filterlength.
I never encountered this problem because MatLab,
and previous programs I used always corrected this themselfs.
Now would it be possible to implement this behaviour in the library
(I think it's usefull for beginners and previous MatLab users)
if last amplitude band = 1 (because it also must be odd for bandstop filters)
make N odd
else
make N even
cheers,
Stef Mientki
Stef Mientki wrote:
> Does anyone has experience with the Remez function ?
>
> I tried to design a simple highpass filter, 24 coefficients:
> stopband 40 dB from 0..0.01
> transition band from 0.01 .. 0.2
> passband 0 dB from 0.2 .. 0.5
> (which I think is not a critical design,
> after all MatLab does it fluently ;-)
>
> filt_4 = signal.remez (24, (0, 0.01, 0.2, 0.49), (0.01, 1))
>
> but I get some weird impuls responses.
>
> Did I fill in the parameters correctly ?
>
> thanks,
> Stef Mientki
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
>
More information about the SciPy-User
mailing list