You are on page 1of 14

# Prof. Brian L.

Evans
Dept. of Electrical and Computer Engineering
The University of Texas at Austin
Lecture 4 http://courses.utexas.edu/
EE 445S Real-Time Digital Signal Processing Lab Fall 2012
Sampling and Aliasing
4 - 2
Outline
Sampling
Time and frequency domains
Sampling theorem
Aliasing and folding
Bandpass sampling
Conclusion
7 - 3
Data Conversion
Analog-to-Digital Conversion
Lowpass filter has
stopband frequency
less than f
s
to reduce
aliasing due to sampling
(enforce sampling theorem)
Digital-to-Analog Conversion
Discrete-to-continuous
conversion could be as
simple as sample and hold
Lowpass filter has stopband
frequency less than f
s

reduce artificial high frequencies
Analog
Lowpass
Filter
Discrete to
Continuous
Conversion
f
s

Lecture 7
Analog
Lowpass
Filter

Quantizer

Sampler at
sampling
rate of f
s
Lecture 8 Lecture 4
4 - 4
| | ( )
s
T k f k f =
Sampling: Time Domain
Many signals originate in continuous-time
Talking on cell phone, or playing acoustic music
By sampling a continuous-time signal at
isolated, equally-spaced points in time, we
obtain a sequence of numbers

k e {, -2, -1, 0, 1, 2,}
T
s
is the sampling period.
Sampled analog waveform
( ) ( )

=
=
k
s sampled
T k t t f t f ) ( o
impulse train
f(t)
t
T
s

T
s

( ) t f
sampled
Review
4 - 5
Sampling: Frequency Domain
Sampling replicates spectrum of continuous-time
signal at integer multiples of sampling frequency

Fourier series of impulse train where e
s
= 2 t f
s

( ) ( ) ) (2 cos 2 ) ( cos 2 1
1
) ( . . . + + + = =

=
t t
T
T k t t
s s
s
k
s T
s
e e o o
( ) ) (2 cos ) ( 2 ) ( cos ) ( 2 ) (
1
) ( ) ( ) ( . . . + + + = = t t f t t f t f
T
t t f t g
s s
s
T
s
e e o
e
G(e)
e
s
2e
s
2e
s
e
s
e
F(e)
2tf
max
-2tf
max
max max max
2 2 2 2 if only and if gap f f f f f
s s
> < t t t
Modulation
by cos(2 e
s
t)
Modulation
by cos(e
s
t)
Review
How to
recover
F(e)?
4 - 6
Sampling Theorem
Continuous-time signal x(t) with frequencies no
higher than f
max
can be reconstructed from its
samples x(k T
s
) if samples taken at rate f
s
> 2 f
max

Nyquist rate = 2 f
max

Nyquist frequency = f
s
/ 2
Example: Sampling audio signals
Normal human hearing is from about 20 Hz to 20 kHz
Apply lowpass filter before sampling to pass low
frequencies up to 20 kHz and reject high frequencies
Lowpass filter needs 10% of maximum passband frequency
to roll off to zero (2 kHz rolloff in this case)
What happens
if f
s
= 2 f
max
?
Review
4 - 7
Sampling Theorem
Assumption
Continuous-time signal has
absolutely no frequency
content above f
max
Sampling time is exactly the
same between any two
samples
Sequence of numbers
obtained by sampling is
represented in exact
precision
Conversion of sequence to
continuous time is ideal
In Practice
4 - 8
Sampling and Oversampling
As sampling rate increases above Nyquist rate,
sampled waveform looks more like original
Zero crossings: frequency content of a sinusoid
Distance between two zero crossings: one half period
With sampling theorem satisfied, sampled sinusoid
crosses zero right number of times per period
In some applications, frequency content matters not time-
domain waveform shape
DSP First, Ch. 4, Sampling and Interpolation
demo http://www.ece.gatech.edu/research/DSP/DSPFirstCD/
4 - 9
Aliasing
Continuous-time
sinusoid
x(t) = A cos(2t f
0
t

+ |)
Sample at T
s
= 1/f
s

x[n] = x(T
s
n) =
A cos(2t f
0
T
s
n + |)
Keeping the sampling
period same, sample
y(t) = A cos(2t (f
0
+ l f
s
) t + |)
where l is an integer
y[n] = y(T
s
n)
= A cos(2t(f
0
+ lf
s
)T
s
n + |)
= A cos(2tf
0
T
s
n + 2tlf
s
T
s
n + |)
= A cos(2tf
0
T
s
n + 2tln + |)
= A cos(2tf
0
T
s
n + |)
= x[n]
Here, f
s
T
s
= 1
Since l is an integer,
cos(x + 2 t l) = cos(x)
y[n] indistinguishable
from x[n]
4 - 10
Aliasing
Since l is any integer, a countable but infinite
number of sinusoids give same sampled sequence
Frequencies f
0
+ l f
s
for l = 0
Called aliases of frequency f
0
with respect to f
s

All aliased frequencies appear same as f
0
due to sampling

Signal Processing First, Continuous to Discrete
Sampling demo (con2dis)

4 - 11
Aliasing
Sinusoid sin(2 t f
input
t) sampled at f
s
= 2000
samples/s with f
input
varied

input
= f
s
gives rise
to name of folding
A
p
p
a
r
e
n
t

f
r
e
q
u
e
n
c
y

(
H
z
)

Input frequency, f
input
(Hz)
1000
1000 2000 3000 4000
f
s
= 2000 samples/s
4 - 12
Bandpass Sampling
Reduce sampling rate
Bandwidth: f
2
f
1
Sampling rate f
s
must
be greater than analog
bandwidth f
s
> f
2
f
1

For replica to be centered
at origin after sampling
f
center
= (f
1
+ f
2
) = k f
s
Practical issues
Sampling clock tolerance: f
center
= k f
s
Effects of noise
Ideal Bandpass Spectrum
f
1
f
2
f

f
2
f
1
Sample at f
s
Sampled Ideal Bandpass Spectrum
f
1
f
2
f
f
2
f
1
Lowpass filter to
extract baseband
4 - 13
Sampling for Up/Downconversion
Upconversion method
Sampling plus bandpass
filtering to extract
intermediate frequency
(IF) band with f
IF
= k
IF
f
s

Downconversion method
Bandpass sampling plus
bandpass filtering to extract
intermediate frequency (IF)
band with f
IF
= k
IF
f
s
f
f
max
-f
max
f f
s
f
IF
f
IF
f
s
f
1
f
2
f

f
2
f
1
Sample
at f
s
f

f
2
f
1
-f
IF
f
IF
4 - 14
Conclusion
Sampling replicates spectrum of continuous-time
signal at offsets that are integer multiples of
sampling frequency
Sampling theorem gives necessary condition to
reconstruct the continuous-time signal from its
samples, but does not say how to do it
Aliasing occurs due to sampling
Noise present at all frequencies
A/D converter design tradeoffs to control impact of aliasing
Bandpass sampling significantly reduces
sampling rate by using aliasing to our benefit