Understanding Digital Signal Processing by Orhan Gazi
Understanding Digital Signal Processing by Orhan Gazi
Orhan Gazi
Understanding
Digital Signal
Processing
Springer Topics in Signal Processing
Volume 13
Series editors
Jacob Benesty, Montreal, Canada
Walter Kellermann, Erlangen, Germany
www.TechnicalBooksPDF.com
More information about this series at http://www.springer.com/series/8109
www.TechnicalBooksPDF.com
Orhan Gazi
Understanding Digital
Signal Processing
123
www.TechnicalBooksPDF.com
Orhan Gazi
Electronics and Communication Engineering
Department
Çankaya University
Etimesgut/Ankara
Turkey
www.TechnicalBooksPDF.com
Preface
In this book, we tried to explain digital signal processing topics in detail. We paid
attention to the simplicity of the explanation language. And we provided examples
with increasing difficulty. The reader of this book should have some background
about signals. If it is possible, the reader should learn fundamental concepts on
signals and systems since, in this book, more attention is paid on digital signal
processing concepts rather than continuous time signal processing topics. Hence,
we assume that the reader has fundamental knowledge about all types of signals and
transforms.
All the topics in this book are presented in an orderly manner. We tried to
simplify the language of this book as possible as we can. We also provided original
examples explaining the aim of the subjects studied in this book. Numerical
examples are provided for the comprehension of the subjects. Unnecessary abun-
dance of mathematical details is omitted for the simplicity of the presentation
language. In addition, to indicate both continuous and digital time frequencies, we
preferred to use the same parameter. We thought that using two different parameters
mixes the students’ mind and it is not necessarily needed.
This book includes four different chapters. And in these chapters, sampling of
continuous time signals, multirate signal processing, discrete Fourier transform, and
filter design concepts are covered. In sampling of continuous time signals and
multirate signal processing chapters, we provided some original practical tech-
niques to draw the spectrum of aliased signals. In discrete time Fourier transform
chapter, well-designed numerical examples are provided to illustrate the operation
of the fast Fourier transform algorithm. In filter design chapter, both analog and
digital filter design techniques are explained in detail. For the analog filters, we also
provided analog filter circuit design methods for the designed analog filter transfer
function.
www.TechnicalBooksPDF.com
Contents
vii
www.TechnicalBooksPDF.com
viii Contents
www.TechnicalBooksPDF.com
Contents ix
www.TechnicalBooksPDF.com
Chapter 1
Sampling of Continuous Time Signals
www.TechnicalBooksPDF.com
2 1 Sampling of Continuous Time Signals
Let xc ðtÞ be a continuous time signal. We take samples from the amplitudes of this
signal at every multiple of Ts which is called sampling period and form a mathe-
matical sequence. The obtained mathematical sequence is called digital signal.
The sampling operation is described by the formula
which is a digital signal obtained from a continuous time signal. The obtained
mathematical sequence can also be displayed graphically as in Fig. 1.4.
www.TechnicalBooksPDF.com
1.1 Sampling Operation for Continuous Time Signals 3
x[n]
c i
b h
a d 0 j
n
6 5 4 3 2 1 g 1 2 3 4 5 6
k
e l
f
www.TechnicalBooksPDF.com
4 1 Sampling of Continuous Time Signals
2 3
6 7
6 2p p 0p 2p 7
x½n ¼ 6. . . sin sin sin sin . . .7: ð1:4Þ
4 3 3 3 3 5
|fflffl{zfflffl}
n¼0
Example 1.1 Find the frequency and period of the continuous time signal
xc ðtÞ ¼ cosð2ptÞ. Sample the given continuous time signal with sampling period
Ts = 1/8 s and obtain the digital signal x½n.
Solution 1.1 If xc ðtÞ ¼ cosð2ptÞ is compared to the general form of cosine signal
cosð2pftÞ, it is seen that the frequency of xc ðtÞ is f = 1 Hz which can be used to find
the period of the signal using T ¼ 1=f leading to T = 1 s. The sampling operation
for xc ðtÞ ¼ cosð2ptÞ with sampling period Ts = 1/8 s is done as
www.TechnicalBooksPDF.com
1.1 Sampling Operation for Continuous Time Signals 5
Example 1.2 The continuous time signal xc ðtÞ ¼ cosð2pftÞ where f ¼ 1 kHz is
sampled with sampling frequency fs ¼ 16 kHz, and the digital signal x½n ¼ xc ðnTs Þ
is obtained. According to the given information, find
(a) The number of samples taken from one period of the continuous time signal.
(b) The number of samples taken per-second from continuous time signal.
Solution 1.2 The number of samples taken per-second from continuous time signal
equals the sampling frequency, i.e., fs ¼ 16000 samples are taken per-second. Since
the period of the continuous time signal is T ¼ 1 kHz
1
! T ¼ 1 ms, the number of
samples taken from one period of the signal is 16000 1 ms ! 16 samples.
Impulse Train
Impulse train function is one of the most widely used mathematical expression
appearing in sampling operation. For this reason, we will first inspect the impulse
train function in details. The impulse train function is given as
X
1
sðtÞ ¼ dðt nTs Þ ð1:6Þ
n¼1
where Ts is the sampling period. The graph of impulse train function is given in
Fig. 1.5.
Continuous time periodic signals have Fourier series representation. Impulse train
signal (function) also has Fourier series representation which can be written as
X
1
2p
sðt Þ ¼ S½k ejkTs t ð1:7Þ
k¼1
s (t )
t
5Ts 4Ts 3Ts 2Ts Ts 0 Ts 2Ts 3Ts 4Ts 5Ts
www.TechnicalBooksPDF.com
6 1 Sampling of Continuous Time Signals
where S½k are the Fourier series coefficients which are calculated using
1 X 1
sðtÞejkTs t dt:
2p
S½k ¼ ð1:8Þ
Ts k¼1
Let’s now calculate the Fourier series coefficients of impulse train. Using (1.8)
the Fourier series coefficients of the impulse train function can be calculated as
1 1 Z 1 1
dðtÞejkTs t dt ! S½k ¼ e0 ! S½k ¼
2p
S½k ¼ ð1:9Þ
Ts 1 Ts Ts
Replacing the calculated coefficients in (1.8) we get the Fourier series repre-
sentation of the impulse train as
1 X 1
2p
sðt Þ ¼ ejkTs t ð1:10Þ
Ts k¼1
Using the Fourier series representation of the impulse train function, we can
calculate its Fourier transform. For this purpose, we first need to know the Fourier
transform of the exponential function. The Fourier transform of the exponential
function is given as
FT
ejw0 t $ 2pdðw w0 Þ: ð1:11Þ
When the expression in (1.11) is used while taking the Fourier transform of
(1.10), we obtain the Fourier transform of the impulse train
2p X 1
2p
SðwÞ ¼ dðw kws Þ; ws ¼ : ð1:12Þ
Ts k¼1 Ts
The first step in sampling operation is to multiply the continuous time signal to be
sampled by an impulse train. This multiplication operation for the sampling of sine
signal is depicted in Fig. 1.6.
When the continuous time signal xc ðtÞ is multiplied by the impulse train sðtÞ; we
obtain
in which, if the explicit expression for the impulse train is inserted we get the
mathematical expression
www.TechnicalBooksPDF.com
1.2 Sampling Operation 7
xs (t ) xc (t ) s (t )
xs (t ) xc (t ) s (t )
X
1
xs ð t Þ ¼ xc ð t Þ dðt nTs Þ ð1:14Þ
n¼1
which can be simplified using the impulse function property R f ðtÞdðt t0 Þdt ¼
f ðt0 Þ as
X
1
xs ðt Þ ¼ xc ðnTs Þdðt nTs Þ ð1:15Þ
n¼1
X
1
xs ð t Þ ¼ x½ndðt nTs Þ ð1:16Þ
n¼1
We obtained the time domain expression for the product signal xs ðtÞ. Let’s now
consider the Fourier transform of the product signal xs ðtÞ. The Fourier transform of
xs ðtÞ is computed using
www.TechnicalBooksPDF.com
8 1 Sampling of Continuous Time Signals
Z1
Xs ðwÞ ¼ xs ðtÞejwt dt !
1
ð1:17Þ
Z1 X
1
Xs ðwÞ ¼ x½ndðt nTs Þejwt dt
n¼1
1
on which by using the impulse function properties for the calculation of the inte-
gration, Fourier transform of the product signal is obtained as
X
1
Xs ðwÞ ¼ x½nejwnTs : ð1:19Þ
n¼1
The right hand side of the (1.19) contains parameters from time domain.
However, there is not only one single expression for the Fourier transform of the
product signal. We can find an alternative expression for the Fourier transform of
product signal. Let’s now find an alternative expression for the Fourier transform of
product signal where both left and right sides only include expressions in frequency
domain. Consider the product signal expression again
where the right hand side is the product of two expressions, for this reason, the
Fourier transform of xs ðtÞ can be written as
1
Xs ðwÞ ¼ Xc ðwÞ SðwÞ: ð1:21Þ
2p
1 2p X 1
Xs ðwÞ ¼ Xc ðwÞ dðw kws Þ ð1:22Þ
2p Ts k¼1
where by using the impulse function property and linearity of the convolution
operation we obtain
1 X 1
Xs ðwÞ ¼ Xc ðw kws Þ: ð1:23Þ
Ts k¼1
www.TechnicalBooksPDF.com
1.2 Sampling Operation 9
X
1
1 X 1
X s ð wÞ ¼ x½nej2pnTs Xs ðwÞ ¼ Xc ðw kws Þ: ð1:24Þ
n¼1
Ts k¼1
In these expressions the left hand sides are both Xs ðwÞ. So the right hand sides
should also be equal to each other. Equating the right hand sides of the expressions
in (1.24), we obtain the equation
X
1
1 X 1
x½nejwnTs ¼ Xc ðw kws Þ: ð1:25Þ
n¼1
Ts k¼1
X
1
Xn ðwÞ ¼ x½nejwn
n¼1
which resembles to the left term in (1.25). We can write the left hand side of (1.25)
in terms of Xn ðwÞ as
X
1
1 X 1
x½nejwnTs ¼ Xc ðw kws Þ ð1:26Þ
n¼1
Ts k¼1
|fflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflffl}
Xn ðwTs Þ
which yields
1 X 1
Xn ðwTs Þ ¼ Xc ðw kws Þ ð1:27Þ
Ts k¼1
In the expression (1.28) the left hand side represents the Fourier transform of the
digital signal obtained from an analog signal via sampling operation. In other
words, it represents the Fourier transform of the mathematical sequence obtained
from analog signal via sampling operation. The right hand side consists of shifted
and scaled replicas of Xc ðwÞ which is the Fourier transform of analog signal on
which sampling operation is performed. Since Xn ðwÞ is the Fourier transform of a
digital signal, it is periodic with period 2p. If the digital signal is also periodic in
www.TechnicalBooksPDF.com
10 1 Sampling of Continuous Time Signals
time domain, then its Fourier transform is periodic with period 2p consisting of
impulses spaced by multiples of 2p.
Now, let’s summarize the formulas we have derived up to this point.
In Time Domain
Continuous time signal xc ðtÞ
Sampling operation x½n ¼ xc ðnTs Þ
Sampling period Ts P
Impulse train sðt Þ ¼ 1 n¼1 dðt nTs Þ
Product signal xs ðtÞ ¼ xPc ðtÞ sðt Þ
Product signal xs ð t Þ ¼ 1 x ðnT Þdðt nTs Þ
Pk¼1 c s
Product signal xs ð t Þ ¼ 1 k¼1 x½ndðt nTs Þ
In Frequency Domain
R1
Fourier transform of product function xs ðtÞXs ðwÞ ¼ 1 xs ðtÞejwt dt
Fourier transform of product function xs ðtÞXs ðwÞ ¼ 2p
1
Xc ðwÞ SðwÞ
Sampling frequency in rad/sec ws ¼ T s
2p
P
Fourier transform of product function xs ðtÞXs ðwÞ ¼ T1s 1 k¼1 Xc ðw kws Þ
P1
Fourier transform of x½n digital signalXn ðwÞ ¼ n¼1 x½nejwn
P
Fourier transform of x½n digital signalXn ðwÞ ¼ T1s 1 X w
kw
k¼1 c Ts s
3:5 4 5 6 3 2
2 |{z}
Exercise: Given the digital signal x½n ¼
n¼0
draw the graphs of
P
(a) yðtÞ ¼ 1 x½ndðt nTs Þ where Ts = 1/4 s.
Pn¼1
1
(b) gðtÞ ¼ n¼1 x½2ndðt nTs Þ where Ts = 1/8 s.
P
(c) hðtÞ ¼ 1 n¼1 x½n=2dðt nTs Þ where Ts = 1/4 s.
and
www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 11
1 X 1
Xs ðwÞ ¼ Xc ðw kws Þ ð1:29Þ
Ts k¼1
which is a periodic function and one period of this function around the origin,
assuming no overlapping among shifted replicas, can be written as
1
Xc ðwÞ: ð1:30Þ
Ts
X1 ðwÞ þ X2 ðwÞ ¼ 2:
w
0 4
www.TechnicalBooksPDF.com
12 1 Sampling of Continuous Time Signals
X 1 ( w) X2 ( w) X 1 ( w) X 2 ( w)
2 2
w w
0 4 0 4
w
0 4
X1 ðwÞ þ X2 ðwÞ ¼ a þ b
www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 13
X1 (w) X 2 (w)
X 1 ( w) X 2 ( w)
a b
a
w w
0 4 0 4
a
X 1 ( w)
X 2 ( w)
b
w
0 4
Solution 1.5 We can follow the same steps as in the previous two examples. The
line equations of X1 ðwÞ and X2 ðwÞ can be written as
X1 ðwÞ þ X2 ðwÞ ¼ a þ b:
The obtained result is depicted in Fig. 1.12. We will use this result to draw the
graphs of the digital signals having the spectral overlapping problem.
Example 1.6 xc ðtÞ is a continuous time signal and its Fourier transform is denoted
by Xc ðwÞ. The graph of Xc ðwÞ is depicted in Fig. 1.13. As it is seen from the Fourier
transform graph, xc ðtÞ is a low-pass signal with bandwidth wN .
Let xs ðtÞ ¼ xc ðtÞ sðtÞ where sðtÞ is the impulse train signal. Draw the Fourier
transform of xs ðtÞ assuming that ws [ 2wN , i.e., draw Xs ðwÞ.
www.TechnicalBooksPDF.com
14 1 Sampling of Continuous Time Signals
X1 (w) X 2 (w)
a b
a
X 1 ( w)
X 2 ( w)
b
w w
0 4 0 4
w
wN 0 wN
1 X 1
Xs ðwÞ ¼ Xc ðw kws Þ
Ts k¼1
1 1 1
Xs ðwÞ ¼ þ Xc ðw þ ws Þ þ Xc ðwÞ þ Xc ðw ws Þ þ
Ts Ts Ts
where the graphs of the terms T1s Xc ðwÞ; T1s Xc ðw þ ws Þ, and T1s Xc ðw ws Þ are
depicted in Fig. 1.14.
The other shifted and scaled replicas can be drawn in a similar manner as in
Fig. 1.14. When the shifted and scaled replicas are summed, we obtain the graphic
of Xs ðwÞ as depicted in Fig. 1.15.
Example 1.7 xc ðtÞ is a continuous time signal and its Fourier transform Xc ðwÞ is
depicted in Fig. 1.16. xc ðtÞ is sampled by the sampling period Ts ¼ 2000
1
s. Draw the
graph of Xs ðwÞ
www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 15
1
Xc ( w)
Ts
A
Ts
w
wN 0 wN
1
Xc (w ws )
Ts
A
Ts
w
0 ws wN ws ws wN
1
Xc (w ws )
Ts
A
Ts
w
ws wN ws ws wN 0
Xs (w)
A
Ts
w
ws wN ws ws wN wN 0 wN ws wN ws ws wN
2p
ws ¼
! ws ¼ 4000p rad=s
Ts
The shifted Xc ðwÞ signals by multiples of ws are shown in Fig. 1.17.
As it is clear from Fig. 1.17, shifted replicas overlap. Summing the overlapped
amplitudes, we obtain the signal shown in Fig. 1.18.
www.TechnicalBooksPDF.com
16 1 Sampling of Continuous Time Signals
X c (w)
2000 4000
w
10000 8000 6000 4000 2000 2000 4000 6000 8000 10000 12000
w
2
1
10000 8000 6000 4000 2000 2000 4000 6000 8000 10000 12000
w
In the last stage, we divide the amplitudes of the summed signal shown in
Fig. 1.18 by Ts . Since Ts ¼ 2000
1
dividing the amplitudes by Ts equals to multiplying
the amplitudes by 2000. After multiplying the amplitudes by 2000 we obtain the
graphic of the function Xs ðwÞ as depicted in Fig. 1.19.
www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 17
X s (w)
4000
2000
10000 8000 6000 4000 2000 2000 4000 6000 8000 10000 12000
w
w
0
1000 1000
Example 1.8 The graphic of Xc ðwÞ is shown in Fig. 1.20. Draw the graphic of
X
1
Xs ðwÞ ¼ 250 Xc ðw k500pÞ
k¼1
X
1
Xs ðwÞ ¼ 250 Xc ðw k500pÞ
k¼1
it is seen that the sampling frequency in rad/sec is ws ¼ 500p rad=s. Let’s
partition the horizontal axis of Xc ðwÞ as in Fig. 1.21 considering the sampling
frequency value.
Now let’s draw the shifted Xc ðwÞ signals as shown in Fig. 1.22.
The graphs of Xc ðwÞ, Xc ðw ws Þ and Xc ðw þ ws Þ altogether are given in
Fig. 1.23.
More shifted graphs of Xc ðwÞ are given in Fig. 1.24.
If the above graph is carefully inspected, it is seen that a portion of the graph
repeats itself along the horizontal axis. The repeated part is indicated by bold lines
in Fig. 1.25.
Now let’s write the mathematical equations for the line segments, a, b, c, d, e, f,
g, h appearing in the repeating pattern in Fig. 1.25 as
www.TechnicalBooksPDF.com
18 1 Sampling of Continuous Time Signals
0 w
1000 500 250 250 500 1000
w
1000 500 250 250 500 1000
X c (w)
X c (w 500 )
1
w
1000 500 250 250 500 1000
w
1000 500 250 250 500 1000
www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 19
1
m¼ 250p w 250p
1000p
1 1
ya ¼ mw þ 1 yb ¼ mw þ 1 yc ¼ mw þ yd ¼ mw þ
2 2
1 1
ye ¼ mw þ yf ¼ mw þ yg ¼ mw yh ¼ mw:
2 2
If we sum the equations for the line segments, a, c, e, g and b, d, f, g we get the
results
ya þ yc þ ye þ yg ¼ 2 yb þ yd þ yf þ yg ¼ 2:
w
0
1000 1000
www.TechnicalBooksPDF.com
20 1 Sampling of Continuous Time Signals
500
w
1000 0 1000
X
1
Xs ðwÞ ¼ 250 Xc ðw k500pÞ
k¼1
it is sufficient to multiply the amplitude values of the signal depicted in Fig. 1.26.
After amplitude multiplication, we obtain the graph of Xs ðwÞ as depicted in
Fig. 1.27.
Example 1.9 The graphic of Xc ðwÞ is shown in Fig. 1.28. Draw the graphic of
1 X 1
2p
Xs ðwÞ ¼ Xc w k
Ts k¼1 Ts
for Ts ¼ 375
1
s.
Solution 1.9 We can write the sampling frequency in rad=san unit as
ws ¼ 2pTs ! ws ¼ 750prad=s. In the next step, we shift the function Xc ðwÞ to the left
and right by kws ; k 2 Z. Some shifted replicas of Xc ðwÞ are displayed in Fig. 1.29.
If the graph in Fig. 1.29 is inspected carefully, it can be seen that a define pattern
repeats itself along the shape. The repeating pattern is indicated in bold lines in
Fig. 1.30.
The repeating pattern in Fig. 1.30 is redrawn alone in Fig. 1.31 in details.
w
1000 500 250 250 500 1000
www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 21
w
1000 750 500 250 250 500 750 1000
w
1000 500 250 250 500 1000
If the graphic in Fig. 1.31 is inspected carefully, it is seen that the line pairs in
the upper left and upper right shadowed rectangles overlap each other and their
slopes are equal in magnitude but opposite in sign. For this reason, the sum of the
line equations for line pairs is a constant number and it equals to 1 + 4 = 5. After
summing the overlapping line equations, we get the graphic in Fig. 1.32.
If the triangle shape and horizontal line in Fig. 1.32 are summed, we get the
graphic in Fig. 1.33.
The graphic shown in Fig. 1.33 corresponds to one period of the function Xs ðwÞ
around origin. If one period of Xs ðwÞ around origin is shifted to the right and left by
multiples of ws ¼ 750p and shifted replicas are all summed together with the graph
around origin, we get the graphic of Xs ðwÞ as in Fig. 1.34.
Solution 2 In fact, the second solution provided here is more complex than the first
solution. However, we find it useful to illustrate the different perspectives for the
solution of a problem.
The repeating pattern chosen in solution can be interpreted in a different manner.
In fact, the interpretation of the repeating patterns depends on the reader’s
www.TechnicalBooksPDF.com
22 1 Sampling of Continuous Time Signals
www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 23
perception. The overlapped lines in the repeating pattern are shown inside circles in
Fig. 1.35 in a different approach than the one in solution 1.
In Fig. 1.35 the sum of the overlapped lines inside circles results in constant
numbers, and when the constants are added to the top triangle shape, we obtain one
period of Xs ðwÞ around origin. This is illustrated in Fig. 1.36.
When the obtained one period around the origin is shifted to the left and right,
we obtain Xs ðwÞ function in Fig. 1.37.
Exercise: The graphic of Xc ðwÞ function is depicted in Fig. 1.38. Using the
given figure draw the graph of
www.TechnicalBooksPDF.com
24 1 Sampling of Continuous Time Signals
Fig. 1.36 The sum of the overlapped lines inside circles in repeating pattern
Xs ( w )
6
5
w
500 250 250 500
w
1000 0 500 1000
www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 25
X
1
Xs ðwÞ ¼ 500 Xc ðw k1000pÞ:
k¼1
X
1
Xs ðwÞ ¼ 200 Xc ðw k400pÞ:
k¼1
Assume that Xn ðwÞ is the Fourier transform of x½n which is obtained from xc ðtÞ via
sampling operation, i.e., x½n ¼ xc ðtÞjt¼nTs ! x½n ¼ xc ðnTs Þ and the mathematical
expression for Xn ðwÞ is given as
1 X 1
w
Xn ðwÞ ¼ Xc kws : ð1:31Þ
Ts k¼1 Ts
To draw the graph of Xn ðwÞ two different methods can be followed. Below, we
explain these two methods separately.
Method 1: First draw the graph of Xs ðwÞ, i.e., draw the Fourier transform of the
product signal xs ðtÞ ¼ xc ðtÞsðtÞ as discussed in the previous section. Once you have
the graph of Xs ðwÞ, to get the graph of Xn ðwÞ, multiply the horizontal axis of Xs ðwÞ
by sampling period Ts .
Method 2: Since Xn ðwÞ is the Fourier transform of the digital signal x½n, it is a
its period equals 2p. To draw the graph of Xn ðwÞ; first draw the
periodic signal and
graph of T1s Xc w
Ts around origin, then shift the drawn signal to the left and right by
multiples
of 2p, and sum the shifted replicas. Note that to draw the graph of
Ts Xc Ts ; we multiply the amplitude values of Xc ðwÞ by 1=Ts and multiply hori-
1 w
zontal axis of Xc ðwÞ by Ts , i.e., divide the horizontal axis of Xc ðwÞ by 1=Ts .
Let’s now provide some examples to comprehend the subject better.
Example 1.10 The Fourier transform of a continuous time signal xc ðtÞ is depicted in
Fig. 1.39. Draw Xn ðwÞ, the Fourier transform of x½n ¼ xc ðnTs Þ where Ts is the
sampling period. Assume that ws [ 2wN .
www.TechnicalBooksPDF.com
26 1 Sampling of Continuous Time Signals
X c ( w)
w
wN 0 wN
X s (w)
A
Ts
w
ws wN ws ws wN wN 0 wN ws wN ws ws wN
Solution 1.10
Method 1: Let’s first draw the graph of
1 X 1
Xs ðwÞ ¼ Xc ðw kws Þ
Ts k¼1
Xn (w)
A
Ts
w
Ts ws Ts wN 2 Ts ws Ts wN Ts wN 0 Ts wN Ts ws Ts wN 2 Ts ws Ts wN
www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 27
1 w
Xc ( )
Ts Ts
A
Ts
w
Ts wN 0 Ts wN
1 w
Fig. 1.42 The graph of Ts Xc Ts
xc ðtÞ ¼ cosð4000ptÞ:
Solution 1.11 Before computing the Fourier transform of the given cosine signal,
let’s review some properties of the exponential signal. The Fourier transform of an
exponential signal is given as
FT
ejwN t ! 2pdðw wN Þ ð1:32Þ
www.TechnicalBooksPDF.com
28 1 Sampling of Continuous Time Signals
and sine and cosine signals can be written in terms of the exponential signals as
1 þ jwN t
1
FT p
sinðwN tÞ ! ðdðw wN Þ dðw þ wN ÞÞ
j ð1:34Þ
FT
cosðwN tÞ ! pðdðw wN Þ þ dðw þ wN ÞÞ:
(a) Since we refreshed some background information we can start to solve our
problem. The Fourier transform of xc ðtÞ ¼ cosð4000ptÞ can be calculated as
www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 29
FT
cosð4000ptÞ ! pðdðw 4000pÞ þ dðw þ 4000pÞÞ
1 X 1
Xs ðwÞ ¼ Xc ðw kws Þ
Ts k¼1
X
1
Xs ðwÞ ¼ 8000 Xc ðw k16000pÞ !
k¼1
X1
Xs ðwÞ ¼ 8000p ðdðw 4000p k16000pÞ þ dðw þ 4000p k16000pÞÞ
k¼1
Xc (w)
w
4000 4000
Xs (w)
8000
w
16000 4000 4000 16000
www.TechnicalBooksPDF.com
30 1 Sampling of Continuous Time Signals
(c) To get the graph of Xn ðwÞ; it is sufficient to multiply the horizontal axis of
Xs ðwÞ by Ts . Thus, the graph of Xn ðwÞ is obtained as in Fig. 1.46.
Let the Fourier transform of a continuous time signal be as given as in Fig. 1.47.
Using the Fourier transform in Fig. 1.47, let’s draw the graph of
1 X 1
Xs ðwÞ ¼ Xc ðw kws Þ ð1:35Þ
Ts k¼1
as in Fig. 1.48.
It is clear from Fig. 1.48 that the condition for the shifted graphs not to overlap
can be written as
ws w1 [ w2 ! ws [ w1 þ w2 ð1:36Þ
and if w1 \w2 then no aliasing condition in (1.36) can also be written as ws [ 2w2 .
If ws \w1 þ w2 , then the shifted graphs overlap and this condition is named as
aliasing (overlapping). The case of aliasing is depicted in Fig. 1.49.
www.TechnicalBooksPDF.com
1.4 Aliasing (Spectral Overlapping) 31
For many signals the Fourier transform is symmetric with respect to the vertical
axis, i.e., w1 ¼ w2 . And for the symmetric case, let w1 ¼ w2 ¼ wN and the con-
dition for no aliasing in this case can be stated as
ws [ 2wN ð1:37Þ
where the unit of the frequencies is rad/sec. If we write the explicit expressions for
the frequencies in (1.37), we get
2p 2p
[2 ð1:38Þ
Ts TN
and the condition for no aliasing can be written as fs [ 2fN . This means that for no
aliasing, the sampling frequency in unit of Hertz should be greater than twice of the
highest frequency available in the signal.
www.TechnicalBooksPDF.com
32 1 Sampling of Continuous Time Signals
1 X 1
Xs ðwÞ ¼ jXc ðw kws Þj ð1:39Þ
Ts k¼1
is drawn.
Example 1.12 The Fourier transform of continuous time signal is shown in
Fig. 1.50. Draw the Fourier transform of the product signal xs ðtÞ ¼ xc ðtÞsðtÞ and
decide on the aliasing case.
P
Solution 1.12 The graph of Xs ðwÞ ¼ T1s 1 k¼1 Xc ðw kws Þ is depicted in
Fig. 1.51.
It is clear from Fig. 1.51 that for no overlapping, we should have
ws wN [ wN ð1:40Þ
leading to
ws [ 2wN ð1:41Þ
X s (w)
A
Ts
w
ws wN ws ws wN wN 0 wN ws wN ws ws wN
www.TechnicalBooksPDF.com
1.4 Aliasing (Spectral Overlapping) 33
Sampling frequency implies the number of samples taken per-second from a con-
tinuous time signal. The collected samples are either transmitted, stored, or pro-
cessed, and the analog signal can be reconstructed from the digital samples.
If sampling frequency is not high enough, the analog signal cannot be recon-
structed due to insufficient number of received samples or it can only be partially
reconstructed. In frequency domain, the effect of insufficient number of samples is
seen as aliasing or spectral overlapping.
Example 1.13 The continuous time signal xc ðtÞ ¼ cosð20ptÞ þ sinð40ptÞ is to be
sampled. Choose a sampling frequency such that no aliasing occurs for the gen-
erated digital signal in frequency domain.
Solution 1.13 Let’s first calculate the Fourier transform of the continuous
time signal. For this purpose, the Fourier transforms of sinusoidal signals are
reminded as
FT
cosðw0 tÞ $ pðdðw w0 Þ þ dðw þ w0 ÞÞ
FT p
sinðw0 tÞ $ ðdðw w0 Þ dðw þ w0 ÞÞ
j
where substituting w0 ¼ 2pf0 ; w ¼ 2pf , we get the alternative form for the Fourier
transform of the sinusoidal signals as
1 FT
cosð2pf0 tÞ $ ðdðf f0 Þ þ dðf þ f0 ÞÞ
2
FT 1
sinð2pf0 tÞ $ ðdðf f0 Þ dðf þ f0 ÞÞ
2j
While obtaining the alternative forms, we made use of the property
1
dð2pðf f0 ÞÞ ¼ dðf f0 Þ: ð1:43Þ
2p
Using the Fourier transform formulas for the sinusoidal signals, we can calculate
the Fourier transform of the continuous time signal given in the example and plot its
graph as in Fig. 1.52.
www.TechnicalBooksPDF.com
34 1 Sampling of Continuous Time Signals
X c (w)
w
40 20 0 20 40
The Fourier transform of the summed sinusoids given in Fig. 1.52 seems to be
complex to judge although not impossible. For easiness of the illustration, let’s take
the absolute value of the Fourier transforms and depict them as in Fig. 1.53.
As it is seen from Fig. 1.53 that the highest frequency available in the contin-
uous time signal xc ðtÞ is 40p rad/s or 20 Hz and the lowest positive frequency is 0.
The analog signal is a low pass signal. The sampling frequency preventing aliasing
should satisfy
ws [ 2 40p
www.TechnicalBooksPDF.com
1.4 Aliasing (Spectral Overlapping) 35
fs [ 2 20 Hz ! fs [ 40 Hz
Example 1.14 If x½n ¼ xc ðnTs Þ then the Fourier transform of x½n is written as
1 X 1
w
Xn ðwÞ ¼ Xc kws ð1:44Þ
Ts k¼1 Ts
where Xc ðwÞ is the Fourier transform of continuous time signal xc ðtÞ. The Fourier
transform of the digital signal x½n can also be calculated using the Fourier trans-
form formula directly, i.e.,
X
1
Xn ðwÞ ¼ x½nejwn ð1:45Þ
n¼1
Z1 Z1
jwt 1
X c ðw Þ ¼ xc ðtÞe dt xc ð t Þ ¼ Xc ðwÞejwt dw:
2p
1 1
If the time parameter ‘t’ is replaced by ‘nTs’ in inverse Fourier transform
expression, we get
Z1
1
xc ðnTs Þ ¼ Xc ðwÞejwnTs dw: ð1:46Þ
2p
1
For the digital signal x½n, we have the Fourier transform expression
X
1
Xn ðwÞ ¼ x½nejwn ð1:47Þ
n¼1
X
1
Xn ðwÞ ¼ xc ðnTs Þejwn : ð1:48Þ
n¼1
www.TechnicalBooksPDF.com
36 1 Sampling of Continuous Time Signals
X1
1 1Z
Xn ðwÞ ¼ Xc ðkÞejknTs dkejwn ð1:49Þ
n¼1
2p 1
1 X 1 1
Z
Xn ðwÞ ¼ X c ð kÞ ejðwkTs Þn dk ð1:50Þ
2p n¼1 1
1 1Z
X1
Xn ðwÞ ¼ Xc ðkÞ ejðwkTs Þn dk ð1:51Þ
2p 1 n¼1
X
1 X
1
ejðwkTs Þn ¼ 2p dðw kTs k2pÞ ð1:52Þ
n¼1 k¼1
w 2p
dðw kTs k2pÞ ¼ d Ts kk
Ts Ts
ð1:53Þ
1 w 2p
¼ d kk
Ts Ts Ts
X
1
2p X 1
w 2p
ejðwkTs Þn ¼ d kk ð1:54Þ
n¼1
Ts k¼1 Ts Ts
in which the integration expression can be simplified using the impulse function
property
1
Z
Xc ðkÞdðk0 kÞdk ¼ Xc ðk0 Þ ð1:57Þ
1
www.TechnicalBooksPDF.com
1.4 Aliasing (Spectral Overlapping) 37
t
T T
as follows
1 1Z w 2p 1 w 2p
Xc ðkÞd kk dk ¼ Xc k ð1:58Þ
2p 1 Ts Ts 2p Ts Ts
Finally, when (1.58) is used in (1.56), we get the desired final expression as
1 X 1
w 2p
Xn ðwÞ ¼ Xc k : ð1:59Þ
Ts k¼1 Ts Ts
1 Z
x ½ n ¼ Xn ðwÞejwn dw: ð1:60Þ
2p 2p
Starting from the right hand side of (1.60) and replacing Xn ðwÞ in (1.60) by
(1.59) obtain the left hand side of (1.60).
Example 1.15 The time domain signal given in Fig. 1.54 is to be sampled.
Determine the sampling frequency such that the digital signal contains sufficient
information about analog signal and analog signal can be reconstructed from the
digital samples.
Solution 1.15 To determine the sampling frequency, we need to know the largest
and smallest positive frequencies available in the signal spectrum. For this purpose,
we calculate the Fourier transform of the continuous time signal and determine the
largest and smallest positive frequencies available in the signal spectrum. The
Fourier of the continuous time signal is computed as
www.TechnicalBooksPDF.com
38 1 Sampling of Continuous Time Signals
X c (w)
2T
w
0
5 4 3 2 2 3 4 5
T T T T T T T T T T
1
Z
X c ðw Þ ¼ xc ðtÞejwt dt
1
ZT
¼ 1ejwt dt
T
ejwT
ejwT
¼
jw
2 sinðwT Þ
¼
w
The graph of the Fourier transform is depicted in Fig. 1.55. Since
0
Xc ð0Þ ¼
0
the value of the Fourier transform at origin can be computed using the L’Hôpital’s
rule. If we take the derivatives of numerator and denominator of Xc ðwÞ w.r.t w and
evaluate it for w ¼ 0, we obtain
dXc ðwÞ 2TcosðwT Þ dXc ðwÞ
¼ ! dw ¼ 2T
dw w¼0 1 w¼0 w¼0
www.TechnicalBooksPDF.com
1.4 Aliasing (Spectral Overlapping) 39
4p
ws [ 2wN ! ws [ 2
T
8p 2p 8p T
ws [ ! [ ! Ts \
T Ts T 4
4
fs [
T
Let’s assume that the sampling period is chosen as Ts ¼ T8 . This means that we
T ¼ 16 samples from rectangle signal per second. And these 16 samples are
take 2T
8
sufficient for reconstruction of the rectangle signal.
fs \2wN
where wN is the bandwidth of the low pass analog signal, then aliasing occurs in
Fourier transform of the digital signal x½n, i.e., in graph of Xn ðwÞ. The relations
between digital signal and continuous time signal in time and frequency domains
are as
www.TechnicalBooksPDF.com
40 1 Sampling of Continuous Time Signals
w
wN 0 wN
1 w
Fig. 1.57 Graph of Ts Xc Ts
The graph of
Fig. 1.58
1 w
Ts Xc Ts
If the shadowed triangles ‘A’ and ‘B’ in Fig. 1.58 are shifted to the right and left
by 2p, we obtain the graphic in Fig. 1.59.
If the overlapping lines in Fig. 1.59 are summed, we obtain the graphic shown in
bold lines in Fig. 1.60. As it is clear from Fig. 1.60, due to the overlapping regions
the original signal is spectrum is destroyed.
www.TechnicalBooksPDF.com
1.4 Aliasing (Spectral Overlapping) 41
www.TechnicalBooksPDF.com
42 1 Sampling of Continuous Time Signals
Fig. 1.61 The resulting graph after summing the overlapping lines
Step 3: The portion of the graph denoted by ‘A’ in Step 2 is shifted to the right by
2p, and the portion denoted by ‘B’ is shifted to the left by 2p. The overlapping lines
are summed and one period of Xn ðwÞ around origin is obtained. Let’s denote this
one period by Xn1 ðwÞ.
Step 4: In the last step, one period of Xn ðwÞ around origin denoted by Xn1 ðwÞ is
shifted to the left and right by multiples of 2p and all the shifted replicas are
summed to get Xn ðwÞ, this is mathematically stated as
X
1
Xn ðwÞ ¼ Xn1 ðw k2pÞ:
k¼1
Example 1.16 The Fourier transform of continuous time signal xc ðtÞ is shown in
Fig. 1.62. This signal is sampled and digital signal x½n ¼ xc ðtÞjt¼nTs ! x½n ¼
xc ðnTs Þ, Ts ¼ 1=64 is obtained. Draw the graph of the Fourier transform digital
signal, i.e., draw the graph of Xn ðwÞ.
Solution 1.16
1 w
Step 1: First we draw the graph of Ts Xc Ts , for this purpose, we multiply the
horizontal axis of Xc ðwÞ in Fig. 1.62 by Ts ¼ 1=64 and multiply the vertical axis of
Xc ðwÞ in Fig. 1.62 by 1=Ts ¼ 64. The resulting graph is shown in Fig. 1.63.
www.TechnicalBooksPDF.com
1.4 Aliasing (Spectral Overlapping) 43
The graph of
Fig. 1.63
1 w
Ts Xc Ts
The graph of
Fig. 1.64
1 w
Ts Xc Ts
The graph in Fig. 1.63 is drawn more in details as in Fig. 1.64 where we see that
extends to the outside of the (p; p) interval. And in fact, the parts of the
the graph
1 w
Ts Xc Ts extending beyond (p; p) cause the spectral overlapping problem due to
the 2p periodicity of Xn ðwÞ:
Step 2: We shadow the portion of the graphs outside the ðp; pÞ interval and denote
them by the letters ‘A’ and ‘B’, we obtain the graph in Fig. 1.65.
If the shadowed portions labelled by ‘A’ and ‘B’ are shifted to the right and to the
left by 2p, we obtain the graph in Fig. 1.66.
In Fig. 1.66, we can write the equations of the overlapping lines for the interval
ðp; 3p=4Þ as 1283p w þ 64 and 5p w 5 , and when these two equations are
256 192
www.TechnicalBooksPDF.com
44 1 Sampling of Continuous Time Signals
15p
128
w þ 128
3 . After summing the overlapping line equations, we can draw one
period of Xn ðwÞ around origin as in Fig. 1.67.
Step 3: In the last step, we shift one period of Xn ðwÞ around origin to the left and
right by multiples of 2p and summing all the non-overlapping shifted replicas, we
obtain the graph of Xn ðwÞ.
Exercise: The Fourier transform of a continuous time signal xc ðtÞ is depicted in
Fig. 1.68.
This signal is sampled with sampling period Ts ¼ 1=32 and digital signal x½n is
obtained. Draw the Fourier transform of x½n.
Exercise: The Fourier transform of a continuous time signal xc ðtÞ is depicted in
Fig. 1.69.
This signal is sampled with sampling period Ts ¼ 1=32 and digital signal x½n is
obtained. Draw the Fourier transform of x½n.
www.TechnicalBooksPDF.com
1.5 Reconstruction of an Analog Signal from Its Samples 45
To obtain a digital signal x½n from an analog signal xc ðtÞ via sampling operation,
we first multiply the analog signal by an impulse train sðtÞ and obtain the product
signal xs ðtÞ ¼ xc ðtÞsðtÞ. Then we collect the amplitude values of impulses from xs ðtÞ
and form the digital sequence x½n.
Now we wonder the reverse operation, i.e., assume that we have the digital
sequence x½n, then how can we construct the analog signal xc ðtÞ? To achieve this,
we will just follow the reverse operations. That is, we will first obtain xs ðtÞ from
x½n, then from xs ðtÞ we will extract xc ðtÞ.
Let’s study the reconstruction operation in time domain as shown in Fig. 1.70.
As it is depicted in Fig. 1.70, we can write mathematical expression for the
product signal xs ðtÞ in terms of the elements of digital signal x½n but we have no
way to write an expression for xc ðtÞ using xs ðtÞ. Hence, we cannot solve the
reconstruction problem in time domain. Let’s inspect the reconstruction operation
in frequency domain then. Assume that xc ðtÞ is a low pass signal and its Fourier
transform is as given in Fig. 1.71.
Considering the Fourier transform in Fig. 1.71, we can draw the Fourier trans-
form of the product signal xs ðtÞ as in Fig. 1.72. The Fourier transform of xs ðtÞ is a
periodic signal with period ws and it’s one period around origin equals to T1s Xc ðwÞ in
case of no aliasing.
It is clear from Fig. 1.72 that for no aliasing, we should have
2p
ws [ 2wN ! [ 2wN ð1:61Þ
Ts
www.TechnicalBooksPDF.com
46 1 Sampling of Continuous Time Signals
2p p
[ 2wN ! wN \ : ð1:62Þ
Ts Ts
www.TechnicalBooksPDF.com
1.5 Reconstruction of an Analog Signal from Its Samples 47
The Fourier transform of the low pass analog filter is depicted in Fig. 1.74 alone.
In fact, the filter under consideration is an ideal lowpass filter, and it is used just to
illustrate the reconstruction operation. In practice, such ideal filters are not avail-
able, and practical non-ideal filters are employed for reconstruction operations.
The time domain expression of the analog filter with the frequency response
depicted in Fig. 1.74 can be calculated using the inverse Fourier transform formula
as follows:
1 1Z
hr ð t Þ ¼ Hr ðwÞejwt dw
2p 1
p
1 TZs
¼ Ts ejwt dw
2p p
Ts
Ts jwt Tps
¼ e p
2p Ts
Ts jTp t p
¼ e s ejTs t
j2pt
Since
sinðpxÞ
sin cð xÞ ¼ ð1:64Þ
px
the mathematical expression in (1.63) can be written in terms of sin cðÞ function as
www.TechnicalBooksPDF.com
48 1 Sampling of Continuous Time Signals
t
hr ðtÞ ¼ sin c : ð1:65Þ
Ts
The graph of the reconstruction filter hr ðtÞ is depicted in Fig. 1.75 where it is
clear that the reconstruction filter takes 0 value at every multiple of Ts .
As we explained before the Fourier transform of the continuous time signal can
be written as the multiplication of Xs ðwÞ and Hr ðwÞ i.e.,
where substituting
X
1
x½ndðt nTs Þ
n¼1
X
1
xc ð t Þ ¼ x½ndðt nTs Þ hr ðtÞ
n¼1
ð1:68Þ
X1
¼ x½nhr ðt nTs Þ
n¼1
which is nothing but the reconstruction expression of the analog signal xc ðtÞ.
www.TechnicalBooksPDF.com
1.5 Reconstruction of an Analog Signal from Its Samples 49
xc ðt Þ ¼ x½n pðtnTs Þ
ð1:69Þ
n¼1 Ts
X
1
t nTs
xc ð t Þ ¼ x½n sin c ð1:70Þ
n¼1
Ts
Example 1.17 The continuous time signal xc ðtÞ ¼ sinð2ptÞ is sampled by sampling
period Ts ¼ 14 s.
(a) Write the digital sequence x½n obtained after sampling operation.
(b) Assume that x½n is transmitted and available at the receiver. Reconstruct the
analog signal at the receiver side from its samples, i.e., using x½n reconstruct
the analog signal xc ðtÞ.
Solution 1.17
(a) The frequency of the sinusoidal signal xc ðtÞ ¼ sinð2ptÞ is 1 Hz, and its period
is 1 s. Sampling period is Ts ¼ 14 s. Every multiple of Ts , we take a sample from
the sinusoidal signal. The graph of the sinusoidal signal and the samples taken
from its one period are indicated in Fig. 1.76.
Since sampling frequency is fs ¼ 4 Hz, we take 4 samples per-second from the
signal. The samples taken from one period of the sinusoidal signal can be
written as ½ 0 1 0 1 . Since the sine signal is defined from 1 to 1.
The obtained digital signal is a periodic signal and in this digital signal, the
repeating pattern happens to be ½ 0 1 0 1 . The digital signal obtained
from the sampling operation can be written as
www.TechnicalBooksPDF.com
50 1 Sampling of Continuous Time Signals
2 3
n¼0
z}|{
6... 0 1 0 1
1 0 1
0 1 0 1 ...7
x ½ n ¼ 4 0 5
|fflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflffl}
Repeating pattern
ð1:71Þ
(b) At the receiver, the analog signal can be reconstructed from its samples using
X
1
xc ð t Þ ¼ x½nhr ðt nTs Þ ð1:72Þ
n¼1
where Ts ¼ 14 and
pt
sin Ts
hr ð t Þ ¼ pt : ð1:73Þ
Ts
The graph of hr ðtÞ in (1.73) is depicted in Fig. 1.77 where it is clear that the
amplitude of the main lobe of hr ðtÞ equals to 1, and the function equals to 0 when t
is a multiple of Ts .
The shifted copies of hr ðtÞ and their summation is illustrated in Fig. 1.78.
www.TechnicalBooksPDF.com
1.5 Reconstruction of an Analog Signal from Its Samples 51
Fig. 1.78 Summing the shifted sin cðÞ functions to reconstruct the analog signal
If we only pay attention to the main lobes in Fig. 1.78, we see that the recon-
struction signal resembles to the sine signal. Overlapping tails improve the accuracy
of the reconstructed signal.
hr (t )
t
0
www.TechnicalBooksPDF.com
52 1 Sampling of Continuous Time Signals
hr (t ) har (t )
1 1
Approximation
Ts Ts Ts Ts
t t
0 0
increase, the amplitudes of the side lobes decrease. To construct a simplified model
for the reconstruction filter, we can approximate the lobes by isosceles triangles.
In Fig. 1.80 the main lobe of the reconstruction filter is approximated by an
isosceles triangle and the side lobes are all omitted. This type of approximation can
also be called as linear approximation.
For the triangle in Fig. 1.80, we can write line equations for the left and right
edges. For the left edge, the line equation is
t
þ 1; Ts t\0;
Ts
t
þ 1; 0 t Ts
Ts
and combining these two line equations into a single expression, we can write the
linearly approximated filter expression as
har ¼ Tjtsj þ 1 0 jtj Ts :
0 otherwise
Example 1.18 The continuous time signal xc ðtÞ ¼ sinð2ptÞ is sampled by sampling
period Ts ¼ 14.
www.TechnicalBooksPDF.com
1.5 Reconstruction of an Analog Signal from Its Samples 53
(a) Write the digital sequence x½n obtained after sampling operation.
(b) Assume that x½n is transmitted and available at the receiver. Reconstruct the
analog signal at the receiver side from its samples using approximated recon-
struction filter.
Solution 1.18
(a) We solved this problem before and found the digital signal as
2 3
n¼0
z}|{
6... 0 1 0 1
1 0 1
0 1 0 1 . . . 7
x½n ¼ 4 0 5:
|fflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflffl}
Repeating pattern
ð1:75Þ
(b) At the receiver side, the analog signal can be reconstructed from its samples
using
X
1
xc ð t Þ ¼ x½nhar ðt nTs Þ ð1:76Þ
n¼1
where Ts ¼ 14 and har ðtÞ is the approximated reconstruction filter. Using the x½n
found in the previous part, and expanding (1.76), the reconstructed signal can
be written as
www.TechnicalBooksPDF.com
54 1 Sampling of Continuous Time Signals
The shifted copies of har ðtÞ in (1.77) and their summation is illustrated in
Fig. 1.81.
As it is seen from Fig. 1.81, the reconstructed signal resembles to the sine signal.
Now we ask the question: How can we obtain a better reconstructed sine
signal?
Answer
Either we can use a better approximated filter or take more samples from one period
of the signal, i.e., increase the sampling frequency which means, decrease the
sampling period. To get a better approximated filter, we can represent the side-lobes
by the small triangles.
A better approximation of the reconstruction filter is illustrated in Fig. 1.82
where it is seen that two side lobes are approximated by triangles. Although
improved linear approximation improves the accuracy of the reconstructed signal,
the sharp discontinuities of the linear approximated filter makes the realization of
the filter difficult.
Reconstruction operation can be illustrated using block diagrams as in Fig. 1.83.
www.TechnicalBooksPDF.com
1.5 Reconstruction of an Analog Signal from Its Samples 55
In Fig. 1.83, if hr ðtÞ ¼ sin c Ts ; then perfect reconstruction occurs, i.e.,
t
xr ðtÞ ¼ xc ðtÞ.
Currently most of the electronic devices are produced using digital technology. For
this reason, analog signals are usually converted to digital signals and processed by
digital electronic systems. These electronic units can be digital filters, equalizers,
amplifiers, etc. In Fig. 1.84, the general system for digital processing of analog
system is depicted.
The system in Fig. 1.84 can be inspected both in time and frequency domains
assuming that discrete time system is linear and time invariant. Let’s first write the
relations among signals in time, and then in frequency domain.
Time Domain Relations:
X
1
x½n ¼ xc ðnTs1 Þy½n ¼ x½n h½n yr ðtÞ ¼ y½nhr ðt nTs2 Þ ð1:78Þ
n¼1
where
2p
ws1 ¼ ; Yn ðwÞ ¼ Xn ðwÞHn ðwÞ: ð1:81Þ
Ts1
To write the frequency domain relation between y½n and yr ðtÞ, let’s remember
the two-stage reconstruction process illustrated as follows
www.TechnicalBooksPDF.com
56 1 Sampling of Continuous Time Signals
We have
1 X 1
1 X 1
w
Ys ðwÞ ¼ Yc ðw kws2 Þ Yn ðwÞ ¼ Yc kws2 ð1:82Þ
Ts2 k¼1 Ts2 k¼1 Ts2
w
Yn ðwÞ ¼ Ys ! Yr ðwÞ ¼ Hr ðwÞYs ðwÞ ! Yr ðwÞ ¼ Hr ðwÞYn ðTs2 wÞ: ð1:83Þ
Ts2
P
1
By combining Xn ðwÞ ¼ T1s Xc w
Ts kws ; Yn ðwÞ ¼ Xn ðwÞHn ðwÞ and
k¼1
Yr ðwÞ ¼ Hr ðwÞYn ðTs2 wÞ, we get the relation between Yr ðwÞ and Xc ðwÞ as
1 X 1
Ts2
Yr ðwÞ ¼ Hr ðwÞHn ðTs2 wÞ Xc w kws1 ð1:84Þ
Ts1 k¼1 Ts1
www.TechnicalBooksPDF.com
1.6 Discrete Time Processing of Continuous Time Signals 57
Solution 1.19 First let’s write the expression for one period of Xn ðwÞ around origin as
www.TechnicalBooksPDF.com
58 1 Sampling of Continuous Time Signals
Example 1.20 For the continuous to digital converter given in Fig. 1.89, assume
that the sampling frequency is high enough so that there is no aliasing in frequency
domain. Xn ðwÞ is the Fourier transform of x½n, and Xc ðwÞ is the Fourier transform
of xc ðtÞ. Write one period of Xn ðwÞ in terms of Xc ðwÞ.
Solution 1.20 Since Xn ðwÞ is the Fourier transform of a digital signal, Xn ðwÞ is
periodic and its period equals 2p, the relation between Xn ðwÞ and Xc ðwÞ is given as
1 X 1
w 2p
Xn ðwÞ ¼ Xc k ð1:90Þ
Ts k¼1 Ts Ts
www.TechnicalBooksPDF.com
1.6 Discrete Time Processing of Continuous Time Signals 59
1 w
X n ðw Þ ¼ X c p w\p ð1:93Þ
Ts Ts
Example 1.21 For the digital to continuous converter given in Fig. 1.90, let Yn ðwÞ
be the Fourier transform of y½n. Because Yn ðwÞ is the Fourier transform of a digital
signal, it is periodic and its period equals 2p. Let Ynop ðwÞ be the one period of
Yn ðwÞ around origin. That is Ynop ðwÞ ¼ Yn ðwÞ p w\p. Write the Fourier
transform of yr ðtÞ, i.e., Yr ðwÞ in terms of Ynop ðwÞ.
Solution 1.21 Digital to continuous conversion operation is reminded in Fig. 1.91.
As a result, we can write the relation between one period of Yn ðwÞ and Yr ðwÞ as
www.TechnicalBooksPDF.com
60 1 Sampling of Continuous Time Signals
Example 1.22 If x½n ¼ Ts yc ðtÞjt¼nTs , write one period of the Fourier transform of
x½n in terms of Fourier transform of yc ðtÞ. Assume that there is no aliasing.
Solution 1.22 Using the expression below
Ts X 1
w 2p
Xn ðwÞ ¼ Yc k ð1:97Þ
Ts k¼1 Ts Ts
Example 1.23 In Fig. 1.92 two signal processing systems are depicted. If both
systems produce the same output yr ðtÞ for the same input signal xc ðtÞ, find the
relation between the impulse responses of continuous time and discrete time
systems.
Solution 1.23 For the first system, the frequency domain relation between system
input and output is
Disc.Time System:
www.TechnicalBooksPDF.com
1.6 Discrete Time Processing of Continuous Time Signals 61
D/C:
Yr ðwÞ ¼ Ts Ynop ðTs wÞ ð1:102Þ
If we equate the right hand sides of the Eqs. (1.99) and (1.103), we get
w
Hc ðwÞ ¼ Hnop ðTs wÞ ! Hnop ðwÞ ¼ Hc ð1:104Þ
Ts
from which we can write the time domain relation for h½n and hc ðtÞ as
Digital signals can be processed by continuous time systems. For this purpose, the
digital signal is first converted to continuous time signal then processed by a
continuous time system whose output is back converted to a digital signal. The
overall procedure is depicted in Fig. 1.93.
For the system in Fig. 1.93, time and frequency domain relations between block
inputs and outputs are as follows:
Time domain relations are
X1
t nTs
xc ð t Þ ¼ x½n sin c yc ðtÞ ¼ xc ðtÞ hc ðtÞ ð1:106Þ
n¼1
Ts
www.TechnicalBooksPDF.com
62 1 Sampling of Continuous Time Signals
1 X 1
w 2p
Yn ðwÞ ¼ Yc k : ð1:109Þ
Ts k¼1 Ts Ts
Example 1.24 The signal processing units given in Figs. 1.94 and 1.95 have the
same outputs for the same given inputs. Find the relation between the impulse
responses of discrete and continuous time systems.
Solution 1.24 For the first system, the relation between input and output is
or
For the second system, the relations between block inputs and outputs are given as
Ts Xn ðTs wÞ if Tps w p
X c ðw Þ ¼ Ts Yc ðwÞ ¼ Xc ðwÞHc ðwÞ ð1:113Þ
0 otherwise
1 X 1
w 2p
Yn ðwÞ ¼ Yc k : ð1:114Þ
Ts k¼1 Ts Ts
www.TechnicalBooksPDF.com
1.7 Continuous Time Processing of Digital Signals 63
X
1
w 2p
Yn ðwÞ ¼ Hc k Xn ðw k2pÞ: ð1:116Þ
k¼1
Ts Ts
Example 1.25 Sample continuous time signal in Fig. 1.96, and reconstruct the
continuous time signal from its samples. Use triangle approximated reconstruction
filter during reconstruction process.
Solution 1.25 The Fourier transform graph of a rectangle signal of length 2T
around origin is repeated in Fig. 1.97.
For our example; T ¼ 2, let’s choose the approximate bandwidth of the rect-
angle pulse as wN ¼ 2p=T ! wN ¼ 2p=2 ! wN ¼ p. We can choose the sampling
frequency according to
ws [ 2wN ws [ 2p ð1:120Þ
as
2pfs [ 2p ! fs [ 1 ! fs ¼ 2 ð1:121Þ
which means that the sampling period is Ts ¼ 12. The sampling operation of the
rectangle pulse is depicted in Fig. 1.98.
The digital sequence obtained after sampling of the rectangular signal is
www.TechnicalBooksPDF.com
64 1 Sampling of Continuous Time Signals
1 1 1 1 1
|{z} 1 1 1
x½n ¼ : ð1:122Þ
n¼0
www.TechnicalBooksPDF.com
1.7 Continuous Time Processing of Digital Signals 65
Note that our sampling period is Ts ¼ 12, then the approximated reconstruction
filter becomes as in Fig. 1.100.
Now we can start the reconstruction operation, the reconstruction expression is
given as
X
1
xr ð t Þ ¼ x½nhar ðt nTs Þ ð1:123Þ
n¼1
where Ts ¼ 12 s, and using our digital signal x½n and expanding the summation in
(1.123), we obtain
4 3 2 1
xr ðtÞ ¼ har t þ þ har t þ þ har t þ þ har t þ
2 2 2 2
ð1:124Þ
1 2 3
þ har ðtÞ þ har t þ har t þ har t :
2 2 2
www.TechnicalBooksPDF.com
66 1 Sampling of Continuous Time Signals
If the shifted graphs given in Fig. 1.101 are summed, we get the resulting graph
shown in bold lines in Fig. 1.102.
In Fig. 1.103 the reconstructed signal is depicted alone.
As it is seen from Fig. 1.103, the reconstructed signal resembles to the rectangle
signal given in the exercise. However, at the left and right sides we have some
problems. To increase the accuracy of the reconstructed signal, we should either
take more samples from the continuous time signal or increase the accuracy of the
reconstruction filter.
Let’s take more samples. For this reason, we can increase the sampling fre-
quency, meaning, decrease the sampling period. Accordingly, we can choose
Ts ¼ 1=16, which means that we take ð2 ð2ÞÞ 16 ¼ 64 samples from the
given continuous time signal. The triangular approximated reconstruction filter for
this new sampling period is shown in Fig. 1.104.
As it is seen from Fig. 1.104, the edges of the triangle have larger slopes in
magnitude. It is not difficult to see from Fig. 1.104 that as the sampling frequency
goes to infinity, the reconstruction filter converges to impulse function. Applying
the same steps for the new sampling period, we find the reconstructed signal as in
Fig. 1.105.
www.TechnicalBooksPDF.com
1.7 Continuous Time Processing of Digital Signals 67
As it is seen from Fig. 1.105, we have a better reconstructed signal. Left and
right edges of the reconstructed signal have larger slopes.
Note: If unit is not provided for sampling period or for signal axis we accept it as
“second” by default.
Example 1.26 Is the signal given in Fig. 1.106 a digital signal?
Solution 1.26 Time axis of a digital signal consist of only integers. For the given
signal, real values appear along time axis. Hence, the signal is not a digital signal
but it is discrete amplitude continuous time signal. In fact the signal consists of
shifted impulses dðt t0 Þ which is a continuous function.
www.TechnicalBooksPDF.com
68 1 Sampling of Continuous Time Signals
1.8 Problems
(1) For the sampling periods Ts ¼ 1 s and Ts ¼ 1:5 s, draw the graph of
X
1
sðt Þ ¼ dðt nTs Þ:
n¼1
X
1
sðt Þ ¼ dðt nTs Þ
n¼1
find
(a) Fourier series coefficients.
(b) Fourier series representation.
(c) Fourier transform.
(4) If xs ðtÞ ¼ xc ðtÞsðtÞ where sðtÞ is the impulse train and xc ðtÞ is a continuous
time signal, derive the Fourier transform expression of xs ðtÞ in terms of the
Fourier transform of xc ðtÞ.
(5) If x½n ¼ xc ðnTs Þ, then derive the expression for the Fourier transform of x½n
in terms of the Fourier transform of xc ðtÞ.
(6) Write mathematical equation for the lines depicted in Fig. 1.108, and then find
the sum of these line equations.
(7) xc ðtÞ ¼ cosð8ptÞ is sampled and x½n ¼ xc ðnTs Þ digital signal is obtained.
According to this information, answer the following.
(a) If the sampling period is Ts ¼ 14 s, write the mathematical sequence
consisting of the samples taken from the interval 0 t 1.
(b) Repeat the previous part for the sampling period Ts ¼ 16 1
s.
(c) Which sampling period is preferred Ts ¼ 4 s or Ts ¼ 16 s?
1 1
www.TechnicalBooksPDF.com
1.8 Problems 69
t
0
(8) The continuous time signal xc ðtÞ is sampled with sampling period Ts ¼ 5000 1
s
and the digital signal x½n ¼ xc ðnTs Þ is obtained. The Fourier transform of the
continuous time signal is depicted in Fig. 1.109. Draw the Fourier transform
of the digital signal x½n.
(9) If Ts ¼ 18 s and x½n ¼ ½ 2 3 5 1 2 3 1:5 4:3 2:5 2:5 2 ,
then draw the graph of
X
1
xs ð t Þ ¼ x½ndðn Ts Þ:
n¼1
(10) The Fourier transform of a continuous time signal is depicted in Fig. 1.110.
Using inverse Fourier transform formula, calculate the time domain expression
of this signal.
www.TechnicalBooksPDF.com
70 1 Sampling of Continuous Time Signals
(11) Let xs ðtÞ be the product of xc ðtÞ and the impulse train function sðtÞ. Using the
product signal expression, write the mathematical expression for the recon-
structed signal which is evaluated as xr ðtÞ ¼ xs ðtÞ hr ðtÞ.
(12) For the sampling period Ts ¼ 18 s, draw the linearly approximated recon-
struction filter graph.
(13) The graph of the continuous time signal xc ðtÞ is displayed in Fig. 1.111.
The signal xc ðtÞ is sampled with sampling periods Ts ¼ 1 s, Ts ¼ 14 s and
Ts ¼ 18 s. Find the digital signal x½n for each sampling period.
(14) A continuous time signal is sampled with sampling period Ts ¼ 18 s and the
digital signal x½n ¼ ½ 1 0:7 0 0:7 1 0:7 0 0:7 is obtained.
Using the approximated triangle reconstruction filter, rebuild the continuous
time signal.
(15) The Fourier transform of a continuous time signal xc ðtÞ is depicted in
Fig. 1.112.
The continuous time signal is sampled with sampling period Ts ¼ 3000 1
s and
the digital signal x½n ¼ xc ðtÞjt¼nTs is obtained. Draw the Fourier transform of
x½n.
(16) The continuous time signal xc ðtÞ ¼ cosð2p 100 tÞ þ cosð2p 400 tÞ is
sampled with sampling frequency fs . How should fs be chosen such that no
aliasing occurs in the spectrum of digital signal.
(17) A continuous time signal is sampled with sampling frequency fs ¼ 1000 Hz.
How many samples per second are taken from continuous time signal?
www.TechnicalBooksPDF.com
Chapter 2
Multirate Signal Processing
Digital signals are obtained from continuous time signals via sampling operation.
Continuous time signals can be considered as digital signals having infinite number
of samples. Sampling is nothing but selecting some of these samples and forming a
mathematical sequence called digital signal. And these digital signals can be in
periodic or non-periodic forms. The number of samples taken from a continuous
time signal per-second is determined by sampling frequency. As the sampling
frequency increases, the number of samples taken from a continuous time signal
per-second increases, as well. As the technology improves, new and better elec-
tronic devices are being produced. This also brings the compatibility problem
between old and new devices. One such problem is the speed issue of the devices.
Consider a communication device transmitting digital samples taken from a con-
tinuous time signal at a high speed. This means high sampling frequency, as well. If
the speed of the receiver device is not as high as the speed of the transmitter device,
then the receiver device cannot accommodate the samples taken from the trans-
mitter. This results in communication error. Hence, we should be able to change the
sampling frequency according to our needs.
We should be able to increase or decrease the sampling frequency without
changing the hardware. We can do this using additional hardware components at
the output of the sampling devices. One way of decreasing the sampling frequency
is the elimination of some of the samples of the digital signal. This is also called
sampling of digital signals, or decimation of digital signals, or compression of
digital signals. On the other hand, after digital transmission, at the receiver side
before digital to analog conversion operation, we can increase the number of
samples. This is called upsampling, or increasing sampling rate, or increasing
sampling frequency. If we have more samples for a continuous time signal, when it
is reconstructed from its samples, we obtain a better continuous time signal. In this
chapter, we will learn how to manipulate digital signals, which means, changing
their sampling rates, reconstruction of a long digital sequence from a short version
of it, de-multiplexing and multiplexing of digital signals via hardware units etc.
www.TechnicalBooksPDF.com
72 2 Multirate Signal Processing
www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 73
Solution 2.1 Let’s write the time index values of the signal, x½n explicitly follows
x½n ¼ ½|{z}
3:3 2:5
|ffl{zffl} 1:2
|ffl{zffl} 4:5
|{z} 5:5
|{z} 2:3
|ffl{zffl} 5:0
|{z} 6:2
|{z} 3:4
|{z}
n¼6 n¼5 n¼4 n¼3 n¼2 n¼1 n¼0 n¼1 n¼2
2:3
|{z} 4:4
|ffl{zffl} 3:2
|{z} 2:0 :
|{z}
n¼3 n¼4 n¼5 n¼6
In the second step, we divide the time axis of x½n by 3, this is illustrated in
½|{z}
3:3 2:5
|ffl{zffl} 1:2
|ffl{zffl} 4:5
|{z} 5:5
|{z} 2:3
|ffl{zffl} 5:0
|{z} 6:2
|{z} 3:4
|{z} 2:3
|{z}
n¼63 n¼53 n¼43 n¼33 n¼23 n¼13 n¼03 n¼13 n¼23 n¼33
4:4
|ffl{zffl} 3:2
|{z} 2:0 :
|{z}
n¼43 n¼53 n¼63
where divisions’ yielding integer results are shown in bold numbers and these
divisions are given alone as follows
½|{z}
3:3 4:5
|{z} 5:0
|{z} 2:3
|{z} 2:0
|{z}
n¼63 n¼33 n¼03 n¼33 n¼63
and when the divisions are done, we obtain the downsampled signal as
y½n ¼ ½|{z}
3:3 4:5
|{z} 5:0
|{z} 2:3
|{z} 2:0
|{z}
n¼2 n¼1 n¼0 n¼1 n¼1
www.TechnicalBooksPDF.com
74 2 Multirate Signal Processing
fs
fs M
M
fs
f s = 300 3 f ds = → f ds = 100
3
That means at the output of the downsampler, 100 samples every per-second are
released.
Example 2.3 Find the Fourier series representation of
X
1
p½n ¼ d½n rM: ð2:1Þ
r¼1
Solution 2.3 The given signal is a periodic signal with period M. Its Fourier series
coefficients are computed as
M þ1 Mþ1
1 X
2
2p 1 X
2
2p 1
P½k ¼ p½nej M kn ! P½k ¼ d½nej M kn ! P½k ¼ : ð2:2Þ
M M1
M M1
M
n¼ 2 n¼ 2
Using the Fourier series coefficients in (2.2), the Fourier series representation of
(2.1) can be written as
X 2p 1 X j2pkn
p½ n ¼ P½k ej M kn ! p½n ¼ eM : ð2:3Þ
k;M
M k;M
P1
The mathematical expression p½n ¼ r¼1 d½n rM can also be written as
1 if n ¼ 0; M; 2M; . . .
p½n ¼ ð2:4Þ
0 otherwise:
And equating the right hand sides of (2.3) and (2.4) to each other, we get the
equality
X1
1M 2p 1 n ¼ 0; M; 2M; . . .
ej M kn ¼ ð2:5Þ
M k¼0 0 otherwise:
www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 75
For the expression in (2.5), if we change the sign of n appearing on both sides of
the equation, we obtain an alternative expression for (2.5) as
X1
1M 2p 1 n ¼ 0; M; 2M; . . .
ej M kn ¼ ð2:6Þ
M k¼0 0 otherwise:
Let’s find the Fourier transform of the compressed signal y½n ¼ x½Mn. The Fourier
transform of y½n can be calculated using
X
1
Yn ðwÞ ¼ x½Mnejwn ð2:7Þ
n¼1
The frontiers of the sum symbol in (2.9) can be changed to 1 and 1 if (2.1) is
used in (2.9) as
X
1 X
1
n
Yn ðwÞ ¼ x½n d½n rMejwM
n¼1 r¼1
P1
where replacing r¼1 d½n rM by its Fourier series representation, we get
X
1
1 X j2pkn jw n
Yn ðwÞ ¼ x½n e M e M ð2:10Þ
n¼1
M k;M
1X X 1
w þ k2p
Yn ðwÞ ¼ x½nej M n ð2:11Þ
M k;M n¼1
|fflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflffl}
¼Xn ðw þMk2pÞ
www.TechnicalBooksPDF.com
76 2 Multirate Signal Processing
Hence, considering (2.12) and (2.13), we can write the Fourier transform of
y½n ¼ x½Mn as
X1
1M w k2p
Yn ðwÞ ¼ Xn : ð2:14Þ
M k¼0 M
Example 2.4 If y½n ¼ x½Mn the relation between Fourier transforms of x½n and
y½n is given as
X1
1M w k2p
Yn ðwÞ ¼ Xn :
M k¼0 M
Z2p
1
y½n ¼ Yn ðwÞejwn dw ð2:15Þ
2p
w¼0
Z2p
1
y ½ n ¼ Yn ðwÞejwn dw
2p
0
where inserting
X1
1M w k2p
Yn ðwÞ ¼ Xn
M k¼0 M
www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 77
we get
X1 Z2p
1 M w þ k2p jwn
y ½ n ¼ Xn e dw ð2:16Þ
2pM k¼0 M
0
In (2.16), if we let k ¼ w þMk2p, then dw ¼ Mdk, and changing the frontiers of the
integral (2.16) reduces to
ðk þ 1Þ2p
X 1 Z
M
1 M
y ½ n ¼ Xn ðkÞejMkn dk: ð2:17Þ
2p k¼0
k2p
M
ZM ZM
2p 4p
1 1
y ½ n ¼ Xn ðkÞejMkn dk þ Xn ðkÞejMkn dk þ
2p 2p
0 2p
M ð2:18Þ
1 2pZ
þ Xn ðkÞejMkn dk
2p M1
M 2p
Rb Rc Rc
where using the property a ðÞ þ b ðÞ ¼ a ðÞ and changing k with w, we get the
expression
Z2p
1
y½ n ¼ Xn ðwÞejMwn dw: ð2:19Þ
2p
0
Z2p
1
x ½ n ¼ Xn ðwÞejwn dw
2p
0
www.TechnicalBooksPDF.com
78 2 Multirate Signal Processing
X1
1M w k2p
Yn ðwÞ ¼ Xn
M k¼0 M
and try to draw each shifted graph and sum the shifted graphs. However, this
approach is too time consuming and error-prone. Instead of this approach, we will
suggest a simpler method to draw the graph of Yn ðwÞ as explained in the following
lines.
Since Yn ðwÞ is the Fourier transform of the digital signal y½n, then Yn ðwÞ is a
periodic signal and its period equals to 2p.
To draw the graph of Yn ðwÞ, we can follow the following steps.
Step 1: First one period of Xn ðwÞ around origin is drawn. For this purpose, the
frequency interval is chosen as p\w p.
Step2: Considering one period of Xn ðwÞ around origin,
we draw one period of
1 w 1 w
X
M n M . To draw (in one period) the graph of X
M n M , we multiply the horizontal
axis of Xn ðwÞ by M, and multiply the vertical axis of Xn ðwÞ by M1 :
Step 3: In Step 3, we shift the resulting graph in Step 2 to the left and right by
multiples of 2p and sum the shifted replicas.
Let’s now give an example to illustrate the topic.
Example 2.5 One period of the Fourier transform of x½n is depicted in Fig. 2.5.
Draw the Fourier transform of y½n ¼ x½2n, i.e., draw Yn ðwÞ.
X n (w) w
w
3 3
www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 79
Solution 2.5 First let’s draw the graph of Y1n ðwÞ ¼ 12 Xn ðw2 Þ. For this purpose, we
multiply the frequency axis of Xn ðwÞ by 2 and vertical axis of Xn ðwÞ by 12. The
resulting graph is shown in Fig. 2.6.
In the second step, we shift the graph of Y1n ðwÞ to the left and right by multiples
of 2p and P sum the shifted graphs. In other words, we draw the graph of
Yn ðwÞ ¼ 1 k¼1 Y1n ðw k2pÞ. The shifted graphs and their summation result are
depicted in Figs. 2.7, 2.8, and 2.9.
Right Shifted Functions:
Left Shifted Functions:
Sum of the Shifted Functions:
Exercise: One period of the Fourier transform of x½n is depicted in Fig. 2.10.
Draw the Fourier transform of y½n ¼ x½3n, i.e., draw Yn ðwÞ.
1 w
Y1n ( w) Xn( ) 2 w 2
2 2
1
2
2 2 2 2
3 3
1 w 2
Y1n ( w 2 ) Xn( )
2 2
1
2
w
2 2 2 2
2
2
3 3
1 w 2
Y1n ( w 2 ) Xn( )
2 2 1
2
w
2 2 2
2 2 2
3 3
www.TechnicalBooksPDF.com
80 2 Multirate Signal Processing
Yn (w)
1
2
2 2 2 2
w
2 2 2 2
2 2 2 2
3 3 3 3 3 3
w
3 3
www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 81
reconstruct the continuous time signal using only 81 samples. We can omit the
excessive 39 samples via downsampling operation.
Let’s now determine the criteria for no aliasing in downsampling operation.
After downsampling operation, we have Mfs remaining samples per-second. If this
number of remaining samples is greater than 2fN , then no aliasing occurs. That is if
fs fs
[ 2fN ! M\ ð2:21Þ
M 2fN
is satisfied, then aliasing is not seen in the spectrum of the downsampled signal.
Let’s simplify (2.21) more as
fs 1
M\ ! M\ ð2:22Þ
2fN 2 Ts fN
|{z}
fD
1 p p
M\ ! M\ ! M\ ! MwD \p ð2:23Þ
2fD 2pfD wD
w
wD wD
www.TechnicalBooksPDF.com
82 2 Multirate Signal Processing
X n (w / M ) M w M
1
M
w
M MwD MwD M
1
w
Fig. 2.12 Case-1: Graph of M Xn M
X n (w / M ) M w M
1
M
w
M MwD MwD M
1
w
Fig. 2.13 Case-2: Graph of M Xn M
Yn (w)
1
M
w
2 MwD MwD 2
signal x½n is downsampled and y½n ¼ x½4n is obtained. Decide whether aliasing
occurs in spectrum of y½n or not.
Solution 2.7 If the given continuous time signal is compared to cos ð2pftÞ, the
frequency of the continuous time signal is found as f ¼ 3000 Hz. And the sampling
frequency is fs ¼ 8000 Hz. After downsampling operation sampling frequency
reduces to fs ¼ 8000 4 ¼ 2000 Hz and this value is less than 2f ¼ 6000 Hz. This
means that aliasing is seen in the spectrum of y½n.
1
Exercise: For the system in Fig. 2.15, xc ðtÞ ¼ cos ð5000ptÞ, Ts ¼ 10;000 , and
M ¼ 2. According to given information, draw the Fourier transforms of the signals
xc ðtÞ; x½n; y½n, and yr ðtÞ, and also write the time domain expression for yr ðtÞ.
www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 83
y[n] x[ Mn]
x[n]
xc (t ) C/D M D/C yr (t )
Ts Ts
If x½n ¼ xc ðnTs Þ, then for the downsampled signal y½n ¼ x½Mn ! y½n ¼
xc ðn MTs Þ new sampling period is Ts0 ¼ MTs which is an integer multiple of Ts . The
|{z}
Ts0
digital signal obtained from xc ðtÞ using sampling period Ts is shown in Fig. 2.16.
The digital signal x½n in Fig. 2.16 is written as a mathematical sequence as
x½n ¼ ½ a b c d e f g h i j k l m :
|{z}
n¼0
Now consider y½n ¼ x½2n ! y½n ¼ xc ðn2Ts Þ, in this case the samples are taken
from xc ðtÞ at every Ts0 ¼ 2Ts . This operation is illustrated in Fig. 2.17.
The digital signal y½n in Fig. 2.17 can be written as a mathematical sequence as
y½n ¼ ½ a c e g i k m :
|{z}
n¼0
Similarly, if g½n ¼ x½4n ! g½n ¼ xc ðn4Ts Þ, the samples are taken from xc ðtÞ at
every Ts0 ¼ 4Ts . This operation is illustrated in Fig. 2.18.
d x c (t )
c e j k
b i l
f
a
g h m
− 6Ts − 5Ts − 4Ts − 3Ts− 2Ts − Ts 0 Ts 2Ts 3Ts 4Ts 5Ts 6Ts t
Fig. 2.16 Sampling of the continuous time signal with sampling period Ts
www.TechnicalBooksPDF.com
84 2 Multirate Signal Processing
xc (t )
c e k
i
a
g m
t
6Ts 4Ts 2Ts 0 2Ts 4Ts 6Ts
Fig. 2.17 Sampling of the continuous time signal with sampling period 2Ts
xc (t )
c
k
4Ts 0 4Ts t
Fig. 2.18 Sampling of the continuous time signal with sampling period 4Ts
The digital signal g½n in Fig. 2.18 can be written as a mathematical sequence as
y½n ¼ ½ c g k :
|{z}
n¼0
Example 2.8 For the signal processing system given in Fig. 2.19, xc ðtÞ ¼
1
cosð5000ptÞ, Ts ¼ 8000 , and M ¼ 3. Using the given information, calculate and
draw the Fourier transforms of the signals xc ðtÞ; x½n; y½n, and yr ðtÞ. Besides, write
the time domain expression for yr ðtÞ.
y[n] x[ Mn]
x[n]
xc (t ) C/D M D/C yr (t )
Ts Ts
www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 85
Solution 2.8 Before starting to the solution, let’s provide some background
information as
1 jh
CosðhÞ ¼ e þ ejh FT ejw0 t ¼ 2pdðw w0 Þ ð2:24Þ
2
FT fcosðwN tÞg ¼ pðdðw wN Þ þ dðw þ wN ÞÞ: ð2:25Þ
w
5000 0 5000
w
5 0 5
8 8
www.TechnicalBooksPDF.com
86 2 Multirate Signal Processing
1 w
Xn( )
3 3
8000
A 3 B
15 15
w
0
8 8
w
Fig. 2.22 The graph of 13 Xn 3 for Example 2.8
Ar Br
8000
3
w
2 31
8 8
different one. The amount of distortion in the reconstructed continuous time signal
depends on the rate of the omitted samples, i.e., rate of the compression or rate of
the downsampling. As the number of omitted samples increases, the amount of
distortion in the reconstructed signal increases, as well.
To get the graph of Yn ðwÞ, we shift its one period depicted in Fig. 2.22 to the left
and to the right by multiples of 2p and sum the shifted replicas. The right shifted
graph by 2p is given in Fig. 2.23.
And the left shifted graph by 2p is shown in Fig. 2.24a.
Summing the centered, right shifted, and left shifted graphs, we get the graph of
Yn ðwÞ as shown in Fig. 2.24b.
Now let’s find the expression for the reconstructed signal yr ðtÞ. For this purpose,
we consider the graph of Yn ðwÞ for the interval p w\p and draw
Yr ðwÞ ¼ Ts Xn ðTs wÞ. To achieve this, we divide the frequency axis by Ts and
multiply the amplitudes by Ts . These operations generate the graph depicted in
Fig. 2.25.
If the inverse Fourier transform of Yr ðwÞ depicted in Fig. 2.25 is calculated, we
obtain the time domain expression of the reconstructed signal as
1
yr ðtÞ ¼ cos ð1000ptÞ
3
www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 87
(a)
Al Bl 8000
3
w
31 2
8 8
(b) Yn (w)
8000
3
AI A BI Ar B Br
15 15 31
31 8
8 8 8 8
8
Fig. 2.24 a One period of Yn ðwÞ shifted to the left by 2p. b The graph of Yn ðwÞ for Example 2.8
w
1000 1000
which is quite different from the sampled signal xc ðtÞ ¼ cos ð5000ptÞ. The reason
for this is that during the downsampling operation too many samples, beyond the
allowable threshold, are omitted and this resulted in aliasing in frequency domain
and perfect reconstruction of the original signal is not possible anymore.
Question: During the downsampling operation we have to omit more samples
than the number of allowable one. However, we want to decrease the effect of
aliasing at the spectrum of the digital signal. What can we do for this?
Answer: If y½n ¼ x½Mn alising occurs in Yn ðwÞ, if the largest frequency of
Xn ðwÞ in the interval p w\p is greater than Mp . This situation is depicted in
Fig. 2.26.
For the conversion of y½n to continuous time signal yr ðtÞ, the portion of Yn ðwÞ
for the interval p w\p in Fig. 2.26 is used. This portion is depicted alone in
Fig. 2.27.
As it is seen from Fig. 2.27, the overlapping shaded parts cause distortion in the
reconstructed signal. Then how can we decrease the distortion amount? If we can
www.TechnicalBooksPDF.com
88 2 Multirate Signal Processing
1 w
X n (w) w Y1n ( w) Xn( ) M w M
M M
1 1
w w
wD wD M MwD MwD M
M M
Yn ( w) Y1n ( w k 2 )
k
1
M
w
2 MwD MwD 2
1
M
eliminate the shaded regions in the spectrum of the downsampled signal, the
reconstructed signal will have less distortion.
However due to the clipping of the parts extending beyond the interval ðp; pÞ,
some distortion will always be available in the reconstructed signal. This distortion
is due to the information loss owing to the clipping of the spectrum regions in
Fig. 2.26 for the intervals p w\Mwd and Mp w\p. What we do here is that
we want try to decrease the amount of distortion, not complete elimination of it.
Then if we can get a spectrum graph for Yn ðwÞ; p w\p as shown in
Fig. 2.28 the reconstructed signal will have less distortion.
www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 89
X n (w) w H dn ( w) X n ( w) w
1 1
H dn (w)
w w
wD wD
M M M M
We can omit the overlapping shaded parts if we can filter high frequency por-
tions of Xn ðwÞ before downsampling operation, i.e., the portions of Xn ðwÞ for the
intervals Mp w\p and p w\ Mp should be filtered out. This can be achieved
using a low pass filter as shown in bold lines Fig. 2.29. The lowpass filter clips the
wigs of the signal that extends beyond the interval ðp; pÞ. And this clipping
prevents the overlapping problem in downsampled signal spectrum.
The lowpass filter used in Fig. 2.29 is called decimator filter whose frequency
domain expression for its one period around origin is written as
1 if jwj\ Mp
Hdn ðwÞ ¼ ð2:26Þ
M \jwj\p:
p
0 if
The time domain expression of the decimator filter can be computed using the
inverse Fourier transform as
p
Z ZM
1 1
hdn ½n ¼ Hdn ðwÞejwn dw ! hdn ½n ¼ 1 ejwn dw ð2:27Þ
2p 2p
w;2p Mp
www.TechnicalBooksPDF.com
90 2 Multirate Signal Processing
w
M M
y1[n]
x[n] hd [n] M y[n] y1[ Mn]
which can be used for the calculation of the Fourier transform of y½n as
X
1
Yn ðwÞ ¼ Ynop ðw k2pÞ: ð2:30Þ
k¼1
Considering Fig. 2.31 the graph of (2.30) can be drawn as in Fig. 2.32.
Exercise: If y½n ¼ x½3n and the Fourier transform of x½n for p w\p is as
given in Fig. 2.33, draw the Fourier transform of y½n, i.e., draw Yn ðwÞ.
Downsampling can also be used for de-multiplexing operations, i.e., separating
digital data to its components. We below give some examples to illustrate the use of
downsampling for de-multiplexing operations.
Yn (w)
1
M
w
2 2
www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 91
w
2 2
3 3
x½n ¼ ½1 2 3 4 5 6 7 8 9
|{z} 10 11 12 13 14 15
n¼0
x½n 1 ¼ ½1 2 3 4 5 6 7 8
|{z} 9 10 11 12 13 14 15:
n¼0
If we divide the time axis by 2 and take only the integer division results, we get
the signals
y1 ½n ¼ ½1 3 5 7 9
|{z} 11 13 15 y2 ½n ¼ ½2 4 6 8
|{z} 10 12 14
n¼0 n¼0
z 1
2 y2 [ n ]
www.TechnicalBooksPDF.com
92 2 Multirate Signal Processing
z 1
3 y2 [ n ]
z 1
3 y3[n]
x½n ¼ ½1 2 3 4 5 6 7 8 9
|{z} 10 11 12 13 14 15
n¼0
y1 ½n ¼ ½ 3 6 9 12 15 y2 ½n ¼ ½ 2 5 8 11 14
y3 ½n ¼ ½ 1 4 7 10 13
which are nothing but sub-sequences obtained by dividing data signal x½n into
non-overlapping sequences.
Let y½n ¼ x½Mn be the downsampled digital signal. To draw the Fourier transform
of y½n in case of aliasing, we follow the subsequent steps.
w
Step 1: First we draw the graph of M1 Xn M . For this purpose, we divide the
1
horizontal axis of the graph of Xn ðwÞ by M , i.e., we multiply the horizontal axis by
M, and multiply the amplitude values by 1=M.
Step 2: In case of aliasing, the graph of M1 Xn M w
extends beyond the interval
ðp; pÞ. The portion of the graph extending to the left of p is denoted by ‘A’, and
the potion extending to the right of p is denoted by ‘B’.
www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 93
Step 3: The portion of the graph denoted by ‘A’ in Step 2 is shifted to the right by
2p, and the portion denoted by ‘B’ is shifted to the left by 2p. The overlapping lines
are summed and one period of Yn ðwÞ around origin is obtained. Let’s denote this
one period by Yn1 ðwÞ.
Step 4: In the last step, one period of Yn ðwÞ around origin denoted by Yn1 ðwÞ is
shifted to the left and right by multiples of 2p and all the shifted replicas are
summed to get Yn ðwÞ, this is mathematically stated as
X
1
Yn ðwÞ ¼ Yn1 ðw k2pÞ:
k¼1
w
wd 0 wd
w
One period of
Fig. 2.39 1
Xn( )
1
X w M M
M n M around origin in case
of aliasing A
M
w
Mwd 0 Mwd
www.TechnicalBooksPDF.com
94 2 Multirate Signal Processing
If the shadowed triangles ‘A’ and ‘B’ in Fig. 2.40 are shifted to the right and left
by 2p, we obtain the graphic in Fig. 2.41. If the overlapping lines in Fig. 2.41 are
summed, we obtain the graphic shown in bold lines in Fig. 2.42. As it is clear from
Fig. 2.41, overlapping regions distorts the original signal. The amount of distortion
depends
w on the widths of the shadowed triangles. In other words, as the function
1
M n M extends outside the interval ðp; pÞ more, the amount of distortion on the
X
original signal due to overlapping increases.
The graph obtained after summing the overlapping lines is depicted alone in
Fig. 2.43.
One period of
Fig. 2.40 1 w
1
X w Xn( )
M n M around origin in case M M
of aliasing
A
M
A B
w
Mwd 0 Mwd
B A
w
Mwd 0 Mwd
B A
w
Awd 0 Awd
www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 95
w
Mwd 0 Mwd
w
3 0 3
8 8
Exercise 2.11 The Fourier transform of x½n, i.e., Xn ðwÞ, is shown in Fig. 2.44.
Draw the Fourier transform of the downsampled signal y½n ¼ x½Mn; M ¼ 4.
Solution 2.11
1 w
Step 1: First we draw the graph of M Xn M as in Fig. 2.45.
For the graph of Fig. 2.45, the parts that fall outside of the interval ðp; pÞ are
denoted by the shaded triangles ‘A’ and ‘B’ in Fig. 2.46.
If the shaded parts ‘A’ and ‘B’ in Fig. 2.46 are shifted to the right and to the left
by 2p, we obtain the graph in Fig. 2.47.
The equations of the overlapping line on the interval ðp; p=2Þ in Fig. 2.47
1
can be written as 12p w þ 14 and 12p
1 1
w 24 , and when these equations are summed,
5
we obtain 24. In a similar manner, the sum of the equations of the overlapping line
5
on the interval ðp=2; pÞ can be found as 24 . Hence one period of Yn ðwÞ around
origin can be drawn as shown in Fig. 2.48.
In the last step, shifting one period of Yn ðwÞ to the left and right by multiples of
2p and summing the shifted replicas we obtain the graph of Yn ðwÞ.
One period of
Fig. 2.45 1 w
1 w Xn( )
M Xn M 4 4
1/4
w
3 0 3
2 2
www.TechnicalBooksPDF.com
96 2 Multirate Signal Processing
One period of
Fig. 2.46 1 w
1 w Xn( )
M Xn M 4 4
1/4
A B
w
3 0 3
2 2
B A
w
0
2 2
w
0
2 2
2
1
w
3 0 3
8 4 4 8
Exercise: One period of the Fourier transform of x½n is shown in Fig. 2.49.
Draw the Fourier transform of the downsampled signal y½n ¼ x½4n.
Exercise: One period of the Fourier transform of x½n is shown in Fig. 2.50.
Draw the Fourier transform of the downsampled signal y½n ¼ x½8n.
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 97
w
3 0 3
16 24
Assume that we want to transmit an analog signal. For this purpose, we first take
some samples from the continuous time signal and form a mathematical sequence,
and this process is called sampling. To decrease the transmission overhead, we omit
some of the digital samples and this process is called downsampling. After
downsampling operation, we transmit the remaining samples. At the receiver side,
for better reconstruction of the analog signal, we try to find a method to increase the
number of digital samples. For this purpose, we try to find the samples omitted
during the downsampling operation. After finding the omitted samples, we can
reconstruct the analog signal in a better manner.
This means that first we reconstruct the original digital signal from downsampled
digital signal then by using the reconstructed digital signal, we reconstruct the
continuous time signal.
Reconstruction of the original digital signal from the downsampled signal
includes a two-step process. The first step is called up sampling also named as
signal-expansion. In this step, the compressed signal, i.e., downsampled signal, is
expanded in time axis, and for the new time instants, 0 values are assigned for the
new amplitudes. The second step is called interpolation which is the reconstruction
part for the omitted digital samples. In this part, the 0 values assigned to new time
amplitudes for the expanded signal are replaced by the estimated values.
Now let’s explain the upsampling operation.
www.TechnicalBooksPDF.com
98 2 Multirate Signal Processing
n
x L n ¼ 0; L; 2L; . . .
y ½ n ¼ ð2:31Þ
0 otherwise:
For simplicity of the expression we will assume that for the new time indices in
the expanded signal, the amplitude values are 0, so we will not always
explicitly
write the second condition in (2.31), i.e., we will only use y½n ¼ x Ln to describe
the signal expansion.
To draw the graph of y½n ¼ x Ln , or to obtain the expanded signal, y½n ¼ x Ln
we divide the time axis of x½n by 1=L, i.e., we multiply the time axis of x½n by L.
This operation is illustrated with an example now.
Example 2.12 If x½n ¼ ½1 3 5 7 9 |{z} 11 13 15 17 find y½n ¼ x n3 .
n¼0
Solution 2.12 The indices for amplitude values of x½n are explicitly written in
x½n ¼ ½|{z}
1 3
|{z} 5
|{z} 7
|{z} 9
|{z} 11
|{z} 13
|{z} 15
|{z} 17 :
|{z}
n¼5 n¼4 n¼3 n¼2 n¼1 n¼0 n¼1 n¼2 n¼3
Dividing the indices of x½n by 1=3, i.e., multiplying the indices by 3, we get the
sequence
½ |{z}
1 3
|{z} 5
|{z} 7
|{z} 9
|{z} 11
|{z} 13
|{z} 15
|{z} 17 :
|{z}
n¼15 n¼12 n¼9 n¼6 n¼3 n¼0 n¼3 n¼6 n¼9
Inserting missing indices and inserting 0 for amplitudes of the missing indices,
we obtain the signal y½n as
y½n ¼ ½1 0 0 3 0 0 5 0 0 7 0 0 9 0 0 11
|{z} 0 0 13
n¼0
0 0 15 0 0 17:
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 99
X
1
y ½ n ¼ x½k d½n kL: ð2:33Þ
k¼1
x ½ n ¼ ½ a b c d e ;
then to get x n4 simply insert 3 zeros between every two samples of x½n, and this
operation yields
h ni
x ¼ ½a 0 0 0 b 0 0 0 c 0 0 0 d 0 0 0 e:
4
For this purpose, let’s start with the definition of the Fourier transform of y½n
X
1
Yn ð w Þ ¼ y½nejwn ð2:35Þ
n¼1
P1
where substituting k¼1 x½k d½n kL for y½n, we get
X
1 X
1
Yn ð w Þ ¼ x½kd½n kLejwn ð2:36Þ
n¼1 k¼1
X
1 X
1
Yn ð w Þ ¼ x½kd½n kLejwn ð2:37Þ
k¼1 n¼1
www.TechnicalBooksPDF.com
100 2 Multirate Signal Processing
X
1 X
1
Yn ðwÞ ¼ x½k d½n kLejwn ð2:38Þ
n¼1
k¼1
|fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl}
ejwkL
X
1
Yn ðwÞ ¼ x½k ejwkL : ð2:39Þ
k¼1
X
1
Xn ðwÞ ¼ x½nejwn ð2:40Þ
n¼1
it is seen that
w
wD wD
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 101
w
wD wD
L L L L
its Fourier transform is an impulse train with period 2p, i.e., its Fourier transform is
a discrete signal.
Example 2.14 One period of the Fourier transform of x½n around origin
is given in
Fig. 2.54. Draw one period of the Fourier transform of y½n ¼ x n2 .
Solution 2.14 Dividing the frequency axis of Xn ðwÞ by 2, we get the graph in
Fig. 2.55 for the Fourier transform of y½n.
To get the graph in Fig. 2.55, we divided the horizontal axis of Xn ðwÞ by 2.
Since Yn ðwÞ is a periodic function with period 2p, the graph in Fig. 2.55 can also be
drawn for the interval p w\p as shown in Fig. 2.56.
Example 2.15 For the system given in Fig. 2.44 M ¼ L ¼ 2, and
x½n ¼ ½|{z}
1 2 3 4 5 6 7 8 9 10:
n¼0
w
2 2
3 3
w
2 3 3 2
www.TechnicalBooksPDF.com
102 2 Multirate Signal Processing
3 3
Ts
Solution 2.15 To find xd ½n, we divide the time indices of x½n by 2 and keep only
integer division results. This operation yields
xd ½n ¼ ½|{z}
1 3 5 7 9:
n¼0
To find y½n, we divide the time indices of xd ½n by 12, i.e., multiply the time
indices of xd ½n by 2. For new indices, amplitude values are equated to 0. The result
of this operation is the signal
y½n ¼ ½|ffl{zffl}
1 0 3 0 5 0 7 0 9:
n¼0
2 y[n] [ 1 0 3 0 5 0 7 0 9 0]
n 0
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 103
x[n] xd [n ] y[n ]
xc (t ) C/D M L D/C y r (t )
Ts
2.2.4 Interpolation
Let’s consider the signal processing system shown in Fig. 2.59. The system
includes one downsampler, one upsampler and one D/C converter. Let’s study the
reconstructed signal yr ðtÞ.
Assume that y½n is a causal signal. The signal yr ðtÞ is calculated from the digital
signal y½n using
X
1
yr ð t Þ ¼ y½nhr ðt nTs Þ ð2:42Þ
n¼1
where hr ðtÞ can either be ideal reconstuction filter, i.e., hr ðtÞ ¼ sincðt=Ts Þ or tri-
angular approximated reconstruction filter, or any other approximated filter. When
we expand the summation in (2.42), we see that some of the shifted filters are
multiplied by 0, since some of the samples of y½n are 0. The expansion of (2.42)
happens to be as
yielding
yr ðtÞ ¼ 1 hr ðtÞ þ 0 hr ðt Ts Þ þ 3 hr ðt 2Ts Þ þ 0 hr ðt 3Ts Þ þ
ð2:44Þ
y [n ] = [ {
1 0 3 0 5 0 7 0 9 0]
n=0
www.TechnicalBooksPDF.com
104 2 Multirate Signal Processing
So how can we find a method to find approximate values for the omitted samples
of original signal x½n? If we can approximate omitted samples, we can replace 0’s
in the expanded signal by the approximated values, then reconstruct the continuous
time signal. The quality of the reconstructed signal will be better.
We know that the amplitude values of a continuous time signal at time instants ti
and ti þ 1 does not change sharply. Otherwise, it violates the definition of continuous
time signal. For instance, the amplitude values of a continuous time signal for three
time instants are given in Fig. 2.60.
Hence for the omitted samples, we can make a linear estimation. Assume that
L ¼ M ¼ 2, in this case, during the downsampling operation; we omit one sample
from every other 2 samples. After upsampling operation, we have 0 in the place of
omitted sample. We can estimate the omitted sample using the neighbor samples of
the omitted sample.
In Fig. 2.60, assume that after sampling operation, we obtain the digital signal
[a b c], and in this case, downsampled signal can be calculated as ½a c. The
expanded signal or upsampled signal becomes as ½ a 0 c where 0 can be
replaced by the estimated value a þ2 c. In general if there are L 1 zeros between two
samples of the expanded signal, we can estimate the omitted samples drawing a line
between the amplitudes of these two samples as illustrated in Fig. 2.61.
The missing samples in Fig. 2.61. can be calculated using
ab
y½ ni ¼ b þ ðnk þ L1 ni Þ; i ¼ k : k þ L 1: ð2:45Þ
L
a
b c
t
t0 t1 t2
Fig. 2.60 Amplitude values of a continuous time signal for three distinct time instants
0 0 0 0
n
nk nk 1
nk L 1
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 105
xd ½n ¼ ½|{z}
1 7 10 y½n ¼ ½|{z}
1 0 0 7 0 0 10:
n¼0 n¼0
and these signals are graphically shown in Fig. 2.62.
The missing samples in upsampled signal can be calculated using
ab
D¼ ; and ½b þ ðL 1ÞD b þ ðL 2ÞD b þ 2D b þ D
L
17
D¼ ! D ¼ 2
3
x[n] xd [3n] n
xd [ ]
3
10 10 10 10
9
7 7 7
2
1 1 1
n n n
0 1 2 3 4 5 6 0 1 2 3 4 5 6 0 1 2 3 4 5 6
www.TechnicalBooksPDF.com
106 2 Multirate Signal Processing
7 10
D¼ ! D ¼ 1
3
y½n ¼ ½|{z}
1 3 4 7 8 9 10: ð2:47Þ
n¼0
x½n ¼ ½|{z}
1 2 5 7 9 10 10: ð2:48Þ
n¼0
When (2.47) is compared to (2.48), we see that the calculated samples are close
to the original omitted samples.
10
9
8
7
1
n
0 1 2 3 4 5 6
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 107
Ts
Fig. 2.64 Signal processing system including upsampling and downsampling operations
X n (w)
0 w
2 2
M M
X nd (w)
1
M
w
2 0 2
www.TechnicalBooksPDF.com
108 2 Multirate Signal Processing
Dividing the horizontal axis of the graph in Fig. 2.66 by L, we obtain the graph
of Yn ðwÞ as Fig. 2.67.
If we compare the graph of Xn ðwÞ in Fig. 2.65 to the graph of Yn ðwÞ in Fig. 2.67,
it is seen that for pL jwj\2p pL Xn ðwÞ ¼ 0 but Yn ðwÞ 6¼ 0, and for other fre-
quency intervals, Yn ðwÞ ¼ M1 Xn ðwÞ. This is illustrated in Fig. 2.68.
How can we make Yn ðwÞ to be equal to Xn ðwÞ for all frequency values? This is
possible if we multiply Yn ðwÞ by a lowpass digital filter with the transfer function as
in Fig. 2.69.
Since L ¼ M and Yi ðwÞ ¼ Hi ðwÞYn ðwÞ, we can show the multiplication of
Hi ðwÞYn ðwÞ as in Fig. 2.70.
The result of the above multiplication is depicted in Fig. 2.71.
For L ¼ M; we have Yi ðwÞ ¼ Xn ðwÞ which means that yi ½n ¼ x½n, that is
omitted samples are reconstructed perfectly.
Let’s now do the time domain analysis of this reconstruction process. If
Yi ðwÞ ¼ Hi ðwÞYn ðwÞ, then yi ½n ¼ hi ½n y½n. The time domain expression hi ½n
can be obtained via inverse Fourier transform
Z
1
hi ½ n ¼ Hi ðwÞejwn dw ð2:49Þ
2p
2p
Yn (w)
1
M
w
2 2 0 2 2
L L L L
1
M
w
2 2 0 2 2
L L L L
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 109
H i (w)
w
2 0 2
L L
Yi ( w) H i ( w)Yn ( w)
L
1
M
w
2 2 0 2 2
L L L L
Yi (w)
w
2 0 2
L L
ZL
p
pn
1 jwn sin L
hi ½ n ¼ Le dw ! hi ½n ¼ pn ð2:50Þ
2p L
pL
www.TechnicalBooksPDF.com
110 2 Multirate Signal Processing
hi [ n ]
4L 3L 2L L L 2L 3L 4L n
0
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 111
Since digital sin cðÞ filter is an ideal filter, it is difficult to implement such filters,
instead we can use an approximation of this digital filter. As it is clear from
Fig. 2.72, the digital sin cðÞ filter includes a large main lobe centered upon origin,
and many other side lobes. To approximate the digital sin cðÞ filter, we can use
triangles for the lobes in Fig. 2.72. The simplest approximation is to use an
isosceles triangle for the main lobe and omit the other side lobes.
The simplest approximated digital can filter can be obtained as shown in
Fig. 2.73.
Referring to Fig. 2.73 the approximated interpolation filter can mathematically
be expressed as
8n
< L þ 1; if L n\0
hai ½n ¼ Ln þ 1; if 0 n\L ð2:52Þ
:
0; otherwise
hi [n]
hai [n ]
4L 3L 2L 2L 3L 4L n
L 0 L
www.TechnicalBooksPDF.com
112 2 Multirate Signal Processing
With the interpolation filter our complete signal processing system becomes as in
Fig. 2.74.
For the reconstruction of the samples omitted during downsampling operation, if
approximated interpolating filter is used, the reconstructed digital signal can be
written as
X
1
yi ½n ¼ hai ½n * y½n ! yi ½n ¼ y½khai ½n k ð2:54Þ
k¼1
where hai ½n denotes the approximated reconstruction filter, or interpolation filter.
Now let’s try to write a relation between xd ½n and yi ½n given in Fig. 2.74. We
know that
X
1
y ½ n ¼ xd ½k d½n kL: ð2:55Þ
k¼1
we get
X
1
yi ½n ¼ hi ½n * xd ½k d½n kL ð2:57Þ
k¼1
which is simplified as
X
1
yi ½ n ¼ xd ½k hi ½n kL: ð2:58Þ
k¼1
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 113
yi ½ n ¼ xd ½k pðnkLÞ
ð2:60Þ
k¼1 L
X
1
n kL
y i ½ n ¼ xd ½k sin c : ð2:61Þ
k¼1
L
P
Note: Digital reconstructed signal expression yi ½n ¼ 1
k¼1 xd ½k hP
i ½n kL is
1
quite similar to the analog reconstructed signal expression xr ðtÞ ¼ k¼1 x½k
hr ðt kTs Þ.
Example 2.17 For the system given in Fig. 2.75 L ¼ M ¼ 3 and
x½n ¼ ½1 2 3 4. Find xd ½n; y½n; and yi ½n. Use approximated linear digital
filter for hi ½n.
Solution 2.17 For L ¼ M ¼ 3, if x½n ¼ ½1 2 3 4, then xd ½n ¼ ½1 4 and
y½n ¼ ½1 0 0 4.
To find yi ½n we can use either
X
1
y i ½ n ¼ y½khai ½n k ð2:62Þ
k¼1
or
X
1
y i ½ n ¼ xd ½k hi ½n kL ð2:63Þ
k¼1
Let’s use both of them separately. First using (2.53), let’s calculate and draw the
linear approximated digital interpolation filter as in Fig. 2.76.
www.TechnicalBooksPDF.com
114 2 Multirate Signal Processing
yi ½1 ¼ y½0 hai ½1 þ y½1 hai ½0 þ y½2 hai ½1 þ y½3 hai ½2 ð2:65Þ
|{z} |ffl{zffl} |{z} |ffl{zffl} |{z} |fflfflffl{zfflfflffl} |{z} |fflfflffl{zfflfflffl}
1 2=3 0 1 0 2=3 4 1=3
which yields
2 4
y i ½ 1 ¼ þ ! yi ½ 1 ¼ 2 ð2:66Þ
3 3
yi ½2 ¼ y½0 hai ½2 þ y½1 hai ½1 þ y½2 hai ½0 þ y½3 hai ½1 ð2:67Þ
|{z} |ffl{zffl} |{z} |ffl{zffl} |{z} |ffl{zffl} |{z} |fflfflffl{zfflfflffl}
1 1=3 0 1 0 2=3 4 2=3
which yields
1 8
y i ½ 2 ¼ þ ! yi ½ 2 ¼ 3 ð2:68Þ
3 3
So missing samples are found as yi ½1 ¼ 2 and yi ½2 ¼ 3, and when these sam-
ples are replaced by 0’s in y½n, we get
yi ½n ¼ ½1 2 3 4
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 115
X
1
yi ½ n ¼ xd ½k hi ½n kL: ð2:69Þ
k¼1
which yields
2 4
y i ½ 1 ¼ þ ! yi ½ 1 ¼ 2 ð2:71Þ
3 3
which yields
1 8
yi ½ 2 ¼ þ ! yi ½2 ¼ 3: ð2:73Þ
3 3
Hence, both formulas give the same results. In addition, we had already intro-
duced the linear estimation method using the continuity property of analog signals.
It is now very clear that the linear estimation method is nothing but the use of
triangle approximated digital reconstruction filter.
Example 2.18 Show that the systems given in Fig. 2.77 have the same outputs for
the same inputs.
xb [n]
x[n] H n (Mw) M y[n]
www.TechnicalBooksPDF.com
116 2 Multirate Signal Processing
X1
1M w k2p
Xan ðwÞ ¼ Xn ð2:74Þ
M k¼0 M
and
X 1
Hn ðwÞ M w k2p
Yn ðwÞ ¼ Hn ðwÞXan ðwÞ ! Yn ðwÞ ¼ Xn ð2:75Þ
M k¼0 M
and
X1
1M w k2p
Yn ðwÞ ¼ Xbn : ð2:77Þ
M k¼0 M
X w k2p w k2p
1 M1
Yn ðwÞ ¼ Hn M Xn : ð2:78Þ
M k¼0 M M
Since Hn ðwÞ is a periodic function with period 2p, (2.78) can be written as
X1
1M w k2p
Yn ðwÞ ¼ Hn ðwÞXn ð2:79Þ
M k¼0 M
which is equal to
X w k2p
1 M1
Yn ðwÞ ¼ Hn ðwÞ Xn ! Yn ðwÞ ¼ Hn ðwÞXan ðwÞ: ð2:80Þ
M k¼0 M
When (2.75) is compared to (2.80), we see that both systems have the same
outputs for the same inputs.
Exercise: Show that the systems given below have the same outputs for the same
inputs (Fig. 2.78).
Example 2.19 For the system given in Fig. 2.79, find a relation in time domain
between system input x½n and system output y½n.
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 117
xb [n]
x[n] H n (w) L y[n]
Solution 2.19 We have xd ½n ¼ x½Ln and y½n ¼ xd Ln . Putting xd ½n expression
into y½n expression, we get y½n ¼ x½Ln
L ! y½n ¼ x½n. However, this is not always
correct. Since we know that for L ¼ 2 if x½n ¼ ½1 2 3, then xd ½n ¼ ½1 3 and
y½n ¼ ½1 0 3, it is obvious that x½n 6¼y½n.
But using xd ½n ¼ x½Ln and y½n ¼ xd Ln ; we found y½n ¼ x½n. So, what is
wrong with our approach to the problem?
Because, we
did not pay attention to the criteria in upsampling operation. That
is, y½n ¼ xd Ln if n ¼ kL; k 2 Z; otherwise, y½n ¼ 0. Then y½n ¼ x½n is valid only
for some values of n and these n values are multiples of L. That is for L ¼ 2 if
x½n ¼ ½1 2 3, then xd ½n ¼ ½1 3 and y½n ¼ ½1 0 3, and y½n ¼ x½n for
n ¼ 0; 2 only.
However, for some signals, no information loss occurs after compression
operation. This is possible if the omitted samples are also zeros. In this case,
expanded signal equals to the original signal. For example, if
x½n ¼ ½|{z}
a 0 b 0 c 0 d
n¼0
xd ½n ¼ ½a b c d
y½n ¼ ½|{z}
a 0 b 0 c 0 d
n¼0
www.TechnicalBooksPDF.com
118 2 Multirate Signal Processing
X
1 X
1
xd ½n ¼ x½n d½n rM ð2:81Þ
n¼1 r¼1
X
1
y ½ n ¼ xd ½k d½n kL: ð2:82Þ
k¼1
X
1 X
1 X
1
y ½ n ¼ x½ k d½k rM d½n kL ð2:83Þ
k¼1 r¼1 n¼1
which is the final expression showing the relation between x½n and y½n.
Example 2.20 Find a method to check whether information loss occurs or not after
downsampling by M.
Solution 2.20 If x½n is downsampled by M, we omit M 1 samples from every M
samples. If we denote the information bit indices by the numbers 0; 1; 2; . . .; M. . .;
then the first omitted samples have indices 1; 2; . . .; M 1 and the second set of
omitted indices have indices M þ 1; M þ 2; . . .; 2M 1, and so on.
Hence, by summing the absolute values of the omitted samples and checking
whether it equals to zero or not, we can conclude whether information loss occurs
or not after downsampling operation. That is, we calculate
X X
1 M 1
Loss ¼ jx½n þ kMj ð2:84Þ
k¼1 n¼1
and if Loss 6¼ 0, then information loss occurs after downsampling of x½n, otherwise
not.
Example 2.21 If
x½ n if n is even
y ½ n ¼ ð2:85Þ
0 otherwise
1 þ ð1Þn
y½ n ¼ x½n: ð2:86Þ
2
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 119
Ts
1 þ cosðpnÞ
y½n ¼ x½n:
2
1
Example 2.22 For the system given in Fig. 2.80, xc ðtÞ ¼ cosð2000ptÞ, Ts ¼ 4000
sec find x½n; xd ½n and y½n.
Solution 2.22 When continuous time signal is sampled, we get
p
1
x½n ¼ xc ðtÞjt¼nTs ! x½n ¼ cos 2000pn ! x½n ¼ cos n : ð2:87Þ
4000 2
which yields
p
cos 4n n is even
y½n ¼ ð2:90Þ
0 otherwise
1 þ cosðpnÞ p
y½n ¼ cos n : ð2:91Þ
2 4
1
cosðaÞ cosðbÞ ¼ ðcosða þ bÞ þ cosða bÞÞ ð2:92Þ
2
www.TechnicalBooksPDF.com
120 2 Multirate Signal Processing
Example 2.23 xc ðtÞ ¼ ejwN t and x½n ¼ xc ðtÞjt¼nTs , Ts ¼ 1 find the Fourier trans-
forms of xc ðtÞ and x½n.
Solution 2.23 The Fourier transform of the continuous time exponential signal is
Xc ðwÞ ¼ 2pdðw wN Þ ð2:95Þ
wN w
0
w
0 wD wN
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 121
j wN Ts n
|fflffl{zfflffl}
x½ n ¼ e wD
! x½n ¼ ejwD n :
FT X
1
ejw0 n $ 2p dðw w0 k2pÞ: ð2:98Þ
k¼1
p
Example 2.24 Given x½n ¼ ej3n , find Fourier transform of x½n, i.e., Xn ðwÞ:
Solution 2.24 Xn ðwÞ ¼ 2pdðw p3Þ, jwj\p and Xn ðwÞ is periodic with period 2p,
so in more compact form, we can write it as
X
1
p
Xn ðwÞ ¼ 2p dðw k2pÞ ð2:99Þ
k¼1
3
Xn ðwÞ, Yn ðwÞ, and Wn ðwÞ are periodic functions with period 2p.
Example 2.26 The transfer function of a lowpass digital filter is depicted in
Fig. 2.84. Accordingly, find the output of the block diagram shown in Fig. 2.83 for
the input signal
p
2p
x½n ¼ cos n þ cos n :
3 3
www.TechnicalBooksPDF.com
122 2 Multirate Signal Processing
w
2 0 2
2 2
Solution 2.26 If digital frequency w is between p2 and p2, that is if jwj\ p2, the
digital frequency is accepted as low frequency. On the other hand, if p2 \jwj\p, the
digital frequency is accepted as high frequency.
One period of Fourier transform of x½n can be calculated as
p p 2p 2p
Xn ðwÞ ¼ p d w þd wþ þp d w þd wþ ; jwj\p
3 3 3 3
ð2:100Þ
w
2 0 2
3 2 3 3 2 3
w
2 0 2
3 2 3 3 2 3
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 123
That is, high frequency part of the signal is filtered by the low pass filter, and at
the output of the filter, only low frequency components exist. In time domain, the
filter output equals to
p
xf ½n ¼ cos n : ð2:102Þ
3
The digital filter eliminates high frequency component of x½n, hence at the
output of the filter we have
p
xf ½n ¼ cos n : ð2:105Þ
3
Ts
w
2 0 2
2 2
www.TechnicalBooksPDF.com
124 2 Multirate Signal Processing
n0
x[n] z x[n n0 ]
xe ½n ¼ ½|{z}
1 0 3 0 5 xf ½n ¼ ½|{z}
2 0 4 0 6:
n¼0 n¼0
xg ½n ¼ ½|{z}
0 2 0 4 0 6:
n¼0
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 125
where
xe ½n ¼ ½|{z}
1 0 3 0 5 xg ½n ¼ ½|{z}
0 2 0 4 0 6:
n¼0 n¼0
Hence,
xr ½ n ¼ ½ 1 2 3 4 5 6:
The signal flow of the system in Fig. 2.90 is shown in Fig. 2.91.
Exercise: For the system given in Fig. 2.92, M ¼ 3 and
x ½ n ¼ ½ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15:
[ 1 3 5] [ 1 0 3 0 5 0]
[ 1 2 3 4 5 6] n 0 n 0 [ 1 2 3 4 5 6]
n 0 2 2 n 0
[ 0 2 0 4 0 6]
n 0
1
z
[ 2 4 6]
n 0
2 2
[1 2 3 4 5 6] [ 2 0 4 0 6 0]
n 0 n 0
z z 1
www.TechnicalBooksPDF.com
126 2 Multirate Signal Processing
H1 ( w) z 1
2p p
Example 2.29 For the system shown in Fig. 2.93, x½n ¼ cos 3 n þ cosð3 nÞ,
M ¼ 2.
Find H0 ðwÞ, H1 ðwÞ; G0 ðwÞ; and G1 ðwÞ such that xr ½n ¼ x½n.
Solution 2.29 H0 ðwÞ can be chosen as a low pass digital filter. H1 ðwÞ can be
chosen as a high pass digital filter. G0 ðwÞ and G1 ðwÞ are interpolating sin cðÞ
filters.
Ts
www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 127
1 w
X n ( w) Xc( ) | w |
X c (w) Ts Ts
1
1 x[n] xc (nTs ) Ts
w w
wN 0 wN Ts wN 0 Ts wN
Ts Ts
X n (w)
1
Ts
w
2 TswN 0 Ts wN 2
w
0
1 if jwj\ Tps
Haa ðwÞ ¼ ð2:107Þ
0 otherwise
whose time domain expression can be computed using inverse Fourier transform
Z1
1
haa ðtÞ ¼ Haa ðwÞejwt dw
2p
1
www.TechnicalBooksPDF.com
128 2 Multirate Signal Processing
X c (w) H aa ( w) X c ( w)
1 1
H aa (w)
w w
wN wN
Ts Ts
Ts Ts
X n (w)
1
Ts
w
2 2
Fig. 2.99 The Fourier transform of a digital signal obtained by sampling of a continuous time
signal filtered by an anti-aliasing filter
as
pt
sin Ts
haa ðtÞ ¼ : ð2:108Þ
pt
Up to now we have studied theoretical C/D and D/C converter systems. However,
the practical implementation of these units in real life shows some differences. The
practical implementation of the C/D converter is shown in the first part of
Fig. 2.100, and in a similar manner, the practical implementation of the D/C
converter is shown in the second part of Fig. 2.100.
C/D and D/C conversion systems include analog-to-digital and digital-to-analog
converter units and the contents of these units are shown in Fig. 2.100. Now we
will inspect every component of the complete system shown in Fig. 2.100.
www.TechnicalBooksPDF.com
2.3 Practical Implementations of C/D and D/C … 129
Digital ^
Sample xo (t ) Quantization Code Convert Digital Zero x o (t )
xa (t ) and and Codes to Real Order
Hold Coding Digital Numbers Hold
Code
Ts Ts
www.TechnicalBooksPDF.com
130 2 Multirate Signal Processing
Digital
Sample xo (t ) Quantization Code
xa (t ) and and
Hold Coding
Ts
The aim of the sample and hold circuit is to produce a rectangular signal and the
amplitudes of the rectangles are determined at the sampling time instants. The
simplest sample and hold circuit as shown in Fig. 2.103 which is constructed using
a capacitor.
Since usually sampling frequency fs is a large number, such as 10 kHz etc., it is
logical to use a digital switch for the place of a mechanical switch as shown in
Fig. 2.104.
In the literature, much better sample and hold circuits are available. To give an
idea about design improvement, the circuit in Fig. 2.104 can be improved by
appending a buffer to the output preventing back current flows etc., and this
improved circuit is shown in Fig. 2.105.
The sample and hold operation for the input sine signal is illustrated in
Fig. 2.106.
xc (t ) xo (t )
www.TechnicalBooksPDF.com
2.3 Practical Implementations of C/D and D/C … 131
f s Hz
Ts
xc (t ) xo (t )
Fig. 2.105 Sample and hold circuit with a buffer at its output
xc (t ) xo (t )
Fig. 2.106 Calculation of the output of the sample and hold circuit for sine input signal
For sine input signal after sample and hold operation, we obtain the signal xo ðtÞ
which is depicted alone in Fig. 2.107.
Question: Can we write a mathematical expression for the signal xo ðtÞ shown in
Fig. 2.107.
Yes, we can write. For this purpose, let’s first define ho ðtÞ function as shown in
Fig. 2.108.
If the graph of xo ðtÞ in Fig. 2.107 is inspected, it is seen that xo ðtÞ signal is
nothing but sum of the shifted and scaled ho ðtÞ functions. Using ho ðtÞ functions, we
can write xo ðtÞ as
X
1 X
1
xo ðtÞ ¼ xc ðnTs Þho ðt nTs Þ ! xo ðtÞ ¼ x½nho ðt nTs Þ: ð2:110Þ
k¼1 k¼1
xo (t )
Fig. 2.107 Output of the sample and hold circuit for sine input signal
www.TechnicalBooksPDF.com
132 2 Multirate Signal Processing
t
0 Ts
t
0 8 16 20
Example 2.30 The signal shown in Fig. 2.109 is passed through a sample and hold
circuit. Find the signal at the output of the sample and hold circuit. Take sampling
period as Ts ¼ 2.
Solution 2.30 First we determine the amplitude values for the time instants t such
that t ¼ nTs where Ts ¼ 2 and n is integer. This operation result is shown in
Fig. 2.110. In addition, we also write the line equations for the computation of the
amplitude values for the given time instants.
The amplitude values of the continuous time signal at time instants t ¼ nTs are
shown clearly in Fig. 2.111.
In the next step, we draw horizontal lines for the determined amplitudes, and for
the first two samples, the drawn horizontal lines are shown in Fig. 2.112.
And for the first 4 samples, the horizontal drawn lines are shown in Fig. 2.113.
Repeating this procedure for all the other samples, we obtain the graph shown in
Fig. 2.114.
The drawn horizontal lines for all the samples are depicted alone in Fig. 2.115.
0 2 4 6 8 10 12 14 16 18 20
t
www.TechnicalBooksPDF.com
2.3 Practical Implementations of C/D and D/C … 133
0 8 10 12 14 16 18 20
t
2 4 6
0 8 10 12 14 16 18 20
t
2 4 6
0 8 10 12 14 16 18 20
t
2 4 6
0 8 10 12 14 16 18 20
t
2 4 6
www.TechnicalBooksPDF.com
134 2 Multirate Signal Processing
0 8 10 12 14 16 18 20
t
2 4 6
During data storage or data transmission, we use bit sequences to represent real
number. Since there are an infinite number of real numbers, it is not possible to
represent this vast amount of real numbers by limited length bit streams. For this
reason, we choose a number of real numbers to represent by bit streams and try to
round other real numbers to the chosen ones when it is necessary to represent them
by bit streams.
Mid-Level Quantizer
A typical quantizer includes the real number intervals used to map real numbers
falling into these intervals to the quantization levels as shown in Fig. 2.116.
The quantizer in Fig. 2.116
is called mid-level quantizer. The quantizer maps
the
real numbers in the range D2 ; D2 to Q0 , maps the real numbers in the range D2 ; 3D
2
to Q1 etc. In this quantizer, D is called the step size of the quantizer. Smaller D
means more sensitive quantizer. The mapping between real numbers and quanti-
zation levels is defined as Qi ¼ QðxÞ where Qi may be chosen as the center of
interleaves.
If Fig. 2.116 is inspected, it is seen that if we have equal number of intervals on
the negative and positive regions, it means that the total number of intervals is an
odd number, which is not a desired situation. Since using N bits, it is possible to
represent 2N levels. For this reason, we design these quantizers such that if one side
has even number of intervals, then the other side has odd number of intervals.
Q (x)
Q 3 Q 2 Q1 Q0 Q1 Q2 Q3
x
X m1 7 5 3 0 3 5 7 X m2
2 2 2 2 2 2 2 2
www.TechnicalBooksPDF.com
2.3 Practical Implementations of C/D and D/C … 135
Q (x)
Q4 Q 3 Q 2 Q1 Q0 Q1 Q2 Q3
x
9 7 5 3 0 3 5 7
2 2 2 2 2 2 2 2 2
Q(x)
Q 3 Q 2 Q1 Q0 Q1 Q2 Q3 Q4
x
7 5 3 0 3 5 7 9
2 2 2 2 2 2 2 2 2
The bit sequences for our quantizer can be assigned to the intervals as in
Fig. 2.119 and centers of the interleavers can be calculated as in Fig. 2.120.
Mid-Rise Quantizer
The mid-rise quantizer is shown in Fig. 2.121. As it is clear from Fig. 2.121,
there is no interval centered at the origin.
www.TechnicalBooksPDF.com
136 2 Multirate Signal Processing
Q (x )
Q (x )
Q (x )
Q4 Q 3 Q 2 Q1 Q1 Q2 Q3 Q4
x
4 3 2 0 2 3 4
www.TechnicalBooksPDF.com
2.3 Practical Implementations of C/D and D/C … 137
Digital
Convert Digital x[n] x o (t) Zero
Code
Codes to Real Order xo (t )
Numbers Hold
(t nTs ) Ts
n
t
0 Ts
where e½n is the quantization error. The zero order hold filter impulse response is
shown Fig. 2.124.
The output of the code-to-digital converter in Fig. 2.123 is
X
1
^xo ðtÞ ¼ ^x½ndðt nTs Þ: ð2:113Þ
n¼1
When ^xo ðtÞ is passed through zero order hold filter, we obtain
X
1
xo ðtÞ ¼ ^xo ðtÞ * ho ðtÞ ! xo ðtÞ ¼ ^x½nho ðt nTs Þ: ð2:114Þ
n¼1
X
1 X
1
xo ð t Þ ¼ x½nho ðt nTs Þ þ e½nho ðt nTs Þ: ð2:115Þ
n¼1 n¼1
www.TechnicalBooksPDF.com
138 2 Multirate Signal Processing
Now let’s consider the last unit of the D/C converter the reconstruction filter as
shown in Fig. 2.125.
The Fourier transform of xo ðtÞ in (2.115) can be calculated using
X
1 X
1
Xo ðwÞ ¼ x½nHo ðwÞejwnTs þ e½nEo ðwÞejwnTs ð2:116Þ
n¼1 n¼1
where taking the common term Ho ðwÞ outside the parenthesis, we obtain
0 1
BX X C
B 1 1 C
Xo ðwÞ ¼ B
B x ½ n e jwnTs
þ e ½n e jwnTs C
C Ho ðwÞ ð2:117Þ
@n¼1 n¼1 A
|fflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflffl}
Xn ðTs wÞ En ðTs wÞ
Since x½n ¼ xa ðnTs Þ, e½n ¼ eðnTs Þ, the continuous time signals xa ðtÞ and eðtÞ
can be obtained from their samples using
www.TechnicalBooksPDF.com
2.3 Practical Implementations of C/D and D/C … 139
X
1
t nTs
xa ð t Þ ¼ x½n sin c ð2:123Þ
n¼1
Ts
and
X
1
t nTs
eð t Þ ¼ e½n sin c : ð2:124Þ
n¼1
Ts
X
1 X1
t nTs t nTs
xr ðtÞ ¼ x½n sin c þ e½n sin c :
n¼1
Ts n¼1
Ts
2.4 Problems
(1) x½n ¼ ½1 2 0 3 1 1 4 1 0 1 2 5 1 3 is
given. Find the signals x½2n, x½3n, x½4n, x½n=2, x½n=3, and x½n=4.
(2) One period of the Fourier transform of x½n around origin is shown in
Fig. 2.126. Draw the Fourier transform of the downsampled signal
y½n ¼ x½2n.
(3) The delay system is described in Fig. 2.127.
3 3 w
4 4
www.TechnicalBooksPDF.com
140 2 Multirate Signal Processing
z 1
2 y2 [ n ]
If
x½n ¼ ½a b c d e f g h ı j k l m n o p r
n¼0
1 if wj\ Mp
Hdn ðwÞ ¼ ð2:125Þ
M \jwj\p:
p
0 if
sin pn
M
hdn ½n ¼ ð2:126Þ
pn
roughly, and find the triangle approximation of (2.126). Calculate the approximated
model for n ¼ 5; . . .; 5.
(6) The graph of XðtÞ is shown in Fig. 2.129. Considering Fig. 2.129 draw the
graph of
X
1
Y ðtÞ ¼ Xðt kTÞ; T ¼ 3: ð2:127Þ
k¼1
t
2 2
www.TechnicalBooksPDF.com
2.4 Problems 141
Ts Ts
X
1
y ½ n ¼ x½k d½n kL:
k¼1
x½n ¼ ½a b c d e f g h l
|{z} j k l m n o p r s:
n¼0
Ts
www.TechnicalBooksPDF.com
142 2 Multirate Signal Processing
X
1
yi ½n ¼ xd ½khai ½n kL:
k¼1
(14) For the system of Fig. 2.133, x½n ¼ cos p4 n 0 n 10, hai ½n is the triangle
approximated reconstruction filter. Find xd ½n; y½n and yi ½n for M ¼ L ¼ 2.
(15) For the system of Fig. 2.134,
1 if jwj\ Tps
Haa ðwÞ ¼
0 otherwise
Express the Fourier transform of x½n in terms of the Fourier transform of xc ðtÞ.
(16) For the system of Fig. 2.135, M ¼ 3, Xn ðwÞ is the one period of the Fourier
transform of x½n. Draw the Fourier transform of xd ½n.
(17) For the system of Fig. 2.136, M ¼ L ¼ 2 and Xn ðwÞ is the one period of the
Fourier transform of x½n.
Ts
X n (w)
x[n] M xd [n]
w Downsampling
2
3 3
X n ( w)
w
2
2
3
x[n] xc [n] xd [n] y[n] yi [n]
hd [n] M L hi [n]
Decimator Interpolation
Downsampling Upsampling
Filter Filter
Decimator Downsampling
Filtre
p
1 if jwj
H d ðw Þ ¼ M ð2:128Þ
0 otherwise
(a) Calculate the inverse Fourier transform of Hd ðwÞ, i.e., calculate hd ½n. Next,
find the triangle approximated model of hd ½n.
(b) For x½n ¼ ½ 1 2 3 4 calculate xo ½n and xd ½n.
x[n] z n0
x[n n0 ]
In linear algebra, basis vectors span the entire vector space. And any vector of the
vector space can be written as the linear combination of the basis vectors. For any
vector in vector space, finding the coefficients of basis vectors used for the con-
struction of the vector can be considered as a transformation. Fourier series are used
to represent periodic signals. Fourier series are used to construct any periodic signal
from sinusoidal signals. The sinusoidal signals can be considered as the basis
signals, and linear combination of these signals with complex coefficients produce
any periodic signal. Once we obtain the coefficients of the base signals necessary
for the construction of a periodic signal, then we have full knowledge of the
periodic signal and instead of transmitting the periodic signal, we can transmit the
coefficients of the base signals. Since at the receiver side, the periodic signal can be
reconstructed using the base coefficients.
In this chapter we will study a new transformation technique called discrete
Fourier transform used for aperiodic digital signals. We will show that similar to the
Fourier series representation of periodic digital signals, aperiodic digital signals can
also be written as a linear combination of sinusoidal digital aperiodic signals. In this
case, aperiodic digital sinusoidal signals can be considered as base signals. And
finding the coefficients of base signals such that their linear combination yields the
aperiodic digital signal is called discrete Fourier transformation of the aperiodic
digital signal. Thus, the discrete Fourier transformation is nothing but finding the
set of coefficients of the base signals for an aperiodic digital signal. And once we
have these coefficients, then we have full knowledge on the aperiodic signal in
another digital sequence.
Before studying discrete Fourier transform, let’s prepare ourselves for the subject,
for this purpose, we will first study the manipulation of digital signals.
Manipulation of Non-periodic Digital Signals
A non-periodic or aperiodic digital signal has finite number of samples. And
these signals are illustrated either by graphics or by number vectors, or by number
sequences. As an example, a digital signal and its vector representation is shown in
Fig. 3.1.
Manipulation of digital signals includes shifting, scaling in time domain and
change in amplitudes.
Shifting of Digital Signals in Time Domain
Given x½n, to obtain x½n n0 ; n0 [ 0, we shift the amplitudes of x½n to the
right by n0 units. If n0 \0, amplitudes are shifted to the left.
Shifting amplitudes to the right by n0 equals to the shifting n ¼ 0 index to the
left by n0 units. This operation is illustrated in the following example.
Example 3.1 Given
x½n ¼ ½a b c d e
|{z} f g h i j k; find x½n 1
n¼0
x½n 3; x½n þ 1; x½n þ 2; and x½n 7:
Solution 3.1 To get x½n 1, we shift amplitudes of x½n to the right by ‘1’ unit.
Shifting amplitudes to the right by ‘1’ unit is the same as shifting n ¼ 0 index to the
left by ‘1’ unit, the result of this operation is
x½n 1 ¼ ½a b c d
|{z} e f g h i j k:
n¼0
x½n 3 ¼ ½a b
|{z} c d e f g h i j k:
n¼0
x[n]
3
1.7 2.5
2
1.5 1.25
x[n] [1.7 1.5 3 3 1.5 2 2.5 1.25]
n n 0
3 2 1 0 1 2 3 4
1.5
3
To get x½n þ 1, we shift amplitudes of x½n to the left by ‘1’ unit obtaining
x½n þ 1 ¼ ½a b c d e f g h i j k:
|{z}
n¼0
x½n þ 2 ¼ ½a b c d e f g h i j k;
|{z}
n¼0
and
x½n 7 ¼ ½|{z}
0 0 0 a b c d e f g h i j k:
n¼0
where it is clear that if the shifting amount goes beyond the signal frontiers, for the
new time instants, 0 values are assigned for the signal amplitudes.
Scaling of Digital Signals in Time Domain
To find x½Mn, we divide the time axis of x½n by M, and keep only integer
division results and omit the non-integer division results. The resulting signal is
nothing but x½Mn.
Example 3.2 If x½n ¼ ½a b c d e
|{z} f g h i j k; find x½2n and
n¼0
x½3n.
Solution 3.2 To get x½2n; we divide time axis of x½n by 2 and keep only integer
division results. First, let’s write all the time indices as shown in
½|{z}
a b
|{z} c
|{z} d
|{z} e
|{z} f g h
|{z} i
|{z} j k :
|{z}
|{z} |{z} |{z}
4 3 2 1 n¼0 1 2 3 4 5 6
ð3:1Þ
½|{z}
a b
|{z} c
|{z} d
|{z} e
|{z} f g h
|{z} i
|{z} j k
|{z}
|{z} |{z} |{z}
42 32 22 12 0
2
1 2 3
2
4
2
5 6
2
2 2 2
ð3:2Þ
x½2n ¼ ½|{z}
a b
|{z} c
|{z} g i
|{z} k
|{z}
|{z}
2 2 0 1 2 3
148 3 Discrete Fourier Transform
x½2n ¼ ½a c |{z}
e g i k:
0
x½3n ¼ ½b e
|{z} h k:
n¼0
x½n þ 3 ¼ ½a b c d e f g h
|{z} i j k:
n¼0
x1 ½3n ¼ ½b e h
|{z} k
n¼0
x½3n þ 3 ¼ ½b e h
|{z} k:
n¼0
X
1
~x½n ¼ x½n kN: ð3:4Þ
k¼1
RRðx½nÞ ¼ ½ N 1 2 3 4 N 1 : ð3:5Þ
~x½n ¼ ½ 3
|{z} 1:5 1:7 1:5 3 :
n¼0
n
3 2 1 0 1 2 3 4 5 6
1.5 1.5
3.5 3.5
n
3 2 1 0 1 2 3 4 5 6
1 .5 1 .5
3 .5 3 .5
3.1 Manipulation of Digital Signals 151
n
3 2 1 0 1 2 3 4 5 6
1 .5 1 .5
3. 5 3.5
n
3 2 1 0 1 2 3 4 5 6
1.5 1. 5
3.5 3.5
Example 3.5 The periodic signal ~x½n is shown in Fig. 3.5, find ~x½n 3; and
~x½n þ 2.
Solution 3.5 The period of the signal is N ¼ 5, and signal amplitudes for one
period are
x½n ¼ ½|{z}
3 1:5 1:7 1:5 3:5: ð3:8Þ
n¼0
When x½n is rotated to the right by 3 units, we get
RRðx½n; 3Þ ¼ ½|{z}
1:7 1:5 3:5 3 1:5: ð3:9Þ
n¼0
To find ~x½n þ 2, one period of ~x½n is rotated to the left by 2 units yielding
RLðx½n; 2Þ ¼ ½|{z}
1:7 1:5 3:5 3 1:5: ð3:11Þ
n¼0
152 3 Discrete Fourier Transform
x½n ¼ ½|{z}
3 1:5 1:7 1:5 3:5 2:2 4 ð3:13Þ
n¼0
where it is obvious that the period of the signal is N ¼ 7. Find ~x½2n and ~x½3n.
Solution 3.6 One period of ~x½2n equals to x½2n, and one period of ~x½3n equals to
x½3n. The time scaled signals x½2n and x½3n can be calculated as
x½2n ¼ ½|{z}
3 1:7 3:5 4
n¼0
ð3:14Þ
x½3n ¼ ½|{z}
3 1:5 4:
n¼0
And using (3.14) the periodic signals ~x½2n and ~x½3n can be written as
~x½3n ¼ ½ 3 1:5 4 3
|{z} 1:5 4 3 1:5 4 :
n¼0
Example 3.7 The periodic signal ~x½n in its one interval equals to
x½n ¼ ½|{z}
3 1:5 1:7 1:5 3:5 2:2 4
n¼0
where it is obvious that the period of the signal is N ¼ 7. Find ~x½2n 3.
Solution 3.7 To obtain ~x½2n 3, let’s first find one period of the shifted signal
~x½n 3: One period of ~x½n 3 is obtained by rotating one period of ~x½n to the
right by 3 yielding
RRðx½n; 3Þ ¼ ½3:5
|ffl{zffl} 2:2 4 3 1:5 1:7 1:5 ð3:15Þ
n¼0
Let’s denote (3.15) by x1 ½n, i.e., one period of ~x½n ¼ ~x½n 3, then we have
x1 ½n ¼ ½3:5
|ffl{zffl} 2:2 4 3 1:5 1:7 1:5: ð3:16Þ
n¼0
Next using (3.16), we can evaluate x1 ½2n which is nothing but one period of
~x½2n 3 as
x1 ½2n ¼ ½3:5
|ffl{zffl} 4 1:5 1:5:
n¼0
We can apply this practical method to the previous example where the periodic
signal had been given as in Fig. 3.10.
One period of is ~x½n in Fig. 3.10 is
x½n ¼ ½ a b c d : ð3:18Þ
RRðx½nÞ ¼ ½ a b c d ð3:19Þ
~x½n ¼ ½ d c b a
|{z} d c b a d c b :
n¼0
Calculation of the periodic signal ~x½n0 n can be achieved via the following
steps.
(1) We first find one period of ~x1 ½n ¼ ~x½n using rotate inside operation.
(2) Then one period of ~x1 ½n is rotated to the right if n0 [ 0 to the left if n0 \0 by
jn0 j units and one period of ~x1 ½n0 n is obtained.
Example 3.9 The periodic signal ~x1 ½n is shown in Fig. 3.11. Find ~x1 ½2 n.
Solution 3.9 From Fig. 3.11 one period of ~x½n can be found as
x½n ¼ ½ a b c d : ð3:20Þ
RRðx½nÞ ¼ ½ a d c b ð3:21Þ
~x½2 n ¼ ½ c b a d c
|{z} b a d c b a d :
n¼0
Example 3.10 The periodic signal ~x½n is shown in Fig. 3.11. Find ~x½2 n.
Fig. 3.12
Solution 3.10 One period of ~x½n equals to
x½n ¼ ½ a b c d : ð3:23Þ
RRðx½nÞ ¼ ½ a d c b
~x½2 n ¼ ½ c b a d c
|{z} b a d c b a d :
n¼0
Exercise: For the previous exercise find ~x½4 n and ~x½4 n.
n
3 2 1 0 1 2 3
3.1 Manipulation of Digital Signals 157
n
3 2 1 0 1 2 3
or as
X
1
u½ n ¼ d½n k ð3:28Þ
k¼0
which is equal to
X
n
u½ n ¼ d½k: ð3:29Þ
k¼1
X
N 1
N if m ¼ 0
ej N km ¼
2p
ð3:32Þ
k¼0
0 otherwise:
158 3 Discrete Fourier Transform
1 xN
1 þ x þ x2 þ x3 þ þ xN1 ¼ ð3:34Þ
1x
as in
1 ej N mN
2p
1 ej2pm
j2p j2p j2p
N ðN1Þm
1þe Nm þe N 2m þ þe ¼ j2p
¼ : ð3:35Þ
1e 1 ej N m
2p
Nm
1 ej2pm 11
¼ ! 0: ð3:36Þ
1 ej N m 1 ej N m
2p 2p
Hence we have
X
N 1
ej N km ¼ 0;
2p
m 6¼ 0: ð3:37Þ
k¼0
X
N 1 X
N 1
ej N km ¼
2p
1 ! N: ð3:38Þ
k¼0 k¼0
X
N 1
j2p N if m ¼ 0
e N km ¼ ð3:39Þ
k¼0
0 otherwise:
Basically we can divide signals into two categories as, continuous and digital
signals. And in both classes, we can have periodic and non-periodic (aperiodic)
signals, and Fourier transform and representation methods are defined for these
classes of signals. In Fig. 3.15; the relation between signals and their transform or
representation types are summarized.
3.2 Review of Signal Types 159
Signals
Fourier Series Fourier Transform Discrete Time Fourier Discrete Time Fourier
Representation
Series Representation Transform
Fourier Transform
Discrete Time Fourier Discrete Fourier
Transform Trasform
Let’s briefly review the signal types, their transformations and representations.
Non-periodic Continuous Time Signals
If xc ðtÞ is a non-periodic continuous time signal, then its Fourier is defined as
Z1
X c ðw Þ ¼ xc ðtÞejwt dt ð3:40Þ
1
Z1
1
xc ð t Þ ¼ Xc ðwÞejwt dw ð3:41Þ
2p
1
where w ¼ 2pf is the angular frequency. The Fourier transform and inverse Fourier
transform pairs show small differences in their coefficients in literature. In general,
Fourier transform and inverse Fourier transform can be defined as
Z1
Xc ðwÞ ¼ K1 xc ðtÞejwt dt ð3:42Þ
1
160 3 Discrete Fourier Transform
and
Z1
xc ð t Þ ¼ K 2 Xc ðwÞejwt dw ð3:43Þ
1
where
1
K1 K2 ¼ : ð3:44Þ
2p
pffiffiffiffiffiffi pffiffiffiffiffiffi
Thus if K1 ¼ 1= 2p, then K2 should be 1= 2p so that K1 K2 ¼ 1=2p. As
another example if K1 ¼ 1=2p then K2 ¼ 1:
Periodic Continuous Time Signals
If ~xc ðtÞ is a periodic signal with fundamental period T, then
And for the periodic signal ~xc ðtÞ the Fourier series representation is defined as
1 X 1
2p
~xc ðtÞ ¼ ~x½k ejk T t ð3:46Þ
T k¼1
If we define 2p=T by w0 , i.e., w0 ¼ 2p=T, then the above equations can also be
written as
1 X 1
~xc ðtÞ ¼ ~xc ½k ejkw0 t ð3:48Þ
T k¼1
and
Z
~xc ½k ¼ ~xc ðtÞejkw0 t dt ð3:49Þ
T
In general, the Fourier series representation of ~xc ðtÞ and its Fourier series
coefficients are given as
3.2 Review of Signal Types 161
X
1
~xc ðtÞ ¼ K1 ~xc ½k ejkw0 t ð3:50Þ
k¼1
and
Z
~xc ½k ¼ K2 ~xc ðtÞejkw0 t dt ð3:51Þ
T
pffiffiffiffi
where the coefficients satisfy K1 K2 ¼ 1=T. Hence, if K1 ¼ 1= T then K2 ¼
pffiffiffiffi
1= T and Fourier series representation and Fourier coefficients expressions
becomes as
1 X 1
~xc ðtÞ ¼ pffiffiffiffi ~xc ½kejkw0 t ð3:52Þ
T k¼1
and
Z
1
~xc ½k ¼ pffiffiffiffi ~xc ðtÞejkw0 t dt: ð3:53Þ
T
T
Now let’s assume that one period of ~xc ðtÞ is xc ðtÞ, i.e., xc ðtÞ is an aperiodic
signal. Then the Fourier series coefficients of ~xc ðtÞ is computed as
Z Z1
jkw0 t
~xc ½k ¼ ~xc ðtÞe dt ! ~xc ½k ¼ xc ðtÞejkw0 t dt: ð3:54Þ
T 1
Z1
X c ðw Þ ¼ xc ðtÞejwt dt ð3:55Þ
1
Z1 Z1
~xc ½k ¼ xc ðtÞejkw0 t dt $ Xc ðwÞ ¼ xc ðtÞejwt dt ð3:56Þ
1 1
162 3 Discrete Fourier Transform
we see that
where
2p
w0 ¼ : ð3:58Þ
T
And the relation between ~xc ðtÞ and xc ðtÞ can be written as
X
1
~xc ðtÞ ¼ xc ðt kT Þ: ð3:59Þ
k¼1
2p X1
~xc ðwÞ ¼ ~xc ½kdðw kw0 Þ; w0 ¼ 2p=T: ð3:60Þ
T k¼1
X
1
Xn ðwÞ ¼ x½nejwn ð3:61Þ
n¼1
where w ¼ 2pf is the angular frequency, and the inverse Fourier transform is
defined as
Z
1
x½n ¼ Xn ðwÞejwn dw: ð3:62Þ
2p
2p
1X 2p
~x½n ¼ ~xn ½kejk N n ð3:64Þ
N k;N
P
Note: ðÞ means summation is taken over any interval of length N; i.e.,
n;N
summation is taken over one period length.
In general, the Fourier series representation and calculation of Fourier series
coefficient of periodic signals are done via
X 2p
~x½n ¼ K1 ~xn ½k ejk N n ð3:66Þ
k;N
and
X
~x½nejk N n
2p
~xn ½k ¼ K2 ð3:67Þ
n;N
such that
1
K1 K2 ¼ : ð3:68Þ
N
2p X1
2p
~xðwÞ ¼ ~xn ½kdðw kw0 Þ; w0 ¼ : ð3:69Þ
N k¼1 N
Example 3.13 If the Fourier series representation of digital periodic signal ~x½n is
1X 2p
~x½n ¼ ~xn ½kejk N n ð3:70Þ
N k;N
1X 2p
~x½n ¼ ~xn ½kejk N n ð3:73Þ
N k;N
1 XX
~x½r ejk N r ejk N n
2p 2p
~x½n ¼
N k;N r;N
|fflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflffl}
~xn ½k
1X
N 1 X
N 1
~x½r ejk N r ejk N n
2p 2p
¼
N k¼0 r¼0
1 X
N1 X
N1
~x½r ejk N ðrnÞ
2p
¼
N k¼0 r¼0 ð3:74Þ
1X
N 1 X
N 1
ejk N ðrnÞ
2p
¼ ~x½r
N r¼0 k¼0
|fflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflffl}
N if r ¼ n
¼
0 otherwise
1
¼ N~x½n
N
¼ ~x½n
X
1
x½n y½n ¼ x½k y½n k ð3:75Þ
k¼1
or
X
1
x ½ n y ½ n ¼ x½n k y½k: ð3:76Þ
k¼1
3.3 Convolution of Periodic Digital Signals 165
Let ~xn ½n and ~x2 ½n be digital periodic signals with common period N, i.e., ~x1 ½n ¼
~x1 ½n þ N and ~x2 ½n ¼ ~x2 ½n þ N :
The period convolution of ~x1 ½n and ~x2 ½n is defined as
X
N 1
~x3 ½n ¼ ~x1 ½m~x2 ½n m: ð3:77Þ
m¼0
The digital sequence ~x3 ½n is also periodic with period N. How to calculate
periodic convolution? This is explained as follows.
(1) Since ~x3 ½n is periodic with the same period N; we can focus on the calculation
of one period of ~x3 ½n starting from 0, i.e., consider 0 n N 1.
(2) When the summation in (3.77) is expanded, we get
~x3 ½n ¼ ~x1 ½0~x2 ½n þ ~x1 ½1~x2 ½n 1 þ þ ~x1 ½N 1~x2 ½n ðN 1Þ ð3:78Þ
where we can use only one period of ~x2 ½n; ~x2 ½n 1; and ~x2 ½N 1; 0 n N 1.
Example 3.14 The periodic signals ~x1 ½n and ~x2 ½n with period N ¼ 4 are shown in
Fig. 3.16. Calculate their 4-point periodic convolution.
Solution 3.14 The periodic convolution for the given signals is calculated using
X
N 1
~x3 ½n ¼ ~x1 ½m~x2 ½n m: ð3:79Þ
m¼0
~
x1[n]
2 2
1 1 1 1 1
n
4 3 2 1 0 1 2 3 4
1 1
~
x2 [n]
1 1 1 1
n
4 3 2 1 0 1 2 3 4
1 1 1 1 1
Fig. 3.16 The periodic signals ~x1 ½n and ~x2 ½n for Example 3.14
166 3 Discrete Fourier Transform
~x3 ½n ¼ ~x1 ½0~x2 ½n þ ~x1 ½1~x2 ½n 1 þ ~x1 ½2~x2 ½n 2 þ ~x1 ½3~x2 ½n 3: ð3:80Þ
One period of ~x2 ½n; ~x2 ½n 1; ~x2 ½n 2; and ~x2 ½n 3 for 0 n 3 can be
calculated using rotate right operation yielding
~x2op ½n ¼ ½ 1 1 1 1
~x2op ½n 1 ¼ ½ 1 1 1 1
ð3:81Þ
~x2op ½n 2 ¼ ½ 1 1 1 1
~x2op ½n 3 ¼ ½ 1 1 1 1 :
yielding
~x3op ½n ¼ 1 ½ 1 1 1 1 þ 1 ½ 1 1 1 1 1 ½1 1 1 1
þ2 ½1 1 1 1
X
N 1
~x3 ½n ¼ ~x1 ½m~x2 ½n m ð3:83Þ
m¼0
3.3 Convolution of Periodic Digital Signals 167
P
N1
n ¼ 0; ~x3 ½0 ¼ ~x1 ½m~x2 ½m
m¼0
P
N1
n ¼ 1; ~x3 ½1 ¼ ~x1 ½m~x2 ½1 m
m¼0
P
N1
n ¼ 2; ~x3 ½2 ¼ ~x1 ½m~x2 ½2 m
m¼0
..
.
P
N1
n ¼ N 1; ~x3 ½N 1 ¼ ~x1 ½m~x2 ½ðN 1Þ m:
m¼0
X
N 1
~x3 ½0 ¼ ~x1 ½m~x2 ½m ð3:84Þ
m¼0
~x3 ½0 ¼ ~x1 ½0~x2 ½0 þ ~x1 ½1~x2 ½1 þ ~x1 ½2~x2 ½2 þ ~x1 ½3~x2 ½3 ð3:85Þ
~x2 ½1 ¼ ~x2 ½3; ~x2 ½2 ¼ ~x2 ½2; ~x2 ½3 ¼ ~x2 ½1: ð3:86Þ
~x3 ½0 ¼ ~x1 ½0~x2 ½0 þ ~x1 ½1~x2 ½3 þ ~x1 ½2~x2 ½2 þ ~x1 ½3~x2 ½1 ð3:87Þ
½ ~x1 ½0 ~x1 ½1 ~x1 ½2 ~x1 ½3 and ½ ~x2 ½0 ~x2 ½0 ~x2 ½2 ~x2 ½1
where it is clear that the vector ½ ~x2 ½0 ~x2 ½3 ~x2 ½3 ~x2 ½1 can be obtained from
one period of ~x2 ½n via rotate inside operation.
Hence we can write
X
N 1
~x3 ½0 ¼ ~x1 ½m~x2 ½m ! ~x3 ½0 ¼ ~x1op ½m ~x2op ½m ð3:88Þ
m¼0
X
N 1
~x3 ½1 ¼ ~x1 ½m~x2 ½1 m ! ~x3 ½1 ¼ ~x1op ½m ~x2op ½1 m: ð3:89Þ
m¼0
168 3 Discrete Fourier Transform
X
N 1
~x3 ½1 ¼ ~x1 ½m~x2 ½1 m ! ~x3 ½1 ¼ ~x1op ½m RR ~x2op ½m ð3:90Þ
m¼0
X
N 1
~x3 ½2 ¼ ~x1 ½m~x2 ½2 m ! ~x3 ½2 ¼ ~x1op ½m RR ~x2op ½1 m ð3:91Þ
m¼0
X
N 1
~x3 ½3 ¼ ~x1 ½m~x2 ½3 m ! ~x3 ½3 ¼ ~x1op ½m RR ~x2op ½2 m ð3:92Þ
m¼0
..
.
X
N 1
~x3 ½N 1 ¼ ~x1 ½m~x2 ½N 1 m !
m¼0
Example 3.15 The periodic signals ~x1 ½n and ~x2 ½n with period ¼ 4 are shown in
Fig. 3.17. Calculate their 4-point periodic convolution using alternative periodic
convolution method.
~
x1[n]
2 2
1 1 1 1 1
n
4 3 2 1 0 1 2 3 4
1 1
~
x2 [n]
1 1 1 1
n
4 3 2 1 0 1 2 3 4
1 1 1 1 1
Fig. 3.17 The periodic signals ~x1 ½n and ~x2 ½n for Example 3.15
3.3 Convolution of Periodic Digital Signals 169
X
N 1
~x3 ½n ¼ ~x1 ½m~x2 ½n m
m¼0
~x2op ½m ¼ ½ 1 1 1 1 :
Then
~x2op ½m ¼ ½ 1 1 1 1
~x2op ½1 m ¼ RRð~x2op ½mÞ ! RRð~x2op ½mÞ ¼ ½ 1 1 1 1
ð3:95Þ
~x2op ½2 m ¼ RRð~x2op ½1 mÞ ! RRð~x2op ½mÞ ¼ ½ 1 1 1 1
~x2op ½3 m ¼ RRð~x2op ½2 mÞ ! RRð~x2op ½mÞ ¼ ½ 1 1 1 1
and
Using (3.95) and (3.96) in (3.94), we can calculate the periodic convolution
values as
~x3 ½0 ¼ ½ 1 1 1 2 ½ 1 1 1 1 !
~x3 ½0 ¼ 1ð1Þ þ 1ð1Þ þ ð1Þ1 þ 2 1 !
~x3 ½3 ¼ 1
Hence,
~x3op ½n ¼ ½ 1 3 1 3 :
~x3 ½n ¼ ½ 1 3 1 3 1
|{z} 3 1 3 1 3 1 3 :
n¼0
X
1
Xn ðwÞ ¼ x½nejwn
n¼1
X1
1 1
¼ d½n þ 1 þ d½n 1 ejwn
2 2 ð3:97Þ
n¼1
1
¼ ejw þ ejw
2
¼ cosðwÞ:
The aperiodic digital signal x½n and its Fourier transform is shown in Fig. 3.18.
Let’s generate the periodic signal ~x½n with period N from x½n via
X
1
~x½n ¼ x½n lN: ð3:98Þ
l¼1
Xn(w)
x[n]
1 1
X n (w) x[n] e jwn
2 n
w
3 0 3 2
1 1 2
2 2 2 2
1 1
Fig. 3.18 The aperiodic digital signal x½n in Example 3.16 and its Fourier transform
3.4 Sampling of Fourier Transform 171
The Fourier series coefficients of the periodic signal ~x½n in (3.98) are obtained
from the Fourier transform of x½n, i.e., Xn ðwÞ, via sampling operation in frequency
domain as in
~ ½k ¼ Xn ðwÞj
X ð3:99Þ
w¼kws
where ws ¼ 2p
N is the sampling period in radian unit.
Example 3.17 ~x½n is a periodic signal with period N ¼ 4, and we have x½n ¼
2 d½ n þ 1 þ 2 d½ n
1 for one period of this signal. In addition, the periodic signal
1 1
X
1
~x½n ¼ x½n lN: ð3:100Þ
l¼1
Find the Fourier series coefficients of ~x½n using Xn ðwÞ the Fourier transform of
x½n:
Solution 3.17 In Example 3.17, we found the Fourier transform of x½n ¼
2 d½ n þ 1 þ 2 d½ n
1 as
1 1
Xn ðwÞ ¼ cosðwÞ:
~ ½k ¼ Xn ðwÞj
X ð3:101Þ
w¼kws
where ws ¼ 2p
N ! ws ¼ 4 ! ws ¼ 2. Hence (3.101) yields
2p p
~ ½k ¼ Xn ðwÞjw¼kw ! X
X ~ ½k ¼ cos kp :
~ ½k ¼ cosðwÞjw¼kp ! X ð3:102Þ
s 2 2
X n (w)
x[n]
1 1
X n (w) x[n] e jwn
2 n
w
n 3 0 3 2
1 1 2
2 2 2 2
1 1
n w
4 1 1 4 3 0 3 2
2
2 2 2 2
1 1
~
X [k ] [ 1 0 1 0 1 0 1 0 ]
k 0
Fig. 3.19 Fourier series coefficients are obtained from Fourier transform via sampling operation
X
N 1
~ ½k ¼
X ~x½nej N kn
2p
ð3:103Þ
n¼0
and for 0 n\N, ~x½n ¼ x½n where x½n is one period of ~x½n. Then (3.103) can be
written as
X
N 1
~ ½k ¼
X x½nej N kn
2p
ð3:104Þ
n¼0
which is also a periodic signal with the same period as the time domain signal ~x½n.
Let’s consider one period of X~ ½k
3.5 Discrete Fourier Transform 173
~ ½k if 0 k\N
X
X ½k ¼ ð3:105Þ
0 otherwise
which is called the discrete Fourier transform of x½n. Thus, N point discrete
Fourier transform of x½n is defined as
X
N 1
x½nej N kn ;
2p
X ½k ¼ 0 k\N: ð3:106Þ
n¼0
1XN1
2p
x ½ n ¼ X ½kej N kn ; 0 n\N:
N k¼0
1X 2p
x½n ¼ X ½k ej N kn ; n; N: ð3:108Þ
N k;N
~ ½k ¼ Xn ðwÞj 2p
X w¼kws ws ¼ : ð3:109Þ
N
we can write
2p
X ½k ¼ Xn ðwÞjw¼kws ; ws ¼ ; 0 k\N ð3:111Þ
N
which means that the discrete Fourier transform of x½n is nothing but a mathe-
matical sequence obtained from one period of Xn ðwÞ via sampling operation in
frequency domain, and the sampling period is chosen as ws ¼ 2pN.
174 3 Discrete Fourier Transform
x½n ¼ ½ 1 1 1 2 :
X
41
x½nej 4 kn ;
2p
X ½k ¼ 0 k\4 ð3:112Þ
n¼0
X ½k ¼ ½ 3 2 þ j 3 2 j :
Example 3.19 Find the aperiodic digital signal whose DFT coefficients are given as
X ½k ¼ ½ 3 2 þ j 3 2 j :
1X41
2p
x½n ¼ X½kej 4 kn ; 0 n\4 ð3:115Þ
4 k¼0
we obtain
0 1
1B 2p 2p 2p C
x½n ¼ @ X ½0 ej0 þ X ½1 ej 4 1n þ X ½2 ej 4 2n þ X ½3 ej 4 3n A: ð3:115Þ
4 |{z} |{z} |{z} |{z}
3 2þj 3 2j
3.5 Discrete Fourier Transform 175
1 p 3p
x ½ n ¼ 3 þ ð2 þ jÞej2n 3ejpn þ ð2 jÞej 2 n ð3:116Þ
4
x ½ 0 ¼ 1 x ½ 1 ¼ 1 x½2 ¼ 1 x ½ 3 ¼ 2
x½n ¼ ½ 1 1 1 2 :
for N ¼ 3, we obtain
X
1
x½nej N kn
2p
X ½k ¼ 1 k 1: ð3:117Þ
n¼1
which is simplified as
2p
X ½k ¼ cos k ; 1 k 1: ð3:119Þ
3
n
1 1
176 3 Discrete Fourier Transform
1
k ¼ 1 ! X ½1 ¼
2
k ¼ 0 ! X ½0 ¼ 1
1
k ¼ 1 ! X ½1 ¼
2
That is,
1
12 12
X ½k ¼ ½ 1
|{z} :
k¼0
Note: For the previous example, discrete Fourier transform is calculated for
N ¼ 3 which is equal to the length of the aperiodic sequence x½n. Hence, if it is not
clearly mentioned, the default length of the DFT computation is the same as the
length of the aperiodic sequence x½n.
Example 3.21 DFT coefficients of an aperiodic signal are given as
1
12 12
X ½k ¼ ½ 1
|{z} : ð3:120Þ
k¼0
1X 2p
x½n ¼ X ½k ej N kn ; n; N
N k;N
1X 1
2p
x½n ¼ X ½kej 3 kn ; 1 n 1: ð3:121Þ
3 k¼1
which is simplified as
1 1 2p 1 2p
x ½ n ¼ ej 3 n þ 1 ej 3 n : ð3:122Þ
3 2 2
Let’s evaluate (3.122), i.e., x½n, for n ¼ 1; 0; 1. We first calculate for n ¼ 1
as
1 1 2p 1 2p
x½1 ¼ ej 3 ð1Þ þ 1 ej 3 ð1Þ
3 2 2
which is simplified as
1 2p 1 1 1
x½1 ¼ cosð Þ þ 1 ! x½1 ¼ þ 1 ! x½1 ¼
3 3 3 2 2
which is simplified as
1 2p 1 1 1
x ½ 1 ¼ cosð Þ þ 1 ! x½1 ¼ þ 1 ! x ½ 1 ¼ :
3 3 3 2 2
n
1 1
When (3.123) and (3.124) are compared to each other, we see that (3.124) can be
obtained from (3.123) by rotate left or rotate right operations.
Example 3.22 Find the 8-point discrete Fourier transform of the signal in Fig. 3.21.
Solution 3.22 Although the length of the aperiodic signal equals to 2, the DFT will
be calculated for 8-points. For this reason, we first pad the signal by zeros so that its
length equals to 8. So the finite length signal becomes as
x½n ¼ ½1 0
|{z} 1 0 0 0 0 0:
n¼0
X
6
x½nej 8 kn ;
2p
X ½k ¼ 1 k 6: ð3:125Þ
n¼1
which is simplified as
1 j2pk
e 8 þ ej 8 kn :
2p
X ½k ¼ ð3:126Þ
2
3.5 Discrete Fourier Transform 179
And when the Fourier series coefficients in (3.127) are explicitly calculated, we
obtain
2p
4p
6p
8p
10p
12p
X ½k ¼ cos 2p
8 cosð0Þ cos 8 cos 8 cos 8 cos 8 cos 8 cos 8
which is simplified as
X ½k ¼ ½0:7071 1
|{z} 0:7071 0 0:7071 1 0:7071 0:
k¼0
Example 3.23 DFT coefficients are complex numbers. And those complex coeffi-
cients have magnitude and phase values. For the DFT coefficients
X ½k ¼ ½ 3 2 þ j 3 þ j 2 j
find jX ½kj, i.e., magnitudes of the DFT coefficients, and \X ½k , i.e., phase infor-
mation of DFT coefficients.
Solution 3.23 For the complex number x ¼ a þ bj the magnitude and phase
information is calculated as
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi b1
j xj ¼ ða2 þ b2 Þ; \ tan : ð3:128Þ
a
Using (3.128) the magnitude and phase of each DFT coefficient is calculated as
pffiffiffiffiffiffiffiffiffiffiffiffiffiffi
j X ½ 0 j ¼ 32 þ 02 ! 3 \X ½0 ¼ tan1 03 ! 0
pffiffiffiffiffiffiffiffiffiffiffiffiffiffi pffiffiffi
j X ½ 1 j ¼ 22 þ 1 2 ! 5 \X ½1 ¼ tan1 12 ! 0:15p
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi pffiffiffiffiffi
jX ½2j ¼ ð3Þ2 þ 12 ! 10 \X ½2 ¼ tan1 13 ! 0:1p
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi pffiffiffi
jX ½3j ¼ 22 þ ð1Þ2 ! 5 \X ½3 ¼ tan1 12 ! 0:15p
| X [k ] |
10
3
5 5
k
0 1 2 3
X [k ]
0.15
k
0 1 2 3
0 .1 0.15
Fig. 3.22 Magnitude and phase plot of DFT coefficients in Example 3.23
X n (w)
2
1.25
0.75
0.32
w
0 π 2π 3π 4π 5π 6π 7π 8π
4 4 4 4 4 4 4 4
Fig. 3.23 One period of the discrete time Fourier transform of a non-periodic signal
Solution 3.24
(a) DFT coefficients are obtained by sampling of Xn ðwÞ in frequency domain. That
is,
2p
X ½k ¼ Xn ðwÞjw¼kws ws ¼ : ð3:129Þ
N
Since N ¼ 4, we take 4 samples from one period of Xn ðwÞ. The sampling period
is
2p 2p
ws ¼ ! ws ¼ :
8 4
X n (w)
2
3 w kws ws
4
2
1.25
0.75
0.32
w
0 2 4 6 8
4 4 4 4
k 0 k 1 k 2 k 3
X ½k ¼ ½ 0 3 1:25 0:75 :
(b) For N ¼ 8, we take 8 samples from one period of Xn ðwÞ. The sampling period
is
2p p
ws ¼ ! ws ¼ :
8 4
X n (w)
3 2
w kws ws
8
2
1.25
0.75
0.32
w
0 2 3 4 5 6 7 8
4 4 4 4 4 4 4 4
k 0 k 1 k 2 k 3 k 4 k 5 k 6 k 7
When we study sampling theorem, we have seen that during sampling operation if
we do not take sufficient number of samples from analog signal, we cannot per-
fectly reconstruct analog signal at the receiver side from its digital samples. And the
effect of this situation is seen as aliasing or overlapping in frequency domain.
We have seen that DFT coefficients of a non-periodic digital signal x½n are
nothing but the samples taken from one period of its Fourier transform, for instance,
samples taken for 0 w\2p. We can reconstruct the digital signal x½n from its
DFT coefficients using
1XN 1
2p
x r ½ n ¼ X ½kej N kn ; 0 n\N: ð3:130Þ
N k¼0
Now we ask the question: Is xr ½n always equal to x½n ? If not always, then what
is the criteria for xr ½n to be equal to x½n ?
We know that N-point DFT coeffcients of x½n equals to the one period of the
DFS coefficients of the periodic signal ~x½n, and the relation between x½n and ~x½n
can be stated as
X
1
~x½n ¼ x½n kN : ð3:131Þ
k¼1
Let the length of the digital signal x½n be M. If M [ N, then the shifted suc-
cessor signals x½n kN overlap each other. And when the shifted signals are
summed, one period of ~x½n is not equal to x½n anymore. This means that using the
inverse DFT operation, x½n cannot be obtained exactly. The amount of distortion in
the reconstructed signal depends on the overlapping amount.
Example 3.25 For x½n ¼ ½ 1 1 1 and N ¼ 2, calculate
X
1
~x½n ¼ x½n kN :
k¼1
x [n 4] x [n 4]
1 1 1 x [n 2] x [n 2] 1 1 1
1 1 1 x[n ] 1 1 1
1 1 1
n
6 5 4 3 2 1 0 1 2 3 4 5 6
~
x[n]
0 1 0 1 0 1 0 1 0 1 0 1
n
6 5 4 3 2 1 0 1 2 3 4 5 6
X
1
x½nej 2 kn ;
2p
X ½k ¼ 0k1
n¼0
yielding
X2 ½k ¼ ½ 0 2 :
X3 ½k ¼ ½ 1 2 2 :
1X 1
2p
x ½ n ¼ X2 ½k ej 2 kn ; 0n1
2 k¼0
184 3 Discrete Fourier Transform
x½n ¼ ½ 1 1
x½n ¼ ½ 1 1 1 :
X
2
x½nej 3 kn ;
2p
X ½k ¼ 0k2 ð3:132Þ
n¼0
When the summation in (3.132) is expanded for each k value, we obtain the
following equations
½k ¼ x½n EN ;
X N ¼ 3: ð3:134Þ
½k E1 :
x½n ¼ X ð3:135Þ
N
3.5 Discrete Fourier Transform 185
In a similar manner, the inverse 3-point DFT formula can be written in matrix
form. Expanding
1X 2
2p
x½n ¼ X ½k ej 3 kn ; 0n2 ð3:136Þ
3 k¼0
we get
1
½k E1
x½n ¼ X ð3:139Þ
N
we obtain
1
E1
N ¼ E : ð3:140Þ
N N
And the correspondence between signals and their DFS coefficients are shown as
DFS
~
~x½n $ X½k
DFS
~x1 ½n $ X ~1 ½k
DFS
~x2 ½n $ X ~2 ½k :
Properties
Linearity:
DFS
a~x1 ½n þ b~x2 ½n $ aX~1 ½k þ bX
~2 ½k
Duality:
~ ½n DFS
X $ N~x½k
Shifting in time:
DFS
~
~x½n m $ ej N km X½k
2p
Shifting in frequency:
2p DFS
~ l
ej N ln~x½n $ X½k
X
N 1
DFS
~x1 ½m~x2 ½n m $ X ~ 1 ½k X
~2 ½k
m¼0
DFS 1XN 1
~1 ½mX
~2 ½k m
~x1 ½n~x2 ½n $ X
N k¼0
3.5 Discrete Fourier Transform 187
Conjugate:
~ ½k
DFS
~x ½n $ X
DFS 1
Ref~x½ng $ ~ ½k þ X
X ~ ½k
2
DFS 1
jImf~x½ng $ ~ ½k X
X ~ ½k
2
Real part:
1 DFS
~
ð~x½n þ ~x ½nÞ $ RefX½kg
2
Imaginary part:
1 DFS
~
ð~x½n ~x ½nÞ $ jImfX½kg
2
~ ½k ¼ X
X ~ ½k
Absolute value:
X~ ½k ¼ X
~ ½k
Phase value:
~ ½k ¼ \X
\X ~ ½k
188 3 Discrete Fourier Transform
Real part:
1 DFS
~
ð~x½n þ ~x½nÞ $ RefX½kg
2
Imaginary part:
1 DFS
~
ð~x½n ~x½nÞ $ jImfX½kg
2
The discrete Fourier transform of an aperiodic sequence x½n with length N equals to
the one period of the Fourier series coefficients of the periodic signal ~x½n obtained
from x½n as
X
1
~x½n ¼ x½n kN
k¼1
and the relation between DFT coefficients of x½n and one period of Fourier series
coefficients of the periodic signal ~x½n is given as
~ ½k if 0 k N 1
X
X ½k ¼
0 otherwise:
Let’s denote one period of ~x½n for 0 n N 1 by x½ðnÞN . It is clear that if the
length of x½n is N then x ðnÞN ¼ x½n. However, if the length of x½n is a number
other than N then
x ðnÞN 6¼ x½n:
If not indicated otherwise, we will assume that the length of x½n and period of
~x½n are equal to each other.
Properties
N ¼ maxfN1 ; N2 g
3.5 Discrete Fourier Transform 189
NpointDFT
x 1 ½ n $ X1 ½k
NpointDFT
x 2 ½ n $ X2 ½k
Linearity:
DFT
ax1 ½n þ bx2 ½n $ aX1 ½k þ aX2 ½k
Circular Shifting:
DFT 2p
x ðn mÞN $ ej N km X ½k
Duality:
DFT
x½n $ X ½k
DFT
X ½n $ Nx ðkÞN
Symmetry:
DFT
x ½n $ X ðk ÞN
DFT
X ðnÞN $ X ½k
DFT
Refx½ng $ Xep ½k; ep :even part
DFT
jImfx½ng $ Xop ½k ; op :odd part
DFT
xep ½n $ RefX ½k g
DFT
xop ½n $ jImfX ½kg
Circular Convolution:
DFT
x1 ½n $ X1 ½k
DFT
x2 ½n $ X2 ½k
190 3 Discrete Fourier Transform
If
Y ½k ¼ X1 ½k X2 ½k
then
X
N 1
y ½ n ¼ x1 ½mx2 ½ðn mÞN
m¼0
or
X
N 1
y ½ n ¼ x2 ½mx1 ½ðn mÞN :
m¼0
X
N 1
x1 ½mx2 ½ðn mÞN
m¼0
Example 3.27 What does x ðnÞ5 0 n 4 mean?
Solution 3.27 x½ðnÞ5 equals to one period of ~x½n in the interval 0 n 4, i.e.,
x ðnÞ5 ¼ ~x½n 0 n 4
and
X
1
~x½n ¼ x½n 5l:
l¼1
Note: We assumed that the length of x½n and period of ~x½n are equal to each
other.
Example 3.28 If x½n ¼ ½ 1 1 1 0:5 1 , find x ðnÞ5 0 n 4.
Solution 3.28 x½ðnÞ5 equals to ~y½n ¼ ~x½n for 0 n 4 and ~x½n is given as
3.5 Discrete Fourier Transform 191
X
1
~x½n ¼ x½n 5l:
l¼1
Example 3.29 If x½n ¼ ½ 1 1 1 0:5 1 , find x ð1 nÞ5 .
Solution 3.29 x ð1 nÞ5 equals to ~x½1 n for 0 n 4 and ~x½n is calculated as
X
1
~x½n ¼ x½n 5l:
l¼1
One period of ~x½1 n is obtained by rotating one period of ~x½n to the right by
‘1’ unit. That is
x ð1 nÞ5 ¼ RR x ðnÞ5 :
x ð1 nÞ5 ¼ RR x ðnÞ5
which yields
x ð 1 nÞ 5 ¼ ½ 1 1 1 0:5 1 :
Note: x ð2 nÞ5 is obtained by rotating x ð1 nÞ5 to the right by ‘1’ unit.
And x ð1 nÞ5 is obtained by rotating x ðnÞ5 to the left by ‘1’ unit.
Example 3.30 If x½n ¼ ½ 1 1 1 1 , find x ðnÞ3 .
Solution 3.30 x ðnÞ3 ¼ ~x½n for 0 n 3 and ~x½n is obtained as
192 3 Discrete Fourier Transform
x [n 6] x [n 6]
1 1 1 1 x [n 3] x [n 3] 1 1 1 1
1 1 1 1 x [n] 1 1 1 1
1 1 1 1
n
6 5 4 3 2 1 0 1 2 3 4 5 6
0 1 1
~
x [ n]
0 1 1 0 1 1 0 1 1 0 1 1
n
6 5 4 3 2 1 0 1 2 3 4 5 6
X
1
~x½n ¼ x½n 3l:
l¼1
P
Since the length of x½n is 4, the shifted successor copies in 1 l¼1 x½n 3l
overlap with each other. For this reason, one period of ~x½n is not equal to x½n
anymore. It should be calculated explicitly. This calculation is explained in
Fig. 3.28.
x ðnÞ3 for 0 n 3 equals to one period of ~x½n and from Fig. 3.28, it is found
as
~xop ½n ¼ ½ 0 1 1
which is denoted by x ðnÞ3 , that is,
x ð nÞ 3 ¼ ½ 0 1 1 :
And x ðnÞ3 which is equal to one period of ~x½n can be found using the
rotate inside operation as
yielding
x ðnÞ3 ¼ ½ 0 1 1 :
Exercise: For the previous example find x ð2 nÞ3 .
Example 3.31 If x½n ¼ ½ 0:5 0:5 0:5 1 1 , find x½ðn 2Þ5 .
Solution 3.31 x½ðn 2Þ5 equals to ~x½n 2 for 0 n 4 and ~x½n is obtained as
3.5 Discrete Fourier Transform 193
X
1
~x½n ¼ x½n lN
l¼1
where N ¼ 5. Since the length of x½n equals to the period value of the ~x½n, then
~x½n in one period interval 0 n 4 equals to x½n. And one period of the shifted
periodic signal for 0 n 4 can be obtained by rotate right operation as
~xop ½n 2 ¼ RRðx½n; 2Þ
~xop ½n 1 ¼ RRðx½n; 1Þ
¼ ½ 1 0:5 0:5 0:5 1
Solution 3.32 Method 1: N-point circular convolution of x1 ½n and x2 ½n can be
calculated using
ð3:141Þ
y½n ¼ x1 ½0x2 ðnÞ4 þ x1 ½1x2 ðn 1Þ4 þ x1 ½2x2 ðn 2Þ4
ð3:142Þ
þ x1 ½3x2 ðn 3Þ4
where the signals x2 ðnÞ4 , x2 ðn 1Þ4 , x2 ðn 2Þ4 , and x2 ðn 3Þ4 can be
calculated as
194 3 Discrete Fourier Transform
x2 ðnÞ4 ¼ x2 ½n ! x2 ðnÞ4 ¼ ½ 1 1 1 1
x2 ðn 1Þ4 ¼ RRðx2 ½n; 1Þ ! x2 ðn 1Þ4 ¼ ½ 1 1 1 1
ð3:143Þ
x2 ðn 2Þ4 ¼ RRðx2 ½n; 2Þ ! x2 ðn 2Þ4 ¼ ½ 1 1 1 1
x2 ðn 3Þ4 ¼ RRðx2 ½n; 3Þ ! x2 ðn 3Þ4 ¼ ½ 1 1 1 1 :
which is simplified as
X
N1
y ½ n ¼ x1 ½mx2 ðn mÞN : ð3:144Þ
m¼0
Evaluating the right hand side of (3.144) for the n values in the range
0 n N 1, we get the equation set
P
N1
y½0 ¼ x1 ½mx2 ð0 mÞN
m¼0
P
N1
y½1 ¼ x1 ½mx2 ð1 mÞN
m¼0 ð3:145Þ
..
.
P
N1
y ½ N 1 ¼ x1 ½mx2 ðN 1 mÞN :
m¼0
X
3
y½0 ¼ x1 ½mx2 ð0 mÞ4
m¼0
X
3
y½1 ¼ x1 ½mx2 ð1 mÞ4
m¼0
ð3:146Þ
X
3
y½2 ¼ x1 ½mx2 ð2 mÞ4
m¼0
X
3
y½3 ¼ x1 ½mx2 ð3 mÞ4
m¼0
where the signals x2 ðmÞ4 , x2 ð1 mÞ4 , x2 ð2 mÞ4 , and x2 ð3 mÞ4 are
calculated as
x2 ðmÞ4 ¼ RI ðx2 ½mÞ ! x2 ðmÞ4 ¼ ½ 1 1 1 1
x2 ð1 mÞ4 ¼ RR x2 ðmÞ4 ; 1 ! x2 ð1 mÞ4 ¼ ½ 1 1 1 1
x2 ð2 mÞ4 ¼ RR x2 ð1 mÞ4 ; 1 ! x2 ð2 mÞ4 ¼ ½ 1 1 1 1
x2 ð3 mÞ4 ¼ RR x2 ð2 mÞ4 ; 1 ! x2 ð3 mÞ4 ¼ ½ 1 1 1 1 :
X
3
y ½ 0 ¼ x1 ½mx2 ð0 mÞ4 : ð3:147Þ
m¼0
Let w½m ¼ x2 ðmÞ4 i.e., w½m ¼ ½ 1 1 1 1 ; then expanding (3.147),
we obtain
which is nothing but dot product of two vectors x1 ½n and w½n, that is
or
y½0 ¼ x1 ½m x2 ðmÞ4 :
Then
196 3 Discrete Fourier Transform
In a similar manner,
y½1 ¼ x1 ½m x2 ð1 mÞ4
y½1 ¼ ð1Þ ð1Þ þ ð1Þ ð1Þ þ ð1Þ ð1Þ þ ð0:5Þ ð1Þ
y½1 ¼ 0:5
y½2 ¼ x1 ½m x2 ð2 mÞ4
y½2 ¼ ð1Þ ð1Þ þ ð1Þ ð1Þ þ ð1Þ ð1Þ þ ð0:5Þ ð1Þ
y½2 ¼ 3:5
y½3 ¼ x1 ½m x2 ð3 mÞ4
y½3 ¼ ð1Þ ð1Þ þ ð1Þ ð1Þ þ ð1Þ ð1Þ þ ð0:5Þ ð1Þ
y½3 ¼ 0:5
As a result;
Solution 3.33 The lengths of the sequences x1 ½n and x2 ½n are 4 and 3 respectively.
Both sequences should be padded by zeros so that their lengths equals to 6. That is,
x1 ½n ¼ ½ 1 1 1 0:5 0 0 x 2 ½ n ¼ ½ 1 1 2 0 0 0 :
X
N 1
y½n ¼ x1 ½mx2 ðn mÞN
m¼0
for N ¼ 3, we get
y½n ¼ x1 ½0x2 ðnÞN þ x1 ½1x2 ðn 1ÞN þ x1 ½2x2 ðn 2ÞN
which is calculated as
Solution 3.35 Since the index n ¼ 0 is not at the first element in x½n, it is easier to
calculate the circular convolution using the first method we introduced. That is
expanding
X 3
y½n ¼ x1 ½mx1 ðn mÞN
m¼2
and placing the n values in the range 2 n 3 for y½n, we can find the 6-point
circular convolution result.
198 3 Discrete Fourier Transform
X
1
ylc ½n ¼ x1 ½mx2 ½n m:
m¼1
The length of ylc ½n is L þ P 1. N-point circular convolution of x1 ½n and x2 ½n
is
If the input signal is very long, then convolution operation takes too much time,
or sometimes it may not still be possible to evaluate the convolution result.
3.6 Practical Calculation of the Linear Convolution 199
To overcome this issue, two approaches are followed to evaluate the convolution
of a very long input and a short impulse response sequences. These methods are
called overlap-add and overlap-save. Let’s first explain the overlap-add method.
Let x½n be the input signal with length N and h½n be the filter response with length
P such that N [ P. The overlap-add method to evaluate
x½n h½n
X
1
y ½ n ¼ yk ½n Lk:
k¼0
x½n ¼ ½1 1 0
|fflfflfflfflfflffl{zfflfflfflfflfflffl} 1 0
1|fflfflfflfflfflffl{zfflfflfflfflfflffl} 1 1
1|fflfflfflfflfflffl{zfflfflfflfflfflffl} 1 0 1
|fflfflfflfflfflffl{zfflfflfflfflfflffl} ð3:148Þ
x0 ½n x1 ½n x½n x3 ½n
If the last frame had a length smaller than 3, then we would pad it by zeros until
its length equals to 3. The divided frames are
200 3 Discrete Fourier Transform
x0 ½n ¼ ½ 1 1 0 x 1 ½ n ¼ ½ 1 1 0
ð3:149Þ
x 2 ½ n ¼ ½ 1 1 1 x3 ½n ¼ ½ 1 0 1 :
(2) In step 2, we take the convolution of each frame in (3.149) with impulse
response h½n.
Let’s first calculate the convolution of x0 ½n and h½n, i.e., calculate y0 ½n ¼
x0 ½n h½n which is written as
X
1
y 0 ½ n ¼ h½kx½n k ð3:150Þ
k¼1
X
1
y ½ n ¼ yk ½n Lk
k¼0
0 0 0 1 2 1 0
n
0 1 2 3 4 5 6
3.6 Practical Calculation of the Linear Convolution 201
for L ¼ 3, we obtain
X
3
y½n ¼ yk ½n k3
k¼0
which is expanded as
x[n]
n
0 L 1 L 2L
w0 [ n]
n
0 L 1
w1[ n]
n
0 L 2L 1
w2 [n]
n
0 2L
x0 [n]
n
0 L 1
x1[n]
n
0 L 1
x2 [ n ]
n
0
L 1
x0 [n]
n
0 L 1
x1[n L]
n
0 L 2L 1
x2 [ n 2 L]
n
0 2L
y0 ½n ¼ ½|{z}
1 2 1 0
n¼0
y1 ½n 3 ¼ ½|{z}
0 0 0 1 2 1 0
n¼0
ð3:153Þ
y2 ½n 6 ¼ ½|{z}
0 0 0 0 0 0 1 0 2 1
n¼0
y3 ½n 9 ¼ ½|{z}
0 0 0 0 0 0 0 0 0 1 1 1 1:
n¼0
When the shifted signals in (3.153) are summed, we obtain the convolution
result as
3.6 Practical Calculation of the Linear Convolution 203
y½n ¼ ½ 1 2 1 1 2 1 1 0 2 2 1 1 1 :
X
1
x ½ n ¼ xk ½n Lk:
k¼0
y ½ n ¼ h½ n x ½ n
X1
ð3:154Þ
¼ h½ n xk ½n Lk:
k¼0
then
y1 ½n L ¼ h½n x1 ½n L:
where
As a result;
X
1
y ½ n ¼ yk ½n Lk:
k¼0
Assume that the impulse response h½n has length P. The convolution of x½n and
h½n using overlap-save method is achieved via the following steps.
(1) Pad the front of x½n by P 1 zeros.
(2) Divide x½n into frames of length L such that the successor frame overlaps with
the predecessor frame with P 1 points.
(3) Let xk ½n be a frame, calculate the L point circular convolution of xk ½n and h½n,
i.e., calculate
yk ½n ¼ xk ½mðLÞh½n:
h½n ¼ ½ 1 1 1
x ½ n ¼ ½ 1 0 1 1 1 1 1 0 0 1 1 1
x½n ¼ ½ 0 0
|ffl{zffl} 1 0 1 1 1 1 1 0 0 1 1 1
P 1 zeros
are added
to the
beginning
of x½n
(2) Divide x½n into frames such that frames overlap by P 1 ¼ 2 samples. This
operation is illustrated in
where we padded the last divided frame by 2 zeros such that its length equals 4.
The divided frames are separately written as
x 0 ½ n ¼ ½ 0 0 1 0 x 1 ½ n ¼ ½ 1 0 1 1 x2 ½n ¼ ½ 1 1 1 1
x3 ½n ¼ ½ 1 1 1 0 x 4 ½ n ¼ ½ 1 0 0 1 x 5 ½ n ¼ ½ 0 1 1 1
(3) In step 3 we calculate the L ¼ 4-point circular convolution of each frame with
h½n, i.e., we calculate
X
N 1
y0 ½ n ¼ x½kh½ðn kÞN : ð3:156Þ
k¼0
Since N ¼ 4 we pad h½n by zeros such that its length equals N ¼ 4 and h½n
becomes as
206 3 Discrete Fourier Transform
h½n ¼ ½ 1 1 1 0 :
Noting that h ðn n0 Þ4 is obtained rotating h½n to the right by n0 units, we get
the following expression for y0 ½n
y 0 ½ n ¼ 0 h ð nÞ 4 þ 0 h ð n 1Þ 4 þ 1 h ð n 2Þ 4 þ 0 h ð n 3Þ 4
which leads to
y 0 ½ n ¼ ½ 1 0 1 1 :
y0 ½n ¼ ½ 1 0 1 1 y1 ½n ¼ ½ 1 2 2 2 y 2 ½ n ¼ ½ 1 3 1 3
y3 ½n ¼ ½ 0 2 1 0 y4 ½n ¼ ½ 0 2 1 1 y5 ½n ¼ ½ 0 2 0 3
y6 ½n ¼ ½ 1 2 0 1
ð3:157Þ
(4) In step-4, we discard the first P 1 ¼ 2 samples from the beginning of each
yk ½n; k ¼ 0; 1; 2; 3; 4: This operation is illustrated in
1 0 1 1
y0 ½n ¼ |fflffl{zfflffl} ! y0 ½n ¼ ½ 1 1
omit
1 2 2 2
y1 ½n ¼ |fflfflfflffl{zfflfflfflffl} ! y1 ½n ¼ ½ 2 2
omit
1 3 1 3
y2 ½n ¼ |fflfflfflffl{zfflfflfflffl} ! y2 ½n ¼ ½ 1 3
omit
0 2 1 0
y3 ½n ¼ |fflffl{zfflffl} ! y3 ½n ¼ ½ 1 0
omit
0 2 1 1
y4 ½n ¼ |fflffl{zfflffl} ! y4 ½n ¼ ½ 1 1
omit
0 2 0 3
y5 ½n ¼ |fflfflfflffl{zfflfflfflffl} ! y 5 ½ n ¼ ½ 0 3
omit
1 2 0 1
y6 ½n ¼ |fflfflfflffl{zfflfflfflffl} ! y5 ½n ¼ ½ 0 1 :
omit
(5) Finally in the last step, we concatenate the truncated sequences to find the
convolution result, i.e.,
3.6 Practical Calculation of the Linear Convolution 207
which leads to
y½n ¼ ½ 1 1 2 2 1 3 1 0 1 1 0 3 0 1 :
There are two types of Fast Fourier transform algorithm. These are:
(1) Decimation in time FFT algorithm.
(2) Decimation in frequency FFT algorithm.
Let’s first explain decimation in time FFT algorithm then decimation in fre-
quency FFT algorithm.
Before starting to the derivation of the algorithm, let’s consider some motivating
examples.
The DFT formula is
X
N 1
x½nejk N n
2p
X ½k ¼
n¼0
vector.
Solution 3.38 ek4 ¼ ej0 4 ej1 4 ej2 4 ej3 4 which can be simplified as
2p 2p 2p 2p
ek4 ¼ ½ 1 j 1 j
X
N 1
x½nejk N n ;
2p
X ½k ¼ k ¼ 0; 1; . . .; N 1
n¼0
for N ¼ 2, we get
X
1
x½nejk 2 n ;
2p
X ½k ¼ k ¼ 0; 1 ð3:158Þ
n¼0
X ½k ¼ ½ a þ b a b :
X ½k ¼ ½ 1 5 :
X
N1
x½nejk N n
2p
X ½k ¼
n¼0
X
1
x½nej0 2 n
2p
X ½ 0 ¼
n¼0
X
1
x½nej1 2 n
2p
X ½ 1 ¼
n¼0
X
1
x½nej2 2 n
2p
X ½ 2 ¼
n¼0
X
1
x½nej3 2 n :
2p
X ½ 3 ¼
n¼0
If we look at the exponential terms in X½0 and X½2, we see that ej0 2 n ¼ ej2 2 n
2p 2p
X ½3 ¼ X½1
That is
X ½k ¼ ½ X ½0 X ½ 1 X ½ 0 X ½ 1
X ½k ¼ ½ a þ b a b aþb a b
x½n ¼ ½ 1 3 2 1
Solution 3.42 Using the DFT formula the DFT coefficients for k ¼ 0; 1; . . .; 7 can
be calculated as
P
3
x½nej0 4 n
2p
X ½ 0 ¼
n¼0
P3
x½nej1 4 n
2p
X ½ 1 ¼
n¼0
P3
x½nej2 4 n
2p
X ½ 2 ¼
n¼0
P3
x½nej3 4 n
2p
X ½ 3 ¼
n¼0
ð3:159Þ
P3
j42p
X ½ 4 ¼ x½ne 4n
n¼0
P3
x½nej5 4 n
2p
X ½ 5 ¼
n¼0
P3
x½nej6 4 n
2p
X ½ 6 ¼
n¼0
P3
x½nej7 4 n :
2p
X ½ 7 ¼
n¼0
If we inspect the exponential terms in X½0 and X½4 in the equation set (3.159),
we see that ej0 4 n ¼ ej4 4 n this means that
2p 2p
X ½4 ¼ X ½0:
That is
3.7 Computation of the Discrete Fourier Transform 211
X ½k ¼ ½ 5 1 j4 1 1 þ j4
X ½k ¼ ½ 5 1 j4 1 1 þ j4 5 1 j4 1 1 þ j4 :
In fact, the results of these examples are nothing but the main motivation for the
derivation of the fast Fourier transform algorithm.
Now let’s start the derivation of the fast Fourier transform algorithm.
Fast Fourier Transform Algorithm Derivation
We consider the DFT formula
X
N 1
x½nejk N n :
2p
X ½k ¼ ð3:160Þ
n¼0
Let’s denote the exponential function ej N in (3.160) by eN , i.e., eN ¼ ej N , and
2p 2p
e2N=2 ¼ ej2 N
2p
ðm þ N Þ ðmÞ
(3) eN ¼ eN
Using property-2 we obtain
212 3 Discrete Fourier Transform
ðm þ N Þ ðmÞ ðN Þ ðm þ N Þ ðmÞ
eN ¼ eN eN ! eN ¼ eN :
|{z}
¼1
ðmÞ
This means that f ðmÞ ¼ eN is a periodic function, and its period equals to N,
i.e., f ðmÞ ¼ f ðm þ NÞ.
Let’s now derive the decimation in time FFT algorithm. We first write the DFT
formula in terms of the defined function eN as
X
N 1
ðknÞ
X ½k ¼ x½neN ; k ¼ 0; 1; . . .; N 1 ð3:161Þ
n¼0
X
N=21
ð2knÞ
X
N=21
ð2n þ 1Þk
X ½k ¼ x½2neN þ x½2n þ 1eN ð3:162Þ
n¼0 n¼0
where the first term on the right side using the property e2N ¼ eN=2 can be written as
X
N=21
ð2nk Þ
X
N=21 X
N=21
x½2neN ! x½2nðe2N Þnk ! x½2nðeN=2 Þnk ð3:163Þ
n¼0 n¼0 n¼0
and the similarly the second term on the right side of (3.162) using the property
e2N ¼ eN=2 can be written as
X
N=21
ð2n þ 1Þk
X
N=21
x½2n þ 1eN ! x½2n þ 1e2nk
N eN
k
n¼0 n¼0
ð3:164Þ
X
N=21 X
N=21
! ekN x½2n þ 1e2nk
N ! ekN x½2n þ 1enk
N=2
n¼0 n¼0
Then using the results (3.163) and (3.164), the DFT formula in (3.161) can be
written as
X
N=21 X
N=21
X ½k ¼ x½2nenk
N=2 þ eN
k
x½2n þ 1enk
N=2 k ¼ 0; 1; . . .; N 1
n¼0 n¼0
|fflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflffl}
G½k H½k
3.7 Computation of the Discrete Fourier Transform 213
where the terms G½k and H½k are periodic with period N=2. Since G½k and H½k
are calculated for k ¼ 0; 1; . . .N 1 in X½k then G½k and H½k have repeated
values for k ¼ 0; 1; . . .N 1 as shown in
2 3
g0 g1 g2 g0 g1 g2
6 |fflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflffl} 7
G½k ¼ 4 The first N=2 The secondN=2 5
samples samples
2 3
h0 h1 h2 h0 h1 h2
6 |fflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflffl} 7
H ½k ¼ 4 The first N=2 The second N=2 5:
samples samples
And G½k k ¼ 0; 1; . . .; N=2 1 is the N=2 point DFT of the even numbered
samples of x½n, and H½k k ¼ 0; 1; . . .; N=2 1 is the N=2 point DFT of the odd
numbered samples of x½n.
Hence for the computation of G½k and H½k the k index range is first taken as
k ¼ 0; 1; . . .; N=2 1. And G½k and H½k are calculated for k ¼ 0; 1; . . .; N=2 1.
Let’s denote the calculation results as
G½k ¼ g0 g1 gN=21 H ½ k ¼ h0 h1 hN=21 k ¼ 0; 1; . . .; N=2 1
The partition performed for X ½k can be done for G½k and H½k also. The
calculation of G½k can be written as
where G1 ½k is the N=4 point DFT of the even numbered samples of x½2n and G2 ½k
is the N=4 point DFT of the odd numbered samples of x½2n.
And the calculation of H½k can be written as
where H1 ½k is the N=4 point DFT of the even numbered samples of x½2n þ 1 and
H2 ½k is the N=4 point DFT of the odd numbered samples of x½2n þ 1.
214 3 Discrete Fourier Transform
This procedure can be carried out until we calculate 2-point DFT of the
sequences obtained from x½n.
Example 3.43 If x½n ¼ ½ a b find 2-point DFT of x½n.
Solution 3.43 Using the formula
X
N 1
x½nejk N n ;
2p
X ½k ¼ k ¼ 0; 1; . . .; N 1 ð3:165Þ
n¼0
for N ¼ 2, we get
X
1
x½nejk 2 n ;
2p
X ½k ¼ k ¼ 0; 1: ð3:166Þ
n¼0
X ½k ¼ ½ a þ b a b : ð3:167Þ
where down-arrows indicate even numbered samples and up-arrows show odd
numbered samples. And the even and odd numbered samples can be grouped into
separate vectors as
x e ½ n ¼ ½ 1 1 xo ½n ¼ ½ 1 2 :
The 2-point DFT of xe ½n and xo ½n are calculated using DFT formula as
3.7 Computation of the Discrete Fourier Transform 215
Xe ½k ¼ ½ 0 2 X o ½k ¼ ½ 3 1 : ð3:168Þ
DFT of x½n can be written in terms of DFT of its even and odd samples as
where
wk4 ¼ ejk 4 :
2p
And for N ¼ 4 the vectors Xe ½k, Xo ½k and wk4 for k ¼ 0; 1; 2; 3 can be calculated
as
Xe ½k ¼ ½ 0 2 0 2 X0 ½k ¼ ½ 3 1 3 1
ð3:171Þ
wk4 ¼ ej0 4 ej1 4 ej2 4 ej3 4 :
2p 2p 2p 2p
wk4 ¼ ½ 1 j 1 j :
X ½k ¼ ½ 0 2 0 2 þ ½ j 1 j ½3 1 3 1
½ 1 j 1 j ½ 3 1 3 1
is calculated as
X ½k ¼ ½ 3 2 þ j 3 2 j :
where down-arrows indicate even indexed samples and up-arrow shows odd
indexed samples. And the even and odd indexed samples can be grouped into
separate vectors as
xe ½n ¼ ½ 1 1 1 1 x o ½ n ¼ ½ 1 2 3 2 :
Four-point DFT of xe ½n and xo ½n can be calculated as in the previous example
as
Xe ½k ¼ ½ 0 0 4 0 Xo ½k ¼ ½ 8 2 0 2 k ¼ 0; 1; . . .; 4: ð3:172Þ
where wk8 ¼ ejk 8 . And the vectors Xe ½k, Xo ½k , wk8 for k ¼ 0; 1; . . .; 7 with the help
2p
Xe ½k ¼ ½ 0 0 4 0 0 0 4 0
Xo ½k ¼ ½ 8 2 0 2 8 2 0 2
ð3:173Þ
wk8 ¼ ej0 8 ej1 8 ej2 8 ej3 8 ej4 8 ej5 8 ej6 8 ej7 8
2p 2p 2p 2p 2p 2p 2p 2p
x ½ n ¼ ½ 1 1 1 2 1 3 1 2 1 1 2 1 3 0 1 2
xe ½n ¼ ½ 1 1 1 1 1 1 2 3 1
x o ½ n ¼ ½ 1 2 3 2 1 1 0 2 :
We can calculate 8-point DFT of xe ½n and xo ½n as in the previous example. Let
the calculation results be denoted by Xe ½k and Xo ½k, k ¼ 0; 1; . . .; 7. Then we can
easily obtain Xe ½k and Xo ½k for k ¼ 0; 1; . . .; 15 by just repeating the elements
obtained for k ¼ 0; 1; . . .; 7 and combine them using
X ½k ¼ Xe ½k þ wk16 Xo ½k k ¼ 0; 1; . . .; 15
ej1016 ej1116 ej1216 ej1316 ej1416 ej1516 :
2p 2p 2p 2p 2p 2p
Before starting the derivation of decimation in frequency FFT algorithm let’s solve
some examples to become familiar with the terminology used in algorithm.
Example 3.48 If x½n ¼ ½ 1 2 3 6 4 2 n ¼ 0; 1; . . .; 5:
(a) Find x½n for n ¼ 0; 1; 2:
(b) Find x½n for n ¼ 0; 1; . . .; 4:
Solution 3.48
(a) x½n ¼ ½ 1 2 3 n ¼ 0; 1; 2
218 3 Discrete Fourier Transform
(b) x½n ¼ ½ 1 2 3 6 4 n ¼ 0; 1; . . .; 4:
Solution 3.51 Let’s determine first enN for n ¼ 0; 1; 2; 3. Using enN ¼ ejn N the
2p
enN ¼ ½ 1 j 1 j :
which yields
x½nenN ¼ ½ 2 j 3 j5 :
X ½2k ¼ ½ 0 2 4 6 k ¼ 0; 1; 2; 3
X ½2k þ 1 ¼ ½ 1 3 5 7 k ¼ 0; 1; 2; 3:
Example 3.53 Even and odd indexed samples of the DFT coefficients of a digital
signal are given as
X ½2k ¼ ½ 1 j 2 3 1 k ¼ 0; 1; 2; 3; 4
X
N 1
X ½k ¼ x½nekn
N k ¼ 0; 1; . . .; N 1 ð3:174Þ
n¼0
X
N 1
X ½2k ¼ x½ne2kn
N k ¼ 0; 1; . . .; N=2 1
n¼0
X
N=21 X
N 1
X ½2k ¼ x½ne2kn
N þ x½ne2kn
N k ¼ 0; 1; . . .; N=2 1: ð3:175Þ
n¼0 n¼N=2
|fflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflffl}
P
N 1
2 2kðn þ N Þ
x½n þ N2 eN 2
n¼0
X
N=21 X
N=21
N 2kðn þ N2 Þ
X ½2k ¼ x½ne2kn þ x nþ e k ¼ 0; 1; . . .; N=2 1 ð3:176Þ
n¼0
N
n¼0
2 N
2kðn þ N2 Þ
where the exponential term eN can be simplified as
2kðn þ N2 Þ 2kðn þ N2 Þ
eN ¼ e2kn
N eN ! eN
kN
¼ e2kn
|{z} N
¼1
and making use of the e2N ¼ eN=2 the expression for X½2k in (3.176) can be written
as
X
N=21 X
N=21
N kn
X ½2k ¼ x½ne2kn
N þ x nþ e k ¼ 0; 1; . . .; N=2 1
n¼0 n¼0
2 N=2
X
N=21
N
X ½2k ¼ x ½ n þ x n þ ekn
N=2 k ¼ 0; 1; . . .; N=2 1: ð3:177Þ
n¼0
2
X
N=21
X ½2k ¼ x1 ½nekn
N=2 k ¼ 0; 1; . . .; N=2 1
n¼0
X
N 1
ð2k þ 1Þn
X ½2k þ 1 ¼ x½neN k ¼ 0; 1; . . .; N=2 1
n¼0
X
N=21
ð2k þ 1Þn
X ½2k þ 1 ¼ ðx½n x½n þ N=2ÞeN k ¼ 0; 1; . . .; N=2 1
n¼0
X
N=21
X ½2k þ 1 ¼ ðx½n x½n þ N=2ÞenN ekn
N=2 k ¼ 0; 1; . . .; N=2 1
n¼0
X
N=21
X ½2k þ 1 ¼ x2 ½nekn
N=2 k ¼ 0; 1; . . .; N=2 1
n¼0
X
N=21
X ½2k ¼ x1 ½nekn
N=2 k ¼ 0; 1; . . .; N=2 1
n¼0
X
N=21
X ½2k þ 1 ¼ x2 ½nekn
N=2 k ¼ 0; 1; . . .; N=2 1
n¼0
and
and
equals to
enN ¼ ej0 N ej1 N ej 2 N :
2p 2p N 2p
n ¼ 0; 1; . . .; N=2 1:
The signal x1 ½n is obtained by summing the first and second half parts of x½n as
follows
x ½ n ¼ ½ 1 0 2 1
|fflffl{zfflffl} |fflfflfflffl{zfflfflfflffl}
First Second
Half Half
x1 ½n ¼ ½ 1 0 þ ½ 2 1 ! x1 ½n ¼ ½ 1 þ 2 0 1 :
And x½n x½n þ N=2 for N ¼ 4 is calculated by subtracting the first and second
half parts of x½n as follows
which yields
x2 ½n ¼ ½ 1 j :
x 1 ½ n ¼ ½ 3 1 ! X1 ½k ¼ ½ 3 1 3 þ1
1 j 1 þ j
X½2k ¼ |fflfflffl{zfflfflffl} |fflfflffl{zfflfflffl}
X½0 X½2
3.7 Computation of the Discrete Fourier Transform 223
X ½k ¼ ½ 1 j 2 1 þ j 4 :
Now let’s generalize this example employing parameters instead of using the
numeric values.
Example 3.55 For x½n ¼ ½ a b c d , find DFT coefficients using decimation in
frequency FFT method.
Solution 3.55 For the given sequence, let’s first find the signals x1 ½n and x2 ½n
given as
n ¼ 0; 1; . . .; N=2 1:
The signal x1 ½n is obtained by summing the first and second half parts of x½n as
follows
x ½ n ¼ ½ a b c d
|fflffl{zfflffl} |fflffl{zfflffl}
First Second
Half Half
x1 ½ n ¼ ½ a bþ½c d ! x 1 ½ n ¼ ½ a þ c b þ d :
And x½n x½n þ N=2 for N ¼ 4 is calculated by subtracting the first and second
half parts of x½n as in
x ½ n x ½ n þ 2 ¼ ½ a d ½c d ! x½n x½n þ 2 ¼ ½ a c b d :
which yields
x2 ½n ¼ ½ a c jðb dÞ :
x 1 ½ n ¼ ½ a þ c b þ d ! X1 ½k ¼ ½ a þ c þ b þ d a þ c b d ;
x 2 ½ n ¼ ½ a c jðb dÞ ! X2 ½k ¼ ½ a c jb þ jd a c þ jb jd
X ½k ¼ ½ a c jb þ jd aþcþbþd a c þ jb jd a þ c b d :
The signals
x½n þ x½n þ N=2 x½n þ x½n þ N=2 enN
x ½ n þ x ½ n þ 4 ¼ ½ 2 1 1 1 þ ½ 3 0 1 2 ! ½ 4 1 2 3
x½n x½n þ 4 ¼ ½ 2 1 1 1 ½ 3 0 1 2 ! ½ 1 1 0 1
en8 ¼ ej0 8 ej1 8 ej2 8 ej3 8 ! en8 ¼ 1 ej4 ej2 ej 4 : ð3:178Þ
2p 2p 2p 2p p p 3p
Using the results in (3.178), we can obtain the signals x1 ½n and x2 ½n as in
x1 ½n ¼ ½ 4 1 2 3
x2 ½n ¼ ðx½n x½n þ 4Þen8
x2 ½n ¼ ½ 1 0 1 1 ej4 ej2 ej 4 !
p p 3p
1
x1 ½n ¼ ½ 4 1 2 3
x2 ½n ¼ 1 ej4 0 ej 4 :
p 3p
The DFT coefficients of x1 ½n and x2 ½n can be found using the decimation in
frequency FFT algorithm as in the previous example. Let’s denote the DFT coef-
ficients of x1 ½n and x2 ½n as X1 ½k and X2 ½k which can be found as
X1 ½k ¼ ½ 4 2 j4 8 2 þ j4
The Fourier coefficients of x½n, i.e., X½k are related to X1 ½k and X2 ½k via
Then we have
X ½2k þ 1 ¼ ½ 4 2 j4 8 2 þ j4
X ½2k ¼ ½ 1 j2:8 1 j2:8 1 þ j2:82 1 þ j2:82
x2 þ xy:
Now we ask the question: How many mathematical operations are needed for the
calculation of x2 þ xy ?
The answer is as follows.
For the computation of x2 , one multiplicative operation is needed.
For the computation of xy, one multiplicative operation is needed.
For the computation of x2 þ xy, two multiplicative operations and one additive
operation is needed.
Hence, for the computation of x2 þ xy, three mathematical operations are needed.
Now consider the equality
226 3 Discrete Fourier Transform
x2 þ xy ¼ xðx þ yÞ:
And we ask the same question: How many mathematical operations are needed
for the calculation of xðx þ yÞ ?
It is obvious that for the calculation of xðx þ yÞ; one additive operation and one
multiplicative operation is needed. And the total number of mathematical opera-
tions for the calculation of xðx þ yÞ equals to two.
As a result; for x2 þ xy, three mathematical operations are needed, and for
xðx þ yÞ, two mathematical operations are needed. The latter one is preferable since
it involves less computation amount.
Decimation in time and decimation in frequency FFT algorithms are invented to
decrease the computation amount for the calculation of discrete transform coeffi-
cients X½k of a digital signal x½n:
We can express the total computation saving for the calculation of DFT coef-
ficients X½k of a digital signal x½n when FFT algorithms are employed other than
the direct calculation approach. For illustration purposes, in the next section, we
will first calculate the total computation amount for the evaluation of DFT coeffi-
cients X½k of a digital sequence x½n.
X
N1
x½nejk N n ;
2p
X ½k ¼ k ¼ 0; 1; . . .; N 1:
n¼0
X
2
x½nejk N n ;
2p
X ½k ¼ k ¼ 0; 1; 2
n¼0
which is expanded as
X
2
x½nej0 3 n
2p
X ½ 0 ¼
n¼0
X
2
x½nej1 3 n
2p
X ½ 1 ¼ ð3:179Þ
n¼0
X
2
x½nej2 3 n :
2p
X ½ 2 ¼
n¼0
As can be seen from (3.180) for the calculation of each coefficient in (3.180),
three multiplicative and two additive operations are required. Then the total number
of multiplicative operations for the calculation of all the coefficients is 3 3 ¼ 9
and the total number of additive operations for the calculation of all the coefficients
is 3 2 ¼ 6.
In general, for the calculation of N-point DFT X½k coefficients of a digital signal
x½n, N 2 multiplicative operations and N ðN 1Þ additive operations are needed.
The total computation amount is
N 2 þ N ðN 1Þ ffi 2N 2 :
Now let’s consider the total computation amount of the decimation in time FFT
algorithm.
82 8 þ 2ð 4Þ 2 ð 4Þ 2 4 þ 2ð2Þ2 ð 2Þ 2 2:
And for the expression 82 8 þ 2ð4Þ2 inserting 4 þ 2ð2Þ2 for ð4Þ2 , we get
228 3 Discrete Fourier Transform
82 8 þ 2ð4 þ 2ð2Þ2 Þ
82 8 þ 2ð4 þ 2 2Þ
which is simplified as
82 24: ð3:182Þ
Now let’s consider the computation amount for the decimation in time FFT
algorithm.
In decimation in time FFT algorithm DFT coefficients X½k of x½n are calculated
using
where G½k and H½k are the N=2 point DFT coefficients of even and odd indexed
samples of x½n. The calculation complexities for the terms appearing on the right
hand side of (3.183) can be states as:
2
N N N
G½k ! multiplicative and 1 additive operations:
2 2 2
2
N N N
H ½k ! multiplicative and 1 additive operations:
2 2 2
And lastly for the summation of G½k and wkN H ½k terms in (3.183), we need N
more additive operations.
Thus; the total number of multiplicative operations is
2 2
N N N2
þ þN ¼ N þ
2 2 2
N2
þ N\N 2
2
N2
Nþ
2
yielding
2 ! 2
N N N
N þ2 þ2 ¼ N þN þ4
2 4 4
N
2 N
2
and proceeding in a similar manner and replacing 4 by N
4 þ2 8 , we get
2 ! 2
N N N
N þN þ4 þ2 ¼ N þN þN þ8 :
4 8 8
N þN þ
|fflfflfflfflfflfflfflfflfflfflfflffl þN ffl} ¼ vN
ffl{zfflfflfflfflfflfflfflfflfflfflfflffl
v terms
3.9 Problems
(1) If
x½n ¼ ½ 1:0 1:6 2 2:32 2:58 2:84 3 3:16 3:4 3:44 3:58 3:74 3:84 3:90 ;
then
find x½n 2; x½n þ 3; x½n 2; x½2n 2; x½2n 2;
x n2 2 ; x n3 2 .
(2) One period of the periodic signal ~x½n around origin is
x½n ¼ ½ 1 2 1 1 2 . Find one period of ~x½n 2; ~x½n þ 2; ~x½n;
~x½n 2; ~x½2n; ~x½2n; ~x½2n þ 2; ~x½2n þ 3:
(3) One period of the periodic signal ~x½n around origin is
x½n ¼ ½ 1 2 1 1 . Find ~x½n ~x½n:
(4) If x½n ¼ ½ 1 2 1 1 1 ; find x ðnÞ ; x ðnÞ5 ; x ð1 nÞ5 ;
5
x ð3 nÞ5 ; x ðn þ 2Þ5 ; x ðn þ 2Þ5 ; x ð2nÞ5 ; x ðn 3Þ5 ; for 0 n 4:
(5) If x½n ¼ ½ 1 2 1 1 1 ; find x ðnÞ3 ; x ð1 nÞ3 ; x ðn þ 2Þ3 ;
x ðn þ 2Þ3 ; x ð2nÞ3 ; x ðn 3Þ3 ; for 0 n 2:
3
w
0 2
2 2
1
3.9 Problems 231
X
1
~x½n ¼ x½n 5k ;
k¼1
(11) One period of the Fourier transform of the aperiodic signal x½n is shown in
Fig. 3.34.
(a) Find 8-point DFT of x½n i.e., X ½k ¼ ?
(b) Using the DFT coefficients calculated in part (a), find x½n employing
inverse DFT formula.
(12) Find the convolution of x½n ¼ ½ 1 0 1 1 1 0 1 2 3 1 11 4
1 2 1 and h½n ¼ ½ 1 1 1 ] using overlap-add and overlap-save
methods.
(13) Find the DFT of x½n ¼ ½ 1 0 1 1 1 0 1 2 using decimation in
time FFT algorithm.
(14) Find the DFT of x½n ¼ ½ 1 0 1 2 1 0 1 2 using decimation in
frequency FFT algorithm.
Chapter 4
Analog and Digital Filter Design
In this chapter, we will study analog and digital filter design techniques. A filter is
nothing but a linear time invariant (LTI) system. Any LTI system can be described
using its impulse response. If the impulse response of a LTI system is known, then
for any arbitrary input the system output can be calculated by taking the convo-
lution of the impulse response and arbitrary input. This also means that filtering
operation is nothing but a convolution operation. And filter design is nothing but
finding the impulse response of a linear time invariant system. For this purpose, we
can work either in time domain or frequency domain.
Filter systems are designed to block some input frequencies and pass others. For
this reason, filter design studies are usually done in frequency domain. Fourier
transform of the impulse response of the filter system is called the transfer function
of the filter. To find the transfer function of filters, a number of techniques are
proposed in the literature. In this chapter, we will study the most widely known
techniques in the literature.
Filters are divided into two main categories. These are analog filters and digital
filters. In science world, more studies on analog filter design techniques are
available considering the digital filter design methods. For this reason, so as to
design a digital filter, usually digital filter specifications are transferred to analog
domain, and analog filter design is performed then the designed analog filter is
transferred to digital domain.
In this chapter, we will study analog and digital filter design. Before studying filter
design techniques, we will first review some fundamental concepts. We will follow
the following outline in this chapter.
Time Invariance:
The system H is time invariant if
x [n] H y[ n] h[ n] x[ n]
X
1
h½ n x ½ n ¼ h½k x½n k: ð4:5Þ
k¼1
X
N X
M
a½ky½n k ¼ b½k x½n k ð4:6Þ
k¼0 k¼0
where y½n is the system output and x½n is the system input.
Example 4.1 The system H given in Fig. 4.4 is a LTI system.
(a) Write a difference equation between system input and output.
(b) Determine whether the system is causal or not.
Solution 4.1
(a) The relation between system input x½n and system output y½n is given as
X
n
y ½ n ¼ x½k: ð4:7Þ
k¼1
236 4 Analog and Digital Filter Design
X
n1
y ½ n 1 ¼ x½k: ð4:8Þ
k¼1
X
n
h½ n ¼ d½k :
k¼1 ð4:10Þ
¼ u½n
where it is seen that h½n ¼ 0 for n\0, which means that H is a causal system.
4.1.1 Z-Transform
X
1
X ðzÞ ¼ x½nzn ð4:11Þ
n¼1
where the complex numbers z ¼ rejw are chosen from a circle of radius r in
complex plane. Substituting z ¼ rejw into (4.11), we obtain
X
1
X rejw ¼ ðx½nr n Þejwn ð4:12Þ
n¼1
X
1
jx½nr n j\1: ð4:13Þ
n¼1
Since z ¼ rejw then jzj ¼ r and according to (4.13) we see that the Z-transform
converges only for a set of z-values and this set of z-values constitute a region in the
complex plane. And this region is called region of convergence for XðzÞ.
4.1 Review of Systems 237
X
1
X ðzÞ ¼ an u½n 1zn
n¼1
X
1
X ðzÞ ¼ an zn
n¼1
X1
¼ an zn
n¼1
X
1
¼1 an zn
n¼0
1 1
¼1 a z\1 ! jzj\jaj
1 a1 z
1
¼ :
1 a1 z
Example 4.3 For x½n ¼ an u½n, find XðzÞ.
Solution 4.3 XðzÞ ¼ 1a11 z ROC is jzj [ jaj
The LTI system H given in Fig. 4.5.
Can be described as in Fig. 4.6.
238 4 Analog and Digital Filter Design
For the system of Fig. 4.6, y½n ¼ h½n x½n and we have Y ðzÞ ¼ HðzÞXðzÞ.
The LTI system H can also be described as in Fig. 4.7 using the Z-transforms.
Stability of a Discrete LTI System:
For a discrete LTI system to be a stable system, its impulse response should be
absolutely summable, that is:
X
1
jh½nj\1: ð4:14Þ
n¼1
Y ðzÞ
H ðzÞ ¼ ð4:15Þ
X ðzÞ
And for a discrete LTI system to be a stable system, poles of HðzÞ should be
inside the unit circle.
Example 4.4 For a discrete LTI system, the transfer function is given as
z 0:5
H ðzÞ ¼ :
ðz 0:3Þðz 0:8 j0:8Þ
Laplace transform is defined for continuous time signals. The Laplace transform of
hðtÞ is calculated as
Z1
H ðsÞ ¼ hðtÞest dt ð4:16Þ
1
xc (t ) H yc (t )
xc (t ) hc (t ) yc (t )
X (s ) H (s ) Y (s )
The continuous time system with impulse response hðtÞ is stable if its impulse
response is absolutely integrable, that is, continuous LTI system is stable if
Z1
jhðtÞjdt\1: ð4:17Þ
1
If the transfer function HðsÞ of the continuous time system is known, then the
stability check can be performed by inspecting the poles of HðsÞ. If all the poles of
HðsÞ are in the left half plane, i.e., the complex poles have negative real parts, then
the continuous time system is stable. Otherwise the system is unstable.
Example 4.5 For a continuous LTI system, the transfer function is given as
sþ1
H ðsÞ ¼ :
ðs 0:5 þ 2jÞðs þ 3 2jÞ
X
N
d k yð t Þ X M
d k xð t Þ
a½ k ¼ b ½ k : ð4:18Þ
k¼0
dtk k¼0
dtk
dxc ðtÞ
dt
0 t
t0
Now let’s consider the digital signal obtained from xc ðtÞ after sampling opera-
tion. The slope of the line tangent to the graph of xc ðtÞ at point t0 can be
approximated using the sample values and sampling instants. The sampling of the
continuous time signal is illustrated in the Fig. 4.12.
The slope of the line at point t0 ¼ nTs can be calculated using the triangles as
shown in the Fig. 4.13.
The slope of the line tangent to the graph at point t0 ¼ nTs can be evaluated
using the left triangle in Fig. 4.13 as
dxc ðtÞ xc ðnTs Þ xc ððn 1ÞTs Þ
¼ ð4:19Þ
dt t¼nTs Ts
Using (4.21) in (4.19) and (4.20), the derivative of the continuous time signal
can be written either as
t
0 ( n 1)Ts nTs (n 1)Ts
242 4 Analog and Digital Filter Design
t
0 (n 1)Ts nTs (n 1)Ts
dxc ðtÞ x½n x½n 1
ð4:22Þ
dt t¼nTs Ts
or as
dxc ðtÞ x½n þ 1 x½n
: ð4:23Þ
dt t¼nTs Ts
dyðtÞ
þ ayðtÞ ¼ bxðtÞ: ð4:25Þ
dt
Solution 4.6 If the Eq. (4.25) is sampled, we obtain
4.2 Transformation Between Continuous and Discrete Time Systems 243
dyðtÞ
þ ayðtÞjt¼nTs ¼ bxðtÞjt¼nTs : ð4:26Þ
dt t¼nTs
And substituting
dyðtÞ y½n þ 1 y½n
dt t¼nTs Ts
ð4:27Þ
y½n ¼ yðtÞjt¼nTs
x½n ¼ xðtÞjt¼nTs
y½n þ 1 y½n
þ ay½n ¼ bx½n: ð4:28Þ
Ts
we obtain
y ½ n y ½ n 1
þ ay½n ¼ bx½n
Ts
d 2 yð t Þ
: ð4:29Þ
dt2
Solution 4.7 We can write
d 2 yðtÞ
dt2 t¼nTs
as
dyðtÞ
dt t¼ðn þ 1ÞT dydtðtÞ
d yðtÞ
2
t¼nTs
¼ s
: ð4:30Þ
dt2 t¼nTs Ts
Substituting
244 4 Analog and Digital Filter Design
dyðtÞ y ½ n þ 1 y ½ n
dt t¼nTs Ts
we obtain
y½ny½n1 y½n1y½n2
d yðtÞ
2
Ts Ts
dt2 t¼nTs Ts
d 2 yðtÞ dyðtÞ dxðtÞ
þ2 þ yðtÞjt¼nTs ¼ xðtÞjt¼nTs þ : ð4:34Þ
dt2 t¼nTs dt t¼nTs dt t¼nTs
x½n ¼ xðtÞjt¼nTs
y½n ¼ yðtÞjt¼nTs
d 3 yð t Þ
:
dt3
We know that continuous and discrete LTI systems can be described by differential
or difference equations.
Yc ðsÞ Y n ðzÞ
Hc ðsÞ ¼ and Hn ðzÞ ¼
Xc ðsÞ Xn ðzÞ
respectively. Now we ask the question, given Hc ðsÞ can we obtain Hn ðzÞ from Hc ðsÞ
directly?
The answer to this question is yes and we will derive two methods for the direct
conversion of Hc ðsÞ to Hn ðzÞ, and these methods will be called forward difference
and bilinear transformation.
Note: For simplicity of notation, we will drop the subscript letters c and n from
the equations Hc ðsÞ and Hn ðzÞ.
dyðtÞ
þ ayðtÞ ¼ xðtÞ ð4:36Þ
dt
which describes a continuous LTI system. Taking the Laplace transform of both
sides of (4.36), we get
1
H ðsÞ ¼ : ð4:37Þ
sþa
dyðtÞ
þ ayðtÞ ¼ xðtÞ
dt
4.2 Transformation Between Continuous and Discrete Time Systems 247
is sampled, we get
dyðtÞ
þ ayðtÞjt¼nTs ¼ xðtÞjt¼nTs
dt t¼nTs
y ½ n y ½ n 1
þ ay½n ¼ x½n: ð4:38Þ
Ts
1
H ðzÞ ¼ 1z1
: ð4:39Þ
aþ Ts
When HðsÞ in (4.37) and HðzÞ in (4.39) are compared to each other as below
1 1
H ðsÞ ¼ H ðzÞ ¼ 1z1
sþa aþ Ts
we see that
d 2 yðtÞ dyðtÞ
þ þ ayðtÞ ¼ xðtÞ ð4:41Þ
dt2 dt
and find the relation between HðsÞ and HðzÞ. Use forward difference transformation
method.
Solution 4.9 The discrete equivalent of
d 2 yðtÞ dyðtÞ
þ þ ayðtÞ ¼ xðtÞ ð4:42Þ
dt2 dt
248 4 Analog and Digital Filter Design
is
which yields
2
1 z1 1 z1
Y ðzÞ Y ðzÞ þ aY ðzÞ ¼ X ðzÞ: ð4:45Þ
Ts Ts
If the bilinear transformation method is used to obtain the difference equation from
differential equation, the relation between transfer functions happens to be as
dyðtÞ
þ ayðtÞ ¼ xðtÞ: ð4:48Þ
dt
4.2 Transformation Between Continuous and Discrete Time Systems 249
Let
dyðtÞ
wðtÞ ¼
dt
then
Zt
yð t Þ ¼ wðsÞds
1
Zt0 Zt
yð t Þ ¼ wðsÞds þ wðsÞds
1 t0
|fflfflfflfflfflfflffl{zfflfflfflfflfflfflffl}
yðt0 Þ
Zt
yð t Þ ¼ yð t 0 Þ þ wðsÞds: ð4:49Þ
t0
When the Eq. (4.49) is sampled at time instants t ¼ nTs and t0 ¼ ðn 1ÞTs , we
get
ZnTs
yðnTs Þ ¼ yððn 1ÞTs Þ þ wðsÞds ð4:50Þ
|fflffl{zfflffl} |fflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflffl}
y½n y½n1 ðn1ÞTs
ZnTs
y½n ¼ y½n 1 þ wðsÞds: ð4:51Þ
ðn1ÞTs
Now let’s consider the evaluation of the integral expression in (4.51). We can
evaluate the integration in (4.51) using the trapezoidal integration rule. This is
shown in the Fig. 4.15.
Using Fig. 4.15, we can write
ZnTs
Ts
wðsÞds ¼ ðwððn 1ÞTs Þ þ wðnTs ÞÞ ð4:52Þ
2
ðn1ÞTs
250 4 Analog and Digital Filter Design
w ((n 1)Ts )
t
0 (n 1)Ts nTs
ZnTs
Ts
wðsÞds ¼ ðw½n 1 þ w½nÞ: ð4:53Þ
2
ðn1ÞTs
Ts
y ½ n ¼ y ½ n 1 þ ðw½n 1 þ w½nÞ: ð4:54Þ
2
dyðtÞ
þ ayðtÞ ¼ xðtÞ: ð4:55Þ
dt
|ffl{zffl}
wðtÞ
Ts
y ½ n ¼ y ½ n 1 þ ðay½n 1 þ x½n 1 ay½n þ x½nÞ ð4:57Þ
2
aTs aTs Ts Ts
y ½ n þ y ½ n þ y½n 1 y½n 1 ¼ þ x½n 1 þ x½n: ð4:58Þ
2 2 2 2
4.2 Transformation Between Continuous and Discrete Time Systems 251
aTs aTs 1 Ts
1þ Y ðzÞ 1 z Y ðzÞ ¼ a þ z1 X ðzÞ ð4:59Þ
2 2 2
Y ðzÞ 1
H ðzÞ ¼ ! H ðzÞ ¼ : ð4:60Þ
X ðzÞ aþ 2 1z1
Ts 1 þ z1
1
H ðsÞ ¼ ð4:61Þ
aþs
we see that
2 1 z1
s¼ ð4:63Þ
Ts 1 þ z1
Digital
Analog
s-plane z-plane
and
2 1 ejwd
r þ jwa ¼
Ts 1 þ ejwd
wd wd wd
!!
2 ej 2 ej 2 ej 2
¼ w w w
Ts ej 2d ej 2d þ ej 2d
2 sin w2d
¼j
Ts cos w2d
2 w
d
¼j tan :
Ts 2
Hence,
2 w
d
wa ¼ tan : ð4:64Þ
Ts 2
z1
s¼ :
Ts
z1
s¼ :
Ts z
2 1 z1
s¼
Ts 1 þ z1
4.2 Transformation Between Continuous and Discrete Time Systems 253
H ðsÞ
H ðzÞ ¼ 1 z1 Ztransform of :
s
4s þ 11
H ðsÞ ¼ :
s2 þ 7s þ 10
Find the transfer function HðzÞ of the digital system obtained via the sampling of
continuous time system.
Solution 4.10 H ðzÞ ¼ HðsÞj , for simplicity of the calculation, we can
1z1
s¼T2s
1 þ z1
19 þ 22z1 þ 3z2
H ðzÞ ¼ :
28 þ 12z1
If the magnitude of HðwÞ in (4.65) gets very small values for some specific
values of w, the output function YðwÞ does no contain any information about XðwÞ
and this operation is called filtering.
Any analog filter is characterized by its transfer function HðwÞ which can be a
complex function with magnitude jHðwÞj and phase \HðwÞ characteristics.
If we denote the phase characteristics as
hð w Þ dhðwÞ
qðwÞ ¼ sðwÞ ¼ : ð4:66Þ
dw dw
Group delay function gives information about the amount of delay introduced by
the system transfer function to the system input. For instance, if
sð w Þ ¼ 2
then for the transfer function with unit gain the system input
xðtÞ ¼ sinðwtÞ
In this section we will study the transfer functions of the ideal filters. For HðwÞ, i.e.,
the transfer function of the ideal filter, the time domain impulse response can be
calculated using the inverse Fourier transform
Z1
1
hð t Þ ¼ HðwÞdw
2p
w¼1
which is a function having non-zero values for all t values in the range
1\t\1, for this reason such filters are not physically realizable, and they are
called ideal filters.
Ideal Low-Pass Filter:
The transfer function of the ideal low-pass filter is shown in Fig. 4.18.
4.3 Analogue Filter Design 255
H lp (w)
w
c 0 c
Zwc
1
hlp ðtÞ ¼ 1 ejwt dw
2p
wc
1
¼ sin cðwc tÞ
pt
1
hhp ðtÞ ¼ 1 sin cðwc tÞ: ð4:68Þ
pt
H hp (w)
w
c 0 c
H bp (w)
w
ch 0 cl 0 cl 0 ch
H (w)
w
ch cl
0 cl ch
Which can be obtained from low-pass filter transfer function with the same
cut-off frequency as
In Fig. 4.20; wcl and wch are low and high cut-off frequencies.
Ideal Band-Stop Filter:
The transfer function of the ideal band-stop filter is shown in Fig. 4.21.
Which can be obtained from band-pass filter transfer function (4.69) as
As can be seen from the filter transfer functions; if we design a low-pass filter,
we can obtain the transfer function of other filters by just manipulating the transfer
function of low-pass filter.
Example 4.11 The transfer function of an analog low-pass filter with cut-off fre-
quency xc ¼ 1 rad/s is given as
1
H 1 ðw Þ ¼ pffiffiffi :
w2 þ 2 2w þ 4
Find the transfer function of low-pass filter with cut-off frequency xc ¼ 2 rad/s.
4.3 Analogue Filter Design 257
w
1 0 1
w
2 0 2
Solution 4.11 The transfer function of the ideal low-pass filter with cut-off fre-
quency xc ¼ 1 rad/s is shown in the Fig. 4.21.
And the transfer function of the ideal low-pass filter with cut-off frequency
xc ¼ 2 rad/s is shown in the Fig. 4.4.
From Figs. 4.22 and 4.23, we see that
w
H2i ðwÞ ¼ H1i ð4:71Þ
2
In a similar manner, using the low-pass filter with cut-off frequency xc ¼ 1 rad/s
in the problem, we can calculate the transfer function of the low-pass filter with
cut-off frequency xc ¼ 2 rad/s employing (4.71) as
4
H 2 ðw Þ ¼ pffiffiffi :
w2 þ 4 2w þ 16
In general, given the transfer function of low-pass filter H1 ðwÞ with cut-off
frequency 1 rad/s, the transfer function of low-pass filter with cut-off frequency xc
can be obtained as
w
Hwc ðwÞ ¼ H1 ð4:72Þ
wc
258 4 Analog and Digital Filter Design
Example 4.12 The transfer function of an analog low-pass filter with cut-off fre-
quency xc ¼ 1 rad/s is given as
1
H1 ðsÞ ¼ pffiffiffi :
s2 þ 2 2 þ 4
Find the transfer function of high-pass filter with cut-off frequency xc ¼ 2 rad/s.
Solution 4.12 First, we can design the low-pass filter with cut-off frequency xc ¼
2 rad/s as in the previous example and the transfer function of the low-pass filter
with cut-off frequency xc ¼ 2 rad/s is found as
4
Hlp ðwÞ ¼ pffiffiffi :
w2
þ 4 2w þ 16
Then the transfer function of the high-pass filter with cut-off frequency xc ¼
2 rad/s can be found as
Hence, for the filter design; it is custom to design a low-pass filter with cut-off
frequency xc ¼ 1 rad/s and transfer it to any desired frequency response.
Although ideal filters are simple to understand they cannot be used to construct
filter circuits; since they need an infinite number of circuit elements. For this reason,
practical analog filter design techniques are adapted in the signal processing liter-
ature. The specifications of a practical analog filter are given in Fig. 4.24.
1
Transition
2 1
(1 )
Passband
Stopband
w
0 wp wc ws
4.3 Analogue Filter Design 259
As can be seen from Fig. 4.24, the squared filter magnitude should satisfy
1
1 þ 2 jH ðwÞj2 1 for 0 w wp
0 jH ðwÞj2 d2 for ws w 1
in stopband.
Filter Parameters
Cut-off frequency:
At cut-off frequency wc , the amplitude of the transfer function equals to
p1ffiffi jH ðwÞj
2 max , that is
1
H ðwc Þ ¼ pffiffiffi jH ðwÞjmax :
2
1
H ðwc Þ ¼ pffiffiffi :
2
Pass-band ripple:
Passband ripple in decibels is defined as
Rp ¼ 10 log 1 þ 2 : ð4:73Þ
Stopband attenuation:
The stopband attenuation is defined as
Rs ¼ 10 log d2 : ð4:74Þ
Selectivity parameter:
The ratio of pass-band frequency to stop-band frequency is called selectivity
parameters, i.e.,
wp
k¼
ws
which is equal to 1 for ideal filters, and for practical filters k\1.
260 4 Analog and Digital Filter Design
Discrimination parameter:
The discrimination parameter is used as an indicator of the pass-band and
stop-band attenuation ratios and defined as
d ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
2
ffi
d 1
The squared magnitude response of the Nth order Butterworth filter is defined as
1
jH ðwÞj2 ¼ 2N ð4:75Þ
w
1þ wc
wNc
H ðsÞ ¼ QN ð4:76Þ
k¼1 ðs pk Þ
The transfer function HðsÞ has N poles located on a circle of radius wc on the left
half plane.
4.3 Analogue Filter Design 261
1
jH ðwÞj2 ¼ 2N
w
1þ wc
pk ¼ wc e 2 ð1 þ ð ÞÞ ;
jp 2k1
N k ¼ 1; . . .; N:
wNc
H ðsÞ ¼ QN :
k¼1 ðs pk Þ
(4) And finally construct the filter circuit using the transfer function HðsÞ found in
the previous step.
Filter order N and cut-off frequency determination:
(a) From Fig. 4.24, we see that
1 1
at w ¼ wp H wp ¼ 2N ! H wp ¼
wp 1 þ 2
1þ wc
1 1
2N ¼ : ð4:78Þ
wp 1 þ 2
1þ wc
1
2N ! H wp ¼ d
2
at w ¼ ws jH ðws Þj ¼
ws
1þ wc
262 4 Analog and Digital Filter Design
1
2N ¼ d :
2
ð4:79Þ
wp
1þ wc
we get
2N
ws d2 1
¼ : ð4:80Þ
wp 2
1 1
wc ¼ N wp wc ¼ d2 1 2N ws : ð4:84Þ
4.3 Analogue Filter Design 263
Or the cut-off frequency can be selected as any value from the range
1 1
N wp wc d2 1 2N ws : ð4:85Þ
Example 4.13 Design the transfer function of low-pass Butterworth filter whose
specifications are given as
Solution 4.13 Let’s first determine the and d values using Rp and Rs given in the
question as follows
Rp ¼ 10 log 1 þ 2 ! 4 ¼ 10 log 1 þ 2 ! 2 ¼ 1:51 ! ¼ 1:23
Rs ¼ 10 log d2 ! 40 ¼ 10 log d2 ! d2 ¼ 104 :
1 1
N wp wc d2 1 2N ws
Passband
Stopband
w
0 wp ws
264 4 Analog and Digital Filter Design
Passband
Stopband
4
10
w
0 1000 3000
as follows
1 1
1:234 1000 wc 104 1 8 3000
as follows
jp
ð 1 þ 14Þ j5p 5p 5p
p1 ¼ 949e 2 ! p1 ¼ 949e ! p1 ¼ 949 cos
8 þ j sin
8 8
jp 7p 7p
p2 ¼ 949e 2 ð1 þ 4Þ ! p2 ¼ 949e 8 ! p2 ¼ 949 cos
3 j7p
þ j sin
8 8
jp 9p 9p
p3 ¼ 949e 2 ð1 þ 4Þ ! p3 ¼ 949e 8 ! p3 ¼ 949 cos
5 j9p
þ j sin
8 8
jp
ð 1 þ 74Þ j11p 11p 11p
p4 ¼ 949e 2 ! p4 ¼ 949e ! p4 ¼ 949 cos
8 þ j sin :
8 8
wNc
H ðsÞ ¼
ð s p1 Þ ð s p2 Þ ð s p3 Þ ð s p4 Þ
9492
H ðsÞ ¼
ðs þ 363Þ2 8762 ðs þ 876Þ2 3632
900;601
H ðsÞ ¼ :
ðs2 þ 726s 635;607Þðs2 þ 1752s þ 635;607Þ
1
jHI ðwÞj2 ¼ ð4:86Þ
1 þ 2 TN2 w
wp
Passband
Stopband
w
0 wp ws
266 4 Analog and Digital Filter Design
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
log d 1 þ d 2 1 cos h1 ðd 1 Þ
N pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ¼ ð4:90Þ
log k 1 þ k2 1 cos h1 ðk1 Þ
where k and d are the selectivity and discrimination parameters, and Rp is the
passband ripple. The cut-off frequency is found by solving the equation
Rp
H ðwc Þ ¼ 10 10 : ð4:91Þ
c
H ðsÞ ¼ QN ð4:92Þ
k¼1 ðs pk Þ
2k 1 2k 1
pk ¼ wp sin hð/Þ sin p þ jwp cos hð/Þ cos p ð4:93Þ
2N 2N
4.3 Analogue Filter Design 267
in which / is defined as
1!
1 1 þ ð1 þ 2 Þ2
/ ¼ ln : ð4:94Þ
N
Use the transfer function of Chebyshev Type-I filter for your design.
Solution 4.14 With the given filter specifications, the parameters and d are cal-
culated as
Rp ¼ 10 log 1 þ 2 ! 5 ¼ 10 log 1 þ 2 ! 2 ¼ 2:16 ! ¼ 1:47
Rs ¼ 10 log d2 ! 40 ¼ 10 log d2 ! d2 ¼ 104 ! d ¼ 102 :
cos h1 ðd 1 Þ
N ! N 2:38 ! N ¼ 3:
cos h1 ðk1 Þ
2k 1 2k 1
pk ¼ wp sin hð/Þ sin p þ jwp cos hð/Þ cos p
2N 2N
p p
p1 ¼ 1000 sin hð0:2121Þ sin þ j1000 cos hð0:2121Þ cos
6 6
p1 ¼ 106:8 þ 885:5j
3p 3p
p2 ¼ 1000 sin hð0:2121Þ sin þ j1000 cos hð0:2121Þ cos
6 6
p2 ¼ 213:7
5p 5p
p3 ¼ 1000 sin hð0:2121Þ sin þ j1000 cos hð0:2121Þ cos
6 6
p3 ¼ 106:8 885:5j:
Y
3
c¼ pk ! c ¼ 170;040;000:
k¼1
170;040;000
H ðsÞ ¼
ðs þ 213:7Þððs þ 106:8Þ2 þ 885:52 Þ
170;040;000
H ðsÞ ¼ :
ðs þ 213:7Þðs2 þ 213:6s þ 784;110Þ
And the above transfer function can be implemented using operational amplifiers
and passive circuit elements.
Chebyshev Type-II Filter:
Chebyshev Type-II filter’s magnitude squared response is monotonic in the
passband and equiripple is the stopband. The magnitude squared response of a
typical Chebyshev Type-II filter is depicted in the Fig. 4.28.
The magnitude squared response of Type-II Chebyshev filter can be given in two
different forms as
4.3 Analogue Filter Design 269
Passband
Stopband
w
0 wp ws
2 TN2 wws
jHII ðwÞj ¼ 2
1 þ 2 TN2 wws
1 ð4:96Þ
jHI ðwÞj2 ¼ :
1 þ TN2 wwp
2
H ðsÞ ¼ c
Q
N
szi ð4:98Þ
>
> spi if N is even
> spN þ2 1
> k¼1
>
>
>
: k 6¼ N þ 1 2
where zi and pi are the zeros and poles of the transfer function and they are
calculated using
ws
zi ¼ j 2k1 ð4:99Þ
cos 2N p
ws 2k 1 2k 1
pi ¼ sin h ð /Þ sin p þ j cos h ð /Þ cos p ð4:100Þ
a2i þ b2i 2N 2N
270 4 Analog and Digital Filter Design
1
/¼ cos h1 d1
N
1 1
ð4:101Þ
¼ ln d1 þ d2 1 2 :
N
1
jH ðwÞj2 ¼
1 þ 2 UN2 ðwÞ
(1 2
) 1 Transition
Stopband
2
wp w
0 ws
4.3 Analogue Filter Design 271
The phase response of the Elliptic filters is a non-linear function. The design of
the elliptic filters is relatively complex when compared to Butterworth and
Chebyshev filters.
For Butterworth, Chebyshev and Elliptic filters; the group delay sðhÞ is a nonlinear
function of the frequency. This means that the time delay introduced to the system
varies nonlinearly with the frequency.
Bessel filters are linear phase filters and the group delay for these filters is a
constant number independent of the frequency. For this reason, a constant time
delay is introduced into the system independent of the frequency.
However, Bessel filters has the lowest roll-off factor among all the practical
filters we have mentioned up to now. The squared magnitude response of a typical
Bessel filter is depicted in the Fig. 4.30.
Summary:
Butterworth Filters: No ripple in passband and stopband. Group delay is nonlinear
function of the frequency. Roll-off is low.
Chebyshev Type-I Filters: Have ripple in passband, no ripple in stopband. Group
delay is a nonlinear function of the frequency. Roll-off is high.
Chebyshev Type-II Filters: No ripple in passband and have ripple in stopband.
Group delay is nonlinear function of the frequency. Roll-off is high.
Elliptic Filters: Have ripple both in passband and stopband. Group delay is a
nonlinear function of the frequency. Roll-off is the highest.
Bessel Filters: No ripple in passband and stopband. Group delay is constant.
Roll-off is the lowest.
w
0 wp ws
272 4 Analog and Digital Filter Design
Once you have analogue low-pass prototype filter with cut-off frequency
wc ¼ 1 rad/s, you can design other filters via frequency transformation. The pos-
sible frequency transformations are summarized as follows:
s
Lowpass to lowpass s where wc is the desired cutoff frequency:
wc
wc
Lowpass to highpass s where wc is the desired cutoff frequency:
s
s 2 þ w cl w cu
Lowpass to bandpass s :
sðwcu wcl Þ
s 2 þ w cl w cu
Lowpass to bandpass s :
sðwcu wcl Þ
sðwcu wcl Þ
Lowpass to bandpass s :
s2 þ wcl wcu
1
Hlp ðsÞ ¼ :
ð s þ 1Þ ð s 2 þ s þ 1Þ
Using the above transfer function, find the transfer function of an high-pass
analog filter with cut-off frequency wc ¼ 1 rad/s.
Solution 4.15 To get the transfer function of an high-pass filter from a low-pass
filter transfer function, simply replace s in low-pass filter transfer function by wsc ,
wc
i.e., s s , that is
Hhp ðsÞ ¼ Hlp ðrÞr¼wc
s
1
Hhp ðsÞ ¼ 1 1 1
s þ1 s2 þ s þ1
4.3 Analogue Filter Design 273
s2 s
Hhp ðsÞ ¼ :
s2 þ s þ 1 s þ 1
As it is seen from the above equation, the transfer function of a high pass filter
includes si like terms in the numerator.
Remember that the transfer function of the low-pass Butterworth filter was in the
form
wNc
H ðsÞ ¼ QN : ð4:102Þ
k¼1 ðs pk Þ
1
H ðsÞ ¼ : ð4:103Þ
ðs þ 1Þðs2 þ s þ 1Þ
As it is also seen in (4.103), we can say that the transfer function of a low-pass
filter has a constant number in its numerator, and at the denominator, we can have
two different types of polynomials which are
ð s þ aÞ s 2 þ b1 s þ b2 :
b
H ðsÞ ¼ ð4:104Þ
sþa
Vin
C2
RB
RA
Vin R3
1
s2
H ðsÞ ¼ K 3K 1
s2 þ s s þ s2
where s ¼ RC.
An alternative implementation of (4.105) can be achieved using the circuit in
Fig. 4.34.
The transfer function of the circuit in Fig. 4.34 can be calculated as
1
s1 s2
H ðsÞ ¼ 1 þ R1 =R3
ð4:106Þ
1
s2 þ s2 sþ s1 s2
Example 4.16 The transfer function of second order low-pass Butterworth filter
with cut-off frequency wc ¼ 1000 rad/s is given as
106
H ðsÞ ¼ :
s2 þ 1414s þ 2 106
Vin R3
106
H ðsÞ ¼
s2 þ 1414s þ 2 106
we see that
1 1 1 þ R1 =R3
¼ 106 ¼ 1414 ¼ 2 106 : ð4:109Þ
s1 s2 s2 s1 s2
1
¼ 1414:
s2
1
R2 ¼ ! R2 ¼ 1504 X:
1414 0:47 106
Next solving
1 1
¼ 2 106 ¼ 1414
s1 s2 s2
4.4 Implementation of Analog Filters 277
1414
R1 ¼ 2 ! R1 ¼ 6017 X:
0:47
1 þ R1 =R3
¼ 2 106
s1 s2
for
1
¼ 106
s1 s2
and
R1 ¼ 6017 X
we find R3 as
R3 ¼ R1 ¼ 6017 X:
With the found values, our second order Butterworth low-pass filter circuit with
cut-off frequency wc ¼ 1000 rad/s becomes as in Fig. 4.36.
The circuit in Fig. 4.36 includes some resistor values which may not be com-
mercially available. In this case, we should use a resistor value closest to the
calculated value in the Figure. This may slightly affect the accuracy of the filter. We
can use the standard resistor and capacitor values shown in Tables 4.1 and 4.2. And
to get the resistor value 6017 X in our example, we can use 6:2 KX or 5:6 KX and
430 X in series.
Vin 6017
278 4 Analog and Digital Filter Design
Let’s consider the transfer function of a high pass Butterworth filter given as
s2 s
Hhp ðsÞ ¼ 2
: ð4:110Þ
s þsþ1sþ1
Inspecting (4.110), we can conclude that the transfer function of a high pass filter
contains two different terms
Ks2 as
; : ð4:111Þ
s2 þ b1 s þ b0 sþb
The transfer function of the circuit in Fig. 4.37 can be calculated in ‘s’ domain.
The transfer function of the circuit in Fig. 4.37 can be calculated as
s R2
H ðsÞ ¼ K 1
where K ¼ 1þ
sþ R 1 C1
R3
If the resistors R2 and R3 are not used in Fig. 4.37, then the transfer function
reduces to
s
H ðsÞ ¼ 1
: ð4:112Þ
sþ R 1 C1
Ks2
H ðsÞ ¼ : ð4:113Þ
s 2 þ b1 s þ b0
The circuit in Fig. 4.38 is called Sallen-Key topology whose transfer function
can be calculated as
Ks2
H ðsÞ ¼ ð4:114Þ
1 1 1K 1
s2 þ s2 þ R2 C 1 þ s1 sþ s1 s2
where s1 ¼ R1 C1 ; s2 ¼ R2 C2 ; K ¼ 1 þ R4 =R3 :
If R1 ¼ R2 and C1 ¼ C2 , then (4.114) reduces to
Ks2
H ðsÞ ¼ : ð4:115Þ
s2 þ 3K
RC s þ
1
R2 C 2
2:6s2
H ðsÞ ¼ : ð4:116Þ
s2 þ 5:31s þ 176:83
Solution 4.17 If we compare the given transfer function in (4.116) to
Ks2
H ðsÞ ¼ 3K 1
s2 þ sþ RC R2 C 2
we see that
2:6s2 Ks2
¼
s2 þ 5:31s þ 176:83 s2 þ 3K
RC s þ
1
R2 C 2
4.4 Implementation of Analog Filters 281
Vout
0.47 F 0.47 F
Vin
16 K
16 K
10 K
where we have
1
¼ 176:83
R2 C 2
1 1012
¼ 176:83 ! R2 ¼ ! R ¼ 16000 X:
R2 ð0:47 106 Þ2 0:472 176:83
R4 R4
2:6 ¼ 1 þ ! ¼ 1:6
R3 R3
Since RR43 ¼ 1:6, we can choose R4 ¼ 16 KX; R3 ¼ 10 KX. Then our high pass
filter circuit becomes as in Fig. 4.39.
Example 4.18 Implement high pass filter transfer function
2:6 0:5s2
H ðsÞ ¼ ð4:117Þ
s2 þ 5:31s þ 176:83
For the implementation of analog bandpass filters, the prototype circuit shown in
Fig. 4.41 can be employed.
Bandstop filters can be implemented using the circuit shown in Fig. 4.42.
16 K
1K
Vout
0.47 F 0.47 F
Vin
16 K 1K
16 K
10 K
Vout
R2 R3
Vin C3 R4 R5
4.5 Infinite Impulse Response (IIR) Digital Filter Design (Low Pass) 283
Two methods are followed for the design of infinite impulse response digital filters,
i.e., IIR filters. These methods are:
(1) Design an analog filter and convert it to a digital filter via sampling operation,
i.e., digitize the designed analog filter to get the digital filter.
(2) Design the IIR digital filter directly.
We will use the first approach in this book. The steps for the design of IIR filters
using analog prototypes are outlined in the Table 4.3.
Example 4.19 The magnitude response of a digital filter is depicted in the
Fig. 4.43.
(a) By mapping the digital filter specifications to a continuous time, determine the
continuous time filter specifications.
(b) Determine the squared magnitude response of the continuous time filter.
Solution 4.19 We will use the bilinear transformation method to find the digital
filter specifications. In bilinear transformation, the relationship between analog and
digital frequencies is
2 w
d
wa ¼ tan
Ts 2
Ts
wd ¼ 2 tan 1
wa :
2
Table 4.3 Steps for the IIR digital filter design using analog prototypes
design of an IIR digital filter
(1) Determine the digital filter specifications, such as
wp ; ws ; Rp ; Rs
(2) Map digital filter frequency specifications to continuous
time filter frequency specifications using a transformation
method, for instance “bilinear transformation”
(3) Design the continuous time filter according to continuous
time specifications
(4) Transform continuous time filter to digital filter using a
transformation method, for instance “bilinear
transformation”
(5) Implement your digital filter by either designing a hardware
using digital gates, or writing a software for digital devices
which can be microprocessors, digital signal processing
chips, or field programmable gate arrays (FPGA)
284 4 Analog and Digital Filter Design
0.9
0.2
w
0 wp 0.4 ws 0.8
2 w
d
wa ¼ tan
Ts 2
0:4p
wap ¼ 4000 tan ! wap ¼ 2906:2 rad/s ! wap ¼ 925:54p
2
0:8p
was ¼ 4000 tan ! was ¼ 12;311 rad/s ! was ¼ 3918:7p:
2
Then the analog filter magnitude response can be drawn as in Fig. 4.44.
0.9
0.2
w
0 wap 925.54 was 3918.7
4.5 Infinite Impulse Response (IIR) Digital Filter Design (Low Pass) 285
Using Fig. 4.44 the squared magnitude response of the analog filter can be found
as in Fig. 4.45.
Example 4.20 The magnitude response of a lowpass digital filter is depicted in
Fig. 4.46. State the digital filter specifications via mathematical expressions.
Solution 4.20 Since Fourier transform of the digital signals is periodic with period
2p, we can express the filter specifications for the interval p w\p. In addition,
we know that aliasing in Fourier transform of a digital signal does not occur if
magnitude response has nonzero values only for the interval p w\p.
For this reason, for the digital filters, we will only consider the frequency interval
p w\p. In addition, the frequency interval 0 jwj\p=2 is accepted as the low
frequency region and the frequency range p=2 jwj\p is accepted as the high
frequency interval.
0.81
0.04
w
0 wap 925.54 was 3918.7
0.9
0.2
w
0 wp 0.2 ws 0.5
286 4 Analog and Digital Filter Design
Example 4.21 Design the digital filter with the following specifications
Solution 4.21 Using the given specifications we can draw the magnitude response
of the digital filter as in Fig. 4.47.
For the design of our digital filter, we first convert digital filter specifications to
analog filter specification using the bilinear transformation method. Since this
example is a continuation of Example 4.19, we can use the converted parameters of
Example 4.19. Using the results of Example 4.19, we can analog draw the analog
filter squared magnitude response as in Fig. 4.48.
To design the analog filter, we can use one of the available analog prototypes
models. Let’s choose Butterworth filter model for our design. From the given
squared magnitude response in Fig. 4.48, the parameters 2 , and d2 are found as
1
pffiffiffiffiffiffiffiffiffiffiffiffi ¼ 0:81 ! 2 ¼ 0:2346 ! ¼ 0:4843 d2 ¼ 0:04:
1 þ 2
0.9
0.2
w
0 w p 0.4 ws 0.8
4.5 Infinite Impulse Response (IIR) Digital Filter Design (Low Pass) 287
0.04
w
0 wap 925.54 was 3918.7
1 1 1 1
wp N wc ws d2 1 2N ! 925:54p ð0:4843Þ2 wc 3918:7p 244
leading to
1308p þ 8619p
wc ¼ ! wc ¼ 4963p ! wc ¼ 15;592:
2
288 4 Analog and Digital Filter Design
pk ¼ wc ej2ð1 þ ð ÞÞ ;
p 2k1
N k ¼ 1; . . .; N:
pffiffiffi pffiffiffi
3p 3p
p1 ¼ 15;592 cos þ j sin ! p1 ¼ 7796 2 þ j 2 ;
4 4
wNc
Ha ðsÞ ¼ : ð4:120Þ
ðs p1 Þðs p2 Þ ðs pN Þ
15;5922
H a ðsÞ ¼ pffiffiffi pffiffiffi pffiffiffi pffiffiffi
s þ 7796 2 j7796 2 s þ 7796 2 þ j7796 2
which is simplified as
15;5922
Ha ðsÞ ¼ pffiffiffi2 pffiffiffi2
s þ 7796 2 þ 7796 2
243;110;464
H a ðsÞ ¼ :
s2 þ 22;050s þ 2:43 108
We are done with the analog filter design. Since our aim was to design the digital
filter, we should digitize our analog filter to find the digital filter. For this purpose,
we will use bilinear transformation method. The conversion procedure is outlined
as:
1
Using Ts ¼ 2000 s in (4.121), we get
243;110;464
Hd ðzÞ ¼ 2 : ð4:122Þ
1z1 1
4000 1 þ z1 þ 22;050 4000 11z
þz 1 þ 2:43 10 8
To implement the digital filter with the above transfer function, we need to
express the filter output-input relation in time domain. This is possible using
where x½n is the input of the digital filter and y½n is the filtered signal.
And the Eq. (4.123) can be implemented using a computer program, or the filter
can be implemented in other digital hardware such as microprocessors, DSP chips,
FPGAs, via hardware programming languages such as assembly, VHDL, etc., or an
application specific digital hardware consisting of gates and other digital devices
can be specifically produced for this filter.
A LTI system is said to be a generalized linear phase system if its transfer function
is of the form
290 4 Analog and Digital Filter Design
where Ar ðwÞ is a real function of w. Considering (4.124), the group delay is cal-
culated as
dhðwÞ
sg ðwÞ ¼ ! sg ðwÞ ¼ a: ð4:125Þ
dw
A causal LTI system is a linear phase system if its L þ 1 point impulse response
h½n satisfies
h½n ¼
h½L n 0 n L ð4:126Þ
where L can be an odd or even integer. And for such systems, the Fourier transform
of h½n happens to be in the form
wL
H ðwÞ ¼ Ar ðwÞej 2 : ð4:127Þ
In many practical applications, FIR filters are preferred over their IIR counterparts.
The main advantages of FIR filter over IIR filter can be summarized as follows:
(1) Most IIR filters have nonlinear phase characteristics, which creates problem for
practical applications.
(2) FIR filters having linear phase responses and they can be easily designed.
(3) FIR filters can be implemented efficiently with affordable computational
overhead.
(4) Stable FIR filters can be designed in an easy manner.
(5) In the literature, there exist excellent FIR filter design techniques.
The main disadvantage of the FIR filters over IIR filters is that for the appli-
cations requiring narrow band transitions, i.e. steep roll-off, more arithmetic oper-
ations are required which means that more digital hardware components such as
adders, multiplexers, multipliers, etc., are required.
Designing FIR filter is nothing but determining the impulse response of an LTI
system. The impulse response of the LTI system under concern includes a finite
number of samples. If h½n denotes the impulse response of a FIR filter, then the
output of the filter is written as:
X
M
y ½ n ¼ h½kx½n k
k¼L
4.6 Finite Impulse Response (FIR) Digital Filter Design 291
where usually L ¼ M is assumed. If h½n ¼ 0 for n\0, then the filter is said to be a
causal filter. Otherwise, we have an anti-causal filter. Causal filters are practically
realizable; on the other hand, anti-causal filters cannot be implemented. For this
reason, anti-causal FIR filters should be transferred to causal FIR filters to enable
their use in practical systems.
There are basically three methods used for the design of FIR filters. These methods
are
(a) FIR filter design by windowing.
(b) FIR filter design by frequency sampling.
(c) Equiripple FIR filter design.
Now let’s see the first method.
Zwc
1
hid ½n ¼ Hilp ðwÞ ejwn dw
2p |fflfflffl{zfflfflffl}
wc ¼1
1
¼ sinðwc nÞ n ¼ 0;
1;
2; . . .
pn
where wc is called cut-off frequency. It is clear that hid ½n includes an infinite
number of samples. And the convolutional operation cannot be realized using an
w
c 0 c
292 4 Analog and Digital Filter Design
infinite number of samples. To alleviate this obstacle, we truncate the ideal filter and
obtain the FIR filter as
hid ½n if jnj L
h½ n ¼
0 otherwise
To alleviate the effects of Gibbs phenomenon, windows other than the rectan-
gular one such as, Hamming, Hanning, Bartlett, Triangular, and Blackman are used.
Design of FIR Filter in Frequency Domain:
Assume that HðwÞ is the frequency response of a FIR filter in a way that it
minimizes the error
Zp
1
¼ jH ðwÞ Hid ðwÞj2 dw
2p
p
X
1
¼ jh½n hid ½nj2 !
n¼1
X
L X
¼ jh½n hid ½nj2 þ jh½n hid ½nj2 : ð4:129Þ
n¼0 n¼Z½0 L
4.6 Finite Impulse Response (FIR) Digital Filter Design 293
Properties of Windows:
Let Wn ðwÞ be the frequency response of the window. The main-lobe of the
window is defined as the region between the first zero crossings on the left and right
sides of the origin.
The width of the main-lobe of the causal rectangular window is approximated as
4p
Dw ¼ : ð4:130Þ
Lþ1
Hamming Window:
2pn
0:54 0:46 cos if 0 n L
w½n ¼ L ð4:132Þ
0 otherwise
Blackman Window:
4pn
0:42 0:5 cos 2pn
L þ 0:08 cos L if 0 n L
w½n ¼ ð4:133Þ
0 otherwise
294 4 Analog and Digital Filter Design
For the Hanning, Hamming, and Blackman windows the general form can be
written as
2pn 4pn
a þ b cos þ c cos if 0 n L
w½n ¼ L L ð4:134Þ
0 otherwise
where for Hanning window a ¼ 0:5; b ¼ 0:46; c ¼ 0, and for Blackman window
a ¼ 0:42; b ¼ 0:5; c ¼ 0:08.
Bartlett (Triangular) Window:
8
< 2n
L if 0 n L2
w½n ¼ 2 L if L2 \n L
2n ð4:135Þ
:
0 otherwise
In Table 4.4 five different windows are compared to each other considering
mainlobe width and peak sidelobe amplitude.
All the windows given up to now can be approximated by the Kaiser window.
Now let’s give some information about Kaiser window.
Kaiser Window:
The Kaiser window is defined as
8 h 1 i
< I0 b 1½na2 2
a
w½n ¼ if 0 n L ð4:136Þ
: I0 ðbÞ
0 otherwise
where I0 ð Þ is the modified Bessel function of the first kind which is equal to
Z2p
1
I 0 ð xÞ ¼ ex cos h dh ð4:137Þ
2p
0
2q is the maximum ripple available in the passband. Let the transition region
width be defined as Dw ¼ ws wp . With the given filter specifications, the order of
the Kaiser window is found as
C8
L¼ ð4:140Þ
2:285Dw
which is also the length of the FIR filter satisfying the given specifications.
Example 4.22 Find the impulse response of a FIR filter whose specifications are
given as
Solution 4.22 First we need to calculate the order of the Kaiser window given as
C8
L¼
2:285Dw
C8 40 8
L¼ !L¼ ! L ¼ 12
2:285Dw 2:285 0:4p
Next, we calculate the design parameter b as follows
b2 b4 b6 b8
I0 ðbÞ 1 þ þ þ þ
2 64 2304 147;456
8 h 1 i
< I0 b 1½na2 2
a
w½n ¼ 0nL
: I0 ðbÞ
0 otherwise
w½n ¼ ½0:15
|{z} 0:31 0:5 0:69 0:85 0:96 1 0:96 0:85 0:69 0:5 0:31 0:15:
n¼0
1
hid ½n ¼ sinðwc nÞ
pn
wp þ ws
wc ¼ ! wc ¼ 0:6p:
2
hid ¼ ½|{z}
0:6 0:30 0:09 0:06 0:07 0 0:05 0:03 0:02 0:03
n¼0
0 0:03 0:016:
as
Let H ðwÞ be the Fourier transform of the impulse response of the FIR filter to be
designed. If we take L samples from H ðwÞ via sampling operation as in
4.6 Finite Impulse Response (FIR) Digital Filter Design 297
H ½k ¼ H ðwÞjw¼k2p k ¼ 0; 1; . . .; L 1 ð4:141Þ
L
1XL1
2p
h½n ¼ H ½kejk L ; n ¼ 0; 1; ; L 1 ð4:142Þ
L k¼0
4.7 Problems
d 2 yð t Þ dyðtÞ dxðtÞ
2
þ4 þ 3yðtÞ ¼ xð t Þ
dt dt dt
to a difference equation via sampling operation and find the transfer function of
the difference equation.
(2) For a continuous time LTI system, the relation between system input and
system output is given via the differential equation
d 2 yð t Þ dyðtÞ d 2 xð t Þ
2
þ2 3yðtÞ ¼ þ 2xðtÞ:
dt dt dt2
(a) Find the transfer function HðsÞ of this filter. In other words, design your
analog filter with the given specifications in the problem. For your design,
use Butterworth, Chebyshev Type-I, and Chebyshev Type-II filter design
methods separately.
(b) Implement your filters using circuit elements.
298 4 Analog and Digital Filter Design
(a) Find the transfer function HðzÞ of this filter. Use sampling period Ts ¼ 1 in
your design.
(b) Using HðzÞ, write a difference equation between filter input and filter
output.
(5) Design the FIR digital filter whose specifications are given as
In your design use the windowing approach, and use Kaiser window for your
design.
Bibliography
F K
Fast Fourier Transform (FFT) algorithms, 207 Kaiser window, 294
Filter parameters, 259
Finite Impulse Response (FIR) digital filter L
design, 234, 290 Laplace transform, 239
FIR filter design by frequency sampling, 291, Left shifted functions, 79
296 L’Hôpital’s rule, 38
FIR filter design by windowing, 291 Linear and time invariant system, 234
FIR Filter design techniques, 291 Linear approximation of the reconstruction
Forward difference approximation, 242, 244 filter, 64
Forward difference transformation method, 246 Linearity, 186, 189
Fourier series representation, 5 Linear time invariant, 233
Fourier transform, 27, 29 Lower cut-off frequency, 272
Fourier transform of a rectangle signal, 64 Lowpass digital filter, 109
Fourier transform of digital exponential signal, Low pass filter circuits, 273
120 Lowpass filtering of digital signals, 121
Fourier transform of product signal, 9, 11 Low pass input signal, 26
Frequency domain analysis of upsampling, 99
Frequency mapping, 251 M
Manipulation of digital signals, 146
G Manipulation of non-periodic digital signals,
Generalized linear phase systems, 289 146
Manipulation of periodic digital signals, 149
H Mathematical analysis of interpolation, 107
Hamming window, 293 Mathematical formulization of upsampling, 98
Hanning window, 293 Matrix representation of circular convolution,
High pass filter transfer function, 280 196
Matrix representation of DFT and inverse DFT,
I 184
Ideal band-pass filter, 255 Mid-level quantizer, 134
Ideal band-stop filter, 256 Mid-rise quantizer, 135
Ideal filters, 254 Modified bessel function, 294
Ideal high-pass filter, 255 Multirate signal processing, 71
Ideal low-pass filter, 254
Ideal reconstruction filter, 113 N
IIR digital filter design., 234 No aliasing, 58
Imaginary DFT coefficients, 187 Non-periodic digital signal, 170
Imaginary part DFS, 187
Implementation of analog filters, 273 O
Impulse function, 36 Odd numbered elements, 214
Impulse response, 233 Odd numbered samples, 214
Index 303