# Nyquist-Shannon Sampling Theorem

Nyquist-Shannon Sampling Theorem

The Nyquist-Shannon Sampling theorem is a fundamental one providing the condition on the sampling frequency of a band-width limited continuous-time signal in order to be able to reconstruct it perfectly from its discrete-time (sampled) version. It stated that the sampling frequency must be at least two times the highest frequency of the continuous-time signal spectrum.

## What is a Signal?

What is a Signal?

A signal is a time/space varying function which includes some useful information. Most of signals are continuous-time ones and hence can not be either stored (or transmitted) over realistic limited data storage (or band-limited propagation space) due to infinity of points to be processed.

Such signals could be of different sources or types, such as audio ones, or any real life physical measure or parameter retrieved by sensors (temp, humidity, speed, ...).

Such signals could be of different sources or types, such as audio ones, or any real life physical measure or parameter retrieved by sensors (temp, humidity, speed, ...).

◼

Example of a continuous-time* signal - Mean Temperature during 2016 in Rabat, Morocco:

In[38]:=

weatherData=WeatherData[{33.9716,6.8498},"MeanTemperature",{{2016,1,1},{2016,12,31},"Day"}];

DateListPlot[weatherData,Joined->True]

Out[39]=

In order, to process real life signals either to store or transmit, we need to a sampling process them, making them discrete-time signal.

## Sampling Theorem

Sampling Theorem

Sampling a continuous-time signal is getting one sample each sampling period , which means a sampling frequency equivalent to .

The mean important decision to make is the sampling frequency value of: Indeed, if its value is too big, we’ll get samples per second, so large storage or large band width in order to transmit the data. If on the other hand, the value is too small, we won’t be able to reconstruct the signal from the samples.

Hence, there is a tradeoff to make in order to minimise the needed resources (storage or frequency band-width) while being able to reproduce the original signal from the samples.

T[s]

s

f=[Hz]

s

1

T

s

The mean important decision to make is the sampling frequency value of

f

s

f

s

Hence, there is a tradeoff to make in order to minimise the needed resources (storage or frequency band-width) while being able to reproduce the original signal from the samples.

One theorem provides an answer to this question, it’s the Nyquist-Shannon Sampling Theorem which states:

A continuous-time signal can be sampled at a frequency in order to get a discrete-time copy of it , and afterwards be reconstructed perfectly to its original form if with is the maximum frequency value of the signal spectrum

x(t)

f

s

x[n]

x(t)

f>2f

s

max

f

max

x(t)

Next, we’ll consider a function and see what happen to the sampled signal on the frequency domain using Fourier Transform

Sinc

2

## Sampling Process

Sampling Process

### Time Domain Analysis

Time Domain Analysis

Consider the function which represent a continuous-time signal.

x(t)=Sinc(t)

2

◼

Plot of the signal :

x(t)=Sinc(t)

2

In[40]:=

x[t_]:=(Sinc[Pi*t])^2;

Plot[x[t],{t,-2,2}]

Out[41]=

Consider a sampling frequency and let see what happen for different values of

f

s

f.

s

◼

Plot of the continuous-time and discrete-time (sampled) signals:

In[42]:=

Manipulate[

Show[DiscretePlot[x[t],{t,-3,3,1/fs},PlotRange{{-3,3},{-0.1,1.1}},PerformanceGoal"Quality",

PlotStyleDirective[Orange,Thick],PlotMarkersAutomatic],Plot[x[t],{t,-3,3}]],{{fs,15.25,"Frequency

f

s