Signal, Sampling and signal quantization

SamS270368 367 views 25 slides Feb 29, 2024
Slide 1
Slide 1 of 25
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25

About This Presentation

Signal sampling is the process of converting a continuous-time signal into a discrete-time signal by capturing its amplitude at regularly spaced intervals of time. This is typically done using an analog-to-digital converter (ADC). The rate at which samples are taken is called the sampling frequency,...


Slide Content

Chapter 2
Signal Sampling
and Quantization
1CEN352 Dr. Nassim Ammour King Saud University

Introduction
1
•Even most of signals are in continuous-time domain, they should be converted to a number at different discrete
time to be processed by a microprocessor.
•The process of converting these signals into digital form is called analog-to-digital (A/D) conversion.
•The reverse process of reconstructing an analog signal from its samples is known as digital-to-analog (D/A)
conversion.
Components of an analog-to-digital converter (ADC)
Sampler converts the
continuous-time signal into a
discrete-time sequence
maps the continuous
amplitude into a discrete
set of amplitudes
takes the digital signal
and produces a sequence
of binary code-words
2CEN352 Dr. Nassim Ammour King Saud University

CEN352 Dr. Nassim Ammour King Saud University 3
8 Bit Code
Digital Processor
Introduction
2

Sampling
•The reciprocal ??????
�is called sampling frequency (cycles per second or Hz) or sampling rate (samples per second).
•Periodic or uniform sampling, a sequence of samples �[�]is obtained from a continuous-time signal �
??????[�]by
taking values at equally spaced points in time. Tis the fixed time interval between samples, is known as the
the sampling period.
??????
�= 1�
Sampling rate
Sample per second (Hz)
Sampling period
(second)
Sample and Hold
4CEN352 Dr. Nassim Ammour King Saud University
Example
sampling period: T = 125 µs.
sampling rate: ??????
�=1/125µs = 8,000 samples per second (Hz).

Sampling Process
•The sampling of a continuous-time signal �[�]
is equivalent to multiply the signal with pulse
train signal�(�).
��Input analog signal
�(�)Pulse train
�
��=��∙�(�)=
�=−∞

)�
??????��
�??????(�−��
�
Sampled signal
5CEN352 Dr. Nassim Ammour King Saud University
Sampled
signal
input signal
Pulse Train
signal

CEN352 Dr. Nassim Ammour King Saud University 6
Sampling Process –frequency domain 1
•The signal �
??????[�]and its spectrum ??????
??????(�Ω)
•The sequence �[�]and its periodicspectrum ??????(�??????)
•Since �[�]is related to �
??????����ℎ�=��=
�
??????
??????
(1)
(2)
(1)(2)
•The desired relationship between sampled signal spectrum ??????
�??????and the continuous signal spectrum ??????
??????(??????)
??????
�(??????): Sampled signal spectrum
??????
????????????: Original signal spectrum
????????????±�??????
�: Replica spectrum
??????
�(??????)=
1
�

�=−∞

??????
????????????−�??????
�
From spectral analysis , and after
some mathematical operations
Fourier Transform
Inverse Fourier Transform
Analog Frequency (Hz)
Sampling Frequency (Hz)
Normalized Frequency
(Cycles/ Sample)

Sampling Process –frequency domain 2
??????
��=⋯+
1
�
??????
????????????+??????
�+
1
�
??????
????????????+
1
�
??????
????????????−??????
�+⋯
7CEN352 Dr. Nassim Ammour King Saud University
•The spectrum of �[�]can be readily sketched if �
??????(�)is assumed to be band-limited. ??????
????????????=0���??????>??????
??????
•Spectrum of �[�]is obtained by scaling the spectrum of �
??????[�],putting copies of the scaled spectrum
1
??????
??????
??????(??????),
at all integer multiples of the sampling frequency ??????
�=
1
??????
.
??????
�(??????)=
1
�

�=−∞

??????
????????????−�??????
�
•Two conditions obviously are necessary to prevent
overlapping spectral bands:
1. The continuous-time signal must be band-limited.
2. The sampling frequency Ω
�must be sufficiently large so that:
Spectrum of continuous-time band-limited signal �
??????(�)

CEN352 Dr. Nassim Ammour King Saud University 8
Sampling Process –frequency domain 3
•The sampling operation leaves the input spectrum ??????
??????(Ω) intactwhen Ω
�>2Ω
??????, therefore, it should be possible
to recover orreconstruct �
??????(�)from the sequence ��.
•Sampling at Ω
�>2Ω
??????creates a guard band which simplifies the reconstruction process in practical applications.
spectrum of discrete-time signal ��=�
??????��withΩ
�>2Ω
??????
Case 1: Ω
�>2Ω
??????

CEN352 Dr. Nassim Ammour King Saud University 9
Sampling Process –frequency domain 4
spectrum of x[n], showing aliasing distortion, when s Ω
&#3627408480;<2Ω
??????
•IfΩ
&#3627408480;<2Ω
??????, the scaled copies of ??????
??????(Ω) overlap, so that when they are added together, ??????
??????(Ω) cannot be
recovered from ??????(Ω) .
•This effect, in which individual terms overlap is known as aliasing distortion or simply aliasing.
Case2: Ω
&#3627408480;<2Ω
??????

Sampling Theorem 1
10CEN352 Dr. Nassim Ammour King Saud University
•Question: Are the samples &#3627408485;[&#3627408475;]sufficient to describe uniquely the original continuous-time signal and, if so, how
can &#3627408485;
??????[&#3627408481;]be reconstructed from &#3627408485;[&#3627408475;]? An infinite number of signals can generate the same set of samples.
•Answer: The response lies in the frequency domain, in the relation between the spectraof &#3627408485;
??????[&#3627408481;]and &#3627408485;[&#3627408475;].
different continuous-time signals with the same set of sample values

Sampling Theorem 2
11CEN352 Dr. Nassim Ammour King Saud University
One sample
each 0.01 s
The signal is under-sampled 2 fmax=180 > fs
&#3627408455;=0.01sec→??????
&#3627408480;=
1
&#3627408455;
=
1
0.01
=100????????????

Sampling Theorem 3
•Ananalogsignalcanbeperfectlyrecovered(reconstructionfilter)aslongasthesamplingrateisatleasttwice
aslargeasthehighest-frequencycomponentoftheanalogsignaltobesampled(Shannonsamplingtheorem).
•Half of the sampling frequency
????????????
2
is usually called the Nyquistfrequency (Nyquistlimit), or folding frequency.
12CEN352 Dr. Nassim Ammour King Saud University
•Let &#3627408485;
??????(&#3627408481;)be a continuous-time band-limited signal with Fourier transform:
Then&#3627408485;
??????(&#3627408481;)can be uniquely determined by its samples &#3627408485;&#3627408475;=&#3627408485;
??????(&#3627408475;&#3627408455;), where &#3627408475;=0,±1,±2,…if the sampling
frequency Ω
&#3627408480;satisfies the condition:
??????
&#3627408480;=
2??????
&#3627408455;
&#3627408480;
≥2??????
&#3627408474;????????????
Example: To sample a speech signal containing frequencies up to 4 kHz, the minimum sampling rate is chosen
to be at least 8 kHz, or 8,000 samples per second.

Example 1
Problem:
Solution:
Using Euler’s identity,
Hence, the Fourier series coefficients are:
13CEN352 Dr. Nassim Ammour King Saud University
Euler's
identity

Example 1 –Contd.
a.
b.After the analog signal is sampled at the rate of 8,000Hz, the
sampled signal spectrum and its replicas centered at the
frequencies ±n&#3627408467;
&#3627408480;, each with the scaled amplitude being 2.5/T .
14CEN352 Dr. Nassim Ammour King Saud University
Replicas, no
additional
information.
Scaled
amplitude
of 2.5/T

Signal Reconstruction
(Digital-to-Analog Conversion)
15CEN352 Dr. Nassim Ammour King Saud University
•The reconstruction process (recovering the analog signal from its sampled signal)involves two steps.
•First: the samples &#3627408485;&#3627408475;(digital signal )are converted
into a sequence of ideal impulses &#3627408485;
&#3627408480;&#3627408481;, in which
each impulse has its amplitude proportional to digital
output &#3627408485;&#3627408475;, and two consecutive impulses are
separated by a sampling period of T.
&#3627408485;
&#3627408480;&#3627408481;=
&#3627408475;=−∞

)&#3627408485;&#3627408475;??????(&#3627408481;−&#3627408475;&#3627408455;
&#3627408480;
•Second:The analog reconstruction filter (ideal
low-pass filter) is applied to the ideally recovered
signal &#3627408485;
&#3627408480;&#3627408481;to obtain the recovered analog signal.
The impulse response of the reconstruction filter
is

&#3627408479;&#3627408481;=
sin(
??????&#3627408481;
&#3627408455;
&#3627408480;
)
??????&#3627408481;
&#3627408455;
&#3627408480;

CEN352 Dr. Nassim Ammour King Saud University 16
Signal Reconstruction –Contd.
•Before applying the reconstruction filter,
a zero-order hold is used to interpolate
between the samples in x
s(t).
•Reconstruction filter
Ideal low-pass
filter
An ideal low-pass reconstruction filter is
required to recover the analog signal
Spectrum ( an impractical case).
A practical low-pass reconstruction
(anti-image) filter can be designed to reject
all the images and achieve the original signal
spectrum.
Practical low-pass
filter

CEN352 Dr. Nassim Ammour King Saud University 17
Signal Reconstruction –Contd.
Perfect reconstruction is not possible, even if we use ideal low pass filter.
Aliasing
the condition of the Shannon sampling theorem
is violated. We can see the spectral overlapping
between the original baseband spectrum and the
spectrum of the replica (add aliasing noise)
if an analog signal with a frequency f is under-sampled, the aliasing frequency
component &#3627408467;
??????&#3627408473;????????????&#3627408480;in the baseband is simply given by:

CEN352 Dr. Nassim Ammour King Saud University 18
Example 2
Problem:
Solution:
Using the Euler’s identity:

CEN352 Dr. Nassim Ammour King Saud University 19
a.
b.
The Shannon sampling theory condition is satisfied

CEN352 Dr. Nassim Ammour King Saud University 20
Example 3
Problem:
Solution:
a.
b.

CEN352 Dr. Nassim Ammour King Saud University 21
8 Quantization
•During the ADC process, amplitudes of the analog signal to be converted have infinite
precision.
•Quantization : The quantizer converts the continuous amplitude signal discrete amplitude
signal.
•Encoding:After quantization, each quantization level is assigned a unique binary code.
A block diagram for a DSP system

CEN352 Dr. Nassim Ammour King Saud University 22
8 Quantization –Contd.
•A unipolarquantizer deals with analog signals ranging from 0 volt to a positive reference voltage
∆=
&#3627408485;
&#3627408474;????????????−&#3627408485;
&#3627408474;??????&#3627408475;
??????
&#3627408485;
&#3627408474;????????????: Max value of analog signal
&#3627408485;
&#3627408474;??????&#3627408475;: Min value of analog signal
??????: Number of quantization level
??????=2
&#3627408474;
&#3627408474;: Number of bits in ADC
∆: Step size of quantizer (ADC resolution)
&#3627408470;=&#3627408479;&#3627408476;&#3627408482;&#3627408475;&#3627408465;
&#3627408485;−&#3627408485;
&#3627408474;??????&#3627408475;

&#3627408470;:Index corresponding to binary code
??????
??????: Quantization level&#3627408485;
&#3627408478;=&#3627408485;
&#3627408474;??????&#3627408475;+&#3627408470;∙∆&#3627408470;=0,1,…,??????−1
&#3627408466;
&#3627408478;:Quantization error&#3627408466;
&#3627408478;=&#3627408485;
&#3627408478;−&#3627408485;&#3627408484;&#3627408470;&#3627408481;ℎ−

2
≤&#3627408466;
&#3627408478;≤

2

CEN352 Dr. Nassim Ammour King Saud University 23
Example:3-bit ADC channel accepts analog input ranging from 0 to 5 volts,
8 Quantization –Contd.
•bipolarquantizerdealswithanalogsignalsrangingfromanegativereferencetoapositive
reference.

CEN352 Dr. Nassim Ammour King Saud University 24
9 Periodicity
•In discrete-time case, a periodic sequence is a sequence for which
where the period N is necessarily an integer.
Example 1:
Period of N = 8
periodic sequence with N = 7 samples
&#3627408485;&#3627408475;=??????&#3627408464;&#3627408476;&#3627408480;(??????&#3627408475;+??????)Discrete sinusoidal:
Pulsation: ??????(rad/sample)
Phase shift: ??????
Frequency:&#3627408467;=
??????
2??????
cycle/sample
Period: ??????=
1
??????
??????=
??????
4
→&#3627408467;=
??????
2??????
=

??????
4
2??????
=
1
8
→??????=
1
&#3627408467;
=8

CEN352 Dr. Nassim Ammour King Saud University 25
9 Periodicity –Contd.
Example 2:
Not periodic with N = 8
But periodic with N = 16 (Must be integer)
??????=
3??????
8
→&#3627408467;=
??????
2??????
=
3
??????
8
2??????
=
3
16
→??????=
1
&#3627408467;
=3×
16
3