×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

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!
  • Students Click Here

*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

Jobs

Fourier transforms - Basic question

Fourier transforms - Basic question

Fourier transforms - Basic question

(OP)
I have uploaded some data into MATLAB and I am attempting to remove the funtamental frequency (1208.6Hz)
What I gather is the easiest way to remove fundamental is to apply a fourier transform to the data and then set 1208.6Hz to zero and then apply the inverse transform.
My problem is I don't know how to set the fundamental to zero.
Any help would be aprreciated

RE: Fourier transforms - Basic question

You need to know the samplin rate of your data and the data length.  You might not have a picke that is "on" 1208.6 Hz exactly, so maybe you could stomp on two pickets.

Here is an example

fCriticalHz = 1208.6;

fs = 48000;
nSample = 1000;
fStep = fs / nsample;

fftOfData = fft( data, nSample );
fStart = -fs / 2;
fStop = ( fs / 2 ) - fStep;

frequencyPicketHz = fStart : fStep : fStop;

indexZap = find( frequencyPicketHz >= fCriticalHz );

indexZapThese =  indexZap + [ -1 0 1 ];

indexZapThese = [ ( nSample - indexZapThese ) indexZapThese ];


fftOfData( indexZapThese ) = zeros( size(  fftOfData( indexZapThese ) ) );
dataZapped = real( ifft( fftOfData ) );

% Sorry I did not have time to test or review this, but someof these ideas should help in understanding.

jsolar

RE: Fourier transforms - Basic question

You are trying to implement a digital band-stop filter.

That's a good detailed method described above.

Without providing an alternative with comparable level of detail, I am hesitant to criticize it at all.  But I would point out that it implements a very square bandstop filter which will introduce artifacts in the output time waveform in some cases.   More sophisticated bandstop filters have smoother transitions with a lot of mathematical thought put into them.  

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: Fourier transforms - Basic question

There are certainly a wealth of on-line resources. You might look around dspguide.com starting here:
http://www.dspguide.com/ch14/5.htm

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: Fourier transforms - Basic question

electricpete, I agree with you.  I gave an example of the method megok wanted to use.  I never know if these are learning exercises or part of a bigger project, so I hesitate on giving adice on a different approach sometimes (sometimes I just can;t help it).

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!


Resources