Discrete Fourier Transform – Trig Parameters in Practice


This post is a follow-up to the previous one, Discrete Fourier Transform – Trig Parameters in Principle. The titles are deliberately similar – but you will want to distinguish them.

Having shown you how to find trigonometric parameters of a sine wave, I want to show you a real example. I found this in Peter Bloomfield’s “Fourier analysis of time series: an introduction”, 978-0-471-88948-9.

The data, however, I found by searching the Internet. Although the book provides a couple of sources – the data isn’t there any longer.

According to Bloomfield, these numbers are the magnitude of a variable star at midnight on 600 consecutive nights. They have been rescaled.

Before we get started, let me point out that I am a rookie at using the Discrete Fourier Transform. I knew, for example, to expect bin leakage in the previous post… but it hasn’t been all that long that I’ve known about it. Still, what we’re about to do is pretty simple and everything works out fine.

Here are the data…
Read the rest of this entry »

Discrete Fourier Transform – Trig Parameters in Principle

pure sine

I want to look at the Discrete Fourier Transform (henceforth the DFT) of a perfect sine wave. How the heck can I interpret the DFT of some data, if I don’t understand what it tells me in the simplest possible case?

As usual, I am using Mathematica®… in fact I’m using version 7.

Suppose we have the following function: a pure sine wave, with mean 3, amplitude 5, and period 7. (I habitually use prime numbers in examples so that I can see where they end up in any answers.)

Actually, let me do this in stages. First let the mean be zero:

f(x) = 5 \sin \left(\frac{2 \pi  x}{7}\right)\ .

Over the range from 0 to 21, we have the following:

We see that the period is, indeed, 7. Now let me construct the function I really want, with mean 3:
Read the rest of this entry »

Fourier Series and Fourier Transform

I want to show you something that I think is really neat. (Whether you think it is neat is your decision, not mine. I don’t like it when people tell me what I will think about something they’re about to show me.)

I do not know why this calculation is not readily available. All I know is that I had to search high and low to find an example with sufficient detail that I could duplicate it. In fact, it is difficult to find a text which actually states the result at all, never mind one which works it out for a particular case.

  • I intend to take a function which is zero outside the interval [-1/2, 1/2]…
  • I will compute several terms in the associated Fourier series…
  • I will compute its Fourier transform…
  • and I will hit you between the eyes with the relationship between them.

I won’t even keep it a secret:

  • the coefficients in the Fourier series are samples of the Fourier transform.
  • alternatively, the Fourier transform of the Fourier series is discrete samples of the original continuous Fourier transform.

I think that’s marvelous. But even knowing that it’s true, I don’t see it stated very often.

There are several things I will not do in this post.
Read the rest of this entry »