Thread Subject: Question on filtering

Subject: Question on filtering

From: Florian

Date: 2 May, 2008 09:41:03

Message: 1 of 5

Hi,
I have a electrophysiological signal (electrogastrography).
It is a one channel recording with a main frequency content
in the band between 0 and 0.2Hz, so very low frequencies.
Playing arround with the signal processing toolbox I was
simply overwhelmed by the amount of possible filters.
What I want to do is to apply bandpass filtering and
downsample the signal from 500 Hz to about 1 Hz
(afterwards). The band I am interested in is from 0.01 to
0.2 Hz. Could anybody please tell me a good way to do this?

Thank you very much in advance.

Florian Beissner

Subject: Question on filtering

From: NZTideMan

Date: 4 May, 2008 10:29:27

Message: 2 of 5

On May 2, 9:41=A0pm, "Florian " <beiss...@med.uni-frankfurt.de> wrote:
> Hi,
> I have a electrophysiological signal (electrogastrography).
> It is a one channel recording with a main frequency content
> in the band between 0 and 0.2Hz, so very low frequencies.
> Playing arround with the signal processing toolbox I was
> simply overwhelmed by the amount of possible filters.
> What I want to do is to apply bandpass filtering and
> downsample the signal from 500 Hz to about 1 Hz
> (afterwards). The band I am interested in is from 0.01 to
> 0.2 Hz. Could anybody please tell me a good way to do this?
>
> Thank you very much in advance.
>
> Florian Beissner

downsampling aka decimation
Lots of ways to do it............
Simplest is to just take every 500 th sample, but you may want to
filter first to avoid aliasing.
Simplest filter is the mean of each 500 samples.

Subject: Question on filtering

From: Lars

Date: 4 May, 2008 12:35:03

Message: 3 of 5

I would create a simple filter by using

>> fdatool

say simple IIR-butterworth. you can export the filter from
the tool as numerator (a) and denominator (b) or as a
filter-object.

then you can filter your signal by computing

>> filter(b,a,signal) or >> filter(obj, signal)


when possible, it always is a good idea to keep
computational effort low. --> so perhaps you first do the
downsampling and then you filter the the shorter signal.
for downsampling you can find good ways in the help or you
write your own routine using i.e. a simple fft algorithm.

Regards, Lars

Subject: Question on filtering

From: Lars

Date: 4 May, 2008 12:43:04

Message: 4 of 5


sorry bad mistake:

numerator (b)
denominator (a)

then you can filter your signal by computing

>> filter(b,a,signal)

Regards, Lars

Subject: Question on filtering

From: Bas

Date: 4 May, 2008 17:14:14

Message: 5 of 5

On May 2, 11:41=A0am, "Florian " <beiss...@med.uni-frankfurt.de> wrote:
> Hi,
> I have a electrophysiological signal (electrogastrography).
> It is a one channel recording with a main frequency content
> in the band between 0 and 0.2Hz, so very low frequencies.
> Playing arround with the signal processing toolbox I was
> simply overwhelmed by the amount of possible filters.
> What I want to do is to apply bandpass filtering and
> downsample the signal from 500 Hz to about 1 Hz
> (afterwards). The band I am interested in is from 0.01 to
> 0.2 Hz. Could anybody please tell me a good way to do this?

If you don't care so much about the exact filtering and just want to
be sure you don't have any aliasing, you could try to use 'decimate',
which is basically what you want. According to the docs, it defaults
to a low-pass filter at 0.8 times the nyquist frequency (but have a
look a the the various options). This would be 0.4 Hz in your case,
which seems to match your requirements. There is a warning to do it in
several steps if you want to decimate by more than a factor of 13, so
that would mean 3 steps in your case:
x_filt =3D decimate(decimate(decimate(x, 10), 10), 5);
I only used this function to decimation with small factors, so use at
your own risk.

HTH,
Bas

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
signal processi... Florian 2 May, 2008 05:45:07
filtering Florian 2 May, 2008 05:45:07
electrophysiology Florian 2 May, 2008 05:45:07
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com