ripple in Butterworth filter created by 'butter' (was "RE: 'long double' support ?")

Sergei Steshenko sergstesh at yahoo.com
Tue May 6 15:52:53 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.

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: 2844240695-butterworth_numeric_accuracy.m
Url : https://www.cae.wisc.edu/pipermail/help-octave/attachments/20080506/18ccbcb7/attachment-0001.bin 


More information about the Help-octave mailing list