Discrete-Time Fourier Series (DTFS)
The discrete-time Fourier series is a Fourier transform method that provides a frequency-domain representation of a discrete-time signal defined over all integers. It results in a continuous frequency spectrum. Any -periodic discrete-time signal can be written in the frequency domain, such that
The synthesis (left) equation can be transformed into matrix-vector form, such that the formula for the DTFS of a -periodic discrete signal with eigenvector components is
where is an orthogonal matrix called the Fourier kernel representing a Fourier basis with each of its columns being the basis vectors, is the vector of Fourier coefficients, and is the signal output for each .
Then, the solution to the discrete-time Fourier series for is the projection
where is known as the Fourier matrix.
Intuition
We start with a very simple change of basis. Consider two discrete functions and .
The functions can equivalently be written as and , which you can find for yourself by solving the complex exponential for the given frequency with any . The two functions can also be written as two vectors and .
Since the fundamental period of the function is (you can find this using periodicity of discrete signals), this means that any two-periodic signal can be decomposed as
x(n) &= X_0\psi_0(n) + X_1\psi_1(n) \\ &= X_0e^{i0n}+X_1e^{i \pi n}. \end{align}$$ Additionally, since $\omega_0=\frac{2\pi}{p}=\pi$, only the frequencies $0, \pi$ may contribute to the signal. This can be generalized for a $P$-periodic signal $x(n)$, such that the only frequencies that contribute to that signal are contained in the set $\set{0, \omega_0, 2\omega_0, \ldots, (P-1)\omega_0}$. Proceeding in the 2-period realm, we can find $X_0$ and $X_1$ by solving for their respective vectors' dot products, $$\begin{align} \vec{x} \cdot \psi_0 = X_0(\psi_0 \cdot \psi_0) + X_1 \times 0 \iff X_0=\frac{\vec{x} \cdot \psi_0}{\psi_0 \cdot \psi_0} \\ \vec{x} \cdot \psi_1 = X_0 \times 0 +X_1(\psi_1 \cdot \psi_1) \iff X_1=\frac{\vec{x} \cdot \psi_1}{\psi_1 \cdot \psi_1} \end{align}$$ where $\psi_0 \cdot \psi_1 = 0$ is automatically omitted since the two vectors are orthogonal, and $x$ is the vector of the signal $x(n)$. Note that this was a very simplified example, since ==a 2-period signal is always real== (the sine component of the complex number is always 0). We can now continue our $p$-periodic signal generalization by saying that a $p$-periodic signal can be generalized into a $p$-element vector, such that $\vec{x}=\begin{bmatrix}x(0) & x(1) & \ldots & x(p-1)\end{bmatrix}^T$. We will also define a $p$-dimensional orthogonal basis $\set{\psi_0, \psi_1, \ldots, \psi_{p-1}}$. The vector $\vec{x}$ can then be decomposed using $$\begin{align} \vec{x} &= X_0\psi_0+X_1\psi_1+\ldots+X_{p-1}\psi_{p-1} \\ &= \sum^{p-1}_{k=0}X_k\psi_k \\ &= \sum^{p-1}_{k=0}X_ke^{jk\omega_0n} \end{align}$$ Then, we can find any $X_n$ by projecting $\vec{x}$ onto the coefficient's respective basis vector $\psi_n$:\begin{align}
\langle \vec{x}, \psi_n \rangle &= \langle \sum^{p-1}{k=0}X_k\psi_k, \psi_n \rangle \
&= \sum^{p-1}{k=0}X_k\langle \psi_k, \psi_n \rangle \
&= X_n\langle \psi_n, \psi_n \rangle \
&= X_n \times p.
\end{align}