Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Finding an average of a signal using Fast Fourier Transform?

  1. Jun 1, 2010 #1
    Hi all,
    I have discrete data of a signal but I do not know the periods of the signal.
    The signal is like a "beat" I guess, but not really sure.
    I plan to use fft in matlab to get it's frequency spectrum and get the 0Hz value as the average of the signal.
    Is this a bad idea?
    Any other ways to do this?
  2. jcsd
  3. Jun 2, 2010 #2
    If you really want to know only average of the signal, you can simply add all the values of your signal (discrete data) and divide by total number of samples. Why to take fft? Anyway fft also does exactly the same thing to find value at 0Hz.
  4. Jun 2, 2010 #3
    Adding them and divide it by the total number of samples will work only if my signal is of complete periods, right?
    For example, if my full signal is a cosine wave, but I just have data that are half of the wavelength, it will not give me an average of zero.
    I am wondering if there is something that can generate a "meaningful average" even if I do not have exactly complete wavelengths, say I have 5.5 wavelengths..?
  5. Jun 2, 2010 #4
    Yes you are right. I think, you should first find the fundamental period of your signal (in case you dont know). Once you know that, you can find average of your signal from the samples of one period.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook