MIT 6.300 — Lecture 5

DT Fourier Series

§ Lecture: DT Fourier Series

Recall that for CT signals, Fourier series are infinite sums.

f(t)=k=0(ckcos(kω0t)+dksin(kω0t))=k=akejkω0t.f(t) = \sum_{k = 0}^{\infty} \left( c_k \cos(k \omega_0 t) + d_k \sin(k \omega_0 t) \right) = \sum_{k = -\infty}^{\infty} a_k e^{j k \omega_0t}.

However, for DT signals, the period NN is always an integer. And when NN is an integer, something special happens.

1ak+N((k+N)th term)=ej(k+N)Ω0n=ejkΩ0nejNΩ0n=ejkΩ0nejN(2π/N)n    (where Ω0=2πN for some Z)=ejkΩ0ne2πjn=ejkΩ0n=1ak(kth term).\begin{align*}\frac{1}{a_{k + N}}\left((k + N)^{\text{th}} \text{ term}\right) = e^{j (k + N) \Omega_0 n} & = e^{j k \Omega_0 n} \cdot e^{j N \Omega_0 n} \\ & = e^{j k \Omega_0 n} \cdot e^{j N (2\pi \ell/ N) n} ~~~ \text{ (where } \Omega_0 = \frac{2 \pi \ell}{N} \text{ for some } \ell \in \mathbb{Z}) \\ & = e^{j k \Omega_0 n} \cdot e^{2 \pi j n\ell} = e^{j k \Omega_0 n} = \frac{1}{a_k}\left(k^{\text{th}} \text{ term}\right).\end{align*}

Terms spaced NN apart in the infinite sum are “like terms”—so our infinite series collapses down to a finite series!

Remark. The above logic is unique to DT signals because of the final step e2πjn=1e^{2\pi j n \ell} = 1, which only holds assuming nZn \ell \in \mathbb{Z}.

Theorem. (DT Fourier Series) For any DT signal f[n]f[n] with period NN and fundamental frequency Ω0:=2πN\Omega_0 := \frac{2\pi}{N}, its Fourier series is:

f[n]=k=0N1akejkΩ0n      where      ak=1Nn=0N1f[n]ejkΩ0n  for all k=0,1,,N1.f[n] = \sum_{k = 0}^{N - 1} a_k e^{j k \Omega_0 n} ~~~~~ \text{ where } ~~~~~ a_k = \frac{1}{N} \sum_{n = 0}^{N - 1} f[n] e^{-j k \Omega_0 n} ~ \text{ for all } k = 0, 1, \dots, N - 1.

Proof: The same argument as earlier. The point is that n=0N1ej(k)Ω0n\sum_{n = 0}^{N - 1} e^{j(k - \ell)\Omega_0n} equals NN if k(modN)k \equiv \ell \pmod{N} and 00 otherwise.   \blacksquare

Just as before, we can also consider transformations of DT signals; the logic is exactly the same.

Theorem. (Transforming DT Signals) Let F[k]F[k] denote the Fourier series coefficients for f[n]f[n]. Assume period NN.

Note that F[k]F[-k] is shorthand for F[Nk]F[N - k] (just like with Python arrays).

§ Lecture: Pitch Perception

Recall that when (say) a piano plays A440 Hz, there are more frequencies present than just plain 440 Hz. In other words, many of the coefficients of a piano's Fourier series are nonzero!

But the existence of, say, 880 Hz and 1320 Hz frequencies doesn't make us hear the piano's pitch as anything other than 440 Hz…

Question. To what extent is perceived pitch influenced by upper harmonic frequencies?

In the setup below, we pass a jet of air through a spinning disk with holes. By changing the hole placement (but keeping the disk speed constant), we can produce different DT signals with the same fundamental frequency.

By computing Fourier coefficients for the DT signal fi[n]f_i[n], we can find the strength of the “intended” pitch by reading off Fi[1]F_i[1].

Mathematically, the intended pitch appears to be weakest around f5[n]f_5[n]. In particular, when the two holes are precisely opposite each other, the DT signal exactly matches f5[n]f_5[n], and the perceived pitch ends up being twice the intended pitch.

The surprising part, however, is that the perceived pitch of f4[n]f_4[n] and f6[n]f_6[n] still matches the intended pitch. Only in the exact case of f5[n]f_5[n] is the perceived pitch wrong.

Let's say we alter the signals by setting only the coefficient Fi[1]0F_i[1] \to 0, thereby removing the fundamental frequency and leaving behind only the upper harmonics. Even then, the perceived pitch still matches the intended pitch!

§ Recitation: Computing DT Fourier Series

Problem. Determine the Fourier coefficients for x[n]:=sin(1.6πn)x[n] := \sin(1.6\pi n).

Solution: The only novelty is that we must first compute the period N=5N = 5, and from there determine that Ω0=0.4π\Omega_0 = 0.4\pi. Then:

sin(1.6πn)=12j(cos(1.6πn)+jsin(1.6πn))12j(cos(1.6πn)jsin(1.6πn))=12jej1.6πn12jej1.6πn.\sin(1.6\pi n) = \frac{1}{2j}\left(\cos(1.6\pi n) + j \sin(1.6\pi n)\right) - \frac{1}{2j}\left(\cos(1.6\pi n) - j \sin(1.6\pi n)\right) = \frac{1}{2j}e^{j 1.6\pi n} - \frac{1}{2j}e^{-j 1.6\pi n}.

So the coefficients are a4=12ja_4 = \frac{1}{2j}, a1=12ja_1 = -\frac{1}{2j}, and all other coefficients are zero.