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.
2. Introduction1
β’ 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 convertingthese 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
2
CEN352 Dr. Nassim Ammour King Saud University
3. CEN352 Dr. Nassim Ammour King Saud University 3
8 Bit Code
Digital Processor
Introduction2
4. 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. T is 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
4
CEN352 Dr. Nassim Ammour King Saud University
Example sampling period: T = 125 Β΅s.
sampling rate: πΉπ =1/125Β΅s = 8,000 samples per second (Hz).
5. Sampling Process
β’ The sampling of a continuous-timesignal π₯[π]
is equivalent to multiply the signal with pulse
train signal π(π‘).
π₯ π‘ Input analog signal
π(π‘) Pulse train
π₯π π‘ = π₯ π‘ β π(π‘) =
π=ββ
β
)
π₯π πππ πΏ(π‘ β πππ
Sampled signal
5
CEN352 Dr. Nassim Ammour King Saud University
Sampled
signal
input signal
Pulse Train
signal
10. Sampling Theorem 1
10
CEN352 Dr. Nassim Ammour King Saud University
β’ Question: Are the samples π₯[π] sufficientto 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 spectra of π₯π [π‘] and π₯[π] .
different continuous-time signals with the same set of sample values
11. Sampling Theorem 2
11
CEN352 Dr. Nassim Ammour King Saud University
One sample
each 0.01 s
The signal is under-sampled 2 fmax=180 > fs
π = 0.01 sec β πΉπ =
1
π
=
1
0.01
= 100 π»π§
14. 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 .
14
CEN352 Dr. Nassim Ammour King Saud University
Replicas,no
additional
information.
Scaled
amplitude
of 2.5/T
15. Signal Reconstruction
(Digital-to-Analog Conversion)
15
CEN352 Dr. Nassim Ammour King Saud University
β’ The reconstructionprocess (recoveringthe analog signal from its sampled signal) involves two steps.
β’ First: the samples π₯ π (digitalsignal )are converted
into a sequence of ideal impulses π₯π π‘ , in which
each impulse has its amplitude proportional to digital
output π₯ π , and two consecutiveimpulses are
separated by a sampling period of T.
π₯π π‘ =
π=ββ
β
)
π₯ π πΏ(π‘ β πππ
β’ Second: The analog reconstructionfilter (ideal
low-pass filter) is applied to the ideally recovered
signal π₯π π‘ to obtain the recoveredanalog signal.
The impulse response of the reconstruction filter
is
βπ π‘ =
sin(
ππ‘
ππ
)
ππ‘
ππ
16. 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 xs(t).
β’ Reconstruction filter
Ideal low-pass
filter
An ideal low-pass reconstructionfilter 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
17. 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 conditionof the Shannon sampling theorem
is violated.We can see the spectral overlapping
between the original baseband spectrumand 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:
18. CEN352 Dr. Nassim Ammour King Saud University 18
Example 2
Problem:
Solution:
Using the Eulerβs identity:
19. CEN352 Dr. Nassim Ammour King Saud University 19
a.
b.
The Shannon sampling theory condition is satisfied
20. CEN352 Dr. Nassim Ammour King Saud University 20
Example 3
Problem:
Solution:
a. b.
21. 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
22. CEN352 Dr. Nassim Ammour King Saud University 22
8 Quantization β Contd.
β’ A unipolar quantizer 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 quantizationlevel
πΏ = 2π
π : Number of bits in ADC
β : Step size of quantizer (ADC resolution)
π = πππ’ππ
π₯ β π₯πππ
β
π : Index correspondingto binary code
ππ: Quantizationlevel π₯π = π₯πππ + π β β π = 0,1, β¦, πΏ β 1
ππ: Quantizationerror ππ = π₯π β π₯ π€ππ‘β β
β
2
β€ ππ β€
β
2
23. 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.
β’ bipolar quantizer deals with analog signals ranging from a negative reference to a positive
reference.
24. 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π
=
π
4
2π
=
1
8
β π =
1
π
= 8
25. 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