Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Failed to create a bandpass filter (coefficients must be finite)

Subject: Failed to create a bandpass filter (coefficients must be finite)

From: Sebastian Gatzka

Date: 29 Jul, 2011 16:19:11

Message: 1 of 8

Hello World.

I'm stuggeling to create a bandpass filter for my data.
I have successfully designed lowpass FIR filters with fdatool but fail to create a bandpass.

I have data sampled with 500000 Hz and I am interested in the frequency range from
90 Hz to 290 Hz. I choose a bandpass, FIR, equiripple filter with the approriate entries in the fdatool.

After calculating for hours the tool stopped working with the error message, that coefficients must be finite.

I have no idea what this means and obviously not enought knowledge about bandpass filters either.

What will be the best strategy to create such a filter?!

Thanks in advance.
Sebastian

Subject: Failed to create a bandpass filter (coefficients must be finite)

From: Wayne King

Date: 29 Jul, 2011 16:35:33

Message: 2 of 8

"Sebastian Gatzka" <sebastian.gatzka.NOSPAM@stud.tu-darmstadt.de> wrote in message <j0umhv$2c8$1@newscl01ah.mathworks.com>...
> Hello World.
>
> I'm stuggeling to create a bandpass filter for my data.
> I have successfully designed lowpass FIR filters with fdatool but fail to create a bandpass.
>
> I have data sampled with 500000 Hz and I am interested in the frequency range from
> 90 Hz to 290 Hz. I choose a bandpass, FIR, equiripple filter with the approriate entries in the fdatool.
>
> After calculating for hours the tool stopped working with the error message, that coefficients must be finite.
>
> I have no idea what this means and obviously not enought knowledge about bandpass filters either.
>
> What will be the best strategy to create such a filter?!
>
> Thanks in advance.
> Sebastian

Hi Sebastian, What are your Fstop frequencies and your Apass and Astop settings?

Wayne

Subject: Failed to create a bandpass filter (coefficients must be finite)

From: Sebastian Gatzka

Date: 29 Jul, 2011 17:55:29

Message: 3 of 8

"Wayne King" <wmkingty@gmail.com> wrote in message <j0ungl$51b$1@newscl01ah.mathworks.com>...
>
> Hi Sebastian, What are your Fstop frequencies and your Apass and Astop settings?
>
> Wayne

Fs = 500e3

Fstop1 = 80
Fpass1 = 96
Fstop2 = 272
Fpass2 = 288

Dstop1 = 0.001 (AStop1 = 60)
Dpass = 1 (Apass =
Dstop2 = 0.001 (Astop2 = 80)

Hope this helps!

Sebastian

Subject: Failed to create a bandpass filter (coefficients must be finite)

From: Wayne King

Date: 29 Jul, 2011 21:27:13

Message: 4 of 8

"Sebastian Gatzka" <sebastian.gatzka.NOSPAM@stud.tu-darmstadt.de> wrote in message <j0us6h$hs5$1@newscl01ah.mathworks.com>...
> "Wayne King" <wmkingty@gmail.com> wrote in message <j0ungl$51b$1@newscl01ah.mathworks.com>...
> >
> > Hi Sebastian, What are your Fstop frequencies and your Apass and Astop settings?
> >
> > Wayne
>
> Fs = 500e3
>
> Fstop1 = 80
> Fpass1 = 96
> Fstop2 = 272
> Fpass2 = 288
>
> Dstop1 = 0.001 (AStop1 = 60)
> Dpass = 1 (Apass =
> Dstop2 = 0.001 (Astop2 = 80)
>
> Hope this helps!
>
> Sebastian

Hi Sebastian, Those are very stringent requirements for an FIR equripple filter. You have a very high sampling frequency, so your passband is very narrow with respect to your frequency interval. Then your stopband frequencies are very close to the passband frequencies (I think you have a typo on your Fpass2 and Fstop2) for the amout of attenuation you want.

A couple things, do you really need a bandpass, or can you just lowpass everything 290 Hz?

Also, how about downsampling the data? If you really want to end up with just everything between 90 and 290 Hz, then 500 kHz is way oversampled.

Wayne

Subject: Failed to create a bandpass filter (coefficients must be finite)

From: Sebastian Gatzka

Date: 7 Aug, 2011 11:48:07

Message: 5 of 8

"Wayne King" <wmkingty@gmail.com> wrote in message <j0v8jh$lfo$1@newscl01ah.mathworks.com>...
> "Sebastian Gatzka" <sebastian.gatzka.NOSPAM@stud.tu-darmstadt.de> wrote in message <j0us6h$hs5$1@newscl01ah.mathworks.com>...
> > "Wayne King" <wmkingty@gmail.com> wrote in message <j0ungl$51b$1@newscl01ah.mathworks.com>...
> > >
> > > Hi Sebastian, What are your Fstop frequencies and your Apass and Astop settings?
> > >
> > > Wayne
> >
> > Fs = 500e3
> >
> > Fstop1 = 80
> > Fpass1 = 96
> > Fstop2 = 272
> > Fpass2 = 288
> >
> > Dstop1 = 0.001 (AStop1 = 60)
> > Dpass = 1 (Apass =
> > Dstop2 = 0.001 (Astop2 = 80)
> >
> > Hope this helps!
> >
> > Sebastian
>
> Hi Sebastian, Those are very stringent requirements for an FIR equripple filter. You have a very high sampling frequency, so your passband is very narrow with respect to your frequency interval. Then your stopband frequencies are very close to the passband frequencies (I think you have a typo on your Fpass2 and Fstop2) for the amout of attenuation you want.
>
> A couple things, do you really need a bandpass, or can you just lowpass everything 290 Hz?
>
> Also, how about downsampling the data? If you really want to end up with just everything between 90 and 290 Hz, then 500 kHz is way oversampled.
>
> Wayne

Ok I think a lowpass filter will do pretty good.
My experience was that it takes hours to desing one, right?

Subject: Failed to create a bandpass filter (coefficients must be finite)

From: Wayne King

Date: 7 Aug, 2011 13:58:12

Message: 6 of 8

"Sebastian Gatzka" <sebastian.gatzka.NOSPAM@stud.tu-darmstadt.de> wrote in message <j1lu1n$cma$1@newscl01ah.mathworks.com>...
> "Wayne King" <wmkingty@gmail.com> wrote in message <j0v8jh$lfo$1@newscl01ah.mathworks.com>...
> > "Sebastian Gatzka" <sebastian.gatzka.NOSPAM@stud.tu-darmstadt.de> wrote in message <j0us6h$hs5$1@newscl01ah.mathworks.com>...
> > > "Wayne King" <wmkingty@gmail.com> wrote in message <j0ungl$51b$1@newscl01ah.mathworks.com>...
> > > >
> > > > Hi Sebastian, What are your Fstop frequencies and your Apass and Astop settings?
> > > >
> > > > Wayne
> > >
> > > Fs = 500e3
> > >
> > > Fstop1 = 80
> > > Fpass1 = 96
> > > Fstop2 = 272
> > > Fpass2 = 288
> > >
> > > Dstop1 = 0.001 (AStop1 = 60)
> > > Dpass = 1 (Apass =
> > > Dstop2 = 0.001 (Astop2 = 80)
> > >
> > > Hope this helps!
> > >
> > > Sebastian
> >
> > Hi Sebastian, Those are very stringent requirements for an FIR equripple filter. You have a very high sampling frequency, so your passband is very narrow with respect to your frequency interval. Then your stopband frequencies are very close to the passband frequencies (I think you have a typo on your Fpass2 and Fstop2) for the amout of attenuation you want.
> >
> > A couple things, do you really need a bandpass, or can you just lowpass everything 290 Hz?
> >
> > Also, how about downsampling the data? If you really want to end up with just everything between 90 and 290 Hz, then 500 kHz is way oversampled.
> >
> > Wayne
>
> Ok I think a lowpass filter will do pretty good.
> My experience was that it takes hours to desing one, right?

Hi, It should not unless you are being very (overly I would say) stringent in your design criteria.

If you are interested only in content below 290 Hz, I would suggest you consider downsampling the data. If for some reason you must retain such a high sampling rate, consider an IIR design, which will result in a much lower order design.

Wayne

Subject: Failed to create a bandpass filter (coefficients must be finite)

From: Sebastian Gatzka

Date: 7 Aug, 2011 19:38:10

Message: 7 of 8

>
> Hi, It should not unless you are being very (overly I would say) stringent in your design criteria.
>
> If you are interested only in content below 290 Hz, I would suggest you consider downsampling the data. If for some reason you must retain such a high sampling rate, consider an IIR design, which will result in a much lower order design.
>
> Wayne

Thank you, Wayne.

I'm not that familiar with filter design so I'm not sure what an IIR design may be.
And how is downsampling done? Will this result in a faster filter design?

Subject: Failed to create a bandpass filter (coefficients must be finite)

From: Sebastian Gatzka

Date: 15 Aug, 2011 06:07:10

Message: 8 of 8

"Wayne King" <wmkingty@gmail.com> wrote
>
> Hi, It should not unless you are being very (overly I would say) stringent in your design criteria.
>
> If you are interested only in content below 290 Hz, I would suggest you consider downsampling the data. If for some reason you must retain such a high sampling rate, consider an IIR design, which will result in a much lower order design.
>
> Wayne

Or maybe you can help me find some less stringent design criteria for a FIR lowpass filter below 300 Hz?

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us