Using fourier transform to find moving average

Click For Summary

Discussion Overview

The discussion revolves around the application of Fourier transforms to compute moving averages on data sets. Participants explore the theoretical and practical implications of using Fourier transforms for smoothing data, particularly in the context of different types of data and the selection of harmonics.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants propose that applying a Fourier transform to a data set, removing high order harmonics, and performing an inverse Fourier transform can yield a smoothed data set.
  • Others argue that removing too many high order terms may lead to oversimplification, resulting in a sine wave regardless of the original data, raising questions about how to systematically decide which terms to remove.
  • Concerns are expressed about the applicability of FFT to random data without discernible periodic signals, with participants questioning the method's effectiveness in such contexts.
  • One participant mentions that the conventional moving average is a convolution with a rectangular window, suggesting that Fourier transforms can be used in this context as well.
  • Another participant discusses the importance of identifying signals above noise in climate data analysis and how the shape of peaks in Fourier space can indicate the periodicity of signals.

Areas of Agreement / Disagreement

Participants express differing views on the effectiveness and methodology of using Fourier transforms for moving averages, with no consensus reached on the best approach or the applicability to various types of data.

Contextual Notes

Participants note the challenges in deciding which harmonics to retain or remove, the implications of using different window types, and the limitations of applying FFT to data without periodic signals.

brianhurren
Messages
71
Reaction score
2
can you use Fourier transform to find a moving average on a data set?

so, you do a Fourier transform on your one dimensional data set.
next remove high order harmonics from FT result.
do reverse Fourier transform on new FT result.

And, vola! smoothed out data set.
 
Mathematics news on Phys.org
Some of the high order terms are needed to smooth out the wobbles introduced by the low order terms.
Remove enough high order terms and you get a sine wave no matter what the data was ... so how do you, systematically, decide which terms to remove?
 
thats what I would like to know. I heard that FFT is used to analise climate change data, but I can't see how FFt would applie to a random set of data that has no periodic signal, except maybe as a means to calculate a rolling average. exactly as you point out, how do you decide which harmonics to leave out. which window would you use (Hanning, square etc).
 
Impossible to tell without specifics.
Do you have an example?

I think it is unlikely that the fft is used in the manner you imagine... i.e. it is probably not being applied to random data with no discernable signal.
 
brianhurren said:
can you use Fourier transform to find a moving average on a data set?

Yes, absolutely. The conventional moving average is just a convolution of your original signal with a rectangular window of some length. This is equivalent to pointwise multiplying the Fourier transforms of the signal and a rectangular and inverting (See Convolution, and especially the section on Fast convolution algorithms).

so, you do a Fourier transform on your one dimensional data set.
next remove high order harmonics from FT result.
do reverse Fourier transform on new FT result.

And, vola! smoothed out data set.
Right. And there's no reason you have to limit yourself to a rectangular window filter.
 
brianhurren said:
I heard that FFT is used to analise climate change data, but I can't see how FFt would applie to a random set of data that has no periodic signal, except maybe as a means to calculate a rolling average. exactly as you point out, how do you decide which harmonics to leave out. which window would you use (Hanning, square etc).
It's a good question. Mainly you are looking for signals which stand out above the "noise" and which you don't already know about or which have a frequency which is the same as some known, plausible mechanism which affects climate.
How "broad" a peak appears in Fourier space also tells you how far from perfectly periodic a signal might be. Just to give you an example, we expect the seasons in some region to vary on a yearly cycle, but if you were to look at a spectrum of the temperature record, you'd find a peak around 1 cycle/year which is pretty sharp but not a perfect spike. This is because the actual temperature variations can arrive slightly earlier or later each year.
 

Similar threads

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