0% found this document useful (0 votes)
720 views

Fourier Analysis A Signal Processing Approach PDF

Uploaded by

Paddy Shandilya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
720 views

Fourier Analysis A Signal Processing Approach PDF

Uploaded by

Paddy Shandilya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 365

D.

Sundararajan

Fourier Analysis—
A Signal Processing
Approach
Fourier Analysis—A Signal Processing Approach
D. Sundararajan

Fourier Analysis—A Signal


Processing Approach

123
D. Sundararajan
Formerly at Department of Electrical
and Computer Engineering
Concordia University
Montreal, QC, Canada

Additional material to this book can be downloaded from http://extras.springer.com.

ISBN 978-981-13-1692-0 ISBN 978-981-13-1693-7 (eBook)


https://doi.org/10.1007/978-981-13-1693-7

Library of Congress Control Number: 2018949334

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

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

Transform methods dominate the study of linear time-invariant systems in all the
areas of science and engineering, such as circuit theory, signal/image processing,
communications, controls, vibration analysis, remote sensing, biomedical systems,
optics, acoustics. The heart of the transform methods is Fourier analysis. Several
other often used transforms are generalizations or specific versions of Fourier
analysis. It is unique in that it is much used in theoretical studies as well as in
practice. The reason for the latter case is the availability of fast algorithms to
approximate the Fourier spectrum adequately. For example, the existence and
continuing growth of digital signal and image processing are due to the ability to
implement the Fourier analysis quickly by digital systems. This book is written for
engineering, computer science, and physics students, and engineers and scientists.
Therefore, Fourier analysis is presented primarily using physical explanations with
waveforms and/or examples, keeping the mathematical form to the extent it is
necessary for its practical use. In engineering applications of Fourier analysis, its
interpretation and use are relatively more important than rigorous proofs. Plenty of
examples, figures, tables, programs, and physical explanations make it easy for the
reader to get a good grounding in the basics of Fourier signal representation and its
applications.
This book is intended to be a textbook for senior undergraduate- and
graduate-level Fourier analysis courses in engineering and science departments and
a supplementary textbook for a variety of application courses in science and
engineering, such as circuit theory, communications, signal processing, controls,
remote sensing, image processing, medical analysis, acoustics, optics, and vibration
analysis. For engineering professionals, this book will be useful for self-study. In
addition, this book will be a reference for anyone, student or professional, spe-
cializing in the practical applications of Fourier analysis. The prerequisite for
reading this book is a good knowledge of calculus, linear algebra, signals and
systems, and programming at the undergraduate level.
Programming is an important component in learning and practicing Fourier
analysis. A set of MATLAB® programs are available at the Web site of the book.
While the use of a software package is inevitable in most applications, it is better to

v
vi Preface

use the software in addition to self-developed programs. The effective use of a


software package or to develop own programs requires a good grounding in the
basic principles of the Fourier analysis. Answers to the selected exercises marked 
are given at the end of the book. A Solutions Manual and slides are available for
instructors at the Web site of the book.
I assume the responsibility for all the errors in this book and would very
much appreciate receiving readers’ suggestions and pointing out any errors
(email: [email protected]). I am grateful to my Editor and the rest of the
team at Springer for their help and encouragement in completing this project.
I thank my family for their support during this endeavor.

D. Sundararajan
Contents

1 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Basic Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.1 Unit-Impulse Signal . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.2 Unit-Step Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.3 Unit-Ramp Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.4 Sinusoids and Complex Exponentials . . . . . . . . . . . . . 5
1.2 Classification of Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.2.1 Continuous, Discrete, and Digital Signals . . . . . . . . . . 13
1.2.2 Periodic and Aperiodic Signals . . . . . . . . . . . . . . . . . . 13
1.2.3 Even- and Odd-Symmetric Signals . . . . . . . . . . . . . . . 14
1.2.4 Energy and Power Signals . . . . . . . . . . . . . . . . . . . . . 17
1.2.5 Deterministic and Random Signals . . . . . . . . . . . . . . . 18
1.2.6 Causal and Noncausal Signals . . . . . . . . . . . . . . . . . . . 19
1.3 Signal Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.3.1 Time Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.3.2 Time Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.4 Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2 The Discrete Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.1 The Exponential Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.2 The Complex Exponential Function . . . . . . . . . . . . . . . . . . . . . 33
2.2.1 Euler’s Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.2.2 Real Sinusoids in Terms of Complex Exponentials . . . . 34
2.3 The DFT and the IDFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.3.1 The DFT and the IDFT . . . . . . . . . . . . . . . . . . . . . . . 39
2.3.2 The Criterion of Approximation . . . . . . . . . . . . . . . . . 40
2.3.3 The Matrix Form of the DFT and IDFT . . . . . . . . . . . 42

vii
viii Contents

2.4 Applications of the DFT and the IDFT . . . . . . . . . . . . . . . . . . 50


2.4.1 Fourier Boundary Descriptor . . . . . . . . . . . . . . . . . . . . 50
2.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3 Properties of the DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
3.1 Linearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
3.2 Periodicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.3 Circular Time Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.4 Circular Frequency Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.5 Circular Time-Reversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.6 Duality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.7 Transform of Complex Conjugates . . . . . . . . . . . . . . . . . . . . . . 61
3.8 Circular Convolution and Correlation . . . . . . . . . . . . . . . . . . . . 62
3.8.1 Circular Convolution of Time-Domain Sequences . . . . 62
3.8.2 Circular Convolution of Frequency-Domain
Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.8.3 Circular Correlation of Time-Domain Sequences . . . . . 66
3.9 Sum and Difference of Sequences . . . . . . . . . . . . . . . . . . . . . . 66
3.10 Upsampling of a Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.11 Zero Padding the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.12 Symmetry Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.13 Parseval’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.14 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4 Two-Dimensional DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.1 Two-Dimensional DFT as Two Sets of 1-D DFTs . . . . . . . . . . 82
4.1.1 Computation of the 2-D DFT . . . . . . . . . . . . . . . . . . . 84
4.2 The 2-D DFT and IDFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
4.3 The 2-D DFT of Real-Valued Signals . . . . . . . . . . . . . . . . . . . 98
4.4 Properties of the 2-D DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
4.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
5 Convolution and Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
5.1 Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
5.1.1 Linear Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
5.1.2 Circular Convolution . . . . . . . . . . . . . . . . . . . . . . . . . 118
5.1.3 2-D Linear Convolution . . . . . . . . . . . . . . . . . . . . . . . 121
5.2 Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
5.2.1 The Linear Correlation . . . . . . . . . . . . . . . . . . . . . . . . 128
5.3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
5.3.1 Lowpass Filtering of Images . . . . . . . . . . . . . . . . . . . . 130
5.3.2 Highpass Filtering of Images . . . . . . . . . . . . . . . . . . . . 134
5.3.3 Object Detection in Images . . . . . . . . . . . . . . . . . . . . . 140
Contents ix

5.3.4 Orthogonal Frequency Division Modulation . . . . . . . . . 144


5.3.5 Hilbert Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
5.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
6 Aliasing and Leakage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
6.1 Aliasing Effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
6.2 Leakage Effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
6.2.1 Modeling Data Truncation . . . . . . . . . . . . . . . . . . . . . 163
6.2.2 Tapered Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
6.2.3 Hann and Hamming Windows . . . . . . . . . . . . . . . . . . 168
6.2.4 Reducing the Spectral Leakage . . . . . . . . . . . . . . . . . . 171
6.3 Picket-Fence Effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
6.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
7 Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
7.1 Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
7.1.1 FS as a Limiting Case of the DFT . . . . . . . . . . . . . . . . 181
7.1.2 Gibbs Phenomenon . . . . . . . . . . . . . . . . . . . . . . . . . . 193
7.2 Properties of the Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . 194
7.2.1 Linearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
7.2.2 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
7.2.3 Time Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
7.2.4 Frequency Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
7.2.5 Convolution in the Time Domain . . . . . . . . . . . . . . . . 198
7.2.6 Convolution in the Frequency Domain . . . . . . . . . . . . 199
7.2.7 Time Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
7.2.8 Time Differentiation and Integration . . . . . . . . . . . . . . 201
7.2.9 Parseval’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . 203
7.3 Applications of the Fourier Series . . . . . . . . . . . . . . . . . . . . . . 204
7.3.1 Analysis of Rectified Power Supply . . . . . . . . . . . . . . 205
7.3.2 Steady-State Response of Linear Systems . . . . . . . . . . 207
7.4 Numerical Evaluation of the Fourier Series . . . . . . . . . . . . . . . 210
7.4.1 Aliasing Effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
7.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
8 The Discrete-Time Fourier Transform . . . . . . . . . . . . . . . . . . . . . . 217
8.1 The DTFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
8.1.1 DTFT as a Limiting Case of the DFT . . . . . . . . . . . . . 219
8.1.2 The DTFT of a Discrete Periodic Signal . . . . . . . . . . . 228
8.1.3 Determination of the DFT from the DTFT . . . . . . . . . . 228
8.2 Properties of the Discrete-Time Fourier Transform . . . . . . . . . . 229
8.2.1 Linearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
8.2.2 Time Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
8.2.3 Frequency Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
x Contents

8.2.4 Convolution in the Time Domain . . . . . . . . . . . . . . . . 230


8.2.5 Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
8.2.6 Convolution in the Frequency Domain . . . . . . . . . . . . 232
8.2.7 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
8.2.8 Time-Reversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
8.2.9 Time-Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
8.2.10 Frequency-Differentiation . . . . . . . . . . . . . . . . . . . . . . 236
8.2.11 Summation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
8.2.12 Parseval’s Theorem and the Energy Transfer
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
8.3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
8.3.1 Transfer Function and the System Response . . . . . . . . 239
8.3.2 Design of Linear-Phase FIR Digital Filters Using
Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
8.3.3 Digital Differentiator . . . . . . . . . . . . . . . . . . . . . . . . . . 242
8.3.4 Hilbert Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
8.3.5 Downsampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
8.4 Approximation of the Discrete-Time Fourier Transform . . . . . . 245
8.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
9 The Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
9.1 The FT as a Limiting Case of the FS . . . . . . . . . . . . . . . . . . . . 249
9.1.1 The FT Using Orthogonality . . . . . . . . . . . . . . . . . . . . 252
9.1.2 Existence of the FT . . . . . . . . . . . . . . . . . . . . . . . . . . 253
9.1.3 Determination of the FS from the FT . . . . . . . . . . . . . 255
9.2 Properties of the Fourier Transform . . . . . . . . . . . . . . . . . . . . . 258
9.2.1 Linearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
9.2.2 Duality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
9.2.3 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
9.2.4 Time Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
9.2.5 Frequency Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
9.2.6 Convolution in the Time Domain . . . . . . . . . . . . . . . . 262
9.2.7 Convolution in the Frequency Domain . . . . . . . . . . . . 263
9.2.8 Conjugation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
9.2.9 Cross-Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
9.2.10 Time-Reversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
9.2.11 Time Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
9.2.12 Time Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . 267
9.2.13 Time Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
9.2.14 Frequency-Differentiation . . . . . . . . . . . . . . . . . . . . . . 269
9.2.15 Parseval’s Theorem and the Energy Transfer
Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Contents xi

9.3 Fourier Transform of Mixed Class of Signals . . . . . . . . . . . . . . 271


9.3.1 The FT of a Continuous Periodic Signal . . . . . . . . . . . 272
9.3.2 The FT of a Sampled Signal and the Aliasing
Effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
9.3.3 The FT and the DTFT of Sampled Aperiodic
Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
9.3.4 The FT and the DFT of Sampled Periodic Signals . . . . 277
9.3.5 Reconstruction of the Continuous Signal from
Its Sampled Version . . . . . . . . . . . . . . . . . . . . . . . . . . 280
9.4 Applications of the Fourier Transform . . . . . . . . . . . . . . . . . . . 280
9.4.1 Transfer Function and the System Response . . . . . . . . 280
9.4.2 Ideal Filters and Their Unrealizability . . . . . . . . . . . . . 283
9.5 Approximation of the Fourier Transform . . . . . . . . . . . . . . . . . 285
9.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
10 Fast Computation of the DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
10.1 Half-Wave Symmetry of Periodic Waveforms . . . . . . . . . . . . . 294
10.2 The PM DIF DFT Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 296
10.3 The PM DIT DFT Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 305
10.3.1 Basics of the PM DIT DFT Algorithm . . . . . . . . . . . . 306
10.4 Efficient Computation of the DFT of Real Data . . . . . . . . . . . . 308
10.4.1 Two DFTs of Real Data Simultaneously . . . . . . . . . . . 308
10.4.2 DFT of a Single Real Data Set . . . . . . . . . . . . . . . . . . 312
10.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Appendix A: Transform Pairs and Properties . . . . . . . . . . . . . . . . . . . . . 321
Appendix B: Useful Mathematical Formulas . . . . . . . . . . . . . . . . . . . . . . 329
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Answers to Selected Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
About the Author

Dr. D. Sundararajan holds a B.E. in electrical engineering from Madras


University and an M.Tech. in electrical engineering from the Indian Institute of
Technology Madras (IIT Madras). He obtained his Ph.D. in electrical engineering
from Concordia University, Montreal, Canada, in 1988. As the principal inventor
of the latest family of discrete Fourier transform (DFT) algorithms, he holds three
patents (granted by the USA, Canada, and Britain). Further, he has published
several papers in IEEE Transactions and in the Proceedings of the IEEE, and he is
the author of five books. He has taught undergraduate and graduate students in
digital signal processing, digital image processing, engineering mathematics, pro-
gramming, operating systems, and digital logic design at Concordia University,
Canada; Nanyang Technological University, Singapore; and Adhiyamaan College
of Engineering, India. He has also conducted workshops on digital image pro-
cessing, MATLAB, and LaTeX.
Over the course of his engineering career, he has held positions at the National
Aerospace Laboratory, Bangalore, and the National Physical Laboratory, New
Delhi, where he worked on the design of digital and analog signal processing
systems.

xiii
Abbreviations

1-D One-dimensional
2-D Two-dimensional
DC Sinusoid with frequency zero, constant
DFT Discrete Fourier transform
DIF Decimation in frequency
DIT Decimation in time
DTFT Discrete-time Fourier transform
FIR Finite impulse response
FS Fourier series
FT Fourier transform
IDFT Inverse discrete Fourier transform
IFT Inverse Fourier transform
LSB Least significant bit
LTI Linear time-invariant
PM Plus–minus
RDFT DFT of real-valued data
RIDFT IDFT of the transform of real-valued data

xv
Chapter 1
Signals

Signals convey some information. Signals are abundant in the applications of science
and engineering. Typical signals are audio, video, biomedical, seismic, radar, vibra-
tion, communication, and sonar. While the signals are mostly of continuous nature,
they are usually converted to digital form and processed by digital systems for effi-
ciency. In signal processing, signals are enhanced to improve their quality with some
respect, or some features are extracted, or they are modified in some desired way. A
signal, in its mathematical representation, is a function of one or more independent
variables. While time is the independent variable most often, it could be anything
else, such as distance. The analysis is equally applicable to all types of indepen-
dent variables. Signal or waveform is used to refer the physical form of a signal. In
its mathematical representation, a signal is referred as a function or sequence. This
usage is not strictly adhered.
The amplitude profile of most naturally occurring signals is arbitrary, and conse-
quently, it is difficult to analyze, interpret, transmit, and store them in their original
form. The idea of a transform is to represent a signal in an alternate, but equivalent,
form to gain advantages in its processing. Fourier analysis, the topic of this book,
provides a widely used representation of signals. As signal representation is the topic
of the book and the most suitable representation of a signal depends on its character-
istics, we have to first study the classification of signals. Further, the representation
is in terms of some well-defined basis signals, such as the sinusoid, complex expo-
nential, and impulse. Although practical signals are mostly real-valued, it becomes
mandatory to use the equivalent complex-valued signals for ease of mathematical
manipulation. In addition, operations such as shifting and scaling of signals are often
required in signal analysis. All these aspects are presented in this chapter.

© Springer Nature Singapore Pte Ltd. 2018 1


D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7_1
2 1 Signals

1.1 Basic Signals

The amplitude profile of most naturally occurring signals is arbitrary. These signals
are analyzed using some well-defined basic signals, such as the impulse, step, ramp,
sinusoidal, and exponential signals. In addition, systems, which are hardware or soft-
ware realizations, modify signals or extract information from them. They are also
characterized by the responses to these signals. The basic signals either have an infi-
nite duration or infinite bandwidth. For practical purposes, they are approximated to
a desired accuracy. Fourier analysis has four versions and each version uses different
type of signals. Therefore, it is necessary to study both the continuous and discrete
type of signals.

1.1.1 Unit-Impulse Signal

The unit-impulse and the sinusoidal signals are the most important signals in the
study of signals and systems. The continuous unit-impulse δ(t) is a signal with a
shape and amplitude such that its integral at the point t = 0 is unity. It is defined, in
terms of an integral, as  ∞
x(t)δ(t) dt = x(0)
−∞

It is assumed that x(t) is continuous at t = 0 so that the value x(0) is distinct. The
product of x(t) and δ(t) is
x(t)δ(t) = x(0)δ(t)

since the impulse exists only at t = 0. Therefore,


 ∞  ∞
x(t)δ(t) dt = x(0) δ(t) dt = x(0)
−∞ −∞

The value of the function x(t), at t = 0, is sifted out or sampled by the defining
operation. By using shifted impulses, any value of x(t) can be sifted.
It is obvious that the integral of the unit-impulse is the unit-step. Therefore, the
derivative of the unit-step signal is the unit-impulse signal. The value of the unit-step
is zero for t < 0 and 1 for t > 0. Therefore, the unit area of the unit-impulse, as
the derivative of the unit-step, must occur at t = 0. The unit-impulse and the unit-
step signals enable us to represent and analyze signals with discontinuities as we do
with continuous signals. For example, these signals model the commonly occurring
situations such as opening and closing of switches.
The continuous unit-impulse δ(t) is difficult to visualize and impossible to realize
in practice. However, the approximation of it by some functions is effective in practice
and can be used to visualize its effect on signals and its properties. While there are
1.1 Basic Signals 3

other functions that approach an impulse in the limit, the rectangular function is
often used to approximate the impulse. The unit-impulse, for all practical purposes,
is essentially a narrow rectangular pulse with unit area. Suppose we compress it by
a factor of 2, the area, called its strength, becomes 1/2 = 0.5. The scaling property
of the impulse is given as
1
δ(at) = δ(t), a = 0
|a|

With a = −1, δ(−t) = δ(t) implying that the impulse is an even-symmetric signal.
For example,     
1 1 1
δ(3t − 1) = δ 3 t − = δ t−
3 3 3

The discrete unit-impulse signal, shown in Fig. 1.1a, is defined as



1 for n = 0
δ(n) =
0 for n = 0

The independent variable is n and the dependent variable is δ(n). The only nonzero
value (unity) of the impulse occurs when its argument n =0. The shifted impulse
δ(n − k) has its only nonzero value at n = k. Therefore, ∞ n=−∞ x(n)δ(n − k) =
x(k) is called the sampling or sifting property of the impulse. For example,


 
2 
0
3n δ(n) = 1, 9n δ(n + 1) = 0, 4n δ(−n − 1) = 0.25,
n=−∞ n=0 n=−2


2 ∞
 ∞

2n δ(n − 1) = 2, 2n δ(n + 1) = 0.5, 3n δ(n − 3) = 27
n=0 n=−∞ n=−∞

The argument n + 1 of the impulse, in the second summation, never becomes zero
within the limits of the summation.

(a) (b) (c)


1 1 5
4
3
(n)

u(n)

r(n)

2
1
0 0 0
-3 -2 -1 0 1 2 3 -2 -1 0 1 2 3 4 5 -2 -1 0 1 2 3 4 5
n n n

Fig. 1.1 a The discrete unit-impulse signal, δ(n); b the discrete unit-step signal, u(n); c the discrete
unit-ramp signal, r (n)
4 1 Signals

1.1.2 Unit-Step Signal

The discrete unit-step signal, shown in Fig. 1.1b, is defined as



1 for n ≥ 0
u(n) =
0 for n < 0

For positive values of its argument, the value of the unit-step signal is unity and it
is zero otherwise. An arbitrary function can be expressed in terms of appropriately
scaled and shifted unit-step or impulse signals. By this way, any signal can be spec-
ified, for easier mathematical analysis, by a single expression, valid for all n. For
example, a pulse signal, shown in Fig. 1.2a, with its only nonzero values defined as
{x(1) = 1, x(2) = 1, x(3) = 1} can be expressed as the sum of the two delayed unit-
step signals shown in Fig. 1.2b, x(n) = u(n − 1) − u(n − 4). The pulse can also be
represented as a sum of delayed impulses.


3
x(n) = u(n − 1) − u(n − 4) = δ(n − k) = δ(n − 1) + δ(n − 2) + δ(n − 3)
k=1

The continuous unit-step signal is defined as



⎨1 for t > 0
u(t) = 0 for t < 0

undefined for t = 0

The value u(0) is undefined and can be assigned a suitable value from 0 to 1 to suit
a specific problem. In Fourier analysis, u(0) = 0.5. A common application of the
unit-step signal is that multiplying a signal with it yields the causal form of the signal.
For example, the continuous signal sin(t) is defined for −∞ < t < ∞. The values
of sin(t)u(t) is zero for t < 0 and sin(t) for t > 0.

(a) (b) 1
1 u(n-1)
x(n)=u(n-1)-u(n-4)
u(n-1), -u(n-4)
x(n)

-u(n-4)
0 -1
-2 -1 0 1 2 3 4 5 -2 -1 0 1 2 3 4 5
n n

Fig. 1.2 a The pulse signal, x(n) = u(n − 1) − u(n − 4); b the delayed unit-step signals, u(n − 1)
and −u(n − 4)
1.1 Basic Signals 5

1.1.3 Unit-Ramp Signal

The discrete unit-ramp signal, shown in Fig. 1.1c, is also often used in the analysis
of signals and systems. It is defined as

n for n ≥ 0
r (n) =
0 for n < 0

It linearly increases for positive values of its argument and is zero otherwise.
The three signals, the unit-impulse, the unit-step, and the unit-ramp, are related
by the operations of sum and difference. The unit-impulse signal δ(n) is equal to
u(n) − u(n − 1), the first difference of the unit-step. The unit-step signal u(n) is
equal to ∞ k=0 δ(n − k), the running sum of the unit-impulse. The shifted unit-step
signal u(n − 1) is equal to r (n) − r (n − 1). The unit-ramp signal r (n) is equal to


r (n) = nu(n) = kδ(n − k).
k=0

Similar relations hold for continuous type of signals.

1.1.4 Sinusoids and Complex Exponentials

Sinusoids
The impulse and the sinusoid are the two most important signals in signal and system
analysis. The impulse is the basis for convolution and the sinusoid is the basis for
transfer function. The cosine and sine functions are two of the most important func-
tions in trigonometry. As these functions are the basis functions in Fourier analysis,
we have study them in detail.
The unit circle, defined by x 2 + y 2 = 1 and shown in Fig. 1.3, is a circle with its
center located at the origin and radius 1. For each point on the circle defined by the
coordinates (x, y), starting at (1, 0) and moving in the counterclockwise direction,
with θ ≥ 0 (the angle subtended by the x-axis and the line joining the point and the
origin), the sine (sin) and cosine (cos) functions are defined in terms of its coordinates
(x, y) as
cos(θ) = x and sin(θ) = y

If the point lies on a circle of radius r , then



cos(θ) = x/r and sin(θ) = y/r, r = x 2 + y2

Clearly, the sinusoids are of periodic nature. Any function defined on a circle will be a
periodic function of an angular variable θ. Therefore, the trigonometric functions are
also called circular functions. The argument θ is measured in radians or degrees. The
6 1 Signals

Fig. 1.3 Sine and cosine y


functions defined on the unit (x,y)
circle (0,1)

cos( ) = x
sin( ) = y

) >0
(-1,0) (0,0) (1,0) x

(0,-1)

radian is defined as the angle subtended between the x-axis and the line between the
point and the origin on the unit circle. One radian is defined as the angle subtended
by unit arc length. Since the circumference of the unit circle is 2π, one complete
revolution is 2π rad. In degree measure, 2π = 360◦ and π = 180◦ . One radian is
approximately 180/π = 57.3◦ .
A linear combination of sine and cosine functions is a sinusoid, in rectangular
form, given by
a cos(θ) + b sin(θ)

where a and b are real numbers with a = 0 or b = 0. With c = a 2 + b2 , and
cos(d) = a/c and sin(d) = b/c,

a cos(θ) + b sin(θ) = c cos(θ − d)

is called the polar form of the sinusoid. For example,


√ √
15 5 √ π
cos(θ) + sin(θ) = 5 cos θ −
2 2 6
Using the subtraction formula for cosine, we get back the left side from the right
side.
Three of the properties of the sinusoids make them the most useful basis functions
to represent a signal.
1. The derivative of sin(u) is defined as

d du
sin(u) = cos(u) ,
dx dx
1.1 Basic Signals 7

where u is a differential function of x. The sinusoids can be repeatedly differen-


tiated or integrated with no changes in their frequencies.
2. The sum of a number of sinusoids of a certain frequency is also a sinusoid of the
same frequency.
3. The integral of a sinusoid over an integral number of cycles is zero, as the negative
area is equal to the positive area.
Therefore, the steady-state signals in any part of a LTI system, described by a linear
differential equation with constant coefficients, are also of the same frequency as
that of the input sinusoid. The response of a system for an arbitrary signal, which can
be decomposed into a linear combination of sinusoids by Fourier analysis, can be
determined from the sinusoidal response of the system. While the same procedure is
applicable with the impulse signal as the basis function, the use of sinusoidal basis
functions is more advantageous. One advantage is that it reduces the computational
complexity in finding the response, as fast algorithms are available to adequately
approximate the response. Certain characteristics of the signals are more readily
apparent in the Fourier representation. Another advantage is that the interpretation
of operations, such as filtering, is often easier. For these reasons, sinusoidal repre-
sentation plays a dominant role in LTI system analysis.
The general form of a sinusoid is given by

x(t) = A cos(ωt + θ), −∞ < t < ∞

where A (half the range of the function) is the amplitude of the sinusoid, ω is its
frequency in radians, and θ is the phase. The phase is measured with respect to the
reference waveform A cos(ωt). For example, the peak value of this waveform occurs
at t = 0 and its phase is defined to be zero. The first peak of the sine waveform
π
A sin(ωt) = A cos ωt −
2
occurs at ωt = π/2 rad and its phase is −π/2 rad or −90◦ . The period of the waveform
is the interval between ωt = 0 to ωt = 2π. Therefore, the period is T = (2π)/ω s.
The radian frequency is ω radians/second and the cyclic frequency is f = ω/(2π) =
1/T Hz.
Sum of Sinusoids with the Same Frequency
An important property of the sinusoids is that the sum of sinusoids of the same
frequency, but with arbitrary amplitudes and phases, is also a sinusoid of the same
frequency. In order to find the sum, we have to express the sinusoids in their rect-
angular form and sum the respective amplitudes of the sine and cosine components.
Consider the two sinusoids

x(t) = A cos(ωt + θ) and y(t) = B cos(ωt + φ)


8 1 Signals

Then,

z(t) = x(t) + y(t) = C cos(ωt + ψ) = A cos(ωt + θ) + B cos(ωt + φ)


= cos(ωt)(A cos(θ) + B cos(φ)) − sin(ωt)(A sin(θ) + B sin(φ))
= cos(ωt)(C cos(ψ)) − sin(ωt)(C sin(ψ))

Solving for C and ψ, we get



C= A2 + B 2 + 2 AB cos(θ − φ)
A sin(θ) + B sin(φ)
ψ = tan−1
A cos(θ) + B cos(φ)

With θ = 0 and φ = −π/2 (one sinusoid being the cosine and the other being sine),
the formula reduces to relation between the polar and the rectangular form of a
sinusoid.

Example 1.1 Determine the sinusoid that is the sum of two sinusoids
π π
x(t) = 3 cos ωt + and y(t) = 2 sin ωt −
3 6
Solution
The second sinusoid can also be expressed as
 
π π 2π
y(t) = 2 cos ωt − − = 2 cos ωt −
6 2 3

Now,
π 2π
A = 3, B = 2, θ = ,φ = −
3 3
Substituting the numerical values in the equations, we get
  
π 2π
C= 32 + 22 + 2(3)(2) cos + =1
3 3
π   π  2π 
−1 3 cos + 2 cos − 2π −1 3 sin 3 + 2 sin − 3
ψ = cos 3 3
= sin = 1.0472 rad = 60◦
1 1

z(t) = x(t) + y(t) = cos(ωt + 1.0472)

The polar form of a discrete sinusoid is

x(n) = A cos(ωn + θ), n = −∞, . . . , −1, 0, 1, . . . , ∞,


1.1 Basic Signals 9

(a) 1 (b) 1
x(t)

x(t)
0 0

-1 -1
0 4 8 12 0 3 6 9
t t
(c) (d)
1 1
0.9239 0.8660
0.7071
0.5
0.3827
x(n)

x(n)

0 0
-0.1951 -0.2588

-0.5556
-0.7071
-0.8315
-0.9808 -0.9659
0 4 8 12 16 20 24 28 -12 -9 -6 -3 0 3 6 9
n n
π π
16 t); b sin( 12 t); c cos( 32 n − 4 ); d cos( 24 n + 6 )
Fig. 1.4 a cos( 2π 2π 2π 2π

For discrete sinusoids, the range of frequencies for unique representation is limited
due to sampling. Further, the cyclic frequency has to be a rational number (a ratio of
two integers, a/b with b = 0), since the samples of the sinusoid are defined only at
the sample points.
Cosine and sine waveforms are two important special cases of the sinusoid.
Figure 1.4a shows the continuous cosine waveform cos( 2π 16
t). The angular frequency
ω
is ω = 16 rad/s. The cyclic frequency is f = 2π = 16 Hz. The waveform repeats
2π 1

every 16 s. The period is T = 1f = 16 s. The amplitude is one. That is, the maximum
distance from the t-axis to either of the peaks of the waveform is one. As the peak
occurs at t = 0, the phase of the waveform is 0. Figure 1.4b shows the continuous sine
waveform sin( 2π 12
t). The angular frequency is ω = 2π 12
rad/s. The cyclic frequency is
ω
f = 2π = 12 Hz. The waveform repeats every 12 s. The period is T = 1f = 12 s. The
1

amplitude is one. As the peak occurs at t = 3, the phase of the waveform is − π2 rad.
The occurrence of the peak is delayed by 3 s, compared with the cosine waveform.
That is, 2π
12
(−3) = − π2 . Therefore, the sine waveform can be, equivalently, expressed
as cos( 2π
12
t − π2 ). The sine waveform can be obtained by shifting cos( 2π 12
t) by π2 rad

(or 90 or 3 s or a quarter of a cycle) to the right. Alternately, the cosine waveform can
be considered as the advanced version of the sine waveform. The cosine waveform
10 1 Signals

leads the sine waveform by 90◦ or the sine waveform lags the cosine waveform by
90◦ .
Figure 1.4c shows the discrete sinusoid cos( 2π 32
n − π4 ). The angular frequency is
ω
ω = 32 rad. The cyclic frequency is f = 2π = 32 cycles per sample. The waveform
2π 1

repeats every 32 samples. The period is T = 1f = 32 samples. The amplitude is


one. As the peak occurs at n = 4, the phase of the waveform is − π4 rad. Figure 1.4d
shows the discrete sinusoid cos( 2π
24
n + π6 ). The angular frequency is ω = 2π 24
rad. The
ω
cyclic frequency is f = 2π = 24 cycles per sample. The waveform repeats every 24
1

samples. The period is T = 1f = 24 samples. The amplitude is one. As the peak


occurs at n = −2, the phase of the waveform is π6 rad.
Exponential Signal
By using sine and cosine functions, signals can be represented. But it involves two
basic functions and the two associated constants. It is found that an equivalent repre-
sentation of signals is obtained using the complex exponential function, in which only
one basic function and one associated constant is involved. The compact representa-
tion and the ease of manipulating the exponential functions make its use mandatory
in the analysis of signals and systems. However, practical devices generate sine and
cosine functions. Euler’s formula is the bridge between the theory and the practice.
With b any positive real number except 1,

x(t) = bt

is called the exponential function with base b. Our primary interest, in this book, is
the complex exponential function of the form

x(θ) = Ae jθ

The base is e, which is approximately 2.71828. The exponent is a complex number


with its real part zero (pure imaginary number). The coefficient of the exponential
A is a complex number.
The exponential e jθ , shown in Fig. 1.5, is a unit rotating vector, rotating in the
counterclockwise direction. The exponential carries the same information about a
sinusoid in an equivalent form, which is advantageous in the analysis of signals and
systems. In combination with the exponential e− jθ , which rotates in the clockwise
direction, a real sinusoidal waveform can be obtained. Since

e jθ = cos(θ) + j sin(θ) and e− jθ = cos(θ) − j sin(θ),

solving for cos(θ) and sin(θ) results in

e jθ + e− jθ e jθ − e− jθ
cos(θ) = and sin(θ) =
2 j2
1.1 Basic Signals 11

Fig. 1.5 The complex Im


exponential e jθ ej
j

) >0
-1 1 Re

-j

Let θ = ωt + φ. Then,

Re j (ωt+φ) + Re− j (ωt+φ)


R cos(ωt + φ) =
2
= 0.5Re e + 0.5Re− jφ e− jωt
jφ jωt

The exponentials and their coefficients are complex conjugates.

Example 1.2 Express the signal in terms of complex exponentials.


 
2π π
x(n) = cos n−
32 3

Solution
Using Euler’s identity, the waveform can be expressed in terms of complex expo-
nentials as
1
x(n) = (e j ( 32 n− 3 ) + e− j ( 32 n− 3 ) )
2π π 2π π

2
π π
The complex frequency coefficients of the exponentials are 0.5e− j 3 and 0.5e j 3 .
The real parts of the coefficients are even-symmetric and the imaginary parts are
odd-symmetric. This redundancy is expected, since there are only two independent
values specifying the sinusoidal waveform (the amplitude and the phase).

Example 1.3 Express the signal in terms of complex exponentials.


   
2π √ 2π
x(n) = cos n + j 3 sin n
32 32
12 1 Signals

(a) 0.9469
0.8660
(b) 0.4904
0.7518 0.4157
0.6088 0.3536
0.2778
0.4423
0.1913
0.2588
0.0975

xe(n)
0.0654
x(n)

0
-0.1305
-0.0975
-0.3214 -0.1913
-0.5 -0.2778
-0.6593 -0.3536
-0.7934 -0.4157
-0.8969 -0.4619
-0.9659 -0.5
0 4 8 12 16 20 24 28 0 4 8 12 16 20 24 28
n n
(c) 0.8660 (d)
0.7201 1.4401 real
0.6124 1.2247 imaginary
0.4811 0.9623
0.3314 0.6628
0.1690 0.3379
xo (n)

xc(n)

0 0
-0.1690 -0.3379
-0.3314 -0.6628
-0.4811 -0.9623
-0.6124 -1.2247
-0.7201 -1.4401
-0.8001 -1.6002
-0.8494 -1.6988
0 4 8 12 16 20 24 28 0 4 8 12 16 20 24 28
n n

π
√ √
32 n − 3 ); b 0.5 cos( 32 n); c 32 n); d cos( 32 n) + j 3 sin( 32 n)
3
Fig. 1.6 a cos( 2π 2π
2 sin( 2π 2π 2π

Solution
Using Euler’s identity, the waveform can be expressed in terms of complex expo-
nentials as

1 j ( 2π n ) − j ( 2π n) 3 j ( 2π n )
(e 32 − e− j ( 32 n ) )

x(n) = (e 32 +e 32 )+
2
  2 √ 
√ 
1 3 1 3 − j ( 2π n )
e j ( 32 n ) +

= + − e 32
2 2 2 2
√ √
The coefficients of the exponentials are ( 21 + 2
3
) and ( 21 − 2
3
). The waveform is
shown in Fig. 1.6d.

1.2 Classification of Signals

Signals are classified into different types based on their characteristics. The classifi-
cation is an aid in selecting a suitable representation and processing.
1.2 Classification of Signals 13

Table 1.1 Signal Characteristic Continuous Sampled


classification
Unquantized Continuous Discrete
Quantized Quantized Digital
continuous

1.2.1 Continuous, Discrete, and Digital Signals

This type of classification characterizes the type of sampling of the dependent


and independent variables. Sampling the amplitude is called quantization. Table 1.1
shows the signal classification based on sampling the amplitude and time. When
both the variables of a signal can assume continuum of values, it is called a continu-
ous signal, such as the ambient temperature. Most of the naturally occurring signals
are of this type. The temperature measured by a digital thermometer is a quantized
continuous signal. This type of signals occurs in the reconstruction of a continuous
signal from its sampled version. Sampled continuous-valued signal is a discrete sig-
nal. This type of signals, shown in Fig. 1.4c, d, is used in the analysis of discrete
signals and systems. A quantized discrete signal is called a digital signal, used in the
digital systems.

1.2.2 Periodic and Aperiodic Signals

The sinusoidal signals are defined by the values of the coordinates on a circle in
Fig. 1.3. In each rotation of a point on the circle, the same set of values are produced
indefinitely. This type of signals, such as the sine and cosine functions, is periodic
signals. While only one period of a periodic signal contains new information, peri-
odicity is required to represent signals such as power and communication signals. In
communication engineering, the message signal is aperiodic and the carrier signal is
periodic. Finite duration signals are represented, by the practically most often used
version of the Fourier analysis, assuming periodic extension. The finite signal is con-
sidered as the values of one period and concatenation of it indefinitely on either side
yields a periodic signal. A signal x(t) is said to be periodic, if x(t) = x(t + T ), for
all values of t from −∞ to ∞ and T > 0 is a positive constant. The minimum value
of T that satisfies the constraint is the period. A periodic signal shifted by an integral
number of its period remains unchanged. A signal that is not periodic is aperiodic,
such as the impulse, step and ramp signals shown in Fig. 1.1 and the real exponen-
tial. The period is infinity, so that there is no indefinite repetition. The everlasting
definition of a periodic signal is for mathematical convenience. In practice, physical
devices are switched on at some time and the response reaches a steady state, after
the transient response dies down.
14 1 Signals

If a discrete signal x(n) satisfies the condition

x(n + N ) = x(k mod N ) = x(n) for all n,

then it is said to be periodic, k = l N + n and l is an integer. The smallest N > 0


satisfying the constraint is its period. Otherwise, it is aperiodic. The mod function,
r = k mod N , yields the remainder r of dividing k by N .

r = k − (k/N )N , N = 0

and r has the same sign as N . The floor function rounds the number to the nearest
integer less than or equal to its argument. For example, with N = 3, r = k mod 3
yields

k –8 –7 –6 –5 –4 –3 –2 –1 0 1 2 3 4 5 6 7
r 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1

For a negative k, the corresponding positive value in the range 0 to N − 1 is obtained.


For example, with k = −1,

(−1/3)3 = (−0.3333)3 = (−1)3 = −3 and r = −1 − (−3) = 2

With k = −8, we get

(−8/3)3 = (−2.6667)3 = (−3)3 = −9 and r = −8 − (−9) = 1

r = k mod N is periodic with period N since

r = k mod N = (k + N ) mod N

Let {1̌, 2, 3} is a periodic sequence with period 3. The 27th number in the sequence
is 1. The index is obtained as 27 mod 3 = 0 and x(0) = 1. x(−4) = x(2) = 3.

1.2.3 Even- and Odd-Symmetric Signals

Any signal can be decomposed into its even and odd components. Knowing whether
a signal is even or odd may reduce computational and storage requirements in its
processing. If a signal x(t) satisfies the condition

x(−t) = x(t) for all t,


1.2 Classification of Signals 15

then it is said to be even. The plot of such a signal is symmetrical about the vertical
axis at the origin. For example, the cosine waveforms, shown in Figs. 1.4a and 1.6b,
are even. For the signal in Fig. 1.6b,
   
2π 2π
0.5 cos (−n) = 0.5 cos n
32 32

If a signal x(t) satisfies the condition

x(−t) = −x(t) for all t,

then it is said to be odd. The plot of such a signal is antisymmetrical about the vertical
axis at the origin. For example, the sine waveforms, shown in Figs. 1.4b and 1.6c,
are odd. For the signal in Fig. 1.6c,
√   √  
3 2π 3 2π
sin (−n) = − sin n
2 32 2 32

Any function can be decomposed into its even and components. Let the even and
odd components of x(t) be xe (t) and xo (t), respectively. Then,

x(t) = xe (t) + xo (t) and x(−t) = xe (t) − xo (t)

Solving the equations, we get

xe (t) = 0.5(x(t) + x(−t)) and xo (t) = 0.5(x(t) − x(−t))

The signal, shown in Fig. 1.6a, is neither even nor odd.


    √  
2π π 2π 3 2π
cos n− = 0.5 cos n + sin n
32 3 32 2 32

Its even and odd components are shown in Fig. 1.6b, c. The integral of an even signal
between symmetric limits −T to T is equal to twice that over the limits 0 to T . The
integral of an odd signal between symmetric limits is zero. The product properties
are:

even signal × even signal = even signal


odd signal × odd signal = even signal
odd signal × even signal = odd signal

Circular Symmetry
In the DFT, a finite extent signal is extended periodically to make it a periodic signal.
As periodic signals are defined on a circle, the even and odd symmetries, defined on
16 1 Signals

a line, can also be defined emphasizing the cyclic nature of the signal. If a N -point
signal x(n) satisfies the condition

x((−n) mod N ) = x(n) for all n,

then it is said to be circularly even. For example, the sequences

{x(n), n = 0, 1, . . . , 7} = {8, 2, 6, 4, 6, 4, 6, 2} and


{x(n), n = 0, 1, . . . , 6} = {8, 2, 6, 4, 4, 6, 2}

are even. The values at the beginning and at the middle can be arbitrary for a signal
with even number of elements and the other values satisfy x(n) = x(−n), when
placed on a circle. Considering the finite extent alone, the condition is

x(N − n) = x(n), 1 ≤ n ≤ N − 1

The cosine waveform, with period N ,


 

x(n) = cos n
N

is even.
If a N -point signal x(n) satisfies the condition

−x((−n) mod N ) = x(n) for all n,

then it is said to be circularly odd. For example, the sequences

{x(n), n = 0, 1, . . . , 7} = {0, −2, −6, −4, 0, 4, 6, 2}

and
{x(n), n = 0, 1, . . . , 6} = {0, −2, −6, −4, 4, 6, 2}

are odd. The values at the beginning and at the middle must be zero for a signal with
even number of elements and the other values satisfy x(n) = −x(−n), when placed
on a circle. Considering the finite extent alone, the condition is

x(N − n) = −x(n), 1 ≤ n ≤ N − 1

The sine waveform, with period N ,


 

x(n) = sin n
N

is odd. Even- and odd-symmetric 8-point arbitrary sequences are shown in Fig. 1.7.
1.2 Classification of Signals 17

x(2) = q x(2) = q
x(3) = r x(1) = p x(3) = r x(1) = p

even-symmetric odd-symmetric

x(4) = b x(0) = a x(4) = 0 x(0) = 0

x(5) = r x(7) = p x(5) = −r x(7) = −p


x(6) = q x(6) = −q

Fig. 1.7 Circular sequences, even-symmetric and odd-symmetric

1.2.4 Energy and Power Signals

Power is the rate of doing work, typically measured in watts. It is common to specify
devices by their power handling capacity. Devices, such as an electric motor, heater,
amplifier and a diesel engine, are characterized by their power rating. The energy of
a signal x(t) is measured by the power dissipated in a 1  resister due to a voltage
applied across it or a current passing through. The energy dissipated is
 ∞
E= |x(t)|2 dt
−∞

assuming that E is finite. Signals satisfying the condition E < ∞ are called energy
signals. All practical signals are energy signals. The energy of x(t) = 2e−3t , t ≥ 0
is  ∞
2
E= |2e−3t |2 dt =
0 3

For discrete signals,




E= |x(n)|2
n=−∞

The energy of x(n) = 3(0.8)n u(n) is



 9 9
E= |3(0.8)n |2 = = = 25
n=0
1 − 0.64 0.36

Sinusoids are not energy signals, since they have infinite energy. Such signals are
characterized by their power. The average power of a continuous signal is defined as
18 1 Signals

 T
1 2
P = lim |x(t)|2 dt
T →∞ T − T2

For periodic signals, the average power can be computed over one period as
 T
1 2
P= |x(t)|2 dt,
T − T2

where T is the period. The average power of the sine wave 2 sin( 2π
8
t) is
 4     
1 2π 1 4 2π
P= |2 sin t | dt =
2
1 − cos 2 t dt = 2
8 −4 8 4 −4 8

The average power of a discrete signal is defined as

1 N
P = lim |x(n)|2
N →∞ 2N + 1
n=−N

For a periodic signal with period N , the average power can be determined as

N −1
1 
P= |x(n)|2
N n=0

Periodic and aperiodic signals with finite average power are called power signals.
The average power of the sine wave sin( 2π
8
n) is

2
3
1 1
P= |x(n)|2 = (02 + (1)2 + 02 + (−1)2 ) =
8 n=0 4 2

Signals, such as x(t) = t, are neither energy nor power signals.

1.2.5 Deterministic and Random Signals

Signals may be deterministic or random. The values of a deterministic signal are


predictable for all time, while the future values of the random signals are not exactly
predictable. Their future values can be estimated based on averages of a set of such
signals. Typical examples of deterministic signals are the unit-step and sinusoids
presented earlier. Most of the naturally occurring signals are of random nature and
represented by averages in the time domain and Fourier power spectrum in the fre-
quency domain. Each of the signals produced by persons saying the word Fourier
1.2 Classification of Signals 19

will be different. While the amplitude profile of each of the signals will be different,
similarity of the time variation and frequency content are likely to be similar. Deter-
ministic signals are characterized by their amplitude in the time domain and Fourier
spectrum in the frequency domain.

1.2.6 Causal and Noncausal Signals

Most signals occur at some finite instant, usually chosen as t = 0, and are considered
identically zero before this instant. A signal x(t) is said to be causal if

x(t) = 0, t < 0

If x(t) = 0, t < 0, then it is a noncausal signal. The unit-step signal is causal. A


sinusoid is a noncausal signal. This signal can be made causal by multiplying it with
the unit-step signal u(t).

1.3 Signal Operations

In addition to arithmetic operations on the signal samples (dependent variable), oper-


ations on the independent variables are also required in signal analysis. Typical opera-
tions of this type are shifting, folding, and scaling. While we present these operations
assuming that the independent variable is time, these operations can be carried out
with any variables such as frequency, distance.

1.3.1 Time Shifting

If the variable t in x(t) is replaced by (t − t0 ), then the origin of the signal is shifted
to t = t0 . If t0 is positive (negative), the values of the function are retarded (advanced)
by t0 . Graphically, it amounts to shifting the plot of the function forward (t0 positive)
or backward by t0 . Examples of time shifting are the waveforms in Figs. 1.2 and 1.4.
Let x(n) = {x(0), x(1), x(2), x(3)} = {3, 1, 2, 4}. By linearly shifting x(n), we
get

x(n − 1) = {x(1) = 3, x(2) = 1, x(3) = 2, x(4) = 4}


x(n + 1) = {x(−1) = 3, x(0) = 1, x(1) = 2, x(2) = 4}
20 1 Signals

2 1
x(2) 1 xs(2)
3 x(3) x(1) 2 xs(3) xs(1) 0

x(n) xs(n) = x(n − 1)


0
4 x(4) x(0) 3 xs(4) xs(0) 7

7
5 x(5) x(7) 4 xs(5) xs(7) 6
x(6) xs(6)
6 5

Fig. 1.8 Circular shift of a sequence

Circular Shifting
Circular shifting is simply the shifting of the values of a signal placed on a circle.
The right circular shift of a N -point signal x(n) by k sample intervals results in

x((n − k) mod N )

Let x(n) = {x(0), x(1), x(2), x(3)} = {3, 1, 2, 4}. Then,

x(n − 1) = {x(3), x(0), x(1), x(2)} = {4, 3, 1, 2}


x(n + 1) = {x(1), x(2), x(3), x(0)} = {1, 2, 4, 3}

Right circular shift of the 8-point sequence x(n) = {0̌, 1, 2, 3, 4, 5, 6, 7} by one sam-
ple interval results in xs(n) = x(n − 1) = {7̌, 0, 1, 2, 3, 4, 5, 6}, as shown in Fig. 1.8.
The check symbolˇindicates that the index of that element is 0.

1.3.2 Time Scaling

If the variable t in x(t) is replaced by (at), then the function is scaled. If a > 1, the
signal is compressed and if a < 1, the signal is expanded.
Signal Expansion
A N -point sequence x(n) is expanded by an integer factor a to get its expanded
version xu (n), n = 0, 1, . . . , a N − 1, defined as
 n
x a for n = 0, ±a, ±2a, . . . ,
xu (n) =
0 otherwise
1.3 Signal Operations 21

The expanded signal xu (n) is obtained by inserting a − 1 zeros after each sample in
x(n). This operation, also called upsampling, increases the sampling rate. Expansion
of the 8-point sequence x(n) = {0̌, 1, 2, 3, 4, 5, 6, 7} by a factor of 2, (a = 2), results
in
xu (n) = {0̌, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0}

Signal Compression
A N -point sequence x(n) is compressed by an integer factor a to get its compressed
version xd (n), n = 0, 1, . . . , (N /a) − 1, defined as

xd (n) = x(na) for n = 0, 1, . . . , N


a
−1

The compressed signal xd (n) is obtained by taking every ath sample, starting with
x(0). This operation, also called downsampling, decreases the sampling rate. Com-
pression of the 8-point sequence x(n) = {0̌, 1, 2, 3, 4, 5, 6, 7} by a factor of 2 results
in xd (n) = x(2n) = {0̌, 2, 4, 6}.
Time-Reversal
Time-reversal of a signal x(t) is defined as xr (t) = x(−t) and xr (−t) = x(t). By
replacing t by −t, we get the time-reversed version of x(t), which is the mirror image
of x(t) about the vertical axis at the origin.
Circular time-reversal of a N -point signal x(n) is given by

x(0) for n = 0
x(N − n) 1 ≤ n ≤ N − 1

This is just plotting x(n) in the other direction on a circle. Circular time-reversal of
the 8-point sequence x(n) = {0̌, 1, 2, 3, 4, 5, 6, 7} results in xr (n) = x(N − n) =
{0̌, 7, 6, 5, 4, 3, 2, 1}, as shown in Fig. 1.9.

2 6
x(2) 1 xr(2)
3 x(3) x(1) 5 xr(3) xr(1) 7

x(n) xr(n) = x(N − n)

4 x(4) 0
x(0) 4 xr(4) xr(0) 0

7
5 x(5) x(7) 3 xr(5) xr(7) 1
x(6) xr(6)
6 2

Fig. 1.9 Circular time-reversal of a sequence


22 1 Signals

Zero Padding
In this operation, a sequence is appended by zero-valued samples. A N -point
sequence x(n) is expanded to a M-point, M > N , signal x z (n), n = 0, 1, . . . , M − 1,
defined as 
x(n) for n = 0, 1, . . . , N − 1
x z (n) =
0 for n = N , N + 1, . . . , M − 1.

1.4 Complex Numbers

Complex number system is an extension of the real number system that suits a large
number of applications in science and engineering. The simplest number system is the
set of natural numbers {1, 2, 3, . . .}, the system we use to count things. By including
the negative numbers, we get the integers. Further, the number system is extended by
including rational and irrational numbers. With this system, we can only specify the
location of a point on a line. There is a necessity in several applications to represent a
point on a plane. For example, a sinusoid at a given frequency is characterized by its
amplitude and phase. That requires a pair of ordered numbers, a two-element vector.
While it is possible to represent a sinusoid with two scalars, the vector representation
is so much advantageous that it is used in most of the Fourier analysis, the subject
of this book. Another advantage of the complex number system is that it provides
solution to all polynomial equations. Further, real integrals, which may or may not be
evaluated by real integral calculus, are elegantly evaluated by complex integration.
Except that the system is, unfortunately, named as complex number system, there is
nothing complex about it and it is just another extension of the number system.
A complex number z = (x, y) is a two-element vector of real numbers, in which
the first and second elements are, respectively, called the real and imaginary parts of
z. A more commonly used notation for the complex number is z = x + j y, where
j is the imaginary unit. For example, the real part of z = (3 − j2) is 3 and the
imaginary part is −2. This form of a complex number is called its rectangular form.
Two complex numbers are equal if and only if their real parts are equal and their
imaginary parts are also equal.
The Complex Plane
As complex numbers are 2-element vectors, they can be represented in a plane, called
the complex plane. The complex plane, shown in Fig. 1.10, is similar to x y-plane used
to plot graphs. In the complex plane, the horizontal axis is called the real axis and
the vertical axis is called the imaginary axis. On both axes, the scale is the same. A
complex number is plotted as a point in the complex plane with its real and imaginary
parts fixing the coordinates of the horizontal and vertical axes, respectively. Several
examples are given in the figure. A number lying on the real axis, with its imaginary
part zero, is a real number. Therefore, it is obvious that the complex number system is
an extension of the real number system. A number lying on the imaginary axis, with
1.4 Complex Numbers 23

Fig. 1.10 Representation of

Imaginary
complex numbers in the 2 -2+j2
1+j2
complex plane
1 0+j1

-2+j0 Real
0
0+j0

-1 -1-j1

1-j2
-2

-2 -1 0 1 2

its real part zero, is a pure imaginary number. The number j is called the imaginary
unit.
Addition of Complex Numbers
The sum of two complex numbers p = a + jb and q = c + jd is defined as

p + q = (a + jb) + (c + jd) = (a + c) + j (b + d) (1.1)

The sum of 3 − j2 and 4 + j3 is 7 + j1.


The difference of p and q is defined as

p − q = (a + jb) − (c + jd) = (a − c) + j (b − d) (1.2)

The difference of 7 + j1 and 3 − j2 is 4 + j3.


Multiplication of Complex Numbers
The product of two complex numbers p = a + jb and q = c + jd is defined as

pq = (a + jb)(c + jd) = (ac − bd) + j (ad + bc) (1.3)

From this definition, we get



( j)( j) = j 2 = −1 and −1 = j

The product of 3 − j2 and 4 + j2 is 16 − j2.


Conjugate of a Complex Number
The conjugate of a complex number p = a + jb is p ∗ = a − jb, obtained by replac-
ing j by − j. In the complex plane, it is the mirror image of p about the real axis.
The sum of a complex number a + jb and its conjugate a − jb is p + p ∗ = 2a,
twice its real part. The result of subtraction is p − p ∗ = j2b, twice its imaginary
part multiplied by the imaginary unit j. Therefore, the real and imaginary parts of a
complex number p = a + jb are given by
24 1 Signals

p + p∗ p − p∗
and ,
2 j2

respectively. Conjugate pair 1 + j2 and 1 − j2 is shown in the figure. The product of


a complex number p and its conjugate is its magnitude squared, | p|2 (a real number).
The product of 1 + j2 and 1 − j2 is 12 + 22 = 5.
Division of Complex Numbers
The division of two complex numbers p = (a + jb) and q = (c + jd) = 0 is defined
as
p (a + jb) (a + jb)(c − jd) ac + bd bc − ad
= = = 2 +j 2 (1.4)
q (c + jd) (c + jd)(c − jd) c +d 2 c + d2

Dividing 16 − j2 by 3 − j2, we get 4 + j2.


Polar Form of a Complex Number
Using trigonometric functions, the two parts of a complex number p = a + jb can
be expressed as

p = a + jb = r cos(θ) + jr sin(θ) = r (cos(θ) + j sin(θ)) = r e jθ



where r = a 2 + b2 , called the absolute value of p and denoted by | p|, is the
distance of the point (a, b) in the complex plane from the origin. The angle θ (called
the argument) is the angle measured in the counterclockwise direction, between
the positive real axis and the vector from the origin and the point, θ = ∠( p) =
tan−1 (b/a). For p = 0, the angle θ is undefined. The inverse relations are

a = r cos(θ) and b = r sin(θ)

While r is unique for each complex number, θ + 2nπ is an argument for any integer
√n.
Restricting θ between 0 and 2π gives a unique value. For example, let p = 1 + j 3.
Then, √ 
 √ −1 3
r = 1 + ( 3) = 2, and tan
2 2 = 60◦
1

π
Therefore, the polar form is 2e j 3 . Now,

2 cos(60◦ ) = 1 and 2 sin(60◦ ) = 3

Multiplication in Polar Form


The product of two complex numbers r e jθ and se jφ is

r e jθ se jφ = r se j (θ+φ)

The product of a complex number r e jθ with itself is r 2 e j2θ .


π π 2π √ √ √
(2e j 3 )(2e j 3 ) = (4e j 3 ) = −2 + j2 3 = (1 + j 3)(1 + j 3)
1.4 Complex Numbers 25

The generalization of this result is the De Moivre’s theorem. With n a positive integer
and p = r e jθ , p n = r n e jnθ .
Division in Polar Form
The division of two complex numbers r e jθ and se jφ is

r e jθ r
= e j (θ−φ)
se jφ s
For example,
2π π π √ √ √
(4e j 3 )/(2e j 3 ) = (2e j 3 ) = (−2 + j2 3)/(1 + j 3) = (1 + j 3)

Roots of a Complex Number


With integer N ≥ 1, the N distinct complex N th roots of r e jθ are
1 θ+2kπ
r N ej N , k = 0, 1, . . . , N − 1,
1
where r N is the positive real N th root of r . With r = 1, we get the N roots of unity,
which are the basis functions of the DFT. For example, let us solve the equation
z 4 − 1 = 0. z 4 = 1. Then, 1 = 1e j0 . The four roots are
   
2kπ 2kπ
cos + j sin , k = 0, 1, 2, 3
4 4
   
2(0)π 2(0)π
cos + j sin =1
4 4
   
2(1)π 2(1)π
cos + j sin = j
4 4
   
2(2)π 2(2)π
cos + j sin = −1
4 4
   
2(3)π 2(3)π
cos + j sin = −j
4 4

(1)4 = ( j)4 = (−1)4 = (− j)4 = 1.

1.5 Summary

• The amplitude profiles of most naturally occurring signals are arbitrary.


• Signals have to be decomposed in terms of well-defined basis signals for their
easier interpretation and manipulation.
• The most often used basis signals are the impulse and the sinusoid.
26 1 Signals

• The impulse has its strength concentrated at a point, while the sinusoid is an
everlasting signal.
• The unit-step signal, which is related to the impulse, is also often used in the
representation and manipulation of signals.
• The sinusoidal signal is a linear combination of the well-known trigonometric
cosine and sine functions.
• While physical devices generate the sinusoidal signals, a mathematically equiv-
alent form, the complex exponential, is often used in signal and system analysis
due to its compact form and ease of manipulation.
• The sinusoidal signal is most often used to represent and manipulate signals, since
it provides easier interpretation of the signals and fast processing of operations.
• Signal classification aids the selection of the most suitable transform for its repre-
sentation and manipulation.
• Signal operations, such as shifting and scaling, are often used in signal manipula-
tion, in addition to arithmetic operations.
• The complex number system is an extension of the real number system and it
provides significant advantages in the analysis of signals and systems. A complex
number is an ordered pair of real numbers, a two-element vector. More efficient
processing is obtained, when closely related quantities are represented in a vector
form.

Exercises
1.1 Evaluate the summation.
∞
1.1.1 3n δ(n).
n=−∞


* 1.1.2 (−0.5)(n−1) δ(n).
n=2


1.1.3 2n δ(n + 2).
n=0
∞
1.1.4 (0.25)n δ(n + 1).
n=−∞
∞
1.1.5 (−2)(n+1) δ(n − 3).
n=−∞

1.2 Express the signal as a linear combination of scaled and shifted unit-impulses.
1.2.1 {x(0) = −2, x(1) = 1, x(2) = −1, x(3) = 3} and x(n) = 0 otherwise.
1.2.2 {x(0) = 3, x(−1) = 1, x(2) = −2, x(−3) = 4} and x(n) = 0 otherwise.
* 1.2.3 {x(0) = −2, x(−2) = 3, x(2) = −1, x(−3) = 3} and x(n) = 0 otherwise.
1.2.4 {x(0) = 3, x(−1) = 1, x(3) = −2, x(4) = 2} and x(n) = 0 otherwise.
1.3 Assume that the impulse is approximated by a rectangular pulse, centered at t = 0,
1
of width 2a and height 2a . Using this quasi-impulse, the signal x(t) is sampled. What
1.5 Summary 27

are the sample values of x(t) at t = 0 with a = 1, a = 0.1, a = 0.01, a = 0.001,


and a = 0.
1.3.1 x(t) = 2e−2t .
1.3.2 x(t) = 3 cos(2πt).
 
* 1.3.3 x(t) = −2 sin t + π3 .
 
1.3.4 x(t) = cos 4t + π6 .
1.3.5 x(t) = |t|.
1.4 Evaluate
 ∞ the integral.
1.4.1 −∞ sin(t)δ(2t − 4)dt.
∞  
1.4.2 −∞ cos(2t)δ 21 t − 3 dt.
 ∞ t 1 
1.4.3 3 e δ 3 t + 2 dt.
3  
* 1.4.4 −∞ e−t δ − 25 t − 2 dt.
2
1.4.5 −∞ δ(−3t − 2)dt.
1.5 Define the discrete signal given by a linear combination of scaled and shifted
unit-step signals.
* 1.5.1 x(n) = (2u(−n − 2) − 2u(−n + 1)).
1.5.2 x(n) = (−3u(n − 2) + 3u(−n + 3)).
1.5.3 x(n) = (4u(n + 2) − 4u(n)).
1.6 Express the sinusoid in rectangular form. Get back the polar form from the
rectangular form and verify that the given sinusoid is obtained. Find the sample
values of the sinusoid for n = 0 to n = 7. What are the amplitude, cyclic frequency,
and the phase.  
1.6.1 x(n) = 2 cos π4 n − π3
π 
1.6.2 x(n) = cos 4 n + π4
 
1.6.3 x(n) = −3 sin π4 n − π2
 
1.6.4 x(n) = 4 cos π4 n + π2 .
π 
* 1.6.5 x(n) = 3 cos 4 n + π6
1.7 Determine the sinusoid c(n) that is the sum of the pair of given sinusoids, a(n)
and b(n), c(n) = a(n) + b(n). Find the samples of the sinusoid c(n) for n = 0 to
n = 7 and verify that the samples are the same as the sum of the samples of a(n) and
b(n), a(n) + b(n).    
1.7.1 a(n) = 2 cos π4 n + π4 , b(n) = − sin π4 n + π3
π  π 
1.7.2 a(n) = 3 cos 4 n , b(n) = 2 sin 4 n
   
* 1.7.3 a(n) = 4 cos π4 n + π3 , b(n) = cos π4 n − π4
π  π 
1.7.4 a(n) = 3 cos 4 n , b(n) = cos 4 n
   
1.7.5 a(n) = sin π4 n , b(n) = 3 sin π4 n
1.8 Is the sinusoid periodic? Ifso, what is its period?
1.8.1 x(n) = cos 0.2πn − π4

1.8.2 x(n) = cos 5πn + π3
28 1 Signals

1.8.3 x(n) = cos 2π
√ n + π2
 5π
3

* 1.8.4 x(n) = sin 15 n
π 
1.8.5 x(n) = 1 + cos 4 n + cos(n)
1.9 Express the signal in terms of complex exponentials. Find the samples of the two
forms and verify that they are the same.
1.9.1 x(n) = cos(πn)
1.9.2 x(n) = cos(2πn)
 
1.9.3 x(n) = cos 2π 8
n + π3

* 1.9.4 x(n) = 2 sin 2π n − π6
 2π 8   
1.9.5 x(n) = 2 cos 8 n + j3 sin 2π 8
n
1.10 Find the samples of one period of the periodic signal x(n), starting from n = 0.
Find the kth sample using themod function.
1.10.1 x(n) = cos 2π n + π3 , k = −11
 2π8 
1.10.2 x(n) = sin 8 n − π3 , k = 10
 
* 1.10.3 x(n) = cos 2π n + π , k = −4
 2π 8 π 6
1.10.4 x(n) = sin 8 n − 6 , k = 22
 
1.10.5 x(n) = cos 2π 8
n − π4 , k = −27
1.11 Decompose the signal x(n) into its even and odd components. Find the samples
of the signal and its components for n = −3, −2, −1, 0, 1, 2, 3. Sum the samples of
the components and verify that they are the same as those of the given signal.
1.11.1 x(0) = −2, x(1)  = −2, x(2) = 2, x(3) = 2, and x(n) = 0 otherwise.
1.11.2 x(n) = 2 sin π4 n − π3
1.11.3 x(n) = (−0.8)n u(n)
* 1.11.4 x(n) = u(n − 2)
1.11.5 x(n) = n u(−n)
1.12 Is the signal circularly symmetric? If so, is it odd-symmetric or even-symmetric?
1.12.1 x(0) = −2, x(1) = −1, x(2) = 2, x(3) = 3.
1.12.2 x(0) = −2, x(1) = 1, x(2) = 2, x(3) = 1.
* 1.12.3 x(0) = 3, x(1) = 2, x(2) = 1, x(3) = 0.
1.12.4 x(0) = 7, x(1) = −2, x(2) = 2, x(3) = −2.
1.12.5 x(0) = 0, x(1) = 4, x(2) = 0, x(3) = −4.
1.13 Is x(n) an energy signal, a power signal, or neither? Find the energy of the
energy signal. Find the average power of the power signal.
1.13.1 x(0) = 3, x(−1) = 1, x(−2) = −2, x(−3) = 4, and x(n) = 0 otherwise.
1.13.2 x(n) = 3n .  
* 1.13.3 x(n) = 2 sin πn 2
− π3 .
1.13.4 x(n) = 2.
1.13.5 x(n) = n1 u(n − 1).
1.5 Summary 29

1.14 Given the values of the constants a and k, and the sinusoid x(n), find the
expression for the sinusoid x(an + k). Find the sample values of the two sinusoids
for one cycle, starting from n = 0. For expansion, assume that the undefined sample
values are zero.  
1.14.1 x(n) = sin 2π n − π6 , a = −2, k = −1.
 2π
8 
1.14.2 x(n) = cos 8 n + π3 , a = 21 , k = 2.
 
* 1.14.3 x(n) = sin 2π 8
n − π3 , a = 21 , k = −8.
1.15 Given the values of the constants a and k, and the signal x(n), find the
expression for the signal x(an + k). Find the sample values of the two signals for
n = {−3, −2, −1, 0, 1, 2, 3}. For expansion, assume that the undefined sample val-
ues are zero.
* 1.15.1 x(0) = 3, x(1) = 1, x(2) = −4, x(3) = 2, and x(n) = 0 otherwise. a =
2, k = −1.
1.15.2 x(n) = (0.8)n . a = −2, k = 1.
1.15.3 x(n) = (0.6)n u(n). a = 13 , k = −2.
1.16 Simplify each expression to get it in the form a + jb.
1.16.1 (7 − j3) + (1 + j2)
* 1.16.2 (1 + j3) − (3 −√j1)
1.16.3 (2 − j4) + (3 + 2 −4)
1.17 Simplify each expression to get it in the form a + jb.
1.17.1 (−7 − j3)(1 + j2)
1.17.2 (1 + j3) − (−3 − j1)
* 1.17.3 2− j4
1− j3
1− j4
− 2− j3

1.18 Simplify each expression in polar form to get it in the form r e jθ .


* 1.18.1 (−7 − j3)(1 + j2)
1+ j3
1.18.2 −3− j1
2− j4
1.18.3 1− j3

1.19 Simplify each expression to get it in the form a + jb. Find the conjugate of the
expression and simplify that also in the form a + jb.
1.19.1 (1 − j3) + (3 + j2)
1.19.2 (2 + j3) − (3 − j1)
* 1.19.3 (2 − j4) + (3 + j2)
1.20
1.20.1 Solve x 2 − 1.5x + 1 = 0 for x. Verify the answer by multiplying the resulting
factors. √
1.20.2 Using De Moivre’s theorem, express (−1 √ − j 3)5 in the form a + jb. Verify
your results by finding the 5th roots of (−1 − j 3)5 .
* 1.20.3 Find the complex 5th roots of unity. Verify your results by raising each root
to its fifth power.
Chapter 2
The Discrete Fourier Transform

Transform means change in form. For example, we use the product rule to change
the form of the problem of finding the derivative of the product of two functions, so
that its derivative can be found easily. The idea of a transform, in signal analysis, is
to approximate practical signals, which usually have arbitrary amplitude profiles and
difficult to analyze in their original form, adequately in terms of well-defined basis
signals, such as the cosine and sine signals. Then, it is easier to interpret, analyze,
transmit, and store them. In the representation of a function in the form x(t), variable
t is the independent variable in a certain domain, designated as the time domain.
Since the time is the independent variable frequently (but not always), it is named
as the time domain. In the representation of a function in the form X (k), variable k,
which represents the frequency index of a frequency component, is the independent
variable in the frequency domain. Either representation completely specifies the given
function. While the frequency-domain representation of signals and systems looks
unnatural, it is convenient and efficient in signal and system analysis. For example, a
high-quality recording of a music signal requires frequency components in the range
0–20 kHz and the corresponding recording devices, amplifiers, and speakers should
have a good frequency response in that frequency range.
Fourier analysis is an indispensable representation of signals and systems in
science and engineering. There are many other representations of various entities.
Infinite points in a plane are represented by their x-axis and y-axis coordinates.
A place on earth is represented by its longitude and latitude. Any color can be speci-
fied by its red, green, and blue components. With all the mathematics, Fourier analysis
looks complex and difficult. But, it is not so. It is similar to finding the amount of
a set of coins. Let us say, we have a box of 1 cent, 10 cent, and 50 cent coins. We
can take one by one and add its value to a partial sum. We find the amount after the
values of all the coins are added. An alternate way is to decompose the coins into the
three denominations and count the number of coins in each. Multiplying the number
of different coins by their value and adding results in the amount. In Fourier analysis,
we decompose a signal in terms of its sinusoidal components. This decomposition
© Springer Nature Singapore Pte Ltd. 2018 31
D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7_2
32 2 The Discrete Fourier Transform

enables the determination of the output of a system faster than other methods, in
addition to other advantages. This method is faster due to the orthogonality of the
sinusoids and the availability of fast algorithms for its practical realization. While
the principle behind Fourier analysis is simple, it is the mathematical details that
make it look complex and difficult. With sufficient practice, both paper-and-pencil
and programming, one can become proficient in the indispensable Fourier analysis.
Fourier analysis has four different versions to suit the different types of signals.
The DFT is the only version in which signals are represented in finite and discrete
form in both the domains. Further, fast algorithms are available for its implementa-
tion. Therefore, it is most often used in practice. It can approximate the other versions
of the Fourier analysis adequately. The DFT uses only a finite number of discrete
sinusoids to represent the signals. Therefore, it is easier to understand and the visu-
alization of the reconstruction of the waveforms is much simpler. The other versions
involve infinite sums or integrals requiring a detailed study of the convergence prop-
erties. As it is the simplest to study the concepts of the Fourier analysis and often
used in practice, the DFT is presented in this chapter followed by other versions in
later chapters.

2.1 The Exponential Function

Fourier analysis is a representation of arbitrary signals in terms of sinusoidal (or its


equivalent complex exponential) basis signals. This representation is similar to that
of the logarithmic function. An exponential function is of the form

x(n) = bn

where the base b = 1 is a positive constant and the exponent n is the independent
variable. An important property of the exponential function is that

bm bn = bm+n

Therefore, the exponential representation reduces a multiplication operation into a


relatively simpler addition operation. Similarly, the Fourier representation reduces a
convolution operation into a relatively simpler multiplication operation. Considering
the importance of the convolution operation in signal and system analysis, this single
advantage alone is sufficient enough to make the Fourier analysis an indispensable
tool in science and engineering.
While the detailed description of Fourier analysis is the topic of the book, let
us continue with the more familiar exponential function. Let us say that we want
to multiply 8 by 16. Assume that a table is available to find the exponent of the
exponential function with base 2 of any number. Then, 8 = 23 and 16 = 24 and

8 × 16 = 23 24 = 23+4 = 27 = 128
2.1 The Exponential Function 33

The logarithm n of a positive real number x to the base b is the exponent of the
exponential function x = bn . The inverse of the exponential function x = bn (b = 1)
is the logarithmic function with base b.

logb x = n if and only if x = bn

Some examples are

log2 8 = 3 since 8 = 23
log10 100 = 2 since 100 = 102
 
1 n
loge 1 = 0 since 1 = e0 , e = lim 1+ ≈ 2.71828
n→∞ n

The points to be noted are:


1. Numbers can be represented in their exponential form.
2. In that form of representation, the multiplication operation is reduced to addition
operation.

2.2 The Complex Exponential Function

A complex exponential function is an exponential function with a complex expo-


nent. The complex exponential function of the form e jθ is our primary interest. The
exponent is purely imaginary. A complex number is an ordered pair of real numbers
and a + jb is one form of its representation. The real part is a, the imaginary part is
b and j is the imaginary unit. The points to be noted are:
1. Signals can be represented in their complex exponential form.
2. In this form of representation, the convolution operation is reduced to multipli-
cation operation.
Except for the use of the complex exponentials as the basis function, Fourier analysis
is similar, in principle, to the use of real exponentials to reduce the multiplication
operation into an addition operation, as presented in the last section. However, a lot
of details has to be taken into account in the use of Fourier analysis, as presented in
the rest of the book.

2.2.1 Euler’s Formula

Oscillators and other physical systems generate waveforms those are a combination
of sinusoidal waveforms. However, it is found that the mathematically equivalent
34 2 The Discrete Fourier Transform

complex exponential is found convenient in the analysis of signals. The Euler’s for-
mula gives the relation between the sinusoidal functions and the complex exponential

e jθ = cos θ + j sin θ

The Maclaurin series of a function x(t) is given by

t t2
x(t) = x(0) + ẋ(0) + ẍ(0) + · · ·
1! 2!
The dot notation for differentiation places a dot over the dependent variable. That is,
if x(t) is a function of t, then the derivative of x(t) with respect to t is ẋ(t). ẍ(t) is
the second derivative. For cos(θ) and sin(θ), the series expansions are

θ2 θ4 θ3 θ5
cos(θ) = 1 − + − · · · and sin(θ) = θ − + − ···
2! 4! 3! 5!

Since the derivative of e jθ with respect to jθ is itself, for any order, the series
expansion is

( jθ)2 ( jθ)3 ( jθ)4


e jθ = 1 + ( jθ) + + + + ···
2! 3! 4!
   
θ2 θ4 θ3 θ5
= 1− + − ··· + j θ − + − ···
2! 4! 3! 5!
= cos θ + j sin θ

2.2.2 Real Sinusoids in Terms of Complex Exponentials

Solving equations

e jθ = cos θ + j sin θ and e− jθ = cos θ − j sin θ,

sinusoids can be expressed in terms of exponentials as

e jθ + e− jθ e jθ − e− jθ
cos θ = and sin θ =
2 j2

A term such as 7x 2 is a monomial in a variable x, in which 7 is its coefficient and 2


is its degree. A polynomial is a sum of a number of monomials. The general form of
a polynomial in the variable x with degree N is

a N x N + a N −1 x N −1 + · · · + a2 x 2 + a1 x + a0
2.2 The Complex Exponential Function 35

in which ai are the coefficients and a N = 0. The coefficients of a complex polynomial


are complex numbers and the variable is also complex. The representation of a signal,
using its DFT coefficients, is in this form, with x = e jθ .

2.3 The DFT and the IDFT

Figure 2.1a shows a discrete periodic waveform with period 4 by dots. The corre-
sponding continuous waveform is shown in thin line for clarity only. The indepen-
dent variable n often represents time, and therefore, the graph n versus x(n), the
amplitude of the signal at the instant n, is called the time-domain representation,
although n may be other than time such as distance. Signals naturally occur in the
time-domain form. Figure 2.1b shows the representation of the same signal in the
frequency domain, called the spectrum. The graph k versus X (k) is the DFT represen-
tation of the signal. It shows the complex amplitudes, scaled by 4, of the constituent
complex exponentials of the signal. For example, X (0) = 8 indicates that the ampli-
tude of the DC component is 8/4 = 2, as shown in Fig. 2.1c by the dash-dot line.

(a) (b)
3.8660 8 imaginary
real

4
X(k)
x(n)

2.1340
1.5 1
0
-1
0.5 -1.7321
0 1 2 3 0 1 2 3
n k
(c) (d)
2
7

1
x(n)

6
-1
0 1 2 3 1.5 2 2.5
n p
π
Fig. 2.1 a A discrete periodic waveform, x(n) = 2 − cos( 2π4 n − 6 ) + cos(2 4 n), with period 4

samples and b its frequency-domain representation; c the frequency components of the waveform
in a; d the square error in approximating the waveform in a using only the DC component with
different amplitudes
36 2 The Discrete Fourier Transform

Similarly, X (2) = 4 indicates that the amplitude of the frequency component with
frequency √index 2 is 4/4 = 1, as shown
√ in Fig. 2.1c by the dashed line. Coefficients
X (1) = − 3 + j and X (3) = − 3 − j represent the frequency component with
index 1, as shown in Fig. 2.1c by the continuous line.
√ 2π √ 2π    
(− 3 + j)e j 4 n + (− 3 − j)e j3 4 n 2π 5π 2π π
= cos n+ = − cos n−
4 4 6 4 6

Both the time- and frequency-domain representations are equivalent and unique.
The DFT finds X (k) from x(n), called the forward transform. The IDFT finds x(n)
from X (k), called the inverse transform. The transformation may be regarded as the
change of the independent variables n and k.
The discrete periodic function x(n) with period 4, shown in Fig. 2.1a, is given by
   
2π π 2π
x(n) = 2 − cos n− + cos 2 n
4 6 4

in terms of trigonometric functions. Using Euler’s formula, we get

x(n) = 2e j0 4 n − 0.5e j ( 4 n− 6 ) + e j2 4 n − 0.5e− j ( 4 n− 6 )


2π 2π π 2π 2π π

√ √
= 2e j0 4 n + (−0.25 3 + j0.25)e j 4 n + e j2 4 n + (−0.25 3 − j0.25)e− j 4 n
2π 2π 2π 2π

2π √ 2π 2π √ 2π
= 2e j0 4 n + (−0.25 3 + j0.25)e j 4 n + e j2 4 n + (−0.25 3 − j0.25)e j3 4 n
(2.1)

Due to periodicity,

e j3 4 n = e j (4−1) 4 n = e j4 4 n e− j1 4 n = e− j
2π 2π 2π 2π 2π
4 n

Equation (2.1) is the representation of x(n) by a complex exponential polynomial of


order 3.
For understanding Fourier analysis, we have started with a problem with no
unknown variables. Fourier analysis problem is to find the coefficients X (k) in the
the complex exponential polynomial representation of a time-domain function x(n),
for example with N = 4 coefficients,
2π 2π 2π 2π
x(n) = X (0)e j0 4 n + X (1)e j 4 n + X (2)e j2 4 n + X (3)e j3 4 n

For the given N = 4, x(n) and the exponentials are known. The Fourier synthesis
problem is to find x(n), given X (k) and the exponentials.
The four samples over one period are obtained from the equations for n =
0, 1, 2, 3.
√ √
{x(0) = (3 − 0.5 3), x(1) = 0.5, x(2) = (3 + 0.5 3), x(3) = 1.5}
2.3 The DFT and the IDFT 37

For example, letting n = 1, we get


   
2π π 2π
x(1) = 2 − cos − + cos 2 1 = 2 − 0.5 − 1 = 0.5
4 6 4

Figure 2.1b shows the frequency-domain representation of the waveform in (a), scaled
by 4. √ √
{X (0) = 8, X (1) = (− 3 + j), X (2) = 4, X (3) = (− 3 − j)}

It shows the complex amplitudes of its constituent complex exponentials (Eq. (2.1))
scaled by 4 (the period). While the form
   
2π π 2π
x(n) = 2 − cos n− + cos 2 n
4 6 4

itself is a frequency-domain representation of x(n), expanding the middle term we


get      
√ 2π 2π 2π
x(n) = 2 − 0.5 3 cos n + cos 2 n − 0.5 sin n
4 4 4

This form uses the rectangular form of the sinusoid, while the earlier form uses
the polar form. Fourier representation expresses a function in terms of sinusoidal
functions. The last two equations are trigonometric polynomials. The frequency
indices of the terms are all integer multiple of the smallest one, called the fundamental.
The other terms are called the harmonics.
Given the samples of a waveform, the DFT is a tool to find the coefficients of its
constituent frequency components. The decomposition of a waveform is obtained
using the orthogonality property of the complex exponentials and sinusoids. Orthog-
onality of two complex sequences is that the sum of pointwise products of a sequence
and the conjugate of the other sequence is zero or a constant over a specified inter-
2π 2π
val. For the two complex exponential signals e j N kn and e j N ln over a period of N
samples, the orthogonality condition is given by

N −1
 
N (k−l)n
j 2π N for k = l
e =
0 for k = l
n=0

where k, l = 0, 1, . . . , N − 1. For k = l, the summation evaluates to N . Using the


closed-form expression for the sum of a geometric progression, we get

N −1
 1 − e j2π(k−l)
e j N (k−l)n =

2π(k−l)
= 0, for k = l
n=0 1 − ej N

This is also obvious from the fact that the sine and cosine waveforms are symmetrical
about the x-axis. The sum of the equidistant samples of a cosine or sine waveform,
38 2 The Discrete Fourier Transform

2π 2π
Table 2.1 Samples of complex exponentials e j 4 kn , k, n = 0, 1, 2, 3 and their conjugates e− j 4 kn

Frequency Sample index n Sample index n


index k 0 1 2 3 0 1 2 3
0 1 1 1 1 1 1 1 1
1 1 j −1 −j 1 −j −1 j
2 1 −1 1 −1 1 −1 1 −1
3 1 −j −1 j 1 j −1 −j

over an integral number of periods, with a nonzero frequency index is always zero.
The orthogonality property can be verified using the samples of e j 4 kn and e− j 4 kn
2π 2π

given in Table 2.1. The sum of the pointwise product of the values of each row in
the left table with the corresponding values of the rows in the right table yields zero,
except for the same row. For example, the sum of pointwise product of the last row
{1, − j, −1, j} in the left table with the corresponding row in the right table yields
4. In the three other cases, the sum is zero.
If we multiply both sides of Eq. (2.1) by e− jk 4 n , k = 0, 1, 2, 3 and sum the prod-

ucts from n = 0 to n = 3, we get


3
2π n
x(n)e− jk 4 =
n=0

3
2π n √ 2π 2π √ 2π 2π
(2e j0 4 + (−0.25 3 + j0.25)e j 4 n + e j2 4 n + (−0.25 3 − j0.25)e j3 4 n )e− jk 4 n
n=0

Letting k = 0, 1, 2, 3 in the last equation in turn, we get the DFT coefficients.


3
e j0 4 n e− j0 4 n + 0 + 0 + 0 = (2)(4) = 8, k = 0
2π 2π
X (0) = 2
n=0

√ 
3
e j 4 n e− j 4 n + 0 + 0
2π 2π
X (1) = 0 + (−0.25 3 + j0.25)
n=0
√ √
= (−0.25 3 + j0.25)(4) = − 3 + j, k = 1
3
0 + 0 + e j2 4 n e− j2 4 n + 0 = 4, k = 2
2π 2π
X (2) =
n=0

√ 
3
e j3 4 n e− j3 4 n
2π 2π
X (3) = 0 + 0 + 0 + (−0.25 3 − j0.25)
n=0
√ √
= (−0.25 3 − j0.25)(4) = − 3 − j, k = 3

We get the coefficients of the frequency components of x(n), scaled by a factor of


4, the length of the sequence.
2.3 The DFT and the IDFT 39

2.3.1 The DFT and the IDFT

The DFT of a sequence x(n) of length N is defined as

N −1

x(n)e− jk N n , k = 0, 1, 2, . . . , N − 1

X (k) = (2.2)
n=0

The complex exponential is also written in its abbreviated form.

e− j N kn = W Nkn , W = e− j N
2π 2π


The sum of the complex exponentials e jk N n multiplied by their respective DFT
coefficients gets back the time-domain waveform. Therefore, the inverse DFT (IDFT)
equation is defined as

N −1
1  2π
x(n) = X (k)e jk N n , n = 0, 1, 2, . . . , N − 1 (2.3)
N k=0

As the DFT coefficients have been scaled by N , the factor N1 appears in the IDFT
definition. There are other ways to take care of this constant.
Let us prove that the DFT and IDFT definitions form a transform pair. Substituting
the definition for X (k) in the definition of the IDFT, we get

N −1 N −1
1  jk 2π n 
x(l)e− jk N l

x(n) = e N
N k=0 l=0

Changing the order of summation, we get

N −1 N −1
1  
e jk N (n−l) = x(n)

x(n) = x(l)
N l=0 k=0

since
N −1
 
N for n = l
e jk N (n−l)

0 for n = l
k=0
40 2 The Discrete Fourier Transform

Center-Zero Format of the DFT and IDFT


The center-zero format places x(0) and X (0) values approximately in the middle,
while these values are placed in the beginning in the usual format, as can be seen in
Eqs. (2.2) and (2.3). For N even, the DFT and IDFT definitions, in the center-zero
format, are

2 −1
N
    
− jk 2π N N N
X (k) = x(n)e N n , k=− ,− − 1 ,..., − 1 (2.4)
2 2 2
n=(− N2 )

2 −1
N
    
1 2π N N N
x(n) = X (k)e jk N n , n = − ,− − 1 ,..., − 1 (2.5)
N 2 2 2
k=−( ) N
2

This form is convenient in some derivations. When the spectrum is displayed in this
format, the interpretation of the spectral features is easier. The conversion of the data
or spectrum from one format to another involves circular shift by half the number of
samples. The spectrum
√ √
{X (0) = 2, X (1) = 2 − j 2, X (2) = 3, X (3) = 2 + j 2}

in center-zero format is
√ √
{X (−2) = 3, X (−1) = 2 + j 2, X (0) = 2, X (1) = 2 − j 2}

In the trigonometric form, a signal is represented, at a given frequency, by two


functions (cosine and sine) and the two associated coefficients. The exponential form
has one function and one coefficient. Because of the compactness of the exponential
form of the Fourier representation of signals and the ease of manipulation of expres-
sions involving exponential functions, the exponential form is mostly used in the
analysis. However, physical systems, such as oscillators, generate sinusoidal output.
Further, visualization of the reconstruction of the waveforms and other operations is
easier in the trigonometric form of the Fourier representation of signals. Therefore,
both the forms are important and they are related by the Euler’s formula. The expo-
nential form is redundant by a factor of 2 for real signals. But, this redundancy can
be almost eliminated in the implementation of the algorithms.

2.3.2 The Criterion of Approximation

In Fourier analysis, the signal is reconstructed with respect to the least squares error
criterion. The DFT X (k) of the sequence x(n) of period N is also periodic of period
N . Then, with N even,
2.3 The DFT and the IDFT 41

2 −1
N
    
1 2π N N N
x(n) = X (k)e jk N n , n = − ,− − 1 ,..., − 1
N 2 2 2
k=−( N2 )

Let xa (n) be an approximation of x(n) using M < N frequency coefficients X a (k),


where M is odd. Then,
M−1

2    
1 2π N N N
xa (n) = X a (k)e jk N n , n = − ,− − 1 ,..., − 1
N 2 2 2
k=−( M−1
2 )

Now, the least squares error is


⎛ ⎞2
2 −1
N M−1
 
2

E= ⎝x(n) − 1 X a (k)e jk

N n ⎠
N
n=−( N2 ) k=−( M−1
2 )

Differentiating this expression with respect to X a (k0 ) and setting the derivative equal
to zero, we get
⎛ ⎞
2 −1
N M−1
 
2
⎝x(n) − 1 X a (k)e jk

N n ⎠ e jk0 2πN n = 0
N
n=−( N2 ) k=−( M−1
2 )

Interchanging the summation order, we get

2 −1 2 −1
M−1 N N
1 
2  
j (k+k0 ) 2π 2π
X a (k) e N n = x(n)e jk0 N n
N
k=−( M−1
2 ) n=−( N2 ) n=−( N2 )

Since (k + k0 ) is an integer, the only nonzero term in the inner summation occurs
when k = −k0 . Therefore, we get

2 −1
N
 2π
X a (−k0 ) = x(n)e jk0 N n
n=−( N2 )

Replacing k0 by −k, we get

2 −1
N

x(n)e− jk N n = X (k)

X a (k) =
n=−( N2 )

This property also holds for complex signals.


42 2 The Discrete Fourier Transform

2.3.3 The Matrix Form of the DFT and IDFT

For each k, the sum of pointwise product of x(n) and e− jk N n , with n varying from 0

to N − 1, is computed in Eq. (2.2). The values of e− jk N n are the conjugate samples


of the basis function for that k. The sum of products can be expressed as a matrix
formulation of the DFT definition. With N = 2, the DFT definition is




X (0) 1 1 x(0)
=
X (1) 1 −1 x(1)

The IDFT is defined as






x(0) 1 1 1 X (0)
=
x(1) 2 1 −1 X (1)

The DFT of {x(0) = 2, x(1) = 3} is {X (0) = 5, X (1) = −1}. It can be verified that
IDFT gets back the time-domain samples.
With N = 4, the DFT definition is
⎡ ⎤ ⎡ ⎤⎡ ⎤
X (0) 1 1 1 1 x(0)
⎢ X (1) ⎥ ⎢ 1 − j −1 j⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ x(1) ⎥
⎣ X (2) ⎦ = ⎣ 1 −1 1 −1 ⎦ ⎣ x(2) ⎦
X (3) 1 j −1 − j x(3)

Using vector and matrix quantities, the DFT definition is given by

X = Wx

where X is the coefficient vector, W is the transform matrix, and x is the input vector.
The transform matrix W is
⎡ 2π 2π 2π 2π ⎤ ⎡ − j0 ⎤ ⎡ ⎤
e− j0 4 0 e− j0 4 1 e− j0 4 2 e− j0 4 3 e e− j0 e− j0 e− j0 1 1 1 1
⎢ − j1 2π4 0 2π ⎥ ⎢ π ⎥
e− j1 4 3 ⎥ ⎢ e− j0 e− j 2 e− jπ e− j 2 ⎥ ⎢ ⎥
2π 2π 3π
⎢e e− j1 4 1 e− j1 4 2 1 − j −1 j
⎢ − j2 2π 0 2π ⎥ = ⎢ − j0 ⎥=⎢ ⎥
⎣e 4

e− j2 4 1

e− j2 4 2 e− j2 4 3 ⎦ ⎣ e e− jπ e− j2π e− j3π ⎦ ⎣ 1 −1 1 −1 ⎦

e− j3 4 0 e − j3 2π
4 1 e − j3 2π
4 2

e− j3 4 3
3π 9π
e− j0 e− j 2 e− j3π e− j 2 1 j −1 − j

The IDFT definition is


⎡ ⎤ ⎡ ⎤⎡ ⎤
x(0) 1 1 1 1 X (0)
⎢ x(1) ⎥ 1⎢ j −1 − j ⎥ ⎢ ⎥
⎢ ⎥ ⎢1 ⎥ ⎢ X (1) ⎥
⎣ x(2) ⎦ = 4 ⎣ 1 −1 1 −1 ⎦ ⎣ X (2) ⎦
x(3) 1 − j −1 j X (3)

Concisely,
1 −1 1
x= W X = (W ∗ )X
4 4
2.3 The DFT and the IDFT 43

The inverse and forward transform matrices are orthogonal. That is,
⎡ ⎤⎡ ⎤ ⎡ ⎤
1 1 1 1 1 1 1 1 1 0 0 0
1⎢⎢ 1 j −1 − j ⎥ ⎢ 1 − j −1
⎥⎢ j ⎥ ⎢0
⎥=⎢ 1 0 0⎥⎥
4 ⎣ 1 −1 1 −1 ⎦ ⎣ 1 −1 1 −1 ⎦ ⎣ 0 0 1 0⎦
1 − j −1 j 1 j −1 − j 0 0 0 1

With N = 8, the transform matrix W is


⎡ ⎤
1 1 1 1 1 1 1 1
⎢1 0.71 − j0.71 − j −0.71 − j0.71 −1 −0.71 + j0.71 j 0.71 + j0.71 ⎥
⎢ ⎥
⎢1 −j −1 j 1 − j −1 j⎥
⎢ ⎥
⎢ 1 −0.71 − j0.71 j 0.71 − j0.71 −1 0.71 + j0.71 − j −0.71 + j0.71 ⎥

W =⎢ ⎥
⎢1 −1 1 −1 1 −1 1 −1 ⎥⎥
⎢ 1 −0.71 + j0.71 −j 0.71 + j0.71 −1 0.71 − j0.71 j −0.71 − j0.71 ⎥
⎢ ⎥
⎣1 j −1 −j 1 j −1 −j ⎦
1 0.71 + j0.71 j −0.71 + j0.71 −1 −0.71 − j0.71 − j 0.71 − j0.71

⎡ ⎤
1 √ √
1 1 √ √
1 1 √ √
1 1 √ √
1
⎢1 2 2 − 22 − j 22 −1 − 22 + j 22 2 2 ⎥
⎢ 2 −j 2 −j j 2 +j 2 ⎥
⎢1 − −1 − j −1 j⎥
⎢ √ √
j √ √
j 1 √ √ √ √ ⎥
⎢ ⎥
⎢1 − 2−j 2 2 2 2 2 ⎥
− 22 + j 22
=⎢ 2 2 j 2 −j 2 −1 2 +j 2 −j ⎥
⎢1 −1 1 −1 1 −1 1 −1 ⎥
⎢ √ √ √ √ √ √ √ √ ⎥
⎢ ⎥
⎢ 1 − 22 + j 22 −j 2
2 +j 2
2 −1 2
2 −j 2
2 j 2 2
− 2 −j 2 ⎥
⎢ ⎥
⎣1 j −1 − j 1 j −1 − j⎦
√ √ √ √ √ √ √ √
2 2 − 22 + j 22 −1 − 22 − j 22 2 2
1 2 +j 2 j −j 2 −j 2

The samples of the complex exponential e− j N kn are called the twiddle factors.

They are the N th roots of unity. The twiddle factors are periodic of periodic N .
They are called twiddle factors because multiplying a complex number with them is
changing the phase of the number only. The periodicity of the twiddle factors with
N = 8 and the discrete frequencies are shown in Fig. 2.2. At these discrete frequen-
cies, called the bins, the DFT coefficients are computed. The frequency increment of
the DFT spectrum is 1/8 cycles per sample, which is also the fundamental frequency.
The frequency index 0 corresponds to the DC, the average value of the time-domain
waveform.

Example 2.1 The DFT of 4-point impulse signal

δ(n) = {x(0) = 1, x(1) = 0, x(2) = 0, x(3) = 0}


44 2 The Discrete Fourier Transform

Im
2π 2π
e−j 8 6 = j = e−j 8 14 = ...
√ √ 2 √ √
2π 2π 2π 2π
e−j 8 5 = − 22 +j 22 = e−j 8 13 = ... 3 8 1 e−j 8 7 = 2
2 +j 2
2
= e−j 8 15 = ...
8 8

2π 2π 4 2π 2π 2π
e−j 8 4 = −1 = e−j 8 12 = ... 8 e−j 8 nk
0 e−j 8 0 = 1 = e−j 8 8 = ...
Re


√ √ 2π 2π
√ √ 2π
2 2 2 2
e−j 8 3 =− 2 −j 2 = e−j 8 11 = ... 5 7 e−j 8 1 = 2 −j 2 = e−j 8 9 = ...
8 8
6
8
2π 2π
e−j 8 2 = −j = e−j 8 10 = ...

Fig. 2.2 Periodicity of the twiddle factors with N = 8 and the discrete frequencies

is computed as
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
X (0) 1 1 1 1 1 1
⎢ X (1) ⎥ ⎢ 1 − j −1 j ⎥⎢0⎥ ⎢1⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥ = ⎢ ⎥
⎣ X (2) ⎦ = ⎣ 1 −1 1 −1 ⎦ ⎣ 0 ⎦ ⎣ 1 ⎦
X (3) 1 j −1 − j 0 1

The DFT spectrum of the impulse {X (0) = 1, X (1) = 1, X (2) = 1, X (3) = 1} is


uniform. The magnitude of all the frequency components is 1 and the phase is zero.
The reconstructed waveform from the spectrum is given by

1 2π 2π 2π
x(n) = (1 + e j 4 n + e j2 4 n + e j3 4 n )
4
1 π    1 for n = 0
= 1 + 2 cos n + cos(πn) =
4 2 0 for n = 1, 2, 3

The IDFT of the spectrum formally gets back the input δ(n).
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
x(0) 1 1 1 1 1 1
⎢ x(1) ⎥ 1 ⎢ 1 j −1 − j ⎥⎢1⎥ ⎢0⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥ = ⎢ ⎥
⎣ x(2) ⎦ = 4 ⎣ 1 −1 1 −1 ⎦ ⎣ 1 ⎦ ⎣ 0 ⎦
x(3) 1 − j −1 j 1 0

The DFT of the delayed impulses are

δ(n − 1) = {0, 1, 0, 0} ↔ X (k) = {1, − j, −1, j}


δ(n − 2) = {0, 0, 1, 0} ↔ X (k) = {1, −1, 1, −1}
δ(n − 3) = {0, 0, 0, 1} ↔ X (k) = {1, j, −1, − j}
2.3 The DFT and the IDFT 45

Therefore, the DFT of the rows or columns of the identity matrix


⎡ ⎤
1 0 0 0
⎢0 1 0 0⎥
⎢ ⎥
⎣0 0 1 0⎦
0 0 0 1

is the DFT transform matrix.


⎡ ⎤
1 1 1 1
⎢ 1 − j −1 j⎥
⎢ ⎥
⎣ 1 −1 1 −1 ⎦
1 j −1 − j

The transform matrix can be generated using this procedure, for any N , in software
implementation. That is, form the identity matrix of the required order and compute
the DFT of its rows or columns to get the DFT transform matrix.

Example 2.2 The DFT of the DC signal, x(n) = e j0 4 n ,

{x(0) = 1, x(1) = 1, x(2) = 1, x(3) = 1}

is computed as
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
X (0) 1 1 1 1 1 4
⎢ X (1) ⎥ ⎢ 1 − j −1 j ⎥⎢1⎥ ⎢0⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥ = ⎢ ⎥
⎣ X (2) ⎦ = ⎣ 1 −1 1 −1 ⎦ ⎣ 1 ⎦ ⎣ 0 ⎦
X (3) 1 j −1 − j 1 0

The DFT spectrum is {X (0) = 4, X (1) = 0, X (2) = 0, X (3) = 0}. The spectrum of
the DC signal is nonzero only at k = 0, since its frequency index is zero. Using the
IDFT, we get back the input x(n).
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
x(0) 1 1 1 1 4 1
⎢ x(1) ⎥ 1 ⎢ 1 j −1 − j ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥= ⎢ ⎥⎢0⎥ = ⎢1⎥
⎣ x(2) ⎦ 4 ⎣ 1 −1 1 −1 ⎦ ⎣ 0 ⎦ ⎣ 1 ⎦
x(3) 1 − j −1 j 0 1

Example 2.3 The DFT of the alternating signal, x(n) = e j2 4 n ,

{x(0) = 1, x(1) = −1, x(2) = 1, x(3) = −1}


46 2 The Discrete Fourier Transform

is computed as
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
X (0) 1 1 1 1 1 0
⎢ X (1) ⎥ ⎢ 1 − j −1 j ⎥ ⎢ −1 ⎥ ⎢ 0 ⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥=⎢ ⎥
⎣ X (2) ⎦ = ⎣ 1 −1 1 −1 ⎦ ⎣ 1 ⎦ ⎣ 4 ⎦
X (3) 1 j −1 − j −1 0

The DFT spectrum is

X (k) = 4δ(k − 2) = {X (0) = 0, X (1) = 0, X (2) = 4, X (3) = 0}

The spectrum of the alternating signal is nonzero only at k = 2, since its frequency
index is 2. Using the IDFT, we get back the input x(n).
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
x(0) 1 1 1 1 0 1
⎢ x(1) ⎥ 1 ⎢ 1 j −1 − j ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ 0 ⎥ = ⎢ −1 ⎥
⎣ x(2) ⎦ = 4 ⎣ 1 −1 1 −1 ⎦ ⎣ 4 ⎦ ⎣ 1⎦
x(3) 1 − j −1 j 0 −1

Example 2.4 The DFT of


√ √
{x(0) = (3 − 0.5 3), x(1) = 0.5, x(2) = (3 + 0.5 3), x(3) = 1.5}

is computed as
⎡ ⎤ ⎡ ⎤⎡ √ ⎤ ⎡ ⎤
X (0) 1 1 1 1 (3 − 0.5 3) √ 8
⎢ X (1) ⎥ ⎢ 1 − j −1 j⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥⎢ √0.5 ⎥ = ⎢ − 3 + j ⎥
⎣ X (2) ⎦ = ⎣ 1 −1 1 −1 ⎦ ⎣ (3 + 0.5 3) ⎦ ⎣ √ 4⎦
X (3) 1 j −1 − j 1.5 − 3− j

The DFT spectrum, as shown in Fig. 2.1b, is


√ √
{X (0) = 8, X (1) = (− 3 + j), X (2) = 4, X (3) = (− 3 − j)}

Using the IDFT, we get back the input x(n).


⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ √ ⎤
x(0) 1 1 1 1 √ 8 (3 − 0.5 3)
⎢ x(1) ⎥ 1 ⎢ 1 j −1 − j ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥⎢− 3 + j ⎥ = ⎢ √0.5 ⎥
⎣ x(2) ⎦ = 4 ⎣ 1 −1 1 −1 ⎦ ⎣ √ 4 ⎦ ⎣ (3 + 0.5 3) ⎦
x(3) 1 − j −1 j − 3− j 1.5

From the preceding examples, we find that



e jk0 N n ↔ N δ(k − k0 )
2.3 The DFT and the IDFT 47


Example 2.5 The samples of one period of the complex exponential x(n) = e j3 4 n
are
{x(0) = 1, x(1) = − j, x(2) = −1, x(3) = j}

and ⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
X (0) 1 1 1 1 1 0
⎢ X (1) ⎥ ⎢ 1 − j −1 j ⎥⎢−j ⎥ ⎢0⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥=⎢ ⎥
⎣ X (2) ⎦ = ⎣ 1 −1 1 −1 ⎦ ⎣ −1 ⎦ ⎣ 0 ⎦
X (3) 1 j −1 − j j 4
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
x(0) 1 1 1 1 0 1
⎢ x(1) ⎥ 1 ⎢ 1 j −1 − j ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥⎢0⎥ = ⎢−j ⎥
⎣ x(2) ⎦ = 4 ⎣ 1 −1 1 −1 ⎦ ⎣ 0 ⎦ ⎣ −1 ⎦
x(3) 1 − j −1 j 4 j

Example 2.6 The samples of one period of the complex exponential x(n) =
π π
e j ( 4 n+ 4 ) = e j 4 e j 4 n are
2π 2π

 
1 1 1 1 1 1 1 1
x(0) = √ + j √ , x(1) = − √ + j √ , x(2) = − √ − j √ , x(3) = √ − j √
2 2 2 2 2 2 2 2

and
⎡ ⎤ ⎡ ⎤ ⎡ √1 + j √12
⎤ ⎡ ⎤
X (0) 1 1 1 1 2 √ √0
⎢ X (1) ⎥ ⎢ 1 − j −1 j ⎥⎢⎢ − √12 + 1 ⎥
j √2 ⎥ ⎢ 2 2 + j2 2 ⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥=⎢ ⎥
⎣ X (2) ⎦ = ⎣ 1 −1 1 −1 ⎦ ⎣ − √12 − j √12 ⎦ ⎣ 0⎦
X (3) 1 j −1 − j √1 − j √12 0
2

⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ √1 + j √12

x(0) 1 1 1 1 √ √0 2
⎢ x(1) ⎥ 1 ⎢ 1 j −1 − j ⎥ ⎢ 2 2 + j2 2 ⎥ ⎢
⎢ − √12 + j √12 ⎥

⎢ ⎥ ⎢ ⎥⎢ ⎥=⎢
⎣ x(2) ⎦ = 4 ⎣ 1 −1 1 −1 ⎦ ⎣ 0 ⎦ ⎣ − √12 −

j √12 ⎦
x(3) 1 − j −1 j 0 √1 − j √12
2

The complex exponential is the standard unit in Fourier analysis. The DFT of a
real sinusoid can be obtained using the Euler’s formula.
 
2π 1
k0 n + θ = (e jθ e j N k0 n + e− jθ e− j N k0 n )
2π 2π
x(n) = cos
N 2

Since the DFT of complex exponentials with unit amplitude is N , we get


 
2π N
x(n) = cos k0 n + θ ↔ X (k) = (e jθ δ(k − k0 ) + e− jθ δ(k − (N − k0 )))
N 2
48 2 The Discrete Fourier Transform

As the signals are periodic, e− j N k0 n = e j N n(N −k0 ) . With θ = 0 and θ = − π2 , we get


2π 2π

 
2π N
cos k0 n ↔ (δ(k − k0 ) + δ(k − (N − k0 )))
N 2
 
2π N
sin k0 n ↔ (− jδ(k − k0 ) + jδ(k − (N − k0 )))
N 2

Example 2.7 The samples of one period of the cosine waveform x(n) = cos( 2π
4
n)
are {x(0) = 1, x(1) = 0, x(2) = −1, x(3) = 0} and
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
X (0) 1 1 1 1 1 0
⎢ X (1) ⎥ ⎢ 1 − j −1 j ⎥⎢ 0⎥ ⎢2⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥=⎢ ⎥
⎣ X (2) ⎦ = ⎣ 1 −1 1 −1 ⎦ ⎣ −1 ⎦ ⎣ 0 ⎦
X (3) 1 j −1 − j 0 2
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
x(0) 1 1 1 1 0 1
⎢ x(1) ⎥ 1 ⎢ 1 j −1 − j ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥⎢2⎥ = ⎢ 0⎥
⎣ x(2) ⎦ = 4 ⎣ 1 −1 1 −1 ⎦ ⎣ 0 ⎦ ⎣ −1 ⎦
x(3) 1 − j −1 j 2 0

Example 2.8 The samples of one period of the sine waveform x(n) = sin( 2π
4
n) are
{x(0) = 0, x(1) = 1, x(2) = 0, x(3) = −1} and
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
X (0) 1 1 1 1 0 0
⎢ X (1) ⎥ ⎢ 1 − j −1 j⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ 1 ⎥ = ⎢ − j2 ⎥
⎣ X (2) ⎦ = ⎣ 1 −1 1 −1 ⎦ ⎣ 0 ⎦ ⎣ 0⎦
X (3) 1 j −1 − j −1 j2
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
x(0) 1 1 1 1 0 0
⎢ x(1) ⎥ 1 ⎢ 1 j −1 − j ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ − j2 ⎥ = ⎢ 1 ⎥
⎣ x(2) ⎦ = 4 ⎣ 1 −1 1 −1 ⎦ ⎣ 0 ⎦ ⎣ 0⎦
x(3) 1 − j −1 j j2 −1

Example 2.9 The samples of one period of the sinusoid x(n) = cos( 2π n − π3 ) are
√ √ 4
{x(0) = 0.5, x(1) = 0.5 3, x(2) = −0.5, x(3) = −0.5 3} and
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
X (0) 1 1 1 1 0.5
√ √0
⎢ X (1) ⎥ ⎢ 1 − j −1 j⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ 0.5 3 ⎥ = ⎢ 1 − j 3 ⎥
⎣ X (2) ⎦ = ⎣ 1 −1 1 −1 ⎦ ⎣ −0.5 ⎦ ⎣ 0 ⎦
√ √
X (3) 1 j −1 − j −0.5 3 1+ j 3
2.3 The DFT and the IDFT 49
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
x(0) 1 1 1 1 √0 0.5

⎢ x(1) ⎥ 1 ⎢ 1 j −1 − j ⎥ ⎢ j 3⎥ ⎢ ⎥
⎢ ⎥= ⎢ ⎥⎢1 − ⎥ = ⎢ 0.5 3 ⎥
⎣ x(2) ⎦ 4 ⎣ 1 −1 1 −1 ⎦ ⎣ ⎦ ⎣ −0.5 ⎦
√0 √
x(3) 1 − j −1 j 1+ j 3 −0.5 3

A finite or infinite sequence

az n = {a, az, az 2 , . . . , }

is a geometric sequence, where a and z are some fixed numbers. The first value is a
constant. The rest of the values are the product of the preceding value by the common
ratio. A geometric series is a series composed of the terms of a geometric sequence.
For example,

N −1

= 1 + z + z 2 + · · · + z N −1 , z = e− j N

SN =
n=0

is a geometric series. To find the sum in a closed form, we multiply S N by z to get


zS N . Now,
1 − zN
S N − zS N = 1 − z N and S N =
1−z

The DFT of the rectangular waveform is derived as follows.



1 for n = 0, 1, . . . , L − 1
x(n) =
0 for n = L , L + 1, . . . , N − 1


L−1
1 − e− j N Lk

ej N
2π L
2 k
− e− j N
2π L
2 k
e− j N nk =

X (k) = =
1 − e− j N k e j N 2 − e− j N 2
2π 2π k 2π k
n=0
 2π L   
− j 2π (L−1) sin k − π
(L−1)k
sin Nπ Lk
=e N 2 k
 k = e N
N 2 j
 
sin 2πN 2
sin Nπ k

Verify the DFT of δ(n) and DC signals, obtained in Examples 2.1 and 2.2, using this
formula.

Example 2.10 The samples of a signal are {x(0) = 1, x(1) = 1, x(2) = 0, x(3) =
0} and
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
X (0) 1 1 1 1 1 2
⎢ X (1) ⎥ ⎢ 1 − j −1 j⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥⎢1⎥ = ⎢1 − j ⎥
⎣ X (2) ⎦ = ⎣ 1 −1 1 −1 ⎦ ⎣ 0 ⎦ ⎣ 0⎦
X (3) 1 j −1 − j 0 1+ j
50 2 The Discrete Fourier Transform
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
x(0) 1 1 1 1 2 1
⎢ x(1) ⎥ 1 ⎢ 1 j −1 − j ⎥⎢1 − j ⎥ ⎢1⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥=⎢ ⎥
⎣ x(2) ⎦ = 4 ⎣ 1 −1 1 −1 ⎦ ⎣ 0⎦ ⎣0⎦
x(3) 1 − j −1 j 1+ j 0

Example 2.11 The samples of a signal are {x(0) = 1 + j1, x(1) = 2 − j1, x(2) =
1 + j2, x(3) = 2 + j2} and
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
X (0) 1 1 1 1 1 + j1 6 + j4
⎢ X (1) ⎥ ⎢ 1 − j −1 j⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ 2 − j1 ⎥ = ⎢ −3 − j ⎥
⎣ X (2) ⎦ = ⎣ 1 −1 1 −1 ⎦ ⎣ 1 + j2 ⎦ ⎣ −2 + j2 ⎦
X (3) 1 j −1 − j 2 + j2 3− j
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
x(0) 1 1 1 1 6 + j4 1+ j1
⎢ x(1) ⎥ 1 ⎢ 1 j −1 − j ⎥ ⎢ −3 − j ⎥ ⎢ 2 − j1 ⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥=⎢ ⎥
⎣ x(2) ⎦ = 4 ⎣ 1 −1 1 −1 ⎦ ⎣ −2 + j2 ⎦ ⎣ 1 + j2 ⎦
x(3) 1 − j −1 j 3− j 2+ j2

2.4 Applications of the DFT and the IDFT

Fourier analysis has innumerable applications in science and engineering. All the
applications are based on the easier interpretation and characterization of the sig-
nal characteristics through the Fourier amplitude and power spectrum, its ability to
provide signal compression with adequate accuracy and reduce the computational
complexity of important operations such as convolution and correlation. One has to
adapt these abilities to suit the specific application. In this and later chapters, we
present some examples of the applications of Fourier analysis.

2.4.1 Fourier Boundary Descriptor

In image processing, objects in an image have to be identified. For that purpose, the
image is segmented using the properties of the objects. The segmented objects have
to be compactly represented. One way of characterizing an object is by its boundary
representation. A boundary can be described by its coordinates. The objective is to
minimize the storage requirements in representing it. Fourier boundary descriptor is
one of the effective methods to represent the boundary of an object.
A closed boundary is represented by a set of its coordinates in the spatial domain.
At each point on the boundary, a complex number is formed with its real part being the
x-coordinate and the imaginary part being the y-coordinate. The set of the complex
numbers is a periodic complex data, the period being the number of points on the
boundary. Let the N boundary coordinates be
2.4 Applications of the DFT and the IDFT 51

{(x(0), y(0)), (x(1), y(1)), . . . , (x(N − 1), y(N − 1))}

The complex number representation of the boundary becomes

b(n) = {(x(0) + j y(0)), (x(1) + j y(1)), . . . , (x(N − 1) + j y(N − 1))}

The 1-D DFT of this set, B(k), is the Fourier descriptor of the boundary with signif-
icant advantages. The 2-D data is represented by a 1-D data.
It is desirable that the descriptor is as much insensitive as possible for scaling,
translation, and rotation of the boundary. The properties of the DFT make it to relate
the Fourier descriptors of a boundary and its modified versions. Consider the 4 × 4
binary image x(m, n) and its shifted version x(m − 1, n − 1)
⎡ ⎤ ⎡ ⎤
1 1 1 0 0 0 0 0
⎢1 0 1 0⎥ ⎢0 1 1 1⎥
x(m, n) = ⎢
⎣1
⎥ x(m − 1, n − 1) = ⎢ ⎥
1 1 0⎦ ⎣0 1 0 1⎦
0 0 0 0 0 1 1 1

The complex data formed from the boundary coordinates of x(m, n) is

b(n) = {0 + j0, 1 + j0, 2 + j0, 2 + j1, 2 + j2, 1 + j2, 0 + j2, 0 + j1}

It is assumed that the top left corner is the origin. The DFT of b(n) is

B(k) = {8 + j8, −6.8284 − j6.8284, 0, 0, 0, −1.1716 − j1.1716, 0, 0}

The complex data formed from the boundary coordinates of x(m − 1, n − 1) is

bs(n) = {1 + j1, 2 + j1, 3 + j1, 3 + j2, 3 + j3, 2 + j3, 1 + j3, 1 + j2}

The DFT of bs(n) is

B S(k) = {16 + j16, −6.8284 − j6.8284, 0, 0, 0, −1.1716 − j1.1716, 0, 0}

The translation of the boundary can be found by the change in the DC coefficients
of the two DFTs, the remaining being the same.
Consider the 4 × 4 binary image x(m, n) and its 90◦ anticlockwise rotated version
xr (m, n) ⎡ ⎤ ⎡ ⎤
0 0 0 0 0 1 1 0
⎢1 1 1 1⎥ ⎢0 1 1 0⎥
x(m, n) = ⎢ ⎥ ⎢
⎣ 1 1 1 1 ⎦ xr (m, n) = ⎣ 0 1 1 0 ⎦

0 0 0 0 0 1 1 0
52 2 The Discrete Fourier Transform

The complex data formed from the boundary coordinates of x(m, n) is

b(n) = {1 + j0, 1 + j1, 1 + j2, 1 + j3, 2 + j0, 2 + j1, 2 + j2, 2 + j3}

The DFT of b(n) is

B(k) = {12 + j12, −1 + j2.4142, −4 − j4, −1 + j0.4142,


− j4, −1 − j0.4142, 4 − j4, −1 − j2.4142}

The complex data formed from the boundary coordinates of br (n) is

br (n) = {0 + j1, −1 + j1, −2 + j1, −3 + j1, 0 + j2,


π
− 1 + j2, −2 + j2, −3 + j2} = e j 2 b(n)

Note that the coordinates are shifted due to rotation. The DFT of br (n) is

B R(k) = {−12 + j12, −2.4142 − j1, 4 − j4, −0.4142 − j1,


π
4, 0.4142 − j1, 4 + j4, 2.4142 − j1} = e j 2 B(k)

The DFT of the starting-point shifted complex data formed from the coordinates
of the boundary of b(n) can be obtained using the time-domain shift theorem. The
DFT of scaled complex data formed from the coordinates of the boundary of b(n) is
also the scaled version of B(k), due to the linearity of the DFT.
Figure 2.3a, b show, respectively, a triangular boundary and the normalized mag-
nitude of part of its Fourier descriptor. The first and the last 16 DFT coefficients
are shown by dots and crosses, respectively. A 464-point complex data sequence is
formed from the pair of 464 boundary coordinates and its DFT is computed. As the
data is arbitrary and complex, the DFT coefficients do not exhibit any symmetry.
Figure 2.3c, d show the reconstructed boundary using only 32 and 16, respectively,
of the largest of the 464 DFT coefficients. Despite the use of much fewer coefficients,
the reconstructed boundary is quite close to the original.
In Fourier analysis, a real signal is decomposed in terms of real sinusoids or com-
plex sinusoids with conjugate frequencies. The most famous example is the recon-
struction of a square wave from its Fourier spectrum. As the number of frequency
components is increased in the reconstruction, the synthesized waveform becomes
closer to the original waveform by constructive and destructive interferences.
In the Fourier boundary descriptor, the input signal is arbitrary and complex.
Therefore, the components to reconstruct a waveform are complex exponentials
with pure imaginary exponents, whose shape is a circle. The diameter of the circle
is proportional to the magnitude of the corresponding Fourier coefficient. As in
the case of real signals, the magnitude of the coefficients become negligible over a
considerable range of the spectrum. Therefore, a boundary can be represented with
fewer coefficients with a required accuracy.
Figure 2.4a shows the circles corresponding to three of the largest DFT
coefficients, in addition to the DC. The reconstructed boundary using these DFT
2.4 Applications of the DFT and the IDFT 53

(a) (b)
1

|B(k)| , normalized
0

0 4 8 12 448 463
k
(c) (d)

Fig. 2.3 a A triangular boundary; b the magnitude of the largest 32 of the 464 DFT coefficients
(normalized) of the boundary points; c and d the reconstructed boundaries using only the largest
32 and 16 DFT coefficients, respectively

coefficients is also shown, which is an approximation of the actual boundary. The


smallest circle corresponds to a higher frequency and it suitably adds negative and
positive values to the larger circles, thereby making it closer to the actual boundary.
Now, the addition of the DC component of the DFT, which represents the average
of the two coordinates, fixes the center of the boundary. With just the DC and five
other DFT coefficients, the approximation of the boundary is quite good, as shown
in Fig. 2.4b. Therefore, a major advantage, as in other applications of the DFT, is that
the shape can be adequately described by much fewer than the N coefficients. As
noise is generally present at all frequencies, this leads to reduce the noise affecting
the boundary points. A further advantage is that the 2-D shape is described by 1-D
data.
54 2 The Discrete Fourier Transform

(b) 80
(a)

60
50
40

20
0

-50 -20

-40
-50 0 50 -100 -50 0 50 100

Fig. 2.4 a Three circles corresponding to three DFT coefficients and the boundary corresponding
to their combined effect; b the reconstructed boundary using the DC and five other DFT coefficients
only

2.5 Summary

• Transform methods change a problem into another equivalent form so that it is


relatively easier to interpret and solve the problem.
• Fourier analysis represents an arbitrary signal in terms of sinusoidal (or its math-
ematically equivalent complex exponential) signals to gain significant advantages
in its processing.
• While physical devices generate sinusoidal signals, the complex exponential is
advantageous for analysis purposes.
• Fourier analysis has four different versions to suit different types of signals.
• The DFT is the only version in which the signal is finite and discrete in both
the time and frequency domains. Therefore, it is the only version suitable for
implementation on digital systems and, consequently, it is most often used in
practice.
• The DFT is the simplest version of the Fourier analysis to understand and it is
easier to visualize the decomposition of the waveforms in that form.
• The decomposition of the waveforms, in Fourier analysis, is based on the orthog-
onality property of the sinusoids and complex exponentials.
• The Fourier representation of a signal is with respect to the least squares error
criterion.
• The complex exponential basis signals of the DFT are equidistant samples on the
unit circle.
• The DFT has both algebraic and matrix forms.
• While the theory of Fourier analysis requires frequency components of
infinite order to represent an arbitrary waveform exactly, it is found that adequate
2.5 Summary 55

approximation of the practical signals is possible with a finite number of frequency


components. This is due to the rate of fall of the magnitude of the frequency com-
ponents of practical signals with increasing frequency.
• The DFT assumes periodic extension of a finite length signal and represents it in
terms of a finite number of discrete sinusoids.
• The major advantages of Fourier analysis are the importance of the magnitude and
power spectra of signals in large number of applications and reducing indispensable
operations, such as convolution and correlation, into relatively simpler operations.
• Fourier analysis is dominating in both the theoretical and practical study of signals
and LTI systems. The reasons are the insight it provides about the characteristics
of signals and systems and the availability of fast algorithms for its practical
implementation.

Exercises
2.1 Find the product of the two numbers after representing them in exponential form
with base 2.
2.1.1 256 and 128.
* 2.1.2 64 and 512.
2.1.3 32 and 128.
2.2 Using the Euler’s formula, find the complex exponential representation of the
signal in terms of: (i) the real and imaginary parts and (ii) amplitude and phase. Find
the samples of all the
 three forms
 and verify that they are the same.
2.2.1 x(n) = 4 cos π4 n − π3
 
* 2.2.2 x(n) = 2 cos π4 n + π6
√    
2.2.3 x(n) = 3 cos π4 n − sin π4 n
2.3 Compute the DFT, X (k), of x(n) using the matrix form of the DFT. Compute the
IDFT of X (k) to get back x(n).
2.3.1 x(n) = {1, 2, 3, 4}
2.3.2 x(n) = {−2, −1, 3, 4}
2.3.3 x(n) = {3, −1, 2, 4}
2.3.4 x(n) = {1 + j3, 2 + j2, 1 − j1, 3 + j2}
* 2.3.5 x(n) = {1 + j3, 2 + j2, 3 + j1, 4 − j4}
2.3.6 x(n) = {3 + j3, 2 + j2, −1 + j1, 2 − j4}
2.4 Find the samples of x(n) over one period and use the matrix form of the DFT to
compute the spectrum X (k) of the set of samples. Using X (k), find the exponential
form of x(n) and reduce the expression to real form. Verify that the input x(n) is
obtained.  
2.4.1 x(n) = 1 + 3 cos 2π n + π6 + 2 cos(πn).

4 
* 2.4.2 x(n) = 1 − 2 sin 2π n − π − 3 cos(πn).
 2π 4 π  3
2.4.3 x(n) = 1 − cos 4 n − 4 + cos(πn).
 
2.4.4 x(n) = 3 + sin 2π n − π4 − cos(πn).
4  
2.4.5 x(n) = −1 − 2 cos 2π 4
n − π3 − 3 cos(πn).
Chapter 3
Properties of the DFT

In signal and system analysis, we frequently carry out operations on signals, such
as shifting, scaling, multiplication, differentiation, integration. The properties relate
the effect of an operation in one domain in the other. It is of interest to know the
time–frequency-domain correlations. It helps to select the appropriate domain for
interpretation and operation of signals. Further, the transforms of a set of related
signals can be determined more easily from the knowledge of the transform of some
simple signals.

3.1 Linearity

Let x(n) ↔ X (k) and y(n) ↔ Y (k), both the sequences with period N . Then,

ax(n) + by(n) ↔ a X (k) + bY (k)

where a and b are arbitrary constants. The DFT of a linear combination of a set of
signals is the same linear combination of the DFT of the individual signals. If

ˇ −1 + j3, 0, −1 − j3} and


x(n) = {2̌, 1, 3, 4} ↔ X (k) = {10,

y(n) = {1̌, −2, 3, −1} ↔ Y (k) = {1̌, −2 + j1, 7, −2 − j1}

then

ˇ 4 + j3, −21, 4 − j3}


2x(n) − 3y(n) = {1̌, 8, −3, 11} ↔ 2X (k) − 3Y (k) = {17,

The value of the signal with index zero is indicated by a check mark on it. The length
of the two signals must be the same. If necessary, zero padding can be employed.
© Springer Nature Singapore Pte Ltd. 2018 57
D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7_3
58 3 Properties of the DFT

3.2 Periodicity

Let x(n) ↔ X (k) with period N . Then,

x(n + a N ) = x(n), for all n and X (k + a N ) = X (k), for all k

where a is an arbitrary integer. If a signal x(n) is periodic with period N samples,


then its values over any successive N samples are the same. Let

ˇ 1 + j3, 0, 1 − j3}
x(n) = {3̌, 1, 2, 4} ↔ X (k) = {10,

As −4 mod 4 = 0, x(−4) = x(0) = 3. Similarly, X (5) = X (1) = 1 + j3.


2π 2π
With the exponential e j N nk0 also periodic with period N , x(n)e j N nk0 is also
periodic with period N . Therefore, the DFT coefficients are periodic and can be
determined using the expression

−1
a+N
x(n)e− jk N n , k = 0, 1, 2, . . . , N − 1

X (k) = (3.1)
n=a

where a is an arbitrary integer. Therefore, given a set of samples starting with index
other than zero, Eq. (3.1) can be used. Alternately, the given N -point sequence can
be periodically extended and the samples starting with index zero can be obtained.
Then, Eq. (3.1), with a = 0, can be used. For example,

x(n) = {2̌, 1, 2, 4} ↔ X (k) = {9̌, j3, −1, − j3}

The periodic extension of x(n) is

{. . . , 2, 1, 2, 4, 2, 1, 2, 4, 2̌, 1, 2, 4, 2, 1, 2, 4, 2, 1, 2, 4, . . .}

Then, for example,

x(n) = {2, 4, 2̌, 1} ↔ X (k) = {9̌, j3, −1, − j3}

using Eq. (3.1) with a = −2. Similarly, the IDFT can be computed using any suc-
cessive N samples of the periodic DFT spectrum.
Another implication of the periodicity is that the convolution and other operations
implemented using the DFT are periodic or circular or cyclic. However, the linear
convolution is often required. The DFT can still be used with sufficient zero padding.
Further, the periodic extension of a N -point sequence may create discontinuities at the
boundaries. The result is that the convergence of its spectral coefficients may be slow.
It requires more number of frequency components for a fairly good representation of
the signal. This is a disadvantage in applications such as signal compression. With
suitable extensions, such as making an even-symmetric extension, this problem can
be alleviated.
3.4 Circular Frequency Shifting 59

3.3 Circular Time Shifting

Let x(n) ↔ X (k) with period N . Then,

x(n ± n 0 ) ↔ e± j N kn 0 X (k)

where n 0 is an arbitrary number of sampling intervals. The shift of a sinusoidal


waveform affects only its phase. There is no change in the magnitude. Therefore, the
shift of a waveform in the time domain results in adding increments to the phase of the
frequency components, which are linearly proportional to the respective frequency
indices. The increment in phase is e± j N kn 0 for a frequency component with frequency

index k due to a shift of ±n 0 sampling intervals in the time domain. For example,

x(n) = {1̌, 2, 1, 4} ↔ X (k) = {8̌, j2, −4, − j2}

x(n − 1) = {4̌, 1, 2, 1} ↔ X (k) = {8̌, j2(− j), −4(−1), − j2( j)} = {8̌, 2, 4, 2}

After shifting, the signal becomes even-symmetric and, therefore, its DFT is also
even-symmetric. The computational complexity of computing the DFT of x(n) can
be reduced by shifting it to get xs(n), computing its DFT X s(k) and, then, deducing
the DFT of x(n) from X s(k) using the shift theorem.
With x(n) advanced by 2 sampling intervals, we get

x(n + 2) = {1̌, 4, 1, 2} ↔ X (k) = {8̌, j2(−1), −4(1), − j2(−1)} = {8̌, − j2, −4, j2}

3.4 Circular Frequency Shifting

Let x(n) ↔ X (k) with period N . Then,

e± j N k0 n x(n) ↔ X (k ∓ k0 )

where k0 is an arbitrary number of sampling intervals. Since

e− j N kn e j N k0 n
2π 2π

becomes
e− j N (k−k0 )n

in the DFT definition, the spectral values get delayed by k0 sampling intervals and
occurs at frequency index k + k0 in the shifted spectrum. For example,
60 3 Properties of the DFT

ˇ 2 + j2, −2, 2 − j2}


x(n) = {3̌, 2, 1, 4} ↔ X (k) = {10,

ej

4 n ˇ 2 + j2, −2}
x(n) = {3̌, j2, −1, − j4} ↔ X (k) = {2 − j2, 10,

ej

4 2n ˇ 2 + j2}
x(n) = (−1)n x(n) = {3̌, −2, 1, −4} ↔ X (k) = {−2, 2 − j2, 10,

By multiplying x(n) by (−1)n and taking the DFT, we get the spectrum in the center-
zero format.

3.5 Circular Time-Reversal

Let x(n) ↔ X (k) with period N . Then,

x(N − n) ↔ X (N − k)

For a DFT with N = 8, the function mod(nk, 8) for each nk in e− j



8 nk in the DFT
definition, with k = {0, 1, 2, 3, 4, 5, 6, 7}, yields
⎡ ⎤
0 0 0 0 0 0 0 0
⎢0 1 2 3 4 5 6 7⎥
⎢ ⎥
⎢0 2 4 6 0 2 4 6⎥
⎢ ⎥
⎢0 3 6 1 4 7 2 5⎥
mod(nk, 8) = ⎢
⎢0

⎢ 4 0 4 0 4 0 4⎥⎥
⎢0 5 2 7 4 1 6 3⎥
⎢ ⎥
⎣0 6 4 2 0 6 4 2⎦
0 7 6 5 4 3 2 1

The mod function returns the remainder of nk divided by 8. Each row of values, for a
specific k, is the time-reversal of that of (N − k). Therefore, x(N − n) ↔ X (N − k).
For example,

ˇ −2 + j2, −2, −2 − j2}


x(n) = {1̌, 2, 3, 4} ↔ X (k) = {10,

ˇ −2 − j2, −2, −2 + j2}


x(4 − n) = {1̌, 4, 3, 2} ↔ X (k) = {10,

3.6 Duality

Duality is the interchangeability of the time-domain and frequency-domain variables


in the DFT definition. Let x(n) ↔ X (k) with period N . Then,

X (n) ↔ N x(N − k)
3.7 Transform of Complex Conjugates 61

Computing the DFT twice in succession of a signal x(n) yields N times the time-
reversal of x(n). The product of the transform matrix with itself yields a matrix whose
elements below the reverse diagonal are N (except the first entry) and, therefore, when
the input vector is multiplied by this matrix, we get a scaled and time-reversed version
of the input. With N = 8,

⎡ ⎤
1 √ √
1 1 √ √
1 1 √ √
1 1 √ √
1
⎢ 2 ⎥
⎢1 2
− j 2
− j − 2
− j 2
−1 − 22 + j 22 j 2 +j 2 ⎥
2
⎢ 2 2 2 2 ⎥
⎢1 − j −1 j 1 − j −1 j⎥
⎢ √ √ √ √ √ √ √ √ ⎥
⎢1 − 22 − j 22 − j − 22 + j 22 ⎥
2 −j 2 −1 2 +j 2
2 2 2 2
⎢ j ⎥×
⎢1 −1 1 −1 1 −1 1 −1 ⎥
⎢ √ √ √ √ √ √ √ √ ⎥
⎢ ⎥
⎢1 − 22 + j 22 − j 2
+ j 2
−1 2
− j 2
j − 22 − j 22 ⎥
⎢ 2 2 2 2 ⎥
⎣1 √ √
j −1 √


j 1 √ √
j −1 √


j⎦
1 2
2
+ j 2
2
j − 2
2
+ j 2
2
−1 − 22 − j 22 −j 2 −j 2
2 2
⎡ ⎤
1 1 1 1 1 1 1 1 ⎡ ⎤
√ √ √ √ √ √ √ √ x(0)
⎢ 2 ⎥
2 −j 2 − j − 22 − j 22 −1 − 22 + j 22 2 +j 2 ⎥
2 2 2
⎢1 j ⎢ ⎥
⎢ ⎥ ⎢ x(1) ⎥
⎢1 − j −1 j 1 − j −1 j ⎥ ⎢ x(2) ⎥
⎢ √ √ √ √ √ √ √ √ ⎥ ⎢ ⎥
⎢1 − 22 − j 22 j 2
− j 2
−1 2
+ j 2
− j − 22 + j 22 ⎥ ⎢ x(3) ⎥
⎢ 2 2 2 2 ⎥×⎢ ⎥
⎢1 −1 1 −1 1 −1 1 −1 ⎥ ⎢ x(4) ⎥
⎢ √ √ √ √ √ √ √ √ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎢1 − 22 + j 22 − j 2 +j 2
2 2
−1 2 −j 2
2 2
j − 22 − j 22 ⎥ ⎢ x(5) ⎥
⎢ ⎥ ⎣ x(6) ⎦
⎣1 √ √
j −1 √


j 1 √ √
j −1 √


j⎦
1 2
+ j 2
j − 2
+ j 2
−1 − 2
− j 2
−j 2
−j 2 x(7)
2 2 2 2 2 2 2 2
⎡ ⎤⎡ ⎤ ⎡ ⎤
8 0 0 0 0 0 0 0 x(0) x(0)
⎢0 0 0 0 0 0 0 8⎥ ⎢ ⎥ ⎢ x(7) ⎥
⎢ ⎥ ⎢ x(1) ⎥ ⎢ ⎥
⎢0 0 0 0 0 0 8 0⎥ ⎢ x(2) ⎥ ⎢ x(6) ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢0 0 0 0 0 8 0 0⎥ ⎢ ⎥ ⎢ ⎥
=⎢ ⎥ ⎢ x(3) ⎥ = 8 ⎢ x(5) ⎥ = 8x(8 − n)
⎢0 0 0 0 8 0 0 0⎥ ⎢ x(4) ⎥ ⎢ x(4) ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢0 0 0 8 0 0 0 0⎥ ⎢ ⎥ ⎢ x(3) ⎥
⎢ ⎥ ⎢ x(5) ⎥ ⎢ ⎥
⎣0 0 8 0 0 0 0 0 ⎦ ⎣ x(6) ⎦ ⎣ x(2) ⎦
0 8 0 0 0 0 0 0 x(7) x(1)

The first row of the first matrix, with k = 0, multiplied by the first column of the
second matrix and summed yields 8. For all the other rows, the sum of the product is 8
only with the (N − k)th column. In all other cases, rows and columns are orthogonal
and sum of the products is zero. For example, the DFT of {0̌, 1, 2, 3} is {6̌, −2 +
j2, −2, −2 − j2}. The DFT of this is 4{0̌, 3, 2, 1}.

3.7 Transform of Complex Conjugates

Let x(n) ↔ X (k) with period N . Then,

x ∗ (n) ↔ X ∗ (N − k) and x ∗ (N − n) ↔ X ∗ (k)


62 3 Properties of the DFT

Conjugating both sides of Eq. (2.2), we get

N −1
 N −1

∗ ∗ j 2π
x ∗ (N − n)e− j N nk

X (k) = x (n)e N nk =
n=0 n=0

Conjugating both sides of Eq. (2.2) and replacing k by N − k, we get

N −1

X ∗ (N − k) = x ∗ (n)e− j N nk

n=0

For example,

ˇ j, 1 − j2, −6 + j, 1}
x(n) = {1̌, 4, j, 3} ↔ X (k) = {8 +

ˇ j, 1, −6 − j, 1 + j2}
x ∗ (n) = {1̌, 4, − j, 3} ↔ X ∗ (4 − k) = {8 −

ˇ j, 1 + j2, −6 − j, 1}
x ∗ (4 − n) = {1̌, 3, − j, 4} ↔ X ∗ (k) = {8 −

3.8 Circular Convolution and Correlation

3.8.1 Circular Convolution of Time-Domain Sequences

Let x(n) ↔ X (k) and h(n) ↔ H (k), both with period N . Then, the circular convo-
lution of the sequences is defined as

N −1
 N −1

y(n) = x(m)h(n − m) = h(m)x(n − m), n = 0, 1, . . . , N − 1
m=0 m=0

The major difference between linear and circular convolutions is that, as the
sequences are periodic, the limits are changed from ±∞ to one period. Otherwise,
the convolution may become undefined as the sum may not remain finite. Summation
over additional periods is unnecessary, as it yields integer multiples of that of over
one period. The circular convolution of two 8-point periodic sequences x(n) and
h(n) is computed as follows. The sequences are placed on a circle, as shown in
Fig. 3.1, with one of the sequences time-reversed, h(n) as shown in (a). The sum of
the products of the corresponding values is the convolution output y(0). The time-
reversed sequence is shifted by one sample, as shown in (b). The sum of the products
of the corresponding values is the convolution output y(1). The procedure is repeated
to find the rest of the 6 outputs. The output will repeat after 8 shifts.
3.8 Circular Convolution and Correlation 63

h(6) h(7)

x(2) x(2)
h(5) x(3) x(1) h(7) h(6) x(3) x(1) h(0)

h(4) x(4) n=0 x(0) h(0) h(5) x(4) n=1 x(0) h(1)

h(3) x(5) x(7) h(1) h(4) x(5) x(7) h(2)


x(6) x(6)
h(2) h(3)

Fig. 3.1 Circular convolution

The convolution of two complex exponentials, with the same frequency k0 ω0 =



N 0
k but with different complex coefficients X (k0 ) and H (k0 ), X (k0 )e jk0 ω0 n and
H (k0 )e jk0 ω0 n

N −1
 N −1

X (k0 )e jk0 ω0 m H (k0 )e jk0 ω0 (n−m) = X (k0 )H (k0 )e jk0 ω0 n e jk0 ω0 (m−m)
m=0 m=0

= N X (k0 )H (k0 )e jk0 ω0 n

is the same complex exponential with the coefficient N X (k0 )H (k0 ). The coefficient
is the scaled product of the two coefficients of the given exponentials.

Let x(n) = e j 4 n . The samples of one period are {1, j, −1, − j}. The DFT
X (k) = {0, 4, 0, 0}. The pointwise product of X (k) with itself is {0, 16, 0, 0}, the
IDFT of which is 4{1, j, −1, − j}. We have used the convolution theorem to find
the convolution. We could have also used the defining equation of convolution in
the time domain, given above, to find the convolution. If we convolve x(n) with

h(n) = e j3 4 n , the result is zero.
The convolution output of two complex exponentials, with frequencies k0 ω0 =

k
N 0
and k1 ω0 = 2π N 1
k with complex coefficients X (k0 ) and H (k1 ), X (k0 )e jk0 ω0 n and
jk1 ω0 n
H (k1 )e

N −1
 N −1

jk0 ω0 m jk1 ω0 (n−m) jk1 ω0 n
X (k0 )e H (k1 )e = X (k0 )H (k1 )e e jmω0 (k0 −k1 )
m=0 m=0

= N X (k0 )H (k1 )e jk1 ω0 n 0 = 0

is zero.
The DFT representations of the sequences x(n) and h(n), in terms of complex
exponentials, are
64 3 Properties of the DFT

N −1 N −1
1  2π 1  2π
x(n) = X (k)e j N nk and h(n) = H (k)e j N nk
N k=0 N k=0

Since the coefficients of the convolution of the two signals in the frequency domain
are N X (k)H (k), the convolution of the sequences is given by

N −1
1  2π
y(n) = X (k)H (k)e j N nk
N k=0

That is, the IDFT of X (k)H (k) is the convolution of x(n) and h(n).

x(n) 
∗ h(n) ↔ X (k)H (k)

Therefore, convolution in the time domain corresponds to multiplication in the fre-


quency domain. This fact, along with the characterization of signals by the amplitude
and power spectrum, the compression of signals using the spectrum and the fast com-
putation of the DFT are the major reasons for the dominance of the Fourier analysis
in the study of signals and systems.
For example,

x(n) = {1̌, 4, 1, 3} ↔ X (k) = {9̌, − j, −5, j}

ˇ 2 + j2, −2, 2 − j2}


h(n) = {3̌, 2, 1, 4} ↔ X (k) = {10,

x(n)  ˇ 21, 24, 19} ↔ X (k)H (k) = {90,


∗ h(n) = {26, ˇ 2 − j2, 10, 2 + j2}

3.8.2 Circular Convolution of Frequency-Domain Sequences

The DFT representations of two 4-point sequences, x(n) and h(n), are

1 2π 2π 2π
x(n) = (X (0) + X (1)e j 4 n + X (2)e j2 4 n + X (3)e j3 4 n )
4
1 2π 2π 2π
h(n) = (H (0) + H (1)e j 4 n + H (2)e j2 4 n + H (3)e j3 4 n )
4
3.8 Circular Convolution and Correlation 65

Then,

x(n)h(n) = c(n) =
1 2π 2π 2π
(C(0) + C(1)e j 4 n + C(2)e j2 4 n + C(3)e j3 4 n
16
2π 2π 2π
+C(4)e j4 4 n + C(5)e j5 4 n + C(6)e j6 4 n )

where

C(0) = X (0)H (0)


C(1) = X (0)H (1) + X (1)H (0)
C(2) = X (0)H (2) + X (1)H (1) + X (2)H (0)
C(3) = X (0)H (3) + X (1)H (2) + X (2)H (1) + X (3)H (0)
C(4) = X (1)H (3) + X (2)H (2) + X (3)H (1)
C(5) = X (2)H (3) + X (3)H (2)
C(6) = X (3)H (3)

This is the linear convolution of the two coefficient sequences. Since the signals are 4-
point periodic, only the first four frequency components have unique representation.
Frequency components with indices 4, 5, and 6 are added with those with indices 0,
1, and 2, respectively. Therefore, we get

C(0) = X (0)H (0) + X (1)H (3) + X (2)H (2) + X (3)H (1)


C(1) = X (0)H (1) + X (1)H (0) + X (2)H (3) + X (3)H (2)
C(2) = X (0)H (2) + X (1)H (1) + X (2)H (0) + X (3)H (3)
C(3) = X (0)H (3) + X (1)H (2) + X (2)H (1) + X (3)H (0)

This is the circular convolution of the two coefficient sequences. Therefore, the
scaled circular convolution of the two frequency-domain sequences X (k) and H (K )
corresponds to multiplication of the corresponding sequences in the time domain.

1
x(n)h(n) ↔ (X (k) 
∗ H (k))
N
For example,

x(n) = {1̌, 4, −1, 3} ↔ X (k) = {7̌, 2 − j, −7, 2 + j}

h(n) = {3̌, −2, 1, 4} ↔ X (k) = {6̌, 2 + j6, 2, 2 − j6}

1 1 ˇ
x(n)h(n) = {3̌, −8, −1, 12} ↔ X (k) 
∗ H (k) = {24, 16 + j80, −8, 16 − j80}
4 4
66 3 Properties of the DFT

3.8.3 Circular Correlation of Time-Domain Sequences

Let x(n) ↔ X (k) and h(n) ↔ H (k), both with period N . The circular cross-
correlation of x(n) and h(n) is given by

N −1

r xh (n) = x( p)h ∗ ( p − n) , n = 0, 1, . . . , N − 1 ↔ X (k)H ∗ (k)
p=0

Since h ∗ (N − n) ↔ H ∗ (k), correlation operation is the same as convolution of x(n)


and h ∗ (N − n). Unlike convolution, correlation operation is not commutative, in
general.
rhx (n) = r xh (N − n) = IDFT(X ∗ (k)H (k))

For example,

x(n) = {1̌, 4, 1, −3} ↔ X (k) = {3̌, − j7, 1, j7}

h(n) = {3̌, 2, 1, −4} ↔ H (k) = {2̌, 2 − j6, 6, 2 + j6}

The cross-correlation output of x(n) and h(n) and its DFT are

ˇ 7, −18, −7} ↔ X (k)H ∗ (k) = {6̌, 42 − j14, 6, 42 + j14}


{24,

The cross-correlation output of h(n) and x(n) and its DFT are

ˇ −7, −18, 7} ↔ H (k)X ∗ (k) = {6̌, 42, + j14, 6, 42 − j14}


{24,

Correlation of a signal x(n) with itself is the autocorrelation operation.

r x x (n) = IDFT(|X (k)|2 )

The autocorrelation of x(n) is

ˇ 2, −22, 2} ↔ |X (k)|2 = {9̌, 49, 1, 49}


{27,

3.9 Sum and Difference of Sequences

Since, with k = 0, the value of all the transform matrix coefficients is unity, X (0) is
sum of the input sequence values, x(n). With N even and k = N /2, the transform
matrix coefficients form the alternating sequence, {1, −1, 1, −1, . . . , −1}. There-
fore, X (N /2) is the difference between the sum of the even- and odd-indexed values
of x(n).
3.10 Upsampling of a Sequence 67

N −1

N −2
 N −1

N
X (0) = x(n) and X = x(n) − x(n)
n=0
2 n=0,2 n=1,3

Coefficient X (0) is the sum of x(n). Coefficient X ( N2 ) is the alternating sum of x(n).
Similarly, in the frequency domain,

N −1
N −2 N −1

1  N 1  
x(0) = X (k) and x = X (k) − X (k)
N k=0 2 N k=0,2 k=1,3

Sample x(0) is the average of X (k). Sample x( N2 ) is the alternating average of X (k).
For example,
x(n) = {1̌, −4, 1, 3} ↔ X (k) = {1̌, j7, 3, − j7}

X (0) = (1̌ − 4 + 1 + 3) = 1 X (2) = (1̌ + 4 + 1 − 3) = 3

x(0) = (1̌ + j7 + 3 − j7)/4 = 1 x(2) = (1̌ − j7 + 3 + j7)/4 = 1

3.10 Upsampling of a Sequence

Let x(n) ↔ X (k), n, k = 0, 1, . . . , N − 1. If we upsample x(n) with zeros to get


xu (n), n = 0, 1, . . . , L N − 1 defined as

x( Ln ) for n = 0, L , 2L , . . . , L(N − 1)
xu (n) =
0 otherwise

where L is any positive integer, then

X u (k) = X (k mod N ), k = 0, 1, . . . , L N − 1

The DFT of the sequence xu (n) is given by

N −1
L
xu (n)e− j L N nk , k = 0, 1, . . . , L N − 1

X u (k) =
n=0

Since we have nonzero input values only at intervals of L, we can substitute n = m L.


Then, we get
68 3 Properties of the DFT

N −1

xu (m L)e− j L N m Lk

X u (k) =
m=0
N −1

x(m)e− j N mk = X (k mod N ), k = 0, 1, . . . , L N − 1

=
m=0

since N -point DFT is periodic of period N . X u (k) is the L-fold repetition of X (k).
ˇ 1, 3, 4}. Then, X (k) = {6̌, −5, + j3, −4,
Example 3.1 Let L = 3 and x(n) = {−2,
−5 − j3}.
ˇ 0, 0, 1, 0, 0, 3, 0, 0, 4, 0, 0}
xu (n) = {−2,

X u (k) = {6̌, −5, + j3, −4, −5 − j3, 6, −5, + j3, −4, −5 − j3,
6, −5, + j3, −4, −5 − j3}

Figure 3.2a shows the upsampled version of one cycle of x(n) = sin( 2π8
n) by
a factor L = 2. Its replicated spectrum is shown in (b). The spectrum of x(n) =
cos( 2π
8
n) upsampled by a factor L = 3 is shown in (c). The replicated waveform,

(a) (b)
1 4
X u(k)/j
x u(n)

0 0

-1 -4
0 2 4 6 8 10 12 14 0 1 7 9 15
n k
(c) (d)
4 0.3
X u(k)

x u(n)

0 -0.3
0 3 7 11 15 19 23 01 5 9 13 17 21
k n

Fig. 3.2 a Upsampled version of x(n) = sin( 2π8 n) by a factor L = 2; b its replicated spectrum;
c the spectrum of x(n) = cos( 2π
8 n) upsampled by a factor L = 3; d the corresponding scaled and
replicated waveform
3.11 Zero Padding the Data 69

with its amplitude reduced by a factor of 3, is shown in (d). Since the power of the
spectrum is reduced by a factor of 3 after upsampling, the amplitude of the waveform
is also reduced by a factor of 3.

3.11 Zero Padding the Data

Let x(n) ↔ X (k), n, k = 0, 1, . . . , N − 1. If we append x(n) with zeros to get


x z (n), n = 0, 1, . . . , L N − 1 defined as

x(n) for n = 0, 1, . . . , N − 1
x z (n) =
0 otherwise

where L is any positive integer, then

X z (Lk) = X (k), k = 0, 1, . . . , N − 1

The DFT of the signal x z (n) is given by

N −1
L
x z (n)e− j L N nk , k = 0, 1, . . . , L N − 1

X z (k) =
n=0

Since x z (n) is zero for n > N − 1, we get

N −1

x z (n)e− j L N nk , k = 0, 1, . . . , L N − 1

X z (k) =
n=0

Replacing k by Lk, we get

N −1

x z (n)e− j N nk = X (k), k = 0, 1, . . . , N − 1

X z (Lk) =
n=0

Example 3.2 Let L = 2 and x(n) = {1̌, 2, 3, −4}. X (k) = {2̌, −2 − j6, 6, −2 +
j6}. Then,

x z (n) = {1̌, 2, 3, 4, 0, 0, 0, 0} ↔ X z (k) = {2̌, ∗, −2 − j6, ∗, 6, ∗, −2 + j6, ∗}

The frequency increment of the spectrum is halved due to zero padding. Therefore,
the spectral values in X (k) become the even-indexed spectral values in X z (k).
Figure 3.3a, b shows, respectively, a signal with eight samples and its spectrum.
Figure 3.3c, d shows, respectively, the same signal padded up with eight zeros at the
end and the corresponding spectrum. The even-indexed spectral values are the same
70 3 Properties of the DFT

(a) 1
(b) 8
imaginary
real

X(k)
x(n)

0 0
0 2 4 6 0 2 4 6
n k
(c) 1 (d) 8

X z(k)
x z(n)

0 -6
0 2 4 6 8 10 12 14 0 2 4 6 8 10 12 14
n k
(e) (f) 1
3
2
X(k)

x(n)

0 0

-3
-1
0 2 4 6 0 2 4 6
k n
(g) (h)
3 0.5
2
X z(k)

x z(n)

0 0

-3 -0.5
0 1 2 3 4 5 6 7 8 9 1011121314 0 1 3 5 7 9 11 13
k n

Fig. 3.3 a and b shows, respectively, a signal with eight samples and its spectrum; c and d shows,
respectively, the same signal padded up with eight zeros at the end and the corresponding spectrum;
e and f shows, respectively, a spectrum with eight samples and the corresponding time-domain
signal; g and h shows, respectively, the same spectrum padded up with eight zeros in the middle of
the spectrum and the corresponding time-domain signal

as those shown in Fig. 3.3b. The odd-indexed spectral values are not specified by this
theorem. By zero padding at the end, we get interpolation of the spectral values.
A similar effect is observed in zero padding a spectrum. Fig. 3.3e, f shows,
respectively, a spectrum with eight samples and the corresponding time-domain sig-
nal. Figure 3.3g, h shows, respectively, the same spectrum padded up with eight
zeros in the middle of the spectrum (at the end in the center-zero format) and the
3.12 Symmetry Properties 71

corresponding time-domain signal. The even-indexed signal values are one-half of


those shown in Fig. 3.3f. By zero padding in the frequency domain, we get interpo-
lation of the time-domain samples.

3.12 Symmetry Properties

Let the N -point sequence and its DFT be complex-valued. Writing the DFT definition
in the more explicit form using the rectangular form of the complex numbers with

x(n) = xr (n) + j xi (n), X (k) = X r (k) + j X i (k),



− j 2π 2π 2π
e N nk
= cos nk − j sin nk ,
N N

we get

N −1


2π 2π
X r (k) + j X i (k) = (xr (n) + j xi (n)) cos nk − j sin nk (3.2)
n=0
N N

With x(n) real-valued and even, the definition reduces to

N −1



X (k) = xr (n) cos nk
n=0
N
 2π   
and X (k) is real and even, as xr (n) cos N
nk is even and xr (n) sin 2π
N
nk is odd.

x(n) real and even ↔ X (k) real and even

Figure 3.4c, d shows a real and even-symmetric signal and its real and even-symmetric
spectrum. For example,

x(n) = {1, 2, 3, 2} ↔ X (k) = {8, −2, 0, −2}

With x(n) real-valued and odd, the definition reduces to

N −1



X (k) = − j xr (n) sin nk
n=0
N
 2π 
and X (k) is purely imaginary and odd, as xr (n) cos nk is odd and xr (n)
  N
sin 2π
N
nk is even.

x(n) real and odd ↔ X (k) imaginary and odd


72 3 Properties of the DFT

(a) (b)
2 real real
4 imaginary

X(k)
x(n)

0 0
-4
hermitian
-2
0 4 8 12 0 4 8 12
n k
(c) (d)
2 real and even 8 real and even
1

X(k)
x(n)

0 4

-1
0
0 4 8 12 0 4 8 12
n k
(e) (f)
2 real and odd 8 imginary and odd
X(k)
x(n)

0 0

-2 -8
0 4 8 12 0 4 8 12
n k
(g) (h)
1 4

0
X(k)
x(n)

-1 real and even half-wave hermitian and even-indexed


-4
0 4 8 12 0 2 4 6 8 10 12 14
n k
(i) (j)
2 real and odd half-wave 8 hermitian and odd-indexed
X(k)
x(n)

0 0

-2 -8
0 4 8 12 1 3 5 7 9 11 13 15
n k

Fig. 3.4 a A real signal and b its hermitian-symmetric spectrum; c an even-symmetric real signal
and d its real and even-symmetric spectrum; e an odd-symmetric real signal and f its imaginary
and odd-symmetric spectrum; g a real signal with even half-wave symmetry and h its hermitian-
symmetric spectrum with zero-valued odd-indexed harmonics; i a real signal with odd half-wave
symmetry and j its hermitian-symmetric spectrum with zero-valued even-indexed harmonics

Figure 3.4e, f shows a real and odd-symmetric signal and its imaginary and odd-
symmetric spectrum. For example,

x(n) = {0, 2, 0, −2} ↔ X (k) = {0, − j4, 0, j4}


3.12 Symmetry Properties 73

In all these cases, the summation range can be reduced by a factor of 2 and the
result multiplied by 2. Note that the real parts of the twiddle factors are the same
for frequency index k and N − k, while they are the negatives of each other for the
imaginary part.
The DFT coefficients for a real and even signal are real and even and those for
a real and odd signal are imaginary and odd. Therefore, the real part of the DFT
coefficients, Re(X (k)), of an arbitrary real signal x(n) are the DFT coefficients for
its even component xe (n) and j Im(X (k)) are those for its odd component xo (n).
It follows that the DFT of a complex signal x(n) + j y(n), where both the real and
imaginary parts are even, is also even.

x(n) complex and even ↔ X (k) complex and even

The DFT of a complex signal x(n) + j y(n), where both the real and imaginary parts
are odd, is also odd.

x(n) complex and odd ↔ X (k) complex and odd

Since the real sinusoids are related to conjugate complex exponentials by the
Euler’s formula

A cos(ωn + θ) = 0.5A∠θ e jωn + 0.5A∠−θ e− jωn ,

the transform of real-valued signals exhibits conjugate (or hermitian)- symmetry.


Therefore, X r (k) = X r (N − k) and X i (k) = −X i (N − k). Replacing k by N2 − k,
we get X r ( N2 − k) = X r ( N2 + k) and X i ( N2 − k) = −X i ( N2 + k).

x(n) real ↔ X (k) hermitian

Figure 3.4a, b shows a real signal and its conjugate-symmetric spectrum. For example,

x(n) = {1, 2, 3, 4} ↔ X (k) = {10, −2 + j2, −2, −2 − j2}

If a given periodic function x(n) with period N satisfies the condition


N
x n± = x(n),
2

then it is said to be even half-wave symmetric. Figure 3.4g, h shows an even half-wave
symmetric signal and its even-indexed spectrum. For example,

x(n) = {2, 0, 2, 0} ↔ X (k) = {4, 0, 4, 0}


74 3 Properties of the DFT

If a given periodic function x(n) with period N satisfies the condition


N
x n± = −x(n),
2

then it is said to be odd half-wave symmetric. Figure 3.4i, j shows an odd half-wave
symmetric signal and its odd-indexed spectrum. For example,
√ √ 
3 3 √ √
x(n) = , 0.5, − , −0.5 ↔ X (k) = {0, 3 − j, 0, 3 + j}
2 2

3.13 Parseval’s Theorem

The representation of x(n) by the DFT coefficients X (k), which is obtained by an


orthogonal transform, is the specification of the same signal x(n) in the frequency
domain. Therefore, X (k) is, in every respect, just as complete and specific represen-
tation of x(n). It is just a representation of x(n) in another domain or just change of
the independent variable. Consequently, the power of the signal over one period can
be uniquely determined in either representation.
Let x(n) ↔ X (k) with sequence length N . In the DFT, a signal is represented by
complex exponentials with harmonic frequencies. Since the samples of a complex
exponential lies on the unit circle, the power of an exponential over one period is
N . The DFT coefficients X (k)/N are the actual amplitudes of the exponentials.
Therefore, the power of a complex exponential is |XN(k)| N = |X (k)|
2 2
2 N
. Summing the
powers of all the constituent complex exponentials of the signal, we get the power
over one period. Therefore,

N −1
 N −1
1 
|x(n)|2 = |X (k)|2
n=0
N k=0

Orthogonal transforms, such as the Fourier analysis, have the power preservation
property.

Example 3.3 Consider the DFT pair

x(n) = {3 + j2, −1 + j2, 2 − j1, −4 + j2} ↔ X (k) = { j5, 1, 10 − j3, 1 + j6}

The sums of the squared magnitude of the data sequence and that of the DFT coef-
ficients divided by 4 are equal and it is 43.
3.14 Summary 75

The generalized form of this theorem holds for two different signals as given by

N −1
 N −1
1 
x(n)y (n) =
*
X (k)Y * (k)
n=0
N k=0

This result follows from the circular correlation evaluated at output index zero.

3.14 Summary

• Properties relate the effect of an operation in one domain in the other. It helps to
select the appropriate domain for interpretation and operation of signals. Further,
the transforms of a set of related signals can be determined more easily.
• The DFT of a linear combination of a set of signals is the same linear combination
of the DFT of the individual signals.
• The DFT of a N -point signal is periodic of period N in the frequency domain. The
IDFT of the DFT is also periodic of period N in the time domain.
• The shift of a waveform in the time domain results in adding increments to the
phase of its frequency components, which are linearly proportional to the respective
frequency indices. There is no change in the amplitude.
• Multiplying a signal by a complex exponential with frequency index k0 results in
the shift of its spectrum by k0 sample intervals.
• The DFT of the time-reversal x(N − n) of a N -point signal is the time-reversed
version of the DFT X (k) of x(n), X (N − n).
• Computing the DFT twice in succession of a signal x(n) yields N times the time-
reversal of x(n).
• Convolution in the time domain corresponds to multiplication in the frequency
domain.
• The scaled circular convolution of the two frequency-domain sequences X (k) and
H (K ) corresponds to multiplication of the corresponding sequences in the time
domain.
• The DFT of the conjugate of x(n) of length N , x ∗ (n), is the frequency-reversed
and conjugated version of that of x(n), X ∗ (N − k).
• The DFT of the correlation of two sequences is the product of the DFT of the first
sequence multiplied by the conjugate of the DFT of the second sequence.
• Transform values X (0) and X (N /2) of a N -point sequence are, respectively, the
sum and alternating sum of x(n). Values x(0) and x(N /2) of a N -point sequence
are, respectively, the sum and alternating sum of the DFT of x(n), X (k), divided
by N .
• Upsampling a signal by a factor of L results in the L-fold repetition of its DFT.
• Zero padding a signal by a factor of L and computing its DFT results in a spectrum,
every Lth sample of which is the same as those of the DFT of the signal.
• The DFT of a real-valued signal is conjugate-symmetric.
76 3 Properties of the DFT

• The DFT of a real-valued and even-symmetric signal is real-valued and even-


symmetric.
• The DFT of a real-valued and odd-symmetric signal is imaginary-valued and odd-
symmetric.
• The average power of a signal can be obtained either from its time-domain or
frequency-domain representation.

Exercises
3.1 Given two 4-point sequences x(n) and y(n), find the sequence z(n) = 3x(n) −
2y(n). Find the DFT Z (k) of z(n) using the linearity property with X (k) and Y (k)
and also directly from the definition. Verify that they are the same. Find the IDFT of
(Z (k) + 2Y (k))/3 to get back x(n).
3.1.1
x(n) = {2̌, 1, 3, 4}, y(n) = {2̌, 1, −3, 4}

* 3.1.2
ˇ 1, −3, 4}
x(n) = {1̌, 2, 3, 4}, y(n) = {−2,

3.1.3
x(n) = {2̌, 2, 1, 4}, y(n) = {2̌, 1, 3, −2}

3.2 Given a 4-point sequence x(n), find its DFT X (k). Find the values of x(23)
and X (−7) using the periodicity property. Compute the IDFT of X (k) with index
n = 23. Compute the DFT of x(n) with index k = −7. Verify that these values are
the same as those found using the periodicity property.
3.2.1
x(n) = {2̌, 1, 3, 3}

3.2.2
ˇ 1, 4, 3}
x(n) = {−1,

* 3.2.3
x(n) = {4̌, 2, 3, 2}

3.3 Given a 4-point sequence x(n), find its DFT X (k). Using the time-shift property,
find the DFT of x(n − k). Form the sequence x(n − k) and find its DFT. Verify that
both the DFTs are the same.
* 3.3.1
x(n) = {3̌, 1, 4, 3}, k = −1

3.3.2
ˇ 1, 1, 3}, k = 3
x(n) = {−1,
3.14 Summary 77

3.3.3
x(n) = {3̌, 2, 1, 2}, k = 2

3.4 Given a 4-point sequence x(n), find its DFT X (k). Using the frequency-shift

property, find the DFT of xm(n) = e j 4 kn x(n). Form the sequence xm(n) and find
its DFT. Verify that both the DFTs are the same.
3.4.1
x(n) = {1̌, 2, 3, 1}, k = 1

* 3.4.2
ˇ 2, 1, 3}, k = −3
x(n) = {−2,

3.4.3
x(n) = {1̌, 4, 1, 2}, k = 2

3.5 Given a 4-point sequence x(n), find its DFT X (k). Using the time-reversal prop-
erty, find the DFT of xr (n) = x(4 − n). Form the sequence xr (n) and find its DFT.
Verify that both the DFTs are the same.
3.5.1
x(n) = {3̌, −2, 3, 1}

* 3.5.2
ˇ 1, 1, 3}
x(n) = {−3,

3.5.3
x(n) = {2̌, −4, 1, 2}

3.6 Given a 4-point sequence x(n), find its DFT X (k). Find the DFT of X (k). Verify
that it is equal to 4x(4 − n).
3.6.1
x(n) = {3̌, −2, 3, 1}

3.6.2
x(n) = {2̌, −2, 1, 1}

* 3.6.3
x(n) = {4̌, −2, 2, 1}

3.7 Given a 4-point sequence x(n), find its DFT X (k). Verify that x ∗ (n) ↔ X ∗
(4 − k).
3.7.1
x(n) = {1̌, j, 3, 2}
78 3 Properties of the DFT

3.7.2
x(n) = {2̌, −3, j, 2}

* 3.7.3
x(n) = {1̌, −4, −2, j}

3.8 Given two 4-point sequences x(n) and h(n), find the circular convolution output
y(n) = x(n) ∗ h(n), using the DFT and IDFT. Verify the output by using the time-
domain convolution expression.
* 3.8.1
x(n) = {1̌, 4, 3, 2}, h(n) = {1̌, −1, 3, 2}

3.8.2
x(n) = {3̌, 4, 3, 2}, h(n) = {1̌, −1, 4, 2}

3.8.3
x(n) = {1̌, 4, −3, −2}, h(n) = {2̌, −2, 3, 2}

3.9 Given two 4-point sequences x(n) and h(n), find the DFT of their product y(n) =
x(n)h(n), using the frequency-domain convolution property. Verify the computed
DFT with the DFT of y(n).
3.9.1
x(n) = {3̌, 1, 4, 2}, h(n) = {3̌, −2, 1, 2}

* 3.9.2
x(n) = {1̌, 2, 1, 2}, h(n) = {3̌, −3, 4, 2}

3.9.3
x(n) = {2̌, 1, 3, −2}, h(n) = {2̌, 1, 4, 3}

3.10 Given two 4-point sequences x(n) and h(n), find the circular cross-correlation
output r xh (n), using the DFT and IDFT. Verify the output by using the time-domain
correlation expression.
3.10.1
x(n) = {2̌, 3, 3, 2}, h(n) = {1̌, −3, 3, 2}

* 3.10.2
x(n) = {3̌, −1, 3, 2}, h(n) = {1̌, −1, 2, 2}

3.10.3
x(n) = {1̌, 3, −3, −2}, h(n) = {2̌, −2, 1, 2}
3.14 Summary 79

3.11 Given a 4-point sequence x(n), find its circular autocorrelation output r x x (n),
using the DFT and IDFT. Verify the output by using the time-domain correlation
expression.
3.11.1
x(n) = {4̌, 3, 2, 1}

3.11.2
x(n) = {1̌, −2, 3, 4}

* 3.11.3
x(n) = {1̌, −3, −2, −2}

3.12 Given a 4-point sequence x(n), find its DFT X (k). Verify that x(0) and x(2) are,
respectively, the sum and alternating sum of the its DFT X (k) divided by 4. Verify
that X (0) and X (2) are, respectively, the sum and alternating sum of x(n).
* 3.12.1
x(n) = {1̌, 3, 2, 1}

3.12.2
x(n) = {3̌, −2, 3, 4}

3.12.3
x(n) = {4̌, −3, −2, −2}

3.13 Given a 2-point sequence x(n), find its DFT X (k). Find the DFT of the upsam-
pled x(n) by a factor of 2 using the theorem. Find the IDFT of this DFT and verify
that we get upsampled x(n).
3.13.1
x(n) = {1̌, 3}

3.13.2
x(n) = {3̌, −2}

* 3.13.3
x(n) = {4̌, −3}

3.14 Given a 2-point sequence x(n), find its DFT X (k). Find the IDFT, x_r ep(n), of
the upsampled X (k) by a factor of 2. Verify that 2x_r ep(n) is the replicated x(n).
3.14.1
x(n) = {4̌, 2}

3.14.2
x(n) = {1̌, 3}
80 3 Properties of the DFT

* 3.14.3
ˇ 3}
x(n) = {−2,

3.15 Given a 2-point sequence x(n), find its DFT X (k). Zero pad x(n) by 2 zeros to
get x z(n). Find the DFT, X Z (k), of x z(n) and verify that the even-indexed samples
of X Z (k) are the same as X (k).
* 3.15.1
x(n) = {1̌, 2}

3.15.2
x(n) = {5̌, 3}

3.15.3
ˇ 3}
x(n) = {−4,

3.16 Given a 4-point sequence x(n), find its DFT X (k). What is the type of x(n).
3.16.1
x(n) = {1̌, 2, 1, 2}

3.16.2
x(n) = {3̌, 1, −3, −1}

3.16.3
ˇ 3, 1, 3}
x(n) = {−4,

3.16.4
x(n) = {5̌, 3, 2, 4}

* 3.16.5
x(n) = {0̌, −3, 0, 3}

3.17 Given a 4-point sequence x(n), find its DFT X (k). Verify Parseval’s theorem.
3.17.1
x(n) = {1̌, 2, 3, 1}

* 3.17.2
x(n) = {5̌, 3, 2, 4}

3.17.3
ˇ 3, 1, 3}
x(n) = {−4,
Chapter 4
Two-Dimensional DFT

In 1-D Fourier analysis, an arbitrary waveform, which is a curve, is represented


in terms of sinusoidal waveforms of harmonic frequencies. For example, the DFT
coefficient X (k) is the coefficient of the complex exponential with frequency index
k. Fourier analysis can be extended to higher dimensions. The L-dimensional
DFT of

x(n 1 , n 2 , . . . , n L ), n 1 = 0, 1, . . . , N1 − 1,
n 2 = 0, 1, . . . , N2 − 1, . . . , n L = 0, 1, . . . , N L − 1

is defined as
1 −1 N 2 −1 L −1  

N  N
− j2π
k1 k k
n 1 + N2 n 2 +···+ NL n L
X (k1 , k2 , . . . , k L ) = ··· x(n 1 , n 2 , . . . , n L )e N1 2 L

n 1 =0 n 2 =0 n L =0
(4.1)
In 2-D Fourier analysis, an arbitrary waveform, which is a surface, is represented in
terms of sinusoidal surfaces of harmonic frequencies in two orthogonal directions.
For example, the 2-D DFT coefficient X (k, l) is the coefficient of the 2-D com-
plex exponential with frequency indices (k, l). In determining the coefficients, the
orthogonality principle is used, as in the case of 1-D signals. However, it is easier
to interpret and compute the 2-D DFT as two sets of 1-D DFTs in two orthogonal
directions. The 1-D DFT can be generalized to three or more dimensions in a way
similar to that of the 2-DFT. The task in 2-D DFT is to represent images, such as that
shown in Fig. 4.1, in terms of sinusoidal surfaces.

© Springer Nature Singapore Pte Ltd. 2018 81


D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7_4
82 4 Two-Dimensional DFT

Fig. 4.1 A 256 × 256 8-bit


image

4.1 Two-Dimensional DFT as Two Sets of 1-D DFTs

The samples of a N -point 1-D sinusoid




x(m) = cos (mk) , m = 0, 1, . . . , N − 1
N

constitute a 1-D sequence of numbers. The samples of a N × N 2-D sinusoid


 

x(m, n) = cos (mk + nl) , m, n = 0, 1, . . . , N − 1
N

constitute a 2-D sequence of numbers. A 2-D sinusoidal sequence is a stack of a


number of phase-shifted 1-D sinusoidal sequences.
    
2π 2π
x0 (m) = cos (mk + 0l) , x1 (m) = cos (mk + 1l) ,
N N
  

x2 (m) = cos (mk + 2l) , . . .
N

The complex exponential


x(m, n) = e j ( N (mk+nl))

4.1 Two-Dimensional DFT as Two Sets of 1-D DFTs 83

constitute a 2-D sequence of complex numbers. A 2-D complex exponential sequence


is a stack of a number of phase-shifted 1-D complex exponential sequences.

x0 (m) = e j ( N (mk+0l)) , x1 (m) = e j ( N (mk+1l)) , x2 (m) = e j ( N (mk+2l)) , . . .


2π 2π 2π

The 8 × 8 complex exponential, with k, l = 1,

x(m, n) = e j ( 8 (m+n)) , m, n = 0, 1, . . . , 7

can be expressed as a stack of eight phase-shifted 1-D complex exponential sequences.


x0 (m) = e j ( 8 (m+0)) = e j , x1 (m) = e j ( 8 (m+1)) = e j
2π 2π 2π 2π 2π 2π
8 0 ej 8 m 8 1 ej 8 m ,

x2 (m) = e j ( 8 (m+2)) = e j 8 2 e j 8 m , x3 (m) = e j ( 8 (m+3)) = e j 8 3 e j 8 m ,


2π 2π 2π 2π 2π 2π

x4 (m) = e j ( 8 (m+4)) = e j 8 4 e j 8 m , x5 (m) = e j ( 8 (m+5)) = e j 8 5 e j 8 m ,


2π 2π 2π 2π 2π 2π


x6 (m) = e j ( 8 (m+6)) = e j 8 6 e j 8 m , x7 (m) = e j ( 8 (m+7)) = e j 8 7 e j 8 m
2π 2π 2π 2π 2π 2π

The real and imaginary values of x(m, n), respectively, are


⎡ √ √ ⎤
2 1 0 −1 − 2
√ −1 0 √ 1
⎢ −1 − 2 −1 2⎥
⎢ 1 0 √ 0 √1 ⎥
⎢ −1 − 2 −1 1⎥
⎢ 0 √ 0 √ 1 2 ⎥
1 ⎢
⎢ √−1 − 2 −1 0 1 2 1 0


Re(x(m, n)) = √ ⎢ √ ⎥
2⎢

− 2 −1 0 √ 1 2 1 0 √ ⎥
−1

⎢ −1 0 −1 − 2 ⎥
⎢ √1 2 1 0 √ ⎥
⎣ 0 −1 − 2 −1 ⎦
√1 2 1 0 √
1 2 1 0 −1 − 2 −1 0
√ ⎡ √ ⎤
0 √ 1 2 1 0 −1 − 2
√ −1
⎢ −1 − 2 −1 0⎥
⎢ √1 2 1 0 √ ⎥
⎢ −1 − 2 −1 1⎥
⎢ 2 1 0 √ 0 √ ⎥
1 ⎢
⎢ 1 0 −1 − 2 −1 0 1

2⎥
Im(x(m, n)) = √ ⎢ √ √ ⎥
2⎢

0 −1 − 2
√ −1 0 √1 2 1⎥

⎢ −1 − 2 −1 0 0⎥
⎢ √ √1 2 1 ⎥
⎣− 2 −1 0 −1 ⎦
√1 2 1 0 √
−1 0 1 2 1 0 −1 − 2

The 8 × 8 image representations of the real and imaginary parts of x(m, n) =


e j ( 8 (m+n)) are shown, respectively, in Fig. 4.2a, b. The white and black pixels cor-

respond, respectively, to 1 and −1. The frequency in both the directions is 1/8
84 4 Two-Dimensional DFT

(a) (b)
0 0

1 1

2 2

3 3
m

m
4 4

5 5

6 6

7 7
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
n n
(c) 0
(d) 0

32 32

64 64

96 96

128 128
m

160 160

192 192

224 224

0 32 64 96 128 160 192 224 0 32 64 96 128 160 192 224


n n
j ( 2π
8 (m+n))
Fig. 4.2 a The real part of the 8 × 8 image representation of x(m, n) = e = cos( 2π
8 (m +
n)) + j sin( 2π
8 (m + n)); b the imaginary part; c the real part of the 256 × 256 image representation

of x(m, n) = e j ( 256 (3m+2n)) = cos( 256

(3m + 2n)) + j sin( 256

(3m + 2n)); d the imaginary part

cycles/sample. The 256 × 256 image representations of the real and imaginary parts
of x(m, n) = e j ( 256 (3m+2n)) are shown, respectively, in Fig. 4.2c, d. The frequency

along the m and n directions are 3/256 cycles/sample and 2/256 cycles/sample,
respectively.

4.1.1 Computation of the 2-D DFT

Taking the 1-D DFT of the exponentials along the columns of x(m, n) = e j ( 8 (m+n)) ,

with m = 0, 1, . . . , 7, we get the transform coefficients


4.1 Two-Dimensional DFT as Two Sets of 1-D DFTs 85
⎡ ⎤
0 0 0 0 0 0 0 0
⎢ 8e j 2π8 0 8e j 2π8 1 8e j 2π8 2 8e j 2π8 3 8e j 2π8 4 8e j 2π8 5 8e j 2π8 6 8e j 2π8 7 ⎥
⎢ ⎥
⎢ 0 0 0 0 0 0 0 0 ⎥
⎢ ⎥
⎢ 0 0 0 0 0 0 0 0 ⎥
X (k, n) = ⎢
⎢ 0

⎢ 0 0 0 0 0 0 0 ⎥ ⎥
⎢ 0 0 0 0 0 0 0 0 ⎥
⎢ ⎥
⎣ 0 0 0 0 0 0 0 0 ⎦
0 0 0 0 0 0 0 0

Taking the 1-D DFT of the partial transform X (k, n) along the rows, we get
the 2-D DFT coefficients of e j ( 8 (m+n)) in the standard and center-zero formats,

respectively, as
⎡ ⎤ ⎡ ⎤
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
⎢ 0 64 0 0 0 0 0 0 ⎥ ⎢0 0 0 0 0 0 0 0⎥
⎢ ⎥ ⎢ ⎥
⎢0 0 0 0 0 0 0 0⎥ ⎢0 0 0 0 0 0 0 0⎥
⎢ ⎥ ⎢ ⎥
⎢0 0 0 0 0 0 0 0⎥ ⎢0 0 0 0 0 0 0 0⎥
X (k, l) = ⎢
⎢0 0 0 0 0 0 0 0⎥
⎥ X (k, l) = ⎢
⎢0

⎢ ⎥ ⎢ 0 0 0 0 0 0 0⎥ ⎥
⎢0 0 0 0 0 0 0 0⎥ ⎢0 0 0 0 0 64 0 0 ⎥
⎢ ⎥ ⎢ ⎥
⎣0 0 0 0 0 0 0 0⎦ ⎣0 0 0 0 0 0 0 0⎦
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

By swapping the quadrants of the spectrum, we get one format from the other. The
nonzero DFT coefficient X (1, 1) = 64 is the scaled amplitude of the exponential
in the frequency domain. Taking the 1-D IDFT of X (k, l) along the rows, we get
X (k, n). Now, taking the 1-D IDFT of X (k, n) along the columns, we get back
x(m, n).
Since  
e j ( 8 (m+n)) + e− j ( 8 (m+n))
2π 2π

cos (m + n) = ,
8 2

the 2-D transform coefficients of cos( 2π


8
(m + n)) in the standard and center-zero
formats, respectively, are
⎡ ⎤ ⎡ ⎤
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
⎢ 0 32 0 0 0 0 0 0 ⎥ ⎢0 0 0 0 0 0 0 0⎥
⎢ ⎥ ⎢ ⎥
⎢0 0 0 0 0 0 0 0 ⎥ ⎢0 0 0 0 0 0 0 0⎥
⎢ ⎥ ⎢ ⎥
⎢0 0 0 0 0 0 0 0 ⎥ ⎢0 0 0 32 0 0 0 0 ⎥

X (k, l) = ⎢ ⎥ X (k, l) = ⎢ ⎥
⎥ ⎢0 0 0 0 0 0 0⎥
⎢0 0 0 0 0 0 0 0 ⎥ ⎢ 0 ⎥
⎢0 0 0 0 0 0 0 0 ⎥ ⎢0 0 0 0 0 32 0 0 ⎥
⎢ ⎥ ⎢ ⎥
⎣0 0 0 0 0 0 0 0 ⎦ ⎣0 0 0 0 0 0 0 0⎦
0 0 0 0 0 0 0 32 0 0 0 0 0 0 0 0
86 4 Two-Dimensional DFT

Since
       
  j 2π
8 (m+n) −j 2π
8 (m+n) j 2π
8 (m+n) −j 2π
8 (m+n)
2π e −e − je + je
sin (m + n) = = ,
8 j2 2

the 2-D transform coefficients of sin( 2π


8
(m + n))) in the standard and center-zero
formats, respectively, are
⎡ ⎤ ⎡ ⎤
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
⎢ 0 − j32 0 0 0 0 0 0 ⎥ ⎢0 0 0 0 0 0 0 0⎥
⎢ ⎥ ⎢ ⎥
⎢0 0 0 0 0 0 0 0 ⎥ ⎢0 0 0 0 0 0 0 0⎥
⎢ ⎥ ⎢ ⎥
⎢0 0 0 0 0 0 0 0 ⎥ ⎢0 0 0 j32 0 0 0 0⎥

X (k, l) = ⎢ ⎥ X (k, l) = ⎢ ⎥
⎢0 0 0 0 0 0 0 0 ⎥ ⎥
⎢0
⎢ 0 0 0 0 0 0 0⎥⎥
⎢0 0 0 0 0 0 0 0 ⎥ ⎢0 0 0 0 0 − j32 0 0⎥
⎢ ⎥ ⎢ ⎥
⎣0 0 0 0 0 0 0 0 ⎦ ⎣0 0 0 0 0 0 0 0⎦
0 0 0 0 0 0 0 j32 0 0 0 0 0 0 0 0

The general form of the 2-D complex exponential with a complex coefficient is

x(m, n) = Ae jθ e j ( N (km+ln)) = Ae j ( N (km+ln)+θ)


2π 2π

An arbitrary 2-D surface is expressed as a linear combination of the sinusoidal sur-


faces of all the constituent complex sinusoids. The 2-D DFT determines the coeffi-
cients of the surfaces and the 2-D IDFT reconstructs the 2-D signal back. So far, we
considered surfaces with coefficient 1 and zero phase. Let us consider some other
sinusoids.
Figure 4.3a, b show the 64 × 64 sinusoidal surface x(m, n) = cos( 2π 64
(2m + n))
and its spectrum. The frequency along the m direction is 2 and that in the n
direction is 1, as can be seen in (a). As its phase is zero, the coefficients are
X (2, 1) = (64)(64)/2 = 2048 and X (62, 63) = 2048. The 64 × 64 sinusoidal sur-
face x(m, n) = 2 cos( 2π64
(2m + n) + π2 ) and its spectrum are shown in Fig. 4.3c, d.
Figure 4.3e, f show the 64 × 64 sinusoidal surface x(m, n) = 3 cos( 2π 64
(2m + n) +
π
4
) and its spectrum. As its amplitude is 3 and phase π/4, the coefficients are
 π  π 
X (2, 1) = 3(64)(64) cos + j sin /2
4 4
= 4344.5 + j4344.5 and X (62, 63) = 4344.5 − j4344.5

Figure 4.4a shows a 32 × 32 square pulse x(m, n), m = 0, 1, . . . , 31, n = 0, 1,


. . . , 31 with x(8 : 23, 8 : 23) = 1 and the rest of the values zero. Figure 4.4b shows
its 32 × 32 log magnitude spectrum in the center-zero format, log10 (1 + |X (k, l)|).
Figure 4.4c shows the Fourier reconstructed pulse with just the DC component. The
DC value is the average of x(m, n), which is 256/1024 = 0.25. The spectral value
X (0, 0) in log magnitude format
4.1 Two-Dimensional DFT as Two Sets of 1-D DFTs 87

(b)
(a) 63 X (62,63) = 2048
x(m,n) 1

l
-1
63 0 X (2,1) = 2048
63
32 0 62
16 32 k
m 0 0 n
(c) (d)
2 63 X (62,63) = -j4096
x(m,n)

0 l

-2
63 0 X (2,1) = j4096
63
32 0 62
16 32
m n k
0 0
(e) (f)
3 63 X (62,63) = 4344.5- j4344.5
x(m,n)

0
l

-3
63 0 X (2,1) = 4344.5+ j4344.5
63
32 0 62
12 24 k
m 0 0 n

Fig. 4.3 a The 64 × 64 sinusoidal surface x(m, n) = cos( 2π 64 (2m + n)); b its spectrum; c the 64 ×
π
64 sinusoidal surface x(m, n) = 2 cos( 2π
64 (2m + n) + 2 ); d its spectrum; e the 64 × 64 sinusoidal
π
surface x(m, n) = 3 cos( 2π
64 (2m + n) + 4 ); f its spectrum

X (0, 0) = log10 (1 + 256) = log10 (257) = 2.4099

is shown in (b). Figure 4.4d shows the Fourier reconstructed pulse with the first 4 × 4
frequency components around X (0, 0). Figure 4.4e shows the Fourier reconstructed
pulse with the first 8 × 8 frequency components around X (0, 0). Figure 4.4f shows
the Fourier reconstructed pulse with all the frequency components. As more and
88 4 Two-Dimensional DFT

(a) (b)
1

log 10(1+|X(k,l)|)
x(m,n) 2

0 0

24 8
16 24 0 8
8 16 -8 0
8 -8
m 0 0 n k -16 -16 l

(c) (d)
0.25
1
xr(m,n)

xr(m,n)

0
0

24 24
16 24 16 24
8 16 8 16
8 8
m 0 0 n m 0 0 n

(e) (f)
1
1
xr(m,n)

xr(m,n)

0
0

24 24
16 24 16 24
8 16 8 16
8 8
m 0 0 n m 0 0 n

Fig. 4.4 a A 32 × 32 square pulse; b its log magnitude spectrum in the center-zero format; c its
Fourier reconstruction with just the DC component; d with the first 4 × 4 frequency components;
e with the first 8 × 8 frequency components; f with all the frequency components

more of frequency components are used in the reconstruction, the signal approaches
its original version through constructive and destructive interference of the frequency
components.
Let us compute a 2-D DFT similar to this problem but of size 4 × 4. Let the input
signal x(m, n) be
4.1 Two-Dimensional DFT as Two Sets of 1-D DFTs 89
⎡ ⎤ ⎡ ⎤
0 0 0 0 0
⎢0 1 1 0⎥ ⎢1⎥ 
x(m, n) = ⎢
⎣0
⎥=⎢ ⎥ 0 1 1 0
⎦ ⎣ ⎦
1 1 0 1
0 0 0 0 0

This signal can be expressed as the product of a column vector and a row vector.
This type of signals is called separable signals. The 2-D DFT can be computed using
1-D DFT. The 1-D DFT of {0, 1, 1, 0} is {2, −1 − j, 0, −1 + j}. The 2-D DFT of
x(m, n) is

⎡ ⎤ ⎡ ⎤
2 4 −2 − j2 0 −2 + j2
⎢ −1 − j ⎥   ⎢ 2⎥
⎢ ⎥ 2 −1 − j 0 −1 + j = ⎢ −2 − j2 j2 0 ⎥ = X (k, l)
⎣ 0⎦ ⎣ 0 0 0 0⎦
−1 + j −2 + j2 2 0 − j2

It is to be noted that 2-D DFT is computed using 1-D DFTs, which becomes even
simpler in the case of separable signals.

Example 4.1 Using the row–column method, find the 2-D DFT, X (k, l), of the 4 × 4
signal x(m, n).
n→
m ⎡ ⎤
1 −1 3 2
↓ ⎢2 1 2 4⎥
x(m, n) = ⎢
⎣ 1 −1 2 −2 ⎦

3 1 2 2

Find the 2-D IDFT of X (k, l) to get back x(m, n).


Solution
The 2-D DFT computation is decomposable. Therefore, it can be expressed as the
product the 4 × 4 1-D DFT transform matrix, x(m, n), and the 4 × 4 1-D DFT
transform matrix.
⎡ ⎤⎡ ⎤⎡ ⎤
1 1 1 11 −1 3 2 1 1 1 1
⎢ 1 − j −1 j⎥ ⎢ 4⎥ ⎢ j⎥
⎢ ⎥⎢2 1 2 ⎥ ⎢ 1 − j −1 ⎥
⎣ 1 −1 1 −1 ⎦ ⎣ 1 −1 2 −2 ⎦ ⎣ 1 −1 1 −1 ⎦
1 j −1 − j 3 1 2 2 1 j −1 − j

Multiplying x(m, n) by the left transform matrix yields the 1-D DFT of the columns.
⎡ ⎤⎡ ⎤
7+ j0 0+ j0 9+ j0 6+ j0 1 1 1 1
⎢ 0+ 0+ 1+ 4− j2 ⎥ ⎢ j⎥
⎢ j1 j0 j0 ⎥ ⎢ 1 − j −1 ⎥
⎣ −3 + j0 −4 + j0 1+ j0 −6 + j0 ⎦ ⎣ 1 −1 1 −1 ⎦
0− j1 0+ j0 1+ j0 4+ j2 1 j −1 − j
90 4 Two-Dimensional DFT

Multiplying partially transformed signal matrix by the right transform matrix yields
the 1-D DFT of the rows, and hence, the 2-D DFT of x(m, n).

l→
k ⎡ ⎤
22 + j0 −2 + j6 10 + j0 −2 − j6
↓ ⎢ 5− j1 1 + j5 −3 + j3 −3 − j3 ⎥
X (k, l) = ⎢
⎣ −12 +

j0 −4 − j2 8+ j0 −4 + j2 ⎦
5+ j1 −3 + j3 −3 − j3 1 − j5

Computing the 2-D IDFT of X (k, l) using the row–column method yields x(m, n).
However, the 1-D DFT algorithm can be used to reconstruct x(m, n). One of the
methods is to swap the real and imaginary parts of X (k, l) and compute the 2-D DFT
of the resulting matrix using the row–column method. By swapping the real and
imaginary parts of the 2-D DFT and dividing by 16 yields x(m, n). The advantage
is that no separate IDFT algorithm is required.
Swapping the real and imaginary parts of X (k, l), we get
⎡ ⎤
0 + j22 6− j2 0 + j10 −6 − j2
⎢ −1 + j5 5+ j1 3 − j3 −3 − j3 ⎥
⎢ ⎥
⎣ 0 − j12 −2 − j4 0 + j8 2 − j4 ⎦
1 + j5 3− j3 −3 − j3 −5 + j1

By computing the column 1-D DFTs, we get


⎡ ⎤
0 + j20 12 − j8 0 + j12 −12 − j8
⎢ 0 + j36 12 + j0 0 − j4 −12 + j0 ⎥
⎢ ⎥
⎣ 0 + j0 −4 − j4 0 + j24 4 − j4 ⎦
0 + j32 4+ j4 0 + j8 −4 + j4

By computing the row 1-D DFTs, we get


⎡ ⎤
16 −16 48 32
⎢ 32 16 32 ⎥
64 ⎥
j⎢
⎣ 16 −16 32 −32 ⎦
48 16 32 32

Swapping the real and imaginary parts and dividing by 16, we get back x(m, n).

To reduce the dynamic range of X (k, l), the display of log10 (1 + |X (k, l)|) is used
instead of |X (k, l)|. This improves the contrast of the spectrum. For the example
signal, the magnitude of the spectrum, |X (k, l)|, in the center-zero format, is
4.1 Two-Dimensional DFT as Two Sets of 1-D DFTs 91
⎡ ⎤
8 4.4721 12 4.4721
⎢ 4.2426 5.0990 5.0990 4.2426 ⎥
⎢ ⎥
⎣ 10 6.3246 22 6.3246 ⎦
4.2426 4.2426 5.0990 5.0990

whereas log10 (1 + |X (k, l)|) is


⎡ ⎤
0.9542 0.7382 1.1139 0.7382
⎢ 0.7196 0.7853 0.7853 0.7196 ⎥
⎢ ⎥
⎣ 1.0414 0.8648 1.3617 0.8648 ⎦
0.7196 0.7196 0.7853 0.7853

The log scale reduces the range of |X (k, l)|.


Either the case of computing the 1-D DFT or the 2-D DFT, computing the DFT of
data with few numbers is important to understand and get proficient in the indispens-
able Fourier analysis. Problems, such as Example 4.1, is suited for manual computa-
tion. Equally important is to compute the DFT of larger data by programming. Now,
we present an example of computing a 2-D 8 × 8 DFT. The 8 × 8 spatial domain
data x(m, n) is shown in Table 4.1. Using the row–column method, let us compute
the 1-D DFT of the rows of x(m, n) first. The result is the partial transform, shown
in Table 4.2. Computing the 1-D DFT of the columns of the partial transform yields
the 2-D DFT X (k, l) of x(m, n), shown in Table 4.4.
Equally valid procedure is to compute the 1-D DFT of the columns of x(m, n)
first, resulting the partial transform, shown in Table 4.3. Computing the 1-D DFT of
the rows of the partial transform yields the 2-D DFT X (k, l) of x(m, n), shown in
Table 4.4.
The 2-D DFT X (k, l) of x(m, n) in the center-zero format is shown in Table 4.5.
The magnitude of the 2-D DFT X (k, l) of x(m, n) in the center-zero format is shown
in Table 4.6. The log magnitude of the 2-D DFT X (k, l) of x(m, n) in the center-zero
format is shown in Table 4.7.

Table 4.1 A 8 × 8 input signal x(m, n)


0 –2 2 1 2 0 4 3
1 0 1 3 3 2 3 5
0 –2 1 –3 2 0 3 –1
2 0 1 1 4 2 3 3
1 –1 3 2 1 2 1 3
2 1 2 4 –1 1 –1 1
1 –1 2 –2 3 2 2 2
3 1 2 2 2 4 –2 2
92

Table 4.2 1-D DFT of the rows of x(m, n)


10.00+j 0.00 –2.00+j 4.83 –4.00+j 6.00 –2.00+j 0.83 6.00+j 0.00 –2.00–j 0.83 –4.00–j 6.00 –2.00–j 4.83
18.00+j 0.00 –2.00+j 4.83 0.00+j 6.00 –2.00+j 0.83 –2.00+j 0.00 –2.00–j 0.83 0.00–j 6.00 –2.00–j 4.83
0.00+j 0.00 –2.00+j 4.83 –2.00–j 2.00 –2.00+j 0.83 12.00+j 0.00 –2.00–j 0.83 –2.00+j 2.00 –2.00–j 4.83
16.00+j 0.00 –2.00+j 4.83 2.00+j 2.00 –2.00+j 0.83 4.00+j 0.00 –2.00–j 0.83 2.00–j 2.00 –2.00–j 4.83
12.00+j 0.00 –1.41+j 0.83 –2.00+j 4.00 1.41+j 4.83 0.00+j 0.00 1.41–j 4.83 –2.00–j 4.00 –1.41–j 0.83
9.00+j 0.00 0.88–j 5.12 0.00+j 3.00 5.12+j 0.88 –5.00+j 0.00 5.12–j 0.88 0.00–j 3.00 0.88+j 5.12
9.00+j 0.00 –1.29+j 4.95 0.00–j 1.00 –2.71+j 4.95 7.00+j 0.00 –2.71–j 4.95 0.00+j 1.00 –1.29–j 4.95
14.00+j 0.00 –1.12–j 1.88 5.00–j 1.00 3.12+j 6.12 –4.00+j 0.00 3.12–j 6.12 5.00+j 1.00 –1.12+j 1.88
4 Two-Dimensional DFT
Table 4.3 1-D DFT of the columns of x(m, n)
10.00+j 0.00 –4.00+j 0.00 14.00+j 0.00 8.00+j 0.00 16.00+j 0.00 13.00+j 0.00 13.00+j 0.00 18.00+j 0.00
–1.00+j 2.41 –1.00+j 2.41 –1.00+j 2.41 –1.00+j 2.41 2.41–j 3.24 0.12+j 2.71 2.29–j 7.36 2.12–j 0.54
0.00+j 2.00 0.00+j 0.00 2.00+j 0.00 8.00–j 4.00 –2.00+j 4.00 0.00+j 3.00 0.00–j 1.00 5.00–j 1.00
–1.00+j 0.41 –1.00+j 0.41 –1.00+j 0.41 –1.00+j 0.41 –0.41–j 5.24 –4.12–j 1.29 3.71–j 5.36 –2.12–j 6.54
–6.00+j 0.00 –8.00+j 0.00 2.00+j 0.00 –12.00+j 0.00 0.00+j 0.00 –5.00+j 0.00 7.00+j 0.00 –4.00+j 0.00
4.1 Two-Dimensional DFT as Two Sets of 1-D DFTs

–1.00–j 0.41 –1.00–j 0.41 –1.00–j 0.41 –1.00–j 0.41 –0.41+j 5.24 –4.12+j 1.29 3.71+j 5.36 –2.12+j 6.54
0.00–j 2.00 0.00+j 0.00 2.00+j 0.00 8.00+j 4.00 –2.00–j 4.00 0.00–j 3.00 0.00+j 1.00 5.00+j 1.00
–1.00–j 2.41 –1.00–j 2.41 –1.00–j 2.41 –1.00–j 2.41 2.41+j 3.24 0.12–j 2.71 2.29+j 7.36 2.12+j 0.54
93
94

Table 4.4 The 2-D DFT X (k, l) of x(m, n)


88.00+j 0.00 –10.95+j18.09 –1.00+j17.00 –1.05+j20.09 18.00+j 0.00 –1.05–j20.09 –1.00–j17.00 –10.95–j18.09
2.95+j 1.22 9.66+j 9.66 3.36+j 6.12 –12.73+j 7.66 2.46–j12.78 3.07+j 8.24 –3.12+j 2.12 –13.66–j 2.93
13.00+j 3.00 –3.36–j 6.12 4.00+j20.00 –1.12–j 2.12 –13.00+j 7.00 9.36–j 1.88 –12.00–j 6.00 3.12+j 2.12
–6.95–j16.78 12.73+j 3.66 1.12+j 2.12 –1.66+j 1.66 9.54–j 2.78 –2.34+j17.07 –9.36–j 1.88 –11.07+j 0.24
–26.00+j 0.00 –2.46+j12.78 –15.00–j 3.00 –9.54+j 2.78 32.00+j 0.00 –9.54–j 2.78 –15.00+j 3.00 –2.46–j12.78
–6.95+j16.78 –11.07–j 0.24 –9.36+j 1.88 –2.34–j17.07 9.54+j 2.78 –1.66–j 1.66 1.12–j 2.12 12.73–j 3.66
13.00–j 3.00 3.12–j 2.12 –12.00+j 6.00 9.36+j 1.88 –13.00–j 7.00 –1.12+j 2.12 4.00–j20.00 –3.36+j 6.12
2.95–j 1.22 –13.66+j 2.93 –3.12–j 2.12 3.07–j 8.24 2.46+j12.78 –12.73–j 7.66 3.36–j 6.12 9.66–j 9.66
4 Two-Dimensional DFT
Table 4.5 The 2-D DFT X (k, l) in the center-zero format
32.00+j0.00 –9.54–j2.78 –15.00+j3.00 –2.46–j12.78 –26.00+j0.00 –2.46+j12.78 –15.00–j3.00 –9.54+j2.78
9.54+j2.78 –1.66–j1.66 1.12–j2.12 12.73–j3.66 –6.95+j16.78 –11.07–j0.24 –9.36+j1.88 –2.34–j17.07
–13.00–j7.00 –1.12+j2.12 4.00–j20.00 –3.36+j6.12 13.00–j3.00 3.12–j2.12 –12.00+j6.00 9.36+j1.88
2.46+j12.78 –12.73–j7.66 3.36–j6.12 9.66–j9.66 2.95–j1.22 –13.66+j2.93 –3.12–j2.12 3.07–j8.24
18.00+j0.00 –1.05–j20.09 –1.00–j17.00 –10.95–j18.09 88.00+j0.00 –10.95+j18.09 –1.00+j17.00 –1.05+j20.09
4.1 Two-Dimensional DFT as Two Sets of 1-D DFTs

2.46–j12.78 3.07+j8.24 –3.12+j2.12 –13.66–j2.93 2.95+j1.22 9.66+j9.66 3.36+j6.12 –12.73+j7.66


–13.00+j7.00 9.36–j1.88 –12.00–j6.00 3.12+j2.12 13.00+j3.00 –3.36–j6.12 4.00+j20.00 –1.12–j2.12
9.54–j2.78 –2.34+j17.07 –9.36–j1.88 –11.07+j0.24 –6.95–j16.78 12.73+j3.66 1.12+j2.12 –1.66+j1.66
95
96 4 Two-Dimensional DFT

Table 4.6 The magnitude of the 2-D DFT, |X (k, l)|, of x(m, n) in the center-zero format
32 9.9320 15.2971 13.0137 26 13.0137 15.2971 9.9320
9.9320 2.3431 2.3994 13.2428 18.1606 11.0737 9.5506 17.2311
14.7648 2.3994 20.3961 6.9848 13.3417 3.7739 13.4164 9.5506
13.0137 14.8535 6.9848 13.6569 3.1928 13.9674 3.7739 8.7962
18 20.1193 17.0294 21.1474 88 21.1474 17.0294 20.1193
13.0137 8.7962 3.7739 13.9674 3.1928 13.6569 6.9848 14.8535
14.7648 9.5506 13.4164 3.7739 13.3417 6.9848 20.3961 2.3994
9.9320 17.2311 9.5506 11.0737 18.1606 13.2428 2.3994 2.3431

Table 4.7 The magnitude of the 2-D DFT of x(m, n) in the center-zero format and in the log scale,
log10 (1 + |X (k, l)|)
1.5185 1.0387 1.2121 1.1466 1.4314 1.1466 1.2121 1.0387
1.0387 0.5242 0.5314 1.1536 1.2824 1.0818 1.0233 1.2608
1.1977 0.5314 1.3303 0.9023 1.1566 0.6789 1.1589 1.0233
1.1466 1.2001 0.9023 1.1660 0.6225 1.1751 0.6789 0.9911
1.2788 1.3247 1.2560 1.3453 1.9494 1.3453 1.2560 1.3247
1.1466 0.9911 0.6789 1.1751 0.6225 1.1660 0.9023 1.2001
1.1977 1.0233 1.1589 0.6789 1.1566 0.9023 1.3303 0.5314
1.0387 1.2608 1.0233 1.0818 1.2824 1.1536 0.5314 0.5242

4.2 The 2-D DFT and IDFT

It is easier to interpret the 2-DFT as two sets of 1-D DFTs and it is usually computed
using 1-D DFTs. Formally, the 2-D DFT of a N × N signal x(m, n) is defined as

N −1 
 N −1
x(m, n)e− j N (mk+nl) , k, l = 0, 1, . . . , N − 1.

X (k, l) = (4.2)
m=0 n=0

As in the case of the 1-D IDFT, the 2-D IDFT synthesizes the 2-D signal by multi-
plying the basis signals with the respective coefficients and summing the samples at
all points (m, n). The 2-D IDFT is given by

N −1 N −1
1 
X (k, l)e j N (mk+nl) , m, n = 0, 1, . . . , N − 1.

x(m, n) = 2 (4.3)
N k=0 l=0

In this definition, the DC coefficient X (0, 0) is placed in the top left-hand corner of
the coefficient matrix. While this format is mostly used for computational purposes,
placing X (0, 0) in the center of the coefficient matrix is desired for better visualization
4.2 The 2-D DFT and IDFT 97

of the spectrum. Further, it is easier to derive some derivations using this form. This
form, called the center-zero format, with N even, is given as

2 −1 2 −1
N N
  N N N
x(m, n)e− j N (mk+nl) , k, l = −

X (k, l) = , − + 1, . . . , − 1
2 2 2
m=− N2 n=− N2

The corresponding 2-D IDFT is given by

2 −1 
2 −1
N N
1  N N N
X (k, l)e j N (mk+nl) , m, n = − , − + 1, . . . , − 1

x(m, n) = 2
N N N
2 2 2
k=− 2 l=− 2

One format of the signal or the spectrum can be obtained from the other by swapping
the quadrants of the signal or spectrum in the other format.
The 2-D DFT and IDFT definitions for a M × N signal are

−1  
 N
M−1 k
− j2π m M +n Nl
X (k, l) = x(m, n)e , k = 0, 1, . . . , M − 1, l = 0, 1, . . . , N − 1
m=0 n=0
(4.4)
M−1 N −1  
1   k
j2π m M +n Nl
x(m, n) = X (k, l)e , m = 0, 1, . . . , M − 1, n = 0, 1, . . . , N − 1
MN
k=0 l=0
(4.5)
Let us compute the 2-D DFT of the 2 × 4 signal x(m, n),
 
1 3 2 4
x(m, n) =
2 1 3 4

The row and column 1-D DFTs are


   
10 −1 + j1 −4 −1 − j1 3 4 5 8
X (k, n) = X (m, l) =
10 −1 + j3 0 −1 − j3 −1 2 −1 0

The 2-D DFT is obtained by computing the 1-D DFT of either of the partial transforms
in the other direction.
 
20 −2 + j4 −4 −2 − j4
X (k, l) =
0 − j2 −4 j2
98 4 Two-Dimensional DFT

4.3 The 2-D DFT of Real-Valued Signals

The DFT, with complex exponential basis signals, is inherently designed for complex-
valued signals. However, in practice, most of the signals are real-valued. For real-
valued signals, the DFT coefficients always occur as complex conjugate pairs or real
values. Coefficients
     
N N N N
X (0, 0), X , 0 , X 0, ,X ,
2 2 2 2

of a N × N real-valued signal are real-valued, as the basis functions are of the form
1 and (−1)n . The rest are complex conjugate pairs. For example,
 

2|X (k, l)| cos (mk + nl) + ∠(X (k, l))
N
= X (k, l)e j N (mk+nl) + X ∗ (k, l)e− j N (mk+nl)
2π 2π

= X (k, l)e j N (mk+nl) + X ∗ (k, l)e j N (m(N −k)+n(N −l))


2π 2π

With X (k, l) = X r (k, l) + j X i (k, l), the magnitude is



|X (k, l)| = X r2 (k, l) + X i2 (k, l)

and the phase is


X i (k, l)
∠X (k, l) = tan−1
X r (k, l)

Using Eq. (4.3), with N even, a real-valued N × N signal can be expressed as a sum
its constituent sinusoidal surfaces.
  
1 N
x(m, n) = 2 X (0, 0) + X , 0 cos(πm)
N 2
   
N N N
+ X 0, cos(πn) + X , cos(π(m + n))
2 2 2
2 −1   
N
 2π
+2 |X (k, 0)| cos mk + ∠(X (k, 0))
k=1
N
2 −1   
N
 2π
+2 |X (0, l)| cos nl + ∠(X (0, l))
l=1
N
2 −1         
N
 N 2π N N
+2 |X , l | cos m + nl + ∠ X ,l
l=1
2 N 2 2
4.3 The 2-D DFT of Real-Valued Signals 99

N −1 
2 −1   
N
 2π
+2 |X (k, l)| cos (mk + nl) + ∠(X (k, l)) ,
k=1 l=1
N
m, n = 0, 1, . . . , N − 1 (4.6)

Therefore,
N2
+2
2
different sinusoidal surfaces constitute a N × N real-valued signal. The compu-
tational complexity of computing the 2-D DFT from the definition is O(N 4 ). By
computing the 2-D DFT using the row–column method, the complexity is reduced
to O(N 3 ). Fast algorithms are available for computing the 1-D DFT for lengths
those are an integral power of 2. Using these algorithms, along with the row–column
method, the computational complexity is reduced to O(N 2 log2 N ). For real-valued
2-D signals, the computational complexity can be further reduced, as presented in
Chap. 10.

4.4 Properties of the 2-D DFT

Properties of the 2-D DFT relate the characteristics of signals in the spatial and
frequency domains. The DFT of signals can be computed easily using the properties
and the DFT of related simpler signals.
Linearity
Let x(m, n) ↔ X (k, l) and y(m, n) ↔ Y (k, l). Then,

z(m, n) = ax(m, n) + by(m, n) ↔ Z (k, l) = a X (k, l) + bY (k, l)

where a and b are real or complex constants. The 2-D DFT of a linear combination
of a set of discrete signals is equal to the same linear combination of their individual
DFTs. The dimensions of the signals must be same. If necessary, zero padding can be
employed to meet this constraint. Linearity holds in both the spatial and frequency
domains.

Example 4.2 Compute the DFT of x(m, n) and y(m, n). Using the linearity prop-
erty, deduce the DFT of z(m, n) = 2x(m, n) + 3y(m, n) from those of x(m, n) and
y(m, n).    
2 3 1 3
x(m, n) = , y(m, n) =
1 2 2 1
100 4 Two-Dimensional DFT

Solution
The individual DFTs are
   
8 −2 7 −1
X (k, l) = , Y (k, l) =
2 0 1 −3

The DFT of  
7 15
z(m, n) = 2x(m, n) + 3y(m, n) =
8 7

is  
37 −7
Z (k, l) = 2X (k, l) + 3Y (k, l) =
7 −9

The DFT Z (k, l) can be verified by directly computing that of z(m, n).

Periodicity
If x(m, n) and X (k, l) are a M × N -point DFT pair, then

x(m, n) = x(m + a M, n + bN ), for all m, n and


X (k, l) = X (k + a M, l + bN ), for all k, l

where a and b are arbitrary integers and M and N are the periods. For example, the
periodic extension of signal x(m, n) in Example 4.2 is
⎡ ⎤
..
⎢ . ⎥
⎢ 2 3 2 3 2 3 ⎥
⎢ ⎥
⎢ 1 2 1 2 1 2 ⎥
⎢ ⎥
⎢... 2 3 2 3 2 3 ...⎥
⎢ ⎥
⎢ 1 2 1 2 1 2 ⎥
⎢ ⎥
⎢ 2 3 2 3 2 3 ⎥
⎢ ⎥
⎢ 1 2 1 2 1 2 ⎥
⎣ ⎦
..
.

The bottom and top edges are considered adjacent and so are the left and right edges.
Circular Shift of a Signal
A right (left) shift of a sinusoid results in adding a negative (positive) phase angle.
The change in phase is proportional to its frequency. Its magnitude is unaffected. For
a N × N signal,

x(m, n) ↔ X (k, l) → x(m − m 0 , n − n 0 ) ↔ X (k, l)e− j N (km 0 +ln 0 )



4.4 Properties of the 2-D DFT 101

The DFT of x(m − m 0 , n − n 0 ) is

N −1 
 N −1
x(m − m 0 , n − n 0 )e− j N (mk+nl)

=
m=0 n=0
N −1 
 N −1
= e− j N (km 0 +ln 0 ) x(m − m 0 , n − n 0 )e− j N ((m−m 0 )k+(n−n 0 )l)
2π 2π

m=0 n=0
− j 2π
N (km 0 +ln 0 )
=e X (k, l)

Example 4.3 Using the shift theorem, find the 2-D DFT of the shifted version x(m −
2, n + 1) of the signal x(m, n) in Example 4.1. Verify that by computing the DFT
of the shifted signal.
Solution
For a 4 × 4 signal, a right shift by 2 sample intervals of the signal with frequency
index 1 contributes a phase of −180◦ . A left shift by one sample interval contributes
a phase of 90◦ . Therefore, the 2-D DFT of the shifted signal
⎡ ⎤ ⎡ ⎤
1 −1 3 2 −1 2 −2 1
⎢2 1 2 4⎥ ⎢ 1 2 2 3⎥
x(m, n) = ⎢ ⎥
⎣ 1 −1 2 −2 ⎦ x(m − 2, n + 1) = ⎢
⎣ −1

3 2 1⎦
3 1 2 2 1 2 4 2

is
⎡ ⎤
22 −6 − j2 −10 −6 + j2
⎢ −5 + j1 5 − j1 −3 + j3 3 − j3 ⎥
(−1)k ( j)l X (k, l) = ⎢

⎥ , k = 0, 1, 2, 3, l = 0, 1, 2, 3
−12 2 − j4 −8 2 + j4 ⎦
−5 − j1 3 + j3 −3 − j3 5 + j1

Circular Shift of a Spectrum


For a N × N signal,

x(m, n) ↔ X (k, l) → x(m, n)e j N (k0 m+l0 n) ↔ X (k − k0 , l − l0 )


With N even and k0 = l0 = N


2
, the center-zero spectrum of x(m, n) can be obtained
using this theorem.

Example 4.4 By multiplying the signal of Example 4.1 with (−1)(m+n) , we get
⎡ ⎤
1 1 3 −2
⎢ −2 1 −2 4⎥
(−1)(m+n) x(m, n) = ⎢
⎣ 1

1 2 2⎦
−3 1 −2 2
102 4 Two-Dimensional DFT

By computing the DFT of this signal, the center-zero spectrum of x(m, n) is obtained.
⎡ ⎤
8 −4 + j2 −12 −4 − j2
⎢ −3 − j3 1 − j5 5 + j1 −3 + j3 ⎥
X (k − 2, l − 2) = ⎢


10 −2 − j6 22 −2 + j6 ⎦
−3 + j3 −3 − j3 5 − j1 1 + j5

Circular Convolution in the Spatial Time-Domain


The circular convolution of x(m, n) and h(m, n) is given by

N −1 
 N −1
y(m, n) = x( p, q)h(m − p, n − q), m, n = 0, 1, . . . , N − 1
p=0 q=0

Let x(m, n) ↔ X (k, l) and h(m, n) ↔ H (k, l), m, n, k, l = 0, 1, . . . , N − 1. Then,

∗ h(m, n) ↔ X (k, l)H (k, l)


x(m, n)

Convolution of two 2-D signals, as in the case of 1-D signals, in the spatial-domain
becomes pointwise multiplication of their DFT coefficients in the frequency-domain.
This is due to the fact that convolution is a linear operation and the frequency of a
signal is unaffected from the input to the output of a LTI system.

Example 4.5 Convolve


⎡ ⎤ ⎡ ⎤
1 −1 3 2 1 2 1 3
⎢2 1 2 4 ⎥ ⎢2 1 3 4⎥
x(m, n) = ⎢ ⎥ ⎢
⎣ 1 −1 2 −2 ⎦ h(m, n) = ⎣ 3

1 2 1⎦
3 1 2 2 2 2 1 0

Solution
The DFT of x(m, n) is
⎡ ⎤
22 + j0 −2 + j6 10 + j0 −2 − j6
⎢ 5− j1 1 + j5 −3 + j3 −3 − j3 ⎥
X (k, l) = ⎢
⎣ −12 +

j0 −4 − j2 8+ j0 −4 + j2 ⎦
5+ j1 −3 + j3 −3 − j3 1 − j5
4.4 Properties of the 2-D DFT 103

The DFT of h(m, n) is


⎡ ⎤
29 + j0 1+ j2 1 + j0 1 − j2
⎢ 0− j5 4+ j3 −6 + j1 −6 + j1 ⎥
H (k, l) = ⎢
⎣ −1 +

j0 1+ j0 −1 + j0 1 + j0 ⎦
0+ j5 −6 − j1 −6 − j1 4 − j3

The pointwise product Y (k, l) = X (k, l)H (k, l) is


⎡ ⎤
638 + j0 −14 + j2 10 + j0 −14 − j2
⎢ −5 − j25 −11 + j23 15 − j21 21 + j15 ⎥
Y (k, l) = X (k, l)H (k, l) = ⎢
⎣ 12 + j0

−4 − j2 −8 + j0 −4 + j2 ⎦
−5 + j25 21 − j15 15 + j21 −11 − j23

The IDFT of Y (k, l) is the convolution output in the spatial domain.


⎡ ⎤
41 37 43 39
⎢ 40 42 52 35 ⎥
y(m, n) = ⎢
⎣ 36

44 43 42 ⎦
38 33 31 42

Circular Convolution in the Frequency-Domain

N −1 N −1
1 
x(m, n)h(m, n) ↔ X ( p, q)H (k − p, l − q)
N 2 p=0 q=0

Consider the two 2 × 2 signals.


   
2 −3 −1 3
x(m, n) = , y(m, n) =
1 2 2 1

The respective DFTs are


   
2 4 5 −3
X (k, l) = , Y (k, l) =
−4 6 −1 −5

The pointwise product of x(m, n) and y(m, n) is


 
−2 −9
c(m, n) = x(m, n)y(m, n) =
2 2

To find the circular convolution of X (k, l) and Y (k, l), we compute the respective
DFTs, find their pointwise product, and compute the IDFT. The results are
104 4 Two-Dimensional DFT
       
8 −12 −4 12 −32 −144 −7 7
, , ,4
4 8 8 4 32 32 −15 7

The DFT of the pointwise product of x(m, n) and y(m, n)


   
−2 −9 −7 7
is
2 2 −15 7

Circular Cross-Correlation in the Spatial-Domain


The circular cross-correlation of two real-valued 2-D signals x(m, n) and h(m, n) is
given by

N −1 
 N −1
r xh (m, n) = x( p, q)h( p − m, q − n) ↔ H ∗ (k, l)X (k, l)
p=0 q=0

Since h(N − m, N − n) ↔ H ∗ (k, l), this operation can also be interpreted as the
convolution of x(m, n) and h(N − m, N − n).

rhx (m, n) = r xh (N − m, N − n) = IDFT(X ∗ (k, l)H (k, l))

The conjugate of the DFT of x(m, n) in Example 4.5 is


⎡ ⎤
22 −2 − j6 10 −2 + j6
⎢ 5 + j1 1 − j5 −3 − j3 −3 + j3 ⎥
X ∗ (k, l) = ⎢
⎣ −12 −4 + j2

8 −4 − j2 ⎦
5 − j1 −3 − j3 −3 + j3 1 + j5

The conjugate of the DFT of h(m, n) is


⎡ ⎤
29 1− j2 1 1+ j2
⎢ 0 + j5 4− j3 −6 − j1 −6 − j1 ⎥
H ∗ (k, l) = ⎢


−1 1 −1 1⎦
0 − j5 −6 + j1 −6 + j1 4+ j3

The pointwise product Y (k, l) = X (k, l)H ∗ (k, l) is

Y (k, l) = X (k, l)H ∗ (k, l)


⎡ ⎤
6.38 0.10 + j0.10 0.10 0.10 − j0.10
⎢ 0.05 + j0.25 0.19 + j0.17 0.21 − j0.15 0.15 + j0.21 ⎥
= 100 ⎢


0.12 −0.04 − j0.02 −0.08 −0.04 + j0.02 ⎦
0.05 − 0.25 0.15 − j0.21 0.21 + j0.15 0.19 − j0.17

The IDFT of Y (k, l) is the correlation output in the spatial domain.


4.4 Properties of the 2-D DFT 105
⎡ ⎤
49 38 39 39
⎢ 36 31 42 35 ⎥
r xh (m, n) = ⎢
⎣ 34

41 41 44 ⎦
48 42 35 44

The pointwise product Y (k, l) = H (k, l)X ∗ (k, l) is

Y (k, l) = H (k, l)X ∗ (k, l)


⎡ ⎤
6.38 0.10 − j0.10 0.10 0.10 + j0.10
⎢ 0.05 − j0.25 0.19 − j0.17 0.21 + j0.15 0.15 − j0.21 ⎥

= 100 ⎣ ⎥
0.12 −0.04 + j0.020 −0.08 −0.04 − j0.02 ⎦
0.05 + j0.25 0.15 + j0.21 0.21 − j0.15 0.19 + j0.17

The IDFT of Y (k, l) is the correlation output in the spatial domain.


⎡ ⎤
49 39 39 38
⎢ 48 44 35 42 ⎥
rhx (m, n) = ⎢
⎣ 34

44 41 41 ⎦
36 35 42 31

Cross-correlation of a signal x(m, n) with itself is the autocorrelation operation.

r x x (m, n) = IDFT(|X (k, l)|2 )


⎡ ⎤
484 40 100 40
⎢ 26 26 18 18 ⎥
|X (k, l)| = ⎢
2
⎣ 144

20 64 20 ⎦
26 18 18 26

The IDFT of |X (k, l)|2 is


⎡ ⎤
68 30 42 30
⎢ 26 18 21 20 ⎥
r x x (m, n) = ⎢
⎣ 46

28 42 28 ⎦
26 20 21 18

Sum and Difference of Sequences


Due to the fact that the twiddle factors are 1 and −1, the evaluation of coefficients
X (0, 0) and X ( N2 , N2 ) is relatively simple and these values can be used to check the
DFT and IDFT computation.

N −1 
 N −1
X (0, 0) = x(m, n)
m=0 n=0
106 4 Two-Dimensional DFT

With N even,
  N −1 
 N −1
N N
X , = x(m, n)(−1)(m+n)
2 2 m=0 n=0

N −1 N −1
1 
x(0, 0) = X (k, l)
N 2 k=0 l=0

With N even,
  N −1 N −1
N N 1 
x , = X (k, l)(−1)(k+l)
2 2 N 2 k=0 l=0

For the signal in Example 4.1,

{x(0, 0) = 1, x(2, 2) = 2, X (0, 0) = 22, X (2, 2) = 8}

The Difference

x(m, n) − x(m − 1, n) ↔ X (k, l)(1 − e− j N k )


x(m, n) − x(m, n − 1) ↔ X (k, l)(1 − e− j N l )


Reversal Property
If x(m, n) and X (k, l) form a transform pair, then so are x(N − m, N − n) and
X (N − k, N − l).

x(m, n) ↔ X (k, l) → x(N − m, N − n) ↔ X (N − k, N − l)

Example 4.6 For the signal in Example 4.1


⎡ ⎤
1 2 3 −1
⎢3 2 2 1⎥
x(4 − m, 4 − n) = ⎢ ⎥
⎣ 1 −2 2 −1 ⎦
2 4 2 1
⎡ ⎤
22 −2 − j6 10 −2 + j6
⎢ 5 + j1 1 − j5 −3 − j3 −3 + j3 ⎥
X (4 − k, 4 − l) = ⎢
⎣ −12 −4 + j2

8 −4 − j2 ⎦
5 − j1 −3 − j3 −3 + j3 1 + j5
4.4 Properties of the 2-D DFT 107

Symmetry
As a pair of complex conjugate exponentials form a real sinusoid, the exponential
Fourier representation of real-valued data is conjugate symmetric. The N × N DFT
of a real-valued data can also have only N × N independent values. The redundancy
in the transform neither increases the storage requirements nor the computational
complexity significantly with an appropriate implementation of the transform.
The DFT values at diametrically opposite points form complex conjugate pairs.

X * (N − k, N − l) = X (k, l)

An equivalent form of the symmetry is


   
N N N N
X ± k, ± l =X *
∓ k, ∓ l
2 2 2 2

Example 4.7 Underline the left-half of the nonredundant DFT values of the signal
in Example 4.1.
Solution
l→
⎡ ⎤
k 22 −2 + j6 10 −2 − j6
↓⎢⎢ 5 − j1 1 + j5 −3 + j3 −3 − j3 ⎥

⎢ ⎥
⎢ −12 −4 − j2 8 −4 + j2 ⎥
⎣ ⎦
5 + j1 −3 + j3 −3 − j3 1 − j5

Storing only the nonredundant part of the DFT coefficients, the storage require-
ment is the same as that of the input signal. The storage of the 2-D DFT values of
columns (rows) 1 to N2 − 1 and the first N2 + 1 values of the zeroth and the N2 th
columns (rows) is sufficient. The computation of the DFT requires the computation
of N2 − 1 1-D DFT of complex-valued data and N + 2 1-D DFT of real-valued data.
Rotation
The rotation of a N × N signal by an angle θ, about its center, rotates its spectrum
also by the same angle and in the same direction. Rotations other than multiples
of 90◦ require interpolation. The rotation of a 2-D signal is a part of geometric
transformations. The equations governing the counterclockwise rotation of a vector
with coordinates (m, n) by an angle θ are

mr = m cos(θ) − n sin(θ) (4.7)


nr = m sin(θ) + n cos(θ) (4.8)
108 4 Two-Dimensional DFT

The length r of the vector remains the same. In matrix notation, we get
    
mr cos(θ) − sin(θ) m
=
nr sin(θ) cos(θ) n

where (mr, nr ) are the new coordinates. For clockwise rotation, change the sign of
the angle.
With x(m, n) ↔ X (k, l), the rotated version of the 2-D DFT pair by θ is given by

x(m cos(θ) − n sin(θ), m sin(θ) + n cos(θ) ↔ X (k cos(θ) − l sin(θ), k sin(θ) + l cos(θ)

Consider the following signal, its rotated version by 90◦ in the counterclockwise
direction and their spectra.
      
1̌ 2 10 −2 24 −2 0
x(m, n) = ↔ , ↔
3 4 −4 0 1̌ 3 10 −4
         
mr cos(90◦ ) − sin(90◦ ) m 0 −1 m −n
= = =
nr sin(90◦ ) cos(90◦ ) n 1 0 n m

The periodic extension of signal x(m, n) and its rotated version about (0, 0) are

⎡ ⎤ ⎡ ⎤
.. ..
⎢ . ⎥ ⎢ . ⎥
⎢ ⎥ ⎢ ⎥
⎢ 1 2 1 2 1 1 ⎥ ⎢ 1 3 1 3 1 3 ⎥
⎢ ⎥ ⎢ ⎥
⎢ 3 4 3 4 3 4 ⎥ ⎢ 2 4 2 4 2 4 ⎥
⎢ ⎥ ⎢ ⎥
⎢... 1 2 1̌ 2 1 2 ...⎥ ⎢... 1 3 1̌ 3 1 3 ...⎥
x p (m, n) = ⎢ ⎥ xr p (m, n) = ⎢ ⎥
⎢ 3 4 3 4 3 4 ⎥ ⎢ 2 4 2 4 2 4 ⎥
⎢ ⎥ ⎢ ⎥
⎢ 1 2 1 2 1 1 ⎥ ⎢ 1 3 1 3 1 3 ⎥
⎢ ⎥ ⎢ ⎥
⎢ 3 4 3 4 3 4 ⎥ ⎢ 2 4 2 4 2 4 ⎥
⎣ ⎦ ⎣ ⎦
.. ..
. .

The element at the origin is indicated by a check mark. For rotation other than about
the center, translation operation can be used in addition.
Separable Signals
The 2-D DFT is a separable function in the variables m and n. Therefore, the DFT
of a separable function x(m, n) = x(m)x(n) is also separable. The product of the
column vector with the row vector is equal to the 2-D function. That is,

x(m) ↔ X (k), x(n) ↔ X (l) → X (k, l) = X (k)X (l)


4.4 Properties of the 2-D DFT 109

N −1 
 N −1 N −1 
 N −1
x(m, n)e− j N mk e− j N nl = x(m)x(n)e− j N mk e− j N nl
2π 2π 2π 2π
X (k, l) =
m=0 n=0 m=0 n=0
 N −1   N −1 
 
− j 2π − j 2π
= x(m)e N mk x(n)e N nl = X (k)X (l)
m=0 n=0

Example 4.8 Compute the DFT of x(m) = {1, 3, 2, 1} and x(n) = {2, 1, 1, 3}. Using
the separability theorem, verify that the product x(m, n) = x(m)x(n) of the column
vector x(m) and the row vector x(n) in the time-domain and the 2-D IDFT of the
product of their individual DFTs are the same.
Solution
The product x(m, n) = x(m)x(n) is
⎡ ⎤ ⎡ ⎤
1 2 1 1 3
⎢3 ⎥  ⎢6 3 3 9⎥
⎢ ⎥ 2 1 1 3 =⎢ ⎥
⎣2 ⎦ ⎣4 2 2 6⎦
1 2 1 1 3

X (k) = {7, −1 − j2, −1, −1 + j2} and X (l) = {7, 1 + j2, −1, 1 − j2}.
⎤ ⎡
7
⎢−1 − j2⎥  
X (k, l) = X (k)X (l) = ⎢

⎥ 7 1 + j2 −1 1 − j2
−1⎦
−1 + j2
⎡ ⎤
49 7 + j14 −7 7 − j14
⎢−7 − j14 3 − j4 1 + j2 −5⎥
=⎢⎣

−7 −1 − j2 1 −1 + j2⎦
−7 + j14 −5 1 − j2 3 + j4

The 2-D IDFT is ⎡ ⎤


2 1 1 3
⎢6 3 3 9⎥
⎢ ⎥ = x(m, n) = x(m)x(n)
⎣4 2 2 6⎦
2 1 1 3

Parseval’s Theorem
This theorem implies that the signal power can also be computed from the DFT
representation of the signal. Let x(m, n) ↔ X (k, l) with the dimensions of the signal
N × N . Since the magnitude of the samples of the complex sinusoidal surface

e j N (mk+nl) , m = 0, 1, . . . , N − 1, n = 0, 1, . . . , N − 1

110 4 Two-Dimensional DFT

is one and the 2-D DFT coefficients are scaled by N 2 , the power of a complex
sinusoidal surface is  
|X (k, l)|2 |X (k, l)|2
4
N2 =
N N2

Therefore, the sum of the powers of all the components of a signal yields the power
of the signal.
N −1 
 N −1 N −1 N −1
1 
|x(m, n)|2 = 2 |X (k, l)|2
m=0 n=0
N k=0 l=0

For the signal x(m, n) in Example 4.2, the power computed in both the domains is
18.
The generalized form of this theorem holds for two different signals as given by

N −1 
 N −1 N −1 N −1
1 
x(m, n)y * (m, n) = X (k, l)Y * (k, l)
m=0 n=0
N 2 k=0 l=0

4.5 Summary

• The 2-D DFT is a straightforward extension of that of the 1-D DFT.


• As the 2-D signal is a surface, rather than a curve as in the case of 1-D signals, two
frequencies, in two orthogonal directions, are required for its frequency-domain
representation.
• The constituent frequency components of a 1-D signal are the sinusoidal curves
while the constituent frequency components of a 2-D signal are the sinusoidal
surfaces.
• In practice, the 2-D DFT of a N × N 2-D signal is computed using N 1-DFTs along
the rows of the input and N 1-DFTs along the columns of the partial transform or
vice versa.
• Using fast 1-D DFT algorithms, along with the row–column method, the compu-
tational complexity of computing the 2-D DFT is O(N 2 log2 N ).
• As in the case of the 1-D DFT, the center-zero format of the DFT spectrum is
desired for better visual display and easier derivation of some results.
• As in the case of the 1-D DFT, due to large dynamic range of the spectrum, the
logarithm of the magnitude spectrum is preferred for better visualization.
• As in the case of the 1-D DFT, the 2-D spectrum of a real-valued 2-D signal is
conjugate symmetric.
• The 2-D DFT is extensively used in applications such as digital image processing.
4.5 Summary 111

Exercises
4.1 The 2-D discrete signal x(m, n) is periodic with period 4 samples in m and n.
Find its complex exponential form and thereby find its 2-D DFT coefficients X (k, l).
Verify that the samples are the same from the two forms.
* 4.1.1
   
2π π 2π π
x(m, n) = 2 − 3 cos (m + n) + + sin (2m + n) +
4 6 4 3

4.1.2
   
2π π 2π π
x(m, n) = 1 + 2 sin (m + n) − − sin (2m + n) −
4 3 4 4

4.1.3
   
2π π 2π
x(m, n) = −3 − 2 sin (m + n) + − 3 cos 2 (m + n)
4 3 4

4.2 Find the 2-D DFT X (k, l) of the signal x(m, n) using the row–column method.
The origin of x(m, n) is at the top left corner. Find the 2-D IDFT of X (k, l) to get
back x(m, n). Verify Parseval’s theorem.
* 4.2.1 ⎡ ⎤
2 4 2 3
⎢0 2 3 4⎥
x(m, n) = ⎢ ⎣4 2 3 1⎦

2 1 3 4

4.2.2 ⎡ ⎤
3 1 4 2
⎢1 1 2 2⎥
x(m, n) = ⎢
⎣3

3 2 2⎦
4 1 2 3

4.2.3 ⎡ ⎤
1 2 3 4
⎢4 2 1 3⎥
x(m, n) = ⎢
⎣4

3 1 2⎦
3 3 0 1

4.3 Find the DFT of the 4 × 4 signal x(m, n) using the row–column method. Each
image is composed of a shifted impulse. Verify the DFT using the shift theorem in
the spatial domain.
112 4 Two-Dimensional DFT

4.3.1 ⎡ ⎤
0 0 0 0
⎢0 0 0 0⎥

x(m, n) = ⎣ ⎥
0 1 0 0⎦
0 0 0 0

4.3.2 ⎡ ⎤
0 0 0 0
⎢0 0 0 0⎥
x(m, n) = ⎢
⎣0

0 1 0⎦
0 0 0 0

* 4.3.3 ⎡ ⎤
0 0 0 0
⎢0 0 0 0⎥
x(m, n) = ⎢
⎣0

0 0 0⎦
0 1 0 0

4.4 Using the DFT and IDFT, find: (a) the periodic convolution of x(m, n) and
h(m, n), (b) the periodic correlation of x(m, n) and h(m, n), and h(m, n) and x(m, n),
(c) the autocorrelation of x(m, n).
4.4.1 ⎡ ⎤ ⎡ ⎤
2 0 1 3 0 1 3 2
⎢3 0 4 2⎥ ⎢ 1 3 1 −2 ⎥
x(m, n) = ⎢ ⎥ ⎢
⎣ 3 1 0 1 ⎦ h(m, n) = ⎣ 3 0 2 −1 ⎦

2 0 0 2 2 0 2 2

* 4.4.2 ⎡ ⎤ ⎡ ⎤
1 2 3 4 0 3 1 2
⎢3 0 1 2⎥ ⎢1 1 1 −1 ⎥
x(m, n) = ⎢
⎣1
⎥ h(m, n) = ⎢ ⎥
1 −1 3 ⎦ ⎣2 1 0 0⎦
0 1 2 3 3 1 1 2

4.4.3 ⎡ ⎤ ⎡ ⎤
1 1 3 3 1 0 2 4
⎢ −1 0 0 4⎥ ⎢3 1 0 2⎥
x(m, n) = ⎢
⎣ 1
⎥ h(m, n) = ⎢ ⎥
1 0 2⎦ ⎣1 1 0 2⎦
2 1 0 4 0 1 −2 1
Chapter 5
Convolution and Correlation

Practical systems are analyzed using mathematical models. Convolution and transfer
function are two of the frequently used models in the study of LTI systems. In this
chapter, we study the convolution operation and we study the transfer function in
later chapters. Both the models are based on decomposing an arbitrary input signal in
terms of well-defined basis signals, impulse in the case of convolution and complex
exponential signals in the case of transfer function. After the decomposition of the
input signal, the system output can be found using the response of the system to
the basis signals and the linearity and time-invariance properties of the LTI systems.
Convolution operation relates the input and output of a system through its impulse
response. The impulse response of a system is its response to the unit-impulse signal,
assuming that the system is initially relaxed (zero initial conditions). Convolution
expresses the output of a system in terms of its input only.
The important concepts, such as convolution and Fourier analysis, are easier to
understand and remember through their physical interpretations. Convolution oper-
ation is the same thing as finding the current balance for our deposits in a bank.
Assuming compound interest, the interest is computed on the principal at regular
intervals and it is added to the principal. Let the interval be one year and the interest
rate per year be 10%. Let n = 0 be the starting time and the deposit made at that time
is designated as x(0). Then, x(n) is the deposit made after the nth year. Assuming N
number of years, the deposits are

{x(0), x(1), x(2), . . . , x(N )}

The compound interest rates h(n) for n years of deposit are

{h(0), h(1), h(2), . . . , h(N )} = {1, 1.1, 1.21, . . . , (1.1)N }

Therefore, the balance in the deposit y(N ) at the N th year is

© Springer Nature Singapore Pte Ltd. 2018 113


D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7_5
114 5 Convolution and Correlation

y(N ) = 1x(N ) + 1.1x(N − 1) + 1.21x(N − 2)+, · · · , +(1.1)N x(0)

{h(0)x(N ) + h(1)x(N − 1) + h(2)x(N − 2)+, · · · , +h(N )x(0)}



N
= y(N ) = h(k)x(N − k)
k=0

Alternately,

{x(0)h(N ) + x(1)h(N − 1) + x(2)h(N − 2)+, · · · , +x(N )h(0)}



N
= y(N ) = x(k)h(N − k)
k=0

After time reversing and shifting one of the two sequences, the output is the sum
of the product of the corresponding terms. The time-reversal is required, as each
other’s index is running in opposite directions. The generalization of this problem is
the convolution operation. In system analysis, the interest rate is called the impulse
response of the system. The deposits are called the input. The balance at intervals is
the output.

5.1 Convolution

The impulse response, which characterizes the system in the time domain, is the
response of a relaxed (initial conditions are zero) system for the unit-impulse δ(n).
A discrete unit-impulse signal is defined as

1, for n = 0
δ(n) =
0, for n = 0

It is an all-zero sequence, except that its value is one when its argument n is equal to
zero. The input x(n) is decomposed into a sum of scaled and delayed unit-impulses.
The response to each impulse is found and the superposition summation of all the
responses is the system output. Convolution can also be considered as the weighted
average of sections of one of the inputs with the weighting sequence being the other
input.

5.1.1 Linear Convolution

In the convolution operation, the input x(n) is decomposed into scaled and delayed
impulses. At each point, the contribution of all the impulses is summed to find the
5.1 Convolution 115

output y(n). The input, in terms of impulses, is

x(n) = · · · + x(−2)δ(n + 2) + x(−1)δ(n + 1)


+x(0)δ(n) + x(1)δ(n − 1) + x(2)δ(n − 2) + · · ·
∞
= x(k)δ(n − k)
k=−∞

Let the impulse response of the system be h(n). Then, due to the time-invariance
of the LTI system, the response to a delayed impulse δ(n − k) is h(n − k). Due to
the linearity of the LTI system, the response to x(k)δ(n − k) is x(k)h(n − k) and
the total response of the system is the sum of the contributions to all the scaled and
shifted impulses. The 1-D linear convolution of two aperiodic sequences x(n) and
h(n), again due to linearity, is defined as

 ∞

y(n) = x(k)h(n − k) = h(k)x(n − k) = x(n) ∗ h(n) = h(n) ∗ x(n)
k=−∞ k=−∞

The convolution operation relates the input x(n), the output y(n), and the impulse
response h(n) of a system.
Figure 5.1 shows the convolution of the signal x(n) = {2̌, 1, 3, 4} and h(n) =
{1̌, −2, 3}.
The output y(0), from the definition, is

y(0) = x(k)h(0 − k) = (2)(1) = 2,

where h(0 − k) is the time-reversal of h(k). Shifting h(0 − k) to the right, we get the
remaining outputs as

Fig. 5.1 1-D linear k 0 1 2 3


convolution h(k) 1 −2 3
x(k) 2 1 3 4
h(0 − k) 3 −2 1
h(1 − k) 3 −2 1
h(2 − k) 3 −2 1
h(3 − k) 3 −2 1
h(4 − k) 3 −2 1
h(5 − k) 3 −2 1
n 0 1 2 3 4 5
y(n) 2 −3 7 1 1 12
116 5 Convolution and Correlation

y(1) = x(k)h(1 − k) = (2)(−2) + (1)(1) = −3


y(2) = x(k)h(2 − k) = (2)(3) + (1)(−2) + (3)(1) = 7
y(3) = x(k)h(3 − k) = (1)(3) + (3)(−2) + (4)(1) = 1
y(4) = x(k)h(4 − k) = (3)(3) + (4)(−2) = 1
y(5) = x(k)h(5 − k) = (4)(3) = 12

As can be seen from the figure, the convolution operation consists of repeatedly
executing the following four operations. The first operation is the time-reversal of
one of the sequences. The second operation is shifting. The time-reversal and shifting,
resulting in h(n − k), is relatively more difficult to visualize. It is easier to visualize
the simple shifting operation resulting in h(k − n). Since (n − k) is the same as
−(k − n), it is the time-reversal of h(k − n) about a vertical line at the point k = n.
The third operation is to find the products of the overlapping values of x(k) and
h(n − k). The fourth operation is to sum the products, which yields y(n). There are
two quick checks of the convolution output. The product of the sums of the two
sequences convolved is equal to the sum of the output sequence.

(2̌ + 1 + 3 + 4)(1̌ − 2 + 3) = 20 = (2̌ − 3 + 7 + 1 + 1 + 12)

The same test after changing the signs of the odd-indexed terms is

(2̌ − 1 + 3 − 4)(1̌ + 2 + 3) = 0 = (2̌ + 3 + 7 − 1 + 1 − 12)

Convolution and Polynomial Multiplication


Let the coefficients of two polynomials be

x(n) = {2̌, 1, 3, 4} and h(n) = {1̌, −2, 3}

The polynomials are

2 + p + 3p2 + 4p3 and 1 − 2p + 3p2

The product of the two polynomials is

(2 + p + 3p2 + 4p3 )(1 − 2p + 3p2 ) = 2 − 3p + 7p2 + p3 + p4 + 12p5

The coefficients of the product polynomial are the same as those obtained by con-
volving x(n) and h(n).
Linear Convolution Using the DFT
A measure of the comparison of two algorithms is the order of time complexity.
For example, if the number of major operations required to execute an algorithm is
5.1 Convolution 117

proportional to N , the number of elements in the input, then its time complexity is
O(N ). The time complexity of the direct convolution operation is O(N 2 ), whereas that
using the DFT is O(N log2 N ). The evaluation of the convolution of two sequences
becomes faster for longer sequence lengths, if it is carried out in the frequency
domain. The linear convolution output of convolving two sequences is of length that is
equal to the sum of the lengths of the sequences minus one. Therefore, the sequences
have to be zero padded so that their lengths satisfy this constraint to implement
convolution using the DFT. Further, as practically used fast DFT algorithms are of
lengths that is an integral power of 2, this becomes the second constraint. Another
constraint is that the origin of the sequences must be aligned.
Let the sequences to be linearly convolved be

x(n) = {1̌, 3, 2, 4} and h(n) = {3, 1̌, 2}

The linear convolution output of the sequences is

ˇ 11, 20, 8, 8}
{3, 10,

The lengths of the sequences are 4 and 3. Therefore, the convolution output has to
be of length 4 + 3 − 1 = 6. As there are 6 independent values in the output, the
length of the DFT must be at least of length 6. The nearest power of 2 is 23 = 8.
Therefore, the sequences are appended by zeros to make the sequences of length 8.
This excess length produces 8 − 6 = 2 zeros at the end of the output. Then, the
sequences become

{1̌, 3, 2, 4, 0, 0, 0, 0} and {3, 1̌, 2, 0, 0, 0, 0, 0}

The origins of the two sequences must be aligned. Circularly shifting the second
sequence by one position left, we get

{1̌, 2, 0, 0, 0, 0, 0, 3}

The 8-point DFT of the aligned sequences, with a precision of 2 digits, is

ˇ 0.29 − j6.95, −1 + j1, 1.71 − j2.95, −4, 1.71 + j2.95, −1 − j1, 0.29 + j6.95}
X (k) = {10,

H (k) = {6̌, 4.54 + j0.71, 1 + j1, −2.54 + j0.71, −4, −2.54 − j0.71, 1 − j1, 4.54 − j0.71}

The term-by-term product X (k)H (k) is

ˇ 6.24 − j31.31, −2, −2.24 + j8.69, 16, −2.24 − j8.69, −2, 6.24 + j31.31}
X (k)H (k) = {60,

The IDFT of X (k)H (k) is

ˇ 11, 20, 8, 8, 0, 0, 3}
{10,
118 5 Convolution and Correlation

Y (k) =
x(n) xz(n) X(k) X(k)H(k) y(n) = x(n) ∗ h(n)
zero pad DFT IDFT

H(k)
DFT

hz(n)
zero pad

h(n)

Fig. 5.2 Linear convolution using the DFT

Circularly shifting right by one sample interval, we get the linear convolution output
appended by 2 zeros.
ˇ 11, 20, 8, 8, 0, 0}
y(n) = {3, 10,

Figure 5.2 shows the block diagram for implementing linear convolution using
the DFT. The sequences to be convolved, x(n) and h(n), are sufficiently zero padded
according to the requirements given earlier to get xz(n) and hz(n). The DFT of the
zero-padded sequences is computed to get, X (k) and H (k). The IDFT of the term-
by-term product, X (k)H (k), of the DFTs yields the linear convolution of x(n) and
h(n) with some zeros appended. If necessary, alignment of the sequences must be
taken care of, as already pointed out.

5.1.2 Circular Convolution

The circular convolution is also known as cyclic or periodic convolution. While the
linear convolution is used most of the times in the analysis of LTI systems, the circular
convolution is also important for the reason that signals are considered as periodic in
DFT computation and the DFT is the tool to implement the linear convolution faster.
The linear convolution is the periodic convolution in the limit, when the periods of the
signals to be convolved become infinite. Both the circular and linear convolution are
based on the same four operations (folding, shifting, multiplication, and summing).
The difference is that the folding and shifting operations are carried out along a line
in the linear convolution, whereas it is carried out around a circle in the circular
convolution. Due to this difference, some number of output values of linear and
circular convolutions, for the same inputs, are different at the borders.
The circular convolution of the two sequences x(n) and h(n), both of period N , is
defined as
5.1 Convolution 119

Fig. 5.3 1-D circular k −3 −2 −1 0 1 2 3


convolution h(k) 2 −1 3 1 2 −1 3
x(k) 2 1 −3 4
h(0 − k) 3 −1 2 1 3 −1 2
h(1 − k) 3 −1 2 1 3 −1 2
h(2 − k) 3 −1 2 1 3 −1 2
h(3 − k) 3 −1 2 1 3 −1 2
n 0 1 2 3
y(n) 16 −8 9 3


N −1 
N −1
y(n) = x(m)h(n − m) = h(m)x(n − m), n = 0, 1, . . . , N − 1
m=0 m=0

resulting in the periodic output sequence y(n) with the same period. Consider the
circular convolution output y(n) of the sequences

h(n) = {1̌, 2, −1, 3} and x(n) = {2̌, 1, −3, 4}

ˇ −8, 9, 3}
y(n) = {16,

shown in Fig. 5.3. This is the same as the linear convolution with the sequences
periodic. Consequently, the first three output values are different from that of the
linear convolution and the fourth value is the same. The linear convolution output
y(n) of the same sequences is

y(n) = {2̌, 5, −3, 3, 14, −13, 12}

The last three values get added to the first three values to form the circular convolution
output. The sum of the shifted, by 4 samples, copies of linear convolution output is the
circular convolution output. In circular convolution, the periods of the two sequences
to be convolved are assumed to be the same. Let x(n) is a sequence of length N and
h(n) is a sequence of length M with M ≤ N . Sequence h(n) is zero padded to make
its length also N . Then, the circular convolution of x(n) and h(n) yields N output
values. The first (M − 1) output values are not the corresponding linear convolution
output values, while the rest of the (N − M + 1) values are the same. In the last
example, with N = M = 4, the last value y(3) = 3 only is the same in both the
outputs.
Overlap–Save Method
In practical applications, the input sequence is often very long and the impulse
response is relatively short. Even if the required memory is available, the output will
be delayed too long. In these cases, due to the limited availability of the memory
in digital systems and the desirability of fast output, the input signal is segmented
into blocks to suit the memory availability and the speed of response. Each block is
120 5 Convolution and Correlation

Fig. 5.4 Convolution of h(n) 1 2 −1 3


long sequences using the
overlap–save method x(n) 2 1 −3 4
0 0 0 2 1 −3 4 0 0 0 0 0 0

1 2 −1 3 0 0 0 0
1 2 −1 3 0 0 0 0
y(n) 2 5 −3 3 14 −13 12

convolved with the impulse response and the convolution outputs of the successive
blocks are assembled to form the total convolution output. There are two equivalent
methods to carry out convolution in this way. One of it, called the overlap–save
method, is described.
The overlap–save method of convolution of long sequences is shown in Fig. 5.4.
Let the length of the input sequence x(n) be N . Let the length of the impulse response
h(n) be Q and the block length be B. Then, for efficient implementation of the method,
the following condition should be met.

N >> B >> Q

For illustrative purposes, short sequences are used in the example. Let x(n) and h(n)
be
x(n) = {2̌, 1, −3, 4} and h(n) = {1̌, 2, −1, 3}

The output of linear convolution of x(n) and h(n) is

y(n) = {2̌, 5, −3, 3, 14, −13, 12}

Therefore, there are N + Q − 1 = 7 output values have to be computed. Let the block
length B be 8 and N = Q = 4. As first Q − 1 = 3 output values are corrupted, the
input data has to be prepended by 3 zeros. Since the block length B is 8, the data has to
be appended by one zero. The first block of extended x(n) is {0, 0, 0, 2, 1, −3, 4, 0}.
The DFT of this block, with a precision of 2 digits, is

{4, −0.29 + j0.46, −3 + j5, −1.71 − j7.54, 6, −1.71 + j7.54, −3 − j5, −0.29 − j0.46}

The extended h(n) is {1, 2, −1, 3, 0, 0, 0, 0}. The DFT of this data, which is com-
puted only once and stored, is

{5, 0.29 − j2.54, 2 + j1, 1.71 − j4.54, −5, 1.71 + j4.54, 2 − j1, 0.29 + j2.54}

The pointwise product of the two DFTs is

{20, 1.09 + j0.88, −11 + j7, −37.09 − j5.12, −30, −37.09 + j5.12, −11 − j7, 1.09 − j0.88}
5.1 Convolution 121

The IDFT of the product is

{−13, 12, 0, 2, 5, −3, 3, 14}

The last five values {2, 5, −3, 3, 14} are the first five values of linearly convolving
x(n) and h(n). The second block has to overlap the first block by 3 samples. Therefore,
the second block is {−3, 4, 0, 0, 0, 0, 0, 0}. The DFT of this block, with a precision
of 2 digits, is

{1, −0.17 − j2.83, −3 − j4, −5.83 − j2.83, −7, −5.83 + j2.83, −3 + j4, −0.17 + j2.83}

The pointwise product of this DFT with that of extended h(n) is

{5, −7.22 − j0.39, −2 − j11, −22.78 + j21.61, 35,


− 22.78 − j21.61, −2 + j11, −7.22 + j0.39}

The IDFT of the product is

{−3, −2, 11, −13, 12, 0, 0, 0}

The last five values {−13, 12, 0, 0, 0} are the last two values of linearly convolving
x(n) and h(n) appended by three zeros.

5.1.3 2-D Linear Convolution

2-D convolution is a straightforward extension of the 1-D convolution. As the


sequences involved are 2-D, folding, shifting, and zero-padding operations have to
be carried out along the rows and columns of the 2-D data. If one of the sequences is
separable, 2-D convolution can be implemented faster by a set of 1-D convolutions.
The convolution of 2-D sequences x(m, n) and h(m, n) is defined as

 ∞

y(m, n) = x(k, l)h(m − k, n − l)
k=−∞ l=−∞
∞ ∞
= h(k, l)x(m − k, n − l) = h(m, n) ∗ x(m, n)
k=−∞ l=−∞

The same four steps of the 1-D convolution (folding, shifting, multiplying, and sum-
ming) are repeatedly carried out in implementing the 2-D convolution in two dimen-
sions.
1. Any one of the two sequences, say h(k, l), is rotated in the (k, l) plane by 180◦
about the origin to get h(−k, −l). Of course, the same result is achieved by folding
122 5 Convolution and Correlation

h(k, l) about the k-axis to get h(k, −l) and then folding h(k, −l) about the l-axis
to get h(−k, −l) or vice versa.
2. The rotated sequence h(−k, −l) is shifted by (m, n) to get h(m − k, n − l) to find
the convolution output at coordinates (m, n).
3. The term-by-term products, x(k, l)h(m − k, n − l), of all the overlapping samples
are computed.
4. Summing all the products is the convolution output y(m, n) at (m, n).
Let us find the output of convolving the 3 × 3 sequence h(k, l) and the 4 × 4
sequence x(k, l)
⎡ ⎤
⎡ ⎤ 3̌ 1 3 2
2̌ 1 3 ⎢2
⎢ 1 3 4⎥⎥
h(k, l) = ⎣ 1 2 2 ⎦ and x(k, l) = ⎣
2 1 2 3⎦
3 2 1
1 1 2 2

shown in Fig. 5.5. Four examples of computing the convolution output are shown.
For example, with a shift of (0 − k, 0 − l), there is only one overlapping pair (3, 2).
The product of these numbers is the output y(0, 0) = 6. The process is repeated to
get the complete convolution output y(m, n) shown in the figure.

(0, 0) h(k, l) h(k, −l) h(−k, −l)


2 1 3 3 1 2 1 2 3
1 2 2 2 2 1 2 2 1
3 2 1 1 2 3 3 1 2
x(k, l) y(m, n)
3 1 3 2 6 5 16 10 11 6
2 1 3 4 7 11 24 24 23 16
2 1 2 3 15 18 34 36 30 19
1 1 2 2 10 15 29 37 29 16
7 10 16 22 16 7
3 5 9 11 6 2
y(0, 0) =
1 2 3 x(k, l)h(0 − k, 0 − l) 1 2 3 y(0, 1) =
2 2 1 2 2 1 x(k, l)h(0 − k, 1 − l)
3 1 2 3 1 3 2 3 1 3 2 1 3 2
2 1 3 4 2 1 3 4
2 1 2 3 2 1 2 3
1 1 2 2 1 1 2 2
3 1 3 2 1 2 3 3 1 3 2
1 2 2 1 3 3 4 2 2 2 1 1 3 4
2 2 2 1 1 2 3 3 1 2 2 1 2 3
3 1 1 1 2 2 2 1 1 2 2
y(3, 2) = x(k, l)h(3 − k, 2 − l) y(2, 1) = x(k, l)h(2 − k, 1 − l)

Fig. 5.5 2-D linear convolution


5.1 Convolution 123
⎡ ⎤
6 5 16 10 11 6
⎢ 7 11 24 24 23 16 ⎥
⎢ ⎥
⎢ 15 18 34 36 30 19 ⎥
y(m, n) = ⎢
⎢ 10

⎢ 15 29 37 29 16 ⎥

⎣ 7 10 16 22 16 7 ⎦
3 5 9 11 6 2

We assumed that the values outside the defined region of the sequence are zero.
This assumption may or may not be suitable. Some other commonly used border
extensions are based on periodicity, symmetry, or replication.
Let us compute the linear convolution of the last example using the DFT. As the
convolution output is of size 6 × 6 and the nearest power of 2 is 8, the sequences are
zero padded to get
⎡ ⎤ ⎡ ⎤
3̌ 1 3 2 0 0 0 0 2̌ 1 3 0 0 0 0 0
⎢2 1 3 4 0 0 0 0⎥ ⎢1 2 2 0 0 0 0 0⎥
⎢ ⎥ ⎢ ⎥
⎢2 1 2 3 0 0 0 0⎥ ⎢3 2 1 0 0 0 0 0⎥
⎢ ⎥ ⎢ ⎥
⎢1 1 2 2 0 0 0 0⎥⎥ ⎢0 0 0 0 0 0 0 0⎥
xz(m, n) = ⎢
⎢0 ⎥ hz(m, n) = ⎢
⎢0

⎢ 0 0 0 0 0 0 0⎥ ⎢ 0 0 0 0 0 0 0⎥⎥
⎢0 0 0 0 0 0 0 0⎥⎥ ⎢0 0 0 0 0 0 0 0⎥
⎢ ⎢ ⎥
⎣0 0 0 0 0 0 0 0 ⎦ ⎣0 0 0 0 0 0 0 0⎦
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

The 2-D DFT of xz(m, n), X (k, l), is shown in Table 5.1. The 2-D DFT of hz(m, n),
H (k, l), is shown in Table 5.2. The pointwise product of X (k, l) and H (k, l),
X (k, l)H (k, l) is shown in Table 5.3. The IDFT of X (k, l)H (k, l) is the convolu-
tion output y(m, n) appended by zeros in the last 2 rows and columns.
⎡ ⎤
6 5 16 10 11 6 0 0
⎢ 7 11 24 24 23 16 0 0 ⎥
⎢ ⎥
⎢ 15 18 34 36 30 19 0 0 ⎥
⎢ ⎥
⎢ 10 15 29 37 29 16 0 0 ⎥
y(m, n) = ⎢
⎢ 7 10 16 22 16 7 0 0 ⎥

⎢ ⎥
⎢ 3 5 9 11 6 2 0 0 ⎥
⎢ ⎥
⎣ 0 0 0 0 0 0 0 0⎦
0 0 0 0 0 0 0 0

The top-left 6 × 6 of y(m, n) are the output values.


2-D Convolution with Separable Filters
A 2-D separable filter can be expressed as the product of a column vector and a row
vector. For convolving with separable filters, 1-D convolution is sufficient. Consider
the separable filter h(m, n) and the corresponding column and row filters.
124 5 Convolution and Correlation

Table 5.1 2-D DFT of zero-padded x(m, n), X (k, l)


33.00+j 0.00 3.05−j20.61 −2.00+j 12.95−j 3.00+j 12.95+j −2.00−j 3.05+j20.61
7.00 0.61 0.00 0.61 7.00
11.83−j19.31 −10.36−j 4.83+j 4.12−j 3.00+j 6.71−j −4.83−j 14.36+j 6.12
7.54 3.83 6.95 0.00 8.12 1.00
1.00−j 4.00 −0.71+j 2.00−j −0.12−j 3.00+j 0.71−j −2.00+j 4.12+j 0.71
0.12 1.00 0.71 0.00 4.12 1.00
6.17−j 3.31 −0.12−j 0.83+j 2.36+j 3.00+j 1.64−j −0.83+j 5.29+j 3.88
2.95 1.00 0.46 0.00 1.88 1.83
1.00+j 0.00 2.71+j 0.71 2.00−j 1.29+j 3.00+j 1.29−j 2.00+j 2.71−j 0.71
1.00 0.71 0.00 0.71 1.00
6.17+j 3.31 5.29−j 3.88 −0.83−j 1.64+j 3.00−j 2.36−j 0.83−j −0.12+j 2.95
1.83 1.88 0.00 0.46 1.00
1.00+j 4.00 4.12−j 0.71 −2.00−j 0.71+j 3.00+j −0.12+j 2.00+j −0.71−j 0.12
1.00 4.12 0.00 0.71 1.00
11.83+j19.31 14.36−j 6.12 −4.83+j 6.71+j 3.00+j 4.12+j 4.83−j −10.36+j
1.00 8.12 0.00 6.95 3.83 7.54

Table 5.2 2-D DFT of zero-padded h(m, n), H (k, l)


17.00+j 9.54−j 9.54 0.00−j 2.46+j 7.00+j 2.46−j 0.00+j 9.54+j 9.54
0.00 5.00 2.46 0.00 2.46 5.00
9.54−j −0.41−j12.24 −5.12−j 1.00+j 4.71−j 1.00−j 1.71+j 9.24+j 0.00
9.54 3.71 1.41 2.71 4.00 1.12
0.00−j −5.12−j 3.71 −5.00+j 0.29+j 2.00−j −0.88−j −1.00+j 1.71−j 1.12
5.00 2.00 3.12 1.00 2.29 0.00
2.46+j 1.00+j 1.41 0.29+j 2.41+j 3.29+j 0.76+j −0.88+j 1.00+j 4.00
2.46 3.12 3.76 1.29 0.00 2.29
7.00+j 4.71−j 2.71 2.00−j 3.29+j 5.00+j 3.29−j 2.00+j 4.71+j 2.71
0.00 1.00 1.29 0.00 1.29 1.00
2.46−j 1.00−j 4.00 −0.88−j 0.76−j 3.29−j 2.41−j 0.29−j 1.00−j 1.41
2.46 2.29 0.00 1.29 3.76 3.12
0.00+j 1.71+j 1.12 −1.00+j −0.88+j 2.00+j 0.29−j −5.00−j −5.12+j 3.71
5.00 0.00 2.29 1.00 3.12 2.00
9.54+j 9.24+j 0.00 1.71−j 1.00+j 4.71+j 1.00−j −5.12+j −0.41+j12.24
9.54 1.12 4.00 2.71 1.41 3.71

⎡ ⎤ ⎡ ⎤
1̌ 1 1 1

h(m, n) = ⎣ 1 1 1 ⎦ = ⎣ 1 ⎦ 1 1 1 = h(m)h(n)
1 1 1 1

The convolution of x(m, n) given in the last example with this filter can be carried
out using two 1-D filters, {h(0) = 1, h(1) = 1, h(2) = 1}. Since xz(m, n) is of size
8 × 8, the zero-padded filter is
5.1 Convolution

Table 5.3 Convolution output Y (k, l) = X (k, l)H (k, l) in the frequency domain
561.00+j 0.00 −167.41−j225.58 35.00+j10.00 33.41+j30.42 21.00+j 0.00 33.41−j30.42 35.00−j10.00 −167.41+j225.58
−71.38−j296.96 −87.96+j130.00 −10.54−j37.51 13.95−j 1.12 14.12−j 8.12 −25.78−j34.95 −7.12−j 7.12 132.76+j56.58
−20.00−j 5.00 4.07+j 2.00 −8.00+j 9.00 2.17−j 0.59 6.00−j 3.00 −10.07+j 2.00 2.00−j 1.00 7.83−j 3.41
23.38+j 7.04 4.05−j 3.12 −2.88+j 2.88 3.96+j10.00 9.88+j 3.88 1.24−j 1.42 −3.46−j 3.51 −10.22+j25.05
7.00+j 0.00 14.66−j 4.00 3.00−j 4.00 3.34+j 4.00 15.00+j 0.00 3.34−j 4.00 3.00+j 4.00 14.66+j 4.00
23.38−j 7.04 −10.22−j25.05 −3.46+j 3.51 1.24+j 1.42 9.88−j 3.88 3.96−j10.00 −2.88−j 2.88 4.05+j 3.12
−20.00+j 5.00 7.83+j 3.41 2.00+j 1.00 −10.07−j 2.00 6.00+j 3.00 2.17+j 0.59 −8.00−j 9.00 4.07−j 2.00
−71.38+j296.96 132.76−j56.58 −7.12+j 7.12 −25.78+j34.95 14.12+j 8.12 13.95+j 1.12 −10.54+j37.51 −87.96−j130.00
125
126

Table 5.4 Partial convolution output P(k, l) = X (k, l)H (k) in the frequency domain
99 9.15−j61.82 −6.00+j21.00 38.85−j1.82 9.00+j0.00 38.85+j1.82 −6.00−j21.00 9.15+j61.82
−12.78−j53.16 −30.56+j4.83 14.78−j1.71 −4.83−j18.90 5.12−j5.12 −2.41−j25.31 −9.95+j6.54 34.97−j14.07
−4.00−j1.00 0.12+j0.71 −1.00−j2.00 −0.71+j0.12 0.00−j3.00 −4.12−j0.71 1.00+j2.00 0.71−j4.12
2.78+j0.84 0.83−j0.90 −0.05+j0.54 0.56+j0.83 0.88+j0.88 1.03−j0.07 −0.78+j0.29 0.41+j2.69
1.00+j0.00 2.71+j0.71 2.00−j1.00 1.29+j0.71 3.00+j0.00 1.29−j0.71 2.00+j1.00 2.71−j0.71
2.78−j0.84 0.41−j2.69 −0.78−j0.29 1.03+j0.07 0.88−j0.88 0.56−j0.83 −0.05−j0.54 0.83+j0.90
−4.00+j1.00 0.71+j4.12 1.00−j2.00 −4.12+j0.71 0.00+j3.00 −0.71−j0.12 −1.00+j2.00 0.12−j0.71
−12.78+j53.16 34.97+j14.07 −9.95−j6.54 −2.41+j25.31 5.12+j5.12 −4.83+j18.90 14.78+j1.71 −30.56−j4.83
5 Convolution and Correlation
5.1 Convolution 127

Table 5.5 Convolution output Y (k, l) = P(k, l)H (l) in the frequency domain
297 −89.91− 21.00+j6.00 11.91+j10.85 9.00+j0.00 11.91−j10.85 21.00−j6.00 −89.91+
j121.15 j121.15
−38.33− −43.92+ −1.71− 4.12−j6.95 5.12−j5.12 −8.12−j6.71 −6.54−j9.95 83.72+j35.68
j159.49 j60.41 j14.78
−12.00− 1.41+j1.00 −2.00+j1.00 −0.24−j0.17 0.00−j3.00 −1.41+j1.00 −2.00+j1.00 8.24−j5.83
j3.00
8.33+j2.51 −0.12−j2.95 0.54+j0.05 −0.08+j0.41 0.88+j0.88 0.28−j0.32 −0.29−j0.78 −3.88+j5.29
3.00+j0.00 5.83−j3.41 −1.00−j2.00 0.17+j0.59 3.00+j0.00 0.17−j0.59 −1.00+j2.00 5.83+j3.41
8.33−j2.51 −3.88−j5.29 −0.29+j0.78 0.28+j0.32 0.88−j0.88 −0.08−j0.41 0.54−j0.05 −0.12+j2.95
−12.00+ 8.24+j5.83 −2.00−j1.00 −1.41−j1.00 0.00+j3.00 −0.24+j0.17 −2.00−j1.00 1.41−j1.00
j3.00
−38.33+ 83.72−j35.68 −6.54+j9.95 −8.12+j6.71 5.12+j5.12 4.12+j6.95 −1.71+ −43.92−
j159.49 j14.78 j60.41

{h(0) = 1, h(1) = 1, h(2) = 1, h(3) = 0, h(4) = 0, h(5) = 0, h(6) = 0, h(7) = 0}

The row and column filters have the same coefficients. Taking the 1-D DFT of this
filter, we get

H (k) = {3, 1.7071 − j1.7071, −j, 0.2929 + j0.2929, 1, 0.2929


− j0.2929, j, 1.7071 + j1.7071}

The 2-D DFT, X (k, l), of xz(m, n) is shown in Table 5.1. The partial convolution out-
put, P(k, l) = X (k, l)H (k) shown in Table 5.4, in the frequency domain is obtained
by pointwise multiplication of each column of X (k, l) by H (k). The convolution out-
put, Y (k, l) = P(k, l)H (l) shown in Table 5.5, in the frequency domain is obtained
by pointwise multiplication of each row of P(k, l) by H (l). The output is the 2-D
IDFT of Y (k, l).
⎡ ⎤
3 4 7 6 5 2 0 0
⎢ 5 7 13 14 12 6 0 0 ⎥
⎢ ⎥
⎢ 7 10 18 20 17 9 0 0 ⎥
⎢ ⎥
⎢ 5 8 15 19 16 9 0 0 ⎥

y(m, n) = ⎢ ⎥

⎢ 3 5 9 11 9 5 0 0 ⎥
⎢1 2 4 5 4 2 0 0⎥
⎢ ⎥
⎣0 0 0 0 0 0 0 0⎦
0 0 0 0 0 0 0 0

The top-left 6×6 of y(m, n) are the output values. Figure 5.6 shows the block diagram
for 2-D convolution with separable filters. The filter is decomposed in to row and col-
umn filters with sufficient zero padding and their DFTs H (l) and H (k) are computed.
The input x(m, n) is zero padded to get xz(m, n) and its DFT X (k, l) is computed.
The columns of X (k, l) are multiplied by H (k) to get the partial convolution output
128 5 Convolution and Correlation

xz(m, n) X(k, l) P (k, l) Y (k, l) y(m, n)


2-D DFT 2-D IDFT

H(k) H(l)
1-D DFT 1-D DFT

hz(m) hz(n)
Decompose

hz(m, n)

Fig. 5.6 2-D linear convolution using the DFT with separable filters

P(k, l) = X (k, l)H (k) in the frequency domain. The rows of partial convolution out-
put P(k, l) are multiplied by H (l) to get the convolution output Y (k, l) = P(k, l)H (l)
in the frequency domain. The 2-D IDFT of Y (k, l) is the convolution output y(m, n).

5.2 Correlation

5.2.1 The Linear Correlation

Correlation is a similarity measure between two signals. The correlation output indi-
cates the strength of the relationships between the signals, which may be negative,
zero or positive. If the signals are positively correlated, then both increase or decrease
together. The more time we walk, the more calories we burn. If the signals are neg-
atively correlated, then one increases and the other decreases. It is an inverse rela-
tionship. An increase in the amount of physical effort results in weight loss. Zero
correlation implies no discernible relationship between the two variables. If a signal
increases with the other remaining constant or increasing half the time and decreas-
ing half the time, it indicates no correlation. In signal processing, object recognition
and estimation are typical examples of correlation operation. The most famous and
important example, of course, is the determination of the amplitudes of the signal
components by correlating the given signal with each of its components in Fourier
analysis.
The cross-correlation of two signals x(n) and y(n) is defined as

 ∞


rxy (m) = x(n)y (n − m) = x(n + m)y∗ (n), m = 0, ±1, ±2, . . .
n=−∞ n=−∞

Equivalent but alternate definition is also used. The asterisk in the definition indicates
complex conjugation operation, which has no effect for real-valued signals. The
5.2 Correlation 129

Fig. 5.7 Linear correlation n 0 1 2 3


operation y(n) 2 1 −3
x(n) 2 1 3 4
y(n + 2) 2 1 −3
y(n + 1) 2 1 −3
y(n) 2 1 −3
y(n − 1) 2 1 −3
y(n − 2) 2 1 −3
y(n − 3) 2 1 −3
m −2 −1 0 1 2 3
rxy (m) −6 −1 −4 −7 10 8

output is the sum of products of two signals, with one of them shifted. The number
of shifts is the independent variable and the sum is the dependent variable.
The correlation of y(n) = {2̌, 1, −3} and x(n) = {2̌, 1, 3, 4} is shown in Fig. 5.7.
The output is rxy (n) = {−6, −1, −4̌, −7, 10, 8}. The convolution operation without
time-reversal is the correlation operation. Convolution of the time-reversed version
of the sequence y(n) with x(n) is the same as correlation of x(n) and y(n). Two real
signals x(n) and y(n) are said to be orthogonal over the entire time interval if


x(n)y(n) = 0
n=−∞

When two signals to be correlated are the same, the operation is called autocorre-
lation. The autocorrelation function of real-valued signals is even-symmetric. Unlike
convolution, correlation operation, in general, is not commutative. The correlation
of a function with an impulse shifts the time-reversed version of the function to the
location of the impulse.
Let us implement the correlation using the DFT. The zero-padded 8-point DFTs,
X (k) and Y (k), of x(n) and y(n) are, respectively,

{10, −0.1213 − j6.5355, −1 + j3, 4.1213 − j0.5355,


0, 4.1213 + j0.5355, −1 − j3, −0.1213 + j6.5355}

{0, 2.7071 + j2.2929, 5 − j, 1.2929 − j3.7071,


− 2, 1.2929 + j3.7071, 5 + j, 2.7071 − j2.2929}

The product X (k)Y ∗ (k) is

{0, −15.3137 − j17.4142, −8 + j14, 7.3137 + j14.5858,


0, 7.3137 − j14.5858, −8 − j14, −15.3137 + j17.4142}
130 5 Convolution and Correlation

The IDFT of X (k)Y ∗ (k) is

{−4, −7, 10, 8, 0, 0, −6, −1}

Right shifting it cyclically by 2 sample intervals is rxy (n) appended by 2 zeros.

5.3 Applications

Large number of applications are based on Fourier analysis, correlation, and convo-
lution. In this section, we present some samples of the applications.

5.3.1 Lowpass Filtering of Images

Filter is a system that removes something from whatever passes through it. A coffee
filter removes the coffee grounds and allows the decoction to flow through. A water
filter removes salt and bacteria. An ultraviolet filter blocks or absorbs ultraviolet
light.
In signal and image processing, the spectra of signals are altered in a desired
way. If the low-frequency components are allowed and high-frequency components
suppressed, it is called a lowpass filter. If the high-frequency components are allowed
and low-frequency components suppressed, it is called a highpass filter. If we find
the running averages of a set of numbers in a neighborhood of a number of a long
data sequence, the bumpiness of the sequence is reduced. On the other hand, if we
find the differences, the bumpiness will be enhanced and the smoothness reduced. A
purely high frequency signal such as {1, −1} will become zero, if averaged. A purely
low-frequency signal such as {1, 1} will become zero, if differenced. The filtering
operation, in the time domain, is modeled by convolution. The impulse responses of
the various types of filters characterize the filtering action.
The filtering operation is easier to visualize in the frequency domain, since con-
volution in the time domain becomes multiplication in the frequency domain. The
spectrum of a signal is a display of its ordered frequency components versus their
respective amplitudes. Therefore, we can simply alter any part of the spectrum in a
desired way. If we make the coefficients of the high-frequency components of the
signal small or zero, the signal becomes smoother. If we make the coefficients of the
low-frequency components of the signal small or zero, the signal becomes bumpier.
In addition to easier visualization of the filtering operation, the implementation of
the filtering operation in the frequency domain is faster for longer filters. Let us study
the filtering operation in both the time domain and the frequency domain.
Lowpass filters with different characteristics are available. The impulse response
of the simplest and widely used 3 × 3 2-D lowpass filter, called the averaging filter,
is
5.3 Applications 131
⎡ ⎤
h(−1, −1) h(−1, 0) h(−1, 1)
h(m, n) = ⎣ h(0, −1) h(0.0) h(0, 1) ⎦
h(1, −1) h(1, 0) h(1, 1)
⎡ ⎤
1 1 1
1
= ⎣ 1 1 1 ⎦ , m = −1, 0, 1, n = −1, 0, 1
9 1 1 1

The origin of the filter is shown in boldface. All the coefficient values are 1/9. The
filter outputs the average of the pixel values of the image in each neighborhood.
Variable weighting is applied in other lowpass filters. When an image is passed
through this filter, the output at each point is given by

1
y(m, n) = (x(m − 1, n − 1) + x(m − 1, n) + x(m − 1, n + 1) + x(m, n − 1) + x(m, n)
9
+ x(m, n + 1) + x(m + 1, n − 1) + x(m + 1, n) + x(m + 1, n + 1))

The output image becomes smoother. The smoothing effect increases with larger
filters.
When a 2-D filter is decomposable in terms of 1-D filters, it is always advantageous
to use 1-D convolution to filter an image. The averaging filter is decomposable. This
filter can be expressed as the product of a the 3×1 column filter hc (m) = {1, 1, 1}T /3
and the 1 × 3 row filter hr (n) = {1, 1, 1}/3, which is the transpose of the column
filter. ⎡ ⎤ ⎡ ⎤
1 1 1 1
1⎣ 1 1

h(m, n) = 1 1 1⎦ = ⎣1⎦ 1 1 1 = hc (m)hr (n)
9 1 1 1 3 1 3

The filtered output is obtained by convolving the image with the column filter first and
then convolving the partial output by the row filter or vice versa, as convolution oper-
ation is commutative. With the 2-D filter h(m, n) separable, h(m, n) = hc (m)hr (n)
and, with input x(m, n),

h(m, n) ∗ x(m, n) = (hc (m)hr (n)) ∗ x(m, n)


= (hc (m) ∗ x(m, n)) ∗ hr (n) = hc (m) ∗ (x(m, n) ∗ hr (n))
   
y(k, l) = hc (m) hr (n)x(k − m, l − n) = hr (n) hc (m)x(k − m, l − n)
m n n m

Let the input be ⎡ ⎤


2 1 4 3
⎢ 1 −2 3 1⎥
x(m, n) = ⎢
⎣ 2 −2

1 −1 ⎦
1 1 −2 2
132 5 Convolution and Correlation

In filtering images, suitable border extensions are assumed. Assuming zero padding
at the borders, the output of 1-D filtering of the columns of the input and the output
of 1-D filtering of the rows of the partial output are, respectively,
⎡ ⎤ ⎡ ⎤
3 −1 7 4 2 9 10 11
1⎢ 5 −3 8 3⎥ 1 ⎢ 2 10 8 11 ⎥
yc(m, n) = ⎢ ⎥ y(m, n) = ⎢ ⎥
3 ⎣4 −3 2 2⎦ 9 ⎣1 3 1 4⎦
3 −1 −1 1 2 1 −1 0

Note that, only the central part of the output, of the same size as the input, is shown.
Assuming periodicity at the borders, the extended input and the output are, respec-
tively,
⎡ ⎤
2 1 1 −2 2 1 ⎡ ⎤
⎢ 3 2 1 4 3 2⎥ 10 9 11 15
⎢ ⎥
⎢ 1 1 −2 3 1 1⎥ 1 ⎢ 5 10 8 16 ⎥
xe(m, n) = ⎢
⎢ −1
⎥ y(m, n) = ⎢ ⎥
⎢ 2 −2 1 −1 2 ⎥
⎥ 9 ⎣ 3 3 1 8⎦
⎣ 2 1 1 −2 2 1⎦ 9 8 7 12
3 2 1 4 3 2

With different border extensions, the outputs differ only at the borders.
Figure 5.8a shows a 256 × 256 8-bit gray level image. Figure 5.8b–d shows the
filtered images with 5 × 5, 9 × 9 and 13 × 13 averaging filters, respectively. The
blurring of the image is more with the larger filters.
Lowpass Filtering with the DFT
For a 2-D signal, we have to zero pad in two directions. Figure 5.9 shows the 8 × 8
zero-padded image xz(m, n), obtained from the 4 × 4 image x(m, n) used in the last
example. The 3 × 3 filter h(m, n), along with the corresponding zero-padded and
shifted row and column filters, is also shown. Since the convolution output is of size
is 6 × 6 and the the nearest power of 2 is 8, the size of the zero-padded image is
8 × 8.
As the averaging filter is separable. the convolution operation can be carried out
using two 1-D filters, {h(−1) = 1, h(0) = 1, h(1) = 1}/3. Since xz(m, n) is of size
8 × 8 and the origin is at the top-left corner, the zero-padded filter has to be of length
8 with h(0) in the beginning. The zero-padded filter can be written as

{h(−1) = 1, h(0) = 1, h(1) = 1, h(2) = 0, h(3) = 0, h(4) = 0, h(5) = 0, h(6) = 0}/3

We get the zero-padded column filter

1
hz(m) = {1, 1, 0, 0, 0, 0, 0, 1}
3
with the origin at the beginning, by circularly shifting left by one position, The row
filter, shown in Fig. 5.9, is the transpose of the column filter. Computing the 1-D DFT
5.3 Applications 133

Fig. 5.8 a A 256 × 256 8-bit image; b filtered image with 5 × 5 averaging filter; c filtered image
with 9 × 9 filter; d filtered image with 13 × 13 filter

xz(m, n) hz(m) hz(n)


2 1 4 3 0 0 0 0 1/3 1/3 1/3 0 0 0 0 0 1/3
1 −2 3 1 0 0 0 0 1/3
2 −2 1 −1 0 0 0 0 0
1 1 −2 2 0 0 0 0 0 h(m, n)
0 0 0 0 0 0 0 0 0 1/9 1/9 1/9
0 0 0 0 0 0 0 0 0 1/9 1/9 1/9
0 0 0 0 0 0 0 0 0 1/9 1/9 1/9
0 0 0 0 0 0 0 0 1/3

Fig. 5.9 Zero padding of images for implementing the 2-D linear convolution using the 2-D DFT
134 5 Convolution and Correlation

of this filter (division by 3 is deferred), we get

H (k) = {3, 2.4142, 1, −0.4142, −1, −0.4142, 1, 2.4142}

Since the filter is real-valued and even-symmetric in the time domain, its DFT is
also real-valued and even-symmetric, The DFT of the column filter H (k) is the
transpose of that of the row filter H (l). The 2-D DFT, X (k, l), of xz(m, n) in Fig. 5.9
is shown in Table 5.6. The partial convolution output, 3P(k, l) = X (k, l)H (l) shown
in Table 5.7, in the frequency domain is obtained by pointwise multiplication of each
row of X (k, l) by H (l). The convolution output, 9Y (k, l) = 3P(k, l)H (k) shown in
Table 5.8, in the frequency domain is obtained by pointwise multiplication of each
column of 3P(k, l) by H (k).
The 2-D IDFT of 9Y (k, l) divided by 9 is the output, which is the same as that
obtained by time-domain convolution, is
⎡ ⎤
2 9 10 11 4 0 0 3
⎢ 2 10 8 11 3 0 0 5 ⎥
⎢ ⎥
⎢1 3 1 4 2 0 0 4⎥
⎢ ⎥
1 ⎢ 2 1 −1 0 1 0 0 3 ⎥
y(m, n) = ⎢ ⎥
9⎢⎢2 0 1 0 2 0 0 1⎥ ⎥
⎢0 0 0 0 0 0 0 0⎥
⎢ ⎥
⎣0 0 0 0 0 0 0 0⎦
3 7 8 7 3 0 0 2

The top left 4 × 4 of y(m, n) are the center part of the output of the linear convolution
of x(m, n) and h(m, n).
Figure 5.10a shows the magnitude spectrum in log scale, log10 (1 + |X (k, l)|) in
the center-zero format, of the image in Fig. 5.8a. Figure 5.10b–d shows the magnitude
spectra in log scale of the 5 × 5, 9 × 9 and 13 × 13 averaging filters, respectively. As
with the characteristics of typical practical images, the spectrum of the image has
high magnitude in the neighborhood of zero frequency and the magnitude decreases
with increasing frequency. A small filter has a less blurring effect and is characterized
by a high cutoff frequency. As the size of the filter increases, the cutoff frequency
moves toward zero frequency and the blurring effect is more pronounced.

5.3.2 Highpass Filtering of Images

The Laplacian sharpening filter is defined as


⎡ ⎤
0 −1 0
h(m, n) = ⎣ −1 5 −1 ⎦ (5.1)
0 −1 0
5.3 Applications

Table 5.6 2-D DFT, X (k, l), of xz(m, n) in Fig. 5.9


15.00+j0.00 1.05−j8.12 0.00+j7.00 10.95+j3.88 9.00+j0.00 10.95−j3.88 0.00−j7.00 1.05+j8.12
10.71−j3.54 −1.00−j9.07 −1.71+j1.71 7.24+j0.59 8.36−j6.71 1.59−j12.83 −9.36−j5.12 0.17+j7.66
10.00−j1.00 −2.88-j6.54 −1.00+j6.00 8.54−j3.36 −4.00−j9.00 −7.12+j0.54 −5.00+j4.00 1.46+j9.36
9.29−j3.54 −1.24−j3.41 3.36+j0.88 −1.00−j5.07 −4.36+j5.29 5.83+j3.66 −0.29−j0.29 4.41+j7.17
5.00+j0.00 2.71−j3.29 −2.00-j1.00 1.29+j4.71 7.00+j0.00 1.29−j4.71 −2.00+j1.00 2.71+j3.29
9.29+j3.54 4.41−j7.17 −0.29+j0.29 5.83−j3.66 −4.36−j5.29 −1.00+j5.07 3.36−j0.88 −1.24+j3.41
10.00+j1.00 1.46−j9.36 −5.00−j4.00 −7.12−j0.54 −4.00+j9.00 8.54+j3.36 −1.00−j6.00 −2.88+j6.54
10.71+j3.54 0.17−j7.66 −9.36+j5.12 1.59+j12.83 8.36+j6.71 7.24−j0.59 −1.71−j1.71 −1.00+j9.07
135
136

Table 5.7 Partial convolution output 3P(k, l) = X (k, l)H (l) in the frequency domain
45.00+j0.00 2.54−j19.61 0.00+j7.00 –4.54–j1.61 –9.00+j0.00 –4.54+j1.61 0.00–j7.00 2.54+j19.61
32.12−j10.61 −2.41−j21.90 –1.71+j1.71 –3.00–j0.24 –8.36+j6.71 –0.66+j5.31 –9.36–j5.12 0.41+j18.49
30.00−j3.00 −6.95−j15.78 –1.00+j6.00 –3.54+j1.39 4.00+j9.00 2.95–j0.22 –5.00+j4.00 3.54+j22.61
27.88−j10.61 −3.00−j8.24 3.36+j0.88 0.41+j2.10 4.36–j5.29 –2.41–j1.51 –0.29–j0.29 10.66+j17.31
15.00+j0.00 6.54−j7.95 –2.00–j1.00 –0.54–j1.95 –7.00+j0.00 –0.54+j1.95 –2.00+j1.00 6.54+j7.95
27.88+j10.61 10.66−j17.31 –0.29+j0.29 –2.41+j1.51 4.36+j5.29 0.41–j2.10 3.36–j0.88 –3.00+j8.24
30.00+j3.00 3.54−j22.61 –5.00–j4.00 2.95+j0.22 4.00–j9.00 –3.54–j1.39 –1.00–j6.00 –6.95+j15.78
32.12+j10.61 0.41−j18.49 –9.36+j5.12 –0.66–j5.31 –8.36–j6.71 –3.00+j0.24 –1.71–j1.71 –2.41+j21.90
5 Convolution and Correlation
5.3 Applications

Table 5.8 Convolution output 9Y (k, l) = 3P(k, l)H (k) in the frequency domain
135.00+j0.00 7.61–j58.82 0.00+j21.00 –13.61–j4.82 –27.00+j0.00 –13.61+j4.82 0.00–j21.00 7.61+j58.82
77.55–j25.61 –5.83–j52.87 –4.12+j4.12 –7.24–j0.59 –20.19+j16.19 –1.59+j12.83 –22.61–j12.36 1.00+j44.63
30.00–j3.00 –6.95–j15.78 –1.00+j6.00 –3.54+j1.39 4.00+j9.00 2.95–j0.22 –5.00+j4.00 3.54+j22.61
–11.55+j4.39 1.24+j3.41 –1.39–j0.36 –0.17–j0.87 –1.81+j2.19 1.00+j0.63 0.12+j0.12 –4.41–j7.17
–15.00+j0.00 –6.54+j7.95 2.00+j1.00 0.54+j1.95 7.00+j0.00 0.54–j1.95 2.00–j1.00 –6.54–j7.95
–11.55–j4.39 –4.41+j7.17 0.12–j0.12 1.00–j0.63 –1.81–j2.19 –0.17+j0.87 –1.39+j0.36 1.24–j3.41
30.00+j3.00 3.54–j22.61 –5.00–j4.00 2.95+j0.22 4.00–j9.00 –3.54–j1.39 –1.00–j6.00 –6.95+j15.78
77.55+j25.61 1.00–j44.63 –22.61+j12.36 –1.59–j12.83 –20.19–j16.19 –7.24+j0.59 –4.12–j4.12 –5.83+j52.87
137
138 5 Convolution and Correlation

Fig. 5.10 a The magnitude spectrum in log scale, log10 (1 + |X (k, l)|) in the center-zero format,
of the image in Fig. 5.8a; b the magnitude spectrum in log scale of the 5 × 5 averaging filter; c the
magnitude spectrum in log scale, of the 9 × 9 averaging filter; and d the magnitude spectrum in log
scale of the 13 × 13 averaging filter

Using this filter, with the same input used for lowpass filtering, the outputs with the
input zero padded are
⎡ ⎤
8 1 13 10
⎢ 3 −13 11 0⎥
y(m, n) = ⎢
⎣ 10 −12

7 −9 ⎦
2 8 −14 13
5.3 Applications 139

Fig. 5.11 a Image in Fig. 5.8a after application of the 4 × 4 Laplacian sharpening filter (Eq. (5.1));
b image in Fig. 5.8a after application of a 8 × 8 Laplacian sharpening filter

Figure 5.11a shows the image in Fig. 5.8a after application of the 4 × 4 Laplacian
filter (Eq. (5.1)). Figure 5.11b shows the image in Fig. 5.8a after application of the
8 × 8 Laplacian sharpening filter. The edges are sharper compared with Fig. 5.11a.
Image Sharpening with the DFT
High-frequency signals are characterized by the high difference between successive
sample values. In this section, we present image sharpening with the DFT for the
same input and the filter, assuming zero padding at the borders. The sharpening filter
is inseparable with the center in the middle. By zero padding and shifting in two
directions, we get
⎡ ⎤
5 −1 0 0 0 0 0 −1
⎢ −1 0 0 0 0 0 0 0⎥
⎢ ⎥
⎢ 0 0 0 0 0 0 0 0⎥
⎢ ⎥
⎢ 0 0 0 0 0 0 0 0⎥
hz(m, n) = ⎢
⎢ 0

⎢ 0 0 0 0 0 0 0⎥⎥
⎢ 0 0 0 0 0 0 0 0⎥
⎢ ⎥
⎣ 0 0 0 0 0 0 0 0⎦
−1 0 0 0 0 0 0 0

The 2-D DFT, H (k, l), of hz(m, n) is shown in Table 5.9. Since the filter is real-valued
and even-symmetric, its DFT is also real-valued and even-symmetric. The 2-D DFT
of the zero-padded input X (k, l) is the same as in the last example. The convolution
140 5 Convolution and Correlation

Table 5.9 2-D DFT, H (k, l), of zero-padded hz(m, n)


1.00 1.59 3.00 4.41 5.00 4.41 3.00 1.59
1.59 2.17 3.59 5.00 5.59 5.00 3.59 2.17
3.00 3.59 5.00 6.41 7.00 6.41 5.00 3.59
4.41 5.00 6.41 7.83 8.41 7.83 6.41 5.00
5.00 5.59 7.00 8.41 9.00 8.41 7.00 5.59
4.41 5.00 6.41 7.83 8.41 7.83 6.41 5.00
3.00 3.59 5.00 6.41 7.00 6.41 5.00 3.59
1.59 2.17 3.59 5.00 5.59 5.00 3.59 2.17

output Y (k, l) = X (k, l)H (k, l), in the frequency domain, is obtained by pointwise
multiplication and it is shown in Table 5.10. The output, which is the same as that
obtained in in the spatial domain, is the top left 4 × 4 of the 8 × 8 2-D IDFT of Y (k, l)
⎡ ⎤
8 1 13 10
⎢ 3 −13 11 0⎥
y(m, n) = ⎢
⎣ 10 −12

7 −9 ⎦
2 8 −14 13

5.3.3 Object Detection in Images

The normalized cross correlation (correlation coefficient) of images x(m, n) and


y(m, n) is defined as
∞ ∞
k=−∞ l=−∞ (x(k, l) − x̄l )(y(k − m, l − n) − ȳ)
rnxy (m, n) = ∞ ∞ ∞

l=−∞ (x(k, l) − x̄l )2 l=−∞ (y(k − m, l − n) − ȳ)
2
k=−∞ k=−∞

The differences between this version and cross-correlation are: (i) the correlation
is computed using the local mean-subtracted versions of the two inputs and (ii) the
output is normalized to the range −1–1. One consequence is that the template cannot
be composed of uniform values. The correlation coefficient is assigned the value zero,
if the variance of the image over the overlapping portion with the template is zero.
The higher the value of the coefficients, the better is the match between the template
and the image. The fluctuating part of the values of the inputs is used in computing
the correlation. The numerator is cross-correlation with the means subtracted. The
denominator is a normalizing factor. It is the square root of the product of the variances
of the overlapping samples of the inputs.
Consider the computation of the cross-correlation coefficients between x(m, n)
and y(m, n).
5.3 Applications

Table 5.10 Convolution output Y (k, l) = X (k, l)H (k, l) in the frequency domain
15.00+j0.00 1.67–j12.88 0.00+j21.00 48.33+j17.12 45.00+j0.00 48.33–j17.12 0.00–j21.00 1.67+j12.88
16.98–j5.61 –2.17–j19.70 –6.12+j6.12 36.21+j2.93 46.72–j37.46 7.93–j64.14 –33.58–j18.36 0.37+j16.63
30.00–j3.00 –10.32–j23.44 –5.00+j30.00 54.75–j21.58 –28.00–j63.00 –45.68+j3.44 –25.00+j20.00 5.25+j33.58
41.02–j15.61 –6.21–j17.07 21.58+j5.64 –7.83–j39.70 –36.72+j44.54 45.63+j28.63 –1.88–j1.88 22.07+j35.86
25.00+j0.00 15.12–j18.39 –14.00–j7.00 10.88+j39.61 63.00+j0.00 10.88–j39.61 –14.00+j7.00 15.12+j18.39
41.02+j15.61 22.07–j35.86 –1.88+j1.88 45.63–j28.63 –36.72–j44.54 –7.83+j39.70 21.58–j5.64 –6.21+j17.07
30.00+j3.00 5.25–j33.58 –25.00–j20.00 –45.68–j3.44 –28.00+j63.00 54.75+j21.58 –5.00–j30.00 –10.32+j23.44
16.98+j5.61 0.37–j16.63 –33.58+j18.36 7.93+j64.14 46.72+j37.46 36.21–j2.93 –6.12–j6.12 –2.17+j19.70
141
142 5 Convolution and Correlation
⎡ ⎤
⎡ ⎤ 2 1 4 3
2 1 3 ⎢ 1 −2 3 1⎥
y(m, n) = ⎣ 1 1 −2 ⎦ x(m, n) = ⎢
⎣ 2 −2

1 −1 ⎦
1 3 1
1 1 −2 2

Subtracting the mean, 1.2222 from y(m, n), we get


⎡ ⎤ ⎡ ⎤
2 1 3 1, 2222 1, 2222 1, 2222
ym(m, n) = ⎣ 1 1 −2 ⎦ − ⎣ 1, 2222 1, 2222 1, 2222 ⎦
1 3 1 1, 2222 1, 2222 1, 2222
⎡ ⎤
0.7778 −0.2222 1.7778
= ⎣ −0.2222 −0.2222 −3.2222 ⎦
−0.2222 1.7778 −0.2222

The variance of ym(m, n) is 17.5556.


Subtracting the mean, 0.8889, from part of x(m, n) for a neighborhood x(1 : 3, 2 : 4),
we get
⎡ ⎤ ⎡ ⎤
1 4 3 0.8889 0.8889 0.8889
xm(m, n) = ⎣ −2 3 1 ⎦ − ⎣ 0.8889 0.8889 0.8889 ⎦
−2 1 −1 0.8889 0.8889 0.8889
⎡ ⎤
0.1111 3.1111 2.1111
= ⎣ −2.8889 2.1111 0.1111 ⎦
−2.8889 0.1111 −1.8889

The variance of xm(m, n) is 38.8889.


√ The sum of pointwise product of ym(m, n) and
xm(m, n) is 4.2222. Now, 4.2222/ (17.5556)(38.8889) = 0.1616.
Subtracting the mean, 1.2222, from part of x(m, n) for a neighborhood x(1 : 3, 1 :
3), we get
⎡ ⎤ ⎡ ⎤
2 1 4 1.1111 1.1111 1.1111
xm(m, n) = ⎣ 1 −2 3 ⎦ − ⎣ 1.1111 1.1111 1.1111 ⎦
2 −2 1 1.1111 1.1111 1.1111
⎡ ⎤
0.8889 −0.1111 2.8889
= ⎣ −0.1111 −3.1111 1.8889 ⎦
0.8889 −3.1111 −0.1111

The variance of xm(m, n) is 32.8889. The√sum of pointwise product of ym(m, n)


and xm(m, n) is −5.2222. Now, −5.2222/ (17.5556)(32.8889) = −0.2173. The
complete correlation coefficients, for the example, are
5.3 Applications 143
⎡ ⎤
−0.0563 0.3478 0.1143 0.3055 0.2615 −0.0563
⎢ −0.7316 −0.2605 −0.7976 −0.3330 0.0573 −0.0818 ⎥
⎢ ⎥
⎢ −0.1566 0.4892 −0.2173 0.1616 0.1014 0.1404 ⎥
⎢ ⎥
⎢ −0.4102 0.1509 0.2406 −0.0543 0.4013 0.0671 ⎥
⎢ ⎥
⎣ −0.1379 −0.5598 0.3448 −0.6397 0.0671 −0.0070 ⎦
0.4500 0.2977 0.1063 0.5097 −0.0563 0.1969

The location of an object can be precisely located by correlating the image with
the template of the object. Figure 5.12a shows a 76×106 8-bit image composed of the
text ‘DISCRETE FOURIER TRANSFORM’. The problem is to locate the locations
of the letter ‘O’. The 10 × 10 8-bit template is shown in Fig. 5.12b. The two brightest
points in Fig. 5.12c show the thresholded correlation coefficients image obtained by
correlating the image with the template. The two points clearly indicate the locations
of the letter ‘O’ in the image. The output is just 2 pixels. For clear visibility, they
have been dilated. The un-normalized correlation output between the image and the
template, shown in Fig. 5.12d, does not point out the locations of the letter ‘O’ in the
image.

Fig. 5.12 a A 76 × 106 8-bit image; b 10 × 10 8-bit template of the letter ‘O’; c the thresholded
and dilated correlation coefficients image; d the un-normalized correlation output
144 5 Convolution and Correlation

5.3.4 Orthogonal Frequency Division Modulation

The purpose of a communication system is to transmit messages from source to


destination. The source generates the message, such as human voice, an image, an e-
mail message, or some kind of information. These signals are, as in other engineering
applications, mostly nonelectrical (e.g., speech signal, image, pressure, vibration, and
room temperature). These signals are converted by transducers to electrical signals
for the purpose of efficient processing, storage, and transmission. Typical examples
of transducers are microphone, thermocouple, strain gauge, computer keyboard, and
CCD cameras.
The message signals are of lowpass nature and are also called baseband signals.
Over short distances, the baseband signal from a source can reach the destination
without much degradation. When we talk with people, this is what happens. However,
it is not practically possible to transmit a baseband signal over long distances, a major
reason being the requirement of an antenna of large size.
Therefore, the baseband signals are embedded (called modulation) in a carrier
signal of suitable high frequency and that signal is transmitted. For example, we can
walk to a place that is nearby. To travel long distances, we need a carrier, such as a
car. Of course, a car can carry some number of people. Similarly, using a set of high-
frequency carriers, we can transmit more than one baseband signal simultaneously
over a channel. Therefore, modulation makes the transmission of baseband signals
over long distances possible, in addition to the ability to transmit a set of signals
at the same time. The transmitted signals pass through a channel, such as a pair of
twisted copper wires, a coaxial cable, an optical fiber, or a radio link.
At the receiver, the distorted signal, in passing through the channel along with
the added noise, is processed to reduce the distortion and noise to acceptable levels.
Then, the modifications done to the message at the transmitter are reversed (called
demodulation) to get the receiver output. This signal is converted to its original form
by an appropriate transducer.
One of the ways a set of signals is transmitted through a channel, over nonoverlap-
ping frequency bands, is called frequency division multiplexing (FDM). Multiplexing
is combining several signals in to a single signal. The bandwidth of the channel of
transmission is divided into nonoverlapping parts, with each part carrying a baseband
signal. At the receiver, bandpass filters are used to separate the signals. Practical fil-
ters have a transition band. Therefore, sufficient frequency gap must be left between
two modulated signals. A recent digital communication method that provides sig-
nificant advantages is the orthogonal frequency division modulation (OFDM). The
input to a digital communication system is a sequence of digits. The source of input
could be inherently digital or digitized analog signal.
5.3 Applications 145

Fig. 5.13 DFT is a set of


bandpass filters with a
IDFT DFT
narrow passband

∼ ∼
3 cos(πn) 3 cos(πn)

∼ ∼
cos( π2 n+ π6 ) cos( π2 n + π6 )

∼ ∼
2 2

In OFDM, N subcarriers, each of which is independent due to orthogonality


and having a constant gain, carry N digits of information. OFDM is one of the
most successful signal transmission methods in digital communications, particularly
in high data-rate applications. OFDM transforms an intersymbol interference (ISI)
channel into N parallel subchannels without ISI. Additive white Gaussian noise is
assumed. A longer sequence of data symbols is grouped into N subsequences and
transmitted over N subcarriers. In effect, OFDM uses IDFT and cyclic prefix to
realize multicarrier communications without actually generating and modulating the
subcarriers. OFDM is basically a combination of Fourier analysis and convolution.
A signal is composed of frequency components, as shown in Fig. 5.13 (right side).
π π
x(n) = 2 + cos n+ + 3 cos(π n)
2 6
The DFT decomposes the signal into its frequency components (left side).
 π π 
x0 (n) = 2, x1 (n) = cos n+ , x2 (n) = 3 cos(π n)
2 6
The IDFT reconstructs the signal back from its components. In general, the DFT takes
the N samples of an input signal x(n) and outputs the N complex coefficients X (k) of
the individual frequency components. The IDFT reverses this process. The point is
that the separation of the frequency components is much less than that required when
the frequency components are not orthogonal, as in FDM. The orthogonality of the
carriers leads to spectral efficiency giving a higher bit rate for the same bandwidth,
in addition to several other advantages such as the elimination of the inter symbol
interference, reduction of multipath effects, simplified equalization, and receiver
design. Further, fast realization of the DFT and the IDFT using hardware and software
modules is readily available. These advantages are obtained under the condition that
frequency and time synchronization between the transmitter and receiver is accurate
and the transmitter is designed to deliver the high peak power requirements, while
the average power is low.
146 5 Convolution and Correlation

Let there be 2 complex coefficients, X (0) = 1 + j2 and X (1) = 2 + j1. These


coefficients correspond to the frequency components
2π 2π
x0 (n) = (1 + j2)e 2 0n
= 1 + j2 and x1 (n) = (2 + j1)e 2 1n
= (2 + j1) cos(π n)

With a complex coefficient, we are able to modulate the amplitude and phase of a
sinusoid or, equivalently, the amplitudes of the in-phase and quadrature components
of a sinusoid. As it is easier to implement, the quadrature form is used in practice.
Note that, in OFDM, the subcarriers are orthogonal and their frequencies are fixed.
With X (0) = 2+j1 and X (1) = 1+j2, these coefficients correspond to the frequency
components
2π 2π
x0 (n) = (2 + j1)e 2 0n
= 2 + j1 and x1 (n) = (1 + j2)e 2 1n
= (1 + j2) cos(π n)

Let us say we want to transmit 4 messages, AA, AB, BA, and BB. Let 1 + j2
represent the symbol A and 2+j1 represent the symbol B. Then, the real and imaginary
components of the modulated signals corresponding to the 4 messages, AA, AB, BA,
and BB, are shown in Figs. 5.14 and 5.15, respectively.

(a) (b)
2 3
xrAA(n)

xrAB(n)

0 -1
0 1 0 1
n n
(c) (d)
3 4
xrBA(n)

xrBB(n)

1 0
0 1 0 1
n n

Fig. 5.14 Real components of the modulated subcarriers corresponding to different messages,
a AA, b AB, c BA, and d BB
5.3 Applications 147

(a) 4 (b) 3

xiAA (n)

xiAB (n)
0 1
0 1 0 1
n n
(c) 3 (d) 2
xiBA (n)

xiBB (n)
0

-1 0
0 1 0 1
n n

Fig. 5.15 Imaginary components of the modulated subcarriers corresponding to different messages,
a AA, b AB, c BA, and d BB

Frequedncy domain
Mapping QAM
Source Data Time domain
onto N Orthogonal Time-domain Recover mapped
Subcarriers Transmitter Sum of sinusoids Receiver QAM Source Data
IDFT DFT

Fig. 5.16 Transmitter and receiver in OFDM

2π 2π
(1 + j2)e 2 0n
+ (1 + j2)e 2 1n
= (1 + j2) + (1 + j2) cos(π n) = {2 + j4, 0 + j0} → AA
2π 2π
(1 + j2)e 2 0n
+ (2 + j1)e 2 1n
= (1 + j2) + (2 + j1) cos(π n) = {3 + j3, −1 + j1} → AB
2π 2π
(2 + j1)e 2 0n
+ (1 + j2)e 2 1n
= (2 + j1) + (1 + j2) cos(π n) = {3 + j3, 1 − j1} → BA
2π 2π
(2 + j1)e 2 0n
+ (2 + j1)e 2 1n
= (2 + j1) + (2 + j1) cos(π n) = {4 + j2, 0 + j0} → BB

The DFT of these time-domain samples is the scaled frequency coefficients input by
the transmitter.
These modulated discrete signals are converted to analog signals, also shown in
Figs. 5.14 and 5.15, by a digital to analog converter. The analog signals are modulated
by a high-frequency carrier for the purpose of transmission and transmitted. At the
receiver, these signals are demodulated to get the baseband signal and the DFT
yields the message. Figure 5.16 shows the essence of transmitting and receiving
messages using OFDM. The input data is mapped to quadrature data, assumed in
the frequency domain. The IDFT of this data is a sum of sinusoids in time domain,
which is transmitted after converting to analog signal and modulating with a high
148 5 Convolution and Correlation

im(t) x2 (t) Low-pass im(t)


filter
sin(ωc t) 2 sin(ωc t)
− π2 − π2
Yqam (t)

cos(ωc t) ∼ 2 cos(ωc t) ∼

Low-pass
re(t) x1 (t) filter re(t)

Fig. 5.17 Quadrature amplitude modulation, QAM

frequency. The DFT of the samples of the demodulated signal at the receiver is the
source frequency-domain data transmitted. Reversing the mapping carried out at the
transmitter, we get the input message.
Quadrature Amplitude Modulation
Quadrature amplitude modulation (QAM) transmits 2 signals using carriers of the
same frequency but in phase quadrature. Figure 5.17 shows the quadrature amplitude
modulation and demodulation. The carrier frequency is cos(ωc t). Phase shifters are
used to delay the carrier frequency to get sin(ωc t). The in-phase component of the
message signal is multiplied by cos(ωc t). The quadrature component is multiplied
by sin(ωc (t). The sum of the two product signals is the modulator output

re(t) cos(ωc t) + im(t) sin(ωc t)

The modulated signal is transmitted using double sideband transmission. A similar


process, in the demodulator at the right side, governed by the following equations
produces the sum of the message signal and other high-frequency components.

x1 (t) = 2yqam cos(ωc t)


= 2(re(t) cos(ωc t) + im(t) sin(ωc t)) cos(ωc t)
= re(t) + re(t) cos(2ωc t) + im(t) sin(2ωc t)
x2 (t) = 2yqam sin(ωc t)
= 2(re(t) cos(ωc t) + im(t) sin(ωc t)) sin(ωc t)
= im(t) − im(t) cos(2ωc t) + re(t) sin(2ωc t)

The message signal is obtained by lowpass filtering.


16-QAM Constellation
Figure 5.18 shows a 16-point QAM constellation, an arrangement of 16 distinct
complex numbers. This constitutes the signal space. As each number is complex-
valued, it has a magnitude and a phase or, equivalently, the amplitudes of the real and
imaginary parts. Each number can be used to modulate any subcarrier sinusoid. Since
5.3 Applications 149

Fig. 5.18 16-point QAM Im


constellation
0111 0101 1101 1111
3

0110 0100 1100 1110


1
-3 -1 1 3
Re
0010 0000 1000 1010
-1

0011 0001 1001 1011


-3

there are 16 numbers, each subcarrier can transmit the information of log2 16 = 4
bits. There are 16 distinct combinations with 4 bits and there are 16 distinct complex
numbers. Therefore, a subcarrier, a cos(ωc t) + b sin(ωc t) transmits 4 bits.
Example—Parallel code for the message ‘Discrete Fourier Transform’ with 4 sub-
channels each of length 8.

Table 5.11 shows the 16-point QAM assignment of codes to the distinct characters in
the message. As there are less than 16 characters, the last few are assigned the code
for space.
For example, the code for ‘D’ is −3 − j1, and it is the first entry in the first
subchannel shown below. The code for ‘I’ is −1 + j3, which is the second entry
in the first subchannel. Similarly, after assigning codes for all the characters in the
message, we get
⎡ ⎤
−3 − j 1 + j3 1 + j3 1 − j3
⎢ −1 + j3 −1 + j 3 − j3 −3 + j1 ⎥
⎢ ⎥
⎢ 3 − j1 1−j 1 − j3 1 + j3 ⎥
⎢ ⎥
⎢ −1 − j3 1 + j −1 − j 1 + j3 ⎥
⎢ ⎥
⎢ 1 − j3 1 − j3 −3 + j3 1 + j3 ⎥
⎢ ⎥
⎢ −3 − j3 −1 + j3 3−j 1 + j3 ⎥
⎢ ⎥
⎣ 3 − j3 −3 − j3 −1 + j 1 + j3 ⎦
−3 − j3 1 − j3 1−j 1 + j3

These are the modulated signals in the frequency domain. We take the IDFT, which
is a sum of all the modulated sinusoids in each subchannel. The result is
150 5 Convolution and Correlation

Table 5.11 16-point QAM constellation


Character Symbol Carrier
transmitted

Phase Amplitude/(3 2) Rect
A 0000 225◦ 0.33 −1 − j1
C 0001 255◦ 0.75 −1 − j3
D 0010 195◦ 0.75 −3 − j1
E 0011 225◦ 1.00 −3 − j3
F 0100 135◦ 0.33 −1 + j1
I 0101 105◦ 0.75 −1 + j3
M 0110 165◦ 0.75 −3 + j1
N 0111 135◦ 1.0 −3 + j3
O 1000 315◦ 0.33 1 − j1
R 1001 285◦ 0.75 1 − j3
S 1010 345◦ 0.75 3 − j1
T 1011 315◦ 1.00 3 − j3
U 1100 45◦ 0.33 1 + j1
1101 75◦ 0.75 1 + j3
1110 15◦ 0.75 3 + j1
1111 45◦ 1.00 3 + j3

⎡ ⎤
−0.5 − j1.8 0.0 − j0.3 0.5 − j0.3 0.5 + j2.0
⎢−1.3 + j1.1 −0.4 + j0.7 1.4 − j0.1 −0.2 − j1.3 ⎥
⎢ ⎥
⎢−1.8 + j0.0 −0.3 + j0.0 0.0 + j1.8 0.3 − j1.3 ⎥
⎢ ⎥
⎢−0.8 + j0.1 0.1 + j0.8 0.0 − j0.2 0.5 − j0.9 ⎥
⎢ ⎥
⎢ 1.5 − j0.3 0.0 − j0.8 −1.0 + j1.3 0.5 − j0.5 ⎥
⎢ ⎥
⎢−0.2 − j0.6 −0.1 + j1.8 0.6 + j0.6 0.2 − j0.2 ⎥
⎢ ⎥
⎣−0.3 + j0.0 1.3 + j1.0 −0.5 + j0.3 −0.3 − j0.3 ⎦
0.3 + j0.4 0.4 − j0.3 0.0 − j0.3 −0.5 − j0.6

For example, the real part of the first entry −0.5 is obtained as the sum of the real
part of the entries of the real parts of the first columns divided by 8.

(−3 − 1 + 3 − 1 + 1 − 3 + 3 − 3) −4
= = −0.5
8 8
Passage of the Modulated Time-Domain Signal Through the Channel
The channel has an impulse response. For this example, let us assume that it is
h(n) = {1̌, 0.3, 0.1}. The output at the end of the channel is the linear convolution
of the time-domain signal with h(n). As the time-domain signal is periodic, circular
convolution is required. Linear convolution of two sequences results in a sequence
of length that is equal to the sum of the length of the two sequences minus 1. Circular
5.3 Applications 151

convolution of two sequences of equal length results in a sequence of the same length.
Circular convolution can be used to compute the linear convolution by sufficient zero
padding of the sequences.

x(n) ∗ h(n) = xz(n)


∗ hz(n)

{1, 2} ∗ {3, 2} = {1, 2, 0}


∗ {3, 2, 0} = {3, 8, 4}

In OFDM, linear convolution is used to compute the circular convolution with a


cyclic prefix.

xc(n) ∗ h(n) = x(n)


∗ h(n)

{2, 1, 2} ∗ {3, 2} = {1, 2}


∗ {3, 2} = {7, 8}

The partial periodic extension is called the cyclic prefix. Take the output from n = 0
to n = N − 1, where N is the length of the periodic sequences to be convolved. The
necessity for this is because the data is periodic in OFDM, while the channel carries
out linear convolution.
The periodically extended data is
⎡ ⎤
−0.3 + j0.0 1.3 + j1.0 −0.5 + j0.3 −0.3 − j0.3
⎢ 0.3 + j0.4 0.4 − j0.3 0.0 − j0.3 −0.5 − j0.6 ⎥
⎢ ⎥
⎢−0.5 − j1.8 0.0 − j0.3 0.5 − j0.3 0.5 + j2.0 ⎥
⎢ ⎥
⎢−1.3 + j1.1 −0.4 + j0.7 1.4 − j0.1 −0.2 − j1.3 ⎥
⎢ ⎥
⎢−1.8 + j0.0 −0.3 + j0.0 0.0 + j1.8 0.3 − j1.3 ⎥
⎢ ⎥
⎢−0.8 + j0.1 0.1 + j0.8 0.0 − j0.2 0.5 − j0.9 ⎥
⎢ ⎥
⎢ 1.5 − j0.3 0.0 − j0.8 −1.0 + j1.3 0.5 − j0.5 ⎥
⎢ ⎥
⎢−0.2 − j0.6 −0.1 + j1.8 0.6 + j0.6 0.2 − j0.2 ⎥
⎢ ⎥
⎣−0.3 + j0.0 1.3 + j1.0 −0.5 + j0.3 −0.3 − j0.3 ⎦
0.3 + j0.4 0.4 − j0.3 0.0 − j0.3 −0.5 − j0.6

The last 2 rows of the last matrix have been prepended resulting in 8 rows becoming
10 rows. The modulated time-domain analog data, obtained using a digita-to-analog
converter, with a prefix shown by the dotted line, is shown in Fig. 5.19. This prefixed
data is linearly convolved withe the channel impulse response h(n) = {h(0) =
1, h(1) = 0.3, h(2) = 0.1}. The result is
152 5 Convolution and Correlation

(a) 1.5 (b)


1.1339
0.3
xr(n)

xi(n)
0 0
-0.3
-0.5
-0.8
-1.3
-1.75 -1.75
0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8
n n

Fig. 5.19 Modulated time-domain analog data with a prefix, shown by the dotted line

⎡ ⎤
−0.3 + j0.0 1.3 + j1.1 −0.2 + j0.3 −0.3 − j0.3
⎢ 0.2 + j0.4 0.8 + j0.1 −0.1 − j0.2 −0.6 − j0.7 ⎥
⎢ ⎥
⎢−0.4 − j1.6 0.3 − j0.2 0.5 − j0.3 0.3 + j1.8 ⎥
⎢ ⎥
⎢−1.4 + j0.7 −0.4 + j0.6 1.5 − j0.2 −0.1 − j0.7 ⎥
⎢ ⎥
⎢−2.2 + j0.2 −0.4 + j0.2 0.5 + j1.7 0.2 − j1.4 ⎥
⎢ ⎥
⎢−1.4 + j0.2 −0.0 + j0.9 0.1 + j0.3 0.6 − j1.4 ⎥
⎢ ⎥
⎢ 1.1 − j0.2 −0.0 − j0.5 −1.0 + j1.4 0.7 − j0.9 ⎥
⎢ ⎥
⎢ 0.2 − j0.7 −0.1 + j1.6 0.3 + j1.0 0.4 − j0.5 ⎥
⎢ ⎥
⎣−0.2 − j0.2 1.2 + j1.5 −0.4 + j0.6 −0.1 − j0.4 ⎦
0.2 + j0.4 0.8 + j0.2 −0.1 − j0.1 −0.6 − j0.7

For example,

(−0.5)(1) + (0.3)(0.3) + (−0.3)(0.1) = −0.4

is the real part value of the first value in the third row. The received analog signal is
passed through an analog-to-digital converter to get the sampled data.
Now, the DFT of the columns of the last 8 rows is computed resulting in
⎡ ⎤
−4.2 − j1.4 1.4 + j4.2 1.4 + j4.2 1.4 − j4.2
⎢−0.3 + j3.9 −0.9 + j1.5 2.7 − j4.6 −3.3 + j2.1 ⎥
⎢ ⎥
⎢ 2.4 − j1.8 0.6 − j1.2 −0.0 − j3.0 1.8 + j2.4 ⎥
⎢ ⎥
⎢−1.1 − j2.3 0.9 + j0.7 −0.9 − j0.7 1.1 + j2.3 ⎥
⎢ ⎥
⎢ 0.8 − j2.4 0.8 − j2.4 −2.4 + j2.4 0.8 + j2.4 ⎥
⎢ ⎥
⎢−2.0 − j2.7 −1.1 + j2.3 2.5 − j0.5 0.5 + j2.5 ⎥
⎢ ⎥
⎣ 3.6 − j1.8 −1.8 − j3.6 −1.2 + j0.6 0.0 + j3.0 ⎦
−2.7 − j4.6 2.1 − j3.3 1.5 − j0.9 0.3 + j3.9

The frequency response of the channel, H (k), is the 8-point DFT of its impulse
response h(n).
5.3 Applications 153

Fig. 5.20 OFDM scatter


plot. SNR = 20 dB 3

2 SNR = 20 dB

Im
0

-1

-2

-3

-3 -2 -1 0 1 2 3
Re

H (k) = {1.4, 1.2121 − j0.3121, 0.9 − j0.3, 0.7879 − j0.1121, 0.8, 0.7879 + j0.1121, 0.9
+ j0.3, 1.2121 + j0.3121}

The pointwise inverse is

1
= {0.7, 0.8 + j0.2, 1.0 + j0.3, 1.2 + j0.2, 1.3, 1.2 − j0.2, 1.0 − j0.3, 0.8 − j0.2}
H (k)

The pointwise product of each column of the DFT values by these values yields
the input message. The equalization is made simple due to orthogonality of the
subcarriers. We are getting back the exact input message because of the assumption
of zero noise.
With SNR = 20 dB, OFDM scatter plot is shown in Fig. 5.20. As noise is high,
the received signals are scattered around the exact input message. For each received
value, the input value nearest is assigned by computing the distances. To reduce the
noise, Wiener filter can be used. Further error correcting codes may recover the exact
data.
With SNR = 30 dB, OFDM scatter plot is shown in Fig. 5.21. Now, the received
values are much closer to the actual values.
With SNR = 40 dB, OFDM scatter plot is shown in Fig. 5.22. With SNR high, the
received and input values almost overlap.
The block diagram of OFDM transmission system is shown in Fig. 5.23. The
QAM mapped data in the frequency domain, coming in serial form, is converted
to parallel form. The IDFT of the parallel data is computed to get the time-domain
samples. Now, the cyclic prefix is added. This data is converted to serial analog form,
modulated by a carrier and transmitted. The distorted signal, due to the channel and
noise, is demodulated, cyclic prefix removed and converted to parallel discrete form
154 5 Convolution and Correlation

Fig. 5.21 OFDM scatter


plot. SNR = 30 dB 3

2 SNR = 30 dB

Im
0

-1

-2

-3

-3 -2 -1 0 1 2 3
Re

Fig. 5.22 OFDM scatter


plot. SNR = 40 dB 3

2 SNR = 40 dB

1
Im

-1

-2

-3

-3 -2 -1 0 1 2 3
Re

at the receiver. The analog processing is not shown in the diagram. The DFT of the
time-domain samples yields the frequency-domain data. This data is passed through
equalizer to compensate for the loss of gain in transmission through the channel. This
equalization is independently carried out for each subcarrier. The equalized signal
is passed through a detector to find the final frequency-domain data. One of the
ways of detection is to assign the data to the nearest, by Euclidean distance, QAM
constellation point. Further, scrambling for data security, error correction coding,
and coding for compression of data form part of the transmission system.
5.3 Applications 155

L Remove
Serial to Cyclic parallel to Serial to
IDFT h(k)z −k cyclic DFT Equalizer
parallel prefix serial parallel
k=0 prefix

Fig. 5.23 Block diagram of OFDM transmission system

5.3.5 Hilbert Transform

A complex signal whose imaginary part is the Hilbert transform of its real part is
called the analytic signal. An analytic signal has no negative frequency components.
Hilbert transformer shifts the phase of every spectral component by π2 radians. Typical
applications are single sideband modulation in communication systems and sampling
of bandpass signals.
The frequency response of the Hilbert transformer, for an even N , is

⎨ −j for k = 1, 2, . . . , N2 − 1
H (k) = 0 for k = 0, N2

j for k = N2 + 1, N2 + 2, . . . , N − 1

Basically, it is an all-pass filter that imparts a ±90◦ phase shift on the input signal.
However, in practice, it is designed over the required bandwidth of a given input
signal.
The IDFT of H (k) is the impulse response. As the frequency response is imaginary
and odd-symmetric, the impulse response is real and odd.

N −1 N −1  
1  j 2π j  2π
h(n) = H (k)e N kn
= H (k) sin kn
N N N
k=0 k=0

For example,
 

x(n) = cos n ↔ X (k) = {0, 2, 0, 2},
4
H (k) = {0, −j, 0, j}, X (k)H (k) = {0, −j2, 0, j2}

The Hilbert transform xh (n) of x(n) is the IDFT of X (k)H (k).


 

xh (n) = sin n ↔ {0, −j2, 0, j2}
4

Now, the analytic signal xa (n) corresponding to x(n) is the complex signal with x(n)
as its real part and xh (n) as its imaginary part.
156 5 Convolution and Correlation
   
2π 2π 2π
xa (n) = x(n) + jxh (n) = cos n + j sin n = ej 4 n ↔ {0, 4, 0, 0},
4 4

which has a one-sided spectrum.


As always, the Hibert transform of a signal can also be found in the time domain
by convolution.
 

h(n) = 0.5 sin n = {0, 0.5, 0, −0.5} ↔ {0, −j, 0, j}
4

 

(x(n) = {1, 0, −1, 0})
∗ ({0, 0.5, 0, −0.5} = h(n)) = {0, 1, 0, −1} = xh (n) = sin n
4

5.4 Summary

• Convolution is one of the often used system models. It relates the input and output
of a system through its impulse response. It can also be considered as the weighted
average of a signal.
• The input signal is decomposed in terms of impulses and the superposition sum-
mation of the responses of the system to all the constituent impulses is the system
output.
• In terms of computation, it is a sum of products of two sequences after time-reversal
of one of them.
• In linear convolution, the sequences are located on a line. In circular convolution,
the sequences are located on a circle. The output values differ only at the border.
• In applications, linear convolution is often required. However, with sufficient zero
padding of the sequences, linear convolution is implemented using circular con-
volution efficiently.
• The computational complexity of the 1-D convolution of sequences of length N in
the time domain is O(N 2 ), whereas the complexity is reduced to O(N log2 N ) in
the frequency domain. The reason is that convolution in the time domain becomes
multiplication in the frequency domain with complexity O(N ). Mapping a time-
domain sequence into a frequency-domain sequence requires a complexity of
O(N log2 N ).
• Points to be noted in implementing the linear convolution operation using the DFT
are: (i) the sequences must be zero padded so that their lengths are at the least equal
to the sum of the lengths of the two sequences to be convolved minus one; (ii) the
length of the zero-padded sequences is the nearest integral power of 2; and (iii)
the origins of the sequences are aligned.
5.4 Summary 157

• 2-D convolution is a straightforward extension of the 1-D convolution. If one of


the sequences is separable, 2-D convolution can be implemented faster by a set of
1-D convolutions.
• Correlation of two sequences is a similarity measure.
• Implementation of the correlation is the same as that of convolution with out the
time-reversal operation.

Exercises

5.1 Find the linear convolution y(n) of x(n) and h(n), using the DFT and the IDFT.
Verify y(n) by convolving x(n) and h(n) in the time domain.
5.1.1
x(n) = {2̌, 3, 1, 4} and h(n) = {1̌, −3, 1, −4}

5.1.2
x(n) = {1̌, 1, −2, 4} and h(n) = {1̌, 2, 1, 4}

* 5.1.3
x(n) = {2̌, 1, 3, 4} and h(n) = {1̌, −2, 3, −4}

5.2 Find the linear convolution y(m, n) of x(m, n) and h(m, n), using the DFT and
the IDFT. Verify y(m, n) by convolving x(m, n) and h(m, n) in the time domain.
* 5.2.1    
1 −3 2 3
x(m, n) = , h(m, n) =
1 2 −2 1

5.2.2    
−2 1 3 −3
x(m, n) = , h(m, n) =
−4 2 −1 4

5.2.3    
4 −3 2 2
x(m, n) = , h(m, n) =
3 −4 1 3

5.3 Find the linear correlation rxh (n) of x(n) and h(n), using the DFT and the IDFT.
Verify rxh (n) by correlating x(n) and h(n) in the time domain.
5.3.1
x(n) = {1̌, 3, 1, 4} and h(n) = {1̌, −3, 3, −4}

* 5.3.2
x(n) = {1̌, 2, −2, 4} and h(n) = {1̌, 2, −1, 4}

5.3.3
x(n) = {2̌, 1, 3, 2} and h(n) = {1̌, 2, −3, 4}
158 5 Convolution and Correlation

5.4 Find the linear correlation rxh (m, n) of x(m, n) and h(m, n), using the DFT and
the IDFT. Verify rxh (m, n) by correlating x(m, n) and h(m, n) in the time domain.
* 5.4.1    
−1 −3 1 3
x(m, n) = , h(m, n) =
3 2 −3 1

5.4.2    
−2 2 4 −3
x(m, n) = , h(m, n) =
−1 2 −1 3

5.4.3    
2 −3 2 1
x(m, n) = , h(m, n) =
3 −1 1 −3

5.5 Find the linear Hilbert transform xh (n) of x(n). Compute the DFT of x(n)+jxh (n)
and verify that the spectrum is one-sided.
5.5.1 x(n) = {2, −3, 1, 4}.

* 5.5.2 x(n) = {2, 1, 1, 4}.

5.5.3 x(n) = {1, 3, 1, 4}.


Chapter 6
Aliasing and Leakage

There are four versions of the Fourier analysis. DFT is the only one that is discrete
and finite in both the domains, and, hence, implementable using a digital system. In
approximating other versions of the Fourier analysis, it has to be ensured that the
data is adequately represented by the DFT in any one period. It is possible because
physical devices can generate signals over a finite period only and can generate
frequency components of a finite order only. Therefore, the sampling interval and
the record length have to be carefully chosen. Then, for all practical purposes, all
waveforms generated by physical devices can be represented by the DFT adequately.
In this chapter, we learn how to determine the proper sampling interval and the record
length.

6.1 Aliasing Effect

In unsigned binary number system, we can represent 2 N distinct numbers using N


bits. For example, with 2 bits, we can represent 4 numbers {00, 01, 10, 11}. The
range of numbers that can be represented uniquely depends on the number of bits
used. If the number of bits is inadequate to represent a number, then it cannot be
uniquely represented. Similarly, with N complex samples, we can represent only N
complex exponentials. Since a real sinusoid needs two complex exponentials for its
representation, only about N /2 real sinusoids can be uniquely represented with N
complex samples.
With a periodic complex signal represented by 4 samples, the complex exponen-
tials
2π 2π 2π 2π
{e j 4 0n , e j 4 1n , e j 4 2n , e j 4 3n }, n = 0, 1, 2, 3

© Springer Nature Singapore Pte Ltd. 2018 159


D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7_6
160 6 Aliasing and Leakage

can only be uniquely represented. For example,

4 (4+1)n
2π 2π 2π 2π 2π
ej 4 5n = ej = ej 4 4n ej 4 1n = ej 4 1n


The impersonation of a higher frequency exponential e j 4 5n as a lower-frequency

exponential e j 4 1n , due to insufficient number of samples, is called the aliasing effect.
For complex signals, with period N , the aliasing effect is characterized by

x(n) = e j ( N (k+l N )n+φ) = e j ( N kn+φ) , k = 0, 1, . . . , N − 1


2π 2π

where l is any integer. Remember that periodic signals are defined over a circle. There
are only N unique samples for a complex exponential with period N . Therefore,

e j ( N (k+l N )n+φ) = e j (2πln) e j ( N kn+φ) = e j ( N kn+φ)


2π 2π 2π

since e j (2πln) = 1 for any integer values of l.


For real signals, with an even period N , the aliasing effect is characterized by three
formulas, since each sinusoid is characterized by complex conjugate exponentials.
   
2π 2π N
x(n) = cos (k + l N )n + φ = cos kn + φ , k = 0, 1, . . . , −1
N N 2
   
2π 2π N
x(n) = cos (k + l N )n + φ = cos(φ) cos kn , k =
N N 2
   
2π 2π N
x(n) = cos (l N − k)n + φ = cos kn − φ , k = 1, 2, . . . , −1
N N 2

where N and index l are positive integers. Oscillations increase only up to k = N2


with N even, decrease afterward, and cease at k = N and this pattern repeats indefi-
nitely. With frequency indices greater than N2 , frequency folding occurs. Therefore,
sinusoids with frequency index up to N2 can only be uniquely identified with N sam-
ples. Frequency with index N2 is called the folding frequency. At this frequency, only
cosine waveform can be represented. With the number of samples fixed (say N ), the
number of sinusoids those can be uniquely represented is N /2. For example, with
512 samples, the uniquely identifiable sinusoids are
 

x(n) = cos kn + φ , k = 0, 1, . . . , 255
512

Figure 6.1 shows the aliasing effect with sinusoids x(n) = cos( 2π8
n + π3 ) and
π
xa(n) = cos( 8 7n − 3 ) having the same set of samples. While their continuous

versions have different amplitude profiles, as shown by the continuous and dashed
lines, their discrete versions have the same amplitude profile.
6.1 Aliasing Effect 161

x(n) 1

−1
0 1 2 3 4 5 6 7
n
π π
Fig. 6.1 Sinusoid x(n) = cos( 2π
8 n + 3 ). Sinusoid xa(n) = cos( 8 7n − 3 ) in dashed line

Fig. 6.2 The aliasing effect ↑


of the frequency components 32 31 30 29 28 27 26 25
of a periodic waveform with 17 18 19 20 21 22 23 24
period 16 samples 16 15 14 13 12 11 10 9
0 1 2 3 4 5 6 7 8
Frequency index, k

     
2π π 2π π 2π π
xa(n) = cos (8 − 1)n − = cos (−1)n − = cos n+ = x(n)
8 3 8 3 8 3

If the sum or difference of the frequency indices of two discrete sinusoids is an inte-
gral multiple of the sampling period, then it is impossible to differentiate between
them. For example, a discrete waveform with period 16 samples can have distinct
frequency components with frequency indices k = {0, 1, 2, 3, 4, 5, 6, 7, 8} only. Fre-
quency component with index zero is DC and that with 8 is a cosine waveform. Fre-
quency components with frequency indices k = {16, 15, 14, 13, 12, 11, 10, 9} alias
as k = {0, 1, 2, 3, 4, 5, 6, 7}. Frequency components with frequency indices k =
{17, 18, 19, 20, 21, 22, 23, 24} alias as k = {1, 2, 3, 4, 5, 6, 7, 8}. Figure 6.2
shows the aliasing effect, which is also shown in Table 6.1. For example, the sum of
frequency indices 1 and 15 is 16 (the difference of frequencies 1 and 17 is also 16)
and it is not possible differentiate between them with the sampling frequency 1/16
cycles/sample. In general, with a sampling frequency f s cycles/sample, the formula
to find the index of the alias f a of any frequency component f is given by

Table 6.1 Frequency components with frequencies f and the corresponding aliased frequencies
with sampling frequency f s = 1/16 cycles/sample
f 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
f 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
fa 0 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1
162 6 Aliasing and Leakage
  
 f 
f a =  f − f s round
fs 

To avoid the aliasing effect, the sampling theorem states that the sampling fre-
quency must be greater than twice that of the highest frequency component of a
real-valued signal. Given a sampling frequency, the input signal has to be prefiltered
to eliminate the frequency components with frequencies greater than or equal to half
the sampling frequency. In practice, aliasing cannot be eliminated but can be reduced
to negligible levels with appropriate choice of the sampling frequency.

6.2 Leakage Effect

In approximating signals by the DFT, due to the finite and discrete nature of the DFT,
the sampling interval and the record length have to be selected appropriately. The
aliasing effect due to insufficient number of samples over a period was presented in
the last section. Now, we are going to study the importance of selecting the appropriate
record length. The record length is usually very long and the frequency content is very
high. However, for practical signals, it is possible to approximate them adequately
due to the fact that the magnitude of signals becomes negligible in both the time
domain and the frequency domain beyond some finite range. A time-limited signal
cannot be band-limited. For practical purposes, we are able to assume that signals
are both time-limited and band-limited with adequate accuracy. For example, while
the exponential signal e−at u(t), a > 0 approaches zero asymptotically, its spectrum
can be effectively approximated by the DFT using a relatively short record length. In
digital filter design, everlasting impulse responses are suitably truncated for practical
purposes. To eliminate aliasing, the signal is prefiltered, which is spectral truncation.
The point is that truncation is inevitable and it distorts the data. However, it has to be
ensured that the representation of the signal or spectrum is still adequate for practical
purposes. The criterion for truncation is based on signal energy or amplitude. For
example, the difference between the energy of the original signal and its truncated
version is to be less than 5%.
The DFT computation assumes periodic extension of the given finite data. If a
frequency component makes an integral number of cycles in one period, then its DFT
coefficient will be an impulse at its frequency index. Otherwise, a discontinuity is
created between the first and last samples in each period. To synthesize such a signal
requires more number of frequency components. The energy of the signal is leaked
to other frequency components. In practice, leakage cannot be eliminated. To reduce
leakage, a more appropriate record length has to be selected. Once leakage occurs,
the choice is to reduce the leakage error and increase the smearing effect or vice
versa.
6.2 Leakage Effect 163

6.2.1 Modeling Data Truncation

Truncation of a N -point signal x(n) to get a L-point signal x̂(n) (L < N ) may be
considered as multiplying x(n) by a rectangular window wr (n) defined as

1 for n = 0, 1, . . . , L − 1
wr (n) =
0 for n = L , L + 1, . . . , N − 1

For example, with L = N = 4,

wr (n) = {1, 1, 1, 1}

With L = N = 8,
wr (n) = {1, 1, 1, 1, 1, 1, 1, 1}

The objective is to relate the DFT of x(n) and x̂(n). The truncated signal is
the product of x(n) and wr (n). Then, due to the DFT frequency-domain circular
convolution theorem, we get

1
x̂(n) = x(n)wr (n) ↔ X̂ (k) = X (k) 
∗ Wr (k)
N

where x(n) ↔ X (k) and



1 for n = 0, 1, . . . , L − 1 π sin( Nπ Lk)
wr (n) = ↔ Wr (k) = e(− j N (L−1)k)
0 for n = L , L + 1, . . . , N − 1 sin( Nπ k)
(6.1)
For example, let

x(n) = {1̌, 0, −1, 0} ↔ X (k) = {0̌, 2, 0, 2}

and
wr (n) = {1̌, 1, 0, 0} ↔ Wr (k) = {2̌, 1 − j, 0, 1 + j}

x(n)wr (n) = {1̌, 0, 0, 0} ↔ {1̌, 1, 1, 1}

Let us find the circular convolution using the DFT.

{0̌, 2, 0, 2} ↔ {4̌, 0, −4, 0} and {2̌, 1 − j, 0, 1 + j} ↔ {4̌, 0, 0, 4}

{4̌, 0, −4, 0}{4̌, 0, 0, 4}/4 = {4̌, 0, 0, 0}

The IDFT of {4̌, 0, 0, 0} divided by 4 is {1̌, 1, 1, 1}. The IDFT of {1̌, 1, 1, 1} is


{1̌, 0, 0, 0} = x(n)wr (n).
164 6 Aliasing and Leakage

The spectrum of the original signal is distorted due to truncation. First, more num-
ber of frequency components are required to reconstruct the signal. This is called
leakage or spectral spreading. Since the resultant spectrum is the convolution of
spectra of the signal and the window, due to a convolution property, the length of the
nonzero spectral components increases. In the aliasing effect, a set of frequencies
fold back on to a single frequency. Due to the leakage effect, a single frequency
component produces a set of frequencies. This is also similar to signal compres-
sion and expansion. The amplitude of the spectrum is reduced due to smoothing
(from X (1) = X (3) = 2 to X (1) = X (3) = 1), resulting in loss of detail. Similar to
reducing the aliasing by decreasing the sampling interval, the leakage effect can be
reduced by selecting a more appropriate record length. Once truncation has occurred,
the only alternative is to reduce the leakage at the cost of increasing the smearing
of the spectrum. To reduce the leakage, the signal has to be multiplied by a tapered
window, which truncates the signal gradually. The characteristics of some of the
often used windows are presented next.

6.2.2 Tapered Windows

The rectangular, triangular, Hann, and Hamming window functions are shown in
Fig. 6.3 with N = L = 32.
Rectangular Window
The rectangular window is shown by dots and its DFT is given by Eq. (6.1). Let x(n)
be a N -point sequence. Retaining only the first L samples and making the rest equal
to zero to get a truncated sequence x̂(n) are equivalent to multiplying it with the
window wr (n). That is
x̂(n) = x(n)wr (n)

1
N=32
L =32
w(n)

rectangular
o hamming
x Hann
0.08 + triangular
0
0 4 8 12 16 20 24 28 31
n

Fig. 6.3 Window functions in the time domain


6.2 Leakage Effect 165

0 rectangular N=64
|W(k)/W(0)|, dB
L =16
-10
-13.339

-20

0 4 8 12 16 20 24 28
k

Fig. 6.4 The normalized magnitude in dB of the frequency response of the rectangular window

The normalized magnitude in dB of the frequency response of the rectangular window


function, with N = 64 and L = 16, is shown in Fig. 6.4. The magnitude of the first
side lobe is −13.339 dB, which is about 20% of that of the main lobe. At k = 0,
the magnitude is L = 16 and 20 log10 (16/16) = 0 dB. At integral multiples of N /L,
X (k) = 0. The main lobe width is (2N )/L. Other than at k = 0, peaks occur at k =
, , . . .. Since the magnitude of the numerator becomes 1 at these frequencies,
3N 5N
2L 2L
the magnitudes are given by 1/ sin((π(2k + 1))/(2L)), k = 1, 2, . . .. For example,
with k = 1,   
1  1 
 = −13.339
20 log 10
16 sin((3π)/32) 


Example 6.1 List the values of the rectangular window wr (n) with N = 8 and L = 5.
Find the truncated version, xt (n), of one cycle of x(n), starting from n = 0, by
applying the window. Find the magnitude of the DFT of x(n) and xt (n).

x(n) = e j 8 n , n = 0, 1, 2, 3, 4, 5, 6, 7

wr (n) = {1, 1, 1, 1, 1, 0, 0, 0}

x(n) = {1, 0.7071 + j0.7071, j1, −0.7071 + j0.7071, −1,


− 0.7071 − j0.7071, − j1, 0.7071 − j0.7071}

X (k) = {0, 8, 0, 0, 0, 0, 0, 0}

xt (n) = {1, 0.7071 + j0.7071, j1, −0.7071 + j0.7071, −1, 0, 0, 0}

|X t (k)| = {2.4142, 5, 2.4142, 1, 0.4142, 1, 0.4142, 1}


166 6 Aliasing and Leakage

The rectangular window is the best in terms of resolution and is the worst in terms
of the magnitude of the side lobes. Therefore, the rectangular window is preferred
when there is no leakage, the leakage is tolerable or if it is possible to select a more
appropriate record length that results in tolerable leakage. Otherwise, a suitable
tapered window is to be used. The truncated data is multiplied by the window so that
the data is gradually reduced to zero or near zero at the ends. These windows provide
the advantage of detection of frequency components with small magnitudes; those
may be masked by the large side lobes of the rectangular window. Several windows
are available and their suitability for specific applications is well known. The general
approach in designing a window to reduce the side lobes is to make the transition
of the signal more smoother from the middle toward the ends. The magnitude of the
side lobes of the rectangular window is relatively large, due to its discontinuity at
the ends. Therefore, its spectrum decays slowly at the rate of 1/k, where k is the
frequency index. By reducing or eliminating this discontinuity, the spectrum of the
tapered windows decays faster resulting in smaller side lobes. This is achieved at the
cost of increasing the main lobe width, which reduces resolution.
Triangular Window
The convolution of a function by itself in the time domain corresponds to the product
of its spectrum by itself in the frequency domain. Therefore, the side lobes adjacent
to the main lobes have considerably smaller magnitudes. From the time-domain
viewpoint, as the resulting function becomes smoother, the spectrum is expected to
decay at a faster rate resulting in smaller side lobes. However, the width of the function
is increased in the time domain and the width of the main lobe of the spectrum is
also increased.
The triangular window is defined as
⎧2

⎨ Ln for n = 0, 1, . . . , L2
wt (n) = wt (L − n) for n = L2 + 1, L2 + 2, . . . , L − 1


0 for n = L , L + 1, . . . , N − 1

The time-domain representation of this window, with L = 32 and N = 32, is shown


in Fig. 6.3 by the + symbol. For example, with L = N = 4,

wt (n) = {0, 0.5, 1, 0.5}

With L = N = 8,

wt (n) = {0, 0.25, 0.5, 0.75, 1, 0.75, 0.5, 0.25}

The circular convolution of a rectangular window



1 for n = 0, 1, . . . , L2 − 1
wr (n) =
0 for n = L2 , L2 + 1, . . . , N − 1
6.2 Leakage Effect 167

with itself followed by a circular right shift of one sample interval is the triangular
window with a scale factor. For example, with N = 4 and L = 2,

wr (n) = {1, 1, 0, 0} ↔ Wr (k) = {2, 1 − j1, 0, 1 + j1}

N
Wr2 (k) = {4, − j2, 0, j2} ↔ wt (n + 1) = {1, 2, 1, 0}
2
N N
Wr2 (k)e− j

4 k = Wt (k) = {4, −2, 0, −2} ↔ wt (n) = {0, 1, 2, 1}
2 2
Therefore, simplifying, we get the DFT of an even-length triangular window as
 2
2 2 2 sin( π2 k)
W (k)e− j N k =

Wt (k) = e jπk
N r N sin( Nπ k)

As the time-domain function is real and even, the spectrum is also real and even.
The window is even-symmetric with the first sample value zero. For N even, the
middle value is 1. Therefore, the DFT of an even-length triangular window of length
N is also given by
2 −1
N

4n 2π
Wt (k) = (−1) +k
cos nk
n=1
N N

With N = 4, for example,

wt (n) = {0, 0.5, 1, 0.5}, Wt (k) = {2, −1, 0, −1}

For an odd length N ,


N −1

2
4n 2π
Wt (k) = cos nk
n=1
N N

With N = 3, for example,


 
2 2 4 2 2
wt (n) = 0, , , Wt (k) = ,− ,−
3 3 3 3 3

Another formula defining the triangular window of length N is given by


 
2 n − N
wt (n) = 1 − 2
, n = 0, 1, . . . , N − 1
N
The normalized magnitude in dB of the DFT of this window is shown in Fig. 6.5
with L = 16 and N = 64. The magnitude of the largest side lobe is −25.913 dB.
168 6 Aliasing and Leakage

0 triangular N=64
L =16
|W(k)/W(0)|, dB

-20
-25.913

-40

0 8 12 16 20 24 28
k

Fig. 6.5 The normalized magnitude in dB of the frequency response of the triangular window

The main lobe width is 2N


L
for the rectangular window and 4N L
for the triangular
window. Therefore, the main lobe width is 8 and 16 in Figs. 6.4 and 6.5, respectively.

Example 6.2 List the values of the triangular window wr (n) with N = 8 and L = 5.
Find the truncated version, xt (n), of one cycle of x(n), starting from n = 0, by
applying the window. Find the magnitude of the DFT of x(n) and xt (n).

x(n) = e j 8 n , n = 0, 1, 2, 3, 4, 5, 6, 7

wt (n) = {0, 0.4, 0.8, 0.8, 0.4, 0, 0, 0}

x(n) = {1, 0.7071 + j0.7071, j1, −0.7071 + j0.7071, −1,


− 0.7071 − j0.7071, − j1, 0.7071 − j0.7071}

X (k) = {0, 8, 0, 0, 0, 0, 0, 0}

xt (n) = {0, 0.2828 + j0.2828, j0.8, −0.5657 + j0.5657, −0.4, 0, 0, 0}

|X t (k)| = {1.7844, 2.4, 1.7844, 0.5657, 0.1268, 0, 0.1268, 0.5657}

6.2.3 Hann and Hamming Windows

An alternate approach to design tapered windows is to express their frequency


responses as a linear combination of the scaled and shifted spectra of rectangular
windows. The combination tends to reduce the large side lobes of the rectangular
window at the cost of increasing the length of the main lobe. Shifting the spectrum
6.2 Leakage Effect 169

0 Hann N=64
L =16
|W(k)/W(0)|, dB

-20
-32.192
-40

-60

-80
0 4 8 12 16 20 24 28
k

Fig. 6.6 The normalized magnitude in dB of the frequency response of the Hann window

in the frequency domain requires multiplication of the window in the time domain
with a complex exponential (frequency shift theorem).
The Hann window is defined as

0.5 − 0.5 cos 2π n for n = 0, 1, . . . , L − 1
whan (n) = L
0 for n = L , L + 1, . . . , N − 1

The time-domain representation of this window is shown in Fig. 6.3 by the cross
symbol, with L = 32 and N = 32. For example, with L = N = 4,

whan (n) = {0, 0.5, 1, 0.5}

With L = N = 8,

whan (n) = {0, 0.1464, 0.5, 0.8536, 1, 0.8536, 0.5, 0.1464}


↔ Whan (k) = {4, −2, 0, 0, 0, 0, 0, −2}

Using Euler’s formula, we get


 
e j L n + e− j L n
2π 2π

cos n =
L 2

Therefore, the frequency response is given in terms of that of the rectangular window
as
Whan (k) = 0.5Wr (k) − 0.25Wr (k + 1) − 0.25Wr (k − 1)

The magnitude of the DFT in dB is shown in Fig. 6.6 with L = 16 and N = 64. The
magnitude of the largest side lobe is −32.192 dB.

Example 6.3 List the values of the Hann window whan (n) with N = 8 and L = 5.
Find the truncated version, xt (n), of one cycle of x(n), starting from n = 0, by
applying the window. Find the magnitude of the DFT of x(n) and xt (n).
170 6 Aliasing and Leakage


x(n) = e j 8 n , n = 0, 1, 2, 3, 4, 5, 6, 7

whan (n) = {0, 0.3455, 0.9045, 0.9045, 0.3455, 0, 0, 0}

x(n) = {1, 0.7071 + j0.7071, j1, −0.7071 + j0.7071, −1,


− 0.7071 − j0.7071, − j1, 0.7071 − j0.7071}

X (k) = {0, 8, 0, 0, 0, 0, 0, 0}

xt (n) = {0, 0.2443 + j0.2443, j0.9045, −0.6396 + j0.6396, −0.3455, 0, 0, 0}

|X t (k)| = {1.9357, 2.5, 1.9357, 0.7906, 0.0539, 0, 0.0539, 0.7906}

The Hamming window is defined as


 2π
0.54 − 0.46 cos n for n = 0, 1, . . . , L − 1
wham (n) = L
0 for n = L , L + 1, . . . , N − 1

The time-domain representation of this window is shown in Fig. 6.3 by unfilled circles
with L = 32 and N = 32. For example, with L = N = 4,

wham (n) = {0.08.0.54, 1, 0.54}

With L = N = 8,

wham (n) = {0.08, 0.2147, 0.54, 0.8653, 1, 0.8653, 0.54, 0.2147} ↔

Wham (k) = {4.32, −1.84, 0, 0, 0, 0, 0, −1.84}

The frequency response is given in terms of that of the rectangular window as

Wham (k) = 0.54Wr (k) − 0.23Wr (k + 1) − 0.23Wr (k − 1)

The magnitude of the DFT in dB is shown in Fig. 6.7 with L = 16 and N = 64. The
magnitude of the largest side lobe is −40.160 dB.

Example 6.4 List the values of the Hamming window wr (n) with N = 8 and L = 5.
Find the truncated version, xt (n), of one cycle of x(n), starting from n = 0, by
applying the window. Find the magnitude of the DFT of x(n) and xt (n).

x(n) = e j 8 n , n = 0, 1, 2, 3, 4, 5, 6, 7
6.2 Leakage Effect 171

0 hamming N=64
|W(k)/W(0)|, dB
-10 L =16

-20

-30
-40.160
-40

0 4 10 16 22 28
k

Fig. 6.7 The normalized magnitude in dB of the frequency response of the Hamming window

wham (n) = {0.08, 0.3979, 0.9121, 0.9121, 0.3979, 0, 0, 0}

x(n) = {1, 0.7071 + j0.7071, j1, −0.7071 + j0.7071, −1,


− 0.7071 − j0.7071, − j1, 0.7071 − j0.7071}

X (k) = {0, 8, 0, 0, 0, 0, 0, 0}

xt (n) = {0.08, 0.2813 + j0.2813, j0.9121, −0.6450 + j0.6450, −0.3979, 0, 0, 0}

|X t (k)| = {1.9607, 2.7, 1.9607, 0.6731, 0.0479, 0.08, 0.0479, 0.6731}

6.2.4 Reducing the Spectral Leakage

The ability to distinguish the different frequency components of a spectrum is called


the resolution. The best resolution is obtained with no truncation of the time-domain
signal. That means the record of the signal must be the whole nonzero part of an ape-
riodic signal or an integral number of periods of a periodic signal. With truncation,
we have to use an appropriate window to ensure that the leakage and spectral res-
olutions are acceptable. Figure 6.8a, b show the sinusoid x(n) = cos( 2π 32
2n) and its
spectrum, respectively. Since there is no truncation, the DFT spectral representation
is distinct, clearly showing the two components. Figure 6.8c, d shows the truncated
sinusoid using the rectangular window and its spectrum, respectively. Since there is
truncation, both the resolution and the leakage of the DFT spectral representation
have deteriorated significantly. Figure 6.8e, f shows the truncated sinusoid using the
Hann window and its spectrum, respectively. The spectral resolution is low compared
with that in Fig. 6.8d. But, the magnitude of the side lobes is much smaller than in
Fig. 6.8d.
172 6 Aliasing and Leakage

(a) 1
(b)
16

X(k)
x(n)

-1 0
0 4 8 12 16 20 24 28 0 2 8 16 24 30
n k
(c) 1
(d)
12

X(k)
x(n)

-1 0
0 4 8 12 16 20 24 28 0 2 8 16 24 30
n k
(e) 1
(f)
6
X(k)
x(n)

0
-1
0 4 8 12 16 20 24 28 0 2 8 16 24 30
n k

Fig. 6.8 a Sinusoid x(n) = cos( 2π


32 2n); b its spectrum; c the truncated version of x(n) using the
rectangular window; d its spectrum; e the truncated version of x(n) using the Hann window; f its
spectrum

2π 2π
Figure 6.9a shows the DFT magnitude spectrum of x(n) = e j 64 n + e j 64 2n . In (a),
the two frequency components of the signal are clearly identified. In (b), there is only
one peak, due to the truncation of the signal, and, clearly, the spectral representation
is not a clear identification of the constituent frequency components of the signal.
This is due to the convolution of the spectra of the signal and the rectangular window.
2π 2π
Figure 6.10a shows the DFT magnitude spectrum of x(n) = e j 64 n + e j 64 4n . In this
case, the separation of the frequency components is more. In (a), the two frequency
components of the signal are clearly identified. In (b) also, there are two peaks
although not as distinct as in (a), due to the truncation of the signal.
2π 2π
Figure 6.11a shows the DFT magnitude spectrum of x(n) = e j 64 n + 0.1e j 64 14n .
In this case, the amplitude of one of the frequency components is large compared with
the other. In (a), the two frequency components of the signal are clearly identified.
6.2 Leakage Effect 173

(a) (b)
64 30

20
|X(k)|

|X(k)|
10

0 0
0 1 2 3 4 5 0 1 2 3 4 5 6 7 8 9 10
k k
2π 2π
Fig. 6.9 a The DFT magnitude spectrum of x(n) = e j 64 n + e j 64 2n ; b the DFT magnitude spectrum
of truncated x(n)

(a) (b) 15
64

10
|X(k)|

|X(k)|
5

0 0
0 1 2 3 4 5 0 1 2 3 4 5 6 7 8 9 10
k k
2π 2π
Fig. 6.10 a The DFT magnitude spectrum of x(n) = e j 64 n + e j 64 4n ; b the DFT magnitude spec-
trum of truncated x(n)

(a) (b)
64
15
|X(k)|

|X(k)|

0 0
01 8 14 01 8 14
k k
2π 2π
Fig. 6.11 a The DFT magnitude spectrum of x(n) = e j 64 n + 0.1e j 64 14n ; b the DFT magnitude
spectrum of truncated x(n)

In (b), due to the truncation of the signal, the clear identification of the second
component is not possible due to the large side lobes of the rectangular window.
2π 2π
Figure 6.12a shows the DFT magnitude spectrum of x(n) = e j 64 n + 0.1e j 64 14n .
In (a), the two frequency components of the signal are clearly identified. In (b),
despite the truncation of the signal, the identification of the second component is
possible due to the small side lobes of the Hann window.
174 6 Aliasing and Leakage

(a) 64
(b)
8
|X(k)|

|X(k)|
0
0
01 8 14 01 8 14
k k
2π 2π
Fig. 6.12 a The DFT magnitude spectrum of x(n) = e j 64 n + 0.1e j 64 14n ; b the DFT magnitude
spectrum of truncated x(n) using the Hann window

6.3 Picket-Fence Effect

As the DFT provides only the uniform samples of a spectrum, it is possible that
features such as the peak of a spectrum are missed. As this is like viewing the spectrum
through a picket-fence, this effect is called the picket-fence effect. The period in one
domain is always fixed by the uniform sampling interval in the other. Therefore, the
data record should be long enough to provide a sufficiently small sampling interval
in the frequency domain. If necessary, zero padding can be employed in the time
domain to reduce the spectral sampling interval.
Figure 6.13a shows the DFT samples of the continuous spectrum of a signal. The
main lobe peak is missed. Figure 6.13b shows the DFT samples of the continuous
spectrum of the zero-padded signal to make its length double. This reduces the
sampling interval of the spectrum by one-half and the main lobe peak is located. In
general, sufficient record length should be ensured by zero padding or otherwise so
that all the important features of the spectrum are located.

(a) 60
(b) 60
|X(k)|

|X(k)|

40 40

20 20

0 0
0 1 2 3 4 5 0 1 2 3 4 5
k k

Fig. 6.13 a The DFT samples of the continuous spectrum of a signal; b the DFT samples of the
zero-padded signal
6.4 Summary 175

6.4 Summary

• The DFT is used to approximate all other versions of Fourier analysis. While the
DFT is finite and discrete in both the domains, signals may have infinite duration
and/or infinite bandwidth. Further, most of the naturally occurring signals are
continuous type. Therefore, signal analysis by the DFT is only approximate but
can be made adequate.
• The approximation of the signals to suit the DFT analysis usually requires sam-
pling, truncation, and quantization.
• The sampling theorem stipulates that a sinusoid with frequency f Hz requires
more than 2 f samples for its unambiguous representation in its sampled form.
• If the sampling theorem is not satisfied, then aliasing occurs. Aliasing is the imper-
sonation by a low-frequency discrete sinusoid of a higher-frequency continuous
sinusoid, due to a sampling interval not short enough.
• In order to avoid aliasing in the representation of a signal, the sampling interval
must be sufficiently short. Given a sampling interval, the signal has to be prefiltered
by an antialiasing filter so that the sampling theorem is satisfied. If aliasing is
unavoidable, then it has to be ensured, by selecting a sampling interval that is as
short as possible, that the error in the representation of the signal is negligible.
• The sampled version can be made sufficiently accurate, since signals generated
by physical devices are characterized by a drooping spectrum with increasing
frequency.
• As the duration of the signal may be very long, truncation is usually required.
• The DFT requires that all the frequency components of a signal complete an
integral number of cycles in the record length for its accurate representation. This
requirement may be violated due to truncation.
• Truncation reduces the resolution, which is the clear identification of the different
frequency components. Further, the energy of the frequency components is leaked
to neighboring frequencies indicating nonexisting frequency components in the
spectrum.
• Truncation is modeled as multiplying the signal by a rectangular window. This
window provides the best resolution of a truncated signal compared with other
windows but results in large leakage of energy. This is due to the discontinuity
created by this window at the borders, since a discontinuity makes the convergence
of the spectrum slow.
• The tapered windows eliminate or reduce the discontinuity by gradually reducing
the data towards the ends of the data record. This reduction in the discontinuity
reduces the leakage at the cost of reducing the spectral resolution. The reduc-
tion in leakage improves the ability to detect frequency components with small
magnitudes.
• Several tapered windows are available with different characteristics. The window
suitable for a specific application should be selected.
176 6 Aliasing and Leakage

• The truncated version can be made sufficiently accurate, since signals generated
by physical devices are characterized by a drooping amplitude with increasing
time.
• As the DFT provides only the samples of a spectrum, it is possible that features
such as the peak of a spectrum are missed. This effect is called the picket-fence
effect.
• The data record in the time domain should be long enough to provide a sufficiently
small sampling interval in the frequency domain. If necessary, zero padding can
be employed to reduce the spectral sampling interval.

Exercises
6.1 Given a periodic signal x(n) with period N = 4. Increase the value of the fre-
quency index from k = 0 to k = 8 and find the 4 samples for each k. Verify that the
equation
Ae j ( 4 (k+4l)n+φ) = Ae j ( 4 kn+φ) , n = 0, 1, 2, 3
2π 2π

holds, where l is an integer.

* 6.1.1
x(n) = 2e j ( 4 kn+ 3 ) , n = 0, 1, 2, 3
2π π

6.1.2
x(n) = e j ( 4 kn− 4 ) , n = 0, 1, 2, 3
2π π

6.1.3
x(n) = −e j ( 4 kn− 3 ) , n = 0, 1, 2, 3
2π π

6.1.4
x(n) = −2e j ( 4 kn+ 6 ) , n = 0, 1, 2, 3
2π π

6.1.5
x(n) = 3e j ( 4 kn+ 8 ) , n = 0, 1, 2, 3
2π π

6.2 Given a periodic signal x(n) with period N = 8. Increase the value of the fre-
quency index from k = 0 to k = 12 and find the 8 samples for each k. Verify that the
equations
   
2π 2π N
x(n) = cos (k + l N )n + φ = cos kn + φ , k = 0, 1, . . . , − 1
N N 2
   
2π 2π N
x(n) = cos (k + l N )n + φ = cos(φ) cos kn , k =
N N 2
   
2π 2π
x(n) = cos (l N − k)n + φ = cos kn − φ ,
N N
6.4 Summary 177

N
k = 1, 2, . . . , − 1, n = 0, 1, 2, 3, 4, 5, 6, 7
2
hold, where l is an integer.

6.2.1  
2π π
x(n) = cos kn −
8 6

* 6.2.2  
2π π
x(n) = −2 cos kn +
8 6

6.2.3  
2π π
x(n) = − cos kn −
8 4

6.2.4  
2π π
x(n) = cos kn −
8 8

6.2.5  
2π π
3 cos kn −
8 5

6.3 List the values of the rectangular window wr (n) with N = 8 and L = 5. Verify
these values by finding the IDFT of its frequency-domain version. Find the truncated
version, xt (n), of one cycle of x(n) by applying the window with L = 5. Find the
magnitude of the DFT, X t (k), of xt (n).

6.3.1  

x(n) = cos n , n = 0, 1, 2, 3, 4, 5, 6, 7
8

6.3.2  

x(n) = cos 2n , n = 0, 1, 2, 3, 4, 5, 6, 7
8

* 6.3.3  

x(n) = cos 3n , n = 0, 1, 2, 3, 4, 5, 6, 7
8

6.3.4  
2π π
x(n) = cos n− , n = 0, 1, 2, 3, 4, 5, 6, 7
8 3
178 6 Aliasing and Leakage

6.3.5  
2π π
x(n) = cos n+ , n = 0, 1, 2, 3, 4, 5, 6, 7
8 6

6.4 List the values of the Hann window whan (n) with N = 8 and L = 5. Verify
these values by finding the IDFT of its frequency-domain version. Find the truncated
version, xt (n), of one cycle of x(n) by applying the window with L = 5. Find the
magnitude of the DFT, X t (k), of xt (n).

6.4.1 

x(n) = cos n , n = 0, 1, 2, 3, 4, 5, 6, 7
8

6.4.2  

x(n) = cos 2n , n = 0, 1, 2, 3, 4, 5, 6, 7
8

6.4.3  

x(n) = cos 3n , n = 0, 1, 2, 3, 4, 5, 6, 7
8

* 6.4.4  
2π π
x(n) = cos n− , n = 0, 1, 2, 3, 4, 5, 6, 7
8 3

6.4.5  
2π π
x(n) = cos n+ , n = 0, 1, 2, 3, 4, 5, 6, 7
8 6
Chapter 7
Fourier Series

Signals and spectrums can be continuous or discrete and periodic or aperiodic. There
are four possibilities resulting in the four versions of the Fourier analysis, as shown
in the Tables 7.1 and 7.2. In both the time and frequency domains, the DFT (discrete
Fourier transform) version is discrete and periodic. In both the time and frequency
domains, the FT (Fourier transform) version is continuous and aperiodic. The FS
(Fourier series) version is continuous and periodic in the time domain and it is discrete
and aperiodic in the frequency domain. The DTFT (discrete-time Fourier transform)
version is continuous and periodic in the frequency domain and it is discrete and
aperiodic in the time domain. Note the duality between the DTFT and FS. Fourier
analysis is representation of an arbitrary waveform in terms of sinusoids. It enables
to determine the sinusoidal content of the waveforms. The differences between the
versions are that signals and their spectra being continuous or discrete and periodic
or aperiodic.
Each of the four versions of the Fourier analysis can be independently developed
using the orthogonal properties of the sinusoids. We have first derived the DFT version
for two major reasons. One is that it is the only version that can be implemented using
digital systems and all the other three versions are approximated, in practice, using the
DFT. Another reason is that it is the easiest to visualize the analysis and synthesis of
the waveforms. Therefore, we derive the three other versions of the Fourier analysis
starting from the DFT.
In this chapter, we derive the FS version of the Fourier analysis. In the Fourier
series representation, the time-domain waveform is continuous and periodic and
the corresponding spectrum in the frequency domain is discrete and aperiodic. A
continuous periodic waveform is represented as a sum of sinusoids whose frequencies
are integral multiples of that of the smallest, called the fundamental. The other
sinusoids are called the harmonics. The frequency of the fundamental component
is called the fundamental frequency. The multiplicative inverse of the period of the
periodic waveform being represented is the cyclic fundamental frequency. The cyclic
frequency multiplied by 2π is the frequency in radians. If the independent variable
© Springer Nature Singapore Pte Ltd. 2018 179
D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7_7
180 7 Fourier Series

Table 7.1 Time-domain classification of Fourier analysis


Periodic Aperiodic
Continuous FS FT
Discrete DFT DTFT

Table 7.2 Frequency-domain classification of Fourier analysis


Periodic Aperiodic
Continuous DTFT FT
Discrete DFT FS

of the time-domain waveform is time, then the unit of the cyclic frequency, usually
denoted by f , is cycles per second (Hz). The unit of the radian frequency, usually
denoted by ω, is radians per second. However, it should be remembered that Fourier
analysis is equally applicable even if the independent variable is other than time. For
example, the periodicity of the rate of change of intensity of the pixels with respect
to distance is of interest in image processing.
The frequency increment of the spectrum of a periodic function is equal to its
fundamental frequency. If the number of samples in a period is increased in the
DFT representation of a signal, then, due to a longer range of the spectrum, the
number of frequency components is increased with the ability to represent a more
rapidly varying periodic waveform. When the sampling interval approaches zero, the
resulting waveform becomes continuous and periodic. The aperiodic nature of the
spectrum can be considered as a periodic spectrum becoming aperiodic in the limit
as the period becomes infinite.

7.1 Fourier Series

In the FS representation of signals, a continuous periodic signal x(t) with period T


and cyclic frequency f0 = 1/T is expressed as a sum of a constant and sinusoids with
frequencies f0 , called the fundamental, and

{2f0 , 3f0 , . . . , ∞}

called the harmonic frequencies. A sinusoid with frequency kf0 is the kth harmonic of
the fundamental sinusoid with frequency f0 . The corresponding radian frequencies
are
{ω0 = 2πf0 , 2ω0 = 2π(2f0 ), 3ω0 = 2π(3f0 ), . . . , ∞}
7.1 Fourier Series 181

Then, x(t) is represented in terms of sinusoids as

x(t) = Xp (0) + Xp (1) cos(ω0 t + θ1 )


+ Xp (2) cos(2ω0 t + θ2 ) + · · · + Xp (∞) cos(∞ω0 t + θ∞ )

 2π
= Xp (0) + Xp (k) cos(kω0 t + θk ), ω0 = (7.1)
T
k=1

In Eq. (7.1), x(t) and the frequencies of the sinusoids are known. The Fourier analysis
problem is the determination of the amplitudes and phases of the sinusoids so that the
equation is satisfied in the least squares error sense. While, in theory, the frequency
range of the sinusoids is infinite, as no physical device can generate a harmonic of
infinite order, the number of harmonics used, in practice, is always finite.
Using trigonometric identities, Eq. (7.1) can be equivalently expressed, in terms
of cosine and sine waveforms, as

 2π
x(t) = Xc (0) + (Xc (k) cos(kω0 t) + Xs (k) sin(kω0 t)), ω0 = (7.2)
T
k=1

Using the Euler’s formula, Eq. (7.1) can also be equivalently expressed, in terms of
complex exponentials with a pure imaginary exponent, as

 2π
x(t) = Xfs (k)ejkω0 t , ω0 = (7.3)
T
k=−∞

7.1.1 FS as a Limiting Case of the DFT

FS can be derived using the orthogonality property of the sinusoids, similar to the
derivation of the DFT. In this section, we derive the FS as a limiting case of the DFT
with the sampling interval of the time-domain sequence tending to zero. We use the
center-zero format for convenience. Let the DFT of sequence x(n), N ≤ n ≤ N be
X (k), N ≤ k ≤ N . Then, the Fourier representation of x(n) is given as

1 
N
j (2N2π+1) nk
x(n) = X (k)e , n = 0, ±1, ±2, . . . , ±N (7.4)
2N + 1
k=−N

where

N
x(m)e−j (2N +1) mk

X (k) = (7.5)
m=−N
182 7 Fourier Series

Substituting for X (k) in Eq. (7.4), we get


 
1 
N 
N
−j (2N2π+1) mk 2π
x(n) = x(m)e ej (2N +1) nk (7.6)
2N + 1 m=−N
k=−N

Suppose the 2N + 1 samples are obtained by sampling a periodic signal, of period


T s, over a period with a sampling interval of Ts s, then

T
= 2N + 1
Ts

The index of the time-domain samples has to be replaced by nTs s. The fundamental
frequency is
2π 2π
ω0 = =
T (2N + 1)Ts

radians per second. Substituting these changes in Eq. (7.6), we get


 

N
1 
N
x(mTs )e−j T mTs k Ts ej T nTs k
2π 2π
x(nTs ) =
T m=−N
k=−N
 
N
1 
N
= x(mTs )e−jω0 mTs k Ts ejω0 nTs k (7.7)
T m=−N
k=−N

For a given T , ω0 is fixed irrespective of Ts . With Ts decreasing, the time-domain


waveform is densely populated and the spectrum becomes longer. As Ts → 0, mTs
and nTs become continuous variables, designated, respectively, τ and t. The inner
summation becomes an integral between limits −T /2 and T /2 with Ts becoming
the differential d τ . The number of harmonics 2N + 1 becomes infinite. With these
changes, the discrete periodic waveform becomes a continuous periodic waveform
and the discrete periodic spectrum becomes an aperiodic discrete spectrum. Equa-
tion (7.7) is transformed to
∞ 
  
1 T /2 −jω0 τ k
x(t) = x(τ )e dτ e jω0 tk
(7.8)
T −T /2
k=−∞

Consequently, the FS representation of a continuous periodic waveform x(t) with


period T is given as


x(t) = Xfs (k)ejkω0 t (7.9)
k=−∞
7.1 Fourier Series 183

where
 T /2  T
1 1
Xfs (k) = x(t)e−jkω0 t dt = x(t)e−jkω0 t dt (7.10)
T −T /2 T 0

As x(t) is periodic with period T , the integral can be evaluated over any continuous
interval of duration T . Two commonly used limits are shown in Eq. (7.10). Equa-
tions (7.9) and (7.10) are, respectively, the exponential form of the FS synthesis and
analysis of x(t).
A periodic waveform  

x(t) = 0.2 + cos t
16

with period T = 16 s is shown in Fig. 7.1a. The cyclic frequency is f0 = 1/16 Hz and
its radian frequency is ω0 = 2π/16 rad/s. The FS for x(t) in exponential form, using
Euler’s formula, is  
1 j 2π t 1 −j 2π t
x(t) = 0.2 + e 16 + e 16
2 2

and its spectrum is shown in Fig. 7.1b. With 3 time-domain samples, we can repre-
sent the DC component and the fundamental harmonic. With the same period, the
waveform, shown in Fig. 7.1c,
   
2π 2π
x(t) = 0.2 + cos t + 0.3 cos 3t ,
16 16

with a higher frequency content, requires a minimum of 7 samples. The FS for x(t)
in exponential form is
   
1 j 2π t 1 −j 2π t 0.3 j 2π 3t 0.3 −j 2π 3t
x(t) = 0.2 + e 16 + e 16 + e 16 + e 16
2 2 2 2

Its spectrum is shown in Fig. 7.1d. With more number of samples, the time-domain
waveform becomes more densely sampled and its spectrum becomes longer. With
the same period, the waveform, shown in Fig. 7.1e,
    
2π 2π 2π
x(t) = 0.2 + cos t + 0.3 cos 3t + 0.2 cos 5t ,
16 16 16

with a still higher frequency content, requires 11 samples. The FS for x(t) in expo-
nential form is
184 7 Fourier Series

(a) (b)
1
T=16 0.5

X fs (k)
x(t)

0.2
T s =16/3

0 4 8 12 -1 0 1
t, seconds k
(c) (d)

1 0.5
T=16

X fs (k)
x(t)

0 0.2
0.15

0
-1 T s =16/7

0 4 8 12 -3 -2 -1 0 1 2 3
t, seconds k
(e) (f)
0.5
1
X fs (k)

T=16
x(t)

0 0.2
0.15
0.1
0
-1 T s =16/11

0 4 8 12 -5 -3 -1 0 1 3 5
t, seconds k

Fig. 7.1 a A periodic waveform with the DC and the fundamental; b its FS spectrum; c a periodic
waveform with the DC, the fundamental and the 3rd harmonic; d its FS spectrum; e a periodic
waveform with the DC, the fundamental and the 3rd and 5th harmonics; f its FS spectrum

   
1 j 2π t 1 −j 2π t 0.3 j 2π 3t 0.3 −j 2π 3t
x(t) = 0.2 + e 16 + e 16 + e 16 + e 16
2 2 2 2
 
0.2 j 2π 5t 0.2 −j 2π 5t
+ e 16 + e 16
2 2

Its spectrum is shown in Fig. 7.1f. The time-domain waveform becomes more densely
sampled than those of (a) and (c) and its spectrum is longer than those of (b) and (d).
In the limit, the sampling interval tends to zero. The time-domain waveform becomes
continuous with the same period and the spectrum becomes aperiodic with the same
harmonic spacing.
7.1 Fourier Series 185

With the sinusoids represented in polar form, we get the compact trigonometric
form of the FS. Equation (7.9) can be rewritten as


x(t) = Xfs (0) + (Xfs (k)ejkω0 t + Xfs (−k)e−jkω0 t )
k=1

All the terms, except the constant term Xfs (0), are complex conjugate pairs. The pair
with k = ±1 combines to form the fundamental sinusoid. The pair with k = ±2
combines to form the second harmonic and so on. Using Euler’s formula, we get


x(t) = Xp (0) + Xp (k) cos(kω0 t + θ(k)), (7.11)
k=1

where

Xp (0) = Xfs (0), Xp (k) = 2|Xfs (k)|, θ(k) = ∠(Xfs (k)), k = 1, 2, . . . , ∞

Comparing these two forms, the phase angles appear explicitly in the trigonometric
form whereas the complex coefficients of the complex form contain the phase angles
implicitly. While the complex form is the most suitable for analysis, the other form
is easier to visualize and physical devices generate the waveforms in that form.
With the sinusoids represented in rectangular form, we get another version of the
trigonometric form of the FS. Expressing the sinusoid in Eq. (7.11) in rectangular
form, we get


x(t) = Xc (0) + (Xc (k) cos(kω0 t) + Xs (k) sin(kω0 t)), k = 1, 2, . . . , ∞ (7.12)
k=1

where Xc (0) = Xp (0), Xc (k) = Xp (k) cos(θ(k)), and Xs (k) = −Xp (k) sin(θ(k)).
Periodicity of the FS
The FS synthesized waveform is periodic with the same period as that of the funda-
mental, T = 2πω0
. Replacing t by t + mT in Eq. (7.11) with m being any positive or
negative integer, we get


x(t + mT ) = Xp (0) + Xp (k) cos(kω0 (t + mT ) + θk )
k=1
∞
= Xp (0) + Xp (k) cos(kω0 t + 2kmπ + θk )
k=1
∞
= Xp (0) + Xp (k) cos(kω0 t + θk ) = x(t)
k=1
186 7 Fourier Series

If x(t) is defined only over a finite duration, then one period of the FS represents the
function. For a periodic x(t), the FS representation is valid for all t.
Existence of the FS
Dirichlet conditions specify the sufficient conditions for the existence of a FS rep-
resentation of a signal. As the coefficients are defined by an integral over a period,
the first condition is that the signal x(t) is absolutely integrable over one period. The
function to be integrated is the product of x(t) and the complex exponential with a
pure imaginary exponent. As the magnitude of the complex exponential is unity, the
T
condition is 0 |x(t)|dt < ∞. From the definition of the FS, we get
 t1 +T  t1 +T  t1 +T
1 1 1
|Xfs (k)| ≤ |x(t)e−jkω0 t | dt = |x(t)||e−jkω0 t | dt = |x(t)| dt
T t1 T t1 T t1

since |e−jkω0 t | = 1.
The second condition is that the number of finite maxima and minima in one period
of the signal must be finite. The third condition is that the number of discontinuities
in one period of the signal must be finite. All signals generated by physical devices
satisfy these conditions.

Example 7.1 Find the three forms of the FS for the signal
   
2π π 1 2π π
x(t) = 1 − cos t− + sin 2 t +
8 3 2 8 6
   
1 2π 1 2π
− √ cos 3 t + √ sin 3 t
3 2 8 3 2 8

Solution
As x(t) can be rewritten in the form of the definitions easily, no evaluation of integral
is required to find its FS. The fundamental frequency of the waveform is ω0 = 2π 8
,
as the dc component is periodic with any period.
Compact Trigonometric Form
All the terms of x(t) are rewritten using cosine waveform with positive amplitude
for each frequency.
     
2π 2π 1 2π π 1 2π 3π
x(t) = 1 + cos t+ + cos 2 t − + cos 3 t −
8 3 2 8 3 3 8 4

Comparing this expression with the definition, Eq. (7.11), we get the compact
trigonometric form of the FS coefficients as
7.1 Fourier Series 187

2π 1 π
Xp (0) = 1, Xp (1) = 1, θ(1) = , Xp (2) = , θ(2) = − ,
3 2 3

1 3π
Xp (3) = , θ(3) = −
3 4

Trigonometric Form
  √     √  
1 2π 3 2π 1 2π 3 2π
x(t) = 1 − cos t − sin t + cos 2 t + sin 2 t
2 8 2 8 4 8 4 8
   
1 2π 1 2π
− √ cos 3 t + √ sin 3 t
3 2 8 3 2 8

Comparing this expression with the definition, Eq. (7.12), we get the trigonometric
form of the FS coefficients as

1 3 1
Xc (0) = 1, Xc (1) = − , Xs (1) = − , Xc (2) = ,
2 2 4

3 1 1
Xs (2) = , Xc (3) = − √ , Xs (3) = √
4 3 2 3 2

Exponential Form

1 2π 2π 1
x(t) = 1 + ej( 8 t+ 3 ) + e−j( 8 t+ 3 )
2π 2π

2 2
1 j(2 2π t− π ) 1 −j(2 2π t− π ) 1 j(3 2π t− 3π ) 1 −j(3 2π t− 3π )
+ e 8 3 + e 8 3 + e 8 4 + e 8 4
4 4 6 6
Comparing this expression with the definition, Eq. (7.9), we get the exponential form
of the FS coefficients as

2π 2π
Xfs (0) = 1, Xfs (1) = 0.5∠ , Xfs (−1) = 0.5∠− ,
3 3
π π
Xfs (2) = 0.25∠− , Xfs (−2) = 0.25∠ ,
3 3

1 3π 1 3π
Xfs (3) = ∠− , Xfs (−3) = ∠
6 4 6 4

The condition that a linear combination of sinusoids results in a periodic wave-


form is that their frequencies have a common measure. The frequencies are rational

numbers or multiplied by the same irrational or transcendental numbers such as 3,
π, or e. Then, the ratio becomes a rational number. The fundamental frequency of a
combination of sinusoids is the greatest common divisor of the numerators of their
188 7 Fourier Series

frequencies divided by the least common multiple of the denominators, after cancel-
ing any common factors of the numerators and denominators of each of them. Note
that a constant signal (DC) is periodic with any period.

Example 7.2 Find the fundamental frequency of the set of sinusoids


√   √   √ 
3 4 3 6 3
cos t , cos t , cos t
7 6 3

Solution
After canceling common factors of the frequencies
√ √ √
3 4 3 6 3
, , ,
7 6 3

we get √ √ √
3 2 3 2 3
, , ,
7 3 1

The least common multiple of the √ denominators


√ √ (7,√3, 1) is 21. The greatest com-
numerators ( 3, 2 3, 2 3) is 3. Therefore, the fundamental
mon divisor of the √ √
frequency is ω0 = 213 rad/s. The fundamental period is T = 2π ω0
= 2π21
√ = 14 3π s.
3
One cycle of the sum of the three sinusoids is shown in Fig. 7.2a. The first sinusoid
(period 14π
√ ), shown in Fig. 7.2b, is the third harmonic and it completes 3 cycles dur-
3 √ √
ing the period of 14 3π s. The second sinusoid (period 3π), shown in Fig. 7.2c, √
is the 14th harmonic and it completes 14 cycles. The third sinusoid (period 3),
shown in Fig. 7.2d, is the 42nd harmonic and it completes 42 cycles (only a part of
it is shown).

Example 7.3 Find the FS for the periodic impulse train with period T s defined as


x(t) = δ(t − nT )
n=−∞

Solution
The impulse train is shown in Fig. 7.3a. Each impulse is of continuous type with
strength 1, indicated by an upward pointing arrow. As the continuous unit-impulse
signal δ(t), located at t = 0, is defined, in terms of an integral
 ∞
x(t)δ(t) dt = x(0)
−∞
7.1 Fourier Series 189

(a) 3 (b)
1
x(t)

x(t)
0 0

-1
-3
0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70
t, seconds t, seconds
(c) 1
(d) 1
x(t)

x(t)
0 0

-1 -1
0 10 20 30 40 50 60 70 0 10 20
t, seconds t, seconds
√ √ 
Fig. 7.2 a One cycle of the waveform x(t) with period 14 3π s; b sinusoid cos 73 t with 3
√  √ 
cycles in the period; c sinusoid cos 4 6 3 t with 14 cycles in the period; d sinusoid cos 6 3 3 t
with 42 cycles in the period (only a part of it is shown)

and from the exponential FS definition, we get



e−jkω0 0
T
1 2 1
Xfs (k) = δ(t)e−jkω0 t dt = = , −∞ < k < ∞
T − T2 T T

The FS for the impulse train, in exponential form, is given by



 ∞
1  jkω0 t 2π
x(t) = Xfs (k)ejkω0 t = e , ω0 =
T T
k=−∞ k=−∞

The spectrum, shown in Fig. 7.3b, is also a periodic impulse train with period ω0 = 2π
T
and amplitude T1 . Each impulse is of discrete type.
The FS coefficients, in compact trigonometric form, are

1 2
Xp (0) = Xfs (0) = , Xp (k) = 2|Xfs (k)| = , θ(k) = 0, . . . , k = 1, 2, 3, . . .
T T
190 7 Fourier Series

(a) (b)
1 1/T

X fs (k)
x(t)

0 0
-2T -T 0 T 2T -2 0 - 0 0 0
2 0
t

Fig. 7.3 a Impulse train with period T s and b its FS spectrum

The FS is given by

1 2π
x(t) = (1 + 2(cos(ω0 t) + cos(2ω0 t) + cos(3ω0 t) + · · · )), ω0 = (7.13)
T T
As the impulse train is composed of cosine components only, the impulse is an even
signal.

The impulse δ(t) can be approximated by a unit-area rectangular pulse of width


a and height a1 , located at t = 0. In the limiting case of a → 0, the pulse degenerates
into an impulse. Several other functions also degenerate into impulse in their limiting
form. Consider the reconstructed signal x(t) defined by Eq. (7.13) using a finite
number of terms. Let T = 2π. Then, ω0 = 1. The partially reconstructed x(t) with
the first N + 1 terms is given by

1
x(t) ≈ (2 (1 + cos(t) + cos(2t) + cos(3t) + · · · + cos(Nt)) − 1)
2π  
1 sin(0.5(2N + 1)t)
=
2π sin(0.5t)

Figure 7.4 shows the reconstructed impulse with (a) N = 8; (b) N = 16; (c) N = 32;
(d) N = 64; (e) N = 128; (f) N = 256. The waveforms are composed of a large
positive hump at the center and damped oscillations on either side. The total area of
the oscillations is 1 for any N . The area of the oscillations is negative. Therefore, the
area of the large hump must have an area greater than 1 by this amount so that the
net area becomes 1. As the impulse encloses an area of 1 at t = 0, the reconstructed
waveforms with a finite N are not ideal impulses. They are approximations of the
impulse. In the limit N → ∞, the large hump and the oscillations coincide at t = 0
and the reconstructed waveform attains its ideal form. Therefore, for finite values
of N , however large, the reconstructed waveform is a deviation from its ideal form.
In reconstructing waveforms with discontinuities, a suitable value for N has to be
chosen so that the deviation is acceptable.
7.1 Fourier Series 191

(a) (b)
2.7056 5.2521
N =8 N = 16
x(t)

x(t)
0 0

- 0 - 0
(c) t (d) t
10.3451 20.5310
N = 32 N = 64
x(t)

x(t)

0 0

- 0 - 0
(e) t (f) t
40.9028 81.6465
N = 128 N = 256
x(t)

x(t)

0 0

- 0 - 0
t t

Fig. 7.4 Reconstructed impulse with a N = 8; b N = 16; c N = 32; d N = 64; e N = 128; f


N = 256

Example 7.4 Find the FS for a square wave defined over one period as

1 for |t| < π2
x(t) =
0 for π2 < |t| < π

Solution
The square wave is shown in Fig. 7.6. The period of the waveform is 2π and the
fundamental frequency ω0 is one. The waveform is even-symmetric and, therefore,
the coefficients of all the sine components are zero. Further, subtracting the DC bias,
the first-half and second-half of x(t) are antisymmetric. This is called the odd half-
192 7 Fourier Series

wave symmetry. This implies that all the even-indexed, except the DC, components
are absent. Therefore, the waveform is composed of odd-indexed cosine waves and
a DC component.
 π
2 2 1
Xc (0) = dt =
2π 0 2
 π 2  
4 2 sin π2 k for k odd
Xc (k) = cos(k t)dt = kπ
2π 0 0 for k even and k = 0

The coefficient Xc (0) is the average value of x(t).


 
1 2 1 1
x(t) = + cos(t) − cos(3t) + cos(5t) − · · · (7.14)
2 π 3 5

The FS magnitude spectrum and the phase spectrum of the signal in exponential
form are shown, respectively, in Fig. 7.5a, b.

As the spectrum is usually complex-valued, it requires two plots. A plot to show


the magnitude and another to show the phase, as shown in Fig. 7.5. Of course, a plot
to show the real part and another to show the imaginary part is also equivalent. The
time-domain version of x(t), as shown in Fig. 7.6, with t and x(t) as the independent
and dependent variables is its representation in the time domain. The FS spectrum,
shown in Fig. 7.5, is another representation of x(t), where k and Xfs (k) are the inde-
pendent and dependent variables. This representation is called the frequency-domain
representation. Both the representations are complete and specific representation of
the signal. The change of representation is called a transformation, since variable t is
changed to k. The major reasons for the importance of this representation are: (i) the
amplitude spectrum and power spectrum are convenient representations of signals
in many application of signal analysis, (ii) the convolution operation becomes the
much simpler multiplication, and (iii) effective signal compression is possible.

(a) 0.5
(b)
(X fs (k))

0.3183
|X fs (k)|

0.1061

0 0
-3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3

Fig. 7.5 a The FS magnitude spectrum and b the phase spectrum of the square wave in exponential
form
7.1 Fourier Series 193

(a) 1.1366 (b) 1.1002


1 1
x(t)

x(t)
0.5 0.5

0 0
-0.1366 -0.1002
- -0.5 0 0.5 - 0
t t
(c) (d)
1.0921 1.0901
1 1
x(t)

x(t)
0.5 0.5

0 0
-0.0921 -0.0901
- 0 - 0
t t

Fig. 7.6 The FS reconstructed square wave. a Using up to the first harmonic; b using up to the
third harmonic; c using up to the seventh harmonic; d using up to the fifteenth harmonic

7.1.2 Gibbs Phenomenon

The reconstructed square waveforms using up to the first, third, seventh, and fif-
teenth harmonics are shown in Fig. 7.6a–d, respectively. The magnitude of the FS
coefficients decreases as the order of the harmonics increases, except for an impulse.
It is expected since the definition of the FS coefficients is an integral and the inte-
grand includes the complex exponential with k, the order of the harmonic, in its
exponent. Integrating a signal makes it smoother. For the square waveform, the coef-
ficients decrease at the rate of 1/k, where k is the order of the harmonic. The square
waveform is not differentiable, as it has discontinuities. The convolution output of
a square wave with itself is a triangular wave, whose first derivative has discon-
tinuities. As convolution becomes multiplication in the frequency domain, the FS
coefficients of the triangular waveform decrease at the rate of 1/k 2 , where k is the
order of the harmonic. Therefore, if the nth derivative of a waveform is the first one
having a discontinuity then its FS coefficients decrease at the rate of 1/k n+1 . The FS
representation converges uniformly at all points except at discontinuities.
The FS reconstructed waveform converges to the average of the two values of the
signal at the discontinuity. Let a and b be the values at the discontinuity and c is that
of the reconstructed waveform. As the reconstruction is with respect to least squares
error criterion,
194 7 Fourier Series

(c − a)2 + (c − b)2

must be minimum. Differentiating the expression with respect to c and equating the
resulting expression to zero, we get

c−a+c−b=0

and c = (a + b)/2. As the sinusoids are smooth functions, it cannot be be expected


to reconstruct a discontinuity exactly. The oscillatory behavior at discontinuities is
called the Gibbs phenomenon.
The expression for the FS reconstructed waveform up to the first harmonic is
x(t) = 21 + π2 cos(t). Differentiating this expression with respect to t and equating it
to zero, we get sin(t) = 0. The point t = 0 is a solution to this equation. Substituting
t = 0 in the expression for x(t), we get the value of the peak as 1.1366, as shown in
Fig. 7.6a. The maximum overshoots in other cases can be found similarly.
As the number of harmonics is increased to reconstruct the waveform, the fre-
quency of oscillations increases and the oscillations are confined more closer to the
discontinuity. However, the largest amplitude of the oscillations settles at 1.0869 for
relatively small number of harmonics. Therefore, there will be deviations of 8.69% of
the discontinuity for a moment using any finite number of harmonics to reconstruct
a waveform, Of course, the area under the deviation tends to zero.

7.2 Properties of the Fourier Series

Properties of signals and their transforms are useful in reducing the complexity of
signal analysis. For example, if the signal is even-symmetric then the determination of
its cosine components alone is adequate and the limits of the integration or summation
operations also get reduced. Further, with a knowledge of corresponding operations
in the time domain and frequency domain, they can be implemented in the appropriate
domain efficiently. For example, the implementation of the convolution operation of
long and arbitrary signals is more efficient in the frequency domain.

7.2.1 Linearity

The FS coefficients of a linear combination of a set of periodic signals of the same


period is equal to the same linear combination of their individual FS coefficients.
That is,

if x(t) ↔ Xfs (k) and y(t) ↔ Yfs (k) then ax(t) + by(t) ↔ aXfs (k) + bYfs (k),
7.2 Properties of the Fourier Series 195

where a and b are arbitrary constants. It is the linearity property of the Fourier analysis
that makes it suitable in the analysis of linear systems. For example, the FS coef-
ficients for cos(t) and sin(t) are Xfs (±1) = 21 and Xfs (±1) = ∓ 2j , respectively. The
FS coefficients for 2 cos(t) − 2j sin(t) = 2e−jt are Xfs (±1) = 1 + (−j)(∓j). That is,
the only nonzero FS coefficient is Xfs (−1) = 2.

7.2.2 Symmetry

Taking advantage of the symmetry properties, evaluation of the FS coefficients can


be made easier. The spectrum of a real-valued signal is conjugate-symmetric. That is,
the real part of its spectrum is even and the imaginary part is odd. As the harmonics
are orthogonal, at each frequency index k, the terms of the FS have to be of the form

Xfs (k)ejk T t and Xfs∗ (k)e−jk T t


2π 2π

so that they combine to produce a real sinusoid


 

jk 2π
Xfs∗ (k)e−jk T t

Xfs (k)e T t + = 2|Xfs (k)| cos k t + ∠(Xfs (k))
T
√ √
Therefore, Xfs∗ (−k) = Xfs (k). Let X (−1) = 3 − j, X (1) = 3 + j and the funda-
mental frequency be ω0 = 1. Then,
√ √ π
( 3 − j)e−jt + ( 3 + j)ejt = 4 cos t +
6
Although we use the exponential form of the Fourier analysis for mathematical
convenience, the redundancy in the exponential form of the FS can be taken care of in
the practical implementations of the algorithms to compute the Fourier representation
of real-valued signals.
Even and Odd Symmetry
The FS coefficients are defined by an integral. The integrand is the product of the sig-
nal to be analyzed and the complex exponential. The complex exponential has cosine
and sine components. Therefore, if the signal is even-symmetric, as the cosine wave-
form is even-symmetric and the sine waveform is odd-symmetric, the coefficients
corresponding to the cosine component only are nonzero. The spectrum is real and
even. Due to the symmetry, the evaluation of the defining integral over one-half of
the period is sufficient.
196 7 Fourier Series

 T
2 2
Xc (0) = x(t) dt,
T 0
 T
4 2
Xc (k) = x(t) cos(kω0 t) dt, k = 1, 2, . . . , ∞
T 0

For example, the FS coefficients of the impulse train and the square waveform in the
earlier examples are even-symmetric.
If the signal is odd-symmetric, the coefficients corresponding to the sine compo-
nent only are nonzero. The spectrum is imaginary and odd.
 T
4 2
Xs (k) = x(t) sin(kω0 t) dt, k = 1, 2, . . . , ∞
T 0

The square wave, in Example 7.4, pushed down by 0.5 along the vertical axis (so
that there is no DC bias) and shifted by π/2 s to the right becomes odd-symmetric
and its FS is  
2 1 1
sin(t) + sin(3t) + sin(5t) + · · ·
π 3 5

Any signal x(t) can be decomposed into its even and odd components, xe (t) and
xo (t). The real part of the FS coefficients, Re(Xfs (k)), of a real-valued signal x(t) are
the FS coefficients of its even component xe (t) and j Im(Xfs (k)) are those of its odd
component xo (t).
Half-Wave Symmetry
This property is defined for periodic signals. If the first- and second-halves of a
waveform x(t), with period T , are the same, then it is said to have even half-wave
symmetry. That is x(t ± T2 ) = x(t). Obviously, it completes two cycles of a pattern
in the interval T and consists of even-indexed frequency components only. The FS
coefficients can be expressed as
 T   
1 2 T
Xfs (k) = x(t) + (−1) x t +
k
e−jkω0 t dt (7.15)
T 0 2

The odd-indexed FS coefficients are zero. The even-indexed FS coefficients are


given by
 T
2 2
Xfs (k) = x(t)e−jkω0 t dt, k = 0, 2, 4, . . .
T 0

The full-wave rectified sine wave, presented later, is an example of this type of
waveform.
If the first- and second-halves of a waveform x(t), with period T , are the negatives
of each other, then it is said to have odd half-wave symmetry. That is −x(t ± T2 ) =
7.2 Properties of the Fourier Series 197

x(t). The even-indexed FS coefficients are zero. The odd-indexed FS coefficients are
given by
 T
2 2
Xfs (k) = x(t)e−jkω0 t dt, k = 1, 3, 5, . . .
T 0

The square wave in Example 7.4, with the DC bias subtracted, is an example of this
type of waveform.
Any periodic signal x(t), with period T , can be decomposed into its even and
odd half-wave symmetric components xeh (t) and xoh (t), respectively. That is x(t) =
xeh (t) + xoh (t), where
     
1 T 1 T
xeh (t) = x(t) + x t ± and xoh (t) = x(t) − x t ±
2 2 2 2

This decomposition is the basis for the fast implementation of the Fourier analysis
in practical applications. A waveform composed of N frequency components is
decomposed into two waveforms, each of which is composed of N /2 frequency
components. This process is recursively continued resulting in fast algorithms.

7.2.3 Time Shifting

Time shifting is an often used operation in signal analysis. The variable t in x(t) is
replaced by (t − t0 ). The origin of the signal is shifted by t0 . Shifting a signal does
not change its magnitude profile. Consider a typical harmonic component

Aej(kω0 t+θ)

Shifting it by t0 results in

Aej(kω0 (t−t0 )+θ) = Aej(kω0 t+(θ−kω0 t0 )) = Ae−jkω0 t0 ej(kω0 t+θ)

The phase has been changed to (θ − kω0 t0 ). The change in phase is proportional
to the harmonic order k. Such a change of the phase of the harmonic components
of a waveform x(t) shifts it by t0 . Therefore, if x(t) ↔ Xfs (k) with the fundamental
frequency ω0 = 2π
T
, then
x(t ± t0 ) ↔ e±jkω0 t0 Xfs (k)

Consider the FS of the square wave of Example 7.4.


 
1 2 1 1
x(t) = + cos(t) − cos(3t) + cos(5t) − · · ·
2 π 3 5
198 7 Fourier Series

Replacing t by t − π/2, we get


 
1 2 π 1 π  1 π 
x(t) = + cos t − − cos 3 t − + cos 5 t − − ···
2 π 2 3 2 5 2
 
1 2 1 1
= + sin(t) + sin(3t) + sin(5t) + · · ·
2 π 3 5

7.2.4 Frequency Shifting

If the signal x(t) is replaced by x(t)e±jk0 ω0 t , where k0 is an integer and ω0 is the


fundamental frequency, the two complex exponentials in the resulting integrand,
in the definition of the FS, combine to become e−j(k∓k0 )ω0 t . The net effect is that
the independent variable kω0 is replaced by (k ∓ k0 )ω0 . The spectrum is shifted.
Therefore, we get
x(t)e±jk0 ω0 t ↔ Xfs (k ∓ k0 )

For example, the FS coefficients for cos(t) are Xfs (1) = 21 and Xfs (−1) = 21 . Let
us find the FS coefficients for cos(3t) cos(t). Since cos(3t) = 21 (ej3t + e−j3t ), the FS
coefficients for cos(3t) cos(t) is the sum of the FS coefficients for cos(t) shifted to
the right and left by 3, in addition to the scale factor 21 . That is,

1 1 1 1
Xfs (−4) = , Xfs (−2) = , Xfs (2) = , Xfs (4) =
4 4 4 4

The corresponding time-domain function is

1
(cos(2t) + cos(4t)) = cos(3t) cos(t)
2

7.2.5 Convolution in the Time Domain

As pointed in Chap. 3, the convolution of complex exponentials with the same fre-
quency is a complex exponential of the same frequency. However, the convolution
of complex exponentials with different harmonic frequencies is zero. Therefore, the
periodic convolution of x(t) and h(t), with a common period T , is given by


y(t) = TXfs (k)Hfs (k)ejkω0 t ,
k=−∞
7.2 Properties of the Fourier Series 199

x(t) 3.1416

0
-3 -2 -1 0 1 2 3
t

Fig. 7.7 The reconstructed triangular wave, which is the convolution of the square wave with itself

where Xfs (k) and Hfs (k) are, respectively, the FS coefficients for x(t) and h(t). That
is,
 T ∞
x(τ )h(t − τ )d τ = TXfs (k)Hfs (k)ejkω0 t ↔ TXfs (k)Hfs (k)
0 k=−∞

Consider the convolution of the square wave in Example 7.4 with itself. Its FS
representation is
 
1 2 1 1
x(t) = + cos(t) − cos(3t) + cos(5t) − · · ·
2 π 3 5

The complex FS coefficients of the square wave are squared pointwise, multiplied
by the period 2π and the Eulers’ formula is applied. The convolution output is given
by   
1 2 1 1
y(t) = 2π + 2 cos(t) + cos(3t) + cos(5t) + · · ·
4 π 9 25

The reconstructed waveform using up to 15 harmonics is shown in Fig. 7.7. The


convolution of the square wave with itself is a triangular wave. FS for different
functions may be used to find the closed-form values for large number of infinite
series. Putting t = 0 in y(t) with y(0) = π, we get
 
π2 1 1
= 1+ + + ···
8 9 25

7.2.6 Convolution in the Frequency Domain

Given that z(t) = x(t)y(t) with period T , the transform of z(t), Zfs (k), is to be
expressed in terms of those of the component functions, Xfs (k) and Yfs (k). Let the
FS representations of x(t) and y(t) be
200 7 Fourier Series

x(t) = Xfs (1)ejω0 t + Xfs (2)ej2ω0 t and y(t) = Yfs (1)ejω0 t + Yfs (2)ej2ω0 t

with each one having just two frequency components. The product of the two func-
tions is given by

z(t) = x(t)y(t)
= Xfs (1)Yfs (1)ejω0 t + (Xfs (1)Yfs (2) + Xfs (2)Yfs (1))ej3ω0 t + Xfs (2)Yfs (2)ej2ω0 t

This is just multiplication of the exponential polynomial representation of the two


functions. The coefficients of the product polynomial are the convolution of those
of the individual polynomials. Let the orders of the polynomials be p and q and
p + q = k. Then, we get


 ∞

 
z(t) = x(t)y(t) = Xfs (p)Yfs (k − p) ejkω0 t
k=−∞ p=−∞

This is a FS for z(t) = x(t)y(t) with coefficients




Zfs (k) = Xfs (p)Yfs (k − p)
p=−∞

 T ∞

1
x(t)y(t) ↔ x(t)y(t)e−jkω0 t dt = Xfs (p)Yfs (k − p)
T 0 p=−∞

The convolution is aperiodic, as the FS spectra are aperiodic.


Consider the multiplication of the square wave in Example 7.4 by itself, which
is itself. Therefore, if we convolve its spectrum by itself and take the inverse of the
resulting spectrum, we should get back the square wave. Let us approximate the
square wave by convolving 13 of the FS coefficients

{0, 0.0637, 0, −0.1061, 0, 0.3183, 0.5000, 0.3183, 0, −0.1061, 0, 0.0637, 0}

The result of convolving this set with itself yields

{0.4833, 0.3183, 0.0203, −0.1061, −0.0270, 0.0637, 0.0518}

As the spectrum is symmetric, only part of the one side of the coefficients are given.
The odd-indexed coefficients are quite accurate. The even-indexed (except the DC
component) are close to zero, but not zero as expected. Convolving a set of 23
coefficients with itself yields

{0.4916, 0.3183, 0.0092, −0.1061, −0.0102, 0.0637, 0.0116}


7.2 Properties of the Fourier Series 201

The value of the DC component becomes still closer to the exact value and the values
of the other even-indexed coefficients become more closer to zero. Remember that,
the rate of convergence of the coefficients of the square wave is low due to its
discontinuities.

7.2.7 Time Scaling

It is often required to change the time scale of the function x(t) with period T by
replacing t by at (a = 0). The result of time scaling is that the spectrum remains
the same with the fundamental frequency changed to aω0 , where ω0 = 2π/T . For
example, let a = 2. The square wave in Example 7.4, with period 2π, becomes
periodic with period π. Therefore, the fundamental frequency becomes 2π/π = 2.
The waveform gets compressed. The compression of a function in the time domain
results in the expansion of its spectrum. The FS series representation of the square
wave becomes
 
1 2 1 1
x(t) = + cos(2t) − cos(6t) + cos(10t) − · · ·
2 π 3 5

With a > 1, the signal is compressed and the spectrum is expanded. With 0 <
a < 1, the signal is expanded and the spectrum is compressed. With

x(t) ↔ Xfs (k)

and the fundamental frequency ω0 = 2π


T
, we get

x(at) ↔ Xfs (k)

with the fundamental frequency aω0 and a > 0. For negative values of a, the spectrum
is also frequency-reversed with the fundamental frequency |a|ω0 .

7.2.8 Time Differentiation and Integration

The FS representation can be differentiated or integrated, as long the result can be


defined by a FS. Differentiating the FS representation of x(t)


x(t) = Xfs (k)ejω0 tk ,
k=−∞
202 7 Fourier Series

with respect to t, we get




x(1) (t) = jω0 k Xfs (k)ejω0 tk
k=−∞

The nth derivative is given by




(n)
x (t) = (jω0 k) n
Xfs (k)ejω0 tk
k=−∞

Therefore,
d n x(t)
↔ ( jkω0 )n Xfs (k)
dt n
Note that the DC component becomes zero in the differentiation process. Similarly,
 t
1
x(τ )d τ ↔ Xfs (k)
−∞ jkω0

provided the dc component of x(t) is zero (Xfs (0) = 0). Successive integration of
x(t) can be carried out.
One period of the square wave, with ω0 = 1, in Example 7.4 can be expressed, in
terms of time-shifted unit-step signals, as
π π
u t+ −u t− , −π < t < π
2 2
The derivative, with respect to t, of this signal in a period is composed of impulses
π π
δ t+ −δ t−
2 2
The FS coefficients are given by

1 π 1 π
jk π2
e − e−jk 2 = j2 sin k
T T 2
Dividing by jk and with T = 2π, we get the FS coefficients of the square wave as

1 π
Xfs (k) = sin k
kπ 2
A detailed derivation is as follows. Using the time-shifting property and the FS
coefficients of the impulse δ(t), we get
7.2 Properties of the Fourier Series 203
π π
δ t+ −δ t−
2 2
1 1 1̌ 1 1
←→ . . . , , − , , , − , . . .
T T T T T

1 1 1̌ 1 1
− ...,− , , ,− , ,...
T T T T T

where T = 2π and ω0 = 1. The resulting FS representation is

1
(· · · − e−j5t + e−j3t − e−jt + ejt − ej3t + ej5t + · · · )
π
Integrating this function, we get
 
1 1 1 1 1
· · · + e−j5t − e−j3t + e−jt + ejt − ej3t + ej5t + · · ·
π 5 3 3 5

Adding the DC component 21 , we get the FS representation of the square

1 1 1 1 1 1
(· · · + e−j5t − e−j3t + e−jt + + ejt − ej3t + ej5t + · · · )
π 5 3 2 3 5

7.2.9 Parseval’s Theorem

As Fourier analysis belongs to the class of orthogonal transforms, it has the power
preserving property. That is, the average signal power remains the same in its trans-
formed representation. The signal is expressed as a sum of complex exponentials of
harmonic frequencies in its FS representation. The magnitude of each complex expo-
nential is 1. Therefore, the total power in a period of period T is T and the average
power is T /T = 1. For a specific harmonic component with coefficient Xfs (k), the
average power is |Xfs (k)|2 . The total power is the sum of those of all the harmonics.
That is, the total average power of a signal is
 T ∞

1
P= |x(t)|2 dt = |Xfs (k)|2
T 0 k=−∞

Example 7.5 Find the power of the square wave of Example 7.4 in both the time and
frequency domains. Find the power upto the fifth harmonic.
204 7 Fourier Series

Solution
From the time-domain representation, we get
 T  π
1 1 2 1
P= |x(t)| dt =
2
dt =
T 0 π 0 2

From the frequency-domain representation, we get



  2 ∞ 
 
1 1 2 1 2 π2 1
P= |Xfs (k)|2 = +2 = + 2 =
2 kπ 4 π 8 2
k=−∞ k=1,3,

The sum of the power of the components of the signal up to the fifth harmonic is

1 2 2 2
+ + 2+ = 0.4833
4 π2 9π 25π 2
As stated earlier, Fourier analysis approximates a signal adequately with a finite
number of frequency components with respect to the power or amplitude of the
signal.

7.3 Applications of the Fourier Series

Apart from signal compression applications, the two major applications of Fourier
analysis are: (i) the amplitude and/or power spectrum of a signal reveals impor-
tant characteristics of the signal pertinent to its use in applications and (ii) efficient
implementation of system input–output models such as convolution and differential
equation. In Fourier analysis, a signal can be adequately approximated, for practical
purposes, by a sum of a finite number of sinusoids. Large number of practical systems
can be modeled adequately as linear systems. Then, the response of a system to an
arbitrary input signal can be obtained by a linear combination of the responses to
the constituent sinusoids. The result is that the response of systems can be obtained
faster than other methods in most cases.
The FS representation is important in linear systems analysis due to its approxi-
mation of arbitrary signals over a given interval by a sum of sinusoids. The linearity
property of such systems permits the superposition of the responses to individual
sinusoids. This procedure makes the simplicity of sinusoidal steady-state analysis
applicable to arbitrary input signals.
Some of the important Fourier series applications include network analysis and
synthesis, vibration analysis, electrical power system waveform analysis, power con-
version circuit analysis, acoustics, medical signal analysis, communication circuit
analysis, and control system analysis. For example, the electrocardiogram shows the
cardiac cycle of a patient. It is a periodic signal with frequency about 4/3 Hz. The
7.3 Applications of the Fourier Series 205

FS representation of the electrocardiogram of a patient is an aid in the diagnosis


of the nature and cause of an illness. In power system applications, the frequency
of the waveform is 50 or 60 Hz. While its ideal form is of a sinusoid, due to vari-
ous disturbances, it gets distorted. The harmonic content of the distorted waveform
is important. As the maximum allowed harmonic content is specified, corrective
measures have to be taken to restore it to acceptable form.

7.3.1 Analysis of Rectified Power Supply

Invariably, all electronic devices contain power conversion circuits to convert the
alternating current input supply voltage to DC voltage. This requires rectifiers fol-
lowed by lowpass filters. As the input voltage is periodic, FS is the appropriate tool
in the analysis of the rectified power supply. Let us find the FS representation of the
full-wave rectified waveform given by

x(t) = | sin(t)|

with period 2π and the fundamental frequency ω0 = 1. The waveform is shown in


Fig. 7.8a.
As the waveform is even-symmetric x(−t) = x(t), it is composed of cosine com-
ponents only. Further, the first-half and second-half of the waveform are identi-
cal. That is x(t + T2 ) = x(t). Therefore, the waveform is composed of even-indexed
cosine components only.

1 π 2
Xc (0) = sin(t)dt =
π 0 π

For even-indexed k, except k = 0, we get


 π
4
Xc (2k) = sin(t) cos(2kt)dt
2π 0
 π
1
= (sin((1 − 2k)t) + sin((1 + 2k)t))dt
π 0
 
1 cos((1 − 2k)t) cos((1 + 2k)t) π
=− +
π (1 − 2k) (1 + 2k) 0
 
4 1
=
π 1 − 4k 2

∞  
2 4 1
x(t) = + cos(2kt)
π π 1 − 4k 2
k=1
2 4 4 4
= − cos(2t) − cos(4t) − cos(6t) − · · ·
π 3π 15π 35π
206 7 Fourier Series

(a) (b)
1 1.0610

DC
0.6366
x(t)

x(t)
0 0
0 0
t t
(c) (d)
1 1
x(t)

x(t)
0 0
0 0
(e) t (f) t
0.0849 0.0364
x(t)

x(t)

0 0

-0.0849 -0.0364
0 0
t t

Fig. 7.8 a Full-wave rectified sine wave; b its reconstruction with DC and 2nd harmonic; c and
d its reconstruction with up to 4th and 6th harmonics, respectively; e the 4th harmonic; f the 6th
harmonic

Figure 7.8b shows its DC component and its reconstruction with the DC and the
2nd harmonic. Figure 7.8c shows its reconstruction with the DC and the 2nd and 4th
harmonics. Figure 7.8d shows its reconstruction with the DC and the 2nd, 4th, and
6th harmonics. As expected, the reconstructed waveform becomes more closer to the
original with the addition of more harmonic components.
While signal reconstruction is an important aspect of Fourier analysis, the magni-
tude of the harmonics is another important aspect. Figure 7.8e, f show, respectively,
the fourth and sixth harmonics of the waveform in (a). The harmonics make 4 and 6
cycles in a period. In most applications, the harmonics are considered as unwanted
components of the waveform. The harmonic magnitudes have to be smaller than a
given specification. That requires some sort of filtering. In order to design a suitable
filter, Fourier analysis is required, in the first place, to estimate the magnitudes of the
harmonics.
7.3 Applications of the Fourier Series 207

7.3.2 Steady-State Response of Linear Systems

When the excitation to a linear system is a complex exponential, the form of the
response at any part of the system is also the same exponential with changes only
in magnitude and phase. The frequency remains unchanged. This property, along
with the linearity property, makes the steady-state output of a stable system to be
determined by the superposition sum of the responses due to all the constituent
exponentials of an arbitrary input signal. A continuous periodic input signal can be
decomposed into a sum of exponentials with harmonic frequencies by the FS.
The steady-state output of a LTI system to an input e jk0 ω0 t is the same function
multiplied by the complex scale factor, H ( jk0 ω0 ), called the frequency response.
Therefore, the output of the system is H ( jk0 ω0 )e jk0 ω0 t . The function H ( jkω0 ) is
obtained by sampling the continuous frequency response H ( jω) of the system at the
discrete frequencies ω = kω0 .
For an arbitrary continuous periodic input signal, as


x(t) = Xfs (k)e jkω0 t
,
k=−∞

the system output is




y(t) = H (jkω0 )Xfs (k)e jkω0 t

k=−∞

Therefore, solving a differential equation or evaluating a convolution integral in the


time domain is reduced to the evaluation of an algebraic operation in the frequency
domain.
While an electrical circuit is characterized by a differential equation in the time
domain, it is characterized by an algebraic equation in the frequency domain. There-
fore, we first represent the circuit in the frequency domain. For example, the voltage
across an inductor with L henries due a current i(t) flowing through it is modeled, in
the time domain, as
di(t)
L
dt

With i(t) = Ie jωt , the voltage across the inductor is

jωLIe jωt

Therefore, the model for an inductor, in the frequency domain, is jωL.


Similarly, the voltage across a capacitor with C farads due a current i(t) flowing
through it is modeled, in the time domain, as

1
i(t)dt
C
208 7 Fourier Series

With i(t) = Iejωt , the voltage across the capacitor is

Iejωt
jωC

Therefore, the model for a capacitor, in the frequency domain, is 1/(jωC). The
model for a resistor, in the frequency domain, is R itself. The value is unaffected by
the frequency.
The opposition to the flow of current through an inductor or capacitor is called the
reactance. The sum of resistance and reactance is called the impedance. For example,
the impedance of a series connected resistor R and inductor L is R + jωL. Similarly,
the impedance of a series connected resistor R and capacitor C is R + (1/(jωC)). The
reactance due to an inductor is zero at ω = 0 and increases with increasing frequency.
The reactance due to a capacitor is infinite at ω = 0 and decreases with increasing
frequency. Therefore, for a given current, the voltage across an inductor increases
with increasing frequency. The voltage across a capacitor decreases with increasing
frequency. A resistor is required to limit the current at low and high frequencies.
These characteristics enable to build filter circuits with resistors, capacitors, and
inductors.
Let the input x(t) = | sin(t)| be applied to the lowpass filter circuit, shown in
Fig. 7.9. It is a series resistor–capacitor network, with the resistor 10  and capacitor
1/2 F. The task is to find an expression for the output voltage across the capacitor,
y(t).
The FS for the full-wave rectified sine wave is
∞  
2 4 1
x(t) = + cos(2kt)
π π 1 − 4k 2
k=1
2 4 4 4
= − cos(2t) − cos(4t) − cos(6t) + · · ·
π 3π 15π 35π
The voltage across the capacitor, by voltage division, is

1/(jωC) 1
y(t) = x(t) = x(t)
R + 1/(jωC) 1 + jωRC

Fig. 7.9 A resistor–capacitor 10 Ω


lowpass filter circuit

x(t) ↑ ∼ 1 ↑ y(t)
2 F
i(t) = C dy(t)
dt
7.3 Applications of the Fourier Series 209

When the input is a sinusoid or a complex exponential, the Ohm’s law, for circuits
with resistances, is extended to circuits with energy storage elements inductor and
capacitor with the impedance replacing the resistance. For DC, with the fundamental
frequency ω0 = 1 and k = 0,
2
y(t) =
π
since the capacitor is an open circuit to DC. For the 2nd harmonic, with the funda-
mental frequency ω0 = 1 and k = 2,

4 1
y(t) = − cos(2t)
3π 1 + j2RC

With R = 10 and C = 0.5, the magnitude of the output is


 
 4 1  4

 3π 1 + j10  = 3π 0.0995

The magnitude of the 2nd harmonic has been reduced by a factor of 0.0995. Therefore,
the output waveform will have ripples of a smaller magnitude and is more closer
to the required output, which is DC. The factor in the denominator attenuates the
frequency components other than DC in proportion to the frequency. As the frequency
approaches infinity, the input components are almost blocked.
The total response of the circuit is the sum of the responses to all the harmonic
components of the input. The RC circuit is called a lowpass filter as it passes more
readily the low-frequency components of the input compared with those of the high-
frequency components. In practice, the FS, approximated by the DFT, can only have
a finite number of terms. Therefore, the number of terms has to be fixed depending
on the accuracy required.
For the resistor–inductor series circuit shown in Fig. 7.10, the input–output rela-
tionship is given by
jωL
y(t) = x(t)
1 + jωRL

For DC, with the fundamental frequency ω0 = 1 and k = 0,

y(t) = 0

Fig. 7.10 A resistor– 3Ω 2H


inductor highpass filter
circuit →
y(t)
x(t) ↑ ∼
i(t)
210 7 Fourier Series

since the inductor is a short circuit to DC. For the 2nd harmonic, with the fundamental
frequency ω0 = 1 and k = 2,

4 j2L
y(t) = − cos(2t)
3π 1 + j2RL

With R = 3 and L = 2, the magnitude of the output is


 
 4 j4  4

 3π 1 + j12  = 3π 0.3322

The magnitude of the 2nd harmonic has been reduced by a factor of 0.3322. As the
frequency approaches infinity, the input components are more readily passed. The
total response of the circuit is the sum of the responses to all the harmonic components
of the input. The RL circuit is called a highpass filter as it passes more readily the
high-frequency components of the input compared with those of the low-frequency
components.
The frequency-domain analysis is similar in other applications. For example, in
mechanical engineering, resistor, inductor, and capacitor correspond, respectively,
to friction, spring, and mass.

7.4 Numerical Evaluation of the Fourier Series

In practice, the amplitude profiles of practical waveforms are arbitrary and, invariably,
the other versions of the Fourier analysis have to be approximated by the DFT and
the IDFT. The integral in Eq. (7.10) is numerically evaluated by using the DFT. The
DFT uses the samples over one period of the periodic signal x(t) with period T . The
sampling interval is Ts = NT and the number of samples is N . The N samples of x(t)
over one period are

{x(0), x(Ts ), x(2Ts ), . . . , x((N − 1)Ts }

Now, Eq. (7.10) is approximated as


 T
1
Xfs (k) = x(t)e−jkω0 t dt
T 0
N −1
1
= lim x(nTs )e−jkω0 nTs Ts
Ts →0 T
n=0
N −1
1 
x(nTs )e−jk N n

= lim
Ts →0 N
n=0
7.4 Numerical Evaluation of the Fourier Series 211

In numerical approximation, sampling interval has to be a finite value, but not zero, to
keep the number of samples finite. Let us ignore the limiting process for sufficiently
small values of Ts , which will result in aliasing error. Then, the FS analysis equation
is approximated by

N −1
1 
x(nTs )e−j N nk , k = 0, 1, . . . , N − 1

Xfs (k) = (7.16)
N n=0

The synthesis Eq. (7.9) is approximated as


N −1
j 2π
x(n) = Xfs (k)e N nk , n = 0, 1, . . . , N − 1.
k=0

The numerical approximations of the FS analysis and synthesis equations are the
same as the DFT and IDFT equations, with a scale factor. Remember that Xfs (k) is
aperiodic and the DFT spectrum is periodic. If x(t) is band-limited and adequate
number of samples is taken over a period, the assumed periodicity of the DFT is not
a problem. If it is not the case, aliasing of the spectrum will arise. Then, it has to be
ensured that the quality of the spectrum is adequate by taking sufficient number of
samples.
For N even, comparing the coefficients of the DFT with that in Eq. (7.10), we get,
for real signals,
    
X (k) N N X N2
Xfs (k) = , k = 0, 1, . . . , − 1 and Re Xfs = (7.17)
N 2 2 2N

For example, let us compute the FS coefficients, using the DFT, of


   
2π 2π π
x(t) = 2 + cos t + cos 2 t +
4 4 4
= 2 + 0.5e 4 ) + 0.5e ( 4 ) + 0.5e j( 4 ) e j( 4 2t ) + 0.5e−j( 4 ) e−j( 4 2t )
j( 2π π π
t −j 2π
t 2π 2π

The FS coefficients Xfs (k) are


√ √ √ √
2 2 2 2
2, 0.5, +j , −j , 0.5
4 4 4 4

With Ts = 1, the samples are


1 1 1 1
3 + √ ,2 − √ ,1 + √ ,2 − √ = {3.7071, 1.2929, 1.7071, 1.2929}
2 2 2 2
212 7 Fourier Series

With 4 samples, the DFT coefficients are



{8, 2, 2 2, 2}

Dividing X (2) by 8 and the rest by 4, we get



{2, 0.5, 0.25 2, 0.5}

The component with frequency index 2 is


     
2π π 1 2π 1 2π
cos 2 t + = √ cos 2 t − √ sin 2 t
4 4 2 4 2 4

With N = 4 samples, the samples of both the cos(2 2π 4


t) and the DFT basis function
with index 2 are {1, −1, 1, −1} and the sum of pointwise multiplication
√ yields 4.
By multiplying with the constant √12 , we get the DFT coefficient as 2 2. Dividing
√ √
2 2 by 2N = 8, we get the real part of the FS coefficient 42 according to Eq. (7.17).
The samples of the sine component with frequency index 2 are all zero and get no
representation.
With Ts = 0.8, the 5 samples are

{3.7071, 1.3213, 2.0820, 0.7370, 2.1526}

The DFT coefficients are

{10, 2.5, 1.7678 + j1.7678, 1.7678 − j1.7678, 2.5}

which are the correct FS coefficients scaled by 5.


In practice, the number of samples has to be a power of 2 to suit fast practical
DFT algorithms. With Ts = 0.5, the 8 samples are

{3.7071, 2.0000, 1.2929, 2.0000, 1.7071, 0.5858, 1.2929, 3.4142}

The DFT coefficients are

{16, 4, 2.8284 + j2.8284, 0, 0, 0, 2.8284 − j2.8284, 4}

which are the correct FS coefficients scaled by 8.

7.4.1 Aliasing Effect

When a continuous time-domain function is sampled, its spectrum becomes periodic


due to aliasing, as the frequency range gets reduced from infinite to some finite value.
7.4 Numerical Evaluation of the Fourier Series 213

The period of the spectrum is determined by the sampling interval in the time domain.
The sampling process can be modeled as multiplying the continuous function by an
impulse train. Multiplication in the time domain corresponds to convolution of the
spectra of the impulse train, which is also an impulse train, and the continuous
function. The convolution of the FS spectrum with an impulse is relocating the
aperiodic spectrum at the location of the impulse. The combined spectrum of these
shifted spectra is the spectrum of the sampled function. To recover the continuous
signal back from the spectrum of the sampled signal to a good approximation requires
that the periodic repetition of the spectrum does not overlap within each period. In
practice, negligible overlapping is acceptable.
Consider the waveform x(t)
   
2π 2π
x(t) = 0.2 + cos t + 0.3 cos 3t
16 16
   
1 j 2π t 1 −j 2π t 0.3 j 2π 0.3 −j 2π 3t
= 0.2 + e 16 + e 16 + e 16 3t + e 16
2 2 2 2

The FS coefficients in the center-zero format are

ˇ
Xfs (k), k = −3, −2, −1, 0, 1, 2, 3 = {0.15, 0.00, 0.50, 0.20,0.50, 0.00, 0.15}

If we sum the shifted copies of the spectral values placed at a distance of 4 samples,
ˇ 0.65, 0.00, 0.65}.
we get a corrupted periodic spectrum {0.20,

ˇ 0.50 0.00 0.15


0.15 0.00 0.50 0.20,
ˇ 0.50 0.00 0.15
0.15 0.00 0.50 0.20,
ˇ 0.50 0.00 0.15
0.15 0.00 0.50 0.20,
ˇ 0.65 0.00 0.65 , . . . ,
, . . . , 0.20,

The 4 samples of x(t) are


ˇ 0.2, −1.1, 0.2}
{1.5,

The DFT coefficients, divided by N = 4, are

ˇ
{0.20,0.65, 0.00, 0.65}

Equation (7.18)


X (k) = N Xfs (k − mN ), k = 0, 1, . . . , N − 1 (7.18)
m=−∞

shows how the DFT spectrum is corrupted due to aliasing.


214 7 Fourier Series

7.5 Summary

• FS is one of the four versions of Fourier analysis that provides the representation
of a continuous periodic time-domain waveform by a discrete aperiodic spectrum
in the frequency domain.
• FS represents a continuous periodic waveform as a linear combination of sinusoidal
or, equivalently, complex exponential basis functions of harmonically related fre-
quencies.
• Harmonics are any of the frequency components whose frequencies are integral
multiples of a fundamental. The frequency of the fundamental is the same as that
of the periodic waveform being analyzed.
• The FS is the limiting case of the DFT as the sampling interval of the time-domain
sequence tends to zero with the period fixed.
• While physical devices generate real sinusoidal waveforms, it is found that the
analysis is mostly carried out using complex exponentials due to its compact form
and ease of manipulation.
• While an infinite number of frequency components are required to represent an
arbitrary waveform exactly, it is found that, in practice, a finite number of frequency
components provides an adequate representation.
• The orthogonality property of the basis signals makes it easy to determine the FS
coefficients.
• The representation of a signal in terms of its spectrum is just as complete and
specific as its time-domain representation in every respect.
• The independent variable of the waveform may be other than time, such as distance.
• The conditions for the existence of a Fourier representation of a waveform are met
by signals generated by physical devices.
• The amplitude versus frequency plot of the harmonics is called the spectrum. As
the spectrum is usually complex, it is represented by two plots, either the real and
imaginary parts or the magnitude and phase. While the time-domain waveform is
continuous and periodic, its FS spectrum is aperiodic and discrete.
• The more smoother the waveform, the faster is the convergence of its spectrum.
• A signal can be reconstructed using its spectral components.
• The exponential and trigonometric forms of Fourier analysis are related by the
Euler’s formula.
• The least squares error is the criterion for the representation of a signal by the
Fourier analysis. With respect to this criterion, there is no better approximation
than that provided by the Fourier analysis.
• The properties of Fourier analysis help to relate the effects of characteristics of
signals in one domain into the other.
• LTI system analysis is simpler with the Fourier representation of signals and sys-
tems.
• The Fourier spectrum can be adequately approximated by the DFT in practical
applications.
7.5 Summary 215

• FS is important in the analysis of signals such as acoustical, vibration, power


system, communication, electrocardiogram, and frequency response.
Exercises
7.1 Express the frequency components of the waveform x(t) in terms of complex
exponentials and, hence, find its complex FS coefficients Xfs (k). Verify that the
samples of the two forms are the same by finding the 7 uniformly spaced samples of
the waveform over a cycle starting from t = 0. What is the fundamental frequency
ω0 ?
7.1.1 π π
x(t) = −2 + 2 sin πt + − 4 cos 3πt −
3 6
7.1.2 π π π
x(t) = 8 cos 2πt − − 6 sin 4πt − + 4 cos 6πt +
3 4 6
* 7.1.3 π π
x(t) = 1 − 4 sin 2t + + 8 cos 3t −
6 3
7.2 Express the frequency components of the waveform x(t) in terms of complex
exponentials and, hence, find its complex FS coefficients Xfs (k). What is the funda-
mental frequency ω0 ?
7.2.1    
2 5
x(t) = 3 + cos t + 2 sin t
3 7

* 7.2.2 
  
3 2
x(t) = 1 − 2 sin t + sin t
6 9

7.2.3 
  
5 4
x(t) = 4 + 3 cos t + 3 cos t
7 6

7.3
* 7.3.1 Find the FS for a periodic pulse train defined over one period as

1 for |t| < a
x(t) =
0 for a < |t| < T
2

Deduce the FS with T = 10 and a = 2.


7.3.2 Find the FS for a periodic exponential signal defined over one period as

x(t) = eat for 0 ≤ t < 2π


216 7 Fourier Series

7.3.3
Find the FS for a saw-tooth signal defined over one period as

x(t) = t for 0 ≤ t < 1

7.4
* 7.4.1 The FS representation of the full-wave rectified sine wave x(t) = | sin(t)| is
∞  
2 4 1
x(t) = + cos(2kt)
π π 1 − 4k 2
k=1
2 4 4 4
= − cos(2t) − cos(4t) − cos(6t) + · · ·
π 3π 15π 35π
Using the time-shift property, find the FS representation of the full-wave rectified
cosine wave x(t) = | cos(t)|.
7.4.2 Find the convolution y(t) of x(t) = sin(t + π3 ) and h(t) = sin(t − π6 ) using the
FS time-domain convolution theorem. Verify the answer by directly convolving x(t)
and h(t) in the time domain.
7.4.3 Using the time-differentiation property, find the derivative of x(t) = 2 sin(3t).
7.5
Compute the FS coefficients of x(t), using the DFT, with the sampling interval equal
to 1 and 0.8 s. Compare the result with Eq. (7.18).
7.5.1    
2π π 2π π
x(t) = 1 + sin t− + cos 2 t −
4 3 4 3

* 7.5.2    
2π π 2π π
x(t) = 3 + sin t− + sin 2 t +
4 6 4 3

7.5.3    
2π π 2π π
x(t) = 2 + cos t− + cos 2 t +
4 4 4 4
Chapter 8
The Discrete-Time Fourier Transform

The DTFT is the dual of the FS. In the FS representation of signals, the time-domain
waveform is continuous and periodic and the spectrum is discrete and aperiodic. In
the DTFT representation of signals, the spectrum is continuous and periodic and
the time-domain waveform is discrete and aperiodic. Another difference is that the
continuous signal is usually real and the discrete spectrum is complex in the FS. On
the other hand, the continuous spectrum is complex and the discrete signal is usually
real in the DTFT. By interchanging the roles of time-domain and frequency-domain
variables, we can obtain one representation from the other. However, it is better to
derive the DTFT as the limiting case of the DFT, as the period of the time-domain
sequence tends to infinity with the sampling interval fixed. The effective frequency
range of the spectrum is fixed by the sampling interval. In other than the DFT version
of the Fourier analysis, the signal or the spectrum or both are of continuous type. In
the Fourier analysis and synthesis definitions, the summation in the DFT becomes
an integral for continuous type of signals and spectra. Basically, Fourier analysis,
despite the differences between the versions, is always the decomposition of an
arbitrary signal in terms of sinusoidal waveforms.

8.1 The DTFT

The DTFT, X (ejω ), of the sequence x(n), with the sampling interval Ts = 1, is defined
by the infinite summation


X (ejω ) = x(n)e−jωn (8.1)
n=−∞

© Springer Nature Singapore Pte Ltd. 2018 217


D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7_8
218 8 The Discrete-Time Fourier Transform

The exponential ejω in X (ejω ) emphasizes the fact that it is a periodic function of ω.
The frequency-domain representation is a complex function of ω and is periodic in
ω with period 2π/Ts = 2π, since e−j(ω+2π)n = e−jωn . The inverse DTFT, x(n), of the
spectrum X (ejω ) is defined by the integral over one period of X (ejω ) as
 π
1
x(n) = X (ejω )ejωn d ω, n = 0, ±1, ±2, . . . (8.2)
2π −π

The infinite time-domain sequence x(n) is the FS for the continuous periodic spectrum
X (ejω ).

Example 8.1 Find the DTFT of x(n). The nonzero samples are {x(−1) = 1,
x(1) = 1}.
Solution
From the definition,
X (ejω ) = ejω + e−jω = 2 cos(ω)

The inverse DTFT is


 π
1
x(n) = (ejω + e−jω )ejωn d ω = 1, n = −1, 1 and 0 otherwise
2π −π

since  π 
1 for k = 0
e jωk
dω =
−π 0 for k = ±1, ±2, . . .

One period of the magnitude spectrum |X (ejω )| of x(n) and the phase spectrum
∠X (ejω ) is shown in Fig. 8.1a, b, respectively.

The spectrum is a complex function of ω and it is periodic in ω with period 2π.


For real-valued signals, the magnitude spectrum is even-symmetric and the phase
spectrum is odd-symmetric. Therefore, only one half of the spectrum from ω = 0
to ω = π is usually displayed. Frequencies near π are high frequencies and those
near zero are low frequencies. High frequency signals are characterized by the high

(a) (b)
2 180
Period = 2
X(e j ), degrees
|X(e j )|

0 -180
0 0

Fig. 8.1 a The magnitude spectrum |X (ejω )| for x(n) and b the phase spectrum
8.1 The DTFT 219

difference between successive sample values. Unlike those of the continuous-time


signals, the spectra of discrete signals are always periodic. This implies that useful
frequency range of the spectra is finite.

8.1.1 DTFT as a Limiting Case of the DFT

In this section, we derive the DTFT as a limiting case of the DFT by letting the period
of the time-domain sequence tends to infinity with the sampling interval fixed. As in
the case of the FS, we start with the IDFT expression and substitute the expression
for X (k) in that. We use the center-zero format for convenience. Let the DFT of
sequence x(n), N ≤ n ≤ N be X (k), N ≤ k ≤ N . Then, the Fourier representation
of x(n) is given as

1 
N

x(n) = X (k)ej (2N +1) nk , n = 0, ±1, ±2, . . . , ±N (8.3)
2N + 1
k=−N

where

N
x(m)e−j (2N +1) mk

X (k) = (8.4)
m=−N

Substituting for X (k) in Eq. (8.3), we get


 
1 
N 
N
−j (2N2π+1) mk 2π
x(n) = x(m)e ej (2N +1) nk (8.5)
2N + 1 m=−N
k=−N

Let the 2N + 1 samples be obtained by sampling a periodic signal of period 2N + 1 s


over a period with a sampling interval of Ts = 1 s. The frequency increment of the
spectrum becomes

ω =
(2N + 1)

radians per second.


With the same Ts , let the period 2N + 1 of x(n) be longer. Then, with N → ∞,
the frequency increment of the spectrum becomes


→0
(2N + 1)

and the spectrum becomes continuous with the same period, as Ts is fixed.
The discrete and periodic time-domain sequence becomes discrete and aperiodic
and the discrete and periodic spectrum becomes continuous and periodic. Then, the
220 8 The Discrete-Time Fourier Transform

frequency increment, (2N2π+1) , is formally replaced by the differential d ω in the limit.


The discrete frequency variable (2N2π+1) k is replaced by the continuous frequency
variable ω. Eventually, the limits of the inner summation become −∞ and ∞ and
the DTFT X (ejω ) of the signal x(n) is defined as


X (ejω ) = x(n)e−jωn (8.6)
n=−∞

The outer summation becomes an integral with limits −π and π. As the spectrum is
periodic, the limits could be any continuous interval of 2π. Therefore, the synthesis
expression of the DTFT becomes
 π
1
x(n) = X (ejω )ejωn d ω, n = 0, ±1, ±2, . . . (8.7)
2π −π

The analysis equation of the DTFT is a summation, since the time-domain signal is
discrete. The synthesis equation is an integral, since the spectrum is continuous.
Consider the signal x(n) with N = 5 nonzero samples and its DFT spectrum,
shown in Fig. 8.2a, b, respectively. The sampling interval is Ts = 1 and the fre-
quency increment is 2π/5 radians per sample. With the same Ts = 1, consider the
signal x(n) with N = 9 and its DFT spectrum, shown in Fig. 8.2c, d, respectively.
The sampling interval is Ts = 1 and the frequency increment is 2π/9 radians per
sample. The time-domain range is increased making the record length longer and the
frequency increment is decreased making the spectrum denser. With 9 independent
samples in the time domain, there can only a maximum of 9 independent samples
in the frequency domain. Remember that complex spectrum of real-valued signals
is redundant by a factor of 2. With N = 17 samples, the record length is longer and
the spectrum is denser, as shown in Fig. 8.2e, f. As N → ∞, the time-domain signal
becomes aperiodic. The frequency increment tends to zero and, therefore, the cor-
responding spectrum becomes continuous. The DTFT spectrum is shown by a solid
line.
In all the versions of the Fourier analysis, for certain values of the frequency
index or the time index, the expressions for the forward and inverse transforms take
a simplified form. Consequently, the values with index such as zero or π can be
computed easily. These values are useful to check the correctness of the closed-form
expressions for x(n) or X (ejω ).

 ∞
  π
1
X (ej0 ) = x(n), X (ejπ ) = (−1)n x(n), x(0) = X (ejω )d ω,
n=−∞ n=−∞
2π −π

The DTFT definitions for the forward and inverse transforms, in Eqs. (8.6) and
(8.7), have been derived assuming that the sampling interval of the time-domain
signal, Ts , is one second. With the scaling of the frequency axis, the transform values
8.1 The DTFT 221

(a) 1 (b) 5

X(k)
x(n)

N=5

0
0
-2 -1 0 1 2 - 0
n k
(c) 1 (d) 5

X(k)
x(n)

N=9

0
0
-4 -2 0 2 4 - 0
n k
(e) (f) 5
1
X(k)

N=17
x(n)

0
0
-8 -4 -2 0 2 4 8 - 0
n k

Fig. 8.2 a The time-domain signal x(n) with N = 5 and b its DFT spectrum, |X (k)|; c the time-
domain signal x(n) with N = 9 and d its DFT spectrum, |X (k)|; e the time-domain signal x(n) with
N = 17 and f its DFT spectrum, |X (k)|. The DTFT spectrum is shown by a solid line

for any other values of Ts can be easily found. However, with Ts = 1, the DTFT and
its inverse can also be redefined including Ts as


X (ejωTs ) = x(nTs )e−jnωTs (8.8)
n=−∞
 ωs
1 2
x(nTs ) = X (ejωTs )ejnωTs d ω, n = 0, ±1, ±2, . . . , (8.9)
ωs − ω2s

where ωs = 2π Ts
. The plot of the spectrum over the half period from ω = 0 to ω = π/Ts
is adequate for real-valued signals.
In the case of the DFT and the FS, the frequency of the harmonic components
is discrete and, hence, the reconstruction of the waveforms is easy to visualize.
However, in the case of the DTFT and FT, the synthesis process is not apparent,
222 8 The Discrete-Time Fourier Transform

since all the frequency components in the range of frequencies contribute. The DTFT
synthesizes a discrete aperiodic signal, x(n), as integrals of a continuum of complex
sinusoids ejωn (amplitude 2π 1
X (ejω )d ω) over the finite frequency range −π to π,
which is one period of X (e ). As the amplitude of the constituent sinusoids of

a signal is infinitesimal, the spectral density X (ejω ), which is proportional to the


spectral amplitude, represents the frequency content of a signal. Hence, the DTFT
of a signal is its relative amplitude spectrum.
As infinite summation is involved in finding the DTFT of a signal, its convergence
has to be ensured. The convergence properties are similar to those of the FS. The
summation converges uniformly, as in the case of FS, to X (ejω ), if x(n) is absolutely
summable. That is,
∞
|x(n)| < ∞
n=−∞

The summation converges in the least squares error sense, if x(n) is square summable.
That is,


|x(n)|2 < ∞
n=−∞

Since the spectrum is of finite duration, the power spectrum is integrable and the
energy is finite. Gibbs phenomenon occurs in constructing the continuous spectrum,
if x(n) is not absolutely summable.
Example 8.2 Determine the DTFT of the unit impulse signal x(n) = δ(n).
Solution
From the DTFT definition, we get


X (ejω ) = δ(n)e−jωn = 1 and δ(n) ↔ 1
n=−∞

Since δ(n) is zero except at n = 0 and the value of the exponential equals 1 at that
point, the summation yields a value of unity for all values of ω. The transform
of the impulse is a constant. Therefore, the unit impulse signal is composed of
complex sinusoids of all the infinite frequencies from ω = −π to ω = π with equal
strength.
Example 8.3 Find the DTFT spectrum of the signal

x(n) = u(n + 5) − u(n − 5),

where u(n) is the unit-step function.


Solution
Signal x(n) is shown in Fig. 8.3a. From the DTFT definition,

X (ejω ) = ej5ω + · · · + ej2ω + ejω + 1 + e−jω + e−j2ω + · · · + e−j5ω


8.1 The DTFT 223

(a) (b)
1 11

X(e j )
x(n)

period=2

0
0 -1
-10 -5 0 4 10 - -- 0 -
n 4 4

Fig. 8.3 a x(n) = u(n + 5) − u(n − 5); b its DTFT spectrum

Using the formula for the geometric sum for complex sequences


N
1 − z (N +1)
zn = , z = 1
1−z
k=0

we get
1 − e−j6ω 1 − ej6ω
X (ejω ) = −jω
+ −1
1−e 1 − ejω

As the first two terms are complex conjugates, their sum is equal to twice the real
part of either of the terms. Therefore,
6 

     
2 ω cos 2 ω
5
2 sin
2 ω + 
sin 11 sin ω2 sin 112 ω
X (e ) =
jω ω −1= − 1 =   , −π < ω < π
sin 2 sin ω2 sin ω2

The DTFT spectrum for x(n) is shown in Fig. 8.3b. In general,


 sin ω (2N +1)


1 for −N ≤ n ≤ N 2
↔ ω
0 otherwise sin 2

The frequency-domain continuous function


 11 
sin ω
2ω  ,
sin 2

shown in Fig. 8.3b, as the DTFT of a pulse of width 11 samples, is called the sinc
function, a function of great significance in signal and system analysis. The sinc
function is even-symmetric. The peak value 11 occurs at ω = 0, since

lim sin(θ) = θ
θ→0
224 8 The Discrete-Time Fourier Transform

(a) (b)
1 21

X(e j )
x(n)

period=2

0
0
-10 -5 0 4 10 - 0
- - -
n 4 4
(c) (d) 41
1

X(e j )
x(n)

period=2

0
0
-20 -10 0 10 20 - 0
- - -
n 4 4

Fig. 8.4 a x(n) = u(n + 10) − u(n − 10); b its DTFT spectrum; c x(n) = u(n + 20) − u(n − 20);
d its DTFT spectrum

Sinc(ω) = 0 whenever the argument of the sine function in the numerator is


±π, ±2π, ±3π, . . .. For the example, the zeros occur at integral multiple of 2π/11.
Figure 8.4b, d show the frequency-domain sinc functions corresponding to the
time-domain pulses of increasing length shown in Fig. 8.4a, c, respectively. For any
N , the area of the function remains the same at 2π, since
 π
1
x(0) = 1 = X (ejω )d ω,
2π −π

With N increasing, the function becomes taller and slimmer and the area enclosed
is concentrated around ω = 0. As N → ∞, the time-domain function becomes the
DC function. The frequency-domain function

(2N +1)
sin 2
ω
ω
sin 2

degenerates into an impulse function with strength 2π, as the zeros move to ω = 0.
That is, all the oscillations and the large hump coincide at ω = 0 and the net area of
the function occurs at that point, which characterizes an impulse. The sinc function
is an energy signal, as it is square integrable. But it is not absolutely integrable.
Therefore, the DTFT transform pair for the DC signal is

1 ↔ 2πδ(ω)
8.1 The DTFT 225

The DC signal is a complex exponential x(n) = ejωn with ω = 0. Therefore, its


nonzero spectral component occurs only at the single frequency ω = 0.
Functions such as the DC, which are neither absolutely or square summable,
are important in the analysis of signals and systems. Their frequency-domain rep-
resentation is not defined by the Fourier analysis defining equations. Therefore, a
frequency-domain representation is obtained through a limiting process, starting
with a pair of defined transform pair such as the one in the last example. The impulse
function is the limiting form of not only the sinc function but several other pulses
including rectangular and triangular.

Example 8.4 Find the DTFT of the signal x(n) = an u(n), |a| < 1.
Solution

 ∞
 1
X (ejω ) = an u(n)e−jωn = (ae−jω )n = , |a| < 1
n=0 n=0
1 − ae−jω

The middle summation is a geometric progression with ratio ae−jω < 1, since |a| < 1
and |e−jω | = 1. Using the Euler’s formula, we get

1
X (ejω ) =
1 − a cos(ω) + ja sin(ω)

and, in terms of magnitude and phase, we get



1 a sin(ω)
|X (ejω )| = and ∠X (ejω ) = tan−1
1 + a2 − 2a cos(ω) a cos(ω) − 1

The exponential signals 0.5n u(n) and (−0.5)n u(n) and their magnitude and phase
spectra are shown in Fig. 8.5a–f. The magnitude spectra are even-symmetric and
the phase spectra are odd-symmetric. Signal in (a) is smoother and, therefore, the
magnitude of low frequency components is high. On the other hand, signal in (b) is
more fluctuating and, therefore, the magnitude of high frequency components is high.
Let us derive the DTFT spectrum of sgn signal by considering this signal as sum of
two exponentials in the limit as a → 1. It is an everlasting signal. For positive values
of its argument it is the same as u(n), the unit-step function. Otherwise, its values are
equal to −1. Figure 8.6a, b show the signal x(n) = 0.8n u(n) − 0.8−n u(−n) + δ(n)
and its real and imaginary parts of the DTFT spectrum. Figure (c) and (d) show
the signal x(n) = 0.99n u(n) − 0.99−n u(−n) + δ(n) and its real and imaginary parts
of the DTFT spectrum. As the base of the exponentials approach 1, the sum of the
exponentials approaches the sgn function. Consider the transform

1 1 1 − 2aejω + a2
X (ejω ) = − + 1 =
1 − ae−jω 1 − aejω (1 − ae−jω )(1 − aejω )
226 8 The Discrete-Time Fourier Transform

(a) (b)
1 1

(1/2) n u(n) (-1/2) n u(n)


x(n)

x(n)
0

0
0 4 8 0 4 8
n n
(c) (d)
2.0000 2.0000
|X(e j )|

|X(e j )|

0.6667 0.6667
- 0 - 0
- - - - - -
2 2 2 2
(e) (f)
0.5236 0.5236
X(e j )

X(e j )

0 0

-0.5236 -0.5236
- 0 - 0
- - - - - -
2 2 2 2

Fig. 8.5 a x(n) = 0.5n u(n); b x(n) = (−0.5)n u(n); c the magnitude of the DTFT spectrum of the
signal in a and e its phase spectrum; d the magnitude of the DTFT spectrum of the signal in b and
f its phase spectrum

In the limit as a tends to 1, we get

1 − 2aejω + a2 2(1 − ejω ) 2


lim X (ejω ) = lim −jω
= −jω
=
a→1 a→1 (1 − ae )(1 − ae )
jω (1 − e )(1 − e )jω 1 − e−jω

The inverse DTFT of this spectrum is the sgn function, called signum function,
sgn(n).
8.1 The DTFT 227

(a) (b)
1 4.4444

X(e j )
1
x(n)

period=2
-4.4444
-10 -5 0 4 10 - 0
- - -
n 4 4
(c) (d)
1 318.2789

X(e j )
x(n)

0 1

period=2
-1 -318.1776
-10 -5 0 4 10 - 0
- - -
n 4 4

Fig. 8.6 a x(n) = 0.8n u(n) − 0.8−n u(−n) + δ(n) and b its real (dashed line) and imaginary parts
of the DTFT spectrum; c x(n) = 0.99n u(n) − 0.99−n u(−n) + δ(n) and d its real and imaginary
parts of the DTFT spectrum

(a) (b)
0.5 1
sgn(n)

u(n)

DC
0 0.5

-0.5 0
-20 -10 0 10 20 -20 -10 0 10 20
n n

Fig. 8.7 a The sign function 0.5sgn(n); b u(n) and x(n) = 0.5

Figure 8.7a shows the sgn function multiplied by 0.5, 0.5sgn(n). Figure 8.7b shows
the unit-step function u(n) and the DC function x(n) = 0.5. The DC function is the
even component of u(n) and 0.5sgn(n) is the odd component of u(n). Therefore,

u(n) = 0.5 + 0.5sgn(n)

and the DTFT pair for u(n), due to linearity property of the DTFT, is

1
u(n) ↔ πδ(n) +
1 − e−jω
228 8 The Discrete-Time Fourier Transform

8.1.2 The DTFT of a Discrete Periodic Signal

The DFT of x(n) = Aekω0 n with N samples (ω0 = 2π N


) is the discrete impulse with
value X (k) = NA. That is, the reconstructed signal from IDFT is XN(k) ekω0 n . The
DTFT of the DC signal Aej0n is the continuous impulse 2Aπδ(ω). The reconstructed
signal is  π  π
1 1
X (e )d ω =

2Aπδ(ω)d ω = Ae0n = A
2π −π 2π −π

Therefore, the DTFT of Aejω0 n is 2πAδ(ω − ω0 ), −π < ω < π. The DTFT spectrum
is periodic with period 2π. Therefore, the DTFT of a periodic signal is a periodic
train of impulses with strength 2π
N
X (k) at 2π
N
k with period 2π.
For example, consider the DFT pair


sin n ↔ {X (0) = 0, X (1) = −j2, X (2) = 0, X (3) = j2}
4

with N = 4. The DTFT X (ejω ) for the same signal is


 2π


X (ej0 ) = 0, X ej 4 = −jπδ ω − ,
4




X e j2 4
= 0, X e j3 4
= jπδ ω − 3
4

8.1.3 Determination of the DFT from the DTFT

The DTFT and the DFT of a finite sequence x(n) of length N are given as

+N −1
n0 +N −1
n0
x(n)e−jωn and X (k) = x(n)e−j N kn ,

X (ejω ) =
n=n0 n=n0

where n0 is the starting point of x(n). The DTFT is evaluated at all frequencies on
the unit circle from −π to π, whereas the DFT is evaluated at the set of discrete
frequencies 2πk/N . Therefore,

X (k) = X (ejω )|ω= 2πN k = X ej N k

Given the nonzero samples of a signal,

{x(−2) = 1, x(−1) = −1, x(0) = 1, x(1) = −1}


8.1 The DTFT 229

the DTFT of x(n) is

X (ejω ) = ej2ω − ejω + 1 − e−jω = ej2ω − 2 cos(ω) + 1

The set of samples of X (ejω ),

{X (0) = 0, X (1) = 0, X (2) = 4, X (3) = 0}

at ω = 2π
4
k, k = 0, 1, 2, 3 is the DFT of x(n).

8.2 Properties of the Discrete-Time Fourier Transform

It is often of interest to know the effect of an operation in the time domain corre-
sponding to that in the frequency domain or vice versa. Properties help us to find the
transforms with less effort. In addition, the DTFT of related signals can be found
easily from those known.

8.2.1 Linearity

The DTFT of a linear combination of two or more signals is equal to the same linear
combination of the DTFT of the individual signals. That is,

a(n) ↔ A(ejω ), b(n) ↔ B(ejω ), → pa(n) + qb(n) ↔ pA(ejω ) + qB(ejω ),

where p and q are arbitrary constants. As the DTFT is defined by the summation
operation, which is linear, the DTFT has the linearity property. We used this property
in deriving the DTFT of the unit-step signal from those of the sgn and DC signals.

8.2.2 Time Shifting

Shifting a signal x(n) in the time domain by ±n0 sample intervals results in x(n ±
n0 ). The shifting does not affect the magnitude of the signal. But the phases of its
constituent sinusoidal components are changed in proportion of their frequencies.
By directly substituting x(n ± n0 ) for x(n) in the DTFT definition, we get

x(n ± n0 ) ↔ e±jωn0 X (ejω )


230 8 The Discrete-Time Fourier Transform

Consider the transform pair



2π 2π 2π
cos 2 n ↔ π δ ω − 2 +δ ω+2
8 8 8

Then, due to this property, we get the transform pair



2π π 2π π 2π
cos 2 (n − 1) ↔ π e−j 2 δ ω − 2 + ej 2 δ ω + 2
8 8 8

2π 2π
= −jπ δ ω − 2 − jδ ω + 2
8 8

The shifted signal is sin(2 2π


8
n).

8.2.3 Frequency Shifting

Let the signal x(n) with DTFT X (ejω ) be multiplied by the exponential e±jω0 n to
become x(n)e±jω0 n . Then, combining the two exponentials in the summand of the
DTFT definition for this signal, we get e−j(ω∓ω0 ) . The result is that the independent
variable ω in X (ejω ) is replaced by ω ∓ ω0 . The resulting DTFT is X (ej(ω∓ω0 ) ). That is,

x(n)e±jω0 n ↔ X (ej(ω∓ω0 ) )

The spectrum X (ejω ) gets shifted by ω0 .


The response, shown in Fig. 8.5c, is of lowpass type. The shift of this frequency
response by π radians yields a highpass frequency response, shown in Fig. 8.5d. In
the time domain, the corresponding signals are
n n n
1 jπn 1 n 1 1 n
u(n) and e u(n) = (−1) u(n) = − u(n)
2 2 2 2

The corresponding spectra are

1 1 1
−jω
and −j(ω+π)
=
1 − (0.5)e 1 − (0.5)e 1 + (0.5)e−jω

8.2.4 Convolution in the Time Domain


  π
1
x(m)h(n − m) = X (ejω )H (ejω )ejωn d ω ↔ X (ejω )H (ejω )
m=−∞
2π −π
8.2 Properties of the Discrete-Time Fourier Transform 231

(a) (b) 5
1
period=2
n

|X(e j )|
0.8 u(n)
x(n)

0
0
-8 -6 -4 -2 0 2 4 6 8 - 0
n
(c) (d)
2 25
period=2
x(n)*x(n)

|X 2(e j ) |
(n+1)0.8 n u(n)

0
0
-8 -6 -4 -2 0 2 4 6 8 - 0
n

Fig. 8.8 a The exponential signal 0.8n u(n) and b its spectrum. c The signal 0.8n u(n) ∗ 0.8n u(n) =
(n + 1)0.8n u(n) and d its spectrum

Consider convolution of the exponential signal 0.8n u(n) with itself. The signal
and its DTFT spectrum are shown in Fig. 8.8a, b, respectively. The DTFT of the
signal and that of its convolution with itself are

1 1
−jω
and
1 − 0.8e (1 − 0.8e−jω )2

The signal (n + 1)0.8n u(n) and its spectrum are shown, respectively, in Fig. 8.8c, d.

8.2.5 Correlation

For implementation purposes, correlation of two signals is the convolution of the


two signals with one of them time reversed. Consider the correlation of {1̌, 2} and
{3̌, 4}. The DTFT of the signals are 1 + 2e−jω and 3 + 4e−jω . The conjugate of the
DTFT of the second signal is 3 + 4ejω . The product of 3 + 4ejω and 1 + 2e−jω is
ˇ 6} is the correlation of
4ejω + 11 + 6e−jω . The inverse DTFT of the product {4, 11,
{1̌, 2} and {3̌, 4}.
232 8 The Discrete-Time Fourier Transform

8.2.6 Convolution in the Frequency Domain

The transform of the product of two time-domain signals is the convolution of their
individual transforms in the frequency domain with a scale factor. In the case of
the FS, as the transform is discrete, the visualization of this operation is easy. For
all purposes, the discrete spectrum is easier to interpret. When the transform is
continuous, while we anticipate the result, the visualization is not so easy. Therefore,
we have to use formal procedure in deriving the result.
Consider the DTFT representations of x(n) and y(n)
 π  π
1 1
x(n) = X (eju )ejun du and y(n) = Y (ejv )ejvn d v
2π −π 2π −π

The DTFT of x(n)y(n) is to be expressed in terms of those of x(n) and y(n). The
DTFT representation of x(n)y(n) is
 π  π
1 1
x(n)y(n) = X (eju )Y (ejv )ej(u+v)n du d v
2π −π 2π −π

Letting v = ω − u, we get d v = d ω. Then,


 π  π
1 1
x(n)y(n) = X (e )Y (e
ju j(ω−u)
)du ejωn d ω
2π −π 2π −π

This is a DTFT representation of x(n)y(n) with the DTFT


 π
1
X (eju )Y (ej(ω−u) )du
2π −π

That is,

  π
1
x(n)y(n) ↔ x(n)y(n)e−jωn = X (eju )Y (ej(ω−u) )du
n=−∞
2π −π

As the DTFT spectrum is periodic, this convolution is periodic.


Consider the exponential signal 0.8n u(n)0.8n u(n) = 0.64n u(n). The signal and its
DTFT spectrum are shown in Fig. 8.9a, b, respectively. The transform of the product
of the signal, 0.8n u(n), with itself, x(n) = 0.8n u(n)0.8n u(n) = 0.64n u(n), is

1
X (ejω ) =
1 − 0.64e−jω
8.2 Properties of the Discrete-Time Fourier Transform 233

(a) 1 (b) 2.7778


period=2

|X(e j )|
0.64 n u(n)
x(n)

0
0
-8 -6 -4 -2 0 2 4 6 8 - 0
n

Fig. 8.9 a The exponential signal 0.8n u(n)0.8n u(n) = 0.64n u(n) and b its spectrum

While it is easier to find the DTFT in this case, for an arbitrary signal, we have to
use this property. For this example,
 2π
1 1 1
X (ejω ) = du
2π 0 1 − 0.8e−ju 1 − 0.8e−j(w−u)

The inverse DTFT of X (ejω ) is x(n) = 0.64n u(n). In practice, samples of the functions
are obtained and the convolution is computed numerically.

8.2.7 Symmetry

There are only N independent values in a N -point real-valued sequence. Therefore,


its complex-valued DTFT, with −π ≤ ω < π, must be redundant by a factor of 2.
This happens due to the use of the complex exponential to represent a real sinusoid.
The DTFT of a real-valued signal x(n) is given by

 ∞

X (ejω ) = x(n)e−jωn = x(n)(cos(ωn) − j sin(ωn))
n=−∞ n=−∞

Conjugating both sides and replacing ω by −ω, we get




X ∗ (e−jω ) = x(n)(cos(ωn) − j sin(ωn)) = X (ejω )
n=−∞

Therefore, X ∗ (e−jω ) = X (ejω ), called the conjugate symmetry. That is, if a signal is
real, then the real part of its spectrum X (ejω ) is even-symmetric and the imaginary
part is odd symmetric. Equivalently, the magnitude spectrum is even-symmetric and
the phase spectrum is odd symmetric.
234 8 The Discrete-Time Fourier Transform

Given the nonzero samples of a signal,

{x(−2) = 1, x(−1) = −1, x(0) = 1, x(1) = −1}

the DTFT of x(n) is

X (ejω ) = ej2ω − ejω + 1 − e−jω = cos(2ω) + j sin(2ω) − 2 cos(ω) + 1

X ∗ (ejω ) = e−j2ω − e−jω + 1 − ejω = cos(2ω) − j sin(2ω) − 2 cos(ω) + 1 = X (e−jω )

A real and even signal has a real and even-symmetric spectrum. Since x(n) cos(ωn)
is even and x(n) sin(ωn) is odd, the imaginary part is zero. Therefore,

  π
1
X (ejω ) = x(0) + 2 x(n) cos(ωn) and x(n) = X (ejω ) cos(ωn)d ω
n=1
π 0

For example,

{x(−1) = −1, x(0) = 1, x(1) = −1} ↔ 1 − 2 cos(ω)

A real and odd signal has an imaginary and odd symmetric spectrum. Since
x(n) cos(ωn) is odd and x(n) sin(ωn) is even, the real part is zero. Therefore,

  π
j
X (ejω ) = −j2 x(n) sin(ωn) and x(n) = X (ejω ) sin(ωn)d ω
n=1
π 0

For example,
{x(−1) = 1, x(0) = 0, x(1) = −1} ↔ j2 sin(ω)

8.2.8 Time-Reversal

Let both the variables ω and n are replaced by −ω and −n in the DTFT definition


X (ejω ) = x(n)e−jωn
n=−∞

Then, the exponent of e remains the same. But, X (ejω ) and x(n) are replaced by
X (e−jω ) and x(−n). The change in the signs of the limits does not affect the summa-
tion. Therefore,
x(n) ↔ X (ejω ) → x(−n) ↔ X (e−jω )
8.2 Properties of the Discrete-Time Fourier Transform 235

For example,

ejω0 n ↔ 2πδ(ω − ω0 ) → e−jω0 n ↔ 2πδ(−ω − ω0 ) = 2πδ(ω + ω0 )

8.2.9 Time-Expansion

Let
x(n) ↔ X (ejω )

Let us pad x(n) with zeros to get xu (n) defined as

xu (n) = x(n) if n
a
is an integer and xu (n) = 0 otherwise

where a = 0 is any positive integer. Then,



 ∞
 ∞

Xu (ejω ) = xu (n)e−jωn = xu (an)e−jωan = x(n)e−jωan
n=−∞ n=−∞ n=−∞

Therefore,
xu (n) ↔ X (ejaω )

The spectrum of the expanded signal is a compressed version of that of the original.
The spectral value at ω in the original spectrum occurs at ω/a in the spectrum of
its expanded version. With a negative, the spectrum is also frequency-reversed, in
addition.
For example, the DTFT of the signal x(n) shown in Fig. 8.10a with dots, with its
only nonzero values given as x(−1) = 1 and x(1) = 1, is X (ejω ) = ejω + e−jω =
2 cos(ω). Using the theorem, we get the DTFT of xu (n) with a = 3, shown in
Fig. 8.10a with cross, as

(a) (b) 2
1
X(e j ),X u(e j )
x(n),x u (n)

0 -2 Period=2
-5 -4 -3 -2 -1 0 1 2 3 4 5 - 0
n

Fig. 8.10 a Signal x(n) (dots) and its expanded version xu (n) (cross) with a = 3, and b the DTFT
of x(n) (solid line) and that of xu (n) (dashed line)
236 8 The Discrete-Time Fourier Transform

Xu (ejω ) = X (ej3ω ) = 2 cos(3ω)

This result is obvious from the DTFT definition. The DTFT of the signal (solid
line) and that of its expanded version (dashed line) are shown in Fig. 8.10b. Since the
signal is expanded by a factor of three, its spectrum is compressed by a factor of three.
Since an expanded signal varies more slowly, the frequencies of its components are
lowered, implying a compressed spectrum.

8.2.10 Frequency-Differentiation

The DTFT spectrum X (ejω ) of x(n) can be differentiated with respect to ω, as long
as the resulting functions have DTFT representations. By differentiating both sides
of the DTFT defining equation, with respect to ω, we get

dX (ejω ) dX (ejω )
(−jn)x(n) ↔ or (n)x(n) ↔ (j)
dω dω

In general, the kth derivative of X (ejω ) yields

d k X (ejω ) d k X (ejω )
(−jn)k x(n) ↔ or (n)k x(n) ↔ (j)k
dω k d ωk
Consider the transform pair

δ(n + 1) + δ(n − 1) ↔ 2 cos(ω)

Using the property, we get the transform pair

n(δ(n + 1) + δ(n − 1)) = (nδ(n + 1) + nδ(n − 1))


= (−δ(n + 1) + δ(n − 1)) ↔ −j2 sin(ω)

8.2.11 Summation

Let
x(n) ↔ X (ejω )

Then,

n
X (ejω )
x(k) ↔ + πX (ej0 )δ(ω), −π < ω ≤ π
(1 − e−jω )
k=−∞
8.2 Properties of the Discrete-Time Fourier Transform 237

As the unit-step signal is 1 for positive values of its argument and zero otherwise,

1 for k ≤ n
u(n − k) =
0 for k > n

The convolution of x(n) and u(n) is given by



 
n
x(n) ∗ u(n) = x(k)u(n − k) = x(k)
k=−∞ k=−∞

Therefore, as convolution in the time domain becomes multiplication in the frequency


domain,


n jω
x(n) ∗ u(n) = x(k) ↔
1
+ πδ(ω) X (e jω ) = X (e ) + πX (ej0 )δ(ω)
(1 − e−jω ) (1 − e−jω )
k=−∞

The impulsive component represents the DC component of x(n). It is understood that


the resulting signal has a DTFT representation.
Since u(n) ↔ 1 and the unit-step function is a summation of the impulse, using
this property, the DTFT of u(n), over one period, is


n
1
u(n) = δ(k) ↔ + πδ(ω), −π < ω ≤ π
(1 − e−jω )
k=−∞

As an another example, consider the signal x(n) = u(n) − u(n − 3), shown in
Fig. 8.11a, and the resulting signal, shown in Fig. 8.11b, obtained by summing it.
The DTFT of the given signal is, from the DTFT definition, 1 + e−jω + e−j2ω . Using
the property, we get the DTFT of its summation as

1 + e−jω + e−j2ω
+ 3πδ(ω), −π < ω ≤ π
1 − e−jω

(a) 1 (b) 3

2
x(n)

y(n)

0 0
-4 -2 0 1 2 3 4 -4 -2 0 1 2 3 4
n n
n
Fig. 8.11 a Signal x(n) = u(n) − u(n − 3); b y(n) = k=−∞ x(k)
238 8 The Discrete-Time Fourier Transform

8.2.12 Parseval’s Theorem and the Energy Transfer Function

The energy of a signal can also be expressed in terms of its spectrum, which is an
equivalent representation.

  2π
1
E= |x(n)|2 = |X (ejω )|2 d ω
n=−∞
2π 0

The energy of the signal x(−1) = 1, x(1) = 1 is 2. Its DTFT is 2 cos(ω). From
its DTFT, the energy is
 2π  2π
1 1
E= |2 cos(ω)|2 d ω = (1 + cos(2ω))d ω = 2
2π 0 π 0

In the frequency domain, the transfer function H (ejω ) relates the input and output
of a LTI system as
Y (ejω ) = H (ejω )X (ejω )

where X (ejω ), Y (ejω ), and H (ejω ) are the DTFT of the input, output, and impulse
response of the system. The output energy spectrum is given by

|Y (ejω )|2 = Y (ejω )Y ∗ (ejω )


= H (ejω )X (ejω )H ∗ (ejω )X ∗ (ejω ) = |H (ejω )|2 |X (ejω )|2

As it relates the input and output energy spectral densities of the input and output
of a system, |H (ejω )|2 is called the energy transfer function. The quantity, such as
|X (ejω )|2 , is the energy spectral density of the signal x(n), since 2π
1
|X (ejω )|2 d ω is
the signal energy over the infinitesimal frequency band ω to ω + d ω.

8.3 Applications

Fourier analysis is an indispensable tool in the frequency-domain analysis of signals


and systems. The analysis is carried out using sinusoidal or, equivalently, complex
exponential signals. The basic principle of analysis is the same for all versions.
Sinusoidal signals remain sinusoidal in any part of a linear system and this property
enables fast implementation of operations. The differential equation and the con-
volution operation required in the time domain become algebraic operations in the
frequency domain. Further, the interpretation of signals is easier using their spectra.
The DTFT version of the Fourier analysis is most suitable to analyze discrete signals.
Fourier analysis is applicable to all stable and linear systems to find the steady-state
response.
8.3 Applications 239

8.3.1 Transfer Function and the System Response

The input–output relationship of a LTI system is given by the convolution operation


in the time domain. It relates the input and output of a system through its impulse
response. However, the convolution operation reduces to much simpler multiplication
operation, when the input to a system is sinusoidal or complex exponential. That is,


y(n) = x(m)h(n − m) ↔ Y (ejω ) = X (ejω )H (ejω ),
m=−∞

where x(n), h(n), and y(n) are, respectively, the system input, impulse response, and
output, and X (ejω ), H (ejω ), and Y (ejω ) are their respective transforms. As multiplica-
tion of the input with H (ejω ) yields the output, H (ejω ) is called the transfer function
of the system. The transfer function is the transform of the impulse response. It char-
acterizes a system in the frequency domain just as the impulse response does in the
time domain.
The spectrum of the impulse function is a constant. It is composed of complex
exponentials, ejωn , of all frequencies from ω = −π to ω = π with equal magnitude
and zero phase. Therefore, the transform of the impulse response, the transfer func-
tion, is also called the frequency response of the system. Consequently, an exponential
Aej(ωa n+θ) or a real sinusoidal input signal A cos(ωa n + θ) is changed to, respectively,
(|H (ejωa )|A)ej(ωa n+(θ+∠(H (e ))) or (|H (ejωa )|A) cos(ωa n + (θ + ∠(H (ejωa ))) at the
jωa

output. The steady-state response of a stable system to the causal input Aej(ωa n+θ) u(n)
is also the same. Since,
Y (ejω )
H (ejω ) = ,
X (ejω )

the transfer function can also be described as the ratio of the transform Y (ejω ) of the
output y(n) to that of the input x(n), X (ejω ). It is assumed that |X (ejω )| = 0 for all
frequencies of interest.
Using the time-shift property of the DTFT, a difference equation with constant
coefficients can be reduced to an algebraic equation that can be solved for Y (ejω ).
Then, the inverse DTFT of Y (ejω ) yields the system output y(n). Consider the dif-
ference equation of a causal LTI discrete system

y(n) + aK−1 y(n − 1) + aK−2 y(n − 2) + · · · + a0 y(n − K) =


bM x(n) + bM −1 x(n − 1) + · · · + b0 x(n − M )

Taking the DTFT of both sides, we get, assuming initial conditions are all zero,

Y (ejω )(1 + aK−1 e−jω + aK−2 e−j2ω + · · · + a0 e−jKω ) =


X (ejω )(bM + bM −1 e−jω + · · · + b0 e−jM ω )
240 8 The Discrete-Time Fourier Transform

Solving for H (ejω ), we get

Y (ejω ) bM + bM −1 e−jω + · · · + b0 e−jM ω


H (ejω ) = =
X (ejω ) 1 + aK−1 e−jω + aK−2 e−j2ω + · · · + a0 e−jKω

Example 8.6 Find the response, using the DTFT, of the system governed by the
difference equation
y(n) = x(n) + 0.8y(n − 1)

to the input x(n) = cos( 2π


8
n + π3 ).
Solution
ejω
H (ejω ) =
ejω − 0.8

Substituting ω = 2π
8
, we get



ej 8
H ej 8 = 2π = 1.4022∠(−0.9160)
ej 8 − 0.8

The response of the system to the input x(n) = cos( 2π


8
n + π3 ) is y(n) = 1.4022
cos( 2π
8
n + π3 − 0.9160).

Example 8.7 Find the impulse response h(n), using the DTFT, of the system gov-
erned by the difference equation

5 1
y(n) = x(n) − 2x(n − 1) + x(n − 2) + y(n − 1) − y(n − 2)
6 6
Solution

1 − 2e−jω + e−j2ω 1 − 2e−jω + e−j2ω


H (ejω ) =   =   
1 − 56 e−jω + 16 e−j2ω 1 − 21 e−jω 1 − 13 e−jω

Expanding into partial fractions, we get

3 8
H (ejω ) = 6 +  1 −jω
− 
1 − 2e 1 − 13 e−jω

Taking the inverse DTFT, we get the impulse response as


n n
1 1
h(n) = 6δ(n) + 3 −8 u(n)
2 3
8.3 Applications 241

The first four values of the impulse response h(n) are

h(0) = 1, h(1) = −1.1667, h(2) = −0.1389, h(3) = 0.0787

Example 8.8 Find the zero-state response, using the DTFT, of the system governed
by the difference equation

y(n) = 2x(n) + 0.5y(n − 1)

with the input x(n) = 0.6n u(n).


Solution
2 1
H (ejω ) = −jω
and X (ejω ) =
(1 − 0.5e ) (1 − 0.6e−jω )

2
Y (ejω ) = H (ejω )X (ejω ) =
(1 − 0.6e−jω )(1 − 0.5e−jω )

Expanding into partial fractions, we get

12 10
Y (ejω ) = −
(1 − 0.6e−jω ) (1 − 0.5e−jω )

Taking the inverse DTFT, we get the zero-state response.


 
y(n) = 12(0.6)n − 10(0.5)n u(n)

The first four values of y(n) are

y(0) = 2, y(1) = 2.2, y(2) = 1.82, y(3) = 1.342

8.3.2 Design of Linear-Phase FIR Digital Filters


Using Windows

Filters are required in signal processing systems to suppress or modify some part
of the spectrum of the input signal in a desired way. As a linear system, the filter
is characterized by its impulse response in the time domain and frequency response
in the transform domain. Usually, the filter is specified in terms of the required
frequency response and the task is to determine the impulse response. One of the
simpler methods of FIR filter design is called the window method. In this method,
the impulse response of the desired filter is found by finding the inverse DTFT of the
specified frequency response.
242 8 The Discrete-Time Fourier Transform

The impulse response is infinite duration and, therefore, it has to be truncated


to make the impulse response stable and realizable. The truncation of the response
corresponds to multiplying it by a rectangular window in the time domain. In the
frequency domain, it corresponds to the convolution of their spectra. The rectangular
window has discontinuities and, consequently, its frequency response has large oscil-
lations in both the passband and the stopband. While the transition band is shorter,
the oscillations are undesirable. A better frequency response can be obtained, at the
cost of a longer transition band, by using tapered windows to truncate the impulse
response. A variety of windows is available with different characteristics and a suit-
able one has to be chosen for a given requirements. Further, the truncated impulse
response has to be shifted to make it causal.

8.3.3 Digital Differentiator

Digital differentiators are used in digital systems to approximate the derivative of


a signal. The ideal frequency response of a differentiator must increase linearly
proportional to the frequency of the component of the input signal. As a device, it is
characterized by its impulse response in the time domain and its frequency response
in the frequency domain. The periodic frequency response, shown in Fig. 8.12a over
one period, of the ideal digital differentiator is defined as

H (ejω ) = jω, −π < ω < π

For example, the input and the output of the differentiator are

cos(ω0 n) ↔ π(δ(ω + ω0 ) + δ(ω − ω0 ))


jπ(−ω0 δ(ω + ω0 ) + ω0 δ(ω − ω0 )) ↔ −ω0 sin(ω0 n)

(a) j (b) j
H(e j )

H(e j )

0 0

period=2 period=2
-j -j
- 0 - 0

Fig. 8.12 a The frequency response of the ideal digital differentiator. b The frequency response of
the ideal Hilbert transformer
8.3 Applications 243

The inverse DTFT of its frequency response is its impulse response.


 π  (−1)n
1 cos(πn) for n = 0
h(n) = jωe jωn
dω = = n , −∞ < n < ∞
2π −π n 0 for n = 0

As the frequency response of the differentiator is imaginary and odd-symmetric,


the impulse response is real and odd-symmetric. In practice, the differentiators are
designed so that their frequency responses are linear over the frequency range of
interest, called the bandwidth of the differentiator.

8.3.4 Hilbert Transform

The DFT version of the Hilbert transform is presented in Chap. 5. We just present
its DTFT periodic frequency response, shown in Fig. 8.12b over one period, of the
ideal Hilbert transformer defined as

−j for 0 < ω < π
H (e ) =

j for −π < ω < 0

The impulse response of the ideal Hilbert transformer is obtained by finding the
inverse DTFT of its frequency response.
 π  0
1 1
h(n) = −je jωn
dω + jejωn d ω
2π 0 2π −π

2 sin2 ( πn
2 )
= πn
for n = 0 , −∞ < n < ∞
0 for n = 0

8.3.5 Downsampling

DTFT and DFT versions of the Fourier analysis are mostly used in multirate digital
signal processing applications. Downsampling and upsampling are the two basic
operations in multirate digital signal processing. Upsampling is presented in the
DTFT properties section. Consider the signal x(n). Retaining one out of every D
samples, starting from n = 0, and discarding the rest is called the downsampling of a
signal by a factor of D, a positive integer. The nth sample of the downsampled signal
xd (n) is the (Dn)th sample of x(n)

xd (n) = x(Dn)
244 8 The Discrete-Time Fourier Transform

We present the downsampling operation in the frequency domain. Let x(n) ↔


X (ejω ). The problem is to express the DTFT Xd (ejω ) of the downsampled signal
xd (n) in terms of X (ejω ). Let D = 2. The approach is to find the alternating version
(−1)n x(n) of x(n) and express the DTFT Xd (ejω ) as a combination of those of x(n)
and (−1)n x(n). Using the frequency-shift theorem,

e−jπn x(n) = (−1)n x(n) ↔ X (ej(ω+π) )

The DTFT pair for x(n) with zero-valued odd-indexed samples is

1  1 
x(n) + (−1)n x(n) ↔ X (ejω ) + X (ej(ω+π) ) (8.10)
2 2
For example,

x(n) = {x(0) = 2, x(1) = 1, x(2) = 3, x(3) = 3}


↔ X (ejω ) = 2 + e−jω + 3e−j2ω + 3e−j3ω
(−1)n x(n) = {x(0) = 2, x(1) = −1, x(2) = 3, x(3) = −3}
↔ X (ej(ω+π) ) = 2 − e−jω + 3e−j2ω − 3e−j3ω

Now,

1 
x(n) + (−1)n x(n) = {x(0) = 2, x(1) = 0, x(2) = 3, x(3) = 0}
2
1 
↔ X (ejω ) + X (ej(ω+π) ) = 2 + 3e−j2ω
2

The term 3e−j2ω is periodic with period π (3e−j2(ω+π) = 3e−j2π e−j2ω = 3e−j2ω ) and
the constant term 2 is periodic with any period. Therefore, the spectrum is periodic
with period π. Now, if the take the spectral values {5, −1} over one period and
compute the IDFT, we get {2, 3}, which is the downsampled version of x(n). The
spectrum of {2, 3}, by definition, is 2 + 3e−jω , which can also be obtained from
2 + 3e−j2ω by replacing ω by ω/2. Due to upsampling, if the DTFT of {a, b} is
Y (ejω ) then the DTFT of the upsampled signal {a, 0, b, 0} is the concatenation and
compression of Y (ejω ) and Y (ejω ) in the range 0 < ω < 2π, Y (ej2ω ). The spectrum
is replicated. Therefore, by replacing ω by ω/2 in Eq. (8.10), we take the values of
the spectrum of the upsampled signal in the frequency range from 0 to π only and
expand it in forming the spectrum Xd (ejω ) of the downsampled signal

1  jω  ω

xd (n) = x(2n) ↔ Xd (ejω ) = X e 2 + X ej( 2 +π) , 0 < ω < 2π (8.11)


2
8.4 Approximation of the Discrete-Time Fourier Transform 245

8.4 Approximation of the Discrete-Time Fourier Transform

In learning and understanding Fourier analysis or other transforms, we find the trans-
form of well-defined signals, such as a pulse, an exponential, a triangular etc., ana-
lytically. However, practical signals usually have arbitrary amplitude profile and they
have to be approximated by a set of discrete samples enabling the use of software or
digital hardware in their analysis.
Both the DFT and the DTFT spectra are periodic with period 2π. The DTFT
spectrum is continuous, while the DFT spectrum is composed of uniform samples of
the DTFT spectrum. Sampling the spectrum implies periodicity of the time-domain
signal. That is, if all the time-domain samples of a signal are contained in a period,
the samples can be obtained exactly from the samples of the DTFT spectrum by
using the DFT. Otherwise, time-domain aliasing occurs.
Let
x(n) = {x(0) = 2, x(1) = 1, x(2) = 3, x(3) = 4}

The DTFT of x(n) is

X (ejω ) = 2 + e−jω + 3e−j2ω + 4e−j3ω

The samples of the spectrum at ω = 0, π/2, π, 3π/2 are

{10, −1 + j3, 0, −1 − j3}

The 4-point DFT of x(n) is the same. The IDFT of these samples yields x(n). With
just 2 spectral samples {10, 0}, the IDFT yields {5, 5}. Time-domain aliasing has
occurred. In practice, aliasing in unavoidable due to the finite and infinite natures,
respectively, of the DFT and the DTFT in the time domain. With 5 spectral samples

{10, −3.3541 − j0.3633, 3.3541 − j1.5388, 3.3541 + j1.5388, −3.3541 + j0.3633},

the IDFT yields


{2, 1, 3, 4, 0}

The conclusion is that exact time-domain samples can be obtained from the samples
of the DTFT spectrum with time-limited signals. Otherwise, it has to be ensured that
time-domain aliasing is negligible.
In approximating the samples of the DTFT spectrum by using the DFT, the prob-
lem is data truncation. The input time-domain samples are usually too long and
truncation is required to limit the size of the data to limit the computational com-
plexity and memory requirements of the DFT. The data has to be truncated so that
sufficient energy of the signal is retained in the truncated signal. Another point is
that the samples may be specified over any time-domain range, while DFT algo-
rithms usually require them to be specified from n = 0 to n = N − 1 for a N -point
246 8 The Discrete-Time Fourier Transform

signal. This can be achieved due to the assumed periodicity of the DFT. Further, zero
padding may be required to make the length equal to an integral power of 2.
Let
x(n) = {x(−1) = −2, x(0) = 1, x(1) = 3}

The DTFT of x(n) is


X (ejω ) = −2ejω + 1 + 3e−jω

Using the assumed periodicity of the DFT, we get

xp(n) = {x(0) = 1, x(1) = 3, x(2) = −2}

Let us truncate the signal xp(n).

xp_t(n) = {x(0) = 1, x(1) = 3, x(2) = 0}

The DFT of xp_t(n) is

{4, −0.5 − j2.5981, −0.5 + j2.5981}

This is the DFT of the circular convolution of a rectangular window and that of xp(n)
divided by 3. The DFT of xp(n) is

{2, 0.5 − j4.3301, 0.5 + j4.3301}

The DFT of the window w(n) = {1, 1, 0} is

{2, 0.5 − j0.8660, 0.5 + j0.8660}

The linear convolution of the two spectra, divided by 3, is

{1.3333, 0.6667 − j3.4641, −0.5 + j2.5981, 2.6667, −1.1667 + j0.8660}

We want the circular convolution output, which can be obtained by adding the last
two terms with the first two terms.

8.5 Summary

• The DTFT version of the Fourier analysis is used to analyze aperiodic discrete
signals. The corresponding spectrum is continuous and periodic and it is a relative
amplitude spectrum.
8.5 Summary 247

• The DTFT is the dual of the FS with the roles of the time- and frequency domains
interchanged. The aperiodic discrete sequence is the FS of the continuous periodic
spectrum in the frequency domain.
• The DTFT is the limiting case of the DFT as the period of the time-domain sequence
tends to infinity with the sampling interval fixed.
• As the DTFT represents sampled waveforms, its spectrum is periodic. Periodicity
of the spectrum implies that the effective range of the frequencies in the spectrum
is finite.
• As the DTFT is defined by an infinite sum, the infinite samples is absolutely or
square summable is a sufficient condition for its existence.
• As with the other versions of the Fourier analysis, the DTFT is also effectively
approximated by the DFT in practical applications.
• The DTFT is widely used in the analysis of discrete signals and stable LTI systems.
The DTFT of the impulse response of a system is its frequency response.
Exercises
 2π π

8.1 Find the DTFT of sin 8
n+ 6
.
* 8.2 Find the inverse DTFT of j2 sin(2ω).
8.3 Given the nonzero samples of a signal,

{x(−2) = 2, x(−1) = −1, x(0) = 3, x(1) = 4}

find its DFT from the DTFT.


* 8.4 Find the convolution of x(n) = {3, 1, 2} and h(n) = {1, 2, 4} using the DTFT.
8.5 Find the correlation of x(n) = {1, 2, 3} and h(n) = {2, −1, 4} using the DTFT.
* 8.6 Find the response, using the DTFT, of the system governed by the difference
equation
y(n) = x(n) − 0.7y(n − 1)

to the input x(n) = sin( 2π


8
n − π6 ).
8.7 Find the impulse response h(n), using the DTFT, of the system governed by the
difference equation

2
y(n) = x(n) + 3x(n − 1) + 2x(n − 2) + y(n − 1) − y(n − 2)
9

* 8.8 Find the zero-state response, using the DTFT, of the system governed by the
difference equation
y(n) = x(n) − 0.6y(n − 1)

with the input x(n) = (−0.8)n u(n).


248 8 The Discrete-Time Fourier Transform

8.9 Find the DTFT Xd (ejω ) of the downsampled version xd (n) of x(n), by a factor of
2, in terms of its DTFT X (ejω ).
8.9.1
x(n) = (0.8)n u(n)

8.9.2

x(n) = cos n
8

8.9.3 
1 for −3 ≤ n ≤ 3
x(n) =
0 otherwise

8.10 Given 4 samples of x(n), find its DTFT X (ejω ) analytically. Find the DFT of one
period xp(n), n = 0, 1, 2, 3 obtained by periodically extending x(n). Verify that the
uniform samples of X (ejω ) and the DFT are the same. Truncate xp(n) by a window
{w(0) = 1, w(1) = 1, w(2) = 1, w(3) = 0} to get xp_t(n). Find the DFT of xp_t(n)
and justify it in terms of the DFT of w(n) and xp(n).
* 8.10.1
{x(−2) = 2, x(−1) = 1, x(0) = 3, x(1) = 4}

8.10.2
{x(−1) = 1, x(0) = 1, x(1) = 3, x(2) = 3}

8.10.3
{x(−3) = 2, x(−2) = 4, x(−1) = 3, x(0) = 1}

8.11 Given 4 samples of x(n), find its DTFT X (ejω ) analytically. Find the 4 uniform
samples of X (ejω ) and compute the IDFT and verify that we get back x(n). Find the
3 and 5 uniform samples of X (ejω ) and compute the respective IDFT and justify the
result in terms of x(n).
8.11.1
{x(0) = 3, x(1) = 1, x(2) = 3, x(3) = 4}

8.11.2
{x(0) = 1, x(1) = 2, x(2) = 3, x(3) = 4}

8.11.3
{x(0) = 3, x(1) = 1, x(2) = 2, x(3) = 4}
Chapter 9
The Fourier Transform

The Fourier transform (FT) is the most general version of the Fourier analysis. It is
primarily used for the representation of continuous aperiodic signals with continuous
aperiodic spectra. In addition, it is the tool to analyze mixed class of signals as it
can represent signals represented by other versions of the Fourier analysis. It can
be considered as an extension of the DTFT. As the sampling interval tends to zero,
the time-domain signal becomes continuous and the continuous periodic spectrum
becomes continuous and aperiodic. It can also be considered as an extension of
the FS as the period of the periodic signal tends infinity. The time-domain signal
corresponding to a discrete spectrum is periodic. On the other hand, the time-domain
signal corresponding to a continuous spectrum is aperiodic.

9.1 The FT as a Limiting Case of the FS

Consider the FS synthesis and analysis expressions derived in Chap. 7 for a contin-
uous periodic signal x(t) with period T .


x(t) = Xfs (k)ejω0 tk (9.1)
k=−∞

and
 T /2  T /2
1 ω0
Xfs (k) = x(t)e−jω0 tk dt = x(t)e−jω0 tk dt (9.2)
T −T /2 2π −T /2

© Springer Nature Singapore Pte Ltd. 2018 249


D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7_9
250 9 The Fourier Transform

As the period T → ∞, the fundamental frequency ω0 → 0 and the coefficients


Xfs (k) → 0. However, the ratio Xfs (k)/ω0 = TXfs (k)/(2π) approaches a finite limit-
ing function. Therefore, Eqs. (9.1) and (9.2) are expressed in the form


1  
x(t) = TXfs (k) ejω0 tk δ(kω0 ) (9.3)

kω0 =−∞

and
 T /2
TXfs (k) = x(t)e−jω0 tk dt (9.4)
−T /2

The frequency increment, which is the fundamental frequency ω0 , is denoted by


δ(kω0 ). In the limit,

T → ∞, ω0 → 0, k → ∞, kω0 → ω, δ(kω0 ) → d ω, TXfs (k) → X ( jω)

At the end of the limit process, we get the FT and IFT expressions. The FT X ( jω)
of x(t) is defined as  ∞
X ( jω) = x(t)e−jωt dt (9.5)
−∞

The inverse FT x(t) of X ( jω) is defined as


 ∞
1
x(t) = X ( jω)ejωt d ω (9.6)
2π −∞

Figure 9.1a, b show a square pulse with period 2π and its FS spectrum with the
fundamental frequency ω0 = 1 rad. The corresponding scaled FT is also shown in
a solid line. Figure 9.1c, d show the square pulse with period 4π and its scaled FS
spectrum with ω0 = 0.5 rad. As the period is increased, the fundamental frequency is
decreased resulting in a denser spectrum. The ratio Xfs (k)/ω0 , in the limit, approaches
a finite limiting function. The period eventually approaches ∞ and the fundamental
frequency approaches zero. The result is that both the signal and its spectrum become
continuous and aperiodic. Figure 9.1e, f show the square pulse with period 8π and
its scaled FS spectrum with ω0 = 0.25 rad.
The limiting process can be thought of doubling and redoubling of the period T .
The order k of a specific frequency component gets doubled with the doubling of
the period. As the period is doubled, the frequency gets divided by 2. Therefore,
kω0 remains constant. The product TXfs (k) becomes a finite function X ( jω). For
example,
Xfs (1) = 0.3183 with ω0 = 1, Xfs (1)/1 = 1Xfs (1) = 0.3183 and kω0 = ω = 1.
Xfs (2) = 0.1592 with ω0 = 0.5, Xfs (2)/0.5 = 2Xfs (2) = 0.3183 and kω0 = ω = 1.
Xfs (4) = 0.0796 with ω0 = 0.25, Xfs (4)/0.25 = 4Xfs (4) = 0.3183 and kω0 = ω = 1.
9.1 The FT as a Limiting Case of the FS 251

(a) Period T= 2
(b) 0.5 =1
1 0

0.3183

X fs (k)
x(t)

0
0
- -0.5 0 -1 0 1
t k
(c) Period T= 4 (d) 0.5 = 0.5
1 0

0.3183

2X fs (k)
x(t)

0
0
-2 0 2 -2 0 2
t k
(e) Period T= 8
(f) 0.5 = 0.25
1 0

0.3183
4X fs (k)
x(t)

0
0
-4 0 4 -4 0 4
t k

Fig. 9.1 a A periodic square pulse with period 2π and b its FS spectrum Xfs (k) with ω0 = 1 rad;
c the pulse with period 4π and d its scaled FS spectrum 2Xfs (k) with ω0 = 0.5 rad; e the pulse in a
with period 8π and f its scaled FS spectrum 4Xfs (k) with ω0 = 0.25 rad; The corresponding scaled
FT is shown in a solid line

The amplitude of each frequency component is X ( jω)d ω/(2π), which is infinites-


imal. However, X ( jω) is proportional to X ( jω)d ω/(2π). As X ( jω) is finite, the plot
of X ( jω) versus ω constitutes the FT spectrum. The FT spectrum is a relative ampli-
tude spectrum showing the relative variations of the harmonic amplitudes versus
frequency.
252 9 The Fourier Transform

9.1.1 The FT Using Orthogonality

In Chap. 2, we expressed a discrete periodic signal as a sum of complex exponentials


in Eq. (2.1). Then, we used the orthogonality property of complex exponentials to
find the coefficients of the constituent frequency components of the signal. It is
straightforward to apply this procedure to derive the FS. The same procedure applies
to the DTFT, since it is the dual of the FS. It is interesting to find how the orthogonality
property can be used to derive the FT.
As both the signal and the spectrum are continuous and of infinite extent, the
signal is reconstructed as the integral of continuous-time complex exponentials of all
frequencies with their associated coefficients, rather than a sum of finite exponentials
in the case of DFT. The aperiodic continuous signal is synthesized as
 ∞
1
x(t) = X ( jω)ejωt d ω
2π −∞

Now, the same procedure to determine X (k) in DFT is used to determine X ( jω).
Multiplying both sides by e−jω0 t and integrating over the infinite time domain, we
get
 ∞  ∞  ∞
1
x(t)e−jω0 t dt = X ( jω)ej(ω−ω0 )t d ω dt
−∞ −∞ 2π −∞
 ∞  ∞
1
= X ( jω)d ω ej(ω−ω0 )t dt
2π −∞ −∞
 ∞  j(ω−ω0 )t 
1 e ∞
= X ( jω)d ω 
2π −∞ j(ω − ω0 ) −∞

Now, as sinc function degenerates into an impulse with strength 2π, irrespective of
the value T , in the limit,
   
ej(ω−ω0 )t T 2 sin((ω − ω0 )T )
lim = lim = 2πδ(ω − ω0 )
T →∞ j(ω − ω0 ) −T T →∞ (ω − ω0 )

Using this result,


 ∞  ∞
x(t)e−jω0 t dt = δ(ω − ω0 )X ( jω)d ω = X (jω0 )
−∞ −∞

Replacing ω0 by ω, since the impulse is effective only at ω = ω0 , we get


 ∞
X ( jω) = x(t)e−jωt dt
−∞
9.1 The FT as a Limiting Case of the FS 253

Since t or ω is zero, the values X ( j0) and x(0) can be determined easily. They can
be used to check the correctness of the derived closed-form expressions for X ( jω)
or x(t).  ∞  ∞
1
X ( j0) = x(t)dt and x(0) = X ( jω)d ω,
−∞ 2π −∞

The FT and the IFT definitions can be expressed in terms of the the cyclic frequency
f . Since ω = 2πf and d ω = 2πdf , we get
 ∞  ∞
X ( j2πf ) = x(t)e−j2πft dt and x(t) = X ( j2πf )ej2πft df
−∞ −∞

Gibbs phenomenon can occur in either or both the time domain and frequency
domain.

9.1.2 Existence of the FT

The sufficient conditions, called the Dirichlet conditions, for the existence of the FT
are as follows. The first condition is that the signal x(t) is absolutely integrable. From
the definition of the FT, we get
 ∞  ∞  ∞
|X ( jω)| ≤ |x(t)e−jωt | dt = |x(t)||e−jωt | dt = |x(t)| dt,
−∞ −∞ −∞

since |e−jωt | = 1. The second condition is that x(t) may have only a finite number of
finite maxima and minima in any finite interval. The third condition is that x(t) may
have only a finite number of finite discontinuities of x(t) in any finite interval. All
physical signals have FT representation.
As Fourier representation of a signal is equivalent with respect to the least squares
error criterion,  ∞  ∞
1
|x(t)|2 dt = |X ( jω)|2 d ω
−∞ 2π −∞

That is, a square integrable signal, −∞ |x(t)|2 dt < ∞, has a FT representation. A
signal with finite energy satisfies the existence conditions.

Example 9.1 Find the IFT, x(t), of the spectrum X ( jω) = π(u(ω + ω0 ) − u(ω −
ω0 )), where u(ω) is the unit-step function.
Solution
 ω0  ω0
1 sin(ω0 t)
x(t) = πejωt d ω = cos(ωt)d ω =
2π −ω0 0 t
254 9 The Fourier Transform

(a) (b)
0.2

X(j )
x(t)

0
0
-30 -20 -10 0 10 20 30 - 0.2
t
sin(0.2t)
Fig. 9.2 a t and b its FT spectrum, π(u(ω + 0.2) − u(ω − 0.2))

sin(ω0 t)
↔ π(u(ω + ω0 ) − u(ω − ω0 ))
t

Signal x(t) and its FT are shown, respectively, in Fig. 9.2a, b with ω0 = 0.2.

The function of the form sin(at)


t
, a typical example is that shown in Fig. 9.2a, is
called the sinc function that has important role in signal processing. As both the sine
function in the numerator and the denominator function t are odd, the sinc function is
even-symmetric. The value of the sinc function is zero for at = ±π, ±2π, ±3π, . . .
At t = 0,
at
lim sin =a
t→0 t

as limθ→0 sin(θ) = θ. The oscillations of the sine function are damped by the denom-
inator t. The period of the sine function is 2π/a.
The area enclosed by the sinc function is constant, irrespective of the value of a.
Finding the FT of x(t) in Example 9.1 with ω = 0,
 ∞
sin(0.2t)
X ( j0) = dt = π
−∞ t

It is also known that the area enclosed by the function is equal to the area of the
triangle inscribed within its main hump. The sinc function is only square integrable.
As a → 0, the function sin(at)
t
is expanded and, eventually, degenerates into a DC
function. The first pair of zeros at ω = ± πa move to infinity and the function becomes
a horizontal line with amplitude a. As a becomes larger, the numerator sine function
sin(at) of sin(at)
t
alone is compressed (frequency of oscillations is increased). As a
consequence, the amplitudes of all the ripples along with that of the main hump
increase with fixed ratios to one another. While the ripples and the main hump
become taller and narrower, the area enclosed by each and the total area enclosed
by the function remains fixed. In the limit, as a → ∞, the main hump and all the
ripples of significant amplitude are concentrated at t = 0 and sin(at)
t
degenerates into
an impulse with strength π.
9.1 The FT as a Limiting Case of the FS 255

9.1.3 Determination of the FS from the FT

Let xp (t) be a periodic signal of period T . Let us define an aperiodic signal x(t) that
is identical with xp (t) over its one period from t1 to t1 + T and is zero otherwise,
where t1 is arbitrary. The FT of this signal is
 ∞  t1 +T
−jωt
X ( jω) = x(t)e dt = xp (t)e−jωt dt
−∞ t1

The FS spectrum for xp (t) is


 t1 +T
1 2π
Xfs (k) = xp (t)e−jkω0 t dt, ω0 =
T t1 T

Comparing the FS and FT definitions of the signals, we get

1 1
Xfs (k) = X ( jω)|ω=kω0 = X ( jkω0 )
T T

The discrete samples of T1 X ( jω), at intervals of ω0 , constitute the FS spectrum for the
periodic signal xp (t). While the spectral values at discrete frequencies are adequate to
reconstruct one period of the periodic waveform using the inverse FS, spectral values
at continuum of frequencies are required to reconstruct one period of the periodic
waveform and the infinite extent zero values of the aperiodic waveform using the
IFT. A similar relationship exists between the DTFT and the DFT.

Example 9.2 Find the FS spectrum for the periodic signal xp (t), one period of which
is defined as

1 for |t| < π2


xp (t) =
0 for π2 < |t| < π

Solution
The derivative of the corresponding aperiodic pulse is composed of two shifted
impulses, δ(t + π2 ) and −δ(t − π2 ). The integral of the derivative is the square pulse.
Therefore, we find the FT of the impulses and, using the derivative and integral
properties of the FT, we find the FT. The FT of δ(t) is 1 and that of δ(t − T0 ) is e−jT0 ω
(using the FT shift property). It is relatively easier to find the FT using this method
for this type of signals. This method is called the derivative method of obtaining the
FT of x(t).
Let X ( jω) be the FT of x(t). The derivative of X ( jω) is jωX ( jω). Then, for the
example,
 
sin π2 ω
π π
j π2 ω −j π2 ω ej 2 ω − e−j 2 ω
jωX ( jω) = e −e and X ( jω) = =2
jω ω
256 9 The Fourier Transform

Since Xfs (k) = T1 X ( jkω0 ), with T = 2π and ω = kω0 = k 2π



= k, we get
   
2 sin π2 k 1 sin π2 k
Xfs (k) = =
2π k π k

The waveform is even-symmetric and, therefore, the coefficients of all the sine
components are zero. From another point of view, since the complex coefficients
are real, the waveform is composed of cosine components only. Further, subtracting
the DC bias, the first-half and second-half of x(t) are antisymmetric. This is called
the odd half-wave symmetry. This implies that all the even-indexed, except the DC,
components are absent. The Fourier series for the square pulse is
 
1 2 1 1
x(t) = + cos(t) − cos(3t) + cos(5t) − · · · , (9.7)
2 π 3 5

as given in Chap. 7.
Example 9.3 Find the FT of the unit impulse signal x(t) = δ(t).
Solution
Using the sampling property of the impulse, we get
 ∞  ∞
X ( jω) = δ(t)e−jωt dt = e−jω0 δ(t)dt = 1 and δ(t) ↔ 1
−∞ −∞

The unit impulse signal is composed of complex sinusoids, with zero phase shift, of
all frequencies from ω = −∞ to ω = ∞ in equal proportion. That is,
 ∞  ∞  ∞
1 1 1
δ(t) = e dω = jωt
cos(ωt)d ω = cos(ωt)d ω
2π −∞ 2π −∞ π 0

Example 9.4 Find the IFT of X ( jω) = 2πδ(ω).


Solution
Using the sampling property of the impulse, we get
 ∞
1
x(t) = 2πδ(ω)ejωt d ω = 1 and 1 ↔ 2πδ(ω)
2π −∞

The FT of the DC signal is 2πδ(ω).


Example 9.5 Find the FT X ( jω) of the real, causal, and decaying exponential signal
x(t) = e−at u(t), a > 0. Find the value of x(0) from X ( jω).
9.1 The FT as a Limiting Case of the FS 257

Solution
  ∞
∞ ∞
e−(a+jω)t  1
X ( jω) = e−at e−jωt dt = e−(a+jω)t dt = − =
0 0 a + jω 0 a + jω

1
e−at u(t), a > 0 ↔
a + jω
 ∞  ∞  ∞
1 1 1 a j ω
x(0) = dω = dω − dω
2π −∞ a + jω 2π −∞ ω 2 + a2 2π −∞ ω 2 + a2

As the imaginary part of X ( jω) is odd, its integral evaluates to zero. Therefore,
    ω ∞
1 ∞
a 1 ∞ d ωa 1  1
x(0) = dω =  ω 2 = tan−1  =
2π −∞ ω 2 + a2 2π −∞ +1 2π a −∞ 2
a

For any value of a, x(t), at t = 0, is 21 . Any Fourier reconstructed waveform converges


to the average of the right- and left-hand limits at a discontinuity.
Figure 9.3a, b show, respectively, the signal e−2t u(t) and its spectra. The real part
of the spectrum (continuous line) is an even function with a peak value of 21 at ω = 0
and the imaginary part (dashed line) is an odd function with peaks of value ± 14 at
ω = ∓2.

Example 9.6 Find the FT of the sgn signal


1 for t > 0
sgn(t) =
−1 for t < 0

Solution
The sgn function, sgn(t), is the limit of a linear combination of two decaying expo-
nential signals. That is,

(a) (b)
0.5
1
real
0.25
X(j )
x(t)

e -2t u(t)
0
imaginary

0 -0.25
0 1 -2 0 2
t

Fig. 9.3 a x(t) = e−2t u(t) and b its FT spectrum


258 9 The Fourier Transform

sgn(t) = lim (e−at u(t) − eat u(−t))


a→0

Consequently,  
1 1 2
X ( jω) = lim − =
a→0 a + jω a − jω jω

As the unit-step signal u(t) is a combination of the DC and sgn(t), we get

1
u(t) = 0.5 + 0.5sgn(t) ↔ πδ(ω) +

Example 9.7 Find the IFT of X ( jω) = δ(ω − ω0 ).


Solution
 ∞
1 1 jω0 t
x(t) = δ(ω − ω0 )ejωt d ω = e and ejω0 t ↔ 2πδ(ω − ω0 )
2π −∞ 2π

That is, the spectrum of the complex sinusoid ejω0 t is an impulse at ω = ω0 with
strength 2π.

It follows that

cos(ω0 t) ↔ π(δ(ω + ω0 ) + δ(ω − ω0 ))


sin(ω0 t) ↔ jπ(δ(ω + ω0 ) − δ(ω − ω0 )).

9.2 Properties of the Fourier Transform

Properties present the frequency-domain effect of time-domain characteristics and


operations on signals and vice versa. In addition, they are used to find new trans-
form pairs more easily from the FT of known functions and they also simplify the
determination of the FT from the definition.

9.2.1 Linearity

The FT of a linear combination of a set of signals is the same linear combination of


their individual FT. That is,

x(t) ↔ X ( jω), y(t) ↔ Y ( jω), ax(t) + by(t) ↔ aX ( jω) + bY ( jω),


9.2 Properties of the Fourier Transform 259

where a and b are arbitrary constants. As the integral defining the FT is a linear
operation, the FT is also a linear operation. Consider the FT pairs

cos(ω0 t) ↔ π(δ(ω + ω0 ) + δ(ω − ω0 ))


sin(ω0 t) ↔ jπ(δ(ω + ω0 ) − δ(ω − ω0 ))

Using the linearity property,

cos(ω0 t) + j sin(ω0 t) = ejω0 t ↔ 2πδ(ω − ω0 )

9.2.2 Duality

The definitions of FT and IFT are almost identical in form. The three differences
between the definitions are the change of the signs of the exponents of the complex
exponentials, the interchange of the variables t and ω, and the constant appearing in
the definition of the IFT. Therefore, x(t) and X ( jω) are each other’s transform, with
some minor changes. That is, the variables t and ω can be interchanged with some
modifications.
The IFT is defined as
 ∞
1
x(t) = X ( jω)ejωt d ω
2π −∞

By replacing t by −t, we get


 ∞  ∞
1
x(−t) = X ( jω)e−jωt d ω and 2πx(−t) = X ( jω)e−jωt d ω
2π −∞ −∞

That is,
2πx(−t) ↔ X ( jω)

This is a forward transform with 2πx(−t) being the FT of X ( jω). That is, we get
2πx(−t) by taking the FT of x(t) twice in succession, 2πx(−t) = FT(FT(x(t))).

x(t) ↔ X ( jω) → X (±t) ↔ 2πx(∓( jω))

For an even x(t), as X ( jω) is also even, the sign change of either t or ω may be
omitted. If the FT and IFT definitions using the cyclic frequency f are used, the 2π
factor gets eliminated leaving only the sign change.
For example, consider the FT pair

1
e−at u(t), a > 0 ↔
a + jω
260 9 The Fourier Transform

Using the property, we get the transform pair

1
2πeaω u(−ω), a > 0 ↔
a + jt

As an another example, consider the FT pair

sin(t) ↔ jπ(δ(ω + 1) − δ(ω − 1))

Considering ω as the time-domain variable, we get

jπ(δ(ω + 1) − δ(ω − 1)) ↔ jπ(ejt − e−jt ) = −2π sin(t) = 2π sin(−t)

9.2.3 Symmetry

The FT of x(t) is given by


 ∞  ∞
−jωt
X ( jω) = x(t)e dt = x(t)(cos(ωt) − j sin(ωt))dt (9.8)
−∞ −∞

Let x(t) be real and even. Since x(t) cos(ωt) is even and x(t) sin(ωt) is odd, the
second term in the integrand in Eq. (9.8) contributes the value zero to the value of
this integral and we get
 ∞  ∞
1
X ( jω) = 2 x(t) cos(ωt)dt and x(t) = X ( jω) cos(ωt)d ω
0 π 0

If a signal x(t) is real and even, then its spectrum is also real and even. The FT 1 of
δ(t) is an example of the FT of an even function.
Let x(t) be real and odd. Since x(t) sin(ωt) is even and x(t) cos(ωt) is odd, the
first term in the integrand in Eq. (9.8) contributes the value zero to the value of this
integral and we get
 ∞  ∞
j
X ( jω) = −j2 x(t) sin(ωt)dt and x(t) = X ( jω) sin(ωt)d ω
0 π 0

If a signal x(t) is real and odd, then its spectrum is imaginary and odd.

1 for t > 0 2

−1 for t < 0 jω

is an example of the FT of an odd function.


9.2 Properties of the Fourier Transform 261

An arbitrary real signal x(t) can be decomposed into even and odd components,
x(t) = xe (t) + xo (t), as presented in Chap. 1. Therefore, the FT of x(t), which is
neither even nor odd, is X ( jω) = Xe ( jω) + Xo ( jω). If a signal x(t) is real, then the
real part of its spectrum X ( jω) is even and the imaginary part is odd, called the
conjugate symmetry. That is, X (−jω) = X ∗ ( jω). An example is

x(t) = δ(t − t0 ) ↔ X ( jω) = e−jωt0 = cos(ωt0 ) − j sin(ωt0 )

9.2.4 Time Shifting

The shifting of a time-domain signal merely adds phase angles to its constituent
sinusoidal components, which are linearly proportional to their frequencies. If we
replace e±jωt0 X ( jω) in the IFT definition and combine the exponentials, we get

x(t ± t0 ) ↔ e±jωt0 X ( jω)

Consider the FT pair of the even-symmetric square pulse with width 2a

sin(aω)
u(t + a) − u(t − a) ↔ 2
ω
Using the theorem,

sin(aω) −jbω
u(t + a − b) − u(t − a − b) ↔ 2 e
ω

9.2.5 Frequency Shifting

Let x(t) is replaced by x(t)e±jω0 t in the FT definition. Then, the two exponentials in
the resulting integrand can be combined to get

x(t)e±jω0 t ↔ X ( j(ω ∓ ω0 ))

The duality properties hold to both transform pairs and properties. The time-shifting
property is the dual of the frequency-shifting property.
Consider the FT pair
1
e−3t u(t) ↔
3 + jω
262 9 The Fourier Transform

Then,

(ej2t − e−j2t )
e−3t sin(2t)u(t) = e−3t u(t)
j2
 
1 1 1 2
↔ − =
j2 3 + j(ω − 2) 3 + j(ω + 2) (3 + jω)2 + 4

For easier visualization, consider the FT pair

1
e−3t ej2t u(t) ↔
3 + j(ω − 2)

1 1 1 1
|ω=0 = and |ω=2 =
3 + jω 3 3 + j(ω − 2) 3

9.2.6 Convolution in the Time Domain

Fourier analysis is considered as the decomposition of a signal into its harmonic


components, even for continuous aperiodic signals and their spectra. Therefore, as
pointed out in earlier chapters, the convolution of two complex exponentials of the
same frequency is a complex exponential of the same frequency with its coefficient
being the product of those of the two exponentials. This property holds only for
complex exponentials and their linear combination, the real sinusoid. As the Fourier
spectrum is a representation of a signal in terms of its harmonic components, the
product of the two spectra of the two signals to be convolved is the spectrum of the
convolution of the two signals in the time domain.
 ∞  ∞
1
x(τ )h(t − τ )d τ = X ( jω)H ( jω)ejωt d ω ↔ X ( jω)H ( jω)
−∞ 2π −∞

That is, the convolution operation in the time domain corresponds to much simpler
multiplication operation in the frequency domain. This result, due to the represen-
tation of the signals in terms of complex exponentials, is a major reason for the
dominant role of the frequency-domain analysis in the study of signals and systems.
Consider the convolution of x(t) = e−4t u(t) and h(t) = e−2t u(t). In the time
domain, we get
 t  t
−2τ −4(t−τ ) −4t
y(t) = x(t) ∗ h(t) = e e dτ = e e2τ d τ = 0.5(e−2t − e−4t )u(t)
0 0
9.2 Properties of the Fourier Transform 263

In the frequency domain, the convolution output is the product of their individual
FT. That is,
1 1 0.5 0.5
Y ( jω) = = −
2 + jω 4 + jω 2 + jω 4 + jω

The IFT of Y ( jω) is y(t).

9.2.7 Convolution in the Frequency Domain

The problem is to find the FT Z( jω) of the product z(t) = x(t)y(t) of two signals
x(t) and y(t) in the time domain, in terms of their individual FT. This is the dual of
the time-domain convolution property.
 ∞
z(t) = x(t)y(t) ↔ Z( jω) = x(t)y(t)e−jωt dt
−∞
 ∞
1 1
= X ( jv)Y ( j(ω − v))d v = X ( jω) ∗ Y ( jω)
2π −∞ 2π

The FT of
1 1 1
=
2 + jt 2 + jt (2 + jt)2
1
is the convolution of the FT of 2+jt
with itself divided by 2π. That is,
 −ω
Z( jω) = (2π)e2ω u(−ω) ∗ e2ω u(−ω) = (2π) e2τ e2(ω−τ ) d τ
0
 −ω
= (2π)e 2ω
d τ = −(2π)ωe u(−ω)

0

9.2.8 Conjugation

Let x(t) ↔ X ( jω). Then, x∗ (±t) ↔ X ∗ (∓jω). If we conjugate both sides of the FT
and IFT definitions, we get
 ∞  ∞
∗ ∗ ∗ 1
X ( jω) = x (t)e dt,
jωt
x (t) = X ∗ ( jω)e−jωt d ω
−∞ 2π −∞

Replacing t by −t, we get


 ∞  ∞
1
X ∗ ( jω) = x∗ (−t)e−jωt dt, x∗ (−t) = X ∗ ( jω)ejωt d ω
−∞ 2π −∞
264 9 The Fourier Transform

Replacing ω by −ω after conjugating, we get


 ∞  ∞
∗ ∗ −jωt ∗ 1
X (−jω) = x (t)e dt, x (t) = X ∗ (−jω)ejωt d ω
−∞ 2π −∞

For example,
1
e−t u(t) ↔
1 + jω

Conjugating both sides, we get

1
e−t u(t) ↔
1 − jω

Changing t by −t, we get


1
et u(−t) ↔
1 − jω

Changing ω by −ω after conjugating, we get

1
e−t u(t) ↔
1 + jω

9.2.9 Cross-Correlation

The cross-correlation of two signals x(t) and y(t) is defined as


 ∞
rxy (τ ) = x(t)y∗ (t − τ )dt
−∞

The correlation operation is the same as convolution operation without time-reversal.


Therefore,
 ∞  ∞
∗ 1
x(t)y (t − τ )dt = X ( jω)Y ∗ ( jω)ejωt d ω ↔ X ( jω)Y ∗ ( jω)
−∞ 2π −∞

Let x(t) = cos(t) and y(t) = sin(t). The approach is to find the correlation of x(t)
and y(t) using the FS first.

cos(t) ↔ 0.5(δ(k + 1) + δ(k − 1)) and sin(t) ↔ j0.5(δ(k + 1) − δ(k − 1))

Then, the correlation of x(t) and y(t) in the frequency domain is the multiplication
of their FS with the second FS conjugated and the period 2π. The result is
9.2 Properties of the Fourier Transform 265

−j0.5π(δ(k + 1) − δ(k − 1))

The corresponding FT is obtained by multiplying by 2π and replacing the discrete


impulses by continuous impulses. That is,

π(−jπ(δ(ω + 1) − δ(ω − 1)))

The IFT of this is −π sin(t), the correlation of x(t) and y(t).


In the time domain,
 2π
cos(τ ) sin(τ − t)d τ
0
 2π
= cos(τ )(sin(τ ) cos(t) − cos(τ ) sin(t))d τ
0
 2π
= − sin(t) cos2 (τ )d τ = −π sin(t)
0

9.2.10 Time-Reversal

Let x(t) ↔ X ( jω). Then, x(−t) ↔ X (−jω). If we replace t by −t and ω by −ω in


the FT definition, we get
 ∞
X (−jω) = x(−t)e−jωt dt
−∞

The time-reversal of a signal results in its spectrum also frequency-reversed.


For example,
sin(ω0 t) ↔ jπ(δ(ω + ω0 ) − δ(ω − ω0 ))

Replacing t by −t and ω by −ω, we get

sin(ω0 (−t)) = − sin(ω0 t) ↔ jπ(δ(−ω + ω0 ) − δ(−ω − ω0 ))


= jπ(δ(ω − ω0 ) − δ(ω + ω0 )) = −jπ(δ(ω + ω0 ) − δ(ω − ω0 ))

9.2.11 Time Scaling

Sometimes, it is necessary to change the timescale of a signal x(t) and it is of interest


to express the FT of the time-scaled function in terms of X ( jω). For example,

cos(t) ↔ π(δ(ω + 1) + δ(ω − 1))


266 9 The Fourier Transform

Replacing t by 2t, we get

cos(2t) ↔ π(δ(ω + 2) + δ(ω − 2))

The frequency of the signal is increased and its period is decreased. The signal is
compressed and its spectrum gets expanded. Replacing t by 0.5t, we get

cos(0.5t) ↔ π(δ(ω + 0.5) + δ(ω − 0.5))

The frequency of the signal is decreased and its period is increased. The signal is
expanded and its spectrum gets compressed. If the scaling factor is negative, both
the signal and its spectrum get reversed.
Let x(t) ↔ X ( jω). By replacing at by τ , t by τa and dt by daτ , with a > 0, in the
FT definition of x(at), we get
 

1 ∞
τ 1 ω
x(at)e−jωt dt = x(τ )e−jω a d τ = X j
−∞ a −∞ a a

For a < 0, the FT is


−1 ω
X j
a a
By combining both the results, we get

1 ω
x(at) ↔ X j , a = 0
|a| a
1
The signal energy is changed by the scaling operation. The factor |a| scales the energy
suitably.
Consider the transform pair

sin(ω)
u(t + 1) − u(t − 1) ↔ 2
ω
Let a = 0.5. Using the property, the transform of

sin(2ω)
u(t + 2) − u(t − 2) ↔ 2
ω
Figure 9.4a, c show pulses with width 2 and its expanded version by a factor of 2,
respectively. Figure 9.4b, d show the respective FT spectra.
9.2 Properties of the Fourier Transform 267

(a) (b)
1 2

X(j )
x(t)

0
0
-2 -1 0 1 2 -12 -8 -4 0 4 8 12
t
(c) (d)
1 4

X(j )
x(t)

0
0
-4 -2 0 2 4 -12 -8 -4 0 4 8 12
t

Fig. 9.4 a A pulse with width 2; b its spectrum; c a pulse with width 4; d its spectrum

9.2.12 Time Differentiation

Since the derivative of a spectral component X ( jω0 )ejω0 t with respect to t is


jω0 X ( jω0 )ejω0 t and an arbitrary signal x(t) can be expressed in terms of its spec-
trum X ( jω), we get
dx(t)
↔ jω X ( jω)
dt
In general,
d n x(t)
↔ ( jω)n X ( jω)
dt n
It is assumed that the derivative of the signal is Fourier transformable. As the factor
jω appears in the spectrum of the differentiated signal, the magnitude of the high
frequency components is increased proportional to the frequency. This amounts to
highpass filtering of the signal. In common with other properties, this property can
also be used to find the FT of related signals.
For example,
cos(ω0 t) ↔ π(δ(ω + ω0 ) + δ(ω − ω0 ))

d (cos(ω0 t))
= −ω0 sin(ω0 t) ↔ ( jω0 )(π(−δ(ω + ω0 ) + δ(ω − ω0 ))
dt
= −jω0 π(δ(ω + ω0 ) − δ(ω − ω0 ))
268 9 The Fourier Transform

9.2.13 Time Integration

Convolution is the integral of product of two signals, with one of them time reversed.
Consider the time-reversed and shifted version u(t − τ ) of the unit-step signal u(τ ).
If we multiply a signal by u(t − τ ), the product is the same signal from −∞ to t and
the rest from t to ∞ zero. Therefore, the integral of the product is the integral of the
signal from −∞ to t.
The definite integral, y(t), of a time-domain signal, x(t), can be expressed as the
convolution of x(t) and the unit-step signal, u(t), as
 t  ∞
y(t) = x(τ )d τ = x(τ )u(t − τ )d τ = x(t) ∗ u(t)
−∞ −∞

Using the time-domain convolution theorem, with x(t) ↔ X ( jω), and u(t) ↔ 1

+
πδ(ω), we get
  
t
1 X ( jω)
x(τ )d τ ↔ X ( jω) + πδ(ω) = + πX ( j0)δ(ω)
−∞ jω jω

It is assumed that y(t) is Fourier transformable. The factor ω in the denominator


of the FT of y(t) indicates that, as the frequency is increased, the amplitude of
the high frequency components of the signal is more and more attenuated. That is
lowpass filtering. Differentiation corresponds to highpass filtering and integration
corresponds to lowpass filtering.
Consider the signal x(t) = u(t) − u(t − 1), shown in Fig. 9.5a with the FT
X ( jω) = jω1 (1 − e−jω ) and X ( j0) = 1. Using the property,

  −jω 
t
X ( jω) e −1
y(t) = x(τ )d τ ↔ Y ( jω) = + πδ(ω) = πδ(ω) +
−∞ jω ω2

Figure 9.5b shows the integral of x(t).

(a) 1 (b) 1
x(t)

y(t)

0 0
-1 0 1 2 -1 0 1 2
t t

Fig. 9.5 a Signal x(t). b The integral of x(t), y(t)


9.2 Properties of the Fourier Transform 269

To appreciate the use of theorems, let us do this example using the FT definition.
Assume that we have obtained y(t) in the time domain. First, we have to split the
function y(t) into the ramp section and the delayed unit-step signal. This is the use
of linearity theorem.
The FT of the delayed unit-step signal is

e−jω
πδ(ω) +

The FT of the time-limited ramp function is found as follows.


 1
1
e−jωx  −jω
e−jω
xe −jωt
dx = (−jωt − 1)  = −e +
1
− 2
( jω) 2  jω ω 2 ω
0 0

Combining the two partial FT, we get the same FT as that obtained using the theo-
rem. Properties are so convenient for theoretical analysis. Of course, the numerical
approximation of the Fourier spectrum with the DFT along with fast algorithms
makes Fourier analysis an indispensable tool in the applications of science and engi-
neering.
As an another example,

cos(ω0 t) ↔ π(δ(ω + ω0 ) + δ(ω − ω0 ))

The integral of cos(ω0 t) is

1 sin(ω0 t)
−jπ (−δ(ω + ω0 ) + δ(ω − ω0 )) =
ω0 ω0

9.2.14 Frequency-Differentiation

As the FT spectrum is also a continuous function of ω, the spectrum X ( jω) is also


differentiable. It is assumed that the resulting function is Fourier transformable.
Differentiating both sides of the FT definition with respect to ω, we get

dX ( jω) dX ( jω)
(−jt)x(t) ↔ or tx(t) ↔ j
dω dω
For the nth derivative, we get,

d n X ( jω) n d X ( jω)
n
(−jt)n x(t) ↔ or (t) n
x(t) ↔ ( j)
d ωn d ωn
270 9 The Fourier Transform

For example,

1 1
e−3t u(t) ↔ and te−3t u(t) ↔
jω + 3 ( jω + 3)2

δ(t + 3) + δ(t − 3) ↔ 2 cos(3ω) and t(δ(t + 3) + δ(t − 3)) ↔ −j(2)(3) sin(3ω)

9.2.15 Parseval’s Theorem and the Energy Transfer Function

Orthogonal transforms have the energy preservation property. That is, the energy of
a signal can be derived either from its time-domain or frequency-domain represen-
tations. The energy of a signal is its autocorrelation with lag zero. That is,
 ∞  ∞
∗ 1
x(t)x (t)dt = X ( jω)X ∗ ( jω)d ω
−∞ 2π −∞

 ∞  ∞
1
E= |x(t)|2 dt = |X ( jω)|2 d ω
−∞ 2π −∞

This equivalent energy representation is called the Parseval’s theorem. For real sig-
nals, the autocorrelation is even and we get
 ∞  ∞
1
E= |x(t)| dt = 2
|X ( jω)|2 d ω
−∞ π 0

The quantity |X ( jω)|2 is called the energy spectral density of the signal, since
1

|X ( jω)|2 d ω is the signal energy over the infinitesimal frequency band ω to
ω + d ω.

Example 9.8 Find the energy of the signal x(t) = e2t u(−t). Find the value of T such
that 95% of the signal energy lies in the range 0 ≤ t ≤ T . What is the corresponding
signal bandwidth B, where B is such that 95% of the spectral energy lies in the range
0 ≤ ω ≤ B.
Solution
1
e2t u(−t) ↔
2 − jω

The energy E of the signal is


 ∞  0
1
E= |x(t)|2 dt = e4t dt =
−∞ −∞ 4
9.2 Properties of the Fourier Transform 271

By changing the lower limit to −T , we get


 0
1 0.95
e4t dt = (1 − e−4T ) = = 0.2375
−T 4 4

Solving for T , we get T = 0.7489 s. This value is useful in truncating the signal for
numerical analysis.
From the spectrum,
  
1 B dω 1 −1 B = 0.2375 or B = 2 tan(0.2375(2π)) = 25.4124 rad/s
= tan
π 0 22 + ω 2 2π 2

The sampling interval required to sample this signal can be determined using this
value. The sampling frequency must be greater than (2)(25.4124) rad/s. Therefore,

the sampling interval must be smaller than (2)(25.4124) = 0.1236 s. For practical sig-
nals, this type of analysis can be carried out using numerical methods.

The input and output of a LTI system, in the frequency domain, is related by
the transfer function H ( jω) as Y ( jω) = H ( jω)X ( jω), where X ( jω), Y ( jω), and
H ( jω) are the FT of the input, output, and impulse response of the system. An ideal
filter will pass the amplitude of the frequency components of a deterministic signal,
unattenuated, which lie in its passband.
The output energy spectrum is given by

|Y ( jω)|2 = Y ( jω)Y ∗ ( jω)


= H ( jω)X ( jω)H ∗ ( jω)X ∗ ( jω) = |H ( jω)|2 |X ( jω)|2

The quantity |H ( jω)|2 is called the energy transfer function, as it relates the input
and output energy spectral densities of a system. An ideal filter will pass the average
power of the frequency components of a random signal, unattenuated, which lie in
its passband.

9.3 Fourier Transform of Mixed Class of Signals

Fourier transform version of the Fourier analysis is its most general version. It is
capable of representing all types of signals. Therefore, it is the only version that can
be used for the analysis of mixed class of signals. In both the time and frequency
domains, the FT is continuous and aperiodic. Using scaled and shifted continuous
impulses, the FT represents other classes of signals. If its spectrum is sampled, then
we get a periodic version of the time-domain signal corresponding to the FS represen-
tation of signals. If the time-domain signal is sampled, then we get a periodic version
272 9 The Fourier Transform

of the spectrum corresponding to the DTFT representation of signals. The sampling


interval in one domain determines the period in the other domain. By carrying out
sampling in both the domains, we get the DFT version of signal representation.

9.3.1 The FT of a Continuous Periodic Signal

The FS representation of a periodic signal x(t) in terms of its FS coefficients


Xfs (k) is
∞
x(t) = Xfs (k)ejkω0 t ,
k=−∞

where ω0 is the fundamental frequency.


In the FT representation of a continuous periodic signal, the discrete impulses in
the FS spectrum are changed to continuous impulses, scaled by the FS coefficients
Xfs (k) and shifted by kω0 , the frequency of the signal. The FT of ejkω0 t is 2πδ(ω −
kω0 ). Then, from the linearity property of the FT, we get

 ∞

x(t) = Xfs (k)e jkω0 t
↔ X ( jω) = 2π Xfs (k)δ(ω − kω0 ) (9.9)
k=−∞ k=−∞

Therefore, the FT of a periodic signal is a sum of continuous impulses of strength


2πXfs (k) occurring periodically with period ω0 . Then, the FT representation of x(t)
becomes  ∞ ∞

1
x(t) = 2π Xfs (k)δ(ω − kω0 ) ejωt d ω
2π −∞
k=−∞

Example 9.9 Find the FT of the signal x(t) = sin(2t).


Solution
The FS spectrum for sin(2t) is

−j
(δ(k − 1) − δ(k + 1)), ω0 = 2
2
Multiplying this result by 2π and replacing the discrete impulses by the corresponding
continuous impulses, we get the FT pair

sin(2t) ↔ −jπ(δ(ω − 2) − δ(ω + 2))

In general,
cos(ω0 t + θ) ↔ π(e−jθ δ(ω + ω0 ) + ejθ δ(ω − ω0 ))
9.3 Fourier Transform of Mixed Class of Signals 273

(a) (b)
0.5 FS FT
X fs (k)/j

X(j )/j
0 0

-0.5 -
-2 0 2 -2 0 2

Fig. 9.6 a The FS spectrum, Xfs (k), of sin(2t); b the FT, X ( jω), of sin(2t)

The FS and FT spectra of sin(2t) are shown in Fig. 9.6a, b, respectively. Finding the
IFT, we get
 ∞
1 1 j2t
x(t) = (−jπ) (δ(ω − 2) − δ(ω + 2))ejωt d ω = (e − e−j2t ) = sin(2t)
2π −∞ j2

The spectra in Fig. 9.6a, b are equivalent representations of the same waveform
sin(2t) by the FS and the FT.

9.3.2 The FT of a Sampled Signal and the Aliasing Effect

While most naturally occurring signals are continuous, as digital processing is advan-
tageous, the signal has be digitized invariably. The sampling interval is an important
parameter in this process. In this section, we study the relation between the sampling
interval and the aliasing effect. In the last section, we sampled the FT spectrum to
determine the FT of a periodic signal. Now, we are going to sample the time-domain
waveform to study the characteristics of the resulting periodic spectrum. The period
of this spectrum is ωs = 2π/Ts , where Ts is the sampling interval in the time domain.
Two completely equivalent expressions for the spectrum of a sampled signal are
derived. Once we represent a continuous signal by samples at discrete intervals, the
effective frequency range is reduced from infinity to a finite value and its spectrum
becomes periodic. A periodic signal has a FS representation. That is, the periodic
spectrum has a time-domain representation composed of discrete samples. This is
the same as DTFT representation with the time-domain and frequency-domain roles
interchanged in the FS representation. The resulting expression for the spectrum of
a sampled signal is useful for computational purposes. In a later section, we take the
samples of a continuous signal and approximate its spectrum using the DFT.
The other point of view of a sampled signal is to consider it is as a sequence of
continuous impulses. The continuous signal is multiplied by a sampling train to get
the sequence of continuous impulses. Multiplication in the time domain becomes
274 9 The Fourier Transform

convolution of their spectra in the frequency domain. The FT of the impulse train
is also an impulse train in the frequency domain. Convolution of a signal with an
impulse is relocating it at the location of the impulse. Therefore, using this approach,
the spectrum of the sampled signal is represented as a periodic repetition of that
of the continuous signal being sampled. This representation enables us to visualize
the spectrum from a knowledge of that of the continuous signal. Further, it clearly
demonstrates the aliasing effect. It helps to truncate the bandwidth of an infinite
extent spectrum to a finite extent so that a sufficiently short sampling interval can be
selected to sample a continuous signal.
A continuous periodic unit-impulse train is given by


s(t) = δ(t − nTs ),
n=−∞

where Ts is the period and n is an integer. The FS representation of the impulse train,
from Chap. 7, is given as

1  jkωs t 2π
s(t) = e , ωs =
Ts Ts
k=−∞

Let x(t) ↔ X ( jω). A sampled function is a sum of impulses. By multiplying x(t)


with an impulse train, we get its sampled version, xs (t). Therefore,

 ∞

xs (t) = x(t)s(t) = x(t) δ(t − nTs ) = x(nTs )δ(t − nTs )
n=−∞ n=−∞

The sampled signal xs (t), which is the product of x(t) and s(t), is also given by, using
the FS representation of the impulse train,

1  1
xs (t) = x(t)ejkωs t = (· · · + x(t)e−jωs t + x(t) + x(t)ejωs t + · · · )
Ts Ts
k=−∞

Let xs (t) ↔ Xs ( jω). Then, from the linearity and frequency-shift properties of the
FT, we get

1
Xs ( jω) = (· · · + X ( j(ω + ωs )) + X ( jω) + X ( j(ω − ωs )) + · · · )
Ts

1 
= X ( j(ω − kωs )) (9.10)
Ts
k=−∞

Equation (9.10) expresses the FT spectrum of the sampled signal Xs ( jω) as a scaled
periodic repetition of X ( jω). The factor T1s arises from the fact that
9.3 Fourier Transform of Mixed Class of Signals 275

 ∞ ∞

x(t) = x(τ )δ(t − τ )d τ = lim x(nTs )Ts δ(t − nTs ) = lim Ts xs (t)
−∞ Ts →0 Ts →0
n=−∞

The spectrum becomes periodic, since sampling reduces the infinite frequency range
to a finite one. The longer is the sampling interval, the shorter is the unique frequency
range available for the representation of the signal.
This form of representation of the FT spectrum of a sampled signal makes it easy
to visualize the spectrum from a knowledge of X ( jω). If the spectrum X ( jω) is
band-limited and the period of Xs ( jω) is longer than the bandwidth of X ( jω), then
there will be no overlap between the copies of X ( jω) in Xs ( jω). If this condition is
fulfilled, by lowpass filtering, we can recover X ( jω) from Xs ( jω) and x(t) can be
reconstructed exactly from its samples. This is the ideal situation. In practice, X ( jω)
usually has a long tail so that there will be some overlap between the copies of X ( jω)
in Xs ( jω), resulting in aliasing in the frequency domain. It has to be ensured that the
sampling interval in the time domain is sufficiently short to keep the distortion of
the reconstructed signal, due to aliasing, negligible. If the spectrum is sampled, then
aliasing occurs in the time domain.
Figure 9.7a, b show, respectively, the continuous sinc function and its aperiodic
FT spectrum.
 
sin π2 t π π
x(t) = ↔ X ( jω) = u ω + −u ω−
πt 2 2

The signal is continuous and its spectrum is aperiodic, with value 1 between ω = − π2
to ω = π2 . The peak value of the sinc function is 0.5.
Figure 9.7c, d show the sampled sinc function, with Ts = 0.5, and its periodic FT

spectrum with period 0.5 = 4π rad and amplitude 0.5 1
= 2.

∞  
 sin π2 (0.5n)
xs (t) = δ(t − 0.5n) ↔
n=−∞
π(0.5n)

 π π
Xs ( jω) = 2 u ω + − 4kπ − u ω − − 4kπ
2 2
k=−∞

At any discontinuity of the time-domain function, the strength of the sample should
be equal to the average value of the right- and left-hand limits.
The sampled signal is a sum of impulses and

δ(t − nTs ) ↔ e−jnωTs

Therefore, due to the linearity property of the FT,



 ∞

xs (t) = x(nTs )δ(t − nTs ) ↔ Xs ( jω) = x(nTs )e−jnωTs (9.11)
n=−∞ n=−∞
276 9 The Fourier Transform

(a) (b)

(c) (d)

(e) (f)

(g) (h)

(i) (j)

sin( π t )
Fig. 9.7 a The sinc function πt2 and b its FT spectrum; c samples of a with Ts = 0.5 s and d
its periodic FT spectrum; e discrete samples of a with Ts = 0.5 s and f its DTFT spectrum with
period 4π rad, which is the same as in d; g the same samples as in e with Ts = 1 and h its DTFT
spectrum with period 2π rad; i samples of a with Ts = 2 s and j its periodic DTFT spectrum with
period π radians

This form for Xs ( jω) implies that it is similar to the FS with the roles of the time
and frequency domains interchanged and corresponds to the DTFT. The time-domain
samples x(nTs ) are the FS coefficients of the corresponding continuous periodic spec-
trum Xs ( jω). Equation (9.11) is, of course, completely equivalent to that in Eq. (9.10)
and they express the FT of a sampled signal in different forms.
9.3 Fourier Transform of Mixed Class of Signals 277

9.3.3 The FT and the DTFT of Sampled Aperiodic Signals

Let x(nTs ) be the discrete sequence constructed from the sampled signal x(nTs )δ(t −
nTs ) with the amplitude of x(nTs ) being the same as the strength of the corresponding
continuous impulse. The DTFT of x(nTs ) is defined as


X (ejωTs ) = x(nTs )e−jnωTs (9.12)
n=−∞

The expressions in Eqs. (9.10) and (9.11), defining the FT of the sampled signal
and the DTFT, Eq. (9.12), of the corresponding discrete sequence yield the same
spectrum. Figure 9.7e, f show, respectively, the discrete samples of the sinc function
x(0.5n) = (π(0.5n)
sin π2 (0.5n))
with Ts = 0.5 s and its DTFT spectrum with period 4π rad,
which is the same as in (d).
As scaling the frequency axis is easier than computing the DTFT with the sampling
interval in the defining equation, the DTFT is usually computed assuming that Ts =
1 s. Then, the frequency axis is rescaled. Figure 9.7g, h show, respectively, the samples
as in (e) with Ts = 1 s and its DTFT spectrum with period 2π rad. The FT of the
corresponding sampled continuous signal xs (t) is obtained by scaling the frequency
axis of this DTFT spectrum so that the period of the spectrum becomes 2π Ts
, as can
be seen from Figs 9.7g, h, c, and d.
If the sampling frequency is not greater than two times that of the frequency
of highest frequency component of the signal, we get a corrupted version of its FT
spectrum, as shown in Fig. 9.7i, j, since the periodic repetition of X ( jω) results in the
overlapping of its nonzero portions. Further, the sine component at half the sampling
frequency cannot be properly represented. With Ts = 2, except at t = 0, we get zero
sample values of the time-domain signal.
∞  
 sin π2 (2n)
x(nTs ) = ↔
n=−∞
π(2n)

 π π
X (ejωTs ) = 0.5 u ω + − kπ − u ω − − kπ
2 2
k=−∞

9.3.4 The FT and the DFT of Sampled Periodic Signals

With continuous signals, both the time-domain form and its spectrum cannot be
periodic. Only in the case of the DFT, both the time- and frequency-domain forms
can be periodic with the signal expressed as a linear combination of discrete harmonic
components.
278 9 The Fourier Transform

Assuming that a periodic signal x(t) is band-limited, its FT from Eq. (9.9) is


N 
N
x(t) = Xfs (k)e jkω0 t
↔ X ( jω) = 2π Xfs (k)δ(ω − kω0 ),
k=−N k=−N

where ω0 = 2π
T
, the fundamental frequency of x(t). The FT pair for the impulse train
is

 ∞
2π 
s(t) = δ(t − nTs ) ↔ S( jω) = δ(ω − mωs )
n=−∞
Ts m=−∞

with the period in the time domain being Ts = 2π ωs


.
Let us sample the periodic signal, x(t). The FT Xs ( jω) of the sampled signal
xs (t) = x(t)s(t) is the convolution 2π
1
X ( jω) ∗ S( jω). As convolution of a signal with
an impulse is the relocation of the origin of the signal at the location of the impulse,
the FT is

2π  
N
Xs ( jω) = Xfs (k)δ(ω − kω0 − mωs )
Ts m=−∞
k=−N

As X (k) = (2N + 1)Xfs (k), where X (k) is the DFT of the 2N + 1 discrete samples
of x(t) over one period, we get


xs (t) = x(nTs )δ(t − nTs ) ↔ Xs ( jω)
n=−∞

∞ 
N

= X (k)δ(ω − kω0 − mωs )
(2N + 1)Ts m=−∞
k=−N

The period of the time-domain signal x(n) of the DFT is 2N + 1 samples and that
of corresponding sampled continuous signal xs (t) is (2N + 1)Ts = T s. The period
of the FT spectrum is ωs = 2πTs
rad and the spectral samples are placed at intervals of
ω0 = (2N +1)Ts = T rad.
2π 2π

The discrete samples of the continuous cosine wave cos( 2π


8
t) with sampling inter-
val Ts = 0.5 s and its DFT spectrum are shown, respectively, in Fig. 9.8a, b. The
waveform and its spectrum are periodic with period N = 16 samples. The sam-
pled continuous version of the cosine wave is shown in Fig. 9.8c, which is periodic
with period NTs = T = 8 s. The corresponding FT spectrum is shown in Fig. 9.8d,
which is periodic with period 2πTs
= 4π rad. The sampling interval of the spectrum is
π

NTs
= 8 = 4 rad. The FT pair for the waveform is

9.3 Fourier Transform of Mixed Class of Signals 279

(a) (b)
8
1 N=16 DFT

X(k)
x(n)

Period=16 samples
-1
0
0 5 10 15 0 5 10 15
n k
(c) (d)
2
1 T s =0.5 FT

0.5

X s(j )
x s(t)

0
-0.5
Period=4
-1
0
0 2 4 6 0 2 3
t seconds

Fig. 9.8 a The discrete samples of the continuous cosine wave cos( 2π
8 t) with sampling interval
Ts = 0.5 s and b its DFT spectrum; c the sampled version of the cosine wave cos( 2π
8 t) and d its
periodic FT spectrum


  

xs (t) = cos (0.5n) δ(t − 0.5n) ↔
n=−∞
8
∞     
2π 2π 2π
Xs ( jω) = 8δ ω − − 4mπ + 8δ ω + − 4mπ
(16)(0.5) m=−∞ 8 8

Both the DFT and FT spectra are equivalent representations of the same waveform.
The 16-point DFT spectrum, with amplitude 8 at k = 1 and k = 15, indicates a cosine
waveform cos( 2π 16
n). Given that the sampling interval is 0.5 s, the corresponding
continuous waveform is cos( 2π 8
t).
The term 4mπ in the FT representation indicates that the spectrum is periodic
with period 4π rad and, hence, the sampling interval in the time domain is 0.5 s.
The strength 8/16 of the 2 impulses is Xfs (±1) = 0.5. The product (2π)(0.5) = π
indicates that the amplitude of the cosine waveform is 1 with frequency 2π 8
rad. The
value 0.5 in the denominator also indicates that the sampling interval is 0.5 s.
280 9 The Fourier Transform

9.3.5 Reconstruction of the Continuous Signal


from Its Sampled Version

A continuous signal is usually converted to digital form, processed, and reconstructed


from its sampled version. In theory, the signal can be reconstructed exactly, if it is
properly sampled. The major step in this process is passing the sampled signal through
a lowpass filter. Ideal reconstruction requires ideal filter.
A commonly used filter for practical reconstruction is the zero-order hold filter.
This filter is the simplest to approximate a continuous signal x(t) from its sampled
version xs (t). When an impulse is applied, its response is a rectangular pulse of unit
height and width Ts , h(t) = u(t) − u(t − Ts ), where Ts is the sampling interval of
xs (t). When xs (t) is passed through this filter, it holds the current sample value until
the next sample arrives. The output signal, which is a staircase approximation of
x(t), is the convolution of xs (t) and h(t). Convolution of a signal with an impulse is
relocating it at the location of the impulse. Therefore, the convolution of xs (t), which
is a sum of impulses, with h(t) results in replacing each impulse of xs (t) by a pulse
of width Ts and height equal to its strength.

9.4 Applications of the Fourier Transform

9.4.1 Transfer Function and the System Response

The input–output relationship of a LTI system is usually based on the impulse


response in the time domain or the transfer function (frequency response) in the
frequency domain. The convolution operation, in the time domain, is based on decom-
posing the input signal into scaled and shifted impulses. The transfer function model
is based on the frequency response of the system. As convolution operation corre-
sponds to multiplication in the frequency domain, we get
 ∞
y(t) = x(τ )h(t − τ )d τ ↔ Y ( jω) = X ( jω)H ( jω),
−∞

where x(t), h(t), and y(t) are, respectively, the system input, impulse response, and
output, and X ( jω), H ( jω), and Y ( jω) are their respective transforms. The entity in
the frequency domain, H ( jω), is called the transfer function, since multiplying it
with the input yields the output. The transfer function is the transform of the impulse
response and the system representations in the respective domains are equivalent.
An impulse in the time domain has a uniform transform in the frequency domain,
with each frequency component having the same magnitude and zero phase. There-
fore, the output of a system in the frequency domain for an impulse input is called
its frequency response, in addition to transfer function.
9.4 Applications of the Fourier Transform 281

The frequency of a sinusoidal or complex exponential input signal remains the


same in any part of a LTI system, with only changes in magnitude and phase.
Therefore, an exponential Aej(ωa t+θ) or a real sinusoidal input signal A cos(ωa t +
θ) is changed to (|H ( jωa )|A)ej(ωa t+(θ+∠(H ( jωa )))) and (|H ( jωa )|A) cos(ωa t + (θ +
∠(H ( jωa )))), respectively, at the output. The steady-state response of a stable sys-
tem to the causal input Aej(ωa t+θ) u(t) is also the same.
The transfer function can also be characterized as the ratio of the transforms of
the output and input of the system, H ( jω) = XY (( jω) jω)
. It is assumed that the system
is initially relaxed (zero input conditions) and X ( jω) is nonzero over the range of
frequencies of interest.
The differential equation characterizing a system in the time domain becomes an
algebraic equation in the frequency domain, as the transform of the derivative of a
signal is the transform of the signal multiplied by a factor. Consider the second-order
differential equation of a stable and initially relaxed LTI continuous system.

d 2 y(t) dy(t) d 2 x(t) dx(t)


2
+ a1 + a0 y(t) = b2 2
+ b1 + b0 x(t)
dt dt dt dt
Taking the FT of both sides, we get

( jω)2 Y ( jω) + a1 ( jω)Y ( jω) + a0 Y ( jω) =


( jω)2 b2 X ( jω) + b1 ( jω)X ( jω) + b0 X ( jω)

The transfer function H ( jω) is obtained as

Y ( jω) ( jω)2 b2 + ( jω)b1 + b0


H ( jω) = =
X ( jω) ( jω)2 + a1 ( jω) + a0

Example 9.10 Find the steady-state current i(t), using the FT, in the series circuit,
consisting of a resistance R and an inductance L, excited by the input voltage Eej(ωt+θ) .
Given that R = 10 , L = 0.01 H, E = 100, θ = π3 , and ω = 2π60 rad/s. Deduce the
steady-state current i(t), if the excitation is 3 cos(4π60t + π6 )
Solution
The circuit is governed by the differential equation

di(t)
L + Ri(t) = Eej(ωt+θ)
dt
In the frequency domain, we get

Eejθ
(R + jωL)I ( jω) = Eejθ and I ( jω) =
R + jωL
282 9 The Fourier Transform

In the time domain, we get

E
ej(ωt+θ−tan ( R ))
−1 ωL
i(t) = √
R2 + ω 2 L2

Substituting the values, we get

i(t) = 9.3572ej(2π60t+ 3 −0.3605))


π

The response of the system to the input 3 cos(4π60t + π6 ) is y(t) = (3)(0.0798)


cos(4π60t + π6 − 0.6460).

Example 9.11 Find the impulse response, using the FT, of the system governed by
the differential equation

dy(t) dx(t)
+ 2y(t) = 4 + 3x(t)
dt dt
Solution
3 + 4jω 5
H ( jω) = =4−
2 + jω 2 + jω

The impulse response of the system, which is the IFT of H ( jω), is h(t) = 4δ(t) −
5e−2t u(t).

Example 9.12 Find the zero-state response of the system governed by the differential
equation
d 2 y(t) dy(t) d 2 x(t) dx(t)
+ 5 + 6y(t) = + + x(t)
dt 2 dt dt 2 dt

with the input x(t) = e−t u(t).


Solution
( jω)2 + ( jω) + 1
H ( jω) =
( jω)2 + 5( jω) + 6

With X ( jω) = 1
1+jω
,

( jω)2 + ( jω) + 1
Y ( jω) = H ( jω)X ( jω) =
(( jω)2 + 5( jω) + 6)(1 + jω)

Expanding into partial fractions, we get

0.5 3 3.5
Y ( jω) = − +
1 + jω jω + 2 ( jω + 3)
9.4 Applications of the Fourier Transform 283

Taking the IFT, we get the zero-state response

y(t) = (0.5e−t − 3e−2t + 3.5e−3t )u(t)

For all applications where Fourier analysis is suitable, it is preferred since it can be
implemented using fast algorithms. The generalized version of the Fourier analysis,
the Laplace transform, is suitable for stable and unstable system analysis and design
with or without initial conditions.

9.4.2 Ideal Filters and Their Unrealizability

Filters are important components in signal and system analysis. The major types
of filters, such as lowpass or highpass, are presented using ideal filter models. As
always, in designing engineering devices, both the theoretical and practical aspects
must be considered. In essence, the ideal characteristics of devices designed using
the theory can be achieved only with acceptable limitations in practice. We consider
the limitations in the realization of practical filters.
The ideal frequency response of a lowpass filter is shown in Fig. 9.9. As the
response is even-symmetric, the specification of the response over the interval from
ω = 0 to ω = ∞, shown in thick lines, characterizes a filter.

1 for 0 ≤ ω < ωc
|H ( jω)| =
0 for ω > ωc

In the passband, from ω = 0 to ω = ωc , the filter, with gain 1, passes frequency


components of a signal unattenuated and rejects the other frequency components, as
they are in the stopband with gain zero. This behavior is evident from the input–output
relationship in the frequency domain, Y ( jω) = H ( jω)X ( jω). This ideal filter model
is practically unrealizable since its impulse response (IFT of H ( jω)) extends from
t = −∞ to t = ∞, which requires a noncausal system. Practical filters approximate
the ideal filter model to meet a given set of specifications.

Pass
band Stopband
|H(jω)|
1 Lowpass

−ωc 0 ωc ω

Fig. 9.9 The ideal frequency response of a lowpass filter


284 9 The Fourier Transform

The impulse response of physically realizable systems must be causal. The even
and odd components, for t > 0, of a causal time function x(t) are given as

x(t) + x(−t) x(t) x(t) − x(−t) x(t)


xe (t) = = and xo (t) = =
2 2 2 2
That is,
x(t) = 2xe (t) = 2x0 (t), t > 0 and xe (t) = −x0 (t), t < 0

The FT of an even real signal is real and even and that of an odd signal is imaginary
and odd. Therefore, x(t) can be obtained by finding the inverse FT of either the real
part or the imaginary part of its spectrum X ( jω). That is,
 ∞  ∞
2 2
x(t) = Re(X ( jω)) cos(ωt)d ω = − Im(X ( jω)) sin(ωt)d ω, t > 0
π 0 π 0

For example, the unit-step signal u(t) can be expressed as

1
u(t) = 0.5 + 0.5sgn(t) ↔ πδ(ω) +

Now,
u(t) = 2ue (t) = 2u0 (t), t > 0 and ue (t) = −u0 (t), t < 0

The point is that the real and imaginary parts or, equivalently, the magnitude and the
phase of the FT of a causal signal are related. This implies that there are constraints,
for the realizability, on the magnitude of the frequency response, H ( jω), of a practical
filter. These constraints are given by the Paley–Wiener criterion as
 ∞
| loge |H ( jω)||
dω < ∞
−∞ 1 + ω2

To satisfy this criterion, the magnitude of the frequency response |H ( jω)| can be
zero at discrete points but not over any continuous band of frequencies. If H ( jω) is
zero over a band of frequencies, | loge |H ( jω)|| = ∞ and the condition is violated.
However, despite zeros of H ( jω) at a finite set of discrete frequencies, the value of the
integral may still be finite, although the integrand is infinite at these frequencies. In
addition, any transition of this function cannot vary more rapidly than by exponential
order. Obviously, the frequency response of the ideal filters fails to meet the Paley–
Wiener criterion. Further, an infinite order filter is required to have a flat passband.
Therefore, neither the flatness of the bands nor the sharpness of the transition between
the bands of ideal filters is realizable by practical filters.
9.5 Approximation of the Fourier Transform 285

9.5 Approximation of the Fourier Transform

As the FT is continuous and aperiodic in both the domains and the DFT is discrete
and periodic, both the sampling interval and record length have to be fixed in approx-
imating the samples of the FT by the DFT. The criteria in selecting these parameters
are that both the reconstructed signal and its spectrum must be adequate represen-
tations of the signal. The defining integrals of the FT and the IFT are approximated
using the rectangular rule of numerical integration. As periodicity is assumed in DFT
and IDFT computation, the sampling can start at t = 0 or ω = 0. The given truncated
signal or spectrum, whatever range it is defined, can be periodically extended for this
purpose.
The problem of numerical integration is the numerical evaluation of a definite
integral. That is, to find the area under the given function between the given limits.
Using the rectangular rule of integration, we divide the period T into N intervals of
width Ts = NT and represent the signal at N points as

     
T T T
x(0), x ,x 2 , . . . , x (N − 1)
N N N

Then, the total area is the sum of those of the N rectangles. The sampling interval in
the time domain is Ts s and that in the frequency domain is NT 2π
s
= 2π
T
rad/s.
The FT definition is approximated as
  
N −1
2πk
x(nTs )e−j N nk , k = 0, 1, . . . , N − 1

X j = Ts (9.13)
NTs n=0

The IFT definition is approximated as

N −1  
1  2πk j 2π nk
x(nTs ) = X j e N , n = 0, 1, . . . , N − 1 (9.14)
NTs NTs
k=0

The approximate samples of the FT spectrum are obtained by multiplying the DFT
coefficients of the samples of the input signal by the sampling interval Ts . By dividing
the IDFT values of the samples of the input FT spectrum by Ts , we get the approximate
samples of the time-domain signal.

Example 9.13 Find the approximate samples of the FT magnitude spectrum of the
signal x(t) = e−2t u(t) using the DFT.
Solution
1 1 1
X ( jω) = and |X ( jω)| = √ ≈ for ω >> 2
2 + jω 4 + ω2 ω
286 9 The Fourier Transform

(a) 1
(b)
-2t
e u(t) 0.6
T =4
N =4 0.5

|X(j )|
x(t)

0.5

0 0
0 1 2 3 0 1 2 3
- 2 - 2 - 2
t 4 4 4

(c) 0.5 (d) 1


e -2t u(t) T =4
N = 400
|X(j )|

x(t)
0.5

0 0
0 6 50 100 0 1 2 3
t

Fig. 9.10 a The exponential waveform x(t) = e−2t u(t), with 4 samples over the range 0 ≤ t < 4;
b the magnitude of the FT (solid line) and the samples of the FT obtained through the DFT with
N = 4 (dots) and N = 1024 (crosses) samples; c the magnitude of the FT obtained through the
DFT with N = 1024 samples; d the partially and fully reconstructed waveform

Figure 9.10a shows the exponential signal e−2t u(t) with 4 samples over a record
length of T = 4 s. The record length has to be sufficiently long so that the amplitude
or power of the signal becomes negligible beyond the record length chosen. With
T = 4, e−8 = 0.00033546, which is very small compared with the peak value of the
signal 1. Figure 9.10b shows the magnitude of the FT and the samples of the FT
obtained through the DFT with N = 4 and N = 1024 samples. The 4 sample values
of the signal in Fig. 9.10a are

{0.5000, 0.1353, 0.0183, 0.0025}

It should be remembered that the number of samples has to be quite large for adequate
representation. To make the calculation simple for illustration purpose, we use 4
samples. As the first sample value occurs at a discontinuity, it is assigned the average
of the left- and right-hand limits of the discontinuity. The bandwidth of the signal is
also infinite. As with typical practical signals, the spectral values become negligible
beyond some finite range. The magnitudes of the DFT of these values, after scaling
by Ts = 1 s, are
{0.6561, 0.4997, 0.3805, 0.4997}
9.5 Approximation of the Fourier Transform 287

The corresponding complex values are

{0.6561, 0.4817 − j0.1329, 0.3805, 0.4817 + j0.1329}

For example, the DC coefficient 0.6561 is the sum of the input samples. As the
second half of the DFT spectrum is redundant, only the first three values are useful.
The magnitudes of the first 5 samples of the FT, X ( jω), are

{0.5000, 0.3932, 0.2685, 0.1953, 0.1517}

The corresponding complex values are

{0.5, 0.3092 − j0.2429, 0.1442 − j0.2265, 0.0763 − j0.1798, 0.0460 − j0.1445}

With ω = 0, we get X ( jω) = 0.5. Since the sampling interval Ts = 1 s is too long,
due to aliasing, the spectral samples obtained by the DFT are very inaccurate. For
example, with N = 4 samples, the DC coefficient is aliased with every fourth spectral
sample. Adding all the aliased components, the spectral value becomes 0.6561. In
a similar manner, all the coefficients get aliased. The magnitudes of the first few of
the DFT values, with Ts = 0.5 s, are

{0.5407, 0.4100, 0.2499, 0.1523}

The magnitudes of the first few of the DFT values, with Ts = 0.25 s, are

{0.5102, 0.3965, 0.2610, 0.1779, 0.1249, 0.0877, 0.0598}

The aliasing gets reduced and the accuracy improves with more samples, as expected.
The magnitudes of the first five samples of the FT obtained through the DFT with
N = 1024 are
{0.4998, 0.3931, 0.2684, 0.1953, 0.1516}

The DFT values are quite close to the theoretical values. For an arbitrary wave-
form, with no FT expression available, one has to resort to trial and error method
in approximating the FT spectrum. In general, the DFT values will never be exactly
equal to the analytical values, but they can be made adequate, for practical purposes,
by selecting appropriate sampling interval and record length. If the number of spec-
tral samples are insufficient to represent the spectrum properly (picket-fence effect),
for a given record length, the signal may be zero padded to increase the number of
spectral samples.

A similar procedure for the approximation of the IFT is required. Now, we have
to fix the record length of the spectrum. The spectrum, as shown in Fig. 9.10c for
positive values of ω (the spectrum is conjugate-symmetric), is slowly decaying and
is of infinite extent. The cutoff frequency has to be selected to suit the accuracy
288 9 The Fourier Transform

requirements. The magnitude of the spectrum is approximately 1/ω for large values
of ω. The peak value of the spectrum is 0.5. If we want to discard the values of
the spectrum those are less than one-hundredth of the peak, then ω = 200 rad is the
cutoff frequency. Of course, the cutoff frequency can also be fixed based on signal
energy.
In contrast to most signals in the time domain, the spectra of signals are almost
always two-sided. For real signals, the spectrum is conjugate-symmetric and, usu-
ally, the positive frequency side is shown, as can be seen in Fig. 9.10b, c. For the
example waveform, the record length T in the time domain is 4 s and ωs , the sampling
frequency of the spectrum is π/2 rad.
Let the sampling interval of the reconstructed signal be Ts s. Then, the record
length of the reconstructed signal is NTs s, where N is the number of samples. Let
the number of samples N be 7 and the sampling interval Ts be 0.2 s. Then, the record
length T in the time domain is 1.4 s. Let the frequency increment be 2.5π. Then, the
4 samples of the FT spectrum at

ω = {0, 7.8540, 15.7080, 23.5619}

are
{0.5, 0.0304 − j0.1196, 0.0080 − j0.0626, 0.0036 − j0.0421}

Conjugating the last 3 spectral samples and concatenating in the reverse order, we
get

{0.5, 0.0304 − j0.1196, 0.008 − j0.0626, 0.0036 − j0.0421, 0.0036


+ j0.0421, 0.008 + j0.0626, 0.0304 + 0.1196}

The IDFT of these values divided by Ts = 0.2 are

{0.4171, 0.6240, 0.4210, 0.3868, 0.2611, 0.2597, 0.1302, }

shown in Fig. 9.10d. The actual samples of e−2t at

t = {0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2}

are
{1, 0.6703, 0.4493, 0.3012, 0.2019, 0.1353, 0.0907}

The fully reconstructed waveform, with N = 400 and T = 4, is also shown in


Fig. 9.10d.
The appropriate sampling interval and record length, to approximate the FT of
an arbitrary signal, are fixed by a trial and error procedure. First, we select an initial
record length based on the signal magnitude or energy. Then, the DFT of the sam-
ples of the signal is computed with an initial sampling frequency. Then, we keep on
9.5 Approximation of the Fourier Transform 289

doubling the frequency so that the spectral values at the middle of the spectrum
(around X (N /2)) become negligible for real signals. For complex signals, the spec-
tral values should become negligible at the end of the spectrum. That frequency is
appropriate for sampling the signal. Once the sampling frequency is fixed, we keep
increasing the record length and compute the DFT of the samples. When the DFT
values are almost the same for two consecutive record lengths, the record length is
fixed. Further, zero pad the signal sufficiently and compute the DFT so that the there
is no picket-fence effect.

9.6 Summary

• The FT is the most general version of the Fourier analysis. It can represent all types
of signals and, therefore, most useful in the analysis of mixed class of signals in
addition to the analysis of continuous aperiodic signals.
• The FT is primarily used in the analysis of continuous aperiodic signals. The
spectrum is also continuous and aperiodic.
• The FT can be considered as the limiting case of the FS with the period of the
waveform tending to infinity. The FT can also be considered as the limiting case
of the DTFT with the sampling interval of the time-domain sequence tending to
zero.
• The FT spectrum is a relative amplitude spectrum.
• The FT is defined by an infinite integral. Therefore, a sufficient condition for its
existence is that the time-domain signal is absolutely integrable.
• The FT can be effectively approximated by the DFT in practical applications.

Exercises
9.1 Find the FT of the rectangular pulse x(t) = u(t + 3) − u(t − 3) using the defining
integral. Find X ( j0) and X ( j0.5π).
* 9.2 Find the FT of the signal x(t) = e−2t cos(3t)u(t), a > 0 using the defining
integral. Find X ( j0) and X ( jπ).
9.3 Find the FT of the signal x(t) = e−2|t| using the defining integral. Find X ( j0)
and X ( j2).
9.4 Find the FT of the signal

cos(2t) for |t| < 2


x(t) =
0 for |t| > 2

using the defining integral. Find X ( j0) and X ( jπ).


9.5 Find the FS spectrum, from the FT of its one period, of the periodic signal x(t),
one period of which is defined.
290 9 The Fourier Transform

* 9.5.1
x(t) = t, for 0 < t < 1

9.5.2
x(t) = sin(t), for 0 < t < π

9.6 Using the duality property, find the FT of the signal x(t).
9.6.1. x(t) = 2π(3+jt)
1
.

* 9.6.2. x(t) = 2π πδ(t) + jt1 .
1

9.6.3. x(t) = 4
π(16+t 2 )
.
9.7 Using the linearity and frequency-shifting properties, find the FT of x(t).
9.7.1 x(t) = 2 sin(3t) cos(3t).
9.7.2
x(t) = cos(3t) cos(2t) − sin(3t) sin(2t)

* 9.7.3

sin(3t) for |t| < 2


x(t) =
0 for |t| > 2

9.8 Find the convolution of x(t) and h(t) using their FT.
9.8.1

1 for − 0.5 < t < 0.5


x(t) =
0 otherwise

and h(t) = x(t).


* 9.8.2 x(t) = e−5t u(t) and h(t) =
e−4t u(t).
1 for − 0.5 < t < 0.5
9.8.3 x(t) = e−2t u(t) and h(t) =
0 otherwise
9.9 Find the FT of the product of x(t) and h(t) using the frequency-domain convo-
lution property.
* 9.9.1 x(t) = cos(3t) and h(t) =
u(t).
1 for |t| < 3
9.9.2 x(t) = cos(2t) and h(t) =
0 otherwise
9.9.3 x(t) = e−t and h(t) = x(t)
9.10 Find the FT of the signal x(at) in terms of that of x(t), using the time-scaling
property.
9.10.1 x(t) = sin(2t) and a = −3.
9.10.2 x(t) = e−6t u(t) and a = 13 .
* 9.10.3 x(t) = u(t − 6) and a = 3.
9.11 Find the FT of the derivative of the signal x(t) in terms of that of x(t), using the
time-differentiation property.
9.6 Summary 291

9.11.1 x(t) = cos(3t).


9.11.2 x(t) = u(t).
* 9.11.3

t for 0 < t < 2


x(t) =
0 otherwise

9.12 Find the FT of y(t), where


 t
y(t) = x(τ )d τ
−∞

in terms of the FT of x(t), using the time-integration property.


9.12.1 x(t) = δ(t + 2).
9.12.2 x(t) = sin(2t).
* 9.12.3 x(t) = e−2t u(t)
9.13 Find the energy of the signal x(t) = e−t u(t) in the time domain. Find the value
of T such that 90% of the signal energy lies in the range 0 ≤ t ≤ T . What is the
corresponding signal bandwidth B.
9.14 Find the FT of the signal x(t).
* 9.14.1  
2π π
x(t) = sin t+ .
8 6

9.14.2  
2π π
x(t) = cos t+ .
8 4

9.15 Find the FT of x(t). Find the FT of the sampled version xs (t) of x(t) in 2 different
forms with sampling interval Ts = 1 and Ts = 0.5 s. List the sample values of the 3
versions of the spectra at ω = {0, 0.25π, 0.5π, 0.75π, π} and compare the results.
* 9.15.1 x(t) = u(t + 5) − u(t − 5).
9.15.2 x(t) = (t + 1)u(t + 1) − 2tu(t) + (t − 1)u(t − 1).
9.16 Find the DFT of x(t) with sampling interval Ts = 0.5 s. Express the FT repre-
sentation of the sampled xs (t) in terms of the DFT coefficients.
9.16.1  

x(t) = 3 cos 2 t
8

9.16.2  

x(t) = sin t
8
292 9 The Fourier Transform

* 9.16.3  
2π π
x(t) = 2 cos 3 t +
8 3

9.17 Find the steady-state current i(t), using the FT, in the series circuit, consisting
of a resistance R and an inductance L, excited by the input voltage Eej(ωt+θ) . Given
that R = 20 , L = 0.02 H, E = 100, θ = π6 , and ω = 2π60 rad/s.
9.18 Find the impulse response, using the FT, of the system governed by the differ-
ential equation
dy(t) dx(t)
+ y(t) = 2 + 3x(t)
dt dt

* 9.19 Find the zero-state response of the system governed by the differential equation

d 2 y(t) dy(t) d 2 x(t) dx(t)


2
+4 + 3y(t) = + + x(t)
dt dt dt 2 dt

with the input x(t) = e−3t u(t).


9.20 Derive the FT X ( jω) of the signal x(t). Let the record length be T = 5 s. Take
4 uniform samples of x(t) and compute the DFT. Compare the scaled DFT values
with the corresponding samples of X ( jω).
* 9.20.1 x(t) = e−t u(t).
9.20.2 x(t) = te−t u(t).
9.20.3 x(t) = e−t cos(0.2πt)u(t).
9.21 Derive the FT X ( jω) of the signal x(t). Let the frequency increment be
ω = 2.5π rad and time-domain sampling interval be 0.2 s. Take 7 uniform samples
of X ( jω) and compute the IDFT. Compare the scaled IDFT values with the corre-
sponding samples of x(t).
* 9.21.1 x(t) = e− 2 t u(t).
3

9.21.2 x(t) = te−2t u(t).


9.21.3 x(t) = e−2t sin(0.2πt)u(t).
Chapter 10
Fast Computation of the DFT

It is the availability of fast algorithms to compute the DFT that makes Fourier analysis
indispensable in practical applications, in addition to its theoretical importance from
its invention. In turn, the other versions of the Fourier analysis can be approximated
adequately by the DFT. Although the algorithm was invented by Gauss in 1805, it is
the widespread use of the digital systems that has given its importance in practical
applications. The algorithm is based on the classical divide-and-conquer strategy
of developing fast algorithms. A problem is divided into two smaller problems of
half the size. Each smaller problem is solved separately and the solution to the
original problem is found by appropriately combining the solutions of the smaller
problems. This process is continued recursively until the smaller problems reduce
to trivial cases. Therefore, the DFT is never computed using its definition. While
there are many variations of the algorithm, the order of computational complexity
of all of them is the same, O(N log2 N ) to compute a N -point DFT against O(N 2 )
from its definition. It is this reduction in computational complexity by an order that
has resulted in the widespread use of the Fourier analysis in practical applications
of science and engineering. In this chapter, a particular variation of the algorithm,
called the PM DFT algorithm, is presented. The algorithm is developed using the
half-wave symmetry of periodic waveforms. This approach gives a better physical
explanation of the algorithm than other approaches such as matrix factorization. The
DFT is defined for any length. However, the practically most useful DFT algorithms
are of length that is an integral power of 2. That is N = 2M , where M is a positive
integer. If necessary, zero padding can be employed to the sequences so that they
satisfy this constraint.

© Springer Nature Singapore Pte Ltd. 2018 293


D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7_10
294 10 Fast Computation of the DFT

10.1 Half-Wave Symmetry of Periodic Waveforms

A physical understanding of the basics of the DFT algorithms can be obtained using
the half-wave symmetry of periodic waveforms. If a given periodic function x(n)
with period N satisfies the condition
 
N
x n± = x(n),
2

then it is said to be even half-wave symmetric.


The samples of the function over any half period are the same as those in the
succeeding or preceding half period. In effect, the period is N /2. If the DFT is
computed over the period N , then the odd-indexed DFT coefficients will be zero.
That is, the function is composed of even-indexed frequency components only.
If a given periodic function x(n) with period N satisfies the condition
 
N
x n± = −x(n),
2

then it is said to be odd half-wave symmetric. The samples of the function over any
half period are the negatives of those in the succeeding or preceding half period. If
the DFT is computed over the period N , then the even-indexed DFT coefficients will
be zero. That is, the function is composed of odd-indexed frequency components
only. It is due to the fact that any periodic function can be uniquely decomposed
into even half-wave and odd half-wave symmetric components. If the even half-
wave symmetric component is composed of the even-indexed frequency components,
then the odd half-wave symmetric component must be composed of the odd-indexed
frequency components. Therefore, if an arbitrary function is decomposed into its
even half-wave and odd half-wave symmetric components, then we have divided the
original problem of finding the N frequency coefficients into two problems, each of
them being the determination of N /2 frequency coefficients. First, let us go through
an example of decomposing a periodic function into its even half-wave and odd
half-wave symmetric components.
An arbitrary periodic sequence x(n) of period N can be expressed as the sum of
its even and odd half-wave symmetric components xeh (n) and xoh (n), respectively, as

x(n) = xeh (n) + xoh (n) (10.1)

in which
   
N N
xeh n ± = xeh (n) and xoh n ± = −xoh (n)
2 2
10.1 Half-Wave Symmetry of Periodic Waveforms 295

(a) (b)
1.7071 1
0.7071
1

x eh(n), x oh(n)
0.2929
x(n)

0 0
-0.2929

-1
-0.7071
-1.7071 -1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
n n

Fig. 10.1 a x(n) = cos( 2π 8 n) + sin(2 8 n); b the odd-indexed frequency component (dots)

cos( 8 n) and the even-indexed frequency component sin(2 2π



8 n)

Adding the two components, we get


 
N
x n± = xeh (n) − xoh (n) (10.2)
2

Solving for the components using Eqs. (10.1) and (10.2), we get
     
1 N 1 N
xeh (n) = x(n) + x n ± and xoh (n) = x(n) − x n ±
2 2 2 2

Figure 10.1a shows the waveform


   
2π 2π
x(n) = cos n + sin 2 n
8 8

The first is the odd-indexed frequency component and the second is the even-indexed.
Figure 10.1b shows the two components of the waveform x(n). The odd-indexed
component is shown by dots and the even-indexed component is shown by the symbol
∗. The samples of x(n) are
 √  √  √  √ 
2 2 2 2
1, 1 + , 0, − 1 + , −1, 1 − , 0, −1 +
2 2 2 2

The samples of xeh (n) are

{0, 1, 0, −1, 0, 1, 0, −1}


296 10 Fast Computation of the DFT

The samples of xoh (n) are


 √ √ √ √ 
2 2 2 2
1, , 0, − , −1, − , 0,
2 2 2 2

It can be verified that x(n) = xeh (n) + xoh (n). The DFT X (k) of x(n) is

{0, 4, −j4, 0, 0, 0, j4, 4}

The DFT Xeh (k) of xeh (n) is

{0, 0, −j4, 0, 0, 0, j4, 0}

The DFT Xoh (k) of xoh (n) is

{0, 4, 0, 0, 0, 0, 0, 4}

It can be verified that X (k) = Xeh (k) + Xoh (k). Due to the reduction in the num-
ber of frequency components, xeh (n) and xoh (n) can be represented by 4 samples.
The dashed line in the middle of Fig. 10.1b indicates the redundancy of data values
of xeh (n) and xoh (n). The problem of computing the 8-point DFT of x(n) has been
reduced to two problems of 4-point DFTs of xeh (n) and xoh (n). This is the essence
of all the DFT algorithms for sequence lengths those are integral powers of 2. While
the sinusoidal waveforms are easy to visualize, as usual, the DFT problem using
the equivalent complex exponential form is required for further description of the
algorithms.
Recursively carrying out the even and odd half-wave symmetric components
decomposition, along with frequency shifting and decimation of the frequency com-
ponents, the frequency components are eventually isolated yielding their coefficients.
In carrying out these operations, the coefficients are scaled and scrambled but remains
unchanged otherwise. The decomposition of a waveform into its symmetric compo-
nents is the principal operation in the algorithm, requiring repeated execution of add–
subtract (plus–minus) operations. Since the frequency components are decomposed
into smaller groups, this type of algorithms is named as the PM DIF DFT algorithms,
where PM stands for (plus–minus) and DIF stands for (decimation-in-frequency).

10.2 The PM DIF DFT Algorithm

A given waveform x(n) can be expressed as the sum of N frequency components


(e.g., with N = 8),
2π 2π 2π 2π
x(n) = X (0)e j0 8 n + X (1)ej1 8 n + X (2)ej2 8 n + X (3)ej3 8 n
2π 2π 2π 2π
+ X (4)ej4 8 n + X (5)ej5 8 n + X (6)ej6 8 n + X (7)ej7 8 n , n = 0, 1, . . . , 7
10.2 The PM DIF DFT Algorithm 297

For the most compact algorithms, the input sequence x(n) has to be expressed as
2-element vectors

N
a0 (n) = {a00 (n), a10 (n)} = 2 xeh (n), xoh (n), n = 0, 1, . . . , − 1
2

The first and second elements of the vectors are, respectively, the scaled even and
odd half-wave symmetric components xeh (n) and xoh (n) of x(n). That is, the DFT
expression is reformulated as

N −1
x(n)e−j N kn , k = 0, 1, . . . , N − 1

X (k) =
n=0
⎧ (N /2)−1    (N /2)−1


N


⎪ x(n) + x n + e −j 2π kn
= a00 (n)e−j N kn , k even


N
2
= (Nn=0
/2)−1   
n=0
(N /2)−1


N


⎪ x(n) − x n + e−j N kn =

a10 (n)e−j N kn , k odd


n=0
2 n=0

The division by 2 in finding the symmetric components is deferred. For the example
shown in Fig. 10.1,

2xeh (n) = a00 (n) = {0, 2, 0, −2}

3
a00 (n)e−j 8 kn , k = 0, 2, 4, 6

X (k) =
n=0

3
a00 (n)e−j 4 kn , k = 0, 1, 2, 3 = {0, −j4, 0, j4}

=
n=0

For the example shown in Figure 10.1,


√ √
2xoh (n) = a10 (n) = {2, 2, 0, − 2}

3
a10 (n)e−j 8 kn , k = 1, 3, 5, 7

X (k) =
n=0

3
(e−j 8 n a10 (n))e−j 4 kn , k = 0, 1, 2, 3 = {4, 0, 0, 4}
2π 2π
=
n=0

In order to reduce this computation to a 4-point DFT, we have to multiply the


samples of a10 (n) by the twiddle factor samples e−j 8 n . This step results in frequency

298 10 Fast Computation of the DFT

shifting of the DFT spectrum and the odd-indexed coefficients become even-indexed.
Therefore, the 8-point DFT becomes a 4-point DFT. The pointwise product of e−j 8 n

and a1 (n) is
0

 √ √ √ √ 
2 2 2 2 √ √
(e−j 8 n a10 (n))

= 1, −j , −j, − −j (2, 2, 0, − 2)
2 2 2 2
= (2, 1 − j1, 0, 1 + j1)

Then,
{2, 1 − j1, 0, 1 + j1} ↔ {4, 0, 0, 4}

The recursive decomposition is continued until all the individual DFT coefficients
are extracted, as shown in Fig. 10.3.
In terms of the frequency components,

a0 (n) = {a00 (n), a10 (n)} = 2{xeh (n), xoh (n)}


2π 2π 2π 2π
= 2{X (0)ej0 8 n + X (2)ej2 8 n + X (4)ej4 8 n + X (6)ej6 8 n ,
2π 2π 2π 2π
X (1)ej1 8 n + X (3)ej3 8 n + X (5)ej5 8 n + X (7)ej7 8 n }, n = 0, 1, 2, 3

The array of vectors a0 (n) is stored in the nodes at the beginning of the signal-
flow graph of the algorithm shown in Fig. 10.2. Although a DFT algorithm can be
expressed in other forms, the signal-flow graph is the most suitable form for its
description. The repetitive nature of the basic computation is evident. The nodes,
shown by discs, store a vector ar (n). Arrows indicate the signal-flow path. The first
elements of vectors stored in a pair of source nodes produce the vector for the sink
node connected by a upward-pointing arrow by add–subtract operation. Any integer
value n near an arrow indicates that the value from a source node has to be multiplied
by e−j N n before the add–subtract operation. The second elements of vectors stored in

a pair of source nodes produce the vector for the sink node connected by a downward-
pointing arrow. There are log2 N − 1 stages of the algorithm. The input nodes are
source nodes and the output nodes are sink nodes. Rest of the nodes serve both as
source and sink nodes.
Each of the two symmetric components has only four frequency components
and four samples are adequate to represent them. The even half-wave symmetric
component is
2π 2π 2π 2π
2(X (0)ej0 8 n + X (2)ej2 8 n + X (4)ej4 8 n + X (6)ej6 8 n )
2π 2π 2π 2π
= 2(X (0)ej0 4 n + X (2)ej1 4 n + X (4)ej2 4 n + X (6)ej3 4 n ), n = 0, 1, 2, 3

The set of frequency coefficients of this component is

2{X (0), X (2), X (4), X (6)}


10.2 The PM DIF DFT Algorithm 299

2π 2π 2π 2π
4{X(0)ej0 4 n +X(4)ej2 4 n , X(2)ej1 4 n +X(6)ej3 4 n }, n = 0, 1
Stage 1 Stage 2
a0 (0) A(0) = 8{X(0), X(4)}

0
a0 (1) 2 A(2) = 8{X(2), X(6)}
2π 2π 2π 2π
4{X(1)ej0 4 n +X(5)ej2 4 n , X(3)ej1 4 n +X(7)ej3 4 n }, n = 0, 1
0
a0 (2) A(1) = 8{X(1), X(5)}
2

1
0
a0 (3) A(3) = 8{X(3), X(7)}
3 2

Fig. 10.2 Signal-flow graph of the PM DIF DFT algorithm, with N = 8. A twiddle factor W8n =

e−j 8 n is indicated only by its variable part of the exponent, n

The set of frequency coefficients of the odd half-wave symmetric component is

2{X (1), X (3), X (5), X (7)}

To reformulate this component as a 4-point DFT, it has to be multiplied by the


exponential e−j 8 n to get

2(X (1)ej1 8 n + X (3)ej3 8 n + X (5)ej5 8 n + X (7)ej7 8 n )e−j 8 n


2π 2π 2π 2π 2π

2π 2π 2π 2π
= 2(X (1)ej0 8 n + X (3)ej2 8 n + X (5)ej4 8 n + X (7)ej6 8 n )
2π 2π 2π 2π
= 2(X (1)ej0 4 n + X (3)ej1 4 n + X (5)ej2 4 n + X (7)ej3 4 n ), n = 0, 1, 2, 3

The multiplication by e−j 8 n (called twiddle factor) is the frequency shifting operation

necessary to shift the spectrum to the left by one sample interval. The twiddle factor
is also written as
e−j 8 n = W8n , W8 = e−j 8
2π 2π

Now, the same process is recursively continued. Decomposing the two 4-point
waveforms into their even and odd half-wave symmetric components, we get
2π 2π 2π 2π
4{X (0)ej0 4 n + X (4)ej2 4 n , X (2)ej1 4 n + X (6)ej3 4 n }, n = 0, 1 (10.3)
2π 2π 2π 2π
4{X (1)ej0 4 n + X (5)ej2 4 n , X (3)ej1 4 n + X (7)ej3 4 n }, n = 0, 1 (10.4)

These vector arrays are stored in the middle nodes in the figure.
300 10 Fast Computation of the DFT

The even half-wave symmetric component of the waveform given by Eq. (10.3)
can be expressed as a 2-point DFT
2π 2π
4(X (0)ej0 4 n + X (4)ej2 4 n )
2π 2π
= 4(X (0)ej0 2 n + X (4)ej1 2 n ), n = 0, 1

with frequency coefficients 4{X (0), X (4)}. The coefficients

A(0) = {A0 (0), A1 (0)} = 8{X (0), X (4)}

are obtained by simply adding and subtracting the two sample values. These coeffi-
cients are stored in the top node at the end of the signal-flow graph in the figure.
The odd half-wave symmetric component of the waveform given by Eq. (10.3) is
multiplied by the exponential e−j 8 (2n) = e−j 4 n to get
2π 2π

4(X (2)ej1 4 n + X (6)ej3 4 n )e−j 4 n


2π 2π 2π

2π 2π
= 4(X (2)ej0 4 n + X (6)ej2 4 n )
2π 2π
= 4(X (2)ej0 2 n + X (6)ej1 2 n ), n = 0, 1

This is a 2-point DFT with frequency coefficients 4{X (2), X (6)}. The coefficients

A(2) = {A0 (2), A1 (2)} = 8{X (2), X (6)}

are obtained by simply adding and subtracting the two sample values. These coeffi-
cients are stored in the second node from top at the end of the signal-flow graph in
the figure.
The even half-wave symmetric component of the waveform defined by Eq. (10.4)
can be expressed as
2π 2π
4(X (1)ej0 4 n + X (5)ej2 4 n )
2π 2π
= 4(X (1)ej0 2 n + X (5)ej1 2 n ), n = 0, 1

This is a 2-point DFT with frequency coefficients 4{X (1), X (5)}. The coefficients

A(1) = {A0 (1), A1 (1)} = 8{X (1), X (5)}

are obtained by simply adding and subtracting the two sample values. These coeffi-
cients are stored in the third node from top at the end of the signal-flow graph shown
in the figure.
The odd half-wave symmetric component of the waveform defined by Eq. (10.4)
is multiplied by the exponential e−j 4 n to get

10.2 The PM DIF DFT Algorithm 301

4(X (3)ej1 4 n + X (7)ej3 4 n )e−j 4 (n)


2π 2π 2π

2π 2π
= 4(X (3)ej0 4 n + X (7)ej2 4 n )
j0 2π j1 2π
= 4(X (3)e 2 n + X (7)e 2 n ), n = 0, 1

This is a 2-point DFT with frequency coefficients 4{X (3), X (7)}. The coefficients

A(3) = {A0 (3), A1 (3)} = 8{X (3), X (7)}

are obtained by simply adding and subtracting the two sample values. These coef-
ficients are stored in the fourth node from top at the end of the signal-flow graph
shown in the figure.
The output vectors {A(0), A(1), A(2), A(3)} are placed in the bit-reversed order.
This order is obtained by reversing the order of bits of the binary number represen-
tation of the frequency indices. {0, 1, 2, 3} is {00, 01, 10, 11} in binary form. The
bit-reversed {00, 10, 01, 11} in binary form is {0, 2, 1, 3} in decimal form. The bit-
reversed order occurs at the output because of the repeated splitting of the frequency
components into odd- and even-indexed frequency indices groups over the stages of
the algorithm. Efficient algorithms are available to restore the natural order of the
coefficients. In digital signal processing microprocessors, specialized instructions
are available to carry out this task. The extraction of the coefficients, multiplied by
8, of x(n) = cos( 2π
8
n) + sin(2 2π
8
n) is shown in Fig. 10.3.
The number of complex multiplications and additions required for each stage are,
respectively, N /2 and N , where N is the sequence length that is a power of 2. With
(log2 N ) − 1 stages and the initial vector formation requiring N complex additions,
the computational complexity of the algorithm is O(N log2 N ) compared with that of
O(N 2 ) required for the direct computation from√ the DFT definition. Multiplication by
twiddle factors of the forms −j and (1 − j1)/ 2 can be handled separately reducing
the number of operations. If further speed up is required, two adjacent stages of the
algorithm can be implemented together. This reduces the number of data transfers
between the processor registers and the memory yielding significant reduction in the
execution time of the algorithm. In case the number of stages is odd, one stage can
be implemented separately.
The algorithm is so regular that one can easily get the signal-flow graph for any
value of N that is an integral power of 2. The signal-flow graph of the algorithm
is basically an interconnection of butterflies (a computational structure), shown in
Fig. 10.4. The defining equations of a butterfly at the rth stage are given by

a0(r+1) (h) = a0(r) (h) + a0(r) (l)


a1(r+1) (h) = a0(r) (h) − a0(r) (l)
n+ N4
a0(r+1) (l) = WNn a1(r) (h) + WN a1(r) (l)
n+ N4
a1(r+1) (l) = WNn a1(r) (h) − WN a1(r) (l),
302 10 Fast Computation of the DFT

Input values
stored in vector Vector formation Stage 1 output Stage 2 output
locations

x(0) = 1 a0 (0) = 0 0 X(0) = A0 (0) = 0


x(4) = −1 a1 (0) = 2 0 X(4) = A1 (0) = 0


2
x(1) = 1 + 2 a0 (2) = 2 0 X(2) = A0 (2) = −j4
√ √
x(5) = 1 − 2 a1 (2) = 2 4 X(6) = A1 (2) = j4
2

x(2) = 0 a0 (1) = 0 2 X(1) = A0 (1) = 4


x(6) = 0 a1 (1) = 0 2 X(5) = A1 (1) = 0


2
x(3) = −1− 2 a0 (3) = −2 2 X(3) = A0 (3) = 0
√ √
x(7) = −1+ 22 a1 (3) = − 2 −j2 X(7) = A1 (3) = 4

Fig. 10.3 Trace of the PM DIF DFT algorithm, with N = 8, in extracting the coefficients, scaled
by 8, of x(n) = cos( 2π
8 n) + sin(2 8 n)

(r) (r) (r+1) (r+1)


a(r) (h) = {a0 (h), a1 (h)} a(r+1) (h) = {a0 (h), a1 (h)}

n
(r) (r) (r+1) (r+1)
a(r) (l) = {a0 (l), a1 (l)} a(r+1) (l) = {a0 (l), a1 (l)}
N
n+ 4

Fig. 10.4 Signal-flow graph of the butterfly of the PM DIF DFT algorithm, where 0 ≤ n < N
4 .A
−j 2π
twiddle factor WNn =e N n is indicated only by its variable part of the exponent, n

where WNn = e−j N n . There are (log2 N ) − 1 stages, each with N /4 butterflies. With

N = 8, therefore, we see four butterflies in Fig. 10.2.


The computation of a 4-point DFT by the PM DIF DFT algorithm is shown in
Fig. 10.5. The input is
x(n) = {3, 2, 1, 4}

The input vectors at the 2 nodes are, respectively,

3 ± 1 = {4, 2} and 2 ± 4 = {6, −2}


10.2 The PM DIF DFT Algorithm 303

{x(0) = 3, x(1) = 2, x(2) = 1, x(3) = 4}

{X(0) = 10, X(1) = 2 + j2, X(2) = −2, X(3) = 2 − j2}


3 ± 1 = {4, 2} {10, −2}

0
2 ± 4 = {6, −2} {2 + j2, 2 − j2}
1

Fig. 10.5 Computation of a 4-point DFT by the PM DIF DFT algorithm. The twiddle factor

W41 = e−j 4 1 is indicated only by its exponent, 1

The output vectors at the 2 nodes are, respectively,

4 ± 6 = {10, −2} and 2 ± (−j)(−2) = {2 + j2, 2 − j2}

The computation of the IDFT can be carried out by a similar algorithm, with the
twiddle factors conjugated. Further, division by N is required. However, the DFT
algorithm itself can be used to carry out the IDFT computation with the interchange
of the real and imaginary parts of the input and output, as shown in Chap. 4. At the
end, division by N is required. Another method is to conjugate the input, compute
its DFT, and conjugate the resulting output.
The computation of a 4-point IDFT by the PM DIF DFT algorithm is as follows.
The input X (k), from the last example, and its conjugate are

X (k) = {10, 2 + j2, −2, 2 − j2} and X ∗ (k) = {10, 2 − j2, −2, 2 + j2}

The input vectors at the 2 nodes of the PM DIF DFT algorithm are, respectively,

10 ± (−2) = {8, 12} and (2 − j2) ± (2 + j2) = {4, −j4}

The output vectors at the 2 nodes are, respectively,

8 ± 4 = {12, 4} and 12 ± (−j)(−j4) = {8, 16}

Dividing by 4, we get
x(n) = {3, 2, 1, 4}

By interchanging the real and imaginary parts, we get

X (k) = {j10, 2 + j2, −j2, −2 + j2}


304 10 Fast Computation of the DFT

The input vectors at the 2 nodes of the PM DIF DFT algorithm are, respectively,

j10 ± (−j2) = {j8, j12} and (2 + j2) ± (−2 + j2) = {j4, 4}

The output vectors at the 2 nodes are, respectively,

j8 ± j4 = {j12, j4} and j12 ± (−j)(4) = {j8, j16}

By interchanging the real and imaginary parts and dividing by 4, we get

x(n) = {3, 2, 1, 4}

The extraction of the coefficients, multiplied by 8, of x(n) = cos( 2π 8


n) is shown
in Fig. 10.6. In the first-stage output, it is found out that there are no even-indexed
frequency components in the input. In the second stage, the odd-indexed frequency
components are assigned the appropriate coefficients. The operation is similar to a
binary search algorithm.
The extraction of the coefficients, multiplied by 8, of x(n) = sin( 2π 8
n) is shown
in Fig. 10.7.

Input Vector Stage 1 Stage 2


values formation output output

x(0) = 1 a0 (0) = 0 0 X(0) = A0 (0) = 0


x(4) = −1 a1 (0) = 2 0 X(4) = A1 (0) = 0

2
x(1) = 2 a0 (1) = 0 0 X(2) = A0 (2) = 0
√ √
x(5) = − 2 a1 (1)= 2 0 X(6) = A1 (2) = 0
2

x(2) = 0 a0 (2) = 0 2 X(1) = A0 (1) = 4


x(6) = 0 a1 (2) = 0 2 X(5) = A1 (1) = 0

2
x(3)=− a0 (3) = 0 X(3) = A0 (3) = 0

2 √ 2
x(7) = 2 a1 (3) = − 2 −j2 X(7) = A1 (3) = 4
2

Fig. 10.6 Trace of the PM DIF DFT algorithm, with N = 8, in extracting the coefficients, scaled
by 8, of x(n) = cos( 2π
8 n)
10.3 The PM DIT DFT Algorithm 305

Input values
stored in vector Vector formation Stage 1 output Stage 2 output
locations

x(0) = 0 a0 (0) = 0 0 X(0) = A0 (0) = 0


x(4) = 0 a1 (0) = 0 0 X(4) = A1 (0) = 0


2
x(1) = 2 a0 (2) = 0 0 X(2) = A0 (2) = 0
√ √
x(5) = − 22 a1 (2) = 2 0 X(6) = A1 (2) = 0

x(2) = 1 a0 (1) = 0 −j2 X(1) = A0 (1) = −j4


x(6) = −1 a1 (1) = 2 j2 X(5) = A1 (1) = 0


2
x(3) = 2 a0 (3) = 0 −j2 X(3) = A0 (3) = 0
√ √
x(7) = − 22 a1 (3) = 2 2 X(7) = A1 (3) = j4

Fig. 10.7 Trace of the PM DIF DFT algorithm, with N = 8, in extracting the coefficients, scaled
by 8, of x(n) = sin( 2π
8 n)

10.3 The PM DIT DFT Algorithm

We have given the physical explanation of the decomposition of waveforms in the


DIF DFT algorithm. In a decimation-in-frequency (DIF) algorithm, the transform
sequence, X (k), is successively divided into smaller subsequences. For example, in
the beginning of the first stage, the computation of a N -point DFT is decomposed
into two problems: (i) computing the (N /2) even-indexed X (k) and (ii) computing
the (N /2) odd-indexed X (k). In a decimation-in-time (DIT) algorithm, the data
sequence, x(n), is successively divided into smaller subsequences. For example, in
the beginning of the last stage, the computation of a N -point DFT is decomposed
into two problems: (i) computing the (N /2)-point DFT of even-indexed x(n) and (ii)
computing the (N /2)-point DFT of odd-indexed x(n). The DIT DFT algorithm is
based on zero-padding, time-shifting, and spectral redundancy. For understanding,
the DIF DFT algorithms are easier. However, the DIT algorithms are used more
often, as taking care of the data scrambling problem occurring at the beginning
of the algorithm is relatively easier to deal with. The DIT DFT algorithms can be
considered as the algorithms obtained by transposing the signal-flow graph of the
corresponding DIF algorithms, that is by reversing the direction of (signal flow) all
the arrows and interchanging the input and the output.
306 10 Fast Computation of the DFT

10.3.1 Basics of the PM DIT DFT Algorithm

The DIT algorithm is based on decomposing the data sequence recursively into

smaller sequences. Consider the exponential x(n) = ej 8 n . The sample values over
one period are

1 1 1 1 1 1 1 1
1, √ + j √ , j1, − √ + j √ , −1, − √ − j √ , −j1, √ − j √
2 2 2 2 2 2 2 2

The samples of x(n) can be expressed as the sum of the upsampled, by a factor of 2,
even-indexed and odd-indexed components

{1, 0, j1, 0, −1, 0, −j1, 0}



1 1 1 1 1 1 1 1
+ 0, √ + j √ , 0, − √ + j √ , 0, − √ − j √ , 0, √ − j √
2 2 2 2 2 2 2 2

The DFT of the even-indexed elements of x(n) is

xe (n) = {1, j1, −1, −j1} ↔ Xe (k) = {0, 4, 0, 0}

The DFT of the odd-indexed elements of x(n) is



1 1 1 1 1 1 1 1
xo (n) = √ + j √ , − √ + j √ , − √ − j √ , √ − j √
2 2 2 2 2 2 2 2
√ √
↔ Xo (k) = {0, 2 2 + j2 2, 0, 0}

Due to the upsampling theorem (Chap. 3), the DFTs of the upsampled sequences are
the twofold repetition of Xe (k) and Xo (k) and we get

{1, 0, j1, 0, −1, 0, −j1, 0} ↔ {0, 4, 0, 0, 0, 4, 0, 0}


1 1 1 1 1 1 1 1
√ + j √ , 0. − √ + j √ , 0, − √ − j √ , 0, √ − j √ , 0
2 2 2 2 2 2 2 2
√ √ √ √
↔ {0, 2 2 + j2 2, 0, 0, 0, 2 2 + j2 2, 0, 0}

Using the time-shift theorem, we get the DFT of upsampled and shifted xo (n) as

1 1 1 1 1 1 1 1
0, √ + j √ , 0, − √ + j √ , 0, − √ − j √ , 0, √ − j √ ↔
2 2 2 2 2 2 2 2
√ √ √ √
{0, 2 2 + j2 2, 0, 0, 0, 2 2 + j2 2, 0, 0}e−j 8 k

= {0, 4, 0, 0, 0, −4, 0, 0}
10.3 The PM DIT DFT Algorithm 307

(r) (r) (r+1) (r+1)


A(r) (h) = {A0 (h), A1 (h)} A(r+1) (h) = {A0 (h), A1 (h)}
n (r+1)
A0 (h) =
(r)
A0 (h) +
(r)
WNn A0 (l)
(r+1) (r) (r)
A1 (h) = A0 (h) − WNn A0 (l)

(r) (r) (r+1) (r+1)


A(r) (l) = {A0 (l), A1 (l)} A(r+1) (l) = {A0 (l), A1 (l)}
N
n+ 4 (r+1) (r) n+ N (r)
A0 (l) = A1 (h) + WN 4 A1 (l)
(r+1) (r) n+ N (r)
A1 (l) = A1 (h) − WN 4
A1 (l)


Fig. 10.8 Butterfly of the PM DIT DFT algorithm. A twiddle factor WNn = e−j N n is indicated only
by its variable part of the exponent, n

Adding the two partial DFTs, we get the DFT of x(n) as

X (k) = {0, 4, 0, 0, 0, 4, 0, 0} + {0, 4, 0, 0, 0, −4, 0, 0} = {0, 8, 0, 0, 0, 0, 0, 0}

The decomposition continues until the sequence lengths become 1, and the DFT of
the data is itself. There are log2 N stages for a sequence of length N . The computa-
tional complexity of each stage is of the order O(N ). Therefore, the computational
complexity of computing a N -point DFT becomes O(N log2 N ).
The butterfly and the flow graph of the PM DIT DFT algorithm are the transpose
of those of the corresponding DIF algorithms. The PM DIT DFT butterfly is shown
in Fig. 10.8. The butterfly input–output relations at the rth stage are

A(r+1)
0 (h) = A(r) n (r)
0 (h) + WN A0 (l)
A(r+1)
1 (h) = A(r) n (r)
0 (h) − WN A0 (l)
n+ N4
A(r+1)
0 (l) = A(r)
1 (h) + WN A(r)
1 (l)
n+ N
A(r+1)
1 (l) = A(r)
1 (h) − WN 4 A(r)
1 (l),

where n is an integer whose value depends on the stage of computation r and the index
h. The letter A is used to differentiate this butterfly from that of the DIF algorithm.
The flow graph of the PM DIT DFT algorithm with N = 16 is shown in Fig. 10.9.
The trace of the PM DIT DFT algorithm in extracting the coefficient scaled by 8 of
x(n) = sin( 2π
8
n) is shown in Fig. 10.10. While it is possible to draw the flow graph
in alternate ways, the usual ones are for the DIT DFT algorithm to place the input in
the bit-reversed order with the output in the normal order and vice versa for the DIF
DFT algorithm.
308 10 Fast Computation of the DFT

STAGE 1 STAGE 2 STAGE 3


a(0) A(0)
0 0 0

a(4) A(1)
4
2 1

a(2) A(2)
4
0 2

a(6) A(3)
4 6
3

a(1) A(4)
4
0 0

a(5) A(5)
4 5
2

a(3) A(6)
4 6
0

a(7) A(7)
4 6 7

n = e−j 16 n
Fig. 10.9 Flow graph of the PM DIT DFT algorithm with N = 16. A twiddle factor W16
is indicated only by its variable part of the exponent, n

10.4 Efficient Computation of the DFT of Real Data

It is the reduction of the computational complexity from O(N 2 ) to O(N log2 N )


that is most important in most of the applications. However, if it is essential, the
computational complexity and the storage requirements can be further reduced by a
factor of about 2 for computing the DFT of real data. Two algorithms are commonly
used to compute the DFT of real-valued data. One algorithm computes the DFT of
a single real-valued data. Another algorithm computes the DFTs of two real-valued
data sets simultaneously.

10.4.1 Two DFTs of Real Data Simultaneously

In this approach, we pack two real data sets into one complex data set of the same
length. Let a(n) and b(n) be the two real-valued data sets each of length N . Let the
10.4 Efficient Computation of the DFT of Real Data 309

Input values Vector formation


stored in vector and swapping Stage 1 output Stage 2 output
locations

x(0) = 0 a0 (0) = 0 0 X(0) = A0 (0) = 0


x(4) = 0 a1 (0) = 0 0 X(4) = A1 (0) = 0


2
x(1) = 2 a0 (2) = 0 −j2 X(1) = A0 (1) = −j4

x(5) = − 22 a1 (2) = 2 j2 X(5) = A1 (1) = 0

x(2) = 1 a0 (1) = 0 0 X(2) = A0 (2) = 0



x(6) = −1 a1 (1) = 2 0 X(6) = A1 (2) = 0


2 √
x(3) = 2 a0 (3) = 0 2(1 − j1) X(3) = A0 (3) = 0
√ √ √
x(7) = − 22 a1 (3) = 2 2(1 + j1) X(7) = A1 (3) = j4

Fig. 10.10 Trace of the PM DIT DFT algorithm, with N = 8 in extracting the coefficient scaled
by 8 of x(n) = sin( 2π
8 n)

respective DFTs be A(k) and B(k). We form the complex data c(n) such that its real
and imaginary parts are, respectively, a(n) and b(n). Let the DFT of c(n) is C(k).
Then, using the linearity property of the DFT,

c(n) = a(n) + jb(n) ↔ C(k) = A(k) + jB(k)

Since the DFT of real-valued data is conjugate-symmetric, A(N − k) = A∗ (k) and


B(N − k) = B∗ (k). Then,

C(N − k) = A∗ (k) + jB∗ (k) and C ∗ (N − k) = A(k) − jB(k)

Solving for A(k) and B(k) from the last two equations, we get

C(k) + C ∗ (N − k) C(k) − C ∗ (N − k)
A(k) = and B(k) = (10.5)
2 j2

The flowchart of the algorithm is shown in Fig. 10.11. The two real input data sets,
each of length N , are read into real arrays a(n) and b(n). The
√ complex data array
c(n) = a(n) + jb(n) is formed, where j is the imaginary unit, −1. The DFT of c(n),
310 10 Fast Computation of the DFT

Fig. 10.11 Flowchart of the


DFT algorithm for Start
computing the transform of
two real-valued data sets
simultaneously Read real a(n), b(n), n = 0, 1, . . . , N − 1

c(n) = a(n) + jb(n), n = 0, 1, . . . , N − 1

C(k) = DFT(c(n))

A(0) = Re(C(0)), A( N2 ) = Re(C( N2 ))


B(0) = Im(C(0)), B( N2 ) = Im(C( N2 ))

C(k)+C ∗ (N −k) C(k)−C ∗ (N −k)


A(k) = 2 , B(k) = j2
k = 1, 2, . . . , N2 −1

Write A(k), B(k), k = 0, 1, . . . , N2

Return

C(k), is computed. The DFTs A(k) and B(k) of a(n) and b(n) are separated from
C(k) using Eq. (10.5). The values A(0), B(0), A(N /2), and B(N /2) are readily taken
from C(k), since their values are real. Only half of the values of A(k) and B(k) are
computed, since the other half is its complex conjugate.
The IDFTs of two DFTs, A(k) and B(k) of real-valued data a(n) and b(n), can
be computed simultaneously. The flowchart of the algorithm is shown in Fig. 10.12.
As the DFTs are conjugate-symmetric, only one half of the values of A(k) and B(k)
are read. The values A(0), B(0), A(N /2), and B(N /2) form the real imaginary parts
of C(0) and C(N /2), since their values are real. The second-half of C(k) is found
using C(N − k) = A∗ (k) + jB∗ (k). As the IDFT of C(k) is c(n) = a(n) + jb(n), the
real and imaginary parts of c(n) are, respectively, a(n) and b(n).

Example 10.1 Compute the DFT of the sequences a(n) = {2, 1, 4, 3} and b(n) =
{1, 2, 2, 3} using a DFT algorithm for complex data of the same length. Verify that
the IDFT of the complex data formed gets back a(n) and b(n).
Solution
Packing the sequences into a complex data, we get

c(n) = a(n) + jb(n) = {2 + j1, 1 + j2, 4 + j2, 3 + j3}


10.4 Efficient Computation of the DFT of Real Data 311

Start

Read A(k), B(k), k = 0, 1, . . . , N2

C(0) = A(0) + jB(0), C( N2 ) = A( N2 ) + jB( N2 )

C(k) = A(k) + jB(k), C(N − k) = A∗ (k) + jB ∗ (k),


k = 1, 2, . . . , N2 − 1

c(n) = IDFT(C(k))

Write a(n) = Re(c(n)), b(n) = Im(c(n))


n = 0, 1, . . . , N − 1

Return

Fig. 10.12 Flowchart of the IDFT algorithm for computing the IDFT of the transform of two
real-valued data sets simultaneously

Taking the DFT of c(n), we get

C(k) = {10 + j8, −3 + j1, 2 − j2, −1 − j3}

Using Eq. (10.5), we get

A(0) = Re(C(0)) = 10, A(2) = Re(C(2)) = 2

(−3 + j1) + (−1 + j3)


A(1) = = −2 + j2, A(3) = A∗ (1) = −2 − j2
2
B(0) = Im(C(0)) = 8, B(2) = Im(C(2)) = −2

(−3 + j1) − (−1 + j3)


B(1) = = −1 + j1, B(3) = B∗ (1) = −1 − j1
j2

Therefore,

A(k) = {10, −2 + j2, 2, −2 − j2}, and B(k) = {8, −1 + j1, −2, −1 − j1}
312 10 Fast Computation of the DFT

Given two DFTs, A(k) and B(k), of real-valued data, a(n), b(n), we form A(k) +
jB(k) and compute its IDFT yielding the a(n) and b(n) in the real and imaginary
parts, respectively. For this example,

A(k) + jB(k) = {10 + j8, −3 + j1, 2 − j2, −1 − j3}

and its IDFT is a(n) + jb(n) = {2 + j1, 1 + j2, 4 + j2, 3 + j3}.


Since two DFTs are computed using one DFT for complex-valued data, for com-
puting the DFT of each real-valued data set, the computational complexity is one
half of that of the algorithm for complex-valued data. In addition, N − 2 addition
operations are required in separating each of the two DFTs.
Linear Filtering of Long Data Sequences
In practical applications of linear filtering, the data sequences are real-valued and
often very long compared with the impulse response. Typically, convolution is car-
ried out over sections of the input using methods, such as the overlap save method
described in Chap. 5. As there are large number of sections, two sections can be
packed into a complex data and their transform computed. The DFT of the complex
data is multiplied by the DFT of the impulse response, which is computed only once.
The IDFT of the product yields the convolution of the two input sequences in the
real and imaginary parts. One advantage of this procedure is that no separation and
combination of the DFTs are required.

10.4.2 DFT of a Single Real Data Set

The computation of the DFT of a single real data set is referred as RDFT. The inverse
DFT of the transform of real data is referred as RIDFT. Since the DFT of real data
is conjugate-symmetric, only one half of the number of butterflies in each stage of
the DFT algorithm for complex-valued data is necessary. The redundant butterflies
can be easily eliminated in the DIT algorithm for complex-valued data in deriving
the corresponding RDFT algorithm. Similarly, the RIDFT algorithm can be derived
from the corresponding DIF algorithm.
The PM DIT RDFT Butterfly
The equations characterizing the input–output relation of the PM DIT RDFT butterfly,
shown in Fig. 10.13, are

Fig. 10.13 Butterfly of the (r) (r+1)


X (h) X (h)
PM DIT RDFT algorithm s
(r)
X (l) * X (r+1)
(l1)
N
s+ 2
10.4 Efficient Computation of the DFT of Real Data 313

X (r+1) (h) = X (r) (h) + WNs X (r) (l)


X (r+1) (l1) = (X (r) (h) − WNs X (r) (l))*

where s is an integer whose value depends on the stage of the computation r and the
index h. The butterfly for real data is essentially the same as that for complex data
with some differences. Only half of the butterflies are computed in each group of
butterflies in each stage. Since a butterfly produces one output at the upper-half and
another output at the lower-half of a group of butterflies in each stage, the lower-half
output has to be conjugated and stored in a memory location in the upper-half.
The flow graph of the PM DIT RDFT algorithm with N = 16 is shown in
Fig. 10.14. The trace of the RDFT algorithm for computing the DFT with N = 16 is
shown in Fig. 10.15. The data storage scheme is
  
 N N
x (n) = x(n), x n + , n = 0, 1, . . . , −1
2 2
  
N N
X  (0) = X (0), X and X  (k) = X (k), k = 1, . . . , − 1
2 2

As in the DIT DFT algorithms for complex data, in the last stage, two 8-point DFTs
are merged to form a 16-point DFT. The differences are that: (i) only half the number

stage 1 stage 2 stage 3 stage 4


f g g g
x (0) X (0)
0 0 0
f
x (4) X (1)
4
2 1
f g
x (2) X (2)
0 4
2
f
x (6) X (3)
4 10 *
3
f g g
x (1) X (4)
0 4
0
f
x (5) 4 9 X (5)
2 *
f g
x (3) 4 10
* X (6)
0
f *
x (7) 4 10 11 X (7)
*

Fig. 10.14 The flow graph of the PM DIT RDFT algorithm with N = 16
314 10 Fast Computation of the DFT

Input Stage 1 Stage 2 Stage 3 Stage 4


Output Output Output Output
x(0)=1 x(8)=0 1 1 8 − 6 16.00 0.00 X(0)= 41 X(16)= −9
x(1)=3 x(9)=2 7 − 1 1 + j1 −0.41 − j3.24 X(1)= 1.8162 − j7.8620
x(2)=2 x(10)=0 2 2 8 −4 −6 + j4 X(2)= −6.71 + j4.71
x(3)=5 x(11)=2 6 4 2 − j4 2.41 − j5.24 X(3)= 2.2557 − j3.3292
x(4)=3 x(12)=4 5 1 11− 1 25.00 − 3.00 X(4)= j3.00
x(5)=4 x(13)=2 6 2 1 − j2 3.83 − j3.41 X(5)= 2.5727 + j7.1561
x(6)=5 x(14)=1 7 3 14 0 −1 X(6)= −5.29 − j3.29
x(7)=3 x(15)=4 7 − 1 3 + j1 −1.83 + j0.59 X(7)= −2.6447−j1.3768

Fig. 10.15 Trace of the RDFT algorithm for computing the DFT with N = 16

of butterflies are used and (ii) conjugation and swapping operations are required. Due
to the lack of symmetry of the data at the input and output end, special butterflies
are used. The first-stage butterflies, denoted by f , compute 2-point DFTs. The input
and output data are stored as shown in the trace of the algorithm. In addition, the
input is also placed in bit-reversed order. Subsequently, there is a g butterfly for each
group of butterflies. The g butterflies use the values stored in a pair of nodes. Both
the nodes have two real values. The sum and difference of the values stored in the
first locations of the top and bottom nodes, respectively, form the output for the first
and second location of the top node. For example, in the g butterfly of the first stage,
the output values are 1 + 7 = 8 and 1 − 7 = −6. The output value at the bottom
node is the sum of the second value of the top node and the product of the second
value at the bottom node multiplied by −j. For the example, 1 + (−j)(−1) = 1 + j1
is stored in the second node.
The input and output data are stored as shown in the trace of the algorithm. The
input and output for the rest of the butterflies are complex and the computation is as
shown in Fig. 10.13.
Let the input 16-point real data sequence be

{1, 3, 2, 5, 3, 4, 5, 3, 0, 2, 0, 2, 4, 2, 1, 4}

The first 9 values of the DFT X (k) are

{X (k), k = 0, 1, . . . , 8} = {41, 1.8162 − j7.8620, −6.7071 + j4.7071, 2.2557 − j3.3292,

j3, 2.5727 + j7.1561, −5.2929 − j3.2929, −2.6447 − j1.3768, −9}

The other values can be obtained using the conjugate symmetry of the DFT of real
data. The even-indexed values xe(n) of x(n) are

xe(n) = {1, 2, 3, 5, 0, 0, 4, 1}
10.4 Efficient Computation of the DFT of Real Data 315

The DFT X (k) of xe(n) is

{16, −0.4142 − j3.2426, −6 + j4, 2.4142 − j5.2426, 0,


2.4142 + j5.2426, −6 − j4, −0.4142 + j3.2426}

The odd-indexed values xo(n) of x(n) are

xo(n) = {3, 5, 4, 3, 2, 2, 2, 4}

The DFT X (k) of xo(n) is

{25, 3.8284 − j3.4142, −1, −1.8284 + j0.5858, −3,


− 1.8284 − j0.5858, −1, 3.8284 + j3.4142}

The last stage output is the first (N /2) + 1 = 9 DFT coefficients. These coeffi-
cients are obtained by merging the 5 DFT coefficients of the two 8-point DFTs. The
whole computation is similar to complex-valued algorithms with few differences.
The PM DIF RIDFT Butterfly
The RIDFT algorithm is derived from the corresponding DIF DFT algorithm for
complex-valued data. Only half of the butterflies of the complex-valued algorithm
are necessary. The RIDFT butterfly is shown in Fig. 10.16. It is similar to that of
the algorithm for complex-valued data, except that the input data at the bottom node
is read from the first-half of the DFT coefficients and conjugated. In addition, the
twiddle factors are conjugated compared with those of the RDFT algorithm. The
equations governing the butterfly are

X (r+1) (h) = X (r) (h) + (X (r) (l1))*


X (r+1) (l) = WN−s (X (r) (h) − (X (r) (l1))* )

The flow graph of the RIDFT algorithm with N = 16 is shown in Figure 10.17.
The f butterflies compute a 2-point IDFT, without the division operation by 2, of the
two real values stored in each node. The g butterflies use the values stored in a pair of
nodes. The top node has two real values. The sum and difference of these values are
stored in the first location of the top and bottom nodes, respectively. For example, in
the g butterfly of the first stage, the output values are 41 − 9 = 32 and 41 + 9 = 50.
Let the complex value stored in the bottom node is a + jb. Then, 2a and −2b are

Fig. 10.16 RIDFT butterfly (r) (r+1)


X (h) X (h)

(r)
−s
X (l1) * X (r+1)
(l)
−s−N2
316 10 Fast Computation of the DFT

stage 1 stage 2 stage 3 stage 4


g g g f
X (0) 16x (0)

0 f
X (1) −4 16x (4)
0 g f
X (2) −4 16x (2)

−2 0 f
X (3) 16x (6)
* −10 −4
0 g g f
X (4) 16x (1)
−4
−1 0 f
X (5) 16x (5)
−9 −4
*
−2 0 g f
X (6) * 16x (3)
−10 −4
* −3 −2 0 f
X (7) −11 −10 −4 16x (7)
*

Fig. 10.17 Flow graph of the RIDFT algorithm with N = 16

Input Stage 1 Stage 2 Stage 3 Stage 4


Output Output Output Output
X(0)= 41 X(16)= −9 32 0.00 32 − 24 8 8 x(0)=16 x(8)=0
X(1)= 1.8162 − j7.8620 −0.83 − j6.49 4 + j4 56 − 8 x(4)=48 x(12)=64
X(2)= −6.71 + j4.71 −12 + j8 32 −16 16 16 x(2)=32 x(10)=0
X(3)= 2.2557 − j3.3292 4.83 − j10.49 8 − j16 48 32 x(6)=80 x(14)=16
X(4)= j3.00 50 − 6.00 44 − 4 40 8 x(1)=48 x(9)=32
X(5)= 2.5727 + j7.1561 7.66 − j6.83 4 − j8 48 16 x(5)=64 x(13)=32
X(6)= −5.29 − j3.29 −2 56 0 56 24 x(3)=80 x(11)=32
X(7)= −2.6447−j1.3768 −3.66 + j1.17 12 + j4 56 − 8 x(7)=48 x(15)=64

Fig. 10.18 Trace of the RIDFT algorithm

stored in the second location of the top and bottom nodes, respectively. For the first
g butterfly, a + jb = 0 + j3. Therefore, 0 and −6 are stored.
The trace of the RIDFT algorithm is shown in Fig. 10.18. The input DFT coeffi-
cients are the output in Fig. 10.15. The output values have to be divided by 16.
10.5 Summary 317

10.5 Summary

• Fourier analysis is dominating in the analysis of linear systems and signals in


practice as well, due to the availability of fast algorithms to approximate the Fourier
spectrum.
• The computational complexity of computing the 1-D N -point DFT, using fast
algorithms, is O(N log2 N ) for N a power of 2, whereas that of the implementation
from the definition is O(N 2 ).
• The fast algorithms reduce the inherent redundancy of operations in the definition
of the DFT. While there are different approaches in designing the DFT algorithms,
the power-of-2 algorithms based on the classical divide-and-conquer strategy of
developing fast algorithms yield the practically most useful DFT algorithms.
• While there are alternate ways of deriving the power-of-2 algorithms (such as
matrix decomposition), the best physical appreciation of the algorithms is obtained
using the half-wave symmetry of periodic waveforms.
• The sum and difference of the samples of the first half and the second half of the
period of a periodic waveform decompose it into two components. One component
is composed of the even-indexed frequency components and the other is composed
of the odd-indexed frequency components. This decomposition decomposes a N -
point DFT into two N /2-point DFTs. Recursive decomposition yields the final
algorithm.
• There are log2 N stages, each stage with a computational complexity of O(N ).
Therefore, the computational complexity becomes O(N log2 N ) for a N -point DFT.
• The decomposition can be carried out by decomposing the frequency components
into two sets. One set consists of the even-indexed frequency components and the
other consists of the odd-indexed frequency components. The DFTs of the two
sets are computed and combined to obtain the whole DFT. This type of algorithms
is called the decimation-in-frequency (DIF) algorithms.
• The decomposition can also be carried out by decomposing the time-domain sam-
ples into two sets. One set consists of the even-indexed samples and the other
consists of the odd-indexed samples. The DFTs of the two sets are computed and
merged to obtain the whole DFT. This type of algorithms is called the decimation-
in-time (DIT) algorithms.
• As usual, Fourier analysis, in theoretical analysis, is almost always carried out
using the complex exponential as the basis waveform. This results in a factor-of-2
redundancy in computing the DFT of real-valued data.
• This redundancy can be reduced by computing the DFT of two sets of real-valued
data at the same time.
• An alternate method is to reduce the redundancy in the flow graph of the algorithms
for complex data.
318 10 Fast Computation of the DFT

Exercises
10.1 Given the samples of a waveform x(n), find the samples of its even half-wave
symmetric and odd half-wave symmetric components. Verify that the sum of the
samples of the two components add up to the samples of x(n). Compute the DFT
of x(n) and its components. Verify that the DFT of the even half-wave symmetric
component consists of zero-valued odd-indexed spectral values. Verify that the DFT
of the odd half-wave symmetric component consists of zero-valued even-indexed
spectral values.
10.1.1 x(n) = {0̌, 1, 2, 3}.
* 10.1.2 x(n) = {0̌, 1, 0, 1}.
10.1.3 x(n) = {1̌, 3, −1, −3}.
10.1.4 x(n) = {2̌, 1, 3, 4}.
10.1.5 x(n) = {3̌, 1, 2, 4}.
10.2 Given a waveform x(n) with period 8, find the samples of the waveform. (a)
Give the trace of the PM DIF DFT algorithm in computing its DFT X (k). (b) Give
the trace of the PM DIT DFT algorithm in computing its DFT X (k). Verify that both
are the same. In both cases, find the IDFT of X (k) using the same DFT algorithms,
give the trace and verify that the samples of the input x(n) are obtained.
10.2.1 x(n) = −2e−j( 8 n+ 6 )
2π π

10.2.2 x(n) = −e−j( 8 6n− 3 )


2π π

* 10.2.3 x(n) = ej( 8 0n− 3 ) + ej( 8 4n− 6 )


2π π 2π π

10.2.4 x(n) = −ej( 8 n+ 4 ) + ej( 8 2n+ 6 )


2π π 2π π

10.2.5 x(n) = 3ej( 8 6n− 4 ) + ej( 8 7n+ 3 )


2π π 2π π

10.3 Given two waveforms x(n) and y(n) with period 8, find the samples of the
waveforms. Use the PM DIT DFT algorithm for complex data to find their DFTs
using the algorithm for computing the DFTs of two real data sets simultaneously.
Compute the IDFTs of the DFTs using a DFT algorithm for complex data sets
simultaneously. Verify the DFT X (k) and Y (k) by expressing x(n) and y(n) into its
complex exponential
 components.  
10.3.1 x(n) = cos 2π 1n + π6 and y(n) = cos 2π 3n − π6 .
 2π
8   8 
10.3.2 x(n) = cos 8 2n − π6 and y(n) = cos 2π 7n − π3 .
 2π   8 
10.3.3 x(n) = cos 8 3n + π4 and y(n) = cos 2π 5n − π3 .
 2π π
  2π
8 
10.3.4 x(n) = cos 8 0n + 6 and y(n) = cos 8 6n + π3 .
   
* 10.3.5 x(n) = cos 2π 8
6n + π4 and y(n) = cos 2π 8
5n − π3 .
10.4 Given a waveform x(n) with period 8, find the samples of the waveform. Find
its DFT X (k) using the PM RDFT algorithm. Find the IDFT of X (k) using the PM
RIDFT algorithm to get back the samples of x(n). Verify the DFT X (k) by expressing
x(n) into its complex exponential components.
10.5 Summary 319
 
10.4.1 cos 2π 0n + π6 .
 2π
8 
10.4.2 cos 8 1n − π6 .
 
10.4.3 cos 2π 8
2n + π4 .

* 10.4.4 cos 2π 3n − π4 .
 2π 8 
10.4.5 cos 8 4n + π3 .
Appendix A
Transform Pairs and Properties

See Tables A.1, A.2, A.3, A.4, A.5, A.6, A.7, and A.8.

Table A.1 DFT pairs

x(n),Period = N X (k), Period = N

δ(n) 1

1 N δ(k)
 

j N k0 n
e N δ(k − k0 )
 2π 
cos N k0 n + θ N
2 (e jθ δ(k − k0 ) + e− jθ δ(k − (N − k0 )))

 2π 
cos N k0 n N
2 (δ(k − k0 ) + δ(k − (N − k0 )))

 2π

sin k0 n N
N
2 (− jδ(k − k0 ) + jδ(k − (N − k0 )))


⎨ 1 for n = 0, 1, . . . , L − 1
sin( Nπ k L)
e(− j N (L−1)k )
π
x(n) = sin( Nπ k)


0 for n = L , L + 1, . . . , N − 1

© Springer Nature Singapore Pte Ltd. 2018 321


D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7
322 Appendix A: Transform Pairs and Properties

Table A.2 DFT properties

Property x(n), h(n), Period = N X (k), H (k), Period = N

Linearity ax(n) + bh(n) a X (k) + bH (k)

Duality 1
N X (N ∓ n) x(N ± k)

Time-shifting x(n ± n 0 ) e± j N n0 k X (k)

Frequency-shifting e∓ j N k0 n
x(n) X (k ± k0 )

N −1
Time-convolution k=0 x(k)h(n − k) X (k)H (k)
1
N −1
Frequency-convolution x(n)h(n) N v=0 X (v)H (k − v)

Time-expansion h(an) =
⎧ H (k) = X (k mod N ),
⎨ x(n) for n = 0, 1, . . . , N − 1 k = 0, 1, . . . , a N − 1



0 otherwise
where a is any positive integer

Time-reversal x(N − n) X (N − k)

Conjugation x ∗ (N ± n) X ∗ (N ∓ k)

N −1 1
N −1
n=0 |x(n)| k=0 |X (k)|
Parseval’s theorem 2 2
N

Table A.3 FS pairs

x(t), Period = T X f s (k), ω0 = 2π


⎧ T

⎨ 1 for |t| < a
sin(kω0 a)



0 for a < |t| ≤ T
2


n=−∞ δ(t − nT )
1
T

e jk0 ω0 t δ(k − k0 )

cos(k0 ω0 t) 0.5(δ(k + k0 ) + δ(k − k0 ))

sin(k0 ω0 t) 0.5 j (δ(k + k0 ) − δ(k − k0 ))


Appendix A: Transform Pairs and Properties 323

Table A.4 FS properties

Property x(t), h(t), Period = T X f s (k), H f s (k), ω0 = 2π


T

Linearity ax(t) + bh(t) a X f s (k) + bH f s (k)

Time-shifting x(t ± t0 ) e± jkω0 t0 X f s (k)

Frequency-shifting x(t)e± jk0 ω0 t X f s (k ∓ k0 )


T
Time-convolution 0 x(τ )h(t − τ )dτ T X f s (k)H f s (k)


Frequency-convolution x(t)h(t) l=−∞ X f s (l)H f s (k − l)

Time-scaling x(at), a > 0, Period = T


a X f s (k), ω0 = a 2π
T

Time-reversal x(−t) X f s (−k)


d n x(t)
Time-differentiation dt n ( jkω0 )n X f s (k)

t X f s (k)
Time-integration −∞ x(τ )dτ jkω0 , if (X f s (0) = 0)

T

Parseval’s theorem 1
T 0 |x(t)|2 dt k=−∞ |X f s (k)|
2

Conjuagte symmetry x(t) real X f s (k) = X ∗f s (−k)

Even symmetry x(t) real and even X f s (k) real and even

Odd symmetry x(t) real and odd X f s (k) imaginary and odd
324 Appendix A: Transform Pairs and Properties

Table A.5 DTFT pairs

x(n) X (e jω ), Period = 2π


⎨ 1 for − N ≤ n ≤ N
sin(ω (2N2+1) )
⎪ sin( ω2 )

0 otherwise


⎨ 1 for |ω| < a
sin(an)
πn , 0<a≤π


0 for a < |ω| ≤ π

a n u(n), |a| < 1 1


1−ae− jω

(n + 1)a n u(n), |a| < 1 1


(1−ae− jω )2

1−a 2
a |n| , |a| < 1 1−2a cos(ω)+a 2

(a)e− jω sin(ω0 )
a n sin(ω0 n)u(n), |a| < 1 1−2(a)e− jω cos(ω0 )+(a)2 e− j2ω

1−(a)e− jω cos(ω0 )
a n cos(ω0 n)u(n), |a| < 1 1−2(a)e− jω cos(ω0 )+(a)2 e− j2ω

δ(n) 1
∞ ∞

δ(n − k N ) 2π
N δ(ω − 2π
N k)
k=−∞ k=−∞

u(n) πδ(ω) + 1
1−e− jω

1 2πδ(ω)
2
sgn(n) 1−e− jω

e jω0 n 2πδ(ω − ω0 )

cos(ω0 n) π(δ(ω + ω0 ) + δ(ω − ω0 ))

sin(ω0 n) jπ(δ(ω + ω0 ) − δ(ω − ω0 ))


Appendix A: Transform Pairs and Properties 325

Table A.6 DTFT properties

Property x(n), h(n) X (e jω ), H (e jω )

Linearity ax(n) + bh(n) a X (e jω ) + bH (e jω )

Time-shifting x(n ± n 0 ) e± jωn 0 X (e jω )

Frequency-shifting x(n)e± jω0 n X (e j (ω∓ω0 ) )




Time-convolution k=−∞ x(k)h(n − k) X (e jω )H (e jω )
2π j (ω−v) )dv
2π 0 X (e )H (e
1 jv
Frequency-convolution x(n)h(n)

Time-expansion h(n) H (e jω ) = X (e jaω )


h(an) = x(n), a >
0 is an integer
and h(n) = 0 zero otherwise

Time-reversal x(−n) X (e− jω )

Conjugation x ∗ (±n) X ∗ (e∓ jω )

Difference x(n) − x(n − 1) (1 − e− jω )X (e jω )



n X (e jω )
Summation l=−∞ x(l) (1−e− jω )
+ π X (e j0 )δ(ω)

k X (e jω )
Frequency-differentiation (n)k x(n) ( j)k d dω k


∞ 2π
n=−∞ |x(n)| |X (e jω )|2 dω
2 1
Parseval’s theorem 2π 0

Conjuagte symmetry x(n) real X (e jω ) = X ∗ (e− jω )

Even symmetry x(n) real and even X (e jω ) real and even

Odd symmetry x(n) real and odd X (e jω ) imaginary and odd


326 Appendix A: Transform Pairs and Properties

Table A.7 FT pairs

x(t) X ( jω)

u(t + a) − u(t − a) 2 sin(ωa)


ω

sin(ω0 t)
πt u(ω + ω0 ) − u(ω − ω0 )

e−at u(t), Re(a) > 0 1


a+ jω

te−at u(t), Re(a) > 0 1


(a+ jω)2

e−a|t| , Re(a) > 0 2a


a 2 +ω 2
 
sin(ω a2 ) 2
a ((t + a)u(t + a) − 2tu(t) + (t − a)u(t − a))
1
a ω a2

ω0
e−at sin(ω0 t)u(t), Re(a) > 0 (a+ jω)2 +ω02

e−at cos(ω0 t)u(t), Re(a) > 0 a+ jω


(a+ jω)2 +ω02

δ(t) 1



n=−∞ δ(t − nT ) k=−∞ δ(ω − k 2π
T )

T

u(t) πδ(ω) + 1

1 2πδ(ω)
2
sgn(t) jω

1 2πδ(ω)

e jω0 t 2πδ(ω − ω0 )

cos(ω0 t) π(δ(ω + ω0 ) + δ(ω − ω0 ))

sin(ω0 t) jπ(δ(ω + ω0 ) − δ(ω − ω0 ))


Appendix A: Transform Pairs and Properties 327

Table A.8 FT properties

Property x(t), h(t) X ( jω), H ( jω)

Linearity ax(t) + bh(t) a X ( jω) + bH ( jω)

Duality X (±t) 2πx(∓ jω)

Time-shifting x(t ± t0 ) X ( jω)e± jωt0

Frequency-shifting x(t)e± jω0 t X ( j (ω ∓ ω0 ))

Time-convolution x(t) ∗ h(t) X ( jω)H ( jω)

2π (X ( jω) ∗ H ( jω))
1
Frequency-convolution x(t)h(t)
ω
Time-scaling x(at), a = 0 and real |a| X ( j a )
1

Time-reversal x(−t) X (− jω)

Conjugation x ∗ (±t) X ∗ (∓ jω)


d n x(t)
Time-differentiation dt n ( jω)n X ( jω)

t X ( jω)
Time-integration −∞ x(τ )dτ jω + π X ( j0)δ(ω)

n X ( jω)
Frequency-differentiation t n x(t) ( j)n d dω n

∞ ∞
−∞ |x(t)| dt −∞ |X ( jω)|
2 1 2 dω
Parseval’s theorem 2π

Autocorrelation x(t) ∗ x(−t) = |X ( jω)|2



−∞ x(τ )x(τ − t)dτ

Conjuagte symmetry x(t) real X ( jω) = X ∗ (− jω)

Even symmetry x(t) real and even X ( jω) real and even

Odd symmetry x(t) real and odd X ( jω) imaginary and odd
Appendix B
Useful Mathematical Formulas

Trigonometric Identities

Pythagorean Identity
sin2 x + cos2 x = 1

Addition and Subtraction Formulas

sin(x ± y) = sin x cos y ± cos x sin y

cos(x ± y) = cos x cos y ∓ sin x sin y

Double-angle Formulas

cos 2x = cos2 x − sin2 x = 2 cos2 x − 1 = 1 − 2 sin2 x

sin 2x = 2 sin x cos x

Product Formulas
2 sin x cos y = sin(x − y) + sin(x + y)

2 cos x sin y = − sin(x − y) + sin(x + y)

2 sin x sin y = cos(x − y) − cos(x + y)

2 cos x cos y = cos(x − y) + cos(x + y)

Sum and Difference Formulas


x±y x∓y
sin x ± sin y = 2 sin cos
2 2

© Springer Nature Singapore Pte Ltd. 2018 329


D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7
330 Appendix B: Useful Mathematical Formulas

x+y x−y
cos x + cos y = 2 cos cos
2 2
x+y x−y
cos x − cos y = −2 sin sin
2 2
Other Formulas
sin(−x) = sin(2π − x) = − sin x

cos(−x) = cos(2π − x) = cos x

sin(π ± x) = ∓ sin x

cos(π ± x) = − cos x
π 
cos ± x = ∓ sin x
2
π 
sin ± x = cos x
2


cos ± x = ± sin x
2


sin ±x = − cos x
2

e± j x = cos x ± j sin x

e j x + e− j x
cos x =
2

e j x − e− j x
sin x =
j2

Series Expansions

( j x)2 ( j x)3 ( j x)4 ( j x)r


e j x = 1 + ( j x) + + + + ··· + + ···
2! 3! 4! (r )!

x2 x4 x 2r
cos(x) = 1 − + − · · · + (−1)r − ···
2! 4! (2r )!

x3 x5 x 2r +1
sin(x) = x − + − · · · + (−1)r − ···
3! 5! (2r + 1)!
Appendix B: Useful Mathematical Formulas 331

1 x3 (1)(3) x 5 (1)(3)(5) x 7
sin−1 x = x + + + + · · · , |x| < 1
2 3 (2)(4) 5 (2)(4)(6) 7
π
cos−1 x = − sin−1 x, |x| < 1
2
Summation Formulas

N
N (N + 1)
k=
k=0
2

N −1
N (2a + (N − 1)d)
(a + kd) =
k=0
2

N −1
a(1 − r N )
ar k = , r = 1
k=0
1−r


1
rk = , |r | < 1
k=0
1−r


r
kr k = , |r | < 1
k=0
(1 − r )2

1 sin(0.5(2N + 1)t)
1 + cos(t) + cos(2t) + · · · + cos(N t) = +
2 2 sin(0.5t)

Indefinite Integrals  
udv = uv − vdu


eat
eat dt =
a

eat
teat dt = (at − 1)
a2

ebt
ebt sin(at)dt = (b sin(at) − a cos(at))
a 2 + b2

ebt
ebt cos(at)dt = (b cos(at) + a sin(at))
a 2 + b2
332 Appendix B: Useful Mathematical Formulas

1
sin(at)dt = − cos(at)
a

1
cos(at)dt = sin(at)
a

1
t sin(at)dt = (sin(at) − at cos(at))
a2

1
t cos(at)dt = (cos(at) + at sin(at))
a2

t 1
sin2 (at)dt = − sin(2at)
2 4a

t 1
cos2 (at)dt = + sin(2at)
2 4a

1 1 t
dt = tan−1 ( )
a2 +t 2 a a

sin((a − b)t) sin((a + b)t)
sin(at) sin(bt)dt = − , a 2  = b2
2(a − b) 2(a + b)
 
cos((a − b)t) cos((a + b)t)
sin(at) cos(bt)dt = − + , a 2  = b2
2(a − b) 2(a + b)

sin((a − b)t) sin((a + b)t)
cos(at) cos(bt)dt = + , a 2  = b2
2(a − b) 2(a + b)

Differentiation Formulas
d(uv) dv du
=u +v
dt dt dt

d( f (u)) d( f (u)) du
=
dt du dt

d( uv ) v du − u dv
= dt 2 dt
dt v

d(x n )
= nx n−1
dt

d(eat )
= aeat
dt
Appendix B: Useful Mathematical Formulas 333

d(sin(at))
= a cos(at)
dt

d(cos(at))
= −a sin(at)
dt

L’Hôpital’s Rule
If lim f (x) = 0 and lim g(x) = 0, or
x→a x→a

If lim f (x) = ∞ and lim g(x) = ∞, then


x→a x→a

d f (x)
f (x)
lim = lim dx
dg(x)
x→a g(x) x→a
dx

The rule can be applied as many times as necessary.


Bibliography

1. E.A. Guillemin, Theory of Linear Physical Systems (Wiley, New York, 1963)
2. E.A. Guillemin, The Mathematics of Circuit Analysis (Wiley, New York, 1959)
3. B.P. Lathi, Linear Systems and Signals (Oxford University Press, New York,
2005)
4. E.O. Brigham, The Fast Fourier Transform and Its Applications (Prentice-Hall,
Englewood Cliffs, 1988)
5. R.N. Bracewell, The Fourier Transform and Its Applications (McGraw-Hill, New
York, 2000)
6. D. Sundararajan, Signals and Systems – A Practical Approach (Wiley, Singapore,
2008)
7. D. Sundararajan, Discrete Fourier Transform, Theory, Algorithms, and Applica-
tions (World Scientific, Singapore, 2001)
8. D. Sundararajan, Discrete Wavelet Transform, A Signal Processing Approach
(Wiley, Singapore, 2015)
9. D. Sundararajan, Digital Image Processing - A Signal Processing Approach
(Springer, Singapore, 2017)
10. The Mathworks, Matlab Image Processing Tool Box User’s Guide (The Math-
works, Inc., U.S.A., 2018)
11. The Mathworks, Matlab Signal Processing Tool Box User’s Guide (The Math-
works, Inc., U.S.A., 2018)

© Springer Nature Singapore Pte Ltd. 2018 335


D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7
Answers to Selected Exercises

Chapter 1

1.1.2 0.
1.2.3
x(n) = −2δ(n) − δ(n − 2) + 3δ(n + 2) + 3δ(n + 3)

1.3.3
{−1.4575, −1.7292, −1.7320, −1.7321, −1.7321}

1.4.4
371.0329

1.5.1 ⎧

−2 for n = 1, 0, −1
x(n) =
⎩ 0 otherwise

1.6.5

{2.5981, 0.7765, −1.5000, −2.8978, −2.5981, −0.7765, 1.5000, 2.8978}


π  π 
x(n) = 2.5981 cos n − 1.5 sin n
4 4
1.7.3 π 
c(n) = 3.8639 cos n + 0.7945
4

© Springer Nature Singapore Pte Ltd. 2018 337


D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7
338 Answers to Selected Exercises

The samples of the sinusoid a(n) are

{2.0000, −1.0353, −3.4641 − 3.8637, −2.0000, 1.0353, 3.4641, 3.8637}

The samples of the sinusoid b(n) are

{0.7071, 1.0000, 0.7071, 0.0000, −0.7071, −1.0000, −0.7071, −0.0000}

The samples of the sinusoid c(n) = a(n) + b(n) are

{2.7071, −0.0353, −2.7570, −3.8637, −2.7071, 0.0353, 2.7570, 3.8637}

1.8.4 The waveform is periodic with period 6.


1.9.4
x(n) = (− j)(e j ( 8 n− 6 ) − e− j ( 8 n− 6 ) )
2π π 2π π

The samples of x(n) are

{−1.0000, 0.5176, 1.7321, 1.9319, 1.0000, −0.5176, −1.7321, −1.9319}

1.10.3 The samples of x(n) are

{0.8660, 0.2588, −0.5000, −0.9659, −0.8660, −0.2588, 0.5000, 0.9659}

x(−4) = x(4) = −0.8660

1.11.4

xe (−3) = 0.5, xe (−2) = 0.5, xe (−1) = 0, xe (0) = 0,


xe (1) = 0, xe (2) = 0.5, xe (3) = 0.5

xo (−3) = −0.5, xo (−2) = −0.5, xo (−1) = 0,


xo (0) = 0, xo (1) = 0, xo (2) = 0.5, xo (3) = 0.5

1.12.3 Neither.
1.13.3 Average power is 2.
1.14.3 x(an + k) = sin( π8 n − π3 ).

{−0.8660, 0, −0.2588, 0, 0.5000, 0, 0.9659, 0, 0.8660,


0, 0.2588, 0, −0.5000, 0, −0.9659, 0}

1.15.1 x(an + k) = {x(1) = 1, x(2) = 2}, and 0 otherwise.


1.16.2 (−2 + j4).
Answers to Selected Exercises 339

1.17.3 0.3231 + j0.5846.


1.18.1 17.0294e(− j1.6296) .
1.19.3 5 − j2, 5 + j2.
1.20.3

{−0.8090 + j0.5878, −0.8090 − j0.5878, 0.3090 + j0.9511, 0.3090 − j0.9511, 1}

Chapter 2

2.1.2 26 29 = 215 = 32768. √ √


π π π π π π
2.2.2 x(n) = e j ( 4 n+ 6 ) + e− j ( 4 n+ 6 ) = (0.5 3 + j0.5)e j 4 n + (0.5 3 − j0.5)e− j 4 n
The samples are

{1.7321, 0.5176, −1.0000, −1.9319, −1.7321, −0.5176, 1.0000, 1.9319}

2.3.5 {10 + j2, 4 + j4, −2 + j6, −8}.


2.4.2
x(n) = {−0.2679, 3.0000, −3.7321, 5.0000}

X (k) = {4, 3.4641 + j2, −12, 3.4641 − j2}

Chapter 3

3.1.2

X (k) = {10, −2 + j2, −2, −2 − j2}, Y (k) = {0, 1 + j3, −10, 1 − j3},
Z (k) = {30, −8, 14, −8}

3.2.3
X (k) = {11, 1, 3, 1}, X (−7) = 1, x(23) = 2

3.3.1
{11, −2 − j1, −3, −2 + j1}

3.4.2
{−3 − j1, 4, −3 + j1, −6}

3.5.2
{2, −4 − j2, −6, −4 + j2}

3.6.3
{16, 4, 8, −8}
340 Answers to Selected Exercises

3.7.3

X (k) = {−5 + j1, 2 + j4, 3 − j1, 4 − j4},



X (4 − k) = {−5 − j1, 4 + j4, 3 + j1, 2 − j4}

3.8.1
y(n) = {16, 15, 6, 13}

3.9.2
Y (k) = {5, −1 + j10, 9, −1 − j10}

3.10.2
r xh (n) = {14, 6, 5, 3}

3.11.3
r x x (n) = {18, 5, 8, 5}

3.12.1
X (k) = {7, −1 − j2, −1, −1 + j2}

3.13.3
{1, 7, 1, 7}

3.14.3
{1, 0, −5, 0}

3.15.1
X (k) = {3, −1}, X Z (k) = {3, 1 − j2, −1, 1 + j2}

3.16.5 Real and odd


X (k) = {0, j6, 0, − j6}

3.17.2
X (k) = {14, 3 + j1, 0, 3 − j1}

The power over one period is 54.

Chapter 4

4.1.1

x(m, n) = 2 − 1.5e j ( 4 (m+n)+ 6 ) − 1.5e− j ( 4 (m+n)+ 6 )


2π π 2π π

− 0.5 je j ( 4 (2m+n)+ 3 ) + 0.5 je− j ( 4 (2m+n)+ 3 )


2π π 2π π
Answers to Selected Exercises 341

The samples of x(m, n) are


⎡ ⎤
0.2679 4.0000 3.7321 −0.0000
⎢ ⎥
⎢ ⎥
⎢ 2.6340 4.0981 1.3660 −0.0981 ⎥
x(m, n) = ⎢ ⎥
⎢ 5.4641 1.0000 −1.4641 3.0000 ⎥
⎣ ⎦
−0.3660 −1.0981 4.3660 5.0981

The DFT is
⎡ ⎤
32 0 0 0
⎢ ⎥
⎢ ⎥
⎢ 0 −20.7846 − j12 0 0⎥
X (k, l) = ⎢ ⎥
⎢ 0 6.9282 − j4 0 6.9282 + j4 ⎥
⎣ ⎦
0 0 0 −20.7846 + 12

4.2.1 ⎡ ⎤
40 −3 + j3 −2 −3 − j3
⎢ ⎥
⎢ ⎥
⎢ 1 + j1 −2 + j2 −7 + j3 j2 ⎥
X (k, l) = ⎢ ⎥
⎢ 5 − j7 5 + j7 ⎥
⎣ 2 4 ⎦
1 − j1 − j2 −7 − j3 −2 − j2

The average power is 122.


4.3.3 ⎡ ⎤
1 − j1 −1 j1
⎢ ⎥
⎢ ⎥
⎢ j1 1 − j1 −1 ⎥
X (k, l) = ⎢ ⎥
⎢ −1 1 − j1 ⎥
⎣ j1 ⎦
− j1 −1 j1 1

4.4.2
⎡ ⎤
26.00 + j0.00 0.00 + j8.00 −6.00 + j0.00 0.00 − j8.00
⎢ ⎥
⎢ ⎥
⎢ 6.00 + j0.00 −4.00 − j4.00 2.00 − j4.00 −4.00 − j4.00 ⎥
X (k, l) = ⎢ ⎥
⎢ 2.00 + j0.00 0.00 + j0.00 −6.00 + j0.00 0.00 + j0.00 ⎥
⎣ ⎦
6.00 + j0.00 −4.00 + j4.00 2.00 + j4.00 −4.00 + j4.00
342 Answers to Selected Exercises
⎡ ⎤
18.00 + j0.00 3.00 − j3.00 0.00 + j0.00 3.00 + j3.00
⎢ ⎥
⎢ ⎥
⎢ 3.00 + j5.00 −6.00 + j2.00 −5.00 − j1.00 0.00 + j2.00 ⎥
H (k, l) = ⎢ ⎥
⎢ 0.00 + j0.00 −1.00 − j1.00 −6.00 + j0.00 −1.00 + j1.00 ⎥
⎣ ⎦
3.00 − j5.00 0.00 − j2.00 −5.00 + j1.00 −6.00 − j2.00
⎡ ⎤
⎢ 468.00 + j0.00 24.00 + j24.00 −0.00 + j0.00 24.00 − j24.00 ⎥
⎢ ⎥
⎢ 18.00 + j30.00 32.00 + j16.00 −14.00 + j18.00 8.00 − j8.00 ⎥
X (k, l)H (k, l) = ⎢



⎢ 0.00 + j0.00 0.00 + j0.00 36.00 + j0.00 0.00 + j0.00 ⎥
⎣ ⎦
18.00 − j30.00 8.00 + j8.00 −14.00 − j18.00 32.00 − j16.00

⎡ ⎤
40 25 24 37
⎢ ⎥
⎢ ⎥
⎢ 23 24 19 36 ⎥
y(m, n) = ⎢ ⎥
⎢ 29 23 33 23 ⎥
⎣ ⎦
37 33 29 33

⎡ ⎤
⎢ 468.00 + j0.00 −24.00 + j24.00 −0.00 + j0.00 −24.00 − j24.00 ⎥
⎢ ⎥
⎢ 18.00 − j30.00 16.00 + j32.00 −6.00 + j22.00 −8.00 + j8.00 ⎥
X (k, l)H ∗ (k, l) = ⎢



⎢ 0.00 + j0.00 −0.00 + j0.00 36.00 + j0.00 −0.00 + j0.00 ⎥
⎣ ⎦
18.00 + j30.00 −8.00 − j8.00 −6.00 − j22.00 16.00 − j32.00

⎡ ⎤
31 24 35 36
⎢ ⎥
⎢ ⎥
⎢ 20 32 36 44 ⎥
r xh (m, n) = ⎢ ⎥
⎢ 26 24 34 24 ⎥
⎣ ⎦
28 25 24 25
⎡ ⎤
⎢ 468.00 + j0.00 −24.00 − j24.00 −0.00 + j0.00 −24.00 + j24.00 ⎥
⎢ ⎥
⎢ 18.00 + j30.00 16.00 − j32.00 −6.00 − j22.00 −8.00 − j8.00 ⎥
H (k, l)X ∗ (k, l) = ⎢



⎢ 0.00 + j0.00 0.00 + j0.00 36.00 + j0.00 −0.00 + j0.00 ⎥
⎣ ⎦
18.00 − j30.00 −8.00 + j8.00 −6.00 + j22.00 16.00 + j32.00
Answers to Selected Exercises 343
⎡ ⎤
31 36 35 24
⎢ ⎥
⎢ ⎥
⎢ 28 25 24 25 ⎥
rhx (m, n) = ⎢ ⎥
⎢ 26 24 34 24 ⎥
⎣ ⎦
20 44 36 32
⎡ ⎤ ⎡ ⎤
676 64 36 64 70 40 38 40
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
∗ ⎢ 36 32 20 32 ⎥ ⎢ 50 42 34 42 ⎥
X (k, l)X (k, l) = ⎢ ⎥ r x x (m, n) = ⎢ ⎥
⎢ 4 0 36 0 ⎥ ⎢ 40 36 40 36 ⎥
⎣ ⎦ ⎣ ⎦
36 32 20 32 50 42 34 42

Chapter 5

5.1.3
The input sequences are zero padded.

X (k) = {10, −0.1213 − j6.5355, −1 + j3, 4.1213 − j0.5355, 0, 4.1213


+ j0.5355, −1 − j3, −0.1213 + j6.5355}

H (k) = {−2, 2.4142 + j1.2426, −2 − j2, −0.4142 + j7.2426, 10,


− 0.4142 − j7.2426, −2 + j2, 2.4142 − j1.2426}

Y (k) = X (k)H (k) = {−20, 7.8284 − j15.9289, 8 − j4, 2.1716


+ j30.0711, 0, 2.1716 − j30.0711, 8 + j4, 7.8284 + j15.9289}

y(n) = IDFT(Y (k)) = {2, −3, 7, −7, −3, 0, −16, 0}

5.2.1 The input sequences are zero padded.


⎡ ⎤
1 2 + j1 3 2 − j1
⎢ ⎥
⎢ ⎥
⎢ −2 − j3 −1 + j2 4 + j 3 − j4 ⎥
X (k, l) = ⎢ ⎥
⎢ −5 − j5 ⎥
⎣ j5 5 ⎦
−2 + j3 3 + j4 4 − j1 −1 − j2
344 Answers to Selected Exercises
⎡ ⎤
4 − j4 −4 j4
⎢ ⎥
⎢ ⎥
⎢ 5 + j1 1 − j1 −1 + j3 3 + j5 ⎥
H (k, l) = ⎢ ⎥
⎢ 6 4 − j2 2 4 + j2 ⎥
⎣ ⎦
5 − j1 3 − j5 −1 − j3 1 + j1

⎡ ⎤
4 4 − j8 −12 4 + j8
⎢ ⎥
⎢ ⎥
⎢ −7 − j17 1 + j3 −7 + 11 29 + j3 ⎥
Y (k, l) = X (k, l)H (k, l) = ⎢ ⎥
⎢ −30 10 + j20 10 10 − j20 ⎥
⎣ ⎦
−7 + j17 29 − j3 −7 − j11 1 − j3
⎡ ⎤
2 −3 −9 0
⎢ ⎥
⎢ ⎥
⎢ 0 14 3 0⎥
y(m, n) = IDFT(Y (k, l)) = ⎢ ⎥
⎢ −2 −3 2 0⎥
⎣ ⎦
0 0 0 0

5.3.2 The input sequences are zero padded.

X (k) = {5, −0.4142 − j2.2426, 3 + j2, 2.4142 − j6.2426,


− 7, 2.4142 + j6.2426, 3 − j2, −0.4142 + j2.2426}

H ∗ (k) = {6, −0.4142 + j3.2426, 2 − j2, 2.4142 + j5.2426,


− 6, 2.4142 − j5.2426, 2 + j2, −0.4142 − j3.2426}

Y (k) = X (k)H ∗ (k) = {30, 7.4437 − j0.4142, 10 − j2, 38.5563 − j2.4142,


42, 38.5563 + j2.4142, 10 + j2, 7.4437 + j0.4142}

r xh (n) = IDFT(Y (k)) = {23, −6, 6, 4, 0, 4, 7, −8, }

5.4.1 The input sequences are zero padded.


Answers to Selected Exercises 345
⎡ ⎤
1 2 + j1 3 2 − j1
⎢ ⎥
⎢ ⎥
⎢ −4 − j5 −3 2 − j1 1 − j6 ⎥
X (k, l) = ⎢ ⎥
⎢ −9 −4 + j5 1 −4 − j5 ⎥
⎣ ⎦
−4 + j5 1 + j6 2 + j1 −3
⎡ ⎤
2 −2 + j4 −6 −2 − j4
⎢ ⎥
⎢ ⎥
∗ ⎢ 4 − j2 0 −2 − j4 2 − j6 ⎥
H (k, l) = ⎢ ⎥
⎢ 4 + j2 4 − j2 ⎥
⎣ 6 2 ⎦
4 + j2 2 + j6 −2 + j4 0

⎡ ⎤
2 −8 + j6 −18 −8 − j6
⎢ ⎥
⎢ ⎥
⎢ −26 − j12 0 −8 − j6 −34 − j18 ⎥
Y (k, l) = X (k, l)H ∗ (k, l) = ⎢ ⎥
⎢ −54 −26 + j12 2 −26 − j12 ⎥
⎣ ⎦
−26 + j12 −34 + j18 −8 + j6 0
⎡ ⎤
−17 −9 0 0
⎢ ⎥
⎢ ⎥
⎢ 9 2 0 9⎥
r xh (m, n) = IDFT(Y (k, l)) = ⎢ ⎥
⎢ 0⎥
⎣ 0 0 0 ⎦
0 9 0 −1

5.5.2
X (k) = {8, 1 + j3, −2, 1 − j3}, H (k) = {0, − j, 0, j}

x h (n) = {1.5, 0.5, −1.5, −0.5} DFT(x(n) + j x h (n)){8, 2 + j6, −2, 0}

Chapter 6

6.1.1

x0 (n) = x4 (n) = x8 (n) = {1 + j1.7321, 1 + j1.7321, 1 + j1.7321, 1 + j1.7321}

x1 (n) = x5 (n) = {1 + j1.7321, −1.7321 + j1, −1 − j1.7321, 1.7321 − j1}

x2 (n) = x6 (n) = {1 + j1.7321, −1 − j1.7321, 1 + j1.7321, −1 − j1.7321}

x3 (n) = x7 (n) = {1 + j1.7321, 1.7321 − j1, −1 − j1.7321, −1.7321 + j1}


346 Answers to Selected Exercises

6.2.2

x0 (n) = x8 (n) = {−1.7321, −1.7321, −1.7321, −1.7321,


− 1.7321, −1.7321, −1.7321, −1.7321}
  
2π π 2π π 2π π
−2 cos 1n + = −2 cos 7n − = −2 cos 9n +
8 6 8 6 8 6

= {−1.7321, −0.5176, 1.0000, 1.9319, 1.7321, 0.5176, −1.0000, −1.9319}


  
2π π 2π π 2π π
−2 cos 2n + = −2 cos 6n − = −2 cos 10n +
8 6 8 6 8 6

= {−1.7321, 1, 1.7321, −1, −1.7321, 1, 1.7321, −1}


  
2π π 2π π 2π π
−2 cos 3n + = −2 cos 5n − = −2 cos 11n +
8 6 8 6 8 6

= {−1.7321, 1.9319, −1, −0.5176, 1.7321, −1.9319, 1, 0.5176}

x4 (n) = x12 (n) = {−1.7321, 1.7321, −1.7321, 1.7321, −1.7321, 1.7321, −1.7321, 1.7321}

6.3.3
wr (n) = {1, 1, 1, 1, 1, 0, 0, 0}

x(n) = {1, −0.7071, −0, 0.7071, −1, 0.7071, 0, −0.7071}

X (k) = {0, 0, 0, 4, 0, 4, 0, 0}

xt (n) = {1, −0.7071, −0, 0.7071, −1, 0, 0, 0}

X t (k) = {0, 1, j1.4142, 3, 0, 3, − j1.4142, 1}

|X t (k)| = {0, 1, 1.4142, 3, 0, 3, 1.4142, 1}

6.4.4
whan (n) = {0, 0.3455, 0.9045, 0.9045, 0.3455, 0, 0, 0}

x(n) = {0.5, 0.9659, 0.8660, 0.2588, −0.5, −0.9659, −0.8660, −0.2588}

X (k) = {0, 2 − j3.4641, 0, 0, 0, 0, 2 + j3.464}

xt (n) = {0, 0.3337, 0.7833, 0.2341, −0.1727, 0, 0, 0}


Answers to Selected Exercises 347

X t (k) = {1.1784, 0.2432 − j1.1848, −0.9561 − j0.0996, 0.1023 + j0.3818,

0.0428, 0.1023 − j0.3818, −0.9561 + j0.0996, 0.2432 + j1.1848}

|X t (k)| = {1.1784, 1.2095, 0.9612, 0.3953, 0.0428, 0.3953, 0.9612, 1.2095}

Chapter 7

7.1.3

x(t) = e j (π0t) + j2e j (2t+ 6 ) − j2e− j (2t+ 6 ) + 4e j (3t− 3 ) + 4e− j (3t− 3 )


π π π π

The coefficients are


√ √
X f s (0) = 1, X f s (±1) = 0, X f s (±2) = −1 ± j 3, X f s (±3) = 2 ∓ j2 3

The samples are

{3.0000, −2.5300, 1.3822, 8.3258, −10.5999, 9.2096, −1.7876}

ω0 = 1.
7.2.2 After canceling common factors, the frequency of the waveforms is 21 and 29 .
The LCM of the denominators (2,9) is 18. The GCD of the numerators (1,2) is 1.
Therefore, the fundamental frequency is ω0 = 181
rad/s. The fundamental period is
T = ω0 = 1 = 36π. The first sinusoid is the 9th harmonic. The second sinusoid
2π 2π18

is the 4th harmonic.

X f s (0) = 1, X f s (±4) = ∓0.5 j, X f s (±9) = ± j

7.3.1

1 a − jkω0 t
X f s (k) = e dt
T −a
1 −1 − jkω0 t a 1 −1 − jkω0 a
= e −a = (e − e jkω0 a )
T jkω0 T jkω0
2 1 2 sin(kω0 a)
= (e jkω0 a − e− jkω0 a ) =
T j2kω0 T kω0

With ω0 = π/5, a = 2, T = 10.

sin(0.4kπ)
X f s (k) =

348 Answers to Selected Exercises


sin(0.4kπ) jk0.2πt
x(t) = e
k=−∞

7.4.1
∞   
2 4 1 π 
x(t) = + cos 2k t − =
π π k=1 1 − 4k 2 2

2 4   π  4   π  4   π 
− cos 2 t − − cos 4 t − − cos 6 t − + ···
π 3π 2 15π 2 35π 2
2 4 4 4
= + cos(2t) − cos(4t) + cos(6t) + · · ·
π 3π 15π 35π
7.5.2 With Ts = 1, the samples are

{3.3660, 3, 4.3660, 1.2679}

With 4 samples, the DFT coefficients are

{12, −1 − j1.7321, 3.4641, −1 + j1.7321}

With Ts = 0.8, the samples are

{3.3660, 3.2624, 3.7056, 3.6386, 1.0273}

With 5 samples, the DFT coefficients are

{15, −1.25 − j2.1651, 2.1651 − j1.25, 2.1651 + j1.25, −1.25 + j2.1651}

Chapter 8

8.2
j2 (sin(2ω)) = (e j2ω − e− j2ω ) ↔ δ(n + 2) − δ(n − 2)

8.4
X (e jω ) = 3 + e− jω + 2e− j2ω and H (e jω ) = 1 + 2e− jω + 4e− j2ω

X (e jω )H (e jω ) = 3 + 7e− jω + 16e− j2ω + 8e− j3ω + 8e− j4ω

{3, 7, 16, 8, 8}

8.6
Answers to Selected Exercises 349


2π ej 8
H (e j 8 ) = 2π = 0.6350∠(0.3197)
+ 0.7
ej 8


2π π
y(n) = 0.6350 sin n − + 0.3197
8 6

8.8
 
y(n) = −3(−0.6)n + 4(−0.8)n u(n)

8.10.1
X (e jω ) = 2e j2ω + e jω + 3 + 4e− jω

x p(n) = {x(0) = 3, x(1) = 4, x(2) = 2, x(3) = 1}

x p_t (n) = {x(0) = 3, x(1) = 4, x(2) = 2, x(3) = 0}

The DFT of x p_t (n) is


{9, 1 − j4, 1, 1 + j4}

The DFT of x p(n) is


{10, 1 − j3, 0, 1 + j3}

The DFT of the window w(n) = {1, 1, 1, 0} is

{3, − j1, 1, j1}

The linear convolution of the two spectra, divided by 4, is

{7.5, 0.75 − j4.75, 1.75 − j0.25, 1 + j4, 1.5, 0.25 + j0.75, −0.75 + j0.25}

The circular convolution output can be obtained by adding the last three terms with
the first three terms.
Chapter 9
9.2
2 + jω
(2 + jω)2 + 9

X ( j0) = 0.1538, X ( jπ) = 0.2727 − j0.0912

9.5.1
j
X f s (0) = 0.5 and X f s (k) = , k = 0
2kπ
350 Answers to Selected Exercises

9.6.2 
1 1
πδ(t) + ↔ u(−ω)
2π jt

9.7.3 
sin((ω − 3)2) sin((ω + 3)2)
X ( jω) = − j −
(ω − 3) (ω + 3)

9.8.2
1 1
5 + jω 4 + jω

9.9.1
π jω
(δ(ω − 3) + δ(ω + 3)) − 2
2 (ω − 32 )

9.10.3 
− j2ω 1
e πδ(ω) +

9.11.3
e− j2ω 1 e− j2ω
X ( jω) = −2 − 2+
jω ω ω2

The derivative of x(t) is

1 e− j2ω
jω X ( jω) = −2e− j2ω + −
jω jω

9.12.3
0.5 0.5
0.5πδ(ω) + −
jω 2 + jω

9.14.1
   
2π π 2π π − j π3 2π j π3 2π
sin t+ = cos t− ↔π e δ ω− +e δ ω+
8 6 8 3 8 8

9.15.1
sin(5ω)
u(t + 5) − u(t − 5) ↔ 2
ω
Ts = 1.
Answers to Selected Exercises 351



xs (t) = (u(n + 5) − u(n − 5))δ(t − n) ↔
n=−∞

sin(5(ω + 2kπ))
X s ( jω) = 2
k=−∞
ω + 2kπ

Ts = 0.5.


xs (t) = (u(0.5n + 5) − u(0.5n − 5))δ(t − 0.5n) ↔
n=−∞

sin(5(ω + 4kπ))
X s ( jω) = 2 2
k=−∞
ω + 4kπ

The other form for X s ( jω), with Ts = 1, is

0.5e j5ω + e j4ω + e j3ω + e j2ω + e jω + 1 + e− jω + e− j2ω + e− j3ω + e− j4ω + 0.5e− j5ω

For Ts = 0.5, 21 terms are required. With Ts = 1, the samples of X ( jω) and those
of the 2 sampled versions are, respectively,

{10, −1.8006, 1.2732, −0.6002, 0}

{10, −1.7125, 1.0151, −0.3090, 0}

{10, −1.7071, 1, −0.2929, 0}

With Ts = 0.5, the samples of the 2 sampled versions are, respectively,

{19.9999, −3.5575, 2.4218, −1.0663, 0}

{19.9999, −3.5575, 2.4218, −1.0663, 0}

9.16.3


2π π
xs (t) = 2 cos 3 (0.5n) + δ(t − 0.5n) ↔
n=−∞
8 3

 
2π π 2π π 2π
X s ( jω) = 16e j 3 δ ω − 3 − 4mπ + 16e− j 3 δ ω + 3 − 4mπ
(0.5)(16) m=−∞ 8 8

9.19
y(t) = (0.25e−t + 0.75e−3t − 3.5te−3t )u(t)
352 Answers to Selected Exercises

9.20.1
1
X ( jω) =
1 + jω

The sample values of the signal are

{0.5000, 0.2865, 0.0821, 0.0235}

The DFT of these values, after scaling by Ts = 1.25 s, is

{1.1151, 0.5224 − j0.3287, 0.3401, 0.5224 + j0.3287}

The corresponding 4 samples of the FT are

{1, 0.3877 − j0.4872, 0.1367 − j0.3435, 0.0657 − j0.2478}

9.21.1
1
X ( jω) =
1.5 + jω

The sample values of the spectrum are

{0.6667, 0.0235 − j0.1228, 0.0060 − j0.0631, 0.0027 − j0.0423, 0.0027


+ j0.0423, 0.0060 + j0.0631, 0.0235 + j0.1228}

The IDFT of these values, after scaling by 1/Ts = 1/0.2 s, is

{0.5222, 0.7430, 0.5482, 0.5151, 0.3860, 0.3786, 0.2404}

The first 7 samples of x(t) are

{1, 0.7408, 0.5488, 0.4066, 0.3012, 0.2231, 0.1653}

Chapter 10

10.1.2
xe(n) = {0, 1, 0, 1}, xo(n) = {0, 0, 0, 0}

X (k) = {2, 0, −2, 0}, X e(k) = {2, 0, −2, 0}, X o(k) = {0, 0, 0, 0}

10.2.3

x(n) = {1.3660 − j1.3660, −0.3660 − j0.3660, 1.3660 − j1.3660, −0.3660 − j0.3660,


Answers to Selected Exercises 353

1.3660 − j1.3660, −0.3660 − j0.3660, 1.3660 − j1.3660, −0.3660 − j0.3660}

X (k) = {4 − j6.9282, 0, 0, 0, 6.9282 − j4, 0, 0, 0}

10.3.5

x(n) = {0.7071, 0.7071, −0.7071, −0.7071, 0.7071, 0.7071, −0.7071, −0.7071}

y(n) = {0.5000, −0.9659, 0.8660, −0.2588, −0.5000, 0.9659, −0.8660, 0.2588}

x(n) + j y(n) =

{0.7071 + j0.5000, 0.7071 − j0.9659, −0.7071 + j0.8660, −0.7071 − j0.2588,

0.7071 − j0.5000, 0.7071 + j0.9659, −0.7071 − j0.8660, −0.7071 + j0.2588}

X (k) + jY (k) = {0, 0, 2.8284 − j2.8284, −3.4641 + j2, 0, 3.4641 + j2, 2.8284 + j2.8284, 0}

X (k) = {0, 0, 2.8284 − j2.8284, 0, 0, 0, 2.8284 + j2.8284, 0}

Y (k) = {0, 0, 0, 2 + j3.4641, 0, 2 − j3.4641, 0, 0}

10.4.4

x(n) = {0.7071, 0.0000, −0.7071, 1.0000, −0.7071, −0.0000, 0.7071, −1.0000}

X (k) = {0, 0, 0, 2.8284 − j2.8284, 0, 2.8284 + j2.8284, 0, 0}


Index

A Conjugate of a complex number, 23


Aliasing, 159, 161, 212, 273 Continuous signals, 13
complex signals, 160 Convolution, 62, 64, 113, 114, 198, 199, 231,
real signals, 160 232, 262, 263
time domain, 245 2-D, 121
Aperiodic signals, 13 using the DFT, 123
Autocorrelation, 129 with separable filters, 123
circular, 118, 246
DFT
B alignment of origins, 117
Boundary descriptors difference between correlation, 129
Fourier, 50 linear, 114
linear and circular
difference in the output, 118
C output check, 116
Causal signal, 19 overlap-save method, 119
Circular shifting, 20 polynomial multiplication, 116
Complex exponential, 33 using the DFT, 116
series expansion, 34 block diagram, 118
Complex numbers, 22 weighted average, 114
absolute value, 24 zero padding, 117
addition, 23 Correlation, 66, 113, 128
argument, 24 auto, 129
complex plane, 22 cross-, 128, 264
conjugate of, 23 using the DFT, 129
difference, 23 Correlation coefficient, 140
division, 24, 25 Cosine
imaginary part, 22 series expansion, 34
imaginary unit, 22 Cross-correlation, 128, 264
multiplication, 23, 24
polar form, 24
real part, 22 D
rectangular form, 22 De Moivre’s theorem, 25
roots of, 25 Deterministic, 18
Complex plane, 22 DFT, 35
Complex polynomial, 35 applications, 130
Compression, 21 highpass filtering, 134
© Springer Nature Singapore Pte Ltd. 2018 355
D. Sundararajan, Fourier Analysis—A Signal Processing Approach,
https://doi.org/10.1007/978-981-13-1693-7
356 Index

Hilbert transform, 155 autocorrelation, 66


lowpass filtering, 130, 132 conjugates, 61
object detection, 140 convolution in frequency, 64
orthogonal frequency division modu- convolution in time, 62
lation, 144 correlation in time, 66
center-zero format, 40, 60, 90, 96 duality, 60
computational complexity, 99 frequency shifting, 59
convolution, 62 half-wave symmetry, 73
cross-correlation, 66 hermitian, 73
2-D, 81 linearity, 57
as 2 1-D DFTs, 82 Parseval’s theorem, 74
autocorrelation, 105 peroidicity, 58
center-zero format, 97 sum and difference of sequences, 66
computation of, 84 symmetry, 71
conjugate symmetry, 107 time reversal, 60
convolution in the frequency- time shifting, 59
domain, 103 upsampling, 67
convolution in the time-domain, 102 zero padding, 69
cross-correlation, 104 transform matrix, 42, 43, 45
definition, 96 twiddle factors, 43
linearity, 99 Differentiator
of cosine, 85 digital, 242
of exponential, 85 Digital filter design, 241
of pulse, 86 Dirichlet conditions, 186, 253
of real-valued signals, 98 Discrete Fourier transform
of sine, 86 properties
Parseval’s theorem, 109 table of, 322
periodicity, 100 table of, 321
properties, 99 Discrete-time Fourier transform, 217
reversal, 106 applications, 238
rotation, 107 as limiting case of the DFT, 219
row-column method, 89 convergence, 222
separable signals, 108 definition, 217, 220, 221
shift of a spectrum, 101 inverse, 218, 220, 221
sinusoidal surface, 86 numerical evaluation of, 245
spatial shift, 100 of DC, 224
sum and difference of sequences, 105 of exponential, 225
definition, 39 of impulse, 222
implementation of linear convolution, of periodic signals, 228
117 of pulse function, 222
log scale, 91 of unit-step, 227
matrix form, 42 Parseval’s theorem, 238
of alternating signal, 45 properties, 229
of complex data, 50 convolution in frequency, 232
of cosine, 48 convolution in time, 231
of DC, 45 correlation, 231
of exponential, 47 frequency-differentiation, 236
of impulse, 43 frequency-shifting, 230
of rectangular signal, 49 linearity, 229
of 8 × 8 signal, 91 summation, 237
of sine, 48 symmetry, 233
of sinusoid, 47, 48 table of, 325
properties time-expansion, 235
Index 357

time-reversal, 234 Fourier series, 180


time-shifting, 229 aliasing, 212
relation to DFT, 228 applications, 204
spectrum, 222 as limiting case of the DFT, 181
table of, 324 compact trigonometric form, 185
Downsampling, 243 existence, 186
in the frequency-domain, 244 exponential form, 182
fundamental, 180
fundamental frequency, 187
E Gibbs phenomenon, 193
Energy signal, 17 harmonics, 180
Energy spectral density, 270 numerical evaluation of, 210
Energy spectrum, 271 of a rectified sine wave, 205
Energy transfer function, 271 of a square wave, 191
Euler’s formula, 33 of an impulse train, 188
Even-symmetric signal, 14 periodicity, 185
Exponential, 10, 32 properties, 194
convolution in frequency, 199
convolution in time, 198
F frequency-shifting, 198
Fast computation of the DFT, 293 linearity, 194
bit-reversed order, 301 Parseval’s theorem, 203
computational complexity, 301 symmetry, 195
DFT algorithms for real data, 308 table of, 323
DFT of a pair of real data sets, 308 time-differentiation, 201
DFT of a single real data set, 312 time-integration, 201
even half-wave symmetry, 294 time-scaling, 201
half-wave symmetry, 294 time-shifting, 197
IDFT by DFT, 303 signal analysis, 183
IDFT of two transforms of real data, 310 signal synthesis, 182
linear filtering, 312 steady-state response, 207
odd half-wave symmetry, 294 symmetry of signals, 195
PM DIF DFT algorithm, 296 table of, 322
butterfly, 301 trigonometric form, 185
flow graph, 298 Fourier transform, 249
PM DIT DFT algorithm, 305 applications, 280
butterfly, 307 as limiting case of the FS, 249
flow graph, 307 definition, 250
RDFT algorithm, 312 Dirichlet conditions, 253
butterfly, 312 existence of, 253
flow graph, 313 FS from the FT, 255
RIDFT algorithm, 315 inverse, 250
butterfly, 315 numerical evaluation of, 285
flowgraph, 315 of a sampled signal, 273
Filter of complex sinusoid, 258
lowpass of cosine function, 272
averaging, 130 of DC, 256
separable, 132 of exponential, 256
Fourier analysis of impulse, 256
signal types, 179 of mixed class of signals, 271
spectral types, 179 of periodic signals, 272
Fourier descriptor of sgn function, 257
boundary reconstruction, 52 of sinc function, 253
358 Index

of sine function, 272 L


of unit step, 258 L’Hôpital’s rule, 333
properties, 258 Leakage, 159, 162
conjugation, 263 Hamming window, 164, 170
convolution in frequency, 263 Hann window, 164, 168
convolution in time, 262 rectangular window, 163
cross-correlation, 264 reduction of, 171
duality, 259 triangular window, 164, 166
frequency-differentiation, 269 truncation, 163
frequency-shifting, 261 windows, 164
linearity, 258 Least squares error, 40
Parseval’s theorem, 270
symmetry, 260
table of, 327 M
Mathematical formulas
time-differentiation, 267
table of, 329
time-integration, 268
time-reversal, 265
time-scaling, 265
N
time-shifting, 261 Noncausal signal, 19
relation to DFT, 277
relation to DTFT, 277
relation to FS, 255 O
table of, 326 Odd-symmetric signal, 14
using Orthogonality, 252 Orthogonality, 37
Frequency resolution, 171 Overlap-save method, 119
Frequency response, 239, 280

P
G Paley-Wiener criterion, 284
Parseval’s theorem, 109
Gibbs phenomenon, 193
for DFT, 74
for DTFT, 238
for FS, 203
H for FT, 270
Half-wave symmetry, 196 Periodic signals, 13
Hilbert transform, 243 Picket-fence effect, 174
Polynomial multiplication, 116
Power signal, 17
I
Ideal filters R
lowpass, 283 Radians, 5
Paley-Wiener criterion, 284 Random, 18
IDFT, 35 Rectangular window, 246
center-zero format, 40
definition, 39
matrix form, 42 S
IDFT using the DFT, 90 Sampling theorem, 162
Imaginary unit, 22 Sgn function, 226
Impulse, 224 Signals
Impulse response, 114, 239, 282, 292 aperiodic, 13
Impulse signal band-limited, 162
sifting property, 2, 3 causal, 19
Index 359

circular shifting, 20 frequency, 9


circular symmetry, 15 frequency range, 9
classification, 12 frequency, 7
compression, 21 phase, 7
continuous, 13 polar form, 7, 8
continuous quantized, 13 properties, 6
deterministic, 18 rectangular form, 7
digital, 13 relation to complex exponentials, 10
discrete, 13 sine, 9
energy, 17 sum of, 7
even-symmetric, 14 Spectrum, 35
expansion, 20 Steady-state response, 207, 239, 281
exponential, 10 System response, 240, 281
noncausal, 19
odd-symmetric, 14
periodic, 13 T
power, 17 Time-limited, 245
random, 18 Time reversal, 21
sinusoids, 5 circular, 21
time-limited, 162 Time scaling, 20
time reversal, 21 Time shifting, 19
circular, 21 Transfer function, 239, 280
time scaling, 20 Transform matrix, 42
time shifting, 19 Truncation, 245
unit-impulse, 2, 3, 114, 188 Twiddle factors, 43
unit-ramp, 5
unit-step, 4
zero padding, 22 U
Signum function, 226 Unit-impulse, 2, 3, 114, 188
Sinc function, 223, 254 Unit-ramp, 5
Sine Unit-step, 4
series expansion, 34
Sinusoids, 5
amplitude, 7 Z
continuous, 7 Zero-order hold filter, 280
cosine, 9 Zero padding, 22, 132
discrete, 8 Zero-state response, 282

You might also like