SlideShare a Scribd company logo
1 of 25
Download to read offline
Chapter 2
Signal Sampling
and Quantization
1
CEN352 Dr. Nassim Ammour King Saud University
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
CEN352 Dr. Nassim Ammour King Saud University 3
8 Bit Code
Digital Processor
Introduction2
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).
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
CEN352 Dr. Nassim Ammour King Saud University 6
Sampling Process – frequency domain 1
• The signal 𝑥𝑐 [𝑡] and its spectrum 𝑋𝑐 (𝑗Ω)
• The sequence 𝑥[𝑛] and its periodic spectrum 𝑋 (𝑗𝜔)
• Since 𝑥[𝑛] is related to 𝑥𝑐 𝑡 𝑤𝑖𝑡ℎ 𝑡 = 𝑛𝑇 =
𝑛
𝐹𝑠
(1)
(2)
(1)(2)
• The desired relationship between sampled signal spectrum 𝑋𝑠 𝐹 and the continuoussignal spectrum 𝑋𝑐 (𝐹)
𝑋𝑠(𝐹): Sampled signal spectrum
𝑋𝑐 𝐹 : Original signal spectrum
𝑋 𝐹 ± 𝑘𝐹𝑠 : Replicaspectrum
𝑋𝑠(𝐹) =
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
𝑇
𝑋𝑐 𝐹 − 𝐹𝑠 + ⋯
7
CEN352 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 sufficientlylarge 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 𝑋𝑐(Ω) intact when Ω𝑠 > 2Ω𝐻, therefore, it should be possible
to recover or reconstruct 𝑥𝑐(𝑡) 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
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
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 𝐻𝑧
Sampling Theorem 3
• An analog signal can be perfectly recovered (reconstruction filter) as long as the sampling rate is at least twice
as large as the highest-frequencycomponent of the analog signal to be sampled (Shannon sampling theorem).
• Half of the sampling frequency
𝐹𝑠
2
is usually called the Nyquist frequency (Nyquist limit), or folding frequency.
12
CEN352 Dr. Nassim Ammour King Saud University
• Let 𝑥𝑐(𝑡) be a continuous-time band-limited signal with Fourier transform:
Then 𝑥𝑐(𝑡) can be uniquely determinedby 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:
13
CEN352 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 .
14
CEN352 Dr. Nassim Ammour King Saud University
Replicas,no
additional
information.
Scaled
amplitude
of 2.5/T
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(
𝜋𝑡
𝑇𝑠
)
𝜋𝑡
𝑇𝑠
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
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:
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 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
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.
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
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

More Related Content

Similar to Signal, Sampling and signal quantization

Digital communication
Digital communicationDigital communication
Digital communication
meashi
 
Slide Handouts with Notes
Slide Handouts with NotesSlide Handouts with Notes
Slide Handouts with Notes
Leon Nguyen
 
L 1 5 sampling quantizing encoding pcm
L 1 5 sampling quantizing encoding pcmL 1 5 sampling quantizing encoding pcm
L 1 5 sampling quantizing encoding pcm
DEEPIKA KAMBOJ
 
Paper id 252014114
Paper id 252014114Paper id 252014114
Paper id 252014114
IJRAT
 

Similar to Signal, Sampling and signal quantization (20)

Digital communication
Digital communicationDigital communication
Digital communication
 
Sampling
SamplingSampling
Sampling
 
Spectral Analysis of Sample Rate Converter
Spectral Analysis of Sample Rate ConverterSpectral Analysis of Sample Rate Converter
Spectral Analysis of Sample Rate Converter
 
Unit 4 Pulse Modulation.pdf
Unit 4 Pulse Modulation.pdfUnit 4 Pulse Modulation.pdf
Unit 4 Pulse Modulation.pdf
 
SignalDecompositionTheory.pptx
SignalDecompositionTheory.pptxSignalDecompositionTheory.pptx
SignalDecompositionTheory.pptx
 
VISHAV snp.pptx
VISHAV snp.pptxVISHAV snp.pptx
VISHAV snp.pptx
 
EC6651 COMMUNICATION ENGINEERING UNIT 2
EC6651 COMMUNICATION ENGINEERING UNIT 2EC6651 COMMUNICATION ENGINEERING UNIT 2
EC6651 COMMUNICATION ENGINEERING UNIT 2
 
Communication engineering notes uniit ii
Communication engineering notes uniit iiCommunication engineering notes uniit ii
Communication engineering notes uniit ii
 
IARE_DSP_PPT.pptx
IARE_DSP_PPT.pptxIARE_DSP_PPT.pptx
IARE_DSP_PPT.pptx
 
Overview of sampling
Overview of samplingOverview of sampling
Overview of sampling
 
lecture_25-26__modeling_digital_control_systems.pptx
lecture_25-26__modeling_digital_control_systems.pptxlecture_25-26__modeling_digital_control_systems.pptx
lecture_25-26__modeling_digital_control_systems.pptx
 
Slide Handouts with Notes
Slide Handouts with NotesSlide Handouts with Notes
Slide Handouts with Notes
 
23 Sampling.pdf
23 Sampling.pdf23 Sampling.pdf
23 Sampling.pdf
 
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNALSAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
 
Digitization
DigitizationDigitization
Digitization
 
communication concepts on sampling process
communication concepts on sampling processcommunication concepts on sampling process
communication concepts on sampling process
 
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
 
L 1 5 sampling quantizing encoding pcm
L 1 5 sampling quantizing encoding pcmL 1 5 sampling quantizing encoding pcm
L 1 5 sampling quantizing encoding pcm
 
Electrocardiogram Denoised Signal by Discrete Wavelet Transform and Continuou...
Electrocardiogram Denoised Signal by Discrete Wavelet Transform and Continuou...Electrocardiogram Denoised Signal by Discrete Wavelet Transform and Continuou...
Electrocardiogram Denoised Signal by Discrete Wavelet Transform and Continuou...
 
Paper id 252014114
Paper id 252014114Paper id 252014114
Paper id 252014114
 

Recently uploaded

ALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
Madan Karki
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
MaherOthman7
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating System
Sampad Kar
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
Kamal Acharya
 

Recently uploaded (20)

ALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating System
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptx
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
 
Piping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdfPiping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdf
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 
CLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference ModalCLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference Modal
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
AI in Healthcare Innovative use cases and applications.pdf
AI in Healthcare Innovative use cases and applications.pdfAI in Healthcare Innovative use cases and applications.pdf
AI in Healthcare Innovative use cases and applications.pdf
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 

Signal, Sampling and signal quantization

  • 1. Chapter 2 Signal Sampling and Quantization 1 CEN352 Dr. Nassim Ammour King Saud University
  • 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
  • 6. CEN352 Dr. Nassim Ammour King Saud University 6 Sampling Process – frequency domain 1 • The signal 𝑥𝑐 [𝑡] and its spectrum 𝑋𝑐 (𝑗Ω) • The sequence 𝑥[𝑛] and its periodic spectrum 𝑋 (𝑗𝜔) • Since 𝑥[𝑛] is related to 𝑥𝑐 𝑡 𝑤𝑖𝑡ℎ 𝑡 = 𝑛𝑇 = 𝑛 𝐹𝑠 (1) (2) (1)(2) • The desired relationship between sampled signal spectrum 𝑋𝑠 𝐹 and the continuoussignal spectrum 𝑋𝑐 (𝐹) 𝑋𝑠(𝐹): Sampled signal spectrum 𝑋𝑐 𝐹 : Original signal spectrum 𝑋 𝐹 ± 𝑘𝐹𝑠 : Replicaspectrum 𝑋𝑠(𝐹) = 1 𝑇 𝑘=−∞ ∞ 𝑋𝑐 𝐹 − 𝑘𝐹𝑠 From spectral analysis , and after some mathematical operations Fourier Transform Inverse Fourier Transform Analog Frequency (Hz) Sampling Frequency (Hz) Normalized Frequency (Cycles/ Sample)
  • 7. Sampling Process – frequency domain 2 𝑋𝑠 𝑓 = ⋯+ 1 𝑇 𝑋𝑐 𝐹 + 𝐹𝑠 + 1 𝑇 𝑋𝑐 𝐹 + 1 𝑇 𝑋𝑐 𝐹 − 𝐹𝑠 + ⋯ 7 CEN352 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 sufficientlylarge so that: Spectrum of continuous-time band-limited signal 𝑥𝑐(𝑡)
  • 8. CEN352 Dr. Nassim Ammour King Saud University 8 Sampling Process – frequency domain 3 • The sampling operation leaves the input spectrum 𝑋𝑐(Ω) intact when Ω𝑠 > 2Ω𝐻, therefore, it should be possible to recover or reconstruct 𝑥𝑐(𝑡) 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Ω𝐻
  • 9. 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Ω𝐻
  • 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 𝐻𝑧
  • 12. Sampling Theorem 3 • An analog signal can be perfectly recovered (reconstruction filter) as long as the sampling rate is at least twice as large as the highest-frequencycomponent of the analog signal to be sampled (Shannon sampling theorem). • Half of the sampling frequency 𝐹𝑠 2 is usually called the Nyquist frequency (Nyquist limit), or folding frequency. 12 CEN352 Dr. Nassim Ammour King Saud University • Let 𝑥𝑐(𝑡) be a continuous-time band-limited signal with Fourier transform: Then 𝑥𝑐(𝑡) can be uniquely determinedby 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.
  • 13. Example 1 Problem: Solution: Using Euler’s identity, Hence, the Fourier series coefficients are: 13 CEN352 Dr. Nassim Ammour King Saud University Euler's identity
  • 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