Chapter - 5
Sampling : Discrete Time Signals
5.1 Introduction
The digital computer can process discrete time signals using extremely flexible and powerful
algorithms. However, most signals of interest are continous time , which is how almost always
appear in nature. This chapter introduces the idea of translating continous time problems into
discrete time, and you can read on to learn more of the details and importance of sampling .
Key Questions
How do we turn a continous time signal into a discrete time signal (sampling, A/D)?
When can we reconstruct a CT signal exactly from its samples (reconstruction, D/A)?
Manipulating the DT signal does what to the reconstructed signal?
5.2 Sampling Theorem
A continuous-time signal can be processed by applying its samples through a discrete-time
system. For this purpose, it is important to maintain the signal sampling rate high enough to
permit the reconstruction of the original signal from these samples without error (or with an error
within a given tolerance).
Sampling theory is the bridge between the continuous-time and discrete-time worlds. The
information inherent in a sampled continuous-time signal is equivalent to that of a discrete-time
signal. A sampled continuous-time signal is a sequence of impulses, while a discrete-time signal
presents the same information as a sequence of numbers.
In general, sampling theorem plays a crucial role in modern digital signal processing. The
theorem concerns about the minimum sampling rate required to convert a continuous time signal
to a digital signal, without loss of information.
5.3 Impulse train sampling
In order to develop the sampling theorem, we need a convenient way in which to represent the
sampling of a continues time signal at a regular interval. A useful way to do this is through the
use of a periodic impulse train multiplied by the continues time signal x(t) that we wish to
sample, this mechanism is known as impulse train sampling is depicted in figure 5.1.
The periodic impulse train p(t) is referred to as sampling function, the period T as the sampling
period and the fundamental frequency of p(t), s = as the sampling frequency.
In time domain
xp(t) = x(t) p(t) (5.1)
Where
p(t) = ∑ (5.2)
Consider the following system shown in Fig. 5.1. This system is called an analogto-digital (A/D)
conversion system. The basic idea of A/D conversion is to take a continuous-time signal, and
convert it to a discrete-time signal.
Figure 5.1: An analog to digital (A/D) conversion system.
Mathematically, if the continuous-time signal is x(t), we can collect a set of samples by
multiplying x(t) with an impulse train p(t) in eq. 5.2
p(t) = ∑
where T is the period of the impulse train. Multiplying x(t) with p(t) yields
xp(t) = x(t) p(t)
= x(t) ∑
= ∑
= ∑ (5.3)
Pictorially, xp(t) is a set of impulses bounded by the envelop x(t) as shown in Fig.5.2.
Figure 5.2: An example of A/D conversion.The output signal xp(t) represents a set of samples of
the signal x(t).
We may regard xp(t) as the samples of x(t). Note that xp(t) is still a continuous-time signal. We
can view xp(t) as a discrete-time signal if we define xp[n] = x [nT].
Having an explanation of the A/D conversion in time domain, we now want to study the A/D
conversion in the frequency domain. (Why? We need it for the development of Sampling
Theorem!) So, how do the frequency responses X( ), P( ) and Xp ( ) look like?
Let’s start with P( ). From chapter 4, table 4.1, we know that
p(t) = ∑ ↔ ∑ ( ) = P( ) (5.4)
This means that the frequency response of the impulse train p(t) is another impulse train. The
only difference is that the period of p(t) is T, whereas the period of P( ) is .
Figure 5.3: Illustration of X( ) and P( ).
Next, suppose that the signal x(t) has a frequency response X( ). We want to know the
frequency response of the output xp(t).
From the multiplication property of Fourier Transform, we have
Xp( ) = X( ) P( ) (5.5)
In chapter 4, x(t) = ∑ and X( ) = ∑
X( ) = ∑ , Where 0=
P( ) = ∑
Since convolution with an impulse simply shift a signal [i.e X( ) =
] it follows that
Consider frequency spectrum of the impulse-sampled signal Xp( ) given by
Xp( ) = ∑ (5.6)
That is Xp( ) a periodic function consisting of superposition of shifted replicas of X ( )
scaled by as illustrated in figure 5.4. In figure 5.4 (c) ( ), equivalently
and thus there is no overlap between the shifted replicas of X ( ), where as in
the figure 5.4 (d) with there is no overlap. For the case illustrated figure 5.4 (c) X
( ) is faithfully reproduced at integer multiples of the sampling frequency. Consequently,
,x(t) can be recovered exactly from xp(t) by means of a low pass filter with in gain T and a
cutoff frequency greater than and less than as indicated in the figure 5.4.
(a) Figure. 5.4 Effect in frequency domain of
sampling in time domain
(a) Spectrum of original signal;
(b) Spectrum of sampling function;
(b)
(c)
(d)
Figure. 5.4 Continued
(c) Spectrum of sampled signal with ;
(d) Spectrum of sampled signal with
This basic result, referred to as the sampling theorem, can be stated as follows
Sampling Theorem. Let x(t) be a band limited signal with = 0 for | | . Then, x(t) is
uniquely determined by its samples x(n) = x(nT ) for all integer n = 0, , , ……if
where .
The preceding inequality is known as the Nyquist condition.
Examples
1. A real valued signal is known to be uniquely determined by its samples when the
sampling frequency is = 10,000 . For what values of is guaranteed to be zero?
Solution
From valued Nyquist sampling theorem, we know that only = 0 for | | will be
signal be recoverable from its samples. Therefore, = 0 for | | .
2. A continuous time signal is obtained at the output of an ideal lowpass filter with cutoff
frequency = 1000 . If impulse train sampling is performed on which of the
following sampling periods would guarantee that can be recovered from its sampled
version using an appropriate lowpass filter?
a. T = 0.5 10-3
b. T = 2 10-3
c. T = 10-4
Solution
From the Nyquist theorem, we know that the sampling frequency in this case must be at
least = 2000 . In other words, the sampling period should be at most
T= =1 10-3. Clearly, only (a) and (c) satisfy this condition.
5.4. Signal Reconstruction
Consider a system that constructs a continuous-time signal x from a discrete-time signal y,
DiscToContT : DiscSignals → ContSignals
y: Integers Complex x: Reals Complex
DiscreteTo ContinousT
Figure 5.5: Discrete to continuous converter.
This is illustrated in figure 5.5. Systems that carry out such ‘discrete-to-continuous’
conversion can be realized in any number of ways. Some common examples are illustrated in
figure 5.6, and defined below:
zero-order hold: This means simply that the value of the each sample y(n) is held
constant for duration T , so that x(t) = y(n) for the time interval from t = nT to t = (n +
1)T , as illustrated in figure 5.6(b). Let this system be denoted
ZeroOrderHoldT : DiscSignals ContSignals:
linear interpolation: Intuitively, this means simply that we connect the dots with
straight lines. Specifically, in the time interval from t = nT to t = (n + 1)T , x(t) has
values that vary along a straight line from y(n) to y(n + 1), as illustrated in figure
5.6(c). Linear interpolation is sometimes called first-order hold. Let this system be
denoted
LinearInterpolatorT : DiscSignals ContSignals:
ideal interpolation: It is not yet clear what this should mean, but intuitively, it should
result in a smooth curve that passes through the samples, as illustrated in figure
5.6(d). We will give a precise meaning below. Let this system be denoted
IdealInterpolatorT : DiscSignals ContSignals:
Figure 5.6: A discrete-time signal (a), a continuous-time reconstruction
using zero-order hold (b), a reconstruction using linear interpolation (c),
a reconstruction using ideal interpolation (d), and a reconstruction using
weighted Dirac delta functions (e).
Probing further: Anti-Aliasing for Fonts
When rendering characters on a computer screen, it is common to use anti-
aliasing to make the characters look better. Consider the two figures
below:
At the left is an image of the Greek letter omega. At the right is the result
of sampling that rendition by taking only one pixel out of every 100 pixels
in the original (every 10-th pixel horizontally and vertically), and then
rescaling the image so it has the same size as the one on the left. The
original image is discrete, and the resulting image is a smaller discrete
image (this process is known as subsampling). Rendered with normal-
sized pixels the character on the right looks like this:
To the discerning eye, this can be improved considerably. The problem is
that the character at the upper left above has hard edges, and hence high
(spatial) frequen-cies. Those high frequencies result in aliasing distortion
when subsampling. To improve the result, we first lowpass filter the
character (blurring it), and then sub-sample, as shown below:
The result looks better to the discerning eye:
10 School of Electrical Eng. & Computing , Department of Electronics & Communication Engineering
5.5. The Effect of Under sampling
Aliasing
If a signal is sampled at less than its Nyquist rate, then it is called undersampled.
The spectrum of the sampled signal is given by,
When a signal is undersampled, i.e.,( ωs < 2ωm) where, ωs is the sampling frequency
and ωmωm is the maximum frequency component present in the signal. Then, the frequency
spectrum X(ω) of the signal x(t)x(t) is no longer replicated in the spectrum of the sampled
signal [Xs(ω)] and hence it cannot be reconstructed by a low-pass filter.
Thus, the effect in which the individual terms in the equation of Xs(ω) overlap is said to be
aliasing. This process of spectral overlap is also known as frequency folding effect.
Therefore, the phenomenon in which a high-frequency component in the frequency spectrum of
signal takes identity of a lower frequency component in the spectrum of the sampled signal is
called aliasing.
Aliasing can occur if any of the following conditions exists −
The sampling rate is very low.
The signal is not band-limited to a finite range.
In order to avoid aliasing, it should be ensured that −
ωs is greater than 2ωm.
The signal x(t)x(t) must be band-limited.
Anti-Aliasing Filter
The low-pass filter that is used for band-limiting a signal before sampling is called the anti-
aliasing filter.
Signals and Systems Analysis(ECE2204)
11 School of Electrical Eng. & Computing , Department of Electronics & Communication Engineering
As the sampling theorem states that a signal can be perfectly reconstructed from its samples only
when it is band-limited. But, in practice, no signal is completely band-limited, i.e., the signals
have frequency spectra consisting of low-frequency components together with high-frequency
noise components.
When a signal is sampled with sampling frequency (ωs), then all the signals with frequency
range higher than (ωs/2) creating aliasing. Thus, in order to avoiding the aliasing errors caused
by the undesired high-frequency signals, it is necessary to first band-limit the signal x(t) to
some appropriate frequency ωm by using the low-pass filter such that most of the energy of the
signal is retained. This low-pass filter (LPF) is commonly known as the anti-aliasing filter.
Summary
The acts of sampling and reconstructing a continuous-time signal bridge the continuous-time
world with the discrete computational world. The periodicity of frequencies in the discrete world
implies that for each discrete-time sinusoidal signal, there are multiple corresponding discrete-
time frequencies. These frequencies are aliases of one another. When a signal is sampled, these
frequencies become indistinguishable, and aliasing distortion may result. The Nyquist-Shannon
sampling theorem gives a simple condition under which aliasing distortion is avoided.
Specifically, if the signal contains no sinusoidal components with frequencies higher than half
the sampling frequency, then there will be no aliasing distortion. Half the sampling frequency is
called the Nyquist frequency because of this key result
Exercises
1. Consider the continuous-time signal x(t) = cos(10πt) +cos(20πt) +cos(30πt).
(a) Find the fundamental frequency. Give the units.
(b) Find the Fourier series coefficients A0,A1,··· and φ1,φ2,···.
(c) Let y be the result of sampling this signal with sampling frequency 10 Hz. Find the
fundamental frequency for y, and give the units.
(d) For the same y, find the discrete-time Fourier series coefficients, A0,A1,··· and φ1,···.
(e) Find w = IdealInterpolatorT (SamplerT (x)) for T = 0.1 seconds.
(f) Is there any aliasing distortion caused by sampling at 10 Hz? If there is, describe the aliasing
distortion in words.
(g) Give the smallest sampling frequency that avoids aliasing distortion.
Signals and Systems Analysis(ECE2204)
12 School of Electrical Eng. & Computing , Department of Electronics & Communication Engineering
Signals and Systems Analysis(ECE2204)