×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

FFT in Matlab zero padding and filtering question

FFT in Matlab zero padding and filtering question

FFT in Matlab zero padding and filtering question

(OP)
Hi all,

I'm new to DSP and Matlab and come from a non-engineering background (so go easy on me!), and have a few basic questions. As part of my psych studies im tracking the diameter of the pupil over 60s, at 60 samples a second.  This is in response to stimuli of varying frequencies between 0 and 7 Hz.  I plan to investigate the responses using FFT in Matlab

My problem is that if someone blinks, or the pupil is lost by the tracking software, this returns a data value of 0 for the duration of the blink/loss of tracking.  In practice this can be anything from 3 to hundreds of samples.

1) I have read about zero padding, but it is only mentioned as being applied at the beginning or end of data.  I assume then that my 0 values that automatically get applied will mess up the FFT?  One option is to cut the missing data values out (that is, those that have a 0 value).  This however would mess with the sampling rate of the data.  As i know the sampling rate, should i cut out these 0 values and then specify the time again starting from 0 using the known sample rate?  Any better suggestions?

2)  I am trying to pick a filter that will give me the best resolution for values between roughly 0.25 and 6.5 Hz.  Anything to either side of this is noise for my purposes.  The accuracy of the amplitude in this range is of importance to me.  There seem to be a whole heap with very subtle differences, any suggestion would be great.  Of course, I need to be able to easily implement it in Matlab.

Cheers for your help,

Daniel

RE: FFT in Matlab zero padding and filtering question

(OP)
Any ideas guys? :)

RE: FFT in Matlab zero padding and filtering question

I think you would need to interpolate to fill in the missing data.

RE: FFT in Matlab zero padding and filtering question

Quote:

One option is to cut the missing data values out (that is, those that have a 0 value).  This however would mess with the sampling rate of the data. Would certainly introduce an artificial discontinuity in phase of all components.   If there is a fundamental
frequency evident in the data, then you can cut out one period without any effect.

Quote:

Any better suggestions?
Are you trying to track evolution of frequency content over time, or  in contrast do you just need one final result representing the frequency content for 60-sec window.

Depending on exact details, one solution might be breaking the time data into blocks that don't include any of the zero intervals.  Then if you are interested in just the 60-sec frequency content, you can average together the FFT's.  Under certain assumptions about underlying data (stationarity?), averaging of FFT helps to reduce standard deviation of results.  There are tradeoffs involving frequency resolution if you reduce your FFT length.
 

=====================================
(2B)+(2B)'  ?

RE: FFT in Matlab zero padding and filtering question

Part of my response got into your quote. Let me repeat the first piece:

Quote:

One option is to cut the missing data values out (that is, those that have a 0 value).  This however would mess with the sampling rate of the data.
Would certainly introduce an artificial discontinuity in phase of all components.   If there is a fundamental frequency evident in the data, then you can cut out one period without any effect

=====================================
(2B)+(2B)'  ?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close