Finding an average of a signal using Fast Fourier Transform?

Click For Summary

Discussion Overview

The discussion revolves around methods for finding the average of a discrete signal using Fast Fourier Transform (FFT) in MATLAB. Participants explore the implications of using FFT versus simpler averaging techniques, particularly in the context of incomplete periods of the signal.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant suggests using FFT to obtain the frequency spectrum and extract the 0Hz value as the average of the signal, questioning whether this is a valid approach.
  • Another participant proposes a straightforward method of calculating the average by summing the signal values and dividing by the total number of samples, questioning the necessity of FFT.
  • A participant raises a concern that simple averaging may only be valid if the signal consists of complete periods, using the example of a cosine wave to illustrate that incomplete data could lead to misleading averages.
  • In response, another participant agrees and suggests that determining the fundamental period of the signal is essential for calculating a meaningful average from the samples of one complete period.

Areas of Agreement / Disagreement

Participants express differing views on the appropriateness of using FFT versus simple averaging. There is no consensus on the best method, particularly regarding the handling of incomplete signal periods.

Contextual Notes

The discussion highlights limitations related to the assumptions about signal completeness and the dependence on the definition of "average" in the context of periodic signals.

stevenphy2
Messages
10
Reaction score
0
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?
Thanks.
 
Physics news on Phys.org
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.
 
n.karthick said:
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.

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..?
 
stevenphy2 said:
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.

Yes you are right. I think, you should first find the fundamental period of your signal (in case you don't know). Once you know that, you can find average of your signal from the samples of one period.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 47 ·
2
Replies
47
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K