Problems with IIR butterworth bandpass filters (strange plots)

Alexander Jossifov a.gomf at gmx.de
Tue Aug 7 20:44:37 CEST 2012


I've done some calculations with butterworth bandpass filters and 
encountered a problem that I can't seem to solve. There is a bug that 
was filed that is similar to this case but I'm new to Scilab so maybe 
I'm doing something wrong.

Look at the example below, the plot of the filter is odd. It seems to 
get worse the smaller the bandwidth is.


clf();

sr = 44100;
o = 3;
low = 22.387211 / sr;
high = 44.668359 / sr;

hz = iir(o, 'bp', 'butt', [low high], [0 0]);

xmin = 0.0;
xmax = 0.005;
ymin = 0.0;
ymax = 1.0;
res = 8000;

[hzm, fr] = frmag(hz, res);

plot(fr, hzm, 'b')
a = gca();
a.data_bounds = [xmin, ymin; xmax, ymax];



More information about the users mailing list