Warm-up: a single sinusoid
Contents
7.1. Warm-up: a single sinusoid#
When we defined the Discrete Fourier Transform (DFT) (Section 5.5.2), we saw that it exactly encodes the amplitude (\(A\)) and phase (\(\phi\)) of a sinusoidal input, at least when the frequency matches one of the analysis frequencies. Specifically, we saw that (for \(m \notin \{0, N/2\}\)),
Of course, this doesn’t tell us much if \(\blue{x[n]}\) is not of that particular given form. The DFT is still well defined, even if \(\blue{x[n]}\) is a completely arbitrary set of sample values:
This raises the question: how do we interpret the coefficients \(\darkblue{X[m]}\) for arbitrary signals \(\blue{x[n]}\)? We’ll answer this by showing that there exists an inverse DFT, which can reconstruct the input signal \(\blue{x[n]}\) exactly from only its DFT coefficients \(\darkblue{X[m]}\).
7.1.1. Recovering a sinusoid#
Before defining the full inverse DFT, let’s first try to recover a single sinusoid from its DFT spectrum.
Recall from Section 5.6.2 that a sinusoid at an analysis frequency index \(m\) will have two non-zero DFT coefficients: \(\darkblue{X[m]}\) and \(\darkblue{X[N-m]}\), which are complex conjugates of each other: their real parts are the same, and their imaginary parts are opposite:
Each of these components can be used to produce a complex sinusoid \(z_m[n]\) as follows:
This is demonstrated visually in Fig. 7.1.
Because the imaginary parts of \(\darkblue{X[m]}\) and \(\darkblue{X[N-m]}\) are opposite (\(\darkblue{X[m] = \overline{X[N-m]}}\)), summing the two doubles the real part and cancels the imaginary part, and we’ll be left with a cosine wave at the appropriate phase:
This is exactly what we started with (\(\blue{x[n]}\)), except there’s an additional scaling of \(N\) in front. So, for at least this simple case of a single sinusoid, we can recover the input signal by generating the corresponding sinusoids with the parameters encoded by the magnitude and phase in the DFT, and dividing out the length of the signal \(N\).
As we’ll see in the next section, this strategy works in general: we don’t need to assume that \(\blue{x[n]}\) is a single sinusoid!