Sampling Continuous-Time Signals

advertisement
Sampling
Continuous-Time
Signals
•
•
•
•
•
Impulse train and its Fourier Transform
Impulse samples versus discrete-time sequences
Aliasing and the Sampling Theorem
Anti-alias filtering
Comparison of FT, DTFT, Fourier Series
M.H. Perrott © 2007
Copyright © 2007 by M.H. Perrott
All rights reserved.
Sampling Continuous-Time Signals, Slide 1
The Need for Sampling
Real World
(USRP Board)
Matlab
xc(t)
xc(t)
A-to-D
Converter
x[n]
x[n]
t
n
1
• The boundary between analog and digital
– Real world is filled with continuous-time signals
– Computers (i.e. Matlab) operate on sequences
• Crossing the analog-to-digital boundary requires
sampling of the continuous-time signals
• Key questions
– How do we analyze the sampling process?
– What can go wrong?
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 2
An Analytical Model for Sampling
p(t)
1
t
p(t)
T
xp(t)
xc(t)
xc(t)
x[n]
Impulse Train
to Sequence
xp(t)
x[n]
t
• Two step process
t
T
n
1
– Sample continuous-time signal every T seconds
• Model as multiplication of signal with impulse train
– Create sequence from amplitude of scaled impulses
• Model as rescaling of time axis (T goes to 1)
• Notation: replace impulses with stem symbols
Can we model this in the frequency domain?
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 3
Fourier Transform of Impulse Train
P(f)
p(t)
1
T
1
t
T
-2
T
-1
T
0
1
T
2
T
f
• Impulse train in time corresponds to impulse train
in frequency
– Spacing in time of T seconds corresponds to spacing in
frequency of 1/T Hz
– Scale factor of 1/T for impulses in frequency domain
– Note: this is painful to derive, so we won’t …
• The above transform pair allows us to see the
following with pictures
– Sampling operation in frequency domain
– Intuitive comparison of FT, DTFT, and Fourier Series
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 4
Frequency Domain View of Sampling
p(t)
xc(t)
xp(t)
1
t
t
t
T
Xc(f)
T
P(f)
A
f
-2
T
-1
T
0
Xp(f)
A
T
1
T
1
T
2
T
f
-2
T
-1
T
0
1
T
2
T
f
• Recall that multiplication in time corresponds to
convolution in frequency
• We see that sampling in time leads to a periodic
Fourier Transform with period 1/T
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 5
Frequency Domain View of Output Sequence
xp(t)
x[n]
t
n
T
1
Xp(f)
A
T
-2
T
-1
T
0
X(ej2πλ)
A
T
1
T
2
T
f
-2
-1
0
1
2
λ
• Scaling in time leads to scaling in frequency
– Compression/expansion in time leads to expansion/
compression in frequency
• Conversion to sequence amounts to T going to 1
– Resulting Fourier Transform is now periodic with period 1
– Note that we are now essentially dealing with the DTFT
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 6
Summary of Sampling Process
p(t)
1
t
p(t)
T
xp(t)
xc(t)
xc(t)
x[n]
Impulse Train
to Sequence
xp(t)
x[n]
t
t
n
T
Xc(f)
f
0
Xp(f)
A
T
A
1
-2
T
-1
T
0
X(ej2πλ)
A
T
1
T
2
T
f
-2
-1
0
1
2
λ
• Sampling leads to periodicity in frequency domain
M.H. Perrott © 2007
We need to avoid overlap of replicated
signals in frequency domain (i.e., aliasing)
Sampling Continuous-Time Signals, Slide 7
The Sampling Theorem
p(t)
xc(t)
xp(t)
1
t
t
t
T
Xc(f)
P(f)
f
-2
T
-1
T
0
Xp(f)
A
T
1
T
A
-fbw fbw
T
1
T
2
T
f
-2
T
-1
T
0
1
T
-fbw fbw
1
1 - fbw
- + fbw
T
T
2
T
f
• Overlap in frequency domain (i.e., aliasing) is
avoided if:
• We refer to the minimum 1/T that avoids aliasing
as the Nyquist sampling frequency
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 8
Example: Sample a Sine Wave
t
p(t)
T
xp(t)
xc(t)
Impulse Train
to Sequence
x[n]
t
n
t
T
Xc(f)
-1/T
1
Xp(f)
0
1/T
f
-1/T
X(ej2πλ)
0
1/T
f
-1
0
1
λ
Sample rate is well above Nyquist rate
• Time domain: resulting sequence maintains the
same period as the input continuous-time signal
• Frequency domain: no aliasing
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 9
Increase Input Frequency Further …
t
p(t)
T
xp(t)
xc(t)
Impulse Train
to Sequence
x[n]
t
n
t
T
Xc(f)
-1/T
1
Xp(f)
0
1/T
f
-1/T
X(ej2πλ)
0
1/T
f
-1
0
1
λ
Sample rate is at Nyquist rate
• Time domain: resulting sequence still maintains the
same period as the input continuous-time signal
• Frequency domain: no aliasing
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 10
Increase Input Frequency Further …
t
p(t)
T
xp(t)
xc(t)
Impulse Train
to Sequence
x[n]
t
n
t
T
Xc(f)
-1/T
1
Xp(f)
0
1/T
f
-1/T
X(ej2πλ)
0
1/T
f
-1
0
1
λ
Sample rate is at half the Nyquist rate
• Time domain: resulting sequence now appears as a
DC signal!
• Frequency domain: aliasing to DC
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 11
Increase Input Frequency Further …
t
p(t)
T
xp(t)
xc(t)
Impulse Train
to Sequence
x[n]
t
t
n
T
Xc(f)
-1/T
1
Xp(f)
0
1/T
f
-1/T
X(ej2πλ)
0
1/T
f
-1
0
1
λ
Sample rate is well below the Nyquist rate
• Time domain: resulting sequence is now a sine
wave with a different period than the input
• Frequency domain: aliasing to lower frequency
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 12
The Issue of High Frequency Noise
p(t)
1
t
p(t)
Xc(f)
0
1
T
f
-2
T
-1
T
0
x[n]
Impulse Train
to Sequence
Xp(f)
A
T
A
-1
T
xp(t)
xc(t)
Undesired
Signal or
Noise
T
X(ej2πλ)
A
T
1
T
2
T
f
-2
-1
0
1
2
λ
• We typically set the sample rate to be large
enough to accommodate full bandwidth of signal
• Real systems often introduce noise or other
interfering signals at higher frequencies
– Sampling causes this noise to alias into the desired
signal band
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 13
Anti-Alias Filtering
p(t)
1
t
Anti-alias
Lowpass
xc(t)
H(f)
p(t)
xc(t)
T
xp(t)
Impulse Train
to Sequence
x[n]
H(j2πf)
Xc(f)
-1
T
0
X(ej2πλ)
Xp(f)
1
T
f
-2
T
-1
T
0
1
T
2
T
f
-2
-1
0
1
2
λ
• Practical A-to-D converters include a continuoustime filter before the sampling operation
– Designed to filter out all noise and interfering signals
above 1/(2T) in frequency
– Prevents aliasing
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 14
Using the Impulse Train to Compare
the FT, DTFT, and Fourier Series
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 15
Relationship Between FT and DTFT
p(t)
xc(t)
xp(t)
Impulse Train x[n]
to Sequence
xc(t)
x[n]
t
n
1
X(ej2πλ)
Xc(f)
f
0
-2
FT
-1
0
1
2
λ
DTFT
Time: Continuous, Non-Periodic
Discrete, Non-Periodic
Freq:
Periodic, Continuous
M.H. Perrott © 2007
Non-Periodic, Continuous
Sampling Continuous-Time Signals, Slide 16
Relationship Between FT and Fourier Series
xp(t)
x(t)
p(t)
T
t
-2T
-T
0
T
t
t
2T
Tp
Tp
Xp(f)
-2
Tp
P(f)
X(f)
2
Tp
f
-1
Tp
0
1
Tp
-5 -4 -3 -2 -1 0
T T T T T
1
T
2
T
3 4
T T
FT
5
T
f
-5
T
-3 -2
T T
-4
T
2
T
-1
T
3
T
0 1
T
5
T
4
T
f
Fourier Series
Time: Continuous, Non-Periodic
Continuous, Periodic
Freq:
Non-Periodic, Discrete
M.H. Perrott © 2007
Non-Periodic, Continuous
Sampling Continuous-Time Signals, Slide 17
Summary
• The impulse train and its Fourier Transform form a
very powerful analysis tool using pictures
– Sampling, comparison of FT, DTFT, Fourier Series
• Sampling analysis:
– Time domain: multiplication by an impulse train followed by
re-scaling of time axis (and conversion to stem symbols)
– Frequency domain: convolution by an impulse train followed
by re-scaling of frequency axis
• Prevention of aliasing
– Sample faster than Nyquist sample rate of signal bandwidth
– Use anti-alias filter to cut out high frequency noise
• Up next: downsampling, upsampling, reconstruction
M.H. Perrott © 2007
Sampling Continuous-Time Signals, Slide 18
Download