Sampling and the Fourier Transform of Sampled Functions

In modern digital systems, the process of converting real-world analog signals into a form that computers can process is fundamental. This transformation, known as sampling, plays a key role in various fields like audio processing, communications, and image analysis. Sampling involves taking snapshots of a continuous signal at regular intervals, thereby creating a discrete representation that can be efficiently stored and manipulated digitally.

However, this conversion from the continuous to the discrete domain introduces challenges, particularly when dealing with signal reconstruction and frequency analysis. The Fourier Transform of sampled signals provides a powerful framework for understanding how signals behave in the frequency domain. By decomposing signals into their constituent frequency components, the Fourier Transform helps us visualize and analyze the effects of sampling, such as aliasing and the periodic nature of the frequency spectrum in sampled functions.

This article explores the fundamental concepts behind sampling, its relationship to the Fourier Transform, and the principles that govern how discrete signals can be accurately processed and reconstructed without losing essential information. Understanding these concepts is crucial for anyone working with digital signal processing, ensuring that sampled signals remain faithful representations of their continuous counterparts.

Table of Contents

Sampling

Sampling is a key concept in digital signal processing, where a continuous-time signal is converted into a discrete-time signal. This transformation enables us to process signals using computers and digital systems. To understand the theory behind sampling, we will explore it through its definitions, mathematical concepts, and examples.


1. Continuous-Time Signals vs. Discrete-Time Signals

  • Continuous-Time Signal: A signal that is defined for every time tRt \in \mathbb{R} (i.e., the signal has a value at every instant of time). For example, a sine wave like x(t)=Asin(2πft)x(t) = A \sin(2\pi f t), where tt is continuous, is a continuous-time signal.

  • Discrete-Time Signal: A signal that is only defined at specific time intervals, usually obtained by sampling a continuous-time signal at regular intervals. The sampled signal is represented as a sequence of values x[n]x[n], where nn is an integer index.


2. Sampling Process

The sampling process involves converting a continuous-time signal x(t)x(t) into a discrete-time signal x[n]x[n] by taking samples at regular intervals.

Mathematically:

Let TsT_s be the sampling period, which is the time interval between successive samples. The discrete-time signal is then given by:

x[n]=x(nTs),n=0,1,2,x[n] = x(nT_s), \quad n = 0, 1, 2, \ldots

Here, TsT_s is the sampling period (in seconds), and its reciprocal, fsf_s, is the sampling frequency (in samples per second, or Hertz):

fs=1Tsf_s = \frac{1}{T_s}

Thus, sampling a continuous signal x(t)x(t) means taking samples at time instants t=0,Ts,2Ts,3Ts,t = 0, T_s, 2T_s, 3T_s, \dots.

Example:

Suppose we have a continuous signal x(t)=sin(2π10t)x(t) = \sin(2\pi 10t), which is a sine wave with a frequency of 10 Hz. If we sample it at a rate of fs=40f_s = 40 Hz, the sampling period is:

Ts=1fs=140 secondsT_s = \frac{1}{f_s} = \frac{1}{40} \text{ seconds}

The sampled signal x[n]x[n] is:

x[n]=sin(2π10n40)=sin(πn2)x[n] = \sin\left(2\pi 10 \cdot \frac{n}{40}\right) = \sin\left(\frac{\pi n}{2}\right)

For n=0,1,2,3,n = 0, 1, 2, 3, \ldots, the sampled values are:

  • x[0]=sin(0)=0x[0] = \sin(0) = 0
  • x[1]=sin(π2)=1x[1] = \sin\left(\frac{\pi}{2}\right) = 1
  • x[2]=sin(π)=0x[2] = \sin(\pi) = 0
  • x[3]=sin(3π2)=1x[3] = \sin\left(\frac{3\pi}{2}\right) = -1
  • x[4]=sin(2π)=0x[4] = \sin(2\pi) = 0

The discrete-time signal x[n]x[n] thus repeats periodically.


3. Nyquist-Shannon Sampling Theorem

One of the most important results in signal processing is the Nyquist-Shannon Sampling Theorem. It defines the minimum sampling rate required to capture all the information from a continuous-time signal without introducing distortions like aliasing.

Statement:

If a continuous-time signal x(t)x(t) contains no frequencies higher than fmaxf_{\text{max}} Hz, then the signal can be fully reconstructed from its samples if the sampling rate fsf_s satisfies:

fs2fmaxf_s \geq 2 f_{\text{max}}

This minimum sampling rate fs=2fmaxf_s = 2 f_{\text{max}} is called the Nyquist rate.

  • If the sampling rate is lower than the Nyquist rate, higher frequencies in the signal will “fold” into lower frequencies, creating an effect known as aliasing.
  • If the signal is sampled at or above the Nyquist rate, the original continuous signal can be perfectly reconstructed from the discrete samples.

Example:

Let’s say a signal x(t)x(t) has a maximum frequency component of 500 Hz. According to the Nyquist-Shannon theorem, the sampling rate must be at least:

fs2×500=1000Hzf_s \geq 2 \times 500 = 1000 \, \text{Hz}

Thus, to avoid aliasing, the signal must be sampled at a rate of 1000 Hz or higher.


4. Aliasing:

When the sampling frequency fsf_s is less than twice the maximum frequency fmaxf_{\text{max}}, the phenomenon of aliasing occurs. Aliasing causes higher frequencies in the original signal to appear as lower frequencies in the sampled signal, leading to distortions that cannot be corrected.

Mathematical Insight into Aliasing:

The Fourier Transform of a continuous signal gives us its frequency spectrum. When we sample a signal, its Fourier Transform becomes periodic, repeating every fsf_s Hz. If the sampling rate is too low, different frequency components in the spectrum will overlap, leading to aliasing.

Example of Aliasing:

Consider a sinusoidal signal x(t)=sin(2π600t)x(t) = \sin(2\pi 600t) (a 600 Hz signal). If we sample this signal at a rate of 800 Hz (less than the Nyquist rate), aliasing will occur. The sampled signal will behave as if the frequency is:

falias=ftrueNfsf_{\text{alias}} = | f_{\text{true}} – N f_s |

where NN is an integer chosen such that faliasf_{\text{alias}} is within the Nyquist range [fs/2,fs/2][-f_s/2, f_s/2].

For this example:

falias=6001×800=200Hzf_{\text{alias}} = |600 – 1 \times 800| = 200 \, \text{Hz}

The 600 Hz signal will be aliased and appear as a 200 Hz signal after sampling, resulting in a distortion of the original signal.


5. Reconstruction of the Signal

If the sampling theorem is satisfied (i.e., fs2fmaxf_s \geq 2 f_{\text{max}}), the original continuous-time signal x(t)x(t) can be perfectly reconstructed from its samples x[n]x[n]. This is done using a reconstruction filter, typically a low-pass filter that removes the higher-frequency repetitions introduced by sampling.

Reconstruction Formula:

The continuous signal can be reconstructed from its samples using the following formula:

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

Here, the sinc function:

sinc(t)=sin(πt)πt\text{sinc}(t) = \frac{\sin(\pi t)}{\pi t}

acts as the ideal interpolation function.


6. Practical Considerations

  • Oversampling: In practice, signals are often sampled at rates higher than the Nyquist rate to allow for imperfections in real-world systems.

  • Anti-Aliasing Filter: Before sampling, it’s common to apply a low-pass filter to the continuous signal to remove frequency components higher than half the sampling rate. This is called an anti-aliasing filter.

  • Sampling is the process of converting a continuous-time signal into a discrete-time signal by taking regular samples.
  • The Nyquist-Shannon Sampling Theorem tells us that to avoid aliasing, the sampling rate must be at least twice the highest frequency in the signal.
  • If the sampling rate is too low, aliasing occurs, causing high-frequency components to appear incorrectly as lower frequencies in the sampled signal.
  • If the sampling rate is sufficient, the continuous-time signal can be perfectly reconstructed from the discrete samples using appropriate interpolation methods.

The Fourier Transform of Sampled Functions

The Fourier Transform is a powerful mathematical tool used to analyze signals in the frequency domain. When a continuous-time signal is sampled, the Fourier Transform of the sampled function introduces new characteristics that are crucial to understand in digital signal processing.

1. Continuous-Time Fourier Transform (CTFT)

Before diving into the Fourier Transform of sampled functions, let’s recall the Continuous-Time Fourier Transform (CTFT), which transforms a continuous-time signal x(t)x(t) into its frequency-domain representation X(f)X(f).

Mathematical Definition:

The CTFT of a signal x(t)x(t) is given by the following integral:

X(f)=x(t)ej2πftdtX(f) = \int_{-\infty}^{\infty} x(t) e^{-j2\pi ft} dt

where:

  • x(t)x(t) is the continuous-time signal,
  • ff is the frequency in Hz,
  • jj is the imaginary unit.

The inverse CTFT is used to reconstruct the time-domain signal from its frequency components:

x(t)=X(f)ej2πftdfx(t) = \int_{-\infty}^{\infty} X(f) e^{j2\pi ft} df

2. Sampling of Continuous-Time Signals

When a continuous-time signal is sampled, it is multiplied by a sampling function or a Dirac comb, which is a train of equally spaced delta functions. The result of this multiplication is a discrete-time signal, represented as a series of samples.

Mathematical Expression:

Let x(t)x(t) be a continuous-time signal, and let the signal be sampled at intervals of TsT_s seconds, where TsT_s is the sampling period. The sampling function S(t)S(t) is:

S(t)=n=δ(tnTs)S(t) = \sum_{n=-\infty}^{\infty} \delta(t – nT_s)

The sampled signal xs(t)x_s(t) is:

xs(t)=x(t)S(t)=x(t)n=δ(tnTs)x_s(t) = x(t) \cdot S(t) = x(t) \cdot \sum_{n=-\infty}^{\infty} \delta(t – nT_s)

This multiplication picks out the values of x(t)x(t) at the sampling instants t=nTst = nT_s.


3. Fourier Transform of Sampled Signals

To understand how sampling affects the frequency content of the signal, we take the Fourier Transform of the sampled signal.

Fourier Transform of the Sampling Function:

The Fourier Transform of the sampling function S(t)S(t) is a Dirac comb in the frequency domain, which can be expressed as:

F{S(t)}=1Tsk=δ(fkfs)\mathcal{F}\{S(t)\} = \frac{1}{T_s} \sum_{k=-\infty}^{\infty} \delta(f – kf_s)

where fs=1Tsf_s = \frac{1}{T_s} is the sampling frequency. This indicates that sampling introduces periodic repetitions of the signal’s spectrum, spaced at intervals of fsf_s.

Fourier Transform of the Sampled Signal:

The Fourier Transform of the sampled signal xs(t)x_s(t) is given by:

Xs(f)=F{xs(t)}=F{x(t)S(t)}X_s(f) = \mathcal{F}\{x_s(t)\} = \mathcal{F}\{x(t) \cdot S(t)\}

Using the convolution theorem, the Fourier Transform of the product of two functions (here, x(t)x(t) and S(t)S(t)) is the convolution of their individual Fourier Transforms. Therefore:

Xs(f)=X(f)1Tsk=δ(fkfs)X_s(f) = X(f) * \frac{1}{T_s} \sum_{k=-\infty}^{\infty} \delta(f – kf_s)

This means that the Fourier Transform of the sampled signal is the original Fourier Transform X(f)X(f), replicated periodically at intervals of fsf_s. Mathematically:

Xs(f)=1Tsk=X(fkfs)X_s(f) = \frac{1}{T_s} \sum_{k=-\infty}^{\infty} X\left(f – kf_s\right)

Key Points:

  • Periodic Replication: Sampling a signal in the time domain leads to periodic replication of its spectrum in the frequency domain.
  • Aliasing: If the signal contains frequencies higher than fs2\frac{f_s}{2}, the replicated spectra will overlap, causing aliasing. This results in distortion in the sampled signal’s frequency representation.

4. Nyquist Criterion and Aliasing

To avoid aliasing, the Nyquist Criterion must be satisfied. This criterion states that the sampling frequency fsf_s must be at least twice the highest frequency component fmaxf_{\text{max}} in the original signal:

fs2fmaxf_s \geq 2f_{\text{max}}

If the signal is sampled at a frequency lower than this Nyquist rate, high-frequency components will “fold” into lower frequencies, resulting in aliasing.

Example of Aliasing:

Consider a continuous signal with frequency components up to 1 kHz. According to the Nyquist criterion, the sampling frequency must be at least:

fs=2×1000=2000Hzf_s = 2 \times 1000 = 2000 \, \text{Hz}

If the signal is sampled at 1500 Hz (below the Nyquist rate), frequencies above 750 Hz will alias, causing distortion.


5. Reconstruction of the Original Signal

If the signal is sampled according to the Nyquist rate, it is possible to reconstruct the original continuous-time signal from its samples using a reconstruction filter.

Reconstruction Process:

The Fourier Transform of the sampled signal consists of repeated copies of the original spectrum X(f)X(f). To recover the original signal, we apply a low-pass filter that removes the higher-frequency copies and keeps only the original spectrum within the range [fs/2,fs/2][-f_s/2, f_s/2]. After filtering, the inverse Fourier Transform is applied to return to the time domain.

Mathematically:

The reconstructed signal x(t)x(t) is:

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

where sinc(t)=sin(πt)πt\text{sinc}(t) = \frac{\sin(\pi t)}{\pi t} is the sinc function, acting as the interpolation kernel.


6. Example: Fourier Transform of a Sampled Sine Wave

Consider a continuous-time sine wave signal:

x(t)=sin(2πf0t)x(t) = \sin(2\pi f_0 t)

where f0=100Hzf_0 = 100 \, \text{Hz}.

If we sample this signal at a rate fs=500Hzf_s = 500 \, \text{Hz}, the sampling period is Ts=1fs=0.002secondsT_s = \frac{1}{f_s} = 0.002 \, \text{seconds}. The sampled signal is:

x[n]=sin(2πf0nfs)=sin(2π100500n)=sin(2π5n)x[n] = \sin\left(2\pi f_0 \frac{n}{f_s}\right) = \sin\left(\frac{2\pi \cdot 100}{500} n\right) = \sin\left(\frac{2\pi}{5} n\right)

Now, let’s examine the Fourier Transform of the sampled signal. The Fourier Transform of the continuous signal x(t)x(t) is:

X(f)=12j[δ(ff0)δ(f+f0)]X(f) = \frac{1}{2j} \left[ \delta(f – f_0) – \delta(f + f_0) \right]

After sampling, the Fourier Transform of the sampled signal becomes:

Xs(f)=1Tsk=[12j(δ(ff0kfs)δ(f+f0kfs))]X_s(f) = \frac{1}{T_s} \sum_{k=-\infty}^{\infty} \left[ \frac{1}{2j} \left( \delta(f – f_0 – kf_s) – \delta(f + f_0 – kf_s) \right) \right]

For f0=100Hzf_0 = 100 \, \text{Hz} and fs=500Hzf_s = 500 \, \text{Hz}, the spectrum contains copies of X(f)X(f) at intervals of 500Hz500 \, \text{Hz}, i.e., at ±100Hz,±500Hz,±900Hz,\pm 100 \, \text{Hz}, \pm 500 \, \text{Hz}, \pm 900 \, \text{Hz}, \dots.

If the signal is sampled at fs=200Hzf_s = 200 \, \text{Hz}, which is less than the Nyquist rate, aliasing occurs. Frequencies above 100 Hz will fold back into the lower frequencies, causing distortion in the sampled signal.

The Sampling Theorem

The Sampling Theorem, also known as the Nyquist-Shannon Sampling Theorem, is a fundamental principle in the field of signal processing. It defines the conditions under which a continuous-time signal can be completely represented and reconstructed from its discrete samples without any loss of information. This theorem is essential for ensuring accurate digital representation of analog signals.


1. Statement of the Sampling Theorem

If a continuous-time signal x(t)x(t) is band-limited (i.e., its Fourier Transform X(f)X(f) is zero for all frequencies greater than a certain maximum frequency fmaxf_{\text{max}}), the signal can be exactly reconstructed from its samples if the sampling frequency fsf_s satisfies the following condition:

fs2fmaxf_s \geq 2 f_{\text{max}}

This minimum required sampling rate fs=2fmaxf_s = 2 f_{\text{max}} is called the Nyquist rate.


2. Intuition Behind the Sampling Theorem

The sampling theorem tells us that in order to capture all the information present in a signal, the sampling rate must be at least twice the highest frequency present in the signal. If the signal is sampled at a lower rate than the Nyquist rate, aliasing occurs, resulting in distortions and loss of information.

Key Concepts:

  • Band-Limited Signal: A signal is said to be band-limited if its frequency components are confined to a certain finite range. In other words, the signal’s Fourier Transform X(f)X(f) is zero for f>fmax|f| > f_{\text{max}}.

  • Nyquist Rate: The minimum sampling rate, which is twice the maximum frequency component fmaxf_{\text{max}} in the signal, is called the Nyquist rate.

  • Aliasing: If the sampling frequency is lower than the Nyquist rate, the high-frequency components of the signal will appear as lower frequencies in the sampled signal. This effect is known as aliasing.


3. Mathematical Proof of the Sampling Theorem

To understand the theorem, let’s examine it mathematically using the Fourier Transform.

Continuous-Time Signal:

Let x(t)x(t) be a continuous-time signal with a Fourier Transform X(f)X(f). Assume that x(t)x(t) is band-limited, meaning X(f)=0X(f) = 0 for f>fmax|f| > f_{\text{max}}.

Sampled Signal:

When the signal is sampled at intervals of TsT_s (sampling period), the discrete-time signal is:

xs(t)=x(t)S(t)=x(t)n=δ(tnTs)x_s(t) = x(t) \cdot S(t) = x(t) \cdot \sum_{n=-\infty}^{\infty} \delta(t – nT_s)

where Ts=1fsT_s = \frac{1}{f_s} is the sampling period, and fsf_s is the sampling frequency.

The Fourier Transform of the sampled signal is:

Xs(f)=1Tsk=X(fkfs)X_s(f) = \frac{1}{T_s} \sum_{k=-\infty}^{\infty} X\left(f – kf_s\right)

This equation shows that the spectrum of the sampled signal is a periodic repetition of the original signal’s spectrum, spaced at intervals of fsf_s.

Condition for Perfect Reconstruction:

For perfect reconstruction of the original signal, the spectra copies must not overlap. This happens if the sampling frequency satisfies:

fs2fmaxf_s \geq 2 f_{\text{max}}

If fsf_s is less than 2fmax2f_{\text{max}}, the spectra will overlap, leading to aliasing, which distorts the signal and makes it impossible to recover the original signal.


4. Aliasing: The Effect of Undersampling

When the sampling frequency fsf_s is lower than the Nyquist rate, high-frequency components of the signal will fold into the lower frequency range, causing aliasing. Aliasing makes the reconstructed signal inaccurate because the frequency components become indistinguishable.

Aliasing Example:

Consider a continuous-time sine wave x(t)=sin(2πf0t)x(t) = \sin(2\pi f_0 t), where f0=1kHzf_0 = 1 \, \text{kHz}. If this signal is sampled at a frequency fs=1.5kHzf_s = 1.5 \, \text{kHz}, the sampling rate is below the Nyquist rate fs=2f0=2kHzf_s = 2f_0 = 2 \, \text{kHz}. As a result, aliasing occurs, and the signal will appear as if it has a lower frequency component, faliasf_{\text{alias}}, given by:

falias=f0Nfsfor some integer Nf_{\text{alias}} = |f_0 – N f_s| \quad \text{for some integer } N

In this case:

falias=10001×1500=500Hzf_{\text{alias}} = |1000 – 1 \times 1500| = 500 \, \text{Hz}

Thus, the 1 kHz signal is aliased and will appear as a 500 Hz signal after sampling.


5. Reconstruction of the Original Signal

If the signal is sampled at or above the Nyquist rate, the original signal can be perfectly reconstructed from its discrete samples. The process involves passing the sampled signal through an ideal low-pass filter that removes the replicated spectra and retains only the frequency components within the range [fs/2,fs/2][-f_s/2, f_s/2].

Reconstruction Formula:

The reconstructed signal x(t)x(t) can be expressed as:

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

where x[n]=x(nTs)x[n] = x(nT_s) are the discrete samples, and the sinc function is defined as:

sinc(t)=sin(πt)πt\text{sinc}(t) = \frac{\sin(\pi t)}{\pi t}

The sinc function acts as an interpolation kernel that reconstructs the continuous-time signal from its discrete samples.


6. Practical Considerations

In practice, signals may not always be perfectly band-limited, and it can be difficult to achieve ideal sampling conditions. To mitigate aliasing in real-world systems, some additional techniques are employed:

  • Anti-Aliasing Filter: Before sampling, an anti-aliasing filter (usually a low-pass filter) is applied to the continuous signal to remove frequency components higher than fs/2f_s/2. This ensures that the sampled signal meets the conditions of the sampling theorem.

  • Oversampling: In some applications, signals are sampled at rates significantly higher than the Nyquist rate. This is known as oversampling and is used to simplify the design of filters and reduce aliasing.


7. Example: Applying the Sampling Theorem

Let’s consider a real-world example of a signal with frequency components up to 1 kHz. According to the Nyquist-Shannon sampling theorem, the minimum sampling frequency required is:

fs2×1000=2000Hzf_s \geq 2 \times 1000 = 2000 \, \text{Hz}

Thus, a sampling rate of at least 2 kHz is required to capture all the information from the signal. If we sample at this rate, the signal can be perfectly reconstructed using interpolation.

Undersampling Example:

If the same signal is sampled at 1.5 kHz (below the Nyquist rate), the frequencies above 750 Hz will alias and appear as lower frequencies in the sampled signal, causing distortion and making perfect reconstruction impossible.

Fourier transform of a band-limited function. (b)–(d) Transforms of the corresponding sampled function under the conditions of over-sampling, critically sampling, and under-sampling, respectively.

Aliasing

Aliasing is a phenomenon that occurs in digital signal processing when a continuous-time signal is sampled at a rate lower than the Nyquist rate. This results in the overlap of signal frequencies, which causes high-frequency components to “fold” into lower frequencies, distorting the original signal’s representation in the digital domain.

1. Understanding Aliasing

Aliasing happens when a signal is sampled at a rate insufficient to capture all of its frequency components accurately. In such cases, different frequency components in the original signal can become indistinguishable after sampling, and the sampled signal can have a distorted or misleading frequency content.

Key Concepts:

  • Nyquist Rate: The minimum sampling frequency needed to avoid aliasing is twice the highest frequency component in the original signal. This is known as the Nyquist rate, denoted by fsf_s.

  • Folding of Frequencies: When a signal is undersampled, higher-frequency components “fold” back into the lower-frequency range, making them indistinguishable from the lower-frequency components.


2. Mathematical Concept of Aliasing

To explore aliasing mathematically, let’s start with the concept of sampling. When a continuous-time signal x(t)x(t) is sampled at intervals of TsT_s, we get a discrete-time signal represented as:

xs(t)=x(t)n=δ(tnTs)x_s(t) = x(t) \cdot \sum_{n=-\infty}^{\infty} \delta(t – nT_s)

where:

  • Ts=1fsT_s = \frac{1}{f_s} is the sampling period,
  • fsf_s is the sampling frequency,
  • δ(tnTs)\delta(t – nT_s) is the Dirac delta function.

The Fourier Transform of the sampled signal xs(t)x_s(t) is:

Xs(f)=1Tsk=X(fkfs)X_s(f) = \frac{1}{T_s} \sum_{k=-\infty}^{\infty} X\left(f – kf_s\right)

This equation indicates that the frequency spectrum of the sampled signal consists of periodic repetitions of the original signal’s spectrum X(f)X(f), shifted by multiples of the sampling frequency fsf_s.

Condition for No Aliasing:

To prevent the overlapping of these repeated spectra, the sampling frequency must satisfy the Nyquist criterion:

fs2fmaxf_s \geq 2f_{\text{max}}

where fmaxf_{\text{max}} is the highest frequency component of the signal. If this condition is met, the spectra will remain separated, and the original signal can be recovered without distortion.

Aliasing Effect:

When the sampling frequency fsf_s is less than 2fmax2f_{\text{max}}, the repeated spectra overlap, and high-frequency components fold into the lower frequency range. This folding of frequencies results in aliasing, and the signal becomes distorted because different frequencies become indistinguishable.


3. Folding Frequency and Aliased Frequencies

Let’s assume that the original continuous signal has a frequency f0f_0 higher than half the sampling rate. After sampling, the observed frequency will be:

falias=f0Nfsf_{\text{alias}} = |f_0 – Nf_s|

where NN is an integer such that faliasf_{\text{alias}} falls within the frequency range [0,fs/2][0, f_s/2]. This is the folding frequency, and it determines the aliased frequency, which is the lower frequency that appears in the sampled signal instead of the original high frequency.


4. Aliasing Example

Let’s take an example of a continuous sine wave signal x(t)x(t) with frequency f0=1kHzf_0 = 1 \, \text{kHz}:

x(t)=sin(2πf0t)=sin(2π1000t)x(t) = \sin(2\pi f_0 t) = \sin(2\pi \cdot 1000 \, t)

Case 1: Sampling at Nyquist Rate

If the signal is sampled at the Nyquist rate fs=2f0=2kHzf_s = 2f_0 = 2 \, \text{kHz}, the sampling period is:

Ts=1fs=12000=0.0005secondsT_s = \frac{1}{f_s} = \frac{1}{2000} = 0.0005 \, \text{seconds}

The sampled signal will retain its original frequency, and no aliasing will occur.

Case 2: Undersampling

Now, let’s consider the case where the sampling rate is fs=1.5kHzf_s = 1.5 \, \text{kHz}, which is below the Nyquist rate:

fs=1.5kHz,Ts=11500=0.000667secondsf_s = 1.5 \, \text{kHz}, \quad T_s = \frac{1}{1500} = 0.000667 \, \text{seconds}

In this case, the original frequency f0=1kHzf_0 = 1 \, \text{kHz} exceeds half the sampling frequency fs/2=750Hzf_s/2 = 750 \, \text{Hz}. As a result, the frequency f0f_0 will fold into the lower range.

Using the aliasing formula:

falias=f0Nfsf_{\text{alias}} = |f_0 – Nf_s|

For N=1N = 1:

falias=10001×1500=10001500=500Hzf_{\text{alias}} = |1000 – 1 \times 1500| = |1000 – 1500| = 500 \, \text{Hz}

Thus, after sampling, the signal appears to have a frequency of 500 Hz instead of 1 kHz. This distortion is the result of aliasing, where the original high frequency “folds” into a lower frequency.


5. Graphical Representation of Aliasing

Aliasing can also be understood visually by examining the frequency domain. Consider a band-limited signal with a spectrum that spans from fmax-f_{\text{max}} to fmaxf_{\text{max}}. When the signal is sampled at a rate lower than the Nyquist rate, the repeated copies of the spectrum overlap, causing the high-frequency components to fold back into the lower frequency range.

Frequency Spectrum Without Aliasing:

When the sampling rate is sufficient (fs2fmaxf_s \geq 2f_{\text{max}}), the frequency spectrum looks like this:

Original spectrum at fmaxffmax\text{Original spectrum at } -f_{\text{max}} \leq f \leq f_{\text{max}}

And the replicated spectra are spaced at ±fs,±2fs,\pm f_s, \pm 2f_s, \ldots, but remain non-overlapping.

Frequency Spectrum With Aliasing:

When the sampling rate is too low (fs<2fmaxf_s < 2f_{\text{max}}), the repeated spectra overlap, leading to aliasing:

Overlapping spectra at intervals of fs\text{Overlapping spectra at intervals of } f_s

In the overlapping regions, the high-frequency components are indistinguishable from the lower frequencies, leading to distorted frequency content in the sampled signal.


6. Prevention of Aliasing

Aliasing can be prevented by ensuring that the sampling rate meets or exceeds the Nyquist rate. However, in practical applications, it’s not always possible to know the highest frequency component of a signal. To address this, the following techniques are used:

Anti-Aliasing Filter:

An anti-aliasing filter is a low-pass filter applied to the signal before sampling to remove any frequency components above fs/2f_s/2. By filtering out high-frequency components, the filter ensures that the signal is band-limited to below the Nyquist frequency, preventing aliasing.

Oversampling:

In many applications, signals are sampled at rates much higher than the Nyquist rate. This technique is called oversampling and helps reduce the impact of aliasing while simplifying filter design.


7. Real-World Example: Audio Sampling

In audio processing, aliasing can cause significant distortion in sound quality. For example, the human ear can hear frequencies up to about 20 kHz. According to the Nyquist theorem, the minimum sampling rate for recording audio without aliasing must be at least:

fs2×20kHz=40kHzf_s \geq 2 \times 20 \, \text{kHz} = 40 \, \text{kHz}

In practice, the standard sampling rate for high-quality audio is 44.1 kHz (as used in CDs), ensuring that all audible frequencies are captured accurately without aliasing. If the sampling rate were lower than 40 kHz, high-pitched sounds above 20 kHz would alias and create distorted, low-frequency noise in the recording.

Aliasing
Aliasing

Function Reconstruction (Recovery) from Sampled Data

Function reconstruction, or recovery from sampled data, is an important topic in signal processing, numerical analysis, and data science. The aim is to rebuild a continuous function from discrete data points (samples). Here’s a detailed breakdown of the key mathematical concepts behind this process:

1. Sampling

Sampling refers to the process of converting a continuous signal or function into a set of discrete points. Mathematically, suppose we have a continuous function f(x)f(x). When sampled at discrete points xnx_n (usually evenly spaced), the sampled data points are f(xn)f(x_n). These sampled points are often written as {(xn,f(xn))}\{(x_n, f(x_n))\}, where xnx_n is the sampling location and f(xn)f(x_n) is the function value at xnx_n.

f(xn)=f(nT),nZf(x_n) = f(nT), \quad n \in \mathbb{Z}

Here, TT is the sampling period, which defines the interval between consecutive samples.

2. Nyquist-Shannon Sampling Theorem

This theorem is a cornerstone for function reconstruction from sampled data. It states that a band-limited signal (a signal with no frequency components higher than a certain cutoff) can be perfectly reconstructed from its samples, provided that the sampling rate fsf_s is greater than twice the maximum frequency fmaxf_{\text{max}} present in the signal.

Mathematically:

fs>2fmaxf_s > 2f_{\text{max}}

This is called the Nyquist rate. If the sampling rate is below the Nyquist rate, aliasing occurs, where high-frequency components get misrepresented as low frequencies, making the signal unrecoverable.

3. Reconstruction of Continuous Signal (Interpolation)

Once you have the sampled data, you need a way to recover the original continuous function. Interpolation methods are often used to reconstruct the function. Common approaches include:

Sinc Interpolation:

For band-limited signals, sinc interpolation is optimal. The continuous function can be reconstructed as:

f(x)=n=f(nT)sinc(xnTT)f(x) = \sum_{n=-\infty}^{\infty} f(nT) \cdot \text{sinc}\left( \frac{x – nT}{T} \right)

where sinc(x)=sin(πx)πx\text{sinc}(x) = \frac{\sin(\pi x)}{\pi x}. The sinc function is the ideal interpolation function because it perfectly reconstructs the signal in the frequency domain. However, it has an infinite support, meaning it uses all sample points to compute each value of the reconstructed function.

Linear Interpolation:

A simpler approach is linear interpolation, where the function between two sampled points is approximated by a straight line. It is less accurate but computationally efficient.

For two points (x1,f(x1))(x_1, f(x_1)) and (x2,f(x2))(x_2, f(x_2)), linear interpolation estimates the value of the function f(x)f(x) at some point xx between x1x_1 and x2x_2 as:

f(x)f(x1)+f(x2)f(x1)x2x1(xx1)f(x) \approx f(x_1) + \frac{f(x_2) – f(x_1)}{x_2 – x_1} \cdot (x – x_1)

This method works well for smooth data with relatively dense sampling.

4. Fourier Series and Transform

In the context of function reconstruction, Fourier theory is particularly useful. The Fourier Transform converts a function from the time domain (or spatial domain) into the frequency domain. If the function is periodic, its Fourier Series gives a representation in terms of sine and cosine functions.

For a periodic function f(x)f(x) with period LL, the Fourier series is given by:

f(x)=n=cnei2πnLxf(x) = \sum_{n=-\infty}^{\infty} c_n e^{i \frac{2 \pi n}{L} x}

where cnc_n are the Fourier coefficients that capture the amplitude of each frequency component.

The Inverse Fourier Transform can be used to reconstruct the function from its frequency components:

f(x)=F(k)eikxdkf(x) = \int_{-\infty}^{\infty} F(k) e^{i k x} \, dk

where F(k)F(k) represents the Fourier transform of f(x)f(x).

5. Practical Challenges in Function Reconstruction

  • Noise: Real-world sampled data is often noisy, which complicates reconstruction. Filtering methods, such as low-pass filters, are applied to remove noise.
  • Aliasing: If the sampling rate is too low, the high-frequency components of the signal are misrepresented, and the original signal cannot be accurately reconstructed.
  • Finite Sample Size: In practice, we deal with a finite number of samples, which can affect the accuracy of the reconstruction, especially when using methods like sinc interpolation that assume infinite data points.

6. Applications of Function Reconstruction

  • Digital Signal Processing (DSP): Audio and image signals are sampled and then reconstructed to represent the original continuous signals.
  • Medical Imaging: Techniques like MRI and CT scans rely on reconstructing functions (e.g., 2D/3D images) from sampled data.
  • Machine Learning: In data-driven models, continuous functions are often reconstructed from discrete datasets for predictions and analysis.

Example

Let’s say you sample a sine wave f(x)=sin(2πx)f(x) = \sin(2\pi x) at intervals of T=0.1T = 0.1, and you want to reconstruct it. You collect the sample points {f(0),f(0.1),f(0.2),}\{ f(0), f(0.1), f(0.2), \dots \}, and use sinc interpolation for reconstruction. Given that the highest frequency component is 11 Hz, the Nyquist rate is 2×1=22 \times 1 = 2 samples per second, so your sampling rate 1010 Hz is sufficient for perfect reconstruction. The continuous function can then be reconstructed using:

f(x)=n=f(nT)sinc(xnTT)f(x) = \sum_{n=-\infty}^{\infty} f(nT) \cdot \text{sinc}\left( \frac{x – nT}{T} \right)

This ensures that your continuous function is exactly recovered from the discrete data points.

References

  • Oppenheim, A.V., Willsky, A.S., & Nawab, S.H. (1996). Signals and Systems (2nd ed.). Prentice Hall.
  • Bracewell, R.N. (2000). The Fourier Transform and Its Applications (3rd ed.). McGraw-Hill.
  • Papoulis, A. (1981). Signal Analysis. McGraw-Hill.
  • Proakis, J.G., & Manolakis, D.G. (2006). Digital Signal Processing: Principles, Algorithms, and Applications (4th ed.). Pearson.
  • Shannon, C.E. (1949). “Communication in the Presence of Noise.” Proceedings of the IRE, 37(1), 10-21.
  • Smith, S.W. (1997). The Scientist and Engineer’s Guide to Digital Signal Processing. California Technical Publishing.

Leave a Comment