Lecture 4 - Sampling
Lecture 4 - Sampling
Lecture 6 – Sampling
Objective: To learn and prove the sampling theorem and understand its impli-
cations.
We encountered this periodic function when we studied Fourier series. Recall that
by its Fourier series representation we can write
1 X jnωs t
δT (t) = e
T n
Now lets look at the spectrum of the transformed signal. Using the convolution
property,
1 1 X 1X
X(ω) = X(ω) ∗ 2πδ(ω − nωs ) = X(ω − nωs ).
2π T n
T n
Plot the spectrum of the sampled signal with both ω frequency and f frequency.
Observe the following:
ECE 3640: Lecture 6 – Sampling 2
• The spectrum is periodic, with period 2π, because of the multiple copies of
the spectrum.
• The spectrum is scaled down by a factor of 1/T .
• Note that in this case there is no overlap between the images of the spectrum.
Now consider the effect of reducing the sampling rate to fs < 2B. In this case,
the duplicates of the spectrum overlap each other. The overlap of the spectrum is
aliasing.
This demonstration more-or-less proves the sampling theorem for general signals.
Provided that we sample fast enough, the signal spectrum is not distorted by the
sampling process. If we don’t sample fast enough, there will be distortion. The
next question is: given a set of samples, how do we get the signal back? From the
spectrum, the answer is to filter the signal with a lowpass filter with cutoff ωc ≥ 2πB.
This cuts out the images and leaves us with the original spectrum. This is a sort of
idealized point of view, because it assumes that we are filtering a continuous-time
function x(t), which is a sequence of weighted delta functions. In practice, we have
numbers x[n] representing the value of the function x[n] = x(nT ) = x(n/fs ). How
can we recover the time function from this?
where
sin(πfs t)
g(t) = = sinc(πfs t).
πfs t
Show what the formula means: we are interpolating in time between samples using
the sinc function.
We will prove this theorem. Because we are actually lacking a few theoretical
tools, it will take a bit of work. What makes this interesting is we will end up using
in a very essential way most of the transform ideas we have talked about.
1. The first step is to notice that the spectrum of the sampled signal,
1X
X(ω) = X(ω − nωs )
T n
is periodic and hence has a Fourier series. The period of the function in
frequency is ωs , and the fundamental frequency is
2π 1
p0 = = = T.
ωs fs
By the F.S. we can write
X
X(ω) = cn ejnωT
n
so X X
X(ω) = x(−nt)ejnωT = x(nt)e−jnωT .
n n
3. Let X
y(t) = x(nT )g(t − nT ).
n
We will show that y(t) = x(t) by showing that Y (ω) = X(ω). We can compute
the F.T. of y(t) using linearity and the shifting property:
X
X ω ω
Y (ω) = x(nT )T rect e −jωnT
= T rect x(nT )e−jωnT
n
2πfs 2πfs n
Observe that the summation on the right is the same as the F.S. we derived
in step 1:
ω
Y (ω) = T rect X(ω).
2πfs
Now substituting in the spectrum of the sampled signal (derived above)
!
ω 1X
Y (ω) = T rect X(ω − nωs ) = X(ω)
2πfs T n
since x(t) is bandlimited to −πfs < ω < πfs or −fs /2 < f < fs /2.
Notice that the reconstruction filter is based upon a sinc function, whose trans-
form is a rect function: we are really just doing the filtering implied by our initial
intuition.
In practice, of course, we want to sample at a frequency higher than just twice
the bandwidth to allow room for filter rolloff.
Some applications
Why digital?
1. Recoverable signals
ECE 3640: Lecture 6 – Sampling 4
2. Flexibility
3. Channel coding theorem. Source coding theorem.
4. Encryption
Spectral sampling
Just as we can sample a band-limited signal in the time domain and reconstruct it,
provided that we sample often enough, so can we also sample a time-limited signal
in the frequency domain and exactly reconstruct the spectrum, provided that we
take the samples close enough together in the spectrum. There is thus a dual to the
sampling theorem which applies to sampling the spectrum. We can also use this
kind of thinking to find the F.T. of a periodic signal.
Let f (t) be a causal signal time-limited to τ seconds. Its F.T. is
Z τ
F (ω) = f (t)e−jωt dt.
0
Comparing the F.S. coefficient with the F.T. above, it follows that
1
Dn = F (nω0 ).
T0
An implication of this is that we can find the F.S. coefficients by first taking the
F.T. of one period of our signal, then sampling and scaling the F.T.
In terms of reconstructing the signal spectrum from its samples, we can see that
as long as T0 > τ , the cycles of f (t) do not overlap. We can then (at least in concept)
reconstruct the entire spectrum of F (ω) from its samples. Conceptually, we time-
limit the function, then take its F.T. The sampling condition can be expressed as
follows:
T0 > τ
1
F0 <
τ
So we can reconstruct from samples of the spectrum, provided that the samples are
close enough by comparison with the time-limit of the function.