Skip to main content

Sampling Theorem

Jia-YinAbout 3 min

Signal and Its Spectrum

We assume that the signal to be processed is a real function s(t)s(t) with its spectrum S(f)S(f), and assume that the maximum frequency component of S(f)S(f) does not exceed fMf_M. Note that the spectrum of a real function is basically symmetric about the y-axis, as shown in the figure below:

's spectrum
s(t)s(t)'s spectrum S(f)S(f)

Mathematical Expression of Sampling

As mentioned earlier, to transition from analog to digital signals, the process generally involves sampling and quantization, where quantization is irreversible and introduces what is called quantization noise.

Let's now talk about sampling.

Assuming the signal is s(t)s(t), sampled every TT time, the sampling result is sn=s(nT)s_n = s(nT). Mathematically, we can imagine that the sampling method is equivalent to multiplying the original signal s(t)s(t) by a comb function, which is ШT(t)s(t)\text{Ш}_T(t)s(t), as shown in the figure below:

Sampling the  function
Sampling the s(t)s(t) function

We don't need to worry about the problem of the δ\delta function approaching \infty; just focus on the coefficient before the δ\delta function.

Spectrum After Sampling

After sampling the signal, let's look at its Fourier transform, that is, the spectrum after sampling. According to the content described earlier:

F{ШT(t)s(t)}=F{ШT(t)}F{s(t)}=1TШ1T(f)S(f) \begin{align*} \mathcal{F}\{\text{Ш}_T(t)s(t)\} &= \mathcal{F}\{\text{Ш}_T(t)\} * \mathcal{F}\{s(t)\} \\ &= \frac{1}{T}\text{Ш}_{\frac{1}{T}}(f) * S(f) \end{align*}

Since the Ш1/T(f)\text{Ш}_{1/T}(f) function consists of a series of δ\delta functions, and when a δ\delta function convolves with any function, it remains the same function but shifts its center to the center of the δ\delta function, i.e.,

Ш1T(f)S(f)=n=δ(fn/T)S(f)=n=S(fn/T) \begin{align*} \text{Ш}_{\frac{1}{T}}(f) * S(f) &= \sum_{n=-\infty}^{\infty} \delta(f-n/T) * S(f) \\ &= \sum_{n=-\infty}^{\infty} S(f-n/T) \end{align*}

This results in the following spectrum after sampling (amplitude not considered for now):

's spectrum after sampling
s(t)s(t)'s spectrum after sampling

Note that the above figure assumes fs>2fMf_s > 2f_M, so there is no overlap between the repeated spectrums. If fs<2fMf_s < 2f_M, the repeated spectrums would overlap.

Signal Restoration

If fs>2fMf_s > 2f_M, meaning there is no overlap between the repeated spectrums, we can take the middle slanted part of the spectrum as the signal we want to restore. Since the spectrum of the signal is completely the same, the signal itself is also identical. In other words, theoretically, it is possible to restore the original signal from the sampling result. The rate fs=2fMf_s=2f_M is called the Nyquist sampling rate and the corresponding frequency fMf_M is called the Nyquist frequency.

The restoration method, in terms of the frequency domain, is to multiply the sampled spectrum by a hat function, which is equivalent to low-pass filtering the signal, i.e., only retaining the middle slanted spectrum region and filtering out other frequency areas. Mathematically, this can be represented as (amplitude not considered for now):

(n=S(fn/T)) Π(f/fs)=S(f) (\sum_{n=-\infty}^{\infty} S(f-n/T))\ \Pi(f/f_s) = S(f)

Alternatively, from the time domain perspective, performing the inverse Fourier transform of the above equation results in the time-domain signal. Since multiplication in the frequency domain translates to convolution in the time domain, and the inverse transform of the hat function is the sinc function, the time-domain signal can be expressed as (amplitude not considered for now):

s^(t)=(ШT(t)s(t))sinc(fst)=(n=snδ(tnT))sinc(fst)=n=sn sinc(fs(tnT))=n=sn sinc((tnT)/T) \begin{align*} \hat{s}(t) &= (\text{Ш}_T(t)s(t)) * \text{sinc}(f_st) \\ &= \left(\sum_{n=-\infty}^{\infty} s_n\delta(t-nT)\right) * \text{sinc}(f_st) \\ &= \sum_{n=-\infty}^{\infty} s_n\ \text{sinc}(f_s(t-nT))\\ &= \sum_{n=-\infty}^{\infty} s_n\ \text{sinc}((t-nT)/T) \end{align*}

The result is shown in the figure below, equivalent to placing a scaled sinc function at each sampling point, where the sinc function has a value of 1 at the sampling position and 0 at other sampling positions. For this reason, the sinc function is sometimes also called the sampling function.

Time-domain equivalent diagram for signal restoration
Time-domain equivalent diagram for signal restoration

Exercise 3

  1. The content above assumes that the signal bandwidth is limited. Is this assumption reasonable in the real physical world? Please share your views and reasons.
  2. In the reasoning process above, it's assumed that the sampling rate is more than twice the signal's highest frequency. What would happen if the actual sampling rate is less than twice the signal's highest frequency?