Sampling and Reconstruction (Online Learning).pptx
1. Spring 2020 (Online Learning)
EEE324 - Digital Signal Processing
Lecture 1: Sampling and Reconstruction
Department of Electrical and Computer Engineering
COMSATS University Islamabad, Lahore Campus
2. Resources
Textbook
• Digital Signal Processing: Principles, Algorithms and Applications by John G. Proakis and Dimitris K Manolakis
(P&M)
Reference Books
• Discrete-Time Signal Processing by Alan V. Oppenheim, Ronald. W. Schafer, Pearson Education (OS)
• Digital Signal Processing: A Computer-based approach by Sanjit K. Mitra, McGraw-Hill Science (SKM)
• Signals and Systems by Alan V. Oppenheim, Alan S. Willsky and with S. Hamid (OW&N)
Reading Material
• Chapter 6 – Sampling and Reconstruction (Topics 6.1 )
3. Course Contents
Review of Signals & Systems Concepts, Introduction to DSP Theory and Applications, A/D and
D/A Signal Transformation, Sampling & Quantization of Signals, Digital Signals in Time and
Frequency Domains, Discrete Fourier Transform and Fast Fourier Transform, Circular
Convolution & Methods of Linear Filtering, Discrete Time LTI Systems, LTI Systems Analysis in
Time and Frequency Domain and its Stability, z-Transform, Unilateral z-Transform, Digital Filters,
Ideal and Practical Digital Filters, Finite Impulse Response (FIR) Filters, Infinite Impulse
Response (IIR) Filters, Realization of Digital Filters, DSP Algorithms and their Implementation
Issues, DSP Processors, DSP Applications
4. Course Learning Outcomes (CLOs)
1. Apply all the concepts of the signal and systems, their mathematical description/ representation and
transformations in discrete domain to understand and analyze discrete time LTI systems. (PLO1-C3)
2. Analyze the discrete systems using Fast Fourier Transform (FFT) and filter realization techniques for
discrete time signal processing. (PLO2-C4)
3. Design the digital filter using analog and digital techniques for discrete time signal processing (PLO3-
C5)
4. Manipulate the concepts of digital signal processing using software and hardware tools. (PLO5-P5)
5. Explain the concepts of digital signal processing by justifying the lab experiments performed using
software and hardware tools. (PLO10-A4)
6. Demonstrate the concepts of digital signal processing by completing the lab tasks through effective
individual and team work. (PLO9-A3)
5. Course Breakdown
Weeks
Topic CLO Bloom
Taxonomy
Specific Outcome Contact
Hours
Students
Learning
Hours
Assessment
1.5
Review of Concepts of Signals and
Systems
CLO1 C3
Apply signals and systems concepts to
comprehend digital signal processing
4.5 8
Quiz 1, Assignment 1, S-I,
Terminal
1.5
Time Domain Analysis of Discrete Time
LTI Systems
CLO1 C3
Analyze the discrete time LTI systems using
time domain techniques to learn digital signal
processing
4.5 8
Quiz 1, Assignment 1, S-I,
Terminal
4 LTI systems in Transform Domain CLO1 C3
Apply the transform domain techniques to
analyze LTI systems
12 36
Quiz 1, Assignment 1, SI,
Terminal
1
Sampling and Reconstruction of Signal in
time and frequency Domain
CLO1 C3
Apply time and frequency domain techniques
for sampling and reconstruction of signals
3 7 Assignment 2, S-II, Terminal
3 Implementation of DFT and FFT CLO2 C4
Demonstrate the discrete time signals by
implementing DFT and FFT
9 20
Quiz 2, Assignment 2, S-II,
Terminal
1
Filter Structures using Filter Realization
Techniques
CLO2 C4
Demonstrate the filter realization techniques to
sketch and analyze the filter structures
3 7 Quiz 3, Assignment 3, Terminal
3 Filter Design Techniques CLO3 C5
Design digital filters for DSP using filter
design techniques
9 20 Quiz 4, Assignment 4, Terminal
6. Lecture Outline
• What is Sampling? Practical Application of Sampling
• Practical Sampling-Reconstruction Set-Up
• Math Model for Sampling (ADC)
• Analysis of the Sampling.
7. Analog
Electronics
ADC
DSP
Computer
Sampling is Key to Much of Today’s Technology
C-T
Signal
C-T
System
C-T
Signal
D-T
Signal
D-T
System
D-T
Signal
DAC
C-T
Signal
Cell Phones, CDs, Digital Music, Radar, Medical Imaging, etc.!
ADC DAC
x(t)
C-T
Signal
x[n]
D-T
Signal
Clock
x̂(t)
C-T
Signal
Can we make: xˆ(t) x(t)? If we can… then we can process
the samples x[n] instead of x(t)!!!
The first step to see that this is possible:
Can we recover the signal from its samples???!!!
8. 0 0.2 0.4 0.6 0. 8 1
-2
2
1
0
-1
Time
Signal
Value
0 0.2 0.4 0.6 0. 8 1
-2
2
1
0
-1
Time
Signal
Value
Practical Sampling-Reconstruction Set-Up
Pulse
Gen
x̂(t)
x(t)
x [n] = x (nT)
Analog-to-Digital Converter Digital-to-Analog Converter
(ADC)
“Hold”
Sample at
t = nT
T = Sampling Interval
Fs = 1/T = Sampling Rate
(DAC)
CT LPF
~
x(t)
Clock at
t = nT
9. x[n] x(t) tnT
x(nT )
Math Model for Sampling (ADC)
• You learn the circuits in an electronics class
• Here we focus on the “why,” so we need math models
• Math Modeling the ADC is easy….
– x[n] = x(nT) , so the nth sample is the value of x(t) at t = nT
x [n] = x (nT)
Analog-to-Digital Converter
(ADC)
“Hold”
Sample at
t = nT
T = Sampling Interval
Fs = 1/T = Sampling Rate
x(t)
10. Pulse
Gen
x̂(t)
x[n] ~
x(t)
CT Filter
H()
nT)
x(t) x(nT)p(t
n
~
~
x(t)
t
x(t)
T 2T 3T
-2T -T
Xˆ() 𝑋()H ()
p(t)
t
“Prototype” Pulse
• Math Model for the DAC consists of two parts:
– converting a DT sequence (of numbers) into a CT pulse train
– “smoothing” out the pulse train using a lowpass filter
Filter made from
transistors/opamps,
Resistors & Caps
Math Model for Reconstruction (DAC)
11. Now we have a good model that handles quite well what REALLY
happens inside a DAC… but we simplify it !!!!
~
x(t) x(nT)(t nT)
n
p(t) (t)
~
In this form… this is called the “Impulse Sampled” signal.
Now.. Using property of delta function we can also write…
x(t) x(t) (t nT)
n
Why???? 1. Because delta functions are EASY to analyze!!!
2. Because it leads to the best possible results (see later!)
3. We can easily account for real-life pulses later!!
To Ease Analysis: Use p(t) (t)
“Impulse Sampling” Model for DAC
12. Impulse
Gen
h(t)
H()
~
x(t)
x(t)
x[n] = x(nT)
“Hold”
Sample at
t = nT
ADC DAC
Sampling Analysis
Analysis will be done using the Impulse Sampling Math Model
x̂(t)
~
x(t) x(t) (t nT)
n
x(t)T(t)
Note: we are using the
“impulse sampling” model in
the DAC not theADC!!!
Impulse Sampled
Signal
x(t)
t
-2T -T
T (t)“Impulse Train”
T 2T 3T t
-2T -T
~
x
(t) x(t)T (t)
T 2T 3T t
13. 2. Use Freq. Response of Filter to get
3. Look to see what is needed to make
xˆ(t) x(t)
Approach: 1. Find the FT of the signal ~
x (t)
Xˆ()
~
()H()
X
Xˆ() X ()
Goal = Determine Under What Conditions We Get:
Reconstructed CT Signal = Original CT Signal
Sampling Analysis
14. Step #1: Hmmm… well T(t) is periodic with period T
so we COULD expand it as a Fourier series:
Period = T sec
Fund. Freq = Fs = 1/THz
T (t) ckejk 2Fst
So… what are the FS coefficients???
e
1
T
1
T
s
t0
jk 2Ft
s
s
1
1
T / 2 T /2
T T / 2
T T / 2
jk 2Ft
jk 2Ft
ck T (t)e (t)e
Only one delta inside a
single period
By sifting property of the
delta function!!!
So… an alternate model for T(t) is
s
T k
jk 2Ft
1
T (t) e
15. Original FT
So we now have….
~
x(t) x(t)T (t)
s
jk 2Ft
x(t)e
1
T k
So using the frequency shift property of the FT gives:
s
T k
jk 2F t
1
x(t) e By frequency shift property
of FT… each term is a
frequency shifted version of
the original signal!!!
k
X ( f kFs )
X ( f )
~ 1
T
Extremely Important
Result… the basis of all
understanding of
sampling!!!
~
T
X ( f )
1
X ( f 2Fs ) X ( f Fs ) X ( f ) X ( f Fs ) X ( f 2Fs )
Shifted Replicas
Use FS Result
16. So… the BIG Thing we’ve just found out is that:
the impulse sampled signal (inside the DAC) has a FT that
consists of the original signal’s FT and frequency-shifted
version of it (where the frequency shifts are by integer
multiples of the sampling rate Fs ):
This result allows us to see how to make sampling work …
By “work” we mean: how to ensure that even though we only have
samples of the signal, we can still get perfect reconstruction of the
original signal…. at least in theory!!
The figure on the next page shows how….
~
T
X ( f )
1
X ( f 2Fs ) X ( f Fs ) X ( f ) X ( f Fs ) X ( f 2Fs )
Original FT
17. Impulse
Gen
CT LPF
DAC
x(t)
x[n] = x(nT)
“Hold”
Sample at
t = nT
ADC
~
x(t) x̂(t)
Fs 2B
we need Fs – B B or equivalently…
When there is no overlap, the original spectrum is left “unharmed”
and can be recovered using a CT LPF (as seen on the next page).
f
X( f )
B
–B
A
f
–Fs
–2Fs
B Fs – B
To ensure that the replicas don’t overlap the original….
A/T
X ( f) X( f kFs)
T k
Fs 2Fs
~ 1
18. Impulse
Gen
CT LPF
DAC
x(t)
x[n] = x(nT)
“Hold”
Sample at
t = nT
ADC
~
x(t) x̂(t)
Xˆ( f ) X (f ) if Fs 2B
f
X( f )
B
–B
A
f
H( f )
T
f
Xˆ( f )
A
f
2Fs
–Fs
–2Fs
A/T
~ 1
X ( f) X( f kFs)
T k
Fs
19. Sampling Analysis Result
What this analysis says:
Sampling Theorem: A bandlimited signal with BW = B Hz
is completely defined by its samples as long as they are taken
at a rate Fs 2B (samples/second).
Impact: To extract the info from a bandlimited signal we only need to
operate on its (properly taken) samples
Then can use a computer to process signals!!!
Computer
x[n] = x(nT)
“Hold”
Sample at
t = nT
x(t)
Extracted
Information
This math result (published in the late 1940s!) is the foundation of:
…CD’s, MP3’s, digital cell phones, etc….
20. “Aliasing” Analysis: What if samples are not taken fast enough???
Impulse
Gen
CT LPF
x(t)
x[n] = x(nT)
“Hold”
Sample at
t = nT
ADC DAC
f
~
x(t) x̂(t)
f
X( f )
B
–B
f
Fs 2Fs
H( f )
–2Fs –Fs
~
X ( f)
Xˆ( f )
If Fs 2B...
Xˆ( f ) X ( f) Called “aliasing” error
f
To enable error-free reconstruction, a signal bandlimited
to B Hz must be sampled faster than 2B samples/sec
aliasing
21. “Aliasing” Analysis: What if the signal is NOT BANDLIMITED???
Impulse
Gen
CT LPF
x(t)
x[n] = x(nT)
“Hold”
Sample at
t = nT
ADC DAC
f
X( f )
~
x(t) x̂(t)
f
Fs
–Fs
~
X ( f)
For Non-BL Signal Aliasingalways
happens regardless of Fs value
All practical signal are Non-BL!!!!
… so we choose Fs to minimize the aliasing to an level
acceptable for the specific application
22. Practical Sampling: Use of Anti-Aliasing Filter
In practice it is important to avoid excessive aliasing. So we
Anti-Aliasing Sample &
LPF Digitize
Code
“Burn” bits
into CD
Signal
Discrete-Time
Signal
Microphone
use a CT lowpass BEFORE theADC!!!
“ADC”
Amp
CT CT
Signal
f
X( f )
f
20 kHz
Haa( f ) … AAFilter
-20 kHz
f
Xaa( f )
20 kHz
-22 kHz
Fs = 44.1 kHz
20 kHz
f
22.05 kHz
-22.05 kHz
~
Xaa (f )
MinimalAliasing
23. Some Sampling Terminology
Fs is called the sampling rate. Its unit is samples/sec which is
often “equivalently” expressed as Hz.
The minimum sampling rate of Fs = 2B samples/sec is called the
Nyquist Rate.
Sampling at the Nyquist rate is called Critical Sampling.
Sampling faster than the Nyquist rate is called Over Sampling
Sampling slower than the Nyquist rate is called Under Sampling
Note: Critical sampling is only possible if an IDEAL lowpass filter
is used…. so in practice we generally need to choose a sampling
rate somewhat above the Nyquist rate (e.g., 2.2B ); the choice
depends on the application.
24. Summary of Sampling
• Math Model for Impulse Sampling (inside the DAC) says
– The FT of the impulse sampled signal has spectral replicas spaced
Fs Hz apart
– This math result drives all of the insight into practical aspects
• Theory says for a BL’d Signal with BW = B Hz
– It is completely defined by samples taken at a rate Fs 2B
– Then… Perfect reconstruction can be achieved using an ideal LPF
reconstruction filter (i.e., the filter inside the DAC)
• Theory says for a Practical Signal…
– Practical signals aren’t bandlimited… so use an Anti-Aliasing
lowpass filter BEFORE the ADC
– Because the A-A LPF is not ideal there will still be some aliasing
• Design the A-A LPF to give acceptably low aliasing error for the
expected types of signals
Notas do Editor
Aslam o Allikum Students!
Welcome to Online Class of Digital Signal Processing.
This is lecture 1: Sampling and Reconstruction ….. Which is about the sampling of continuous time signal to get discrete time signal and then converting it back to the continuous time signal.
These are resources for this course.
This particular lecture is from the chapter 6 of the text book.
These are the course content of the course. We will cover highlighted contents today’s lecture.
This lecture will cover the first CLO of the course.
The course breakdown is also highlighted for your information.
In this lecture we will learn:
What is sampling and what are the applications of sampling
What is practical sampling and reconstruction setup
What is the mathematical model for sampling
and how to analyze the sampling
In the digital era most of our devices are digital and process digital signals. However, in contrast to this most of the real-time signals and data is continuous in nature.
Therefore, we need to sample the continuous time signals to process them.
Lets look at the process of sampling and reconstruction.
Block Diagram 1
Cell Phones are one of the most commonly used device that work according to the above block diagram
Now lets simplify the above diagram and remove the CT system block and DT system block. In fact we want to know whether we can recover the continuous time signal X hat of t from the samples x of n and
If the x of t and x hat of t are equal.
Now lets look at the detailed sampling and reconstruction process discussed in the last slide.
The block diagram shows practical ADC and DAC .
Now lets simply focus on the Mathematical Model of Analog to Digital Converter Block i.e. ADC.
x[n] = x(nT) , so the nth sample is the value of x(t) at t = nT