# 10.1: Signal Sampling

- Page ID
- 22900

## Introduction

Digital computers can process discrete time signals using extremely flexible and powerful algorithms. However, most signals of interest are continuous time signals, which is how data almost always appears in nature. This module introduces the concepts behind converting continuous time signals into discrete time signals through a process called sampling.

## Sampling

Sampling a continuous time signal produces a discrete time signal by selecting the values of the continuous time signal at evenly spaced points in time. Thus, sampling a continuous time signal \(x\) with sampling period \(T_s\) gives the discrete time signal \(x_s\) defined by \(x_s(n)=x(nT_s)\). The sampling angular frequency is then given by \(\omega_s=2 \pi /T_s\).

It should be intuitively clear that multiple continuous time signals sampled at the same rate can produce the same discrete time signal since uncountably many continuous time functions could be constructed that connect the points on the graph of any discrete time function. Thus, sampling at a given rate does not result in an injective relationship. Hence, sampling is, in general, not invertible.

Example \(\PageIndex{1}\)

For instance, consider the signals \(x\),\(y\) defined by

\[x(t)=\frac{\sin (t)}{t}\]

\[y(t)=\frac{\sin (5 t)}{t}\]

and their sampled versions \(x_S\),\(y_s\) with sampling period \(T_s=\pi/2\)

\[x_{s}(n)=\frac{\sin (n \pi / 2)}{n \pi / 2}\]

\[y_{s}(n)=\frac{\sin (n 5 \pi / 2)}{n \pi / 2}.\]

Notice that since

\[\sin (n 5 \pi / 2)=\sin (n 2 \pi+n \pi / 2)=\sin (n \pi / 2)\]

it follows that

\[y_{s}(n)=\frac{\sin (n \pi / 2)}{n \pi / 2}=x_{s}(n).\]

Hence, \(x\) and \(y\) provide an example of distinct functions with the same sampled versions at a specific sampling rate.

It is also useful to consider the relationship between the frequency domain representations of the continuous time function and its sampled versions. Consider a signal \(x\) sampled with sampling period \(T_s\) to produce the discrete time signal \(x_s(n)=x(nT_s)\). The spectrum \(X_s(\omega)\) for \(\omega \in[-\pi, \pi)\) of \(x_s\) is given by

\[X_{s}(\omega)=\sum_{n=-\infty}^{\infty} x\left(n T_{s}\right) e^{-j \omega n}.\]

Using the continuous time Fourier transform, \(x(tT_s)\) can be represented as

\[x\left(t T_{s}\right)=\frac{1}{2 \pi T_{s}} \int_{-\infty}^{\infty} X\left(\frac{\omega_{1}}{T_{s}}\right) e^{j \omega_{1} t} d \omega_{1}.\]

Thus, the unit sampling period version of \(x(tT_s)\), which is \(x(nT_s)\) can be represented as

\[x\left(n T_{s}\right)=\frac{1}{2 \pi T_{s}} \int_{-\infty}^{\infty} X\left(\frac{\omega_{1}}{T_{s}}\right) e^{j \omega_{1} n} d \omega_{1}.\]

This is algebraically equivalent to the representation

\[x\left(n T_{s}\right)=\frac{1}{T_{s}} \sum_{k=-\infty}^{\infty} \frac{1}{2 \pi} \int_{-\pi}^{\pi} X\left(\frac{\omega_{1}-2 \pi k}{T_{s}}\right) e^{j\left(\omega_{1}-2 \pi k\right) n} d \omega_{1},\]

which reduces by periodicity of complex exponentials to

\[x\left(n T_{s}\right)=\frac{1}{T_{s}} \sum_{k=-\infty}^{\infty} \frac{1}{2 \pi} \int_{-\pi}^{\pi} X\left(\frac{\omega_{1}-2 \pi k}{T_{s}}\right) e^{j \omega_{1} n} d \omega_{1}.\]

Hence, it follows that

\[X_{s}(\omega)=\frac{1}{T_{s}} \sum_{k=-\infty}^{\infty} \sum_{n=-\infty}^{\infty}\left(\int_{-\pi}^{\pi} X\left(\frac{\omega_{1}-2 \pi k}{T_{s}}\right) e^{j \omega_{1} n} d \omega_{1}\right) e^{-j \omega n}.\]

Noting that the above expression contains a Fourier series and inverse Fourier series pair, it follows that

\[X_{s}(\omega)=\frac{1}{T_{s}} \sum_{k=-\infty}^{\infty} X\left(\frac{\omega-2 \pi k}{T_{s}}\right).\]

Hence, the spectrum of the sampled signal is, intuitively, the scaled sum of an infinite number of shifted and time scaled copies of original signal spectrum. Aliasing, which will be discussed in depth in later modules, occurs when these shifted spectrum copies overlap and sum together. Note that when the original signal \(x\) is bandlimited to \((−\pi /T_s, \pi /T_s)\) no overlap occurs, so each period of the sampled signal spectrum has the same form as the original signal spectrum. This suggest that if we sample a bandlimited signal at a sufficiently high sampling rate, we can recover it from its samples as will be further described in the modules on the Nyquist-Shannon sampling theorem and on perfect reconstruction.

## Sampling Summary

Sampling a continuous time signal produces a discrete time signal by selecting the values of the continuous time signal at equally spaced points in time. However, we have shown that this relationship is not injective as multiple continuous time signals can be sampled at the same rate to produce the same discrete time signal. This is related to a phenomenon called aliasing which will be discussed in later modules. Consequently, the sampling process is not, in general, invertible. Nevertheless, as will be shown in the module concerning reconstruction, the continuous time signal can be recovered from its sampled version if some additional assumptions hold.