ripple in Butterworth filter created by 'butter' (was "RE: 'long double' support ?")
Sergei Steshenko
sergstesh at yahoo.com
Tue May 6 16:30:11 CDT 2008
--- "Schirmacher, Rolf" <Rolf.Schirmacher at MuellerBBM.de> wrote:
>
> Perhaps you might give more details on the package / function you encouter
> the issue with and/or your actual problem as the root cause and/or best
> solution / workaround might be different to a "brute force" approach of
> increasing precision?
>
> Rolf
>
Hello All,
the problem I had was with Butterworth filter created by 'butter'.
The problem was/is ripple in the passband - there can be no ripple anywhere because
of the definition of Butterworth filter.
The problem is not specific to 'octave' - a couple of years ago I found the same problem in
'scilab'.
Attached is a script which demonstrates the problem.
The script also demonstrates how to avoid the problem using the
"
[z,p,g] = butter(...)
return filter as zero-pole-gain rather than coefficients of the
numerator and denominator polynomials.
"
form of 'butter' - I think this should be THE recommended way to use the function.
With
zorder = 4
the ripple is about 0.006; with
zorder = 5
or higher the filter becomes completely incoherent - just try to run the script.
I suggest to copy-paste the script into documentation - this will hopefully help others
to avoid the trap. And it's a usage example which isn't in the documentation yet
Thanks,
Sergei.
Applications From Scratch: http://appsfromscratch.berlios.de/
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: butterworth_numeric_accuracy.m
Type: text/x-objcsrc
Size: 2027 bytes
Desc: pat1075725243
Url : https://www.cae.wisc.edu/pipermail/help-octave/attachments/20080506/94e638a3/attachment.bin
More information about the Help-octave
mailing list