DSP Lecture4
DSP Lecture4
Ciira wa Maina
[email protected]
1 Summary
This lecture will focus on:
2 Sampling
Over the last few decades, there has been a move towards digital transmission of analog signals.
The first step in creating a digital signal from an analog one involves sampling the continuous time
signal x(t) at regular intervals to form a discrete time signal. Discrete time signals are defined at
discrete times only indexed by the integers. Thus a discrete time signal is a sequence of numbers
where the nth number is denoted by x[n]. When the discrete time signal x[n] arises from the
sampling of a continuous time signal x(t) at regular intervals we have
x[n] = x(nTs )
Ts is known as the sampling period. The sampling frequency is T1s . Two different time domain
signal can result in the same discrete time signal after sampling. This means that an appropriate
sampling rate must be chosen to allow reconstruction of signals.
To form a digital signal from the discrete time signal, the sample values are quantized into
discrete values.
1
That is
xs (t) = x(t)s(t)
∞
X
= x(t) δ(t − nTs )
n=−∞
In order to derive the Fourier transform of xs (t) we note that it is the product of two functions
and therefore
Xs (f ) = X(f ) ∗ S(f )
where ∗ denotes convolution.
Recall that if a periodic function is formed from a sequence of pulses we have
∞ ∞
X 1 X n n
F[ x(t − nT0 )] = X( )δ(f − )
n=−∞
T0 n=−∞ T0 T0
where T0 is the period and x(t) is the pulse whose Fourier transform is X(f )
Since s(t) is a periodic sequence of Dirac delta functions and F[δ(t)] = 1 we have
∞
X
S(f ) = fs δ(f − nfs )
n=−∞
1
where fs = Ts . We have
Xs (f ) = X(f ) ∗ S(f )
X∞
= fs X(f − nfs )
n=−∞
If x(t) is a bandlimited continuous time signal with bandwidth W Hertz with the frequency
spectrum X(f ) shown in Figure ?? and the sampling frequency fs = 2W we see that
1
X(f ) = Xs (f ) |f | < W
2W
X(f )
f
−W 0 W
2
In general when fs > 2W , the replicas of X(f ) in Xs (f ) do not overlap and x(t) can be
recovered from xs (t) with an ideal low pass filter.
If fs < 2W , the copies of X(f ) overlap and we can no longer recover x(t) from xs (t) via low
pass filtering. The output of low pass filtering will suffer aliasing distortion where high frequency
components take on the identity of low frequency signals.
Example: Consider the sampling of cos(2πf0 t) when fs > 2f0 and when fs < 2f0 . When
fs > 2f0 the output of an ideal LPF with cutoff frequency f2s in response to the sampled signal is
cos(2πf0 t). When fs < 2f0 aliasing occurs and the output of the LPF is cos(2π(fs − f0 )t). The
high frequency signal cos(2πf0 t) has taken the alias of the lower frequency signal cos(2π(fs −f0 )t).
From the above we can state the Sampling Theorem: A bandlimited signal of finite energy
which only has frequency components below W Hz, is completely specified by samples taken at a
rate fs ≥ 2W Hz. The frequency 2W is sometimes called the Nyquist rate.
Then the output of the LPF is given by xs (t) ∗ h(t) where h(t) is the impulse response of the ideal
lowpass filter. We can show that
sin( Tπs t)
h(t) = π
Ts t
This expression is known as the interpolation formula and allows the reconstruction of the
original signal from its samples.
We can also arrive at the interpolation formula by noting that Xs (f ) can also be written as
∞
X
Xs (f ) = x(nTs )e−j2πnTs f
n=−∞
and therefore
Z ∞
x(t) = X(f )ej2πf t df
−∞
3
Z fs
2 1
= Xs (f )ej2πf t df
− f2s fs
Z fs ∞
1 X
2
= x(nTs )e−j2πnTs f ej2πf t df
fs fs
−2 n=−∞
∞ Z fs
X 1 2
= x(nTs ) ej2πf (t−nTs ) df
n=−∞
fs − fs
2
∞
X sin(πfs (t − nTs ))
= x(nTs )
n=−∞
πfs (t − nTs )
From the above development we see that a bandlimited signal can be recovered exactly from
its samples. In practice signals are not bandlimited and to allow reconstruction after sampling
the signals are first passed through a lowpass anti-aliasing filter to limit the bandwidth to W Hz.
This signal is then sampled at a frequency slightly higher than the Nyquist rate of 2W Hz. This
has the benefit of allowing the reconstruction filter to have a non-zero transition band making it
realizable.
Example: The range of human hearing is upto approximately 20kHz which corresponds to a
Nyquist rate of 40kHz. Audio CDs are sampled at 44.1kHz.