Search code examples
rsignal-processingfftfrequency-analysis

Amplitude of input wave is massively different to Fourier coefficient amplitude


The series of waves I input into the fft() function in R all have an RMS in the order of 10E-2, however the Fourier coefficient is massively different for all the waves (anywhere from 0.3-15).

I've looked at other fft functions such as the periodogram() and the coefficients remain the same.

Nothing fancy, just importing a series of y values into the fft function then taking the modulus.

result <- abs(fft(df))

An example of the input data and output transform is seen here:

enter image description here

enter image description here

Am I incorrect in assuming that there is a direct correlation between the RMS/Amplitude of the sin wave and the magnitude of the fourier coefficient?

Thanks in advance.


Solution

  • As I described in another answer, there is an approximate relationship between the amplitude in the time-domain and the frequency-domain, which I stated under the usual Discrete Fourier Transform definition. Since R's fft follows the same definition (see the documentation), you may expect a similar approximate 0.5*N scaling of the amplitude when going from the time-domain to the frequency-domain.

    Note that since you clearly do not have a pure sinusoidal signal, the different frequency component may start to interfere and make the relationship more approximate than absolute truth, but it should still be in the right order of magnitude.