Consider the eight roots of unity,
as the eight complex solutions of the equation \(x^8 - 1 = 0\),
shown in Fig. 26, in the complex plane.
To map the complex numbers into the plane, observe Euler’s formula:
\[\omega = e^{-i \pi/4} = \cos(\pi/4) - i \sin(\pi/4),
\quad i = \sqrt{-1}.\]
For \(n > 0\), the n-th primitive root of unity
is \(\omega = e^{-i2 \pi/n}\) and \(\omega\)
is a root of the equation \(x^n - 1 = 0\),
the other \(n-1\) roots are the
powers \(\omega^k\), \(k=2,3, \ldots,n\),
with \(\omega^n = \omega^0 = 1\).
The root 1 makes the polynomial \(x^n - 1\) factor as follows:
Observe: \(F_n^{-1} = \overline{F_n}\),
the complex conjugate of \(F\).
Therefore, this inverse can be used very directly
and it defines the inverse discrete Fourier transform,
abbreviated by iDFT.
Fig. 27 Schematic of a filter with transfer function \(H\).¶
A linear, time invariant, causal filter is determined by
the impulse response
\(\displaystyle \left\{ h_k \vphantom{u^k} \right\}_{k=0}^\infty\) and
the transfer function
is \(\displaystyle H(z) = \sum_{k=0}^\infty h_k z^{-k}\).
For input \(u\), the k-th element in the output \(y\) is
We start by looking at the discrete Fourier transform of the output.
We apply the DFT formula
\(\displaystyle
y_k = \frac{1}{\sqrt{n}} \sum_{j=0}^{n-1} x_j \omega^{~\!j~\!k}\),
for \(n=4\), \(k=1\),
on \((y_0, y_1, y_2, y_3)\) as input:
Now we compute the discrete Fourier transform
of the coefficients of the transfer function.
We apply the DFT formula
\(\displaystyle
y_k = \frac{1}{\sqrt{n}} \sum_{j=0}^{n-1} x_j \omega^{~\!j~\!k}\),
for \(n=4\), \(k=1\), on \((h_0, h_1, h_2, h_3)\) as input:
Now, consider the Fourier transform of the input.
We apply the DFT formula \(\displaystyle
y_k = \frac{1}{\sqrt{n}} \sum_{j=0}^{n-1} x_j \omega^{~\!j~\!k}\),
for \(n=4\), \(k=1\), on \((u_0, u_1, u_2, u_3)\) as input:
where \(\widehat{y} = {\rm DFT}(y)\),
\(\widehat{h} = {\rm DFT}(h)\),
and \(\widehat{u} = {\rm DFT}(u)\).
The filter \(H\), schematically shown in Fig. 27,
has impulse response
\(\displaystyle \left\{ h_k \vphantom{u^k} \right\}_{k=0}^\infty\).
The convolution property is shown in Fig. 28.
Fig. 28 The DFT convolution property,
where \(\widehat{y} = \mbox{DFT}(y)\),
\(\widehat{h} = \mbox{DFT}(h)\),
and \(\widehat{u} = {\rm DFT}(u)\).¶
The calculations done above for \(n=4\) is generalized below.
We can formulate the DFT convolution property
for any vectors, as done in the theorem below.
Then the main statement of this section is
DFT convolution theorem.
The DFT interpolation theorem is applied to design filters,
in combination with the theorem on amplitude gain and phase shift,
covered in a previous lecture, and restated again below.
The systemematic filter design proceeds in three steps:
Make the desired gain \(r = r(t)\)
and phase shift \(\phi = \phi(t)\).
Evaluate the desired gains and phase shifts
at equidistant angles \(\theta_k \in [0, 2\pi]\),
\(r_k = r(\theta_k)\), \(\phi_k = \phi(\theta_k)\),
\(\widehat{h}_k = r_k e^{i \phi_k}\).
\(h = \mbox{iDFT}(\widehat{h})\) is the impulse response,
which defines \(H(z)\).
For \(n=8\), write all n-th roots that are primitive.
Verify that for each primitive root \(z\),
all other eight roots can be generated by taking powers.
Verify the formulas for the inverse of the Fourier transform
as follows.
Write a Julia function FourierMatrix with takes on input
\(n\) and which returns the Fourier matrix \(F_n\).
Write a Julia function inverseFourierMatrix with takes on input
\(n\) and which returns the inverse Fourier matrix \(F_n^{-1}\).
Verify for \(n=8\) that the product of the output
of your FourierMatrix with the output
of your inverseFourierMatrix is indeed the identity matrix.
Verify the DFT convolution property
on two random vectors \(\bf x\) and \(\bf y\),
for \(n=8\).
Use your FourierMatrix of Exercise 2
to compute the DFT of \(\bf x\) and \(\bf y\),
\(\widehat{\bf x} = \mbox{DFT}({\bf x})\) and
\(\widehat{\bf y} = \mbox{DFT}({\bf y})\).
Verify that \(\sqrt{8}\) times
the componentwise product of \(\widehat{\bf x}\)
and \(\widehat{\bf y}\) equals the DFT
of \({\bf x} \star {\bf y}\).
We derived the statement of the DFT convolution property
for \(n=4\) and \(k=1\).
Verify the DFT convolution property
by symbolic calculation for \(n=4\) and \(k=2\).
Verify the DFT interpolation property for \(n = 8\).
Generate a random vector \(\bf x\) of size 8.
Compute \({\bf y} = F_n {\bf x}\),
with your FourierMatrix of Exercise 2.
Define the function \(f(t)\).
Verify that \(f(j/n) = x_j\),
for \(j=0,1,\ldots,n-1\).