Discrete Fourier seriesAssume we are given a periodic discrete-time signal x with period p. Just as with continuous-time signals, this signal can be described as a sum of sinusoids,
x(n) = A0 + ∑(k=1 to (p-1)/2) Ak cos (kω0n + φ k )
for p odd and
x(n) = A0 + ∑(k=1 to p/2) Ak cos (kω0n + φ k )
for p even, where ω0 = 2 π /p is the fundamental frequency.
Unlike the continuous-time case, the sum is finite. Intuitively, this is because sampled signals cannot represent frequencies above a certain value. We will examine this phenomenon in more detail later, but for now, it proves extremely convenient. Mathematically, the above relation is much simpler than the continuous-time Fourier series. All computations are finite. There are a finite number of samples in one period of the waveform. There are a finite number of terms in the Fourier series representation for each sample. Unlike the continuous-time case, it is easy for computers to manage this representation. Given a finite set of values, A0, …, Ap-1, a computer can calculate x(n). Moreover, the representation is exact for any periodic signal. No approximation is needed. In the continuous-time case, the Fourier series representation is accurate only for certain signals. For the discrete-time case, it is always accurate.
The discrete-time Fourier series (DFS), given above, can be calculated efficiently on a computer using an algorithm called the fast Fourier transform (FFT). All of the computer-generated Fourier series examples that you have seen use the FFT algorithm.