Signals and Systems

7.1 The Sampling Theorem

Imron Rosyadi

The Sampling Theorem: Bridging Continuous and Discrete Signals

Introduction to Sampling: The Digital Frontier

Signals in the real world are often continuous-time (analog). However, modern systems (computers, digital communication) operate on discrete-time (digital) signals.

Sampling is the process of converting a continuous-time signal into a discrete-time sequence.

  • Why Sample?
    • Digital processing advantages (noise immunity, flexibility).
    • Storage and transmission efficiency.
    • Enables powerful digital signal processing (DSP) algorithms.

Figure 7.1: Three continuous-time signals with identical values at integer multiples of \(T\).

Note

Key Question: How do we convert an analog signal to digital without losing information?

The Challenge: Ambiguity in Sampling

From Figure 7.1, it’s clear:

  • An infinite number of continuous-time signals can pass through the same discrete samples.
  • Without additional information, samples alone don’t uniquely define the original signal.

Our Goal: Find conditions under which a signal can be uniquely specified by its samples, allowing perfect reconstruction.

Important

This unique specification is possible if the signal is band-limited and sampled at a sufficiently high rate.

Impulse-Train Sampling: The Model

To analyze sampling mathematically, we use impulse-train sampling.

  1. Continuous Signal: \(x(t)\)
  2. Sampling Function: A periodic impulse train \(p(t)\). \[ p(t)=\sum_{n=-\infty}^{+\infty} \delta(t-n T) \]
    • \(T\): Sampling Period
    • \(\omega_s = 2\pi/T\): Sampling Frequency
  3. Sampled Signal: \(x_p(t) = x(t)p(t)\)

Using the sampling property of the impulse: \[ x_p(t)=\sum_{n=-\infty}^{+\infty} x(n T) \delta(t-n T) \] This produces an impulse train where each impulse’s amplitude is the value of \(x(t)\) at the sampling instant \(nT\).

Figure 7.2: Impulse-train sampling.

Sampling in the Frequency Domain: Replicas

The magic happens in the frequency domain.

  • Multiplication in the time domain corresponds to convolution in the frequency domain. \[ X_p(j\omega) = \frac{1}{2\pi} [X(j\omega) * P(j\omega)] \]
  • The Fourier Transform of the impulse train \(p(t)\) is also an impulse train in frequency: \[ P(j\omega) = \frac{2\pi}{T} \sum_{k=-\infty}^{+\infty} \delta(\omega - k\omega_s) \]
  • Convolving \(X(j\omega)\) with \(P(j\omega)\) gives: \[ X_p(j\omega) = \frac{1}{T} \sum_{k=-\infty}^{+\infty} X(j(\omega - k\omega_s)) \]

Tip

Interpretation: The spectrum of the sampled signal, \(X_p(j\omega)\), is an infinite sum of shifted and scaled replicas of the original signal’s spectrum, \(X(j\omega)\). Each replica is centered at multiples of the sampling frequency \(\omega_s\).

Aliasing: When Replicas Overlap

The relationship between the sampling frequency (\(\omega_s\)) and the signal’s bandwidth (\(\omega_M\)) is critical.

Case 1: No Overlap (\(\omega_s > 2\omega_M\))

  • The replicas of \(X(j\omega)\) are perfectly separated.
  • The original spectrum \(X(j\omega)\) can be recovered by an ideal lowpass filter.

Case 2: Overlap (\(\omega_s < 2\omega_M\))

  • The replicas overlap, causing aliasing.
  • Information is lost; the original signal cannot be perfectly reconstructed.

Figure 7.3 (c) and (d): Spectrum of sampled signal with \(\omega_{s}>2 \omega_{M}\) (no aliasing) and \(\omega_{s}<2 \omega_{M}\) (aliasing).

Interactive: Exploring Aliasing

Adjust the signal bandwidth (\(\omega_M\)) and sampling frequency (\(\omega_s\)) to observe aliasing.

Aliasing in Images

Motorcycle: low resolution, Moire

Motorcycle: high resolution

Brick: low resolution, Moire

Brick: high resolution

Aliasing in Videos

The Sampling Theorem

Formal Statement:

Let \(x(t)\) be a band-limited signal with \(X(j\omega)=0\) for \(|\omega| > \omega_M\). Then \(x(t)\) is uniquely determined by its samples \(x(nT), n=0, \pm 1, \pm 2, \ldots\), if

\[ \omega_s > 2\omega_M \]

where \(\omega_s = 2\pi/T\) is the sampling frequency.

Note

The frequency \(2\omega_M\) is known as the Nyquist rate. \(\omega_M\) is often called the Nyquist frequency.

The Sampling Theorem

Reconstruction Process

  1. Generate an impulse train \(x_p(t)\) from the samples.
  2. Pass \(x_p(t)\) through an ideal lowpass filter with:
    • Gain \(T\)
    • Cutoff frequency \(\omega_c\) such that \(\omega_M < \omega_c < \omega_s - \omega_M\).

The output signal will exactly equal \(x(t)\).

Ideal Reconstruction: The Lowpass Filter

The ideal lowpass filter \(H(j\omega)\) has: \[ H(j\omega) = \begin{cases} T & |\omega| < \omega_c \\ 0 & |\omega| \ge \omega_c \end{cases} \] where \(\omega_M < \omega_c < \omega_s - \omega_M\).

This filter effectively isolates the baseband spectrum \(X(j\omega)\) from its replicas, scaled by \(T\) to restore the original amplitude.

Figure 7.4 (a) and (d): System for sampling and reconstruction, and the ideal lowpass filter.

Practical Sampling: Zero-Order Hold

Impulse-train sampling is theoretical. In practice, a zero-order hold is often used.

  • Samples \(x(t)\) at an instant and holds that value until the next sample.
  • Output \(x_0(t)\) is a staircase-like approximation of \(x(t)\).

Figure 7.5: Sampling utilizing a zero-order hold.

Representation: A zero-order hold can be modeled as impulse-train sampling followed by an LTI system with a rectangular impulse response \(h_0(t)\): \[ h_0(t) = \begin{cases} 1 & 0 \le t < T \\ 0 & \text{otherwise} \end{cases} \]

Figure 7.6: Zero-order hold as impulse-train sampling followed by an LTI system with a rectangular impulse response.

Zero-Order Hold: Reconstruction

To reconstruct \(x(t)\) from \(x_0(t)\), we need a specific filter.

The Fourier Transform of \(h_0(t)\) is: \[ H_0(j\omega) = e^{-j\omega T/2} \left[ \frac{2\sin(\omega T/2)}{\omega} \right] \] This is a sinc function in frequency.

To reconstruct \(x(t)\), we need to compensate for \(H_0(j\omega)\).

The reconstruction filter \(H_r(j\omega)\) must satisfy: \[ H_r(j\omega) H_0(j\omega) = H_{ideal}(j\omega) \] Where \(H_{ideal}(j\omega)\) is the ideal lowpass filter with gain \(T\).

Thus, the required reconstruction filter is: \[ H_r(j\omega) = \frac{e^{j\omega T/2} H_{ideal}(j\omega)}{\frac{2\sin(\omega T/2)}{\omega}} \]

Figure 7.8: Magnitude and phase for the reconstruction filter for a zero-order hold.

Caution

This reconstruction filter is complex to implement due to the sinc inverse in the denominator and the non-constant gain in the passband.

Interactive: Zero-Order Hold in Time Domain

Observe how a continuous signal is approximated by a zero-order hold for different sampling periods.

Conclusion & Applications

Key Takeaways:

  • Sampling Theory provides the mathematical foundation for converting analog to digital signals.
  • The Sampling Theorem states that a band-limited signal can be perfectly reconstructed from its samples if the sampling frequency \(\omega_s\) is greater than the Nyquist rate (\(2\omega_M\)).
  • Aliasing occurs when the sampling rate is too low, leading to irreversible loss of information.
  • Zero-Order Hold is a practical method for sampling, requiring a more complex reconstruction filter.

Conclusion & Applications

Real-World ECE Applications:

  • Analog-to-Digital Converters (ADCs): Crucial components in almost all digital systems (audio, video, sensors).
  • Digital Audio: CDs (44.1 kHz sampling rate) and high-resolution audio.
  • Digital Image Processing: Pixels are samples of continuous light intensity.
  • Telecommunications: Digital modulation and demodulation.
  • Control Systems: Sampling sensor data for feedback.

Tip

Understanding the Sampling Theorem is fundamental for designing robust and accurate digital signal processing systems.