From: Kai7918 on 12 May 2010 08:42 Hey guys, I have created a butter worth filter using SPTOOL in matlab. the specifications are • Sampling frequency: 1000Hz • Passband ripple: 3dB • Stop band edge frequency: 250Hz • Stopband attenuation: 40dB Pas band edge frequency: 225Hz Minimum order design Single section The filter is stable. Here is a screen shot of the Magnitude response: http://img43.imageshack.us/i/checkvt.jpg/ see how i have the thing @ about 350-400Hz. What is that. Is that unwanted frequencies. If yes, then y do i get such thing. Also 1 more question. What would the transition width be for this filter? Thx
From: Jerry Avins on 12 May 2010 10:16 On 5/12/2010 8:42 AM, Kai7918 wrote: > Hey guys, > > I have created a butter worth filter using SPTOOL in matlab. > > the specifications are > • Sampling frequency: 1000Hz > • Passband ripple: 3dB > • Stop band edge frequency: 250Hz > • Stopband attenuation: 40dB > Pas band edge frequency: 225Hz > Minimum order design > Single section > > The filter is stable. > > Here is a screen shot of the Magnitude response: > http://img43.imageshack.us/i/checkvt.jpg/ > > see how i have the thing @ about 350-400Hz. What is that. Is that unwanted > frequencies. If yes, then y do i get such thing. What thing? I see a smooth curve down to the stop band. The stop-band attenuation shown is 350 dB, not 40. That represents a voltage ratio of 1/316227766016837933.2. I don't believe such numbers. It may be possible on paper, but hardly in practice. How would you measure it? > Also 1 more question. What would the transition width be for this filter? It depends on the definition for transition width that you apply. Fix the design before getting into that. Jerry -- "I view the progress of science as ... the slow erosion of the tendency to dichotomize." --Barbara Smuts, U. Mich. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
From: Nasser M. Abbasi on 15 May 2010 00:17 "Kai7918" <kai_the_ruler(a)n_o_s_p_a_m.yahoo.co.in> wrote in message news:v82dnS21gdCDP3fWnZ2dnUVZ_uSdnZ2d(a)giganews.com... > Hey guys, > > I have created a butter worth filter using SPTOOL in matlab. > > the specifications are > �?� Sampling frequency: 1000Hz > �?� Passband ripple: 3dB > �?� Stop band edge frequency: 250Hz > �?� Stopband attenuation: 40dB > Pas band edge frequency: 225Hz > Minimum order design > Single section > > The filter is stable. > > Here is a screen shot of the Magnitude response: > http://img43.imageshack.us/i/checkvt.jpg/ > > see how i have the thing @ about 350-400Hz. What is that. Is that unwanted > frequencies. If yes, then y do i get such thing. > > Also 1 more question. What would the transition width be for this filter? > > Thx > What do you mean "What would the transition width be"? May be I do not understand, but is'nt this just 25 Hz? You said so your specifications? (250-225)? btw, I do not understand those ripples you show in the stopband, there should not be such when using butterworth filter. I run your specs through a program I wrote for a class which designed an IIR low pass filter using butter, and I get order N=30 for this. The program implements impulse invariance or bilinear transformation. I used Bilinear method, and this is the result I copied from my screen: (I do not know what you mean by "single section" ) (I list the H(z) poles, the list shows each pole's real and imaginary value: if you are interested in reading my report on this program, here is the link http://12000.org/my_notes/IIR_digital_filter_design/index.htm note that my Mathematica program and my report is not yet completely polished and still in beta :) ***** S T A R T I N G F I L T E R D E S I G N ********* passband corner frequency (hz)=225 stop corner frequency (hz)=250 sampling frequency (hz)=1000 attenuation at passband corner (db) =-3 attenuation at stopband corner (db) =-40 Using Bilinear method Filter Order N=30 H(z) poles= {{0.14481876621354606, 0.9384373651677788}, {0.1319143750846099, 0.8454503212687019}, {0.12128495319828964, 0.7601980391715206}, {0.11247308374564964, 0.6813596047822589}, {0.10513579564319177, 0.607865551076532}, {0.09901260308329161, 0.5388376367669333}, {0.09390359551696477, 0.47354456664470596}, {0.08965414987894381, 0.4113688863686502}, {0.08614410199270338, 0.35178182199533364}, {0.08327998296589807, 0.29432383541544355}, {0.08098940518977824, 0.2385893292591055}, {0.07921698766919846, 0.18421437951083425}, {0.07792140930180781, 0.13086667592050333}, {0.07707331151574555, 0.07823705647504915}, {0.07665386283631981, 0.02603216276033525}, {0.07665386283631981, -0.02603216276033525}, {0.07707331151574555, -0.07823705647504915}, {0.07792140930180781, -0.13086667592050333}, {0.07921698766919846, -0.18421437951083425}, {0.08098940518977824, -0.2385893292591055}, {0.08327998296589807, -0.29432383541544355}, {0.08614410199270338, -0.35178182199533364}, {0.08965414987894381, -0.4113688863686502}, {0.09390359551696477, -0.47354456664470596}, {0.09901260308329161, -0.5388376367669333}, {0.10513579564319177, -0.607865551076532}, {0.11247308374564964, -0.6813596047822589}, {0.12128495319828964, -0.7601980391715206}, {0.1319143750846099, -0.8454503212687019}, {0.14481876621354606, -0.9384373651677788}},
From: zs on 17 May 2010 04:24 On máj. 12, 14:42, "Kai7918" <kai_the_ruler(a)n_o_s_p_a_m.yahoo.co.in> wrote: > Hey guys, > > I have created a butter worth filter using SPTOOL in matlab. > > the specifications are > Sampling frequency: 1000Hz > Passband ripple: 3dB > Stop band edge frequency: 250Hz > Stopband attenuation: 40dB > Pas band edge frequency: 225Hz > Minimum order design > Single section > > The filter is stable. > > Here is a screen shot of the Magnitude response:http://img43.imageshack.us/i/checkvt.jpg/ > > see how i have the thing @ about 350-400Hz. What is that. Is that unwanted > frequencies. If yes, then y do i get such thing. > > Also 1 more question. What would the transition width be for this filter? > > Thx If you're talking about the 'noise' in the response above 400 Hz, it appears to be some kind of finite precision effect during transfer function calculation. That is, the curve you see is not valid above 400 Hz because Matlab failed to calculate those (very small) numbers correctly. This seems to be an implementation issue of sptool. I've designed a filter with the same specification using fdatool, and it's correct (no noisy response below -350 dB). Anyway, this filter may be an overkill, depending on your application. Zsolt
From: Rune Allnor on 18 May 2010 05:44
On 17 Mai, 10:24, zs <zsolt.garamvol...(a)gmail.com> wrote: > This seems to be an implementation issue of sptool. No, it isn't. It's the quantization noise associated with double precision floating point numbers. > I've designed a > filter with the same specification using fdatool, and it's correct (no > noisy response below -350 dB). Are you sure? It might just as well be that the matlab's support team were so pissed off by incompetent users, who asked this very question, that they 'doctored' the spectrum display tool such that it shows a smooth curve. Find the coeffs of the filter and hack up your own spectrum display from raw matlab, *not* using any of the purpose-made tools that come with the toolboxes. Rune |