- #1

DrClaude

Mentor

- 7,090

- 3,240

## Summary:

- How does the scaling of the numerical output of a forward FFT compare to the mathematical definition of the Fourier transform?

## Main Question or Discussion Point

When considering the forward FFT of a mathematical function sampled at times ##t = 0, \Delta, \ldots, (N-1) \Delta##, following the usual convention, we have something like

$$

H(f) = \int_{-\infty}^{+\infty} h(t) e^{-2 \pi i f t} dt \quad \Rightarrow \quad H_k = \sum_{n=0}^{N-1} h_n e^{-2 \pi i f t} = \sum_{n=0}^{N-1} h_n e^{-2 \pi i k n / N}

$$

The difference between the mathematical and numerical version is the absence in the latter of the time-sampling step ##\Delta##. (Conventionally, this is compensated by adding a factor ##1/N## in the inverse FFT, to recover the original signal.)

This appears to work with a function like a Gaussian, ##h(t) = \exp(-(t-t_0)^2 / 2 \sigma^2)##, where ##H(f)## is recovered from ##\Delta \times H_k##, independently of the number of points ##N##.

However, if I take ##h(t) = \exp(2 \pi i \nu t)##, which mathematically transforms to a Dirac delta, I recover ##H_k##'s that are all zeros except for ##k = j \equiv \nu N \Delta ## (assuming that ##\nu## is indeed chosen to be one of the discrete frequencies of the spectrum), and the value of ##H_j## is exactly ##N##, independently of ##\Delta##. Why is that?

$$

H(f) = \int_{-\infty}^{+\infty} h(t) e^{-2 \pi i f t} dt \quad \Rightarrow \quad H_k = \sum_{n=0}^{N-1} h_n e^{-2 \pi i f t} = \sum_{n=0}^{N-1} h_n e^{-2 \pi i k n / N}

$$

The difference between the mathematical and numerical version is the absence in the latter of the time-sampling step ##\Delta##. (Conventionally, this is compensated by adding a factor ##1/N## in the inverse FFT, to recover the original signal.)

This appears to work with a function like a Gaussian, ##h(t) = \exp(-(t-t_0)^2 / 2 \sigma^2)##, where ##H(f)## is recovered from ##\Delta \times H_k##, independently of the number of points ##N##.

However, if I take ##h(t) = \exp(2 \pi i \nu t)##, which mathematically transforms to a Dirac delta, I recover ##H_k##'s that are all zeros except for ##k = j \equiv \nu N \Delta ## (assuming that ##\nu## is indeed chosen to be one of the discrete frequencies of the spectrum), and the value of ##H_j## is exactly ##N##, independently of ##\Delta##. Why is that?