Signals and Systems

3.6 Fourier Series Representation of Discrete-Time Periodic Signals

Imron Rosyadi

Fourier Series Representation of Discrete-Time Periodic Signals

Introduction: Discrete-Time Periodic Signals

Discrete-time (DT) signals \(x[n]\) are periodic with period \(N\) if \(x[n] = x[n+N]\).

The fundamental period \(N\) is the smallest positive integer for which this holds.

The fundamental frequency is \(\omega_0 = 2\pi/N\).

Note

Key Difference from Continuous-Time (CT): The Fourier series representation for discrete-time signals is a finite series, unlike the infinite series required for continuous-time signals. This simplifies convergence issues significantly.

Demonstrating Distinct Exponentials

Let’s visualize how \(\phi_k[n]\) repeats for \(k\) and \(k+N\). Consider \(N=5\). We expect \(\phi_0[n] = \phi_5[n]\), \(\phi_1[n] = \phi_6[n]\), etc.

Demonstrating Distinct Exponentials (cont.)

The plots show the real and imaginary parts of \(\phi_k[n]\) for \(k=1\) and \(k=1+N\) (with \(N=5\)). Observe that the two plots are identical, confirming that \(\phi_k[n] = \phi_{k+N}[n]\).

Tip

Interactive Element: Feel free to change \(N_{val}\) and \(k\) (by modifying the get_phi_k calls) in the Python code to explore this property further! For example, try \(k=0\) and \(k=N_{val}\).

Discrete-Time Fourier Series (DTFS) Synthesis

A periodic discrete-time signal \(x[n]\) can be represented as a linear combination of these harmonically related complex exponentials.

\[ x[n] = \sum_{k=\langle N\rangle} a_k \phi_k[n] = \sum_{k=\langle N\rangle} a_k e^{j k \omega_0 n} = \sum_{k=\langle N\rangle} a_k e^{j k(2\pi/N)n} \]

The notation \(\sum_{k=\langle N\rangle}\) indicates summation over any set of \(N\) successive integers for \(k\). Common choices include \(k=0, 1, \ldots, N-1\) or \(k=- (N-1)/2, \ldots, (N-1)/2\) (for odd \(N\)).

The coefficients \(a_k\) are called the Fourier series coefficients.

Determination of DTFS Coefficients (1/2)

Given \(x[n]\) periodic with fundamental period \(N\), we want to find \(a_k\).

We can solve a system of \(N\) linear equations, but a more direct method exists.

The key identity (similar to orthogonality in CT):

\[ \sum_{n=\langle N\rangle} e^{j k(2\pi/N)n} = \begin{cases} N, & k = 0, \pm N, \pm 2N, \ldots \\ 0, & \text{otherwise} \end{cases} \]

This identity is crucial for isolating each \(a_k\).

Interactive Identity Verification

Let’s verify the summation identity: \(\sum_{n=\langle N\rangle} e^{j k(2\pi/N)n}\).

Tip

Experiment:

Change N_period and k_val in the code above and run it. Observe the sum. What happens when k_val is a multiple of N_period? What happens otherwise?

Determination of DTFS Coefficients (2/2)

To derive \(a_k\):

  1. Multiply the synthesis equation by \(e^{-j r(2\pi/N)n}\).
  2. Sum over one period \(n=\langle N\rangle\).

\[ \sum_{n=\langle N\rangle} x[n] e^{-j r(2\pi/N)n} = \sum_{n=\langle N\rangle} \sum_{k=\langle N\rangle} a_k e^{j(k-r)(2\pi/N)n} \]

Interchanging summation order and applying the identity:

\[ \sum_{n=\langle N\rangle} x[n] e^{-j r(2\pi/N)n} = \sum_{k=\langle N\rangle} a_k \left( \sum_{n=\langle N\rangle} e^{j(k-r)(2\pi/N)n} \right) \]

The inner sum is \(N\) if \(k-r\) is a multiple of \(N\) (i.e., \(k=r\) within the \(\langle N \rangle\) range), and \(0\) otherwise. This simplifies to \(N a_r\), leading to:

\[ a_k = \frac{1}{N} \sum_{n=\langle N\rangle} x[n] e^{-j k(2\pi/N)n} \]

This is the Discrete-Time Fourier Series Analysis Equation.

DTFS Synthesis and Analysis Pair

These two equations form the Discrete-Time Fourier Series pair:

Synthesis Equation:

(How to build \(x[n]\) from coefficients \(a_k\))

\[ x[n] = \sum_{k=\langle N\rangle} a_k e^{j k \omega_0 n} = \sum_{k=\langle N\rangle} a_k e^{j k(2\pi/N)n} \]

Analysis Equation:

(How to find coefficients \(a_k\) from \(x[n]\))

\[ a_k = \frac{1}{N} \sum_{n=\langle N\rangle} x[n] e^{-j k \omega_0 n} = \frac{1}{N} \sum_{n=\langle N\rangle} x[n] e^{-j k(2\pi/N)n} \]

Important

The Fourier series coefficients \(a_k\) are periodic with period \(N\): \(a_k = a_{k+N}\). This is a direct consequence of the periodicity of \(\phi_k[n]\).

Example 3.10: Discrete-Time Sine Wave

Consider the signal \(x[n] = \sin(\omega_0 n)\). This signal is periodic only if \(2\pi/\omega_0\) is an integer (or ratio of integers). If \(\omega_0 = 2\pi/N\), then \(x[n]\) is periodic with fundamental period \(N\).

We can expand \(x[n]\) using Euler’s formula:

\[ x[n] = \frac{1}{2j} e^{j(2\pi/N)n} - \frac{1}{2j} e^{-j(2\pi/N)n} \]

By comparing this with the synthesis equation \(x[n] = \sum_{k=\langle N\rangle} a_k e^{j k(2\pi/N)n}\), we can identify the coefficients:

\[ a_1 = \frac{1}{2j}, \quad a_{-1} = -\frac{1}{2j} \]

All other \(a_k\) (for \(k\) within one period) are zero.

Example 3.10: Sine Wave DTFS Visualization

If \(\omega_0 = (2\pi M)/N\) (where \(M, N\) are coprime), \(x[n]\) has fundamental period \(N\).

Then, \(a_M = \frac{1}{2j}\), \(a_{-M} = -\frac{1}{2j}\), and other \(a_k=0\) within one period.

Example 3.11: More Complex Signal

Consider \(x[n]=1+\sin\left(\frac{2\pi}{N}\right)n+3\cos\left(\frac{2\pi}{N}\right)n+\cos\left(\frac{4\pi}{N}n+\frac{\pi}{2}\right)\).

This signal is periodic with period \(N\).

We expand each term into complex exponentials:

\(1 \implies a_0 = 1\)

\(\sin\left(\frac{2\pi}{N}\right)n \implies a_1 = \frac{1}{2j}, a_{-1} = -\frac{1}{2j}\)

\(3\cos\left(\frac{2\pi}{N}\right)n \implies a_1 = \frac{3}{2}, a_{-1} = \frac{3}{2}\)

\(\cos\left(\frac{4\pi}{N}n+\frac{\pi}{2}\right) \implies \frac{1}{2}e^{j\pi/2}e^{j2(2\pi/N)n} + \frac{1}{2}e^{-j\pi/2}e^{-j2(2\pi/N)n}\)

\(\implies a_2 = \frac{1}{2}e^{j\pi/2} = \frac{1}{2}j, a_{-2} = \frac{1}{2}e^{-j\pi/2} = -\frac{1}{2}j\)

Example 3.11: More Complex Signal

Combining terms for each \(k\):

\(a_0 = 1\)
\(a_1 = \frac{1}{2j} + \frac{3}{2} = \frac{3}{2} - \frac{1}{2}j\)
\(a_{-1} = -\frac{1}{2j} + \frac{3}{2} = \frac{3}{2} + \frac{1}{2}j\)
\(a_2 = \frac{1}{2}j\)
\(a_{-2} = -\frac{1}{2}j\)

All other \(a_k=0\) within the period.

Tip

Property for Real Signals: For a real signal \(x[n]\), the Fourier coefficients exhibit conjugate symmetry: \(a_{-k} = a_k^*\). Verify this for the calculated coefficients!

Example 3.11: Coefficients Visualization

Visualizing the real, imaginary, magnitude, and phase of the coefficients for \(N=10\).

Example 3.12: Discrete-Time Periodic Square Wave

Consider a discrete-time periodic square wave \(x[n]\) with period \(N\).

It is defined as \(x[n]=1\) for \(-N_1 \leq n \leq N_1\), and \(x[n]=0\) otherwise within one period.

The analysis equation is: \[ a_k = \frac{1}{N} \sum_{n=\langle N\rangle} x[n] e^{-j k(2\pi/N)n} \]

Choosing the summation range from \(-N_1\) to \(N_1\):

\[ a_k = \frac{1}{N} \sum_{n=-N_1}^{N_1} e^{-j k(2\pi/N)n} \]

This sum is a geometric series.

Example 3.12: Square Wave Coefficients

Applying the geometric series sum formula and simplifying, we get:

\[ a_k = \frac{1}{N} \frac{\sin\left[2\pi k(N_1+1/2)/N\right]}{\sin(\pi k/N)}, \quad k \neq 0, \pm N, \pm 2N, \ldots \]

And for \(k=0, \pm N, \pm 2N, \ldots\):

\[ a_k = \frac{2N_1+1}{N} \]

This formula resembles the continuous-time sinc function, but uses \(\sin(\cdot)/\sin(\cdot)\) due to discrete nature.

Example 3.12: Coefficients Visualization

Let’s visualize the coefficients for \(2N_1+1=5\) and varying \(N\).

Convergence of Discrete-Time Fourier Series

Unlike continuous-time Fourier series, discrete-time Fourier series have no convergence issues.

The DTFS is a finite sum of \(N\) terms.

A discrete-time periodic sequence \(x[n]\) is completely specified by its \(N\) values over one period.

The DTFS analysis equation transforms these \(N\) values into \(N\) Fourier coefficients.

The DTFS synthesis equation perfectly reconstructs the original \(N\) values from these \(N\) coefficients.

Important

There is no Gibbs phenomenon in discrete-time Fourier series. The partial sum (if it includes all \(N\) distinct terms) will exactly equal \(x[n]\).

DTFS Reconstruction: No Gibbs Phenomenon

Let’s reconstruct the square wave using partial sums.

\(\hat{x}[n] = \sum_{k=-M}^{M} a_k e^{j k(2\pi/N)n}\) (for odd \(N\), \(M=(N-1)/2\) includes all terms).

Summary and Key Takeaways

Discrete-Time Fourier Series (DTFS):

  • Represents periodic discrete-time signals \(x[n]\) with period \(N\).
  • Uses a finite sum of \(N\) harmonically related complex exponentials.

Key Equations:

  • Synthesis: \(x[n] = \sum_{k=\langle N\rangle} a_k e^{j k(2\pi/N)n}\)
  • Analysis: \(a_k = \frac{1}{N} \sum_{n=\langle N\rangle} x[n] e^{-j k(2\pi/N)n}\)

Crucial Differences from Continuous-Time (CTFS):

  • Only \(N\) distinct complex exponentials \(\phi_k[n]\).
  • Fourier coefficients \(a_k\) are periodic with period \(N\) (\(a_k = a_{k+N}\)).
  • No convergence issues or Gibbs phenomenon. The finite sum perfectly reconstructs \(x[n]\).