0% found this document useful (0 votes)
4 views

MENG3520-Module 5 - Quantization

Uploaded by

Hartej Tapia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

MENG3520-Module 5 - Quantization

Uploaded by

Hartej Tapia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Module 5- Sampling

The Bridge from Continuous to Discrete

Winter 2024

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 1


Sampling
• The signals in real life, such as our voices, are “analog” signals.
• To process these signals in digital systems, such as computers, they
need to be converted to “digital” forms.
• Analog signal is continuous both in time and amplitude; a digital
signal is discrete in both time and amplitude.
• The process of sampling converts signal from continuous time to
discrete time. The value of signal is measured at certain intervals in
time and it is called sample

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 2


Sampling Frequency
• The sampling frequency or sampling rate, 𝑓𝑠 , is the number of
samples obtained in one second, thus:

𝑓𝑠 = 1ൗ𝑇

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 3


The Process of Sampling
• First, we obtain signal values form the continuous time signal at
1
regular time intervals (𝑇 = ).
𝑓𝑠
• The result of this process is a sequence of numbers.
• One sample (discrete time signal) is denoted as 𝑥[𝑛] where 𝑛 is index.
• Since sampling interval (𝑇) is defined, sampling process just extracts
the signal values at all integer multiples of T:

𝑥[𝑛] = 𝑥(𝑛. 𝑇)

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 4


The Sampling Theorem
The representation of continuous-time signals by its samples.

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 5


Fourier Transform of the sampled signal

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 6


Sampling Frequency
• When 𝜔𝑠 > 2𝜔𝑀 there is no overlap between the shifted replicas of
X(ω) and X(ω) is reproduced at integer multiples of the sampling
frequency.

• When 𝜔𝑠 < 2𝜔𝑀 there the shifted replicas of X(ω) will overlap, and
X(ω) is NOT reproduced at integer multiples of the sampling
frequency.

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 7


Nyquist Rate
• If signal x(t) has a bandwidth of 𝜔𝑀 = 2𝜋 × 𝐵 B is in Hertz , the
minimum sampling rate of 𝜔𝑠 = 2 𝜔𝑀 is required to recover x(t) from
its samples. This sampling rate is called Nyquist rate.
• Note that
𝜔𝑠 = 2𝜋 × 𝑓𝑠
Therefore,
𝑓𝑠 > 2𝐵
And the sampling frequency must be:
1
𝑇<
2𝐵

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 8


Aliasing
• Aliasing (overlap) happens when
the sampling frequency is too
low.

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 9


Block diagram of
sampling and
reconstruction using an
ideal lowpass filter.

𝑋𝑟 (𝜔)

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 10


Reconstruction using
an Ideal Lowpass Filter

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 11


Reconstruction using an Ideal Lowpass Filter
A Time-domain View

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 12


Example 8.1
Sampling at, below and above the Nyquist Rate
• Consider a signal 𝑥 𝑡 = 𝑠𝑖𝑛𝑐 2 5𝜋𝑡 , whose spectrum is 𝑋 𝜔 =
𝜔
0.2∆ .
20𝜋
𝑟𝑎𝑑
• The bandwidth of this signal is B = 5 𝐻𝑧 10𝜋 . Therefore, the
𝑠
Nyquist rate is 10 𝐻𝑧.
• This means that we must sample the signal at a rate no less than
10 𝑠𝑎𝑚𝑝𝑙𝑒𝑠/𝑠.
1
• The Nyquist interval is 𝑇 = = 0.1 𝑠𝑒𝑐𝑜𝑛𝑑.
2𝐵

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 13


Example 8.1

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 14


Example 8.1
Sampling at, below and above the Nyquist Rate
We sample at three rates:

𝒇𝒔 (𝑯𝒛) 𝟏 𝟏 𝑪𝒐𝒎𝒎𝒆𝒏𝒕𝒔
𝑻= (𝒔) 𝑿(𝝎)
𝒇𝒔 𝑻
5 0.2 𝜔 Undersampling
∆( )
20𝜋
𝜔
10 0.1 2∆(20𝜋) Nyquist Rate

20 0.05 𝜔 Oversampling
4∆( )
20𝜋

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 15


Example 8.1
Undersampling

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 16


Example 8.1
Nyquist Rate

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 17


Example 8.1
Oversampling

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 18


Practical Sampling


2𝜋
𝑃𝑇 𝑡 = 𝐶0 + ෍ 𝐶𝑛 cos 𝑛𝜔𝑠 𝑡 + 𝜃𝑛 𝜔𝑠 =
𝑇
𝑛=1

𝑥ҧ 𝑡 = 𝑥(𝑡)𝑃𝑇 𝑡 = 𝑥 𝑡 [𝐶0 + ෍ 𝐶𝑛 cos 𝑛𝜔𝑠 𝑡 + 𝜃𝑛 ]


𝑛=1

𝑥ҧ 𝑡 = 𝐶0 𝑥(𝑡) + ෍ 𝐶𝑛 𝑥(𝑡)cos 𝑛𝜔𝑠 𝑡 + 𝜃𝑛


𝑛=1

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 19


Analog to Digital Converter

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 20


Dual of Time Sampling: Spectral Sampling

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 21


Dual of Time Sampling: Spectral Sampling

R samples/Hz
Where 𝑅 > 𝜏 (the signal width
or duration) in seconds

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 22


Dual of Time Sampling: Spectral Sampling

1
𝐷𝑛 = 𝑋(𝑛𝜔0 )
𝑇0

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 23


Reconstruction of 𝑋(𝜔) from its samples
The samples of 𝑋(𝜔) are separated by fundamental frequency
𝑓0 = 1ൗ𝑇0 𝐻𝑧 of the periodic signal 𝑥𝑇0 𝑡 .

Hence, the condition for recovery is 𝑇0 > 𝜏; that is,


1
𝑓0 < 𝐻𝑧.
𝜏

Therefore, to reconstruct 𝑋(𝜔) from the samples of 𝑋 𝜔 , the samples should be


taken at frequency intervals 𝑓0 < 1Τ𝜏 𝐻𝑧.
If 𝑅 is the sampling rate (samples/Hz), then
1
𝑅= > 𝜏 𝑠𝑎𝑚𝑝𝑙𝑒𝑠/𝐻𝑧
𝑓0

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 24


Numerical Computation of Fourier Transform:
The Discrete Fourier Transform

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 25


DFT (choice of 𝑇 and 𝑇0 )
• In DFT computation, we first need to select suitable values for 𝑇 and
𝑇0 .
Step 1: Decide on 𝐵 (essential bandwidth of 𝑥(𝑡))
𝑓𝑠 1 1
Step 2: The time sampling frequency is ≥ 𝐵 or 𝑇 = ≤
2 𝑓𝑠 2𝐵
Step 3: The 𝑓0 frequency resolution (separation between samples of
𝑋(𝜔)), thus we can pick 𝑇0 . Knowing 𝑇 and 𝑇0 , we determine 𝑁0 :
𝑇0
𝑁0 =
𝑇

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 26


Zero Padding
• If the frequency sampling interval 𝑓0 is not sufficiently small, we can
miss significant information and obtain misleading signal.
• We need to reduce 𝑓0 which increases 𝑇 0 and therefore increases
number of samples, 𝑁0 , by adding dummy samples of value 0.

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 27


Example 8.7
• A signal 𝑥(𝑡) has a duration of 2 𝑚𝑠 and an essential bandwidth of
10 𝑘𝐻𝑧. It is desirable to have a frequency resolution of 100 𝐻𝑧 in
the DFT (𝑓0 = 100). Determine 𝑁0 .

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 28


Example 8.8
Use the DFT to compute the Fourier Transform of 𝑥 𝑡 =
𝑒 −2𝑡 𝑢 𝑡 . Plot the resulting Fourier spectra.

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 29


Example 8.8

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 30


Example 8.8

MENG 3520 Signal Processing Instructor: Dr. Nilufar Somayyeh Poshtiban 31

You might also like