Upload
abigayle-bradley
View
218
Download
0
Embed Size (px)
Citation preview
Signals and SystemsProf. H. Sameti
Chapter 7:• The Concept and Representation of Periodic Sampling of a CT
Signal• Analysis of Sampling in the Frequency Domain• The Sampling Theorem - the Nyquist Rate• In the Time Domain: Interpolation• Undersampling and Aliasing• Review/Examples of Sampling/Aliasing• DT Processing of CT Signals
Book Chapter#: Section#
2
SAMPLING
We live in a continuous-time world: most of the signals we encounter are CT signals, e.g. x(t).
How do we convert them into DT signals x[n]? Sampling, taking snap shots of x(t) every T seconds T sampling period x [n] ≡x (nT), n = ..., -1, 0, 1, 2, ... regularly spaced samples
Applications and Examples Digital Processing of Signals Strobe Images in Newspapers Sampling Oscilloscope …
How do we perform sampling?
Computer Engineering Department, Signal and Systems
Book Chapter#: Section#
3
Why/When Would a Set of Samples Be Adequate?
Observation: Lots of signals have the same samples
By sampling we throw out lots of information (all values of x(t) between sampling points are lost).
Key Question for Sampling: Under what conditions can we reconstruct the original CT signal x(t)
from its samples?Computer Engineering Department, Signal and Systems
Book Chapter#: Section#
4
Impulse Sampling: Multiplying x(t) by the sampling function
Computer Engineering Department, Signal and Systems
( ) ( )n
p t t nT
( ) ( ) ( ) ( ) ( ) ( ) ( )p
n n
x t x t p t x t t nT x nT t nT
Book Chapter#: Section#
5
Analysis of Sampling in the Frequency Domain
Multiplication Property:
Computer Engineering Department, Signal and Systems
( ) ( ) ( )px t x t p t
1( ) ( )* ( )
22
( ) ( )
2
p
sk
s
X j X j P j
P j kT
T
Sampling Frequency
1( ) ( )* ( )p s
k
X j X j kT
1
( ( ))sk
X j kT
Important to note:
1s T
Book Chapter#: Section#
6
Illustration of sampling in the frequency-domain for a band-limited signal (X(jω)=0 for |ω| > ωM)
drawn assuming:
Computer Engineering Department, Signal and Systems
( )pX j
. . 2s M M
s Mi e
No overlap between shifted spectra
Book Chapter#: Section#
7
Reconstruction of x(t) from sampled signals
If there is no overlap between shifted spectra, a LPF can reproduce x(t) from xp(t)
Computer Engineering Department, Signal and Systems
Book Chapter#: Section#
8
Reconstruction of x(t) from sampled signals
Suppose x(t) is band-limited, so that :
Then x(t) is uniquely determined by its samples {x(nT)} if :
where ωs = 2π/T
Computer Engineering Department, Signal and Systems
X(jω)=0 for |ω| > ωM
ωs > 2ωM = The Nyquist rate
Book Chapter#: Section#
9
Observations on Sampling
In practice, we obviously don’t sample with impulses or implement ideal low-pass filters. One practical example: The
Zero-Order Hold
Computer Engineering Department, Signal and Systems
Book Chapter#: Section#
10
Observations (Continued)
Sampling is fundamentally a time varying operation, since we multiply x(t) with a time-varying function p(t). However,
is the identity system (which is TI) for band-limited x(t) satisfying the sampling theorem (ωs > 2ωM ).
What if ωs ≤ 2ωM? Something different: more later.
Computer Engineering Department, Signal and Systems
Book Chapter#: Section#
11
Time-Domain Interpretation of Reconstruction of Sampled Signals: Band-Limited Interpolation
The low-pass filter interpolates the samples assuming x(t) contains no energy at frequencies ≥ ωc
Computer Engineering Department, Signal and Systems
sin( ) ( )* ( ) , ( )
( ( ) ( ) )* ( )
sin[ ( )]( ) ( ) ( )
( )
cr p
n
c
n n
T tx t x t h t where h t
t
x nT t nT h t
T t nTx nT h t nT x nT
t nT
Book Chapter#: Section#
12
Computer Engineering Department, Signal and Systems
OriginalCT signal
After Sampling
After passing the LPF
Book Chapter#: Section#
13
Interpolation Methods
Band-limited Interpolation Zero-Order Hold First-Order Hold : Linear interpolation
Computer Engineering Department, Signal and Systems
Book Chapter#: Section#
14
Undersampling and Aliasing
When ωs ≤ 2ωM => Undersampling
Computer Engineering Department, Signal and Systems
Book Chapter#: Section#
15
Undersampling and Aliasing (continued)
Higher frequencies of x(t) are “folded back” and take on the “aliases” of lower frequencies
Note that at the sample times, xr (nT) = x (nT)Computer Engineering Department, Signal and Systems
Xr (jω) ≠ X(jω)
Distortion because of
aliasing
A Simple Example
X(t) = cos(ωot + )Φ
Picture would be Modified…
Demo: Sampling and reconstruction of cosωot
Strobe Demo
> 0, strobed image moves forward, but at a slower paceΔ = 0, strobed image stillΔ < 0, strobed image moves Δ backward.Applications of the strobe effect (aliasing can be useful sometimes):—E.g., Sampling oscilloscope
DT Processing of Band-LimitedCT Signals
Why do this? —Inexpensive, versatile, and higher noise margin.How do we analyze this system? —We will need to do it in the frequency domain in both CT and DT —In order to avoid confusion about notations, specify —CT frequency variableω —DT frequency variable ( = )Ω Ω ωΤStep 1:Find the relation between xc(t) and xd[n], or Xc (j ) and ω Xd (ejΩ)
Time-Domain Interpretation of C/D Conversion
Note: Not full analog/digital (A/D) conversion – not quantizing the x[n] values
Now the whole picture
Overall system is time-varying if sampling theorem is not satisfied It is LTI if the sampling theorem is satisfied, i.e. for bandlimited inputs xc (t),
with
When the input xc(t) is band-limited (X(j ) = 0 at | | > ω ω ωM)and the sampling theorem is satisfied (ωS> 2ωM), then
Example:Digital Differentiator Applications: Edge Enhancement
Courtesy of Jason Oppenheim. Used
with permission.
Courtesy of Jason Oppenheim. Used with permission.
Construction of Digital Differentiator
Bandlimited Differentiator Desired:
Set Assume (Nyquist rate met)
Choice for Hd(ejΩ):
Downsampling
n -3 -2 –1 0 1 2
)(nx
a
bc d
ef
n -1 0 1
)(nxdb
d f
2
Downsample by a factor of 2
• Downsample by a factor of N: Keep one sample, throw away (N-1) samples
• Advantage?
31Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Downsampling)(txc
-3T -2T –T 0 T 2T 3T
:)(txc A continuous-time signal
Suppose we now sample at two rates:)(txc
)(txc C/D
T
)()( nTxnx c
(1))(txc C/D
MT
)(
)(
nMTx
nx
c
d (2)
•Q: Relationship between the DTFT’s of these two signals?
32Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Downsampling
)(txc C/D
T
)()( nTxnx c(1)
)(txc C/D
MT
)(
)(
nMTx
nx
c
d (2)
kc T
kX
TnxDTFTX )
2(
1)}({)(
rcdd MT
rX
MTnxDTFTX )
2(
1)}({)(
• Change of variable: kMir 10
Mi
k
33Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Downsampling
kc T
kX
TnxDTFTX )
2(
1)}({)(
rcdd MT
rX
MTnxDTFTX )
2(
1)}({)(
• Change of variable: kMir 10
Mi
k
10:10:
;0
Mr
Mi
k
12:10:
;1
MMr
Mi
k
132:10:
;2
MMr
Mi
k
34Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Downsampling
kc T
kX
TnxDTFTX )
2(
1)}({)(
rcdd MT
rX
MTnxDTFTX )
2(
1)}({)(
• Change of variable: kMir 10
Mi
k
1
0)
22(
11)(
M
i kcd MT
i
T
k
MTX
TMX
1
0)
22(
11)(
M
i kcd T
k
MT
iX
TMX
)2
(M
iX
35
Downsampling
1
0)
22(
11)(
M
i kcd T
k
MT
iX
TMX
)2
(M
iX
)2
(1
)(1
0
M
id M
iX
MX
If M=2, )2
2(
2
1)(
1
0
id
iXX
)]2
2()
2([
2
1)(
XXX d
rcdd MT
rX
MTnxDTFTX )
2(
1)}({)(
kMir
10
Mi
k
36
Downsampling (example) )]2
()2
([2
1)( XXX d
)2
(
X
44
)2
2(
X
2 62
44
)(dX
2 62
•What could go wrong here? 38
Downsampling with aliasing (illustration)
39Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Downsampling (preventing aliasing)
40Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Downsampling with aliasing (illustration)
41Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Upsampling
• Application?
• It is the process of increasing the sampling rate by an integer factor.
)(txc C/D
T
)()( nTxnx c(1)
)(txc C/D
T/L
)()(L
nTxnx ci (2)
42Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Upsampling
n -3 -2 –1 0 1 2
)(nxia
b c d
ef
)(nxbd f
43Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Upsampling
Question: How can we obtain from ?)(nxi )(nx
• Proposed Solution:
)(nx L)(nxe
Low-pass filter withgain L and cut-off frequency
L
)(nxi
,...2,,00
)( LLnOtherwise
L
nx
nxe
45Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Upsampling
n -3 -2 –1 0 1 2
)(nxia
b c d
ef
)(nxbd f
,...2,,00
)( LLnOtherwise
L
nx
nxe
n -3 -2 –1 0 1 2
)(nxed f
46Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Upsampling•Q: Relationship between the DTFT’s of these three signals?
,...2,,00
)( LLnOtherwise
L
nx
nxe
k
e kLnkxnx )()()(
nj
n ke ekLnkxX
)()()(
k n
nje ekLnkxX )()()(
Lkje Shifting property: 47
Upsampling
k n
nje ekLnkxX )()()(
Lkje
k
Lkje ekxX )()(
k
kjekxnxDTFTX )()}({)(On the other hand:
(Eq.2)
(Eq.1)
(Eq.1) and (Eq.2) )()( LXX e
48Hossein Sameti, Dept. of Computer Eng., Sharif University of Technology
Upsampling)(X
22)(Xe
L
L
L
2
In order to get from we thus need an ideal low-pass filter.
)(eX)(iX
L
L
)(H
L
49