Professional Documents
Culture Documents
Orhan Özhan - Basic Transforms for Electrical Engineering-Springer (2022)
Orhan Özhan - Basic Transforms for Electrical Engineering-Springer (2022)
Basic
Transforms
for Electrical
Engineering
Basic Transforms for Electrical Engineering
Orhan Özhan
© The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Switzerland
AG 2022
This work is subject to copyright. All rights are solely and exclusively licensed 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, expressed 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 Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
To my Master, The Sultan of Knowledge and
Wisdom. . .
. . . And to The Cherished Memory of my
Parents.
Foreword
vii
viii Foreword
Chap. 1 while reading Chap. 2, then they should return to Chap. 1. The same thing
applies to Chap. 3.
In Part II, we assume that the reader is familiar with differential equations in order
to link the Laplace transform to linear systems. The chapters in Part II deal with the
Laplace, Fourier, and z-transforms as well as Fourier series, fast Fourier transform,
short-time Fourier transform, and discrete cosine transform. Laplace, Fourier, and
z-transform can be studied independently and in any order. Especially if the Laplace
transform has been taken in another course, it can be skipped entirely. Chapters 8
and 10 cover the fast Fourier transform and the discrete cosine transform and are
rather advanced. The Fourier transform must be studied before Chaps. 7, 8, and 10.
Although we have liberally resorted to electric circuits in examples time and again,
it is not our intention in this course to teach electric circuits; we just use them for
pedagogical reasons as a vehicle and motivation.
Real CEPSTRUM has been briefly mentioned in Chap. 6; the complex CEP-
STRUM, also known as the homomorphic analysis, has been reserved for a possible
future edition. Likewise, other transforms like the Hilbert transform are not included
in this edition. The wavelet transform on the other hand is a very sophisticated
subject which deserves to be dedicated a book on its own right.
Finally, a word is in order about the software we have used while writing the
book. We enjoy running extremely powerful math software on our computers. In
lieu of the slide rule, you can use SCILAB, MATHEMATICA, MAXIMA, etc.
These software provide complex number operations as well as very powerful signal
processing toolboxes. They just make our job easier, more fun, and more enjoyable.
LabVIEW is just another fantastic software for students. It is a graphical program-
ming platform which can be used in real-time or nonreal-time applications. In order
to make the subject matter more interesting and attractive, we have mostly used
LabVIEW in the text, examples, chapter problems, and projects. You can download
a trial version of LabVIEW from National Instruments website for free. With
LabVIEW or similar tools, you can derive more pleasure and satisfaction learning
the transforms than the older generations did using the archaic tools. LabVIEW
motivates the student to experiment with ideas and concepts buried in the examples
and problems and thus contributes to their understanding. Although LabVIEW is our
favorite software, we have occasionally given examples using MATLAB, SCILAB,
or LTSPICE. SCILAB and LTSPICE are also free to download. However, a warning
is in order for the reader of wit. All these super software are no good unless a
sound knowledge and an understanding of the underlying mathematics are attained.
Convince yourself that, without proper understanding, even with this software you
can’t go very far. Don’t settle for a trial-and-error strategy with software because
only the knowledge inspires you and gives you insight. Hopefully, the software
of our choice will help you like the topics, and make it a fun to learn through its
number-crunching power and breath-taking graphics.
Part I Background
1 Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 Representation of Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Euler’s Identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.1 Complex Exponential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.2 Conjugate of a Complex Number . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Mathematical Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.1 Identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.2 Addition and Subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.3 Multiplication and Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.4 Rotating a Number in Complex Plane . . . . . . . . . . . . . . . . . . . . . 14
1.4 Roots of a Complex Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.5 Applications of Complex Numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.5.1 Complex Numbers Versus Trigonometry . . . . . . . . . . . . . . . . . . 19
1.5.2 Integration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.5.3 Phasors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.5.4 3-Phase Electric Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1.5.5 Negative Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.5.6 Complex Numbers in Mathematics Software . . . . . . . . . . . . . 34
1.5.7 Roots of a Polynomial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2 Functions of a Complex Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.1 Limit of a Complex Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.2 Derivative of Complex Functions and Analyticity . . . . . . . . . . . . . . . . . . 58
2.3 Cauchy–Riemann Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
2.4 Rules of Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
2.5 Harmonic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
2.6 Applications of Complex Functions and Analyticity . . . . . . . . . . . . . . . 72
2.6.1 Elementary Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
2.6.2 Conformal Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
2.6.3 Fractals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
ix
x Contents
3 Complex Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
3.1 Integrating Complex Functions of a Real Variable . . . . . . . . . . . . . . . . . 101
3.2 Contours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
3.3 Integrating Functions of a Complex Variable . . . . . . . . . . . . . . . . . . . . . . . 105
3.4 Numerical Computation of the Complex Integral . . . . . . . . . . . . . . . . . . 108
3.5 Properties of the Complex Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
3.6 The Cauchy–Goursat Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
3.6.1 Integrating Differentiable Functions . . . . . . . . . . . . . . . . . . . . . . . 122
3.6.2 The Principle of Contour Deformation . . . . . . . . . . . . . . . . . . . 126
3.6.3 Cauchy’s Integral for Multiply Connected Domains. . . . . . 127
3.7 Cauchy’s Integral Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
3.8 Higher-Order Derivatives of Analytic Functions . . . . . . . . . . . . . . . . . . . 134
3.9 Complex Sequences and Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
3.10 Power Series Expansions of Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
3.10.1 Taylor and Maclaurin Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
3.10.2 Differentiation and Integration of Power Series. . . . . . . . . . . 156
3.11 Laurent Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
3.12 Residues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
3.12.1 Residue Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
3.12.2 Residue at Infinity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
3.12.3 Finding Residues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
3.13 Residue Integration of Real Integrals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
3.14 Fourier Integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Part II Transforms
4 The Laplace Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
4.1 Motivation to Use Laplace Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
4.2 Definition of the Laplace Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
4.3 Properties of the Laplace Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
4.3.1 Linearity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
4.3.2 Real Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
4.3.3 Real Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
4.3.4 Differentiation by s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
4.3.5 Real Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
4.3.6 Complex Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
4.3.7 Periodic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
4.3.8 Laplace Transform of Convolution . . . . . . . . . . . . . . . . . . . . . . . . 207
4.3.9 Initial Value Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
4.3.10 Final Value Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
4.4 The Inverse Laplace Transform. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
4.4.1 Real Poles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
4.4.2 Complex Poles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
4.4.3 Multiple Poles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Contents xi
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
List of Symbols and Abbreviations
∗ Convolution operator
Periodic convolution
δ(t) Dirac delta function; unit impulse function of time
δmn Kronecker delta
1 ´ σ1 +j ∞
F (s) est ds Inverse Laplace transform of F(s) by contour integra-
2πj σ1 −j ∞
tion
∈
´∞ Belongs to, is a member of the set
f (t) e−st dt Single-sided (unilateral) Laplace transform of f (t)
´0−
ABCA Contour integral along closed path ABCA, starting
from point A, and going through points B, C and
´ returning back to point A
C Complex integral along path C
limx,y→x0 ,y0 f (x, y) Limit of f (x, y) as x and y approach x0 and y0
limz−→z0 f (z) Limit of f (z) as z approaches z0
C The space of complex numbers
R The space of real numbers
ak Basis vector in k-th dimension
A·B Scalar (dot) product of vectors A and B
L {f (t)} Laplace transform of f (t)
Im (z) Imaginary part of complex number z
Re
¸ (z) Real part of complex number z
C ı Contour integral along closed path C
C, C Contour integral along closed path C in counterclock-
wise and clockwise direction
ω Imaginary part of complex frequency; angular fre-
quency
σ Real part of complex frequency
i, j, k Orthonormal basis vectors in 3D space
h(t) Impulse response
ej nω0 t Basis functions for Fourier series
xv
xvi List of Symbols and Abbreviations
x + y = 2,
xy = 2.
2
Substituting y = in the first equation we obtain
x
x 2 − 2x + 2 = 0,
(x − 1)2 + 1 = 0,
(x − 1)2 = −1,
√
x − 1 = ∓ −1. (1.1)
We can take the positive square root for x, and the negative square root for y.
Thus
√
x =1+ −1,
√
y =1− −1.
The square roots of −1 in (1.1) were first shunned by people as being impossible,
undefined, or unrealistic. In the sixteenth century Italian mathematician Gerolamo
Cardano, working on the problem, gave two “impossible” results. He warned that
these results were “meaningless, fictitious and imaginary[1].” In the seventeenth
century Swiss Mathematician Leonhard Euler wrote a book on algebra and gave
several examples and applications of imaginary numbers. He made, however,
apologetic remarks about these fictitious numbers saying that:
√ √
All such expressions as −1, −2, etc. are impossible or imaginary numbers, since they
represent roots of negative quantities, and of such numbers we may truly assert that they
are neither nothing,1 nor greater than nothing, nor less than nothing, which necessarily
constitutes them imaginary or impossible[2].
z = x + jy, (1.2)
where x and y are the real and imaginary parts of z, respectively. ”Imaginary” is
an unlucky misnomer due to historical reasons (mathematicians are not quite happy
about this naming).
x = Re (z) ,
y = Im (z) .
A complex number z can also be represented by its distance to the origin of the
complex plane, and the angle a line drawn from z to the origin subtends with the
real axis
z = r θ = |z| θ, (1.3)
where r = |z| is called the magnitude or modulus of z, and θ is called its argument,
that is, the angle subtended by the line drawn from the origin to z. The unit
customarily used for the argument is radians. θ is a number between 0 and 2π .
Notice that θ and θ + 2π represent the same argument. Conversions between polar
coordinates and rectangular coordinates are obtained by using the right triangle in
Fig. 1.1:
r= x2 + y2,
y
θ = tan−1 ,
x
x = r cos θ,
y = r sin θ.
6 1 Complex Numbers
x2 x4 x3 x5
We recognize 1 − + − · · · and x − + − · · · as the Maclaurin series
2! 4! 3! 5!
expansions for cos x and sin x. Hence we obtain the Euler’s Formula
The notation exp(x) is also used for ex in the literature, especially if the exponent
is a long ”expression” and eexpression looks clumsy. In this book we liberally use
eexpression and exp (expression) interchangeably.
1.2 Euler’s Identity 7
Example 1.2 z = e−j π/3 = cos (−π/3) + j sin (−π/3) = 0.5 − j 0.866.
A special case of Eq. (1.4) is called Euler’s Identity and obtained by setting θ =
π in Eq. (1.4):
ej π + 1 = 0 (1.5)
z∗ = (x + jy)∗
z∗ = x + j (−y)
= x − jy
∗ ∗
Re z + j Im z = Re (z) − j Im (z) .
Thus z and its conjugate z∗ have the same real part, while their imaginary parts are
the negative of each other.
Complex conjugate can be formulated in polar coordinates by making use of the
Euler’s formula. The conjugate of the complex exponential ej θ is
∗
ej θ = (cos θ + j sin θ )∗
= cos θ − j sin θ.
Using trigonometric identities cos θ = cos (−θ ) and − sin θ = sin (−θ ) we write
By scaling ej θ with r, that is z = rej θ , we cover any point in the complex plane.
Then the conjugate of z is expressed in polar coordinates by
∗
z∗ = rej θ = re−j θ = r − θ.
Thus z and its conjugate z∗ have the same magnitude, but their arguments are the
negative of each other. Therefore we deduce that regardless of the expression being
in rectangular or polar form, one must replace all j ’s with −j ’s to find the conjugate
of an expression of complex numbers.
1.3.1 Identity
Two complex numbers z1 and z2 are said to be identical if and only if their real parts
are equal and their imaginary parts are equal, i.e.,
This is equivalent to saying that z1 and z2 are identical if and only if their magnitudes
are equal and their arguments are equal, i.e.,
Addition of two complex numbers are accomplished by adding their respective real
and imaginary parts using the rectangular form (Eq. 1.2). Let z1 and z2 be two
complex numbers. Their sum z = z1 + z2 can be found by adding the real parts
1.3 Mathematical Operations 9
to give the real part of the sum. Likewise the imaginary part of the sum is the sum
of the imaginary parts of z1 and z2 .
z = z 1 + z2
x + jy = x1 + jy1 + (x2 + jy2 )
x + jy = (x1 + x2 ) + j (y1 + y2 ) .
Hence:
x = x1 + x2 , and
y = y1 + y2 .
z = z 1 − z2
x + jy = x1 + jy1 − (x2 + jy2 )
x + jy = (x1 − x2 ) + j (y1 − y2 ) .
Hence:
x = x1 − x2 , and
y = y1 − y2 .
Conjugate of the sum of complex numbers is equal to the sum of the conjugates
of those numbers, i.e.,
Real and imaginary parts of a complex number can be extracted using addition
and subtraction:
z + z∗
Re (z) = , and
2
z − z∗
Im (z) = .
2j
As depicted in Fig. 1.2, addition and subtraction of complex numbers are like
adding and subtracting 2D vectors. The sum and difference of two complex numbers
are the two diagonals of a parallelogram constructed on the numbers z1 and z2 .
Thinking vectorwise, the sum corresponds to the diagonal belonging to the resultant
vector (Fig. 1.2a); the difference corresponds to the other diagonal (Fig. 1.2b).
For addition and subtraction of complex numbers in polar coordinates see
Problems 2, 9, 10, 26 through 29.
z = z 1 z2
x + jy = (x1 + jy1 ) (x2 + jy2 ) = x1 x2 − y1 y2 + j (x1 y2 + y1 x2 ) .
Thus we get
x = x1 x2 − y1 y2 ,
y = x1 y2 + y1 x2 .
1.3 Mathematical Operations 11
z = rej θ = r θ ,
z1 z2 = r1 ej θ1 r2 ej θ2 = (r1 θ1 ) (r2 θ2 ) ,
z1 z2 = r1 r2 ej (θ1 +θ2 ) = r1 r2 (θ1 + θ2 ) (1.6)
r = r1 r2 ,
θ = θ1 + θ2 .
As a special case of the preceding relations, the square of a complex number can be
written in rectangular coordinates as:
z · z∗ = r 2 = x 2 + y 2 ,
z2 = x 2 − y 2 + j 2xy
z · z∗ = ej θ e−j θ = r 2 , and
z2 = r 2 ej 2θ . (1.7)
z1 x1 + jy1
z= =
z2 x2 + jy2
z1 z2∗
=
z2 z2∗
(x1 + jy1 ) (x2 − jy2 )
=
(x2 + jy2 ) (x2 − jy2 )
x1 x2 + y1 y2 + j (y1 x2 − x1 y2 )
= .
x22 + y22
12 1 Complex Numbers
z1 r1 ej θ1 r1
z= = = exp [j (θ1 − θ2 )] (r2 = 0) . (1.9)
z2 r2 ej θ2 r2
A special case ensures from (1.9) if we divide a complex number by its conjugate:
z
= ej 2θ .
z∗
Assume that the complex numbers are represented in polar form as:
z1 = |z1 | ej θ1 , and
z2 = |z2 | ej θ2 .
cos (θ1 − θ2 ) 1 .
Multiplying the two sides of the inequality by the magnitudes of the complex
numbers we get
Hence we have
jω
Example 1.4 Consider a complex function of ω given by H (ω) = 1 + . Plot
100
G (ω) = 20 log |H (ω)| and θ (ω) = arg [H (ω)].
jω
G (ω) = 20 log 1 +
100
ω 2
= 20 log 1 + .
100
jω
θ (ω) = arg 1 +
100
ω
= tan−1 .
100
ω 2
If ω 100, then 1 + ≈ 1 and we get G (ω) ≈ 0, θ (ω) ≈ 0.
100
ω 2 ω 2
If ω 100, then 1 + ≈ and we get G (ω) ≈ 20 log ω − 40,
ω 100 100
θ (ω) = tan−1 ≈ π/2. G (ω) is a straight line which passes through 2 =
100
log 102 with a slope 20.
ω 2 √
When ω = 100 then 1 + = 2 and we get G (ω) = 20 log 2 = 3,
100
θ (ω) = arg (1 + j ) = tan−1 1 ≈ π/4.
14 1 Complex Numbers
Fig. 1.3 Plot of 20 log |1 + j ω/100| and arg [1 + j ω/100] versus log ω
In electrical engineering, G (ω) and θ (ω) are called the dB gain and phase of
H (ω) respectively. In Fig. 1.3, 20 log |H (ω)| and θ (ω) are plotted versus ω. These
two graphs with logarithmic horizontal axes are called Bode plots. In Chap. 6 we
study Bode plots in more detail.
zej θ = rej ϕ ej θ
= r exp [j (ϕ + θ )] .
Fig. 1.4 Rotating graphical objects. (a) The pixel coordinates of the letters are assumed to form a
complex number z = x + jy. (b) Multiplying the pixels by e−j π/4 rotates the letters 45° degrees
clockwise around the z-plane origin (z = 0)
Complex numbers are not monstrous, but you can build monsters with complex
numbers. Next example shows how to build a Dragon Fractal using complex
number operations. These fractals are constructed by repeatedly adding new
complex numbers between adjacent complex numbers. Let z1 and z2 be existing
numbers. From z1 and z2 a third point z3 can be created through z3 = z1 +
0.5 (1 ∓ j ) (z2 − z1 ) applied
√ successively. Multiplication by 0.5 (1 ∓ j ) scales the
difference z2 − z1 by 1/ 2 and rotates it through ∓45◦ . If we rotate by 45◦ in
one step, we rotate by −45◦ in the next step. The process is repeated as many
times as desired. After a sufficiently large number of iterations, the dragon shape
emerges. Figure 1.5 shows the development of the fractal until we eventually obtain
the dragon figure after 524287 steps.
16 1 Complex Numbers
Rej θ = r N ej N ϕ .
ej N ϕ = ej (θ+2π n) ,
θ + 2π n
ϕ= , n = 0, · · · , N − 1.
N
Example 1.5 Find the 5-th roots of -1.
Solution
z = −1 can be expressed as z = 1ej π . Hence the 5-th roots are given as:
π + 2π n
√
5 j
zn = 1 e 5 (n = 0, 1, · · · , 4) ,
π
j
z0 = 1 e 5 ≈ 0.809 + j 0.588,
π + 2π
j
z1 = 1 e 5 ≈ −0.309 + j 0.951,
π + 4π
j
z2 = 1 e 5 = −1,
1.4 Roots of a Complex Number 17
π + 6π
j
z3 = 1 e 5 ≈ −0.309 − j 0.951,
π + 8π
j
z4 = 1 e 5 ≈ 0.809 − j 0.588.
6
Fig. 1.7 3rd order Butterworth poles are the roots of 1 + s
j ωc which lie in the left-half plane
18 1 Complex Numbers
Solution
The roots are found by solving
2N
s
1+ =0
j ωc
2N
s
= −1 ,
j ωc
s 1
= (−1) 2N ,
j ωc
1
s = j ωc (−1) 2N .
π π + 2nπ
= +
2 2N
π (2n + 1) π
= + (n = 0, 1, . . . , 2N − 1) .
2 2N
π π
For n = 0, s0 = ωc exp j + and for n = 2N − 1 we obtain s2N −1 =
π π
2 2N
π
ωc exp j − . The angle between successive poles is . In Fig. 1.7 s0 , s1 ,
2 2N N
and s2 are the poles for a Butterworth filter of order 3.
√
3
s0 = −0.5 + j ,
2
s1 = −1 ,
√
3
s2 = −0.5 − j .
2
making use of complex number rotations. Dragon and Mandelbrot fractals are
fun and extremely interesting. Steady-state solutions of sinusoidally excited linear
systems are easier with phasors than solving in the time domain.
In this section we cite applications to trigonometry and electrical engineering.
z + z∗ = ej x + e−j x
= cos x + j sin x + cos x − j sin x
= 2 cos x .
ej x + e−j x
cos x = . (1.10)
2
Likewise
z − z∗ = ej x − e−j x
= cos x + j sin x − cos x + j sin x
= j 2 sin x
and
ej x − e−j x
sin x = . (1.11)
2j
Using (1.10) and (1.11), several trigonometric identities are easily established
(see Problems 10 through 15). For example:
jα jβ
e + e−j α e + e−jβ
cos α · cos β =
2 2
1 ej (α+β) + ej (α−β) + e−j (α−β) + e−j (α+β)
= ·
2 2
1
cos α · cos β = · [cos (α + β) + cos (α − β)] .
2
20 1 Complex Numbers
x+y x−y
Setting α + β = x, α − β = y we have α = and β = . Using this
2 2
substitution, after multiplying by 2 we obtain
x+y x−y
cos x + cos y = 2 cos · cos .
2 2
This latter identity could also be obtained by force using the fact that
x+y x−y
x= + and
2 2
x+y x−y
y= − .
2 2
Thus after substitutions and elaboration we get
x+y x−y x+y x−y
j + −j +
e 2 2 +e 2 2
cos x + cos y =
2
x+y x−y x+y x−y
j − −j −
e 2 2 +e 2 2
+
2
⎡ x+y ⎛ x−y x−y⎞
1 j j −j
= ⎣e 2 ⎝e 2 + e 2 ⎠
2
x+y ⎛ x−y x − y ⎞⎤
−j j −j
+e 2 ⎝e 2 + e 2 ⎠⎦
⎛ x+y x+y⎞
j −j x−y
= ⎝e 2 + e 2 ⎠ cos
2
x+y x−y
cos x + cos y = 2 cos cos .
2 2
Example 1.7 Convert 5 sec x + 12 csc x into a product or ratio of sinusoidal
functions.
1.5 Applications of Complex Numbers 21
Solution
After converting secant and cosecant functions into sine and cosine functions, and
using Euler’s formula (Eq. 1.4) we can express the sine and cosine terms as the real
or imaginary part of a complex exponential.
5 12
5 sec x + 12 csc x = +
cos x sin x
5 sin x + 12 cos x
= .
sin x cos x
First we express the numerator as either the real part or the imaginary
part
of
a complex exponential. From Euler’s Formula cos x = Re ej x = Im j ej x and
sin x = Im ej x = Re −j ej x . We may use the imaginary parts to express the
numerator:
5 sin x + 12 cos x = Im 5ej x + Im 12j ej x
= Im 5ej x + 12j ej x
= Im ej x (5 + 12j )
= Im ej x 52 + 122 exp j tan−1 (12/5)
= Im 13 exp j x + tan−1 2.4
≈ 13 sin (x + 1.176) .
ej x − e−j x ej x + e−j x
sin x cos x = ·
2j 2
1 ej 2x + 1 − 1 − e−j 2x
= ·
2 2j
1
= sin 2x .
2
Finally we obtain
13 sin (x + 1.176)
5 sec x + 12 csc x = 1
2 sin 2x
26 sin (x + 1.176)
= .
sin 2x
22 1 Complex Numbers
1.5.2 Integration
Functions of the type eax sin bx and eax cos bx can be difficult or tedious to integrate
when we use integration by parts. Consider integrating eax sin bx by parts
ˆ ˆ
1 ax 1
eax sin bxdx = e sin bx + eax cos bxdx .
a ab
The solution involves a cyclic integration. The second term, ´ the integral of
eax cos bx, needs another integration by parts to produce a eax sin bxdx term
in the right-hand side. Then this term is collected with the left-hand side and the
ultimate integral is evaluated. The trigonometric relations that we have learned in
this chapter come to the rescue and eliminate sources of error and cut integration
time.
Substituting complex exponentials for sin bx in the integral results in two
integrals of exponential functions. Since the integral of a complex exponential
ecx
function ecx is just , there is no cyclic evaluation in the process.
c
ˆ ˆ
ej bx − e−j bx
e ax
sin bxdx = eax · dx
2j
ˆ
e(a+j b)x − e(a−j b)x
= dx
2j
ˆ ˆ
1
= e(a+j b)x dx − e(a−j b)x dx
2j
1 e(a+j b)x e(a−j b)x 1
= − = 2
2j a + j b a − jb a + b2
(a − j b) e(a+j b)x − (a + j b) e(a−j b)x
×
2j
1 (a − j b) eax ej bx − (a + j b) eax e−j bx
= ·
a2 +b 2 2j
1 aeax ej bx − j beax ej bx − aeax e−j bx − j beax e−j bx
= ·
a2 +b 2 2j
eax aej bx − j bej bx − ae−j bx − j be−j bx
= ·
a 2 + b2 2j
j bx −j
e ax ae − ae bx j bej bx + j be−j bx
= 2 · − .
a + b2 2j 2j
1.5 Applications of Complex Numbers 23
Fig. 1.8 Phasor addition. (a) V is found by Kirchhoff’s Voltage Law. (b) Adding the voltages
using phasors is more efficient than adding sinusoids in the time domain
Hence we get
ˆ
eax
eax sin bxdx = · (a sin bx − b cos bx) .
a2 + b2
1.5.3 Phasors
z = z1 + z2 = Aej (ωt+θ)
= A1 ej (ωt+θ1 ) + A2 ej (ωt+θ2 )
= ej ωt A1 ej θ1 + A2 ej θ2
= ej ωt Aej θ .
24 1 Complex Numbers
Hence
ej ωt Aej θ = ej ωt A1 ej θ1 + A2 ej θ2 .
Aej θ denotes the sum of the two complex numbers in parentheses. Canceling out
the factors ej ωt we obtain the relation
Aej θ = A1 ej θ1 + A2 ej θ2 .
The complex numbers Aej θ , A1 ej θ1 , and A2 ej θ2 are called phasors. The complex
numbers z, z1 , and z2 can be interpreted as phasors rotating counterclockwise in
the complex plane with an angular speed ω. If the time function is a sine rather than
cosine, then we have to convert it into cosine form by adding an extra phase angle
−π/2 rad (90◦ ) using the relation sin ωt = cos (ωt − π/2).
With this we have
Re ej ωt Aej θ = Re ej ωt A1 ej θ1 + A2 ej θ2
x = x1 + x2
= A1 cos (ωt + θ1 ) + A2 cos (ωt + θ2 )
= Re ej ωt A1 ej θ1 + Re ej ωt A2 ej θ2
= Re ej ωt A1 ej θ1 + A2 ej θ2
= Re ej ωt Aej θ
= A cos (ωt + θ ) .
z = A θ.
z = z 1 + z2 ,
A θ = A1 θ1 + A2 θ2 .
Example 1.8 A voltage source V = vej θ in Fig. 1.8 drives two electrical loads con-
√ voltages are measured to be v1 (t) = 5 cos (1000t + 0.9273)
nected in series whose
Volts, and v2 (t) = 5 cos (1000t + 2.6779) Volts. Find v (t).
1.5 Applications of Complex Numbers 25
Solution
We can express the voltages in phasor form as
= Re ej 1000t V ej θ Volts .
√
Hence we find V1 = 5ej 0.9273 = 3 + j 4 Volts, and V2 = 5ej 2.6779 = −2 + j
Volts. In Fig. 1.8, we find V by adding the phasors V1 and V2 :
V = V1 + V2
= 3 + j 4 + (−2) + j Volts
= 1 + j 5 Volts
√
= 26ej 1.3734 Volts .
To express v (t) in the time domain, we can restore the frequency into the
argument of cosine as follows
√
v (t) = 26 cos (1000t + 1.3734) Volts .
With x (t) = Re Xej ωt = |X| cos ωt, there arise occasions when we may want
to differentiate and integrate x (t) using phasors
dx d
= Re Xej ωt
dt dt
d j ωt
= Re X e
dt
= Re j ωXej ωt . (1.12)
26 1 Complex Numbers
Xej ωt
= Re . (1.13)
jω
ˆ
X
Here is the phasor which corresponds to the integral of x (t) dt.
jω
We can summarize these results in Eqs. 1.12 and 1.13 as the phasor transforma-
tions
x (t) ⇐⇒ X ,
dx (t)
⇐⇒ j ωX ,
dt
ˆ
1
x (t) dt ⇐⇒ X.
jω
We will take this topic in more detail in Chap. 5 when we study the Fourier series.
In circuit theory, the notion of resistance, which is the ratio of voltage to current, is
extended to electrical impedance. When we work with AC circuits, sinusoidal volt-
ages and currents can be found by the use of impedances of resistance, inductance
and capacitance. To obtain impedances of these fundamental components, their
voltages and currents are first transformed into phasors. Remember the terminal
equations of R, L, and C
R: v (t) = R i (t) ,
di (t)
L: v (t) = L ,
dt
ˆ
1 t
C: v (t) = i (τ ) dτ .
C −∞
R: V = RI,
L: V = j ωL I ,
1
C: V= I.
j ωC
1.5 Applications of Complex Numbers 27
Fig. 1.9 (a) Series-connected RL circuit driven by a current source. (b) The phasor diagram
The impedance is then found as the ratio of the voltage phasor to the current
phasor, that is Z = V/I. Thus the impedances of R, L, C are found to be
R: Z = R,
L: Z = j ωL ,
1
C: Z= .
j ωC
V = RI + j ωLI
= (R + j ωL) I
= ZI
Vp θ = |Z| θ · Ip 0
= |Z| Ip θ
28 1 Complex Numbers
Z = R + j ωL
−1 ωL
= R + ω L tan
2 2 2 .
R
√
Hence we find that v (t) = Ip R 2 + ω2 L2 cos (ωt + θ ) where θ =
tan−1 (ωL/R).
We have an important observation to make here: The total impedance of the
circuit is obtained by adding the individual impedances of resistance and inductance,
that is, Z = ZR +ZL . We can generalize this observation to n impedances connected
in series:
Z = Z1 + . . . + Zn .
Y = Y1 + . . . + Yn . (1.14)
component admittances to obtain the overall admittance. The phasor diagram for
admittances is shown in Fig. 1.10.
Y = YR + YC + YL
1 1
= + j ωC + .
R j ωL
1 1
Y = + j 103 · 5 · 10−5 +
50 j 10 · 0.1
3
1
= 0.02 + j 5 · 10−2 +
j 100
= 0.02 + j (0.05 − 0.01)
= 0.02 + j 0.04 mho .
1
Z=
Y
1
=
0.02 + j 0.04
50
=
1 + j2
√
= 10 5 exp − tan−1 2
V = ZI
= 22.36 − 63.4◦ · 1 0◦
= 22.36 − 63.4◦ Volts.
Note that this is a phasor quantity. The voltage value in time domain is found by
incorporating the angle of the phasor into the argument of the cosine function:
63.4π
V (t) = 22.36 cos 103 t −
180
= 22.36 cos 103 t − 1.106 Volts.
30 1 Complex Numbers
Solution
Let Z1 and Z2 denote the inductive and capacitive circuits, respectively. Since the
inductor R1 and L are connected in series:
Z1 = 1 + j 3 .
On the other hand R2 and C are connected in parallel. Therefore we can write
1
Y2 = 1 + = 1 + j 0.5 S,
−j 2
1 1
Z2 = =
Y2 1 + j 0.5
1.5 Applications of Complex Numbers 31
1 − j 0.5
=
1 + 0.25
= 0.8 − j 0.4 .
Z = Z1 + Z2
= 1 + j 3 + 0.8 − j 0.4
= 1.8 + j 2.6 .
Ubiquitous 3-phase electrical system is utilized to provide electric energy all over
the world. Different countries have different amplitude and frequency standards
for the 3-phase system. In European countries, 400 V–50 Hz 3-phase system is
in use at homes and industry; in north American countries, 240 V–60 Hz 3-phase
system has been adopted.2 Electric energy is generated three-phase, transmitted
three-phase, and consumed three-phase in industry. One of the main reasons for
3-phase system is that heavy-duty induction motors use rotating magnetic fields
which are easily generated with three-phase alternating current.3 Also in contrast to
a single-phase AC system, the neutral cable carries no current under balanced load
conditions. As such, the neutral wire can be optionally omitted from a balanced
3-phase installation.
As shown in Fig. 1.12, a 3-phase supply with a neutral wire produces three
voltages VA , VB , VC of equal amplitude and frequency whose phases differ by
120◦ . The phase voltages are measured with respect to the neutral denoted by N
in the figure. These voltages can be denoted by three phasors:
VA = Vm 0◦ ,
VB = Vm 120◦ ,
VC = Vm 240◦ .
2 The voltages are specified phase-to-phase. In the USA and Canada, different phase-to-phase volt-
VAB = VA − VB = Vm 0 − Vm 120◦
= Vm (1 − cos 120◦ − j sin 120◦ )
√
1 3
= Vm 1 + − j
2 2
√
3−j 3
= Vm
2
√
= 3Vm − 30◦ .
1.5 Applications of Complex Numbers 33
For the other phase-to-phase voltage phasors see Problem 51. Ideally the three
phases (probably together with the neutral wire) are connected to a balanced 3-
phase load as shown in Fig. 1.12. The phase currents are determined by the load
impedances on the individual phases. Assuming the phase load impedances are
ZA , ZB , and ZC , the phase currents become
VA VB VC
IA = , IB = and IC = .
ZA ZB ZC
From Kirchhoff’s Current Law the sum of these currents and the neutral current
is equal to zero, that is,
IN + IA + IB + IC = 0, or
IN = − (IA + IB + IC ) .
A sinusoidal time function may be given as x (t) = A cos ωt, where ω is the
angular frequency in rad/sec. The common sense tells that the frequency ω must be
non-negative,4 as a negative frequency would not make sense. However, when one
performs a frequency analysis, say by running a FFT analysis,5 often one comes
across negative frequencies. How could one interpret a negative frequency, ω < 0?
Using Eq. (1.10) one can rewrite x (t) = cos ωt as
ej ωt + e−j ωt
x (t) = A ·
2
A j ωt A j (−ω)t
x (t) = e + e .
2 2
The two complex exponential terms ej ωt and ej (−ω)t contain the frequency
information: The first term has a positive frequency of +ω while the second
term has a negative frequency of −ω. This situation is shown in Fig. 1.14. A
sinusoidal function of amplitude A and a positive frequency ω can be interpreted
as composed of two complex exponentials of amplitude A/2 each, one having a
positive frequency +ω and the other having a negative frequency −ω. Negative
real and imag return the real and imaginary parts of a complex number, while
abs and angle return the magnitude and the argument in radians. Functions like
abs, sin, cos, logarithmic functions log, log10 and exponential functions
are overloaded. This means that these functions accept complex as well as real
arguments. If z = 1 + j and if we use these functions, then we get
>>z=1+j;
>>real(z)
ans =
1
>>imag(z)
ans =
1
>>abs(z)
ans =
1.4142
>>angle(z)
ans =
0.7854
>>sin(z)
ans =
1.2985 + 0.6350i
>>log(z)
ans =
0.3466 + 0.7854i
LabVIEW is no exception to provide complex number arithmetic. LabVIEW
provides the user with different ways of using complex numbers. You can create
a complex number using rectangular or polar representations; you can convert from
rectangular to polar representations and vice versa; perform complex conjugation,
and extract real and imaginary parts from complex numbers. All math functions are
overloaded with their complex versions when they receive a complex number as an
argument. Figure 1.15 shows LabVIEW functions that create and handle complex
numbers and how they are typically used.
C language does not include a complex data type among its built-in numerical
types. If you consider to use C for complex math programming, then either you
will have to obtain libraries (header files and complex functions) that other people
make available or you will have to define complex data type and write your own
functions for addition, subtraction, etc. Math software being abundant, this is not
advisable. Nevertheless if you are a programming enthusiast and like challenges,
nobody stops you from going in this direction. This is especially so if you are
planning, for example, to develop a proprietary FFT function for your work (see
Sect. 8.2 for C implementation of FFT which uses the complex data type).
The first thing you would do is to define the complex data type. Below a complex
data type is defined as a structure which consists of four numbers of type float. The
36 1 Complex Numbers
Fig. 1.15 Complex numbers in LabVIEW. (a) Complex number palette. (b) Using complex
numbers
complex structure has two fields re and im to represent the real and imaginary
parts while the third and the fourth fields mag and ph are for polar representation.
typedef struct{
float re;
float im;
float mag;
float ph;
} complex;
mag and ph are included because it is much easier to work with magnitudes
and phases in multiplication and division. Then you would have to rewrite all math
functions yourself for the complex data you have created. The following functions
perform complex addition and multiplication. They use the complex data type as
defined above. To be able to use the following C code, you must include math.h
header file of C. The square root and arctangent functions, sqrt and atan2, are
defined in math.h header file.
1.5 Applications of Complex Numbers 37
#include <math.h>
complex cadd(complex a, complex b){
complex c;
float angle;
c.re = a.re + b.re;
c.im = a.im + b.im;
c.mag = sqrt(c.re * c.re + c.im * c.im);
angle = atan2(c.im, c.re);
c.ph = angle;
return c;
};
Complex numbers can be applied to 2D vector calculus. We can associate the real
and imaginary numbers with components in i and j directions of a 2D vector, that is
are either real or appear as complex conjugate pairs. Although f (z) is itself real for
all real z, its roots are elements of complex numbers space. If zi is a complex root
of f (z), then zi∗ is also a root, i.e.,
f (zi ) = f zi∗ = 0.
With z = x + jy, f (z) can be split into its real and imaginary parts:
∗
The
∗
magnitude of f (z) should be zero at z = zi and z = zi , that is, |f (zi )| =
f zi = 0. From f (z) we produce a magnitude function |f (z)| which depends
on x and y. Let us call this function m (x, y). m (x, y) is greater than or equal to
zero.
m (x, y) = |f (z)| = u2 (x, y) + v 2 (x, y) ≥ 0, for all x, y.
∂m (x, y) ∂m (x, y)
∇m (x, y) = ·i+ · j,
∂x ∂y
where i and j are the unit vectors in x- and y-directions. Gradients in n-dimensional
space are n-dimensional. We can adapt the gradient notion for functions of two
variables to complex functions by assuming i and j vectors to be pointing in real
and imaginary axis directions, that is,
∂m (x, y) ∂m (x, y)
∇m (x, y) = +j .
∂x ∂y
6 Abel-Ruffini theorem.
1.5 Applications of Complex Numbers 39
1 ∂u (x, y) ∂v (x, y)
+j 2u (x, y) + 2v (x, y)
2 ∂y ∂y
∂u (x, y) ∂v (x, y)
= u (x, y) + v (x, y)
∂x ∂x
∂u (x, y) ∂v (x, y)
+ j u (x, y) + v (x, y)
∂y ∂y
= ux u + vx v + j uy u + vy v ,
where ux, vx , uy , vy are the first-order partial derivatives of u (x, y) and v (x, y) with
respect to x and y, respectively. ∇m (x, y) is a vector that points in the maximum rate
of increase of the scalar field m (x, y). The opposite direction, that is, −∇m (x, y),
is the direction of the steepest decent. A free falling sphere follows the steepest
descent to find the lowest point. However, in an iterative algorithm, we have to slow
down the sphere so that it will not overshoot the lowest point in the quest to reach
it. We do the descending by subtracting a fraction of the gradient from coordinates
of the present point:
where 0 < k < 1 is a constant which slows down the rate of descent. Depending
on the function, typical values of k might range from 0.0001 to 0.05. Equation 1.15
is a iterative solution to reach a root. We stop iterating whenever the difference of
magnitudes between n-th iteration and n + 1-st iteration is less than a sufficiently
small number, say ε = 10−5 . If m (xn+1 , yn+1 ) − m (xn , yn ) < ε, then we stop, else
we reiterate to the next point.
In Figs. 1.16 and 1.17 we illustrate the foregoing discussion with an example; let
us find the roots of f (z) = z3 + z2 − 2. x and y axes in these figures correspond
to x and y in z = x + jy. The vertical axis is the magnitude function m (x, y). The
equimagnitude7 points of m (x, y) are plotted as contours in Fig. 1.17a. Note three
sets of closed curves, one inside another; each set contains a point seemingly at
their centers. These “centers” are the roots of f (z) = z3 + z2 − 2. The proximity of
the contours is a measure of the steepness of the magnitude function m (x, y). The
direction and magnitude of this steepness yields the gradient. Figure 1.17b shows
the gradient field (the arrows) superimposed on the contour plot close to the root
Fig. 1.16 The magnitude function is a terrain whose lowest altitudes are the roots of the
polynomial. The function f (z) = z3 + z2 − 2 has a magnitude function whose lowest points
are at x = 1, y = 0 and x = −1, y = ±1
Fig. 1.17 Contour and gradient plots for the function f (z) = z3 + z2 − 2. (a) The contour plot
that shows the location of the roots at z = −1 ± j and z = 1. (b) The region around the root at
z = 1 and the gradient field superimposed on the contour plot
z = 1, i.e., x = 1, y = 0. Note that the sizes of the arrows are proportional to the
proximity of the contours (gradient), and that the arrows point in the direction of
maximum increase. Also note that the arrows point away from the root, that is, the
divergence of the gradient field at a root is greater than zero:
In the algorithm we have described, the iteration follows these arrows in reverse
direction until a root is reached. Substituting z = x +jy for t in f (z) = z3 +z2 −2,
we generate the complex function
where
u (x, y) = x 3 + x 2 − (3x + 1) y 2 − 2,
v (x, y) = −y 3 + 3x 2 + 2x y.
ux = 3x 2 − 3y 2 − 2x,
uy = −2 (3x + 1) y,
vx = 2 (3x + 1) y,
vy = 3x 2 − 3y 2 + 2x,
∇m (x, y) = ux u + vx v + j uy u + vy v
= −3y 2 + 3x 2 − 2x x 3 + x 2 − (3x + 1) y 2 − 2
+ 2 (3x + 1) y −y 3 + 3x 2 + 2x y
+ j −2 (3x + 1) y x 3 + x 2 − (3x + 1) y 2 − 2
+ 3x 2 − 3y 2 + 2x −y 3 + 3x 2 + 2x y .
Fig. 1.18 Trajectory of a ball released at point z0 = 1.2 + j 0.7 on the magnitude surface. z0
is the initial guess. The ball follows the gradient field in reverse direction and arrives at the root
z = 1 + j 0. (a) The trajectory is indicated as a white trace on the 3D surface. (b) The bird’s eye
view of the trajectory on a LabVIEW vi
vi that shows the iteration process starting from the initial guess. The trajectory is
the locus of zn values. We see how the trajectory closes in on the root z = 1 + 0i.
See Problem 55 to see the LabVIEW implementation of this gradient root finder.
Afterthought on Euler’s Identity
Crediting Euler’s identity to Euler is a mistake. YouTube channel Mathologer
remarks that “Euler’s identity eiπ = −1 is not really Euler’s identity. The
mathematician Roger Cotes already wrote about it in 1714 when Euler was only
seven years old. I actually find it a bit sad that people associate the math super hero
Euler with a result that is not really by him rather than one of the zillions of his
really original amazing discoveries. Of course it is really sad for Roger Cotes since
he doesn’t get mentioned for anything and nobody’s ever heard of him.”8
Why has the physicist Richard Feynman declared that Euler’s identity given
by Eq. (1.5) is the most elegant formula in mathematics? What contemplation and
reasoning may have led him to this conclusion? Well, we do not know. But let us try
our way to assess this elegance. The Euler’s identity is
ej π + 1 = 0,
√
where e and π are irrational numbers. j = −1 is an imaginary number. In
this identity we have exponentiation, summation with 1 and equality to 0. Can the
elegance be due to this?
ej π = −1.
What do you think? Was Richard Feynman right? Could this formula be the synopsis
of “vanishing” by Allah which is taught by Sufism?
Further Reading
Problems
Problem 5
6. Show that the locus of z described below is an ellipse in the complex plane
with center at z0 and major and minor axis lengths 2a and 2b, respectively:
z = zo + a cos θ + j b sin θ , where 0 ≤ θ ≤ 2π .
7. Given two points z1 = j and z2 = 1. Find the loci of z such that
(a) |z − z1 | = |z − z2 |
(b) |z − z1 | = 2 |z − z2 |
8. Prove the triangular inequality |z1 − z2 | ||z1 | − |z2 || where z1 and z2 are two
complex numbers.
9. Given two points z1 = j 2 and z2 = −j 2. Find the loci of z such that
(a) |z − z1 | + |z − z2 | = 5
(b) |z − z1 | − |z − z2 | = 1
10. Show that if |z1 − z2 | = 0, then z1 = z2 .
11. There exists an interesting relationship between scalar and cross products of
2D vectors and complex multiplication. 2D vectors are represented in vector
algebra by Z = ai + bj using rectangular coordinates. The scalar and cross
1.5 Applications of Complex Numbers 45
Z1 · Z2 = (a1 i + b1 j ) · (a2 i + b2 j ) = a1 a2 + b1 b2
i j k
Z1 × Z2 = a1 b1 0 = (a1 b2 − a2 b1 ) k.
a2 b2 0
Let z1 = a1 + j b1 , z2 = a2 + j b2 , Z1 = a1 i + b1 j , and Z2 = a2 i + b2 .
Show that
(a) Z1 · Z2 = Re z1 z 2∗
(b) Z1 × Z2 = −Im z1 z2∗
12. Show that
(a) 1 + cos 2x = 2 cos2 x
(b) sin x + sin 3x = 2 cos x sin 2x
3 1 3 1
13. Show that sin3 x = sin x − sin 3x and cos3 x = cos x + cos 3x.
4 4 4 4
14. Using Euler’s formula show that
−1 B
(a) A cos x + B sin x = A + B cos x − tan
2 2
A
−1 A
(b) A sin x + B cos x = A + B sin x + tan
2 2
B
15. Express sin (2x) · cos (5x) as a sum of two sinusoidal functions.
16. Find A, x and y in cos 8 + cos 12 = A cos x cos y.
sin 2x
17. Show that tan x =
1 + cos 2x
x−y x+y
18. Show that cos x + cos y = 2 cos cos
2 2
19. Find A and θ in the identity 12 cos x − 5 sin x = A cos (x + θ ).
20. Convert cos 3x − sin 5x into a product of cosines.
√ 4
21. Calculate 1 + j 3 .
22. Find the following roots:
(a) 81/3
(b) (−j 8)1/3
(c) (1 + j√
)1/4
(d) 1− j
π
j1
(e) z = j = e 2 , z 5 .
46 1 Complex Numbers
2π
23. If WN = exp show that
N
N −1
!
N, k = mn, k is an integer
WNkn =
k=0 0, otherwise.
(a) Prove this relation by geometric construction (you may try for n = 3, 5, 7)
(b) Verify the relation numerically using LabVIEW.
1.5 Applications of Complex Numbers 47
31. Calculate
1 − j −j
(a) √
2
1−j
(b) Ln √ .
2
32. Evaluate the integral
ˆ π
2
cot (x) dx.
− π2
z−1
u= = aej φ .
z+1
Show that
1 + ue−j π 1
−j
= .
1 − ue π z
48 1 Complex Numbers
Problem 40
Hint: Note that rotating the x-y axes in one direction by a certain angle is
equivalent to rotating the point in the opposite direction by the same angle.
1.5 Applications of Complex Numbers 49
Problem 43
44. Suppose you are hired by CiberGraphics Inc. as a software engineer in the
graphics software department. Your assignment is to write a code to rotate an
image about its center. Describe how you would achieve the job.
45. What is “negative” frequency?
(a) Why is it called “negative”?
(b) Can we generate pure negative frequencies?
46. The larger circle in the figure has a radius of 2 and centered at the origin of the
complex plane. The smaller circle with a radius of 1 is centered at z = 3 and is
tangent to the larger one. Assume these circles represent two spur gears which
are engaged at z = 2. The radii and rotation angles of spur gears are related
by r1 θ1 = −r2 θ2 . When the larger circle is rotated in the counterclockwise
direction through 30°, the point z = 2 on the gears move to z1 and z2 on the
larger and smaller circles, respectively. Find z1 and z2 .
Problem 46
50 1 Complex Numbers
47. This problem is excerpted from George Gamow’s book “One Two
Three. . . Infinity”[4]. Being in archaic English, the original of the message
within quotes is given as a footnote, and we present it here in modern English.
[There was a young and adventurous man who found among his great-
grandfather’s papers a piece of parchment that revealed the location of a hidden
treasure. The instructions read:
“Sail to . . . North latitude and . . . West longitude where you will find a
deserted island. There lies a large meadow, not pent, on the north shore of
the island where a lonely oak and a lonely pine stand. There you will see also
an old gallows where we used to hang traitors. Start from the gallows and walk
to the oak counting your steps. At the oak, you must turn right by a right angle
and take the same number of steps. Put here a spike in the ground. Now you
must turn to the gallows and walk to the pine counting your steps. At the pine,
you must turn left by a right angle and you see that you take the same number
of steps, and put another spike in the ground. Dig halfway between the spikes;
the treasure is there.”9,10
The instructions were quite clear and explicit, so our young man chartered a
ship and sailed to the South Seas. He found the island, the field, the oak and the
pine, but to his great sorrow, the gallows was gone. Too long a time had passed
since the document had been written; rain and sun and wind had disintegrated
the wood and returned it to the soil, leaving no trace even of the place where it
once stood.]
As you may guess the young man tried and tried, digging here and there
with no success and the island being so big, he eventually gave up and sailed
back home. Now you, equipped with the knowledge of complex numbers, are
assigned to find the hidden treasure.
9 “One Two Three. . . Infinity”, George Gamow, pp. 36, Bantam Books, 1967.
10 “Sail to . . . North latitude and . . . West longitude where thou wilt find a deserted island. There
lieth a large meadow, not pent, on the north shore of the island where standeth a lonely oak and a
lonely pine. There thou wilt see also an old gallows on which we once were wont to hang traitors.
Start thou from the gallows and walk to the oak counting thy steps. At the oak, thou must turn right
by a right angle and take the same number of steps. Put here a spike in the ground. Now must thou
turn to the gallows and walk to the pine counting thy steps. At the pine, thou must turn left by a
right angle and see that thou takest the same number of steps, and put another spike in the ground.
Dig halfway between the spikes; the treasure is there.”
1.5 Applications of Complex Numbers 51
49. Evaluate
ˆ
e3x cos 4xdx.
50. Evaluate
ˆ
e4x sin 3xdx.
51. A 3-phase system with a neutral wire produces three voltages of equal
amplitude and frequency whose phases differ by 120◦ . Let these phases be
denoted by the phasors VA = Vm 0, VB = Vm 120◦ , VC = Vm 240◦ .
Calculate the phasors VBC and VCA .
52. Refer to the 3-phase load in Fig. 1.12. If ZA = ZB = ZC show that IN = 0.
Hint: Use the results of Problems 18 and 19.
53. Computer project. The figure above shows the virtual instrument to construct
the Dragon fractal of Sect. 1.3.4. Build this virtual instrument and operate it.
52 1 Complex Numbers
(a) Find and explain the code which is responsible for adding a new point
between adjacent points.
(b) When this virtual instrument completes execution how many points are
generated?
54. Computer project. Figures 1.16 and 1.17 are generated by the following
MATLAB script.
1.5 Applications of Complex Numbers 53
x_range=-1.5:0.05:1.5;
y_range=-1.5:0.05:1.5;
Problem 55
Chapter 2
Functions of a Complex Variable
from which we obtain two functions in x and y (3D surfaces of variables x and y):
u (x, y) = x 2 − y 2
v (x, y) = 2xy. (2.1)
l = lim f (z) .
z−→z0
While x can approach x0 along a line (x-axis) for a real function f (x), z
approaches z0 from any direction for complex functions. The limit of a function
is unique if it exists (Fig. 2.3).
A function is said to be continuous if
More precisely, we can rewrite this relation such that for two real numbers k and
l, we have
regardless of whether k and l approach zero together (k, l → 0); or we keep l equal
to 0 and let k approach 0 (k → 0, l = 0); or we keep k equal to 0 and let l approach
0 (k = 0, l → 0). This is to say that if the limit exists, it is independent of the
manner of approach.
58 2 Functions of a Complex Variable
We can define the derivative of a complex function in a way similar to the definition
of the derivative of a real function. The derivative of w = f (z) is defined as
f (z + z) − f (z)
f (z) = lim (2.2)
z−→0 z
provided that the limit is unique regardless of the path along which z approaches
0. For instance, consider w = f (z) = z2 . Applying the definition of derivative
given by (2.2), we can obtain f (z) as follows
= 2z.
To comply with the calculus notation, we denote the 1-st, 2-nd, . . . n-th order
derivatives of f (z) with respect to z as
df d 2 f d nf
, 2 , ··· , , or
dz dz dzn
f (z) , f (z) , · · · , f (n) (z) .
First let z = x + j 0:
(x + x + jy)2 − (x + jy)2
f (z) = lim
x−→0 x
2xx + (x)2 + j 2yx
= lim
x−→0 x
= lim (2x + j 2y + x)
x−→0
= 2 (x + jy)
= 2z.
[x + j (y + y)]2 − (x + jy)2
f (z) = lim
y−→0 j y
j 2xy − 2yy − (y)2
= lim −j
y−→0 y
2xy + j 2yy + j (y)2
= lim
y−→0 y
= lim (2x + j 2y + j y)
y−→0
= 2 (x + jy)
= 2z.
On the other hand w = z∗ fails to have a derivative at any point. This can be
readily shown by evaluating the derivative first along x – direction then along y –
direction:
d ∗ (z + z)∗ − z∗
f (z) = z = lim
dz z−→0 z
(x + jy + x + j y)∗ − (x + jy)∗
= lim
x+j y−→0 x + j y
x − j y
= lim .
x+j y−→0 x + j y
x
f (z) = lim = 1,
x−→0 x
60 2 Functions of a Complex Variable
−j y
f (z) = lim = −1.
y−→0 j y
f (x + x + jy) − f (x + jy)
f (z) = lim
y=0,x−→0 x
∂f (z) ∂f (x + jy)
= =
∂x ∂x
or
f (x + jy + y) − f (x + jy)
f (z) = lim
x=0,y−→0 j y
∂f (z) ∂f (x + jy)
= −j = −j .
∂y ∂y
which can be further expanded into its real and imaginary parts
where ux and vx are the partial derivatives of u (x, y) and v (x, y) with respect to x.
Likewise along y – direction (y = 0)
If the function is analytic at z, then the derivative exists and the definition of
derivative necessitates that the two evaluations along the x− and y-directions be
equal to each other. Hence
Equating real and imaginary parts leads us to the Cauchy–Riemann conditions for
analyticity. Cauchy–Riemann conditions are necessary and sufficient for a complex
function to be analytic.
∂u (x, y) ∂v (x, y)
= , (2.3)
∂x ∂y
∂u (x, y) ∂v (x, y)
=− .
∂y ∂x
ux = vy ,
uy = −vx .
62 2 Functions of a Complex Variable
f (z) = ux + j vx , (2.4)
f (z) = vy − j ux . (2.5)
Now that we have stated the Cauchy–Riemann conditions, let us investigate the
analyticity of the two functions w = z2 and w = z∗ .
Example 2.1 w = z2
We have w = z2 = x 2 − y 2 + j 2xy so u (x, y) = x 2 − y 2 and v (x, y) = 2xy.
∂u (x, y) ∂u (x, y)
ux = = 2x, uy = = −2y,
∂x ∂y
∂v (x, y) ∂v (x, y)
vx = = 2y, vy = = 2x.
∂x ∂y
∂u (x, y) ∂u (x, y)
ux = = 1, uy = = 0,
∂x ∂y
∂v (x, y) ∂v (x, y)
vx = = 0, vy = = −1.
∂x ∂y
cos (z) = cos (x + jy) = cos x cos (jy) − sin x sin (jy)
exp j 2 y + exp −j 2 y exp j 2 y − exp −j 2 y
= cos x · − sin x ·
2 2
= cos x cosh y − sin x sinh y.
2.3 Cauchy–Riemann Conditions 63
Thus we have u (x, y) = cos x cosh y and v (x, y) = − sin x sinh y. From uand
v we obtain the partial derivatives ux , uy , vx , and vy :
Since
ux = − sin x cosh y = vy ,
uy = cos x sinh y = − (− cos x sinh y) = −vx
x = r cos θ, y = r sin θ
and we have
∂u ∂u ∂x ∂u ∂y ∂u ∂u ∂x ∂u ∂y
ur = = + , uθ = = + (2.6)
∂r ∂x ∂r ∂y ∂r ∂θ ∂x ∂θ ∂y ∂θ
and
∂v ∂v ∂x ∂v ∂y ∂v ∂v ∂x ∂v ∂y
vr = = + , vθ = = + . (2.7)
∂r ∂x ∂r ∂y ∂r ∂θ ∂x ∂θ ∂y ∂θ
We have
∂x ∂y
= cos θ, = sin θ
∂r ∂r
∂x ∂y
= −r sin θ, = r cos θ.
∂θ ∂θ
64 2 Functions of a Complex Variable
Using shorthand notations for the partial derivatives we can write (2.6) and (2.7)
as
and
vr cos θ sin θ vx
= .
vθ −r sin θ r cos θ vy
1 1
cos θ ur − sin θ uθ = sin θ vr + cos θ vθ ,
r r
1 1
sin θ ur + cos θ uθ = − cos θ vr + sin θ vθ .
r r
In matrix form
⎡ ⎤ ⎡ ⎤
1 1
⎢ cos θ − r sin θ ⎥ ur ⎢ sin θ cos θ ⎥ vr
⎣ 1 ⎦ =⎣ r
1 ⎦ .
sin θ cos θ uθ − cos θ sin θ vθ
r r
2.3 Cauchy–Riemann Conditions 65
1
ur = vθ ,
r
uθ = −rvr . (2.8)
Thus
Example 2.4 Using polar representation, show that w = zn is analytic for all z.
z is expressed in polar coordinates as z = rej θ , and w becomes w = r n ej nθ . Let
us check the Cauchy–Riemann conditions in polar coordinates. Using De Moivre’s
Law we can decompose w into its real and imaginary parts as follows
Thus
= −nr n sin nθ = uθ .
We see that w = zn is analytic for all z because u (r, θ ) and v (r, θ ) are
differentiable for all z and the Cauchy–Riemann conditions for analyticity are
satisfied:
nr n cos nθ vθ
ur = nr n−1 cos nθ = = ,
r r
uθ = −nr n sin nθ = −r nr n−1 sin nθ = −rvr .
w = z3 = r 3 ej 3θ
= r 3 cos 3θ + j r 3 sin 3θ
= u (r, θ ) + j v (r, θ ) .
= 3z2
2.4 Rules of Differentiation 67
1 −j θ 1
w (z) = e (vθ − j uθ ) = e−j θ 3r 3 cos θ − j 3r 3 sin θ
r r
= 3r 2 e−j θ ej 3θ = 3r 2 ej 2θ
= 3z2 .
The rules of differentiation for analytic complex functions are similar to those for
real-valued functions studied in calculus. We list below these rules which are a direct
consequence of the definition given by (2.2)and are very easy to prove.
Multiplication by a Constant Let c0 = x0 + jy0 be a constant complex number
and f (z) be an analytic function in some domain D. Then in that domain we have
d df (z)
[c0 f (z)] = c0 .
dz dz
Linearity Let complex functions f1 (z) , f2 (z) , . . . , fn (z) be analytic over the
domains D1 , D2, . . . , Dn and let c1 , c2, . . . , cn be complex constants. Then the
n
function f (z) = ci fi (z) is analytic over the intersection of domains D1 ∩ D2 ∩
i=1
n
. . . ∩ Dn with a derivative f (z) = ci fi (z). The proof is trivial and left as an
i=1
exercise to the student.
Multiplication Let complex functions f (z) and g (z) be analytic over the domains
D1 and D2 . Then the function h (z) = f (z) g (z) is analytic over the domain D1 ∩
D2 with derivative
dh (z)
= f (z) g (z) + f (z) g (z) . (2.10)
dz
Division Let complex functions f (z) and g (z) be analytic over the domains D1
and D2 . The rational function h (z) = f (z) /g (z) is differentiable over the domain
D1 ∩ D2 except at points for which g (z) = 0 and its derivative is given by
Chain Rule Let w = f (z) and h = g (w) = g [f (z)]. Domain Dw over which
f is analytic is mapped into another domain Dh . If h is analytic over Dh , then the
derivative of h with respect z over Dh is given by
dh dh dw
= · . (2.12)
dz dw dz
Example 2.7 Show that the derivative of the entire function w = zn is similar to the
derivative of x n for real variable x.
The derivative of the entire function w = zn is similar to the derivative of x n for
real variable x:
d n
z = nzn−1 . (2.13)
dz
d
z = ux + j vx
dz
2.5 Harmonic Functions 69
d d
= x+j y
dx dx
= 1 + j 0 = z0
= 1 · z1−1 .
d n+1 d n d d
z = z z = z zn + zn z.
dz dz dz dz
But by assumption
d n
z = nzn−1 .
dz
d n+1 d d
z = z zn + zn z = z nzn−1 + zn · 1 = nzn + zn
dz dz dz
= (n + 1) zn .
∂ 2 f (x, y) ∂ 2 f (x, y)
+ = 0, (2.14)
∂x 2 ∂y 2
fxx (x, y) + fyy (x, y) = 0.
70 2 Functions of a Complex Variable
∂ 2 u (x, y) ∂ 2 v (x, y)
= ,
∂x 2 ∂x∂y
∂ 2 u (x, y) ∂ 2 v (x, y)
= − .
∂y 2 ∂y∂x
We know from calculus that the order of partial differentiation does not matter,
i.e.,
∂ 2 v (x, y) ∂ 2 v (x, y)
= .
∂x∂y ∂y∂x
Adding the two equations we obtain
To prove the second assertion, this time we differentiate Eq. (2.15) with respect
to y and Eq. (2.16) with respect to x:
∂ 2 u (x, y) ∂ 2 v (x, y)
= ,
∂y∂x ∂y 2
∂ 2 u (x, y) ∂ 2 v (x, y)
=− .
∂x∂y ∂x 2
1 Electric potential field should not be confused with electric field in electromagnetism. Here by
Subtracting the second equation from the first one completes the proof:
∂ 2 v (x, y) ∂ 2 v (x, y)
+ = 0.
∂x 2 ∂y 2
The functions u (x, y) and v (x, y) are called to be conjugate of each other.
However, the word “conjugate” in this context has nothing to do with complex
conjugation we have used so far.
Example 2.8 Show that the real and imaginary parts of w = cos z are harmonic.
In Sect. 2.6.1 we show that cos z = cos x cosh y − j sin x sinh y with u (x, y) =
cos x cosh y and v (x, y) = − sin x sinh y. Thus w is entire with continuous partial
derivatives. Let us obtain the first and second derivatives:
We see that ux = vy and uy = −vx , that is, the Cauchy–Riemann conditions are
satisfied. Then differentiating once more with respect to x and y we obtain
Example 2.9 w = f (z) = z3 . Show that u (x, y) and v (x, y) are harmonic.
w = (x + jy)3 = x 3 + 3x 2 (jy) + 3x (jy)2 + (jy)3 = x 3 + j 3x 2 y − 3xy 2 − jy 3
= x 3 − 3xy 2 + j 3x 2 y − y 3 .
Differentiating once again with respect to x and y and performing the required
additions we get:
Example 2.10 If real (or imaginary) part of an analytic function is given, we can
find its harmonic conjugate and build the complex function. Let v (x, y) = ex sin y.
Let us construct u (x, y) and f (z) from v (x, y).
where c2 (y) is the constant of integration. Comparing the results of the two
integrals, ex cos y + c1 (x) and ex cos y + c2 (y), we deduce that the integration
constants must be independent of x and y, i.e., c1 (x) = c2 (y) = c. Hence
u (x, y) = ex cos y + c.
Thus
functions may attain multiple values; these functions need special attention as we
will see shortly.
We can form the quotient of two such polynomials and call the new function a
rational function.
m
bk zk
p (z) k=0
f (z) = = n . (2.17)
q (z)
ak zk
k=0
We have seen in Chap. 1 Sect. 1.4 that q (z) has n roots. f (z) is analytic in the
z-plane except where q (z) = 0. We call the z values for which q (z) = 0 the
poles of f (z). Poles have a tremendous effect on behavior of physical systems. By
Eq. (2.11), the derivative of 2.17 is
The exponential function is basic to the functions that we discuss below in which
it appears in one way or another. Some of its properties mimic those of the real
exponential function. We can define w = ez in terms of Re (z) and Im (z). Thus
w = ez = ex+jy
= ex ejy .
74 2 Functions of a Complex Variable
Hence
ez = ex cos y + j ex sin y
u (x, y) = ex cos y,
v (x, y) = ex sin y.
Note that ez = 0 for all z; |z| = ex and arg (ez ) = y +2nπ (n = 0, ±1, ±2, . . .).
From this property we see that ez is periodic in y with a period of 2π . These
properties result in the following identities which we are familiar with from our
knowledge of real-valued exponential function.
to obtain
d z
e = ez . (2.19)
dz
2.6 Applications of Complex Functions and Analyticity 75
= 0.20788.
= −0.4161 + j 0.909.
ln z = ln rej (θ+2π n)
= ln r + j (θ + 2π n) .
Ln z = ln r + j θ. (2.20)
76 2 Functions of a Complex Variable
Ln (−r) = ln r + j π.
= ez ln r+j zθ = r z ej zθ .
sin x = ej x − e−j x /2j . In a similar way we can define cos z, sin z which are
entire:
ej z + e−j z
cos z = ,
2
ej z − e−j z
sin z = .
2j
e−y ej x + ey e−j x
cos z =
2
e−y (cos x + j sin x) + ey (cos x − j sin x)
=
2
ey + e−y e−y − ey
= · cos x + j · sin x.
2 2
Recalling that cosh y = ey + e−y /2, and sinh y = ey − e−y /2 we obtain
The real and imaginary parts of cos z are illustrated in Fig. 2.5.
Fig. 2.5 cos z function. (a) The real part u (x, y) = cos x cosh y, (b) The imaginary part
v (x, y) = − sin x sinh y
78 2 Functions of a Complex Variable
cos2 z + sin2 z = 1.
and
d
cos z = − sin z,
dz
d
tan z = sec2 z,
dz
d
cot z = − csc2 z.
dz
2.6 Applications of Complex Functions and Analyticity 79
When z is a real number z = x + j 0, Eqs. 2.21 through 2.24 above are reduced
to cos z = cos x and sin z = sin x.
ez + e−z
cosh z = ,
2
ez − e−z
sinh z = ,
2
sinh z ez − e−z
tanh z = = z ,
cosh z e + e−z
ez + e−z
coth z = .
ez − e−z
cosh2 z − sinh2 z = 1.
Again the derivatives of these functions can be obtained from their definitions
and the linearity property of derivatives. Thus
d d ez + e−z ez − e−z
cosh z = =
dz dz 2 2
= sinh z
and likewise
d
sinh z = cosh z,
dz
d
tanh z = sech2 z,
dz
d
coth z = −csch2 z.
dz
80 2 Functions of a Complex Variable
Again note that when z is a real number z = x + j 0, the formulas above are
reduced to cosh z = cosh x and sinh z = sinh x. If z is purely imaginary, that is
z = 0 + jy, we obtain cosh z = cos y and sinh z = j sin y.
In electronic filter theory, the Chebyshev filters rely on the so-called Chebyshev
polynomials which are defined by
Tn (x) = cos n cos−1 x , (2.25)
where n denotes the degree of the polynomial. As can be easily verified, T0 (x) = 1
and T1 (x) = x for n = 0 and n = 1. Below is a recursive relation that lets us find
Tn+1 (x) from Tn (x) and Tn−1 (x):
1
|Hn (x)|2 = , 0 ≤ x ≤ ∞. (2.26)
1 + Tn2 (x)
e j u + e−j u v + v −1
x= = ,
2 2
v 2 − 2xv + 1 = 0
e ju = v
u = −j ln v.
Since v is real and positive, the logarithm is real, and u is purely imaginary given
by
u = −j ln x ∓ x 2 − 1 .
Then we get
x = cos (u) ,
cos−1 (x) = u
and
cos−1 (x) = −j ln x ∓ x 2 − 1 . (2.27)
Let u1 and u2 denote the two values we obtained for the inverse cosine.
1
u1 = −j ln x + x 2 − 1 = j ln √
x + x2 − 1
1
u2 = −j ln x − x 2 − 1 = j ln √ .
x − x2 − 1
√ √
We note that x + x 2 − 1 and x − x 2 − 1 are reciprocals of each other.
Therefore
u1 = j ln x − x 2 − 1
1
u2 = j ln x + x 2 − 1 = j ln √ = −j ln x − x 2 − 1 = −u1 .
x − x2 − 1
Thus Eq. (2.27) yields two imaginary inverse cosine values u1 and u2 for x > 1
such that u2 = −u1
cos−1 (x) = ∓j ln x + x 2 − 1 .
Tn (x) = cos n cos−1 x
= cos j n ln x + x 2 − 1
1
= exp j 2 n ln x + x 2 − 1 + exp −j 2 n ln x + x 2 − 1
2
1
= exp −n ln x + x 2 − 1 + exp n ln x + x 2 − 1
2
" −n n #
1
= exp ln x + x 2 − 1 + exp ln x + x 2 − 1
2
n
1 −n
= x+ x −1 2 + x+ x −1 2 .
2
Analytic functions of the form w = f (z) map points, curves, and shapes in the
z–plane into corresponding points, curves, and shapes in the w–plane. If we write
Fig. 2.6 (a) Inverse cosine function, (b) Chebyshev polynomials of order 5 and 6
2.6 Applications of Complex Functions and Analyticity 83
the functions u (x, y) and v (x, y) map points (x, y) and curves in the z–plane to
points (u, v) and curves in the w–plane. Let C1 and C2 be two curves intersecting
at a point z0 = x0 + jy0 in the z–plane. Then f (z) maps z0 , C0 , and C1 in the
z–plane into w0 = u0 + j v0 , C0 , and C1 in the w–plane. Let the angle between C0
and C1 be ϕ0 measured counterclockwise from C0 to C1 , and ϕ0 the angle between
C0 and C1 likewise measured counterclockwise from C0 to C1 . We call the mapping
f : z −→ w to be conformal if ϕ0 = ϕ0 . If ϕ0 = −ϕ0 , then the mapping is said to
be isogonal.
Theorem 2 If w = f (z) is analytic and f (z) = 0 in a region R, then f (z)
defines a conformal mapping at all the points within R.
Proof Let C denote the curve in z–plane and be described by a parametric equation
dw dw dz
= ·
dt w0 dz w0 dt z0
dz
= f (z0 ) . (2.28)
dt z0
ϕ0 = B1 (t0 )−B2 (t0 ) is the angle between the tangents to C1 and C2 ; ϕ0 = θ1 (t0 )−
θ2 (t0 ) is the angle between the tangents to C1 and C2 . Thus subtracting θ2 (t0 ) from
θ1 (t0 ) we obtain ϕ0 and ϕ0 :
C1 : z = t + j (t − 1)2 + 1 ,
C2 : y = t + j (x − 1)3 + 1 .
2.6 Applications of Complex Functions and Analyticity 85
Fig. 2.7 Conformal mapping w (z) = cos (z) preserves the angle between two curves
C1 and C2 intersect when the parameter assumes the values t = 1 and t = 2 for
which z = 1 + j 1 and z = 2 + j 2. Consider the intersection at z = 2 + j 2 and
call it z0 . The analytic function w = cos (z) maps z0 to z0 = cos (2 + j 2). Using
Eq. (2.21)we obtain z0 as
u1 (x, y) = cos (2) cosh (2 − 1)2 + 1 , v1 (x, y) = − sin (2) sinh (2 − 1)2 + 1
u1 (x, y) = cos (2) cosh (2) , v1 (x, y) = − sin (2) sinh (2)
u1 (x, y) = −1.5656, v1 (x, y) = −3.2979
z0 = −1.5656 − j − 3.2979.
If we denote the slopes of tangents by m1 and m2 , then ϕ0 , the angle between the
tangents, satisfies
m 1 − m2
tan (ϕ0 ) =
1 + m1 m2
dy1 /dt
m1 = = 2 (t − 1)|t=2 /1 = 2
dx/dt z0
dy2 /dt
m2 = = 3 (t − 1)2 /1 = 3
dx/dt z0 t=2
wherefrom we get
m1 − m2
tan (ϕ0 ) =
1 + m1 m2
2−3 1
= =−
1+2·3 7
−0.1429.
dv1 /dx
m1 =
du/dx w0
and
dv2 /dx
m2 =
du/dx w0
Thus we get
m − m
tan ϕ0 = 1 2
1 + m1 m2
0.8281 − 1.1012
=
1 + 1.1012 · 1.1012
−0.1428.
Z − Z0
ρ= .
Z + Z0
Fig. 2.8 Wave reflection occurs at a discontinuity which separates two different mediums.
Reflected and transmitted wave amplitudes depend on the ratio Z/Z0
88 2 Functions of a Complex Variable
R + jX
z= = x + jy,
Z0
where R and X denote the resistance and reactance, respectively. z = −1 is the
pole of ρ in Eq. (2.30) (Z = −Z0 ). Since R ≥ 0 for all possible values of Z,
Z + Z0 = 0 in the right-half of z– plane, hence ρ is analytic there. Hence ρ (z) as
defined by Eq. (2.30) is a conformal mapping of the right-hand side of the z–plane
into ρ (z) = u (x, y) + j v (x, y).
z−1
ρ (z) =
z+1
x + jy − 1
u (x, y) + j v (x, y) = .
x + jy + 1
Since ρ (z) is a conformal mapping in the right-half of the z–plane, and the lines
x = x0 and y = y0 in the z–plane are perpendicular to each other, they are mapped
into curves which intersect each other at right angles in the ρ–plane. Indeed we
can prove this by showing that the tangents drawn to the curves at u (x0 , y0 ) and
v (x0 , y0 ) are perpendicular to each other.
We can solve reflection coefficient (2.30) for xand y.
1+ρ 1 + u + jv
z = x + jy = =
1−ρ 1 − u − jv
1 − u2 − v 2
x= , (2.31)
(1 − u)2 + v 2
2v
y= . (2.32)
(1 − u)2 + v 2
(1 − u)2 + v 2 x0 = 1 − u2 − v 2 .
(1 − u)2 x0 + v 2 x0 = 1 − u2 − v 2
(1 − u)2 x0 + v 2 x0 + u2 + v 2 = 1
u2 x0 − 2ux0 + x0 + (x0 + 1) v 2 + u2 = 1
(x0 + 1) u2 + (x0 + 1) v 2 + x0 − 2ux0 = 1
(x0 + 1) u2 + (x0 + 1) v 2 − 2ux0 = 1 − x0
2x0 1 − x0
u2 − u + v2 =
x0 + 1 x0 + 1
2.6 Applications of Complex Functions and Analyticity 89
2 2
x0 1 − x0 x0
u− + v2 = +
x0 + 1 x0 + 1 x0 + 1
2
x0 1 − x02 + x02
u− + v2 =
x0 + 1 (x0 + 1)2
2v
y0 =
(1 − u)2 + v 2
(1 − u)2 + v 2 y0 = 2v
y0 (1 − u)2 + y0 v 2 = 2v
2v
(u − 1)2 + v 2 − = 0.
y0
2
1
Adding to both sides of the equation yields
y0
2 2
2v 1 1
(u − 1)2 + v 2 − + =
y0 y0 y0
Fig. 2.9 Smith chart is a conformal mapping defined by the function ρ = z−1
z+1 . ρ is analytic in the
shaded region of the z–plane. The region x ≥ 0 in the z–plane (a) is mapped into the interior of
the circle |ρ| ≤ 1 in the ρ–plane (b)
2.6.3 Fractals
Fractals are self-similar repeating figures (Fig. 2.11a). Fractal geometry has attracted
mathematicians, scientists as well as artists because it can model many natural
events, the shape of plants, mountains, and clouds using simple mathematical
formulas in complex numbers. There are hundreds of different fractals each of which
can be described mathematically. It is very interesting to find fractals in the dome of
Selimiye Mosque in Edirne (Fig. 2.11b).
2.6 Applications of Complex Functions and Analyticity 91
Fig. 2.10 The angles A, B, and C formed by the lines joining the impedances in rectangular
coordinates (a) are preserved when mapped into the Smith chart in (b). Also the constant-R and
constant-X lines intersect each other at right angles. The unbounded impedance plane with positive
resistance is mapped into the bounded interior of the Smith chart
Fig. 2.11 Fractals. Self-similar patterns like those in these pictures can be generated using
complex numbers. (a) the Mandelbrot fractal generated by Ultra Fractal 5. (b) the dome of Selimiye
Mosque in Edirne, Turkiye
For instance, the Mandelbrot fractals are generated by the iterative formula:
zk = zk−1
2
+ z0 , (2.35)
z1 = z02 + z0
z1 = x02 − y02 + x0 + j (y0 + 2x0 y0 )
z2 = z12 + z0
= x12 − y12 + x0 + j (y0 + 2x1 y1 )
2
= x02 − y02 + x0 − (y0 + 2x0 y0 )2 + x0
+ j y0 + 2 x02 − y02 + x0 (y0 + 2x0 y0 ) ,
where magnitude of zk , rk = xk2 + yk2 does not tend to infinity, we obtain beautiful
repeating figures at every scale of magnification. The set of initial points z0 which
satisfy rk < ∞ is called the Mandelbrot set. Apparently, the iterations quickly
become formidable to carry out by hand. See the LabVIEW implementation of these
calculations in the computer experiments of the problems Fig. 2.11 shows us these
self-repeating figures obtained from Eq. (2.35).
Further Reading
Problems
f (z) = ux + j vx = vy − j vy .
sin z
2. Determine the real and imaginary parts of the function w (z) = .
z
3. Let complex functions f (z) and g (z) be analytic over the domains D1 and D2 .
f (z)
The rational functions h (z) = is differentiable over the domain D1 ∩ D2
g (z)
except at points for which g (z) = 0. Using the definition of derivative show
that h (z) is given by
18. Calculate sin (π/6 + j 0.5) using the definition of the sin function.
19. Show that cos (j x) = cosh x.
20. x is a real number. Show that
π
sin−1 (x) = − cos−1 (x) .
2
21. The imaginary part of the complex function f (z) is v (x, y) = 2xy. Find f (z).
22. Computer experiment. Consider a domain in the complex z−plane D : |x| <
1 and 0 ≤ y < 2π . Let w = ez .
(a) Derive u = u (x, y) and v = v (x, y).
(b) Using your favorite programming platform depict the mapping from D onto
w−plane. Below is shown the mapping generated by LabVIEW.
zk = zk−1
2
+ z0
wk = wk−1
2
+ w0
Show that wk = zk∗ if w0 = z0∗ , that is, the figures generated by these formulas
are symmetric about x axis.
25. Consider Eq. (2.35). Show that rk = |zk | → ∞ as k → ∞ if r0 > 1.
26. Computer experiment. The Mandelbrot figures can be generated on a com-
puter. The following implementation in the figure is done on a LabVIEW
platform. The tedious job of iteration is carried out by the FOR loop. Pay
2.6 Applications of Complex Functions and Analyticity 95
Problem 26
96 2 Functions of a Complex Variable
r (nT + T ) − r (nT )
r (nT ) ≈ .
T
The trajectory of the object is shown on the front panel. As this trajectory is
not a pure circular motion, it experiences Coriolis acceleration in addition to
centripetal acceleration. From the polar plots and time diagrams figure out the
Coriolis effect.
(a) If r (t) = v (t) ej ωt derive v (t) and a (t). If v (t) = V is constant, show that
v (t) is orthogonal to r (t) and a (t).
(b) Build the following LabVIEW vi shown in the block diagram. Answer the
following:
i. What is r (t)?
ii. What is T ?
iii. Identify the programming structure that accomplishes differentiation. Do
you think that this differentiation respects the definition of complex
functions?
iv. Explain why the subarray functions are inserted after the FOR loop.
(c) Refer to physics texts and justify the outcomes of this project
(d) Try to write a code in your favorite programming language which does the
same analysis as this experiment. Compare the handling of complex numbers
and complex differentiation by your favorite language and LabVIEW.
98 2 Functions of a Complex Variable
Problem 31
results for the inverse transforms and we need not to consult a table of transforms.
Apart from inverting transforms, we need contour integration that we develop in
this chapter to study the complex convolution theorem and the Parseval theorem in
Chap. 9.
Complex integrals arise in various fields of engineering; some stability issues
in control systems engineering rely on the residue theorem that we take up soon.
Although not obvious, some definite and improper integrals in real calculus are
evaluated by resorting to contour integrals, which is another term for complex
integrals. The Laplace, Fourier, and z-transforms which we study in Chaps. 4, 6,
and 9 all have inverse transforms involving complex (contour) integrals. Luckily, the
majority of the examples given in those chapters are about linear systems described
by rational functions. Although inverting those system functions is handled by
partial fraction expansion method, it is instructive to recognize that the partial
fraction expansion method is itself a special case of residues.
We distinguish two types of complex integrals: one whose real and imaginary
parts are functions of a real variable and another whose integrand is a complex-
valued function which depends on a complex variable. The first type has an
integrand of the form
where x = x (t) and y = y (t) are functions of a real parameter t. With the second
type, as the real parameter t spans an interval, x and y trace a curve in the complex
plane. We treat these types separately.
As in calculus, we encounter complex indefinite integrals of the form
ˆ
f (z) dz,
Example 3.1 From Sect. 2.4, we know that the hyperbolic function cosh z is
entire (analytic everywhere in the complex plane), and sinh z can be obtained by
differentiating cosh z. Then using the chain rule, we can find the derivative
d 1
cosh az = sinh az,
dz a
and we can readily find the indefinite integral of sinh az exactly as we would
integrate a real-valued function:
ˆ
1
sinh az dz = cosh az + c0 ,
a
The simplest definite complex integral involves integrands that solely depend on a
real variable. We can talk about integrating in the Riemannian sense for this type
of functions. The real and imaginary parts of the function are determined by a real
parameter t rather than by x and y, that is, the integrand has the form f (t) =
u (t) + j v (t) , t ∈ [a, b]. Thus f (a) = u (a) + j v (a) and f (b) = u (b) + j v (b).
dU (t) dV (t)
Let u (t) = and v (t) = . If u and v are piecewise-continuous in the
dt dt
interval t ∈ [a, b], then the definite integral of f from a to b is given by two real
definite integrals. Using Eq. (3.1) on the real and imaginary parts of f , we can write
102 3 Complex Integration
ˆ b ˆ b ˆ b
f (t) dt = u (t) dt + j v (t) dt
a a a
b b
= U (t) + j V (t) . (3.2)
a a
ˆ π/3
Example 3.2 If f (t) = cos t + j sin t, find (cos t + j sin t) dt.
π/4
3.2 Contours
Fig. 3.1 The definite integral of complex functions is performed along a path C. (a) The path is
depicted in a 3D graph of |w (z)| and (b) in the complex plane
3.2 Contours 103
Fig. 3.2 Contours. (a) A simple contour, (b) an intersecting contour, and (c) a contour containing
the same points as the simple contour, but traversed in the reverse direction
where the functions x = x (t) and y = y (t) describe a curve C in the z-plane
as t varies in the interval. C is the path or the contour of integration. The initial
and final points of C correspond to t = α and t = β, that is, a = z (α) =
x (α) + jy (α) and b = z (β) = x (β) + jy (β). In order to have a smooth curve,
we require that C should not have jumps in the x or y directions and that it keeps
progressing from the initial point a to the final point b without intersecting itself.
We express these requirements more formally by saying that z (t) is piecewise-
continuous and differentiable in the given interval α t β. If we did not
require differentiability, x (t) and y (t) might be undefined and the progress of C
might stop at a certain value of t between the initial and final points. The curve
C may be formed by concatenating many simple smooth curves for which the
continuity and differentiability conditions are met. Such a curve C may have cusps
or corners between the initial and final points and is called to be piecewise-smooth.
The edges of a rectangle form a piecewise-smooth curve on which x (t) and y (t)
are continuous except at the corners of the rectangle.
As t varies from α to β in the interval [α, β], if z (t1 ) = z (t2 ) for any t1 = t2 ,
the mapping z (t) produces a simple curve. Violating this requirement produces a
self-intersecting curve. A closed curve for which z (α) = z (β) = z0 is an exception
to this requirement (Fig. 3.2). A closed curve starts at an initial point z0 when t = α
and ends at the same point for t = β. Traversing C counterclockwise is regarded as
the positive direction; naturally moving clockwise is negative. An arc which does
not intersect itself is a simple curve or a Jordan curve. Figure 3.2b depicts a self-
104 3 Complex Integration
intersecting curve which is made of two simpler curves C2 and C2 . Note that C2 is
traversed clockwise. Then integrating along C2 would involve integrating along C2
and −C2 .
The contour integration is performed along a curve with a defining parametric
relation that indicates the direction.
A certain curve can actually belong to different contours. For instance, the
contours
and
describe a circle whose radius is R and centered at the origin. While the former
rotates about the origin in the counterclockwise direction, the latter rotates in
the clockwise direction. Thus these are considered two distinct contours whose
integrals, as we will find out, are the negatives of each other. Another example
of a contour which shares the same curve given by Eqs. (3.5) and (3.6) is the one
produced by z (t) = Rej 2t (0 t 2π ), which rotates about the origin twice in the
counterclockwise direction. These three contours are distinct although they share a
common path. Hence the geometric shape of the contour must be accompanied by a
parametric relation defining the sense of integration.
For a contour to be a piecewise-smooth curve between an initial point and a final
point, we require the contour to be continuous and that its derivative z (t) be never
equal to zero. However the derivative itself can be piecewise-continuous, allowing
z (t) to have different values at the cusps where the constituent curves are joined.
Assume that we wish to integrate a function along a closed path. The complex
plane contains regions where the function is analytic, regions where it is not analytic,
and regions that contain a mixture of analytic and nonanalytic regions. In this regard,
a region is called simply connected if the region to the left of a simple contour
traversed in the counterclockwise direction includes points at which the function is
analytic. If the region to the left of the contour contains points at which the function
is not analytic, then this region is called multiply connected. In Fig. 3.3a, R1 is
simply connected because the function f is analytic at all the points enclosed by
any simple contour C1 . Alternatively, we can identify a simply connected region
by drawing lines between any two points of a closed curve. If none of these lines
contains points at which f is not analytic, then the region is simply connected;
otherwise, it is multiply connected. In Fig. 3.3b, C2 encloses points where f is
analytic as well as points in two subregions where f is not analytic; hence, R2
is multiply connected.
3.3 Integrating Functions of a Complex Variable 105
a b
Fig. 3.3 (a) R1 is a simply connected region and (b) R2 is multiply connected because of the
nonanalytic regions it contains
where t is a real number that takes on values from α to β. The initial and final
points of the contour are a = z (α) and b = z (β). The parametric representation
is not unique. The parameter t can be described by another function t = s (τ ) for
106 3 Complex Integration
τ ∈ α , β . Because s maps τ to t, we have α = s α and β = s β , and the
new parametric representation becomes
z = z (τ ) = x [s (τ )] + jy [s (τ )] , τ ∈ α, β .
C = C 1 + C 2 + . . . + Cm ,
where the “=” sign means “is composed of ” and the operator “+” performs
concatenation. Let ζi be a point in the i-th curve between zi−1 and zi . We form
the sum
m m
Sm = f (ζi ) (zi − zi−1 ) = f (ζi ) zi (m = 1, 2, . . .) , (3.8)
i=1 i=1
With the continuity constraint already imposed on f (z), the integral in Eq. (3.9)
can be shown to exist. Knowing that
we can decompose Sm in Eq. (3.8) into its real and imaginary parts
m
lim Sm = lim [u (t) + j v (t)] (xi + j yi )
m→∞ m→∞
i=1
! m m
= lim u (t) xi − v (t) yi
m→∞
i=1 i=1
& m m
'(
+j u (t) yi + v (t) xi .
i=1 i=1
As m tends to infinity, xi and yi tend to dx and dy. The differences xi and
yi become dx = x (t) dt and dy = y (t) dt, and the infinite sums turn into real
integrals. Thus the complex integral of f (z) along C is defined as
ˆ ˆ β ˆ β
f (z) dz = u (t) x (t) dt − v (t) y (t) dt
C α α
ˆ β ˆ β
+j u (t) y (t) dt + v (t) x (t) dt . (3.10)
α α
Since u, v, x and y are piecewise-continuous over the interval [α, β], the real
integrals in this equation exist. The complex integral defined in terms of the four
real integrals above can be expressed more compactly as
ˆ ˆ β ˆ β
f (z) dz = f [z (t)] d [z (t)] = f [z (t)] z (t) dt. (3.11)
C α α
The complex integral as defined by Eq. (3.11) can be readily shown to exist and
an upper bound for the magnitude can be determined. This can be done by showing
that the magnitude of the complex integral is finite. We seek to show that
ˆ
f (z) dz < ∞.
C
108 3 Complex Integration
Due to the triangle inequality, the magnitude of the integral is less than or equal to
the integral of the magnitude of the function:
ˆ ˆ
f (z) dz f (z) dz
C C
ˆ ˆ β
= f (z) dz = f [z (t)] z (t) dt.
C α
From calculus, we know that the last integral is the arc length, say L, of the contour
C defined by the parametric equation x = x (t) and y = y (t). Hence
ˆ
f (z) dz ML < ∞. (3.12)
C
´
Since the magnitude of C f (z) dz is less than infinity, the integral exists and its
magnitude is bounded by ML. For a more thorough discussion and a more rigorous
proof, see [30]. This result can be used to obtain an upper bound when contour
integrals are evaluated. This important inequality is renowned by the name of ML
inequality.
We would like to demonstrate the use of the complex integral definition given in
the previous section with an example. We implement the numerical computation in
LabVIEW. The complex function we choose to integrate is
z2
f (z) = .
z − (1 + j )
3.4 Numerical Computation of the Complex Integral 109
In Example 3.10, this function √ is integrated around a circular contour that has a
radius greater than |1 + j | = 2 and the result √ obtained there is −4π . In Sect. 3.7,
we will find out that if the radius is less than 2, the integral should evaluate to
0. In the LabVIEW user interface shown in Fig. 3.6, we can choose the radius r,
to test the integral value for contours that include the point z0 = 1 + j as well as
for contours that exclude z0 . The result of the integration is held in the indicator
“integral [f (z)dz/(z − z0)]”.
According to Sect. 3.3, the contour must be divided into an infinitely many
subpaths and the products f (z) zn must be summed from the beginning point
to the end point
ˆ ∞
f (z) dz = f (z) zn .
C n=0
ˆ N −1
f (z) dz ≈ f (z) zn , (N = 5000) .
C n=0
The subpaths (the chords) are subtended by a central angle 2π/N. The difference
zn between starting and end points of a chord is computed from the circular
contour using
zn = zn+1 − zn
110 3 Complex Integration
2π n
zn = r exp j .
N
Again we arbitrarily select z to be the midpoint on the chord that joins zn and zn+1 ,
that is,
zn+1 + zn zn
z= = zn + .
2 2
With this, the integral can be computed numerically using
ˆ 4999
[0.5 (zn+1 + zn )]2
f (z) dz ≈ · (zn+1 − zn )
C 0.5 (zn+1 + zn ) − (1 + j )
n=0
2π n
zn = r exp j .
5000
2
Fig. 3.6 Numerical integration of f (z) = z−1−j z
. (a) Log magnitude of f and the contours of
integration and (b) z0 = 1 + j and r are entered from the the LabVIEW front panel. (c) LabVIEW
block diagram that computes the integral
3.5 Properties of the Complex Integral 111
The LabVIEW block diagram that does the numerical computation is depicted in
Fig. 3.6. The FOR loop counter i is used to calculate zn , zn+1 , zn , and z. Contour
radius r and z0 = 1 + j are passed to the loop from front panel controls. The
central angle between zn and zn+1 is also calculated before entering the loop. The
computation of f (z) is self-explaining. A shift register is used to accumulate the
sum. Thus since
n n−1
f (z) zi = f (z) zi + f (z) zn ,
i=0 i=0
the
)n−1 shift register is initialized to 0 before entering the loop. Inside the loop,
i=0 f (z) zi is kept in the shift register and the new product f (z) zn is added
to it.
Sample runs:
r = 2, integral [f (z) dz] = −12.566372268028 − 0i ≈ −12.56637061 = −4π
r = 0.75, integral [f (z) dz] = −3.556E − 17 − 2.99E − 16i ≈ −0 − 0i = 0.
We can use the sum in Eq. (3.8) to derive some properties of the complex integral.
Multiplication by a Constant If k = l + j m is a complex constant, then
ˆ ˆ
kf (x) dx = k f (x) dx. (3.13)
C C
to get
ˆ ˆ
kf (x) dx = k f (x) dx.
C C
Path Decomposition Consider a contour C which is split into two paths C1 and
C2 , so that C = C1 + C2 (see Fig. 3.7a). Let C1 and C2 be composed of m
smooth curves. Then C comprises 2m smooth curves. Then the integral over C can
be expressed as
3.5 Properties of the Complex Integral 113
ˆ ˆ
f (z) dz = f (z) dz
C C1 +C2
2m
= lim f (ζi ) (zi − zi−1 ) .
m→∞
i=1
The sum on the right side of the equation can be split into two sums
2m m
lim f (ζi ) (zi − zi−1 ) = lim f (ζi ) (zi − zi−1 )
m→∞ m→∞
i=1 i=1
2m
+ lim f (ζi ) (zi − zi−1 ) .
m→∞
i=m+1
By definition of the complex integral, this is the sum of two separate integrals
m 2m ˆ ˆ
lim f (ζi ) zi + lim f (ζi ) zi = f (z) dz + f (z) dz.
m→∞ m→∞ C1 C2
i=1 i=m+1
1 ˆ a
lim f (ζi ) (zi−1 − zi ) = f (z) dz.
m→∞ b
i=m
114 3 Complex Integration
However
1 m
lim f (ζi ) (zi−1 − zi ) = − lim f (ζi ) (zi − zi−1 ) ,
m→∞ m→∞
i=m i=1
Addition of Functions If f (x) = f1 (x) + f2 (x) is the sum of two real functions,
from calculus we know
ˆ b ˆ b ˆ b ˆ b
f (x) dx = [f1 (x) + f2 (x)] dx = f1 (x) dx + f2 (x) dx.
a a a a
This property is easily extended to complex functions so that if f (z) is the sum
of two complex functions f1 (z) and f2 (z), and C is a contour along which we
integrate f (z), then we have
which is
ˆ ˆ ˆ
f (z) dz = f1 (z) dz + f2 (z) dz. (3.16)
C C C
ˆ ˆ ˆ
f (z) dz = c1 f1 (z) dz + c2 f2 (z) dz, (3.17)
C C C
ˆ π ˆ π ˆ π
= x −y2 2
x dt − 2 xy · y dt + j x 2 − y 2 y dt
0 0 0
ˆ π
+ j2 xy · x dt.
0
Since ej t = x (t) + jy (t), x (t) = cos t and y (t) = sin t, and the integral becomes
ˆ ˆ π ˆ π
z2 dz = − cos2 t − sin2 sin tdt − 2 cos t sin t · cos tdt
C1 0 0
ˆ π ˆ π
+j cos t − sin cos tdt − j 2
2 2
cos t sin t · sin tdt
0 0
2 2 2
= − 2 · + j0 − j2 · 0 = − .
3 3 3
Although the integral is evaluated using the definition, we have much practical and
faster way to find the integral. We plug in the values z2 = ej 2t and dz = j ej t dt in
the integral to obtain
ˆ ˆ π ˆ π ej 3t π 1 j 3t π 2
z dz =
2
e j 2t
j e dt = j
jt
ej 3t dt = j · = ·e =− .
C1 0 0 3j 0 3 0 3
2
=− .
3
We find that the two integrals along C1 and C2 are equal, a result which will be
evident shortly when we look into the Cauchy–Goursat theorem.
∗ −j t for 0 ≤ t ≤ π .
ˆ = z and C1 : z = e and C2 : z = e
Example jt
ˆ 3.4 Let f (z)
Find f (z) dz and f (z) dz.
C1 C2
Along C1:
∗
f (z) = ej t = e−j t and dz = j ej t dt, and thus
ˆ ˆ π ˆ π
f (z) dz = = e−j t j ej t dt = j dt = j π.
C1 0 0
3.5 Properties of the Complex Integral 117
Along C2 :
∗
f (z) = e−j t = ej t and dz = −j e−j t dt, and thus
ˆ ˆ π ˆ π
−j t
f (z) dz = e −j e dt = −j
jt
dt
C2 0 0
= −j π.
ux = y, vy = 1
uy = x, vx = 1.
Clearly, since ux = vy and uy = −vx , f (z) is not analytic. Then we proceed to the
integrals along the two specified contours.
Along C1 :
z (t) = t + j t, f (z) = t 2 + j 2t and dz = (1 + j ) dt. Then we have
ˆ ˆ 1+j
f (z) dz = f (z) dz
C1 0
ˆ 1 ˆ 1
= t + j 2t (1 + j ) dt = (1 + j )
2
t 2 + j 2t dt
0 0
118 3 Complex Integration
1
t3 1
= (1 + j ) · + jt2 = (1 + j ) +j
3 0 3
2 4
= − +j .
3 3
Along C2 :
C2 is composed of two paths C3 and C4 .
On C3 : f (z) = j t, z (t) = t + j 0 (0 t 1), and dz = dt.
On C4 : x (t) = 1 and y (t) = t − 1, where 1 t 2. Thus
f (z) = t − 1 + j (1 + t − 1) = t − 1 + j t = −1 + (1 + j ) t,
z (t) = 1 + j (t − 1) (1 t 2) and dz = j dt.
Hence
ˆ ˆ
f (z) dz = f (z) dz
C2 C3 +C4
ˆ ˆ
= f (z) dz + f (z) dz
C3 C4
ˆ 1 ˆ 2 2 1
t
= j tdt +
[−1 + (1 + j ) t] j dt = j
0 1 2 0
2
t2
+ j −t + (1 + j )
2 1
1 3 3 3
= j + j −1 + + j =j− .
2 2 2 2
We see that the integrals along C1 and C2 are different. This demonstrates that
the complex integral may also depend on the contour of integration.
ˆ
1
Example 3.6 Let f (z) = , and let us find f (z) dz along two different contours
z C
shown in Fig. 3.9a.
The first contour C1 is a circle described by C1 : z = cos t + j sin t, while the
second contour is an ellipse described by C2 : z = 2 cos t + j sin t for 0 ≤ t ≤ 2π .
Both contours are traversed in the counterclockwise direction with increasing t.
Along the path C1 :
z = cos t + j sin t and dz = (− sin t + j cos t) dt. Thus we have
ˆ ˆ 2π (− sin t + j cos t) dt
f (z) dz =
C 0 cos t + j sin t
3.5 Properties of the Complex Integral 119
Fig. 3.9 (a) Integration paths for Example 3.6. C1 is a circle and C2 is an ellipse both traversed in
the counterclockwise direction. (b) Integration path for Example 3.7
ˆ ˆ
2π j (j sin t + cos t) 2π
= dt = j dt
0 cos t + j sin t 0
= 2πj.
ˆ
1
Example 3.7 Let f (z) = , where n is an integer. Let us find f (z) dz
(z − a)n C
for different values of n around a circle z = a + ρej θ (0 θ 2π ) shown in
Fig. 3.9b.
Since dz = jρej θ dθ , we have
ˆ ˆ 2π ˆ 2π j θ
jρej θ dθ ρe dθ
f (z) dz = n = j
C 0 a + ρe j θ − a 0 ρ n ej nθ
ˆ 2π −j (n−1)θ 2π
j j e
= n−1 e−j (n−1)θ dθ = n−1 ·
ρ 0 ρ −j (n − 1) 0
−1 e−j 2(n−1)π − 1
= · .
ρ n−1 n−1
ˆ
Since e−j 2(n−1)π − 1 = 0 for n = 1, we have f (z) dz = 0. For n = 1, we
C
have an indeterminate case of 0/0. We can determine the value of the integral by
applying L’Hopital’s rule with n = 1:
d −j 2(n−1)π
e−j 2(n−1)π − 1 e −1
= lim dn
n−1 n→1 d
(n − 1)
dn
−2πj e−j 2(n−1)π
= lim
n→1 1
= −2πj.
Therefore
ˆ
dz −1
= 0 · (−j 2π )
C z−a ρ
= 2πj.
for a contour |z − a| = ρ.
3.6 The Cauchy–Goursat Theorem 121
As the examples in the previous section show, complex integrals depend in general
not only on the function being integrated but on the path of integration as well.
However, there are certain functions whose integrals do not depend on the contour
of integration. In this section we explore such functions; it turns out that if a function
is analytic in a domain D, then the complex integral of its derivative in D is
independent of the contour of integration.
The Cauchy1 integral theorem gives us a useful condition as to which functions
have vanishing integrals around a closed contour. The theorem is also known as the
Cauchy–Goursat theorem because of the important contribution that Goursat2 made
to the theorem. The condition stated by the theorem is not necessary but sufficient
as we have seen in Example 3.5.
Theorem 3 Let f (z) be analytic within and on a simple closed contour C in a
simply connected domain D. Then the integral around C is zero.
Proof Cauchy’s reasoning to prove the theorem depends on the Green Theorem
in calculus involving line integrals in a region. If P (x, y) and Q (x, y) are two
functions in x, y and have continuous partial derivatives in a domain D, then the
line integrals along a closed contour in D and the double integral are related by
ˆ ¨
dQ dP
(P dx + Qdy) = − dxdy, (3.19)
C R dx dy
where R is the region enclosed by C (Fig. 3.10). We have seen that the integral of
f (z) is given by Eq. (3.10)
ˆ ˆ ˆ
f (z) dz = [u (x, y) dx − v (x, y) dy] + j [v (x, y) dx + u (x, y) dy] .
C C C
1 Baron Augustin-Louis Cauchy (21 August 1789–23 May 1857), a French mathematician,
engineer, and physicist, founded complex analysis and the permutation groups in abstract algebra.
There are numerous concepts and theorems attributed to him in mathematics and physics.—
Abridged from Wikipedia.
2 “Édouard Jean-Baptiste Goursat (21 May 1858–25 November 1936), a French mathematician
who contributed to the theory of functions and differential equations, helped resolve the difficulties
inherent in stating the fundamental Cauchy integral theorem properly. For that reason, it is
sometimes called the Cauchy–Goursat theorem.”—Abridged from Wikipedia and Encyclopedia
Britannica.
122 3 Complex Integration
The two integrals on the right can be rewritten according to Green’s Theorem as
ˆ ˆ
[u (x, y) dx − v (x, y) dy] + j [v (x, y) dx + u (x, y) dy]
C C
¨ ¨
= −vx − uy dxdy + j ux − vy dxdy.
R R
For the two double integrals to exist, the partial derivatives ux , uy , vx , and vy should
be continuous. Then since f is analytic in R, the Cauchy–Riemann conditions are
satisfied, that is, ux = vy and uy = −vx . Hence
ˆ ¨ ¨
f (z) dz = (−vx + vx ) dxdy + j (ux − ux ) dxdy = 0.
C R R
Note that the continuity of the partial derivatives of f (z) implies the continuity of
f (z). This proves the theorem.
Cauchy required that f (z) be continuous for the integral to vanish on C. Later,
Goursat proved that the continuity of f (z) is sufficient for the theorem to hold true.
Goursat’s proof can be found for instance in [Kreyszig] and will not be given in this
book. The analyticity of a function in a region is sufficient for the closed contour
integral in that region to be equal to zero; it is not a necessary condition. Functions
that are analytic in a domain have integrals vanishing on a closed contour. However,
not all functions with vanishing contour integrals are analytic in the domain which
hosts the contour. For example, see Examples 3.16 and 3.18.
Proof The second assertion simply states that for a contour lying in D, the integral
is determined by the initial and final points rather than the contour along which the
integral is evaluated, that is,
ˆ ˆ z2 z2
f (z) dz = f (z) dz = F (z) = F (z2 ) − F (z1 ) .
C z1 z1
To verify that these assertions imply each other, suppose the first assertion is true
and we have a contour specified by z = φ (t). Then we have
dF (z) = F (z) dz
= F [φ (t)] φ (t) dt
= f [φ (t)] φ (t) dt.
On the other hand, since the complex integral of f (z) around a contour C is defined
as
ˆ ˆ t2
f (z) dz = f [φ (t)] φ (t) dt,
C t1
and we have
ˆ ˆ
f (z) dz − f (z) dz = 0.
C1 C2
124 3 Complex Integration
Integral along C:
C is given parametrically by z (t) = t + j t 0 t √1 . On this contour, z2 =
2
(t + j t)2 = j 2t 2 , and dz = (1 + j ) dt. Thus the integral along C becomes
ˆ ˆ √ ˆ √
1/ 2 1/ 2
z dz =
2
j 2t (1 + j ) dt = j 2 (1 + j )
2
t 2 dt
C 0 0
√
t3 1/ 2 −1 + j
= j 2 (1 + j ) = √ .
3 0 3 2
The integral along C is the sum of integrals along C1 and C2 , that is,
ˆ ˆ ˆ
z2 dz = z2 dz + z2 dz.
C C1 C2
Thus
ˆ
1 1 1 1
z2 dz = + −√ + j √ − 1
C 3 3 2 2
−1 + j
= √ .
3 2
126 3 Complex Integration
z3
Now we find the integral using the antiderivative F (z) =
3
ˆ ˆ √
(1+j )/ 2
z dz =
2
z2 dz
C 0
√ 3
z3 (1+j )/ 2 1 1+j 1 j π/4 3 1
= = √ = e = ej 3π/4
3 0 3 2 3 3
−1 + j
= √ .
3 2
Fig. 3.12 A circular contour (a) centered at z = a can be deformed to an arbitrary simply
connected contour (b) by continuously moving the points on the circle like a rubber band
To see how this comes about, let us join C1 and C2 with a link AB. Consider the
new contour = ABCDBAEF A formed by the paths AB, BCDB, BA, and
AEF A shown in Fig. 3.13. When a fictitious traveler traverses this closed path in
the direction denoted by the arrows, the region to their left is solely analytic. Since
f is analytic within and on ,
ˆ
f (z) dz = 0.
Since
ˆ ˆ
f (z) dz = − f (z) dz
BA AB
and
ˆ ˆ
f (z) dz = f (z) dz
AEF A C1
ˆ ˆ
f (z) dz = f (z) dz,
BCDB C2
we get
ˆ ˆ ˆ
f (z) dz = f (z) dz + f (z) dz = 0
C1 C2
ˆ ˆ
f (z) dz = − f (z) dz.
C1 C2
3.7 Cauchy’s Integral Formula 129
Also since
ˆ ˆ
− f (z) dz = f (z) dz,
C2 −C2
we obtain
ˆ ˆ
f (z) dz = f (z) dz.
C1 −C2
Thus the contour integrals in the same direction in a doubly connected domain are
equal.
In Sect. 3.6.2, the case for which n −1 involved f (z) being nonanalytic at
z = a. This prevented us from writing the Cauchy integral for the contours. However
using the result of this section, we see that the integrals over closed contours in
this doubly connected domain are equal. This in effect is the principle of path
deformation applied to contours that enclose nonanalytic regions. This observation
illustrated in Fig. 3.13b enables us to deform the circular contour to any shape in
the doubly connected domain. Then the integral on the original contour is evaluated
from the circular contour.
The same reasoning applies for multiply connected domains. In Fig. 3.13c, we
have a triply connected domain and three contours. The function is analytic between
the contours and nonanalytic within C2 and C3 . If we take integrals over C2 and C3
in the clockwise direction, then the sum of the integrals vanishes
ˆ ˆ ˆ
f (z) dz + f (z) dz + f (z) dz = 0.
C1 C2 C3
If we reverse the sense of integration for C2 and C3 , then the alternative relation
holds
ˆ ˆ ˆ
f (z) dz = f (z) dz + f (z) dz. (3.22)
C1 −C2 −C3
The Cauchy integral formula is a very important application of the ideas developed
in this chapter. Let C be a simple closed contour in a simply connected region D as
shown in Fig. 3.14. If f (z) is analytic within and on a contour C and a is a point
enclosed by C, then the value f (a) is given by the contour integral
ˆ
1 f (z) dz
f (a) = . (3.23)
2πj C z−a
130 3 Complex Integration
Equivalently,
ˆ
f (z) dz
= 2πjf (a) . (3.24)
C z−a
Interestingly, if a function is analytic within and on a simple closed contour, then the
value of the function within the contour is determined by the points of the contour.
To prove the Cauchy integral formula, let us write f (z) in the form
Then integrating over a contour which encloses z = a, and using the result we
obtained in Example 3.7, we have
ˆ ˆ ˆ
f (z) f (z) − f (a) f (a)
dz = dz + dz
C z−a C z−a C z−a
ˆ ˆ
f (z) − f (a) dz
= dz + f (a)
C z − a C −a
z
ˆ
f (z) − f (a)
= dz + 2πjf (a) .
C z−a
Since f (z) is analytic within the contour, it is continuous, and f (z) can get near
to f (a) as close as we like. Let ε be an arbitrarily small positive number. We can
always find another positive number δ such that
Let us try to find an upper bound for the integral on the right-hand side of the
equation
ˆ ˆ
f (z) − f (a) |f (z) − f (a)|
dz |dz| .
C z−a C |z − a|
|f (z) − f (a)| ε
,
|z − a| ρ
f (z) − f (a)
which is an upper bound for the integrand . By the principle of
z−a
the contour deformation, we can select C to be z = ρej θ traversed in the
counterclockwise direction. Then |dz| is the incremental arc length of the contour
and yields 2πρ upon integration. The ML inequality yields
ˆ
f (z) − f (a) ε
dz · 2πρ
C z−a ρ
= 2π ε.
We can make ε arbitrarily small by letting it approach zero. This makes the
magnitude of the integral tend to zero:
ˆ
f (z) − f (a)
lim dz lim 2π ε = 0,
ε→0 C z−a ε→0
lim z = a
δ→0
132 3 Complex Integration
That the contour integral of f (z) vanishes over C shows that f (z) exists;
otherwise the integral would not be defined. By the Cauchy integral theorem, we
suspect f (z) is analytic. Remember that the analyticity is a sufficient condition for
the contour integral of a function to be zero. It is not a necessary condition however,
and we have already seen nonanalytic functions whose contour integrals are zero.
However f (z) is analytic.
ˆ 3
z −1
Example 3.9 Evaluate dz where the contour is described by z =
C z+1
2ej θ (0 θ 2π ).
We have f (z) = z3 − 1 which is enclosed by C. Hence
ˆ ˆ
z3 − 1 z3 − 1
dz = dz = 2πjf (−1)
C z+1 C z − (−1)
ˆ
z2
Example 3.10 Evaluate dz, where z0 = 1 + j by using the Cauchy
C z − z0
integral formula and direct integration.
ˆ
z2
dz = 2πjf (z0 ) = 2πj z02 = 2πj (1 + j )2
C z − z0
= −4π.
ˆ ˆ 2
z2 z0 + rej θ · j rej θ dθ
2π
dz =
C z − z0 0 z0 + rej θ − z0
ˆ 2π 2
z0 + 2rz0 ej θ + r 2 ej 2θ · j rej θ dθ
=
0 rej θ
ˆ 2π
=j z02 + 2rz0 ej θ + r 2 ej 2θ dθ
0
3.7 Cauchy’s Integral Formula 133
ˆ 2π ˆ 2π ˆ 2π
= j z02 dθ + 2rz0 ej θ dθ + r 2 ej 2θ dθ
0 0 0
j θ 2π j 2θ 2π
e e
= 2πj z02 + 2rz0 j · + r2 ·
j 0 2j 0
= −4π.
This example illustrates the ease that the Cauchy integral theorem provides to
complex integration.
ˆ
z2
Example 3.11 Given w (z) = 3 , evaluate the integral w (z) dz
z + z2 + z + 1 C
over the contours: (a) C1 : z = j + ej θ , (b) C2 : z = −j + ej θ , and (c)
C3 : z = −1 + ej θ . For all contours, 0 θ 2π .
If the denominator is factored out, w (z) can be written as
z2 z2
w (z) = 2 = .
z + 1 (z + 1) (z + j ) (z − j ) (z + 1)
z2
Hence f (z) = , and
(z + j ) (z + 1)
ˆ ˆ
f (z)
w (z) dz = dz = 2πjf (j )
C1 C1 z − j
(j )2
= 2πj
(j + j ) (j + 1)
π
=− .
1+j
134 3 Complex Integration
z2
f (z) = , and
(z − j ) (z + 1)
ˆ ˆ
f (z)
w (z) dz = dz = 2πjf (−j )
C2 C2 z+j
(−j )2
= 2πj
(−j − j ) (−j + 1)
π
= .
1−j
z2
f (z) = , and
z2 + 1
ˆ ‰
f (z)
w (z) dz = dz = 2πjf (−1)
C3 C3 z + 1
(−1)2
= 2πj
(−1)2 + 1
= πj.
In Sect. 3.7, we have seen that f (z) exists. Unlike real functions, complex
functions, which are analytic in a domain, have derivatives of all orders in that
domain.
Theorem 5 If f is analytic in a domain D and C is a simple closed contour in this
domain enclosing a point z = z0 , then the general form of a derivative of order n
evaluated at z = z0 is given by
ˆ
n! f (z) dz
f (n) (z0 ) = (n = 1, 2, · · · ).
2πj C (z − z0 )n+1
For n = 1, we have
ˆ
1 f (z) dz
f (z0 ) = .
2πj C (z − z0 )2
3.8 Higher-Order Derivatives of Analytic Functions 135
Proof We can prove this formula by starting from the definition of the derivative
for analytic functions, i.e.,
Referring to the contour depicted in Fig. 3.15, f (z0 + z) and f (z0 ) can be
replaced by their Cauchy integral equivalents:
ˆ ˆ
f (z0 + z) − f (z0 ) 1 f (z) f (z)
= dz − dz
z 2πj z C z − z0 − z
C − z0
z
ˆ
1 f (z) f (z)
= − dz
2πj z C z − z0 − z z − z0
ˆ
1 z − z0 − (z − z0 − z)
= f (z) dz
2πj z C (z − z0 − z) (z − z0 )
ˆ
1 zf (z) dz
=
2πj z C (z − z0 − z) (z − z0 )
ˆ
f (z0 + z) − f (z0 ) 1 zf (z) dz
f (z0 ) = lim = lim .
z→0 z z→0 2πj z C (z − z0 − z) (z − z0 )
Canceling out the factors z in the numerator and denominator of the definition, we
get
ˆ
f (z0 + z) − f (z0 ) 1 f (z) dz
= .
z 2πj C [z − (z0 + z)] (z − z0 )
136 3 Complex Integration
tending to 0 as z tends to zero. Certainly, this difference will approach zero if its
magnitude approaches zero. Hence we consider the magnitude
ˆ ˆ
f (z) dz f (z) dz
− as z → 0
C (z − z0 − z) (z − z0 ) C (z − z0 )2
ˆ ˆ ˆ
f (z) dz f (z) dz z − z0 − (z − z0 − z)
− = f (z) dz
C (z − z0 − z) (z − z0 ) C (z − z0 )2 C (z − z0 − z) (z − z0 )2
ˆ
f (z) z
= dz
C (z − z0 − z) (z − z0 )2
ˆ
f (z) zdz
.
C (z − z0 − z) (z − z0 )2
Then we invoke the ML inequality to prove that the last integral approaches zero as
we let z approach zero. As shown in Fig. 3.15, z0 is a point inside the contour C.
Let d denote the closest distance between the contour and z0 , i.e., |z − z0 | d for
any point z on C. The integral can be written as
ˆ ˆ
f (z) z |f (z)| |z| |dz|
dz = .
C (z − z0 − z) (z − z0 ) 2
C |z − z0 − z| |z − z0 |2
f (z) is known to be analytic in D, and hence its magnitude is bounded, i.e., less
than some positive number A, |f (z)| A. |z − z0 |2 d 2 because |z − z0 | d.
Thus
ˆ ˆ
|f (z)| |z| |dz| A |z| |dz|
.
C |z − z0 − z| |z − z0 | C |z − z0 − z| d
2 2
Now we can call for the principle of the path deformation and write
ˆ ˆ ˆ
|f (z)| |z| |dz| A |z| |dz| Akd |dz|
=
|z − z0 − z| |z − z0 |2 C |z − z0 − z| d C (1 − k) d · d
2 2
C
ˆ
kA kA
= |dz| = · 2π kd
(1 − k) d 2 C (1 − k) d 2
2π k 2 A
= .
(1 − k) d
Hence
ˆ ˆ
f (z) dz f (z) dz 2π k 2 A
− .
C [z − (z0 + z)] (z − z0 ) C (z − z0 )2 (1 − k) d
= 0.
The proof for higher-order derivatives can be obtained from lower-order deriva-
tives starting with n = 1 and working upward, i.e., mathematical induction can be
employed. We will not prove the expression for high-order derivatives.
138 3 Complex Integration
A complex sequence is a set of infinitely many complex numbers such that starting
from the beginning of the sequence, the following numbers are determined by a
relation. In the literature, the sequence by z0 , z1 , . . . or {z0 , z1 , . . .}
may be denoted
or simply by {zn }. The sequence n2 · 0.9n ej nπ/5 has members determined by the
formula zn = n2 · 0.9n ej nπ/5 . In Fig. 3.16a, magnitudes of the first 101 numbers of
the sequence are depicted.
When n becomes larger and larger, the n-th number may also get “large,” that is,
its magnitude may grow indefinitely. If such is the case, we say that the sequence
diverges as n tends toward infinity. Otherwise the sequence tends to a certain number
as n becomes exceedingly large; this is called convergence, and the series is said to
be converging or convergent.
Formally, we say that a sequence zn converges to a number c = a + j b, if for a
positive number , however small, there exists a number N such that |zn − c| <
whenever n > N. Then we write
lim zn = c.
n→∞
Fig. 3.16 (a) A converging complex sequence {zn } = n2 · 0.9n ej nπ/5 and (b) the magnitude
of the elements of {zn }. We see that zn approaches 0. The ratio |zn | / |zn−1 | is less than 1 after a
certain n. Both conditions are necessary if the series built from zn is to converge
3.9 Complex Sequences and Series 139
lim zn − c = 0
n→∞
This is only possible when both limits are equal to zero which are possible if
n
sn = zm .
m=1
Then we can form a sequence of the partial sums {s1 , s2 , . . . , sn }. The series is said
to converge to c if the partial sum sn converges to c; otherwise the series diverges.
Hence the series formally approaches s if
n
s = lim sn = lim zm .
n→∞ n→∞
m=1
For a series to converge, a necessary condition is that its members tend to zero as n
tends toward infinity. We can prove this by considering a partial sum sn which can
be rewritten as
n n−1
sn = zm = zm + zn = sn−1 + zn .
m=1 m=1
140 3 Complex Integration
zn = sn − sn−1 .
If the series is to converge, then the sequence {sn } has to converge to s, that is,
lim sn = s. Taking the limits on both sides of this equation, we get
n→∞
Therefore
lim zn = 0.
n→∞
In Fig. 3.16a, we observe that the elements of the sequence n2 · 0.9n ej nπ/5
N
approach zero as n becomes large. In Fig. 3.16b, 101 partial sums sN = n2 ·
n=0
0.9n ej nπ/5 are also shown.
Note that this condition is necessary but not sufficient. Every converging series
satisfies this condition, but not all the series whose n-th terms approach zero are
converging. There are several convergence tests which can be used to tell whether
or not a given series converges. As these tests resemble their real counterparts, they
can be derived or proved in ways similar to the convergence tests of the real series.
One or a combination of these tests can be invoked to prove the convergence of a
series.
Absolute Convergence
For real series with alternating terms, we have the well-known absolute convergence
∞ ∞
rule which holds that xn absolutely converges if the series |xn | with all
n=0 n=0
positive terms converges. For instance, the series 1 − 12 + 14 − 19 + · · · absolutely
converges because the series 1 + 12 + 14 + 19 + · · · converges to 2. For complex series,
the absolute convergence can be restated in terms of complex number magnitudes;
in other words, the absolute value can be replaced by the complex magnitude.
∞
A complex series s = zn converges if |s| is finite; that is,
n=0
∞
zn < ∞.
n=0
3.9 Complex Sequences and Series 141
∞ ∞
zn |zn | .
n=0 n=0
∞ ∞
If |zn | converges, then it is finite. The convergence of zn is hence a logical
n=0 n=0
consequence:
∞ ∞
zn |zn | < ∞ and
n=0 n=0
∞
zn < ∞.
n=0
In Fig. 3.17a, 101 partial sums of the sequence n2 · 0.9n ej nπ/5 are shown.
In
2(b), the series built from the elements of the sequence of partial sums
n · 0.9n ej nπ/5 is also depicted. We see that
∞ ∞ ∞
n · 0.9 e
2 n j nπ/5
< n · 0.9 e
2 n j nπ/5
= n2 · 0.9n = 1710.
n=0 n=0 n=0
)∞ 2
Fig. 3.17 Absolute convergence of the series s = n=0 n · 0.9 e ) is demonstrated. (a)
n j nπ/5
n
Magnitude sequence of partial sums |sn | and (b) the sequence {Tn } = m=0 m · 0.9 e
2 m j mπ/5 .
Comparison Test
∞ ∞ ∞
Given two series wn and zn such that |wn | < |zn | for all n and zn is
n=0 n=0 n=0
∞
convergent, then wn is convergent by comparison. Likewise if |wn | > |zn | and
n=0
∞ ∞
zn is divergent, then wn is divergent too.
n=0 n=0
∞
We already know that the series s = n2 · 0.9n ej nπ/5 converges. Then
n=0
∞
the series w = n3/2 · 0.8n ej nπ/7 also converges because its elements satisfy
n=0
n3/2 · 0.8n ej nπ/7 < n2 · 0.9n ej nπ/5 .
The requirement that lim zn = 0 for a series to converge implies two other tests
n→∞
for convergence which we describe below.
Ratio Test
For a converging series, the ratio of the magnitudes of two successive terms must
be less than 1. If this condition is not satisfied, the series diverges. Indeed for the
condition lim zn = 0 to hold, we should have |zn | / |zn−1 | < 1. Otherwise |zn | =
n→∞
kn |zn−1 | (kn > 1) and zn grows in magnitude indefinitely. If kn = 1, the series may
converge or diverge.
If the elements of the series are given by n2 · 0.9n ej nπ/7 , then the ratio test has
2
n2 · 0.9n ej nπ/5 n
r= = 0.9
(n − 1)2 · 0.9n−1 ej nπ/5 n−1
2
n
lim r = lim 0.9 = 0.9.
n→∞ n→∞ n−1
Conversely, if (3.27) is true, then the series converges. The root test is somewhat
more elusive than the previous tests and it is a consequence of the ratio test of the
preceding paragraph. Consider a converging series
∞
s= zn .
n=0
Since the series converges, then from the ratio test, we must have (for some M 0
in Fig. 3.16b).
|zn |
kn = < 1 (n > M) .
|zn−1 |
Thus
We can split the series into two sums. For the first part (1 i M), the ratio
|zi |
ki = is not less than one. But starting with n = M + 1, kn is less than
|zi−1 |
one. Then the series can be written as
M ∞
s= zn + zn .
n=0 n=M+1
∞
Since the first part is a finite sum, the series s converges if and only if zn
n=M+1
converges. Let k be the largest of kn in Eq. (3.28), that is, k = max (kn ), then
obviously k < 1 and
|zn |
k n−M .
|zM |
Then
and
M
lim k − n = 1,
n→∞
we have
1
lim |zn | n k < 1.
n−→∞
Thus lim |sn | < ∞ implies the root test which says the series absolutely
n→∞
converges. If Eq. (3.27) is not satisfied, the series will not converge. Specifically, if
1 1
lim |zn | n > 1, the series diverges, and if lim |zn | n = 1, the test is inconclusive.
n−→∞ n−→∞
∞
Let us apply the root test to the series s = n2 · 0.9n ej nπ/5 . We must have
n=0
1/n
n2 · 0.9n ej nπ/5 < 1. Taking magnitude and logarithm of both sides, we get
1/n
ln n2 · 0.9n <0
1 2 1 2
ln n · 0.9n = (2 ln n + n ln 0.9) = ln n + ln 0.9
n n n
ln n
=2 − 0.105.
n
2 1/n
ln n becomes less than 0.105 after a certain value of n and n2 · 0.9n ej nπ/5
n
becomes less than 1.
Integral Test
The terms of a series can be sampled from a suitable continuous function, and the
series can be viewed as the sum of infinitely many rectangles having unity-length
bases. This sum can be compared to the area under the continuous function from
n = 0 (or n = 1) to infinity. If
∞ ˆ ∞
s= |zn | f (x) dx < ∞,
n=0 1
∞ ˆ ∞
On the other hand, if s = |zn | f (x) dx and
n=0 1
ˆ ∞
f (x) dx = ∞,
1
∞
The geometric series 1 + z + z2 + . . . + zn + . . . = zn is a power series which
n=0
is centered at z = 0. By taking the magnitude of the sum and using the triangle
inequality, we can write
∞ ∞ ∞
zn zn = |z|n .
n=0 n=0 n=0
146 3 Complex Integration
∞
So the power series zn converges absolutely for |z| < 1.
n=0
We can show that the series for cos z
∞
(−1)n z2n
cos z =
(2n)!
n=0
∞ ∞ ∞
(−1)n z2n (−1)n z2n z2n
= .
(2n)! (2n)! (2n)!
n=0 n=0 n=0
z2
As n tends to infinity, approaches zero for all z.
4n2
We note two properties of the power series below:
• If the series (3.30) centered at z0 converges at a point z1 , then it converges
absolutely at another point z if |z − z0 | < |z1 − z0 |.
• If the series (3.30) centered at z0 diverges at a point z2 , then it diverges at another
point z if |z − z0 | > |z2 − z0 |.
A function that is analytic in a domain D has derivatives of all orders which are
themselves analytic in D. Since the coefficients of the Taylor series are derivatives
of f , and all derivatives exist in D, such a function can be expanded in Taylor series
in D. Conversely, if a function can be represented by Taylor series in some domain
D, then the function is analytic in that domain (Fig. 3.18).
3.10 Power Series Expansions of Functions 147
Fig. 3.18 Contours used for (a) Taylor series and (b) Maclaurin series
and
ˆ
n! f (z)
f (n)
(z0 ) = dz.
2πj C (z − z0 )n+1
Knowing the values of f (n) (z0 ) for n = 0, 1, 2, . . . , we can find the value of
f (z0 + z) with the help of Taylor series. The series can be written in the form of
a power series:
∞
f (z) = an (z − z0 )n ,
n=0
f (n) (z0 )
an =
n!
ˆ
1 n! f (z)
= · dz
n! 2πj C (z − z0 )n+1
ˆ
1 f (z)
= dz. (3.31)
2πj C (z − z0 )n+1
148 3 Complex Integration
If z0 = 0, then we have the Maclaurin series that expands the function about the
origin
∞
f (n) (0) n
f (z) = z (3.33)
n!
n=0
with coefficients
ˆ
1 f (z)
an = dz. (3.34)
2πj C zn+1
Let us write
1 1 1 1 1
= · = · .
w−z w 1 − z/w w 1−a
Since
1 − aN 1 aN
1 + a + a 2 + . . . + a N −1 = = − ,
1−a 1−a 1−a
1 aN
we can isolate by adding to both sides of the equation
1−a 1−a
1 aN
= 1 + a + a 2 + . . . + a N −1 +
1−a 1−a
N −1
aN
= an + .
1−a
n=0
3.10 Power Series Expansions of Functions 149
where
z N
ˆ f (w) dw
1 1 w
RN = · z (3.35)
w 2πj C 1−
w
is the remainder of the series after n = N − 1. It remains for us to show that
RN tends to zero as N tends to infinity. RN is a complex number; if we can show
that the magnitude ofRN approaches zero as N tends to infinity, then obviously the
remainder RN tends to zero as N → ∞. As w is a point on C and z is inside C, we
z r
have |z| = r and |w| = r0 and = < 1. Taking absolute values of both sides
z0 r0
of Eq. (3.35), we get
z N
ˆ f (w) dw
1 1 w
|RN | = · z
w 2πj C 1−
w
150 3 Complex Integration
z N
ˆ f (w) dw
1 w
= z
2π r0 C 1−
w
ˆ z N
N ˆ
1 |f (w)| |dw| 1 r |f (w)| |dw|
w = .
2π r0 z 2π r0 r0 z
C 1− C 1−
w w
Since f (w) is continuous, it is bounded on the contour of integration. Let |f (w)|
M on C. With w = r0 ej θ , we have |dw| = r0 dθ . Hence we can use the triangle
inequality
z z r
1− 1− =1− .
w w r0
Hence by ML inequality,
N ˆ 2π
1 r Mr0 dθ
|RN | r
2π r0 r0 0 1−
r0
N
r0 r
= M.
r0 − r r0
r
Since < 1, we have
r0
N
r0 r
lim |RN | = lim M = 0,
N →∞ N →∞ r0 − r r0
Without resorting to rigor, the transition from Maclaurin series to Taylor series
proceeds through a change of variable s = z − z0 as illustrated in Fig. 3.19. Let
f (z) be analytic within and on a circle C : |z| = R. Let Cs : |z − z0 | = Rs be
another circle centered at z0 and entirely enclosed by C. Since Cs is enclosed by C,
f (z) is analytic within and on the circle Cs : |s| = Rs . The s-plane is formed by
3.10 Power Series Expansions of Functions 151
xs and ys axes parallel to x and y axes of the z-plane. Since f (z) is analytic within
and on the circle Cs , we can write the Maclaurin series in terms of s
∞
f (n) (0) n
f (s) = s .
n!
n=0
Substituting s = z − z0 , we get
∞
f (n) (0)
f (z − z0 ) = (z − z0 )n .
n!
n=0
Now that we have established the Taylor and Maclaurin series, let us find the
Taylor series expansion of some popular functions. These functions are somehow
derived from ecz , where c is a complex constant. As ecz is entire, the complex
functions derived therefrom are also entire and therefore have Taylor and Maclaurin
expansions for all z.
f (z) = ecz :
f (n) (z) = cn ecz , so f (n) (0) = cn for Maclaurin series. Then we have
∞
c n zn
ecz = .
n!
n=0
f (z) = e−z :
Setting c = −1 in ecz we have f (n) (z) = (−1)n e−z and f (n) (0) = 1. The
Maclaurin series becomes
∞
(−1)n zn
e−z = .
n!
n=0
Combining these results for c = ±j , we find the Maclaurin series for cos z:
ej z + e−j z
cos z =
2
∞ ∞
∞
1 j n zn (−j )n zn 1 j n zn
= + = 1 + (−1)n
2 n! n! 2 n!
n=0 n=0 n=0
∞ ∞
j n zn (−1)n z2n
= =
n! (2n)!
n=0,2,4,... n=0
z2 z4 z6 z8
= 1− + − + − ··· (3.37)
2! 4! 6! 8!
3.10 Power Series Expansions of Functions 153
This result is compatible with those obtained using the derivatives in Sect. 2.6.1 on
page 55. The following derivatives are from that section:
⎧
⎪
⎪ cos z n = 4k
⎪
⎪
d n ⎨ − sin z n = 4k + 1
(cos z) = k = 0, 1, 2, . . .
dz n ⎪− cos z
⎪ n = 4k + 2
⎪
⎪
⎩
sin z n = 4k + 3
Using these derivatives, we can write the Maclaurin series expansion of cos z as
follows:
∞
1 dn
cos z = · cos z zn
n! dzn z=0
n=0
sin 0 cos 0 2 sin 0 3 cos 0 4 sin 0 5
= 1− z− z + z + z − z − ···
1! 2! 3! 4! 5!
z2 z4 z6 z8
= 1− + − + − ··· (3.38)
2! 4! 6! 8!
The corresponding Taylor series for cos z becomes
∞
1 dn
cos z = · cos z (z − z0 )n
n! dzn z=z0
n=0
sin z0 cos z0 sin z0
= cos z0 − (z − z0 ) − (z − z0 )2 + (z − z0 )3
1! 2! 3!
cos z0 sin z0
+ (z − z0 )4 − (z − z0 )5 − · · ·
4! 5!
cos z0 (z − z0 )2 sin z0 (z − z0 )3
= cos z0 − sin z0 (z − z0 ) − +
2 6
cos z0 (z − z0 )4 sin z0 (z − z0 )5
+ − − ···
24 120
ej z − e−j z
By either using sin z = or the derivatives of sin z as given in
2j
Sect. 2.6.1, we can find the Maclaurin series for sin z as
z3 z5 z7
sin z = z − + − + ···
3! 5! 7!
154 3 Complex Integration
Using Eq. (2.9) on page 50, the derivative of the logarithmic function becomes
= r −1 e−j θ
= z−1 .
1 (1) 1 1
f (z) = f (1) + f (1) (z − 1) − f (2) (1) (z − 1)2 + f (3) (1) (z − 1)3
1! 2! 3!
1 (n)
+ ··· + f (1) (z − 1)n + · · ·
n!
z − z0 1! z − z0 2 2! z − z0 3 3! z − z0 4
Ln z = Ln z0 + − + −
z0 2! z0 3! z0 4! z0
3.10 Power Series Expansions of Functions 155
(n − 1)! z − z0 n
+ · · · + (−1) n−1
+ ···
n! z0
z−1 1 z−1 2 1 z−1 3 1 z−1 4
= Ln 1 + − + − ···
1 2 1 3 1 4 1
(−1)n−1 z − 1 n
+ + ···
n 1
1 1 1
= 0+z−1− (z − 1)2 + (z − 1)3 − (z − 1)4 + · · ·
2 3 4
∞
(−1)n−1 (z − 1)n
= .
n
n=1
To appreciate the use of Taylor series expansion and test its validity, consider
evaluating Ln (1 + j ) by making use of our knowledge that Ln (1) = 0. Here z =
1 + j , z0 = 1, and z − z0 = j . By Eq. (2.20) on page 56, we have
√ √
Ln (1 + j ) = Ln 2ej π/4 = ln 2 + j π/4
= 0.34657359 + j 0.78539816.
Without proof, we know that the two alternating series are convergent, because they
are the real and imaginary parts of the Taylor series. If the Taylor series converges
in a domain, then by necessity its real and imaginary parts converge. Since we have
excluded z = 0, where the complex logarithm is not analytic, the Taylor series
converges and so do its real and imaginary parts. When we truncate the series at
n = 1000, we obtain Ln (1 + j ) = 0.346324 + j 0.785148, which is accurate to
three decimal places.
156 3 Complex Integration
A function expressed in a power series in Eq. (3.30) has terms zn which are entire.
df (z)
Let g (z) = , and assume f (z) has a Maclaurin (Taylor) series expansion in
dz
a domain D. Thus (3.33) or (3.32) can be termwise differentiated (or integrated) to
obtain the Maclaurin (or Taylor) series of g (z). The rules of real differentiation and
integration apply.
∞
g (z) = f (z) = nan (z − z0 )n−1
n=1
ˆ
h (z) = f (z) dz
∞
an
= (z − z0 )n+1
n+1
n=0
∞
an−1
= (z − z0 )n .
n
n=1
Example 3.12 Given the Maclaurin series for sin z, find the Maclaurin series
expansion for cos z.
1 1 1
sin z = z − z3 + z5 − z7 + · · ·
3! 5! 7!
d
cos z = (sin z)
dz
3 5 7
= 1 − z2 + z4 − z6 + · · ·
3! 5! 7!
1 2 1 4 1
= 1 − z + z − z6 + · · · ,
2! 4! 6!
which agrees with (3.38).
With the principal branch selected, f (z) = log z = ln r + j (−π < < π )
has a non-isolated singularity at the branch point z = 0. Any circle 0 < |z| < ε
includes the branch = π on which f (z) is not defined and thus not analytic.
Since we cannot find any such circle in which z = 0 is the only singularity, z = 0 is
not isolated.
f (z) = 1 has isolated singularities at z = z = 1 , (n = 0, ±1, ±2, . . .)
n
1 nπ
sin
z
since
1 1
sin = 0 ⇒ = nπ, (n = 0, ±1, ±2, . . .) .
z z
1
The distance between adjacent singularities zn and zn+1 is dn = . Since
π n (n + 1)
zn is the only singularity within the circle |z − zn | < dn , z = zn is an isolated
singularity. As n becomes large, zn gets close to z = 0. Let ε be a small positive
number and consider the circle |z| < ε. However small ε may be, there are infinitely
1
many zn within the circle |z| < ε. If n > then zn lies within the circle since
επ
1
< ε.
nπ
Hence the singularity of f at z = 0 is not isolated.
Theorem 8 Assume that f (z) has an isolated singularity at z = z0 but is analytic
in the region R1 < |z − z0 | < R2 . Then f (z) can be expanded into a Laurent series
in this region as
a−m a−m+1 a−1
f (z) = · · · + + + ··· +
(z − z0 )m (z − z0 ) m−1 z − z0
+ a0 + a1 (z − z0 ) + · · · + an (z − z0 )n + · · ·
∞ ∞
a−m
= + an (z − z0 )n (R1 < |z − z0 | < R2 ) , (3.39)
(z − z0 )m
m=1 n=0
where
ˆ
1 f (z) dz
a−m = (m = 0, 1, 2, . . .)
2πj C (z − z0 )−m+1
ˆ
1 f (z) dz
an = (n = 0, 1, 2, . . .) .
2πj C (z − z0 )n+1
We shall not go into the proof of Laurent series theorem. For a proof, see (2).
3.11 Laurent Series 159
Note that the Cauchy integral theorem is used to find the coefficients an and a−m .
The two infinite series in (3.39) can also be merged into a single infinite series
∞
f (z) = an (z − z0 )n , (3.40)
n=−∞
where
ˆ
1 f (z) dz
an = (n = 0, ±1, ±2, . . .) . (3.41)
2πj C (z − z0 )n+1
z−1 z−3
We see that the analytic part of f is z, and the principal part is − + −
3! 5!
z−5
+ · · ·.
7!
1
Example 3.14 Find the Laurent series expansion for the function f (z) =
z (z + 1)
which has an isolated singularity at z = −1.
1
f (z) = z−1 · = z−1 1 − z + z2 − z3 + · · ·
1 − (−z)
= z−1 − 1 + z − z2 + z3 + · · · .
160 3 Complex Integration
Hence the analytic and principal parts are −1+z−z2 +z3 +. . . and z−1 , respectively.
Poles
It is possible to identify various types of singularities for a function from its Laurent
series (3.40).
g (z)
1. Let n be a positive integer. Assume that f (z) = , and g (z) is analytic
(z − a)n
everywhere in a region including z = a and g (a) = 0. The isolated singularity
of f (z) at z = a is called a pole of order n. In other words, if the principal part
of the Laurent series has a finite number of terms a−1 , . . . , a−n of which a−n is
different from zero, while a−n−1 , a−n−2 , . . . are all zero, then z = a is a pole of
order n. If n = 1, the pole is called a simple pole, and if n = 2, the pole is called
a dual pole.
3z − 1 3z − 1
f (z) = = has two simple poles
z + 4 (z − 3)
2 3
(z + 2i) (z − 2i) (z − 3)3
at z = −2i and z = 2i and a pole of order three at z = 3.
2. If the principal part has infinitely many terms, then z = z0 is called an essential
singularity or sometimes a pole of infinite order.
1 1
The function e1/z = 1 + + + · · · has an essential singularity at z = 0.
z 2!z2
The pole z = 0 is a pole of infinite order of e1/z .
p (z)
3. A removable singularity is encountered in functions of the form f (z) =
q (z)
such that p (z0 ) = (z − z0 ) p1 (z) and q (z0 ) = (z − z0 ) q1 (z). The factors
(z − z0 ) in the numerator and denominator cancel out and the singularity at
p1 (z)
z = z0 is removed and we are left with f (z) = .
q1 (z)
sin z
The function has a removable singularity at z = 0 since
z
is entire.
If f (z) has a pole of order n at z = z0 but is analytic at every other point inside and
on a circle C with center at z0 , then (z − z0 )n f (z) is analytic at all points inside
and on C and has a Taylor series about z = z0 . Multiplying f (z) by (z − z0 )n , we
get
a−n a−n+1 a−1
(z − z0 ) f (z) = (z − z0 )
n n
n + + ··· +
(z − z 0) (z − z0 ) n−1 z − z0
+a0 + a1 (z − z0 ) + · · · + an (z − z0 )n + · · ·
= a−n + a−n+1 (z − z0 ) + · · · + an (z − z0 )n + · · ·
3.12 Residues 161
∞
= am−n (z − z0 )m .
m=0
3.12 Residues
Thus
ˆ
f (z) dz = 2πj a−1 .
C
The coefficient a−1 is called the residue of f (z) at the pole z = z0 and is of
considerable importance in science and engineering. The residue of f at z = z0
is denoted by Res f (z).
z=z0
If z0 is an essential singularity of f , then f has to be expanded into a Laurent
series and a−1 must be evaluated.
Example 3.15
1 4 1 1 1 1 1 1 1
4
z sin =z − + − · · · = z3 − z + − ··· .
z z 3!z3 5!z5 7!z7 3! 5!z 7!z3
1 1
We see that the residue is a−1 = = .
5! 120
The simple and important result about a single residue can be readily extended
to contour integrals to cover functions with multiple singularities within the
f (z)
contour. Assume that we have a function with simple poles
(z − z1 ) · · · (z − zn )
z1 , z2 , . . . , zn as shown in Fig. 3.22. Around each singularity, we draw circles
|z − zn | = εn , with radii εn small enough that the circles do not intersect each other.
Then we define a contour on each such circle in the counterclockwise direction. By
Eq. (3.22) in Sect. 3.6.3, we have
ˆ n ˆ
f (z) f (z)
dz = dz.
C (z − z1 ) · · · (z − zn ) Ci (z − z1 ) · · · (z − zn )
i=1
Then since a contour Ci excludes all the poles except zi , each integral on the right-
hand side is given by Cauchy’s integral formula
ˆ
f (z)
dz = 2πjgi (zi ) ,
Ci (z − z1 ) · · · (z − zn )
where
f (z)
gi (zi ) = (z − zi ) · .
(z − z1 ) · · · (z − zn ) z=zi
Exploiting this result and using the fact that a function with isolated singularities
at z = zi can be expanded into a Laurent series on and within Ci , we have the
following important theorem:
Theorem 9 If f (z) is analytic within and on a simple contour C in a region
R except at a finite number of poles zi within R, having residues Res f (z),
z=zi
respectively, then
ˆ n
f (z) dz = 2πj Res f (z) , (3.42)
C z=zi
i=1
ˆ
From f (z) dz = 2πj Resf (z), the required result follows.
Ci z=zi
As a corollary to this result, we see that the integral of a function which is not
analytic in a region and enclosed by a closed contour can be zero as the sum of its
residues may be zero.
As will be shown shortly, the residue of a function at a pole of order n can be
derived by differentiating as follows:
1 d n−1
Res f (z) = lim (z − a)n f (z) .
z=z0 (n − 1)! z→z0 dzn−1
164 3 Complex Integration
Example 3.16 This example further illustrates that the analyticity is a sufficient
condition for the Cauchy integral to yield zero: the closed contour integral of a
nonanalytic function in a region can be zero.
1
Let f (z) = . Find the integral
z + 1 (z − 2)2
2
ˆ
f (z) dz (C : |z| = 3) .
C
The integrand has two simple poles at z = ∓j and a double pole at z = 2. We have
to find the residues at these poles.
Residue at z = +j :
z−j 1 j
Res f (z) = [(z − j ) · f (z)]z=j = =− · .
z=j (z + j ) (z − j ) (z − 2) 2
z=j 2 3 − 4j
Residue at z = −j :
z+j 1 j
Res f (z) = [(z + j ) · f (z)]z=−j = = · .
z=−j (z + j ) (z − j ) (z − 2) 2
z=−j 2 3 + 4j
Residue at z = 2:
& '
d 1 d 1
Res f (z) = (z − 2)
2
=
z=2 dz z2 + 1 (z − 2)2 z=2 dz z2 + 1 z=2
& '
−2z 4
= 2 =− .
z2 + 1 25
z=2
Thus
ˆ
1 j 1 j 4
f (z) dz = 2πj − · + · −
C 2 3 − 4j 2 3 + 4j 25
j −3 − 4j + 3 − 4j 4
= 2πj · −
2 9 + 16 25
j −8j 4 4 4
= 2πj · − = 2πj − = 0.
2 9 + 16 25 25 25
3.12 Residues 165
f (z)
Example 3.17 Let w (z) = . Suppose f (z) is analytic everywhere
(z − a) (z − b)
in the z-plane. Evaluate the following integral taken in the counterclockwise
direction along a contour which encloses a and b:
ˆ
w (z) dz.
C
f (z)
Residue of at z = a:
(z − a) (z − b)
f (z) f (a)
Res w (z) = (z − a) · = .
z=a (z − a) (z − b) z=a a−b
f (z)
Residue of at z = b:
(z − a) (z − b)
f (z) f (b)
Res w (z) = (z − b) · = .
z=b (z − a) (z − b) z=b b−a
Thus
ˆ
f (z) f (a) − f (b)
dz = 2πj · .
C (z − a) (z − b) a−b
f (n) (z f (n) (z
0) 0)
|f (z)| (z − z0 )n = |z − z0 |n .
n! n!
Since f (n) (z0 ) is analytic, it is bounded by some positive number M, that is,
f (n) (z0 )
M. Hence
n!
|f (z)| M |z − z0 |n .
166 3 Complex Integration
On the other hand, −C and C enclose the same singularities, and thus we have
ˆ ˆ
f (z) dz = f (z) dz
−C C
ˆ ˆ
f (z) dz = − f (z) dz.
C C
Proof The trick in finding the residue at infinity is to use an equivalent function
which transfers the pole at infinity to a pole at zero. This equivalent function is
3.12 Residues 167
1 1
f . f (z) possesses isolated singularities inside a circle |z| = R. C is a
z2 z
closed contour in counterclockwise direction in the region |z| < R. Since all the
singularities lie within C, f is analytic in |z| > R. Also assume that C is traversed
in clockwise direction in (R < |z| < ∞). We proceed writing the Laurent series for
the original function f (z).
∞
f (z) = ck zk .
k=−∞
If k = n, we have
ˆ
1 f (z) dz
cn = (R < |z| < ∞)
2πj C zn+1
and
ˆ
f (z) dz = 2πj c−1 = (R < |z| < ∞) . (3.43)
C
1 1 1
Now consider the Laurent series for 2 f where we substituted for z. This
z z z
change calls for a change of analytic region from (R < |z| < ∞) to (0 < |z| < R).
∞ ∞ ∞
1 1 1 cn cn cn−2
f = 2 = =
z2 z z n=−∞
z n
n=−∞
zn+2 n=−∞
zn
0 ∞
cn−2 c−1 cn−2
= n
+ + .
n=−∞
z z zn
n=2
168 3 Complex Integration
1 1
Thus it turns out that c−1 is the residue of 2 f at z = 0
z z
1 1
c−1 = Res 2 f . (3.44)
z=0 z z
The integrand has two simple poles at z = ±j and a double pole at z = 2 inside
C. The sum of the residues at these poles is equal to the negative of the residue at
infinity. Thus we have
ˆ
f (z) dz = −2πj Res [f (z)] (C : |z| = 3)
C z=∞
" #
1 1 1 1
= −2πj −Res 2 f = 2πj Res 2 f
z=0 z z z=0 z z
& '
1 1
= 2πj Res 2 · 2
z=0 z z + 1 z−1 − 2
−2
& '
1 1
= 2πj Res 2 · −2
z=0 z z + 1 z−2 − 2z−1 + 4
& '
1 z4
= 2πj Res 2 · 2
z=0 z z + 1 1 − 2z + 4z2
1 z4
= 2πj Res 2 · 4 .
z=0 z 4z − 2z3 + 5z2 − 2z + 1
3.12 Residues 169
z4 1 1
= + − ··· .
1 − 2z + 4z2 + z2 − 2z3 + 4z4 4 4z
Hence
ˆ
1 1 1 −1
f (z) dz = 2πj Res · + z − · · ·
C z=0 z2 4 4
1 1
= 2πj Res + − · · · =0
z=0 4z2 4z3
because the coefficient of 1/z term is zero. This result is in agreement with
Example 3.16.
The direct way to find the residue of a function at z0 is to derive the coefficient of
1
term in the Laurent series. Directly obtaining the Laurent series however
z − z0
may be obscure, difficult, or tedious. In the following, we recapitulate the methods
to obtain the residue.
1. Obtaining Laurent series using Taylor (Maclaurin) expansion
If f (z) has a pole of order n at z0 , the coefficients in (3.39) can be obtained
by writing the coefficients of the Taylor series corresponding to (z − z0 )n f (z).
Multiplying f (z) through (z − z0 )n , we obtain
d n−1
(z − z0 )n f (z) = (n − 1)!a−1 + n! (z − z0 ) a0
dzn−1
(n + 1)! (n + 2)!
+ (z − z0 )2 a2 + (z − z0 )3 a3 + · · · .
2! 3!
d n−1
lim n−1
(z − z0 )n f (z) = (n − 1)!a−1
z→z0 dz
1 d n−1
a−1 = lim (z − z0 )n f (z) = Res f (z) . (3.46)
(n − 1)! z→z0 dz n−1 z=z0
170 3 Complex Integration
p (z)
There is another way to find the residue at a simple pole. If f (z) = has a
q (z)
simple pole at z = z0 , then
p (z0 )
Res f (z) = . (3.48)
z=z0 q (z0 )
z+5
,
(z − 1)3 (z + 1)2 (z − 2)
In this expansion, a−1 , b−1 , and c−1 are the residues. With simple algebra,
8 25 7
we find a−1 = − , b−1 = , and c−1 = . Math tools like Mathematica and
9 72 9
Maxima readily perform this expansion.
3. Long division
The residue at z = 0 of rational functions like
3z5 − 2z3 + z2 + 1
f (z) =
z3 − 2z2 + z − 1
3z5 − 2z3 + z2 + 1 16 29 52
= 3z2 + 6z + 9 + + 2 + 3 + ···
z3 − 2z2 + z − 1 z z z
Res f (z) = 16.
z=z0
3.13 Residue Integration of Real Integrals 171
4. Zero at infinity
If f has many isolated singularities, then the sum of their residues can be
evaluated using
n
1 1
Resf (z) = Res 2 f .
z=zi z=0 z z
i=1
1 1
Resf (z) = lim (z − j ) · = .
z=j z→j (z − j ) (z + j ) 2j
Thus
ˆ
dz 1
= 2πj · = π.
C z2 +1 2j
Now that we have found the integral around C, we can proceed to find the
required definite integral. Expanding the integral into the sum of two complex
integrals, we have
ˆ ˆ ˆ
dz dz dz
= + .
C z2 + 1 C1 z2 + 1 C2 z2 + 1
The limit on the right-hand side of the equation tends to zero as R tends to infinity
because its magnitude tends to zero since
ˆ π ˆ π ˆ π
j Rej θ dθ j Rej θ dθ Rdθ π
< =
0 R 2 ej 2θ + 1 0 R 2 ej 2θ + 1 0 R 2 ej 2θ + 1 R
ˆ π j Rej θ dθ π
lim lim = 0.
R→∞ 0 R e +1
2 j 2θ R→∞ R
Hence
ˆ ∞ dx
= π.
−∞ x2 +1
In this example, we will need the Jordan inequality (Eq. 3.50) between an angle
and its sine to find the contour integral. Therefore first refer to the following box
explaining the Jordan inequality.
Choosing a suitable function and a contour is not an easy matter. However, since
ej z produces ej x for real x and sin x can be obtained from complex exponentials, we
ej z
can intuitively settle down for f (z) = and include the real axis in the contour
z
of integration. Let us select the contour depicted in Fig. 3.24. Also, for the complex
integral to exist, f (z) must be analytic on the contour. Because f (z) includes a
simple pole at z = 0, the contour must avoid this point. Our contour C comprises a
large semicircular arc of radius R, two linear segments that extend from −R to −r
and +r to +R, and a smaller semicircular arc of radius r. In the figure, C1 and C2
denote the large and the small semicircles, respectively. On C1 , z = Rej θ and dz =
j Rej θ dθ (0 θ π ), and on C2 , z = rej θ and dz = j rej θ dθ (π θ 2π ).
With a change of variable, the integrals on the linear segments of the contour can be
combined together. For the integral from −R to −r, we set x = −u to have
ˆ −r ˆ ˆ ˆ
ej x r e−j u r e−j u R e−j x
dx = (−du) = du = − dx.
−R x R −u R u r x
Thus
ˆ −r ˆ ˆ ˆ ˆ
ej x R ej x R ej x R e−j x R ej x − e−j x
dx + dx = dx − dx = dx
−R x r x r x r x r x
ˆ R sin x
= 2j dx.
r x
and
ˆ R ˆ π ˆ 2π
sin x jθ jθ
2 dx = 2π − ej Re dθ − ej re dθ
r x 0 π
ˆ π ˆ 2π
ej R cos θ e−R sin θ dθ −
jθ
= 2π − ej re dθ.
0 π
Taking limits on both sides of the equality as r → 0 and R → ∞ and since sin x/x
has even symmetry we have
ˆ R ˆ ∞ ˆ ∞
sin x sin x sin x
lim 2 dx =2 dx = dx
r→0 r x 0 x −∞ x
R→∞
ˆ ∞ ˆ π ˆ 2π
sin x j R cos θ −R sin θ jθ
dx = 2π − lim e e dθ − lim ej re dθ.
−∞ x R→∞ 0 r→0 π
where we have used the fact that the sine function is symmetric about θ = π/2.
Invoking Jordan’s inequality, we have
ˆ ˆ π/2
π/2
−R sin θ e−2Rθ/π
π/2
e dθ e−2Rθ/π dθ =
0 0 −2R/π 0
π 2R π
=− exp − · −1
2R π 2
ˆ π/2
π
e−R sin θ dθ 1 − e−R
0 2R
ˆ π
π
e−R sin θ dθ 1 − e−R
0 R
176 3 Complex Integration
or
ˆ π π
ej R cos θ e−R sin θ dθ 1 − e−R .
0 R
Jordan’s Inequality
(a) BC is an arc of radius 1t with center O. ABC is a right triangle whose
hypotenuse is the diameter. (b) y = 2x/π is a line drawn from the origin to
(π/2, 1)
In Fig. (a), the BC segment is equal to BC arc if x = 0 and smaller than
BC if x > 0. Hence
x
2 sin x
2
x x
sin .
2 2
We can substitute x for x/2 and obtain sin x x.
2
In Fig. (b), the line is expressed by y = x. Since the line is always “under”
π
the sine curve, we have y sin x for 0 x π/2. Thus
2
x sin x.
π
Combining the two inequalities, we arrive at Jordan’s inequality
2
x sin x x (0 x π/2) . (3.50)
π
Hence the integral around the C1 arc vanishes. As for the second limit, we have
ˆ 2π jθ
lim ej re dθ = 2π − π = π.
r→0 π
Finally,
ˆ ˆ π ˆ 2π
ej z jθ jθ
lim dz = j lim ej Re dθ + j lim ej re dθ
r→0 C z R→∞ 0 r→0 π
R→∞
ˆ ∞ ˆ ∞
sin x sin x
+ 2j dx = 2πj = πj + 2j dx
0 x 0 x
ˆ ∞ sin x
= 2πj 2 dx = π.
0 x
sin x
Since is an even function,
x
ˆ ∞ ˆ ∞
sin x sin x
dx = 2 dx = π.
−∞ x 0 x
ˆ 2π
A second type of integral we will consider is of the form f (sin x, cos x) dx,
0
where f is a rational function of sin x and cos x. In the process, we replace the sine
ej x − e−j x ej x + e−j x
and cosine functions using sin x = and cos x = and set
2j 2
z = ej x . Then dx becomes dx = −j dz/z. This transforms f (sin x, cos x) into
f (z), a rational function of z, and the real integral into a contour integral around
ˆ ˆ 2π
|z| = 1, that is, we evaluate f (z) dz instead of f (sin x, cos x) dx. The
C 0
residues of f inside the unit circle are used to evaluate the integral (Fig. 3.25).
z − z−1 z + z−1
Let z = ej x . Then sin x = , cos x = and dz = j ej x dx =
2j 2ˆ
j zdx, dx = dz/j z. The given integral is equivalent to F (z) dz, where C is the
C
unit circle with the center at the origin.
ˆ 2π ˆ
1 1 dz
dx = −1
0 3 + 2 cos x C z + z jz
3+2
2
ˆ ˆ
1 1 dz dz
= = −j
j C 3 + z + z−1 z C z 2 + 3z + 1
ˆ
dz
= −j ,
C (z − p1 ) (z − p2 )
√ √
5+3 5−3
where p1 = − = 2.618 and p2 = = −0.382 are two simple poles.
2 2
p2 is inside the contour of integration. Therefore, the integral is given by
ˆ 2π
dx
= −j 2πj · Res f (z)
0 3 + 2 cos x z=p2
= 2π · Res f (z) .
z=p2
Thus we obtain
√
5−3 1 1 1
Res f (z) = lim
√ z− = lim √ =√
z=p2
z→ 5−3 2 z2 + 3z + 1 z→ √5−3 5+3 5
2 2 z+
2
ˆ 2π sin 2x 1 2π
dx = 2π √ = √ .
0 3 + 2 cos x 5 5
3.14 Fourier Integrals 179
which are improper integrals involving real x and real ω. These integrals are
of utmost importance in signal processing and other related fields. Using these
integrals, we can evaluate the improper integrals
ˆ ∞
f (x) cos ωxdx (3.53)
−∞
and
ˆ ∞
f (x) sin ωxdx. (3.54)
−∞
Although we are going to take up the relevant topics there, we intend to explore
these integrals in the context of residue integration. The two integrals above can be
combined to a single generic integral:
ˆ ∞ ˆ ∞ ˆ ∞
f (x) cos ωxdx + j f (x) sin ωxdx = f (x) ej ωx dx.
−∞ −∞ −∞
ˆ ∞ ˆ
To evaluate f (x) ej ωx dx, we use a more general integral f (z) ej ωz dz
−∞ C
around the contour shown in Fig. 3.26. The contour C consists of two paths, one
that extends from −R to +R on the real axis and a semicircular part of radius R
above the real axis centered at the origin. The integral around C is the sum of the
integrals on the two paths. The value of this integral is given by
ˆ ˆ R ˆ
f (z) ej ωz dz = f (x) ej ωx dx + f (z) ej ωz dz = 2πj Res f (z) ej ωz .
C −R z=pi
i
Therefore the required integral is the difference between integrals along C and
ˆ ∞ ˆ
f (x) ej ωx dx = 2πj Res f (z) ej ωz − lim f (z) ej ωz dz.
−∞ z=pi R→∞
i
where pi are singularities of f (z) ej ωz which lie in the upper half of the complex
plane. Let the choice of this specific contour C be obscure, and we focus our
attention on ej ωz in the z-plane. Expanding ej ωz , we find
ej ωz = e−y ,
which means that ej ωz grows without bounds in the lower half of the complex
plane. Integrating along a semicircle of an infinite radius for y < 0 thus would
not converge. However on the path shown in Fig. 3.26, ej ωz tends to zero as y
grows indefinitely and the integral converges.
3.14 Fourier Integrals 181
π
Since sin θ is symmetric about θ =
, we can write
2
ˆ ˆ π/2 ˆ π
−k+1 −R sin θ −R sin θ
f (z) e dz MR
j ωz
e dθ + e dθ
0 π/2
ˆ π/2
−k+1
= 2MR e−R sin θ dθ.
0
Thus
ˆ ∞
f (x) ej ωx dx = 2πj Res f (z) ej ωz
−∞ z=pi
i
In Chap. 6, we shall call the integral (3.51) the Fourier transform of the real function
f (x) and (3.52) the inverse Fourier transform of F (ω). If we already know the
182 3 Complex Integration
Fourier transform of a function, then we can readily evaluate the integrals (3.53)
and (3.54). Eq. (3.52) yields
ˆ ∞ ˆ ∞ n
f (x) = F (ω) cos ωxdω + j F (ω) sin ωxdω = 2πj Res F (ω) ej ωz
−∞ −∞ z=pi
i=1
ˆ & '
∞ n
f (x) cos ωxdx = Re 2πj Res f (z) e j ωz
= Re [F (ω)]
−∞ z=pi
i=1
ˆ & '
∞ n
f (x) sin ωxdx = Im 2πj Res f (z) e j ωz
= Im [F (ω)] .
−∞ z=pi
i=1
We conclude that the inverse Fourier transform of a function is merely the sum
of the residues evaluated at the poles of F (ω) ej ωx .3
Example 3.22 Evaluate the integrals
ˆ ∞ cos ωx
dx,
−∞ x2 + 2x + 5
ˆ ∞ sin ωx
dx.
−∞ x 2 + 2x + 5
We consider evaluating
ˆ
ej ωz
dz,
C z2 + 2z + 5
3 To be accurate, the inverse Fourier transform is actually the sum of the residues divided by 2π .
The residue at z1 :
Hence
ˆ
e−2ω (cos ω − j sin ω)
F (z) ej ωz dz = 2πj ·
C j4
1 −2ω
= πe (cos ω − j sin ω)
2
and
ˆ R ˆ
ej ωx ej ωz 1 −2ω
dx + dz = πe (cos ω − j sin ω) .
−R x 2 + 2x + 5 (z + 1) + 42 2
1 −2ω
= πe (cos ω − j sin ω) .
2
Now we have to show that the integral along the path vanishes as R tends to
infinity, that is,
ˆ
ej ωz
lim dz = 0.
R→∞ (z + 1)2 + 4
ˆ π exp j ωR exp (j θ ) ej θ dθ
= jR
0 R 2 exp (j 2θ ) + 2R exp (j θ ) + 5
ˆ π exp [j ωR cos θ − ωR sin θ ] ej θ dθ
= jR
0 R 2 exp (j 2θ ) + 2R exp (j θ ) + 5
ˆ π exp (j ωR cos θ ) exp (−ωR sin θ ) ej θ dθ
= jR .
0 R 2 exp (j 2θ ) + 2R exp (j θ ) + 5
We can decompose the integral on the left side into its real and imaginary parts
ˆ ∞ ˆ ∞
cos ωx sin ωx 1 1
dx + j dx = π e−2ω cos ω − j π e−2ω sin ω.
−∞ x + 2x + 5
2
−∞ x2 + 2x + 5 2 2
Thus we find
ˆ ∞ cos ωx 1
dx = π e−2ω cos ω,
−∞ x 2 + 2x + 5 2
ˆ ∞
sin ωx 1
dx = − π e−2ω sin ω.
−∞ x2 + 2x + 5 2
Further Reading
Problems
1. State whether the following curves are (a) smooth and (b) simple:
(a) Edges of a triangle
(b) z (t) = cos t + j sin t
(c) z (t) = cos t + j sin 2t
(d) x (t) = 2 cos t, y (t) = sin t
2. Using the Maclaurin series, find the power series expansion about z = 0:
(a) f (z) = ez
(b) f (z) = sin z
(c) f (z) = cos z
186 3 Complex Integration
3. Show that
∞
(z − z0 )n
ez = ez0
n!
n=0
ej z + e−j z ej z − e−j z
4. Using cos z = and sin z = , find the Maclaurin series
2 2j
expansion for cos z and sin z.
5. Find the Taylor series expansion for sin z.
6. Using the Maclaurin series, show that
d z
(a) (e ) = ez
dz
d
(b) (sin z) = cos z
dz
d
(c) (cos z) = − sin z
dz
7. Expand f (z) = Ln z around z0 = −1, z0 = −j , and z0 = j .
8. Use the expression sin z = sin x cosh y + j cos x sinh y and the Maclaurin
series to five terms to find sin (0.05 + j 0.05).
9. Using the expression ez = ex (cos y + j sin y) and the Maclaurin series to five
terms to find exp (0.05 + j 0.05).
10. Given two functions w1 = x 2 − y 2 + j 2xy and w2 = x 2 + y 2 − j 2xy and the
contours C1 , C2 , and C3 below,
Problem 10
Problem 11
1 2
12. The function f (z) = ez sin has an isolated singularity at z = 0 and
z
is analytic elsewhere. Thus it can be expressed as a Laurent series at every
point z = 0. Using the Maclaurin series expansion for the exponential and sine
functions, we can write
∞ ∞ ∞ ∞
2 1 z2m (−1)n (−1)n
ez sin = = z2(m−n)−1 .
z m! (2n + 1)!z2n+1 m! (2n + 1)!
m=0 n=0 m=0 n=0
Problem 14
z5
15. Find the residue of f (z) = .
(z − 2j )4
f (z)
16. Let w (z) = . If C encloses z = a, show that C w (z) dz = 2πf (a).
(z − a) 2
(Hint: See Example 3.16.)
188 3 Complex Integration
p (z)
17. If f (z) = has a simple pole at z = z0 , show that
q (z)
p (z0 )
Res f (z) = .
z=z0 q (z0 )
Hint: Call r (z) = q (z) and expand q (z) and r (z) into a Taylor series about
z = z0 .
∞
r (n) (z0 )
r (z0 ) = (z − z0 )n
n!
n=0
∞
q (n) (z0 )
q (z0 ) = (z − z0 )n .
n!
n=1
Then from the second series, obtain q (z0 ) and compare with r (z0 ).
18. Show that if m 2,
ˆ
an zn + an−1 zn−1 + . . . + a1 z + a0
dz = 0,
C (z − z0 )m bn zn + bn−1 zn−1 + . . . + b1 z + b0
ˆ ∞
F (ω) cos ωtdω = ri
−∞ i
ˆ ∞
F (ω) sin ωtdω = 0.
−∞
21. Computer assignment. Modify the LabVIEW vi used for numerical evaluation
of the contour integral to compute
z5
(a) f (z) = ; C: |z| = 1 and |z| = 3
(z − 2j )4
sin z
(b) f (z) = 2 ; C: |z| = 0.5, |z| = 2, |z − j | = 1 and |z + j | = 1
z +1
(c) f (z) = exp (1/z); C: |z| = 1
Part II
Transforms
Chapter 4
The Laplace Transform
1 “Pierre-Simon, marquis de Laplace (23 March 1749–5 March 1827) was an influential French
scholar whose work was important to the development of mathematics, statistics, physics, and
astronomy. He summarized and extended the work of his predecessors in his five-volume
Mécanique Céleste (Celestial Mechanics). Laplace formulated Laplace’s equation and pioneered
the Laplace transform which appears in many branches of mathematical physics, a field that he
took a leading role in forming. Sometimes referred to as the French Newton or Newton of France,
Laplace has been described as possessing a phenomenal natural mathematical faculty superior to
that of any of his contemporaries.”—Abridged from Wikipedia.
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2022 191
O. Özhan, Basic Transforms for Electrical Engineering,
https://doi.org/10.1007/978-3-030-98846-3_4
192 4 The Laplace Transform
Many engineering systems can be modeled as linear systems and can be mathemat-
ically described by constant-coefficient linear differential equations. Such a system,
an RC circuit, is shown in Fig. 4.1, and its differential equation can be derived from
Kirchhoff’s Voltage Law:
dv (t)
10 sin 2t = v (t) + RC .
dt
2 Some authors prefer to use p instead of s. In this book, we will consistently use s.
4.1 Motivation to Use Laplace Transform 193
Fig. 4.1 RC circuit is a first-order linear system which can be modeled by a linear differential
equation. Constant-coefficient linear differential equations can be solved using Laplace transform
techniques
The capacitor voltage is initially 10 Volts. Since RC = 105 ∗ 10−5 = 1 s, the circuit
can be modeled by the differential equation:
dv (t)
+ v (t) = 10 sin 2t. (4.1)
dt
v (t) is the sum of homogeneous and particular solutions. The homogenous part is
the natural response and has a decaying exponential form. The particular solution
has the form of the excitation. Therefore we can write
dvp (t)
+ vp (t) = 10 sin 2t
dt
d
[B sin (2t + θ )] + B sin (2t + θ ) = 10 sin 2t
dt
2B cos (2t + θ ) + B sin (2t + θ ) = 10 sin 2t
√ 2B
5B sin 2t + θ + tan−1 = 10 sin 2t
B
√
5B sin 2t + θ + tan−1 (2) = 10 sin 2t.
194 4 The Laplace Transform
A can be found from the total solution evaluated at t = 0−. With v(0−) = 10,
√
A − 2 5 sin tan−1 2 = 10
√ 2
A−2 5· √ = 10
1 + 22
A − 4 = 10
A = 14.
Hence
√
v (t) = 14e−t + 2 5 sin 2t − tan−1 2 Volts
√
= 14e−t + 2 5 sin (2t − 1.10715) Volts.
dv (t)
+ v (t) = 10 sin 2t
dt
d −t √ √
14e + 2 5 sin 2t − tan−1 2 + 14e−t + 2 5 sin 2t − tan−1 2 = 10 sin 2t
dt
√ √
−14e−t + 4 5 cos 2t − tan−1 2 + 14e−t + 2 5 sin 2t − tan−1 2 = 10 sin 2t,
√
2 5 2 cos 2t − tan−1 2 + sin 2t − tan−1 2 = 10 sin 2t,
√ √
2 5 · 5 sin 2t − tan−1 2 + tan−1 2 = 10 sin 2t,
10 sin 2t = 10 sin 2t
4.2 Definition of the Laplace Transform 195
and evaluate it at t = 0:
√
14 + 2 5 sin(−1.10714871779409) = 10 Volts.
Compare this solution with the Laplace transform solution of Sect. 4.5.3 to see
the ease with which we can arrive at the answer. For higher-order differential
equations, finding the homogeneous and particular solutions can be very tedious.
As will be apparent there, there is no need for finding separate homogeneous and
particular solutions; the total solution is found in one step.
where
s = σ + jω (4.3)
is a complex quantity and called complex frequency. This integral exists provided
that the function is absolutely integrable. Absolute integrability is a result of the
requirement
ˆ ∞
f (t) e−st dt < ∞.
0−
If the second integral is less than infinity, f (t) is absolutely integrable and the
magnitude of the Laplace transform is less than infinity; that is,
ˆ ∞ ˆ ∞
−st
f (t) e dt < ∞ if |f (t)| e−σ t dt < ∞. (4.4)
0− 0−
3 The definition given above is called the unilateral Laplace transform. There is also a bilateral
Laplace transform with the lower integral limit set to −∞. The unilateral transform enables us to
use initial conditions to solve linear differential equations.
196 4 The Laplace Transform
A bounded function f (t) has a Laplace transform for σ > 0. Boundedness dictates
that |f (t)| ≤ M for some positive number M > 0. With this, (4.4) becomes
⎧
ˆ ∞ ˆ ∞ ⎨M σ >0
|f (t)| e−σ t dt < M −σ t
e dt = σ
0− 0− ⎩∞ σ ≤ 0.
Thus
ˆ ∞ M
f (t) e−σ t dt ≤ <∞ (σ > 0) .
0− σ
As shown in Fig. 4.2, for this integral to exist, we must have σ > −u = −Re (a).
This is called the region of convergence (ROC) of F (s). F (s) is analytic in the
ROC. In this text, all the functions we deal with satisfy the convergence requirement
in Eq. (4.4) in some ROC.
If the above integral exists, the Laplace transform is invertible, that is, we can
retrieve the original function f (t) from its Laplace transform F (s) using the
This is a contour integral which can be evaluated using the techniques of complex
integration and residue theorem. The contour encompasses all the poles of F (s).
The Laplace transforms of LTI systems are rational functions of s, and as we already
know, rational functions can be expanded into a sum of partial fractions as outlined
in Sect. 4.4. The inverse transforms of these fractions are tabulated in Laplace
transform tables. Thus, using Laplace transform tables and the properties of the
transform, rational functions can be inverted without using contour integration. We
will see in Sect.4.6 how to invert Laplace transforms using the contour integration.
The function and its transform as defined in Eq. (4.2) are usually denoted
symbolically as
L
f (t) ←→ F (s) .
The function f (t) on the left depends on a real variable which usually represents
time. This notation suggests two ways of representing a signal. One way is to
describe it by a function f (t) in the time domain, and the other is to describe it in
the complex frequency domain. Consider the e−st factor in Eq. (4.2). The quantity
s is called the complex frequency. Since st is a dimensionless quantity and t has the
dimension of time (T ), the dimension of s should be T −1 . Thus both σ and ω have
dimensions of frequency.
To illustrate the notion of two domains, consider a signal depicted in Fig. 4.3
and expressed in the time domain ´by f (t) = e−0.5t sin (2t) u (t). The Laplace
∞
transform of this function exists if 0 e−0.5t sin (2t) e−st dt < ∞. From this, we
Fig. 4.3 Graph of the damped sine e−0.5t sin (2t) u (t)
198 4 The Laplace Transform
If σ > −0.5, the last integral evaluates to (σ + 0.5)−1 , otherwise the integral does
not exist. Hence we say that the Laplace transform exists in the ROC: Re (s) >
−0.5.
Referring to Table 4.1, the Laplace transform of this signal in the ROC is
expressed by
2
F (s) = .
(s + 0.5)2 + 4
We say that f (t) is mapped onto F (s) by Laplace transform in the ROC and can
denote this mapping as
L 2
e−0.5t sin (2t) u (t) ←→ .
(s + 0.5)2 + 4
2 (σ + 0.5)2 + 4 − ω2
F (s) = 2
(σ + 0.5)2 + 4 − ω2 + 4(σ + 0.5)2 ω2
4 (σ + 0.5) ω
−j 2
,
(σ + 0.5)2 + 4 − ω2 + 4(σ + 0.5)2 ω2
2
F (s) = ,
2
(σ + 0.5)2 + 4 − ω2 + 4(σ + 0.5)2 ω2
−1 2 (σ + 0.5) ω
arg [F (s)] = − tan .
(σ + 0.5)2 + 4 − ω2
You can appreciate the complexity of these expressions. It is not our intention
to scare you away from the subject with these awful expressions. We give these
results so that you can obtain the s-domain graphs in Fig. 4.4 using your favorite
4.2 Definition of the Laplace Transform 199
Fig. 4.4 Mapping of f (t) = e−0.5t sin 2t in s-domain. Note that |F (s)| = ∞ at σ = −0.5.
Therefore F (s) exists only for σ > −0.5. (a) Real part, (b) imaginary part, and (c) magnitude of
F (s)
(b)
ˆ ∞ ˆ ∞
L [x (t)] = u (t) e−st dt = 1 · e−st dt
0− 0−
1 ∞ 1
= − · e−st 0
= .
s s
(c)
ˆ ∞
−at
L [x (t)] = L e u (t) = e−at u (t) e−st dt
0−
ˆ ∞ 1
= e−(s+a)t dt = .
0− s+a
4.3.1 Linearity
& n
' n n
L ai fi (t) = ai L [fi (t)] = ai Fi (s) , (4.6)
i=1 i=1 i=1
2 5
L 2e−t − 5e−2t = −
s+1 s+2
3s + 1
=− 2 ROC: |s| > −1.
s + 3s + 2
ej ωt − e−j ωt
sin ωt = .
2j
Given a function f (t) with initial condition f (0−), the Laplace transform of its
derivative is
df (t)
L = sF (s) − f (0−) . (4.7)
dt
= sF (s) − f (0−) .
4.3 Properties of the Laplace Transform 203
Example 4.3 A current i (t) flows through a coil L = 2H . At t = 0−, the inductor
current is 0.5A. Find the Laplace transform of the voltage across the inductor. The
inductor voltage is given by
di (t)
v (t) = L .
dt
From Eq. (4.7), we have
di (t)
V (s) = L L
dt
= L [sI (s) − i (0−)] = sLI (s) − Li (0−) .
Given a function f (t) with Laplace transform F (s), the Laplace transform of its
integral is given by
ˆ t
F (s)
L f (τ ) dτ = .
0- s
Proof
ˆ t ˆ ∞ ˆ t
L f (τ ) dτ = f (τ ) dτ e−st dt.
0- 0− 0-
204 4 The Laplace Transform
Since
4.3.4 Differentiation by s
dF (s)
L [t f (t)] = − .
ds
Thus we get
ˆ ∞ dF (s)
t f (t) e−st dt = L [t f (t)] = − .
0− ds
L [f (t − T ) u (t − T )] = L [f (x) u (x)]
ˆ ∞
= f (x) e−s(x+T ) dx
0−
ˆ ∞
= e−sT f (x) e−sx dx
0−
ˆ ∞
−T s
=e f (x) e−sx dx
0−
= e−T s F (s) .
and
ˆ T ˆ T ˆ T
−st −sT −st −2sT
F (s) = f (t) e dt + e f (t) e dt + e f (t) e−st dt + · · ·
0− 0− 0−
ˆ T
= 1 + e−sT + e−2sT + · · · f (t) e−st dt
0−
ˆ T
1
= f (t) e−st dt
1 − e−sT 0−
is obtained provided that e−sT = e−σ T < 1. For this to hold true, σ must be
positive, and hence the ROC is |s| > 0.
Example 4.4 Find the Laplace transform of the sawtooth function f (t) = t, 0 ≤
t ≤ 1, in Fig. 4.5. f (t) is periodic with T = 1.
ˆ T
1
F (s) = f (t) e−st dt
1 − e−sT 0−
ˆ 1
1 1 1 (st + 1)e−st
= te−st dt = −
1 − e−s 0− 1 − e−s s2 t=0
1 (s + 1) e−s −1 −s
1 − e − se −s
= −s
− = 2
1−e s2 s 1 − e−s
1 e−s
= − .
s2 s 1 − e−s
Convolution of two functions x (t) and h (t) is denoted by x (t) ∗ h (t) and defined
as
ˆ ∞ ˆ ∞
x (t) ∗ h (t) = x (τ ) h (t − τ ) dτ = h (τ ) x (t − τ ) dτ. (4.10)
−∞ −∞
This integral is called the convolution integral. If h (t) and x (t) are zero for
t ≤ 0, then Eq. (4.10) is reduced to 4
ˆ t ˆ t
x (t) ∗ h (t) = x (τ ) h (t − τ ) dτ = h (τ ) x (t − τ ) dτ. (4.11)
0− 0−
The convolution plays a crucial role in the study of signals and systems (Fig. 4.6).
A linear time-invariant system which has an impulse response h (t) responds to an
arbitrary input x (t) with an output y (t), which is the convolution of x (t) and h (t).
That is, emphx(t) convolved with y(t)
Do not worry about the details of convolving two signals at this point; you may
want to refer to texts on signals and systems to find out how the convolution works.
It suffices here to mention that Laplace transform of Eq. (4.12) is given by
4 We set the integral lower limit to 0- to allow generalized functions, i.e., the Dirac delta function
Fig. 4.6 (a) Linear time-invariant system driven by an impulse and (b) by an arbitrary input
where X (s) and H (s) are the Laplace transforms of x (t) and h (t), respectively.
Proof From definition of the Laplace transform, we can write
ˆ ∞
Y (s) = x (t) ∗ h (t) e−st dt. (4.13)
0−
We can readily change the order of integration in this double integral and write
ˆ ∞ ˆ ∞
Y (s) = dτ dt h (τ ) x (t − τ ) e−st
0− 0−
ˆ ∞ ˆ ∞
−st
= dτ h (τ ) dt x (t − τ ) e .
0− 0−
Example 4.5 A causal system’s impulse response is given as
1 − t
h (t) = e RC u (t) .
RC
Find the unit step response.
4.3 Properties of the Laplace Transform 209
With x (t) = u (t), the convolution integral (Eq. 4.10) gives the response of the
system as
ˆ ∞
y (t) = u (τ ) h (t − τ ) dτ.
−∞
Since x (t) = 0 for t < 0 and the system is causal, we use (4.11) to find the output.
Evaluating this integral, we get
ˆ ∞ 1 t−τ
y (t) = u (τ ) ·· e− RC u (t − τ ) dτ
0 RC
ˆ t ˆ t
1 1
e− RC dτ =
t−τ
· e− RC
t τ
= e RC dτ
RC 0 RC 0
t τ t t
t
= e− RC e RC = e− RC e RC − 1
0
t
= 1 − e− RC u (t) .
1 1
= −
s 1
s+
RC
1
= .
s (1 + sRC)
Now let us use the convolution property of the Laplace transform. From the
transform table (Table 4.1) or by direct integration, one can readily obtain
1
X (s) = .
s
210 4 The Laplace Transform
1 1
H (s) = ·
RC 1
s+
RC
1
= .
1 + sRC
Hence
Thus we see that the convolution property result is in agreement with that obtained
by applying the convolution integral.
Now we consider the case where f (t) has a step discontinuity at t = 0, i.e.,
f (0+) = f (0−) + A, where A is a constant. We can split f (t) into a continuous
part g (t) and a step function
It is clear that
f (0−) = g (0−) .
df (t) dg (t)
= + Aδ (t)
dt dt
ˆ ∞ df (t) −st
ˆ ∞ dg (t)
lim e dt = lim + Aδ (t) e−st dt
s→∞ 0− dt s→∞ 0− dt
ˆ ∞ dg (t) −st
= lim e dt + A
s→∞ 0− dt
= lim [sG (s) − g (0−)] + A.
s→∞
sin t
Example 4.6 Find lim .
t→0+ t
sin t
Using the Laplace transform table, we get L = tan−1 (1/s). Therefore
t
sin t sin t
lim = lim s L
t→0+ t s→∞ t
1
= lim s tan−1 = ∞ · 0.
s→∞ s
212 4 The Laplace Transform
= 1.
Hence
sin t sin t
lim = lim s L = 1.
t→0+ t s→∞ t
Theorem 2 Provided that the poles F (s) lie in the left-half of the s-plane, f (∞)
can be found from the final value theorem
Therefore
Example 4.7 Find lim te−t .
t→∞
Since
1
L t e−t = ,
(s + 1)2
we have
s
lim te−t = lim s · L t e−t = lim
t→∞ s→0 s→0 (s + 1)2
= 0.
s
L [cosh t] =
s2 − 1
s2
lim cosh t = lim s · L [cosh t] = lim
t→∞ s→0 s→0 s 2 −1
= 0.
On the other hand, we get a different answer if we take the limit directly on the
definition of cosine hyperbolic function
et + e−t
lim cosh (t) = lim = ∞.
t→∞ t→∞ 2
The two answers are inconsistent; the first limit is incorrect because cosine
hyperbolic function has a pole in the right-half of the s-plane.
214 4 The Laplace Transform
Equation 4.2 defines the Laplace transform of a function provided that it meets
the conditions for existence. Given the Laplace transform of a function in complex
frequency domain, one can use the inverse transform formula (4.5) to find its inverse
in the continuous-time domain. Let f (t) and F (s) be Laplace transform pairs. Then
we can use
ˆ σ1 +j ∞
1
f (t) = F (s) est ds (4.15)
2πj σ1 −j ∞
to retrieve the time function f (t). Equation 4.15 involves complex contour integra-
tion which we study in Sect. 4.6. Luckily, Laplace transforms of LTI systems result
in rational functions, which are quotients of two polynomials in s. This makes it
possible for us to use a simpler approach to invert Laplace transforms, whereby we
use partial fraction expansion, as well as the properties of the Laplace transform and
Laplace transform tables (see Table 4.1).
Partial Fraction Expansion Linear systems are represented by constant-
coefficient linear differential equations. Their response to an arbitrary input is
obtained by convolving the input with the system impulse response. The solution of
the differential equation includes a homogeneous and a particular part. As Sect. 4.1
demonstrated, the process is tedious and prone to human errors.
Taking the Laplace transform of the differential equation and the excitation
function results in algebraic equations. By doing this, we transfer from the time
domain system representation to frequency domain representation. The represen-
tation in this domain is a rational function of s. Inverting the frequency domain
representation involves algebraic manipulations and produces the homogenous and
particular solutions in one step. This greatly facilitates our job of finding solutions
to constant-coefficient linear differential equations.
Let h (t) be the impulse response of an LTI system. If this system is excited by
an arbitrary input x (t), the output of the system is the convolution of the input and
the impulse response, that is, y (t) = h (t) ∗ x (t). From the convolution property,
we have Y (s) = H (s) X (s). Y (s) is the quotient of two polynomials, N (s) and
D (s):
am s m + am−1 s m−1 + · · · + a0
Y (s) =
bn s n + bn−1 s n−1 + · · · + b0
N (s)
= , (4.16)
D (s)
4.4 The Inverse Laplace Transform 215
where m ≤ n. pj ’s and zi ’s are the poles and zeros of the system, respectively. We
are interested in two cases in which
1. All the poles are unique or
2. Some poles are equal, i.e., pi = pi+1 = pi+2 = · · · = pr so that
1
m
(s − zi )
N (s) am i=1
F (s) = = · r
D (s) bn 1
(s − pi )qi
i=1
and
r
qi = n.
i=1
The first case is that of the simple poles (with multiplicities equal to 1), whereas
the second one is the case of multiple poles. Also, the poles and zeros can be either
real or occur in complex conjugate pairs.
N (s)
In order to facilitate the inversion of the Laplace transform , we expand it
D (s)
N (s)
into a sum of partial fractions. For the case of simple poles, we can expand
D (s)
as follows:
N (s) A1 A2 An
= + + ··· + .
D (s) s − p1 s − p2 s − pn
N (s) s−4
F (s) = = 2 .
D (s) s + 4s + 3
216 4 The Laplace Transform
A B
F (s) = + ,
s+1 s+3
s−4 B (s + 1)
= A+
s+3 s=−1 s+3 s=−1
A = −2.5.
s−4 A (s + 3)
= +B
s+1 s=−3 s+1 s=−3
B = 3.5.
Thus we obtain
s−4 2.5 3.5
= − + .
s2 + 4s + 3 s+1 s+3
Referring to Table 4.1, we can readily obtain the inverse Laplace transform:
s−4 2.5 3.5
f (t) = L −1 = L −1 − +
s 2 + 4s + 3 s+1 s+3
2.5 3.5
= L −1 − + L −1
s+1 s+3
f (t) = −2.5 e−t + 3.5 e−3t u (t) .
4.4 The Inverse Laplace Transform 217
1
B ∗ = − (1 + j 2) and
8
s+1 1 1 1 1 − j2 1 1 + j2
= · − · − · .
s s2 + 4 4 s 8 s + j2 8 s − j2
1 1 1 1 − j2 1 1 + j2
−1
f (t) = L · − · − ·
4 s 8 s + j2 8 s − j2
1 1 − j 2 −j 2t 1 + j 2 j 2t
= − e − e u (t)
4 8 8
218 4 The Laplace Transform
1 (1 + j 2) ej 2t + (1 − j 2) e−j 2t
= 1− u (t)
4 2
1 √
= 1 − 5 cos 2t + tan−1 2 u (t) .
4
Alternatively, we can further simplify the decomposition by combining the complex
terms:
s+1 1/4 1 (1 − j 2) (s − j 2) + (1 + j 2) (s + j 2) 1 1 −s + 4
= − = +
s s2 + 4 s 8 s2 + 4 4 s s2 + 4
1 1 s 4
F (s) = − 2 + 2 .
4 s s +4 s +4
Probably this last form makes it easier to use Table 4.1 to find an inverse for the
transform.
1 −1 1 s 4
f (t) = L − 2 +
4 s s + 4 s2 + 4
1
= (1 − cos 2t + 2 sin 2t) u (t)
4
1 √
= 1 − 5 cos 2t + tan−1 2 u (t) .
4
To demonstrate the case of poles with multiplicities greater than one, let us consider
the following function:
s2 − s − 1
F (s) = .
(s + 1)3 (s + 3)
s2 − s − 1 A1 A2 A3 B
= + + + .
(s + 1) (s + 3)
3 s + 1 (s + 1) 2
(s + 1) 3 s+3
We will outline two methods to decompose the function into partial fractions. The
first method can also be applied to the case of simple poles.
4.4 The Inverse Laplace Transform 219
Method 1. Identical Polynomials Combine the four terms together so that all the
denominators are the least common multiple (lcm). Thus
s2 − s − 1
(s + 1)3 (s + 3)
A1 (s + 1)2 (s + 3) A2 (s + 1) (s + 3) A3 (s + 3) B (s + 1)3
= + + +
(s + 1) (s + 1) (s + 3)
2
(s + 1) (s + 1) (s + 3)
2
(s + 1) (s + 3) 3
(s + 3) (s + 1)3
3
A1 s + 5s 2 + 7s + 3 + A2 s 2 + 4s + 3 + A3 (s + 3) + B s 3 + 3s 2 + 3s + 1
=
(s + 1)3 (s + 3)
(A1 + B) s 3 + (5A1 + A2 + 3B) s 2 + (7A1 + 4A2 + A3 + 3B) s + 3A1 + 3A2 + 3A3 + B
= .
(s + 1)3 (s + 3)
A1 + B = 0
5A1 + A2 + 3B = 1
7A1 + 4A2 + A3 + 3B = −1
3A1 + 3A2 + 3A3 + B = −1.
11 7 1 11
A1 = , A2 = − , A3 = , B = − .
8 4 2 8
Hence the partial fraction expansion becomes
Using the Laplace transform properties and the transform table, we can invert F (s)
to find f (t):
x (t) = 1.375 − 1.75t + 0.25t 2 e−t − 1.375e−3t u (t) .
s2 − s − 1 B (s + 1)3
= A1 (s + 1)2 + A2 (s + 1) + A3 + .
s+3 s+3
220 4 The Laplace Transform
s2 − s − 1 1
A3 = = = 0.5.
s+3 s=−1 2
2s − 1 s 2 − s − 1
− = 2A1 (s + 1)
s+3 (s + 3)2 s=−1 s=−1
& '
3(s + 1)2 (s + 1)3
+ A2 + 0 + B −
s+3 (s + 3)3 s=−1
7
− = 0 + A2 + 0 + 0
4
7
A2 = − = −1.75.
4
A1 can be found by differentiating both sides of the equation twice and evaluating
the two sides at s = −1:
2 2 (2s − 1) 2(s 2 − s − 1)
+ +
s+3 (s + 3)2 (s + 3)3 s=−1
& '
6 (s + 1) 6 (s + 1)2 2 (s + 1)3
= 2A1 + 0 + 0 + B − +
s+3 (s + 3)2 (s + 3)3 s=−1
11
= 2A1 + 0 + 0 + B · 0
4
11
= 2A1
4
11
A1 = = 1.375
8
2
s −s−1
=B
(s + 1)3 s=−3
11
B=− = 1.375.
8
4.5 More on Poles and Zeros 221
Thus
Once the partial fraction expansion is obtained, we can find f (t) using the
Laplace transform table and the properties of the Laplace transform. Thus
f (t) = 1.375 − 1.75t + 0.25t 2 e−t − 1.375e−3t u (t) .
As discussed in Sect. 4.4, the poles and zeros of the system can be simple or
multiple: real or complex conjugate pairs. Figure 4.7 shows possible ways in which
poles and zeros of a signal/system can be distributed in the complex frequency
Fig. 4.7 Various ways in which poles and zeros of a system may be distributed in the s-plane The
distributions here are exemplary and are not meant to be comprehensive. (a) A simple real pole
in the left-half plane and a zero at the origin: a first-order highpass filter, (b) a double real pole in
the left-half plane: a second-order lowpass filter, (c) a simple real pole on the right-half plane: a
first-order unstable system, (d) a pair of simple conjugate poles in the left-half plane and a zero at
the origin: a bandpass filter, (e) a pair of simple conjugate poles in the left-half plane with zeros
reflected about the j ω axis: a second-order all-pass filter, (f) a pair of conjugate poles on j ω axis: a
sinusoidal oscillator, (g) multiple conjugate poles on j ω axis: oscillator with growing amplitude,
(h) a real zero in the left-half plane and a pair of simple conjugate poles in the right-half plane: an
unstable second-order oscillatory system
222 4 The Laplace Transform
plane. Poles and zeros are indicated with small crosses ”×” and small circles “o.” In
the case of multiple poles/zeros, as many ×’s and o’s are inserted into the graphic
as there are poles/zeros. Poles and zeros with multiplicities two and three can be
stacked on the pole–zero diagram; higher-order poles and zeros may be indicated by
a figure next to the cross or circle. Poles and zeros are important system parameters.
System behavior can be judged from system poles and zeros. Especially, poles
of a system have a decisive role in specifying system dynamics and stability. By
inserting or manipulating poles, we can design oscillators or we can stop spurious
oscillations in circuits. Systems, filters, or networks can be synthesized from a pole–
zero description. In the following paragraphs, we will demonstrate synthesis by
examples. One of our concerns is factoring polynomials which we consider next.
The readers comfortable with factoring polynomials and finding roots can skip the
next section.
a 2 ± 2ab + b2 = (a ± b)2
a 3 ± 3a 2 b + 3ab2 ± b3 = (a ± b)3
a 2 − b2 = (a − b) (a + b)
a 3 − b3 = (a − b) a 2 + ab + b2
a 3 + b3 = (a + b) a 2 − ab + b2
a 4 − b4 = (a − b) (a + b) (a − j b) (a + j b)
n
n!
a n bn−k = (a + b)n .
k! (n − k)!
k=0
If m (or n) is odd, then there is at least one real root of N (s) (or D (s)). In this
case, one can use the Newton–Raphson method to find the real zero (pole). Once this
is achieved, the degree of N (s) or D (s) is reduced by one through factorization.
For example, let D (s) be a polynomial of odd order. Then there exists a real root
“a” for D (s) such that
D (s) = (s − a) D1 (s) .
4.5 More on Poles and Zeros 223
Now the degree of D1 is reduced by one and is a polynomial of even order which
may or may not have real roots. Searching for zeros and poles (roots of N (s) and
D (s)) may prove very exhausting and the procedure is error-prone. As an example
consider factoring the polynomial s 4 + 6s 3 + 12s 2 + 10s + 3. This is a polynomial
of fourth order; it may or may not have a real root. To help us guess on a root, you
can try to sketch the polynomial to see if it has any real root or roots. Looking at the
sketch in Fig. 4.8, we suspect the presence of a root around s = −3. Substitution of
s = −3 in s 4 + 6s 3 + 12s 2 + 10s + 3 indeed yields 0 : 81 + 6(−27) + 12(9) +
10(3) + 3 = 0. We are very lucky; we can reduce the polynomial by dividing by
s + 3.
s 4 + 6s 3 + 12s 2 + 10s + 3 = (s + 3) s 3 + As 2 + Bs + 1
to get
= (s + 3) (s + 1 + j 2) (s + 1 − j 2) (s + 2 + j 4) (s + 2 − j 4) .
Poles (and zeros) can be real or occur as complex conjugate pairs, can be simple or
multiple, and can reside in the left-half or right-half plane or occur on the imaginary
5 Maxima is free software. You are strongly advised to familiarize yourself with such mathematical
software.
4.5 More on Poles and Zeros 225
axis. Signals and systems can be a combination of such poles (and zeros.) Pole
locations and multiplicities have a profound effect on system behavior like stability,
sensitivity, settling time, ringing, etc. Zeros can be used to fine-tune system for
compensation, remove undesired oscillations, and tailor filter responses.
With poles and zeros known, the system function or output can be expressed in
partial fraction terms, and the time function can be obtained through inverse Laplace
transform. As a consequence of linearity principle, each term contributes additively
to the output. Figure 4.7 shows some combinations of poles and zeros. Table 4.1 is
sufficient to find the inverse Laplace transform of each term. Below we repeat some
important transforms:
L −1
1 −→ δ (t)
1 L −1
−→ u (t)
s
1 L −1 t n
−→ u (t)
s n+1 n!
n
1 L −1 t at
−→ e u (t)
(s − a)n+1 n!
ω L −1
−→ sin ωt
s2 + ω2
s L −1
−→ cos ωt.
s + ω2
2
Fig. 4.9 Pole locations and corresponding time functions. (a) Poles on the real axis, (b) complex
conjugate poles on the right-half and left-half of s-plane, and (c) complex conjugate poles on the
imaginary axis. m denotes the multiplicity of the pole(s)
1
H (s) = .
(s − s0 ) (s − s1 ) (s − s2 )
1
H (s) =
2π 2π 4π 4π
(s + 1) s − cos + j sin s − cos + j sin
3 3 3 3
1
= √ √
3 3
(s + 1) s + 0.5 − j s + 0.5 + j
2 2
1
= .
(s + 1) s 2 + s + 1
4.5 More on Poles and Zeros 227
Fig. 4.10 Example 4.11. (a) Second-order LPF with R, L, C components. Inductive and capacitive
1
impedances are given as sL and sC . (b) Laplace transform implementation on LTSPICE simulator,
and (c) the pertinent time domain response to a step input
228 4 The Laplace Transform
Consequently, we obtain
1
H (s) = .
s3 + 2s 2 + 2s + 1
& √ '
2 3 π
h (t) = e−t − √ e−0.5t cos t+ u (t) .
3 2 6
You can have math and engineering software produce these results on computer
and plot them for you. We strongly urge you to use software in order to carry out
the mathematical manipulations and avoid human errors. LTSPICE lets you enter
the Laplace expression on a controlled source and run transient and AC analysis
(Figs. 4.10, 4.11). The transient analysis yields the inverse Laplace transform. In the
following SPICE code, note the LAPLACE = <expression>, which specifies
the system function of E1.
* C:\3rd order Butterworth LPF.asc
E1 out 0 N001 0 LAPLACE=1/(s^3+2*s^2+2*s+1)
V1 N001 0 PULSE(0 1000 0 0 0 1ms 5s 1) AC 1
.tran 20s
.backanno
.end
4.5 More on Poles and Zeros 229
Fig. 4.11 We can enter a Laplace expression on a SPICE simulator to run AC and transient
analyses. (a) The circuit. The Laplace transform of a normalized third-order Butterworth LPF
transfer function is entered on the controlled voltage source. (b) Transient analysis depicts the
inverse Laplace transform, which is the impulse response of the filter
Linear systems (or nonlinear systems linearized about a certain operating point)
are described by n-th order constant-coefficient linear differential equations. Given
initial conditions at time t = 0, the behavior of such systems can be obtained
as solutions to these differential equations. The first-order RC circuit example of
Sect. 4.1 has illustrated the steps involved in this approach. Mass-spring-friction
problems from mechanical systems can also be mentioned as another example to
linear systems. As the RC circuit example has demonstrated, the solution process
becomes more and more difficult as the system order increases. Below we repeat
the solution of the RC circuit of Sect. 4.1, using Laplace transform techniques this
time.
The differential equation derived using KVL for the circuit has been given in
Sect. 4.1 in terms of the capacitor voltage to be
dv (t)
v (t) + = 10 sin 2t.
dt
Taking the Laplace transform of both sides of this equation and using Table 4.1, we
get V (s) with v (0−) = 10 Volts
dv (t)
L v (t) + = L [10 · sin 2t]
dt
2
V (s) + sV (s) − v (0−) = 10 ·
s2 +4
20
(s + 1) V (s) = 10 +
s2 + 4
10 20
V (s) = + .
s + 1 (s + 1) s 2 + 4
10 A B B∗
V (s) = + + + .
s + 1 s + 1 s + j2 s − j2
B ∗ = −2 − j,
and
10 4 −2 + j −2 − j
V (s) = + + +
s+1 s+1 s + j2 s − j2
14 2−j 2+j
= − +
s+1 s + j2 s − j2
14 √ e−j tan−1 0.5 −1
ej tan 0.5
= − 5 + .
s+1 s + j2 s − j2
v (t) = L −1 [V (s)]
√
= 14e−t − 2 5 cos 2t + tan−1 0.5 u (t)
√
= 14e−t + 2 5 sin 2t − tan−1 2 u (t) ,
which agrees with the result obtained in Sect. 4.1 by applying classical differential
equation methodology. Note that the homogenous and particular solutions are found
in one step. The brevity and the elegance of the Laplace transform method are
evident.
To further illustrate the ease which Laplace transform provides us the solution of
differential equations, consider the mechanical system shown in Fig. 4.12. A spring
tied to a mass is being driven by a displacement generator. The mass moves on a flat
4.5 More on Poles and Zeros 231
surface with friction. The displacement generator L drives one side of the spring
with l (t). Let us call Fk the Hooke force, Fd the drag force, and Fm the inertial
force on the mass. Hooke’s force is proportional to displacement and opposite to it;
the friction is proportional to the speed. The inertial force on the mass as dictated
by Newton’s law is proportional to acceleration and the mass. Thus we can write
At any one time, the force which accelerates the mass is the difference between
the Hooke force of the spring and the drag force due to the friction. Therefore this
system is governed by the following differential equation:
F m = Fk − Fd
d 2 x (t) dx (t)
m = −k [x (t) − l (t)] − b . (4.18)
dt 2 dt
Taking the Laplace transform of both sides, we obtain
kL (s) sm + b
X (s) = + x (0)
s 2 m + bs
+k s 2 m + bs
+k
m
+ 2 x (0)
s m + bs + k
232 4 The Laplace Transform
b
k L (s) s+
X (s) = · + m x (0)
m b k b k
s + s+
2 s + s+
2
m m m m
1
+ x (0). (4.19)
b k
s + s+
2
m m
Equations 4.18 and 4.19 are descriptions of the mass-spring system in the time
and complex frequency domains with initial conditions. The solution of either
representation gives us the behavior of the mass position at any time t > 0. Before
we illustrate the solution with specific values of m, k, b, and l (t), we would like to
take a few moments about Eq. (4.19).
The first term in (4.19) is the zero-state system response, that is, the response with
x (0) and x (0) equal to zero. The ratio of X (s) to L (s) is the transfer function of
the system:
k
X (s) m
H (s) = = . (4.20)
L (s) b k
s + s+
2
m m
The second and third terms in Eq. (4.19) taken together comprise the zero-input
response of the mass-spring system (l (t) = 0). The coefficients of the denominator
polynomial determine the mode of the circuit response. With 2α = b/m and ω02 =
k/m, Eq. (4.19) can be rewritten as
ω02 s + 2α m
X (s) = L (s) + x (0) + x (0).
s2 + 2αs + ω02 s2 + 2αs + ω0
2 s + 2αs + ω02
2
Let m = 0.2 kg, b = 0.4 N · sec/m, and k = 1 N/m. Thus 2α = 2 sec−1 and
ω02 = 5m sec−2 , and Eq. (4.19) becomes
5 s+2 0.2
X (s) = L (s) + 2 x (0) + 2 x (0).
s2 + 2s + 5 s + 2s + 5 s + 2s + 5
0.1
(b) Sinusoidal response: l (t) = 0.1 sin t m, L (s) =
s2 + 1
0.5
X (s) = 2 m.
s + 1 s 2 + 2s + 5
For this case, we strongly recommend that the reader use a math package to
obtain the partial fraction expansion and the inverse Laplace transform. We
use wxMaxima for this purpose:
s s−2
X (s) = 0.05 − 2 m.
s + 2s + 5 s + 1
2
s+2 0.1 (s + 2)
X (s) = x (0) = 2 .
s 2 + 2s + 5 s + 2s + 5
234 4 The Laplace Transform
Fig. 4.13 Mass-spring system step response to a step input, to a sinusoidal input, and zero-input
response
In Fig. 4.13, the time domain responses for these input excitations are plotted.
Fig. 4.14 Inverse Laplace transform can be found by integrating F (s) est along the Bromwitch
contour. Two possible contours that can be used are shown
Let f (t) = 0 when t 0 and F (s) = L [f (t)] be its Laplace transform. Consider
the integral I along the line σ = γ from ω = −W to ω = W in Fig. 4.14:
ˆ γ +j W
1
I = lim F (s) est ds.
W →∞ 2πj γ −j W
ˆ ∞
Substituting F (s) = f (u) e−su du in I , we have
0
ˆ γ +j W ˆ ∞
1 −su
I = lim f (u) e du est ds.
W →∞ 2πj γ −j W 0
1
ˆ −j (γ +j W −γ ) ˆ ∞
−(γ +j ω)u
I = lim f (u) e du e(γ +j ω)t j dω
W →∞ 2πj −j (γ −j W −γ ) 0
ˆ W ˆ ∞
1
= lim ·j f (u) e−γ u e−j ωu du eγ t ej ωt dω
W →∞ 2πj −W 0
γ t ˆ W ˆ ∞
e
= lim f (u) e−γ u e−j ωu du ej ωt dω
W →∞ 2π −W 0
236 4 The Laplace Transform
ˆ W ˆ ∞
eγ t
= lim ej ωt dω e−j ωu e−γ u f (u) du
W →∞ 2π −W 0
ˆ W ˆ ∞
eγ t
= lim e−j ω(u−t) e−γ u f (u) dudω.
W →∞ 2π −W 0
ˆ ∞
For the integral e−j ω(u−t) e−γ u f (u) du to exist, it must be absolutely
0
convergent. This requires that f (u) be of exponential order γ , that is, γ is larger
than the largest of the real parts of all singularities. Taking the limit as W tends to
infinity and applying Fourier’s integral theorem to the last two integrals, we obtain
!
eγ t 2π e−γ t f (t) t > 0
I =
2π 0 t <0
!
f (t) t > 0
=
0 t < 0.
Thus we have established the complex inversion formula to find f (t) from F (s)
ˆ γ +j ∞
1
f (t) = F (s) est ds (t > 0) , (4.21)
2πj γ −j ∞
We will show this for the contour shown in Fig. 4.14a. By the residue integral
theorem Fig. 3.42. By the residue integral theorem on page 118, the contour integral
evaluates to the sum of residues multiplied by 2πj .
ˆ n
F (s) est ds = 2πj rn . (4.22)
ABCDEA i=1
|F (s)| M
lim M = 0.
R→∞
4.6 Inverse Laplace Transform by Contour Integration 237
Hence
ˆ γ +j ∞ ˆ ˆ
F (s) est ds = lim F (s) est ds − F (s) est ds
γ −j ∞ R→∞ ABCDEA
n ˆ
= 2πj ri − lim F (s) est ds.
R→∞
i=1
π 3π
The path is specified by s = γ + Rej θ for θ . Then the integral along
2 2
becomes
ˆ ˆ 3π/2
F (s) e ds =
st
F γ + Rej θ exp γ t + Rtej θ j Rej θ dθ.
π/2
´
For the magnitude of , we can write
ˆ ˆ 3π/2
F (s) e ds
st
F γ + Rej θ exp γ t + Rtej θ j Rej θ dθ
π/2
ˆ 3π/2
MRe γt
exp (Rt cos θ ) dθ.
π/2
2φ
By Jordan’s inequality (Eq. 3.50 on page 127), we have < sin φ. This
π
2Rtφ
necessitates that exp (−Rt sin φ) < exp − and
π
ˆ ˆ π
2Rt
F (s) est ds MReγ t exp − φ dφ
0 π
π Meγ t
< .
t
Taking limits as R approaches infinity, M tends to zero by assumption. Thus we get
ˆ
π Meγ t
lim F (s) est ds < lim = 0.
R→∞ R→∞ t
238 4 The Laplace Transform
By dividing by 2πj , we see that the inverse Laplace transform f (t) = L −1 [F (s)]
as obtained from the Bromwitch contour is the sum of residues of F (s) est :
ˆ γ +j ∞
1
f (t) = F (s) est ds
2πj γ −j ∞
n
= ri .
i=1
Using the contour in Fig. 4.14b produces the same result as (a). However, proving
that the integral vanishes along in the limit is rather involved. We refer you to [30]
for a proof.
Let us illustrate this with an example we already solved in Sect. 4.4.3.
s2 − s − 1
Example 4.12 Find the inverse transform of F (s) = using the
(s + 1)3 (s + 3)
complex inversion formula.
We find the transform from
ˆ
1 s2 − s − 1
f (t) = lim est ds
R→∞ 2πj (s + 1)3 (s + 3)
ˆ γ +j ∞
1 s2 − s − 1
= est ds,
2πj γ −j ∞ (s + 1)3 (s + 3)
where C is the Bromwitch contour shown in Fig. 4.14. By the residue integral
formula, the last integral equals the sum of the residues multiplied by 2πj . Thus
letting r1 and r2 be the residues of f at s = −1 and s = −3, respectively, we have
f (t) = r1 + r2 .
Residue r1 :
& '
1 d2 (s + 1)3 s 2 − s − 1 est
r1 = lim
s→−1 2! ds 2 (s + 1)3 (s + 3)
& '
1 d2 s 2 − s − 1 est
= lim
s→−1 2! ds 2 s+3
4.7 Applications of Laplace Transform 239
& ' 2
d2 s 2 − s − 1 est s 2 − s − 1 2 st s − s − 1 2s − 1
= ·t e +2 + test
ds 2 (s + 3) s+3 (s + 3)2 s+3
1 2s − 1 s 2 − s − 1 st
+2 + + e
s + 3 (s + 3)2 (s + 3)3
1 2 −t 7 −t 11 −t
r1 = t e − te + e .
4 4 8
Residue r2 :
& '
(s + 3) s 2 − s − 1 est
r2 = lim
s→−3 (s + 1)3 (s + 3)
& '
s 2 − s − 1 est
= lim
s→−3 (s + 1)3
11 −3t
=− e .
8
Summing the residues, we find
1 2 −t 7 −t 11 −t 11 −3t
f (t) = t e − te + e − e .
4 4 8 8
Compare this result with that obtained in Sect. 4.4.3 on page 218.
The Laplace transform is among the tools electrical engineers frequently use to
analyze and design electrical systems and control systems. An LTI electric circuit
Y (s)
is specified by a system transfer function H (s) = , where X (s) and Y (s)
X (s)
are the circuit input and output, respectively. H (s) is a rational function of s.
Depending on whether X (s) and Y (s) represent voltages or currents, H (s) is a
voltage transfer function or a current transfer function. Network functions other than
transfer function, such as impedance and admittance, are also rational functions of
s. Laplace transform is a very powerful tool in analyzing and synthesizing electrical
networks. The basis for analysis and synthesis of such networks is the representation
of passive components L, C, R in the complex frequency domain.
240 4 The Laplace Transform
v (t)
v (t) = Ri (t) , i (t) = = Gv (t) ................... (Resistance)
R
ˆ
1 t dv (t)
v (t) = v (0) + i (τ ) dτ, i (t) = C ....... (Capacitance)
C 0 dt
ˆ
di (t) 1 t
v (t) = L , i (t) = i (0) + v (τ ) dτ......... (Inductance) .
dt L 0
Taking the Laplace transforms of these equations and assuming zero state,7 we
obtain the terminal equations of these components in complex frequency domain.
These terminal equations are similar to those we obtained in Sect. 1.5.3, where
s = 0 + j ω was assumed.
Thus we have
V (s)
V (s) = RI (s) , I (s) = = GV (s) ................... (Resistance)
R
1
V (s) = I (s) , I (s) = CV (s) .............................. (Capacitance)
sC
1
V (s) = sLI (s) , I (s) = V (s) .............................. (Inductance) .
sL
From these transforms, we derive impedances of these components in s-plane.
Impedance is defined as the ratio of voltage and current; therefore the impedances
are found to be
Z = R .......... (Resistance)
1
Z= ........ (Capacitance) (4.23)
sC
Z = sL.......... (Inductance) .
7G is called conductance and is defined as G = 1/R. The unit of conductance is mho or Siemens.
4.7 Applications of Laplace Transform 241
1
with and keeping R’s unchanged. Series and parallel connections of impedances
sC
follow series–parallel connections of resistances. Thus
n
Z = Z1 + Z2 + · · · + Zn = Zi . . . . . . Series connection
i=1
n
1 1 1 1 1
= + + ··· + = . . . . . . Parallel connection.
Z Z1 Z2 Zn Zi
i=1
s 2 + 2αs + ωo2
Z (s) = L ,
s + 2α
1
·R
sC
1 1 1
R+ ·
H (s) = sC = C s + 2α =
1
· 2
1
Z (s) s + 2αs + ωo
2 2 LC s + 2αs + ωo2
L·
s + 2α
ωo2
H (s) = .
s 2 + 2αs + ωo2
Figure 4.15a shows the implementation of H (s) in block diagram form. We see
that the output Y depends on the input and its own derivatives. With a derivative
4.7 Applications of Laplace Transform 243
Fig. 4.15 (a) Block diagram for derivative and (b) integral implementation of a transfer function
Integrator Synthesis Let us redesign the same transfer function using integrators.
Dividing numerator and denominator by s 2 , we obtain
Figure 4.15b shows the implementation of H (s) with integrators. The blocks that
1
contain “ ” are integrators which, like differentiators, can be readily made using
s
operational amplifiers, capacitors, and resistors of Fig. 4.16. The process of building
the system (4.25) is similar to that of the derivative synthesis and we leave it to the
reader as an exercise.
Consider an LTI system with an impulse response h (t). Let y (t) denote the
response of the system to an arbitrary input x (t) so that y (t) = h (t) ∗ x (t). h (t)
is said to be invertible if y (t) ∗ hinv (t) = x (t). hinv (t) is the impulse response of
the inverse system.
and
Hence we deduce that the convolution of the impulse responses of the forward and
inverse systems is a unit impulse function:
Recall that for an LTI system, H (s) is a rational function in the form
N (s)
H (s) = ,
D (s)
and a stable LTI system has poles in the left-half of the s-plane, that is, the roots of
D (s) lie in the left-half of the s-plane. Furthermore the degree of D (s) is greater
than or equal to the degree of N (s). Since Hinv (s) is the reciprocal of H (s), we
should have
D (s)
Hinv (s) = .
N (s)
We see that the poles and zeros of the LTI system and the inverse system are
interchanged. This fact imposes two restrictions:
1. One restriction is for the inverse system to be stable. If the inverse system is to be
stable, then the zeros of H (s) should also lie in the left-half s-plane. Otherwise,
a stable inverse system cannot be realized. Such a system is called a minimum-
phase system.
2. The second restriction involves the difference between the degrees of N (s) and
D (s). After a long division, Hinv (s) includes terms s, s 2 , . . .. The inverse
Laplace transform of s is a unit impulse function, and the inverse transform
of s n is a generalized function δ (n) (t). Dealing with generalized functions in
implementing the inverse system can be formidable. Just think of building the
inverse of an n-th order lowpass filter!
246 4 The Laplace Transform
1
H (s) = .
s+a
Therefore the inverse LTI system is described by Hinv (s) = s + a. Thus the inverse
system’s impulse response becomes
Here we exploit the derivative property of the bilateral Laplace transform below:
dx (t)
L = sX (s) .
dt
d −1
L −1 (s) = L −1 (s · 1) = L (1)
dt
d
= δ (t) = δ (t) .
dt
Hence the inverse system is found to be
Let us verify our inverse system with a simple input. Let us apply a unit step
function to the input of the forward system. The response will be
1
y (t) = u (t) ∗ e−at u (t) = 1 − e−at u (t) .
a
Let us apply y (t) to the input of the inverse system. Call the output 5
y (t). The output
of the inverse system will be
5
y (t) = y (t) ∗ hinv (t)
1 − e−at u (t)
= ∗ δ (t) + aδ (t)
a
1 − e−at u (t) 1 − e−at u (t)
= ∗ δ (t) + ∗ aδ (t)
a a
1 − e−at u (t)
= ∗ δ (t) + 1 − e−at u (t) .
a
4.7 Applications of Laplace Transform 247
From here, we find the Laplace transform of the inverse system output:
& '
1 − e−at u (t)
5 (s) = L
Y L δ (t) + L 1 − e−at u (t)
a
1 1 1 d 1 1
= − L δ (t) + −
a s s+a dt s s+a
1 1 1 1 1 1 as 1 1
= − (s · 1) + − = + −
a s s+a s s+a a s (s + a) s s+a
1 1 1
= + −
s+a s s+a
1
= .
s
5 5 (s):
y (t) is the inverse Laplace transform of Y
1
y (t) = L −1
5 = u (t) ,
s
which is the input to the LTI system. Hence we conclude that δ (t) + aδ (t) is
indeed the impulse response of the inverse system. Notice the appearance of the
unit doublet δ (t) in the inverse system. For a higher-order system with m zeros and
n poles, the inverse system will include δ (t), δ (t) , · · · , δ (n−m) (t). Such an inverse
system should be quite difficult to implement.
As shown in Fig. 4.18, an inverse system can be realized by including the system
in the negative feedback of an opamp. By placing the (forward) system in the
negative feedback of the amplifier, one can achieve inversion provided that the
system is minimum phase and the amplifier gain is very large and non-reactive.
The voltage transfer function of such a negative feedback amplifier can be found as
Vout (s) 1
lim = .
A−→∞ Vin (s) H (s)
248 4 The Laplace Transform
Vout (s)
Hence we conclude that = Hinv (s). State-of-the-art opamps boast very
Vin (s)
high open loop gains which are real if the frequency of operation is orders of
magnitude below the opamp 3-dB bandwidth. Modern opamps provide gains in
excess of 106 and bandwidths above 100 MHz, making the system inversion a
possibility.
In Fig. 4.19, we show a first-order system and its inverse in cascade connection.
Note that the system appears in the negative feedback of opamp U1. The transfer
1
function of the forward system is H (s) = . The noninverting input of
1 + sRC
1
U1 is VB (s) = H (s) VA (s) = · VA (s). On the other hand, assuming an
1 + sRC
ideal opamp, the inverting input of U1 is also equal to V (B). VB (s) = H (s) VC (s)
results in VC (s) = H −1 (s) VB (s). Thus
Hinv (s) retrieves the input signal from its convolution with H (s).
4.7 Applications of Laplace Transform 249
Fig. 4.19 (a) A first-order LTI system and its inverse connected in cascade. (b) V(B) is the
convolution of the input with the system function. V(C) is the output from the inverse system,
which can also be viewed as deconvolution. The triangular input waveform is retrieved by the
inverse system from the output of the forward system
Substituting s = 3, we get
3 3
I = = .
9+4 13
Problems
1. A transform T that acts upon a function f maps f into F . Given two functions
f and g, their transforms T [f ] = F and T [g] = G and two constants a and
b. T is said to be linear if it satisfies the following relation:
et − e−t
sinh t =
2
et + e−t
cosh t = .
2
Find Laplace transform of sinh and cosh functions.
4. Solve Problem 2 using differentiation rule of the Laplace transform.
5. Find the Laplace transform of full-wave rectified sine function f (t) = |sin t|.
6. Using the real translation property, obtain the Laplace transform of a full-wave
rectified cosine function.
7. Find the Laplace transform of f (t) = cos t.
d
(a) Using sin t = cos t, find the Laplace transform of sin t.
dt
4.7 Applications of Laplace Transform 251
s+5
T (s) = 100 ·
s 2 + 12s + 100
904
18. A system with a transfer function H (s) = is excited by an input
s 2 + 4s + 904
x (t). Find
(a) lim [h (t) ∗ x (t)] if x (t) = δ (t)
t→∞
(b) lim [h (t) ∗ x (t)] if x (t) = u (t)
t→∞
(c) lim [h (t) ∗ x (t)] if x (t) = r (t) where r (t) = tu (t)
t→∞
19. The system in Problem 17 is excited by an input x (t). Find
(a) lim [h (t) ∗ x (t)] if x (t) = δ (t)
t→0
(a) lim [h (t) ∗ x (t)] if x (t) = u (t)
t→0
(a) lim [h (t) ∗ x (t)] if x (t) = r (t) where r (t) = tu (t)
t→0
20. Two systems S1 and S2 which are connected in cascade are described by their
impulse responses:
An excitation x (t) = sin (5t) is applied to the input. Find the system output
y (t).
Problem 20
21. Radioactive elements decay into lighter elements by giving off alpha and beta
particles or gamma rays. The rate of decay at time t is proportional to the mass
m (t) through the relation
dm (t)
= −λm (t) .
dt
22. Obtain the Laplace transform of the following integrodifferential equation and
solve it for the case where the initial conditions are zero:
ˆ t
dx (t)
A +B x(τ )dτ + Cx (t) = u (t)
dt 0−
x (0−) = 0
x (0−) = 0.
23. Solve the differential equation x (t) + 3x (t) + 2x (t) = 4et subject to the
initial conditions x (0−) = 1 and x (0) = −1.
d 2y dy
24. Given the differential equation 2
+ 10 + 169y = 0 and the initial
dt dt
conditions y (0) = 1 and y (0) = −10,
(a) Solve for y(t) using Laplace transform.
(b) Find the poles and zeros of the system represented by this differential
equation.
25. X (s) is the Laplace transform of x (t). a is a small number such that
ˆ t a
x (τ ) dτ [x (t) + x (t − a)] .
t−a 2
Show that
´ t−a 1
(a) L −∞ x (τ ) dτ = e−as X (s).
s
1 −as
a
(b) 1−e X (s) = 1 + e−as X (s).
s 2
2 1 − e−as
(c) The derivative operator can be approximated by s = · .
a 1 + e−as
26. Verify the solutions for the three responses of the mass-spring system.
27. Find the inverse Laplace transform of
1
X (s) = .
s 4 + 2s 2 + 1
s 2 + 3s + 1
H (s) =
ks 2 + (3k − 1) s + k
i. Stable
ii. Unstable
iii. Oscillatory
iv. Non-oscillatory
(c) Obtain h (t) for k = 0.1 and k = 0.5.
(d) Determine k which produces sustained sinusoidal oscillation with stable
amplitude.
29. x (t) and y (t) are two quantities related through the differential equations:
dx (t)
= −9y (t)
dt
dy (t)
= x (t)
dt
together with initial conditions x (0− ) = 1 and y (0− ) = −2. Find x (t) and
y (t).
30. Given a system of coupled first-order differential equations,
Assuming zero initial conditions, show that the above system can be expressed
in matrix form as
⎡ ⎤ ⎡ ⎤
R 1 1
10 X (s) ⎢ − − ⎥ X (s)
s = ⎣ 1L L ⎦ + ⎣ L ⎦ E (s) .
01 Y (s) 0 Y (s) 0
C
x (t) = 2y (t)
y (t) = −x (t) .
32. In a certain natural habitat called Serpentia live snakes and rats. The snakes
live on rats and control the rat population. The snakes increase in proportion to
the rat population. On the other hand, the rat population is negatively affected
by the snakes and decreases proportionally with the snake population. A linear
4.7 Applications of Laplace Transform 255
mathematical model for this natural population control can be described by two
coupled differential equations:
ds (t)
= kr r (t)
dt
dr (t)
= −ks s (t) .
dt
Assume that there are 1000 rats and 20 snakes at time t = 0, and the snake
population grows by 0.1% per year per rat; the rat population decreases by
30% per year per snake. Find the number of snakes and rats after 20 years.
33. A linear system with impulse response h (t) responds to an arbitrary input x (t)
through the convolution relation:
Should this system be excited by the derivative of x (t), its response is given
as
Show that
dy1 (t)
y2 (t) = .
dt
34. A linear system with impulse response h (t) responds to an arbitrary input x (t)
through the convolution relation:
Should this system be excited by the integral of x (t), its response is given
as
ˆ t
y2 (t) = x (τ ) dτ ∗ h (t) .
0−
Show that
ˆ t
y2 (t) = y1 (τ ) dτ.
0−
N (s) s
35. Decomposing H (s) = = into partial quotients, find
D (s) (s + 3) s 2 + 16
h (t) = L−1 [H (s)].
256 4 The Laplace Transform
Show that
(a) x (t) = e−at sin ωt and y (t) = e−at cos ωt are energy signals.
(b) Energy of x (t) is
1
E e−at = ,
2a
1 ω2
Ex = · 2 ,
4a ω + a 2
1 ω2 + 2a 2
Ey = · .
4a ω2 + a 2
(c) The energy of sine (cosine) modulated decaying exponential signal is half
of the energy of an unmodulated decaying exponential signal.
39. Using Laplace transform properties, show that the convolution in time domain
satisfies the following laws:
(a) Commutativity: x (t) ∗ y (t) = y (t) ∗ x (t)
(b) Associativity: [x (t) ∗ y (t)] ∗ z (t) = x (t) ∗ [y (t) ∗ z (t)]
(c) Distributivity: x (t) ∗ [y (t) + z (t)] = x (t) ∗ y (t) + x (t) ∗ z (t)
Chapter 5
The Fourier Series
The Fourier Series components of a periodic square wave. This oscilloscope display
shows the magnitude of Fourier Series coefficients superimposed on a 1-kHz square wave having
a duty cycle of 50%. Real, imaginary, magnitude and phase of the coefficients can be selected for
display. Top trace has a setting of 10 kHz/division. The DC is at the screen center. Note that only
the odd harmonics are present and they vary as 1/n, where n is the harmonic number. The Fourier
analysis has now become almost standard on digital oscilloscopes and circuit simulators
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2022 257
O. Özhan, Basic Transforms for Electrical Engineering,
https://doi.org/10.1007/978-3-030-98846-3_5
258 5 The Fourier Series
Ax = A · i
Ay = A · j
Az = A · k.
A · B = 0.
(1768–1830) was actively involved in promoting French revolution in his homeland and barely
escaped the guillotine. He served at Ecole Polytechnique after Lagrange. In 1807 he published his
work on heat propagation and the series to be known by his name. - Abridged from Wikipedia.
5.1 Vectors and Signals 259
In addition to this if
A · A = B · B = 1,
then they are said to be orthonormal. Hence the direction vectors i, j, k are
orthonormal vectors. We call them the basis vectors of the three dimensional vector
space.
We can readily extend vectors to n dimensions:
n
A= Ak ak = A1 a1 + A2 a2 + · · · + An an , (5.1)
k=1
where ak is the basis vector in k-th direction. Thus a vector A can be decomposed
into its n components using Eq. (5.1). By decomposing A into its components Ak ,
we find the projections of A on the k-th directions. We can extend the idea so that
A is allowed to have infinitely many discrete components Ak along infinitely many
basis vectors ak , i.e.,
∞
A= Ak ak .
k=1
Scalar product (also known as dot product and inner product) of A and B is
defined as
n n
< A, B >= A · B = Ak Bk∗ = A∗k Bk (5.2)
k=1 k=1
which, for real vectors, is the sum of the products of corresponding components of
A and B. This logically follows from the orthonormality of the basis vectors ak .
Mathematical functions can be viewed as vectors with infinite components.
Consider a piecewise-continuous function f (t) defined on an interval [a, b]. For
every value α in [a, b] we assign to f a unique number f (α). Then the set of
numbers { f (α) | a ≤ α ≤ b } can be thought of as a vector with infinitely many
components. Let f (t) and g (t) be piecewise-continuous functions defined on an
interval [a, b]. We allow g (t) to be a complex-valued function. Then the integral
ˆ b
f (t) g ∗ (t) dt is defined as the scalar product of f and g over [a, b], and the
a
integral replaces the sum in Eq. (5.2). If g (t) is a basis function then
ˆ b
< f, g >= f (t) g ∗ (t) dt
a
260 5 The Fourier Series
then the functions f (t) and g (t) are orthogonal in the interval [a, b]. Furthermore
if < f, f >=< g, g >= 1, then f (t) and g (t) are said to be orthonormal.
Example 5.1 Consider the functions f1 (t) = sin t, f2 (t) = sin 2t, f3 (t) =
cos t, f4 (t) = cos 2t. Since
ˆ π
sin t sin 2t dt = 0,
−π
ˆ π
sin t cos t dt = 0,
−π
ˆ π
cos t cos 2t dt = 0,
−π
ˆ π
sin t cos 2t dt = 0,
−π
ˆ π
cos t sin 2t dt = 0
−π
τ +T
ej (n−m)ω0 t = ej (n−m)ω0 (τ +T ) − ej (n−m)ω0 τ
τ
= ej (n−m)ω0 τ ej (n−m)2π − 1
= ej (n−m)ω0 τ (1 − 1)
= 0.
Consequently
ˆ τ +T
ej nω0 t e−j mω0 t dt = T δmn
τ
which proves our assertion that the functions ej nω0 t are orthogonal.
In the nineteenth century, while working with heat conduction, Jean-Baptist Joseph
Fourier came up with the brilliant idea that a periodic function can be expressed
as an infinite series of sinusoids whose frequencies are integer multiples of the
frequency of the function. A function f (t) is said to be periodic with period T
if it satisfies
f (t + T ) = f (t). (5.5)
A periodic function has infinitely many such T values which satisfy (5.5). The
smallest such T is called the fundamental period. In Fig. 5.1, T = 1s, 2s, ... are all
periods. The smallest of them, however, 1s is the fundamental period. The inverse
of the fundamental period is called the fundamental frequency, f0 , which is related
to T through
1
f0 = .
T
262 5 The Fourier Series
which is called the complex Fourier series. The inner product of f (t) and the basis
functions ej nω0 t yields the coefficient cn , which is the projection of f (t) on the basis
function ej nω0 t . The fact that f (t) is a real-valued function makes it necessary for
c0 to be real and cn and c−n to be complex conjugate pairs.
Below we give two other forms of the Fourier series and show that they follow
from the complex Fourier series. Among these forms we will be focusing mostly on
the complex exponential Fourier series form for its elegance, and because complex
exponentials constitute a set of bases that encompasses the sinusoidal functions.
5.2 The Fourier Series 263
Let cn = |cn | ej θn denote the n-th complex Fourier series coefficient. We can
arrange Eq. (5.6) as follows:
∞
f (t) = c0 + c−n e−j nω0 t + cn ej nω0 t
n=1
∞ ∗
= c0 + cn ej nω0 t + cn ej nω0 t
n=1
∞
= c0 + |cn | e−j θn e−j nω0 t + ej θn ej nω0 t
n=1
∞
= c0 + 2 |cn | cos (nω0 t + θn )
n=1
∞
f (t) = A0 + An cos (nω0 t + θn ) . (5.7)
n=1
Equation (5.7) is the Fourier series in phase-amplitude form. nω0 is the n-th
harmonic of f (t); An and θn are its amplitude and phase, respectively. A0 = c0
is the average or DC value of f (t). A1 is the fundamental harmonic amplitude.
Cosine terms in Eq. (5.7) can be expanded to yield Fourier series in quadrature
trigonometric form:
∞
f (t) = A0 + An cos (nω0 t + θn )
n=1
∞
f (t) = A0 + An (cos θn cos nω0 t − sin θn sin nω0 t)
n=1
∞
f (t) = a0 + (an cos nω0 t + bn sin nω0 t) , (5.8)
n=1
where an = An cos θn and bn = −An sin θn are the amplitudes of the cosine and
sine components of the n-th harmonic. We also note that
bn
An = an2 + bn2 and θn = − tan−1 .
an
Therefore Fourier’s assertion can also be expressed by (5.8). In all of these forms
a0 = A0 = c0 denote the same thing, namely, the average (DC) value of f (t). Note
∞
that cos nω0 t and sin nω0 t to f (t) are what ak are to A in A = Ak ak in Eq. (5.2).
k=1
264 5 The Fourier Series
We can interpret this by saying that Fourier has found infinitely many trigonometric
basis functions for a periodic function from which the function can be built through
a series (Eq. (5.8)). an cos nω0 t and bn sin nω0 t are quadrature components of
f (t). This discovery had far-reaching consequences in mathematics, science, and
engineering—especially electrical engineering. Decomposing a periodic function
into a series of trigonometric components, then using the superposition principle for
linear time-invariant systems greatly facilitates the analysis of linear systems.
If f (t) with period T satisfies the Dirichlet conditions stated in Sect. 5.6, the
complex Fourier series converges to f (t), that is, f (t) can be expanded into a
Fourier series:
∞
f (t) = cn ej nω0 t
k=−∞
8 9
cn = f (t) , ej nω0 t is the inner product evaluated by integrating f (t) e−j nω0 t over
one period. Recall that ej nω0 t is a basis function. From this inner product, we can
derive cn , the coefficient of the n-th harmonic. By interchanging the integral and
summation we have:
6 7 ˆ T
f (t) , e j nω0 t
= f (t) e−j nω0 t dt
0
ˆ ∞
T
= ck e j kω0 t
e−j nω0 t dt
0 k=−∞
∞ ˆ T
= ck ej (k−n)ω0 t dt.
k=−∞ 0
Referring back to Example 5.1, the integral in the sum yields 0 when k = n and T
when k = n. That is
6 7 ˆ T
f (t) , ej nω0 t = f (t) e−j nω0 t dt = cn T .
0
Hence we obtain
ˆ T
1
cn = f (t) e−j nω0 t dt (5.9)
T 0
5.3 Calculating Fourier Series Coefficients 265
Although we used 0 and T as the lower and upper integral limits, the integral can be
taken between arbitrary limits τ and τ + T . As mentioned before, c0 is real and cn
can be complex in general, in which case cn and c−n must be complex conjugates.
With cn determined from Eq. (5.9), An , θn of the phase-amplitude series as well
as an , bn of the quadrature series are readily calculated using the relations
As already mentioned, in all three forms of the Fourier series c0 , A0 , and a0 are
equal to the average value of f (t).
We have already stated that cos nω0 t and sin nω0 t are basis functions. An
alternative way to calculate an and bn is to multiply f (t) by cos nω0 t or sin nω0 t
then integrate over one period. To calculate an , we proceed as below
∞
f (t) = a0 + (ak cos kω0 t + bk sin kω0 t)
k=1
ˆ ˆ & ∞
'
T T
f (t) cos nω0 t dt = a0 + (ak cos kω0 t + bk sin kω0 t) cos nω0 t dt
0 0 k=1
ˆ T ∞ ˆ T
= a0 cos nω0 t dt + ak cos kω0 t cos nω0 t dt
0 k=1 0
∞ ˆ T
+ bk sin kω0 t cos nω0 t dt
k=1 0
Since
⎧
ˆ T ⎨T , k = n
cos kω0 t cos nω0 t dt = 2 ,
0 ⎩0, otherwise
ˆ T
sin kω0 t cos nω0 t dt = 0 for all n,
0
ˆ T
cos nω0 t dt = 0 for all n
0
266 5 The Fourier Series
we deduce that
The American physicists Albert A. Michelson and Edward W. Morley are well
known for their precise measurement of the speed of light and the disposal of the
long-cherished idea of “aether ” which acts as a medium for light to propagate. They
were awarded Nobel prize for their work. Michelson was particularly interested in
light phenomena and the spectra emitted by light sources. While he was working
to figure out the spectrum emitted by a flame, he found himself doing “laborious”
Fourier analysis over and over again. Apparently tired of manual calculations of
Fourier series, he decided to make a machine which could automate the process.
He wrote:
Every one who has had occasion to calculate or to construct graphically the
resultant of a large number of simple harmonic motions [sinusoids] has felt
the need of some simple and fairly accurate machine which would save the
considerable time and labor involved in such computations. [7]
5.3 Calculating Fourier Series Coefficients 267
20
f (t) = an cos (nt) or
n=1
20
f (t) = an sin (nt)
n=1
The harmonic analyzer is a kind of analog computer which could analyze and
synthesize even- or odd-periodic functions. As illustrated in the picture the machine
is operated manually by rotating a crank which drives a conical assembly of
)
twenty gears. All operations in the synthesis equation 20 n=1 an cos (nx) are done
mechanically by gears, cams, levers, springs, and pulleys.
Gears on the same mechanical shaft rotate with the same angular speed and
their tooth counts are 6, 12, 18, ..., 120. These gears engage other gears which all
have the same tooth count. This arrangement causes twenty angular speeds to be
generated by the secondary set of gears, each speed corresponding to a Fourier
seriesharmonic. The gear rotations are converted by cams to sinusoidal motion in
bars that drive rocker arms. Coefficients are set by positioning amplitude bars which
transmit the motion to springs on the summing lever. The summing lever adds the
)
forces on the springs to produce 20 n=1 operation. The sum is amplified and drives a
pen on the paper platen [8].
The machine stood at University of Illinois’s Department of Mathematics for years.
It was revived, maintained and operated by W. S. Hammack and two colleagues at
Engineerguy [8].
ˆ T
1
a0 = f (t) dt (5.13)
T 0
ˆ T
2
an = f (t) cos nω0 t dt and (5.14)
T 0
Fig. 5.2 Square wave with 50% duty cycle and even symmetry
Example 5.3 Find the Fourier series coefficients of the function shown in Fig. 5.2.
The function with period T is given as
⎧
⎪
⎨1, |t| <
T
f (t) = 4
T .
⎪
⎩0,
T
< |t| <
4 2
Complex series coefficients are obtained from Eqs. (5.10) and (5.9) as:
ˆ T /2 ˆ T /4
1 −j nω0 t 1
cn = f (t) e dt = 1 · e−j nω0 t dt
T −T /2 T −T /4
ˆ T /4
1
= e−j nω0 t dt
T −T /4
T /4
1 e−j nω0 t e−j nω0 T /4 − ej nω0 T /4
= · = .
T −j nω0 −T /4 −j nω0 T
because f (t) is even-symmetric; only cosine terms, which are also even-symmetric,
exist in the Fourier series expansion.
We can synthesize f (t) using these coefficients:
∞ n
1 1 −n −j nω0 t 1
f (t) = + · sinc e + · sinc ej nω0 t
2 2 2 2 2
n=1
1
∞ n
= + sinc cos nω0 t
2 2
n=1
∞
1 sin (nπ/2)
= + cos nω0 t
2 nπ/2
n=1
1 2
∞
1 nπ
= + sin cos nω0 t.
2 π n 2
n=1
nπ
Since sin = 0 for n even, this can also be written as
2
1 2 1 1 1
f (t) = + cos ω0 t − cos 3ω0 t + cos 5ω0 t − cos 7ω0 t − · · ·
2 π 3 5 7
(5.17)
∞
1 2 (−1)n+1
= + cos [(2n − 1) ω0 t] . (5.18)
2 π 2n − 1
n=1
Figure 5.3 depicts twenty of the Fourier series coefficients and the square wave
synthesized from these coefficients. As the number of coefficients used is increased,
the synthesized waveform approaches (converges) to the square wave. However the
oscillations close to the discontinuities remain to exist, although squeezed closer
and closer to the discontinuities. We take up this phenomenon in Sect. 5.7.
Example 5.4 Find the Fourier series coefficients of periodic unit impulse train
shown in Fig. 5.4.
The period of the impulse train is seen to be T0 . The impulse train can be
expressed as an infinite sum of shifted unit impulses:
∞
x (t) = δ (t − kT ) . (5.19)
k=−∞
270 5 The Fourier Series
Fig. 5.3 (a) Twenty coefficients of f (t) in Example 5.3. Since in this example all the phases are
0, these coefficients are the amplitudes of the harmonics. Further note that the even harmonics are
all 0. This is because the square wave’s duty cycle is 50%. (b) f (t) and its construction from
twenty coefficients. Note the Gibbs phenomenon at discontinuities
´ T /2
Within the limits of the integral −T /2 δ (t − kT ) e−j nω0 t dt the impulse function
at the origin only is integrated and all the other impulses δ (t − kT0 ) are excluded.
Thus we have
ˆ T /2
1 1 −j nω0 ·0
cn = δ (t) e−j nω0 t dt = ·e
T −T /2 T
1
cn = = f0 .
T
We see that all of the Fourier series coefficients are real and equal to f0 . Thus we
arrive at an interesting result:
∞
& ∞
'
δ (t − nT ) = f0 1 + 2 cos (nω0 t) . (5.21)
n=−∞ n=1
Periodicity Issues As is apparent from Eq. (5.9), the period T is involved in the
calculation of the Fourier series coefficients; it appears as the limits of a definite
integral as well as a divisor of this integral. Usually more sophisticated periodic
waveforms are constructed from simpler periodic waveforms. Addition, subtraction,
multiplication, and squaring may affect the periodicity drastically.
Although every case must be examined individually, we can make some general
statements about compound functions synthesized from simple ones.
1. Addition and subtraction: If two functions of periodicities T1 and T2 are added
or subtracted, the resulting function has a period that is equal to the least common
multiple of T1 and T2
T = lcm (T1 , T2 )
While the periodicity of x (t) is π , half of the period of cos t, the period of y (t)
remains equal to 2π , i.e., the period of cos t.
3. Product of sines: This is also called modulation and results in the sum and
difference frequencies from the multiplying functions. If two sine functions with
frequencies f1 and f2 are multiplied, the multiplication produces two terms with
frequencies f1 + f2 and f1 − f2 , assuming f1 > f2 . Then the period of the
1 1
modulation is the least common multiple of and
f1 + f2 f1 − f2
1 1
T = lcm , .
f1 + f2 f1 − f2
As will be apparent shortly, the Fourier series coefficients are sensitive to the shape
of f (t) and its location on the t axis. However, scaling the frequency of f (t) does
not affect the coefficients. We can perhaps call this the “zeroth” property of the
Fourier series. Although quite obvious, we can prove its validity using the defining
equation of the Fourier series (5.9). Consider a function f (t) with period T whose
Fourier series coefficients are cn . Assume that the argument of f (t) is scaled by
a positive factor a, that is, we generate another function f (at) by stretching or
compressing f (t) . This forces the period of f (at) to be scaled as T /a, and
the angular frequency becomes aω0 . Then the Fourier series coefficients of f (at)
become
ˆ
1
kn = f (at) e−j nω0 t dt,
T /a T /a
where kn are the Fourier series coefficients of f (at). With a change of variable
u = at we have
ˆ ˆ
a du 1
kn = f (u) e−j naω0 t = f (u) e−j nω0 at du
T T a T T
ˆ
1
= f (u) e−j nω0 u du
T T
= cn
which proves our assertion. With a = −1, kn becomes the complex conjugate of cn
(time reversal property).
Fourier series definition (Eqs. (5.6), (5.7) and (5.8)) gives us shortcuts into cal-
culating the Fourier series coefficients as well as insight into the nature of the series
concerning certain situations related to f (t) and time-axis operations on f (t).
These special situations are classified below as symmetry conditions and time-axis
5.4 Properties of the Fourier Series 273
5.4.1 Linearity
If x1 (t) and x2 (t) are periodic functions with periodicities T1 and T2 , their sum
x1 (t) + x2 (t) is also a periodic function with a period T . As discussed in Sect. 5.3,
the period of the new function is the least common multiple of T1 and T2 .
T = lcm (T1 , T2 ) .
The Fourier coefficients of the periodic function x1 (t) + x2 (t) is determined over
the common period T . Hence we obtain
ˆ
1 2π nt
cn = [x1 (t) + x2 (t)] exp −j dt
T T T
ˆ ˆ
1 2π nt 1 2π nt
= x1 (t) exp −j dt + x2 (t) exp −j dt
T T T T T T
cn = c1n + c2n .
Thus the combined Fourier series coefficients of the sum of periodic functions is
the sum of individual Fourier series coefficients of the involved functions.
where fe (t) and fo (t) are the even and odd parts of f (t). The even and odd parts
can be readily obtained from f (t) as follows
f (t) + f (−t)
fe (t) = ,
2
f (t) − f (−t)
fo (t) = .
2
Thus the symmetry properties outlined below may be applied to non-symmetric
functions by decomposing them into even and odd parts. Since the symmetricity is
T T
about the vertical axis, we perform the integration from − to to determine the
2 2
Fourier series coefficients.
We identify three symmetry conditions below.
Even Symmetry
Since f (t) sin (nω0 t) is an odd function, the integrand of the second integral is odd
and the integral vanishes. f (t) cos (nω0 t) is an even function and its integral from
T T T
− to is twice the integral from 0 to . Thus we get
2 2 2
ˆ T /2
2
c0 = f (t) dt
T 0
ˆ T /2
2
cn = f (t) cos (nω0 t) dt
T 0
ˆ
2 T/2
c−n = f (t) cos (−nω0 t) dt
T 0
= cn .
5.4 Properties of the Fourier Series 275
An = 2cn , (n = 0)
ˆ
4 T/2
= f (t) cos (nω0 t) dt.
T 0
Since the imaginary part vanishes θn = 0. We observe that the Fourier series
coefficients of even functions are all real, and comprise all cosine terms and no
sine terms. Even-periodic functions can be constructed from cosine functions which
are themselves even.
Example 5.5 Determine the Fourier series coefficients for the full-wave rectified
cosine function.
Rectified cosine function f (t) = |cos t| has a period of π instead of 2π and even-
symmetric, i.e., cos (−t) = cos t. The complex Fourier coefficients are given by
ˆ π/2
1 2π
cn = cos t e−j 2nt dt because ω0 = =2
π −π/2 π
ˆ π/2
2
= cos t cos 2nt dt
π 0
ˆ π/2 ˆ π/2
1
cn = cos (2n + 1) t dt + cos (2n − 1) t dt
π 0 0
n+1
2 (−1)
= · and
π 4n2 − 1
ˆ
2 π/2 2
c0 = cos t dt = .
π 0 π
Thus
2
A0 = c0 =
π
An = 2 |cn |
4 1
An = · 2
π 4n − 1
θn = (−1)n+1 π.
Hence we can expand the rectified cosine function into a Fourier series as
∞
2 4 (−1)n+1
f (t) = + · cos 2nt.
π π 4n2 − 1
n=1
276 5 The Fourier Series
Fig. 5.5 Full-wave rectified cosine function constructed from (a) 3, (b) 4, (c) 5 and (d) 50
coefficients
Odd Symmetry
Fig. 5.6 Sawtooth function (a) synthesized from 15 Fourier series coefficients shown in (b)
Since f (t) cos (nω0 t) is an odd function the first integral vanishes. f (t) sin (nω0 t)
is an even function; therefore we obtain
ˆ T /2
2
cn = −j f (t) sin (nω0 t) dt
T 0
c0 = 0
A0 = c0 = 0
ˆ
4 T /2
An = f (t) sin (nω0 t) dt
T 0
π ´ T /2
θn = − · sgn 0 f (t) sin (nω0 t) dt ,
2
where sgn (·) is the signum function defined as
⎧
⎪
⎪
⎨1 x>0
sgn (x) = 0 x=0.
⎪
⎪
⎩−1 x<0
Odd functions have Fourier series coefficients which are all imaginary and
comprise all sine terms. Furthermore, there is no DC term. Odd functions can be
constructed from sine functions which are themselves odd.
Example 5.6 Compute the Fourier series coefficients for
f (t) = t, −π < t ≤ π
278 5 The Fourier Series
Solution:
ˆ T /2
2
cn = −j f (t) sin (nω0 t) dt, (n = 0)
T 0
ˆ π ˆ
2 2π 1 π
= −j t sin n · t dt = −j t sin (nt) dt
2π 0 2π π 0
j sin (nt) − nt cos (nt) π
=−
π n2 0
(−1)n
cn = j · .
n
Thus we get
A0 = 0
2
An =
n
π
θn = (−1)n ·
2
and
∞
(−1)n+1
f (t) = 2 · sin (nt)
n
n=1
1 1 1
f (t) = 2 sin t − sin 2t + sin 3t − sin 4t + . . . .
2 3 4
Half-Period Symmetry
T
A function is half-period symmetric if f t− = −f (t). Then the Fourier
2
series coefficients can be found from
ˆ 0 ˆ T /2
cn T = f (t) e−j nω0 t dt + f (t) e−j nω0 t dt
−T /2 0
ˆ 0 ˆ T /2
T
= −f t+ e−j nω0 t dt + f (t) e−j nω0 t dt.
−T /2 2 0
5.4 Properties of the Fourier Series 279
T
With a change of variables u = t + and du = dt, we get
2
ˆ T /2 ˆ T /2
cn T = −f (u) e−j nω0 (u−T /2) du + f (t) e−j nω0 t dt
0 0
ˆ T /2 ˆ T /2
= −ej nω0 T /2 f (u) e−j nω0 u du + f (t) e−j nω0 t dt
0 0
ˆ T /2 ˆ T /2
= −ej nπ f (t) e−j nω0 t dt + f (t) e−j nω0 t dt.
0 0
As in the case of odd functions, the DC term and even harmonics vanish from the
series.
Example 5.7 Find the Fourier series coefficients of the following function shown in
Fig. 5.7a:
!
−t − π, −π ≤ t < 0
f (t) =
t, 0 ≤ t < π.
This function is half-period symmetric. The portion of f (t) for 0 ≤ t < π is the
same as the sawtooth of the previous example. Therefore cn = 0 for neven. For
nodd we get
ˆ
1 π 1 (1 + j nπ ) e−j nπ − 1 1 (1 + j nπ ) (−1)n − 1
cn = te−j nt dt = · = ·
π 0 π n2 π n2
1 (−1 − j nπ ) − 1 1 −2 − j nπ
= · 2
= ·
π n π n2
1 2
=− +j .
n nπ
280 5 The Fourier Series
Fig. 5.7 (a) Half-period symmetric sawtooth and its construction from 20 FS coefficients, (b)
Magnitude, (c) Angle of FS coefficients
With c0 = 0 we obtain
A0 = 0
⎧
⎪
⎨0 , n even
An = 2 4
⎪
⎩ 1+ 2 2 , n odd
n n π
nπ
θn = π + tan−1 .
2
Thus
∞ nπ
2 4
f (t) = 1 + 2 2 cos nt + π + tan−1 n odd
n n π 2
n=1
∞
Let f (t) = cn ej nω0 t be the Fourier series expansion of a function f (t) whose
−∞
period is T . Then shifting f (t) by τ in time generates a proportional phase shift in
cn without affecting |cn |.
Let g (t) = f (t − τ ). Let kn denote the Fourier series coefficients of g (t). Then
ˆ T
1
kn = g (t) e−j nω0 t dt
T 0
ˆ T
1
= f (t − τ ) e−j nω0 t dt
T 0
ˆ T −τ
1
= f (u) e−j nω0 (u+τ ) du
T −τ
ˆ T
1
= e−j nω0 τ · f (u) e−j nω0 u du
T 0
= e−j nω0 τ cn .
2π
Since ω0 =
T
2π
nω0 τ = n · ·τ
T
τ
= 2π n ·
T
which appears as the shift of cn phase.
τ
kn = cn exp −j 2π n ·
T
τ
arg (kn ) = arg (cn ) − 2π n · .
T
Time reversal is the flipping of f (t) about t = 0, that is, substituting −t for t.
Thus g (t) = f (−t) has the same appearance as f (t) except that “past” becomes
“future” and future becomes past. As usual the Fourier series coefficients are
ˆ T ˆ T
1 1
kn = g (t) e−j nω0 t dt = f (−t) e−j nω0 t dt.
T 0 T 0
282 5 The Fourier Series
Hence
∞
g (t) = f (−t) = kn ej nω0 t
n=−∞
Alternatively, Eq. (5.22) can be obtained from the synthesis equation by using
the fact that f (t) is a real-valued function. Hence taking the conjugate of
∞
f (−t) = cn e−j nω0 t
n=−∞
we obtain
∞
∗ ∞
∗ −j nω0 t
[f (−t)] = cn e = cn∗ ej nω0 t .
n=−∞ n=−∞
[f (−t)]∗ = f (−t)
∞ ∞
cn∗ ej nω0 t = kn ej nω0 t
n=−∞ n=−∞
cn∗ = kn .
We conclude that the magnitudes of the basis functions remain the same, but their
phases lag by 2θn .
5.4 Properties of the Fourier Series 283
5.4.5 Differentiation
If a periodic function is the derivative of another function, then its Fourier series
components are j ω0 n times the coefficients of the second function. Let
df (t)
g (t) =
dt
f (t) can be expressed by the synthesis equation
∞
f (t) = cn ej nω0 t .
n=−∞
Hence we see that the Fourier series coefficients for f (t) are
kn = j nω0 cn .
Fig. 5.8 (a) Double impulse train can be obtained by differentiating a symmetric, 50% duty cycle
square wave function which is delayed by a quarter period; (b) FS coefficients of the square wave
before delay and after differentiating the delayed function; (c) Double impulse train synthesized
from 40 FS coefficients
Example 5.3 by T /4 (= 0.5). The double impulse train function, y (t) is the
derivative of the shifted square wave function x (t), that is,
∞ ∞
y (t) = δ (t − 2n) − δ [t − 2n − 1]
n=−∞ n=−∞
dx (t)
= .
dt
When finding the Fourier series components of x (t) we first apply the time-shift
property on f (t). Afterwards we apply the differentiation property to find the
Fourier series coefficients of y (t). Let us represent x (t) and y (t) as
∞
x (t) = cn ej nω0 t
n=−∞
5.4 Properties of the Fourier Series 285
and
∞
y (t) = kn ej nω0 t ,
n=−∞
2π
where ω0 = = π . From Example 5.3 and time-shift property we can write
2
1 sin (nπ/2)
cn = e−j nω0 τ · ·
2 nπ/2
sin (nπ/2) = 0 if n is even; hence y (t) consists of odd harmonics only. The
amplitude of the nth harmonic is therefore
An = k−n + kn
= 2 cos [(n − 1) π/2] sin (nπ/2)
!
1·1 n = 1, 5, 9, . . . , 4k + 1, . . .
=2
(−1) · (−1) n = 3, 7, 11, . . . , 4k + 3, . . .
!
0 n = 0, 2, 4, . . .
An =
2 n = 1, 3, 5, . . .
It is interesting to note that Fourier coefficients for simple impulse train are 0.5
for all n, while for the double impulse train all even harmonics (including the DC)
vanish and the odd harmonic amplitudes are twice the values of those for the simple
impulse train. As illustrated in Fig. 5.8, we can synthesize y (t) using An = 2 |cn |
as
∞
y (t) = 2 cos (nπ t) .
n=1,3,5,...
286 5 The Fourier Series
5.4.6 Integration
If a periodic function is the integral of another function, then its Fourier series
components are the coefficients of the second function divided by j ω0 n. This
property follows from differentiation property we just derived. However note that
the average value of the function integrated must be zero; otherwise, the integration
will generate an aperiodic signal for which we cannot talk about Fourier series
analysis. With this condition imposed we have
ˆ t
g (t) = f (τ ) dτ
cn
kn = .
j nω0
Let cn and kn be the Fourier series coefficients of x (t) and y (t), respectively. We
can obtain x (t) from the square wave shown in Fig. 5.8 by multiplying it by 2 and
subtracting 1 from the product. c0 was 0.5 in that example. Multiplication by 2 then
Fig. 5.9 (a) Triangular wave can be obtained from a zero-average square wave by integration, (b)
triangular wave synthesized from 49 odd FS coefficients
5.5 Parseval’s Relation 287
cn
kn =
j nπ
⎧
⎨ 0, n even
= 4
⎩− , n odd
n2 π 2
Figure 5.9b shows y (t) synthesized using An = 2 |cn | and θn = π as
∞
1
y (t) = −8 cos (nπ t) .
n2 π 2
n=1,3,5,...
Suppose that a periodic voltage function is applied across a 1-ohm resistance. The
energy dissipated by the resistance during one period is given by
ˆ T
2
E= f (t) dt.
0
Let us substitute into this expression the Fourier series representation of f (t):
ˆ T ∞
2
E= cn ej nω0 t dt
0 n=−∞
ˆ ∞ ∞
T
j mω0 t −j nω0 t
= cm cn e e dt
0 m=−∞ n=−∞
∞ ∞ ˆ T
= cm cn ej (m−n)ω0 t dt.
m=−∞ n=−∞ 0
288 5 The Fourier Series
Thus
ˆ T ∞
2
E= f (t) dt = T |cn |2 . (5.23)
0 n=−∞
ˆ T ∞
1 2
f (t) dt = c02 + 2 |cn |2 (5.24)
T 0 n=1
∞
1
= A20 + A2n (5.25)
2
n=1
1
∞
= a02 + an2 + bn2 . (5.26)
2
n=1
It is curious to know whether the assertion made by Fourier that periodic functions
can be expressed by an infinite sum of harmonics holds for every periodic function;
if not, under which conditions it holds. When the assertion does hold, what does
it mean that the Fourier series expansion converges to the function? A thorough
discussion of this topic is beyond the scope of this text. Nevertheless, we will talk
about this briefly.
5.6 Convergence of Fourier Series 289
N
SN (t) = cn ej ω0 t .
n=−N
f (t0+ ) + f (t0− )
lim SN (t0 ) =
N →∞ 2
and to f (t) where f (t) is continuous. In Fig. 5.10 note that the Fourier series passes
through the midpoint of the jump in square wave.
There is also a mean square error interpretation of the Fourier series when the
periodic function is square integrable over a period. Let f (t) have a finite energy
over a period
ˆ T
[f (t)]2 dt < ∞
0
f (t) − SN (t) is the error between the function and its partial Fourier series sum
representation. This difference can be positive or negative, but its square is always
positive and can be viewed as the power of the error. Integrating this error over one
period yields the error energy in one period:
ˆ T
[f (t) − SN (t)]2 dt.
0
290 5 The Fourier Series
Fig. 5.10 Gibbs phenomenon for a square wave function. Oscillations are shown for N = 2, 4, 10
and 50
it in 1848 [19], but his work went unnoticed. Then in 1898 J. Willard Gibbs,
completely unaware of Wilbraham’s work, published a paper [20] that described
the phenomenon for a sawtooth function. Now Willard Gibbs is credited for the
work and the effect is known as Gibbs phenomenon.
A thorough mathematical treatment of Gibbs phenomenon is beyond the scope
of this text.
2π
ω0 = rads/sample. (5.27)
N
Equation (5.6) in Sect. 5.2 started out writing an approximation for continuous-
time periodic signal as the sum of its projections on infinitely many basis functions
ej nω0 t , that is
∞ ∞
:
x (t) = cn ej nω0 t = < x (t) , ej nω0 t > ej nω0 t
n=−∞ n=−∞
292 5 The Fourier Series
from which we found those projections, which we aptly called the Fourier series
coefficients as
ˆ
1
cn =< x (t) , ej nω0 t > = x (t) e−j nω0 t dt.
T T
We recall that all the harmonics nω0 for continuous-time periodic signals are
distinct.
Our findings with the continuous-time periodic signals are inspiration and
motivation for us to explore the discrete-time periodic signals. Thus with n denoting
the discrete time, we set out to write an approximation for the discrete-time signal
∞
x̂ [n] = < x [n] , ej kω0 n > ej kω0 n . (5.28)
k=−∞
Our new bases for the discrete case are ej kω0 n , k being the harmonic number.
Here we pause for a moment to investigate the behavior of ej kω0 . We evaluate the
k + N-th base
2π
k j 2π
ej (k+N )ω0 = ej N e N N = ej kω0 ej 2π
= ej kω0 .
This shows that the k-th and the k + N-th harmonics are identical. This leaves us
with N bases so that Eq. (5.28) can now be written as
m+N −1 m+N −1
:
x [n] = < x [n] , ej kω0 n > ej kω0 n = ck ej kω0 n .
k=m k=m
5.8 Discrete-Time Fourier Series 293
ck =< x [n] , ej kω0 n > is the projection of x [n] on the base function ej kω0 n and is
called k-th coefficient of the discrete-time Fourier series (DTFS). k may run from
any m to m + N − 1 assuming N consecutive integer values. Now that there are a
finite number of bases, the approximation in Eq. (5.28) turns into an exact relation.
Depending on the symmetry conditions of x [n], and whether N is even or odd, an
appropriate m can be selected. Keeping this in mind, we can settle for the following
expression
N −1
x [n] = ck ej kω0 n (0 n N − 1) . (5.29)
k=0
C = B−1 X.
However we can pursue a simpler approach to find the DTFS coefficients. Summing
x [0] through x [N − 1] and multiplying by e−j mω0 n , we have
N −1 N −1 N −1
e−j mω0 n x [n] = e−j mω0 n ck ej kω0 n (0 n N − 1)
n=0 n=0 k=0
N −1 N −1
= ck ej (k−m)ω0 n .
n=0 k=0
N −1 N −1 N −1
x [n] e−j mω0 n = ck ej (k−m)ω0 n .
n=0 k=0 n=0
294 5 The Fourier Series
N −1
!
j 2π N, k = 0, ±N, ±2N, . . .
e N kn =
n=0 0, otherwise.
Thus we get
N −1
x [n] e−j mω0 n = cm N
n=0
N −1
1
cm = x [n] e−j mω0 n .
N
n=0
We can combine this result with (5.29) to define the discrete-time Fourier series
(DTFS) by the following two equations:
N −1
x [n] = X [k] ej ω0 kn , (0 n N − 1) (5.31)
k=0
N −1
1
X [k] = x [n] e−j ω0 kn , (0 k N − 1) . (5.32)
N
n=0
The DTFS relations of Eqs. (5.31) and (5.32) can be conveniently denoted by the
pairing
DT F S
x [n] ←→ X [k] .
In (5.31) and (5.32), ck is replaced by X [k] to denote the discrete frequency. Like for
the continuous-time, |X [k]| and arg (X [k]) are called the magnitude and the phase
of the discrete-time signal, respectively. Continuous signal quantities t, and T are
replaced by n and N for discrete-time signals. Some texts prefer to use the notation
0 for discrete-time frequency, and ω0 for the continuous-time. But we use ω0 for
both as long as there is no ambiguity when we talk about frequencies in two domains
at the same time. For the continuous signal we have an infinite number of bases, but
the DTFS has only N bases. Therefore, while the continuous periodic signal can
be synthesized by summing an infinite number of harmonics, the discrete periodic
signal is synthesized by summing N harmonics only, hence convergence issues do
not exist for DTFS. Also for continuous-time signals, the equality is hampered by
the Gibbs phenomenon.
5.8 Discrete-Time Fourier Series 295
X [N − k] = X∗ [k] .
N −1
1
X [N − k] = x [n] exp [−j ω0 (N − k) n] .
N
n=0
Thus
N −1
1
X [N − k] = x [n] exp (−j ω0 Nn) exp (j ω0 kn)
N
n=0
N −1 N −1
1 2πNn 1
= x [n] e−j N ej ω0 kn = x [n] e−j 2π n ej ω0 kn
N N
n=0 n=0
N −1
! N −1
(∗
1 1
= x [n] ej ω0 kn = x [n] e−j ω0 kn
N N
n=0 n=0
∗
= X [k] .
296 5 The Fourier Series
N −1
x [n] = X [k] ej ω0 kn
k=0
N −1
x [n] = X [k] ej ω0 kn
k=0
⎧
⎪
⎪
int(N/2)
⎪
⎪ X [k] cos (knω0 + θk ) ,
⎪
⎨2 n odd
= X [0] + k=1
N/2−1 (5.33)
⎪
⎪
⎪
⎪ X [k] cos (knω0 + θk ) + (−1)n X N
⎪
⎩2 2 , n even.
k=1
X [0] is the DC (average) value of the periodic sequence. If N is odd, k runs from 1
to int (N/2). If N is even, X [k] and X [N − k] are the same coefficients. Therefore
the sum runs to k = N2 − 1 and we add we add a term X N2 cos (π n) =
X N2 (−1)n that corresponds to X [k] and X [N − k]. For example if N = 5,
then the sum runs from 1 to 2. However if N = 6, then the sum runs from 1 to 2 but
we add a term X [3] cos (π n) to the sum.
Example 5.10 Let x [n] = . . . , 2, 1, 0, 3, 2, 1, 0, 3, 2, . . . be a periodic signal
↑
shown in Fig. 5.12 The arrow indicates the entry x [0]. Determine the DTFS
coefficients.
The period is seen to be N = 4 and ω0 = 2π/4 = π/2. Hence the DTFS
coefficients can be found from Eq. (5.32):
3 knπ
1 −j
X [k] = x [n] e 2
4
n=0
1 k·0·π k·1·π
X [k] = 3 · exp −j + 2 · exp −j
4 2 2
k·2·π k·3·π
+1 · exp −j + 0 · exp −j
2 2
1 kπ
= 3 + 2 · exp −j + 1 · exp (−j kπ )
4 2
1
= 3 + 2 · (−j )k + (−1)k .
4
298 5 The Fourier Series
Fig. 5.12 (a) DTFS coefficients of Example 5.10, (b) Discrete-time signal synthesized from
coefficients using Eq. (5.31)
X [0] = 1.5
1−j e−j π/4
X [1] = = √
2 2
X [2] = 0.5
1+j ej π/4
X [3] = = √ .
2 2
Fig. 5.13 Synthesizing a discrete-time signal using its DTFS coefficients. Equation (5.33) was
used for synthesis. The synthesis was performed using partial sums. The waveform has a period
N = 10. Therefore we need to use six coefficients to build the signal. The figure labeled M = 1
used X [1] other than X [0]. The next figure labeled M = 2 used X [0], X [1] and X [2]. The figure
at the bottom use all the coefficients needed, that is, X [0] through X [6]
300 5 The Fourier Series
x [n] can be built from these coefficients using Eq. (5.31). The direct synthesis
proceeds as follows
3
knπ
x [n] = X [k] ej 2
k=0
4/2 2 π
x [n] = X [0] + 2 |X [k]| cos (knω0 + θk ) = 1.5 + 2
|X [k]| cos kn + θk
2
k=1 k=1
nπ
2nπ
= 1.5 + 2 cos |X [1]| cos + θ1 + 2 cos |X [2]| cos + θ2
2 2
2 nπ π 1
= 1.5 + √ cos − + 2 · cos (nπ)
2 2 4 2
√ nπ π
= 1.5 + (−1)n + 2 cos − .
2 4
Example 5.11 This example illustrates the conjugate symmetry of the DTFS coef-
ficients. In Sect. 5.3 we had calculated the Fourier series coefficients of a periodic
pulse train. In this example we calculate the DTFS coefficients of a periodic discrete-
time pulse train. Let the signal be defined by
!
1 0≤n≤M −1
x [n] =
0 M ≤n≤N −1
as shown in Fig. 5.11 where M = 3 and N = 32 have been selected. The DTFS
coefficients are given by Eq. (5.32). Substituting the signal values x [n] as below we
have
N −1
1
X [k] = x [n] e−j ω0 kn
N
n=0
5.8 Discrete-Time Fourier Series 301
M−1 N −1
1 −j ω0 kn −j ω0 kn
= 1·e + 0·e
N
n=0 n=M
M−1 n
1
= e−j ω0 k .
N
n=0
M 3
X [0] = = .
N 32
We immediately notice that X [k] is a geometric series for k = 0. Therefore we can
write
1 1 − exp (−j ω0 Mk)
X [k] = ·
N 1 − exp (−j ω0 k)
1 exp (−j ω0 Mk/2) exp (j ω0 Mk/2) − exp (−j ω0 Mk/2)
= · ·
N exp (−j ω0 k/2) exp (j ω0 k/2) − exp (−j ω0 k/2)
1 sin (ω0 Mk/2)
= · exp [−j ω0 (M − 1) k/2] .
N sin (ω0 k/2)
Below we show the magnitude part of the conjugate symmetry for the DTFS
coefficients we have found.
1 sin (3kπ/32)
X [k] = , then we can write
32 sin (kπ/32)
1 sin [3 (N − k) π/32] 1 sin [3 · 32π/32 − 3kπ/32]
X [N − k] = =
32 sin [(N − k) π/32] 32 sin [32π/32 − kπ/32]
1 sin [3π − 3kπ/32]
=
32 sin [π − kπ/32]
1 sin (3π ) cos (3kπ/32) − cos (3π ) sin (3kπ/32)
=
32 sin (π ) cos (kπ/32) − cos (π ) sin (kπ/32)
302 5 The Fourier Series
Fig. 5.14 DTFS coefficients for Example 5.11. (a) The magnitude is even-symmetric about k =
32/2 = 16. (b) The argument is odd-symmetric about the same k
= X [k] .
Figure 5.14 shows the magnitude and phase of the DTFS coefficients. Notice the
even and odd symmetry in the magnitude and phase. In the figure the magnitude and
phase of X [k] are plotted versus the harmonic index k. Alternatively we could have
used the angular frequency ω = 2π k/N instead of k.
If the signal is composed of sinusoids, we can replace the sinusoids with
combinations of complex exponentials. This rids us of using Eq. (5.32) and enables
us to obtain the coefficients faster. We illustrate this with an example.
Example 5.12 Find
the DTFS
coefficients
by inspection for the signal x [n] =
2π n 16π n
1 + 0.5 cos cos shown in Fig. 5.15. x [n] is the product of
32 32
two sinusoidal sequences. For the first sinusoid the fundamental period N is 32,
2π
hence the fundamental frequency is ω1 = rad/sample. The frequency of the
32
8 · 2π
second sinusoid is obtained from ω2 = = 8ω1 rad/sample. We substitute the
32
complex exponential forms of these sinusoids. Hence
2π n 16π n
1 + 0.5 cos cos
32 32
= [1 + 0.5 cos ω1 n] cos ω2 n
= cos ω2 n + 0.5 cos (ω1 n) (cos ω2 n)
jω n
ej 8ω1 n + e−j 8ω1 n e 1 + e−j ω1 n ej ω2 n + e−j ω2 n
= + 0.5 ·
2 4
5.8 Discrete-Time Fourier Series 303
Fig. 5.15 Example 5.12 (a) Discrete-time signal, (b) DTFS coefficients
x [n] = 0.5 ej 8ω1 n + e−j 8ω1 n + 0.25 ej 9ω1 n + e−j 7ω1 n + ej 7ω1 n + e−j 9ω1 n
= 0.125ej 7ω1 n + 0.5ej 8ω1 n + 0.125ej 9ω1 n + 0.125ej 23ω1 n + 0.5ej 24ω2 n
+0.25ej 25ω1 n
31
= X [k] ej ω1 kn .
k=0
Hence comparing the coefficients of both sums we get X [7] = 0.125, X [8] =
0.5, X [9] = 0.125, X [23] = 0.125, X [24] = 0.5, X [25] = 0.125. All the other
harmonics are zero.
then the periodic convolution of x [n] and y [n] also has a length of N . We use the
symbol to denote periodic convolution.
Let X [k] and Y [k] denote the DTFS coefficients of x [n] and y [n], respectively,
and consider a third sequence z [n] with DTFS coefficients
Since X [k] and Y [k] are N-periodic in k, their product Z [k] is also N-periodic in
k. Thus we can write
N −1 N −1
1 2π 1
Z [k] = z [n] e−j N kn
= z [n] WNkn ,
N N
n=0 n=0
where, to simplify the notation, we use the short-hand notation WNkn for the complex
2π kn
exponential e−j N .2 We assert that z [n] is N -periodic in n and can be expressed
by the convolution of the two sequences x [n] and y [n]. Below we prove that the
periodic convolution has DTFS coefficients given by Eq. (5.34). Assuming z [n] is
indeed equal to the periodic convolution of the two signals we can write
N −1
z [n] = x [m] y [n − m]
m=0
N −1 N −1
−(n−m)k
= x [m] Y [k] WN
m=0 k=0
N −1 N −1
= x [m] Y [k] WN−nk WNmk .
m=0 k=0
N −1
N −1
z [n] = Y [k] x [m] WNmk WN−nk .
k=0 m=0
But
N −1
x [m] WNmk = N X [k] ,
m=0
2 This notation is called the twiddle factor and will later be used when we study the FFT in Chap. 7.
5.8 Discrete-Time Fourier Series 305
hence
N −1 N −1
z [n] = N Y [k] X [k] WN−nk = Z [k] WN−nk .
k=0 k=0
DT F S
x [n] y [n] ←→ X [k] Y [k] .
N −1
z [n] = x [m] y [n − m] . (5.35)
m=0
In Fig. 5.16 the periodic convolution of two periodic discrete signals, x [n] and
y [n], is illustrated. First we flip the sequence y [n] horizontally about n = 0. Then
for each value of m, we shift it to right and we perform a scalar product of the
resulting sequence and x [n]. Shifting the whole flipped y [n] sequence to right m
times is equivalent to rotating y [−n] m times to right in the interval 0 ≤ n ≤ N −1.
Like the continuous-time convolution, periodic convolution is commutative.
Therefore the roles of x [n] and y [n] in Eq. (5.35) can be interchanged. Hence we
can write
and
N −1 N −1
1 1
Z [k] = y [n] x [n] WNkn = y [n] x [n] WNkn .
N N
n=0 n=0
306 5 The Fourier Series
Fig. 5.16 Periodic convolution of the discrete signals of Example 5.13 which are periodic with
N = 6. (a) y[m − n] for 0 ≤ m ≤ 5 (b) Point-by-point calculation of z [n]
5.8 Discrete-Time Fourier Series 307
Example 5.13 Two periodic sequences with period N = 6 are specified as y [n] =
δ [n]−δ [n − 1]+δ [n − 3]+2δ [n − 4]+3δ [n − 5] and x [n] = δ [n]−δ [n − 1]+
2δ [n − 3]. Find z [n] = x [n] y [n].
Let us represent the signals as 6-dimensional vectors.
Fig. 5.17 Example 5.14. Periodic convolution through Discrete Fourier Transform
The next example illustrates how we can use Eq. (5.34) to perform periodic
convolution on discrete sequences.
Example 5.14 Two periodic sequences with period N = 8 are specified as x [n] =
δ [n] − δ [n − 1] and y [n] = δ [n] + δ [n − 1] + δ [n − 2] + δ [n − 3] − δ [n − 4] −
δ [n − 5] − δ [n − 6] − δ [n − 7]. Find DTFS coefficients of z [n] = x [n] y [n]
using Eq. (5.34) and build z [n] = x [n] y [n] from DTFS coefficients.3
1
7
1
X [k] = x [n] W8nk = 1 − W8k
8 8
n=0
and
7
1
Y [k] = y [n] W8nk
8
n=0
1
= 1 + W8k + W82k + W83k − W84k − W85k − W86k − W87k .
8
Since z [n] = x [n] y [n] we have
2 1
Z [k] = 1 − (−1)k = 1 − (−1)k .
8 4
1 1 1 1
Hence DTFS coefficients of z [n] are 0, , 0, , 0, , 0, . We can build x [n]
2 2 2 2
7
y [n] from Z [k] using the synthesis equation z [n] = Z [k] W8−nk
k=0
7
x [n] y [n] = Z [k] W8−nk
k=0
Fig. 5.19 Periodic convolution of Example 5.13. (a) The LabVIEW implementation, (b) Input sequences and their convolution
311
312 5 The Fourier Series
The other implementation involves the use of frequency domain technique and
involves the DFT function as will be explained shortly.
DTFS Coefficients in Software The math software packages all contain functions
called FFT to compute the Discrete Fourier Transform of discrete-time signals. Later
we will talk about DFT in Chap. 6 and about FFT in Chap. 7. FFT is an algorithm
to efficiently compute the DFT. DFT accepts a time sequence of length N, and
produces another sequence of length N in the discrete frequency domain. Here we
copy the definition of DFT from Chap. 6:
N −1
X [k] = x [n] WNkn
n=0
N −1
1
x [n] = X [k] WN−kn .
N
k=0
If you compare the DFT and the DTFS relations you will see that the places
1
where the factor appears are swapped. Take the discrete frequency expression of
N
DFT and the DTFS coefficients of the periodic sequences:
N −1
X [k] = x [n] WNkn (DFT) ,
n=0
N −1
1
X [k] = x [n] WNkn (DTFS) .
N
n=0
1
We notice that the factor is missing in the DFT expression. This implies that
N
we can compute the DTFS coefficients by running an FFT function, then dividing
the outcome by N . Finding the time signal is achieved by running an inverse FFT
and then multiplying the outcome by N . By carefully taking a note of where N
should stand, we can process periodic discrete-time sequences (say by filtering). We
first obtain the DTFS coefficients using FFT, then pass the coefficients through the
filter, and obtain the filter output by using the inverse FFT. We must plug in N where
they should appear in the DTFS work. The following MATLAB code distinguishes
between DFT and DTFS arrays:
5.8 Discrete-Time Fourier Series 313
The periodic convolution can be done in the frequency domain too. The process
shown in Fig. 5.20 where we use FFT is a bit tricky. The top of the figure follows
the definition of the DTFS. Since the DFT will not divide by N, we add the
divide-by-N blocks to the DFT blocks to obtain the DTFS blocks shown as dashed
rectangles. Likewise, because Z [k] = NX [k] Y [k], we add a multiply-by-N after
the multiplier. Unlike the inverse DTFS, the inverse DFT operation divides by N .
Hence we add another multiply-by-N block. These multiplications and divisions
cancel out each other. Hence if the DTFS coefficients are not required, the periodic
convolution takes the simpler form shown at the bottom. Figure 5.21 is a LabVIEW
implementation of Example 5.13.
Fig. 5.21 Implementing periodic convolution of Example 5.13 using DFT in LabVIEW
The Parseval relation for periodic discrete-time signals, like its continuous-time
counterpart, expresses the signal power in time domain and frequency domain. The
signal energy averaged over one period can be loosely called the power (in order to
talk about power, N is an integer and it has to be related to NTs , where Ts is the
sampling period)
N −1
1 2
P = x [n] .
N
n=0
)N −1
Since x [n] = k=0 X [k] WN−kn
N −1 N −1 N −1
1 1
X [k] WN−kn
2 2
x [n] =
N N
n=0 n=0 k=0
N −1
N −1 N −1 ∗
1
= X [k] WN−kn X [m] WN−mn
N
n=0 k=0 m=0
N −1
N −1 N −1
1
= X [k] WN−kn X ∗
[m] WNmn
N
n=0 k=0 m=0
N −1
&N −1 N −1 '
1 ∗ (m−k)n
= X [k] X [m] WN .
N
k=0 m=0 n=0
5.8 Discrete-Time Fourier Series 315
2π (m−k)n
= e−j
(m−k)n
WN N .
N −1 N −1
1 2 2
P = x [n] = X [k] .
N
n=0 k=0
Fig. 5.22 Parseval relation presents two alternatives to compute the signal power
316 5 The Fourier Series
consider the signal in Fig. 5.11and its DTFS coefficients in Fig. 5.14. Obviously
it is much easier to calculate the power from the time domain values than from its
DTFS coefficients.
Forrest S. Mozer exploited this property of human hearing and invented the first
speech synthesizer in 1974[citation required]. He first licensed this technology to
TeleSensory Systems, which used it in the “Speech+” talking calculator for the
blind. Later on National Semiconductor also licensed the technology, and used it
in MM54104 “DigiTalker” speech synthesizer [21].”
Fig. 5.23 Mozer Speech synthesis depends on the phase insensitivity of the human ear. (a) shows
the original waveform without phase adjustment. In (b) phases of the individual frequencies are
adjusted to make the speech symmetric about the midpoint of the recording. The portion to the
left of the mid-line at t = 0.02s is retained and stored; the portion after t = 0.02s is discarded.
Although the waveforms appear different, they are heard as the same sound
5.9 Applications of Fourier Series 317
This yields
|Yn (j ωn )| = An |H (j ωn )|
arg [Yn (j ωn )] = arg [H (j ωn )] + arg (cn ) .
Fig. 5.24 Using an RLC bandpass filter we can generate a sine wave which is the n − th harmonic
of the square wave. Tank circuit in (a) has L and C tuned to the 3rd harmonic of the square wave.
R sets the quality factor, Q, of the circuit to 100. In (b) amplitude of the sine wave is equal to the
magnitude of the 3rd harmonic, A3 , as given by the graph in (c). The voltage transfer characteristic
of the tank circuit is shown in (d). Note that the tank circuit passes the 3rd harmonic unattenuated
1
H (j ω) =
ω ωT
1 + jQ −
ωT ω
or
1
H (jf ) = ,
f fT
1 + jQ −
fT f
where Q = ωT RC = R C/L is called quality factor which determines the “sharp-
ness” of |H (j ω)|. With R = 100 ohms, L = 53.052 µH, C = 53.052 µF we get
1
fT = = 3000 Hz
2π · 53.052 · 10−6
;
53.052 · 10−6
Q = 100 ·
53.052 · 10−6
5.9 Applications of Fourier Series 319
Q = 100
we obtain
1
H (j ω) =
ω ωT
1 + j 100 −
ωT ω
1
|H (j ω)| = ;
ω ωT 2
1 + 104−
ωT ω
ω ωT
arg H (j ω) = − tan−1 100 − .
ωT ω
1
|H (j 0)| = ; 2
0 3000
1 + 104 −
3000 0
=0
π
arg H (j 0) =
2
π
y0 (t) = 5 · 0 · cos 0t + = 0 Volt
2
2. The fundamental harmonic f = 1 kHz, i.e., ω = 2π krad/sec. The Fourier series
coefficient is
2
A1 = 10 · = 6.366 Volts
π
θ1 = 0◦
320 5 The Fourier Series
1
|H (j 2000π )| = ; 2
1000 3000
1 + 104 −
3000 1000
1
≈
3 1
102 −
1 3
= 0.00375
1 3
arg H (j 2000π ) ≈ − tan−1 100 −
3 1
= − tan−1 (−800/3)
π
=
2
= 90◦
π
y1 (t) = 6.366 · 0.00375 · cos 2000π t +
2
= −0.024 sin 2000π t Volts
4. The fifth harmonic f = 5 kHz, i.e., ω = 10π krad/sec. The Fourier series
coefficient:
2
A5 = 10 · = 1.273 Volts
5π
θ5 = 0
5.9 Applications of Fourier Series 321
1 1
|H (j 10000π )| = ; 2 ≈ = 0.009375
16
5000 3000 102 ·
1 + 104 − 15
3000 5000
5 3
arg H (j 10000π ) = − tan−1 100 −
3 5
π
=−
2
= −90◦
π
y5 (t) = 1.273 · 0.009375 · cos 10000π t + 0 − = 0.012 sin 10000π t Volts
2
One can easily compute the other harmonics in this fashion. Using superposition
the tank circuit output is obtained as the sum of the individual contributions from
all harmonics:
y (t) = −0.024 sin 2000π t − 2.122 cos 6000π t + 0.012 sin 10000π t + · · · Volts
We observe that the ratio of the first harmonic to the third harmonic is
0.024
= 0.0113 and the ratios for higher harmonics are less than this value
2.122
decreasing uniformly with the harmonic number. The circuit and the input and
output waveforms are shown in Fig. 5.24a and b, respectively. Although the output
contains all the harmonics, the 3rd harmonic is dominant. This is a simple way
of producing frequency multiplication derived from a periodic input waveform
(Fig. 5.25).
Fourier Series in Software
Mathematical and circuit simulation software have functions to obtain the Fourier
series coefficients of a periodic function. Mathematical software like LabVIEW,
MATLAB, and SCILAB compute the coefficients using DFT algorithms. If the
signal period is not a power of 2, the computation is done using the normal DFT
definition. If the period is a power of 2, then the computation is done using FFT.
One basic difference between the continuous-time FS and the DFT technique is
that the DFT does not generate an infinite number of coefficients; starting from N
samples from the time domain, it generates N Fourier series coefficients. Half of
the Fourier coefficients are X [k] that correspond to c0 to cN/2−1 and the other half
are X [N − k] = X∗ [k] which correspond to c−N/2 to c−1 . This and other more
subtle differences will be discussed later in the relevant sections of Chaps. 6 and 8.
322 5 The Fourier Series
Fig. 5.25 MATLAB graph of the first twenty Fourier series coefficients for full-wave rectified
cosine wave. fft function with scaling computes the Fourier series. (Note that n starts with 1
rather than 0. This is because MATLAB arrays start with index 1 as opposed to LabVIEW which
starts with 0)
Another important point to keep in mind is the scaling of the FFT result. Recall the
definition of the Fourier series:
ˆ
1
cn = x (t) exp (−j nω0 t) dt.
T T
As we shall discover in Chap. 6, the DTF transform and its inverse are defined as
N −1
2π kn
X [k] = x [n] exp −j , and
N
n=0
N −1
1 2π kn
x [n] = X [k] exp j .
N N
k=0
N in DFT acts like T in the continuous-time FFT. Note that 1/T appears in the
calculation of the FS coefficients, which is the forward transform, whereas 1/N
appears in the inverse DFT. The computers are digital (discrete-time) devices, hence
the mathematical software that runs on computers have no choice but use the DFT.
Therefore when we use the DFT to find the FS coefficients of a periodic continuous-
time signal, we must divide the DFT result by N to comply with the continuous-time
FS definition.
5.9 Applications of Fourier Series 323
Fig. 5.26 (a) LabVIEW program to find the Fourier series coefficients for the full-wave rectified
cosine function. (b) The full-wave rectified cosine wave, (c) First twenty coefficients of cos 2nt
Below we recapitulate the full-wave rectified cosine wave of Example 5.5. Recall
that the FS coefficients of a cosine wave (whose amplitude is one) were calculated
to be
2
c0 =
π
4 (−1)n+1
cn = · (5.36)
π 4n2 − 1
for trigonometric form of FS. The MATLAB code given below, and the LabVIEW
vi shown in Fig. 5.26 produce the FS coefficients given by (5.36). You can run the
following MATLAB script to compute and display twenty Fourier series coefficients
of a full-wave rectified cosine wave:
t = -128:127; t = t*pi/128;
y = abs(cos(t));
Y = real(fft(y))/256.0;
temp = Y(1);
Y = 2*Y(1:2:256); Y(1)=temp;
stem(Y(1:21))
Problems
2. Given two functions x (t) = x (t + Tx ) and y (t) = y t + Ty . We form the
sum of the functions so that z (t) = x (t) + y (t). When finding the Fourier
series components of z (t), what should be the value of T in
ˆ T
1 2π nt
cn = z (t) exp −j dt
T 0 T
3. Find the Fourier series components of 4 cos (20π t) − 6 sin (30π t).
4. A real periodic function f (t) with angular fundamental frequency ω0 can be
expressed in Fourier Series expansion as
∞
f (t) = cn ej nω0 t
n=−∞
Show that
a0 = c0 ,
an = 2 Re {cn } ,
bn = −2 Im {cn }
Problem 7
5.9 Applications of Fourier Series 325
9. Consider a square wave with period T0 and duty cycle d as defined in Problem 7.
Show that the magnitudes of the Fourier series coefficients for a square wave
with duty cycle 1 − d and square wave with duty cycle d are the same but the
phases of the even coefficients differ by 180°.
10. A double impulse train function expressed by
∞ ∞
x (t) = δ (t − 2n) − δ [t − 2n − 1]
n=−∞ n=−∞
is the sum of two impulse train function one of which is shifted by half period
with respect to the other. Using linearity and time-shift properties obtain the
Fourier series coefficients of y (t).
11. Find the Fourier series coefficients for x (t) = cos t + sin t.
df (t)
12. Given two periodic functions f (t) and g (t) with period T0 . Let g (t) = ,
dt
∞
f (t) = cn ej nω0 t and
n=−∞
∞
g (t) = kn ej nω0 t . Prove that kn = j nω0 cn .
n=−∞
13. Given two periodic functions f (t) and g (t) with period T0 . Let g (t) =
∞
´
f (t) dt, f (t) = cn ej nω0 t and
n=−∞
∞
cn
g (t) = kn ej nω0 t . Prove that kn = .
n=−∞
j nω0
14. Given the following function
(a) Obtain the complex FS coefficients.
(b) Obtain the FS coefficients in the magnitude/phase form f (t) =
∞
An cos (nω0 t + θn ).
n=0
326 5 The Fourier Series
Problem 14
15. Obtain the Fourier series coefficients for g (t), then using the result of Prob-
lem 12 find the Fourier series coefficients for f (t).
Problem 15
16. A basic function h (t) is used to synthesize another function by two shifts
and one scaling as shown below. Find the FS coefficients of the synthesized
function.
5.9 Applications of Fourier Series 327
Problem 16
Problem 17
19. Show that the Fourier series coefficients of a half-wave rectified cosine wave is
given as
c0 = 1/π,
c1 = 0.5,
⎧
⎪
⎪
⎨0, (n odd)
cn = (n + 1) π (n − 1) π
⎪ (n − 1) sin + (n + 1) sin
⎪
⎩ π1 · 2 2 , (n even)
n −1
2
Problem 19
20. Using the Fourier series coefficients obtained in Problem 19, you can synthesize
a half-wave rectified cosine wave using the LabVIEW block diagram below.
You can specify the number of coefficients to be used for synthesis. Optionally
you can clear selected coefficients to see the effect on the waveform synthesis;
this is a nonreal-time band-reject filtering.
5.9 Applications of Fourier Series 331
Problem 20
332 5 The Fourier Series
23. Synthesize the rectified cosine function from N Fourier series coefficients using
the following SCILAB program. Run the program for N = 2, 5, 10, 20, 50, and
100. [Note: You can convert this program to a MATLAB m-file and run it on
MATLAB, or convert it to LabVIEW vi if you prefer.]
A0=2/%pi; // DC average value of Rectified Cosine function
N=50; // Number of Fourier series coefficients
A=[]; // Empty array of Fourier series coefficients
for n=1:N // Compute N coefficients
A=[A ((-1)^(n+1)*4/((4*n^2-1)*%pi))];
end
24. A discrete-time signal can be synthesized using Eq. (5.33). The discrete-time
signal in Fig. 5.13 was obtained the LabVIEW vi given in the figure.
(a) Realize the vi and try it with different periodicities and duty cycles
(b) Obtain the DTFS coefficients for a sawtooth signal, a half-wave rectified
discrete cosine signal, and full-wave rectified discrete cosine signal.
5.9 Applications of Fourier Series 333
Problem 24
Chapter 6
The Fourier Transform
6.1 Introduction
Recall that the unilateral Laplace transform has been defined in Chap. 4 as
ˆ ∞
X (s) = x (t) e−st dt,
0−
where s = σ + j ω is the
complex frequency. The unilat-
eral Laplace transform is suit-
able for solving linear differen-
tial equations with initial condi-
tions. The solution of differen-
tial equation includes the tran-
sient and the steady-state parts.
We have seen that the response
of a linear system to an exci-
tation x (t) is determined by
convolution of the input with
the impulse response, that is,
y (t) = x (t) ∗ h (t). In complex Discrete Fourier transform of an FM signal
frequency domain, the convo- shown on an oscilloscope screen. As opposed to
lution takes the form Y (s) = the continuous-time Fourier transform, DFT is
H (s) X (s). x (t) can be an calculated on a finite number of samples from
arbitrary function for which the signal
X (s) exists. An important class
of applications arises when x (t) is sinusoidal. Steady-state response to sinusoidal
excitation is of great interest to engineers. Setting σ = 0 in s = σ + j ω in the
bilateral Laplace transform, the convolution yields Y (j ω) = H (j ω) X (j ω) in
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2022 335
O. Özhan, Basic Transforms for Electrical Engineering,
https://doi.org/10.1007/978-3-030-98846-3_6
336 6 The Fourier Transform
The inner product of two functions denoted by x (t) , y (t) is interpreted as the
projection of x (t) on y (t) or vice versa. The inner product of x (t) and y (t) is
defined as
ˆ ∞
x (t) , y (t) = x (t) y ∗ (t) dt.
−∞
Given a function of time x (t), its Fourier transform is defined as the projection
of x (t) on the basis vector ej 2πf t and is given by the inner product of x (t) and
ej 2πf t :
6 7
X (jf ) = x (t) , ej 2πf t
ˆ ∞
= x (t) e−j 2πf t dt
−∞
provided that the ROC of the bilateral Laplace transform of x (t) includes the j ω-
axis. Likewise the inverse transform is the projection of X (jf ) on the basis vector
e−j 2πf t and is expressed as
6 7
x (t) = X (jf ) , e−j 2πf t
ˆ ∞
= X (jf ) ej 2πf t df.
−∞
This is a popular form of the Fourier transform which uses f instead of ω with
the property that
66 7 7
x (t) = x (t) , ej 2πf t , e−j 2πf t
6.2 Definition of the Fourier Transform 337
ˆ ∞ ˆ ∞
−j 2πf u
x (t) = x (u) e du ej 2πf t df (6.1)
−∞ −∞
which simply states that x (t) is given by the inverse Fourier transform of its Fourier
transform, if the Fourier transform exists. Using angular frequency, we have ω =
2πf instead of f . In this case dω = 2π df , and we get
ˆ ∞
X (j ω) = x (t) e−j ωt dt (6.2)
−∞
ˆ ∞
1
x (t) = X (j ω) ej ωt dω, (6.3)
2π −∞
1
where a factor of is introduced into the x (t) expression.
2π
In LTI systems the Fourier transform arises when we attempt to excite an
LTI system with a complex exponential ej ωt . Let h (t) and y (t) denote the
impulse response and the output of the system to an arbitrary input x (t) = ej ωt ,
respectively. y (t) is given by the convolution of the impulse response and the
complex exponential:
y (t) = h (t) ∗ ej ωt
ˆ ∞ ˆ ∞
= h (τ ) ej ω(t−τ ) dτ = ej ωt h (τ ) e−j ωτ dτ
−∞ −∞
= H (j ω) ej ω .
We see that the system modifies the input by changing its magnitude and phase
through the complex function H (j ω). H (j ω) is a system function which has
the same form as that given by Eq. (6.2). Equations (6.2) and (6.3) are called the
Fourier transform analysis and synthesis equations, respectively. x (t) and X (j ω)
are Fourier transform pairs and are shown by the following notations
F
x (t) ←→ X (j ω)
F [x (t)] = X (j ω)
−1
F [X (j ω)] = x (t) .
spectrum analyzers1 to produce the magnitude and phase of signals than finding the
real and imaginary parts.
where the coefficients cn are the Fourier series coefficients. There we have seen that
ˆ T /2
1
cn = x̃ (t) e−j nω0 t dt. (6.4)
T −T /2
1 Here, by spectrum analyzers, swept-frequency spectrum analyzers are meant, which obtain
Let us call the following function, which is continuous in ω, the envelope of the
coefficients T cn :
ˆ T /2
X (j ω) = x̃ (t) e−j ωt dt. (6.5)
−T /2
T cn = X (j nω0 ) . (6.6)
Now if we let the fundamental period approach infinity, the periodic function x̃ (t)
obviously becomes the nonperiodic function x (t), i.e.,
T T
Let us rearrange Eq. (6.5). In the interval − ≤ t ≤ we have x (t) = x̃ (t).
2 2
Furthermore since x (t) = 0 outside the range of integration we can write
ˆ T /2
T cn = x̃ (t) e−j nω0 t dt
−T /2
ˆ T /2
= x (t) e−j nω0 t dt.
−T /2
Therefore
T cn = X (j nω0 ) and,
1
cn = X (j nω0 ) . (6.7)
T
ω0
With cn expressed as in Eq. (6.7) and T = , x̃ (t) can be written as
2π
∞
1
x̃ (t) = X (j nω0 ) ej nω0 t
n=−∞
T
340 6 The Fourier Transform
∞
1
= X (j nω0 ) ej nω0 t ω0
n=−∞
2π
∞
1
= X (j nω0 ) ej nω0 t ω0 .
2π n=−∞
which are the Fourier transform pairs defined by the inner product of the signal and
the complex exponential. Using f instead of ω, it is easier to show that a nonperiodic
function is equal to the inverse Fourier transform of its Fourier transform and vice
versa:
In order that Eq. (6.9) can faithfully synthesize x (t), it is sufficient that x (t)
fulfill the following criteria which are called the Dirichlet conditions. With these
conditions satisfied, x (t) and F −1 {F {x (t)}} become identical.2
Dirichlet Conditions
Thus
ˆ ∞
|X (j ω)| ≤ |x (t)| e−j ωt dt
−∞
ˆ ∞
|X (j ω)| ≤ |x (t)| dt.
−∞
2 Using f instead of ω.
342 6 The Fourier Transform
and we have
ˆ ∞
|X (j ω)| ≤ |x (t)| dt < ∞
−∞
|X (j ω)| < ∞
and X (j ω) exists.
It is interesting to note that some functions whose bilateral Laplace transforms
exist have no Fourier transforms. This can be verified by expanding the exponential
factor in the Laplace transform integrand:
ˆ ∞
X (s) = x (t) e−st dt
−∞
ˆ ∞
= x (t) e−(σ +j ω)t dt
−∞
ˆ∞
= x (t) e−σ t e−j ωt dt
−∞
= F x (t) e−σ t .
Example 6.3 Find the Fourier transform of x (t) shown in Fig. 6.2. where A = 100
and τ = 0.01 s.
ˆ ∞
X (j ω) = x (t) e−j ωt dt
−∞
ˆ +τ/2 sin (ωτ/2) sin (πf τ )
=A e−j ωt dt = Aτ = Aτ
−τ/2 ωτ/2 πf τ
= Aτ sin c (f τ ) = Aτ sin c (0.01f ) .
=e j ω0 t
.
Thus
F ej ω0 t = 2π δ (ω − ω0 ) .
An immediate application of this result is in order. Recall that the Fourier series
expansion of a periodic function is
∞
x (t) = cn ej nω0 t .
n=−∞
344 6 The Fourier Transform
and
" #
ej ω0 t − e−j ω0 t
F {sin (ω0 t)} = F
2j
ˆ ∞ ˆ ∞
1 1
= ej ω0 t e−j ωt dt − e−j ω0 t e−j ωt dt
2j −∞ 2j −∞
1 1
= · 2π δ (ω − ω0 ) − · 2π δ (ω + ω0 )
2j 2j
= j π δ (ω + ω0 ) − j π δ (ω − ω0 ) .
The Fourier transforms of cosine and sine functions are depicted in Fig. 6.3.
Utilizing these results we can write
! ∞
( ∞
F cos (nω0 t) = [π δ (ω − nω0 ) + π δ (ω + nω0 )] .
n=1 n=1
6.5 Properties of the Fourier Transform 345
Fig. 6.3 Fourier transform of (a) cosine and (b) sine function
The Fourier transform inherits many of its properties from the bilateral Laplace
transform. As mentioned in Sect. 6.1, the Fourier transform is obtained from the
Laplace transform by evaluating the transform on the j ω axis, i.e., by setting s =
0 + j ω. Beside these familiar properties, we have some additional properties like
the duality and symmetry that we introduce in this section.
Let x (t) be a complex function of t. The Fourier transform of the conjugate function
x ∗ (t) can be obtained from the Fourier transform definition. Taking the conjugates
of both sides of (6.2) yields
ˆ ∞ ∗
∗ −j ωt
X (j ω) = x (t) e dt
−∞
ˆ ∞
= x ∗ (t) ej ωt dt.
−∞
Negating j ω we get
ˆ ∞
X∗ (−j ω) = x ∗ (t) e−j ωt dt.
−∞
346 6 The Fourier Transform
Thus we see that the Fourier transform of the conjugate of x(t) is the conjugate of
X(−j ω), that is
F x ∗ (t) = X∗ (−j ω) . (6.12)
Special cases for x (t) can be easily obtained from this general formula. Specifically,
if x (t) is real, i.e., x ∗ (t) = x (t), then Re [X (j ω)] is even-symmetric, and
Im [X (j ω)] is odd-symmetric as can be seen below:
X∗ (−j ω) = F x ∗ (t)
= F {x (t)}
= X (j ω) .
Thus
X∗ (j ω) = X (−j ω) . (6.13)
We can separate the left and right hand of (6.13) into real and imaginary parts to get
These are called conjugate symmetry relations for Fourier transform of real func-
tions. It is straightforward to show that conjugate symmetry in X (j ω) extends to
|X (j ω)| and arg [X (j ω)] and is left to the reader as an exercise:
Fig. 6.4 The real part and magnitude of the Fourier transform of a real signal are even-symmetric
and its imaginary part and phase are odd-symmetric. (a), (b) Magnitude and phase, (c) and (d) real
and imaginary parts of the Fourier transform of a PM signal
X∗ (j ω) = X (j ω) .
348 6 The Fourier Transform
Thus we see that X (j ω) is real. From the conjugate symmetry of real functions,
we deduce that the transform of even functions is real and even-symmetric; and the
transform of odd functions is imaginary and odd-symmetric (see Problem 7). A real
function can be expressed as the sum of a real function and an odd function
1
|H (j ω)| = 2N ,
1+ ω
ωc
where N is the filter order. Squaring the magnitude response and factoring the
denominator we obtain
1 1 1
|H (j ω)|2 = 2N = N · N .
ω ω ω
1+ 1+j 1−j
ωc ωc ωc
|H (j ω)|2 = H (j ω) H ∗ (j ω) .
|H (j ω)|2 = H (j ω) H (−j ω) .
1 1
H (s) = & N ' = N
ω s
1+j 1+j
ωc s j ωc
ω=
j
1 1
H (−s) = & N ' = N
ω s
1−j 1−j
ωc s j ωc
ω=
j
1 1
H (s) H (−s) = & N ' & N ' = 2N .
s s s
1+j 1−j 1+
j ωc j ωc j ωc
(6.16)
s 2N
Hence the poles of the Butterworth filter are the roots of 1 + which lie
j ωc
in the left-half s-plane. The roots that lie in the right-half s-plane are the poles of
H (−s). See Example 1.6 on 17 to see the poles of a third-order Butterworth lowpass
filter.
A direct consequence of the symmetry property is that the LTI systems respond
to sinusoidal excitation with a sinusoidal output having the same frequency as the
input. We have interpreted the Fourier transform as a system function that modifies
the complex exponential ej ωt . Now suppose that we stimulate the same system with
350 6 The Fourier Transform
1 −j ωt ej ωt e−j ωt
cos ωt = 1 j ωt
2e + 2e . If y1 (t) = x (t) ∗ and y2 (t) = x (t) ∗
2 2
we get
ˆ ∞ ˆ ∞
ej ω(t−τ ) 1
y1 (t) = x (τ ) dτ = · ej ωt x (τ ) e−j ωτ dτ
−∞ 2 2 −∞
1
= · X (j ω) ej ωt
2
ˆ ∞ ˆ
e−j ω(t−τ ) 1 −j ωt ∞
y2 (t) = x (τ ) dτ = · e x (τ ) ej ωτ dτ
−∞ 2 2 −∞
1
= · X (−j ω) e−j ωt .
2
Since x (t) is real, we have X (−j ω) = X∗ (j ω). Let |X (j ω)| ej θ(ω) be the polar
representation of X (j ω). Thus we have
We deduce that the system outputs another cosine function of the same frequency
as the input, whose amplitude is multiplied by |X (j ω)| and whose phase is shifted
by θ (ω) = arg {X (j ω)}.
6.5.2 Linearity
We have defined the Fourier transform using the response of a linear time-invariant
system to an eigenfunction ej ωt . This assumption of linear time-invariance is at the
heart of the linearity property. Furthermore, the linearity stems from the linearity of
integration. The Fourier transform of a linear combination of functions is equal to
the same linear combination of the Fourier transforms of those functions, that is,
! (
F ai xi (t) = ai F {xi (t)} = ai Xi (j ω) (6.17)
i i i
6.5 Properties of the Fourier Transform 351
= ai Xi (j ω) .
i
1 ω
F {x (at)} = X j .
|a| a
Hence
1 ω
F {x (at)} = X j . (6.18)
a a
u
ˆ −∞
1 jω
= x (u) e a du
−a ∞
u
ˆ ∞
1 jω
= x (u) e a du
a −∞
u
ˆ ∞
1 −j ω −
= x (u) e a du
a −∞
1 ω
= X −j . (6.19)
a a
Removing the constraint a > 0, we can combine Eqs. (6.18) and (6.19) to get
1 ω
F {x (at)} = X j . (6.20)
|a| a
Setting a = −1 in (6.20) flips x (t) about the time axis. The transform of x (−t) is
by Eq. (6.20)
F {x (−t)} = X (−j ω)
F {x (−t)} = X (−j ω)
= X∗ (j ω) . (6.21)
We conclude that by flipping x (t) about the time axis, we flip X (j ω) about j ω axis.
F {x (t − t0 )} = e−j ωt0 X (j ω) .
6.5 Properties of the Fourier Transform 353
= e−j ωt0 X (j ω)
= |X (j ω)| exp {j [θ (j ω) − ωt0 ]} . (6.22)
1 1
F {x (t) cos ω0 t} = X [j (ω + ω0 )] + X [j (ω − ω0 )] . (6.24)
2 2
dx (t)
Hence we see that and j ωX (j ω) are Fourier transform pairs. This result can
dt
be generalized to the n – th derivative
" #
d n x (t)
F = (j ω)n X (j ω) .
dt n
Let y (t) = 5y (t) + c, where 5y (t) is a function with zero average, c is a constant, and
x (t) = y (t). Since differentiation removes the constant term c, x (t) = y (t) =
y (t). Using the differentiation property we have
5
5 (j ω) .
X (j ω) = j ω Y (j ω) = j ω Y
1
U (j ω) = F {u (t)} = + π δ (ω) .
jω
Suppose that y (t) is the integral of x (t) with respect to time. Then y (t) can be
restated as the convolution of x (t) with u (t).
ˆ t ˆ ∞
y (t) = x (t) dt = x (τ ) u (t − τ ) dτ.
−∞ −∞
6.5 Properties of the Fourier Transform 355
Y (j ω) = X (j ω) U (j ω)
1
= X (j ω) + π δ (ω) .
jω
6.5.9 Duality
If x (t) and X (j ω) are Fourier transform pairs, then X (t) and 2π x (−j ω) are also
Fourier transform pairs. Known as the duality property, this symmetry enables us
to use already known transforms to exchange the time and frequency domains. We
know that
ˆ ∞
1
x (t) = X (j ω) ej ωt dω.
2π −∞
Hence
ˆ ∞
2π x (t) = X (j ω) ej ωt dω
−∞
ˆ ∞
2π x (−t) = X (j ω) e−j ωt dω.
−∞
Example 6.6 If x (t) = e−|t| , then X (j ω) = 2/ ω2 + 1 . By duality property, if
2
X (t) = 2/ t + 1 , then 2π x (j ω) = 2π e−|ω| .
6.5.10 Convolution
Then
F 1
x (t) y (t) ←→ [X (j ω) ∗ Y (j ω)] .
2π
To prove this property we shall use X (jf ) and Y (jf ) rather than X (j ω) and
Y (j ω). Furthermore, we shall temporarily omit j in front of frequency to evade
nested parentheses. Using X (jf ) and Y (jf ) rids us of the 1/2π factor which
multiplies the integrals. In Sect. 6.2 we showed that
ˆ ∞ ˆ ∞
1
X (ω) ej ωt dω = X (f ) ej 2πf t df.
2π −∞ −∞
6.5 Properties of the Fourier Transform 357
Exploiting this fact and omitting j ’s from jf ’s, we write the convolution of X (f )
and Y (f ):
ˆ ∞
X (f ) ∗ Y (f ) = X (u) Y (f − u) du
−∞
Thus we see that x (t) y (t) and X (jf ) ∗ Y (jf ) are Fourier transform pairs:
F
x (t) y (t) ←→ X (jf ) ∗ Y (jf ) .
F 1
x (t) y (t) ←→ [X (j ω) ∗ Y (j ω)] . (6.26)
2π
Example 6.7 Find the convolution of X (j ω) and δ [j (ω − ω0 )] and the corre-
sponding time domain function.
ˆ ∞
X (j ω) ∗ δ [j (ω − ω0 )] = δ [j (u − ω0 )] X [j (ω − u)] du = X [j (ω − ω0 )] .
−∞
We see that the convolution with frequency-shifted impulse function shifts the
Fourier transform of the function to where the impulse occurs in frequency. Using
frequency shift property, we obtain the inverse transform:
ˆ ∞
−1 1
F {X (j ω) ∗ Y (j ω)} = X [j (ω − ω0 )] ej ωt dω = ej ω0 t x (t) .
2π −∞
358 6 The Fourier Transform
Fig. 6.6 Modulation of a sinusoidal wave by a pulse waveform. Modulation is the product of
two signals in time domain. (a), (c) The pulse waveform and its magnitude spectrum; (b), (d)
Modulated pulse waveform and its magnitude spectrum. Notice the convolution of the sinc function
and impulses at f = ±40 Hz
Example 6.8 The pulse waveform p (t) in Example 6.3 is multiplied by a sinusoidal
signal x (t) = sin (2π · 40t) to produce the modulated pulse waveform shown in
Fig. 6.6. The pulse occurs in the interval 400 ms ≤ t ≤ 600 ms.
!
1 400 ms ≤ t ≤ 600 ms
p (t) =
0 elsewhere
For the Fourier transforms we use the previous result in Example 6.3
sin (πf τ )
P (jf ) = Aτ = Aτ sinc (f τ ) .
πf τ
6.5 Properties of the Fourier Transform 359
1
P (j ω) ∗ X (j ω) = P (jf ) ∗ X (jf )
2π
" #
40 40
= j 0.1 sinc 5 ω + − sinc 5 ω − .
2π 2π
The magnitude spectrum of p (t) is a sync function that goes through zero at
multiples of 1/0.2 ms = 5 Hz. Since the magnitude of the transform rectifies the
negative portions of the sinc function we see those portions above the zero level. The
Fourier transform of the modulated pulse waveform is the convolution of X (jf ) and
P (jf ). The peak of the sync function is equal to 1 · (600 − 400) = 200 ms. The
modulated signal peaks have half of this value (100 ms) and they are 40 Hz away
from DC.
We already know from Chap. 5 that Parseval’s relation is a theorem about the
energy content of a signal. It relates the time domain and the frequency domain
expressions for energy. In Sect. 5.5 we derived Parseval’s theorem in the context of
harmonic powers of a periodic signal. In the following development, we follow the
same thinking as before except for energy/power distinction. Nonperiodic signals
we focus on are energy signals whose Fourier transforms exist and are square
integrable. Square-integrability of periodic signals has been discussed in Sect. 5.6
under the convergence topic. The same considerations hold for nonperiodic signals
as well. From circuit theory, the energy of a signal is defined on a 1- resistor as
ˆ ∞
E= |x (t)|2 dt (6.27)
−∞
360 6 The Fourier Transform
where we allow the signal to be complex. Let us substitute the synthesis equations
for x (t) and x ∗ (t).
ˆ ∞
ˆ ∞ ˆ ∞ ∗
1 1
E= X (j ω) ej ωt dω X (j ω) ej ωt dω dt
−∞ 2π −∞ 2π −∞
2 ˆ ∞ ˆ ∞ ˆ ∞
1 ∗ −j ωt
= j ωt
X (j ω) e dω X (j ω) e dω dt.
2π −∞ −∞ −∞
ˆ ˆ
1 2 ∞ ∞
E= X (j ω) X∗ (j u) 2π δ (u − ω) dωdu
2π −∞ −∞
ˆ ∞ ˆ ∞
1 ∗
= X (j ω) X (j u) 2π δ (u − ω) du dω.
2π −∞ −∞
6.5 Properties of the Fourier Transform 361
Using the sifting property of the impulse function in the inner integral we obtain
ˆ ∞
1
E= X (j ω) X∗ (j ω) dω.
2π −∞
Hence
ˆ ∞
1
E= |X (j ω)|2 dω.
2π −∞
And
ˆ ∞ ˆ ∞
1
|x (t)|2 dt = |X (j ω)|2 dω. (6.28)
−∞ 2π −∞
A useful variant of this relation results if we substitute ω = 2πf that uses cyclic
frequency instead of angular frequency:
ˆ ∞ ˆ ∞
|x (t)|2 dt = |X (jf )|2 df.
−∞ −∞
Thus the area under |x (t)|2 curve for all t is equal to the area under |X (jf )|2 curve
for all f .
As we have already established in Eqs. (6.1) and (6.11), application of the Fourier
transform on a signal twice retrieves the signal back. In mathematics this is known
as the Fourier integral theorem. Using frequency in Hz (6.1) is repeated below
ˆ ∞ ˆ ∞
f (t) = f (u) e−j 2πf u du ej 2πf t df.
−∞ −∞
or
ˆ ∞ ˆ ∞
1
f (t) = f (u) e−j ω(u−t) dudω. (6.29)
2π −∞ −∞
362 6 The Fourier Transform
The Fourier integral has further consequences if f (t) is real. Expanding the
complex exponential using Euler formula results in
ˆ ∞ ˆ ∞
1
f (u) cos ω (t − u) dudω = f (t) and
2π −∞ −∞
ˆ ∞ˆ ∞
f (u) sin ω (t − u) dudω = 0.
−∞ −∞
2π
Let x (t) be a periodic continuous-time signal with a period T0 . With ω0 = ,
T0
x (t) can be expanded in Fourier series:
∞
x (t) = cn ej nω0 t .
n=−∞
F
1 ←→ 2π δ (ω)
we obtain
∞
X (j ω) = 2π cn δ [ω − nω0 ] .
n=−∞
6.6 Sampling
3 Here we use for the continuous-time frequency to avoid confusion with the discrete-time
frequency ω because both are involved in the context of sampling.
364 6 The Fourier Transform
This is called impulse-sampling. We know that the Fourier transform of the impulse
train is given by
∞
2π
S (j ) = δ( −n s) . (6.32)
T n=−∞
The effect of the convolution in the frequency domain is to translate the baseband
signal to frequencies = n s . We immediately notice from Eq. (6.33) that the
Fourier transform of the sampled signal is periodic with a period of s . Provided
that the band around = n s does not overlap with those around = (n ± 1) s ,
the original signal can be recovered from the impulse samples by passing xs (t)
through an ideal lowpass filter. This condition is met if the following condition is
satisfied
s − B > B,
s > 2B. (6.34)
6.6 Sampling 365
Time
0 domain
t t t
0 –2T –T 0 T 2T –2T –T T 2T
(a)
B
:s – B
:c
(b)
Fig. 6.7 Sampling and aliasing. (a) Time domain, (b) frequency domain
1
T < . (6.35)
2B
The minimum sampling frequency Fs = 2B is called the Nyquist rate. Based on
Eq. (6.34), the Nyquist sampling theorem4 states that if a signal band-limited to B
is sampled at a rate greater than 2B, it can be recovered from its samples using an
ideal lowpass filter. The situation is depicted in Fig. 6.7.
Ideal lowpass filtering corresponds to multiplying the frequency contents of the
sampled signal with a rectangular window whose cutoff frequency c is greater
than or equal to B. This multiplication in the frequency domain corresponds to
convolution in the time domain of the sampled signal and impulse response of the
lowpass filter. Let us assume that the sample rate is the absolute minimum imposed
by the sampling theorem, that is, s = 2B. Let the signal given by (6.31) be passed
through a lowpass filter whose frequency response is specified as
!
T, | | < B,
H (j ) =
0, elsewhere.
4 Although usually credited to Harry Nyquist, the sampling theorem has in fact been discovered
by Claude Shannon, Vladimir Kotelnikov, and E. T. Whittaker. The theorem is also called the
Nyquist-Shannon sampling theorem.
366 6 The Fourier Transform
Xs j H j = Xr j .
∞
1
Xr (j ) = Xc [j ( −n s )] · T , (−B < < B)
T n=−∞
Xr (j ) = Xc (j ) . (6.36)
This demonstrates that the output of the ideal lowpass filter is the underlying
continuous-time signal xc (t).
The impulse response of the ideal lowpass filter is given as
ˆ B B
1 T ej t
h (t) = T ej t
d =
2π −B 2π j t −B
T sin (Bt)
= · sin (Bt) = Fs T ·
πt π Fs t
sin (π Fs t)
= = sinc (Fs t) . (6.37)
π Fs t
The ideal lowpass filter is a noncausal filter with a sinc impulse function. The
lowpass filter output is the convolution of the impulse-sampled input signal and the
impulse response of the filter. Letting xr (t) denote the filter output, we have
x (t) = xr (t)
xr (t) = F −1 [H (j ) Xs (j )]
∞
xr (t) = sinc (Fs t) ∗ xc (nT ) δ (t − nT )
n=−∞
∞
= x [n] sinc [Fs (t − nT )]
n=−∞
∞
sin [π Fs (t − nT )]
= x [n] (6.38)
n=−∞
π Fs (t − nT )
which states that the recovered signal is the sum of infinitely many sinc functions
shifted in time by an amount nT and scaled by x [n]. Note that xr (t) is independent
of B provided that s > 2B. Equation (6.38) is known as the Whittaker-Shannon
interpolation formula, or just sinc interpolation formula. In Fig. 6.7 is shown a signal
impulse-sampled at a rate greater than 2B in compliance with the Nyquist sampling
theorem. We note that the spectra shifted to n s do not overlap with each other, and
as such it is possible to recover the signal by lowpass filtering. The LPF is shown
in red and has a magnitude T . On the other hand in Fig. 6.8, we undersample a
sinusoidal signal whereby a sinusoidal signal of frequency B is sampled at a rate
6.6 Sampling 367
less than 2B. The impulse at = B falls outside of the filter passband, while the
lower sideband at = s − B falls in the passband and recovered as an alias. The
signal recovered from the samples is a lower frequency signal of frequency s − B.
In Fig. 6.9, a signal is shown reconstructed from its samples by using sinc
interpolation formula. The signal extends from t = 0 to t = 1000 and sampled with
a sampling period of 10 samples. Whereas reconstruction calls for an infinitely many
sinc functions, Fig. 6.9 was computed from 100 samples. This results in distortion
near t = 0 and t = 1000 due to truncation of the interpolation to 100 sums.
It remains for us to establish the link between the continuous-time Fourier
transform and the discrete-time Fourier transform of xs (t). Consider the Fourier
transform of xs (t) given by (6.31)
ˆ & ∞
'
∞
Xs (j ) = xc (nT ) δ (t − nT ) e−j t
dt
−∞ n=−∞
∞ ˆ ∞
= xc (nT ) δ (t − nT ) e−j t
dt
n=−∞ −∞
∞
= xc (nT ) e−j Tn
.
n=−∞
368 6 The Fourier Transform
Fig. 6.9 Reconstructing a signal from its samples. The signal is drawn in blue and shown with
an offset to discern it from the reconstructed signal drawn in red. (a) The sum of nine shifted and
scaled sinc functions in the region from time 400 to 500. (b) A signal reconstructed from its 1000
samples. The computer used 100 sinc functions shifted in time and scaled by the sample amplitudes
∞
Xs ej ω = x [n] e−ωn .
n=−∞
Xs [j ( s − )] = Xs∗ (j )
Xs [j ( N + Δ )] = Xs∗ [j ( s − N − Δ )] .
Since s =2 N, we have
Xs [j ( N + Δ )] = Xs∗ [j ( N − Δ )] .
Fig. 6.10 (a) A zero-order hold can be thought of as an ideal switch which is on for an
infinitesimally short time connecting a continuous signal every Ts seconds to a capacitance. (b)
Registered DACs are zero-order hold devices using natural sampling instead of impulse-sampling
whereby they hold the sample value between the sampling instances
is held constant until the next sample arrives. The output of the DAC is sort of a
staircase which resembles the continuous-time signal. This is depicted in Fig. 6.10b.
Let us define a rectangular function rect(t) that we intend to use in representing
the output of a zero-order hold.
!
1 0 t < Ts
rect(t) = u (t) − u (t − Ts ) = (6.39)
0 elsewhere.
We let the impulse response of the zero-order hold to be the rect function:
Thus
∞
x0 (t) = x(nTs )δ (t − nTs ) ∗ rect (t)
n=−∞
& ∞
'
= x(nTs )δ (t − nTs ) ∗ rect (t)
n=−∞
Fig. 6.11 (a) Zero-order hold impulse response. (b), (c) Natural sampling is the response of a
zero-order hold to an impulse-sampled signal
sin (πf Ts )
H0 (jf ) = Ts exp (−j πf Ts )
πf Ts
= Ts exp (−j πf Ts ) sinc (f Ts ) .
As depicted in Fig. 6.12, Eq. (6.40) implies that the impulse-sampled signal
spectrum is modified by a sinc function due to natural sampling. The sinc function
passes through zero at f = nfs for n = 0. When f ≈ 0 the sinc function is close
to 1, and X0 (jf ) ≈ X (jf ). As f gets larger then distortion starts in X0 (jf ).
Hence if the frequency content of the signal gets close to fs , lowpass filtering will
produce a distorted signal. To get rid of distortion we have either to choose a sample
rate which is considerably larger than the signal bandwidth. If f < 0.1fs , then
sinc (f Ts ) ≥ 0.98 which is an acceptable level of fidelity. Or we have to precede
the lowpass filter with reciprocal filter whose magnitude varies as 1/sinc (f Ts ).
Although X0 (j nfs ) = 0, there are still high-frequency components in the vicinity
of f = nfs . The lowpass filter should have a rolloff to wipe out these remnants of
the sampling.
372 6 The Fourier Transform
6.6.3 Undersampling
We can express the impulse train as an infinite sum of cosine functions with
frequencies nfs = n/Ts :
∞
& ∞
'
δ (t − nTs ) = fs 1 + 2 cos (nωs t)
n=−∞ n=1
fc
Fig. 6.13 By sampling at fs = , the baseband signal can be retrieved from a modulated signal.
N
The top trace is the carrier frequency modulated by the baseband signal (only the upper sideband
appears in the figure; the lower sideband is to the left of the left margin of the page). At the origin
the spectrum shown in dashed lines belongs to the modulating baseband signal. For the sake of
fc
simplicity fs = is shown. We notice that the lower sideband 2fs − fc sits just where the
2
modulating signal occurs
y(t) is shown in Fig. 6.13. This causes all the cosine terms to be modulated by x (t)
producing spectral components X (f − nfs ). Let us consider the spectra around two
adjacent cosine terms, namely, X (f − nfs ) and X [f − (n + 1) fs ]. The spectrum
around nfs extends upwards to nfs ± fc + B, and the spectrum around (n + 1) fs
extends downwards to (n + 1) fs ±fc −B. In order that these spectra do not overlap
(so that we can retrieve the baseband signal) we stipulate that
(n + 1) fs ± fc − B > nfs ± fc + B
fs > 2B.
The vertical dotted lines shown in Fig. 6.13 indicate the separation between adjacent
sidebands of the undersampling. Failure to meet this criterion causes aliasing in the
sampling. Thus we observe that, although we need to sample the modulated signal
at a rate greater than 2 (fc + B), we need only to sample the bandpass signal at a
rate greater than 2B to retrieve the modulating signal. This is the bandpass version
of the sampling theorem. This condition is necessary but not sufficient to recover
the baseband signal.
374 6 The Fourier Transform
Fig. 6.14 By undersampling a bandpass signal at a rate greater than two times the signal
bandwidth, we can retrieve the baseband signal. The AM signal is a 100 Hz sine wave modulated
by a 5 Hz sine wave. The AM signal has a bandwidth of 10 Hz which is twice the frequency of
the modulating sine wave. (a) The blue trace results from sampling the AM signal at the carrier
frequency of 100 Hz. The sampling frequency, in this case, is greater than twice the modulating
signal frequency. The result is the naturally sampled baseband signal, which you can readily
identify as the output of a zero-order-hold sampling a 5 Hz sine wave. (b) The same AM signal
is sampled at a rate of 50 samples/sec. The result is the blue trace. To recover the modulating
signal, the samples can be passed through a lowpass filter in either case, possibly followed by a
reciprocal filter, to undo the effect of sin (x) /x multiplication of the zero-order hold. The output
from the reciprocal filter will be the modulating signal
The second condition requires that one of the sidebands of X (f − nfs ) occupy
the same spectrum as X (f ). Assuming the first condition is met, that is, fs > 2B,
we also require that
nfs − fc = 0
fc
fs = .
n
This condition can be understood referring to Fig. 6.13. Once we manage to
position a sideband at zero frequency, we can lowpass-filter the composite spectrum
to get a replica of the modulating signal (Fig. 6.14).
of a function and check that the j ω-axis is in the ROC. If the bilateral Laplace
transform exists on the j ω-axis, then we set s = j ω and obtain the Fourier transform
from the bilateral Laplace transform. This comes in very handy once we know the
Laplace transform and saves us time. Note that by adopting the bilateral Laplace
transform, we get rid of s i x n−i (0−) terms for derivatives.
The system functions of LTI systems are rational functions of s in the form
s m + am−1 s m−1 + . . . + a0
H (s) = A · .
s n + bn−1 s n−1 + . . . + b0
H (j ω)
(j ω)m + am−1 (j ω)m−1 + . . . + a0
=A· .
(j ω)n + bn−1 (j ω)n−1 + . . . + b0
a0 − a2 ω2 + a4 ω4 + . . . + j ω a1 − a3 ω2 + a5 ω4 + . . . + j m ωm
=A· .
b0 − b2 ω2 + b4 ω4 + . . . + j ω b1 − b3 ω2 + b5 ω4 + . . . + j n ωn
1
m
(s − zi )
i=1
H (s) = A ·
1n
(s − pi )
i=1
376 6 The Fourier Transform
1
m
(j ω − zi )
i=1
H (j ω) = A · .
1n
(j ω − pi )
i=1
1
m
|j ω − zi |
i=1
|H (j ω)| = |A| · (6.41)
1n
|j ω − pi |
i=1
and
m n
arg [H (j ω)] = arg (A) + arg (j ω − zi ) − arg (j ω − pi ) . (6.42)
i=1 i=1
A (s − z1 ) As
H (s) = = .
(s − p1 ) (s − p2 ) (s − a − j b) (s − a + j b)
The graphical assessment implies that such a second-order system with b |a|
behaves around ω ≈ b like a first-order system around DC.
Example 6.9 To illustrate the discussion with a numerical example, assume that
we have a system with a zero at z1 = 0, and two poles at p1 = −5 + j 12 and
p2 = −5 − j 12. Also, assume a gain factor A = −10. The pole–zero diagram of
this system is shown in Fig. 6.15. The vectors are drawn in red from s = j ω to zero
z1 = 0 and poles p1 and p2 . The system function on the j ω is thus given by
jω
H (j ω) = −10 · .
(j ω + 5 − j 12) (j ω + 5 + j 12)
Thus using the right triangles formed by these vectors we can write
|j ω − 0|
|H (j ω)| = |−10| ·
|j w − p1 | |j ω − p2 |
10ω
=
(ω − 12) + 52 · (ω + 12)2 + 52
2
10ω
=
ω2 − 24ω + 169 ω2 + 24ω + 169
10ω 10ω
= 2 =√ ,
ω2 + 169 − 576ω2 ω4 − 238ω2 + 28561
378 6 The Fourier Transform
Fig. 6.15 Finding frequency response by using pole–zero diagram. (a) The vectors, (b) The
frequency response
and
These functions can be plotted to view the magnitude and phase spectrum.
Unfortunately, there seems to be no insight one can derive from these analytical
results. However, assume that |Re [pi ]| |Im [pi ]|. This brings the poles close
to the j ω axis. In the vicinity of the upper pole |j ω − p1 | ≈ ω − Im [p1 ],
|j ω − p2 | ≈ 2ω, arg (j ω − p2 ) ≈ π/2. This gives us the insight and inspiration
we seek. Thus
10ω
|H (j ω)| ≈
2ω (−5) + (ω − 12)2
2
5
≈ ,
(−5) + (ω − 12)2
2
6.8 Discrete-Time Signals 379
Fig. 6.16 The frequency response computation of the numerical example from 0 to 50 rad/sec
using pole-zero vectors
and
ω − 12
arg [H (j ω)] ≈ π − tan−1 .
5
To benefit from the exciting field of discrete signal processing, one must grasp
certain relevant concepts. A sound understanding of discrete signals is required
to study discrete-time systems. Discrete signals are functions whose domains
are integers. They can be one-dimensional or multidimensional. One-dimensional
discrete signal is just a sequence of numbers, a two-dimensional discrete signal is a
matrix of numbers. Thus 1D and 2D discrete signals can be formally denoted by
x = {x [n]} n ∈ (. . . , −1, 0, 1, 2, . . .)
⎡ ⎤
... ... ...
. (6.43)
y = ⎣ . . . z [m, n] . . . ⎦ m, n ∈ (. . . , −1, 0, 1, 2, . . .)
... ... ...
x [n] for brevity. By convention, and depending on the context, by x [n] we either
understand the whole sequence x, or the n–th sample of x. x can also be written
explicitly in terms of its elements
Reference to discrete time can also be made by adding suffices to x; xn and x [n]
both denote x at time n. However, if we have just numbers within the braces, the
lack of the index 0 may cause confusion as to where the discrete-time 0 is located.
An arrow affixed below a certain number indicates that this particular value occurs
at n = 0. Thus the arrow beneath 1.0 in
" #
x = . . . , 4.1, 2.2, 1.0, −1.0, 0.25, π, 5, 0, . . .
↑
indicates that x [0] = 1.0. In this book we reserve the notation [·] for discrete
signals, and (·) for analog signals.
As explained in Sect. 6.6, discrete signals can be derived from analog signals by
sampling at regular intervals; thus the 1D discrete signal in Fig. 6.17 is obtained by
taking 16,000 samples every second from an analog audio signal. A digital image
from a DSLR camera such as shown in Fig. 6.25 on page 6.25 is a 2D discrete signal
whose pixel separations determine the spatial sampling period of the image sensor.
If x (t) is an analog signal and we sample it at intervals Ts then we can generate a
discrete sequence whose elements are
x [n] = x (nTs ) .
Not all discrete signals come from natural signals by way of sampling though; we
do generate some sequences algorithmically. In Sect. 9.8 we synthesize a sequence
which represents the estimates of the square root of a number.
The values x [n] can be continuous or quantized. If x [n] is continuous, it is
allowed to assume a continuum of values between two values. Quantized signals
are allowed to assume a value from a set of discrete values. If they are obtained
from an ADC, then the sequence is quantized. Digital may also be used to
mean quantized. Most discrete-time systems, such as digital signal processors and
microprocessors are digital; whereas some other discrete-time systems are analog.
6.8 Discrete-Time Signals 381
δ [n] is discrete-time equivalent of the analog impulse function δ (t) but does not
suffer from the generalized-function complexities of δ (t). It produces the value of
x [0] when multiplied by a continuous-time function x (t)
Comb Function We can add shifted delta functions to form another function Δ [n],
called the comb function shown in Fig. 6.18c. It is defined as
∞
Δ [n] = δ [n − k] . (6.44)
k=−∞
Fig. 6.18 Discrete-time signals. (a) Impulse function. (b) Impulse function delayed by 2 units. (c)
Comb function. (d) Unit step function u [n]. (e) Unit step function delayed by 1 unit and flipped. (f)
Ramp function nu [n], (g) Exponential function a n u [n] (a > 1). (h) Exponential function a n u [n]
(a < 1). (i), (j), (k) Generating a pulse function by subtracting u [n − 2] from u [n + 2]. (l) A
periodic function with periodicity N = 4, (m) An aperiodic function whose envelope is periodic
but there exists no integer N such that y [n] = y [n + N ]
5 The braces { } were deliberately used here to emphasize the whole sequence rather than a single
value x [n].
6.8 Discrete-Time Signals 383
Unit Step Function The unit step function u [n] is another fundamental signal used
in discrete-time study. It is shown in Fig. 6.18d and defined as
!
0 n<0
u [n] = .
1 n0
Signals which start (or cease) at a certain point can be modeled using the unit
step function. Thus u [n − 2] is a train of 1s that starts at n = 2, whereas u [−n + 1]
consists of 1s from n = −∞ up to n = 1 and 0 afterwards. By adding (subtracting),
multiplying and scaling step functions, various discrete pulse waveforms can be
synthesized as seen in Fig. 6.18i, j, k.
Ramp Function Ramp function seen in Fig. 6.18f is defined as
r [n] = nu [n] .
x [n] = x [n + N] . (6.47)
Period is the smallest integer N which satisfies (6.47). If there does not exist a
number N 2, the signal is not periodic. Specifically for an aperiodic signal N = 0
or infinity, and for a discrete-time DC signal (a comb signal) N is equal to 1. If N
is the period, then kN is also a period for all k > 1; but we take the period to be
N rather than 2N, 3N, etc. The signal in Fig. 6.18l is periodic with period N = 4
since x [n] = x [n + 4].
The frequency of a periodic discrete-time signal is defined as
1
f = . (6.48)
N
Since N is an integer, the frequency does not possess a unit. Nevertheless f is
expressed as cycle per sample. Since the minimum period can be 2, the maximum
discrete frequency is 0.5 cycle per sample. f = 0 and f = 1 correspond to DC
discrete signal (or a comb function). We also define angular frequency ω to be
2π
ω= = 2πf. (6.49)
N
ω has the unit of radians per sample. In literature, Ω is often used for discrete-time
frequency, and ω for the continuous-time frequency. In this book, we use ω for both
384 6 The Fourier Transform
frequencies if they do not appear together and no confusion arises. If they do, then
we distinguish between the two notations using w for continuous-time and ω for
discrete-time frequencies. This distinction occurs, for instance, in Sect. 9.9.
The envelope of the signal in Fig. 6.18m is a periodic continuous signal, but the
signal itself y [n] is not periodic since we cannot find any N that satisfies (6.47).
This can be explained by considering the complex exponential signal
Let h [n] be the impulse response of a discrete-time system. If the response of the
system to an arbitrary sequence x [n] is y [n], then the response is determined by the
convolution sum
from which we immediately recognize that ej ωn is an eigenfunction and H ej ω
jω
merely modifies the phase and magnitude of the stimulus. H e is called the
Fourier transform of the discrete system H . From Eq. (6.50) the Fourier transform
is expressed as
∞
H ej ω = h [n] e−j ωn (0 ≤ ω ≤ 2π ) . (6.51)
n=−∞
Note that, because H ej (ω+2π ) = H ej ω , H ej ω is periodic in ω with period
jω
2π . In order that H e exists, we require that H ej ω < ∞. Magnitude of
(6.51) can be written as
∞
H ej ω = h [n] e−j ωn
n=−∞
∞
≤ |h [n]| < ∞.
n=−∞
which calls for the necessity that h [n] be absolutely summable if (6.51) is to
converge.
386 6 The Fourier Transform
This is the z–transform of the sequence h [n] that we shall study in Chap. 8.
Recall that in order to transition from Laplace transform to Fourier transform in
continuous-time, we set s equal to j ω provided that the ROC for the Laplace
transform includes the j ω axis. There ω lay on a straight line, the j ω – axis. In
discrete-time, the Fourier transform of a signal is obtained by evaluating H (z) on
the unit circle z = ej ω . ω = 0 corresponds to DC and ω = π is the Nyquist
frequency fs /2. These points are the discrete counterparts of ω = 0 and ω = ±∞
of the continuous Fourier transform. This illustrates the relation between the Fourier
transform and z–transform of a discrete-time signal or system.
If instead of discrete-time sequence of infinite length we have a finite-length
sequence of N values, then the sum in Eq. (6.51) runs for N values:
N −1
H ej ω = h [n] e−j ωn (0 ≤ ω ≤ 2π ) .
n=0
Instead of ω being continuous in the range [0, 2π ], we can also sample the
frequencies at intervals of 2π/N as illustrated in Fig. 6.19. This results in the
Discrete Fourier Transform of the sequence h [n].
Example 6.10 Let x [n] = 1, α, α 2 , α 3 , . . . α < 1 and x [n] = 0 for n < 0 (see
Fig. 6.20). Find X ej ω .
∞
x [n] = α k · δ [n − k]
k=−∞
∞
= α k · δ [n − k]
k=0
1
x [n] is a geometric series which converges to because |α| < 1. Therefore
1−α
X (z) exists and the ROC includes the unit circle. We can evaluate X [z] on the unit
circle by setting z = ej ω .
Fig. 6.19 The unit circle z = ej ω on which the Fourier transform of a discrete signal is sampled.
With continuous Fourier transform, all the points on the unit circle belong to the transform. With
Discrete Fourier Transform, we use only the discrete frequencies ωk = kω0 = 2π k/N on the unit
circle where k is an integer between 0 and N − 1. In the figure N = 12 and ω0 = π/6
)∞
Fig. 6.20 Decaying exponential sequence x [n] = k=0 α
k · δ [n − k] with α = 0.5
388 6 The Fourier Transform
∞
X ej ω = α k e−j ωk = 1 + αe−j ω + α 2 e−j 2ω + . . .
k=0
= 1 + αe−j ω X ej ω
1
X ej ω =
1 − αe−j ω
1 − α cos ω α sin ω
= −j .
1 + α 2 − 2α cos ω 1 + α 2 − 2α cos ω
Specifically for α = 0.5 we find
1 − 0.5 cos ω 0.5 sin ω
X ej ω = −j
1.25 − cos ω 1.25 − cos ω
1 −1 0.5 sin ω
= √ exp −j tan .
1.25 − cos ω 1 − 0.5 cos ω
Example 6.11 Let x [n] = 1, −α, α 2 , −α 3 , . . . α < 1. Find X ej ω
∞
x [n] = (−α)k · δ [n − k] .
k=0
The series in Example 6.9 converged for α < 1. Then by absolute convergence
1, −α, α 2 , −α 3 , . . . converges too. Hence
∞
X ej ω = (−α)k e−j ωk = 1 − αe−j ω + α 2 e−j 2ω − . . .
k=0
= 1 − αe−j ω X (z)
1
X ej ω = .
1 + αe−j ω
1 + α cos ω α sin ω
X ej ω = +j
1 + α + 2α cos ω
2 1 + α 2 + 2α cos ω
)∞
Fig. 6.21 Frequency response of decaying exponential sequence x [n] = k=0 (−α)
k
· δ [n − k]
with α = 0.5
2π
calculate X ej kωs instead of X ej ω . Remember that ωs = . Selecting k =
Ts
0, 1, . . . , N − 1, the frequency becomes discrete, spanning the range from 0 to
2π 2π
(N − 1). Two adjacent frequencies are separated by . This rids us from
N N
having to compute an infinite number of values for X (j ω).
X ej kωs = X ej ω
ω=kωs
∞
= x [n] exp (−j kωs n)
n=−∞
∞
2π
= x [n] exp −j k n
n=−∞
N
∞
2π kn
= x [n] exp −j 0 ≤ k ≤ N − 1. (6.52)
n=−∞
N
N −1
X [k] = x [n] e−j 2π kn/N , 0 ≤ k ≤ N − 1, (6.53)
n=0
where k and n are frequency and time indices, respectively. Justas x [n] is a short-
2π k
hand notation for x [nTs ], X [k] is the short form of X . This is what we
N
call the Discrete Fourier Transform (DFT). While the time range is [−∞, ∞] in
the continuous-time, n is limited to the range [0, N − 1] in discrete-time. If we
2π k 2π
denote by , = 2π corresponds to the sampling frequency ωs = in the
N Ts
continuous-time domain.
Properties of the continuous transform hold for the discrete transform. For
instance, when x [n] is a real sequence, the even and odd symmetry properties of the
continuous Fourier transform are valid for the DFT as well. That is, Re {X [k]} and
|X [k]| are even-symmetric, whereas Im {X [k]} and arg {X [k]} are odd-symmetric.
6.9 Fourier Transform of Discrete Signals 391
Using inverse DFT we can obtain the discrete-time signal from its discrete
Fourier transform X [k]:
N −1 2π kn
1 j
x [n] = X [k] e N . (6.54)
N
k=0
This can be readily verified if we expand Eq. (6.54) and change order of summation
N −1 N −1
&N −1 '
1 j 2π kn 1 − j 2πNkm j 2π kn
X [k] e N = x [m] e e N
N N
k=0 k=0 m=0
N −1 N −1
1 j 2π km j 2π kn
= x [m] e− N e N
N
m=0 k=0
N −1 N −1
1 j 2π k (n − m)
= x [m] exp .
N N
m=0 k=0
j 2π k (n − m)
We immediately recognize exp as the N -th roots of 1. From
N
Problem 30 Chapter 1, we know that the sum of roots of 1 is 0. So we have
N −1 !
j 2π k (n − m) 1 n=m
exp =
N 0 otherwise.
k=0
Thus
N −1 N −1
1 j 2π kn 1
X [k] e N = x [n] · 1
N N
k=0 m=0
N −1
1
= · x [n] 1
N
m=0
1
= · x [n] · N
N
= x [n] .
πn πn
In Fig. 6.22, a discrete-time signal x [n] = sin + 0.5 sin is shown.
64 4
The first signal has an amplitude of unity and a discrete frequency of
1 cycles rad
= 128
2π
sample . The second signal with an amplitude of 0.5 is inserted
128 sample
392 6 The Fourier Transform
Fig. 6.22 1D Discrete Fourier transform. (a) Signal, (b) Normal FFT magnitude, (c) FFT phase
1 cycles 2π rad
as noise and has a frequency sample = . We run a DFT on x [n].
8 8 sample
Because DFT is periodic with a period of 2π , this display of discrete Fourier
transform repeats itself after ω = 2π . The magnitude and phase of the DFT depict
the even and odd symmetry just mentioned. On horizontal axis of DFT display,
k = 0 is the DC term; k = 256 (ω = 2π ) corresponds to the sampling frequency
1
fs = , and k = 128 (ω = π ) corresponds to the Nyquist frequency fN = fs /2.
Ts
Thus for real x [n], we have the following conjugate-symmetry relations
X [0] = X∗ [256]
X [1] = X∗ [255]
···
X [m] = X∗ [256 − m]
The DFT display is symmetric about the Nyquist frequency fN . We can exploit
this symmetry property to move X [m] = X∗ [256 − m] to the center of the display.
Then k = 128 is interpreted as f = 0, and the frequencies for which k > 128 are
positive, and those with k < 128 are negative.
As discussed in Sect. 6.11.1, ideal filters are noncausal and cannot be realized
physically. However in nonrealtime operations, causality is not required and ideal
filters are possible. One can remove the noise from the noisy sine wave of Fig. 6.22
by multiplying the DFT by an ideal lowpass filter or a bandstop filter (notch filter).
In the figure, 0.5 V noise is represented by the spikes X [31] and X [225] (Figs. 6.22
and 6.23). Lowpass filtering or bandstop filtering makes X [31] = X [225] = 0
(Fig. 6.24b). Taking the inverse DFT eliminates the noise and yields the desired sine
wave (Fig. 6.24c). In Sect. 6.10 we will see ideal filtering applied to 2D images.
It is much easier to compute the Fourier transform of signals in the discrete-time
domain than in the continuous-time domain. Analog signal processing hardware
to compute the Fourier transform can be implemented using analog bandpass filter
banks. Compared to digital signal processing analysis, analog implementation is less
flexible, prone to aging and drift problems, more challenging to adapt to new needs,
6.9 Fourier Transform of Discrete Signals 393
Fig. 6.23 Due to symmetry f = 0 can be brought to the center of DFT display. This way
frequencies can be interpreted as positive and negative. (a) Normal and (b) centered view of DFT
magnitude spectrum
Fig. 6.24 Ideal filtering in non-real time. (a), (b) The spectrum of a noisy sine wave is bandstop-
filtered (the solid red line). The DFT is inverse transformed after filtering. (c) The result is the sine
wave without disturbing noise
more costly and bulkier; and the analysis result is more difficult to store in analog
form. Signals converted to digital form are less affected by noise. Another difficulty
with continuous Fourier transform is the implementation of the Inverse Fourier
1 ´∞
transform. We believe that computation of X (ω) ej ωt dω with analog
2π −∞
hardware
ˆ should be much more challenging (if not impossible) than computing
∞
x (t) e−j ωt dt. As will be apparent shortly in Chap. 8, there is no difference
−∞
between the levels of computational complexity when Inverse Fourier transform and
Fourier transform are computed in digital hardware. Moreover, dedicated algorithms
to speed up the computation of Discrete Fourier Transform (DFT), namely the Fast
Fourier Transform (FFT), are available for signals consisting of 2N -many samples.
These factors altogether motivate performing the Fourier transform in the discrete-
time domain. In Fig. 6.30 is shown a test instrument which employs DFT to display
the Fourier transform of a signal.
394 6 The Fourier Transform
So far, we have dealt with the Fourier transform of one-dimensional signals, which
are typically functions of time. In image processing, we encounter signals that
are two-dimensional or three-dimensional functions of space variables x, y, and
z. 2D and 3D signals can be continuous or discrete. In the photographic film
era, the pictures used to be considered continuous functions of x and y. With the
introduction of digital cameras and imaging systems, the sampled versions of the
continuous images were produced, which are classified as discrete 2D signals.
We can extend the Fourier transform concepts studied in this chapter to multi-
dimensional signals. Just as the 1D Fourier transform enables us to view the signal
in a different domain, which we call the frequency domain, the multidimensional
transform, too, represents the signal in a 2D or 3D spatial frequency domain. Before
proceeding to these transforms, a few definitions are in order.
For continuous 1D signals, a particular value of the independent variable is
a moment or instant in time. The signal has a temporal frequency whose unit
is sec−1 (Hertz, Hz). In 2D, the signal value at a particular point in xy-space
is a pixel; in 3D, the signal value at a particular point in xyz-space is a voxel.
Similarly, we define the spatial frequency for multidimensional signals whose unit
has dimensions cm−1 . A 3D signal can be expressed as f3D (x, y, z), where x, y,
and z are rectangular coordinates. f3D assigns a unique voxel value for each x, y,
and z. For mathematical objects, expressions f3D (r, θ, z) in cylindrical coordinates
or f3D (r, θ, ϕ) in spherical coordinates are also possible.
Projections of 3D signals on a particular plane produce 2D signals; in other
words, pictures can be considered to be planar slices of 3D images. For example,
in medical imaging, planar X-ray images and tomographic images are projections
of three-dimensional human body images on specific planes. Conversely, 2D
images can be stacked on top of each other to create 3D images. In rectangular
representation, if we keep one coordinate as a parameter, we obtain a 2D signal
expressed as a function of the other coordinates. Thus
Fig. 6.25 Image (a), and (b) can be expressed by f (x, y) = 64 (2 + sin 16π x + sin 8πy), and
f (x, y) = 64 (1 + sin 16π x) (1 + sin 8π x), respectively. Image (c) can scarcely be expressed
mathematically
Figure 6.25a, b were generated by mathematical formulas, whereas (c) was created
by a digital camera and can hardly be described mathematically. These figures are
not continuous-space functions of x and y, because they are actually obtained from
their continuous counterparts by sampling. x and y have been discretized by mΔx
and nΔy where Δx and Δy are horizontal and vertical distances between adjacent
pixels. m, n are integers such that 0 ≤ m, n < 128 for (a), (b) and 0 ≤ m, n < 256
for (c). Thus what we see in Fig. 6.25 is actually f (mΔx, nΔy). Regardless of
whether these images can be expressed mathematically, we observe that they are
single-valued and absolutely integrable. Recall from 1D Fourier transform that
absolute integrability guarantees the existence of the Fourier transform of these
functions.
The frequency contents of a signal are related to its information content. The
higher the number of frequencies, the higher the information that the image contains.
For instance, once we see a small part of the images Fig. 6.25a and b, we can guess
what the whole image looks like because this small image repeats itself over the
entire picture. However, the image in (c) has many frequencies and features which
do not repeat predictably. By seeing the upper left wing of the butterfly, we cannot
predict the damage in its upper right wing. Hence we are interested in knowing
the spatial frequencies. Just as we have done with 1D time signals, we can invoke
the Fourier transform to derive the spatial frequency information from the image.
To accomplish this, we can extend the 1D definition of the Fourier transform to an
image signal:
ˆ ∞ ˆ ∞
F (u, v) = f (x, y) exp [−j 2π (ux + vy)] dxdy (6.55)
−∞ −∞
where u and v are spatial frequencies in x and y directions. Similar to the 1D case,
we can show these transform pairs using the following notation that we used before
F
f (x, y) ←→ F (u, v) .
or
ˆ ∞ ˆ ∞
F (u, v) = f (x, y) exp [−j 2π (ux + vy)] dxdy
−∞ −∞
ˆ ∞ ˆ ∞
−j 2π vy
= f (x, y) e dy e−j 2π ux dx
−∞ −∞
ˆ ∞
= F (x, v) e−j 2π ux dx. (6.58)
−∞
M−1 N −1
F (u, v) = f (x, y) exp [−j 2π (ux + vy)] . (6.59)
x=0 y=0
M−1
&N −1 '
−j 2π ux
F (u, v) = f (x, y) e e−j 2π vy
y=0 x=0
M−1
= F (u, y) e−j 2π vy . (6.60)
x=0
6.10 Two-Dimensional Fourier Transform 397
Figure 6.26 shows the 2D DFT being evaluated by 1D DFT on rows of the
image, then on columns of the intermediate DFT to obtain the final 2D DFT. F (0, 0)
obtained from Eq. (6.59) is supposed to be the DC value of the image which is the
average of all pixel values (average brightness). The careful reader will, however,
notice that F (0, 0) is M × N times the average brightness. Indeed evaluating
F (0, 0) from Eq. (6.59) we obtain (Fig. 6.27)
M−1 N −1
F (0, 0) = f (x, y)
x=0 y=0
M−1 N −1
1
= MN · f (x, y)
MN
x=0 y=0
= MN f (x, y),
where f (x, y) is the average brightness. This is a huge number, especially for
large images. Therefore in practice, F (u, v) is divided by MN to obtain reasonable
numbers. This is indeed what we did in the examples in this section. In Fig. 6.26
we show the 2D DFT operation as a sequence of row-wise 1D DFT on the rows of
the image and column-wise 1D DFT on F (u, y). The result is F (u, v) (Fig. 6.27).
The result would be the same if we preferred column-wise DFT on the image and
the row-wise DFT on F (x, v). You do not need to worry about performing these
calculations. All mathematical software includes these transforms. Instead, you need
to be concerned about acquiring a sound understanding of the underlying concepts
to use these functions correctly in your favorite software.
398 6 The Fourier Transform
Fig. 6.27 (a) The image of f (x, y) = 64 (2 + sin 8π x + sin 16πy), (b) 2D DFT magnitude of
the signal, (c) 3D view of the DFT
ˆ ∞ ˆ ∞
sin 8π x exp [−j 2π (ux + vy)] dxdy
−∞ −∞
ˆ ∞ ˆ ∞ ej 2π ·4x − e−j 2π ·4x
= exp [−j 2π (ux + vy)] dxdy
−∞ −∞ 2j
2π
= 2π δ (v) · [δ (u − 4) − δ (u + 4)]
2j
= 2π 2 j [δ (u + 4, v) − δ (u − 4, v)] .
Likewise
ˆ ∞ ˆ ∞
sin 16πy exp [−j 2π (ux + vy)] dxdy
−∞ −∞
Fig. 6.28 2D filtering improves some aspects of images as dictated by the spatial filter. In image
processing, ideal filters can be implemented because causality is not an issue with 2D signals
400 6 The Fourier Transform
Fig. 6.29 Lowpass filtering an image smooths out the noise and blurs the picture details. The
Fourier transform is multiplied by the cylinder-shaped ideal LPF. The product does not contain
high frequencies. When the filter output is inverse transformed the image is blurred and noise is
suppressed. As a result, the signal-to-noise ratio is higher than the original image
6.11 Applications
When we deal with the steady-state behavior of linear systems, the Fourier transform
and its inverse prove to be very valuable tools. Lengthy differential equations give
way to algebraic equations involving complex variables and functions. Differentia-
tion, integration, time and frequency shift operations, modulation/demodulation are
easily done using the Fourier transform. As you have already learned, Fourier and
Laplace transforms are linear transforms and they cannot be used with nonlinear sys-
tems. However, it is possible to derive piecewise-linear systems from nonlinear ones.
6.11 Applications 401
Fig. 6.30 Thanks to digital signal processing, modern test equipment can display RF signals,
run spectrum analysis on them and demodulate baseband signals. A 867.93 MHz RF carrier was
quad-FSK modulated to produce the spectrum shown in the lower trace using Discrete Fourier
Transform. The instrument demodulated the RF signal and produced the baseband signal shown in
the upper trace
Linearization is beyond the scope of this book. Once you manage to linearize a sys-
tem, you can use Laplace and Fourier transforms in a restricted region of operation.
Convolution and multiplication properties add many useful techniques to electri-
cal engineer’s toolbox. These are analysis and design tools in software and hardware
like the spectrum analyzer shown in Fig. 6.30. Using simulators on computers, you
can model systems and analyze their time and frequency responses. Simulators save
us time and money before building a system. Simulating a system to be built on
silicon without actually having to manufacture the chip is invaluable because design
errors and mistakes in the semiconductor industry are too costly to correct afterward.
Circuit simulators are of great help to a circuit designer and are widely practiced
along with breadboarding.
Filters are a good application of convolution used to shape signals in the
frequency domain. The signal magnitude and phase can be modified by using filters.
We resort to filters to pass or stop signals within certain frequency bands. We design
filters using Laplace and Fourier transforms. We can connect them in parallel or
cascade to further enhance overall frequency domain behavior. During the design
phase, we might use mathematical tools such as the Bode plot to visualize the filter
behavior.
402 6 The Fourier Transform
Spectrogram
f, kHz
4
Spektrogram
0
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 299
Frame
Fig. 6.31 Spectrogram of the speech utterance “she had your dark suit in greasy wash water
all year”. The horizontal axis, the frame, is related to time and each frame is 32 ms long. Fourier
coefficients are computed for every frame and plotted on the frequency axis as intensity variations.
The darkness of the coefficient is proportional to the magnitude of the Fourier coefficient. As the
hearing is insensitive to the phase, only the magnitude information is displayed
6.11 Applications 403
Cepstrum Analysis
Ln z = ln r + j θ.
Taking the natural logarithms of both sides we obtain the logarithmic spectrum
of the convolution:
In Eq. (6.61), we notice that the system function and the input are decoupled,
appearing as additive terms in the logarithmic spectrum. The speech signal is
produced by quasi-periodic vibration of the vocal folds. The vibrations excite the
time-varying speech filter consisting of the velum, nasal cavity, nostrils, oral cavity,
tongue, teeth, and lips. The produced speech is the convolution of the vocal folds’
excitation and the time-varying acoustic filter. In the frequency domain, we let
X (j ω), H (j ω), and Y (j ω) denote the acoustic excitation, the acoustic filter, and
the speech signal, respectively. In Fig. 6.32a a portion of a voiced speech6 signal is
shown. A graph of the real part of Ln Y (j ω) includes ln |H (j ω)| and ln |X (j ω)|
superimposed on top of each other. In part (b), the highly repetitive trace in red
is the vocal folds’ excitation with the harmonics thereof, and the green trace is the
frequency response of the vocal tract. As you can see, the two constituents of speech
6 Voiced speech is generated by vibrating vocal folds. The pseudo-periodic air stream pumped by
the lungs excites the oral and nasal cavities to produce voiced speech like /’i/ at the beginning
of “evening”. Unvoiced speech is produced by turbulent air coming from the lungs without vocal
folds vibration. They are sounds like /p/ of park.
404 6 The Fourier Transform
Fig. 6.32 (a) Speech signal seen in the time domain, (b) the logarithmic spectrum and (c) the real
cepstrum domain
are separated. Inverse Fourier transform of Eq. (6.61) has been named Cepstrum7
analysis. Cepstrum analysis gets X (j ω) and H (j ω) back from Y (j ω).
The inverse transform of the whole equation is called the complex cepstrum (also
called homomorphic analysis), whereas the inverse transform of the real part is
called the real cepstrum. Taking the inverse Fourier transform of the real part yields
7 Cepstrum is a word coined by flipping the first and second syllables of spectrum. Cepstrum is
Equation (6.63) clearly demonstrates the separation of the source and the system.
Cepstrum brings us back to the time domain, where the unit is second. Although
we are in the time domain, the independent variable of the cepstrum analysis is
called quefrency rather than time. The horizontal axis in Fig. 6.32c is quefrency.
Since the imaginary part is discarded in the real cepstrum, the impulse-function-
related and input-related functions cannot be restored using the real cepstrum. On
the other hand, complex cepstrum restores these functions with a phase within
0 . . . 2π . In Fig. 6.32c, the two spikes correspond to the vocal folds vibration
quefrency, known in audio science as the pitch. The lower quefrency end of the
axis represents the vocal tract filter in the time domain.
(6.65) and (6.66) confirm the preceding statement that shifting of either signal is
possible to obtain the correlation.
As the appearance of correlation is very similar to that of the convolution, it
is worthwhile to compare them. Let us rewrite the convolution in τ domain and
compare it with Rxy (τ )
ˆ ∞
x (τ ) ∗ y (τ ) = x (t) y (τ − t) dt
−∞
ˆ ∞
Rxy (τ ) = x (t) y (τ + t) dt.
−∞
Let Sxy (ω) denote the Fourier transform of Rxy (τ ). Then we have
Sxy (ω) is the cross-spectrum of the signals x (t) and y (−t). The magnitude of
Sxy (ω) is
We note that Sxy (ω) has the same magnitude spectrum of the output of an LTI
system whose input is x (t) and impulse response is y (t)
Autocorrelation of a time function x (t) denoted by Rx (τ ) is the correlation of
x (t) with itself. So Rx (τ ) = Rxx (τ ) and is defined by the integral
ˆ ∞
Rx (τ ) = x (t) x (t + τ ) dt. (6.69)
−∞
Rx (τ ) = x (τ ) ∗ x (−τ ) .
6.11 Applications 407
Sx (ω) = F [Rx (τ )] .
Sx (ω) = X (j ω) X∗ (j ω)
2
= X (j ω) .
Sx (ω) is called the energy spectrum of x (t). Note that Sx (ω) is real, and the phase
information is lost in the process. Since Rx (τ ) is an even function of τ , we can
express the energy spectrum of x (t) as
ˆ ∞
Sx (ω) = 2 Rx (τ ) cos (ωτ ) dτ.
0
= Rx (0) .
´∞
On the other hand, by Parseval relation, E = −∞ |X (j ω)| dω.
1 2
2π Thus
ˆ ∞
1
E = Rx (0) = Sx (ω) dω.
2π −∞
Some signals may not readily yield themselves to Fourier analysis. On the other
hand, power energy of such signals can be easily obtained by autocorrelation.
Filtering
As mentioned at the beginning of this section, filters are used to shape the spectral
characteristics of a signal through convolution in time domain. Shaping the signal
408 6 The Fourier Transform
spectrum occurs by multiplying the filter and the signal spectra in frequency domain.
In the process, the magnitudes of the signal and filter spectra are multiplied, and their
phases are added. Filters are required either to shape the magnitude spectrum or the
phase spectrum of a signal. Without proof, we state that the magnitude and phase
spectra of a signal cannot be shaped independently. A desired modification of the
magnitude spectrum may result in an undesired phase spectrum and vice versa.
Filters come in five flavors when classified according to their magnitude
responses:
1. Lowpass Filter (LPF),
2. Highpass Filter (HPF),
3. Bandpass Filter (BPF),
4. Bandstop Filter (BSF), Band-reject Filter, or Notch Filter,
5. All-pass Filter (APF).
In Fig. 6.33 magnitude responses of the five filters are shown. These filters with
the exception of the all-pass filter are ideal. Regarding the magnitude response, the
filters possess regions designated as passband and stopband. Passbands in Fig. 6.33
are filled in with gray. Ideal filters (also known as brickwall filters) pass signals
within passband unaltered (though with some delay). As seen in the figure, the ideal
filter passbands start and stop abruptly at cutoff frequencies ωc , ω1 , and ω2 .
Ideal lowpass filter in Fig. 6.33a has the transfer function
!
1 |ω| ≤ ωc
HLP (j ω) = (6.70)
0 |ω| > ωc .
These ideal filters except the all-pass filter can be built from an ideal lowpass filter.
For example, the highpass filter can be synthesized by subtracting a lowpass filter
function from unity:
and the bandpass filter can be realized by shifting a lowpass filter to ω = ω0 and
ω = −ω0 and adding them up:
1 1
HBP (j ω) = HLP [j (ω − ω0 )] + HLP [j (ω + ω0 )] . (6.72)
2 2
Though mathematically correct, this synthesis implies modulating the lowpass filter
function. In lieu, bandpass filters can alternatively be synthesized by cascading
suitable LPF and HPF functions. This is equivalent to multiplying the corresponding
filter functions in the frequency domain (see Problem 19). We have similar
observations and remarks for the bandstop filter. See Problem 20 for the bandstop
case.
6.11 Applications 409
Fig. 6.33 Basic filter types. (a) Lowpass, (b) highpass, (c) bandpass, (d) bandstop and (e) all-
pass. These filters are ideal filters except all-pass filter; since they are noncausal they cannot be
physically realized
applied at t = 0! We can easily verify this for the lowpass filter by taking the inverse
Fourier transform of its transfer function in Fig. 6.33a:
ˆ ∞
1
h (t) = H (j ω) ej ωt dω
2π −∞
ˆ ωc
1
= 1 · ej ωt dω (6.73)
2π −ωc
ωc sin ωc t
= · = 2fc sin c (2fc t) .
π ωc t
This is the sinc function which is non-zero before t = 0, therefore ideal lowpass
filter is noncausal and unrealizable. Since other ideal filters are derived from the
LPF, they are also noncausal and unrealizable.
Let us design a simple bandpass filter by cascading a 1-st order lowpass filter
and a 1-st order highpass filter. Note that because of the convolution in time, the
order of cascading does not matter. The cutoff frequencies √ for nonideal filters are
specified as those frequencies for which |H (j ω)| = 1/ 2. These frequencies are
√
also called 3dB cutoff frequencies since 20 log 1/ 2 = −3 dB. Let the BPF
cutoff frequencies be ω1 = 10 rad/sec and ω2 = 1000 rad/sec. To realize this BPF,
the LPF and HPF should cutoff at 1000 rad/sec and 10 rad/sec, respectively. These
specifications lead to the following filter transfer function
s/ω1
HBP (s) =
(1 + s/ω1 ) (1 + s/ω2 )
0.1s
= .
(1 + 0.1s) (1 + 0.001s)
We can split this equation into its highpass and lowpass parts:
0.1s 1
HBP (s) = ·
1 + 0.1s 1 + 0.001s
= HHP (s) · HLP (s) .
Thus
0.1j ω
HHP (j ω) = HHP (s) =
s=j ω 1 + 0.1j ω
1
HLP (j ω) = HLP (s) =
s=j ω 1 + 0.001j ω
0.1j ω
HBP (j ω) = . (6.74)
(1 + 0.1j ω) (1 + 0.001j ω)
6.11 Applications 411
Fig. 6.34 BPF implemented by cascading a LPF and a HPF. The lower cutoff frequency is
10 rad/sec and the higher cutoff frequency is 1000 rad/sec. HPF and LPF can be swapped without
altering the filter characteristics
We can use RC lowpass and highpass filters to implement these sections. Since
τ1 = R1 C1 = 1/ω1 = 0.1 s for the HPF and τ2 = R2 C2 = 1/ω2 = 0.001 s for
the LPF, we can select R1 = R2 = 100 k , C1 = 1 μF and C2 = 10 nF. To avoid
loading of the first filter by the second filter, filters are cascaded using a unity gain
buffer amplifier (Fig. 6.34). The order of cascading is unimportant.
Bode plot technique can be used to graph the magnitude and phase response
of our BPF. Bode plot technique was developed in 1930 by Hendrik Wade Bode.
It uses asymptotes to approximate the magnitude and phase characteristics of
412 6 The Fourier Transform
systems (Fig. 6.35). Because hand calculations are preferred during plotting, the
approximation uses addition and subtraction instead of multiplication and division.
This is achieved using logarithms on the magnitude function. Standard 20 log form
has been chosen to express gain in decibels. Consider our design example where the
system transfer function is given by Eq. (6.74). Let us rewrite this equation as
j (ω/10)
HBP (j ω) = .
[1 + j (ω/10)] [1 + j (ω/1000)]
ω/10
HBP (j ω) = ,
|1 + j (ω/10)| |1 + j (ω/1000)|
π
arg HBP (j ω) = − tan−1 (ω/10) − tan−1 (ω/1000) .
2
20 log of the magnitude function converts multiplication and division to addition
and subtraction.
20 log HBP (j ω)
= 20 log (ω/10) − 20 log |1 + j (ω/10)| − 20 log |1 + j (ω/1000)|
= 20 log ω − 20 − 20 log |1 + j (ω/10)| − 20 log |1 + j (ω/1000)| .
Logarithmic rather than linear scale is used for the frequency axis. You make a
mental change of variables x = log ω when you work with Bode plots. Then the
numerator ω/10 gives rise to 20 log ω − 20 = 20x − 20 which is a line with a
slope of +20dB/decade that intercepts the frequency axis at x = 1 (or ω = 10). The
interval from x = 1 to x = 2 or x = i to x = i + 1 corresponds to a ten-fold
increase in frequency. This ten-fold increase is called a decade. As for the factors in
the denominator we have
⎧
⎪
⎪
⎨0 ω 10
20 log |1 + j (ω/10)| = −3 ω = 10
⎪
⎪
⎩20 log ω − 20 ω 10
and
⎧
⎪
⎪
⎨0 ω 1000
20 log |1 + j (ω/1000)| = −3 ω = 1000
⎪
⎪
⎩20 log ω − 20 ω 1000.
6.11 Applications 413
These three segments and the overall magnitude graph are drawn separately in
Fig. 6.36. We clearly see the bandpass character of the filter, and that the transition
from passband to stopband is gradual at a slope of ±20 dB/decade.
414 6 The Fourier Transform
Impulse function is a basic stimulus function to study LTU systems. An LTI system
is duly described by its impulse response. The response of an LTI system to an
arbitrary excitation is the familiar convolution integral which we have come across
several times. Suppose now that an LTI system with impulse response h (t) is excited
by a complex exponential ej ωt . Complex exponential is an eigenfunction. We know
that the response to this excitation is given as
y (t) = ej ωt H (j ω)
= |H (j ω)| exp j (ωt + arg H (j ω)) . (6.75)
We note that when an LTI system is excited with a complex exponential, the output
is the same complex exponential whose magnitude and phase are modified by the
magnitude and phase of H (j ω). Now if we apply e−j ωt to our LTI system we obtain
which is the complex conjugate of the previous response. Therefore the response to
a cosine function would be
1 j ωt 1 j ωt ∗
y (t) = e H (j ω) + e H (j ω)
2 2
= |H (j ω)| cos [ωt + θ (j ω)] , (6.77)
ZL = j ωL (6.78)
1
ZC = . (6.79)
j ωC
6.11 Applications 415
Inverses of these impedances are the respective admittance functions also given by
1
YL = (6.80)
j ωL
YC = j ωC. (6.81)
The resistance value R is the same in the frequency domain and the time domain.
The Fourier transform of the impulse function is then obtained by usual circuit anal-
ysis techniques using these impedance and admittance functions. Current through an
inductance and voltage across a capacitance are time integrals of inductance voltage
and capacitance current, respectively. Their Fourier transforms normally include
an impulse at DC. However assuming zero average for the inductance voltage and
capacitance current we can omit these impulse terms.
Example 6.13 For the circuit shown in Fig. 6.37, (a) derive the voltage transfer
function, (b) select C1 so that the circuit becomes a resistive divider at all
frequencies.
(a) The voltage transfer function of the circuit is H (j ω) = Vout (j ω) /Vin (j ω).
In deriving H (j ω), let us replace C1 and C2 by their admittances to find the
voltage divider output:
Y1 (j ω)
Vout = ·V (6.82)
Y1 (j ω) + Y2 (j ω) in
Y1 (j ω)
H (j ω) = ,
Y1 (j ω) + Y2 (j ω)
Fig. 6.37 (a) Speedup capacitance like those found in oscilloscope probe compensation circuits,
(b) Frequency response, (c) Step response
416 6 The Fourier Transform
where
1 + j ωR1 C1
Y1 = j ωC1 + G1 =
R1
R1
Z1 = .
1 + j ωR1 C1
Likewise
1 + j ωR2 C2
Y2 = j ωC2 + G2 = .
R2
G1 + j ωC1
H (j ω) =
G1 + j ωC1 + G2 + j ωC2
G1 + j ωC1
= . (6.83)
G1 + G2 + j ω (C1 + C2 )
G1 1 + j ωR1 C1
H (j ω) = ·
G1 + G2 1 + j ω C1 +C2
G1 +G2
R2 1 + j ωτ1
= ·
R1 + R2 1 + j ω R1 R2 (C1 + C2 )
R1 +R2
1 + j ωτ1
=k· . (6.84)
1 + j ω [kτ1 + (1 − k) τ2 ]
If we let τ1 = τ2 , H (j ω) becomes
1 + j ωτ2 1 + j ωτ2
H (j ω) = k · =k· =k
1 + j ωτ2 [k + (1 − k)] 1 + j ωτ2
R2
= .
R1 + R2
Eq. (6.84) implies that if τ1 < τ2 the circuit is a lowpass filter, while for
τ1 > τ2 it becomes a highpass filter. The circuit becomes independent of
the frequency if τ1 = τ2 . For this circuit τ2 = 4μs, therefore C1 must be
4nF. C1 is called speedup capacitor since it can be set to render the circuit
in Fig. 6.37 resistive. Oscilloscope probes have similar compensation circuits
that use a trimmer capacitor for speedup. In the circuit of Fig. 6.37, R2 and C2
6.11 Applications 417
6.11.3 Communication
Communication exploits the frequency shift property (Eq. 6.24) of the Fourier
transform in sundry applications. This is a very simple principle, yet its benefits
are immense, and easy to implement electronically. The electronic implementation
cannot handle the complex multiplication ej ω0 t x (t) in isolation. Rather ej ω0 t x (t)
and e−j ω0 t x (t) are performed simultaneously. Since cos (ω0 t) includes both ej ω0 t
and e−j ω0 t , we actually multiply x (t) by cos (ω0 t) to produce X [j (ω + ω0 )] as
well as X [j (ω − ω0 )].
Depending on the application, the operation is called by many names: AM
modulation, AM demodulation, mixing, upconversion, downconversion, etc. The
frequency shift property finds applications in the following fields.
Propagation
c 3 · 108 m · sec−1
λ= ≈ = 106 m !
f 3 · 102 sec−1
8 These are exemplary values. Actual values used, for instance, in vertical amplifiers of Tektronix
or 1000 km; so the required vertical antenna length is 250 km! A 250-km-high
antenna to send a signal to a friend who lives just 50 km away!
However, should we modulate a 30 MHz sinewave with this signal, the modula-
tion products are 30 MHz ± 300 Hz 30 MHz. The wavelength is reduced now
to 10 m, and the required antenna length would be 2.5 m, a much better solution!
Where in your smartphone is the antenna? To appreciate this antenna length issue,
browse the internet for vintage mobile phones and see their antennas hanging on the
top.
Fig. 6.38 A multiplexer takes one sample from each channel every Ts seconds. When ωs >
2Bmax , then the channels can be reconstructed by demultiplexing and lowpass filtering
6.11 Applications 419
to x1 (t) and holds it for Ts /2 seconds. The figure shows that the MUX output is a
stream of two interlaced signals. By sorting out every other y [n] to x0 [n], we obtain
CH 0. The skipped samples are assigned to x1 [n]. This reverse operation is called
demultiplexing. For the 2-to-1 MUX, demultiplexing can be expressed by
x0 [n] = y [2n]
x1 [n] = y [2n + 1] .
We see that the data rate of the multiplexer output is twice the data rate of individual
channels. For an N-to-1 MUX, multiplexer and demultiplexer outputs can be shown
to be
N −1
Nn + i
Multiplexer: y [n] = xi t − · Ts
N
i=0
y (t) = x0 (t) cos (2πf0 t) + x1 (t) cos (2πf1 t) + . . . + xN −1 (t) cos (2πfN −1 t)
&N −1 '
y (t) cos (2πfi t) = xk (t) cos (2πfk t) cos (2πfi t)
k=0
N −1
cos [2π (fk − fi ) t] + cos [2π (fk + fi ) t]
= xk (t)
2
k=0
1 + cos [2π (2fi ) t]
= xi (t)
2
N −1
cos [2π (fk − fi ) t] + cos [2π (fk + fi ) t]
+ xk (t)
2
k=0,k=i
Fig. 6.40 Signal chain through the FDM. The top pane shows the baseband signals CH0, CH1,
and CH2. The second, third and fourth panes are CH0, CH1, and CH2 translated to 1 kHz, 2 kHz
and 3 KHz. The FDM signal is shown in the fifth pane and is the sum of all the translated channels.
The bottom plane is the FDM signal spectrum
v (ch1) and v (ch2). B1, B2, and B3 are multipliers that multiply the channel signals
by their respective oscillator signals. B4 add up channel signals which are now
translated in frequency to 1 kHz, 2 kHz, and 3 kHz.
In Fig. 6.40, signals at relevant points along FDM processing are shown. The
channel signals v (ch0) , v (ch1) and v (ch2) are at the top. The next three panes
show v (ch0) cos (2000π t), v (ch1) cos (4000π t), and v (ch2) cos (6000π t). These
signals add to produce the FDM signal shown in the fourth pane (in blue color). The
last pane is the Fourier transform of the FDM signal. Note that each signal is shifted
to its allocated FDM channel frequency. The particular spectral shape of a channel
is determined by the spectral shape of the corresponding baseband signal.
422 6 The Fourier Transform
Fig. 6.41 The FDM demultiplexer outputs versus the original channel signals
Finally, the FDM signal is multiplied by sine waves of channel frequencies and
lowpass filtered to produce the demultiplexed channels in Fig. 6.41.
As we have seen in Sect. 6.5.10, time domain multiplication convolves the Fourier
transforms of signals. Convolution of signals with sinusoids causes the signals
to be translated in frequency. This property has been widely exploited in radio
communication. As just pointed out, high-frequency signals are more readily
propagated in space than low-frequency signals by using reasonably-sized antennas.
To make antenna sizes acceptable, the information signal is transmitted on top of a
high-frequency carrier signal. In amplitude modulation, an electronic circuit, which
is called an AM modulator, multiplies the information signal by a sinusoidal carrier
at the transmitter. Thus the information content of the signal is safely translated to a
band around the carrier frequency. At the receiver, modulation is undone by another
electronic circuit called a demodulator, which extracts the information signal from
the modulated carrier. In the so-called synchronous demodulators, the modulated
signal is multiplied again by a copy of the carrier signal. The product contains
the information signal, among other frequency terms. Filtering the product signal
retrieves the baseband signal at the receiver.
Suppose a baseband signal x (t) is multiplied by a complex exponential ej ω0 t .
Invoking the frequency shifting property (Eq. (6.23)), or the time domain multipli-
cation property of the Fourier transform (Eq. (6.26)), we can write
F ej ω0 t x (t) = X [j (ω − ω0 )] .
6.11 Applications 423
Fig. 6.42 AM modulation. (a) Baseband signal and carrier, (b) Magnitude spectrum of the
modulated carrier
jω t
Using this result and the identity cos ω0 t = 1
2 e 0 + e−j ω0 t together with the
linearity of the Fourier transform we have
X [j (ω + ω0 )] + X [j (ω − ω0 )]
F [x (t) cos ω0 t] =
2
which simply states that the message in x (t) gets translated to frequencies ω = −ω0
and ω = ω0 . This is the double-sided spectrum of the modulated carrier, which is
also known as AM with suppressed carrier. The carrier frequency is absent from
the modulation signal. In Fig. 6.42a is shown a 1 Volt 5 Hz baseband signal which
modulates a 1 Volt 25 Hz carrier. In Fig. 6.42b, the spectrum of the AM signal is
shown. Note that the 5 Hz baseband signal has been translated to 20 Hz and 30 Hz.
We can demodulate an AM signal by multiplying it by the carrier signal and filtering
out the high-frequency signals as we show next.
Figure 6.43a shows an implementation of an AM modulator. AD633 is a
“multiplier” integrated circuit. It is configured to generate an AM signal with
inserted carrier. The modulating signal v (B) is a 5 kHz sine wave. The carrier is a
40 kHz sine wave. The modulating signal and the carrier are applied to the X and Y
inputs of AD633. The carrier is also applied to the Z input to insert the carrier into
the modulation. The “AM_with_CAR” signal at the output terminal W is an AM
wave with inserted carrier. The modulating and the modulation signals are shown in
Fig. 6.43c.
The W output of AD633 is given by the manufacturer datasheet as
(X1 − X2) (Y 1 − Y 2)
W = + Z. (6.85)
10V
424 6 The Fourier Transform
Fig. 6.43 AM modulation and synchronous demodulation . (a) AD633 multiplier is used as an AM
modulator. The Z input is used to insert the carrier. (b) A synchronous, a.k.a. a coherent detector,
multiplies the incoming AM signal by a locally generated sine wave having the same frequency
and phase as the carrier. The multiplier B1can be another AD633. A 2nd-order LPF with a cutoff
frequency at 5 kHz extracts the baseband signal from the modulation. (c) The baseband and the
modulation signals at the modulator. (d), (e) The modulation signal after multiplied by the carrier
signal, and the output of the LPF
v (AM_with_CAR)
= w (t)
= 2.5 cos 2π · 5 · 103 t cos 2π · 40 · 103 t + 5 cos 2π · 40 · 103 t
= 5 1 + 0.5 cos 2π · 5 · 103 t cos 2π · 40 · 103 t
6.11 Applications 425
Eq. (6.86) shows the frequencies present in the modulation, namely, the carrier and
the two sidebands about the carrier. At the receiver, the AM signal is remultiplied by
a locally generated sine wave of the same frequency and phase as the carrier. If the
carrier is inserted in the modulation, a diode and a simple RC filter can extract
the baseband from the envelope of the modulation. However, if the AM signal
level is insufficient or the carrier is suppressed envelope detection method will not
work. In that case, we employ synchronous, a.k.a. coherent, detection, to recover the
baseband signal. Synchronous detection remultiplies the modulation signal with the
regenerated carrier signal. In Fig. 6.43b, the controlled voltage source B1 is used
for this purpose. It can be another AD633 multiplier. The following LPF extracts
the modulating signal. The multiplier and LPF outputs are shown in Fig. 6.43d, e.
Multiplying Eq. (6.86) by the carrier signal we get
v (AM_with_CAR) cos 2π · 40 · 103 t
= 5 1 + 0.5 cos 2π · 5 · 103 t cos2 2π · 40 · 103 t
1 + cos 2π · 80 · 103 t
= 5 1 + 0.5 cos 2π · 5 · 10 t3
2
= 2.5 + 1.25 cos 2π · 5 · 10 t + 2.5 cos 2π · 80 · 103 t
3
+ 1.25 cos 2π · 5 · 103 t cos 2π · 8 · 104 t
= 2.5 + 1.25 cos 2π · 5 · 103 t + high-frequency terms.
The first term (DC) can be blocked by a series capacitor. The high-frequency terms
are eliminated by a LPF.
In RF engineering, multipliers are called mixers and are used as modula-
tors/demodulators. They are used in radio transmitters and receivers, TV sets and
telephone industry. AD633 multiplier in the above example serves as a mixer.
In the telephone industry, thousands of conversations are allocated channels not
overlapping with adjacent conversation channels. The post office equipment assigns
these carriers to the calling and called subscribers and multiplies the baseband
signals by carrier signals. This translates the conversation to the allocated carrier
frequencies and retrieves them back to the speaker’s phone of the called subscriber.
426 6 The Fourier Transform
FM Slope Detectors
Differentiating this signal with respect to time yields an FM signal whose envelope
varies like an AM signal.
ˆ t
d
vF M (t) = [ω0 + k vs (t)] ω0 t + k vs (τ ) dτ
dt −∞
ˆ t
k
= ω0 1 + vs (t) cos ω0 t + k vs (τ ) dτ .
ω0 −∞
k
The factor 1 + vs (t) causes the derivative signal to look like an AM signal, with
ω0
k
being the AM modulation index. Thus after differentiation an envelope detector
ω0
comprising a diode, a capacitor and a resistor can be used to obtain the modulating
signal vs (t). Taking the Fourier transform of Eq. (6.87) we get
" #
d
F vF M (t) = j ωVF M (j ω) .
dt
Taking magnitudes of both sides, we get
" #
d
F vF M (t) = ω |VF M (j ω)| . (6.88)
dt
Now consider the Fourier transform of the RLC tank circuit shown in
Fig. 1.10given by
1
H (j ω) = ,
ω ωT
1 + jQ −
ωT ω
1
ωT = √ and Q = ωT RC,
LC
where ωT and Q are the resonant frequency and the quality factor of the tank circuit,
respectively. The magnitude of the frequency response thus becomes
1
|H (j ω)| = ; 2 ,
ω ωT
1 + Q2 − ω
ωT
6.11 Applications 427
Fig. 6.44 The magnitude of a tank circuit frequency response. A tank circuit can be used as a
differentiator. The curve, approximated by a tangent drawn at the frequency ω = 0.82ωT , performs
differentiation. The second derivative of the curve changes sign at this frequency. There is another
frequency with this property on the negative slope side of the curve, which can be alternatively
used as a differentiator
|H (j ω)| is shown in Fig. 6.44. We can approximate |H (j ω)| by a tangent for small
perturbations of ω around the carrier frequency. The reason that ωT cannot be used
is that the slope of the tangent at ωT is zero. Below the resonance, the slope is
positive, whereas the slope is negative above the resonance. Although any point
other than ωT can be used, the best point for approximation is the one where the
slope is maximum, that is, where the second derivative is zero. We have two such
points on the |H (j ω)| curve: one for ω < ωT and another for ω > ωT . For the
particular tank circuit in the figure with Q = 2, |H (j ω)| can be approximated on
the negative slope side by
ω
|H (j ω)| = 0.781 + 1.898 − 0.82 .
ωT
|H (j ω)| = |H (j ωc )| + b (ω − ωc )
= |H (j ωc )| − bωc + bω
= a + bω.
If the FM signal is passed through the tank circuit, the magnitude of the output
becomes
Comparing Eqs. (6.89) and (6.88), we immediately recognize that the tank circuit
output provides the derivative of the FM signal because of the ω |VF M (j ω)| term,
which is the demodulated FM signal. The first term is an offset term, and the result
is an “FM” signal whose amplitude varies in accordance with the modulating signal.
When implementing the RLC FM demodulator, we set the frequency, around
which we approximate |H (j ω)|, equal to unmodulated FM carrier frequency ωc .
When the modulating signal is applied, the frequency deviates about ωc . Since the
amount of deviation is proportional to the modulating signal strength; the envelope
of the signal at the tank circuit output is also proportional to the modulating signal.
The envelope can be detected using a diode and an RC filter. In the circuit of
Fig. 6.45, the FM signal carrier frequency is 150 kHz, and the frequency deviation
is ±10 kHz. Thus the operating point on the |H (j ω)| curve is 150 kHz. The small
deviation about the carrier frequency (±6.7%) warrants a tangential approximation
at 150 kHz. The resulting waveform and the demodulated signal is shown in
Fig. 6.45b.
Fig. 6.45 A tank circuit acts as a differentiator since it approximates a derivative at and around a
fixed frequency. (a) The operating point on the RLC magnitude response is equal to the FM carrier
frequency. (b) Waveforms at relevant points in the circuit
6.11 Applications 429
6.11.4 Instrumentation
Spectrum Analyzers In the past, spectrum analyzers were designed using swept-
frequency sinusoidal oscillators, mixers, electronic filters, and cathode-ray tubes
(Fig. 6.46). They were costly electronic test equipment. A voltage-controlled sinu-
soidal oscillator received a ramp signal, producing a linearly varying frequency
output. The input signal was multiplied by the oscillator’s output, and the product
(mixer output) was fed into a lowpass filter producing a DC value. As the oscillator
frequency was swept up, an electron beam was also swept by the ramp signal
from left to right across the cathode-ray tube screen. The mixer output fell into
the filter’s passband at a certain horizontal position, and the trace showed a peak.
The horizontal position of the beam gave us information about the input signal’s
frequency content, that is, its magnitude Fourier transform. The phase spectrum
was usually discarded.
Today, high-speed DSP processors with clock frequencies well above 1 GHz,
Fast Fourier transform (FFT) techniques, large capacity memory devices and smart
LCD screens have revolutionized the test instruments. The instrument in Fig. 6.30
can perform Fourier transform through FFT computation on the input signal and
demodulate it. In contrast with swept-frequency spectrum analyzers, the digital
spectrum analyzer in this figure does not utilize mixers. While mixers use analog
multiplication, DSP processors use MACs (digital multiplier-accumulators). MACs
carry out the multiplication-summation operations of DFT and correlation. MACs
are central to DSP processors, which operate in real-time.
A simplified architecture of a fixed-point multiplier/accumulator of ADSP-2100
digital signal processor is shown in Fig. 6.47. DSP chip architectures use reduced
instruction sets which execute in a single clock cycle. They are designed to perform
multiplication/addition and sophisticated ALU operations on hardware, making it
possible to perform Fourier transform, correlation, convolution, etc., on-chip in real-
time. Consider N-point discrete Fourier series calculation of Chap. 5.
N −1 N −1
1 2π kn 1 2π kn
X [k] = x [n] cos +j x [n] sin
N N N N
n=0 n=0
We have to start with a sum of zero when n = 0, then add to this sum
x [n] cos (2π kn/N) until n = N − 1. MAC of Fig. 6.47, MX and MY registers are
loaded with x [n] and cos (2π kn/N). A single instruction
MR = MR + MX(0)* MY(0);
computes the product, and adds it to the previous sum in one clock cycle. The second
sum is done the same way. When we are done with two sums, we obtain X [k] for
a particular value of k. After 2N 2 multiplications, 2N (N − 1) additions, and two
divisions, we get the N DTFS coefficients. Fortunately, we have FFT algorithms
that dramatically cut the number of multiplications and additions (see Chap. 8).
With high-speed MACs and efficient algorithms, Fourier transform has become a
possibility in real-time.
6.11 Applications 431
Further Reading
Problems
and
ˆ ∞ ˆ ∞
−j 2πf τ
f (t) = f (τ ) e dτ ej 2πf t df
−∞ −∞
A signal x (t) applied to the input of this filter produces y (t) at the filter output.
Prove that the output of the filter is given by
y (t) = h (t) ∗ x (t − t0 )
12. A signal y (t) is related to another signal x̃ (t) through the relation y (t) =
x̃ (t) cos (ω0 t + θ ). If the Fourier transform of x̃ (t) is given as
1 1
X̃ (j ω) = X [j (ω + ω0 )] + X [j (ω − ω0 )]
2 2
Find Y (j ω) and discuss the effect of θ .
13. Using the fact that the impulse function is the derivative of the unit step function
and the Fourier transform of unit step function is
1
U (j ω) = + π δ (ω)
jω
16. In the circuit shown below, voltage sources are identical with equal frequency
and phase. Show that |Vout | = 1Volt for all frequencies and R, C values; and
arg {Vout } = tan−1 (ωRC)−1 .
Problem 16.
Constant-amplitude output
RC circuit
17. The input and output of the following tank circuit are related through the
differential equation:
ˆ
dy (t) 1 t
x (t) = y (t) + R C + y (τ ) dτ .
dt L −∞
Problem 17
Y (j ω)
(a) Find the transfer function H (j ω) = .
X (j ω)
(b) Suppose x (t) = u (t) − u (t − 1). Find X (j ω) and Y (j ω).
434 6 The Fourier Transform
Find the frequencies and the amplitudes resulting from this operation.
24. A QAM signal is generated by z (t) = x (t) cos ω0 t + y (t) sin ω0 t. Show that
x (t) and y (t) can be recovered from z (t) using
Problem 25
N −1
2π n
exp j =0
N
n=0
436 6 The Fourier Transform
N −1
1 2π nk
X [k] = x [n] exp −j .....k = 0, . . . , N − 1
N N
n=0
N −1
2π nk
x [n] = X [k] exp j ............n = 0, . . . , N − 1
N
k=0
1
You can even find in mathematical texts √ before both of forward and reverse
N
transforms. Explain the apparent discrepancy. Do you think that this is a matter
of personal preference, or a matter of interpretation?
31. Study Eq. (6.60). Using a similar procedure derive the column-wise DFT.
32. Find the 2D Fourier transform of f (x, y) = 64 (1 + sin 8π x) (1 + sin 16πy).
33. Find the magnitude and phase of the Fourier transform for the following system
functions
(a)
s−1
H (s) =
s+1
(b)
1 + 0.1s
H (s) =
1+s
34. Let x [n] be a discrete-time signal with Fourier transform X ej ω . Prove the
Parseval relation
∞ ˆ 2π 2
1
|x [n]|2 = X ej ω dω
n=−∞
2π 0
6.11 Applications 437
35. Let x [n] be a periodic discrete-time signal with period N and Discrete Fourier
series coefficients X [k]. Prove the Parseval relation
N −1 N −1
1
|x [n]|2 = |X [k]|2
N
n=0 k=0
Problem 36
Problem 37
6.11 Applications
the performance. The maestro directs the orchestra to generate the sounds required
by the composition. The outcome is a signal with a time-varying spectrum. Normal
Fourier transform cannot be used to locate the spectrum of the song in time. This is
because the defining integral for the Fourier transform
ˆ ∞
X (j ω) = x (t) e−j ωt dt
−∞
covers the entire time domain (−∞ < t < ∞) and is independent of time. As long
as the signal spectrum does not “change” along the way, this is fine. By inspecting
the Fourier transform of the signal, we can tell as a whole which frequencies it
consists of. On the other hand, should the signal change locally, we are left at a loss
to predict where those changes have occurred. We can cite several examples of such
signals: the sound of an approaching ambulance, the speech signal, ECG signal,
chirp of a singing bird, radar and sonar echoes, etc.
Consider a signal expressed by
⎧
⎪
⎪sin (2π · 4t) , 0 ≤ t < 1s
⎪
⎪
⎨sin (2π · 8t) , 1 ≤ t < 2s
x (t) =
⎪
⎪sin (2π · 12t) , 2 ≤ t < 3s
⎪
⎪
⎩
sin (2π · 16t) , 3 ≤ t < 4s
which is shown in Fig. 7.1a. The Fourier transform of this signal is shown in
Fig. 7.1b. We see that the signal is depicted as containing all of the constituent
frequencies 4 Hz, 8 Hz, 12 Hz, and 16 Hz—with no clues at all as to where
these frequencies have occurred. The Fourier transform simply revealed that these
frequencies exist for all time. What we would like to see instead is a transform
X (t, ω)1 which depends on time and frequency. This is the motivation behind
the time–frequency analysis (TFA). If we adopt a proper time–frequency analysis
we can spot the frequencies of x (t) occurring in time. The STFT is a method
beside others2 used to study signals in joint time–frequency. The result of the STFT
analysis of x (t) is a two-dimensional, and possibly complex signal depicted in
Fig. 7.1c.
To incorporate time information into the Fourier transform, the entire signal is
multiplied by a time function whose position in time is known in advance and can
Fig. 7.1 (a) A signal with successive, 4 Hz, 8 Hz, 12 Hz, and 16 Hz sinusoidal constituents. (b)
The magnitude of a conventional Fourier transform analysis shows the four spectral components.
The location of the occurrences is not apparent. (c) STFT analysis of the same signal. The vertical
axis is frequency, and the horizontal axis is time. The magnitude of the Fourier transform is
coded as the intensity of color. Note the frequency transitions at 1 s, 2 s, and 3 s. This graph is
a spectrogram
444 7 Short-Time-Fourier Transform
Fig. 7.2 Windowing. (a) A window function and its time shifts. (b), (c) The signal and its
windowed version
where τ is the shift amount. When τ is varied, the window is shifted in time, and the
portion of x (t) within the window is shaped by the window. The shaping depends on
the window (see Figs. 7.2a,b and 7.6). y (t) becomes zero when w (t − τ ) is equal
T T T
to zero, that is, when t < τ − or t > τ + . For |t − τ | < , y (t) gets a
2 2 2
7.1 Short-Time Fourier Transform 445
shaped copy of x (t). The Short-time Fourier transform (STFT) is then the Fourier
transform of (7.3),
ˆ ∞ ˆ t+T /2
Y (τ, ω) = y (t) e−j ωt dt = y (t) e−j ωt dt,
−∞ t−T /2
ˆ t+T /2
= x (t) w (t − τ ) e−j ωt dt. (7.4)
t−T /2
T T
This transform captures the signal spectrum between t = τ − and t = τ + .
2 2
This is nothing but a localization of the spectrum to a vicinity of t = τ in time. T
represents the time resolution and affects the frequency resolution. Y (τ, ω) is a 2D
complex signal whose magnitude is called the spectrogram.
The Fourier transform (7.4) of the windowed signal is found by convolution in
the frequency domain
Y (τ, ω) = X (ω) ∗ F [w (t − τ )]
where W (ω) is the Fourier transform of the unshifted window. Thus the convolution
evaluates to
ˆ ∞
Y (τ, ω) = X (u) W (ω − u) e−j (ω−u)τ du. (7.5)
−∞
This result shows that the magnitude of Y (τ, ω) is affected by the shifts in the
window function; hence Y (τ, ω) is a distorted representation of X (ω) evolving
in time, so we can only hope that it fairly approximates X (ω). This issue is the
motive that triggers spectrum estimation efforts. Spectrum estimation is beyond the
scope of this book. Nevertheless we can view Y (τ, ω) as the STFT view of x (t)
rather than its true spectrum in time. Using the spectrum of the unshifted window
in the spectral convolution expression (7.5) reveals the temporal appearance of the
spectrum. Since every frequency Ω in X (ω) is represented by a pair of impulse
functions of the form δ (ω ± Ω), the convolution shifts the window spectrum to
these impulse frequencies. As a result, a spread view of the frequencies is obtained
rather than sharp, impulse-like spikes. The extent of the spreading is determined by
the selected window.
446 7 Short-Time-Fourier Transform
Fig. 7.3 (a), (b) Rectangular window and its magnitude spectrum in dB. (c), (d) Hanning window
and its magnitude spectrum in dB. The width of the Hanning window main lobe is 4/T , twice that
of the rectangular window. Hence the frequency resolution of the Hanning window is half of the
rectangular window. On the other hand the amplitude of the second lobe of the rectangular window
is −13.3 dB while that of the Hanning window is −41 dB. The rectangular window, although
having twice the frequency resolving power, its side lobes leak more spectral content from nearby
frequencies
The frequency resolution and the window width are closely related. As will
be apparent shortly, improving the resolution in time worsens the resolution in
frequency. For the sake of simplicity, assume that we select a rectangular window
with a width T centered at t = τ . The rectangular window is specified by Eq. (7.2)
and is shown in Fig. 7.3a. The Fourier transform of this window is given by
sin (πf T )
W (f ) = T = T sin c (f T ) .
πf T
2
Δf = . (7.7)
T
If x (t) has two frequencies f1 and f2 which are closer to each other than Δf , f1 and
f2 cannot be resolved in the spectrogram by STFT analysis. The only way to resolve
them is to increase the window width T despite the adverse effect of degradation in
the time resolution. Hence Δf is an indicator of the frequency resolution and is
inversely proportional to T .
The spectral view depends on the choice of the window function because the
width of the main lobe and the height of the side lobes are different for each
window type (see Fig. 7.6 for some popular windows). For example, the rectangular
window has the narrowest main lobe, but considerably large side lobes compared
to the Hanning window. The width of the main lobe is 4/T , and the amplitude of
the first side lobe is −41 dB. Hanning window, although having a lower resolution
than the rectangular window, nevertheless its first side lobe suppresses the nearby
frequencies 24 times better than the rectangular window. The required side lobe
performance decides the window function; the window function and the required
resolution decide the width of the window. The Blackman window has the widest
main lobe, but all the side lobes are below −60 dB and are 1/T apart from each
other. If we agree to resolve the frequencies to f = 6/T , then the effects
of the side lobes are less than one thousandth of the main lobe. In STFT the
width of the window is kept constant for all time shifts. The time resolution and
frequency resolution tile the time–frequency plane into rectangles of equal area
(Fig. 7.4). The window width determines the frequency resolution which is also
fixed and inversely proportional to time resolution. This resembles the Heisenberg’s
uncertainty principle in physics,
1
x p ≥
4π
which states that the product of the uncertainties of location and momentum of a
1
particle cannot be less than , that is, the position and momentum of the particle
4π
cannot be determined with 100% certainty. This very uncertainty holds in signal
processing as well. If the time and frequency of a signal are known with a resolution
t and f , the uncertainty principle imposes that
1
t f ≥ . (7.8)
4π
1
Hence the area of a rectangle in the time–frequency plane cannot be less than .
4π
The signal between t + τ − T /2 and t + τ + T /2 can be said to contain a frequency
in the range f − f/2 and f + f/2. This simply means that locating a signal to
a certain instant with high accuracy incurs a large uncertainty in frequency and vice
versa. For example, because
1
f ≥
4π t
locating the exact position of a frequency in time is impossible since this means
t = 0 and f = ∞.
To illustrate the STFT, consider a continuous-time signal expressed by
⎧
⎪
⎪sin (2π t) + sin (2π · 100t) , 0≤t < 1 s,
⎪
⎪
⎨sin (2π · 80t) + sin (2π · 83t) , 1 ≤ t < 2 s,
x (t) =
⎪
⎪sin (2π · 50t) + sin (2π · 60t) , 2 ≤ t < 3 s,
⎪
⎪
⎩
sin (2π · 30t) + sin (2π · 40t) , 3 ≤ t < 4s
and is shown in Fig. 7.5a. In part (b) a rectangular window is first used with T =
0.256 s, then with T = 1.024 s. We observe that T = 0.256 s better locates the
frequencies than T = 1.024 s; with T = 0.256 s window width, there is less overlap
between frequencies at 1, 2, and 3 s boundaries than with T = 1.024 s. On the other
hand 80 Hz and 83 Hz signals can be better resolved with a T = 1.024 s width than
with T = 0.256 s. In part (c) the signal is windowed by a Hanning window. As with
the rectangular window, the window width affects the time overlap at 1, 2, and 3 s
boundaries in the same fashion. Also it affects the frequency resolution in the same
manner. Comparing the rectangular and the Hanning window we see that the former
can better resolve 80 Hz and 83 Hz than the latter. However, due to its stronger side
7.1 Short-Time Fourier Transform 449
Fig. 7.5 Effects of window on observed STFT. (a) The signal, (b) Rectangular window, (c)
Hanning window
lobes, the rectangular window STFT has more fringing around the frequencies than
the Hanning window (Fig. 7.6).
The minimum frequency that can be detected by a window is T1 and is called the
Rayleigh frequency.
450 7 Short-Time-Fourier Transform
Exploiting the symmetry property (7.1), and interchanging the roles t of and τ , we
have
ˆ ∞
w (t − τ ) dτ = A.
−∞
We see that X (ω) can be obtained by integrating over all values of the shift. Inverse
transforming AX (ω) we can retrieve Ax (t)
ˆ ∞
1
Ax (t) = AX (ω) ej ωt dω
2π −∞
ˆ ∞ ˆ ∞
1
= Y (τ, ω) dτ ej ωt dω
2π −∞ −∞
452 7 Short-Time-Fourier Transform
ˆ ∞ ˆ ∞
1
= Y (τ, ω) e j ωt
dω dτ
−∞ 2π −∞
ˆ ∞
1
x (t) = F −1 [Y (τ, ω)] dτ.
A −∞
Hence we conclude that the inverse STFT can be found by integrating the local
inverse Fourier transforms over all the time shifts. If τ is not a continuum, but a set
of discrete values of shift, as is usual in practice, the inverse transform becomes a
an infinite sum
x (t) = F −1 [Y (j ω, τi )] . (7.11)
i
y [n] = x [n] w [n − k] .
k, the shift amount, is a positive integer less than or equal to N. Assuming that N is
even, the Fourier transform of y [n] becomes
k+N/2
Y [k, ω] = x [n] w [n − k] e−j ωn
n=k−N/2
which is the discrete version of Eq. (7.4). The operation is an N-point FFT which
can be efficiently performed in N log2 N steps if N is an integer power3 of 2. If
N is not an integer power of 2, the FFT is computed in N 2 steps. N samples
of x [n] w [n − k] must be stored in a serial-in-parallel-out (SIPO) shift register
and converted to digital by an ADC before being applied to the FFT analyzer. If
k = N there is no frame overlap; otherwise if 0 < k < N the time frames do
overlap, and pipelining is needed for real-time STFT. If real-time is not required
pipelining is not necessary. Figure 7.7 shows the steps when the windows overlap.
The figure shows an M stage pipeline which comprises multiple window functions
and multipliers. At each clock pulse one multiplication is performed and clocked
in the serial-in-parallel-out shift register (SIPO). The SIPOs depicted here are of
analog charge-coupled devices (CCD). After every M clock pulse a window-signal
product is completely shifted in a SIPO register and appears across the parallel
outputs of the register. The counter and the M-to-1 analog MUX passes the product
to an ADC whose output is Fourier transformed by an FFT processor. The output of
the FFT (magnitude or phase) is entered to the frequency bins of the relevant time
shift.
3 See Chap. 8.
454 7 Short-Time-Fourier Transform
Windowing
The discrete window w [n], like its continuous cousin w (t), is a symmetric function.
If we center w [n] at the origin we should have
w [n] = w [−n] , 0 ≤ n ≤ M.
w [n] = w [N − 1 − n] , 0 ≤ n < N.
2π
,
N −1
7.1 Short-Time Fourier Transform 455
which is also the Rayleigh frequency. For example, in Hamming window we fit
a complete
cycle
of a cosine wave into the window. This is why we see a term
2π n
cos in Table 7.2.
N −1
We can use the discrete versions of rectangular, Hamming, Hanning, Bartlett,
and Blackman windows in the discrete STFT. In Table 7.2, mathematical definitions
of these windows are given and Figs. 7.8 and 7.9 show these windows in the time
Fig. 7.8 Rectangular, Hamming, Hanning, Bartlett, and Blackman window functions with N = 64
Fig. 7.9 Fourier transform of the Rectangular, Hanning, Bartlett, and Blackman windows.
Window length 31 samples (N=32)
456 7 Short-Time-Fourier Transform
domain and frequency domain, respectively. Comparing Tables 7.1 and 7.2 we see
the defining equation
2π n
w [n] = 0.54 − 0.46 cos ,
N −1
w [t] = 0.54 + 0.46 cos (2π t/T ) .
7.2 Gabor Transform 457
The apparent difference in the signs of the second terms can be explained by the
T N −1
shift of the discrete window by an amount = which corresponds to π
2 2
rads/sample.
T
w [n] = 0.54 + 0.46 cos 2π t − /T
2
t 1 2π t
= 0.54 + 0.46 cos 2π − = 0.54 + 0.46 cos −π
T 2 T
2π t
= 0.54 − 0.46 cos .
T
2π n
Substituting t = n, and T = N − 1 we get w [n] = 0.54 − 0.46 cos .
N −1
The STFT slots can be aggregated to generate useful TFA graphs. A waterfall
graph depicts STFT analyses in a 3D graph where the horizontal axis denotes
frequency, the vertical axis is for magnitude (or phase) and the third axis denotes
time. The Fourier transform shares some properties with the STFT (see Problem 5).
In statistical signal processing, the normal distribution with zero mean and a
variance σ is a Gaussian function defined as
1 1 x 2
f (x) = √ exp − . (7.12)
2π σ 2 σ
f (−x) = f (x) ,
1
f (0) = √
2π σ
ˆ ∞
f (x) dx = 1.
−∞
The Gabor transform introduced by Dennis Gabor is a special STFT which utilizes
a Gaussian window function,
ˆ ∞ & '
1 t −τ 2
Y (τ, ω) = x (t) exp − exp (−j ωt) dt, (7.13)
−∞ 2 T
458 7 Short-Time-Fourier Transform
& '
t −τ 2
where exp − 12 is the Gaussian window, and Y (τ, ω) denotes the
T
Gabor transform. The normal distribution has been modified to yield the Gabor
window
& '
1 t −τ 2
g (t − τ ) = exp − . (7.14)
2 T
The time shift τ is the expected value of the window function, while T is the
variance. g (t) satisfies the properties we cited for the other window functions,
The variance of a Gaussian function affects its width, that is, the bigger the
variance, the “wider” the Gaussian function. Designating the variances of the
Gaussian window and its Fourier transform by σg and σG , by (7.14) and (7.15)we
observe that
σg = T
1
σG = ,
T
7.2 Gabor Transform 459
and
σg σG = 1.
σg and σG can be related to the temporal resolution t and the frequency resolution
ω. This is another manifestation of the time–frequency tradeoff in STFT.
The Fourier transforms of the window functions used in the ordinary STFT
(Eq. (7.5)) are all made of sinc functions which contain an infinite number of
lobes. As shown in Fig. 7.10a and b, the Fourier transform of a Gaussian is another
Gaussian which has only one lobe. This is a very discriminating difference from the
ordinary STFT. This very difference and the fact that a Gaussian function quickly
decays to zero put the Gabor transform in a distinguished place in the STFT analysis.
Finally we have the computational issue of an infinitely wide window function.
This issue can be remedied by truncating the Gaussian window to a reasonable
range. Since g (5T ) ≈ 3.73 · 10−6 , the Gabor transform can be approximated by
ˆ & 2 '
5T 1 t −τ
Y (τ, ω) ≈ x (t) exp − e−j ωt dt
−5T 2 T
Fig. 7.10 (a) Gaussian windows with T = 0.5, 1, 2. (b) Fourier transforms of the Gaussian
windows in (a). (c), (d) The continuous-time signal of and its Gabor transform
460 7 Short-Time-Fourier Transform
In Fig. 7.10c and d, the same signal used in Fig. 7.5 is used for Gabor transform
analysis. Notice the improvement in time and frequency resolution.
Figure 7.11 shows several vi’s that LabVIEW provides in advanced signal
processing toolkit which facilitate the implementation of STFT analysis. STFT
and Gabor transform vi’s provide windowing, shifting, and FFT operations. All you
need to do is select the window function, the time-shift amount, and the FFT size.
The result of these vi’s is a 2D array which is the magnitude of the FFT that can
be displayed in the form of a spectrogram or a waterfall graph. Problem 6 shows
an example which uses TFA STFT Spectrogram VI to compute the spectrogram
of a chirp signal. Time–frequency sampling info bundle passes the amount of
window shifts (τ ) and the FFT size. Window info specifies the window type and
window length (N). An intensity graph or a waterfall graph can used to display
the spectrogram. The front cover of this book depicts the waterfall graph of a
speech signal. The windows available in The STFT Spectrograms are Rectangle,
Hanning, Hamming, Blackman-Harris, Exact Blackman, Blackman, Flat Top,
4 Term B-Harris, 7 Term B-Harris, Low Sidelobe, Blackman Nuttall, Trian-
gle, Bartlett–Hanning, Bohman, Parzen, Welch, Kaiser, Dolph-Chebyshev,
Gaussian.
If you do not have the advanced signal processing toolkit, the vi’s mentioned in
the previous paragraph and Fig. 7.11 are not available. But if you have the Full
Development System, then you can do your own STFT by using a little effort.
You will have to design your windows yourself and produce the window shifts
programmatically. Thereafter you connect the windowed signal to an FFT vi. But as
already mentioned, make sure for the sake of a “fast” FFT that you use a window
whose length is a power of 2.
In Fig. 7.12, the window generation and the STFT are shown. The CASE
structure shows the implementation of the Hamming window. The CASE selector
is connected to the Window Type ENUM control which selects the rectangular,
Hamming, Hanning, Bartlett, and Blackman windows. The implementation of the
other windows using Table 7.2 is straightforward. The WHILE loop shifts the
selected window along the discrete-time as dictated by k control (which corresponds
to τ ). The multiplication receives the signal x [n] and an augmented array which is
the size of x [n] and is zero everywhere except where the shifted window appears.
The multiplication is point-by-point from which the product is extracted by the
ARRAY SUBSET function and passed to the FFT vi. To display the spectrogram,
the magnitude of the complex number vi is accumulated by the WHILE loop as
a 2D array and passed to the 2D intensity graph. A test signal shown on the
462 7 Short-Time-Fourier Transform
Signal waveform graph, and a 256-point Hamming window, and the resulting STFT
magnitude are shown on the vi front panel. The displays on the front panel are not
calibrated in time and frequency to prevent clutter. Once we specify the sampling
period of x [n], the calibration is a straightforward task.
Problems
1. The Hanning window, also known as the raised cosine window, is defined by
⎧
⎪ 2π t T
⎨ 12 1 + cos , |t| <
w (t) = T 2
⎪
⎩0, T
|t| >
2
Show that the Fourier transform of the Hanning window is given by
sin (π x)
where sin c (x) = .
πx
2. Complete the intermediate steps leading to Eq. (7.6).
3. The Blackman window provides the best side lobe performance. Two frequencies
which are 1 kHz apart are to be resolved by a Blackman window. Find the
required window width T .
4. From the continuous-time
Hanning
window derive the discrete-time window
2π n
w [n] = 0.5 1 − cos .
N −1
5. Let y1 (t) = x1 (t) w (t) and y2 (t) = x2 (t) w (t). Y1 (τ, ω) and Y2 (τ, ω) are the
STFTs of y1 (t) and y2 (t). Show that the following identities are valid
(a)Linearity: ST F T [a1 x1 (t) + a2 x2 (t)] = a1 Y1 (τ, ω) + a2 Y2 (τ, ω)
(b)Time shift: ST F T [x (t − t0 )] = Y (τ − t0 )
(c)Frequency modulation: ST F T x (t) ej ω0 t = Y (τ, ω − ω0 )
´∞ ´∞ ´∞
(d)Parseval identity: −∞ x1 (t) x2∗ (t) dt = −∞ −∞ Y1 (τ, ω) Y2∗ (τ, ω) dωdτ
6. Computer project. A chirp signal is given by x (t) = sin 2π 10t + 50t 2
so that its frequency is 10 Hz at t = 0 and 110 Hz at t = 1 s. A LabVIEW
vi designed to display the chirp signal and its STFT is shown below. The front
panel is shown in (a). The block diagram is shown in (b). The waveform graph
is the sweep signal, and the intensity graph is the STFT spectrogram. Time–
frequency sampling info control sets, in number of samples, the amount of
time shifts; frequency bins determine the FFT size, which must be a power of
for an effective operation. Window info selects the window type and its length.
7.3 STFT in LabVIEW 463
Problem 6 Implementing STFT. (a) The front panel, (b) the block diagram, (c) STFT with 128
time steps
464 7 Short-Time-Fourier Transform
In Chaps. 5 and 6 we have touched upon the DFT and IDFT. As pointed out
there, the DFT is more appealing than the continuous Fourier transform, since
the former utilizes digital computational hardware while the latter would require
analog computation which is less flexible and more difficult to implement. On the
other hand, there is an immense need for the Fourier transform in science and
engineering applications. Radar and sonar signals, radio, biomedical signals and
images are analyzed to reveal their spectral composition. Operations like filtering
and convolution may be performed on the signal in the frequency domain and
the result may be transformed back to the discrete-time domain. These operations
were expensive in the past. However, the advent of very powerful PC’s, dedicated
DSP and FPGA math scores have made FFT feasible, desirable, and ubiquitous on
modern digital hardware. Usually, you do not need to know how such hardware
performs FFT calculations and which algorithms they use. What you should do as
a user is to make your raw data ready for analysis and provide enough memory
space required by the algorithm, then make a function call to the FFT function with
required parameters. But it is curious to understand how they work, as someday you
might wish to modify someone else’s algorithm or develop your own instead. As
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2022 465
O. Özhan, Basic Transforms for Electrical Engineering,
https://doi.org/10.1007/978-3-030-98846-3_8
466 8 Fast Fourier Transform
such, a lot of effort has been expended to obtain the Fourier transform efficiently.
Fortunately, algorithms have been developed in 1960’s which made it possible for
the DFT to be computed on digital computers efficiently. These algorithms have
been commonly known as Fast Fourier Transform (FFT) algorithms.
Recall that W designated e−j 2π/N in Sect. 5.8.1 on page 303. In the following
development, we let WNkn denote the complex exponential which appears in the
Fourier transform as
2π kn
2π k n
WNkn = e−j N = e−j N , (8.1)
N −1 N −1
2π kn 2π kn 2π kn
X [k] = xR [n] cos − xI [n] sin +j xR [n] sin
N N N
n=0 n=0
2π kn
+ xI [n] cos
N
are required to compute the DFT. As a rule of thumb, the computational load is
proportional to N 2 . 131072 trigonometric evaluations, 262144 real multiplications,
and 131072 real additions are needed for a 256-point DFT. This is a formidable
computational burden which discourages the direct computation of DFT. In order
to cut on computation time, FFT algorithms exploit the symmetry, conjugate, and
periodicity properties of the phase term WNn . These properties are
n+N/2
1. WN = −WNn (Symmetry property)
N −n ∗
2. WN = WNn (Conjugate property)
3. WNn+N = WNn (Periodicity property)
Table 8.1 lists the simplifications for W8kn . While normal DFT computation
evaluates W8kn 64 times, FFT evaluates and stores W80 , W81 , W82 , and W83 . To obtain
the entries of the table, symmetry and conjugate properties have been used. A similar
table can be constructed if the conjugate property were used instead of symmetry.
A sequence of N discrete data can be split into two chunks of data of length L
and M such that N = L + M. Then the N -point DFT can be computed as the sum
of L-point and M-point sums. This can be shown by splitting the DFT sum from
n = 0 to n = N − 1 into two smaller sums. Since
N −1
X [k] = x [n] {u [n] − u [n − L]} + x [n] {u [n − L] − u [n − N]} WNkn ,
n=0
n = 0, . . . , N − 1
L−1 N −1
= x [n] WNkn + x [n] WNkn .
n=0 n=L
Following the same argument, we immediately see that the first sum involves 4L2
real multiplications. The second sum has M rows, thus 4M 2 real multiplications
are involved in it. Assuming the computational cost is roughly proportional to the
square of the data length, we can predict that the total cost of the two smaller DFT’s
is less than the cost of a single N-point DFT. Indeed
L2 + M 2 = L2 + (N − L)2
= L2 + N 2 − 2NL + L2
= N 2 − 2 (N − L) L
< N 2.
If r = 2, then we have the most popular and used radix-2 FFT. We can split the
input data sequence in half and compute intermediate N/2-point DFT’s from the
split sequences. Following the same line of thought above, the cost of computation
after first division becomes
2 2
N N N2
+ =
2 2 2
which is a reduction by two. Further splitting N/2 sums into N/4-point sums results
in another reduction in computation by a factor of 2.
2 2 2 2
N N N N N2
+ + + =
4 4 4 4 4
8.1 Radix-2 FFT Algorithms 469
We continue the splitting process until we are left with 2-point sums whose
computational cost must be just 22 . Pursuing this philosophy as outlined in the next
section, the N -point DFT is entirely split into 2-point sums in log2 N stages, with
each stage consisting of N/2 two-point sums Fig. 8.1. Splitting can be achieved
by splitting either the discrete-time samples or the Fourier components. The
former produces a procedure called decimation in time, whereas the latter produces
decimation in frequency.
Equation (8.2) can be split into two by collecting the even-indexed samples under
one summation and odd-indexed samples under another summation:
N/2−1 N/2−1
(2n+1)k
X [k] = x [2n] WN2nk + x [2n + 1] WN k = 0, . . . , N/2 − 1.
n=0 n=0
Thus the N-point DFT in Eq. (8.2) is split into X [k] and X [k + N/2] as follows:
N −1
X [k] = x [n] WNnk
n=0
N/2−1 N/2−1
(2n+1)k
= x [2n] WN2nk + x [2n + 1] WN
n=0 n=0
N/2−1 N/2−1
= nk
x [2n] WN/2 + WNk x [2n + 1] WN/2
nk
k = 0, 1, . . . , N − 1,
n=0 n=0
(8.3)
470 8 Fast Fourier Transform
(2n+1)k
where we have simplified the twiddle factors WN2nk and WN using
2π · 2nk 2π · nk
WN2nk = exp −j = exp −j
N N/2
= WN/2
nk
and
(2n+1)k
WN = WN2nk WNk
= WN/2
nk
WNk .
Calling
N/2−1 N/2−1
X [k] = nk
f1 [n] WN/2 + WNk nk
f2 [n] WN/2 k = 0, 1, . . . , N − 1
n=0 n=0
whose two terms contain N/2-point DFT’s. However the frequency index k still
runs from 0 to N − 1. We can force k to run from 0 to N/2 − 1
N/2−1 N/2−1
X [k] = nk
f1 [n] WN/2 + WNk nk
f2 [n] WN/2 k = 0, 1, . . . , N − 1
n=0 n=0
N/2−1 N/2−1 N/2−1
n(k+N/2)
X [k] = nk
f1 [n] WN/2 + WNk nk
f2 [n] WN/2 + f1 [n] WN/2
n=0 n=0 n=0
N/2−1
(k+N/2) n(k+N/2)
+ WN f2 [n] WN/2
n=0
N/2−1 N/2−1 N/2−1
nN/2
= nk
f1 [n] WN/2 + WNk nk
f2 [n] WN/2 + WN/2 nk
f1 [n] WN/2
n=0 n=0 n=0
N/2−1
N/2
+ WN/2
k
WN nk
f2 [n] WN/2
n=0
8.1 Radix-2 FFT Algorithms 471
where
N/2−1 N/2−1
X [k] = nk
f1 [n] WN/2 + WNk nk
f2 [n] WN/2 k = 0, . . . , N/2 − 1
n=0 n=0
N/2−1 N/2−1
X [k + N/2] = nk
f1 [n] WN/2 − WNk nk
f2 [n] WN/2 .
n=0 n=0
If we call
N/2−1
F1 [k] = nk
f1 [n] WN/2 , and
n=0
N/2−1
F2 [k] = nk
f2 [n] WN/2
n=0
we can write
where F1 [k] and F2 [k] are the DFT’s of the even-indexed and odd-indexed
sequences, respectively. Thus we have obtained two N/2-point DFTs, the sum of
which yields the original N-point DFT. Equation (8.6) represents a fundamental
FFT operation called a butterfly. Figure 8.2 is a schematic representation of a twiddle
in (8.6). The butterfly diagram complies with the signal flow diagram conventions;
the numbers and WNk are multipliers for the signals which enter the arrows, and the
nodes where two arrow heads meet are summing nodes. The outputs A and B in
Fig. 8.2 are related to the inputs through
A = a + bWNk
B = a − bWNk .
472 8 Fast Fourier Transform
In the last stage of FFT computation N/2 butterflies are computed; in the
preceding stage there are 2 · N/4 butterflies. The process of splitting of indices
into even and odd is continued until we are left with 2-point DFTs (Fig. 8.3). Each
splitting on the way produces a DFT whose size is halved. However each stage of
splitting produces N/2 butterflies regardless of the DFT size. This means that there
are log2 N stages of butterfly computations. The last stage computes the final N-
point DFT. The stage before last is an N/2-point DFT, and the one before that is
a N/4 point DFT and so on until we are left with 2-point DFT’s. In radix-2 FFT
computation N is selected as an exponent of 2, say N = 2M . Hence what we have
said about the split-DFT’s can be restated: the last stage is a 2M - point DFT, the one
before last is a two 2M−1 - point DFT’s, and the next is four 2M−2 - point FFT’s until
we arrive at N/2 many 21 - point DFT’s. We conclude that there are M stages with
N/2 butterflies in each. Let us denote the total number of butterflies by B. Since
M = log2 N the number of butterflies is
N
B= · log2 N. (8.7)
2
We can calculate the total number of complex additions and trigonometric multipli-
cations with the help of Eq. (8.7) (Table 8.2). Each butterfly entails one complex
8.1 Radix-2 FFT Algorithms 473
Table 8.2 Comparison of computational burdens for direct and FFT calculations
N N2 N · log2 N Computation reduced by
8 64 24 2.67
64 4096 384 10.67
256 65,536 2048 32
1024 1,048,576 10,240 102.4
4096 16,777,216 49,152 341.33
multiplication and two complex additions. Thus the whole N- point FFT com-
putation involves N · log2 N additions and (N/2) · log2 N multiplications. N/2
twiddle factors used in the multiplications are calculated
once and stored
for
N/2−k
use throughout the M stages. Note that Re WN/2 = −Re WN/2 k and
N/2−k
Im WN/2 k = Im WN/2 . We can exploit this symmetry around k = N/4 to
reduce the number of trigonometric computations from N/2 to N/4.
We show in Fig. 8.1 the decomposition of an 8-point DFT into two 4-point DFT’s.
X [k] and X [k + 4] frequencies are produced by four butterflies from F1 [k] and
F2 [k] outputs of the 4-point DFT’s. The butterfly which generates X [0] and X [4]
is drawn in red. In order to reduce clutter, the unity multipliers have been dropped
from the figure. There are four butterflies with eight complex summing nodes and
four twiddle factors.
Note in (8.4) and (8.5) that the sample indices are split into even and odd integers.
Samples x [0] , x [1] , x [2] , . . . , x [7] are rearranged into x [0] , x [2] , x [4] , x [6]
and x [1] , x [2] , x [3] , x [7]. Following the same line of reasoning, we decompose
the 4-point DFT’s into 2-point DFT’s. When we eventually arrive at 2-point DFT’s,
the splitting process terminates. 2-point DFT block is just one butterfly. The inputs
x [0] , x [2] , x [4] , x [6] are split into x [0] , x [4] and x [2] , x [6]. Likewise inputs
x [1] , x [3] , x [5] , x [7] are split into x [1] , x [5] and x [3] , x [7]. The indices of
x [i] can be thought as i = 2m or i = 2m + 1. If m is even we put x [i]
in the first (even) DFT block; otherwise it is included in the second (odd) DFT
block. When the process terminates input sequence is shuffled so that it becomes
x [0] , x [4] , x [2] , x [6] , x [1] , x [5] , x [3] , x [7] (Fig. 8.4). Figure 8.5 shows the
effect of decimation on a 128-sample discrete-time signal.
The shuffling of indices is called decimation;1 and when it is done in the discrete-
time sequence it is called decimation in time (DIT). The FFT computation which
follows this approach is then aptly called DIT algorithm. It is interesting to note
that decimation can be generated by bit reversal. The index i has a binary-weighted
bit representation. When the bits of this representation is reversed, the shuffling
needed for decimation is produced. Figure 8.4 shows the grouping of indices and
1 Decimation is coined from Latin and literally means killing by tens. Although we have kept using
splitting and decomposing, decimation is the technical word you must use. You would rather say
DIT or DIF than splitting in time or decomposing in frequency.
474 8 Fast Fourier Transform
Fig. 8.5 Effect of decimation on a discrete-time signal. (a) Before and (b) after decimation
8.1 Radix-2 FFT Algorithms 475
the binary representation of indices before and after decimation. For instance the
binary number 0001 represents 1 in x [1]. When the bits are reversed as shown in
Fig. 8.10, 1000 results which is the binary number that represents the index of x [8].
Equation (8.2) can be split into two summations, by cutting the sum at the midpoint:
N/2−1 N −1
X [k] = x [n] WNnk + x [n] WNnk k = 0, . . . , N − 1.
n=0 n=N/2
N/2−1 N/2−1
(n+N/2)k
X [k] = x [n] WNnk + x [n + N/2] WN
n=0 n=0
N/2−1 N/2−1
N k/2
= x [n] WNnk + x [n + N/2] WNnk WN k = 0, . . . , N − 1.
n=0 n=0
N k/2
Because WN = ej π k = (−1)k we get
N/2−1 N/2−1
X [k] = x [n] WNnk + (−1) k
x [n + N/2] WNnk
n=0 n=0
N/2−1
= x [n] + (−1)k x [n + N/2] WNnk .
n=0
Proceeding as we did in DIT case we decimate X [k] into its even and odd parts
N/2−1
X [2k] = {x [n] + x [n + N/2]} WN2nk
n=0
N/2−1
= {x [n] + x [n + N/2]} WN/2
nk
k = 0, . . . , N/2 − 1 (8.8)
n=0
476 8 Fast Fourier Transform
and
N/2−1
X [2k + 1] = {x [n] − x [n + N/2]} WN(2k+1)n (8.9)
n=0
N/2−1
= {x [n] − x [n + N/2]} WN2kn WNn
n=0
N/2−1
= {x [n] − x [n + N/2]} WNn WN/2
nk
k = 0, . . . , N/2 − 1.
n=0
Again as we have done in the case of DIT algorithm we define two functions f1 , f2
and their FFT’s F1 and F2 :
N/2−1
F1 [k] = nk
f1 [n] WN/2
n=0
N/2−1
F2 [k] = nk
f2 [n] WN/2 k = 0, . . . , N/2 − 1
n=0
Equations (8.8) and (8.9) represent the butterfly equations used in DIF computa-
tions which can be depicted in signal flow form as seen in Fig. 8.14. In DIF butterfly
computation the outputs A and B are related to the inputs a and b through
A = a+b
B = (a − b) WNk .
F1 [k] and F2 [k] are two N/2-point FFT’s which are decimated from an N -point
FFT. These two FFT’s are input to two blocks which produce N/4-point FFT’s
depicted in Fig. 8.6. The procedure is repeated until we are left with 2-point FFT
blocks in Fig. 8.7. We notice that the operation which results in F1 and F2 are
butterfly operations. F1 and F2 which are produced by the first decimation have
indices 0, 2, . . ., N − 2 and 1, 3, . . ., N − 1. The decimation is completed in log2 N
stages each of which contains N/2 butterflies. Thus like the DIT algorithm, the DIF
algorithm contains N/2 · log2 N complex multiplications and N · log2 N complex
additions.
Inverse FFT To calculate the inverse FFT one must obtain the sum
8.2 Computer Implementation 477
Fig. 8.6 Decimation in Frequency algorithm results in frequency indices shuffled in bit-reversed
fashion
N −1
1 2π kn
x [n] = X [k] exp j
N N
k=0
N −1
1
= X [k] WN−kn n = 0, . . . , N − 1,
N
k=0
where WN−kn are used instead of WNkn . Only the sign of twiddle exponents in
butterfly operations is negated and the sum is divided by N. Decimation in time,
decimation in frequency and butterfly operations remain unchanged. Refer to 8.2.1
for a discussion of twiddles.
In the old days of computing, when mathematical software had not been born or
was very scarce, the FFT computation was done by programs which scientists
and engineers wrote in an appropriate language such as FORTRAN, ALGOL,
478 8 Fast Fourier Transform
Fig. 8.8 FFT analysis in SCILAB. (a) A mixture of 50 Hz, 70 Hz sinusoidal signals and noise, (b)
FFT magnitude of the signal
PASCAL, and the like. Today we have plenty of powerful mathematical software,
some of which are freeware. They contain high-level commands to invoke FFT or
inverse FFT operations. You just need to pass your data samples as a parameter
to the FFT or IFFT function, and you do not need to worry about the details
of implementing twiddles, butterflies, radix-2, radix-4, decimation in time, or
decimation in frequency. All these technicalities are efficiently handled by the
software.
In SCILAB one uses the command
X=fft(A, [sign], [option])
Y=ifft(A, [sign], [option])
to carry out FFT and inverse FFT. SCILAB uses the following script to generate
the sum of two sinusoids of frequencies 50 Hz and 70 Hz mixed with random noise
(line 8). y = fft(s) command in line 10 computes the DFT through a call to
fft function. Figure 8.8 shows the discrete-time signal and the magnitude of its
FFT.
8.2 Computer Implementation 479
You might think that since FFT is ubiquitous and available on almost every platform,
one does not need to write one’s own FFT software. Figure 8.9 shows the Fourier
and Inverse Fourier transform vi’s in LabVIEW function palette. These are internal
vi’s developed by National Instruments, and we cannot see its code. However, it is
academically interesting to know the internal workings of FFT, and you may indeed
have to write your own FFT on DSP platforms or implement your own FFT cores
on FPGA chips. Hence we delve into implementations of FFT and parts thereof
in the following paragraphs. We use LabVIEW and C platforms to show DIT FFT
computation.
So explaining an FFT implementation is in order. We start by giving the overall
description and follow with the subvi’s. The virtual instrument accepts a discrete-
time signal in the form of an array. A subarray is derived from the input signal whose
size N must be a power of two because the FFT will be computed in log2 N stages.
This subarray is stored in a complex array of size N as all subsequent operations
will involve complex numbers. In the meantime, bit-reversed DIT indices and N/2
twiddles are computed by FFT Indices vi and twiddles vi, respectively.
DecimationInTime vi then shuffles the samples using the bit-reversed indices.
These operations are followed by 3-deep nested for loops.
The outermost loop runs for log2 N number of times, each time letting one FFT
stage to be completed. In Fig. 8.3, note the groupings in FFT stages according to
the number of butterflies. In the first stage, there are 4 groups with 1 butterfly
in each; the second stage has 2 groups with 2 butterflies in each. Finally, the last
stage comprises 1 group with 4 butterflies. The outermost FOR loop hosts two FOR
loops. The smaller loop produces an array of starting indices of the butterfly groups,
480 8 Fast Fourier Transform
Fig. 8.9 LabVIEW offers FFT and IFFT among other transforms under the transform palette
and division-by-2 yields the size of groups. Group starting indices and group size
information are passed to the larger second FOR loop which reads off indices from
the index array and passes it to the innermost FOR loop along with the group size.
This loop generates the indices for the butterfly and extracts the two elements off
the N -element FFT array and the appropriate twiddle from the N/2 twiddle array.
Indices and the twiddle are input to the DIT Butterfly vi which performs the 2-
point DFT, the result of which is saved back in the extracted FFT array indices. The
innermost FOR loop executes as many times as there are butterflies in the relevant
group. The updated FFT array is kept in the register elements of the three FOR loops.
Below we describe the subvi’s which are part of the top-level vi. They are FFT
indices, twiddles, DecimationInTime, and DIT Butterfly vi’s.
Bit Reversal. In C or LabVIEW, we can generate DIT indices by obtaining
a bit array representing the index “n”, then regenerating a number from the
bits in reverse order. Bit reversal can be implemented in assembly language
with an SLC (shift_left_through_carry) instruction followed by an SRC
(shift_right_through_carry) instruction. This is a very effective way of obtaining
bit reversal. Using assembly programming or in-line assembly code in C, the index
number is loaded into a register, shown as Register A in Fig. 8.10. Then in a loop
that works as many times as there are bits in registers that hold “n”, Register A is
shifted left one bit into the CARRY, then CARRY is shifted right into Register B.
When the loop terminates Register B holds bit-reversed index. This procedure is
8.2 Computer Implementation 481
Fig. 8.11 Four-bit bit reversal implementation in LabVIEW. (a) The block diagram, (b) The array
of bit-reversed indices
repeated for all indices. The bit-reversed indices are stored in an array later to be
used in decimation.
Bit reversal via rotations through the CARRY bit can be less effective if the
number of bits to be reversed is not equal to the register size. For example,
12-bit or 20-bit reversal using 16-bit registers may be less elegant, making it
necessary to employ additional registers and or bit truncation. Another approach
based on decimal-to-binary and binary-to-decimal number conversion implemented
on LabVIEW is shown in Fig. 8.11. We know that the remainder of a number after
dividing by 2 produces the LSB for that number. Dividing the quotient by 2 again
produces a remainder which is the bit after LSB. Continuing this procedure, we
derive all the bits from LSB through MSB. This can be expressed as:
The quantity in parentheses in Eq. (8.10) is the quotient of the division by 2 and b0
is the remainder. Continuing the division by 2 we derive the bits b1 , b2 , . . . , bn−1 .
A = 2 2 bn−1 2n−3 + bn−2 2n−4 + . . . + b2 + b1 + b0
We can express this procedure as successive partial sums and remainders that lend
themselves to computation through looping:
A = 2An−1 + b0 ,
An−1 = 2An−2 + b1 ,
···
A2 = 2A1 + bn−2 ,
A1 = 2A0 + bn−1 ,
A0 = 0. (8.11)
At the same time, Eqs. (8.10) and (8.11) constitute reconstruction formulas which
calculate A from its bits. It simply tells us to take bn−1 , multiply it by 2 then add
bn−2 to the sum; then multiply the sum by 2 add to it bn−3 . We repeat this procedure
until we add b0 to the last multiplication. Now we take the “quotient-and-remainder“
and “reconstruction“ steps together but in reverse order. At the beginning, we obtain
b0 from the remainder. Now we multiply b0 by two and add it to the sum. Then
obtain b1 from another division, add it to the sum, and multiply the sum by 2. Repeat
this procedure until you obtain and add bn−1 to the last sum.
Let  be the bit-reversed index which can be expressed as
Â0 = 0
Â1 = 2Â0 + b0
Â2 = 2Â1 + b1
···
ˆ + bn−1
Aˆn = 2An−1
Twiddles Twiddles are the complex multipliers WNk which appear in butterfly
computations. As discussed in decimation in time and decimation in frequency
sections, twiddles must be computed as k runs from 0 to N/2 − 1. These twiddles
are sufficient for N-point
FFT computation. As pointedout earlier we note from
N/2−k k N/2−k
symmetry that Re WN = −Re WN and Im WN = Im WNk .
Therefore it suffices for us to calculate the first N/4 twiddles from which we can
deduce the twiddles from N/4 to N/2 − 1. Figure 8.13a depicts this symmetry,
and Fig. 8.13b shows twiddles W32 0 , . . . , W 15 which are needed by butterflies for
32
32-point FFT computation. Of these twiddles W32 0 , . . . , W 8 are computed and
32
9 15 0 , . . . , W7 .
W32 , . . . , W32 are found by negating the real parts of W32 32
484 8 Fast Fourier Transform
Fig. 8.13 (a) Symmetry conditions in W32 k . (b) Only the twiddles from 0 to N/4 need to be
In inverse FFT, WN−kn are used instead of WNkn . Twiddles WN−n occupy the
upper half of the twiddles circle of Fig. 8.13 because Re WN−n = Re WNn and
−n n
Im WN = −Im WN .
The following C code calculates the 16 twiddles needed by butterfly operations
(Fig. 8.14) for a 32-point FFT. The complex data type is defined as a structure
of rectangular and polar components as suggested in Sect. 1.5.6. The FOR loop in
twiddle function runs n/2 times but sets n − 1 twiddle values. The results are saved
into W, an array of type complex. The code is straightforward and can be used as a
function in FFT computation.
8.2 Computer Implementation 485
#define PI 4*atan(1.0)
typedef struct {
float re;
float im;
float mag;
float ph;
} complex;
complex W[16];
int main(void) {
...;
twiddles(32/2); // 16 twiddles are needed for 32-point FFT
...;
return (STATUS);
}
void twiddles(int n) {
int m;
float alpha;
alpha = PI /n;
for(m = 0; m < n/2; m++)
W[m].re = cos(-alpha * m);
W[m].im = sin(-alpha * m);
W[n-m].re = -W[m].re;
W[n-m].im = W[m].im;
} /* for /*
W[n/2].re = 0.0;
W[n/2].im = -1.0;
} /* twiddles */
A test run for 32-point FFT yields the following twiddles:
W re im
-- ----- ------
0 1.000 -0.000
1 0.981 -0.195
2 0.924 -0.383
3 0.831 -0.556
4 0.707 -0.707
5 0.556 -0.831
6 0.383 -0.924
7 0.195 -0.981
8 0.000 -1.000
9 -0.195 -0.981
10 -0.383 -0.924
11 -0.556 -0.831
12 -0.707 -0.707
13 -0.831 -0.556
14 -0.924 -0.383
15 -0.981 -0.195
twiddles for a 16-pıint DFT. Although it may seem a huge vi, it is simple enough
that it takes a fraction of the time it takes to write the C code. Moreover, you can
add a striking front panel with graphics and controls to facilitate its usage. The vi
accepts an integer for the number of points and returns a complex array of twiddles
half as many as the number of points.
Butterfly We have seen that butterflies come in two flavors, one each for DIT
(Fig. 8.14) and DIF algorithm, respectively. Once the type of decimation has been
decided, the pertaining butterfly must be employed for the 2-point DFT’s. In either
case, the butterfly has to know k (or n) in WNk (or WNn ). Should we start numbering
the FFT stages from 2-point DFT up toN/2-point DFT i = 1, 2, . . . , log2 N − 1 ,
the butterflies inputs come from a complex array of size N from indices j =
0, . . . , N/2 and j + i = i, . . . , N/2 + i.
Figure 8.7 shows a LabVIEW butterfly implementation used in DIT algorithm.
Inputs a, b and twiddle are from the output of the previous DFT stage and the
appropriate twiddle for that stage. Outputs A and B are stored to be used in the
next DFT stage or the FFT output if there are no pending FFT stages. All numbers
in Fig. 8.7 are of type complex, and the operations are complex additions and
multiplications.
Although LabVIEW Professional comes complete with built-in FFT and inverse
FFT vi’s, LabVIEW virtual instrument myFFT.vi has been developed using these
concepts for pedagogic reasons and is depicted in Fig. 8.16. If you are a LabVIEW
user you are strongly urged to build this vi and use it. LabVIEW versions revert to
normal DFT computation if the DFT size is not a power of 2 and may be using more
efficient algorithms like radix-4 computations. However, you can in no way peek
into the workings of these LabVIEW FFT vi’s.
We demonstrate myFFT.vi with two test runs. The first one in Fig. 8.17 shows
the double-sided magnitude spectrum of the discrete-time signal sin (5n/256) +
0.8 sin (10n/256). The second one is a 1024-point run on a recorded ECG wave-
form. The test vi and the magnitude spectra are shown in Fig. 8.18. 50 Hz interfer-
ence is added in part (a) to emphasize the power of FFT in signal processing.
generates a 128-point test signal and invokes a 128-point FFT run. Assuming we
name this file myfft.c, an executable version which is run from the command
488
Fig. 8.17 A test run of myFFT.vi. (a) The input discrete-time signal sin (10nπ/256) +
0.8 sin (20nπ/256), (b) Magnitude of 256-point FFT
Fig. 8.18 ECG signal spectrum using myFFT.vi. (a) The block diagram, (b) ECG with 50 Hz
interference, (c) ECG without 50 Hz interference
490 8 Fast Fourier Transform
line of the console would be executed typing myfft followed by an integer. The
integer must be a power of 2 as below:
myfft 128
argv[1] holds the string ”128” which needs to be converted into an integer.
stdlib library includes a function atoi which takes a string and converts it to
integer. Hence in the main function we add the line
N = atoi(argv[1]);
We did not take this approach because memory allocations for W, x, X, and ndx
would have to be handled by the programmer rather than the C compiler. This very
detail has little to do with our objective of explaining the FFT algorithm; so we have
decided to use #define preprocessor directive.
The program follows the same lines of flow as its LabVIEW counterpart. Both
programs are implemented using radix-2 DIT implementation of Fast Fourier
transform. Hence each implementation helps clarify the other. There are seven
functions in the program: revbits, decimate, twiddle, butterfly, pass,
fft, and scale_n_convert2polar. FFT computations are done in rectangular
coordinates; therefore the FFT output X[POINTS][2] is a two-dimensional array
whose first and second column contain the real and the imaginary part, respectively.
In engineering work seeing the complex number in magnitude-phase format could
be more meaningful than in real-imaginary format. Thus the results are converted to
polar form by scale_n_convert2polar and are saved in a file named dft.dat. Before
saving to the file all complex coefficients are divided by N to avoid large numbers.
Figure 8.19 shows the FFT magnitude and phase spectrum of the 64-point test
signal
8.1nπ 32.2nπ
sin + 0.8 sin . . . n = 0, . . . , 63,
64 64
Fig. 8.19 Magnitude and phase spectrum of the test run from the C code
8.2 Computer Implementation 491
where we have opted to use noninteger frequencies so that spectrum leak becomes
visible.
/***************************************************************************
Variables and arrays:
x[] : Discrete-time samples array
X[][] : Array of DFT points. 1-st and 2-nd dimension are for real and
imaginary parts respectively. Its size is equal to the sample
array size.
ndx[] : Discrete-Time indices array
W[][] : Twiddles array. Size half of number of samples
Functions:
void twiddle(void) :
void decimate(int) :
int revbits(int, int) : Accepts an integer number, and the number of
bits. Returns the bit-reversed integer
void scale_n_convert2polar(void): Converts a complex number from rectangular
to polar coordinates
***************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define POINTS 64
double pi = 3.141592654;
double W[POINTS/2][2]; // Twiddles
int N, n_of_passes;
int ndx[POINTS];
double x[POINTS]; // Discrete-time samples
double X[POINTS][2]; // DFT samples array
void fft(int);
void twiddle(void); // Twiddle computation
void decimate(int); // Decimation in Time
void butterfly(int, int, int);
void pass(int, int);
void scale_n_convert2polar(void);
int revbits(int, int);
int main(void){
FILE *dft; // File to save the DFT coefficients.
int n, n_of_bits;
/***************************************************************************
* Two-tone test signal. Sum of two sinusoidal signals of *
* frequencies 4 and 16 and amplitudes 1 and 0.8 are used to test *
* the FFT function. N is the number of samples. *
***************************************************************************/
N = POINTS;
for(n=0; n < N; n++) {
x[n] = sin(8*n*pi/N) + 0.8*sin(32*n*pi/N);
}
/***************************************************************************
* Decimating time domain samples *
* n_of_passes: Number of FFT stages *
* n_of_bits: Number of bits that represent indices *
***************************************************************************/
n_of_passes = (int)log2((double)N);
n_of_bits = n_of_passes;
for(n=0; n < N; n++) ndx[n] = revbits(n,n_of_bits);
decimate(N);
492 8 Fast Fourier Transform
twiddle();
/***************************************************************************
* Calculating N-point FFT *
***************************************************************************/
fft(N);
/***************************************************************************
* Scaling rectangular components by dividing through N *
* and converting to polar coordinates for power spectrum *
***************************************************************************/
scale_n_convert2polar();
return 0;
} /* main */
/***************************************************************************
* FFT runs log2(N) times. grp: Group size, LEAP: jump size *
* to find the index of the second parameter of butterfly. *
* 1st Pass: grp = N/2, LEAP = 1 *
* Last pass: grp = 1, LEAP = N/2 *
***************************************************************************/
void fft(int size){
int LEAP;
int grp;
int npass;
grp = size/2;
LEAP = 1;
for(npass=0; n < n_of_passes; npass++) {
pass(grp,LEAP);
grp /= 2;
LEAP *= 2;
}
} /* fft*/
/***************************************************************************
* Rearrange samples (Decimation in Time) *
***************************************************************************/
void decimate(int npoints) {
int n;
/***************************************************************************
* Obtain decimation indices through bit reversal *
***************************************************************************/
int revbits(int n, int bits){
int m, r, a_hat = 0;
/***************************************************************************
* Intermediate DFT stages. pass function executes log2(N) times. *
8.2 Computer Implementation 493
***************************************************************************/
void pass(int group, int leap){
int n, i, j, k;
/***************************************************************************
* Butterfly for DIT computation. Must be properly adapted when DIF is used.*
***************************************************************************/
void butterfly(int btind, int twind, int leap) {
double p1Re, p1Im, p2Re, p2Im, p3Re, p3Im, p4Re, p4Im;
int i, j, k;
i = btind;
j = twind;
k = leap;
p1Re = X[i][0];
p1Im = X[i][1];
p2Re = X[i+k][0];
p2Im = X[i+k][1];
p3Re = p1Re + p2Re*W[j][0] - p2Im*W[j][1];
p3Im = p1Im + p2Re*W[j][1] + p2Im*W[j][0];
p4Re = p1Re - p2Re*W[j][0] + p2Im*W[j][1];
p4Im = p1Im - p2Re*W[j][1] - p2Im*W[j][0];
X[i][0] = p3Re;
X[i][1] = p3Im;
X[i+k][0] = p4Re;
X[i+k][1] = p4Im;
} /* butterfly */
/***************************************************************************
* Compute the N-point DFT twiddles *
***************************************************************************/
void twiddle(void) {
int n;
double a;
a = 2.0*pi / (double)N;
for(n=0; n < N/2; n++) {
W[n][0] = cos(n*a); // Real part of the exp(-j2*n*pi/N)
W[n][1] = -sin(n*a); // Imaginary part of the exp(-j2*n*pi/N)
}
} /* twiddle */
/***************************************************************************
* Scales DFT by dividing through number of points (64) and *
* converts rectangular coordinates to polar coordinates *
***************************************************************************/
void scale_n_convert2polar(void) {
FILE *dft;
int n;
double re, im, mag, ph;
Further Reading
Assignments
1. Before FFT algorithms were available Goertzel algorithm was used to simplify
DFT computation. Do a literature search on Goertzel algorithm and write a report
comparing the common points between Goertzel and FFT algorithm and the
differences.
2. Explore radix-4 implementation of FFT. Report on your research.
3. We have used the DIT algorithm to implement a LabVIEW myFFT.vi. Modify
the twiddle factors, butterfly operations and decimation in frequency to realize a
DIF FFT vi.
4. We have used the DIT algorithm to implement a function in C language. Modify
the twiddle factors, butterfly operations and decimation in frequency to realize a
DIF FFT function in C.
5. Modify the LabVIEW implementation to obtain Inverse FFT vi.
6. Modify the C implementation to obtain Inverse FFT function.
Chapter 9
z-Transform
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2022 495
O. Özhan, Basic Transforms for Electrical Engineering,
https://doi.org/10.1007/978-3-030-98846-3_9
496 9 z-Transform
y [n] = T (x [n]) .
If we set x [n] = δ [n], then the output is called the impulse response of the system
and denoted by h [n]:
h [n] = T (δ [n]) .
Let us delay the impulse input by k units, and denote the impulse response we obtain
by hk [n]. Then
hk [n] = T (δ [n − k]) .
hk [n] = h0 [n − k] = h [n − k] . (9.1)
Suppose that a system produces the responses y1 [n] and y2 [n] when the system
is separately excited by x1 [n] and x2 [n]. Let a1 and a2 be two constants. Then we
have the relations
Now we extend this idea to an arbitrary x [n] which is input to a linear time-
invariant system. The input function can be modeled as the sum of weighted-and-
shifted impulse functions given by Eq. (6.46) on page 382 and repeated here
∞
x [n] = x[k]δ [n − k] .
k=−∞
Since the system is LTI (linear time-invariant), it responds to this input with1
∞
y [n] = T x [k]δ [n − k]
k=−∞
∞ ∞
= T (x [k]δ [n − k]) = x [k]T (δ [n − k])
k=−∞ k=−∞
∞
= x [k] h [n − k]
k=−∞
We recognize Eq. (9.2) as the well-known, discrete convolution sum. The system
response to an arbitrary input is the convolution of the impulse response sequence
and the input sequence. As noted in previous chapters, the convolution is commuta-
tive; hence the roles of the input and impulse response can be interchanged.
Now let h [n] be a complex discrete-time signal zn , and x [n] be the impulse
response. y [n] then becomes
∞ ∞
y [n] = x [k] z n−k
=z n
x [k] z−k
k=−∞ k=−∞
y [n] = X (z) z . n
(9.3)
∞
X (z) = x [n] z−n (9.4)
n=−∞
This definition of the z-transform can also be viewed as an operator on the input
sequence which maps it into z-plane. The relation is also denoted by the following
notations:
Z
x [n] ←→ X (z) . (9.6)
The discrete-time index n in the definition (Eq. 9.4) runs from −∞ to +∞. If we
restrict n to run from 0 to +∞ we obtain the so-called unilateral z-transform:
∞
X (z) = x [k] z−n . (9.7)
n=0
For signals which are zero for n < 0, the unilateral and the bilateral transform are
identical. The unilateral z-transform can be used to solve difference equations with
initial conditions.
We have exploited the linearity and the time invariance of the operation T (·)
in deriving the z–transform of a sequence in Eq. (9.4). Since the mathematics used
to derive (9.4) cannot be used for the nonlinear and/or time-variant systems and
signals, they fall beyond the scope of the z-transform. The z-transform is a Laurent
series that we studied in Chap. 3. The principal part of the Laurent series contains
singularities, and thus the series converges in some domain of the z-plane where it
is analytic. The X (z) in (9.4) can usually be stated in a closed form. We mean by
the z-transform this closed form together with the ROC. Since the z-transform is
a complex-valued function which is analytic in the ROC, we can use the tools and
methods developed in Chap. 3 to analyze and design discrete-time systems in the
ROC.
In Sect. 6.9 we had seen that the Fourier transform of a discrete signal x [n] was
∞
defined as X ej ω = x [n] e−j ωn . Note that this relation and the z-transform
n=−∞
9.2 Region of Convergence for the z-Transform 499
are very similar. For the Fourier transform to converge, we had required that X ej ω
be absolutely summable, i.e.,
∞
X ej ω |x [n]| < ∞.
n=−∞
If this condition is not met, then the Fourier transform X ej ω does not exist. For
u [n]
instance, the unit step sequence u [n] and are not absolutely summable. The
n+1 )
absolute sums of both sequences are unbounded: ∞ n=0 1 = ∞. From the integral
test we know that 1+ 12 + 13 +· · · diverges. Therefore these sequences do not possess
a Fourier transform. However if we multiply such a signal by an exponential factor
r −n , the Fourier transform of the product sequence may converge for r > 1:
∞
X ej ω = x [n] r −n e−j ωn
n=−∞
∞ ∞
X ej ω x [n] r −n e−j ωn = |x [n]| r −n .
n=−∞ n=−∞
∞
1
X ej ω r −n =
1 − r −1
n=0
definitely
converges
for r > 1. Although F {u [n]} does not converge,
F r −n u [n] does. So we can combine r −n with the complex exponential to
have
∞
∞
X ej ω = x [n] r −n e−j ωn = x [n] r −n e−j ωn
n=−∞ n=−∞
∞ −n
= x [n] rej ω .
n=−∞
Denoting the point rej ω in the complex plane by z, we arrive at the z-transform of
x [n]
∞
X (z) = x [n] z−n , (9.8)
n=−∞
500 9 z-Transform
Fig. 9.2 Evolution of the Fourier transform into the z-transform. (a) Provided that the Laplace
transform converges on the j ω-axis of the s-plane, the Fourier transform for the continuous-time
functions is evaluated on the j ω-axis in the s-plane. (b) If the z-transform converges on the unit
circle in the z-plane, it gives the Fourier transform for the discrete-time sequence. Continuous-time
frequencies ω = ±∞ map to discrete-time frequencies ω = ±π , respectively. (c) The unit circle
is drawn in the z-plane, and the poles, the zeros, and the region of convergence are placed to give
visual aid to some system behavior. Here a double pole at the origin and two complex conjugate
zeros are shown
Fig. 9.3 Periodicity of H rej ω . The magnitude and phase of X (z) = 13 1 + z−1 + z−2
jω
evaluated on the circle |z| = 0.9. The Fourier transform X re can be confined to an interval of
2π (360◦ ). The range −180◦ to +180◦ (−π ω π ), or 0 to 360◦ (0 ω 2π ) is commonly
used
We observe that X rej ω is a continuous function of ω and periodic with period 2π .
We see that the magnitude and phase of the transform can be confined to −180◦ to
+180◦ . The pole-zero locations can be indicated in the z-plane as shown in Fig. 9.2c.
The z-transform too may not converge everywhere in the z-plane. As will be
apparent shortly, the region of convergence is bounded by a circle or circles and can
extend to the origin or to infinity. In the ROC, the Laurent series and its derivatives
of all orders are analytic. X (z) is the Fourier transform of the sequence x [n] r −n .
Because of multiplication by r −n , a discrete signal, whose Fourier transform does
not converge, may have a z-transform that converges for r > 1. This interpretation
implies that the Fourier transform of {x [n]} is simply X (z) evaluated on the unit
circle if it is within the ROC:
X ej ω = X (z)|r=1 . (9.9)
In Fig. 9.4 three different regions of convergence are shown. In (a) the series
converges for |z| > a > 1 which is outside the unit circle. The sequence with
this ROC does not have a Fourier transform. In (b) and (c) the unit circle is included
in the ROC, hence theFourier transforms
for these sequences exist. In Fig. 9.5, the
transform X (z) = 13 1 + z−1 + z−2 converges for |z| > 0. |X (z)| is evaluated
and plotted for r = 0.8, 1, and 1.2. The evaluation on the unit circle (r = 1) drawn
in blue is the corresponding Fourier transform of x[n]
1
F {x [n]} = X ej ω = e−j ω (1 + 2 cos ω) .
3
502 9 z-Transform
Fig. 9.4 The ROC and the Fourier transform. (a) ROC does not include the unit circle, hence the
Fourier transform of the discrete-time function does not exist. (b), (c) The ROC includes the unit
circle, so the Fourier transform of the discrete-time sequence exists
Fig. 9.5 The X (z) = 13 1 + z−1 + z−2 is evaluated on |z| = 0.8, |z| = 1 and |z| = 1.2. The
evaluation on the unit circle |z| = 1 yields the Fourier transform X ej ω . Here the magnitude of
the transform is shown
Fig. 9.6 ROC of the z-transforms of sequences x [n] = a n u [n] for |a| > 1, and x [n] =
−a n u [−n − 1] for |a| < 1. (a) Since |a| > 1, the ROC does not include the unit circle. (b)
Since |a| < 1, the ROC does not include the unit circle. None of the Fourier transforms converges
Example 9.1 Let x [n] = a n u [n]. Find X (z) and the ROC.
We proceed from the z-transform definition.
∞ ∞ n
X (z) = a n u [n] z−n = az−1 .
n=−∞ n=0
1 z
X (z) = −1
=
1 − az z−a
ROC : |z| > |a| .
az−1 < 1 determines the ROC: |z| > |a| (Fig. 9.6a). Clearly the Fourier transform
n
1
does not exist for |a| > 1. z-transforms of the two signals x [n] = u [n]
n 3
1 1 z
and y [n] = − u [n] are X (z) = = and Y (z) =
3 1 − 1/3z−1 z − 1/3
1 z 1
= with the same ROC |z| > .
1 + 1/3z−1 z + 1/3 3
504 9 z-Transform
Example 9.2 Let x [n] = −a n u [−n − 1]. Find X (z) and the ROC.
Proceeding as we did in the previous example:
∞
X (z) = −a n u [−n − 1] z−n
n=−∞
−1
=− a n z−n .
n=−∞
1 1 − a −1 z − 1 −a −1 z −z
= 1− −1
= −1
= −1
=
1−a z 1−a z 1−a z a−z
z
=
z−a
ROC : |z| < |a| .
n=0
∞ ∞ ∞
n
= a − bn z−n = a n z−n − bn z−n
n=0 n=0 n=0
1 1
X (z) = − .
1 − az−1 1 − bz−1
9.2 Region of Convergence for the z-Transform 505
For this transform to converge the sequences {a n u [n]} and {bn u [n]} must both
converge. Both sequences are right-sided, so the ROCs for the individual sequences
are |z| > |a| and |z| > |b|, respectively. The overall ROC for X (z) shown in Fig. 9.7
is |z| > max (|a| , |b|). We can express this sum as a rational function:
1 1 z z (a − b) z
−1
− −1
= − =
1 − az 1 − bz z−a z−b (z − a) (z − b)
P (z) z
X (z) = = (a − b) · .
Q (z) (z − a) (z − b)
1 − a 6 z−6
= 1 + az−1 + a 2 z−2 + a 3 z−3 + a 4 z−4 + a 5 z−5 =
1 − az−1
1 z6 − a 6
= 5 · .
z z−a
2π n
The zeros of X (z) are the 6-th roots of 1: zn = a exp j , n = 0, 1, . . . , 5.
6
Hence
1
5
(z − zi )
1 n=0
X (z) = 5 · .
z z−1
506 9 z-Transform
1
5
(z − a) (z − zi )
1 n=1
X (z) = 5 ·
z z−a
1
5 5
1
2π n
(z − zi ) z − a exp j
6
n=1 n=1
= = .
z5 z5
Since the sequence comprises six delta functions which are bounded, the conver-
gence of X (z) depends only on z. Clearly |X (z)| < ∞ if z > 0. The poles and
zeros are shown in Fig. 9.8.
The z-transform of a linear combination of exponential sequences is a rational
function
P (z)
X (z) = ,
Q (z)
where the numerator P (z) and denominator Q (z) are polynomials in z or z−1 .
Assuming N simple poles and M simple zeros, H (z) can be described by one of
the following forms:
9.2 Region of Convergence for the z-Transform 507
M
bi z−i
i=0
X (z) =
N
ai z−i
i=0
1
M
1
M
1 − ni z−1 z−1 (z − ni )
b0 i=1 b0 i=1
X (z) = · = ·
a0 1N
a0 1N
1 − di z−1 z−1 (z − di )
i=1 i=1
1
M
zN (z − ni )
b0 i=1
X (z) = · . (9.10)
a0 1N
zM (z − di )
i=1
When the z-transform can be expressed as a rational function, its ROC lies outside
of the circle that passes through the pole which is farthest from the origin, i.e.,
|z| > max |di | i = 1, . . . , N . If M > N there are M − N poles at the origin,
otherwise there are N − M zeros at the origin. None of the poles is at infinity.
From the preceding examples and discussions we can summarize the properties
of the ROC of the z-transform:
1. The region of convergence can contain no poles.
2. For right-sided sequences, the ROC is exterior to the circle that passes through
the farthest pole. The radius of this circle is maxi |pi |. The pole with maximum
magnitude lies outside the ROC.
3. For left-sided sequences, the ROC is interior to the circle that passes through
the nearest pole. The radius of this circle is mini |pi |. The pole with minimum
magnitude lies outside the ROC.
4. Mixed sequences, i.e., those made up from left-sided and right-sided sequences,
the ROC is a ring rR < |z| < rL . rR is the magnitude of the farthest pole from
origin that belongs to the right-sided sequence. rL is the magnitude of the nearest
pole from origin that belongs to the left-sided sequence.
5. If the ROC covers the unit circle, the Fourier transform of the sequence is equal
to the z-transform evaluated at z = ej ω .
Some basic transforms and the related regions of convergence are listed in
Table 9.1.
508 9 z-Transform
The properties explained in this section enable us to study discrete signals and
systems and facilitate operations on them. Using these properties and the trans-
forms of basic signals together with the inverse z-transform techniques, we can
obtain the response of systems with complicated z-transforms. The properties
studied below bear striking resemblance to the properties of Laplace transform
which we have studied in Chap. 4. Paying attention to the differences between
continuous and discrete transforms, we can carry those properties over to the z-
transform properties outlined in the following paragraphs. Continuous functions are
transformed through integration of infinitesimal integrands such as x (t) e−st dt; in
z-transform integration is substituted by the sum of discrete quantities x [n] z−n . In
9.3 z-Transform Properties 509
the following paragraphs we assume a discrete signal x [n] with z-transform X (z)
which converges on some region ROC.
9.3.1 Linearity
The linearity is a consequence of the fact that the set of complex numbers C together
with addition and multiplication forms a field. In mathematics, a field requires that
multiplication be distributive over addition. The z-transform is a summation of terms
x [n] z−n . Due to the distributive property of fields
Let w [n] = ax [n] + by [n], X (z) = Z {x [n]} and Y (z) = Z {y [n]} where a and
b are constants. Provided that X (z) and Y (z) have a common ROC, we can assert
that W (z) = aX (z) + bY (z) on that ROC.
The proof is easy and goes by the definition:
∞
W (z) = Z {w [n]} = w [n] z−n
n=−∞
∞
= {ax [n] + by [n]} z−n .
n=−∞
∞
Using the distribution property of fields we can write {ax [n] + by [n]} z−n as
n=−∞
∞ ∞
W (z) = ax [n] z−n + by [n] z−n
n=−∞ n=−∞
∞ ∞
=a x [n] z−n + b y [n] z−n
n=−∞ n=−∞
which results in
If X (z) and Y (z) converge on ROCx and ROCy , respectively, then W [z]
converges on ROCx ∩ ROCy , the intersection of the regions of convergence.
510 9 z-Transform
Example 9.5 Let x [n] = 0.9n u [n] and y [n] = 0.8n u [n]. Find W (z) if w [n] =
3x [n] − 2y [n].
This is a very useful property which we often encounter in discrete LTI systems.
Many discrete-time signal processing operations work on shifted samples of a
known sequence. Time shifting property relates the z-transform of the shifted signal
to that of the original (unshifted) signal. If X (z) = Z {x [n]}, then Z {x [n − m]} =
z−m X (z). By definition of z-transform
∞
Z {x [n − m]} = x [n − m] z−n .
n=−∞
We note that in addition to the original poles and zeros of X (z), there arise m
new poles at z = 0 due to shifting if m > 0, or m new zeros if m < 0.
Example 9.6 Let x [n] = 0.9n u [n] and y [n] = 0.8n u [n]. Find W (z) if w [n] =
x [n] − y [n − 1].
The case m = 1 warrants special attention since Z {x [n − 1]} = z−1 X (z). This
is the unit-shift (unit-delay) operation. In signal processing work, this operation is
represented by a rectangular block in which z−1 is inscribed, or an arrow on which
z−1 appears. This notation greatly facilitates to describe discrete-time operations
using block diagrams or signal flow graphs (Fig. 9.9).
∞ ∞ z −n
Z a n x [n] = a n x [n] z−n = x [n]
n=−∞ n=−∞
a
z
Z a n x [n] = X . (9.13)
a
z
If X (z) converges on a disc R1 < |z| < R2 , then X converges on |a| R1 <
a
|z| < |a| R2 .
Example 9.7 Let x [n] = u [n] − u [n − 6] and y [n] = 0.9n x [n]. Find Y (z).
First let us find X (z) = Z {u [n] − u [n − 6]}.
This result can be readily verified by noting that 0.9n x [n] = δ [n] + 0.9δ [n − 1] +
0.92 δ [n − 2] + 0.93 δ [n − 3] + 0.94 δ [n − 4] + 0.95 δ [n − 5].
A useful application of this property is the discrete-time modulation. Assume
that a = ej ω0 in (9.13). Then
Z a n x [n] = Z ej ω0 n x [n] = X e−j ω0 z .
If the ROCx includes the unit circle, then the Fourier transform of ej ω0 n x [n]
is
simply X ej (ω−ω0 ) . Multiplying by the complex exponential ej ω0 shifts X ej ω
in frequency by ω0 . As we have seen when we discuss the Fourier transform, this is
nothing but modulation.
9.3.4 Multiplication by n
This property is also known as the property of differentiation and involves the
transform of a discrete signal x [n] multiplied by n.
dX (z)
Z {nx [n]} = −z (9.14)
dz
We can prove this property by differentiating both sides of (9.8) with respect to z.
Thus we obtain
∞ ∞
dX (z) d
= x [n] z−n = −nx [n] z−n−1
dz dz n=−∞ n=−∞
∞
= −z−1 nx [n] z−n = −z−1 Z {nx [n]} .
n=−∞
Hence we obtain
dX (z)
Z {nx [n]} = −z .
dz
9.3 z-Transform Properties 513
X (z) and its derivatives are analytic in the same ROC. However multiplication
by z introduces a zero at z = 0.
Example 9.8 Let x [n] = u [n] − u [n − 6] and y [n] = nx [n]. Find Y (z).
From Example 9.7 X (z) = 1 + z−1 + z−2 + z−3 + z−4 + z−5 . Thus
dX (z) d
Y (z) = −z = −z 1 + z−1 + z−2 + z−3 + z−4 + z−5
dz dz
= −z −z−2 − 2z−3 − 3z−4 − 4z−5 − 5z−6
9.3.5 Division by n
This property is similar to and can be obtained from (9.14). Let x [n] and X (z) be
z-transform pairs with an associated region of convergence ROCx . Consider another
sequence y [n] = n1 · x [n] , (n = 0) . The transform of y [n] is
ˆ
X (z)
Y (z) = − dz.
z
1
From y [n] = · x [n] we have x [n] = n · y [n]. By (9.14) we can write
n
dY (z)
X (z) = Z {ny [n]} = −z
dz
X (z)
dY (z) = − dz.
z
We can verify this result using the fact that ny [n] = a n u [n] = x [n] and Eq. (9.14)
dY (z) d z
Z {ny [n]} = −z · −z· [−Ln (z − a)] = = X (z) .
dz dz z−a
Thus the transform of the conjugate sequence turns out to be the conjugate of the
first transform with z∗ replacing z. If z is in the ROC, then z∗ is also in the ROC of
X (z) and X∗ (z).
1
Example 9.10 Let x [n] = ej ω0 n u [n]. Given that X (z) = find
1 − ej ω 0 z−1
Z {cos ω 0 n u [n]}.
Z {cos ω 0 n u [n]}
" #
x [n] + x ∗ [n]
=Z u [n]
2
" ∗ #
1 1 1 1
= X (z) + X∗ z∗ = +
2 2 1 − ej ω0 z−1 1 − ej ω0 (z∗ )−1
1 1 1 1 1 − e−j ω0 z−1 + 1 − ej ω0 z−1
= + =
2 1 − ej ω0 z−1 1 − e−j ω0 z−1 2 1 − ej ω0 z−1 1 − e−j ω0 z−1
1 − cos ω0 z−1
= .
1 − 2 cos ω0 z−1 + z−2
9.3 z-Transform Properties 515
As with continuous-time systems and signals, the discrete-time systems and signals
are related through convolution. In Sect. 9.1 we defined the z – transform as the
convolution of the signal with the complex exponential zn (see Fig. 9.1). zn itself is
a special signal (an eigenfunction), and we can envision the z – transform operation
as the response of an LTI system to zn . We can take this a step further and determine
the z – transform of the convolution of multiple signals. Assume that we have three
signals: x [n], y [n] and zn , and we are concerned with finding the convolution of
these signals:
We can interpret this result as the response of a cascaded systems x [n] and y [n]
to an eigenfunction zn applied to the input. If an eigenfunction is applied to an LTI
system, the response contains the eigenfunction with its amplitude and the phase
modified by the system. The product X (z) Y (z), the system function, is the z-
transform of the cascaded system. We conclude that the z-transform of two discrete
signals convolved in discrete-time domain is the multiplication of their z-transform:
Below we obtain the same result starting from the definition of the z – transform
and by mathematically manipulating the two sums involving Z {x [n] ∗ y [n]}:
Letting m = n − k we get
∞ ∞
W (z) = x [k] y [m] z−m−k
k=−∞ m=−∞
∞ ∞
= x [k] z−k y [m] z−m
k=−∞ m=−∞
= X (z) Y (z) .
2
w [n] = x [k] y [n − k]
k=0
" # " # " #
= 1 · 0, 1, 1, 1 + 2 · 0, 0, 1, 1, 1 + (−1) · 0, 0, 0, 1, 1, 1
↑ ↑ ↑
" # " # " #
= 0, 1, 1, 1, 0, 0 + 0, 0, 2, 2, 2, 0 + 0, 0, 0, −1, −1, −1
↑ ↑ ↑
" #
= 0, 1, 3, 2, 1, −1 .
↑
" #
Thus w [n] = 0, 1, 3, 2, 1, −1 = δ [n − 1]+3δ [n − 2]+2δ [n − 3]+δ [n − 4]−
↑
δ [n − 5] and W (z) = z−1 + 3z−2 + 2z−3 + z−4 − z−5 .
If
Z
x [n] ←→ X (z) ROC: r1 < |z| < r2 ,
then
Z
1 1
x [−n] ←→ X z−1 ROC: < |z| <
r2 r1
∞ −∞
Z {x [−n]} = x [−n] z−n = x [k] zk
n=−∞ k=∞
518 9 z-Transform
∞ −k
= x [k] z−1
k=−∞
= X z−1 .
The last sum is identical with the defining equation except that z is replaced by z−1 .
Therefore the ROC must be
Also we have
Taking the limit of X (z) as z tends to infinity, the terms x [1] z−1 , · · · , x [n] z−n , . . .
tend to zero. Hence the assertion follows.
Example 9.13 If x [n] = cos ω 0 n u [n], find x [0] .
From Table 9.1 we have
1 − cos ω 0 z−1
X (z) = .
1 − 2 cos ω 0 z−1 + z−2
Therefore
1 − cos ω 0 z−1
= lim = 1.
z→∞ 1 − 2 cos ω 0 z−1 + z−2
Obtaining a discrete-time function back from its z-transform is the process of inverse
z-transform. The z-transform of exponential sequences and difference equations
result in rational functions of the form (9.10). The rational functions in z or z−1
can be expanded into a sum of partial fractions using methods of Sect. 4.4. After
the partial fraction expansion, the inversion is accomplished by locating the simpler
fractions in a transform table. The overall inverse transform is then found adding up
these simpler transforms.
Contour integration is the most sophisticated and ultimate tool to find the inverse
z–transform. The method of partial fraction expansion is closely related to finding
the sum of the residues of the contour integral. Thus both the contour integral and the
partial fraction expansion can be used to invert the z-transform of rational functions.
Fortunately, the type of signals and the linear-time-invariant systems that we deal
with in practice generally produce rational functions of z. When the z-transform
is a rational function, we have an inverse transform problem similar to the inverse
Laplace transform that we studied in Chap. 4. The methods of obtaining the inverse
Laplace transform studied in Sect. 4.4 are applicable to the inverse z-transform as
well. After expanding a rational function X (z) into partial fractions and by using
520 9 z-Transform
the table of z-transforms, x [n] can be obtained rather more easily compared to the
contour integration method.
Consider a discrete LTI system whose output is related to its input by the following
difference equation
Collecting the x [n] terms and the y [n] terms, then taking the z–transforms of the
right and left sides of the equation we get
M
bk z−k
Y (z) k=0
H (z) = = . (9.15)
X (z) N
ak z−k
k=0
9.4 The Inverse z-Transform 521
M M M
z−M bk zM−k zN bk zM−k zN −M (bk /b0 ) zM−k
k=0 k=0 b0 k=0
H (z) = = = · .
N N a0 N
z−N ak zN −k zM ak zN −k (ak /a0 ) zN −k
k=0 k=0 k=0
We can factor the numerator and the denominator in terms of zeros and poles.
1
M
zN −M (z − zk )
b zN −M (z − z1 ) (z − z2 ) · · · (z − zM ) b k=1
H (z) = 0 · = 0 · . (9.16)
a0 (z − p1 ) (z − p2 ) · · · (z − pN ) a0 1
N
(z − pk )
k=1
In (9.16), it is evident that H (z) has M nonzero zeros, N nonzero poles. We can
distinguish three cases in which
(a) N < M: M − N poles are located at z = 0,
(b) N = M: no zeros or poles are located at z = 0,
(c) N > M: N − M zeros are located at z = 0.
We notice that the number of poles and zeros becomes equal after extracting the
zeros/poles at z = 0.
In the following examples, the partial fractions are obtained, then using the
transform table, sequence terms Ai pin u [n] are found. By the linearity property, the
sum of these terms yields h [n]. When the poles are complex conjugate, the terms
corresponding to pi and pi∗ are also complex conjugate. This simplifies the work
done to determine the complex conjugate coefficients.
Y (z)
Example 9.14 In this example H (z) = represents a system with real poles.
X (z)
We also assume right-sided signals.
Let
Y (z) −1 + 3.6z−1
= ROC: (|z| > 0.9) ∩ (|z| > 0.6) = |z| > 0.9.
X (z) 1 + 0.3z−1 − 0.54z−2
−1 + 3.6z−1 −1 + 3.6z−1
−1 −2
=
1 + 0.3z − 0.54z 1 − 0.6z−1 1 + 0.9z−1
522 9 z-Transform
Y (z) A1 A2
= −1
+ .
X (z) 1 − 0.6z 1 + 0.9z−1
−1 + 3.6z−1 A2
−1
= A1 + 1 − 0.6z
1 + 0.9z−1 z=0.6 1 + 0.9z−1 z=0.6
2 = A1
−1 + 3.6z−1 A1
= 1 + 0.9z−1 + A2
1 − 0.6z−1 z=−0.9 1 − 0.6z −1
z−1 =−0.9
−3 = A2 .
Thus we obtain
Y (z) −1 + 3.6z−1 2 3
= −1 −2
= −1
−
X (z) 1 + 0.3z − 0.54z 1 − 0.6z 1 + 0.9z−1
= H (z) .
Referring to Table 9.1 one can readily obtain the inverse z– transform:
−1 −1 + 3.6z−1 −1 2 −1 3
Z =Z −Z .
1 + 0.3z−1 − 0.54z−2 1 − 0.6z−1 1 + 0.9z−1
z (z − 3.6)
H (z) = − .
(z − 0.6) (z + 0.9)
9.4 The Inverse z-Transform 523
Fig. 9.10 Example 9.17. (a) Pole–zero diagram, (b) discrete-time sequence
H (z) has zeros at z = 0 and z = 3.6; and poles at z = 0.6 and z = −0.9.
In Fig. 9.10 the pole–zero diagram and the corresponding discrete-time signal are
shown.
Complex Roots
z+1
X (z) = (ROC: |z| > 1.1) .
z z2 + 1.21
z+1 A B B∗
= + +
z z2 + 1.21 z z + j 1.1 z − j 1.1
z+1 1
A= = = 0.8264
z2 + 1.21 z=0 1.21
= −0.4132 (1 − j 1.1)
524 9 z-Transform
B ∗ automatically becomes
B ∗ = −0.4132 (1 + j 1.1)
Since the ROC is |z| > 1.1, x [n] is a right-sided signal. We can invert this result
to obtain the discrete-time sequence in two steps. First, we recognize the z−1 factor
which generates a unit time delay in the inverse transform. We obtain the inverse
z–transform of the interior of the parentheses:
0.3071e−j 0.8229 0.3071e+j 0.8229
Z −1 1− −
1 + j 1.1z−1 1 − j 1.1z−1
Next, we apply the unit time delay to this result to obtain x [n]:
n−1
x [n] = 0.8264 δ [n − 1] − 0.6143 · 1.1n−1 cos π + 0.8229
2
n−1
= 0.8264δ [n − 1] − 0.5077 · 1.1n−1 cos π + 0.8229 .
2
Multiple Roots
Once again, to find the poles of multiplicities greater than one, we can fol-
low the methods of Sect. 4.4.3 we have used with Laplace transform. For a
pole p of multiplicity r, the partial fraction expansion will contain terms like
A1 (z) A2 (z) Ar (z)
, ,··· , .
z − p (z − p) 2 (z − p)r
9.4 The Inverse z-Transform 525
Example 9.16 Assuming a right-sided signal with a ROC |z| > 0.5, find the inverse
z – transform of:
3z + 1
X (z) = (|z| > 0.5) .
(z − 0.5)2
3z + 1 A1 A2
= +
(z − 0.5)2 z − 0.5 (z − 0.5)2
A1 (z − 0.5) + A2 A1 z + A2 − 0.5A1
= =
(z − 0.5) 2
(z − 0.5)2
to get
A1 = 3
A2 − 0.5A1 = 1
A2 = 2.5.
3z + 1 3 2.5 3 2.5
= + = −1
+ 2
(z − 0.5) 2 z − 0.5 (z − 0.5) 2 z 1 − 0.5z z2 1 − 0.5z−1
1 0.5z−1
= 3z−1 · −1
+ 5z−1 · 2
1 − 0.5z 1 − 0.5z−1
& '
1 0.5z −1
−1 :
= z−1 3 · +5· 2 = z X (z) .
1 − 0.5z−1 1 − 0.5z−1
We consider x [n] to be the delayed version of another signal x̂ [n] such that x [n] =
x̂ [n − 1]. Hence X (z) = z−1 X : (z). Referring to from Table 9.1 for a right-sided
signal, x̂ [n] is given as
& '
−1 1 0.5z−1
x̂ [n] = Z 3· −1
+5· 2
1 − 0.5z 1 − 0.5z−1
= 3 · 0.5n + 5n · 0.5n u [n] .
526 9 z-Transform
Finally we obtain
x [n] = x̂ [n − 1]
= 3 · 0.5n−1 + 5 (n − 1) 0.5n−1 u [n − 1]
= (5n − 2) 0.5n−1 u [n − 1] .
∞
X (z) = an z−n , |z| > |a|
n=0
−1
X (z) = an zn , |z| < |a| ,
n=−∞
9.4 The Inverse z-Transform 527
1 − 8z−1 + 16z−2
H (z) = .
1 − 12 z−1 + 14 z−2
H (z) has two poles at z = 12 . We consider the right-sided signal case whose
ROC is |z| > 12 . Through long division, we obtain an infinite polynomial in z−1 for
H (z):
15 −1 63 15
H (z) = 1 − z + 12z−2 + z−3 + z−4 + . . . ,
2 8 16
528 9 z-Transform
15 63 15
h [n] = δ [n] − δ [n − 1] + 12δ [n − 2] + δ [n − 3] + δ [n − 4] + . . . .
2 8 16
The left-handed noncausal signal has a ROC |z| < 12 and produces a polynomial
in increasing powers of z. To obtain this polynomial using a long division, we
reverse the order of terms in the dividend and divisor so we divide 16z−2 − 8z−1 + 1
by 14 z−2 − 12 z−1 + 1. The result is
∞
z−n
exp z−1 = .
n!
n=0
∞ ∞
z−n r −n
For this series to converge, we require that < < ∞. Since
n! n!
n=0 n=0
∞
r −n
= exp r −1 , the convergence of exp z−1 is guaranteed for |z| > 0.
n!
n=0
Therefore exp z−1 is the z-transform of a causal (right-sided) signal. The
inverse z– transform is given as
∞
1
x [n] = δ (n − k) .
k!
k=0
In the previous section we were able to find inverse transforms of rational functions
using the partial fraction expansion. However not all functions are rational. (sin z)−1
is such a function. We cannot expand (sin z)−1 into a sum of partial fractions, and
we need a more elaborate tool for inverting such a function. Recall that when we
were unable to find the Laplace transform using partial fractions, we took refuge in
9.4 The Inverse z-Transform 529
the Bromwich contour integral. Likewise, when it is not possible to use the partial
fractions, finding the inverse z–transform can be performed by complex contour
integration which is the ultimate inversion tool. Inverse z-transform of X (z) is the
sum of all the residues of X (z) zn−1 .
Next we will take up this inversion. Recall the Cauchy integral theorem which
states that
ˆ !
1 1 k=1
z−k dz = (9.17)
2πj C 0 k = 1.
Given the z-transform X (z), x [n] can be retrieved exploiting the Cauchy
integral. X (z) and x [n] are related through the z–transform
∞
X (z) = x [n] z−n .
n=−∞
Multiplying both sides by zk−1 and taking the contour integral within the ROC we
have
∞
X (z) = x [n] z−n .
n=−∞
Multiplying both sides by zk−1 and taking the contour integral within the ROC we
have
ˆ ˆ & ∞ '
1 1
X (z) zk−1 dz = x [n] z−n zk−1 dz.
2πj C 2πj C n=−∞
Since the summation converges to X (z) within the ROC, integration and summation
can be interchanged
ˆ ∞ ˆ
1 1
X (z) z k−1
dz = x [n] z k−n−1
dz .
2πj C n=−∞
2πj C
and
ˆ
1
X (z) zk−1 dz = x [k]
2πj C
to (9.18) we obtain
ˆ m
1
x [n] = X (z) zn−1 dz = Res X (z) zn−1 .
2πj C z=zi
i=1
Should X (z) be a rational function, this integral becomes the sum of partial
fractions. If m is large enough that the evaluation of individual residues becomes
tedious, we can resort to the residue-at-infinity method of Sect. 3.12.2 to evaluate
the contour integral. Thus
ˆ
1
x [n] = X (z) zn−1 dz
2πj C
&
n−1 '
1 1 1
= Res 2 X .
z=0 z z z
Interestingly, if the contour is taken to be the unit circle, Eq. (9.18) reduces to the
inverse Fourier transform of discrete-time sequences. Letting z = ej ω we have the
same inverse Fourier transform relationship we have seen in Chap. 6:
ˆ n−1
1
x [n] = X ej ω ej ω j ej ω dω
2πj C
ˆ 2π
1
= X ej ω ej ωn dω.
2π 0
9.4 The Inverse z-Transform 531
Example 9.19 Given that X (z) = 1
3 1 + z−1 + z−2 , use the contour integral to
find x [n].
ˆ ˆ
1 1 1 + z−1 + z−2 n−1
x [n] = X (z) zn−1 dz = z dz
2πj
C 2πj C 3
ˆ ˆ ˆ
1 1
= · z dz +
n−1
z dz +
n−2 n−3
z dz
3 2πj C C C
3
1
= Res zn−i
3
i=1
1
= [δ [n] + δ [n − 1] + δ [n − 2]] .
3
z
Example 9.20 It is given that X (z) = . For simplicity assume that a is real.
z−a
Use the contour integral to find x [n].
ˆ ˆ
1 1 z n−1
x [n] = X (z) zn−1 dz = z dz
2πj C 2πj C z−a
ˆ
1 zn
= dz.
2πj C z−a
As is evident from Fig. 9.6, depending on the ROC, X (z) belongs to either of two
sequences: a right-sided or a left-sided sequence. Hence we have to treat the two
cases separately.
zn ϕ (z)
Case 1: |z| > a If n 0 we have the situation = , where z = a is the
z−a z−a
zn
only pole. So the residue of is ϕ (a) = a n . Thus we get
z−a
x [n] = a n .
zn
Res = an.
z=a z − a
532 9 z-Transform
zn 1 ϕ (z)
= m = m
z−a z (z − a) z
1
ϕ (z) = .
z−a
1 ϕ (z)
Res = Res m
z=0 zm (z− a) z=0 z
1 d m−1
= ϕ (z)
(m − 1)! dzm−1 z=0
m−1
1 d 1
=
(m − 1)! dzm−1 z − a z=0
1
= (−1)m−1 (m − 1)! (z − a)−m
(m − 1)! z=0
−1 −m −m
= (−1) a = −a
= −a . n
1 1
x [n] = Res + Res
z=a zm (z − a) z=0 zm (z − a)
= an − an
= 0.
x [n] = a n u [n] .
Case 2: |z| < a In contrast with the previous case, the contour of integration never
encircles the pole at z = a.
If n 0 there are no poles inside the contour of integration. Hence
ˆ ˆ
1 z n−1 1 zn
x [n] = z dz = dz
2πj C z−a 2πj C z−a
= 0.
9.4 The Inverse z-Transform 533
1 ϕ (z)
x [n] = Res = Res n
z=0 zn (z − a) z=0 z
= −a n .
x [n] = −a n u [−n − 1] .
(a − 1) z + a
X (z) = .
(z − a)2
Choosing a contour z = rej ω such that r > a, integrating around this we obtain
x [n]
ˆ
1 [(a − 1) z + a] zn−1
x [n] = dz
2πj C (z − a)2
[(a−1)z+a]zn−1
= Residues of .
(z−a)2
Depending on n, X (z) can have no pole, one pole or multiple poles at z = 0. Instead
of finding the residues at z = 0 and z = a and adding them up, we can alternatively
evaluate the residue at infinity which gives us the sum of residues. Recall from
Sect. 3.12.2 that taking a contour enclosing all the poles we can find x [n] by
&
n−1 '
1 1 1
x [n] = Res 2 X .
z=0 z z z
1 1 1 n−1
If n = 0, then X z z has no poles at z = 0, thus
z2
& −1 '
1 1 1
x [0] = Res 2 X
z=0 z z z
az + a − 1
= Res = 0.
z=0 (1 − az)2
For n = 1
az + a − 1
x [1] = Res = a − 1.
z=0 z (1 − az)2
Hence
& '
− (n − 1)!a n−1 (1 − az)−n + n!a n (1 − az)−(n+1)
x [n] =
(n − 1)!
z=0
= −a n−1
+ na . n
The inversion using the contour integration can be applied to find the z-transform
of the product of two signals. We have already seen a similar case when we studied
the Fourier transform of such sequences. Like the Fourier transform, it turns out that
9.5 Complex Convolution Theorem 535
the z-transform of the product of two sequences is the periodic convolution of the
related transforms.
Let w [n] = x [n] y [n] with the corresponding z-transform X (z) and Y (z). Then
the z-transform of the product becomes
∞
W (z) = x [n] y [n] z−n .
n=−∞
The contour is taken in the ROC of Y (z). Let ROCx , the region of convergence
for X (z), be given as
z
rx1 < < rx2 or
s
|s| rx1 < |z| < |s| rx2 . (9.20)
On the other hand ROCy is ry1 < |s| < ry2 . Using this in (9.20) we have
ry1 rx1 < |s| rx1 < |z| < |s| rx2 < ry2 rx2 .
536 9 z-Transform
We can interchange the roles of x [n] and y [n] in (9.19) as well. Thus using
ˆ
1
x [n] = X (s) s n−1 ds
2πj Cx
we obtain
∞ ˆ
1
W (z) = y [n] X (s) s ds z−n
n−1
(9.22)
n=−∞
2πj Cx
ˆ z
1
= X (s) Y s −1 ds.
2πj Cx s
The contour is taken in the ROC of X (z). By using a similar argument the ROC of
W (z) is found to be the same as (9.21).
We can recognize the convolution by placing s and z on the unit circle. Let
z = ej ω
s = ej θ .
Then W ej ω becomes
1
ˆ ej θ
W e jω
= X ej θ Y e−j θ j ej θ dθ
2πj Cx ej ω
ˆ
1
= X ej θ Y ej (w−θ) dθ
2π Cx
Suppose that a circuit simulator produces v [n] and i [n] sequences for the voltage
across and the current through a 1-ohm resistance. The instantaneous power
dissipated by the resistance is given
Since the resistance is 1 ohm, i [n] = v [n]. Thus the instantaneous power becomes
We call the signals v [n] and i [n] energy signals if the sum of P [n] over all n’s
is finite, that is,
∞
E= P [n] < ∞.
n=−∞
Generalizing the voltage and current sequences to any sequence x [n], and substi-
tuting (9.23) into (9.24) we can write
& ∞
'
E= x [n] x ∗ [n] z−n .
n=−∞ z=1
ˆ 2π
1
= X ej ω X∗ e−j ω dω
2π 0
ˆ 2π 2
1
= X ej ω dω.
2π 0
Obviously, if x [n] = 0 for n < 0, then the two-sided and one-sided transforms are
identical. The ROC of X5 (z) is the same as the ROC of X (z).
Most properties of the two-sided transform hold for the one-sided transform with
a few exceptions as will be explained below.
Linearity It is easy to show that the linearity property is also valid for the one-sided
transform.
Convolution The convolution property of two-sided transforms does not in general
hold for the one-sided transform. The one-sided transform of the convolution of two
sequences w [n] = x [n] ∗ y [n] is given as
∞ ∞
! ∞
(
5 (z) =
W (x [n] ∗ y [n]) z −n
= x [k] y [n − k] z−n .
n=0 n=0 k=−∞
5 (z) becomes
Interchanging the order of summation, W
∞ ∞
5 (z) =
W x [k] y [n − k] z−n
k=−∞ n=0
∞ ∞
= x [k] y [m] z−(m+k)
k=−∞ m=−k
∞ ∞
= x [k] z−k y [m] z−m .
k=−∞ m=−k
9.7 One-Sided z-Transform 539
5 (z) = X
W 5 (z) Y
5 (z) .
5 (z) = X
If x [n] , y [n] = 0 for n < 0 then W 5 (z) Y
5 (z).
" #
Example 9.22 Consider the two sequences x [n] = 1, 2, 3, 4 and y [n] =
↑
" #
1, 2, 3, 2, 1 . The convolution of these sequences and the two-sided z-transforms
↑
are easily found to be
It can be verified that W (z) = X (z) Y (z). The one-sided z-transforms of x [n],
y [n], and w [n] are
∞
5 (z) =
X x [n] z−n = 2 + 3z−1 + 4z−2 ,
n=0
∞
5 (z) =
Y y [n] z−n = 3 + 2z−1 + z−2 ,
n=0
∞
5 (z) =
W w [n] z−n = 18 + 22z−1 + 20z−2 + 11z−3 + z−4 .
n=0
540 9 z-Transform
Since
5 (z) Y
X 5 (z) = 2 + 3z−1 + 4z−2 3 + 2z−1 + z−2
5 (z) = X
we see that W 5 (z) Y
5 (z).
" #
Now let us consider the right-sided sequences x [n] = 1, 2, 3, 4 and y [n] =
↑
" #
1, 2, 3, 2, 1 . The one-sided and two-sided transforms of x [n] and y [n] are
↑
Since
5 (z) Y
X 5 (z) = 1 + 2z−1 + 3z−2 + 4z−3 1 + 2z−1 + 3z−2 + 2z−3 + z−4
we see that the convolution property holds for x [n] and y [n] since they are equal to
zero for n < 0.
Time-Shift Time-shift also does not work in one-sided transform as it does in two-
sided transform. Let y [n] = x [n − k], with k a positive integer. The one-sided
transform of y [n] is given as
∞ ∞
5 (z) =
Y x [n − k] z−n = x [m] z−(m+k)
n=0 m=−k
−1 ∞
= x [m] z−(m+k) + z−k 5 (z)
x [m] z−m = z−k X
m=−k m=0
9.8 Difference Equations 541
−1
+ x [m] z−(m+k)
m=−k
−k 5
=z X (z) + x [−k] + x [−k + 1] z−1 + . . . + x [−1] z−(k−1) . (9.26)
Besides multiplying the transform by z−k , the past values x [−k] through x [−1] are
also involved in the transform as initial conditions.
Secondly let us consider the sequence y [n] = x [n + k] which is shifted left by
n samples. The one-sided transform is now given as
∞ ∞ ∞
5 (z) =
Y x [n + k] z−n = x [m] z−(m−k) = zk x [m] z−m
n=0 m=k m=k
∞ k−1
k−1
−m −m k5
== z k
x [m] z − x [m] z = z X (z) − x [m] z−(m−k)
m=0 m=0 m=0
5 (z) − x [k − 1] z + . . . + x [1] zk−1 + x [0] zk .
= zk X (9.27)
m [n + 1] = 0.5m [n] .
We started with 10 kg cobalt-60 and ended up with 9.375 kg nickel-60. Hence the
amount of cobalt-60 that remains is 10 kg -9.375 kg = 0.625 kg. Hence we have
0.625 = 0.5n · 10
ln (0.0625)
n= = 4.
ln 2
Thus we conclude that a total of 4 · 5.26 years = 21 years 14 days 14 hours has
elapsed.
Example 9.24 (RC Circuit) Consider a simple RC circuit shown in Fig. 9.12 driven
by a voltage source x [n] = 10u [n] volts. We wish to find the voltage across the
9.8 Difference Equations 543
where Ts is the sampling period. Assume that before the system is turned on
y [−1] = −10 volts. By arranging we get
RC Ts
y [n] = y [n − 1] + x [n] , y [−1] = −10.
RC + Ts RC + Ts
This is a difference equation of order one with initial condition y [−1] = −10. Let
R = 9.9 · 103 ohms, C = 10−9 F, and Ts = 10−7 s. Then we have
We can solve this difference equation using the one-sided z – transform and the
shifting property (9.26). At this point we may let go the tilde notation and rather use
2 Actually, the left and right-hand sides are approximately equal. But this is not of concern here.
3 The conversion here is called the Euler approximation and was chosen for its simplicity.
544 9 z-Transform
1
Y (z) = 0.99 y [−1] + z−1 Y (z) + 0.01 · 10 ·
1 − z−1
0.1
= 0.99 −10 + z−1 Y (z) +
1 − z−1
0.1
= −9.9 + 0.99z−1 Y (z) + .
1 − z−1
0.1
1 − 0.99z−1 Y (z) = −9.9 +
1 − z−1
9.9 0.1
Y (z) = − +
1 − 0.99z−1 1−z −1 1 − 0.99z−1
9.9 10 9.9
=− + −
1 − 0.9z−1 1 − z−1 1 − 0.99z−1
19.8 10
=− + .
1 − 0.99z−1 1 − z−1
The difference equations so far possessed a z – transform that can be used to find
the inverse z – transform. Unfortunately not all difference equations
" submit# to the
1
z-transform methods. In Example 9.25, there is no way to relate Z to X (z).
x [n]
Therefore such difference equations can only be solved by numerical recursion; we
cannot analyze them using z-transform techniques.
Difference Equations in LabVIEW Rather than handling the transformed equa-
tions in z-plane, difference equations can be solved in discrete-time domain. Recall
that z-transform of a sequence delayed by one sample is Z {x[n − 1]} = z−1 X (z).
LabVIEW has a facility called register port on FOR and WHILE loops. Using
the register port, one can introduce delays in discrete-time to realize a difference
equation. As shown in Fig. 9.13, there are two ways to introduce time delays in
LabVIEW.
The first method is shown in Fig. 9.13a. On the left wall of the FOR loop there are
two small squares with inverted triangles in them. These are the register ports. The
value x [n] connected to the triangle on the right wall is entered into the register, and
becomes available on the left wall during the next iteration as x [n − 1], x [n − 2].
More delays can be added on the left wall of the loop by pulling the registers
from their handles. Initial conditions x [−1] , x [−2] , · · · x [−n] can be wired to
the register as seen in Fig. 9.13a.
9.8 Difference Equations 545
The second method is shown in Fig. 9.13b. This is a WHILE loop which is
set to run only once and has a single uninitialized register (see the figure after
the title of this chapter and Problem 34). This one-time-executing WHILE loop
that performs the unit-delay operation. This loop is placed in a subvi. As each
subvi instance must preserve the state from the previous run, multiple calls to the
subvi should not spoil the states of the other calls. This requires that the subvi be
configured as reentrant. Therefore Preallocated clone reentrant execution from
the VI Properties/Execution menu must be selected for proper operation of the
subvi. Thus x [n] which is saved into the register becomes available as x [n − 1]
on the next call to the subvi. As the output will be available on the next run, no
initial conditions may be connected to the register. Initial conditions must be passed
programmatically on the very first call to the subvi.
Example 9.25 We present an algorithm to compute square roots in LabVIEW by
recursion. The derivation of the difference equation is explained in Problem 19.
The difference equation is non-linear and its z-transform cannot be found using the
properties and the techniques we have developed (see Problem 20). The number
whose square root we seek is A. The algorithm
√ generates a sequence for the square
root and starts with an initial guess for A; call it x−1 which is the initial value
of the sequence xn . The only restriction on the guess is that it may not be equal
to zero. If you select a negative number as your guess, the algorithm generates the
negative root of A. We
√ assume that the iteration produces a sequence of numbers xn
which converges to A. The following difference equation finds the square root of
a positive integer A as n tends to infinity.
1 A
xn = xn−1 + (9.28)
2 xn−1
x−1 = G (initial condition).
546 9 z-Transform
This is a very interesting and fast algorithm; in just a few iterations one can get the
square root with great accuracy; the number of iterations depends somewhat on the
initial guess and the precision. Figure 9.14 shows the LabVIEW implementation of
Fig. 9.14 Square root algorithm implemented using a difference equation iteratively. (a) Lab-
VIEW block diagram. The iteration stops when the difference between successive values is less
than 10−12 . (b) Front√panel showing a sample run with A = 24 and G = 7. It takes only 5
iterations to calculate 24 = 4.89898
9.8 Difference Equations 547
the algorithm and a sample run for A = 24 and G = 7. The iteration stops when
xn − xn−1 ≤ 10−12 .
Example 9.26 Consider a second-order causal system where the output sequence
y [n] and the input sequence x [n] are related to each other through a difference
equation:
2. Zero-state response:
a0 + a1 z−1
· X (z)
1 + b1 z−1 + b2 z−2
By selectively setting the initial conditions and the input in Fig. 9.15 equal to
zero, one can readily obtain the zero-input and the zero-state responses. The ratio
of the zero-state response to X (z) is the system transfer function.
548 9 z-Transform
Fig. 9.15 Implementation of a second-order system with initial conditions. (a) The block diagram,
(b) LabVIEW implementation
time signals and systems. The block labeled C/D samples x (t) at regular intervals
Ts to produce x [n] = x (nTs ). This block is implemented with (Sample-and-Hold)
or (Track-and-Hold) circuits which may be optionally followed by an ADC. The
discrete-time system with the impulse response h [n] operates on x [n] through
convolution to produce y [n]. y [n] is converted back to the continuous-time by the
D/C block. The D/C block is a lowpass filter which is optionally preceded by a DAC
(if an ADC was used in the C/D module). Most systems prefer to convert x [n] to
digital, hence employ ADC’s. Systems utilizing CCD’s (Charge-Coupled Devices)
or switched-capacitor circuits do not convert x [n] to digital.
While continuous-time systems operate on signals using derivatives and inte-
grals, discrete-time systems use delayed versions of signals and their differences
for processing. Derivatives and integrals, represented by s and 1/s in Laplace
transform, correspond to discrete differences and sums in z-transform. Therefore
we can talk about two approaches to converting continuous-time systems to discrete-
time, namely the derivative approach and the integral approach. Once an appropriate
conversion of s is obtained, the integral operation can be readily found from this
conversion. Below we discuss three derivative approximations, as well as a more
sophisticated, integral-based bilinear approximation. As illustrated in Fig. 9.17,
none of these approximations is exact; they should not be expected to replace the
derivative with infinite precision. Nonetheless we should be happy with accuracy
which increases as the sampling period decreases.
Finding an adequate substitute for the derivative enables us to obtain the
z-transform equivalent of a continuous-time system. The relation between the
derivative and the samples at times n−1, n, and n+1 is shown in Fig. 9.17. The blue
line is the tangent to the analog signal y (t) at t = nTs . Using these three instances,
the derivative, that is, the slope of the tangent at time n, can be approximated in
three ways. The approximations are duly called the forward difference, the backward
difference, and the forward-backward difference. The backward difference is also
known as the Euler approximation.
Assume that a continuous-time linear time-invariant system is described by a
linear differential equation
dy (t)
= ay (t) + bx (t) . (9.29)
dt
550 9 z-Transform
Fig. 9.17 Derivative approximation. Blue line is the tangent to the curve at t = nTs and its slope is
dy/dt. Slopes of lines I, II and III correspond to forward-difference, forward-backward difference,
and the backward difference methods expressed by Eqs. 9.30, 9.31 and 9.32, respectively
dy (t) y [n + 1] − y [n]
(9.30)
dt Ts
dy (t) y [n + 1] − y [n − 1]
(9.31)
dt 2Ts
dy (t) y [n] − y [n − 1]
. (9.32)
dt Ts
" #
y [n + 1] − y [n − 1] 1
Z = z − z−1 Y (z)
2Ts 2Ts
and substitute it for the derivative in the differential equation. After taking
z–transforms of both sides in Eq. (9.29), the continuous-time system is transformed
to the z–domain
z − z−1 Y (z) = 2Ts [aY (z) + bX (z)] .
dy (t) 1 1
=− y (t) + u (t)
dt RC RC
r (t) = −y (t) + u (t) .
2 · 10−3 z
Y (z) = U (z)
z2 + 2 · 10−3 z − 1
2 · 10−3 z z
= −3
·
z + 2 · 10 z − 1 z − 1
2
2 · 10−3 z2
=
(z + 1.0010) (z − 0.9990) (z − 1)
552 9 z-Transform
" #
y [n] − y [n − 1] 1
Z = 1 − z−1 Y (z) . (9.34)
Ts Ts
After taking the z – transform of both sides of Eq. (9.29), the continuous-time system
becomes
1 − z−1 Y (z) = Ts [aY (z) + bX (z)] .
9.9 Conversions Between Laplace Transform and z–Transform 553
Fig. 9.18 (a) A transmission line differentiator utilizing Euler approximation. The signal at the
transmission line input is x (t), a triangular wave with a 1 µs period. x (t) is delayed 50 ns by the
transmission line to produce y (t) = x (t − 50 ns). The subtractor E1 has a gain of 2 · 107 which
is 1/Td . and its output is z (t) = [x (t) − x (t − 50 ns)] /50 ns. (b) The red trace is x (t), the blue
trace is y (t) and the black trace is z (t) ≈ x (t). The slope of the rising edge is 0.5 µV/0.5 µs =
1 V/sec; likewise the falling edge has a slope of −1 V/sec. We see that the backward difference
produces an acceptable derivative of x (t)
For example, Fig. 9.18 depicts a transmission line differentiator utilizing Euler
approximation. In order to avoid reflections, the transmission line is terminated
in the characteristic impedance at the line input and output. In the figure, the
transmission line delays its input by 50 ns which is Ts . The difference between
the input and output divided by this delay results in an approximate derivative of the
input. Note that the input x (t) is a triangular wave, and the derivative produced by
backward difference is a square wave.
Being a causal differentiator, Euler approximation deserves some elaboration.
Let us investigate the nature of this mapping in some depth. Euler transform is a
mapping from the s–plane to the z–plane. By setting σ equal to zero, and varying ω
from minus infinity to plus infinity, entire frequency spectrum of the continuous-
time signal is covered. In effect, the Euler approximation results in yet another
frequency response in the discrete-time domain. To assess the frequency response
provided by the Euler approximation, we have to look at the character of the
derivative operators. From Eq. (9.34), we can relate the derivatives in continuous-
time and discrete-time by
1 − z−1
s= . (9.35)
Ts
554 9 z-Transform
1
z= . (9.36)
1 − sTs
1
x + jy = ,
1 − σ Ts − j ωTs
1 + σ Ts
x= ,
(1 − σ Ts )2 + (ωTs )2
ωTs
y= .
(1 − σ Ts )2 + (ωTs )2
It can be shown that lines σ = c < 0 in the s-plane is mapped onto a circle given by
2 2
0.5 0.5
x− + y2 = . (9.37)
1 − σ Ts 1 − σ Ts
Specifically j ω-axis of the s-plane is mapped onto a circle in the z-plane whose
center is at x = 0.5 and has a radius of 0.5. Setting σ = 0 in Eq. (9.37) we get
0.5
Since < 0.5 for σ < 0, we see that the lines σ = c < 0 in the s-plane
1 − σ Ts
are mapped to a circle given by (9.37) which is completely within the circle (9.38)
onto which the j ω–axis is mapped. In other words, the left-half of the s–plane is
mapped into the interior of the circle |z − 0.5| = 0.5. In Fig. 9.19, the mapping
from the s-plane to the z-plane is colored in orange. This circle is entirely inside
the unit circle, and we know that systems with poles inside the unit circle are
stable. Consequently, we conclude that the Euler approximation transforms stable
continuous-time systems into stable discrete-time systems.
Knowing that the j ω-axis is mapped onto the circle (9.38), we can express this
circle as follows
z − 0.5 = 0.5ej θ .
9.9 Conversions Between Laplace Transform and z–Transform 555
Fig. 9.19 Euler transform. (a) Mapping from s–plane to z–plane. (b) Variation of magnitude and
phase with frequency
Substituting (9.36) for z, we get a more useful form for the mapping of the j ω–axis:
1 1 − 0.5 + j 0.5ωTs
− 0.5 =
1 − j ωTs 1 − j ωTs
1 + j ωTs
= 0.5 ·
1 − j ωTs
= 0.5ej θ
and
dy (t) 1 1
=− y (t) + u (t) ,
dt RC RC
r (t) = −y (t) + u (t) .
556 9 z-Transform
Fig. 9.20 The voltages which appear across the capacitance and the resistance obtained from Euler
approximation
bTs z Ts
Y (z) = X (z) = U (z)
(1 − aTs ) z − 1 (1 + Ts ) − z−1
Ts 1 1
= · −1
·
1 + Ts 1 − (1 + Ts ) z −1 1 − z−1
1 1
= 9.99 · 10−4 ·
1 − 0.999001z−1 1 − z−1
−4 −1000.01 1001.001
= 9.99 · 10 +
1 − 0.999001z−1 1 − z−1
1 0.999
= − .
1 − z−1 1 − 0.999z−1
Hence
y [n] = 1 − 0.999 · 0.999n u [n]
= 1 − 0.999n+1 u [n] ,
The solution is illustrated in Fig. 9.20 where the capacitance voltage y [n] is plotted
in blue. The resistance voltage r [n] is plotted in red. In contrast to the noncausal
forward-backward difference method, Euler transform is a stable approximation. It
transforms stable s-plane poles into stable z-plane poles.
d 2 y (t) d ẏ (t)
The Euler approximation for the second derivative ÿ (t) = 2
= can
dt dt
be derived using a similar approach:
1 1
H (s) = = .
1 + sRC 1 + 0.01s
1 − z−1
s= = 1000 1 − z−1
Ts
558 9 z-Transform
Fig. 9.21 (a) Frequency response of an RC lowpass filter. (b) The frequency response of the digital
filter synthesized using Euler approximation. In both filters RC = 0.01 s. For the digital filter the
sampling period is 1 ms. Notice that the digital filter reaches cutoff much faster than the analog
filter, and the phase response is not monotonically decreasing after ω = 0.4 rad (15.9 Hz)
Fig. 9.22 (a) Bilinear transform derivation. (b) Mapping between s-plane and z-plane
Bilinear Transform
Bilinear transform is another alternative to convert from s–domain to z–domain
and vice versa. Bilinear transform is alias-free. It can be derived from continuous-
time integration using trapezoidal approximation. Consider a continuous-time signal
x (t). Let y (t) denote the area under x(t) from −∞ to t, that is,
ˆ t
y (t) = x (τ ) dτ. (9.41)
−∞
As we have seen in Sect. 4.3.3 (Eq. 4.9), the Laplace transform of a signal integrated
in time is given by
1
Y (s) = X (s) .
s
Let y[n] = y (nTs ) and y [n − 1] = y [(n − 1) Ts ] denote the areas up to t = nTs
and t = (n − 1) Ts . Referring to Fig. 9.22, the total area to the left of t = nTs can
be split into two areas and we can write
ˆ nTs ˆ (n−1)Ts ˆ nTs
x (τ ) dτ = x (τ ) dτ + x (τ ) dτ.
−∞ −∞ (n−1)Ts
Approximating the second integral on the right-hand side by the area of the
trapezoid, we can convert this equation into a difference equation:
Ts
y [n] y [n − 1] + {x [n − 1] + x [n]} .
2
560 9 z-Transform
Taking the z-transform of both sides and arranging the terms we get
Ts
Y (z) − z−1 Y (z) = X (z) + z−1 X (z) ,
2
Ts
1 − z−1 Y (z) = 1 + z−1 X (z) ,
2
Ts 1 + z−1
Y (z) = · X (z) .
2 1 − z−1
1
The integration (9.41) is represented in the s-domain by Y (s) = ·X (s). Hence
s
by analogy, the relation between Y (z) and X (z) is the discrete-time equivalent of
integration. If we look at the relations between Y and X in the two domains we have
1
Y (s) = ·X (s)
s
Ts 1 + z−1
Y (z) = · X (z) .
2 1 − z−1
Thus, by comparison, we deduce that integration operators in the two domains are
related by
1 Ts 1 + z−1
= · .
s 2 1 − z−1
2 1 − z−1
s= ·
Ts 1 + z−1
z−1
s = 2fs · . (9.42)
z+1
wTs
ω = 2 tan−1 (9.46)
2
562 9 z-Transform
Fig. 9.23 Frequency warping in bilinear transform. (a) Continuous-time to discrete-time, (b)
discrete-time to continuous-time
and
2 ω ω
w= tan = 2fs tan . (9.47)
Ts 2 2
ω 2 ωTs
5=
w · ws = tan−1 . (9.48)
2π Ts 2
In the linear region of the inverse tangent function, say |ω| π/2, the two
frequencies are nearly equal, that is, w 5 = w. However, if 2 < |ω| π , the
frequencies before and after the transform are not equal. It is a common practice
to convert analog filters to digital infinite impulse response (IIR) filters using the
bilinear transform. The effect of warping is to squeeze an infinite range of analog
high frequencies into a narrow band of finite digital frequencies. Critical filter cutoff
frequencies may be affected by this warping. The warping in the region before the
knee in Fig. 9.23 is negligible, but analog frequencies which occur after the bend
are badly warped. For this reason, when designing discrete-time systems from their
analog counterparts, the warping effect must be taken into account by incorporating
dewarping into the design.
Example 9.29 An RC lowpass filter cuts off at 40 Hz. Assuming Ts = 1 ms and
5 ms,
(a) Find the cutoff frequencies wc .
(b) Obtain the discrete-time frequency response.
(c) Obtain the equivalent discrete-time system.
9.9 Conversions Between Laplace Transform and z–Transform 563
1 1 80π
Ha (s) = s = s = .
+1 +1 s + 80π
ωc 80π
80π 80π (z + 1)
Hd (z) = =
z−1 2000 (z − 1) +80π (z + 1)
2 · 1000 · +80π
z+1
z+1
= 0.1116 · .
z − 0.7767
80π 80π (z + 1)
Hd (z) = =
z−1 400 · (z − 1)+80π (z + 1)
2 · 200 · +80π
z+1
z+1
= 0.38586 .
z − 0.22826
We note that the sampling rate alters the pole location. But the zero remains
at z = −1 because it corresponds to the zero of the analog system at infinity.
564 9 z-Transform
(b) Ts = 5 ms.
Y (z) z+1 0.38586 1 + z−1
= 0.38586 =
X (z) z − 0.22826 1 − 0.22826z−1
The result of the transform is seen in Fig. 9.24. Cutoff frequencies are indicated
with a red cursor. The difference between the impulse responses and the warping of
frequency from 40 Hz to 35 Hz is evident.
Conversely, we can convert a discrete-time system to a continuous-time system
using the bilinear transform (9.43). During conversion, sampling period Ts plays a
role similar to that when we convert continuous-time systems to discrete-time. We
illustrate the procedure with an example.
Example 9.30 Obtain an analog filter from a digital filter which utilizes a sampling
period of 1 ms and is specified by
1 + z−1
Hd (z) = .
3 − z−1
1 + z−1 z+1
Hd (z) = −1
=
3−z 3z − 1
Ha (s) = Hd (z)| 2fs + s
z=
2fs − s
2fs + s
+1
z+1 2fs − s
= =
3z − 1 z= 2fs + s 2fs + s
2fs − s 3· −1
2fs − s
9.9 Conversions Between Laplace Transform and z–Transform 565
Fig. 9.24 Bilinear transform in Example 9.29. The sampling period is 1 ms in (a), (b) and (c).
(c) Is a zoomed view of (b). 40 Hz cutoff frequency of the continuous-time system is preserved
and marked with a red cursor. The sampling period is increased to 5 ms in (d), (e) and (f). (f) Is a
zoomed view of (e). 40 Hz cutoff frequency of the continuous-time system is warped to 35 Hz and
is also marked with a red cursor
Since Ts is specified to be 1 ms, the sampling rate is 1000 Hz, and the resulting
analog filter transfer function is
1000
Ha (s) = .
s + 1000
Although the procedure just described is straightforward and calls for standard
algebraic operations, manual substitution may quickly become tedious, especially
for high-order filters. Considering the need for high-precision coefficients for the
discrete-time filters, the difficulty can be even more severe. The complexity swiftly
runs to a level where you feel you would better write a program to do the job
automatically and reliably. Of course, programming in a language of your choice can
be pursued. However, if you have access to math software like SCILAB, MATLAB,
or MATHEMATICA, you do not need to bother programming either. MATLAB with
Signal Processing Toolbox installed, offers a bilinear function which carries out the
transforms for you without hassle. For convenience, it has six syntax variants you
can use:
566 9 z-Transform
[zd,pd,kd] = bilinear(z,p,k,fs)
[zd,pd,kd] = bilinear(z,p,k,fs,fp)
[numd,dend] = bilinear(num,den,fs)
[numd,dend] = bilinear(num,den,fs,fp)
[Ad,Bd,Cd,Dd] = bilinear(A,B,C,D,fs)
[Ad,Bd,Cd,Dd] = bilinear(A,B,C,D,fs,fp)
Just invoke the MATLAB help system to get more information about different ver-
sions of the bilinear function. Here we will demonstrate the form which accepts
as parameters the sampling frequency in hertz, the numerator and denominator
polynomials of the continuous-time system, and returns the discrete-time numerator
and denominator polynomials. The function has the form
[numd,dend] = bilinear(num,den,fs)
where num and den are two arrays which hold the coefficients of the continuous-
time system in descending order of s. fs is the sampling frequency in hertz.
numd,dend, on the other hand, are two arrays which hold the coefficients of
the discrete-time system in descending order of z or ascending order of z−1 . For
example, the analog tank circuit in Fig. 9.25a resonates at 200 Hz and has a transfer
function given by
250s
Ha (s) = .
s2 + 250s + 1582278.48
Let Ts = 10−3 s. Then fs = 1/Ts = 1000 Hz. We obtain the analog filter by
entering the following lines at the MATLAB prompt:
num =[250,0], den =[1,250,1582278.48].
[numd, dend] = bilinear(num, den, fs).
numd and dend are arrays holding the coefficients of the denominator and
numerator polynomials. The coefficients are in ascending order of z−1 . Thus we
have
0.082206 1 − z−2
Hd (z) =
1 − 0.795005z−1 + 0.835587z−2
0.082206 z2 − 1
= 2 .
z − 0.795005z + 0.835587
ROC : |z| > 0.9141.
The poles of Hd are at 0.3975 ± j 0.8232. Hence the ROC lies outside of these
poles. The corresponding discrete-time system is shown in Fig. 9.25b. Figure 9.26b
9.9 Conversions Between Laplace Transform and z–Transform 567
Fig. 9.25 An IIR digital filter obtained from its analog counterpart using bilinear transform. (a)
An RLC tank circuit. (b) The digital filter obtained from the analog transfer function using the
bilinear transform
shows the magnitude of the digital filter’s frequency response. Note that the digital
filter resonates at 179 Hz whereas the analog counterpart has a resonance frequency
of 200 Hz, another manifestation of the frequency warping under bilinear transform
(Fig. 9.26a,b).
Impulse Invariance Method
This method depends on the equivalence of the impulse response of a continuous-
time system and the impulse response of the corresponding discrete-time system,
that is,
Fig. 9.26 (a) The continuous-time frequency response for the circuit in Fig. 9.25a. (b) The
frequency response of the corresponding discrete-time system obtained through bilinear transform
(Fig. 9.25b)
then sample ha (t) at intervals nTs to form a sequence and take the z–transform of
the resulting sequence (9.49):
" #
Hd (z) = Z L−1 [Ha (s)] .
t=nTs
9.9 Conversions Between Laplace Transform and z–Transform 569
Fig. 9.27 Example 9.31. (a) LabVIEW implementation. (b) The frequency response for −π/12
ω π/12
Let us illustrate the impulse invariance method with a natural example from
nuclear physics. A radioactive element undergoes disintegration into lighter chem-
ical elements at a rate proportional to the mass at the moment. Since the mass
decreases by this process, the decay rate is negative and expressed by
dm (t)
= −λm (t) , (9.50)
dt
570 9 z-Transform
Fig. 9.28 Radioactive decay is a natural disintegration process by which a radionuclide decom-
poses into simpler elements. Half-life is the time that elapses for the mass of a radionuclide to
halve in amount. Sampling the decay every half-life yields a discrete-time equivalent of the decay.
We note that the discrete-time impulse response does not vary from the continuous-time response,
hence impulse invariance method can be employed to obtain the discrete system response in z-
domain
m (0) = m0 ,
Figure 9.28 depicts the decay as described by (9.50) which represents a zero-
input, first-order system whose solution is of the form m (0) ha (t). ha (t) is the
impulse response of the natural system. Half-life, denoted by T1/2 , is used to
characterize the decay rate of radionuclides. By definition, half-life is the time that
elapses for half of the radionuclide to decompose into other elements, in other words
m t + T1/2 = 0.5m (t) .
Hence
4s + 22
Ha (s) = .
s 2 + 14s + 40
1 3
Ha (s) = + .
s + 4 s + 10
1 3
Hd (z) = +
1 − e−4Ts z−1 1 − e−10Ts z−1
z 3z
= +
z − e−4Ts z − e−10Ts
572 9 z-Transform
z 4z − 3e−4Ts − e−10Ts
= 2 −4T
z − e s + e−10Ts z + e−14Ts
ROC : z > e−4Ts .
Parts of this topic had already been studied in Sect. 6.9. Discrete-time systems
modify the characteristics of signals applied at their inputs just as continuous-time
systems shape the signals that pass through them. It is easier to study the effects
of systems on signals in the frequency domain. We are especially motivated by
two things. First is the need to filter undesired aspects of discrete signals; the
second is the ability to display the frequency spectra of signals. Extracting the
spectra of continuous-time signals can only be done by sophisticated and costly
electronic hardware in real-time. Fourier transform of discrete signals however is
computational, which can be done on computers in real-time or nonreal-time.
The continuous-time concepts developed for frequency domain analysis and
synthesis can be easily carried over to the discrete-time. Unlike the continuous-
time case, the frequencies of the discrete-time extend over a range of 2π radians.
Moreover discrete-time spectra possess a period of 2π radians. Below is a brief
recapitulation of the discrete-time Fourier transform.
Considering the z–transform of a signal x [n]
∞
X (z) = x[n]z−n (9.52)
n=−∞
∞
X ej ω = x [n] e−j ωn (−π ≤ ω < π) . (9.53)
n=−∞
This
is the Fourier transform of an infinitely long discrete sequence. As noted earlier,
X ej ω is periodic in ω with a period of 2π . The magnitude and phase graphs may
be plotted versus −π ω π or 0 ω 2π .
Example 9.32 An IIR filter is specified by the transfer function
z
H (z) = .
z + 0.9
z 1
H (z) = =
z + 0.9 1 + 0.9z−1
1
H ej ω = .
1 + 0.9e−j ω
The magnitude and phase response from H ej ω are given by
1 1
H ej ω = =√
1 + 0.9e−j ω 1.81 + 1.8 cos ω
arg H ej ω = − arg (1 + 0.9 cos ω − j 0.9 sin ω)
−1 −0.9 sin ω
= − tan .
1 + 0.9 cos ω
Magnitude and phase spectrum of H ej ω are depicted in Fig. 9.29.
In Eq. (9.53) x [n] has infinitely many samples,
and
performing this infinite sum
is not practical. To make the computation of X ej ω easier, we can truncate x [n]
to a sufficiently large number of samples, say N many samples. Doing this, we
effectively render the signal periodic with period N. Then Eq. (9.53) becomes
N −1
X ej ω = x [n] e−j ωn 0 ≤ ω < 2π.
n=0
However, ω is still a continuum of frequencies in the interval [0, 2π ]. Rather than
evaluating X ej ω for a continuum of frequencies from 0 to 2π , we can sample
X ej ω at N discrete frequencies in the range [0, 2π ]. We divide the frequency
574 9 z-Transform
Fig. 9.29 Magnitude and phase spectrum of the transfer function in Example 9.32
N −1
2π kn
X [k] = X ej ωk = x [n] exp −j , (0 ≤ k ≤ N − 1) . (9.54)
N
n=0
Magnitude of H ej ω is found by dividing the product of magnitudes of vectors
drawn to zeros by the product of magnitudes of vectors drawn to poles. The
argument of H ej ω is the sum of arguments of vectors drawn to zeros minus the
sum of arguments of vectors drawn to poles. As such, H ej ω manifests peaking
near the poles, the spikiness of peaking depending on how close the pole is to the
unit circle. In contrast, the magnitude is close to zero for frequencies close to a
system zero. If there is a zero on the unit circle, the magnitude becomes zero at that
frequency. Similarly, we can anticipate abrupt changes in the argument of H ej ω
near poles and zeros. Assume that H (z) is the system function of an LTI system,
and the ROC includes the unit circle. Let H have m zeros and n poles. Then H (s)
can be expressed as a rational function (4.17) in the form
1
m
(z − zi )
i=1
H (z) = A ·
1n
(z − pi )
i=1
1
m
jω
e − zi
i=1
H ej ω = A · .
1
n
e j ω − pi
i=1
1
m
e j ω − zi
i=1
H ej ω = |A| · ,
1
n
ej ω − pi
i=1
m n
arg H ej ω = arg (A) + arg ej ω − zi − arg ej ω − pi .
i=1 i=1
x [n] + 2x [n − 1] + x [n − 2]
y [n] = .
4
jω Y ej ω
Find and plot the frequency response H e = jω .
X e
Taking z-transforms of both sides we have
1
Y (z) = 1 + 2z−1 + z−2 X (z) .
4
Hence the transfer function H (z) becomes
1 + 2z−1 + z−2 1 z2 + 2z + 1
H (z) = = ·
4 4 z2
1 (z + 1)2 1 [z − (−1)]2
= · = · . (9.55)
4 z2 4 z2
1 ej ω + 12
1 ej ω/2 ej ω/2 + e−j ω/2
2
H e jω
= · 2 = · 2
4 ej ω 4 ej ω
2
1 2ej ω/2 cos ω2
H e jω
= · 2
,
4 ej ω
ω
arg H ej ω = 2 arg ej ω/2 cos − 2 arg ej ω
2
9.10 Fourier Transform of Discrete-Time Signals 577
ω
=2 − 2ω.
2
Thus
ω
H ej ω = cos2
2
arg H ej ω = −ω.
At ω = 0 H ej ω = 1 and at the zero H ej ω = 0 as expected.
The same result would have been obtained
by brute force without using a pole–
zero diagram. The frequency response H ej ω can be written as
1 + 2e−j ω + e−j 2ω
H ej ω = .
4
Fig. 9.32 Example 9.33. Frequency response from pole–zero vectors. (a) LabVIEW implementa-
tion. (b) The phase response for −π ω π
ω 1 + cos ω
Note that cos2 = . The frequency response is graphed in
2 2
Fig. 9.32a,b.
Example 9.34 Let H (z) be given by
z
H (z) = ,
(z − p1 ) z − p1 (z − p2 ) z − p2∗
∗
and
π
2π
p1 = 0.95 exp j , p2 = 0.8 exp j .
4 3
π
p1 = 0.95 exp j = 0.672 + j 0.672
4
π
p1∗ = 0.95 exp −j = 0.672 − j 0.672
4
2π
p2 = 0.8 exp j = −0.4 + j 0.693
3
2π
p2∗ = 0.8 exp −j = −0.4 − j 0.693.
3
H (z)
z
=
(z − p1 ) z − p1∗ (z − p2 ) z − p2∗
z
=
(z − 0.672 − j 0.672) (z − 0.672 + j 0.672) (z + 0.4 − j 0.693) (z + 0.4 + j 0.693)
z
= 4 .
z + 2.144z + 2.617z2 + 1.582z + 0.578
3
and
1
H ej ω = ,
ej 4ω + 2.144 · ej 3ω + 2.617 · ej 2ω + 1.582 · ej ω + 0.578
arg H ej ω = − arg ej 4ω + 2.144 · ej 3ω + 2.617 · ej 2ω + 1.582 · ej ω + 0.578
which is good for computer evaluation but any insight into the system behavior.
The magnitude and phase graphs are plotted in Fig. 9.34. Using the pole–zero
representation we have
H ej ω
1
=
ej ω + 0.4 − j 0.693 ej ω + 0.4 + j 0.693 ej ω − 0.672 − j 0.672 ej ω − 0.672 + j 0.672
arg H ej ω
Fig. 9.33 Frequency response using pole–zero vectors. (a) Pole–zero locations. (b) LabVIEW
implementation
From H (z) or H ej ω alone it is difficult to predict the behavior of the frequency
response. However, without sketching the magnitude and phase characteristics, just
looking at the pole–zero locations in Fig. 9.33, we can immediately see the impact
of the pole–zero locations on the magnitude and phase characteristics.
The closer
a pole is to the unit circle, the greater its influence is to H ej ω in the vicinity of
the pole, and we can expect a drastic phase change accompanying the magnitude
peaking. In Fig. 9.34, the red trace is for r1 = 0.95 and r2 = 0.80. The blue trace
shows the case when r1 = 0.80 and r2 = 0.95. Note the location where the peaks
occur. The zeros have the opposite effect of the poles: they attract the magnitude
response toward zero. Since the zero for this example sits at the origin, its effect is
minimum.
Fig. 9.34 Example 9.34. Frequency response using pole–zero vectors. (a) Magnitude. (b) Phase.
Red trace: r1 = 0.95, r2 = 0.8. Blue trace: r1 = 0.8, r2 = 0.95
invariant systems and analyze and produce solutions for LTI systems. LabVIEW
has a good capacity to carry out arithmetic on complex numbers z = rej θ ; however
it is not so wise to let r and θ vary over a range and compute the equation in the
region defined by r and θ , then obtain two two-dimensional functions for real and
imaginary parts of that equation. This is tedious; we rather recommend the use
of inverse z-transform to obtain the discrete-time representation. Here we will use
LabVIEW to illustrate the z-transform application with an example.
1
H (z) = π
1 − 2 cos z−1 + z−2
18
z2
= π .
z2 − 2 cos z+1
18
π
The system has two zeros at z = 0 and poles at p1 = exp j and p2 =
π
18
exp −j . The pole-zero diagram is shown in Fig. 9.35b. Since the system
18
π/18 fs
possesses poles on the unit circle, it oscillates with a frequency of · fs = .
2π 36
Providing nonzero initial conditions at y [−2] and/or y [−1] causes the system
to oscillate even without x [n]. The LabVIEW implementation in the figure sets
y [−2] = y [−1] = 1. The output of the oscillator is shown in Fig. 9.35d. Note how
we implement z−1 operators and feed the initial conditions y [−2] = y [−1] = 1 to
LabVIEW.
Fig. 9.35 Digital oscillator implemented in LabVIEW. The frequency of the oscillator is 1/36.
Note that π/18 radians is equal to 10◦ . (a) Signal-flow graph, (b) Pole-zero diagram, (c) LabVIEW
block diagram, (d) The output sequence with zero-input. It suffices to specify non-zero initial
conditions to make the system oscillate.
9.11 Applications of the z-Transform 583
Fig. 9.36 3-Tap FIR filter on LabVIEW. (a) Filter block diagram, (b) LabVIEW implementation
using unit-delay loop, (c) Response to x [n] = 0.98n cos π25n
Our second example is a 3-tap Finite Impulse Response (FIR) filter given by the
difference equation:
The block diagram of this filter, its LabVIEW implementation and its response to
πn
x [n] = 0.98n cos is shown in Fig. 9.36.
25
Derivative in Discrete-Time
Another example is an FM demodulator built with a delay line as shown in Fig. 9.18
on page 553 and in Problem 33. The transmission line in the figure differentiates
an analog signal using backward difference. An FM signal with a sinusoidal carrier
can be demodulated by differentiation. Let x (t) be the baseband signal modulating
the carrier wave, and y (t) denote the FM signal. y (t) can then be expressed as
ˆ t
y (t) = A sin ωc t + k x (τ ) dτ . (9.56)
ˆ t
dy (t)
= A [ωc + kx (t)] cos ωc t + k x (τ ) dτ
dt
ˆ t
k x (t)
= Aωc 1 + cos ωc t + k x (τ ) dτ .
ωc
dy (t)
We immediately recognize that has an envelope just like an AM wave with
dt
dy (t)
carrier. can be readily detected by a simple envelope detector made with a
dt
diode and an RC lowpass filter. The delay line that produces y (t − t) should be
short enough not to produce a large t so as not to cause approximation problems
associated with the backward difference. See Problem 33.
y [n] = y [n − 1] + y [n − 2] (9.57)
If the input is a unit impulse function, then the output is the impulse response by
definition, i.e.,
x [n] = δ [n]
y [n] = h [n] .
Also we assume initial rest for this LTI system by imposing y [−1] = y [−2] = 0.
Then we can readily obtain the impulse response sequence from Eq. (9.58)
h [n] = δ [n] + h [n − 1] + h [n − 2] .
9.11 Applications of the z-Transform 585
The first numbers of h [n] sequence are clearly seen to belong to the Fibonacci
sequence
h [n] = {1, 1, 2, 3, 5, . . .}
which produces exactly the same sequence as (9.57). Thus we reason that, if we
know the z-transform H (z), we can find the Fibonacci sequence from the inverse
z-transform of H (z). That is to say h [n] = Z −1 [H (z)]. Hence we proceed to find
the z-transform of the Fibonacci system by taking the z-transform of both sides of
Eq. (9.58). First we rewrite (9.58) as
y [n] − y [n − 1] − y [n − 2] =x [n]
Z {y [n] − y [n − 1] − y [n − 2]} =Z {x [n]}
Y (z) 1 − z−1 − z−2 =X (z) .
Hence we get
Y (z)
H (z) =
X (z)
1
H (z) = .
1 − z−1 − z−2
As shown in Fig. 9.37b, the system has two zeros at z = 0, and two poles given as
√ √
1+ 5 1− 5
p1 = , p2 = .
2 2
Fig. 9.37 (a) The first ten Fibonacci numbers calculated using formula
√
(9.59). (b)√The Fibonacci
system has a double zero at z = 0, and two poles at p1 = 1+2 5 and p2 = 1−2 5 . The region
of convergence is exterior to p1 . Therefore the Fibonacci sequence is unstable and has no Fourier
transform
586 9 z-Transform
z2 z+1 z+1
H (z) = =1+ 2 =1+
z −z−1
2 z −z−1 (z − p1 ) (z − p2 )
z+1
=1+ √ √ .
z− 1+ 5
2 z − 1− 5
2
A B
H (z) = 1 + √ + √ .
1+ 5 1− 5
z− z−
2 2
A and B are found to be
√ √
A = 0.5 + 0.3 5, B = 0.5 − 0.3 5.
Thus we get
√ √
0.5 + 0.3 5 0.5 − 0.3 5
H (z) = 1 + √ + √
1+ 5 1− 5
z− z−
2 2
√ z −1 √ z−1
= 1 + 0.5 + 0.3 5 √ + 0.5 − 0.3 5 √ .
1 + 5 −1 1 − 5 −1
1− z 1− z
2 2
Finally we obtain the impulse response sequence of the Fibonacci system as
⎛ ⎞
√ ⎜ z−1 ⎟
h [n] = Z −1 (1) + 0.5 + 0.3 5 Z −1 ⎜
⎝ √ ⎟
1 + 5 −1 ⎠
1− z
2
⎛ ⎞
√ ⎜ z−1 ⎟
+ 0.5 − 0.3 5 Z −1 ⎜
⎝ √ ⎟
1 − 5 −1 ⎠
1− z
2
9.12 Discrete Signal Processing vs Digital Technologies: A Historical Retrospect 587
√ √ n−1
= δ [n] + 0.5 + 0.3 5 0.5 1 + 5 u [n − 1]
√ √ n−1
+ 0.5 − 0.3 5 0.5 1 − 5 u [n − 1] .
⎧
⎪
⎪
⎨0,
n<0
√ n−1 √ n−1
h [n] =
⎪ √ 1+ 5 √ 1− 5
⎪
⎩δ [n] + 0.5 + 0.3 5 + 0.5 − 0.3 5 , n ≥ 0.
2 2
(9.59)
We note that the Fibonacci system is unstable because one of its poles is outside the
unit circle. Also because its region of convergence does not include the unit circle,
the Fibonacci sequence does not possess a Fourier transform (Fig. 9.37).
The formula (9.59) that we derived for the Fibonacci sequence could have been
derived by using the unilateral z-transform and the initial conditions y [−1] =
1, y [−2] = 0 (see Problem 21).
Electronics engineering was born digital when the telegraph was invented. The
first radio communication at the beginning of the twentieth century was digital.
Guglielmo Marconi4 made a radio transmitter using a high-voltage Ruhmkorff
coil which generated long arcs of electric discharge between two brass balls. His
radio transmitters used Morse alphabet5 to send messages. In contrast to the Morse
alphabet transmission, which is digital, Alexander Graham Bell’s6 invention, the
telephone, was definitely analog. It could carry the voice signals over a pair of
wires. Later on, Lee De Forest’s7 invention of the vacuum triode tube (audion)
made it possible to receive and amplify weak signals. Triode tube and the telephone
triggered more developments that ushered in radio communication. For long years
4 25 April 1874 – 20 July 1937 An Italian electrical engineer, inventor, and entrepreneur. He
invented the radio and achieved radio transmission across the Atlantic. He was awarded the 1909
Nobel Prize in Physics.
5 “Morse code is a method of transmitting text information as a series of on-off tones, lights,
or clicks that can be directly understood by a skilled listener or observer without special
equipment.”—Wikipedia.
6 “March 3, 1847 – August 2, 1922. A Scottish-born scientist, inventor, engineer, and innovator
to come, electronics meant radio engineering and radio communication was analog.
Digital lay dormant in the lap of Morse telegraphy.
With electronics being analog, signal processing was analog too. Laplace trans-
form, Fourier series, and Fourier transform which were developed in the nineteenth
century were mature and well understood. The physics which was needed to make
new devices or to design systems was also on the side of the “analog designer”. For
decades, circuit theory, control theory, wave generation and shaping; filter theory,
modulation, and demodulation have walked hand in hand in peace with analog
without ever uttering the word “digital”. Boole’s8 algebra had been around for quite
a while, but who cares Boolean algebra? Even the mechanical calculators and the
first programmed electronic computer ENIAC, which came in 1946, were decimal,
not binary.
The late arrival of digital signal processing—discrete signal processing to be
more accurate—may be attributed to the unavailability of appropriate technology,
the formidable cost of the existing technology and the scarcity of skilled people to
work in the field. ENIAC was designed to work with “17,468 vacuum tubes, 7200
crystal diodes, 1500 relays, 70,000 resistors, 10,000 capacitors and 5,000,000 hand-
soldered joints9 .” It had no memory and consumed 150 kW of power and exceeded
30 tons of weight. Its 2016-equivalent cost is $6,816,000. Discrete signal processing
as we know it today demands high-resolution ADC’s and DAC’s; high sampling
rates and high-speed digital signal processors built around special architecture.
Discrete signal processing was not in curricula of most universities in 1960s; it
was taught in graduate courses of elite universities. Even after then discrete signal
processing was run on mainframe computers, then minicomputers which were not
accessible to an average engineer.
The digital age has started with the advent of digital integrated circuits in
the late 1960s and early 1970s. As predicted by Moore’s Law,10 the number of
on-chip transistors has doubled every 18 months or so. At the beginning, small-
scale integration (SSI) devices, then medium-scale integration (MSI), then large
scale integration (LSI) and finally very large scale integration (VLSI) devices have
become available in the arsenal of engineers. At first, the main application domain
of these devices was purely digital, leaving analog applications to analog devices.
Prospect of the analog realm was sound and healthy. Quality op amps and analog
function blocks have been introduced with rising performance/price ratios. The
progress in analog and RF devices has paved the way to UHF applications and
beyond. However, the two main domains of electronics have been unable to merge
because the technology was still not mature or not cheap enough.
8 “George Boole (2 November 1815 – 8 December 1864) was an English mathematician, educator,
philosopher, and logician. He worked in the fields of differential equations and algebraic logic
and is best known as the author of The Laws of Thought (1854) which contains Boolean algebra.
Boolean logic is credited with laying the foundations for the information age.”—Wikipedia.
9 https://en.wikipedia.org/wiki/ENIAC.
10 Statement by Gordon E. Moore that the number of transistors on an integrated circuit doubles
almost every two years. Moore was one of the founders of Intel Corporation.
9.12 Discrete Signal Processing vs Digital Technologies: A Historical Retrospect 589
Birth of the microprocessors in the late 1970s has started another revolution
in electronics, namely the programmed logic. There was a boom in all areas of
digital electronics: microprocessors increased their performance with wider buses,
faster clocks; memory devices flourished with ever-increasing storage sizes and
faster access times; ADC’s and DAC’s followed the trend in bit resolution and
conversion time. The good thing was that the cost of these devices did not increase
as their performance improved. The big breakthrough happened in 1979 when
Apple introduced the first personal computer designed with an 8-bit microprocessor.
Myriad of small game computers flooded the markets in 1980s until IBM introduced
the IBM-PC and published its technical workings. These developments encouraged
discrete signal processing on PCs albeit nonreal-time. By this time the DSP had
already been gaining momentum in popularity. In 1965, Cooley and Tukey [22, 23]
invented FFT (the Fast Fourier Transform). FFT was included in the “Top 10
Algorithms of 20th Century”[24] by the IEEE journal of Computing in Science
& Engineering. FFT brought the Fourier transform from analog domain to digital
domain. 1990s saw the rapid development of DSP processors which gradually
invaded analog applications zone opening the door to mixed-signal devices. The
main difference between a general purpose microprocessor and a DSP processor is
that the DSP processor multiplies and adds in hardware in a single clock cycle. This
is needed to comply with the Nyquist sampling theorem which imposes that the
processor finish its job until the next sample arrives. For real-time applications, this
is a must. Companies such as Analog Devices and Texas Instruments pioneered
in DSP chips which implemented floating-point processors. Today we are even
one more step ahead with ubiquitous FPGA devices and development systems.
Although DSP processors were a breakthrough, they still ran program-coded
algorithms. FPGA’s on the other hand run wire-coded algorithms in real-time; they
are uncommitted digital hardware that can be wired to perform multiplication,
addition, FFT, etc.
Further Reading
Problems
2. Let the ROC for X (z) be r1 < |z| < r2 . Expressing X (z) as
1
m
(z − zi )
a i=0
X (z) = · n
b 1
(z − pi )
i=0
show that the ROC for X z−1 is
3z + 1
X [z] =
(z − 0.5)2
has the unit impulse response x[n] = −2 · 0.5n−1 u [n − 1] + 10n · 0.5n u [n].
(a) Derive the difference equation for this system,
(b) Implement the system in LabVIEW as shown below.
9.12 Discrete Signal Processing vs Digital Technologies: A Historical Retrospect 591
Problem 4
(a − 1) z + a
X (z) = .
(z − a)2
7. Let x [n] represent the sequence of data acquired from a process. The run-
ning average of length three is defined by the difference equation y [n] =
{x [n] + x [n − 1] + x [n − 2]} /3.
(a) Obtain the z-transform Y (z),
(b) Find and plot the frequency response H ej ω = Y ej ω /X ej ω .
1 − cos ω 0 z−1
8. The z-transform of x [n] = cos ω 0 n u [n] is X (z) = .
1 − 2 cos ω 0 z−1 + z−2
Find the z-transform of x [n] = cos (ω 0 n − θ ) u [n] for θ = kω0 , k >
0 an integer.
592 9 z-Transform
z2
, |z| > 3
(z − 2) (z − 3)
1 + z−1
H (z) = .
1 − 0.5z−1
1
X (z) = .
1 + z−1 + z−2
m [n] = 0.5m [n − 1] .
Carbon-14 which is used for carbon dating has a half-life of 5,730 years.
Suppose a living being contains 64 kg of carbon-14. Find how much carbon-14
will be left 57300 years after the living organism dies?
9.12 Discrete Signal Processing vs Digital Technologies: A Historical Retrospect 593
17. Show that Euler transform defined by s = 1 − z−1 /Ts maps the j ω axis
(σ = 0) in the s-plane to circle |z − 0.5| = 0.5 in the z-plane.
Hint: Let z (ω) = u (ω) + j v (ω) = r (ω) ej θ(ω) .
(a) Find the two extreme points z (0) and z (∞).
(b) Show that the parametric curve [u (ω) , v (ω)] is symmetric with respect to
u axis, i.e., Re(z).
(c) Show that this curve is either an ellipse or a circle.
(d) Consider the end points you have found in step (a). Show that the vectors
z (ω) − z (0) and z (ω) − z (∞) are perpendicular and that hence the curve
is a circle. Find the center of the circle and write the equation of the circle
in z-plane whose center is known.
18. In a certain natural habitat called Serpentia live snakes and rats. The snakes
live on rats and control the rat population. The snakes increase in proportion to
the rat population. On the other hand, the rat population is negatively affected
by the snakes and decreases proportionally with the snake population. A linear
mathematical model for this natural population control can be described by two
coupled differential equations.
ds (t)
= kr r (t)
dt
dr (t)
= −ks s (t) .
dt
Assume that there are 1000 rats and 20 snakes at time t = 0, and the snake
population grows by 0.1% per year per rat, and the rat population decreases by
30% per year per snake. Find the number of snakes and rats after 20 years.
(a) Convert the continuous-time system model to discrete-time.
(b) Determine the size of the rat and snake populations after twenty years.
19. The difference equation used by the square root algorithm can be derived in the
following fashion. The recursion produces a sequence xn which is assumed to
converge to the square root, that is,
√
lim xn = A.
n→∞
594 9 z-Transform
lim x 2 =A
n→∞ n
lim 2xn2 − xn2 = A.
n→∞
We can replace the limit with equality to arrive at the iteration formula in the
form of a difference equation.
20. It is not possible to find a z– transform for all sequences. For example, if
1
X (z) = Z {x [n]} we do not know the z– transform of . The best we
x [n]
can do is to try to obtain the transform indirectly as is the case with the square
1
root algorithm. The z– transform of is given by
x [n]
∞
1 z−n
Z =
xn xn
n=0
for which we have no tools to find a solution using the techniques developed in
this chapter. However in Sect. 9.8 we have seen that the square root algorithm
generates the sequence
1 A
xn = xn−1 + with initial condition x0 = G.
2 xn−1
21. Derive the Fibonacci formula (9.59) using the one-sided z-transform and the
initial conditions y [−1] = 1, y [−2] = 0.
1 Ts
22. Consider Example. Let Ts = denote the sampling period, and k = .
fs 2RC
Approximating the derivative by the bilinear transform
d 1 − z−1
↔ 2fs ·
dt 1 + z−1
k 1 + z−1
Y (z) = · · X (z) .
k+1 k − 1 −1
1+ ·z
k+1
3z + 1
X (z) = (|z| > 0.5) .
(z − 0.5)2
1
H (s) = .
s+1
Problem 33
x [n] + x [n − 1] + x [n − 2]
y [n] = .
3
x [n] = x [n − 1] + x [n − 2]
Problem 34
1
Ha (s) = .
(s + 1) s 2 + s + 1
Assuming a sampling rate of 1000 Hz, obtain a discrete-time filter from this
analog filter using
(a) Impulse invariance,
(b) Bilinear transform.
33. Simulation project. Euler approximation (the backward difference) can be put
to good use to demodulate an FM signal. In the following LTSpice simulation,
the FM modulator has a carrier frequency of 1 MHz when FM input is at
0.5 V. When input is varied from 0 to 1 V, the modulator output is swept from
900 kHz to 1100 kHz. The input is a 1 kHz sine wave with 0.5 V amplitude and
0.5 V offset. A 50 ohm transmission line with a 100 ns delay and a difference
598 9 z-Transform
amplifier comprises the derivative approximator. The diode and the RC lowpass
filter extract the envelope from the AM modulated FM signal.
(a) Obtain an analytic expression for DRV node voltage.
(b) Build the circuit on an LTSpice simulator.
(c) Study the effect of transmission delay time Td on demodulation, and verify
through simulation.
(d) Study the effects of mark-space frequencies on demodulation, and verify
through simulation.
(e) Knowing that backward differentiator has severe limitations as regards the
frequency, try to determine where limitations start for this FM demodulator.
34. LabVIEW project. A 3rd-order FIR filter is shown in the following figure.
Referring to pertinent LabVIEW documentation (if and when needed)
(a) Explain the operation of the blocks labeled z−1 .
(b) Explain the operation of the whole vi.
(c) Figure out a more compact and comprehensible vi which does the same
job.
(d) Write the difference equation which relates x and y.
35. MATLAB project. An analog lowpass filter has a transfer function
106
H (s) =
s 3 + 200s 2 + 200, 000s + 106
N −1
(2n + 1) kπ
X [k] = α [k] x [n] cos , 0 ≤ k ≤ N − 1, (10.1)
2N
n=0
where
⎧
⎪
⎪ 1
⎨ k=0
α [k] = N
⎪
⎪ 2
⎩ 1 ≤ k ≤ N − 1.
N
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2022 599
O. Özhan, Basic Transforms for Electrical Engineering,
https://doi.org/10.1007/978-3-030-98846-3_10
600 10 Discrete Cosine Transform
These relations are also expressed in matrix form in the literature. The forward
transform looks like:
⎡ ⎤
X [0]
⎢ ⎥
⎢ ⎥
⎢ X [1] ⎥
⎢ ⎥=
⎢ ··· ⎥
⎣ ⎦
X [N − 1]
⎡ ⎤
1 1 ··· 1
⎢ √ π ⎥
⎢ √ 3π √ (2N + 1) π ⎥
⎢
1 ⎢ 2 cos 2 cos ··· 2 cos ⎥
2N 2N 2N ⎥
√ ⎢ ⎥
N ⎢
⎢ · · · · · · ··· ··· ⎥
⎣√ ⎥
(N − 1) π √ 3 (N − 1) π √ (2N + 1) (N − 1) π ⎦
2 cos 2 cos · · · 2 cos
2N 2N 2N
⎡ ⎤
x [0]
⎢ ⎥
⎢ x [1] ⎥
⎢ ⎥
×⎢ ⎥ (10.2)
⎢ ··· ⎥
⎣ ⎦
x [N − 1]
Matrix relations are another way of looking at the DCT transform. In matrix notation
(10.1) looks like
X = Ax.
x = A−1 X.
The trick to obtain real DCT coefficients from complex DFT coefficients is very
simple indeed. If we add a complex number to its conjugate, we end up with a real
number. Thanks to the symmetry of the DFT coefficients, this addition is possible.
It is only necessary to shuffle the temporal (spatial) data wisely to produce DFT
coefficients with zero imaginary parts. To see how this comes about, consider a
series
x [n] = {x0 , x1 , . . . , xN −1 } ,
N −1 N −1
2π kn
X [k] = xn WNkn = xn exp −j ,
N
n=0 n=0
where WNkn is the twiddle notation that we introduced in Chap. 8. The sum of the
second and last terms of the series is
2π 2π (N − 1)
x1 exp −j + xN −1 exp −j = x1 WN1 + xN −1 WNN −1
N N
In general, if xN −n = xn then
2π n
xn WNn + xN −n WNN −n = 2xn cos .
N
602 10 Discrete Cosine Transform
Fig. 10.1 Arranging the discrete sequence so that the DFT produces real coefficients. (a) A zero
is inserted at the beginning of the original sequence (at n = 0); the sequence is reversed and
appended to the sequence; (b) To obtain a sequence of even length, zeros are inserted between the
sequence samples. The Discrete Cosine Transform (DCT) is derived from the DFT of the resulting
composite sequence
The generated series has 2N + 1 elements. Surely, the second and the last
elements of x̂ [n] are now equal to x0 as well as :
x2N +1−m = :
xm = xm−1 . The
2N + 1 -point DFT of x̂ [n] will be real
2N 2N 2N
: [k] =
+1 = x̂0 + +1 = 0 +
kn kn kn
X x̂n W2N x̂n W2N xn−1 W2N +1
n=0 n=1 n=1
N
2π kn
=2 xn−1 cos . (10.4)
2N + 1
n=1
Although Eq. (10.4) sheds some light to one of our motivations, which is the
realness of DCT, unfortunately we cannot use it to achieve the other goal, which
is to set up a link between the DCT and DFT. This is because the length of the
10.1 From DFT to DCT 603
augmented sequence is odd which prevents us from buildingtwo DFT’s from x̂ [n].
For the sake of clarity let us take a small sequence x [n] = x0, x1 , x2 , x3 and flip
it over and call it x1 [n]; append it to x [n], call the resulting sequence x̂ [n]
x1 [n] = {x3 , x2 , x1 , x0 } ,
x2 [n] = x0, x1 , x2 , x3 , x3 , x2 , x1 , x0 .
Note that the length of x̂ [n] is 16, four times the length of x [n], and x̂ [16 − n] =
x̂ [n]. x̂ [n] can be expressed as the sum of two upsampled versions of x1 [n] and
x2 [n]
⎧ ⎫
⎨ ⎬
x̂ [n] = 0, x0 , 0, x1 , 0, x2 , 0, x3 , 0, 0, 0, 0, 0, 0, 0, 0
⎩ ? @A B⎭
8zeros
⎧ ⎫
⎨ ⎬
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, x3 , 0, x2 , 0, x1 , 0, x0
⎩? @A B ⎭
8zeros
The second term of the sum is the first term reversed in time and shifted to right
by 16 samples, which is 4N. Hence
Thus we arrive at a sequence of length 4N, whose even elements are zero, and
which is characterized by
x̂ [2n] = 0
x̂ [2n + 1] = xn
x̂ [4N − 1 − n] = xn ,
604 10 Discrete Cosine Transform
where 0 ≤ n ≤ 2N − 1. Now x̂ [n] has a 16-point DFT, that is, a 4N-point DFT.
Taking the DFT of x̂ [n], and using the conjugate symmetry and time-shift properties
of the Fourier transform we get
This result establishes the link between the original sequence x [n] and DCT; it is
the direct way of producing a DCT. x̂ [n] is shown in Fig. 10.2b. The DCT comprises
the N elements at the beginning of X : [k], because x [n] is upsampled by a factor of
4 to generate : x [n], and upsampling scales down all the frequencies in x [n] by a
factor of 4. By taking the first N coefficients of X̂ [k], we restore the frequencies in
DCT to their normal values.
In Fig. 10.2 the foregoing operations are illustrated using a sequence which
contains 8 elements. In (c) we see 8 zeros are appended to the original signal x [n],
and we call this signal y1 [n]. In (d) x [n] is reversed and 8 zeros are prepended to it.
We call this signal y2 [n]. In (e) y2 [n] is added to y1 [n], and the resulting sequence
is interleaved with zeros. This is nothing but upsampling by 2. In (f) the real and
imaginary parts of a 32-point DFT of the resulting signal is shown. Note that all the
coefficients are real. The DCT in (h) comprises the rescaled first eight samples of
the DFT, that is X : [k]. Figure 10.3 illustrates the implementation of these steps in
LabVIEW.
In computing X : [k] we use
4N −1
: [k] = DFT (: 2π nk
X x [n]) = :
x [n] exp −j k = 0, . . . , 4N − 1. (10.5)
4N
n=0
2N −1
2π (2n + 1) k
X̂ [k] = :
x [2n + 1] exp −j
4N
n=0
2N −1
(2n + 1) kπ
= x [n] exp −j .
2N
n=0
10.1 From DFT to DCT 605
Fig. 10.2 Discrete Cosine Transform (DCT) is a special form of DFT. (a), (b) The original
sequence x [n] with 8 elements, (c) x [n] is appended with 8 zeros, (d) x [n] is reversed and
prepended with 8 zeros, (e) y1 [n] is added to y2 [n] and interleaved with 16 zeros. (f), (g) The real
and imaginary parts of the DFT of the composite sequence. The DFT coefficients are symmetric
and real. (h) DCT coefficients are the subset of the DFT coefficients from index 0 to 7 (the
coefficients inside the red rectangle)
606
Fig. 10.3 The LabVIEW vi which incorporates the steps leading to DCT coefficients in Fig. 10.2 from a DFT run on the SEQUENCE. Reversing the sequence,
padding with zeros, appending and interleaving with zeros can be readily recognized
10 Discrete Cosine Transform
10.1 From DFT to DCT 607
From these coefficients, we form the DCT by selecting the first N coefficients so
that
⎧N −1
⎪
⎪
⎪
⎪ x [n] k=0
⎨
X [k] = n=0
(10.6)
⎪ N −1
⎪ (2n + 1) kπ
⎪
⎪ k = 1, . . . , N − 1
⎩2 x [n] cos
2N
n=0
This result is a bit surprising and confusing in that the sum for k = 0 is taken as is,
while the sums for k = 0 are multiplied by 2, a situation which needs clarification.
We explain this with an example. Suppose that we have a sequence {x0 , x1 , x2 , x3 }.
The sequence before interleaving becomes x [n] = {x0 , x1 , x2 , x3 , x3 , x2 , x1 , x0 }.
Then x̂ [n] = {0, x0 , 0, x1 , 0, x2 , 0, x3 , 0, x3 , 0, x2 , 0, x1 , 0, x0 }. The DFT of this
interleaved sequence is given by
15
2π nk
X̂ [k] = DFT x̂ = x̂ [n] exp −j k = 0, . . . , 15
16
n=0
7
(2n + 1) kπ
= x̂ [2n + 1] exp −j
8
n=0
7
(2n + 1) kπ
= x [n] exp −j
8
n=0
7
(2n + 1) kπ
= xn exp −j .
8
n=0
X̂ [0] = 2 (x0 + x1 + x2 + x3 )
π π
3π 3π
X̂ [1] = 2 x0 cos + x1 cos − x2 cos − x3 cos
8 8 8 8
π π π π
X̂ [2] = 2 x0 cos − x1 cos − x2 cos + x3 cos
4 4 4 4
π π
3π 3π
X̂ [3] = 2 x0 cos − x1 cos + x2 cos − x3 cos
8 8 8 8
X̂ [4] = 0
π π
3π 3π
X̂ [5] = 2 −x0 cos + x1 cos − x2 cos + x3 cos
8 8 8 8
608 10 Discrete Cosine Transform
π π π π
X̂ [6] = 2 −x0 cos + x1 cos + x2 cos − x3 cos
4 4 4 4
π π
3π 3π
X̂ [7] = 2 −x0 cos − x1 cos + x2 cos + x3 cos
8 8 8 8
X̂ [8] = −2 (x0 + x1 + x2 + x3 )
π π
3π 3π
X̂ [9] = 2 −x0 cos − x1 cos + x2 cos + x3 cos
8 8 8 8
π π π π
X̂ [10] = 2 −x0 cos + x1 cos + x2 cos − x3 cos
4 4 4 4
3π π π 3π
X̂ [11] = 2 −x0 cos + x1 cos − x2 cos + x3 cos
8 8 8 8
X̂ [12] = 0
π π
3π 3π
X̂ [13] = 2 x0 cos − x1 cos + x2 cos − x3 cos
8 8 8 8
π π π π
X̂ [14] = 2 x0 cos − x1 cos − x2 cos + x3 cos
4 4 4 4
π π
3π 3π
X̂ [15] = 2 x0 cos + x1 cos − x2 cos − x3 cos .
8 8 8 8
These coefficients are plotted in Fig. 10.4 for {x0 , x1 , x2 , x3 } = {1, 2, 0, −1}.
The figure is a bilateral frequency display of the DFT. The coefficients x̂ [1] and
x̂ [15], x̂ [3] and x̂ [13], x̂ [5] and x̂ [11] and so on arise from the sequence and can
be combined because they are alias frequencies. But we note that x̂ [0] can not be
paired with x̂ [16] which is not in the DFT computation. Thus the retained terms
become
X̂ [0] = 2 (x0 + x1 + x2 + x3 )
π π
3π 3π
X̂ [1] = 4 x0 cos + x1 cos − x2 cos − x3 cos
8 8 8 8
π π π π
X̂ [2] = 4 x0 cos − x1 cos − x2 cos + x3 cos
4 4 4 4
π π
3π 3π
X̂ [3] = 4 x0 cos − x1 cos + x2 cos − x3 cos .
8 8 8 8
X [0] = x0 + x1 + x2 + x3
π π
3π 3π
X [1] = 2 x0 cos + x1 cos − x2 cos − x3 cos
8 8 8 8
10.1 From DFT to DCT 609
Fig. 10.4 DFT coefficients X̂ [k] for the sequence x̂ generated from x = [1, 2, 0, −2]. The
sampling frequency is 16, the Nyquist frequency is 8. Due to the alias property of the DFT, the
spectral lines 1 and 15, 2 and 14, etc. are the same. Notice that the 0-th line (the DC component)
has no match because the spectral line 16 is not included in the DFT computation
π π π π
X [2] = 2 x0 cos − x1 cos − x2 cos + x3 cos
4 4 4 4
3π π π 3π
X [3] = 2 x0 cos − x1 cos + x2 cos − x3 cos
8 8 8 8
The same reasoning is in effect in finding the Inverse DCT of X [k]. From the
DFT of x̂ [n] one can obtain x [n] using the inverse DFT:
x̂ [n] = IDFT X̂ [k]
by downsampling and taking half of the samples. The inverse DFT is given by
4N −1
1 2π nk
x̂ [n] = X̂ [k] exp j n = 0, . . . , 4N − 1. (10.7)
4N 4N
k=0
Except for the sign of the exponent, the resemblance between Eqs. 10.5 and 10.7
is obvious. X̂ [k] is also a real, symmetric sequence of length 4N. We can group
the symmetric terms to obtain cosine terms. It so turns out that the inverse DCT and
DCT are obtained using similar formulas.
610 10 Discrete Cosine Transform
⎧ N −1
⎪
⎪ 1
⎪
⎪ X [k] k=0
⎨N
x [n] = k=0
N −1 (10.8)
⎪
⎪ 2 (2k + 1) nπ
⎪
⎪ k = 1, . . . , N − 1.
⎩N X [k] cos
2N
k=0
Now we seek to further simplify the DCT computation. The results of the
foregoing DFT approach can be compacted as
N −1
(2n + 1) kπ
X [k] = α [k] x [n] cos , 0≤k ≤N −1
2N
n=0
in which we introduced α [k] factors that multiply the rows of the transform matrix
⎧
⎪
⎪ 1
⎨ k=0
α [k] = N
⎪
⎪ 2
⎩ 1 ≤ k ≤ N − 1.
N
X = Ax.
x = A−1 X.
With this choice of α [k] as in (10.8), it turns out that the inverse of A becomes
equal to the transpose of A
A−1 = AT .
Thus the inverse transform, which synthesizes the signal from its DCT coefficients,
becomes
x = AT X (10.9)
⎡ π ⎤
√ √ (N − 1) π
⎡ ⎤ ⎢1 2 cos ··· 2 cos ⎥
x [0] ⎢ 2N 2N ⎥
⎢ ⎥ ⎢ √ 3π √ 3 (N − 1) π ⎥
⎢ x [1] ⎥ 1 ⎢1 2 cos ··· 2 cos ⎥
⎢ ⎥= √ ⎢ 2N 2N ⎥
⎣ ··· ⎦ N⎢⎢· · ·
⎥
⎥
x [N − 1]
⎢
⎣ ··· ··· ··· ⎥
√ (2N + 1) π √ (2N + 1) (N − 1) π ⎦
1 2 cos · · · 2 cos
2N 2N
10.1 From DFT to DCT 611
⎡ ⎤
X [0]
⎢ ⎥
⎢ X [1] ⎥
×⎢ ⎥
⎣ ··· ⎦
X [N − 1]
N −1
(2n + 1) kπ
x [n] = α [k] X [k] cos , 0≤n≤N −1 (10.10)
2N
k=0
The rank of A is N , therefore the rows of A are independent; they constitute the
bases in vector space RN to which belong the sequences x [n]. The DCT coefficients
are the projections of x [n] on these base vectors. Figure 10.5 depict the base vectors
for N = 8. Likewise, the base vectors for IDCT are the rows of A−1 , i.e., the
columns of A. Equation 10.10 looks very much like the analysis equation (10.1),
and simplifies the inversion algorithm. With the exclusion of α [k] from the DFT
coefficients, we would not get A−1 = AT and we would have to compute A−1 ,
which is a job a lot more difficult than transposing the matrix.
612 10 Discrete Cosine Transform
Fig. 10.6 2D DCT obtained from 2D DFT. The image (a) is replicated, reversed, concatenated
and interleaved with zeros both row-wise and column-wise to obtain the 4N × 4N image (b). The
2D DFT performed on the augmented image produces 4N × 4N DFT coefficients. We retain the
first N × N coefficients in the red square for the DCT and discard the rest (c)
Fig. 10.7 A picture is a 2D signal whose elements are pixels (picture elements). The pixel x [m, n]
is located by its column and row coordinates. m and n designate the column and row, respectively
M−1 N −1
(2m + 1) uπ (2n + 1) vπ
X [u, v] = α (u) α (v) x [m, n] cos cos ,
2M 2N
m=0 n=0
0 ≤ u ≤ M − 1, 0 ≤ v ≤ N − 1
⎧
⎪
⎪ 1
⎨ , t = 0 (t = u or v)
α (t) = N (10.11)
⎪
⎪ 2
⎩ , 1 ≤ t ≤ N − 1.
N
horizontal direction, and N pixels in vertical direction has pixels denoted by x [m, n] in rectangular
coordinates. If we compare this to the familiar P [x, y] notation in geometry, [m, n] corresponds
to P [x, y]. In contrast, A [m, n] in matrix notation designates the element in m-th row and n-th
column, whereas in geometry it represents a point in m-th column and n-th row. An M × N image
as a matrix has M rows and N columns, but it has N rows and M columns in Cartesian coordinate
system. Where we use matrix operations, we resort to the matrix convention.
614 10 Discrete Cosine Transform
M−1 N −1
(2m + 1) uπ (2n + 1) vπ
X [u, v] = α (u) α (v) x [m, n] cos cos ,
2M 2N
m=0 n=0
0 ≤ u ≤ M − 1, 0 ≤ v ≤ N − 1
M−1
! N −1 (
(2n + 1) vπ (2m + 1) uπ
= α (u) α (v) x [m, n] cos cos
2N 2M
m=0 n=0
M−1
(2m + 1) uπ
= α (u) X [m, v] cos . (10.12)
2M
m=0
We recognize
N −1
(2n + 1) vπ
X [m, v] = α (v) x [m, n] cos
2N
n=0
as the 1D DCT transform performed on the N pixels of the m-th column. X [u, n]
is an M × N matrix, the units of whose horizontal and vertical coordinates are
frequency and length. This is an intermediate result obtained from column-wise
DCT transform. The column-wise transform is expressed in matrix notation as A x.
Then we perform a row-wise 1D DCT
M−1
(2m + 1) uπ
α (u) X [m, v] cos
2M
m=0
on A x to obtain X [u, v]. This is a significant insight into the 2D DCT which can be
achieved by two successive 1D transforms. The order of transforms does not matter;
one can choose to perform a row-wise transform first followed by a column-wise
transform, or vice versa.
The 2D transform in Eqs. (10.11) and (10.12) can be put into matrix form. The
column-wise DCT Ax is also N × M. To perform row-wise DCT on Ax, Ax must
be transposed and premultiplied by the row space base vectors B. B is an M × M
matrix. This produces XT , the transpose of the 2D DCT coefficients. Hence
XT = B (Ax)T = BxT AT
X = A x BT . (10.13)
Equation (10.13) can be interpreted from left to right as the column-wise trans-
form followed by the row-wise transform. Equation (10.13) is (10.11) in short-hand
notation. The 2D inverse DCT follows from Eq. (10.13) through premultiplication
and post multiplication
10.2 DCT Implementation 615
X = AxBT
AT XB = AT AxBT B
x = AT XB. (10.14)
0 ≤ m ≤ M − 1, 0 ≤ n ≤ N − 1
Real-time DCT and IDCT once needed DSP processors because of the excessive
computational load. Nowadays thanks to very powerful microprocessors with high
clock speeds, floating-point ALU’s, and high on-chip storage, we enjoy cheap
electronic stuff that can play stored music using MP3 algorithm. Digital cameras
produce photographs in JPEG format by default to save maximum possible number
of pictures on a SD memory card. MP3 and JPEG both use DCT to compress the raw
data (sound or picture). Compared to uncompressed WAV format, MP3 provides
11:1 compression ratio, while JPEG achieves nearly the same compression ratio
compared to uncompressed BMP format. With ever-increasing use of FPGA’s, the
DCT implementation can be expected to migrate from software to hardware, which
will usher in new high-end applications in audio and video technologies.
Popular mathematics software like Mathematica, MATLAB, SCILAB, Math-
CAD provide functions to perform DCT and IDCT applications. LabVIEW provides
1D and 2D DCT and inverse DCT vi’s as well as MathScript RT Module functions
called dct and idct if the Multicore Analysis and Sparse Matrix
Toolkit are installed. Assuming the user does not have these toolkits, we have
provided the vi’s shown in Figs. 10.9 and 10.10 to carry out the DCT and IDCT
computations. With the help of the DCT and IDCT equations, Formula node scripts
can be written as well.
The DCT implementation which we have dealt so far is by direct computation
using the defining equations. Algorithms have been developed and used to accelerate
the DCT computation. Most algorithms fall into one of the following categories:
616 10 Discrete Cosine Transform
Fig. 10.8 The DCT coefficients in this figure were generated by two successive 1D DCT’s. Image2
was generated from the DCT coefficients by a 2D IDCT vi in LabVIEW
Indirect computation This is the method which we have used to describe the
DCT. The input data is replicated, reversed and concatenated with the original
data. Afterwards a DFT is run on the composite data.
Direct matrix factorization Utilizes the DCT equations as expressed by
Eqs. 10.1, 10.11. The sums in these equations can be viewed as the matrix
multiplication of data and a matrix with trigonometric entries.
Recursive computation Similar to FFT, a fast algorithm to compute the DCT
has been proposed by H. S. Hou[25] in 1987. A popular and efficient algorithm,
the Fast DCT (FDCT) algorithm is beyond the scope of this book. The interested
reader is referred to the book 2 by Rao. Another good resource is Further Reading
written by Analog Devices which outlines the algorithm and implements a 2D
FDCT on ADSP-2100 Family of DSP chips.
10.2 DCT Implementation 617
In Figs. 10.9 and 10.10 are depicted the implementation of 1D DCT and IDCT
virtual instruments. The block diagrams are self-explaining. The connector pane
input and output on the front panel are connected to input (DCT input) and
DCT output (sequence). This way the vi can be used as a subvi.
The reader is referred to the references for various published DCT computation
algorithms. Hou [25] discusses the FDCT. Ahmed et al. [26], Chen et al. [27],
Vetterli et al. [28] each proposes different computational algorithms. Artieri and
Colavin [29] describes hardware implementation of DCT on chip. The reader is
also referred to the resources in Further Reading.
618 10 Discrete Cosine Transform
Fig. 10.11 Discrete Cosine Transform compresses a signal by decorrelating its redundancies. (a)
The redundancies of the discrete-time signal is apparent. (b) DCT compacts and squeezes the data
close to the DC component. (c) The histogram of the signal reveals that 98% of the signal energy
comes from the first 25 (out of 256) DCT coefficients
Fig. 10.12 ECG signal reconstructed from DCT coefficients. (a) Original noisy ECG signal. (b)
By using 50 DCT coefficients out of 256 preserves 98.4% of the signal energy and filters the signal
As already mentioned, the principal use of the DCT is in data compaction. The
upsampling of the data produces DCT coefficients that aggregate near the DC
component (actually the DC component is the greatest component). Figure 10.11
shows a noisy ECG signal (a), and its DCT coefficients (b). The energy histogram
of the coefficients reveals that 98% of the signal energy is confined to the first 30 of
the 256 coefficients. Then instead of 256 coefficients one can store or transmit just
30 coefficients easing the memory and transmission requirements in applications.
When the signal needs to be retrieved, as many coefficients are inserted after the
retained coefficients as there are zeros discarded.
10.3 DCT Applications 619
Further Reading
Problems
X = DCT (x)
= Ax
⎡ ⎤
1 1 ··· 1
⎢ √ π √ √ (2N − 1) π ⎥
⎢ 3π ⎥
⎢
1 ⎢ 2 cos 2 cos ··· 2 cos ⎥
2N 2N 2N ⎥
A= √ ⎢ ⎥
N ⎢
⎢ · · · · · · ··· · · · ⎥
⎥
⎣√ (N − 1) π √ 3 (N − 1) π √ (2N − 1) (N − 1) π ⎦
2 cos 2 cos · · · 2 cos
2N 2N 2N
620 10 Discrete Cosine Transform
and
x = I DCT (X)
= BX
⎡ π ⎤
√ √ (N − 1) π
⎢1 2 cos ··· 2 cos ⎥
⎢ 2N 2N ⎥
⎢ √ 3π √ 3 (N − 1) π ⎥
1 ⎢1 2 cos ··· 2 cos ⎥
B= √ ⎢ 2N 2N ⎥
N⎢⎢· · · · · · · · · · · ·
⎥
⎥
⎢ ⎥
⎣ √ (2N − 1) π √ (2N − 1) (N − 1) π ⎦
1 2 cos · · · 2 cos
2N 2N
show that B = AT and B = A−1 and AAT = I where is the N × N unit matrix.
2. The separability of 2D transform can be best explained by the continuous image
case. As we did in Sect. 10.1.1, we can derive the DCT transform of a 2D signal
through the DFT approach. Recall Eq. (6.55) which computes the continuous-
time Fourier transform of a 2D signal:
ˆ ∞ ˆ ∞
X (u, v) = x (η, ξ ) exp [−j 2π (uη + vξ )] dηdξ.
−∞ −∞
Problem 6
622 10 Discrete Cosine Transform
image(P)
colormap gray
hold on
Problem 8
B = [1 1 1 1 1 1 1 1]/sqrt(8);
for k = 1:7
row = [0 0 0 0 0 0 0 0];
for n = 0:7
row(n+1) = 0.5 * cos((2*n+1)*k*pi/16);
end B = [B; row];
end
X = A*P*B’; % DCT
PP = A’*X*B; % IDCT
1. Cardano, G., Artis magnae, sive de regulis algebraicis (also known as Ars magna), Nuremberg,
1545.
2. Euler, L., Elements of Algebra, 1770.
3. Feynman, R. P., Leighton, R. B., Sands, M., Chapter 22: Algebra, The Feynman Lectures on
Physics: Volume I. p. 10, Addison-Wesley, 1964.
4. Gamow, G., One Two Three... Infinity, Facts and Speculations of Science, 6th ed., Bantam
Books, New York,1960.
5. Alexander, C. K., Sadiku, M. N. O., Fundamentals of Electric Circuits, 3rd ed., McGraw-Hill
2007, New York, 2007.
6. Kuo, F. F., Network Analysis and Synthesis, 2nd ed., John Wiley & Sons, New York, 1966.
7. Michelson, A. A., Stratton, S. W., “A New Harmonic Analyzer”, American Journal of Science,
Vol. 25, pp 1–13, 1898.
8. Hammack, B., Kranz, S., Carpenter, B., Albert Michelson’s Harmonic Analyzer: A Visual Tour
of a Nineteenth Century Machine that Performs Fourier Analysis, Articulate Noise Books,
2014.
9. Özhan, O., “Grafik Programlama Kullanarak Kepstrum Analizi ve Yapay Sinir Ağı ile
Konuşmacı Tanıma”, Doktora Tezi, pp , Yıldız Teknik Üniversitesi Fen Bilimleri Enstitüsü,
Istanbul, 30 April 1999.
10. Oppenheim, A. V. , Wilsky, A. S., Nawab, S. H, Signals and Systems, 2nd ed., Prentice Hall,
Upper Saddle River NJ, 1997.
11. Oppenheim A. V., Schafer R. W., Discrete-Time Signal Processing, Prentice Hall Inc,
Englewood Cliffs NJ, 1989.
12. Proakis J. G., Manolakis D. G., Introduction to Digital Signal Processing, Macmillan
Publishing Company, New York NY, 1988.
13. Bristow, G. ed., Electronic Speech Synthesis: Techniques, Technology and Applications,
Granada Technical Books, London, 1984.
14. Garofolo, J. S., Lamel, L. F., Fisher, W. M., Fiscus J. G., Pallett D. S., Dahlgren, N. L., Zue
V., TIMIT Acoustic-Phonetic Continuous Speech Corpus, University of Pennsylvania, https://
catalog.ldc.upenn.edu/ldc93s1.
15. National Instruments Corporation, LabVIEW 2016 Help, http://zone.ni.com/reference/en-XX/
help/371361N-01, Texas, USA.
16. MathWorks, Getting Started with MATLAB/Help and Documentation, https://www.mathworks.
com/help/matlab/learn_matlab/help.html, Natick, Massachusetts, USA.
18. Haykin, S., Veen, B. V., Signals and Systems, 2nd ed., John Wiley & Sons, Hobroken NJ, 2005.
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2022 625
O. Özhan, Basic Transforms for Electrical Engineering,
https://doi.org/10.1007/978-3-030-98846-3
626 References
19. Wilbraham, H., “On a certain periodic function”, The Cambridge and Dublin Mathematical
Journal, Vol. 3: pp. 198–201, 1848.
20. Gibbs, J. W., “Fourier’s Series”, Nature, 59 (1522): 200, ISSN 0028-08361898.
21. National Semiconductor (Now affiliated with Texas Instruments), MM54104 Digitalker data
sheet, ftp://ftp.jameco.com/Archive/Obsolete-TechDocuments/26139.pdf.
22. Cooley, J.W., Tukey, J.W., “An Algorithm for Machine Calculation of Complex Fourier Series”,
Mathematics of Computation, Vol. 19, Apr., 1965, pp. 297–301.
23. Cooley, J.W., “The Re-Discovery of the Fast Fourier Transform Algorithm”, Microchimica
Acta, Vol. 3, 1987, pp. 33–45.
24. “The Top Ten Algorithms from the 20th Century”, IEEE Computer Society Journal, Vol:2
Issue: 1, January/February 2000.
25. Hou, H. S., “A fast recursive algorithm for computing the discrete cosine transform”, IEEE
Transactions Acoustics, Speech, Signal Processing 6(10), pp. 1455–1461, 1987.
26. Ahmed, N., Natarajan, T., Rao, K. R., “Discrete Cosine Transform”, IEEE. Transactions
Computer, Vol C-23, pp. 90–93, Jan 1974.
27. Chen, W. H., Smith C. H., Fralick, S.C., “A Fast Algorithm for the Discrete Cosine Transform”,
IEEE Transactions on Communications, Vol. COM25, No. 9, Sep. 1977, pp. 1004–9.
28. “Simple FFT and DCT Algorithms with Reduced Number of Operations”, Signal Processing,
vol. 6, pp. 267–278, Aug 1984.
29. Artieri, A., Colavin, O., “A chip set core for image compression”, Transactions on Consumer
Electronics, vol. 36, pp.395–402, Aug. 1990.
30. Brown, J. W., Churchill, R. V., Complex Variables and Applications, 8-th Ed., McGraw-Hill
Book company, 2009.
31. Spiegel, M. R., Advanced Mathematics for Engineers and Scientists, McGraw-Hill Scahum’s
Outline Series, 1971.
Index
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2022 627
O. Özhan, Basic Transforms for Electrical Engineering,
https://doi.org/10.1007/978-3-030-98846-3
628 Index
O Q
Orthogonal, 258 Quality factor, 318
Orthonormal, 259 Quantum mechanics, 55
Oscilloscope, 417 Quefrency, 405
probes, 417
Overshoot, 417
R
P Radioactivity, 569
Parseval, 462 Radix, 468
Parseval’s relation, 287, 314, 359, 536 Range, 56
Partial fraction expansion, 214 Rate
complex roots, 523 of decay, decomposition, 570
multiple roots, 524 Rational function, 73, 214, 226, 375, 504–506,
of z-transform, 520 520, 547, 575
Partial fractions, 552 Rayleigh frequency, 449
Particular solution, 193 RC circuit, 192, 551, 555
Passband, 408 Reactance, 88
Path Real differentiation, 202
decomposition, 113 Real number, 4
Path reversal, 114 Reflection coefficient, 87
Period, 261 Region of Convergence (ROC), 196
fundamental, 261 z-transform, 498
Periodic Register, 544
convolution, 303 Residue-at-infinity, 165, 530
function, 206 Residues, 161, 528
Periodicity, 261 Resistance, 26
Phase, 14, 24, 33, 36, 198, 258, 263, 316, 338, Resonance, 30
347, 385, 388, 392, 401, 402, 414 ROC
function, 376, 403 see Region of Convergence (ROC), 196
modulation, 347 Roots
response, 412 of a complex number, 16
spectrum, 352, 408 Rotating magnetic fields, 31
Phasor, 23, 31
addition, 24
definition, 24 S
integration, 26 Sample-and-Hold (S/H), 549
Pitch, 405 Sampling, 363, 390, 395
Pixel, 14, 394, 612 frequency, 390
PM, 347 impulse, 364
Poles, 157, 215 natural, 369
complex, 217 period, 363, 381
multiple, 218 rate, 363, 390
real, 215 Sawtooth function, 206
Poles and zeros, 221 SCILAB, 321
Pole-zero diagram, 376 Second order system
Polynomial, 73 critically damped, 232
factoring, 222 overdamped, 232
identical, 219 underdamped, 232
632 Index
Wave function, 55 Z
Wavelength, 417 Zero-input response, 233
Whittaker-Shannon Zero-Order Hold, 369
interpolation formula, 366 Zeros, 215
Window, 444 Zero-state response, 233
Bartlet, 446 z-transform, 572
Blackman, 446 linearity, 509
Hamming, 446 of a complex sequence conjugate, 514
Hanning, 446 one-sided, 538
rectangular, 446 properties, 508
Windowing, 444, 574 unilateral, 498, 538
wxMaxima, 224 of time-shifted sequence, 510