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,...
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, often denoted as Fs, and is measured in hertz (Hz). The Nyquist-Shannon sampling theorem states that to accurately reconstruct a signal from its samples, the sampling frequency must be at least twice the highest frequency component present in the signal (the Nyquist frequency). Sampling at a frequency below the Nyquist frequency can result in aliasing, where higher frequency components are incorrectly interpreted as lower frequency ones.
Size: 1.38 MB
Language: en
Added: Feb 29, 2024
Slides: 25 pages
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 Ω
�<2Ω
??????
•IfΩ
�<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: Ω
�<2Ω
??????
Sampling Theorem 1
10CEN352 Dr. Nassim Ammour King Saud University
•Question: Are the samples �[�]sufficient to describe uniquely the original continuous-time signal and, if so, how
can �
??????[�]be reconstructed from �[�]? 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 �
??????[�]and �[�].
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
�=0.01sec→??????
�=
1
�
=
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 �
??????(�)be a continuous-time band-limited signal with Fourier transform:
Then�
??????(�)can be uniquely determined by its samples ��=�
??????(��), where �=0,±1,±2,…if the sampling
frequency Ω
�satisfies the condition:
??????
�=
2??????
�
�
≥2??????
�????????????
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�
�, 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 ��(digital signal )are converted
into a sequence of ideal impulses �
��, in which
each impulse has its amplitude proportional to digital
output ��, and two consecutive impulses are
separated by a sampling period of T.
�
��=
�=−∞
∞
)��??????(�−��
�
•Second:The analog reconstruction filter (ideal
low-pass filter) is applied to the ideally recovered
signal �
��to obtain the recovered analog signal.
The impulse response of the reconstruction filter
is
ℎ
��=
sin(
??????�
�
�
)
??????�
�
�
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 �
??????�????????????�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
∆=
�
�????????????−�
�??????�
??????
�
�????????????: Max value of analog signal
�
�??????�: Min value of analog signal
??????: Number of quantization level
??????=2
�
�: Number of bits in ADC
∆: Step size of quantizer (ADC resolution)
�=�����
�−�
�??????�
∆
�:Index corresponding to binary code
??????
??????: Quantization level�
�=�
�??????�+�∙∆�=0,1,…,??????−1
�
�:Quantization error�
�=�
�−����ℎ−
∆
2
≤�
�≤
∆
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
��=??????���(??????�+??????)Discrete sinusoidal:
Pulsation: ??????(rad/sample)
Phase shift: ??????
Frequency:�=
??????
2??????
cycle/sample
Period: ??????=
1
??????
??????=
??????
4
→�=
??????
2??????
=
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
→�=
??????
2??????
=
3
??????
8
2??????
=
3
16
→??????=
1
�
=3×
16
3