100% found this document useful (2 votes)
1K views310 pages

Understanding Digital Signal Processing by Orhan Gazi

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
1K views310 pages

Understanding Digital Signal Processing by Orhan Gazi

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 310

Springer Topics in Signal Processing

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

ISSN 1866-2609 ISSN 1866-2617 (electronic)


Springer Topics in Signal Processing
ISBN 978-981-10-4961-3 ISBN 978-981-10-4962-0 (eBook)
DOI 10.1007/978-981-10-4962-0
Library of Congress Control Number: 2017940604

© Springer Nature Singapore Pte Ltd. 2018


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part
of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission
or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this
publication does not imply, even in the absence of a specific statement, that such names are exempt from
the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this
book are believed to be true and accurate at the date of publication. Neither the publisher nor the
authors or the editors give a warranty, express or implied, with respect to the material contained herein or
for any errors or omissions that may have been made. The publisher remains neutral with regard to
jurisdictional claims in published maps and institutional affiliations.

Printed on acid-free paper

This Springer imprint is published by Springer Nature


The registered company is Springer Nature Singapore Pte Ltd.
The registered company address is: 152 Beach Road, #21-01/04 Gateway East, Singapore 189721, Singapore

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.

Maltepe/Ankara, Turkey Orhan Gazi


November 2016

www.TechnicalBooksPDF.com
Contents

1 Sampling of Continuous Time Signals . . . . . . . . . . . . . . . . . . . . . .... 1


1.1 Sampling Operation for Continuous Time Signals . . . . . . . . . .... 2
1.1.1 Sampling Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . .... 4
1.1.2 Mathematical Characterization of the Sampling
Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... 5
1.2 Sampling Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... 6
1.2.1 The Fourier Transform of the Product Signal . . . . . . . .... 7
1.3 How to Draw Fourier Transforms of Product Signal
and Digital Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.1 Drawing the Fourier Transform of Digital Signal . . . . . . . . 25
1.4 Aliasing (Spectral Overlapping) . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.4.1 The Meaning of the Aliasing (Overlapping) . . . . . . . . . . . . 33
1.4.2 Drawing the Frequency Response of Digital Signal
in Case of Aliasing (Practical Method) . . . . . . . . . . . . . . . . 39
1.5 Reconstruction of an Analog Signal from Its Samples . . . . . . . . . . 45
1.5.1 Approximation of the Reconstruction Filter . . . . . . . . . . . . 51
1.6 Discrete Time Processing of Continuous Time Signals . . . . . . . . . . 55
1.7 Continuous Time Processing of Digital Signals . . . . . . . . . . . . . . . 61
1.8 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
2 Multirate Signal Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.1 Sampling Rate Reduction by an Integer Factor (Downsampling,
Compression) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
2.1.1 Fourier Transform of the Downsampled Signal . . . . . . . . . . 75
2.1.2 How to Draw the Frequency Response of Downsampled
Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
2.1.3 Aliasing in Downsampling . . . . . . . . . . . . . . . . . . . . . . . . . 80
2.1.4 Interpretation of the Downsampling in Terms
of the Sampling Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

vii

www.TechnicalBooksPDF.com
viii Contents

2.1.5 Drawing the Fourier Transform of Downsampled Signal


in Case of Aliasing (Practical Method) . . . . . . . . . . . . . . . . 92
2.2 Upsampling: Increasing the Sampling Rate by an Integer
Factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
2.2.1 Upsampling (Expansion) . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
2.2.2 Mathematical Formulization of Upsampling . . . . . . . . . . . . 98
2.2.3 Frequency Domain Analysis of Upsampling . . . . . . . . . . . . 99
2.2.4 Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
2.2.5 Mathematical Analysis of Interpolation . . . . . . . . . . . . . . . . 107
2.2.6 Approximation of the Ideal Interpolation Filter . . . . . . . . . . 111
2.2.7 Anti-aliasing Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
2.3 Practical Implementations of C/D and D/C Converters . . . . . . . . . . 128
2.3.1 C/D Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
2.3.2 Sample and Hold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
2.3.3 Quantization and Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
2.3.4 D/C Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
2.4 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
3 Discrete Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
3.1 Manipulation of Digital Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
3.1.1 Manipulation of Periodic Digital Signals . . . . . . . . . . . . . . . 149
3.1.2 Shifting of Periodic Digital Signals . . . . . . . . . . . . . . . . . . . 149
3.1.3 Some Well Known Digital Signals . . . . . . . . . . . . . . . . . . . 156
3.2 Review of Signal Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
3.3 Convolution of Periodic Digital Signals . . . . . . . . . . . . . . . . . . . . . 165
3.3.1 Alternative Method to Compute the Periodic
Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
3.4 Sampling of Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
3.5 Discrete Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
3.5.1 Aliasing in Time Domain . . . . . . . . . . . . . . . . . . . . . . . . . . 182
3.5.2 Matrix Representation of DFT and Inverse DFT . . . . . . . . . 184
3.5.3 Properties of the Discrete Fourier Transform. . . . . . . . . . . . 185
3.5.4 Circular Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
3.6 Practical Calculation of the Linear Convolution . . . . . . . . . . . . . . . 198
3.6.1 Evaluation of Convolution Using Overlap-Add Method . . . 199
3.6.2 Overlap-Save Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
3.7 Computation of the Discrete Fourier Transform . . . . . . . . . . . . . . . 207
3.7.1 Fast Fourier Transform (FFT) Algorithms . . . . . . . . . . . . . . 207
3.7.2 Decimation in Time FFT Algorithm . . . . . . . . . . . . . . . . . . 207
3.7.3 Decimation in Frequency FFT Algorithm . . . . . . . . . . . . . . 217
3.8 Total Computation Amount of the FFT Algorithm . . . . . . . . . . . . . 225
3.9 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

www.TechnicalBooksPDF.com
Contents ix

4 Analog and Digital Filter Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233


4.1 Review of Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
4.1.1 Z-Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
4.1.2 Laplace Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
4.2 Transformation Between Continuous and Discrete
Time Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
4.2.1 Conversion of Transfer Functions of LTI Systems . . . . . . . 245
4.2.2 Forward Difference Transformation Method . . . . . . . . . . . . 246
4.2.3 Bilinear Transformation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
4.3 Analogue Filter Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
4.3.1 Ideal Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
4.3.2 Practical Analog Filter Design . . . . . . . . . . . . . . . . . . . . . . 258
4.3.3 Practical Filter Design Methods . . . . . . . . . . . . . . . . . . . . . 260
4.3.4 Analog Frequency Transformations . . . . . . . . . . . . . . . . . . . 272
4.4 Implementation of Analog Filters . . . . . . . . . . . . . . . . . . . . . . . . . . 273
4.4.1 Low Pass Filter Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
4.4.2 Analog High-Pass Filter Circuit Design . . . . . . . . . . . . . . . 279
4.4.3 Analog Bandpass Active Filter Circuits . . . . . . . . . . . . . . . 282
4.4.4 Analog Bandstop Active Filter Circuits . . . . . . . . . . . . . . . . 282
4.5 Infinite Impulse Response (IIR) Digital Filter Design
(Low Pass) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
4.5.1 Generalized Linear Phase Systems . . . . . . . . . . . . . . . . . . . 289
4.6 Finite Impulse Response (FIR) Digital Filter Design . . . . . . . . . . . 290
4.6.1 FIR Filter Design Techniques . . . . . . . . . . . . . . . . . . . . . . . 291
4.7 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301

www.TechnicalBooksPDF.com
Chapter 1
Sampling of Continuous Time Signals

Signal is a physical phenomenon that carries information. This physical phe-


nomenon is described by mathematical functions, and usually the signal and its
mathematical function are used for one another, i.e., synonymous. For instance,
when we talk about a sinusoidal signal, we use the sinusoidal function, a mathe-
matical function, to characterize the signal, and the name sinusoidal is used for the
signal. Signals are usually depicted in graphs to observe their behavior and analyze
them. Sinusoidal signals are the main signals and all the other signals can be
considered as being made up of sinusoidal signals with different frequencies and
amplitudes. That is to say, any continuous time signal can be written as sum of
sinusoidal signals with different frequencies and amplitudes. Rectangular signal,
square pulse signal, impulse train signal, triangle signal can be given as examples of
continuous time signals.
Digital signals are obtained from continuous time signals via sampling opera-
tion. Digital signals are represented as mathematical sequences, and the elements of
these sequences are nothing but the amplitude values taken from continuous time
signals at every multiple of the sampling period. Since in the last several decades a
huge improvement is achieved at the development of the digital devices, it has
become almost a must especially for electrical engineers to have a good knowledge
of digital signals. Digital signals are almost available in every part of our life.
Computers, TVs, speakers, mobile phones, house equipment, and most of the other
electronic devices process digital signals. In this chapter, we discuss the con-
struction of digital signals via sampling operation, their spectral analyses, the case
of aliasing, and reconstruction of a continuous time signal from its samples.

© Springer Nature Singapore Pte Ltd. 2018 1


O. Gazi, Understanding Digital Signal Processing, Springer Topics
in Signal Processing 13, DOI 10.1007/978-981-10-4962-0_1

www.TechnicalBooksPDF.com
2 1 Sampling of Continuous Time Signals

1.1 Sampling Operation for 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

x½n ¼ xc ðnTs Þ n 2 Z; Ts 2 R ð1:1Þ

where n is of integer type and Ts is the sampling period.


The block diagram of the sampling operation is depicted in Fig. 1.1.
Let’s now try to explain the sampling operation on a sinusoidal signal. The graph
of the sinusoidal signal with period T is given in Fig. 1.2.
Let’s now take some samples from the sine signal in Fig. 1.2, and within this
purpose, let’s choose sampling period as Ts ¼ T6 . Samples from signal amplitude are
taken at every multiple of Ts , and this operation is illustrated in Fig. 1.3.
The sampled amplitude values are placed into an array and expressed as a
mathematical sequence. The mathematical sequence obtained from the above
sampling operation can be written as
 
a b c d e f g h i j k l
x½ n ¼ |{z}
n¼0

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.

Fig. 1.1 Sampling operation


of a continuous time signal

Fig. 1.2 Sine signal with period T

www.TechnicalBooksPDF.com
1.1 Sampling Operation for Continuous Time Signals 3

Fig. 1.3 Sampling of the sine signal

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

Fig. 1.4 Digital sine signal

If starting index value, i.e., n ¼ 0, is not indicated in the mathematical sequence,


the index of the first element is accepted as n ¼ 0.
Graphical illustration is usually employed for easy understanding of the sam-
pling operation and to interpret the meaning of the received signal. Let’s consider
the sampling of sine signal again and write a mathematical expression for the digital
sine signal. The continuous time sinus signal with period T is written as
 
2p
xc ðtÞ ¼ sin t : ð1:2Þ
T

If the continuous time signal in (1.2) is sampled with sampling period Ts ¼ T6 , we


obtain the digital signal x½n whose mathematical expression can be calculated as
  p 
2p T
x½n ¼ xc ðtÞjt¼nTs ! x½n ¼ sin n ! x½n ¼ sin n : ð1:3Þ
T 6 3

By giving negative and positive values to n we obtain the amplitude values of


digital sine signal which can be shown as

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

x½n ¼ xc ðtÞjt¼nTs ! x½n ¼ cosð2ptÞjt¼nTs


 
1
! x½n ¼ cos 2pn ð1:5Þ
8
pn
! x½n ¼ cos :
4

1.1.1 Sampling Frequency

In communication theory; sampling frequency is one of the most important


parameters. Sampling frequency is used more than sampling period. Sampling
frequency shows the number of samples taken from a continuous time signal
per-second. For this reason, it is an indicator of the quality of the
continuous-to-digital converters. As sampling frequency increases more samples
are taken per-second but this leads to an increase in transmission overhead.
As an example, if the sampling frequency is 1000 Hz i.e., 1 kHz, it means that
every second, 1000 samples are taken from continuous time signal.
Verification
Let’s now prove the above claim (the meaning of sampling frequency) for a con-
tinuous time periodic signal. Let xc ðtÞ be a continuous time periodic signal, with
period T and Ts be the sampling period. In this case, from one period of the signal a
total of TTs samples are collected. The continuous time period signal repeats itself T1
times in 1 s. According to this information, in one second, the total number of
samples taken from the signal equals to TTs  T1 ! T1s which is nothing but the
sampling frequency.

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.

1.1.2 Mathematical Characterization of the Sampling


Operation

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

Fig. 1.5 Impulse train function

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

1.2 Sampling Operation

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

xs ðtÞ ¼ xc ðtÞ  sðtÞ ð1:13Þ

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 )

2Ts Ts 0 4Ts 5Ts


t
6Ts 5Ts 4Ts 3Ts Ts 2Ts 3Ts 6Ts

xs (t ) xc (t ) s (t )

2Ts Ts 0 4Ts 5Ts


t
6Ts 5Ts 4Ts 3Ts Ts 2Ts 3Ts 6Ts

Fig. 1.6 Multiplication of sine signal by an impulse train

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

where substituting x½n ¼ xc ðnTs Þ, we obtain

X
1
xs ð t Þ ¼ x½ndðt  nTs Þ ð1:16Þ
n¼1

1.2.1 The Fourier Transform of the Product Signal

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

where if the integration and summation expressions are interchanged we get


X
1 Z1
Xs ðwÞ ¼ x½n dðt  nTs Þejwt dt ð1:18Þ
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

xs ðtÞ ¼ xc ðtÞ  sðtÞ ð1:20Þ

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

where substituting the expression in (1.12) for SðwÞ; we get

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

We have obtained a second alternative expression for the Fourier transform of


product signal. Let’s write both Fourier expressions again

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

The Fourier transform of the digital signal x½n is calculated using

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

from which Xn ðwÞ can be obtained by replacing w with w


Ts and we obtain
 
1 X 1
w
Xn ðwÞ ¼ Xc  kws : ð1:28Þ
Ts k¼1 Ts

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.

Exercise: Calculate the Fourier transforms of

xc ðtÞ ¼ dðtÞ þ dðt  1Þ

and

x½n ¼ d½n þ d½n  1

and draw their magnitude and phase responses.

www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 11

1.3 How to Draw Fourier Transforms of Product


Signal and Digital Signal

The derived mathematical expression for Xs ðwÞ is given as

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

The period of Xs ðwÞ is denoted by ws whose value equals to 2p Ts . Drawing the


graph of Xs ðwÞ consists of two steps. In the first step, we draw the graph of T1s Xc ðwÞ
around the origin. Then in the next step, the drawn graph around the origin is
shifted to the left and right by integer multiples of ws ¼ 2p
Ts , i.e., by kws ; k 2 Z, and
the shifted replicas together with the one around the origin are all summed.
Before studying some problems on the drawing of Xs ðwÞ, let’s inspect some
examples to prepare ourselves for the drawing of Xs ðwÞ.
Example 1.3 In Fig. 1.7, the graphics of X1 ðwÞ and X2 ðwÞ are given for the interval
0  w  4. Draw the graph of X1 ðwÞ þ X2 ðwÞ for the same interval.
Solution 1.3 To draw the graphic of X1 ðwÞ þ X2 ðwÞ, let’s first write the mathe-
matical expressions for each function, then sum these functions to get the mathe-
matical expression for the summed signals. The mathematical expressions for the
signals X1 ðwÞ and X2 ðwÞ are given as
w w
X1 ðwÞ ¼ þ 2 X2 ðwÞ ¼
2 2
If we sum mathematical expressions for the signals X1 ðwÞ and X2 ðwÞ, we get

X1 ðwÞ þ X2 ðwÞ ¼ 2:

Fig. 1.7 The graphics of X1 ( w) X2 ( w)


X1 ðwÞ and X2 ðwÞ

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

Fig. 1.8 The graphics of X1 ðwÞ þ X2 ðwÞ

Fig. 1.9 The graphics of


X1 ðwÞ and X2 ðwÞ functions
X 1 ( w) X2 ( w)

w
0 4

The obtained result is graphically shown in Fig. 1.8.


Example 1.4 The graphics of X1 ðwÞ and X2 ðwÞ for the interval 0  w  4 are shown
in Fig. 1.9. The slopes of the lines in Fig. 1.9 are 1=2 and 1=2. According to the
given information, draw the graphic of X1 ðwÞ þ X2 ðwÞ for the same interval.
Solution 1.4 To draw the graph of X1 ðwÞ þ X2 ðwÞ we need to find its mathematical
expression. For this purpose, let’s first write the mathematical expressions for X1 ðwÞ
and X2 ðwÞ using the given information for the interval 0  w  4 as
w w
X1 ðwÞ ¼ 
þ a X2 ðwÞ ¼ þ b
2 2
When the mathematical expressions for X1 ðwÞ and X2 ðwÞ are summed, we obtain

X1 ðwÞ þ X2 ðwÞ ¼ a þ b

which is graphically depicted in Fig. 1.10.


Example 1.5 The graphics of X1 ðwÞ and X2 ðwÞ functions for the interval 0  w  4
are shown in Fig. 1.11. The slopes of the lines in Fig. 1.11 are 1=2 and 1=2.
According to the given information, draw the graphic of X1 ðwÞ þ X2 ðwÞ.

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

Fig. 1.10 The graphic of X1 ðwÞ þ X2 ðwÞ

Fig. 1.11 The graphic of


X1 ðwÞ and X2 ðwÞ

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Þ ¼ mw þ a X2 ðwÞ ¼ mw þ b:


If we sum the line equations of these two functions, we obtain

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

Fig. 1.12 The graphic of X1 ðwÞ þ X2 ðwÞ

Fig. 1.13 Graph of Xc ðwÞ Xc (w)

w
wN 0 wN

Solution 1.6 The Fourier transform of the product signal xs ðtÞ is

1 X 1
Xs ðwÞ ¼ Xc ðw  kws Þ
Ts k¼1

which is a periodic function with period ws ¼ 2p


Ts : When the summation expression
in Xs ðwÞ is expanded, we get

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

Fig. 1.14 The graphics of 1


Ts Xc ðwÞ; T1s Xc ðw þ ws Þ and 1
Ts Xc ðw  ws Þ

Xs (w)
A
Ts

w
ws wN ws ws wN wN 0 wN ws wN ws ws wN

Fig. 1.15 The graphic of Xs ðwÞ

Solution 1.7 The sampling frequency in rad/sec is

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

Fig. 1.16 The graphic of Xc ðwÞ

X c (w 4000 ) X c (w) X c (w 4000 )

6000 4000 2000 2000 4000 6000 8000

X c (w 8000 ) X c (w 4000 ) X c (w) X c (w 4000 ) X c (w 8000 )

10000 8000 6000 4000 2000 2000 4000 6000 8000 10000 12000
w

Fig. 1.17 Shifted Xc ðwÞ signals

2
1

10000 8000 6000 4000 2000 2000 4000 6000 8000 10000 12000
w

Fig. 1.18 Summation of the shifted replicas

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

Fig. 1.19 The graphic of Xs ðwÞ

Fig. 1.20 The graphic Xc (w)


of Xc ðwÞ
1

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

Solution 1.8 From the equation

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

Fig. 1.21 The graphic X c (w)


of Xc ðwÞ
1

0 w
1000 500 250 250 500 1000

Fig. 1.22 Shifted graphs


of Xc ðwÞ X c (w)
X c (w 500 )

w
1000 500 250 250 500 1000

X c (w)
X c (w 500 )
1

w
1000 500 250 250 500 1000

Fig. 1.23 Shifted graphs


of Xc ðwÞ X c (w)
X c (w 500 ) X c (w 500 )
1

w
1000 500 250 250 500 1000

www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 19

1000 500 250 250 500 1000


w

Fig. 1.24 Shifted graphs of Xc ðwÞ

Fig. 1.25 Shifted graphs of Xc ðwÞ and repeating pattern

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:

and the graph of Xs ðwÞ is drawn as in Fig. 1.26.

Fig. 1.26 Summation result


of shifted Xc ðwÞ functions

w
0
1000 1000

www.TechnicalBooksPDF.com
20 1 Sampling of Continuous Time Signals

Fig. 1.27 The graphic of Xs (w)


Xs ðwÞ

500

w
1000 0 1000

In the last step to get the graph of

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.

Fig. 1.28 The graphic of X c (w)


Xc ðwÞ for Example 1.9

w
1000 500 250 250 500 1000

www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 21

Xc (w 750 ) Xc (w) X c (w 750 )


4

w
1000 750 500 250 250 500 750 1000

w
1000 500 250 250 500 1000

Fig. 1.29 Shifted Xc ðwÞ functions

Fig. 1.30 The repeating pattern

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

Fig. 1.31 The repeating


pattern drawn in details

Fig. 1.32 The graphic


obtained after summing the
overlapping lines

Fig. 1.33 The graphic


obtained after summing the
triangle shape and horizontal
line

www.TechnicalBooksPDF.com
1.3 How to Draw Fourier Transforms of Product Signal … 23

Fig. 1.34 The graphic of Xs ðwÞ:

Fig. 1.35 Repeating part in


details

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

Fig. 1.37 Xs ðwÞ graph

Fig. 1.38 Fourier transform X c (w)


of an input signal

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

Exercise: The Fourier transform of a continuous time signal is given as

Xc ðwÞ ¼ pðdðw  500pÞ þ dð þ 500pÞÞ:

Using the given Fourier transform draw the graph of

X
1
Xs ðwÞ ¼ 200 Xc ðw  k400pÞ:
k¼1

1.3.1 Drawing the Fourier Transform of Digital Signal

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

Fig. 1.39 Fourier transform of a low pass input signal

X s (w)
A
Ts

w
ws wN ws ws wN wN 0 wN ws wN ws ws wN

Fig. 1.40 Graph of Xs ðwÞ

Solution 1.10
Method 1: Let’s first draw the graph of

1 X 1
Xs ðwÞ ¼ Xc ðw  kws Þ
Ts k¼1

which is a periodic function with period ws ¼ 2p


Ts : The graph of Xs ðwÞ is shown in
Fig. 1.40.
In the second step, we multiply the horizontal axis of Xs ðwÞ by Ts to get the
graph of Xn ðwÞ. The graph of Xn ðwÞ is shown in Fig. 1.41.

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

Fig. 1.41 Graph of Xn ðwÞ

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

Method 2: In the second method, we first draw the graph of


 
1 w
Xc
Ts Ts

then we shift the drawn graph to the left and right


  by multiples of 2p and obtain the
graph of Xn ðwÞ. To draw the graph of 1
Ts Xc w
Ts ; we multiply the vertical and
horizontal axes of Xc ðwÞ by 1
and Ts respectively. In Fig. 1.42 the graph of
  Ts
1 w
Ts Xc Ts is depicted.
 
Let’s denote T1s Xc Tws by Xn1 ðwÞ. To get the graph of Xn ðwÞ, we shift Xn1 ðwÞ to
the left and right by multiples of 2p and sum the shifted replicas. This operation is
illustrated in Fig. 1.43.
Example 1.11 The continuous time signal xc ðtÞ is given as

xc ðtÞ ¼ cosð4000ptÞ:

(a) Draw Xc ðwÞ, the Fourier transform of xc ðtÞ.


(b) Let xs ðtÞ ¼ xc ðtÞsðtÞ where sðtÞ is the impulse train and Ts ¼ 80001
s. Draw
Xs ðwÞ, the Fourier transform of xs ðtÞ.
(c) Let x½n ¼ xc ðnTs Þ where Ts ¼ 8000
1
s. Draw Xn ðwÞ, the Fourier transform of
x½n.

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

Fig. 1.43 Xn ðwÞ graph

and sine and cosine signals can be written in terms of the exponential signals as
1 þ jwN t
1

sinðwN tÞ ¼ e  ejwN t cosðwN tÞ ¼ e þ jwN t þ ejwN t ð1:33Þ


2j 2
And the Fourier transforms of the sinusoidal signals are given as

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ÞÞ

and its graph is depicted as in Fig.P1.44.


(b) Since xs ðtÞ ¼ xc ðtÞsðtÞ, and sðtÞ ¼ 1k¼1 dðt  kTs Þ, where Ts is the sampling
period, Fourier transform of xs ðtÞ is

1 X 1
Xs ðwÞ ¼ Xc ðw  kws Þ
Ts k¼1

where ws ¼ 2pTs ! 1=8000 ¼ 16000p. Using the Fourier transform expression


2p

Xc ðwÞ found in the previous part, Xs ðwÞ can be calculated as

X
1
Xs ðwÞ ¼ 8000 Xc ðw  k16000pÞ !
k¼1
X1
Xs ðwÞ ¼ 8000p ðdðw  4000p  k16000pÞ þ dðw þ 4000p  k16000pÞÞ
k¼1

and the graph of Xs ðwÞ is displayed in Fig. 1.45.

Xc (w)

w
4000 4000

Fig. 1.44 Fourier transform of xc ðtÞ ¼ cosð4000ptÞ

Xs (w)

8000

w
16000 4000 4000 16000

Fig. 1.45 Fourier transform of the product signal xs ðtÞ

www.TechnicalBooksPDF.com
30 1 Sampling of Continuous Time Signals

Fig. 1.46 Fourier transform


of Xn ðwÞ

(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.

1.4 Aliasing (Spectral Overlapping)

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.

Fig. 1.47 The Fourier transform of a low pass signal

www.TechnicalBooksPDF.com
1.4 Aliasing (Spectral Overlapping) 31

Fig. 1.48 The graph of Xs ðwÞ

Fig. 1.49 Aliasing case

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

Note: If Xc ðwÞ is a complex function, to see the overlapping case graphically we


first draw the graph of jXc ðwÞj, and then the graph of

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Þ

Fig. 1.50 Graph of Xc ðwÞ

X s (w)
A
Ts

w
ws wN ws ws wN wN 0 wN ws wN ws ws wN

Fig. 1.51 Graph of Xs ðwÞ

www.TechnicalBooksPDF.com
1.4 Aliasing (Spectral Overlapping) 33

and no aliasing condition in (1.41) can also be expressed as

ws [ 2wN ! 2pfs [ 2  2pfN ! fs [ 2fN : ð1:42Þ

1.4.1 The Meaning of the Aliasing (Overlapping)

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

Fig. 1.52 Fourier transform of the composite signal xc ðtÞ

X c (w)

w
40 20 0 20 40

Fig. 1.53 Graph of jXc ðwÞj

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

or in terms of unit of Hz, fs [ 40 Hz.

www.TechnicalBooksPDF.com
1.4 Aliasing (Spectral Overlapping) 35

Method 2: Comparing the given sinusoidal functions to cosð2pf1 tÞ and sinð2pf2 tÞ


expressions, we find the frequencies of the sinusoidal signals as f1 ¼ 10 Hz and
f2 ¼ 20 Hz, and decide on the sampling frequency as

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

Derive (1.44) starting from the right hand side of (1.45).


Solution 1.14 Before starting to the derivation, let’s remember the Fourier and
inverse Fourier transforms of continuous time signal

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

in which if we substitute x½n ¼ Xc ðnTs Þ, we get

X
1
Xn ðwÞ ¼ xc ðnTs Þejwn : ð1:48Þ
n¼1

In (1.48) if xc ðnTs Þ is replaced by (1.46), we get

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

which can be re-arranged as

1 X 1 1
Z
Xn ðwÞ ¼ X c ð kÞ ejðwkTs Þn dk ð1:50Þ
2p n¼1 1

and exchanging the places of summation and integration operators, we obtain

1 1Z
X1
Xn ðwÞ ¼ Xc ðkÞ ejðwkTs Þn dk ð1:51Þ
2p 1 n¼1

on which we can use the property

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

leading to the expression


 
1 1Z 2p X 1
w 2p
Xn ðwÞ ¼ X c ð kÞ d kk dk ð1:55Þ
2p 1 Ts k¼1 Ts Ts

where upon exchanging summation and integration operators, we get


 
1 X 1
1 1Z w 2p
Xn ðwÞ ¼ Xc ðkÞd kk dk ð1:56Þ
Ts k¼1 2p 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

Fig. 1.54 xc ðtÞ graph for xc (t )


Example 1.15
1

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

Exercise: The inverse Fourier transform for digital signals is given as

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

Fig. 1.55 Fourier transform of xc ðtÞ in Fig. 1.54

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

which is nothing but the value of Xc ðwÞ at origin, i.e., Xc ð0Þ.


As it is seen from Fig. 1.55, the largest positive frequency in the signal spectrum
goes to infinity and the smallest non-negative frequency is 0. We need to choose
infinity as sampling frequency and this is not a feasible value for practical imple-
mentations. However, as it is seen from the Fourier transform graph, the amplitude
of the signal spectrum decreases sharply when frequency is beyond Tp . So, we can
assume that the spectrum amplitude is negligible beyond a frequency value. We can

www.TechnicalBooksPDF.com
1.4 Aliasing (Spectral Overlapping) 39

choose the largest frequency as wN ¼ 4p


T , and according to the chosen frequency, we
can write the lower bound for sampling frequency as

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.

1.4.2 Drawing the Frequency Response of Digital Signal


in Case of Aliasing (Practical Method)

In sampling operation if the sampling frequency is chosen as

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

x½n ¼ xc ðtÞjt¼nTs ! x½n ¼ xc ðnTs Þ


 
1 X 1
w
Xn ðwÞ ¼ Xc  kws :
Ts k¼1 Ts

Let the Fourier transform of the continuous time signal to be sampled be as in


Fig. 1.56.  
If fs \2wN , then the graph of T1s Xc Tws happens to be as in Fig. 1.57.

 1.57 is inspected carefully it is seen that when fs \2wN , the function


IfFig.
1
Ts Xc Ts takes values outside the interval ðp; pÞ on horizontal axis. In Fig. 1.58,
w

the shadowed triangles denoted


  by ‘A’ and ‘B’ show the intervals outside ðp; pÞ
where the function T1s Xc Tws has nonzero value.

www.TechnicalBooksPDF.com
40 1 Sampling of Continuous Time Signals

Fig. 1.56 Fourier transform Xc (w)


of a continuous time signal

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

Fig. 1.59 Shifting of the shadowed triangles

Fig. 1.60 Summation of the overlapping lines

The amount of this destruction depends


  on the widths of the shadowed triangles.
In other words, as the function T1s Xc w
Ts extends outside the interval ðp; pÞ more,
the amount of distortion on the original signal due to overlapping increases.
The graph obtained after summing the overlapping lines is depicted alone in
Fig. 1.61.
Let’s now, step by step, describe drawing the graph of Xn ðwÞ in case of aliasing
in an easy and practical manner.
 
Step 1: First we draw the graph of T1s Xc Tws . For this purpose, we divide the
horizontal axis of the graph of Xc ðwÞ by 1=Ts i.e., we multiply the horizontal axis
by Ts , and multiply the amplitude values by 1=Ts .
Step 2: If the sampling frequency is chosen as fs \2wN , then aliasing occurs in the
Fourier transform
 of x½n, i.e., aliasing occurs in Xn ðwÞ. And in this case, the graph
of 1
Ts Xc w
Ts 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
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.

Fig. 1.62 Fourier transform


of a low pass input signal

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

Fig. 1.65 The portions of


graph outside ðp; pÞ interval
are labelled by ‘A’ and ‘B’

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

summed, we obtain  15p128


w þ 128
5 . In a similar manner, if we write the equations of
the overlapping lines for the interval ðp=2; pÞ and sum them, we obtain

www.TechnicalBooksPDF.com
44 1 Sampling of Continuous Time Signals

Fig. 1.66 Shadowed portions


are shifted to the right and to
the left by 2p

Fig. 1.67 One period of


Xn ðwÞ around origin

Fig. 1.68 Fourier transform


of a continuous time signal

 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

Fig. 1.69 Fourier transform


of a continuous time signal

1.5 Reconstruction of an Analog Signal from Its Samples

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

Fig. 1.70 Reconstruction operation in time domain

www.TechnicalBooksPDF.com
46 1 Sampling of Continuous Time Signals

Fig. 1.71 Fourier transform of xc ðtÞ

Fig. 1.72 Fourier transform of xs ðtÞ

Fig. 1.73 Multiplication of Xs ðwÞ by rectangle function Hr ðwÞ

2p p
[ 2wN ! wN \ : ð1:62Þ
Ts Ts

Now consider the reconstruction operation in frequency domain. We had


problem in converting xs ðtÞ to xc ðtÞ in time domain. However, it is clear from
Fig. 1.72 that it is easy to get the Fourier transform of xc ðtÞ, i.e., Xc ðwÞ from the
Fourier transform of xs ðtÞ, i.e., Xs ðwÞ. To get Xc ðwÞ from Xs ðwÞ, it is sufficient to
multiply Xs ðwÞ by a rectangle function centered around the origin. This operation is
depicted in Fig. 1.73 where rectangle function is denoted by Hr ðwÞ which is
nothing but the transfer function of a low pass analog filter.

www.TechnicalBooksPDF.com
1.5 Reconstruction of an Analog Signal from Its Samples 47

Fig. 1.74 Fourier transform


of the reconstruction filter

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

where using the property sinðhÞ ¼ 2j1 ejh  ejh ; we obtain


 
pt
sin Ts
hr ð t Þ ¼ pt : ð1:63Þ
Ts

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

Fig. 1.75 Reconstruction filter impulse response

 
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.,

Xc ðwÞ ¼ Xs ðwÞHr ðwÞ: ð1:66Þ

Since multiplication in frequency domain equals to convolution in time domain,


(1.66) can be also be expressed as

xc ðtÞ ¼ xs ðtÞ  hr ðtÞ ð1:67Þ

where substituting

X
1
x½ndðt  nTs Þ
n¼1

for xs ðtÞ, we obtain

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

Note: f ðtÞ  dðt  t0 Þ ¼ f ðt  t0 Þ


Using (1.63) in (1.68) the reconstructed analog signal from its samples can be
written as
 
X
1 sin p ðtnT
Ts

xc ðt Þ ¼ x½n pðtnTs Þ
ð1:69Þ
n¼1 Ts

or in terms of sin cðÞ function, it is written as

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

Fig. 1.76 Sampling of sine


signal

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

Using the x½n in (1.72), the reconstructed signal can be written as

xc ðtÞ ¼    þ hr ðt þ 3Ts Þ  hr ðt þ Ts Þ þ hr ðt  Ts Þ  hr ðt  3Ts Þ þ    ð1:74Þ

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.

Fig. 1.77 Reconstruction filter impulse response

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.

1.5.1 Approximation of the Reconstruction Filter


 
The reconstruction filter hr ðtÞ ¼ sin c t
Ts is depicted in Fig. 1.79 where it is seen
that the filter has a large main lobe and small side lobes, and as the time values

hr (t )

t
0

5Ts 4Ts 3Ts 2Ts Ts Ts 2Ts 3Ts 4Ts 5Ts

Fig. 1.79 Reconstruction filter impulse response

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

Fig. 1.80 Approximation of the reconstruction filter

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

for the right edge, the line equation is

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

Fig. 1.81 Reconstruction of analog signal using approximated filter

www.TechnicalBooksPDF.com
54 1 Sampling of Continuous Time Signals

xc ðtÞ ¼    þ har ðt þ 3Ts Þ  har ðt þ Ts Þ þ har ðt  Ts Þ  har ðt  3Ts Þ þ   


ð1:77Þ

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.

Fig. 1.82 Better approximation of the reconstruction filter

Fig. 1.83 Reconstruction


operation using block diagram

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Þ.

1.6 Discrete Time Processing of Continuous Time Signals

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

If perfect reconstruction filter is to be employed, then


 
t
hr ðtÞ ¼ sin c : ð1:79Þ
Ts2

Frequency Domain Relations:


 
1 X 1
w
Xn ðwÞ ¼ Xc  kws1 ð1:80Þ
Ts1 k¼1 Ts1

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

Fig. 1.84 Digital processing


of a continuous time signal

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

If Ts1 ¼ Ts2 ¼ Ts , then (1.84) reduces to



Ts Hn ðTs wÞXc ðwÞ;  Tps  w  p
Yr ðwÞ ¼ Ts : ð1:85Þ
0; otherwise

Ts if  Tps  w  p
Note: Hr ðwÞ ¼ Ts
0 otherwise
Example 1.19 In Fig. 1.85, the graphs of Xc ðwÞ and Xn ðwÞ are depicted. In addi-
tion, x½n ¼ xc ðtÞjt¼nTs . By comparing the graphs of Xc ðwÞ and Xn ðwÞ, write Xc ðwÞ
in terms of Xn ðwÞ.

Fig. 1.85 Graphs for Example 1.19

www.TechnicalBooksPDF.com
1.6 Discrete Time Processing of Continuous Time Signals 57

Fig. 1.86 One period of


Xn ðwÞ around origin

Solution 1.19 First let’s write the expression for one period of Xn ðwÞ around origin as

Xn ðwÞ  p  w\p ð1:86Þ

which is graphically shown as in Fig. 1.86.


If we divide the horizontal axis of Xn ðwÞ by Ts , we get
p p
Xn ðTs wÞ   w\ ð1:87Þ
Ts Ts

which is graphically depicted in Fig. 1.87.


If we multiply the amplitudes by Ts , we obtain
p p
Ts Xn ðTs wÞ   w\ : ð1:88Þ
Ts Ts

which is graphically depicted in Fig. 1.88.


Figure 1.88 is nothing but the graph of Xc ðwÞ. As a result, we can conclude that
if x½n ¼ xc ðtÞjt¼nTs , then we can express Fourier transform of xc ðtÞ i.e., Xc ðwÞ in
terms of Fourier transform of x½n i.e., Xn ðwÞ as
p p
Xc ðwÞ ¼ Ts Xn ðTs wÞ   w\ : ð1:89Þ
Ts Ts

Fig. 1.87 One period of


Xn ðTs wÞ around origin

www.TechnicalBooksPDF.com
58 1 Sampling of Continuous Time Signals

Fig. 1.88 One period of


Ts Xn ðTs wÞ around origin

Fig. 1.89 Continuous to


digital converter

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

which is written explicitly as


     
1 w 2p 1 w 1 w 2p
Xn ðwÞ ¼    þ Xc þ þ Xc þ Xc  þ    ð1:91Þ
Ts Ts Ts Ts Ts Ts Ts T s
|fflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflfflffl{zfflfflfflfflfflfflffl} |fflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflffl}
n¼1 n¼0 n¼1
 
In (1.91), let Yc ðwÞ ¼ Ts Xc Ts , then it is obvious that Yc ðw  2pÞ ¼
1 w
 
1
Ts X c
w
Ts  Ts . The explicit expression of Xn ðwÞ can be written as
2p

Xn ðwÞ ¼    þ Yc ðw þ 2pÞ þ Yc ðwÞ þ Yc ðw  2pÞ þ    ð1:92Þ

  that one period of Xn ðwÞ is Yc ðwÞ, that is to say, one


From (1.92), it is obvious
period of Xn ðwÞ is Ts Xc Tws and this can mathematically be written as
1

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

which can also be written as


p p
Ts Xn ðwTs Þ ¼ Xc ðwÞ   w\ : ð1:94Þ
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

Yr ðwÞ ¼ Ts Ynop ðTs wÞ ð1:95Þ

The expression in (1.95) can also be written as


p p
Yr ðwÞ ¼ Ts Yn ðTs wÞ  w : ð1:96Þ
Ts Ts

Fig. 1.90 Digital to continuous converter

Fig. 1.91 Digital to continuous conversion

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

the relation in one period can be written as


 
w
Xn ðwÞ ¼ Yc ! Yc ðwÞ ¼ Xn ðTs wÞ: ð1:98Þ
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

Yr ðwÞ ¼ Hc ðwÞXc ðwÞ ð1:99Þ


Considering only one period (op) of the Fourier transforms of the digital signals
around origin, the relations between input and output of each unit can be written as
C/D:
 
1 w
Xnop ðwÞ ¼ Xc ð1:100Þ
Ts Ts

Disc.Time System:

Ynop ðwÞ ¼ Hn ðwÞXnop ðwÞ ð1:101Þ

Fig. 1.92 Signal processing


systems for Example 1.23

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 combine the expressions (1.100–1.102), we get

Yr ðwÞ ¼ Hnop ðTs wÞXc ðwÞ: ð1:103Þ

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

h½n ¼ Ts hc ðtÞjt¼nTs : ð1:105Þ

1.7 Continuous Time Processing of Digital Signals

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

y½n ¼ yc ðtÞjt¼nTs : ð1:107Þ

Frequency domains relations are



Ts Xn ðTs wÞ if  Tps  w  p
X c ðw Þ ¼ Ts Yc ðwÞ ¼ Xc ðwÞHc ðwÞ ð1:108Þ
0 otherwise

Fig. 1.93 Continuous time


processing of digital signals

www.TechnicalBooksPDF.com
62 1 Sampling of Continuous Time Signals

Fig. 1.94 Signal processing


units for Example 1.24

Fig. 1.95 Signal processing


units for Example 1.24

 
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

Yn ðwÞ ¼ Hn ðwÞXn ðwÞ: ð1:110Þ


Here Yn ðwÞ is periodic with period 2p and one period of it can be written as
either

Yn ðwÞ ¼ Hn ðwÞXn ðwÞ  p  w\p ð1:111Þ

or

Ynop ðwÞ ¼ Hn ðwÞXnop ðwÞ ð1:112Þ

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

If we combine the expressions in (1.113), we get



Hc ðwÞTs Xn ðTs wÞ if  Tps  w  p
Y c ðw Þ ¼ Ts ð1:115Þ
0 otherwise

and substituting (1.115) into (1.114), we obtain

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

One period of Yn ðwÞ is


 
w
Ynop ðwÞ ¼ Hc Xnop ðwÞ ð1:117Þ
Ts

If we equate the right hand sides of (1.112) and (1.117)


   
w w
Hn ðwÞXnop ðwÞ ¼ Hc Xnop ðwÞ ! Hn ðwÞ ¼ Hc ð1:118Þ
Ts Ts

which is can be expressed in time domain as

h½n ¼ Ts hc ðtÞjt¼nTs : ð1:119Þ

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

Fig. 1.96 Continuous time


signal for Example 1.25

www.TechnicalBooksPDF.com
64 1 Sampling of Continuous Time Signals

Fig. 1.97 Fourier transform of a rectangle signal

Fig. 1.98 Sampling of the rectangular signal

Fig. 1.99 Linear approximation of the reconstruction filter

 
1 1 1 1 1
|{z} 1 1 1
x½n ¼ : ð1:122Þ
n¼0

The construction of the approximated reconstruction filter is repeated in


Fig. 1.99.

www.TechnicalBooksPDF.com
1.7 Continuous Time Processing of Digital Signals 65

Fig. 1.100 Linear


approximation of the
reconstruction filter for Ts ¼ 12

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

The shifted filters appearing in (1.124) is depicted in Fig. 1.101.

Fig. 1.101 Shifted triangle reconstruction filters

www.TechnicalBooksPDF.com
66 1 Sampling of Continuous Time Signals

Fig. 1.102 Sum of the shifted reconstruction filters

Fig. 1.103 Reconstructed


signal for Ts ¼ 16
1

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

Fig. 1.104 Linear


approximation of the
reconstruction filter for Ts ¼ 12

Fig. 1.105 Reconstructed


signal for Ts ¼ 16
1

Fig. 1.106 Signal graph for


Example 1.26

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

(2) The signal depicted in Fig. 1.107 is sampled.


(a) For the sampling period Ts ¼ 1 s, first draw the graph of impulse train
function sðtÞ, then draw the graph of the product signal xs ðtÞ ¼ xc ðtÞsðtÞ.
Find the digital signal x½n and draw its graph.
(b) For the sampling period Ts ¼ 0:5 s repeat part (a)
(3) For the impulse train function

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

Fig. 1.107 Continuous time


signal

www.TechnicalBooksPDF.com
1.8 Problems 69

Fig. 1.108 Two lines for


Question-6
b

t
0

Fig. 1.109 Fourier transform


of a continuous time signal

Fig. 1.110 Fourier transform


of a continuous time signal

(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

Fig. 1.111 Continuous time


signal graph for Question-13

Fig. 1.112 Fourier transform


of a continuous time signal

(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.

© Springer Nature Singapore Pte Ltd. 2018 71


O. Gazi, Understanding Digital Signal Processing, Springer Topics
in Signal Processing 13, DOI 10.1007/978-981-10-4962-0_2

www.TechnicalBooksPDF.com
72 2 Multirate Signal Processing

2.1 Sampling Rate Reduction by an Integer Factor


(Downsampling, Compression)

To represent a continuous time by digital sequences, we take samples from the


continuous time signal according a sampling frequency and form a mathematical
sequence. If the mathematical sequence contains too many samples, we can omit
some of these samples and keep the rest of the samples for transmission, storage,
processing etc.
Let’s give another example from real life. Assume that you want to send 500
students to a university in a foreign country. The selected students represent your
university and from each department 10 students were selected. Later on you think
that the travel cost of 500 students is too much and decide on reducing the number
of selected students.
A continuous time signal can be considered as a digital signal containing infinite
number of samples for any time interval. Sampling of analog signals is nothing but
selecting a finite number of samples from the infinite sample sets of the analog
signals for the given time interval. The downsampling operation can be considered
as the sampling of digital signals. In this case a digital signal containing a number
of samples for a given time interval is considered and for the given interval, some of
the samples of the digital signal are selected and a new digital signal is formed. This
operation is called downsampling. During the downsampling some of the samples
of a digital signal are selected and the remaining samples are omitted.
The downsampling operation is illustrated in Fig. 2.1 where x½n is the signal to
be downsampled and y½n is the signal obtained after downsampling x½n, i.e., after
omitting sampled from x½n, and M is the downsampling factor.
Given x½n to find the compressed signal, i.e., downsampled signal, y½n, we
divide the time axis of x½n by M and keep only integer division results and omit all
non-integer division results. Let’s illustrate this operation by an example.
Example 2.1 A digital signal expressed as a mathematical sequence is given as

x½n ¼ ½3:3  2:5 1:2 4:5 5:5  2:3 5:0


|{z} 6:2 3:4 2:3  4:4 3:2 2:0
n¼0

Find the downsampled y½n ¼ x½3n.

Fig. 2.1 Downsampling


operation x [n] M y[ n ] = x[ Mn ]

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

As it is seen from the previous example, downsampling a digital signal by


M means that from every M samples of the digital signal only one of them is
selected and the rest of them are eliminated. As an example, if y½n ¼ x½6n, then
from every 6 samples of x½n only one of them is kept and the other 5 samples are
omitted.
Now we ask the question, if sampling frequency is fs and downsampling factor is
M, after downsampling operation how many samples per-second are available at the
downsampler output? The answer is given in the block diagram in Fig. 2.2.
Where d:e is the upper-floor operation. If fs is a multiple of M, the diagram in
Fig. 2.2 reduces to the one in Fig. 2.3.
Example 2.2 Interpret the block diagram given in Fig. 2.4.
Solution 2.2 At the input of the block, we receive 300 samples per-second which
are obtained from an analog signal via sampling operation. At the output of the
downsampler only 1 of every 3 samples is kept and the other 2 samples are omitted.

Fig. 2.2 Sampling frequency ⎡ fs ⎤


at the downsampler output fs M ⎢M ⎥
⎢ ⎥

www.TechnicalBooksPDF.com
74 2 Multirate Signal Processing

fs
fs M
M

Fig. 2.3 Sampling frequency at the downsampler output when fs is a multiple of M

fs
f s = 300 3 f ds = → f ds = 100
3

Fig. 2.4 Downsampler for Example 2.2

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:

2.1.1 Fourier Transform of the Downsampled Signal

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

where defining r , Mn, we obtain


X r
Yn ðwÞ ¼ x½r ejwM ð2:8Þ
r¼0;M;2M

which can be written after parameter changes as


X n
Yn ðwÞ ¼ x½nejwM ð2:9Þ
n¼0;M;2M

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

which can be rearranged as

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

The expression in (2.11) can be reduced to


 
1X w þ k2p
Yn ðwÞ ¼ Xn : ð2:12Þ
M k;M M

In (2.10), if (2.5) was used, then we would obtain


 
1X w  k2p
Yn ðwÞ ¼ Xn : ð2:13Þ
M k;M M

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

Using the inverse Fourier transform expression for y½n, i.e.,

Z2p
1
y½n ¼ Yn ðwÞejwn dw ð2:15Þ
2p
w¼0

show that y½n ¼ x½Mn.


Solution 2.4 The inverse Fourier transform is given as

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

If (2.17) is expanded for all k values, we obtain

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

When (2.19) is compared to

Z2p
1
x ½ n ¼ Xn ðwÞejwn dw
2p
0

it is seen that y½n ¼ x½Mn.

www.TechnicalBooksPDF.com
78 2 Multirate Signal Processing

2.1.2 How to Draw the Frequency Response


of Downsampled Signal

To draw the graph of

X1  
1M w  k2p
Yn ðwÞ ¼ Xn
M k¼0 M

students usually expand the summation as


   
1 w 1 w  2p 1 w  4p
Yn ðwÞ ¼ Xn þ Xn þ Xn þ  ð2:20Þ
M M M M M 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

Fig. 2.5 One period of the Fourier transform of x½n

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

Fig. 2.6 The graph of 12 Xn ðw2 Þ

1 w 2
Y1n ( w 2 ) Xn( )
2 2
1
2

w
2 2 2 2
2
2
3 3

Fig. 2.7 Right shifted functions

1 w 2
Y1n ( w 2 ) Xn( )
2 2 1
2

w
2 2 2
2 2 2
3 3

Fig. 2.8 Left shifted functions

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

Fig. 2.9 Sum of the shifted functions

Fig. 2.10 One period of the


X n (w) w
Fourier transform of x½n

w
3 3

2.1.3 Aliasing in Downsampling

A digital signal is nothing but a mathematical sequence obtained via sampling of a


continuous time signal. If we have sufficient number of samples, we can reconstruct
the continuous time signal from its samples.
If we have too many samples, generated during the sampling operation we can
eliminate some of these excessive samples via the downsampling operation.
However, while performing the downsampling operation, we should be careful to
keep sufficient number of samples in the digital signal such that the reconstruction
of the continuous time signal is still possible after downsampling operation.
If we eliminate a number of samples more than a threshold value, the rest of the
samples may not be sufficient to reconstruct the continuous time signal and this
effect is seen as the aliasing in the spectrum graph of the downsampled signal.
Example 2.6 Assume that we have a low pass continuous time signal with band-
width fN ¼ 40 Hz. We choose the sampling frequency according to the criteria
fs [ 2fN ! fs [ 80 as fs ¼ 120. This means that we take 120 samples per-second
from the continuous time signal. However, our chosen sampling frequency is not
very cost efficient.
The lower limit for the sampling frequency is fs [ 80 which means that the
minimum sampling frequency can be chosen as fs ¼ 81: However we use fs ¼ 120
which means that every per-second we transmit 120 − 81 = 39 excessive samples
which are not necessary to reconstruct the continuous time signal. We can

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

where fD is the digital frequency, and manipulating more, we have

1 p p
M\ ! M\ ! M\ ! MwD \p ð2:23Þ
2fD 2pfD wD

where wD is the angular digital frequency.


Let’s now graphically illustrate the no aliasing criteria after downsampling
operation. Assume that one period of the Fourier transform of the digital signal x½n
to be downsampled is given as in Fig. 2.11. Let y½n ¼ x½Mn be the downsampled
signal. w
Depending on the value of M, we can draw the two possible graphs of M1 Xn M
as shown in Figs. 2.12 and 2.13.
When the graph in Fig. 2.12 is shifted to the left and right by multiples of 2p, no
overlapping occurs among shifted graphs. However, this case does not hold for the
graph shown in Fig. 2.13. If the graph shown in Fig. 2.13 is shifted to the left and
right by multiples of 2p, overlapping is observed between shifted replicas, and this
situation is depicted in Fig. 2.14.
Example 2.7 The continuous time signal xc ðtÞ ¼ cos ð6000ptÞ is sampled with
1
sampling period Ts ¼ 8000 and the digital sequence x½n is obtained. Next the digital

Fig. 2.11 One period of the X n (w) w


Fourier transform of the
digital signal x½n to be
downsampled 1

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

Fig. 2.14 Aliasing in downsampled signal spectrum graph

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

Fig. 2.15 Signal processing system for exercise

2.1.4 Interpretation of the Downsampling in Terms


of the Sampling Period

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

Fig. 2.19 Signal processing system for Example 2.8

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Þ

Accordingly, the Fourier transform of xc ðtÞ is found as

Xc ðwÞ ¼ pðdðw  5000pÞ þ dðw þ 5000pÞÞ:

and graphically it is shown in Fig. 2.20.


For the given example, since fs [ 2fN ! 8000 [ 2  2500 criteria is satisfied,
no aliasing is observed in the Fourier transform of x½n, and for this reason, one
period of the Fourier transform of x½n for the interval p  w\p equals Xn ðwÞ ¼
 
1 w
Ts Xc Ts which is depicted in Fig. 2.21.
For the downsampled
 signal, we have y½n ¼ x½3n, let’s draw one period of
Yn ðwÞ ¼ 13 Xn w3 using one period of Xn ðwÞ around origin as in Fig. 2.22 where
impulses are labeled with letters so that we can distinguish them while forming the
Fourier transform of y½n.
If the graph in Fig. 2.22 is carefully inspected, we see that after downsampling
operation one period of the Fourier transform of the downsampled signal extends
beyond the interval ðp; pÞ in frequency axis. This means that the number of
samples omitted is greater than the allowed threshold and for this reason perfect
reconstruction of the continuous time signal is not possible anymore. It may be
reconstructed with some distortion or the reconstructed signal may be a totally

Fig. 2.20 Fourier transform X c (w)


of xc ðtÞ in Example 2.8

w
5000 0 5000

Fig. 2.21 One period of the X n (w) w


Fourier transform of x½n for
Example 2.8 8000

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

Fig. 2.23 One period of Yn ðwÞ shifted to the right by 2p

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

Fig. 2.25 Fourier transform Yr (w)


of the reconstructed signal for
Example 2.8
B 3 A

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

Fig. 2.26 Aliasing case in downsampled signal

Fig. 2.27 Yn ðwÞ, p  w\p Yn (w) w

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.

Fig. 2.28 After elimination Yn (w) w


of the overlapping shaded
parts in Fig. 2.27 1
M

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

Fig. 2.29 Elimination of the high frequency parts by a decimator filter

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

yielding the expression


 n
sin pn 1
hdn ½n ¼ M
! hdn ½n ¼ sin c : ð2:28Þ
pn M M

The filtering process before downsampling operation is illustrated in Fig. 2.30.


The system in Fig. 2.30 is called decimator system, and the overall operation in
Fig. 2.30 is named as decimation.
For the system in Fig. 2.30, we have Y1n ðwÞ ¼ Hdn ðwÞXn ðwÞ and y½n ¼ y1 ½Mn.
One period of Yn ðwÞ is written as Yn ðwÞ ¼ M1 Y1n ðM
w
Þ; p  w\p. One period of
Yn ðwÞ is shown in Fig. 2.31.

www.TechnicalBooksPDF.com
90 2 Multirate Signal Processing

Fig. 2.30 Decimator system H dn (w)


1

w
M M
y1[n]
x[n] hd [n] M y[n] y1[ Mn]

Fig. 2.31 One period of Yn (w ) w


Yn ðwÞ
1
M

One period of Yn ðwÞ can be expressed as



Yn ðwÞ p  w\p
Ynop ðwÞ ¼ ð2:29Þ
0 otherwise

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

Fig. 2.32 Fourier transform of filtered and dowsampled signal

www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 91

Fig. 2.33 One period of the X n (w) w


Fourier transform of a digital
signal
1

w
2 2
3 3

Note: The simplest de-multiplexer is the serial to parallel converter.


Example 2.9 The delay system is described in Fig. 2.34.
If

x½n ¼ ½1 2 3 4 5 6 7 8 9
|{z} 10 11 12 13 14 15
n¼0

find the output of each unit given in Fig. 2.35.


Solution 2.9 To get y½n ¼ x½n  n0 ; n0 [ 0, it is sufficient to shift n ¼ 0 pointer to
the left by n0 units in x½n sequence. For negative n0 , we shift the n ¼ 0 pointer to
the right by n0 units. According to this information, x½n  1 can be calculated as

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

at the outputs of the downsamplers.


As it is seen from the obtained sequences, the system separates the odd and even
indexed samples.

Fig. 2.34 Delay system


x[n] z n0
x[n n0 ]

Fig. 2.35 Signal processing


system for Example 2.9 x[n] 2 y1[n]

z 1
2 y2 [ n ]

www.TechnicalBooksPDF.com
92 2 Multirate Signal Processing

Fig. 2.36 Delay system


n0
x[n] z x[ n n0 ]

Fig. 2.37 Signal processing


system for Example 2.10
x[n] 3 y1[n]

z 1
3 y2 [ n ]

z 1
3 y3[n]

Example 2.10 The delay system is shown in Fig. 2.36.


If

x½n ¼ ½1 2 3 4 5 6 7 8 9
|{z} 10 11 12 13 14 15
n¼0

find the output of each unit given in Fig. 2.37.


Solution 2.10 Following similar steps as in the previous example, we find the
digital signals at the outputs of the downsamplers as

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.

2.1.5 Drawing the Fourier Transform of Downsampled


Signal in Case of Aliasing (Practical Method)

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

Now let’s explain these steps using graphics.


Let the Fourier transform of x½n be as shown
 w in Fig. 2.38.
In case of aliasing, one period of M1 Xn M around origin will be as shown in
Fig. 2.39. w
If Fig. 2.39 is inspected carefully, it is seen that the function M1 Xn M takes
values outside the interval ðp; pÞ on horizontal axis. In Fig.
2.40, the shadowed
triangles denoted by ‘A’ and ‘B’ show the portion of M1 Xn M w
extending outside of
ðp; pÞ.

Fig. 2.38 Fourier transform X n (w)


of x½n

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

Fig. 2.41 Shaded parts


shifted A
M

B A
w
Mwd 0 Mwd

Fig. 2.42 Sum of the


overlapping lines A
M

B A
w
Awd 0 Awd

www.TechnicalBooksPDF.com
2.1 Sampling Rate Reduction by an Integer Factor … 95

Fig. 2.43 The resulting


graph after summing the A
overlapping lines M

w
Mwd 0 Mwd

Fig. 2.44 One period of X n ( w)


Xn ðwÞ
1

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

Fig. 2.47 Shaded parts


shifted to the right and to the 1/4
left by 2p

B A
w
0
2 2

Fig. 2.48 One period of


Yn ðwÞ around origin 1/4

w
0
2 2

Fig. 2.49 One period of the X n ( w)


Fourier transform of x½n
4

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

Fig. 2.50 Xn ðwÞ bir periyodu X n (w)

w
3 0 3
16 24

2.2 Upsampling: Increasing the Sampling Rate


by an Integer Factor

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.

2.2.1 Upsampling (Expansion)

The block diagram of the upsampler (expander) is shown in Fig. 2.51.


The mathematical expression of the upsampling operation is

Fig. 2.51 Upsampling


operation x[n] L y[ n ] x[ n / L ]

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:

2.2.2 Mathematical Formulization of Upsampling

The upsampling, expansion, of x½n by L is defined as


 n
x L n ¼ 0; L; 2L; . . .
y ½ n ¼ ð2:32Þ
0 otherwise

www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 99

which can be written in terms of impulse function as

X
1
y ½ n ¼ x½k d½n  kL: ð2:33Þ
k¼1

When the summation in (2.33) is expanded, we obtain

y½n ¼    þ x½1d½n þ L þ x½0d½n þ x½1d½n  L þ   


n
Note that to find x L , we simply insert L  1 zeros between two samples of x½n,
that is, if

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

2.2.3 Frequency Domain Analysis of Upsampling

Let’s try to find the Fourier transform of


 n
x L n ¼ 0; L; 2L; . . .
y ½ n ¼ ð2:34Þ
0 otherwise:

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

in which changing the order of summation terms, we obtain

X
1 X
1
Yn ð w Þ ¼ x½kd½n  kLejwn ð2:37Þ
k¼1 n¼1

www.TechnicalBooksPDF.com
100 2 Multirate Signal Processing

which can be rearranged as

X
1 X
1
Yn ðwÞ ¼ x½k  d½n  kLejwn ð2:38Þ
n¼1
k¼1
|fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl}
ejwkL

yielding the expression

X
1
Yn ðwÞ ¼ x½k ejwkL : ð2:39Þ
k¼1

If (2.39) is compared to the Fourier transform of x½n

X
1
Xn ðwÞ ¼ x½nejwn ð2:40Þ
n¼1

it is seen that

Yn ðwÞ ¼ Xn ðLwÞ ð2:41Þ

Referring to (2.41), it is understood that the graph of Yn ðwÞ can be obtained by


dividing the frequency axis of Xn ðwÞ by L. As it is clear from (2.41) that the
spectrum of the upsampled signal gets compressed in frequency domain. In fact, if a
signal is expanded in time domain, it is compressed in frequency domain, similarly,
if a signal is compressed in time domain, its spectrum expands in frequency
domain.
Example 2.13 One period of the Fourier transform of x½n around origin
is given in
Fig. 2.52. Draw one period of the Fourier transform of y½n ¼ x Ln .
Solution 2.13 Dividing the frequency axis of Xn ðwÞ by L, we obtain the Fourier
transform of y½n which is depicted in Fig. 2.53.
Note: Don’t forget that the Fourier transforms Xn ðwÞ and Yn ðwÞ are periodic
functions with common period 2p. In fact, the Fourier transform of any digital
signal is a periodic function with period 2p regardless whether the digital signal is
periodic or not in time domain. If the digital signal is periodic in time domain then

Fig. 2.52 One period of the X n (w) w


Fourier transform of a digital
signal
1

w
wD wD

www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 101

Fig. 2.53 One period of the Yn (w)


Fourier transform of
w
upsampled signal for Example L L
2.12 1

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

Find the signals xd ½n and y½n in Fig. 2.57.

Fig. 2.54 One period of the X n ( w) w


Fourier transform of a digital
signal
1

w
2 2
3 3

Fig. 2.55 One period of the Yn (w)


Fourier transform of
upsampled signal for Example w
1 2 2
2.13

w
2 3 3 2

www.TechnicalBooksPDF.com
102 2 Multirate Signal Processing

Fig. 2.56 One period of the Yn (w)


Fourier transform of
upsampled signal for Example w
2.13 1

3 3

Fig. 2.57 Signal processing x[n] xd [n ] y[n ]


system for Example 2.14 xc (t ) C/D M L

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

The overall procedure is illustrated in Fig. 2.58.

x[n] [ 1 2 3 4 5 6 7 8 9 10] 2 xd [n] [ 1 3 5 7 9]


n 0 n 0

2 y[n] [ 1 0 3 0 5 0 7 0 9 0]
n 0

Fig. 2.58 Downsampling and upsampling

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

Fig. 2.59 Signal processing system

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

yr ðtÞ ¼ y½0hr ðtÞ þ y½1hr ðt  Ts Þ þ y½2hr ðt  2Ts Þ þ y½3hr ðt  3Ts Þ þ    ð2:43Þ

yielding
yr ðtÞ ¼ 1  hr ðtÞ þ 0  hr ðt  Ts Þ þ 3  hr ðt  2Ts Þ þ 0  hr ðt  3Ts Þ þ   
ð2:44Þ

Multiplication of some of the shifted filters by 0 results in information loss in the


reconstructed signal.
Question: So how can we increase the quality of the reconstructed signal?
Answer: If we can replace 0 values in the expanded signal y½n by their esti-
mated values, yr ðtÞ expression in (2.44) will not include 0 multiplication terms and
reconstructed signal becomes better. That is,
x [ n] = [ {
1 2 3 4 5 6 7 8 9 10 ]
n=0

y [n ] = [ {
1 0 3 0 5 0 7 0 9 0]
n=0

Replace 0's by the estimated values of the omitted samples


Omitted samples are 2, 4, 6, 8, 10

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

Estimated Values for


Omitted Samples

0 0 0 0
n
nk nk 1
nk L 1

Fig. 2.61 Linear estimation of the missing samples

www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 105

L , when (2.45) is expanded for i ¼ k : k þ L  1; we get the ampli-


Let D ¼ ab
tude vector

½b þ ðL  1ÞD b þ ðL  2ÞD    b þ 2D b þ D: ð2:46Þ

Example 2.16 Let x½n ¼ ½|{z}


1 2 5 7 9 10 10 find the signals xd ½n ¼
n n¼0
x½3n y½n ¼ xd 3 and using linear estimation method, estimate the missing samples
in y½n.
Solution 2.16 To calculate the downsampled signal, we divide the time axis of x½n
by 3 and keep only integer division results, and in a similar manner, to calculate the
upsampled signal, we multiply the time axis of the downsampled signal by 3, and
for the new time instants 0’s are assigned for amplitude values. The downsampled
and upsampled signals can be calculated as

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

For the first 2 missing samples

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

Fig. 2.62 Original signal, downsampled signal, upsampled signal

www.TechnicalBooksPDF.com
106 2 Multirate Signal Processing

and the missing samples are

½7 þ 2ð2Þ 7 þ 1ð2Þ ! ½3 4:

For the next 2 missing samples

7  10
D¼ ! D ¼ 1
3

and the missing samples are

½10 + 2ð1Þ 10 þ 1ð1Þ ! ½8 9:

The calculation of the missing samples is graphically illustrated in Fig. 2.63.


Hence with the estimated values, the upsampled signal becomes as

y½n ¼ ½|{z}
1 3 4 7 8 9 10: ð2:47Þ
n¼0

The original sequence before downsampling operation was

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.

Fig. 2.63 Calculation of the Estimated omitted samples


missing 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

2.2.5 Mathematical Analysis of Interpolation

We explained an estimation method for the calculation of missing samples in


expanded signal. However, we did not follow a mathematical analysis. How can we
find the missing samples in upsampled (expanded) signal using a mathematical
approach?
In time domain, it is difficult to find a mathematical approach for the estimation
of missing samples. Let’s approach to the problem in frequency domain. Let’s
consider the system involving downsampling and upsampling operations given in
Fig. 2.64 where we assume that L ¼ M.
Let’s assume that the Fourier transform of x½n is as in Fig. 2.65. We will inspect
the Fourier transforms of y½n and x½n in Fig. 2.64 and find a relation between them.
Considering Fig. 2.65 the Fourier transform of xd ½Mn can be drawn as in
Fig. 2.66.

x[n] xd [n] y[n]


xc (t ) C/D M L D/C yr (t )

Ts

Fig. 2.64 Signal processing system including upsampling and downsampling operations

X n (w)

0 w
2 2
M M

Fig. 2.65 Fourier transform of a digital signal

X nd (w)

1
M

w
2 0 2

Fig. 2.66 Fourier transform of xd ½Mn

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

Fig. 2.67 Fourier transform of the signal y½n in Fig. 2.64

1
M

w
2 2 0 2 2
L L L L

These regions are not available in X n (w)

Fig. 2.68 Comparison of Xn ðwÞ and Yn ðwÞ

www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 109

H i (w)

w
2 0 2
L L

Fig. 2.69 Lowpass digital filter

Yi ( w) H i ( w)Yn ( w)
L
1
M

w
2 2 0 2 2
L L L L

Fig. 2.70 The multiplication of Hi ðwÞYn ðwÞ

Yi (w)

w
2 0 2
L L

Fig. 2.71 The graph of Yi ðwÞ ¼ Hi ðwÞYn ðwÞ

where using the frontiers  pL ; pL, we get

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

Fig. 2.72 The graph of sin cðn=LÞ

which can be expressed in terms of sin cðÞ function as


 n
hi ½n ¼ sin c : ð2:51Þ
L

The graph of sin cðn=LÞ is depicted in Fig. 2.72.



As it is seen from Fig. 2.72 that hi ½n ¼ sin c Ln equals to 0 when n is a multiple

of L. The digital filter with impulse response hi ½n ¼ sin c Ln is called interpolating
filter which is used to reconstruct those digital samples omitted during downsam-
pling operation, i.e., used to reconstruct missing samples in the expanded, or
upsampled signal.
Exercise: The continuous time signal xc ðtÞ ¼ cosð2ptÞ is sampled with sampling
period Ts ¼ 1=8 s:
(a) For a mathematical sequence x½n from the samples taken from continuous time
signal in the interval 0–1 s.
(b) x½n is downsampled by M ¼ 2, and xd ½n is the downsampled signal, find xd ½n.
(c) The downsampled signal xd ½n is upsampled and let y½n be the upsampled
signal, find y½n.
(d) Calculate the missing samples in y½n using the ideal interpolation filter.

www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 111

2.2.6 Approximation of the Ideal Interpolation Filter

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

which can be expressed in more compact form as



hai ½n ¼  jLnj þ 1; if  L  n\L ð2:53Þ
0; otherwise:

hi [n]

hai [n ]

4L 3L 2L 2L 3L 4L n
L 0 L

Fig. 2.73 Approximation of the ideal interpolation filter

www.TechnicalBooksPDF.com
112 2 Multirate Signal Processing

x[n] xd [n] y[n] yi [n]


xc (t ) C/D hd [n] M L hi [n] D/C yr (t )

Decimator Downsampler Upsampler Interpolation


Ts Filter Compressor Expander Filter

Used to prevent the aliasing Used to reconstruct the


after downsampling operation samples omitted during
downsampling operation

Fig. 2.74 Signal processing system with interpolation filter

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

When (2.53) is replaced into

yi ½n ¼ hi ½n * y½n ð2:56Þ

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

When (2.58) is expanded, we get the explicit form of yi ½n as

yi ½n ¼    þ xd ½1hi ½n þ L þ xd ½0hi ½n þ xd ½1hi ½n  L þ    ð2:59Þ

Using the ideal interpolation filter, i.e., ideal reconstruction filter,


pn
sin L
hi ½ n  ¼ pn
L

in (2.58), we can write the reconstructed digital signal as


 
X
1 sin pðnkL
L
Þ

yi ½ n  ¼ xd ½k  pðnkLÞ
ð2:60Þ
k¼1 L

or in terms of sin cðÞ function, we can write (2.60) as

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.

Fig. 2.75 Signal processing x[n] xd [n] y[n] yi [n]


system for Example 2.16 M L hi [n]

www.TechnicalBooksPDF.com
114 2 Multirate Signal Processing

Fig. 2.76 Approximated hai [n]


interpolation filter |n|
hai [ n ] 1
3
1 3 n 3
2 2
3 3
1 1
3 3
n
3 2 1 0 1 2 3

Expanding (2.62), we get

yi ½n ¼ y½0hai ½n þ y½1hai ½n  1 þ y½2hai ½n  2 þ y½3hai ½n  3: ð2:64Þ

If y½n ¼ ½1 0 0 4 is considered, we see that the amplitude values at indices


n ¼ 1; and n ¼ 2, are missing. When n ¼ 1 is placed into (2.64), we get

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

and when n ¼ 2 is placed into (2.64), we obtain

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

Now let’s use the formula

X
1
yi ½ n ¼ xd ½k hi ½n  kL: ð2:69Þ
k¼1

When (2.69) is expanded, noting that xd ½n ¼ ½1 4 and L ¼ 3, we get

yi ½n ¼ xd ½0hai ½n þ xd ½1hai ½n  3: ð2:70Þ

When (2.70) is evaluated for n ¼ 1, we obtain

yi ½1 ¼ xd ½0 hai ½1 þ xd ½1 hai ½2


|ffl{zffl} |ffl{zffl} |ffl{zffl} |fflfflffl{zfflfflffl}
1 2=3 4 1=3

which yields

2 4
y i ½ 1 ¼ þ ! yi ½ 1 ¼ 2 ð2:71Þ
3 3

and when (2.69) is evaluated for n ¼ 2, we get

yi ½2 ¼ xd ½0 hai ½2 þ xd ½1 hai ½1 ð2:72Þ


|ffl{zffl} |ffl{zffl} |ffl{zffl} |fflfflffl{zfflfflffl}
1 1=3 4 2=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.

Fig. 2.77 Signal processing xa [n]


systems for Example 2.17 x[n] M H n (w) y[n]

xb [n]
x[n] H n (Mw) M y[n]

www.TechnicalBooksPDF.com
116 2 Multirate Signal Processing

Solution 2.18 For the first system we have

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

For the second system we have

Xbn ðwÞ ¼ Hn ðMwÞXn ðwÞ ð2:76Þ

and

X1  
1M w  k2p
Yn ðwÞ ¼ Xbn : ð2:77Þ
M k¼0 M

When (2.76) is inserted into (2.77), we obtain

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

Fig. 2.78 Signal processing xa [n]


system for exercise x[n] L H n (Lw) y[n]

xb [n]
x[n] H n (w) L y[n]

Fig. 2.79 Signal processing xd [n]


system for Example 2.18 x[n] L 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

then after downsampling by L ¼ 2, we get

xd ½n ¼ ½a b c d

and after expansion by L ¼ 2, we obtain

y½n ¼ ½|{z}
a 0 b 0 c 0 d
n¼0

Thus, we see that y½n ¼ x½n for every n values.


To write a mathematical expression between x½n and y½n, let’s express xd ½n in
terms of x½n as

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

and express y½n in terms of xd ½n as

X
1
y ½ n ¼ xd ½k d½n  kL: ð2:82Þ
k¼1

Inserting (2.81) into (2.82), we obtain

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

then write a mathematical expression between x½n and y½n.


Solution 2.21 Using (2.85), we can express y½n in terms of x½n as

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

Fig. 2.80 Signal processing x[n] xd [n]


system for Example 2.21 xc (t ) C/D 3 2 y[n]

Ts

Since cosðpnÞ ¼ ð1Þn , then (2.86) can also be written as

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

After downsampling operation, we have


 
3p
xd ½n ¼ x½3n ! xd ½n ¼ cos n ð2:88Þ
2

After upsampling operation, we have


 n
xd n is even
y½ n ¼ 2 ð2:89Þ
0 otherwise

which yields
 p
cos 4n n is even
y½n ¼ ð2:90Þ
0 otherwise

The mathematical expression in (2.90) can be written in a more compact manner


as

1 þ cosðpnÞ p 
y½n ¼ cos n : ð2:91Þ
2 4

Using the property

1
cosðaÞ cosðbÞ ¼ ðcosða þ bÞ þ cosða  bÞÞ ð2:92Þ
2

www.TechnicalBooksPDF.com
120 2 Multirate Signal Processing

Equation (2.91) can be written as


   
1 p  1 5p 1 3p
y½n ¼ cos n þ cos n þ cos n ð2:93Þ
2 4 4 4 4 4

where using cosðhÞ ¼ cosð2p  hÞ Eq. (2.93) can be written as


 
1 p  1 3p
y½n ¼ cos n þ cos n : ð2:94Þ
2 4 2 4
5p  5p
5p 3p
Note: cos 4 n ¼ cos 2pn  4 n ! cos 4 n ¼ cos 4 n

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Þ

which is depicted in Fig. 2.81.


If x½n ¼ xc ðtÞjt¼nTs , then one period of the Fourier transform of x½n is
 
1 w
Xn ðwÞ ¼ Xc ; jwj\p ð2:96Þ
Ts Ts

which is shown in Fig. 2.82.


Figure 2.82 can mathematically be expressed as Xn ðwÞ ¼ 2pdðw  wD Þ,
jwj\2p. Since Xn ðwÞ is the Fourier transform of a digital signal, it is a periodic
function and its period equals to 2p and it can be written as
X
1
Xn ðwÞ ¼ 2p dðw  wD  k2pÞ: ð2:97Þ
k¼1

Fig. 2.81 Fourier transform Xc (w)


of continuous time
exponential signal 2π

wN w
0

Fig. 2.82 One period of the X n (w) |w|


Fourier transform of digital
exponential signal 2

w
0 wD wN

www.TechnicalBooksPDF.com
2.2 Upsampling: Increasing the Sampling Rate by an Integer Factor 121

After sampling of the continuous time exponential signal, we obtain

j wN Ts n
|fflffl{zfflffl}
x½ n ¼ e wD
! x½n ¼ ejwD n :

Hence we can write the following transform pair in general

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

3 nÞ, find the Fourier


Example 2.25 x½n ¼ cosðw0 nÞ, y½n ¼ cosðp3 nÞ, w½n ¼ cosð2p
transforms of x½n; y½n; and w½n.
 
Solution 2.25 We know that cosðhÞ ¼ 12 ejh þ ejh and sinðhÞ ¼ 2j1 ejh  ejh ,
and using the Fourier transform of digital exponential function, we obtain the
results

Xn ðwÞ ¼ pðdðw  w0 Þ þ dðw þ w0 ÞÞ; jwj\p


  p  p
Yn ðwÞ ¼ p d w  þd wþ ; jwj\p
  3   3 
2p 2p
Wn ðwÞ ¼ p d w  þd wþ ; jwj\p:
3 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

The Fourier transform of the filter impulse is given as in Fig. 2.84.

Fig. 2.83 Lowpass filtering


of digital signals x[n] H n (w) x f [n]

www.TechnicalBooksPDF.com
122 2 Multirate Signal Processing

Fig. 2.84 Digital lowpass H n (w)


filter transfer function
1

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Þ

which is graphically illustrated in Fig. 2.85.


At the output of the block diagram, we have Xfn ðwÞ ¼ Hn ðwÞXn ðwÞ and this
multiplication is graphically illustrated in Fig. 2.86.
As it is obvious from Fig. 2.86, the signal Xfn ðwÞ ¼ Hn ðwÞXn ðwÞ equals to
  p  p
Xfn ðwÞ ¼ p d w  þd wþ : ð2:101Þ
3 3

Fig. 2.85 Fourier transform X n (w) | w |


of the input signal in Example
2.25

w
2 0 2
3 2 3 3 2 3

Fig. 2.86 Multiplication of X n (w) | w |


Xn ðwÞ and Hn ðwÞ H n (w)

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

Example 2.27 In the system of Fig. 2.87, xc ðtÞ ¼ cosð2000ptÞ þ cosð5000ptÞ, Ts ¼


3000 and transfer function of the digital filter is depicted in Fig. 2.88.
1

Find x½n; xf ½n; and xd ½n.


Solution 2.27 x½n ¼ xc ðtÞjt¼nTs leads to
   
2p 5p
x½n ¼ cos n þ cos n : ð2:103Þ
3 3
5p  5p
5p p
Since cos 3 n ¼ cos 2pn  3 n ! cos 3 n ¼ cos 3 n , then (2.103)
becomes as
  p 
2p
x½n ¼ cos n þ cos n : ð2:104Þ
3 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

Fig. 2.87 Signal processing x[n] x f [n]


system for Example 2.26 xc (t ) C/D H n (w) 2 xd [n]

Ts

Fig. 2.88 Digital lowpass H n (w)


filter transfer function
1

w
2 0 2
2 2

www.TechnicalBooksPDF.com
124 2 Multirate Signal Processing

n0
x[n] z x[n n0 ]

Fig. 2.89 Delay system

xa [n] xc [n] xe [n]


x[n] M M xr [n]
xg [n]
1
z z

xb [n] xd [n] x f [n]


M M

Fig. 2.90 Signal processing system for Example 2.27

After downsampling operation, we get


 
2p
xd ½n ¼ xf ½2n ! xd ½n ¼ cos n : ð2:106Þ
3

Example 2.28 The delay system is shown in Fig. 2.89.


In the system shown in Fig. 2.90, M ¼ 2 and x½n ¼ ½ 1 2 3 4 5 6 .
Find xa ½n; xb ½n; xc ½n; xd ½n; xe ½n; xf ½n and xr ½n.
Solution 2.28 If x½n ¼ ½ 1 2 3 4 5 6 , then xa ½n ¼ ½|{z}
1 2 3 4
n¼0
5 6 and since xb ½n ¼ x½n þ 1 moving n ¼ 0 pointer to the right by one unit, we
get
xb ½n ¼ ½1 2
|{z} 3 4 5 6
n¼0

After downsampling, we have


xc ½n ¼ ½|{z}
1 3 5 xd ½n ¼ ½|{z}
2 4 6:
n¼0 n¼0
After upsampling, we have

xe ½n ¼ ½|{z}
1 0 3 0 5 xf ½n ¼ ½|{z}
2 0 4 0 6:
n¼0 n¼0

After delay operator z1 , we have

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

And at the system output, we have

xr ½n ¼ xe ½n þ xg ½n

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:

Find the output of every block and finally find xr ½n.

[ 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

Fig. 2.91 Signal flow for the system in Fig. 2.90

xa [n] xd [n] xg [n]


x[n] M M xr [n]
x j [n]
z z 1

xb [n] xe [n] xh [n]


M M

z z 1

xc [n] x f [n] xi [n]


M M

Fig. 2.92 Signal processing system for exercise

www.TechnicalBooksPDF.com
126 2 Multirate Signal Processing

xa [n] xd [n] xg [n]


x[n] H 0 ( w) M M G0 ( w) xr [n]
x j [n]

H1 ( w) z 1

xb [n] xe [n] xh [n]


M M G1 ( w)

Fig. 2.93 Signal processing system for Example 2.28

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.

2.2.7 Anti-aliasing Filter

Consider the continuous to digital conversion system shown in Fig. 2.94.


We know that to obtain one period the Fourier transform of x½n, we multiply the
frequency axis of the Fourier transform of xc ðtÞ by Ts and multiply the amplitude

1
axis of the Fourier transform of xc ðtÞ by 1=Ts , i.e., we calculate Xc Tws . If the Ts
 
Fourier transform of xc ðtÞ has a bandwidth greater than p=Ts , then T1s Xc Tws extends
beyond (p; p) and aliasing observed in the Fourier transform of x½n. This situation
is described in Fig. 2.95.  
1 w
Since Xn ðwÞ is periodic with period 2p when Ts Xc Ts extends beyond (p; p),
overlapping will be observed in Xn ðwÞ as shown in Fig. 2.96.
The portion of Xn ðwÞ in Fig. 2.96 for jwj\p is shown in Fig. 2.96.
To decrease the effect of aliasing (overlapping) in the digital signal, we can filter
the spectral components for jwj [ p=Ts in Xc ðwÞ before sampling operation. In this
way, we can eliminate the overlapping shaded parts in Fig. 2.97. We name this
filter as anti-aliasing filter and it is mathematically defined as

Fig. 2.94 Continuous to


digital conversion x c (t ) C/D x [n]

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

Fig. 2.95 Aliasing case in the Fourier transform of x½n

X n (w)

1
Ts

w
2 TswN 0 Ts wN 2

Fig. 2.96 Aliasing in Xn ðwÞ

Fig. 2.97 Xn ðwÞ in Fig. 2.96 X n (w) | w|


for jwj\p
1
Ts

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

Fig. 2.98 Anti-aliasing filtering

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

Anti-aliasing filtering is shown in Fig. 2.98.


The digital signal obtained after sampling of the filtered analog signal shown in
Fig. 2.98 has the Fourier transform depicted in Fig. 2.99.

2.3 Practical Implementations of C/D and D/C Converters

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

Anti-Aliasing Analog to Digital Digital to Analog


Filter Conversion Conversion
Digital Digital ^
xa (t ) Code Digital Signal Code x o (t ) Reconstruction
xc (t ) Haa (w) A/D Processing D /A Filter
xr (t )

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

Fig. 2.100 Practical implementations of C/D and D/C converter systems

2.3.1 C/D Conversion

A practical C/D converter includes the units shown in Fig. 2.101.


Where antialiasing filter is used to decrease of amount of distortion in digital
signal in case of aliasing. Antialiasing filter is defined as

1 jwj\ Tps
Haa ¼ ð2:109Þ
0 otherwise

Inside A=D converter, we have Sample-and-Hold and Quantizer-Coder units


which are shown in Fig. 2.102.
For the coding of quantization levels, two’s complement, one’s complement or
unsigned binary representations can be used.
Once the analog signal is represented by bit sequences, i.e., codes, these bit
sequences are processed depending on the application. For instance, in digital
communication, these bit sequences are encoded by channel codes and obtained bit
sequences are converted to complex symbols, i.e., digitally modulated, and trans-
mitted. In data storage, these bit sequences are again coded using forward error
corrections codes, such as Reed Solomon codes as in compact disc storage, and
stored. Alternatively, these bit sequences can be passed through data compression
algorithms and then stored.

Fig. 2.101 Practical C/D Anti-Aliasing Analog to Digital


converter. Filter Conversion
Digital
xa (t ) Code
xc (t ) H aa (w) A/ D

www.TechnicalBooksPDF.com
130 2 Multirate Signal Processing

Fig. 2.102 Components of Digital


A/D converter xa (t ) Code
A/ D

Digital
Sample xo (t ) Quantization Code
xa (t ) and and
Hold Coding

Ts

2.3.2 Sample and Hold

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.

Fig. 2.103 A simple sample


and hold circuit xc (t ) xo (t )

Fig. 2.104 Mechanical f s Hz


switch is replaced by an
electronic switch
Ts

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 )

7Ts 8Ts 9Ts 10Ts t


Ts 2Ts 3Ts 4Ts 5Ts 6Ts 11Ts 12Ts 13Ts

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 )

7Ts 8Ts 9Ts 10Ts t


Ts 2Ts 3Ts 4Ts 5Ts 6Ts 11Ts 12Ts 13Ts

Fig. 2.107 Output of the sample and hold circuit for sine input signal

www.TechnicalBooksPDF.com
132 2 Multirate Signal Processing

Fig. 2.108 Rectangle pulse ho (t )


signal

t
0 Ts

Fig. 2.109 Continuous time xc (t )


signal for sample and hold
circuit 16

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.

Fig. 2.110 The continuous xc (t )


time signal in details 2t t 24
16
14
12
10 2t 10
8

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

Fig. 2.111 Amplitudes xc (t )


shown explicitly for the time
instants t ¼ nTs where Ts ¼ 2 16
14
12
10
8

0 8 10 12 14 16 18 20
t
2 4 6

Fig. 2.112 Horizontal lines xc (t )


are drawn for the first two
samples 16
14
12
10
8

0 8 10 12 14 16 18 20
t
2 4 6

Fig. 2.113 Horizontal lines xc (t )


are drawn for the first four
samples 16
14
12
10
8

0 8 10 12 14 16 18 20
t
2 4 6

Fig. 2.114 Horizontal lines xc (t )


are drawn for all the samples
16
14
12
10
8

0 8 10 12 14 16 18 20
t
2 4 6

www.TechnicalBooksPDF.com
134 2 Multirate Signal Processing

Fig. 2.115 Output of the xo (t )


sample and hold system
16
14
12
10
8

0 8 10 12 14 16 18 20
t
2 4 6

2.3.3 Quantization and Coding

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

Fig. 2.116 A typical mid-level quantizer

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

Fig. 2.117 Mid-level quantizer for Example 2.31

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

Fig. 2.118 An alternative mid-level quantizer for Example 2.31

Example 2.31 A 3-bit quantizer includes 23 ¼ 8 quantization intervals. A mid-level


type quantizer consisting of 8 levels can be shown as in Fig. 2.117.
Or alternatively as in Fig. 2.118.
We will use mid-level quantizers as in Fig. 2.117.
As it is clear from the Example 2.30, for an N-bit mid-level quantizer, the
minimum number that can be quantized is ð2N þ 1Þ=2 and the maximum number
that can be quantized is ð2N  1Þ=2.
The quantization levels are represented by binary sequences, such as two’s
complement, one’s complements, unsigned representation, or private bit sequences
can be assigned for quantization levels.
Example 2.32 Design a 3-bit quantizer for the real numbers in the range
½14    14.
Solution 2.32 For a 3-bit quantizer Xm1 ¼ 9D=2 and Xm2 ¼ 7D=2. Equating Xm2
to 14, we obtain
7D
¼ 14 ! D ¼ 4:
2
So our quantizer can quantize the real numbers in the range
 
9D 7D
  ¼ ½18    14:
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 )

000 001 010 011 100 101 110 111


Q 4 Q3 Q2 Q1 Q0 Q1 Q2 Q3
x
18 14 10 6 2 0 2 6 10 14

Fig. 2.119 Bit sequences assigned to the quantization intervals

Q (x )

000 001 010 011 100 101 110 111


16 12 8 4 0 4 6 8
x
18 14 10 6 2 0 2 6 10 14

Fig. 2.120 Mid-level quantizer

Q (x )
Q4 Q 3 Q 2 Q1 Q1 Q2 Q3 Q4
x
4 3 2 0 2 3 4

Fig. 2.121 Mid-rise quantizer

Assume that we want to quantize a sequence of digital samples represented by


x½n. Let ^x½n be the sequence obtained after quantization. Since quantization distorts
the original signal, the quantized samples mathematically can be written as

^x½n ¼ Qðx½nÞ ! ^x½n ¼ x½n þ e½n ð2:111Þ

where e½n is called quantization noise.

2.3.4 D/C Converter

The practical implementation of D/C converter is shown in Fig. 2.122.


The content of the D/A converter is detailed in Fig. 2.123.
The digital codes are converted to real numbers according to the used coding
scheme. At the output of the code-to-digital converter, we have digital samples
which can be written as

Fig. 2.122 D/C conversion Digital to Analog


Conversion
Digital
Code xo (t ) Reconstruction
D/ A Filter
xr (t )

www.TechnicalBooksPDF.com
2.3 Practical Implementations of C/D and D/C … 137

Fig. 2.123 D/A conversion Digital


Code D/ A xo (t )

Digital
Convert Digital x[n] x o (t) Zero
Code
Codes to Real Order xo (t )
Numbers Hold

(t nTs ) Ts
n

Fig. 2.124 Impulse response ho (t )


of zero order hold

t
0 Ts

^x½n ¼ x½n þ e½n ð2:112Þ

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

Substituting ^x½n ¼ x½n þ e½n in (2.114), we get

X
1 X
1
xo ð t Þ ¼ x½nho ðt  nTs Þ þ e½nho ðt  nTs Þ: ð2:115Þ
n¼1 n¼1

Fig. 2.125 Reconstruction


Reconstruction
filter block diagram x o (t ) xr ( t )
Filter

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Þ

which can be written as

Xo ðwÞ ¼ ðXn ðTs wÞ þ En ðTs wÞÞHo ðwÞ: ð2:118Þ

From Fig. 2.125, we can write

Xr ðwÞ ¼ Hr ðwÞXo ðwÞ ð2:119Þ

where Hr ðwÞ is the frequency response of the reconstruction filter. If we choose


Hr ðwÞ as
 Ts
jwj\ Tps
Hr ðwÞ ¼ H o ð wÞ ð2:120Þ
0 otherwise

and substituting it into (2.119) and using (2.118) in (2.119), we obtain


p
Xr ðwÞ ¼ Ts Xn ðTs wÞ þ Ts En ðTs wÞ jwj\ ð2:121Þ
Ts

which is the Fourier transform of

xr ðtÞ ¼ xa ðtÞ þ eðtÞ: ð2:122Þ

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

Then xr ðtÞ in (2.122) using (2.123) and (2.124) can be written as

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.

Fig. 2.126 One period of


X n (w) w
Xn ðwÞ around origin

3 3 w
4 4

Fig. 2.127 Delay system


x[n] z n0
x[n n0 ]

www.TechnicalBooksPDF.com
140 2 Multirate Signal Processing

Fig. 2.128 Signal processing


system x[n] 2 y1[n]

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

find the output of each unit in Fig. 2.128.


(4) Calculate the inverse Fourier transform of the digital filter


1 if wj\ Mp
Hdn ðwÞ ¼ ð2:125Þ
M \jwj\p:
p
0 if

(5) Draw the graph of


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

Fig. 2.129 The graph of XðtÞ X (t )

t
2 2

www.TechnicalBooksPDF.com
2.4 Problems 141

Fig. 2.130 Downsampler fs


fs 1000 Hz 4 f ds f ds 250 Hz
4

Fig. 2.131 System for y[n] x[ Mn]


Question 9 x[n]
xc (t ) C/D M D/C yr (t )

Ts Ts

(7) Repeat Question-6 for T ¼ 1, T ¼ 4 and T ¼ 5.


(8) Comment on the system shown in Fig. 2.130.
(9) For the system of Fig. 2.131, xc ðtÞ is a lowpass signal with bandwidth
1
3000 Hz, Ts ¼ 8000 s and M ¼ 2. Is system output yr ðtÞ equal to system input
xc ðtÞ? If they are equal to each other, justify the reasoning behind it. If they are
not equal to each other, again explain the reasoning behind it.
(10) If x½n ¼ ½1 2 3 4 5 6 7 and L ¼ 4, draw the graph of

X
1
y ½ n ¼ x½k d½n  kL:
k¼1

(11) For the system of Fig. 2.132, M ¼ L ¼ 2 and

x½n ¼ ½a b c d e f g h l
|{z} j k l m n o p r s:
n¼0

Find xd ½n and y½n.

(12) Draw the graph of hai ½n ¼  jLnj þ 1, L  n  L for L ¼ 3 and L ¼ 8.


(13) xd ½k ¼ ½1 4 7 10 13, hai ½n ¼  jLnj þ 1, L  n  L, L ¼ 3, calculate
and draw

Fig. 2.132 Signal processing x[n] xd [n] y[n]


system xc (t ) C/D M L

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.

xd [n] y[n] yi [n]


x[n] M L hai [n ]

Downsampler Upsampler Interpolating


Compressor Expander Filter

Fig. 2.133 Signal processing system for Question 14

xc (t ) H aa (w) C/D x[n]

Ts

Fig. 2.134 Signal processing system for Question 15

X n (w)

x[n] M xd [n]

w Downsampling
2
3 3

Fig. 2.135 Downsampling of digital signal


2.4 Problems 143

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

Fig. 2.136 Signal processing system for Question 17

x[n] xc [n] xd [n]


hd [n] M

Decimator Downsampling
Filtre

Fig. 2.137 Decimation system

(a) Draw the Fourier transforms of xc ½n; xd ½n, and y½n.


(b) Draw the triangle approximation model of the interpolation filter for L ¼ 2.
(c) Draw the Fourier transform of yi ½n for sin cðÞ interpolation filter.
(d) If xc ½n ¼ ½1:0 1:7 2:4 3:2 4, calculate xd ½n; y½n, using triangle
approximated interpolation filter.
(18) For the system of Fig. 2.137, M ¼ 2, and Hd ðwÞ is defined as

 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 ]

Fig. 2.138 Delay system


144 2 Multirate Signal Processing

xa [n] xc [n] xe [n]


x[n] M M xr [n]
xg [n]
1
z z

xb [n] xd [n] x f [n]


M M
x j [n]
1
z z

xg [n] xh [n] xi [n]


M M

Fig. 2.139 Signal processing system for Question 19

(19) The delay system is shown in Fig. 2.138.


For the system of Fig. 2.139, M ¼ 3, x½n ¼ ½a b c d e f g
h i j k l m n o p r s t u v w x y: Find the signal at the
output of each unit, and find the system output.
Chapter 3
Discrete Fourier Transform

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.

© Springer Nature Singapore Pte Ltd. 2018 145


O. Gazi, Understanding Digital Signal Processing, Springer Topics
in Signal Processing 13, DOI 10.1007/978-981-10-4962-0_3
146 3 Discrete Fourier Transform

3.1 Manipulation of Digital Signals

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

Following a similar approach for x½n  3; we obtain

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

Fig. 3.1 A digital signal and its representation by a number vector


3.1 Manipulation of Digital Signals 147

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

Following similar steps, we obtain

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Þ

Next, we divide the indices as in

½|{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Þ

where keeping only integer division results, we obtain

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

which can be written in its simple form as

x½2n ¼ ½a c |{z}
e g i k:
0

Following a similar approach for x½3n, we obtain

x½3n ¼ ½b e
|{z} h k:
n¼0

Combined Shifting and Scaling


To obtain x½Mn  n0 , we follow a two-step procedure as listed below.
(1) First, the shifted signal, x½n  n0  is obtained, and this signal is denoted by
x1 ½n; i.e., x1 ½n ¼ x½n  n0 
(2) Then using x1 ½n, we obtain the scaled signal x1 ½Mn which is nothing but
x½Mn  n0 
That is, we first obtain the shifted signal x1 ½n ¼ x½n  n0 , and then using x1 ½n
we get the scaled signal x1 ½Mn ¼ x½Mn  n0 :
Example 3.3 If x½n ¼ ½a b c d e
|{z} f g h i j k, find x½3n þ 3.
n¼0

Solution 3.3 First, we obtain the shifted signal x½n þ 3 as

x½n þ 3 ¼ ½a b c d e f g h
|{z} i j k:
n¼0

Let x1 ½n ¼ x½n þ 3; i.e., x1 ½n ¼ ½a b c d e f g h


|{z} i j k;
n¼0
then the scaled signal x1 ½3n can be calculated as

x1 ½3n ¼ ½b e h
|{z} k
n¼0

which is nothing but x½3n þ 3; that is

x½3n þ 3 ¼ ½b e h
|{z} k:
n¼0

Note: If n ¼ 0 index is not indicated in the digital signal vector representation,


then the first element index is accepted as n ¼ 0:
3.1 Manipulation of Digital Signals 149

3.1.1 Manipulation of Periodic Digital Signals

Manipulation of periodic digital signals includes shifting, scaling and combined


shifting, scaling operations. There is no difference in manipulating non-periodic and
periodic digital signals. The same set of operations are applied for the manipulation
of periodic signals as in the manipulation of non-periodic signals.
However, since periodic signals are of infinite lengths, for easy of manipulation,
it is logical to consider just one period of the periodic signal and perform manip-
ulations on it.
Let ~x½n be a periodic signal with fundamental period N; i.e., ~x½n ¼ ~x½n þ lN
l; N 2 Z.
Let’s define one period of ~x½n as

~x½n 0nN  1
x ½ n ¼ ð3:3Þ
0 otherwise:

Using (3.3), we can write ~x½n in terms of x½n as

X
1
~x½n ¼ x½n  kN: ð3:4Þ
k¼1

3.1.2 Shifting of Periodic Digital Signals

First let’s make definitions as follows:


Rotate Right
When the signal x½n ¼ ½ 1 2 3 4    N  is rotated right, we get

RRðx½nÞ ¼ ½ N 1 2 3 4    N  1 : ð3:5Þ

RRðx½n; mÞ is the m unit rotated (right) signal.


Rotate Left
When the signal x½n ¼ ½ 1 2 3 4    N  is rotated left, we get

RLðx½nÞ ¼ ½ 2 3 4  N  1 N 1 : ð3:6Þ

RLðx½n; mÞ is the m unit rotated (left) signal.


Rotate Inside
When the signal x½n ¼ ½ 1 2 3 4    N  is rotated inside, we get
150 3 Discrete Fourier Transform

RI ðx½nÞ ¼ ½ 1 N N 1 N2    2 : ð3:7Þ

Shifting of Periodic Digital Signals


If x½n is the one period of the periodic signal, ~x½n such that 0  n  N  1; one
period of the shifted signal ~x½n  n0 , n0 [ 0 is obtained by rotating amplitudes of
x½n to the right (left if n0 \0) by n0 units.
Example 3.4 The signal given in Fig. 3.2 is a periodic signal, i.e., ~x½n ¼ ~x½n þ N.
Find the period of this signal, and determine its one period for 0  n  N  1.
Solution 3.4 To find the period of the signal, we need to find the repeating pattern
in the signal graph. If the signal shown in Fig. 3.2 is carefully inspected the
repeating pattern can be easily determined. The repeating pattern of Fig. 3.2 is
shown in Fig. 3.3 in bold. The number of samples in the repeating pattern is
nothing but the period of the signal. Hence, for this example, N the period of the
signal is 5, i.e., ~x½n ¼ ~x½n þ 5:
One period of the signal in Fig. 3.3 for 0  n  4 is shown in Fig. 3.4.
Using one period of the signal starting at origin, we can write the periodic signal
as

~x½n ¼ ½   3
|{z} 1:5 1:7 1:5 3   :
n¼0

Fig. 3.2 A periodic digital x[n]


signal
3 3
1.7 1.7
1.5 1.5

n
3 2 1 0 1 2 3 4 5 6

1.5 1.5
3.5 3.5

Fig. 3.3 The repeating x[n]


pattern of Fig. 3.2 is shown in
bold 3 3
1 .7 1 .7
1 .5 1 .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

Fig. 3.4 One period of the x[n]


signal in Fig. 3.3 for
3 3
0n4
1 .7 1 .7
1 .5 1.5

n
3 2 1 0 1 2 3 4 5 6

1 .5 1 .5
3. 5 3.5

Fig. 3.5 The periodic signal x[n]


~x½n for Example 3.5
3 3
1.7 1.7
1 .5 1 .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

And using (3.9), we can write the shifted periodic signal as

~x½n  3 ¼ ½   1:7 1:5 3:5 3 1:5 1:7


|{z} 1:5 3:5 3 1:5   :
n¼0
ð3:10Þ

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

Hence, shifted periodic signal ~x½n þ 2 becomes as

~x½n þ 2 ¼ ½   1:5 3:5 3 1:5 1:7


|{z} 1:5 3:5 3 1:5 1:7   :
n¼0
ð3:12Þ

Time Scaling of Periodic Signals


To perform time scaling on periodic signals, we consider one period of the signal
and perform time scaling on it.
The resulting signal is nothing but the one period of the scaled signal. If the
period of the digital signal ~x½n is N, then the period of the scaled signal ~x½Mn is
N=M.
Example 3.6 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 ð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½2n ¼ ½   1:7 3:5 4 |{z}


3 1:7 3:5 4 3 1:7 3:5 4   
n¼0

~x½3n ¼ ½   3 1:5 4 3
|{z} 1:5 4 3 1:5 4   :
n¼0

Combined Shifting and Scaling


The periodic digital signal ~x½n can be shifted and scaled in time domain yielding
the periodic signal ~x½Mn  n0 . The shifted and scaled signal ~x½Mn  n0  can be
obtained from ~x½n via a two-step procedure as explained below.
(1) To get ~x½Mn  n0 ; first the shifted signal ~x½n  n0  is obtained. Let’s call this
signal ~x1 ½n, i.e., ~x1 ½n ¼ ~x½n  n0 .
(2) In the next step, ~x1 ½n is scaled in time domain and ~y½n ¼ ~x1 ½Mn is obtained,
and ~y½n is nothing but ~x½Mn  n0 , i.e., ~y½n ¼ ~x½Mn  n0 .
3.1 Manipulation of Digital Signals 153

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

Hence, our periodic signal ~x½2n  3 becomes as

~x½2n  3 ¼ ½    1:5 3:5


1:5 |ffl{zffl} 4 1:5 1:5 3:5 4 1:5   :
n¼0

Example 3.8 Periodic signal ~x½n is shown in Fig. 3.6.


Find ~x½n.
Solution 3.8 To find ~x½n, we divide the time axis of ~x½n by 1. This operation is
illustrated in Fig. 3.7.
The division operations in Fig. 3.7 yields the signal in Fig. 3.8.
When amplitudes and time indices are re-ordered together, we obtain the graph
in Fig. 3.9.
Practical way to find ~x½n signal

Fig. 3.6 Periodic signal ~x½n x[n]


for Example 3.8 a b c d a b c d a
n
4 3 2 1 0 1 2 3 4
154 3 Discrete Fourier Transform

Fig. 3.7 Calculation of ~x½n x[-n]


a b c d a b c d a
n
4 3 2 1 0 1 2 3 4
1 1 1 1 1 1 1 1 1

Fig. 3.8 After division of the x[-n]


time axis in Fig. 3.7 a b c d a b c d a
n
4 3 2 1 0 1 2 3 4

Fig. 3.9 Time axis x[-n]


re-ordered
a d c b a d c b a
n
4 3 2 1 0 1 2 3 4

Fig. 3.10 Periodic signal ~x½n x[n]


a b c d a b c d a
n
4 3 2 1 0 1 2 3 4

If one period of ~x½n is denoted by x½n ¼ ½ 1 2 3 4    N ; then one


period of ~x½n can be obtained rotating x½n inside by 1 unit. That is, one period of
~x½n is

RI ðx½nÞ ¼ ½ 1 N N1 N2  2 ð3:17Þ

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Þ

When (3.18) is rotated inside, we obtain

RRðx½nÞ ¼ ½ a b c d ð3:19Þ

which is nothing but one period of ~x½n. Hence ~x½n equals to

~x½n ¼ ½   d c b a
|{z} d c b a d c b   :
n¼0

Calculation of the periodic signal ~x½n0  n


3.1 Manipulation of Digital Signals 155

Fig. 3.11 The periodic signal x[n]


~x½n for Example 3.9 a b c a b c a
d d
n
4 3 2 1 0 1 2 3 4

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Þ

When (3.20) is rotated inside, we obtain

RRðx½nÞ ¼ ½ a d c b ð3:21Þ

which is nothing but one period of ~x½n, i.e., ~x½nop ¼ ½ a d c b , ‘op’


means one period. To find one period of ~x½2  n one period of ~x½n is rotated to
the right by 2 units yielding
 
RR ~x½nop ; 2 ¼ ½ a b c d : ð3:22Þ

Using (3.22) the periodic signal ~x½2  n can be written as

~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Þ

Fig. 3.12 The periodic signal x[n]


~x½n for Example 3.10 a b c d a b c d a
n
4 3 2 1 0 1 2 3 4
156 3 Discrete Fourier Transform

When (3.23) is rotated inside, we obtain

RRðx½nÞ ¼ ½ a d c b

which is nothing but one period of ~x½n, i.e., ~x½nop ¼ ½ a d c b : To find


one period of ~x½2  n, one period of ~x  n is rotated to the left by 2 units
yielding
 
RR ~x½nop ; 2 ¼ ½ c b a d : ð3:24Þ

Using (3.24) the periodic signal ~x½2  n can be written as

~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.

3.1.3 Some Well Known Digital Signals

In this subsection, we will review some well-known digital signals.


Unit Step:
The unit step signal is defined as

1 if n  0
u½ n ¼ ð3:25Þ
0 otherwise

whose graph is shown in Fig. 3.13.


Unit Impulse:
The unit impulse signal is defined as

1 if n ¼ 0
d½ n ¼ ð3:26Þ
0 otherwise

whose graph is shown in Fig. 3.14.

Fig. 3.13 Unit step function, u[n]


i.e., signal
1 1 1 1

n
3 2 1 0 1 2 3
3.1 Manipulation of Digital Signals 157

Fig. 3.14 Unit impulse [n] 1


function, i.e., signal

n
3 2 1 0 1 2 3

The relation between u½n and d½n can be written as

d½n ¼ u½n  u½n  1 ð3:27Þ

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

Exponential Digital Signal


The exponential digital signal is defined as

x½n ¼ ejw0 n ð3:30Þ

which can also be written in the form

x½n ¼ cosðw0 nÞ þ j sinðw0 nÞ: ð3:31Þ

Example 3.11 Simplify ejk2p .


Solution 3.11 Using (3.31), we have

ejk2p ¼ cosðk2pÞ þ j sinðk2pÞ ¼ cosðk2pÞ þ j sinðk2pÞ


|fflfflfflfflffl{zfflfflfflfflffl} |fflfflfflfflfflffl{zfflfflfflfflfflffl}
¼1 ¼0
j2p
As a special case for k ¼ 1, we have e ¼ 1:
Example 3.12 Verify the following equality

X
N 1 
N if m ¼ 0
ej N km ¼
2p
ð3:32Þ
k¼0
0 otherwise:
158 3 Discrete Fourier Transform

Solution 3.12 Let’s open the summation expression in (3.32) as follows


X
N 1  
j2pðN1Þm
j2p j2p j2p
e N km
¼ 1þe N m
þe N 2m
þ  þe N
: ð3:33Þ
k¼0
The right hand side of (3.33) can be simplified using the property

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

And for m 6¼ 0 using the result in, (3.35), we obtain

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

And for m ¼ 0 using the result in (3.35), we obtain

X
N 1 X
N 1
ej N km ¼
2p
1 ! N: ð3:38Þ
k¼0 k¼0

Combining (3.37) and (3.38), we obtain

X
N 1 
j2p N if m ¼ 0
e N km ¼ ð3:39Þ
k¼0
0 otherwise:

3.2 Review of Signal Types

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

Continuous Time Digital Signals


Signals

Periodic Continuous Periodic Digital


Aperiodic Continuous Aperiodic Digital
Time Signals Signals
Time Signals Signals

Fourier Series Fourier Transform Discrete Time Fourier Discrete Time Fourier
Representation
Series Representation Transform

Fourier Transform
Discrete Time Fourier Discrete Fourier
Transform Trasform

Fig. 3.15 Signals types, their transformations and representations

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

and its inverse Fourier transform is given as

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

~xc ðtÞ ¼ ~xc ðt þ mT Þ: ð3:45Þ

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

where the Fourier series coefficients ~x½k  are computed by using


Z
~xc ½k ¼ ~xc ðtÞejk T t dt:
2p
ð3:47Þ
T

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

And the Fourier transform of xc ðtÞ is

Z1
X c ðw Þ ¼ xc ðtÞejwt dt ð3:55Þ
1

When (3.54) and (3.55) are compared to each other as in

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

~xc ½k ¼ Xc ðwÞjw¼kw0 ð3:57Þ

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

The Fourier transform of the periodic continuous time signal is defined as

2p X1
~xc ðwÞ ¼ ~xc ½kdðw  kw0 Þ; w0 ¼ 2p=T: ð3:60Þ
T k¼1

Aperiodic Digital Signals


The discrete time Fourier transform for the aperiodic digital signal x½n is defined
as

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

The Fourier transform function of x½n, i.e., Xn ðwÞ is a continuous function of w


and it is also a periodic function with period 2p, i.e.,

Xn ðwÞ ¼ Xn ðw þ k2pÞ: ð3:63Þ

Periodic Digital Signals


If the digital signal ~x½n is a periodic signal, then ~x½n ¼ ~x½n þ lN  l; N 2 Z and N
is called fundamental period of ~x½n:
For the digital periodic signal ~x½n, the Fourier series representation is defined as
3.2 Review of Signal Types 163

1X 2p
~x½n ¼ ~xn ½kejk N n ð3:64Þ
N k;N

where the Fourier series coefficients are computed using


X
~x½nejk N n :
2p
~xn ½k ¼ ð3:65Þ
n;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

The Fourier transform of the periodic digital signal ~x½n is

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

then verify that the Fourier series coefficients as obtained using


X
~x½nejk N n :
2p
~xn ½k ¼ ð3:71Þ
n;N
164 3 Discrete Fourier Transform

Solution 3.13 If the Fourier series coefficients are obtained using


X
~x½nejk N n
2p
~xn ½k ¼ ð3:72Þ
n;N

then when (3.72) is substituted into

1X 2p
~x½n ¼ ~xn ½kejk N n ð3:73Þ
N k;N

we should get ~x½n on the right hand side of (3.73). That is

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

Convolution of Aperiodic Digital Signals


For aperiodic digital signals x½n; y½n, the convolution operation is defined as

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

3.3 Convolution of Periodic Digital Signals

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

When the summation in (3.79) is expanded for N ¼ 4; we get

~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 :

Substituting (3.81) into (3.80), one period of ~x3 ½n is calculated as

~x3op ½n ¼ ~x1 ½0~x2op ½n þ ~x1 ½1~x2op ½n  1 þ ~x1 ½2~x2op ½n  2


þ ~x1 ½3~x2op ½n  3

yielding

~x3op ½n ¼ 1  ½ 1 1 1 1  þ 1  ½ 1 1 1 1  1  ½1 1 1 1
þ2  ½1 1 1 1 

which can be simplified as

~x3op ½n ¼ ½ 1 3 1 3 : ð3:82Þ

Using (3.82), the periodic convolution result can be written as

~x3 ½n ¼ ½    1 3 13 1


|{z} 3 13 1 3 1 3   :
n¼0

3.3.1 Alternative Method to Compute the Periodic


Convolution

The periodic convolution expression

X
N 1
~x3 ½n ¼ ~x1 ½m~x2 ½n  m ð3:83Þ
m¼0
3.3 Convolution of Periodic Digital Signals 167

can be computed for n ¼ 0; 1; . . .; N  1 as

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

Now let’s consider

X
N 1
~x3 ½0 ¼ ~x1 ½m~x2 ½m ð3:84Þ
m¼0

when expanded for N ¼ 3; we get

~x3 ½0 ¼ ~x1 ½0~x2 ½0 þ ~x1 ½1~x2 ½1 þ ~x1 ½2~x2 ½2 þ ~x1 ½3~x2 ½3 ð3:85Þ

Since ~x3 ½n ¼ ~x3 ½n þ 4, we have

~x2 ½1 ¼ ~x2 ½3; ~x2 ½2 ¼ ~x2 ½2; ~x2 ½3 ¼ ~x2 ½1: ð3:86Þ

Using (3.86) in (3.85), we obtain

~x3 ½0 ¼ ~x1 ½0~x2 ½0 þ ~x1 ½1~x2 ½3 þ ~x1 ½2~x2 ½2 þ ~x1 ½3~x2 ½1 ð3:87Þ

which can be written as the dot product of the vectors

½ ~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

Equation (3.89) can be written as

X
N 1

~x3 ½1 ¼ ~x1 ½m~x2 ½1  m ! ~x3 ½1 ¼ ~x1op ½m RR ~x2op ½m ð3:90Þ
m¼0

and in a similar manner

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

~x3 ½N  1 ¼ ~x1op ½m RR ~x2op ½N  2  m ð3:93Þ

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

Solution 3.15 When the periodic convolution expression

X
N 1
~x3 ½n ¼ ~x1 ½m~x2 ½n  m
m¼0

is calculated for n ¼ 0; 1; . . .; N  1, we get

~x3 ½0 ¼ ~x1op ½m ~x2op ½m


~x3 ½1 ¼ ~x1op ½m ~x2op ½1  m

ð3:94Þ
~x3 ½2 ¼ ~x1op ½m RR ~x2op ½1  m

~x3 ½3 ¼ ~x1op ½m RR ~x2op ½2  m :

One period of ~x2 ½n for 0  n  3 is

~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

~x1op ½m ¼ ½ 1 1 1 2 : ð3:96Þ

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

~x3 ½1 ¼ ½ 1 1 1 2  ½ 1 1  ! ~x3 ½1 ¼ 3


1 1
~x3 ½2 ¼ ½ 1 1 1 2  ½ 1 1 1 1  ! ~x3 ½2 ¼ 1
~x3 ½3 ¼ ½ 1 1 1 2  ½ 1 1 1 1  ! ~x3 ½3 ¼ 3
170 3 Discrete Fourier Transform

Hence,

~x3op ½n ¼ ½ 1 3 1 3 :

Then the periodic convolution result becomes as

~x3 ½n ¼ ½   1 3 1 3 1
|{z} 3 1 3 1 3 1 3   :
n¼0

3.4 Sampling of Fourier Transform

The Fourier transform Xn ðwÞ of a non-periodic digital signal x½n is a continuous


function of w and it is periodic with period 2p, i.e., Xn ðwÞ ¼ Xn ðw þ 2pÞ .
Example 3.16 The Fourier transform of the signal x½n ¼ 12 d½n þ 1 þ 12 d½n  1 is
calculated as

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

can be obtained from its one period via

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, of ~x½n can be obtained via sampling


The Fourier series coefficients, i.e., X
operation in frequency using

~ ½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

The graphical illustration of the sampling operation in frequency domain is


explained in Fig. 3.19.
172 3 Discrete Fourier Transform

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

~ Sample the signal in frequency domain at every multiple of ws


x[n] x[n 4l ] ws
l 2
~
x[n] ~
X n (w)
X [k ]
1 1
2

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

3.5 Discrete Fourier Transform

~ ½k, is a periodic function which can have


The Fourier series coefficients, i.e., X
complex or real values. The Fourier series coefficients X ~ ½k satisfy X
~ ½k  ¼ X
~ ½k þ N 
where N is the period of the digital signal ~x½n.
The periodic signal ~x½n with period N has the Fourier series coefficients

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

Similarly, N  point inverse Fourier transform is defined as

1XN1
2p
x ½ n ¼ X ½kej N kn ; 0  n\N:
N k¼0

A more general definition for N-point DFT is


X
x½nej N kn ;
2p
X ½k  ¼ k; N: ð3:107Þ
n;N

and for the N-point inverse DFT, a more general definition is

1X 2p
x½n ¼ X ½k ej N kn ; n; N: ð3:108Þ
N k;N

In addition, Fourier series coefficients of a periodic signal can be obtained from


the Fourier transform of its one period using

~ ½k ¼ Xn ðwÞj 2p
X w¼kws ws ¼ : ð3:109Þ
N

And using the definition



~ ½k  if 0  k\N
X
X ½k  ¼ ð3:110Þ
0 otherwise

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

Example 3.18 Find the discrete Fourier transform of

x½n ¼ ½ 1 1 1 2 :

Solution 3.18 For the given signal if the DFT formula

X
41
x½nej 4 kn ;
2p
X ½k  ¼ 0  k\4 ð3:112Þ
n¼0

is expanded, the coefficients are found as

X ½k  ¼ x½0 e0 þ x½1 ej 4 k þ x½2 ej 4 k2 þ x½3 ej 4 k3 :


2p 2p 2p
ð3:113Þ
|{z} |{z} |{z} |{z}
1 1 1 2

When (3.113) is simplified, we obtain

X ½k ¼ 1 þ ej2k  1ejpk þ 2ej 2 k


p 3p
ð3:114Þ

Evaluating (3.114), i.e., X ½k, for k ¼ 0; 1; 2; 3, we get

X ½ 0 ¼ 3 X ½1 ¼ 2 þ j X ½2 ¼ 3 X ½3 ¼ 2  j

which can be written in short as

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 :

Solution 3.19 Using X ½k  in inverse DFT formula

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

When (3.115) is simplified, we get

1 p 3p

x ½ n ¼ 3 þ ð2 þ jÞej2n  3ejpn þ ð2  jÞej 2 n ð3:116Þ
4

Evaluating (3.116), i.e., x½n, for n ¼ 0; 1; 2; 3, we obtain,

x ½ 0 ¼ 1 x ½ 1 ¼ 1 x½2 ¼ 1 x ½ 3 ¼ 2

which can be written in short as

x½n ¼ ½ 1 1 1 2 :

Note: Remember that ejh ¼ cosðhÞ þ j sinðhÞ.


Example 3.20 Find the discrete Fourier transform of the signal shown in Fig. 3.20.
Solution 3.20 Using the DFT formula
X
x½nej N kn
2p
X ½k  ¼ k; N
n;N

for N ¼ 3, we obtain

X
1
x½nej N kn
2p
X ½k  ¼  1  k  1: ð3:117Þ
n¼1

When (3.117) is expanded, we get

X ½k ¼ x½1 ej 3 kð1Þ þ x½1 ej 3 k1 ;


2p 2p
1  k  1 ð3:118Þ
|fflffl{zfflffl} |{z}
1=2 1=2

which is simplified as

2p
X ½k ¼ cos k ; 1  k  1: ð3:119Þ
3

Fig. 3.20 Aperiodic signal x[n ]


for Example 3.20
1
2

n
1 1
176 3 Discrete Fourier Transform

From (3.115) DFT coefficients can be calculated as

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

Find x½n whose DFT coefficients are X½k.


Solution 3.21 If we use inverse DFT formula

1X 2p
x½n ¼ X ½k ej N kn ; n; N
N k;N

for the given signal, we get

1X 1
2p
x½n ¼ X ½kej 3 kn ; 1  n  1: ð3:121Þ
3 k¼1

When the summation term in (3.121) is expanded, we obtain


0 1
1B 2p C
x½n ¼ @X ½1 ej 3 n þ X ½0 e0 þ X ½1 ej 3 n A
2p

3 |fflffl{zfflffl} |{z} |{z}


1=2 1 1=2
3.5 Discrete Fourier Transform 177

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

and for n ¼ 0, we have


 
1 1 0 1 0
x ½ n ¼  e þ 1  e ! x ½ n ¼ 0
3 2 2

and finally for n ¼ 1, we get


 
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

Thus the signal x½n has the values

x½1 ¼ 12 x½0 ¼ 0 x½1 ¼ 12

which is written in more compact form as


1 1
0
|{z}
x½n ¼ ½ 2 2 : ð3:123Þ
n¼0

Question: For the previous example if we evaluate


 
1 1 j2pn 1 j2pn
x ½ n ¼  e 3 þ1  e 3
3 2 2
178 3 Discrete Fourier Transform

Fig. 3.21 Aperiodic signal x[n ]


for Example 3.22
1
2

n
1 1

for n ¼ 0; 1; and 2, we obtain


1 1
0
x½n ¼ ½ |{z} 2 2 : ð3:124Þ
n¼0

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

And the 8-point DFT is computed using

X
6
x½nej 8 kn ;
2p
X ½k  ¼ 1  k  6: ð3:125Þ
n¼1

When the summation in (3.125) is expanded, we get


   
1 1
 ej 8 kð1Þ þ 0  ej 8 k0 þ  ej 8 k1 þ 0  ej 8 k2
2p 2p 2p 2p
X ½k  ¼
2 2
þ 0  ej 8 k3 þ 0  ej 8 k4 þ 0  ej 8 k5 þ 0  ej 8 k6
2p 2p 2p 2p

which is simplified as

1  j2pk 
e 8 þ ej 8 kn :
2p
X ½k  ¼ ð3:126Þ
2
3.5 Discrete Fourier Transform 179

Equation (3.126) can be written in terms of cosðÞ function as


 
2p
X ½k ¼ cos k ; 1  k  6: ð3:127Þ
8

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

Magnitude and phase values are plotted in Fig. 3.22.


Example 3.24 One period of the discrete time Fourier transform of the non-periodic
signal x½n is given in Fig. 3.23. Using the given Fourier transform graph:
(a) Find the 4-point DFT of x½n. (b) Find the 8-point DFT of x½n. (c) Find the
16-point DFT of x½n.
180 3 Discrete Fourier Transform

| 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

The sampling operation is illustrated in Fig. 3.24.


3.5 Discrete Fourier Transform 181

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

Fig. 3.24 Sampling of the Fourier transform for N ¼ 4

Considering Fig. 3.24, the DFT coefficients can be written as

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

The sampling operation for N ¼ 8 is illustrated in Fig. 3.25.


Thus the DFT coefficients obtained in Fig. 3.25 can be written as a mathematical
sequence as

X ½k  ¼ ½ 0 2 3 3 1:25 0:75 0:75 0:32 :

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

Fig. 3.25 Sampling of the Fourier transform for N ¼ 8


182 3 Discrete Fourier Transform

Exercise: The aperiodic signal is given as x½n ¼ d½n þ d½n  1.


(a) Find the Fourier transform of x½n, i.e., Xn ðwÞ ¼ ?
(b) Find jXn ðwÞj
P and \Xn ðwÞ.
(c) If ~x½n ¼ 1l¼1 x½n  4l, draw ~ x½n and using Xn ðwÞ, find the Fourier series
~ ½k  ¼ ?
coefficients of ~x½n, i.e., X
(d) Find 4-point DFT of x½n

3.5.1 Aliasing in Time Domain

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

Find one period of ~x½n and compare it to x½n.


3.5 Discrete Fourier Transform 183

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

Fig. 3.26 Shifted signals

~
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

Fig. 3.27 Sum of the shifted signals in Fig. 3.26

Solution 3.25 The shifted signals are shown in Fig. 3.26.


The sum of the shifted signals in Fig. 3.26 yields the signal in Fig. 3.27.
As it is seen from Fig. 3.27, one period of ~x½n is [0 1] which is totally different
than x½n ¼ ½ 1 1 1 .
Example 3.26 x½n ¼ ½ 1 1 1 , calculate 2-point DFT of x½n and using 2-point
DFT coefficients, calculate x½n using the inverse DFT formula and comment on the
results.
Solution 3.26 2-point DFT coefficients of x½n ¼ ½ 1 1 1  can be calculated
using

X
1
x½nej 2 kn ;
2p
X ½k  ¼ 0k1
n¼0

yielding

X2 ½k ¼ ½ 0 2 :

and proceeding in a similar manner 3-point DFT coefficients can be found as

X3 ½k ¼ ½ 1 2 2 :

If we use the 2-point inverse DFT formula for X2 ½k 

1X 1
2p
x ½ n ¼ X2 ½k ej 2 kn ; 0n1
2 k¼0
184 3 Discrete Fourier Transform

the aperiodic signal is found as

x½n ¼ ½ 1 1

which is truncated version of

x½n ¼ ½ 1 1 1 :

3.5.2 Matrix Representation of DFT and Inverse DFT

Before generalizing the concept, let’s consider 3-point DFT of an aperiodic


sequence

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

X ½0 ¼ x½0e0 þ x½1e0 þ x½2e0


X ½1 ¼ x½0e0 þ x½1ej 3 þ x½2ej 3
2p 4p
ð3:133Þ
j4p j8p
X ½2 ¼ x½0e þ x½1e
0 3 þ x½2e 3 :

The equation set in (3.133) can be written as


2 3 2 3
X½0 e0 e0 e0
4 X½1 5 ¼ ½ x½0 x½1 4
x½2   e0 e j2p
3 e j4p
3 5
j4p j8p
X½2 e0 e 3 e 3

which can be expressed in short as

 ½k ¼ x½n  EN ;
X N ¼ 3: ð3:134Þ

From (3.134) x½n can be written as

 ½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

x½0 ¼ X ½0e0 þ X ½1e0 þ X ½2e0


3
1 
ð3:137Þ
2p 4p
x½1 ¼ X ½0e0 þ X ½1ej 3 þ X ½2ej 3
3
1 4p 8p

x½2 ¼ X ½0e0 þ X ½1ej 3 þ X ½2ej 3 :
3

The equation set in (3.137) can be written in matrix form as


2 3 2 3
x½0 e0 e0 e0
4 x½1 5 ¼ 1  ½ X ½0 4
X ½ 1 X ½ 2   e 0
2p
ej 3 ej 3 5 :
4p
ð3:138Þ
3 4p 8p
x½2 e0 ej 3 ej 3

When (3.138) is compared to (3.139)

 ½k  E1
x½n ¼ X ð3:139Þ
N

we obtain

1
E1
N ¼ E : ð3:140Þ
N N

Note: E N is the conjugate of EN . If e ¼ a þ jb then conjugate of e is e ¼ a  jb


and if e ¼ ejh then e ¼ ejh .

3.5.3 Properties of the Discrete Fourier Transform

Since there is a close relationship between discrete Fourier series coefficients of a


periodic signal and the discrete Fourier transform of its one period, it is logical to
review the properties of the discrete Fourier series coefficients of a periodic signal.
For the three periodic signals

~x½n ! Periodic with period N


~x1 ½n ! Periodic with period N
~x2 ½n ! Periodic with period N
186 3 Discrete Fourier Transform

let’s denote the Fourier series coefficients by

~ ½k ! Periodic with period N


X
~1 ½k ! Periodic with period N
X
~2 ½k  ! Periodic with period N:
X

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

Convolution in time domain:

X
N 1
DFS
~x1 ½m~x2 ½n  m $ X ~ 1 ½k X
~2 ½k 
m¼0

Convolution in frequency domain:

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

Real part DFS:

DFS 1

Ref~x½ng $ ~ ½k  þ X
X ~ ½k 
2

Imaginary part DFS:

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

For real ~x½n, we have the following properties


Conjugate:

~ ½k  ¼ X
X ~ ½k

Real DFT coefficients:



Re X~ ½k  ¼ RefX
~ ½kg

Imaginary DFT coefficients:



Im X~ ½k  ¼ ImfX
~ ½kg

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

Note: If x½n ¼ a½n þ jb½n, then x ½n ¼ a½n  jb½n

3.5.4 Circular Convolution

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

x1 ½n ! Aperiodic signal with length N1


x2 ½n ! Aperiodic signal with length N2

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

Symmetry property leads to the following properties

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

And the expression

X
N 1
x1 ½mx2 ½ðn  mÞN 
m¼0

is called the circular convolution of x1 ½n and x2 ½n and denoted by


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

One period of ~x½n in the interval 0  n  4 is found by employing rotate inside


operation on one period of ~x½n, i.e., on x½n. That is

x ðnÞ5 ¼ RI ðx½nÞ

which can be calculated as



x ðnÞ5 ¼ ½ 1 1 0:5 1 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 :

Using the result of the previous example, i.e.,



x ðnÞ5 ¼ ½ 1 1 0:5 1 1

we can calculate x ð1  nÞ5 via

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

Fig. 3.28 Shifted replicas of x½n and calculation of ~x½n

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

x ðnÞ3 ¼ RI ~xop ½n

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Þ

which can be calculated in two steps as follows

~xop ½n  1 ¼ RRðx½n; 1Þ
¼ ½ 1 0:5 0:5 0:5 1

~xop ½n  2 ¼ RR ~xop ½n  1; 1


¼ ½1 1 0:5 0:5 0:5 :

As a result x½ðn  2Þ5  is found as



x ð n  2Þ 5 ¼ ½ 1 1 0:5 0:5 0:5 :

Example 3.32 If x1 ½n ¼ ½ 1 1 1 0:5  and x2 ½n ¼ ½ 1 1 1 1 ,


find 4-point circular convolution of x1 ½n and x2 ½n. That is,

Solution 3.32 Method 1: N-point circular convolution of x1 ½n and x2 ½n can be
calculated using

ð3:141Þ

Let expanding the right hand side of (3.141) for


N ¼ 4 we get


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 :

Substituting the calculated values in (3.143) into (3.142), we get

y½n ¼ ð1Þ  ½ 1 1 1 1  þ ð1Þ  ½ 1 1 1 1 


þ ð1Þ  ½ 1 1 1 1  þ ð0:5Þ  ½ 1 1 1 1 

which is simplified as

y½n ¼ ½ 3:5 0:5 3:5 0:5 :

Method 2: N-point circular convolution of x1 ½n and x2 ½n can be calculated 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

For N ¼ 4 equation set (3.145) becomes as


3.5 Discrete Fourier Transform 195

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 :

Now consider the summation term

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

y½0 ¼ x1 ½0w½0 þ x1 ½1w½1 þ x1 ½2w½2 þ x1 ½3w½3

which is nothing but dot product of two vectors x1 ½n and w½n, that is

y½0 ¼ ½ x1 ½0 x1 ½1 x1 ½2 x1 ½3   ½ w½0 w½1 w½2 w½3 

which can also be written as

y½0 ¼ x1 ½m  w½m

or

y½0 ¼ x1 ½m  x2 ðmÞ4 :

Then
196 3 Discrete Fourier Transform

y½0 ¼ ð1Þ  ð1Þ þ ð1Þ  ð1Þ þ ð1Þ  ð1Þ þ ð0:5Þ  ð1Þ


y½0 ¼ 3:5:

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;

y½n ¼ ½ 3:5 0:5 3:5 0:5 :

Note: If and the length of x1 ½n or x2 ½n is shorter


than N then the shorter sequence is padded by zeros so that its length equals to N. If
both sequences are shorter than N samples then both sequences are padded by zeros
so that their lengths equal to N.
Example 3.33 If x1 ½n ¼ ½ 1 1 1 0:5  and x2 ½n ¼ ½ 1 1 2 , find
6-point circular convolution of x1 ½n and x2 ½n. That is,

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 :

Then circular convolution operations can be performed as in Example 3.32.


Matrix Representation of Circular Convolution
Example 3.34 If x1 ½n ¼ ½ x1 ½0 x1 ½1 x1 ½2  x2 ½n ¼ ½ x2 ½0 x2 ½1 x2 ½2 
Express 3-point circular convolution of x1 ½n and x2 ½n as matrix multiplication.
3.5 Discrete Fourier Transform 197

Solution 3.34 Expanding the expression

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

y½n ¼ x1 ½0 x2 ½0 x2 ½1 x2 ½2 þ x1 ½1½ x2 ½2 x2 ½0 x2 ½1 


þ x1 ½2½ x2 ½1 x2 ½2 x2 ½0 :

The expression in (3.48) can be written using matrix multiplication as


0 1 0 1
y½0 x 2 ½ 0 x 2 ½ 2 x 2 ½ 1
@ y½1 A ¼ ð x1 ½0 x1 ½1 x1 ½2 Þ  @ x2 ½1 x2 ½0 x 2 ½ 2 A :
y½2 x 2 ½ 2 x 2 ½ 1 x 2 ½ 0

Example 3.35 If x½n ¼ ½1 0 |{z}


1 1 2 1, find
n¼0

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

for m values, we obtain



y½n ¼ x1 ½2x1 ðn þ 2Þ6 þ x1 ½1x1 ðn þ 1Þ6 þ x1 ½0x1 ðnÞ6

þ x1 ½1x1 ðn  1Þ6 þ x1 ½2x1 ðn  2Þ6 þ x1 ½3x1 ðn  3Þ6

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

Exercise: Prove the following property


DFT 2p
x ðn  mÞN $ ej N km X ½k :

The Relationship between Circular and Linear Convolution:

x1 ½n ! Aperiodic signal with length L


x2 ½n ! Aperiodic signal with length P

Linear convolution of x1 ½n and x2 ½n is calculated using

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

The relationship between ylc ½n and ycc ½n is given as


8
< P 1
y ½n  rN  0  n  N  1
ycc ½n ¼ r¼1 lc
:
0 otherwise:

If N  L þ P  1 then the circular convolution and linear convolution results are


the same, i.e., ylc ½n ¼ ycc ½n.

3.6 Practical Calculation of the Linear Convolution

Overlap Add and Overlap Save Methods


For practical communication systems, the input signal may not be of finite duration.
It may be of infinite duration or may be a very long sequence, such as TV signal,
video or speech signal.
The input signal x½n is usually passed through a filter with an impulse response
h½n. Filtering operation is nothing but the convolution of the input signal with the
impulse response of the filter, the filter output is

y½n ¼ x½n h½n:

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.

3.6.1 Evaluation of Convolution Using 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

consists of the following steps:


(1) Divide the input sequence to frames such that each frame has length L.
Let’s denote the frames by x0 ½n; x1 ½n; x2 ½n    0nL  1
(2) Evaluate the convolution of each frame with h½n, i.e., evaluate

yk ½n ¼ xk ½n h½n k ¼ 0; 1; 2; . . .

(3) Calculate the convolution result as

X
1
y ½ n ¼ yk ½n  Lk:
k¼0

Let’s explain overlap-add method with an example.


Example 3.36 If x½n ¼ ½ 1 1 0 1 1 0 1 1 1 1 0 1  and
h½n ¼ ½ 1 1 , find x½n h½n using overlap-add method.
Solution 3.36
(1) In step 1, we divide the input sequence into frames of length L. The length of
the impulse response h½n is P ¼ 2. The length of the frames depends on our
choice. Let’s choose the length of the frames as L ¼ 3 and divide the sequence
x½n into frames as shown in (3.148)

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

When (3.150) is expanded for n ¼ 0; 1; 2; 3; we obtain

y0 ½n ¼ x0 ½n h½n ! y0 ½n ¼ ½ 1 1 0 ½1 1  ! y0 ½n ¼ ½ 1 2 1 0 

y1 ½n ¼ x1 ½n h½n ! y0 ½n ¼ ½ 1 1 0  ½ 1 1  ! y1 ½n ¼ ½ 1 2 1 0 


y2 ½n ¼ x2 ½n h½n ! y0 ½n ¼ ½ 1 1 1  ½ 1 1  ! y2 ½n ¼ ½ 1 2 1 0 

y3 ½n ¼ x3 ½n h½n ! y0 ½n ¼ ½ 1 0 1  ½ 1 1  ! y3 ½n ¼ ½ 1 1 1 1 :


ð3:151Þ

(3) In this step, using the results of (3.151) in

X
1
y ½ n ¼ yk ½n  Lk
k¼0

Fig. 3.29 Shifting of y1 ½n y1[n]


1 2 1 0
n
0 1 2 3
y1[n 3]

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

y½n ¼ y0 ½n þ y1 ½n  3 þ y2 ½n  6 þ y3 ½n  9: ð3:152Þ

The signal y1 ½n  3 in (3.152) is obtained by shifting the amplitudes of y1 ½n to


the right by 3 units. When amplitudes are shifted to the right, zero amplitude values
are inserted into the old positions.
This means that y1 ½n  3 can be obtained by padding 3 zeros to the beginning of
y1 ½n. This operation is illustrated in Fig. 3.29.
Thus, the shifted signals together with y0 ½n can be written as

x[n]

n
0 L 1 L 2L

Fig. 3.30 Dividing x½n into frames

w0 [ n]

n
0 L 1
w1[ n]

n
0 L 2L 1
w2 [n]

n
0 2L

Fig. 3.31 Divided frames of x½n are shown separately


202 3 Discrete Fourier Transform

x0 [n]

n
0 L 1
x1[n]

n
0 L 1

x2 [ n ]

n
0
L 1

Fig. 3.32 Divided frames of x½n start at n ¼ 0

x0 [n]

n
0 L 1
x1[n L]

n
0 L 2L 1
x2 [ n 2 L]

n
0 2L

Fig. 3.33 Frames starting at n ¼ 0 are shifted by multiples of L

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 :

Now let’s see the mathematical derivation of the overlap-add method.


Assume that the digital sequence x½n is divided into frames as shown in
Fig. 3.30.
And the frames are separately shown in Fig. 3.31.
Let’s make the starting index of every frame be equal to n ¼ 0. This is shown in
Fig. 3.32.
We can obtain the digital signal x½n by shifting and summing the frames that
starts at n ¼ 0 as shown in Fig. 3.33.
This operation is mathematically written as

X
1
x ½ n ¼ xk ½n  Lk:
k¼0

Then the convolution of x½n and h½n can be written as

y ½ n ¼ h½ n x ½ n
X1
ð3:154Þ
¼ h½ n xk ½n  Lk:
k¼0

When the summation term in (3.154) is expanded, we get

y½n ¼ h½n ðx0 ½n þ x1 ½n  L þ x2 ½n  2L þ   Þ: ð3:155Þ

And for linear time invariant systems if

y1 ½n ¼ h½n x1 ½n

then

y1 ½n  L ¼ h½n x1 ½n  L:

Using a similar approach for the other convolutional expressions appearing in


(3.155), we get

y½n ¼ y0 ½n þ y1 ½n  L þ y2 ½n  2L þ   

where

y0 ½n ¼ h½n x0 ½n; y1 ½n ¼ h½n x1 ½n; y2 ½n ¼ h½n x2 ½n:


204 3 Discrete Fourier Transform

As a result;

X
1
y ½ n ¼ yk ½n  Lk:
k¼0

3.6.2 Overlap-Save Method

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:

(4) Discard the first P  1 points of yk ½n.


(5) Concatenate yk ½n and obtain y½n, i.e., y½n ¼ ½y0 ½ny1 ½n   :
Let’s explain overlap-save method with an example.
Example 3.37 Using h½n and x½n given below, find the convolution of h½n and
x½n using overlap-save method.

h½n ¼ ½ 1 1 1

x ½ n ¼ ½ 1 0 1 1 1 1 1 0 0 1 1 1 

Take frame length as L ¼ 4.


Solution 3.37 The length of the impulse response h½n is 3, i.e., P ¼ 3. And frame
length is L ¼ 4 which is given the question, otherwise we can choose it according
to our will.
Let’s follow the steps of the overlap-save method for the calculation of con-
volution of h½n and x½n.
(1) Add P  1 ¼ 3  1 ! 2 zeros to the beginning of x½n. This is shown in
3.6 Practical Calculation of the Linear Convolution 205

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

y0 ½n ¼ h½nð4Þx0 ½n y1 ½n ¼ h½nð4Þx1 ½n y2 ½n ¼ h½nð4Þx2 ½n


y3 ½n ¼ h½nð4Þx3 ½n y4 ½n ¼ h½nð4Þx4 ½n y5 ½n ¼ h½nð4Þx5 ½n :

As a reminder we below provide the 4-points circular convolution of x0 ½n and


h½n. N-point circular convolution of x½n and h½n is given as

X
N 1
y0 ½ n ¼ x½kh½ðn  kÞN : ð3:156Þ
k¼0

For N ¼ 4 when (3.156) is expanded, we obtain



y0 ½n ¼ x½0h ðnÞ4 þ x½1h ðn  1Þ4 þ x½2h ðn  2Þ4 þ x½3h ðn  3Þ4 :

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 :

4-point circular convolution of each frame with h½n is given in (3.157).

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

y½n ¼ ½y0 ½ny1 ½ny2 ½ny3 ½ny4 ½ny5 ½n

which leads to

y½n ¼ ½ 1 1 2 2 1 3 1 0 1 1 0 3 0 1 :

Exercise: If x½n ¼ ½ 1 1 1 1 1 1 1 111111111 and

h½n ¼ ½ 1 1 1 , calculate x½n h½n


(a) Using overlap-add method.
(b) Using overlap-save method.

3.7 Computation of the Discrete Fourier Transform

3.7.1 Fast Fourier Transform (FFT) Algorithms

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.

3.7.2 Decimation in Time 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

where k takes values in the range 0; 1; . . .; N  1, i.e., if N ¼ 4, then the range of k


is 0; 1; 2; 3.
208 3 Discrete Fourier Transform

Example 3.38 If ekN is defined as ekN ¼ ejk N k 2 Z, write ek4 for k ¼ 0; 1; 2; 3 as a


2p

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

Exercise: Write ek8 for k ¼ 0; 1; . . .; 7 as a vector.


Example 3.39 Given x½n ¼ ½ a b  find 2-point DFT of x½n.
Solution 3.39 Using the formula

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

When (3.158) is expanded for k ¼ 0 and k ¼ 1, we get

X ½0 ¼ x½0 þ x½1 X ½1 ¼ x½0 þ x½1ejp ! X ½1 ¼ x½0  x½1:

Then 2-point DFT of x½n ¼ ½ a b  is

X ½k ¼ ½ a þ b a  b :

Example 3.40 If x½n ¼ ½ 3 2 , find 2-point DFT of x½n.


Solution 3.40 Using X ½k  ¼ ½ a þ b a  b , we find the 2-point DFT of x½n ¼
½ 3 2  as

X ½k  ¼ ½ 1 5 :

Example 3.41 If x½n ¼ ½ a b , find X½k for k ¼ 0; 1; 2; 3:


Solution 3.41 Expanding the formula
3.7 Computation of the Discrete Fourier Transform 209

X
N1
x½nejk N n
2p
X ½k  ¼
n¼0

for N ¼ 2 and k ¼ 0; 1; 2; 3; we obtain

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

this means that


X ½2 ¼ X½0

In a similar manner; we find that

X ½3 ¼ X½1

Then X½k for k ¼ 0; 1; 2; 3; happens to be


" #
X ½0 X ½1 X ½ 2 X ½3
X ½k  ¼ |{z} |{z}
¼X½0 ¼X½1

That is

X ½k ¼ ½ X ½0 X ½ 1 X ½ 0 X ½ 1 

And using our previous example results, we can write X½k as

X ½k  ¼ ½ a þ b a  b aþb a  b

Example 3.42 Calculate X½k for

x½n ¼ ½ 1 3 2 1 

using the DFT formula but take k range as 0; 1; . . .; 7 instead of 0; 1; . . .; 3.


210 3 Discrete Fourier Transform

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:

In a similar manner; we have

X ½5 ¼ X ½1 X ½6 ¼ X ½2 X ½7 ¼ X ½3:

If we calculate X½k for k ¼ 0; 1; . . .; 3; we get

X ½k  ¼ ½ X ½0 X ½1 X ½2 X ½3 :

And on the other hand if we calculate X½k for k ¼ 0; 1; . . .; 7; we get


" #
X ½0 X ½ 1 X ½ 2 X ½ 3 X ½ 4 X ½5 X ½ 6 X ½7
X ½k  ¼ |{z} |{z} |{z} |{z} :
¼X½0 ¼X½1 ¼X½2 ¼X½3

That is
3.7 Computation of the Discrete Fourier Transform 211

X ½ k  ¼ ½ X ½ 0 X ½ 1 X ½2 X ½ 3 X ½ 0 X ½ 1 X ½2 X ½3 :

Using (3.159), X½k for k ¼ 0; 1; 2; 3 can be calculated as

X ½k  ¼ ½ 5 1  j4 1 1 þ j4 

and for k ¼ 0; 1; . . .; 7; it equals to

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

the function eN has the following properties.


(1) e2N ¼ eN=2
This property comes from the definition directly, i.e.,

e2N=2 ¼ ej2 N
2p

which can be written as

e2N=2 ¼ ejN=2 ¼ eN=2 ! e2N ¼ eN=2 :


2p

(2) eNN ¼ 1 or more in general emN


N ¼ 1; m 2 Z

Again starting by the definition, we have

eN ¼ ej N ! emN jm N jm2p


2p 2pN
N ¼e ! emN
N ¼ e ! emN
N ¼ 1:

ð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

which can be partitioned for even and odd n values as

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

Then G½k and H½k values for k ¼ 0; 1; . . .; N  1 are obtained using



G ½k  ¼ g0 g1  gN=21 g0 g1    gN=21

H ½k  ¼ h0 h1  hN=21 h0 h1    hN=21

and they are combined in X½k via

X ½k ¼ G½k þ wkN H ½k k ¼ 0; 1; . . .; N  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

G½k ¼ G1 ½k þ wkN G2 ½k  k ¼ 0; 1; . . .; N=2  1

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

H ½k ¼ H1 ½k þ wkN H2 ½k k ¼ 0; 1; . . .; N=2  1

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

When (3.166) is expanded for k ¼ 0 and k ¼ 1, we obtain

X ½0 ¼ x½0 þ x½1 X ½1 ¼ x½0 þ x½1ejp ! X ½1 ¼ x½0  x½1

which can be expressed in a more compact way as

X ½k ¼ ½ a þ b a  b : ð3:167Þ

Example 3.44 If x½n ¼ ½ 1 4 , find 2-point DFT of x½n.


Solution 3.44 X ½0 ¼ 1 þ 4 ! X ½0 ¼ 3 X ½1 ¼ 1  4 ! X ½1 ¼ 5:
Example 3.45 If x½n ¼ ½ 1 1 1 2 , find 4-point DFT of x½n using deci-
mation in time FFT algorithm.
Solution-3.45: First we determine the even and odd numbered elements of x½n as
in
2 " "
3
z}|{ z}|{
x½n ¼ 4 |{z}
1 1 1
|{z} 2 5
# #

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 ½0 ¼ 1  1 ! Xe ½0 ¼ 0 Xe ½1 ¼ 1  ð1Þ ! Xe ½1 ¼ 2


Xo ½0 ¼ 1 þ 2 ! Xe ½0 ¼ 3 Xo ½1 ¼ 1  2 ! Xe ½1 ¼ 1:

Hence, for Xe ½k and Xo ½k k ¼ 0; 1; we have

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

X ½k  ¼ Xe ½k  þ wkN Xo ½k k ¼ 0; 1; . . .; N  1: ð3:169Þ

For N ¼ 4 Eq. (3.169) is written as

X ½k ¼ Xe ½k  þ wk4 Xo ½k k ¼ 0; 1; . . .; 4  1 ð3:170Þ

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

And simplifying wk4 , we get

wk4 ¼ ½ 1 j 1 j :

Finally the vector X½k is obtained using (3.170) as in

X ½k  ¼ ½ 0 2 0 2  þ ½  j 1 j ½3 1 3 1 

where the vector product term

½ 1 j 1 j  ½ 3 1 3 1 

is calculated as

½1  3 ðjÞ  ð1Þ ð1Þ  3 j  ð1Þ :

Then X ½k becomes as


216 3 Discrete Fourier Transform

X ½k  ¼ ½ 0 þ 1  3 2 þ ðjÞ  ð1Þ 0 þ ð1Þ  3 2 þ j  ð1Þ 

which has the final form

X ½k  ¼ ½ 3 2 þ j 3 2  j :

Example 3.46 If x½n ¼ ½ 1 1 1 2 1 3 1 2 , find 8-point DFT of x½n


using decimation in time FFT algorithm.
Solution 3.46 First, we divide the sequence x½n to its even and odd numbered
elements as in
2 " " " "
3
z}|{ z}|{ z}|{ z}|{
x½n ¼ 4 |{z}
1 1 1
|{z} 2 1
|{z} 3 1
|{z} 2 5
# # # #

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Þ

Then 8-point DFT of x½n is calculated through

X ½k ¼ Xe ½k þ wk8 Xo ½k k ¼ 0; 1; . . .; 7

where wk8 ¼ ejk 8 . And the vectors Xe ½k, Xo ½k , wk8 for k ¼ 0; 1; . . .; 7 with the help
2p

of (3.172) can be written as

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

And combining the vectors in (3.173) using

X ½k ¼ Xe ½k þ wk8 Xo ½k k ¼ 0; 1; . . .; 7


3.7 Computation of the Discrete Fourier Transform 217

we obtain the 8-point DFT of x½n as

X ½k ¼ ½ 8 1:4 þ j1:4 4 1:4 þ j1:4 8 1:4  j1:4 4 1:4  j1:4 ;


k ¼ 0; 1; . . .; 7:

Example 3.47 For the digital signal

x ½ n ¼ ½ 1 1 1 2 1 3 1 2 1 1 2 1 3 0 1 2

find 16-point DFT using decimation in time FFT algorithm.


Solution 3.47 First, we divide the signal to its even and odd indexed sequences as
in

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

where the exponential vector wk16 , k ¼ 0; 1; . . .; 15 is calculated as



ek16 ¼ ej016 ej116 ej216 ej316 ej416 ej516 ej616 ej716 ej816 ej916
2p 2p 2p 2p 2p 2p 2p 2p 2p 2p


ej1016 ej1116 ej1216 ej1316 ej1416 ej1516 :
2p 2p 2p 2p 2p 2p

3.7.3 Decimation in Frequency FFT Algorithm

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:

Example 3.49 If x½n ¼ ½ 1 2 3 6 4 2 n ¼ 0; 1; . . .; 5:


(a) Find x½n þ N=2 for n ¼ 0; 1; 2 and N ¼ 6.

Solution 3.49 x½n þ N=2 ¼ ½ 6 4 2  n ¼ 0; 1; 2 and N ¼ 6


Note: x½nn ¼ 0; 1; . . .; N=2  1 is the first half of the signal x½n and
x½n þ N=2 n ¼ 0; 1; . . .; N=2  1 is the second half of the signal x½n.
Example 3.50 If x½n ¼ ½ 1 2 3 6 4 2 ; n ¼ 0; 1; . . .; 5:
(a) Find x½n þ x½n þ N=2 for n ¼ 0; 1; 2 and N ¼ 6.
(b) Find x½n  x½n þ N=2 for n ¼ 0; 1; 2 and N ¼ 6.

Solution 3.50 Using the results in previous example, we obtain


 
N
x½n þ x½n þ N=2 ¼ ½ 5 2 5 x½n  x n þ ¼ ½7 6 1 :
2

Example 3.51 For x½n ¼ ½ 2 1 3 5 ; N ¼ 4, find x½nenN .

Solution 3.51 Let’s determine first enN for n ¼ 0; 1; 2; 3. Using enN ¼ ejn N the
2p

vector form of enN for n ¼ 0; 1; 2; 3 can be written as



enN ¼ ej0 4 ej1 4 ej2 4 ej3 4
2p 2p 2p 2p

which can be simplified as

enN ¼ ½ 1 j 1 j :

Then the product signal x½nenN for n ¼ 0; 1; 2; 3 can be written as

x½nenN ¼ ½ ð2Þ  1 1  ðjÞ 3  ð1Þ 5  j 

which yields

x½nenN ¼ ½ 2 j 3 j5 :

Example 3.52 X ½k  ¼ ½ 0 1 2 3 4 5 6 7  are the DFT coefficients of a


digital signal x½n. Write even and odd indexed samples of X ½k as sequences.
Solution 3.52 Even indexed samples are
3.7 Computation of the Discrete Fourier Transform 219

X ½2k ¼ ½ 0 2 4 6  k ¼ 0; 1; 2; 3

and odd indexed samples are

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 ½2k þ 1 ¼ ½ 2 1þj 2j 0 3  k ¼ 0; 1; 2; 3; 4

Find the DFT coefficient vector X ½k; k ¼ 0; 1; . . .; 9:


Solution 3.53 Taking samples one by one from X ½2k and X½2k þ 1 in a sequential
manner, we get the DFT coefficient vector

X ½k ¼ ½ 1 2 j 1þj 2 2j 3 0 1 3 :

Let’s now derive the decimation in frequency FFT algorithm.


Decimation in Frequency FFT Algorithm
In decimation in frequency FFT algorithm the even and odd indexed DFT
coefficients are calculated separately. This operation is explained as follows.
The DFT coefficients are calculated using

X
N 1
X ½k  ¼ x½nekn
N k ¼ 0; 1; . . .; N  1 ð3:174Þ
n¼0

from which even indexed coefficients can be obtained via

X
N 1
X ½2k ¼ x½ne2kn
N k ¼ 0; 1; . . .; N=2  1
n¼0

where the summation term can be divided into two parts as

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

By changing the frontiers of the second summation expression in (3.175) we


obtain
220 3 Discrete Fourier Transform

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

which is further simplified as

X
N=21 
N

X ½2k  ¼ x ½ n þ x n þ ekn
N=2 k ¼ 0; 1; . . .; N=2  1: ð3:177Þ
n¼0
2

Equation (3.177) can be written in more compact form as

X
N=21
X ½2k ¼ x1 ½nekn
N=2 k ¼ 0; 1; . . .; N=2  1
n¼0

where x1 ½n ¼ x½n þ x n þ N2 n ¼ 0; 1; . . .; N=2  1:


In a similar manner the odd indexed coefficients of X½k can be obtained via

X
N 1
ð2k þ 1Þn
X ½2k þ 1 ¼ x½neN k ¼ 0; 1; . . .; N=2  1
n¼0

and proceeding as in the case of even indexed coefficients we obtain

X
N=21
ð2k þ 1Þn
X ½2k þ 1 ¼ ðx½n  x½n þ N=2ÞeN k ¼ 0; 1; . . .; N=2  1
n¼0

which can also be written as


3.7 Computation of the Discrete Fourier Transform 221

X
N=21
X ½2k þ 1 ¼ ðx½n  x½n þ N=2ÞenN ekn
N=2 k ¼ 0; 1; . . .; N=2  1
n¼0

which can be written in more compact form as

X
N=21
X ½2k þ 1 ¼ x2 ½nekn
N=2 k ¼ 0; 1; . . .; N=2  1
n¼0

where x2 ½n ¼ ðx½n  x½n þ N=2ÞenN n ¼ 0; 1; . . .; N=2  1:


To sum it up;

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

where x1 ½n ¼ ðx½n þ x½n þ N=2Þ x2 ½n ¼ ðx½n  x½n þ N=2ÞenN


and n ¼ 0; 1; . . .; N=2  1, enN ¼ ej N n .
2p

Note: If the signal x½n is written as x½n ¼ ½ A B ; n ¼ 0; 1; . . .; N  1 where A


is the first half and B is the second half of x½n, then

x½n þ x½n þ N=2 ¼ ½A þ B; n ¼ 0; 1; . . .; N=2  1

and

x½n  x½n þ N=2 ¼ ½A  B; n ¼ 0; 1; . . .; N=2  1

and

enN for n ¼ 0; 1; . . .; N=2  1

equals to

enN ¼ ej0 N ej1 N    ej 2 N :
2p 2p N 2p

Example 3.54 For x½n ¼ ½ 1 0 2 1  find DFT coefficients using decimation


in frequency FFT method.
Solution 3.54 For the given sequence and N ¼ 4 and let’s first find the signals
x1 ½n and x2 ½n given as
222 3 Discrete Fourier Transform

x1 ½n ¼ ðx½n þ x½n þ N=2Þ x2 ½n ¼ ðx½n  x½n þ N=2ÞenN

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 :

To calculate x2 ½n, we first compute enN for N ¼ 4 and n ¼ 0; 1 as in


h i
en4 ¼ ej0 4 ej1 4 ! en4 ¼ ½ 1
2p 2p
j :

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

x½n  x½n þ 2 ¼ ½ 1 0   ½ 2 1  ! x½n  x½n þ 2 ¼ ½ 1 1 :

Thus x2 ½n is calculated as

x2 ½n ¼ ðx½n  x½n þ 2Þen4 ! x2 ½n ¼ ½ 1 1 ½1 j 

which yields

x2 ½n ¼ ½ 1 j :

Next, we calculate the DFT coefficients of x1 ½n and x2 ½n as follows

x 1 ½ n ¼ ½ 3 1  ! X1 ½k ¼ ½ 3 1 3 þ1

x2 ½n ¼ ½ 1 j  ! X2 ½k ¼ ½ 1 j 1 þj

where X1 ½k and X2 ½k  for k ¼ 0; 1 corresponds to X½2k þ 1 and X½2k respectively.


Then we get
 
2 4
X ½2k þ 1 ¼ |{z} |{z}
X ½1 X ½3

 
1  j 1 þ j
X½2k ¼ |fflfflffl{zfflfflffl} |fflfflffl{zfflfflffl}
X½0 X½2
3.7 Computation of the Discrete Fourier Transform 223

As a result X½k becomes as

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

x1 ½n ¼ ðx½n þ x½n þ N=2Þ x2 ½n ¼ ðx½n  x½n þ N=2ÞenN

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 :

To calculate x2 ½n, we first compute enN for N ¼ 4 and n ¼ 0; 1 as follows



en4 ¼ ej0 4 ej1 4 ! en4 ¼ ½ 1 j :
2p 2p

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 :

Thus x2 ½n can be calculated as

x2 ½n ¼ ðx½n  x½n þ 2Þen4 ! x2 ½n ¼ ½ 1 1 ½1 j 

which yields

x2 ½n ¼ ½ a  c jðb  dÞ :

Next, we calculate the DFT coefficients of x1 ½n and x2 ½n, i.e.,


224 3 Discrete Fourier Transform

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 

where X1 ½k and X2 ½k  for k ¼ 0; 1 corresponds to X½2k þ 1 and X½2k respectively.


That is
 
aþcþbþd þc  b  d
a|fflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflffl}
X ½2k þ 1 ¼ |fflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflffl} ;
X ½1 X ½3
 
a  c  jb þ jd a  c þ jb  jd
X ½2k  ¼ |fflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflffl} :
X ½0 X ½2

As a result X½k becomes as

X ½k ¼ ½ a  c  jb þ jd aþcþbþd a  c þ jb  jd a þ c  b  d :

Example 3.56 For x½n ¼ ½ 2 1 1 1 3 0 1 2 , find 8-point DFT


coefficients using decimation in frequency FFT method.
Solution 3.56 The first and second half parts of x½n are shown in
 
2 1 1 1 3 0 1 2
x½n ¼ |fflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflffl} :
First Half Second Half

The signals
x½n þ x½n þ N=2 x½n þ x½n þ N=2 enN

for N ¼ 8; n ¼ 0; 1; . . .; 3 can be calculated as

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

Hence we obtained the signals


3.7 Computation of the Discrete Fourier Transform 225

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 

X2 ½k  ¼ ½ 1  j2:8 1  j2:8 1 þ j2:82 1 þ j2:82 :

The Fourier coefficients of x½n, i.e., X½k are related to X1 ½k and X2 ½k via

X ½2k þ 1 ¼ X1 ½k  X ½2k ¼ X2 ½k:

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 

and X½k becomes as

X ½k  ¼ ½ 1  j2:8 4 1  j2:8 2  j4 1 þ j2:8 8 1 þ j2:82 2 þ j4 :

3.8 Total Computation Amount of the FFT Algorithm

Consider the calculation of the following expression

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.

Total Computation Amount of the Direct DFT Calculation:


Let’s start the discussion with an example.
Example 3.57 For N ¼ 3, find the total computation amount of the DFT formula

X
N1
x½nejk N n ;
2p
X ½k  ¼ k ¼ 0; 1; . . .; N  1:
n¼0

Solution 3.57 For N ¼ 3 the DFT formula takes the form

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

When the summation terms in (3.179) are expanded, we get


3.8 Total Computation Amount of the FFT Algorithm 227

X ½0 ¼ x½0ej0 3 0 þ x½1ej1 3 0 þ x½2ej2 3 0


2p 2p 2p

X ½1 ¼ x½0ej 3 0 þ x½1ej 3 1 þ x½2ej 3 2 ð3:180Þ


2p 2p 2p

j22p j22p j22p


X ½2 ¼ x½0e 30 þ x½1e 31 þ x½2e 32 :

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.

Total Computation Amount of the Decimation in Time FFT Algorithm


Let’s solve some examples to get familiar with the expressions appearing in this
section.
Example 3.58 Let N ¼ 24 ; we will divide N by 2 and divide the division result by 2
also and repeat this procedure until the result equals 2. How many divisions need to
be performed?
Solution 3.58 24 =2 ¼ 23 ! 23 =2 ¼ 22 ! 22 =2 ¼ 2
As it is clear from the above result, 3 division operations are needed.
Note: If N ¼ 2v , then v division operations are needed to get 2 at the end of
successive divisions.
Example 3.59 a b means that whenever you see the a term replace it by b term
in a mathematical expression. Let’s define
N
2
N2 N þ2 2 if N [ 2 ð3:181Þ
N2 N if N ¼ 2:

Using (3.181), calculate the term that should be replaced for 82 .


Solution 3.59 Using the definition we get

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 Þ

where replacing ð2Þ2 by 2, we obtain

82 8 þ 2ð4 þ 2  2Þ

which is simplified as

82 24: ð3:182Þ

In (3.182) the obtained result equals to 8  log2 8:


Note: In general;
 2
N
N 2
N þ2 :
2
|fflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflffl}
¼Nlog2 N

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

X ½k ¼ G½k þ wkN H ½k k ¼ 0; 1; . . .; N  1 ð3:183Þ

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

wkN H ½k ! N multiplicative operations:

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

which is less then N 2 , i.e.,


3.8 Total Computation Amount of the FFT Algorithm 229

N2
þ N\N 2
2

and the total number of additive operations is


0 1 0 1
   
N @N N @N N2
1 Aþ
 |{z} 1 AþN N þ
 |{z}
2 2 2 2 2
ignore ignore

which is less then N 2 .


Hence considering the total number of multiplicative and additive operations the
computational complexity is less in decimation in time FFT algorithm.
Now let’s consider the number of multiplicative operations

N2

2

which can be written as


 2
N
N þ2 ð3:184Þ
2
2
which is replaced
N
for N when decimation in time FFT algorithm is applied.
The term 2 in the (3.184) indicates the FFT computational complexity of G½k
and H½k. If decimation in time algorithm is applied for the calculation of G½k and

2
H½k, we can replace N2 in (3.184) by
 2
N N
þ2
2 4

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

This procedure is carried out until we reach to 2-point FFT calculation. If


N ¼ 2v , i.e., v ¼ log2 N the successive division process results in
230 3 Discrete Fourier Transform

N þN þ
|fflfflfflfflfflfflfflfflfflfflfflffl  þN ffl} ¼ vN
ffl{zfflfflfflfflfflfflfflfflfflfflfflffl
v terms

where replacing v by log2 N, we get


N log2 N

as the number of multiplicative operations required for the calculation of DFT


coefficients of x½n using decimation in time FFT algorithm.
A similar procedure can be carried out to find the total number of additive
operations required for the calculation of DFT coefficients of x½n using decimation
in time FFT algorithm.

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:

Fig. 3.34 One period of the X n (w)


Fourier transform of the
aperiodic signal x½n
1

3
w
0 2
2 2

1
3.9 Problems 231

(6) Calculate 4-point DFT of x½n ¼ ½ 2 3 3 4 .


(7) Calculate 6-point DFT of x ¼ ½ 2 3 3 4 .
(8) Find 5-point circular convolution of x½n ¼ ½ 1 1 2 1  and
y½n ¼ ½ 1  0 3 : 
1 0 |{z}1 1 2 1
(9) If x½n ¼ ; find
n¼0

(10) If x½n ¼ ½ 1 2 0 3 1  and

X
1
~x½n ¼ x½n  5k ;
k¼1

draw one period of the following signals.

ðaÞ ~x½n ðbÞ ~x½2  n ðcÞ ~x½n  2 ðdÞ ~x½2n  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.

4.1 Review of Systems

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.

© Springer Nature Singapore Pte Ltd. 2018 233


O. Gazi, Understanding Digital Signal Processing, Springer Topics
in Signal Processing 13, DOI 10.1007/978-981-10-4962-0_4
234 4 Analog and Digital Filter Design

Fig. 4.1 A digital system


x [n] H y [n]

(a) Review of Systems.


(b) Review of Z-Transform.
(c) Review of Laplace Transform.
(d) Transformation between Continuous and Discrete Systems.
(e) Analogue Filter Design.
(f) IIR Digital Filter Design.
(g) FIR Digital Filter Design.
Hence, as outlined above before studying analog filter design, we will review
some fundamental concepts, such as linear systems, z-transform, Laplace transform,
and transformation between continuous and discrete systems.
The system given in the Fig. 4.1 has input x½n and output y½n. And the relation
between input and output can be indicated as y½n ¼ H fx½ng.
Linearity:
The system H is a linear system if for the linear combination of the inputs the
system output equals to the linear combination of the individual output. This is
graphically illustrated in Fig. 4.2.
Mathematically the linearity property for the system H is expressed as

H fax1 ½n þ bx2 ½ng ¼ aH fx1 ½ng þ bH fx2 ½ng: ð4:1Þ

Time Invariance:
The system H is time invariant if

y½n  n0  ¼ Hfx½n  n0 g ð4:2Þ

Linear and Time Invariant System:


If a system is both linear and time invariant, then the system is called linear time
invariant system, i.e., LTI system.
For a linear time invariant system denoted by H, the impulse response is defined as

h½n ¼ Hfd½ng ð4:3Þ

x1[n] H y1[n] x2 [ n] H y2 [n]

ax1[n] bx2 [n] H ay1[n] by2 [n]

Fig. 4.2 Linear system


4.1 Review of Systems 235

Fig. 4.3 Impulse response


and output of a linear time [n] H h [n]
invariant system

x [n] H y[ n] h[ n] x[ n]

Fig. 4.4 A LTI system n


x[n] H y[ n] x[ k ]
k

and the output of a LTI system for an arbitrary input is defined as

y½n ¼ h½n  x½n ð4:4Þ

where  denotes the convolution operation and it is evaluated as

X
1
h½ n  x ½ n ¼ h½k x½n  k: ð4:5Þ
k¼1

This property graphically illustrated as in the following Fig. 4.3


Causality:
The signal x½n is causal if x½n ¼ 0 for n\0.
The linear time invariant system denoted by H is causal if h½n ¼ 0 for n\0.
Difference Equations for LTI Systems:
The relationship between the input and the output of a LTI system can be
represented by difference equations as in

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

Using (4.7) then the shifted signal y½n  1 can be calculated as

X
n1
y ½ n  1 ¼ x½k: ð4:8Þ
k¼1

Taking the difference of y½n in (4.7) and y½n  1 in (4.8), we get

y½n  y½n  1 ¼ x½n: ð4:9Þ

Using (4.7) the impulse response of the system can be calculated as

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

For a digital sequence x½n the Z-transform is defined as

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

which converges to a finite summation if

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

The Properties of the Region of Convergence:


If X ðzÞ ¼ QPððzzÞÞ, then the roots of PðzÞ ¼ 0 are called the zeros of XðzÞ and the
roots of QðzÞ ¼ 0 are called the poles of XðzÞ. The region of convergence of XðzÞ
has the following properties.
(1) The ROC does not contain any poles.
(2) Fourier transform of x½n exists if the ROC of XðzÞ covers the unit circle.
(3) For a right sided sequence, the ROC extends outward from the outermost pole
of XðzÞ.
(4) For a left sided sequence, the ROC extends inward from the innermost finite
pole of XðzÞ.
(5) For a finite sequence, the ROC is a ring.

Example 4.2 For x½n ¼ an u½n  1, find XðzÞ.


P
Solution 4.2 Using the definition X ðzÞ ¼ 1n¼1 x½nz
n
for the given signal, we
obtain

X
1
X ðzÞ ¼ an u½n  1zn
n¼1

where u½n  1 can be replaced by


 
1 if  n  1 [ 0 1 if n\  1
u½n  1 ¼ ! u½n  1 ¼
0 otherwise 0 otherwise

leading to the calculation

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

Fig. 4.5 LTI system


x[n ] H y[n ]

Fig. 4.6 LTI system with


impulse response h½n x [n] h [n ] y[n]

Fig. 4.7 LTI system with


Z-transforms X (z ) H (z ) Y (z )

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

For a discrete LTI system, the transfer function is defined as

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Þ

Determine whether the system is stable or not?


Solution 4.4 The poles of HðzÞ are at z1 ¼ 0:3 and z2 ¼ 0:8 þ 0:8j, and since
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
jz2 j ¼ 0:82 þ 0:82 ! jz2 j ¼ 1:13 is outside the unit circle, the LTI system with
the given transfer function is not a stable system.
4.1 Review of Systems 239

4.1.2 Laplace Transform

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

where s is the complex frequency defined as s ¼ r þ jw. The integral expression


given in (4.16) converges for some set of s values which can be represented by a
region in complex plane called convergence region or region of convergence in
short.
The Properties of the Region of Convergence:
If H ðsÞ ¼ QPððssÞÞ, then the roots of PðsÞ ¼ 0 are called the zeros of HðsÞ and the
roots of QðsÞ ¼ 0 are called the poles of HðsÞ. The properties of the region of
convergence (ROC) for HðsÞ can be summarized as follows.
(1) The ROC does not include any poles.
(2) The ROC consists of vertical half planes or strips.
(3) Right side signals have ROC extending in the right half plane.
(4) Left side signals have ROC extending in the left half plane.
(5) Two sided signals do either have ROC in a central vertical strip or they diverge.
Stability of a Continuous LTI Systems:
The continuous LTI system H shown in Fig. 4.8.
Can also be described using its impulse response as in Fig. 4.9.
For the system of Fig. 4.9, we have yc ðtÞ ¼ hðtÞ  xc ðtÞ and Y ðsÞ ¼ HðsÞXðsÞ.
Thus, LTI system H can also be described as using Laplace transform of the
functions as in Fig. 4.10.
In Fig. 4.10, HðsÞ is called the transfer function of the continuous time system.

xc (t ) H yc (t )

Fig. 4.8 A continuous LTI system

xc (t ) hc (t ) yc (t )

Fig. 4.9 A continuous LTI system with its impulse response

X (s ) H (s ) Y (s )

Fig. 4.10 A continuous LTI system using Laplace transforms


240 4 Analog and Digital Filter Design

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Þ

Determine whether the system is stable or not?


Solution 4.5 The poles of HðsÞ are s1 ¼ 0:5  2j and s2 ¼ 3 þ 2j. The system
with transfer function HðsÞ is not a stable system since the pole s1 has positive real
part.
For continuous LTI systems, the relationship between system input and system
output can be described using differential equations as in

X
N
d k yð t Þ X M
d k xð t Þ
a½ k  ¼ b ½ k  : ð4:18Þ
k¼0
dtk k¼0
dtk

4.2 Transformation Between Continuous


and Discrete Time Systems

We know that continuous LTI systems can be represented by differential equations.


And when the continuous time system is converted to a digital system, we can
represent digital system by difference equations.
Now we ask the question: How can we convert a differential equation to a
difference equation?
For the answer of this question, let’s first inspect the conversion of

dxc ðtÞ
dt

to its discrete equivalent.


The derivative of xc ðtÞ evaluated at point t0 is nothing but the slope of the line
tangent to the graph of xc ðtÞ at point t0 . This is illustrated in the Fig. 4.11.
4.2 Transformation Between Continuous and Discrete Time Systems 241

Fig. 4.11 A tangent line at


point t0
xc (t )

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

or using the right triangle in Fig. 4.13 as



dxc ðtÞ xc ððn þ 1ÞTs Þ  xc ðnTs Þ
 ¼ : ð4:20Þ
dt t¼nTs Ts

And we have the following identities

x½n ¼ xc ðnTs Þ x½n  1 ¼ xc ððn  1ÞTs Þ x½n þ 1 ¼ xc ððn þ 1ÞTs Þ: ð4:21Þ

Using (4.21) in (4.19) and (4.20), the derivative of the continuous time signal
can be written either as

Fig. 4.12 Sampling of the


continuous time signal xc ((n 1)Ts )
xc (nTs ) xc (t )
xc ((n 1)Ts )

t
0 ( n 1)Ts nTs (n 1)Ts
242 4 Analog and Digital Filter Design

Fig. 4.13 Calculation of the


slope of the tangent line at xc (( n 1)Ts )
point t0 ¼ nTs xc ( nTs ) xc (t )
xc ((n 1)Ts )

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

Otherwise indicated, we will use



dxc ðtÞ x½n þ 1  x½n
  ð4:24Þ
dt t¼nTs Ts

for the discrete approximation of the derivative operation.


In addition, the expression

dxc ðtÞ x½n þ 1  x½n
 
dt t¼nTs Ts

is called backward difference approximation, and



dxc ðtÞ x½n  x½n  1

dt t¼nTs Ts

is called forward difference approximation.


Example 4.6 Obtain the discrete equivalent of the differential equation

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

into (4.26), we obtain the difference equation

y½n þ 1  y½n
þ ay½n ¼ bx½n: ð4:28Þ
Ts

If we use the forward difference approximation



dyðtÞ y½n  y½n  1

dt t¼nTs Ts

we obtain

y ½ n  y ½ n  1
þ ay½n ¼ bx½n
Ts

as the discrete approximation of (4.25).


Example 4.7 Find the discrete equivalent of

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

into (4.30), we obtain



d 2 yðtÞ y½n þ 2  y½n þ 1  ðy½n þ 1  y½nÞ
2  
dt t¼nTs Ts2

which can be simplified as



d 2 yðtÞ y½n þ 2  2y½n þ 1 þ y½n
 : ð4:31Þ
dt2 t¼nTs Ts2

If we use forward difference approximation



dyðtÞ y½n  y½n  1

dt t¼nTs Ts

inside the expression


 
 dyðtÞ dyðtÞ
d yðtÞ
2 dt t¼ðnT Þ  dt t¼ðn1ÞT
s s

dt2  t¼nTs Ts

we obtain
 
 y½ny½n1 y½n1y½n2
d yðtÞ
2
Ts  Ts

dt2  t¼nTs Ts

which can be simplified as



d 2 yðtÞ y½n  2y½n  1 þ y½n  2
2   : ð4:32Þ
dt t¼nTs Ts2

Example 4.8 Find the discrete equivalent of the differential equation

d 2 yðtÞ dyðtÞ dxðtÞ


þ2 þ yð t Þ ¼ xð t Þ þ : ð4:33Þ
dt2 dt dt
Solution 4.8 If both sides of the (4.33) are sampled, we get
4.2 Transformation Between Continuous and Discrete Time Systems 245

  
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

And substituting the approximations and equations



d 2 yðtÞ y½n þ 2  2y½n þ 1 þ y½n
2  
dt t¼nTs Ts2

dxðtÞ x ½ n þ 1  x ½ n

dt 
t¼nTs T s

x½n ¼ xðtÞjt¼nTs
y½n ¼ yðtÞjt¼nTs

into (4.34), we obtain

y½n þ 2  2y½n þ 1 þ y½n y ½ n þ 1  y ½ n x½n þ 1  x½n


þ2 þ y½n ¼ x½n þ :
Ts2 Ts Ts
ð4:35Þ

For Ts ¼ 1, the Eq. (4.35) reduces to

y½n þ 2 ¼ x½n þ 1:


Exercise: Find the discrete equivalent of

d 3 yð t Þ
:
dt3

4.2.1 Conversion of Transfer Functions of LTI Systems

We know that continuous and discrete LTI systems can be described by differential
or difference equations.

Fig. 4.14 Continuous time


LTI system and its discrete xc (t ) hc (t ) yc (t )
equivalent

x[n] h [n] y[n]


246 4 Analog and Digital Filter Design

And a differential equation can be converted to a difference equation via sam-


pling operation. The difference equation represents a discrete LTI system. In
Fig. 4.14, a continuous time system and its discrete equivalent obtained via sam-
pling operation is shown using block diagrams.
Both continuous and discrete systems have transfer functions defined as

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Þ.

4.2.2 Forward Difference Transformation Method

Consider the differential equation

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

sY ðsÞ þ aY ðsÞ ¼ XðsÞ

from which the transfer function H ðsÞ ¼ YðsÞ=XðsÞ can be calculated as

1
H ðsÞ ¼ : ð4:37Þ
sþa

If the differential equation

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

which yields the difference equation

y ½ n  y ½ n  1
þ ay½n ¼ x½n: ð4:38Þ
Ts

And by taking the Z-transform of both sides of (4.38), we get

Y ðzÞ  z1 Y ðzÞ


þ aY ðzÞ ¼ XðzÞ
Ts

from which the transfer function HðzÞ can be calculated as

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

H ðzÞ ¼ HðsÞjs¼1z1 ð4:40Þ


Ts

Example 4.9 Obtain the discrete equivalent of

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

y½n  2y½n  1 þ y½n  2 y½n  y½n  1


þ þ ay½n ¼ x½n: ð4:43Þ
Ts2 Ts
Laplace transform of the (4.42) is

s2 Y ðsÞ þ sY ðsÞ þ aY ðsÞ ¼ X ðsÞ: ð4:44Þ

Z-transform difference Eq. (4.43) can be calculated as

Y ðzÞ  2z1 Y ðzÞ þ z2 Y ðzÞ Y ðzÞ  z1 Y ðzÞ


þ þ aY ðzÞ ¼ XðzÞ
Ts2 Ts

which yields

2
1  z1 1  z1
Y ðzÞ  Y ðzÞ þ aY ðzÞ ¼ X ðzÞ: ð4:45Þ
Ts Ts

If we compare the Laplace transform in (4.44) and Z-transform in (4.45), we see


1
that Z-transform can be obtained from Laplace transform replacing s by 1z
Ts . That
is

H ðzÞ ¼ HðsÞjs¼1z1 ð4:46Þ


Ts

Therefore, if forward difference transformation method is used for any differ-


ential equation, the relation between transfer functions of continuous and discrete
systems happens to be as in (4.46).

4.2.3 Bilinear Transformation

If the bilinear transformation method is used to obtain the difference equation from
differential equation, the relation between transfer functions happens to be as

H ðzÞ ¼ HðsÞj   ð4:47Þ


1z1
s¼T2s
1 þ z1

Now let’s derive the bilinear transformation formula in (4.47).


Consider the differential equation

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

which can be written as

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

which can be written as

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

Fig. 4.15 Trapezoidal w(t )


integration
w(nTs )

w ((n 1)Ts )

t
0 (n 1)Ts nTs

which can be simplified as

ZnTs
Ts
wðsÞds ¼ ðw½n  1 þ w½nÞ: ð4:53Þ
2
ðn1ÞTs

Substituting (4.53) into (4.51), we obtain

Ts
y ½ n ¼ y ½ n  1 þ ðw½n  1 þ w½nÞ: ð4:54Þ
2

Consider the equation

dyðtÞ
þ ayðtÞ ¼ xðtÞ: ð4:55Þ
dt
|ffl{zffl}
wðtÞ

When (4.55) is sampled, we obtain

w½n þ ay½n ¼ x½n ! w½n ¼ ay½n þ x½n: ð4:56Þ

If Eq. (4.56) is substituted into (4.54), we obtain

Ts
y ½ n ¼ y ½ n  1 þ ðay½n  1 þ x½n  1  ay½n þ x½nÞ ð4:57Þ
2

which can be rearranged as

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

And taking the Z-transform of both sides of (4.58), we get



aTs aTs 1 Ts  
1þ Y ðzÞ  1  z Y ðzÞ ¼ a þ z1 X ðzÞ ð4:59Þ
2 2 2

from which the transfer function can be calculated as

Y ðzÞ 1
H ðzÞ ¼ ! H ðzÞ ¼  : ð4:60Þ
X ðzÞ aþ 2 1z1
Ts 1 þ z1

When (4.60) is compared to

1
H ðsÞ ¼ ð4:61Þ
aþs

we see that

H ðzÞ ¼ HðsÞj   ð4:62Þ


1z1
s¼T2s
1 þ z1

Bilinear transformation is an efficient transformation technique. Stable contin-


uous time LTI systems are converted into stable discrete LTI systems.
That is if the poles of HðsÞ are in the left half plane, the poles of HðzÞ are inside
the unit circle. This is illustrated in Fig. 4.16.
Frequency Mapping in Bilinear Transformation:
In bilinear transformation, the relation between continuous and digital frequency
is given as

2 1  z1
s¼ ð4:63Þ
Ts 1 þ z1

Digital
Analog

s-plane z-plane

Fig. 4.16 Pole mapping in bilinear transformation


252 4 Analog and Digital Filter Design

where s ¼ r þ jwa and z ¼ ejwd . Let

wa ! Analog signal frequency

and

wd ! Digital signal frequency:

Equation (4.63) yields


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

Summary: Transformation of analog systems to discrete ones can be achieved


by using the following methods.
(1) The forwards difference transformation:

z1
s¼ :
Ts

(2) The backward difference transformation:

z1
s¼ :
Ts z

(3) The bilinear transformation:

2 1  z1

Ts 1 þ z1
4.2 Transformation Between Continuous and Discrete Time Systems 253

(4) Impulse invariance transformation:

H ðzÞ ¼ Ts  Ztransform of fH ðsÞg:

(5) Step invariance transformation:


  H ðsÞ
H ðzÞ ¼ 1  z1  Ztransform of :
s

Example 4.10 Transfer function of a continuous time system is given as

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

choose Ts ¼ 1 and this yields

19 þ 22z1 þ 3z2
H ðzÞ ¼ :
28 þ 12z1

4.3 Analogue Filter Design

Consider the continuous LTI system given in Fig. 4.17.


Where the system output equals to

yðtÞ ¼ xðtÞ  hðtÞ

which can be written in frequency domain as

Y ðwÞ ¼ X ðwÞH ðwÞ: ð4:65Þ

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.

Fig. 4.17 A continuous LTI


system x(t ) h(t ) y (t )
254 4 Analog and Digital Filter Design

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Þ ¼ \HðwÞ ! hðwÞ ¼ argðH ðwÞÞ

then phase and group delays are defined 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Þ

yields the system output

yðtÞ ¼ sinðwðt  2ÞÞ:

4.3.1 Ideal Filters

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

Fig. 4.18 Transfer function of the ideal low-pass filter

Whose impulse response can be calculated as

Zwc
1
hlp ðtÞ ¼ 1  ejwt dw
2p
wc
1
¼ sin cðwc tÞ
pt

where wc is called cut-off frequency.


Ideal High-Pass Filter:
The transfer function of the ideal high-pass filter is shown in Fig. 4.19.
Which can be written in terms of the transfer function of the low-pass filter with
the same cut-off frequency as

Hhp ðwÞ ¼ 1  Hlp ðwÞ: ð4:67Þ

whose inverse Fourier transform equals to

1
hhp ðtÞ ¼ 1  sin cðwc tÞ: ð4:68Þ
pt

Ideal Band-Pass Filter:


The transfer function of the ideal band-pass filter is shown in Fig. 4.20.

H hp (w)

w
c 0 c

Fig. 4.19 Transfer function of the ideal high-pass filter


256 4 Analog and Digital Filter Design

H bp (w)

w
ch 0 cl 0 cl 0 ch

Fig. 4.20 Transfer function of the ideal band-pass filter

H (w)

w
ch cl
0 cl ch

Fig. 4.21 Transfer function of the ideal band-stop filter

Which can be obtained from low-pass filter transfer function with the same
cut-off frequency as

Hbp ðwÞ ¼ Hlp ðw  w0 Þ þ Hlp ðw þ w0 Þ: ð4:69Þ

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

Hbs ðwÞ ¼ 1  Hbp ðwÞ: ð4:70Þ

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

Fig. 4.22 Transfer function H 1i ( w)


of the ideal low-pass filter
with cut-off frequency
xc ¼ 1 rad/s 1

w
1 0 1

Fig. 4.23 Transfer function H 2i ( w)


of the ideal low-pass filter
with cut-off frequency
xc ¼ 2 rad/s 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

Hhp ¼ 1  Hlp ðwÞ


pffiffiffi
w2 þ 4 2w þ 12
¼ pffiffiffi :
w2 þ 4 2w þ 16

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.

4.3.2 Practical Analog Filter Design

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.

Fig. 4.24 The specifications | H ( w) |2


of a practical analog filter

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

in passband and it should satisfy

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

If jH ðwÞjmax ¼ 1, then wc is determined from

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

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

d 1

which is equal to 0 for ideal filters and d [ 1 for practical filters.


Now let’s see the practical filter design methods.

4.3.3 Practical Filter Design Methods

The most known practical filter design techniques in literature are:


(1) Butterworth filter design.
(2) Chebyshev I and II filter design.
(3) Elliptic filter design.
(4) Bessel filter design.

4.3.3.1 Butterworth Filter Design

The squared magnitude response of the Nth order Butterworth filter is defined as

1
jH ðwÞj2 ¼  2N ð4:75Þ
w
1þ wc

where wc is the cut-off frequency.


The transfer function of the Nth order Butterworth filter is

wNc
H ðsÞ ¼ QN ð4:76Þ
k¼1 ðs  pk Þ

where the poles pk are given as


jp
pk ¼ wc e 2 ð1 þ ð ÞÞ :
2k1
N ð4:77Þ

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

Given low-pass filter specifications wp , ws ; Rp ; the low-pass Butterworth filter is


designed via the following steps:
(1) Using the given filter specifications and the expression

1
jH ðwÞj2 ¼  2N
w
1þ wc

decide on the filter order N and cut-off frequency wc .


(2) Determine the poles using

pk ¼ wc e 2 ð1 þ ð ÞÞ ;
jp 2k1
N k ¼ 1; . . .; N:

(3) Find the transfer function using the poles as

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

which leads to the equation

1 1
 2N ¼ : ð4:78Þ
wp 1 þ 2
1þ wc

(b) In a similar manner, from Fig. 4.24, it is also seen that

1   
 2N ! H wp  ¼ d
2
at w ¼ ws jH ðws Þj ¼
ws
1þ wc
262 4 Analog and Digital Filter Design

which yields the equation

1
 2N ¼ d :
2
ð4:79Þ
wp
1þ wc

From (4.78) and (4.79), we obtain the equation set


 2N 9
ws
¼ d 2
 1 >
=
wc
 2N ! dividing them
¼ 1 þ 2 > ;
wp
wc

we get

2N
ws d2  1
¼ : ð4:80Þ
wp 2

When (4.80) is solved for N, we get


2 pffiffiffiffiffiffiffiffiffiffi
3
d2 1
6log  7
N 6
6   7
7 ð4:81Þ
6 log wws 7
6 p 7

which can be written in terms of selectivity and discrimination parameters as


&
 ’
log d1
N  ð4:82Þ
log 1k

where d e is the round up to the larger integer function.


And the cut-off frequency wc can be determined by solving one of the equations

2N
ws
¼ d2  1
wc

2N ð4:83Þ
wp
¼ 1þ 2
wc

yielding the roots

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

wp ¼ 1000 rad/s ws ¼ 3000 rad/s Rp ¼ 4 dB Rs ¼ 40 dB:

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 :

And using the calculated 2 and d2 values in the Fig. 4.25.


We can roughly sketch the filter squared magnitude response as in Fig. 4.26.
Next, we determine the order N of the filter as follows
w
k ¼ wps ! k ¼ 13
d ¼ pffiffiffiffiffiffiffiffiffi
 ffi
2
! d ¼ pffiffiffiffiffiffiffiffiffi
1:23 ffi
104 1
! d  0:0123
d 1
logðd1Þ logð0:0123
1
Þ
N logð
!N ¼ 4:002 ! N ¼ 4:
1
k Þ logð3Þ

And the cut-off frequency can be found using

1   1
N wp  wc  d2  1 2N ws

Fig. 4.25 Typical magnitude | H ( w) |2


squared transfer function of a
practical low-pass filter
1
Transition
2 1
(1 )

Passband
Stopband

w
0 wp ws
264 4 Analog and Digital Filter Design

Fig. 4.26 Magnitude squared | H ( w) |2


transfer function of a practical
low-pass filter for
Example 4.13 1
Transition
0.4

Passband
Stopband

4
10
w
0 1000 3000

as follows

1   1
1:234 1000  wc  104  1 8 3000

949:6  wc  948:69 ! wc ¼ 949 rad/s:

The poles for N ¼ 4 are calculated using


jp
pk ¼ wc e 2 ð1 þ ð ÞÞ ;
2k1
N k ¼ 1; . . .; N

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

which can be simplified as

p1 ¼ 363 þ 876j p2 ¼ 876 þ 363j


p3 ¼ 876  363j p4 ¼ 363  876j:
4.3 Analogue Filter Design 265

Using the calculated poles, the transfer function is evaluated as

wNc
H ðsÞ ¼
ð s  p1 Þ ð s  p2 Þ ð s  p3 Þ ð s  p4 Þ

which leads to the expression

9492
H ðsÞ ¼   
ðs þ 363Þ2 8762 ðs þ 876Þ2 3632

whose simplified form is

900;601
H ðsÞ ¼ :
ðs2 þ 726s  635;607Þðs2 þ 1752s þ 635;607Þ

4.3.3.2 Chebyshev Filter Design

Chebyshev Type-I Filter:


Chebyshev Type-I filter squared magnitude response is equiripple in the pass-
band and monotonic in the stopband. The squared magnitude response of a typical
Chebyshev Type-I filter is depicted in the Fig. 4.27.
In Chebyshev Type-I filter transition from passband to stopband is more rapid
when compared to Butterworth filter.
The square magnitude response of Chebyshev Type-I filter is defined as

1
jHI ðwÞj2 ¼   ð4:86Þ
1 þ 2 TN2 w
wp

Fig. 4.27 Square magnitude | H ( w) |2


response of Chebyshev
Type-I filter
1
Transition
2 1
(1 )

Passband
Stopband

w
0 wp ws
266 4 Analog and Digital Filter Design

where TN ðwÞ is the Nth order Chebyshev polynomial given as



cosðN cos1 ðwÞÞ  jwj  1
TN ðwÞ ¼ : ð4:87Þ
cos h N cos h1 ðwÞ jwj [ 1

The Chebyshev polynomial can be calculated in an iterative manner as

Tm ðwÞ ¼ 2wTm1 ðwÞ  Tm2 ðwÞ m2 ð4:88Þ

with the initial conditions

T0 ðwÞ ¼ 1 and T1 ðwÞ ¼ w: ð4:89Þ

Chebyshev Type-I filter design:


Assume that the low-pass filter specifications wp ; ws ; Rp ; Rs are given. The
design of the Chebychev Type-I filter can be achieved via the following steps
(1) First, with the given low-pass filter specifications; the order of the filter is
determined as:

 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Þ

(2) Next, we calculate the transfer function

c
H ðsÞ ¼ QN ð4:92Þ
k¼1 ðs  pk Þ

where the poles are calculated using



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 

And the constant term c in (4.92) is calculated via


8
> Q
N
>
< pk if N is odd
k¼1
c¼ 1Q
ð4:95Þ
>
>
N
: ð1 þ 2 Þ2 pk if N is even
k¼1

Example 4.14 Design a low-pass filter whose specifications are given as

wp ¼ 1000 rad/s ws ¼ 4000 rad/s Rp ¼ 5 dB Rs ¼ 40 dB:

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 :

And selectivity and discrimination parameters are found via


w
k ¼ wps ! k ¼ 14
d ¼ pffiffiffiffiffiffiffiffiffi
 ffi
2
! d ¼ pffiffiffiffiffiffiffiffiffi
1:47 ffi
104 1
! d  0:0147:
d 1

The filter order is calculated as

cos h1 ðd 1 Þ
N ! N  2:38 ! N ¼ 3:
cos h1 ðk1 Þ

The calculation of the poles can be achieved via


1 !
1 1 þ ð1 þ 2 Þ2
/ ¼ ln ! / ¼ 0:2121
N 
268 4 Analog and Digital Filter Design

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:

Since N is odd, the constant term is calculated using

Y
3
c¼ pk ! c ¼ 170;040;000:
k¼1

Then the transfer function of the filter is calculated via


c
H ðsÞ ¼ QN
k¼1 ðs  pk Þ

leading to the expression

170;040;000
H ðsÞ ¼
ðs þ 213:7Þððs þ 106:8Þ2 þ 885:52 Þ

which can be simplified as

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

Fig. 4.28 The magnitude | H ( w) |2


squared response of a typical
Chebyshev Type-II filter
1
Transition
2 1
(1 )

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

The relationship between the two transfer functions in (4.96) is given as



2
 1  1
jHII ðwÞj2 ¼ 1  HI wp ¼ : ð4:97Þ
w  ws

The transfer function of the Type-II Chebyshev filter is defined as


8
>
> QN
>
> c szi
if N is even
>
> spi
>
< k¼1

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

where the phase / is computed as

1  
/¼ cos h1 d1
N
1  1 
 ð4:101Þ
¼ ln d1 þ d2  1 2 :
N

And finally the constant term c is calculated using


8 N
> Q
>
<
pk
zk if N is even
k¼1
c¼ 1Q
>
>
N
: ð1 þ 2 Þ2 pk if N is odd:
k¼1

4.3.3.3 Elliptic Filters

The magnitude squared response of the elliptic filters are given as

1
jH ðwÞj2 ¼
1 þ 2 UN2 ðwÞ

where UN ðwÞ is the Jacobian elliptic function.


Elliptic filters have equiripple both in the passband and stopband. The amount of
the ripple in each band can be adjusted. When the ripple in stopband approaches to
zero, the filter converged to a Type-I Chebyshev filter. On the other hand, as the
ripple in passband approaches to zero, the filter converged to a Type-II Chebyshev
filter. If the ripples in both bands approaches to zero, then the filter converged to a
Butterworth filter.
Elliptic filters have the steepest roll-off characteristics. The squared magnitude
response of a typical Elliptic filter is depicted in the Fig. 4.29.

Fig. 4.29 The squared | H ( w) |2


magnitude response of a
typical Elliptic filter
1

(1 2
) 1 Transition

Passband Has the steepest roll-off

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.

4.3.3.4 Bessel 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.

Fig. 4.30 The squared | H ( w) |2


magnitude response of a
typical Bessel filter
1
Transition
2 1
(1 )
Has the lowest
roll-off
Passband
Stopband

w
0 wp ws
272 4 Analog and Digital Filter Design

4.3.4 Analog Frequency Transformations

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

wcl is the lower cut-off frequence.

wcu is the upper cut-off frequency.


Example 4.15 The transfer function of a low-pass analog filter with cut-off fre-
quency wc ¼ 1 rad/s is given as

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

which yields the transfer function

1
Hhp ðsÞ ¼ 1  1 1

s þ1 s2 þ s þ1
4.3 Analogue Filter Design 273

whose simplified form can be calculated as

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.

4.4 Implementation of Analog Filters

4.4.1 Low Pass Filter Circuits

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 Þ

Considering (4.102), we can calculate the transfer function of the Butterworth


filter for wc ¼ 1 and N ¼ 3 as

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 :

If we know how to implement ðs þ aÞ and ðs2 þ b1 s þ b2 Þ, then we can imple-


ment the transfer function HðsÞ using circuit elements.
How to implement H ðsÞ ¼ a=ðs þ aÞ:
The transfer function H ðsÞ ¼ a=ðs þ aÞ can be implemented using the circuit in
Fig. 4.31.

Fig. 4.31 Analog R


implementation of H ðsÞ ¼ Vout
a=ðs þ aÞ by circuit elements
Vin C
274 4 Analog and Digital Filter Design

The transfer function of the circuit in Fig. 4.31 can be calculated as


1
Vout ðsÞ
H ðsÞ ¼ ! H ðsÞ ¼ RC 1 :
Vin ðsÞ s þ RC

How to implement H ðsÞ ¼ b=ðs þ aÞ:


The transfer function

b
H ðsÞ ¼ ð4:104Þ
sþa

can be implemented using the circuit in Fig. 4.32.


The transfer function of the above circuit is

1
Vout ðsÞ R3 R1 C
H ðsÞ ¼ ! H ðsÞ ¼ 1þ
Vin ðsÞ R2 s þ R11C

How to implement H ðsÞ ¼ a=s2 þ b1 s þ b2 :


The transfer function
a
H ðsÞ ¼ ð4:105Þ
s2 þ b1 s þ b2

can be implemented using the circuit in Fig. 4.33.


The transfer function of the circuit in Fig. 4.33 can be calculated as
K
Vout ðsÞ
H ðsÞ ¼ ! H ðsÞ ¼  s1 s2

Vin ðsÞ s2 þ s11 þ 1
þ 1K
sþ 1
R 2 C1 s2 s1 s2

where K ¼ 1 þ RB =RA ; s1 ¼ R1 C1 ; s2 ¼ R2 C2 . If common values are selected for


the resistors R1 ; R2 and capacitors C1 ; C2 , transfer function expression reduces to

Fig. 4.32 Analog R2 R3


implementation of H ðsÞ ¼
b=ðs þ aÞ by circuit elements
R1
Vout
Vin C
4.4 Implementation of Analog Filters 275

Fig. 4.33 Analog C1


implementation of H ðsÞ ¼
a=s2 þ b1 s þ b2 by circuit R1 R2
elements Vout

Vin
C2
RB
RA

Fig. 4.34 Alternative analog C1 C2


implementation of (4.105)
R1
R2
Vout

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

where s1 ¼ R1 C1 ; s2 ¼ R2 C2 . If R1 and R3 are chosen as R1 ¼ R3 , then we get


1
s1 s2
H ðsÞ ¼ 1 2
: ð4:107Þ
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

Implement the given filter transfer function using circuit elements.


276 4 Analog and Digital Filter Design

Fig. 4.35 Second order C1 C2


low-pass filter
implementation
R1
R2
Vout

Vin R3

Solution 4.16 Let’s use the circuit given in Fig. 4.35.


The transfer function of the circuit in Fig. 4.35 can be calculated as
1
s1 s2
H ðsÞ ¼ 1 þ R1 =R3
: ð4:108Þ
1
s2 þ s2 sþ s1 s2

When (4.38) is compared to

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

In (4.109) let’s first solve

1
¼ 1414:
s2

Since s2 ¼ R2 C2 , if C2 is chosen as 0:47 lF, then

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

for s1 , we get s1 ¼ 1414=2  106 and if C1 is chosen as 0:47 lF, then

1414
R1 ¼ 2  ! R1 ¼ 6017 X:
0:47

Finally solving the equation

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.

Fig. 4.36 Butterworth 0.47 F 0.47 F


low-pass filter circuit with
cut-off frequency
6017
wc ¼ 1000 rad/s 1504
Vout

Vin 6017
278 4 Analog and Digital Filter Design

Table 4.1 Common resistor values for electronic circuits


Standard resistor values (±5%)
1.0 10 100 1.0 K 10 K 100 K 1.0 M 10 M
1.1 11 110 1.1 K 11 K 110 K 1.1 M 11 M
1.2 12 120 1.2 K 12 K 120 K 1.2 M 12 M
1.3 13 130 1.3 K 13 K 130 K 1.3 M 13 M
1.5 15 150 1.5 K 15 K 150 K 1.5 M 15 M
1.6 16 160 1.6 K 16 K 160 K 1.6 M 16 M
1.8 18 180 1.8 K 18 K 180 K 1.8 M 18 M
2.0 20 200 2.0 K 20 K 200 K 2.0 M 20 M
2.2 22 220 2.2 K 22 K 220 K 2.2 M 22 M
2.4 24 240 2.4 K 24 K 240 K 2.4 M
2.7 27 270 2.7 K 27 K 270 K 2.7 M
3.0 30 300 3.0 K 30 K 300 K 3.0 M
3.3 33 330 3.3 K 33 K 330 K 3.3 M
3.6 36 360 3.6 K 36 K 360 K 3.6 M
3.9 39 390 3.9 K 39 K 390 K 3.9 M
4.3 43 430 4.3 K 43 K 430 K 4.3 M
4.7 47 470 4.7 K 47 K 470 K 4.7 M
5.1 51 510 5.1 K 51 K 510 K 5.1 M
5.6 56 560 5.6 K 56 K 560 K 5.6 M
6.2 62 620 6.2 K 62 K 620 K 6.2 M
6.8 68 680 6.8 K 68 K 680 K 6.8 M
7.5 75 750 7.5 K 75 K 750 K 7.5 M
8.2 82 820 8.2 K 82 K 820 K 8.2 M
9.1 91 910 9.1 K 91 K 910 K 9.1 M

Table 4.2 Common capacitor values for electronic circuits


Standard capacitor values (±10%)
10 pF 100 pF 1000 pF 0.010 mF 0.10 mF 1.0 mF 10 mF
12 pF 120 pF 1200 pF 0.012 mF 0.12 mF 1.2 mF
15 pF 150 pF 1500 pF 0.015 mF 0.15 mF 1.5 mF
18 pF 180 pF 1800 pF 0.018 mF 0.18 mF 1.8 mF
22 pF 220 pF 2200 pF 0.022 mF 0.22 mF 2.2 mF 22 mF
27 pF 270 pF 2700 pF 0.027 mF 0.27 mF 2.7 mF
33 pF 330 pF 3300 pF 0.033 mF 0.33 mF 3.3 mF 33 mF
39 pF 390 pF 3900 pF 0.039 mF 0.39 mF 3.9 mF
47 pF 470 pF 4700 pF 0.047 mF 0.47 mF 4.7 mF 47 lF
56 pF 560 pF 5600 pF 0.056 mF 0.56 mF 5.6 mF
68 pF 680 pF 6800 pF 0.068 mF 0.68 mF 6.8 mF
82 pF 820 pF 8200 pF 0.082 mF 0.82 mF 8.2 mF
4.4 Implementation of Analog Filters 279

4.4.2 Analog High-Pass Filter Circuit 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

Then if we know how to implement the terms in (4.111) by circuit elements,


then we can construct a circuit for any high pass filter.
The high pass filter circuit can be obtained from a low pass filter circuit by
replacing the resistors of the low pass filter by capacitors and replacing the
capacitors of the low pass filter by resistors.
How to implement H ðsÞ ¼ as=ðs þ bÞ:
We can use the circuit in Fig. 4.37 to implement the transfer function
as
H ðsÞ ¼ :
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

Fig. 4.37 Analog


implementation of H ðsÞ ¼ Vout
as=ðs þ bÞ by circuit elements C1
Vin R1
R2
R3
280 4 Analog and Digital Filter Design

Fig. 4.38 Analog R1


implementation of H ðsÞ ¼
Ks2 =s2 þ b1 s þ b0 by circuit
elements Vout
C1 C2
Vin R2
R4
R3

How to implement H ðsÞ ¼ Ks2 =s2 þ b1 s þ b0 :


We can use the circuit in Fig. 4.38 to implement the transfer function

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

Example 4.17 Implement the high pass filter transfer function

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

Fig. 4.39 High pass filter 16 K


circuit for Example 4.17

Vout
0.47 F 0.47 F
Vin
16 K
16 K
10 K

where we have

1
¼ 176:83
R2 C 2

And if we choose C ¼ 0:47 lF, then R is found as

1 1012
¼ 176:83 ! R2 ¼ ! R ¼ 16000 X:
R2 ð0:47  106 Þ2 0:472  176:83

Also we have K ¼ 2:6 since, K ¼ 1 þ R4 =R3 , we get

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

using circuit elements.


Solution 4.18 In (4.117); we have 0.5 factor in the numerator, for this reason we
add a voltage divider circuit to the end of the circuit which is shown in shadow in
Fig. 4.40.
282 4 Analog and Digital Filter Design

4.4.3 Analog Bandpass Active Filter Circuits

For the implementation of analog bandpass filters, the prototype circuit shown in
Fig. 4.41 can be employed.

4.4.4 Analog Bandstop Active Filter Circuits

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

Fig. 4.40 High pass filter circuit with voltage divider

Fig. 4.41 Bandpass filter R1


circuit
R1
Vout
C2
Vin C1 R3
R4
R5

Fig. 4.42 Bandstop filter R1


circuit
C1 C2

Vout

R2 R3
Vin C3 R4 R5
4.5 Infinite Impulse Response (IIR) Digital Filter Design (Low Pass) 283

4.5 Infinite Impulse Response (IIR) Digital Filter Design


(Low Pass)

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

which can also be written as


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

Fig. 4.43 The magnitude | H d ( w) |


response of a digital filter

0.9

0.2
w
0 wp 0.4 ws 0.8

Since digital filter specifications are given, we should use

2 w 
d
wa ¼ tan
Ts 2

to find the analog filter specifications. Let Ts ¼ 2000


1
s, then the analog pass and stop
frequencies are calculated as

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.

Fig. 4.44 Analog filter | H a ( w) |


magnitude response

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.

Fig. 4.45 Squared | H a ( w) |2


magnitude response of the
analog filter
1

0.81

0.04
w
0 wap 925.54 was 3918.7

Fig. 4.46 The magnitude | H d ( w) |


response of a lowpass digital
filter
1

0.9

0.2
w
0 wp 0.2 ws 0.5
286 4 Analog and Digital Filter Design

Then considering Fig. 4.46, the filter response can be expressed as

0:9  jHd ðwÞj  1 0  jwj  0:2p;


jHd ðwÞj  0:2 0:5p  jwj  p:

Example 4.21 Design the digital filter with the following specifications

0:9  jHd ðwÞj  1 0  jwj  0:4p;


jHd ðwÞj  0:2 0:8p  jwj  p:

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

Fig. 4.47 Digital lowpass | H d ( w) |


filter for Example 4.21

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

Fig. 4.48 Squared | H a ( w) |2


magnitude response of the
analog filter obtained from
digital filter specifications
1
after bilinear transformation
operation
0.81

0.04
w
0 wap 925.54 was 3918.7

The parameters 1=d and 1=k are calculated as follows


sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi rffiffiffiffiffiffiffiffiffiffiffiffiffiffi
1 d2  1 1 25  1 1
¼ ! ¼ ! ¼ 10:1144;
d  2 d 0:2346 d
1 ws 1
¼ ! ¼ 4:2340:
k wp k

And the filter order is calculated as



log d1 logð10:1144Þ
N 1 ! N  ! N  1:6 ! N ¼ 2:
log k logð4:234Þ

The cutoff frequency is calculated via

1   1 1 1
wp N  wc  ws d2  1 2N ! 925:54p  ð0:4843Þ2  wc  3918:7p  244

leading to

1308p  wc  8619p: ð4:118Þ

And considering (4.118), we can choose wc as

1308p þ 8619p
wc ¼ ! wc ¼ 4963p ! wc ¼ 15;592:
2
288 4 Analog and Digital Filter Design

In the last step, the poles are calculated using

pk ¼ wc ej2ð1 þ ð ÞÞ ;
p 2k1
N k ¼ 1; . . .; N:

For N ¼ 2, the poles are found as


3p 5p
p 1 ¼ w c ej 4 p2 ¼ wc ej 4

yielding the results



 pffiffiffi pffiffiffi
3p 3p
p1 ¼ 15;592 cos þ j sin ! p1 ¼ 7796  2 þ j 2 ;
4 4

 pffiffiffi pffiffiffi ð4:119Þ


5p 5p
p2 ¼ 15;592 cos þ j sin ! p2 ¼ 7796  2  j 2 :
4 4

The transfer function is found using

wNc
Ha ðsÞ ¼ : ð4:120Þ
ðs  p1 Þðs  p2 Þ ðs  pN Þ

Substituting the calculated poles in (4.119) into (4.120) for N ¼ 2, we get

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

leading to the result

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:

Hd ðzÞ ¼ Ha ðsÞjs¼ 2 1z1 ð4:121Þ


Ts 1 þ z1
4.5 Infinite Impulse Response (IIR) Digital Filter Design (Low Pass) 289

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

When (4.122) is simplified, we obtain

243;110;464  ð1 þ 2z1 þ z2 Þ


H d ðzÞ ¼
107  ð34:72 þ 12:02z1 þ 1:6z2 Þ

which can be rearranged as

24:3 þ 48:6z1 þ 24:3z2


Hd ðzÞ ¼ :
34:72 þ 12:02z1 þ 1:6z2

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

Y ðzÞ Y ðzÞ 24:3 þ 48:6z1 þ 24:3z2


H d ðzÞ ¼ ! ¼
X ðzÞ X ðzÞ 34:72 þ 12:02z1 þ 1:6z2

from which we get

34:72y½n þ 12:02y½n  1 þ 1:6y½n  2 ¼ 24:3x½n þ 48:6x½n  1 þ 24:3x½n  2

which leads to the expression

y½n ¼ 0:34y½n  1  0:05y½n  2 þ 0:7x½n þ 1:4x½n  1 þ 0:7x½n  2


ð4:123Þ

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.

4.5.1 Generalized Linear Phase Systems

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

H ðwÞ ¼ Ar ðwÞejðb þ awÞ ð4:124Þ

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Þ

4.6 Finite Impulse Response (FIR) Digital Filter Design

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.

4.6.1 FIR Filter Design Techniques

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.

4.6.1.1 FIR Filter Design by Windowing

Design of FIR Filter in Time Domain:


The frequency response of an ideal low pass digital filter is shown in the
Fig. 4.49 where only one period of the frequency response around origin is
depicted.
And we know that Hid ðwÞ satisfies Hid ðwÞ ¼ Hid ðw þ m2pÞ. The time domain
expression for the low pass digital filter can be calculated as

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

Fig. 4.49 The frequency H id (w)


response of an ideal low pass
digital filter
1

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

which can also be written as

h½n ¼ hid ½n  w½n

where w½n is the rectangular window defined as



1 if jnj  L
w½n ¼
0 otherwise:

This type of design approach is straightforward. However, such a designed filter


suffers from Gibbs phenomenon. In addition, since the used window is anti-causal
so is the FIR filter. However, we can obtain a causal window via truncation as
follows

1 if 0  n  L
w½n ¼ ð4:128Þ
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

where applying the Parseval’s identity, we get

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

When (4.129) is equated to zero, we obtain



hid ½n if 0  n  L
h½n ¼
0 otherwise:

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

It is desirable to have a main lobe as narrow as possible. The width of the


main-lobe controls the amount of attenuation on passband region. Side-lobes are the
regions extending from first zero crossings points on either side of the origin.
Side-lobes are responsible for the ripples occurring in passband and stopband.
For a wide range of frequencies, pass and stop band ripples are equal to each other.
For the causal rectangular window increasing the window length L, decreases the
width of the main-lobe, however the areas under side-lobes stays the same which
means that ripples occurs with the same amplitude but more frequently. To reduce
the amount of area under ripples or to reduce the height of the ripples; we need to
rub the ends of the rectangular window for a smoother transition to zero.
For this purpose, we employ some commonly used windows as outlined below:
Hanning Window:
 2pn
0:5  0:5 cos if 0  n  L
w½n ¼ L ð4:131Þ
0 otherwise

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

and a ¼ M=2; b is the design parameter given by


8
< 0:1102ðC  8:7Þ C [ 50
b ¼ 0:5842ðC  21Þ0:4 þ 0:07886ðC  21Þ 21  C  50 ð4:138Þ
:
0:0 C\21

Table 4.4 Windows and their properties


Window type Mainlobe width Peak sidelobe amplitude (dB)
Rectangular 4 p/(2L + 1) −13
Bartlett 8 p/L −27
Hanning 8 p/L −32
Hamming 8 p/L −43
Blackman 12 p/L −58
4.6 Finite Impulse Response (FIR) Digital Filter Design 295

where the parameter C is defined as

C ¼ 20 log10 q: ð4:139Þ

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

wp ¼ 0:4p ws ¼ 0:8p q ¼ 0:01:

Solution 4.22 First we need to calculate the order of the Kaiser window given as

C8

2:285Dw

where the parameters are calculated as

Dw ¼ ws  wp ! Dw ¼ 0:8p  0:4p ! Dw ¼ 0:4p


C ¼ 20 log10 q ! C ¼ 20 log10 0:01 ! C ¼ 40

And the length of the window is found as

C8 40  8
L¼ !L¼ ! L ¼ 12
2:285Dw 2:285  0:4p
Next, we calculate the design parameter b as follows

b ¼ 0:5842ðC  21Þ0:4 þ 0:07886ðC  21Þ !


b ¼ 0:5842ð40  21Þ0:4 þ 0:07886ð40  21Þ ! b ¼ 3:3953

The function I0 ðbÞ can be approximated as

b2 b4 b6 b8
I0 ðbÞ  1 þ þ þ þ
2 64 2304 147;456

or we need to write a computer program for the computation of the integral


expression in (4.137). Using the definition of w½n
296 4 Analog and Digital Filter Design

8 h 1 i
< I0 b 1½na2 2
a
w½n ¼ 0nL
: I0 ðbÞ
0 otherwise

the window elements for L ¼ 12; b ¼ 3:3953; a ¼ L=2 can be calculated as

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

And the FIR filter coefficients are evaluated using

h½n ¼ hid ½nw½n

where ideal filter coefficients are

1
hid ½n ¼ sinðwc nÞ
pn

for which wc can be calculated as

wp þ ws
wc ¼ ! wc ¼ 0:6p:
2

Hence, ideal filter coefficients can be calculated as

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:

Finally the FIR filter coefficients are found using

h½n ¼ hid ½nw½n

as

h½n ¼ ½0:09 0:093  0:045  0:041 0:059 0  0:05 0:029 0:017


0:02 0 0:009  0:0024

4.6.1.2 FIR Filter Design by Frequency Sampling

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

we obtain the DFT coefficients H ½k . Using (4.141) in inverse DFT formula

1XL1
2p
h½n ¼ H ½kejk L ; n ¼ 0; 1; ; L  1 ð4:142Þ
L k¼0

we obtain the impulse response of digital FIR filter.

4.7 Problems

(1) Convert the differential equation

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

Considering this LTI system:


(a) Find the transfer function HðsÞ of the LTI system. Decide on whether the
system has the stability property or not.
(b) Convert the transfer function to its discrete equivalent, for this purpose take
the sampling period as Ts ¼ 1.
(3) The specifications of a low-pass analog filter are given as

wp ¼ 1000 rad/san ws ¼ 8000 rad/san Rp ¼ 10 dB Rs ¼ 40 dB:

(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

(4) The specifications of a low-pass IIR digital filter are given as

wp ¼ 0:1p rad/s ws ¼ 0:7p rad/s Rp ¼ 10 dB Rs ¼ 40 dB:

(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

wp ¼ 0:4p ws ¼ 0:8p q ¼ 0:01:

In your design use the windowing approach, and use Kaiser window for your
design.
Bibliography

1. Discrete-Time Signal Processing by A. V. Oppenheim and R. W. Schafer.


2. Digital Signal Processing: Principles, Algorithms, and Applications by J. G. Proakis and D.
G. Manolakis.
3. Digital Signal Processing in Communication Systems by Marvin E. Frerking.
4. Multirate Digital Signal Processing by R. E. Crochiere and L. R. Rabiner.
5. Digital Signal Processing by William D. Stanley.

© Springer Nature Singapore Pte Ltd. 2018 299


O. Gazi, Understanding Digital Signal Processing, Springer Topics
in Signal Processing 13, DOI 10.1007/978-981-10-4962-0
Index

A Common capacitor values, 278


Absolute value, 187 Common resistor values, 278
Aliasing (spectral overlapping), 30 Conjugate, 187
Aliasing case in downsampled signal, 88 Continuous time processing of digital signals,
Aliasing in downsampling, 80 61
Aliasing in time domain, 182 Continuous time signal, 2, 10
Alternative method to compute the periodic Continuous to digital conversion (C/D
convolution, 166 conversion), 126, 129
Amount of distortion, 86 Convolution, 8
Analog bandpass active filter circuits, 282 Convolution in frequency domain, 186
Analog bandstop active filter circuits, 282 Convolution in time domain, 186
Analog filter design, 233 Convolution of aperiodic digital signals, 164,
Analog frequency transformations, 272 165
Analog high-pass filter circuit design, 279 Convolution using overlap-add method, 199
Analogue filter design, 234, 253 Cut-off frequency, 259
Anti-aliasing filter, 126
A periodic digital signal, 150 D
Approximated filter, 53, 103 Decimation, 89
Approximation of the ideal interpolation filter, Decimation in frequency, 219
111 Decimation in frequency FFT algorithm, 217
Approximation of the reconstruction filter, 51, Decimation in time, 227
52 Decimation in time FFT algorithm, 207
Decimator system, 89
B Design of FIR filter in frequency domain, 292
Backward difference approximation, 242 Design of FIR filter in time domain, 291
Bartlett (triangular) window, 294 DFT coefficients, 218
Bessel filter design, 260 Difference equations for LTI systems, 235
Bilinear transformation, 248 Digital signals, 1
Blackman window, 293 Digital to continuous conversion, 59
Butterworth filter design, 260, 265 Digital to continuous converter (D/C
converter), 59, 136
C Discrete approximation of the derivative
Causality, 235 operation, 242
Chebyshev I and II filter design, 260 Discrete Fourier Transform, 172
Chebyshev type-I filter, 265 Discrimination parameter, 260
Chebyshev type-II filter, 268 Downsampled signal, 73, 85
Circular convolution, 188 Downsampled signal in case of aliasing, 92
Circular shifting, 189 Downsampler, 74, 103
Combined shifting and scaling, 148, 152 Downsampling, 72

© Springer Nature Singapore Pte Ltd. 2018 301


O. Gazi, Understanding Digital Signal Processing, Springer Topics
in Signal Processing 13, DOI 10.1007/978-981-10-4962-0
302 Index

Downsampling operation, 72, 87 Impulse response of zero order hold, 137


Drawing the fourier transform of digital signal, Impulse train, 5, 7
25 Impulse train signal, 13
Duality, 186, 189 Increasing the sampling rate by an integer
factor, 97
E Infinite Impulse Response (IIR) digital filter
Elliptic filter design, 260 design, 283
Elliptic filters, 270, 271 Interpolation, 103
Even numbered samples, 214 Interpolation filter, 112
Expansion, 97 Interpretation of the downsampling, 83
Exponential digital signal, 157 Inverse Fourier Transform, 47

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

One period of the fourier transform of a digital S


signal, 91 Sample and hold, 129, 130
One period of the fourier transform of Sampling, 00
upsampled signal, 101 frequency, 4, 17, 20, 33, 37
Overlap add, 198 of fourier transform, 170
Overlapped amplitudes, 15 of the sine signal, 3
Overlapping, 41 operation, 2, 5, 6, 49
Overlapping line equations, 21 period, 2, 10
Overlap save, 198 Scaling of digital signals in time domain, 147
Overlap-save method, 204 Selectivity parameter, 259
Shifted graphs, 17
P Shifted replicas, 16, 27, 42
Pass-band ripple, 259 Shifting in frequency, 186
Perfect reconstruction filter, 55 Shifting in time, 186
Periodic digital signals, 162 Shifting of digital signals in time domain, 146
Phase value, 187 Shifting of periodic digital signals, 149, 150
Practical analog filter design, 258 Shifting of the shadowed triangles, 41
Practical C/D converter, 129 Sinc() function, 110
Practical filter design methods, 260 Some well known digital signals, 156
Practical implementations of C/D and D/C Spectral overlapping problem, 13
converters, 128 Stability of a continuous LTI systems, 239
Product signal, 7 Stability of a discrete LTI system, 238
Properties of the discrete fourier transform, 185 Stopband attenuation, 259
Symmetry, 189
Q
Quality of the reconstructed signal, 103 T
Quantization and coding, 134 The amount of distortion, 41
Quantizer-coder, 129 The delay system, 124
The meaning of the aliasing, 33
R The properties of the region of convergence,
Real DFT coefficients, 187 239
Real part DFS, 187 The relationship between circular and linear
Reconstructed from the digital samples, 37 convolution, 198
Reconstructed signal, 50 The repeating pattern, 150
Reconstruction filter, 48, 53, 54 Time invariance, 234
Reconstruction filter impulse response, 50 Total computation amount, 225
Reconstruction of an analog signal from its Transmission overhead, 4
samples, 45 Trapezoidal integration, 250
Reconstruction operation, 45, 54 Triangle shape, 23
Rectangle pulse signal, 132
Rectangular signal, 1 U
Region of convergence, 237 Unit impulse, 156
Repeating pattern, 21 Upper cut-off frequency, 272
Review of laplace transform, 234 Upsampler, 103
Review of signal types, 158 Upsampling, 71, 97
Review of Z-transform, 234 Upsampling operation, 117
Rotate inside, 149
Rotate left, 149 Z
Rotate right, 149 Z-Transform, 236

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy