A WALKTHROUGH OF THE DFT
STEP BY STEP

In this section we’ll present an animation that literally shows you every single arithmetic operation required to perform an 8-point DFT as described by the equation for the Discrete Fourier Transform,

$$ \mathrm{DFT}[k] = \sum_{n=0}^{N-1} \mathrm{x}[n] \cdot (cos(\varphi) - sin(\varphi)i) \\ where \quad \varphi = k \frac{n}{N} 2\pi $$

I don’t expect you to scrutinize every bit of this animation. It’s not necessary to read, check, and understand every single term in the multiplication and summation sequences. Instead, it’s far more important to be able to relate what’s happening in the animation to the symbolic representation shown in the formula. My desire is that you simply appreciate that while the theory and notation surrounding the DFT may be abstract and challenging, actually implementing the DFT is relatively straightforward. Hopefully, walking through every step of the process will serve to demystify the topic.

The animation in Figure 1 allows you to choose between three input signals: a sine wave, a square wave, and a saw wave. These all have a fundamental frequency of 1Hz, which implies that the sampling rate of of the signals is 8 Hz. I suggest that you watch the animation for each signal before moving on to the next section. Click the Play button when you’re ready to view the animation. Don’t worry if it moves too quickly, In the next two sections you will be able to freely explore the output and intermediate stages of the transform at your leisure.


Figure 1.  Animated Walkthrough of the Discrete Fourier Transform














































The Input Signal corresponds to the x[n] term in the equation.
























This little row of complex numbers corresponds to the DFT term in the equation. It's the output of the DFT.