Sampling Theory for Signals & Systems: GATE Quick Notes

Sampling Fundamentals

Introduction to Sampling

What is Sampling?

Converting a continuous-time signal \(x(t)\) into a discrete-time sequence \(x[n]\) by taking samples at regular intervals.

Mathematical Representation

\[\begin{aligned} x[n] &= x(nT_s) \quad \text{for } n = 0, \pm 1, \pm 2, \ldots \\ T_s &= \text{Sampling period} \\ f_s &= \frac{1}{T_s} = \text{Sampling frequency} \\ \omega_s &= 2\pi f_s = \text{Sampling frequency (rad/s)} \end{aligned}\]

Sampling Process

\[\begin{aligned} x_s(t) = x(t) \cdot p(t) = x(t) \sum_{n=-\infty}^{\infty} \delta(t - nT_s) \end{aligned}\]
where \(p(t)\) is the sampling function (impulse train).

Impulse Train Sampling

Sampling Function

\[\begin{aligned} p(t) &= \sum_{n=-\infty}^{\infty} \delta(t - nT_s) \\ P(\omega) &= \frac{2\pi}{T_s} \sum_{k=-\infty}^{\infty} \delta(\omega - k\omega_s) \end{aligned}\]

Sampled Signal in Frequency Domain

\[\begin{aligned} X_s(\omega) &= \frac{1}{2\pi}[X(\omega) * P(\omega)] \\ &= \frac{1}{T_s} \sum_{k=-\infty}^{\infty} X(\omega - k\omega_s) \end{aligned}\]

Key Insight

The spectrum of the sampled signal consists of the original spectrum repeated at intervals of \(\omega_s\).

Nyquist Sampling Theorem

Nyquist Sampling Theorem

Statement

A band-limited signal \(x(t)\) with maximum frequency \(f_m\) can be perfectly reconstructed from its samples if the sampling frequency satisfies:

\[\begin{aligned} f_s \geq 2f_m \end{aligned}\]

Key Definitions

  • Nyquist Rate: \(f_N = 2f_m\) (minimum sampling rate)

  • Nyquist Frequency: \(f_N/2 = f_m\) (maximum signal frequency)

  • Nyquist Interval: \(T_N = 1/f_N = 1/(2f_m)\) (maximum sampling period)

Conditions for Perfect Reconstruction

  1. Signal must be band-limited: \(X(\omega) = 0\) for \(|\omega| > \omega_m\)

  2. Sampling rate: \(\omega_s > 2\omega_m\)

  3. Ideal reconstruction filter required

Nyquist Theorem - Frequency Domain View

Case 1: \(\omega_s > 2\omega_m\) (No Aliasing)

  • Spectral replicas do not overlap

  • Perfect reconstruction possible

  • \(X_s(\omega) = \frac{1}{T_s}X(\omega)\) for \(|\omega| < \omega_s/2\)

Case 2: \(\omega_s < 2\omega_m\) (Aliasing)

  • Spectral replicas overlap

  • Information loss occurs

  • Perfect reconstruction impossible

Case 3: \(\omega_s = 2\omega_m\) (Critical Sampling)

  • Spectral replicas just touch

  • Theoretically perfect reconstruction possible

  • Practically challenging due to ideal filter requirements

Aliasing

Aliasing Phenomenon

Definition

Aliasing occurs when the sampling rate is insufficient (\(f_s < 2f_m\)), causing high-frequency components to appear as lower frequencies in the sampled signal.

Mathematical Description

For a sinusoid \(x(t) = A\cos(2\pi f_0 t)\) sampled at rate \(f_s\):

\[\begin{aligned} x[n] &= A\cos(2\pi f_0 nT_s) = A\cos\left(\frac{2\pi f_0 n}{f_s}\right) \end{aligned}\]

If \(f_0 > f_s/2\), the sampled signal appears as:

\[\begin{aligned} x[n] = A\cos\left(\frac{2\pi f_a n}{f_s}\right) \end{aligned}\]
where \(f_a\) is the alias frequency.

Alias Frequency Calculation

Alias Frequency Formula

For a frequency \(f_0\) sampled at rate \(f_s\):

\[\begin{aligned} f_a = |f_0 - kf_s| \end{aligned}\]
where \(k\) is chosen such that \(0 \leq f_a \leq f_s/2\).

Alternative Formula

\[\begin{aligned} f_a = \begin{cases} f_0 - kf_s & \text{if } kf_s < f_0 < (k+0.5)f_s \\ (k+1)f_s - f_0 & \text{if } (k+0.5)f_s < f_0 < (k+1)f_s \end{cases} \end{aligned}\]
for integer \(k \geq 0\).

Example

If \(f_0 = 1.2\) kHz and \(f_s = 1\) kHz: \(f_a = |1.2 - 1| = 0.2\) kHz

Types of Aliasing

Temporal Aliasing

  • High-frequency signals appear as low-frequency

  • Common in digital signal processing

  • Example: Wagon wheel effect in movies

Spectral Aliasing

  • Frequency domain overlapping

  • Loss of original frequency information

  • Irreversible distortion

Practical Examples

  • Audio sampling: Need \(f_s > 40\) kHz for 20 kHz audio

  • Video sampling: Frame rate vs. motion frequency

  • Radar systems: Doppler frequency aliasing

Anti-Aliasing

Anti-Aliasing Techniques

Pre-filtering (Anti-Aliasing Filter)

  • Low-pass filter before sampling

  • Cutoff frequency: \(f_c \leq f_s/2\)

  • Removes frequency components above Nyquist frequency

Anti-Aliasing Filter Requirements

\[\begin{aligned} H(f) = \begin{cases} 1 & \text{for } |f| \leq f_m \\ 0 & \text{for } |f| \geq f_s/2 \end{cases} \end{aligned}\]

Practical Considerations

  • Ideal brick-wall filter not realizable

  • Transition band: \(f_m < f < f_s/2\)

  • Guard band: \(f_g = f_s/2 - f_m\)

  • Higher sampling rate reduces filter complexity

Oversampling

Definition

Sampling at a rate much higher than the Nyquist rate:

\[\begin{aligned} f_s >> 2f_m \end{aligned}\]

Advantages

  • Relaxed anti-aliasing filter requirements

  • Better SNR performance

  • Easier analog filter design

  • Noise shaping possibilities

Oversampling Ratio

\[\begin{aligned} \text{OSR} = \frac{f_s}{2f_m} \end{aligned}\]

Applications

  • Delta-sigma modulators

  • High-resolution audio systems

  • Medical imaging systems

Signal Reconstruction

Signal Reconstruction

Reconstruction Process

Converting discrete-time samples back to continuous-time signal:

\[\begin{aligned} x_r(t) = \sum_{n=-\infty}^{\infty} x[n] \cdot h_r(t - nT_s) \end{aligned}\]
where \(h_r(t)\) is the reconstruction filter impulse response.

Ideal Reconstruction

For perfect reconstruction (when Nyquist criterion is satisfied):

\[\begin{aligned} H_r(\omega) = \begin{cases} T_s & \text{for } |\omega| \leq \omega_s/2 \\ 0 & \text{for } |\omega| > \omega_s/2 \end{cases} \end{aligned}\]

Ideal Reconstruction Filter

\[\begin{aligned} h_r(t) = \frac{\sin(\omega_s t/2)}{\omega_s t/2} = \frac{1}{2} \text{sinc}\left(\frac{t}{2T_s}\right) \end{aligned}\]

Whittaker-Shannon Interpolation Formula

Perfect Reconstruction Formula

When sampling theorem conditions are met:

\[\begin{aligned} x(t) = \sum_{n=-\infty}^{\infty} x(nT_s) \cdot \frac{\sin[\pi(t-nT_s)/T_s]}{\pi(t-nT_s)/T_s} \end{aligned}\]

Simplified Form

\[\begin{aligned} x(t) = \sum_{n=-\infty}^{\infty} x[n] \cdot \text{sinc}\left(\frac{t-nT_s}{T_s}\right) \end{aligned}\]

Key Properties

  • Each sample contributes a sinc function

  • Sinc functions are orthogonal at sampling instants

  • Perfect reconstruction requires infinite sum

  • Practical systems use finite approximations

Practical Reconstruction Methods

Zero-Order Hold (ZOH)

\[\begin{aligned} x_r(t) = x[n] \quad \text{for } nT_s \leq t < (n+1)T_s \end{aligned}\]
  • Simplest reconstruction

  • Creates staircase waveform

  • Significant high-frequency distortion

First-Order Hold (Linear Interpolation)

\[\begin{aligned} x_r(t) = x[n] + \frac{t-nT_s}{T_s}(x[n+1] - x[n]) \end{aligned}\]
  • Linear interpolation between samples

  • Better than ZOH but still imperfect

  • Reduced high-frequency content

Higher-Order Interpolation

  • Cubic spline interpolation

  • Windowed sinc interpolation

  • Better approximation to ideal reconstruction

Practical Sampling Systems

Sample-and-Hold (S&H) Circuits

Purpose

  • Hold sample value constant during A/D conversion

  • Prevent aperture error

  • Provide time for conversion process

S&H Transfer Function

\[\begin{aligned} H_{SH}(\omega) = \frac{\sin(\omega T_h/2)}{\omega T_h/2} e^{-j\omega T_h/2} \end{aligned}\]
where \(T_h\) is the hold time.

Aperture Effects

  • Aperture Time: Time to acquire sample

  • Aperture Jitter: Variation in sampling instant

  • Aperture Error: Signal change during acquisition

Quantization in Sampling

Quantization Process

Converting continuous amplitude to discrete levels:

\[\begin{aligned} x_q[n] = Q(x[n]) \end{aligned}\]

Uniform Quantization

\[\begin{aligned} \Delta &= \frac{x_{\max} - x_{\min}}{2^b} \quad \text{(Quantization step)} \\ b &= \text{Number of bits} \end{aligned}\]

Quantization Error

\[\begin{aligned} e_q[n] &= x_q[n] - x[n] \\ -\frac{\Delta}{2} &\leq e_q[n] \leq \frac{\Delta}{2} \end{aligned}\]

Signal-to-Quantization-Noise Ratio

\[\begin{aligned} \text{SQNR} = 6.02b + 1.76 \text{ dB} \end{aligned}\]
for uniform quantization with \(b\) bits.

Multirate Signal Processing

Decimation (Downsampling)

Definition

Reducing the sampling rate by factor \(M\):

\[\begin{aligned} y[n] = x[Mn] \end{aligned}\]

Frequency Domain Effect

\[\begin{aligned} Y(\omega) = \frac{1}{M} \sum_{k=0}^{M-1} X\left(\frac{\omega - 2\pi k}{M}\right) \end{aligned}\]

Anti-Aliasing for Decimation

  • Low-pass filter before decimation

  • Cutoff frequency: \(\omega_c = \pi/M\)

  • Prevents aliasing in downsampled signal

Decimation Process

\[\begin{aligned} x[n] \xrightarrow{LPF} w[n] \xrightarrow{\downarrow M} y[n] \end{aligned}\]

Interpolation (Upsampling)

Definition

Increasing the sampling rate by factor \(L\):

\[\begin{aligned} w[n] = \begin{cases} x[n/L] & \text{if } n = 0, \pm L, \pm 2L, \ldots \\ 0 & \text{otherwise} \end{cases} \end{aligned}\]

Frequency Domain Effect

\[\begin{aligned} W(\omega) = X(L\omega) \end{aligned}\]

Anti-Imaging Filter

  • Low-pass filter after upsampling

  • Cutoff frequency: \(\omega_c = \pi/L\)

  • Removes spectral images

Interpolation Process

\[\begin{aligned} x[n] \xrightarrow{\uparrow L} w[n] \xrightarrow{LPF} y[n] \end{aligned}\]

Important Formulas Summary

Key Formulas - Sampling Theory

Fundamental Relations

\[\begin{aligned} \text{Nyquist Rate: } & f_s \geq 2f_m \\ \text{Sampling: } & x_s(t) = x(t) \sum_{n=-\infty}^{\infty} \delta(t - nT_s) \\ \text{Spectrum: } & X_s(\omega) = \frac{1}{T_s} \sum_{k=-\infty}^{\infty} X(\omega - k\omega_s) \\ \text{Reconstruction: } & x(t) = \sum_{n=-\infty}^{\infty} x[n] \text{sinc}\left(\frac{t-nT_s}{T_s}\right) \\ \text{Alias Frequency: } & f_a = |f_0 - kf_s| \\ \text{SQNR: } & \text{SQNR} = 6.02b + 1.76 \text{ dB} \end{aligned}\]

Common GATE Problems

Typical Question Types

  1. Finding minimum sampling rate for given signal

  2. Calculating alias frequencies

  3. Determining reconstruction filter specifications

  4. Multirate system design

  5. Quantization noise calculations

Problem-Solving Tips

  • Always identify maximum frequency component

  • Check for aliasing conditions

  • Consider practical filter limitations

  • Remember guard bands in real systems

  • Use frequency domain analysis for complex signals