8

When computing the N-point FFT of some signal, the result is always divided by N. I can understand why this is the case for a summation over the N points, but often the result of the FFT operation is a vector of length N rather than a summation. Why then is the length-N vector that is the output of the FFT scaled by the number of points (N) used to compute the FFT? Thanks.

john
  • 83
  • 1
  • 1
  • 3
  • 5
    belongs on dsp.stackexchange.com – Jason S Jan 31 '12 at 03:39
  • 3
    This should be migrated to DSP.SE – endolith Jul 21 '15 at 16:22
  • 1
    @endolith while this may be better on DSP.SE it's very unlikely to be migrated. A moderator can't do it on a question over 60 days old so a Stack Exchange employee would need to be involved. I guess if they thought migrating old questions was worthwhile they'd remove that time limit. – PeterJ Jul 22 '15 at 09:58

2 Answers2

13

The 1/N scaling factor is almost arbitrary placed. An unscaled FFT followed by an unscaled IFFT using exactly the same complex exponential twiddle factors multiplies the input vector by scaler N. In order to get back the original waveform after an IFFT(FFT())round trip (thus making them inverse functions), some FFT/IFFT implementation pairs scale the FFT by 1/N, some scale the IFFT by 1/N, some scale both by 1/sqrt(N).

hotpaw2
  • 4,731
  • 4
  • 29
  • 44
  • 2
    +1 for mentioning the different conventions as to where the scaling factors are placed for FFT/IFFT. – Paul R Jan 31 '12 at 08:58
  • This is also mentioned on the Wikipedia page for the Fourier transform here: https://en.wikipedia.org/wiki/Fourier_transform#Units_and_duality – remcycles Jun 02 '20 at 18:16
7

The difference is that the digital Fourier transform (and FFT as well) gives a vector of size N (or M in some cases) that contains sums of N samples.

So, basically, each point of the FFT transform is the result of a sum over a certain time interval of the time-based samples. That's why you divide by N.

You can consider it this way: you take an interval of N samples of your signal; then, you basically sum all the samples N times, but each time multiplying them for a different function, that allows to extract the information for a specific frequency (or frequency range, to be more accurate).

At the end, in summary, instead of having N samples, each one associated to a time interval, you have N samples (as before) but each of them related to the whole interval and describing the component of the signal for a specific frequency range.

Just for completeness, there are four cases of Fourier transform:

  1. Continuous Fourier transform, for continuous signals in time, over a finite interval, that gives a continuous frequency response;

  2. Fourier series, taking a continuous and periodic signal and giving the discrete series of harmonics, so with discrete frequencial components;

  3. Time discrete Fourier transform, the reciprocal of (2), in which from a discrete-in-time signal gives a periodic function in the frequency domain;

  4. Digital Fourier Transform, that takes a discrete and periodic signal to give a discrete and periodic spectrum.

So transforming a periodic signal gives a discrete spectrum and vice versa.

clabacchio
  • 13,481
  • 4
  • 40
  • 80
  • Oh, I didn't realize each point in the FFT output was a sum over all points in the time-domain input. Thanks. – john Jan 30 '12 at 08:10
  • Should in `4.` the "Digital Fourier Transform" be a "Discrete Fourier Transform"? That would be about the same as FFT. – Volker Siegel Aug 18 '16 at 23:14