0% found this document useful (0 votes)
853 views821 pages

DOS Matlab

Dos Matlab

Uploaded by

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

DOS Matlab

Dos Matlab

Uploaded by

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

DIGITAL

SIGNAL
PROCESSING
with selected topics

ADAPTIVE SYSTEMS
TIME-FREQUENCY ANALYSIS
SPARSE SIGNAL PROCESSING

Ljubiša Stanković

2015
2

Library of Congress Cataloging-in-Publication Data


Library of Congress Control Number: 2015912465

ISBN-13: 978-1514179987
ISBN-10: 1514179989

c 2015 Ljubiša Stanković, All Rights Reserved


Printed by CreateSpace Independent Publishing Platform,


An Amazon.com Company
North Charleston, South Carolina, USA.

Available from Amazon.com and other online and bookstores

All right reserved. Printed and bounded in the United States of America.

No part of this book may be reproduced or utilized in any form or by any


means, electronic or mechanical, including photocopying, recording, or by
any information storage and retrieval system, without permission in writing
from the copyright holder.
Ljubiša Stanković Digital Signal Processing 3

To
my parents
Božo and Cana,

my wife Snežana,
and our
Irena, Isidora, and Nikola.
4
Contents
I Review 19
Chapter 1 Continuous-Time Signals and Systems 21
1.1 Continuous-Time Signals 21
1.2 Periodic Signals and Fourier Series 24
1.2.1 Fourier Series of Real-Valued Signals 28
1.2.2 Linear Systems 33
1.3 Fourier Transform 35
1.3.1 Fourier Transform and Linear Time-Invariant
Systems 37
1.3.2 Properties of the Fourier Transform 37
1.3.3 Relationship Between the Fourier Series and
the Fourier Transform 40
1.4 Fourier Transform and Stationary Phase Method 42
1.5 Laplace Transform 48
1.5.1 Linear Systems Described by Differential Equa-
tions 51
1.5.2 Table of the Laplace Transform 52
1.6 Butterworth Filter 53

II Discrete Signals and Systems 57


Chapter 2 Discrete-Time Signals and Transforms 59
2.1 Discrete-Time Signals 59
2.1.1 Discrete-Time Systems 64
2.2 Fourier Transform of Discrete-Time Signals 67
2.2.1 Properties 69
2.2.2 Spectral Energy and Power Density 74

5
6 Contents

2.3 Sampling Theorem in the Time Domain 75


2.4 Problems 80
2.5 Solutions 85
2.6 Exercise 105

Chapter 3 Discrete Fourier Transform 107


3.1 DFT Definition 107
3.2 DFT Properties 113
3.3 Zero-Padding and Interpolation 118
3.4 Relation among the Fourier Representations 122
3.5 Fast Fourier Transform 124
3.6 Sampling of Periodic Signals 130
3.7 Analysis of a Sinusoid by Using the DFT 133
3.7.1 Leakage Effect 134
3.7.2 Displacement 137
3.8 Discrete Cosine and Sine Transforms 140
3.9 Discrete Walsh-Hadamard and Haar Transforms 145
3.9.1 Discrete Walsh-Hadamard Transform 148
3.9.2 Discrete Haar Wavelet Transform 152
3.10 Problems 156
3.11 Solutions 158
3.12 Exercise 167

Chapter 4 z-Transform 169


4.1 Definition of the z-transform 169
4.2 Properties of the z-transform 171
4.2.1 Linearity 171
4.2.2 Time-Shift 171
4.2.3 Multiplication by exponential signal: Modulation172
4.2.4 Differentiation 172
4.2.5 Convolution in time 173
4.2.6 Table of the z-transform 173
4.2.7 Initial and Stationary State Signal Value 174
4.3 Inverse z-transform 174
4.3.1 Direct Power Series Expansion 174
4.3.2 Theorem of Residues Based Inversion 178
4.4 Discrete systems and the z-transform 180
4.5 Difference equations 183
4.5.1 Solution Based on the z-transform 183
4.5.2 Solution of Difference Equations in the Time
Domain 186
4.6 Relation of the z-transform to other Transforms 191
Ljubiša Stanković Digital Signal Processing 7

4.7 Problems 193


4.8 Solutions 197
4.9 Exercise 213

Chapter 5 From Continuous to Discrete Systems 217


5.1 Impulse Invariance Method 218
5.2 Matched z-transform method 223
5.3 Differentiation and Integration 226
5.4 Bilinear Transform 230
5.5 Discrete Filters Design 236
5.5.1 Lowpass filters 236
5.5.2 Highpass Filters 242
5.5.3 Bandpass Filters 244
5.5.4 Allpass Systems - System Stabilization 246
5.5.5 Inverse and Minimum Phase Systems 247
5.6 Problems 251
5.7 Solutions 254
5.8 Exercise 264

Chapter 6 Realization of Discrete Systems 267


6.1 Realization of IIR systems 267
6.1.1 Direct realization I 268
6.1.2 Direct realization II 268
6.1.3 Sensitivity of the System Poles/Zeros to Errors
in Coefficients 271
6.1.4 Cascade Realization 276
6.1.5 Parallel realization 280
6.1.6 Inverse realization 283
6.2 FIR Systems and their Realizations 284
6.2.1 Linear Phase Systems and Group Delay 285
6.2.2 Windows 287
6.2.3 Design of FIR System in the Frequency Domain 291
6.2.4 Realizations of FIR system 293
6.3 Problems 298
6.4 Solutions 302
6.5 Exercise 314

Chapter 7 Discrete-Time Random Signals 319


7.1 Basic Statistical Definitions 319
7.1.1 Expected Value 319
7.1.2 Probability and Probability Density Function 326
7.1.3 Median 329
8 Contents

7.1.4 Variance 331


7.2 Second-Order Statistics 336
7.2.1 Correlation and Covariance 336
7.2.2 Stationarity and Ergodicity 337
7.2.3 Power Spectral Density 338
7.3 Noise 340
7.3.1 Uniform Noise 340
7.3.2 Binary Noise 341
7.3.3 Gaussian Noise 344
7.3.4 Complex Gaussian Noise and Rayleigh Distri-
bution 349
7.3.5 Impulsive Noises 350
7.3.6 Noisy Signals 352
7.4 Discrete Fourier Transform of Noisy Signals 352
7.4.1 Detection of a Sinusoidal Signal Frequency 356
7.5 Linear Systems and Random Signals 360
7.5.1 Spectral Estimation of Narrowband Signals 366
7.6 Detection and Matched Filter 368
7.6.1 Matched Filter 369
7.7 Optimal Wiener Filter 372
7.8 Quantization effects 376
7.8.1 Input signal quantization 377
7.8.2 Quantization of the results 382
7.9 Problems 394
7.10 Solutions 400
7.11 Exercise 418

III Selected Topics 421


Chapter 8 Adaptive Systems 423
8.1 Introduction 423
8.2 Linear Adaptive Adder 427
8.2.1 Error Signal 429
8.2.2 Autocorrelation Matrix Eigenvalues and Eigen-
vectors 438
8.2.3 Error Signal Analysis 443
8.2.4 Orthogonality Principle 445
8.3 Steepest Descend Method 446
8.4 LMS Algorithm 457
8.4.1 Convergence of the LMS algorithm 458
8.5 LMS Application Examples 460
Ljubiša Stanković Digital Signal Processing 9

8.5.1 Identification of Unknown System 460


8.5.2 Noise Cancellation 464
8.5.3 Sinusoidal Disturbance Cancellation 466
8.5.4 Signal Prediction 468
8.5.5 Adaptive Antenna Arrays 473
8.5.6 Acoustic Echo Cancellation 478
8.6 Variations on the LMS Algorithm 481
8.6.1 Sign LMS 481
8.6.2 Block LMS 482
8.6.3 Normalized LMS Algorithm 483
8.6.4 LMS with Variable Step Size 485
8.6.5 Complex LMS 487
8.7 RLS Algorithm 489
8.8 Adaptive Recursive Systems 493
8.9 From the LMS algorithm to the Kalman filters 495
8.10 Neural Networks 500
8.10.1 Neuron 502
8.10.2 Network Function 502
8.10.3 Activation Function 503
8.10.4 Neural Network Topology 505
8.10.5 Network with Supervised Learning 507
8.10.6 One-Layer Network with Binary Output - Per-
ceptron 508
8.10.7 One-Layer Neural Network with Continuous
Output 512
8.10.8 Multilayer Neural Networks 515
8.10.9 Neural Networks with Unsupervised Learning 518
8.10.10 Voting Machines 519

Chapter 9 Time-Frequency Analysis 521


9.1 Short-Time Fourier Transform 522
9.2 Windows 529
9.2.1 Rectangular Window 529
9.2.2 Triangular (Bartlett) Window 530
9.2.3 Hann(ing) Window 531
9.2.4 Hamming Window 533
9.2.5 Blackman and Kaiser Windows 534
9.2.6 Discrete Form and Realizations of the STFT 535
9.2.7 Recursive STFT Realization 541
9.2.8 Filter Bank STFT Implementation 542
9.2.9 Signal Reconstruction from the Discrete STFT 546
10 Contents

9.2.10 Time-Varying Windows 556


9.2.11 Frequency-Varying Window 567
9.2.12 Hybrid Time-Frequency-Varying Windows 569
9.3 Wavelet Transform 569
9.3.1 Filter Bank and Discrete Wavelet 574
9.3.2 S-Transform 607
9.4 Local Polynomial Fourier Transform 610
9.4.1 Fractional Fourier Transform with Relation to
the LPFT 613
9.5 High-Resolution STFT 614
9.5.1 Capon’s STFT 614
9.5.2 MUSIC STFT 618
9.5.3 Capon’s LPFT 620
9.6 Wigner Distribution 622
9.6.1 Auto-Terms and Cross-Terms in the Wigner
Distribution 627
9.6.2 Wigner Distribution Properties 631
9.6.3 Pseudo and Smoothed Wigner Distribution 636
9.6.4 Discrete Pseudo Wigner Distribution 639
9.6.5 From the STFT to the Wigner Distribution via
S-Method 647
9.7 General Quadratic Time-Frequency Distributions 653
9.7.1 Reduced Interference Distributions 657
9.7.2 Kernel Decomposition Method 662

Chapter 10 Sparse Signal Processing 665


10.1 Illustrative Examples 666
10.2 Sparsity and Reduced Set of Samples/Observations 676
10.3 Transformation Matrix Parameters 680
10.3.1 Unitary Matrix 682
10.3.2 Isometry and Restricted Isometry Property 683
10.3.3 Coherence 684
10.3.4 Restricted Isometry and Coherence 687
10.3.5 Restricted Isometry and Eigenvalues 691
10.3.6 Unique Reconstruction Condition and RIP 701
10.3.7 Rank and Spark of a Matrix 704
10.3.8 Spark and the Solution Uniqueness 706
10.4 Norm-Zero Based Reconstruction 710
10.4.1 Direct Combinatorial Search 710
10.4.2 Pseudoinverse matrix 713
10.4.3 Estimation of Unknown Positions 714
Ljubiša Stanković Digital Signal Processing 11

10.4.4 Unavailable/Missing Samples Noise in Initial


Estimation 717
10.4.5 Iterative Procedure 727
10.4.6 Influence of Additive Input Noise 729
10.4.7 Nonsparse Signal Reconstruction 733
10.5 Norm-One Based Reconstruction 735
10.5.1 Illustrations in the Signal Domain 737
10.5.2 Illustration in the Sparsity Domain 742
10.5.3 Equivalence of the Norm-Zero and Norm-One
Based Minimization Solutions 756
10.6 Median Based Formulation 760
10.7 Norm-one Based Reconstruction Algorithms 766
10.7.1 LASSO- Minimization 767
10.7.2 Signal Domain Reconstruction with a Gradient
Algorithm 770
10.8 On the Uniqueness of the DFT of Sparse Signals 782
10.9 Indirect Measurements/Sampling 791
10.10Processing of Sparse Signals with Impulsive Noise 801
10.10.1 Direct Search Procedure 802
10.10.2 Criteria for Selecting Samples 803
10.10.3 Uniqueness of the Obtained Solution 806
10.11Image Reconstruction 808

Index 811

About the Author 820


12 Contents
Preface

book is a result of author’s thirty-three years of experience in

T
HIS
teaching and research in signal processing. It is written for students
and engineers as a first book in digital signal processing, assuming
that a reader is familiar with the basic mathematics, including integrals, dif-
ferential calculus, and linear algebra. Although a review of continuous-time
analysis is presented in the first chapter, a prerequisite for the presented
content is a basic knowledge about continuous-time signal processing.
The book consists of three parts. After an introductory review part, the
basic principles of digital signal processing are presented within Part two of
the book. This part starts with Chapter two which deals with basic defini-
tions, transforms, and properties of discrete-time signals. The sampling the-
orem, providing essential relation between continuous-time and discrete-
time signals, is presented in this chapter as well. Discrete Fourier transform
and its applications to signal processing are the topic of the third chapter.
Other common discrete transforms, like Cosine, Sine, Walsh-Hadamard,
and Haar are also presented in this chapter. The z-transform, as a power-
ful tool for analysis of discrete-time systems, is the topic of Chapter four.
Various methods for transforming a continuous-time system into a corre-
sponding discrete-time system are derived and illustrated in Chapter five.
Chapter six is dedicated to the forms of discrete-time system realizations.
Basic definitions and properties of random discrete-time signals are given
in Chapter six. Systems to process random discrete-time signals are consid-
ered in this chapter as well. Chapter six concludes with a short study of
quantization effects.
The presentation is supported by numerous illustrations and exam-
ples. Chapters within Part two are followed by a number of solved and
unsolved problems for practice. Theory is explained in a simple way with
a necessary mathematical rigor. The book provides simple examples and

13
14 Preface

explanations for each presented transform, method, algorithm or approach.


Sophisticated results in signal processing theory are illustrated by simple
numerical examples.
Part three of the book contains few selected topics in digital signal
processing: adaptive discrete-time systems, time-frequency signal analysis,
and processing of discrete-time sparse signals. This part could be studied
within an advanced course in digital signal processing, following the basic
course. Some parts from the selected topics may be included in tailoring a
more extensive first course in digital signal processing as well.
The author would like to thank colleagues: prof. Zdravko Uskoković,
prof. Srdjan Stanković, prof. Igor Djurović, prof. Veselin Ivanović, prof.
Miloš Daković, prof. Božo Krstajić, prof. Vesna Popović-Bugarin, prof. Slo-
bodan Djukanović, prof. Irena Orović, dr. Nikola Žarić, dr Marko Sime-
unović, and M.Sc. Predrag Raković for careful reading of the initial version
of this book and for many comments that helped to improve the presenta-
tion.
The author thanks the colleagues that helped in preparing the special
topics part of the book. Many thanks to Miloš Daković who coauthored all
three chapters of Part three of this book and to other coauthors of chapters
in this part: Thayaparan Thayananthan, Srdjan Stanković, and Irena Orović.
Special thanks to M.Sc. Miloš Brajović and M.Sc. Stefan Vujović for their
careful double-check of the presented theory and examples, numerous com-
ments, and for the help in proofreading the final version of the book.

London,
July 2013 - July 2015.

Author
Introduction

is a physical process, mathematical function, or any other

S
IGNAL
physical or symbolic representation of an information. Signal theory
and processing are the areas dealing with the efficient generation,
description, transformation, transmission, reception, and interpretation of
information. In the beginning, the most common physical processes used
for these purposes were the electric signals, for example, varying current
or electromagnetic waves. Signal theory is most commonly studied within
electrical engineering. Signal theory theory are strongly related to the ap-
plied mathematics and information theory. Examples of signals include
speech, music, image, video, medical, biological, geophysical, sonar, radar,
biomedical, car engine, financial, and molecular data. In terms of signal gen-
eration, the main topics are in sensing, acquisition, synthesis, and reproduc-
tion of information. Various mathematical transforms, representations, and
algorithms are used for describing signals. Signal transformations are a set
of methods for decomposition, filtering, estimation and detection. Modu-
lation, demodulation, detection, coding, and compression are the most im-
portant aspects of the signal transmission. In the process of interpretation,
various approaches may be used, including adaptive and learning-based
tools and analysis.
Mathematically, signals are presented by functions of one or more vari-
ables. Examples of one-dimensional signals are speech and music signals.
A typical example of a two-dimensional signal is an image while video se-
quence is a sample of a three-dimensional signal. Some signals, for example,
geophysical, medical, biological, radar, or sonar, may be represented and
interpreted as one-dimensional, two-dimensional, or multidimensional.
Signals may be continuous functions of independent variables, for ex-
ample, functions of time and/or space. Independent variables may also
be discrete, with the signal values being defined only over an ordered set

15
16 Introduction

continuous discrete-time digital


1 1
15 1111
14 1110
0.8 0.8 13 1101
12 1100
11 1011
10 1010
0.6 0.6
9 1001

xd(n)
x(n)
x(t)

8 1000
7 0111
0.4 0.4 6 0110
5 0101
4 0100
0.2 0.2 3 0011
2 0010
1 0001
0 0 0000
0 5 10 15 0 5 10 15 0 5 10 15
t n n

Figure 1 Illustration of a continuous signal and its discrete-time and digital version.

of discrete independent variable values. This is a discrete-time signal. The


discrete-time signals, after being stored in a general computer or special-
purpose hardware, are discretized (quantized) in amplitude as well, so that
they can be memorized within the registers of a finite length. These kinds
of signals are referred to as digital signals, Fig.1. A continuous-time and
continuous amplitude (analog) signal is transformed into a discrete-time
and discrete-amplitude (digital) signal by using analog-to-digital (A/D)
converters, Fig.2. Their processing is known as digital signal processing. In
modern systems, the amplitude quantization errors are very small. Com-
mon A/D converters are with sampling frequency of up to megasample
(some even up to few gigasample) per second with 8 to 24 bits of resolu-
tion in amplitude. The digital signals are usually mathematically treated as
continuous (nondiscretized) in amplitude, while the quantization error is
studied, if needed, as a small disturbance in processing, reduced to a noise
in the input signal. Digital signals are transformed back into analog form by
digital-to-analog (D/A) converters.
According to the nature of their behavior, all signals could be deter-
ministic or stochastic. For deterministic signals, the values are known in the
past and future, while the stochastic signals are described by probabilistic
methods. The deterministic signals are commonly used for theoretical de-
scription, analysis, and syntheses of systems for signal processing.
Ljubiša Stanković Digital Signal Processing 17

ANALOG SYSTEM

x(t) y(t)
ha(t)

DIGITAL SYSTEM

x(t) x(n) y(n) y(t)


A/D h(n) D/A

Figure 2 Illustration of an analog and a digital system used to process an analog signal.

Advantages of processing signals in digital form are in their flexibility


and adaptability with possibilities ranging up to our imagination to imple-
ment a transformation with an algorithm on a computer. The time required
for processing in real time (all calculations have to be completed between
two signal samples) is a limitation as compared to the analog systems that
are limited with a physical delay of electrical components and circuits only.
18 Introduction
Part I

Review

19
Chapter 1
Continuous-Time Signals and Systems

of discrete-time signals are obtained by sampling continuous-

M
OST
time signals. In many applications, the result of signal process-
ing is presented and interpreted in the continuous-time domain.
Throughout the course of digital signal processing, the results will be dis-
cussed and related to the continuous-time forms of signals and their param-
eters. This is the reason why the first chapter is dedicated to a review of
signals and transforms in the continuous-time domain. This review will be
of help in establishing proper correspondence and notation for the presen-
tation that follows in the next chapters.

1.1 CONTINUOUS-TIME SIGNALS

One-dimensional signals, represented by a function of time as a continuous


independent variable, are referred to as continuous-time signals (continu-
ous signals). Some simple forms of deterministic continuous-time signals
are presented next.
The unit-step signal (Heaviside function) is defined by
!
1, for t ≥ 0
u(t) = . (1.1)
0, for t < 0

In the Heaviside function definition, the value of u(0) = 1/2 is also used.
Note that the independent variable t is continuous, while the signal itself is
not a continuous function. It has a discontinuity at t = 0.
The boxcar signal (rectangular window) is formed as b(t) = u(t +
1/2) − u(t − 1/2), that is, b(t) = 1 for −1/2 ≤ t < 1/2 and b(t) = 0 else-
where. A signal obtained by multiplying the unit-step signal by t is called
the ramp signal, with notation R(t) = tu(t).

21
22 Continuous-Time Signals and Systems

The impulse signal (or delta function) is defined as


"∞
δ(t) = 0, for t ̸= 0 and δ(t)dt = 1. (1.2)
−∞

The impulse signal is equal to 0 everywhere, except at t = 0, where it


assumes an infinite value, so that its area is 1. From the definition of
the impulse signal, it follows δ( at) = δ(t)/ | a| . This function cannot be
implemented in real-world systems due to its infinitely short duration and
infinitely large amplitude at t = 0.
In theory, any signal can be expressed by using the impulse signal, as
"∞ "∞
x (t) = x (t − τ )δ(τ )dτ = x (τ )δ(t − τ )dτ. (1.3)
−∞ −∞

Using the previous relation, it is possible to relate the unit-step signal


and the impulse signal,

"∞ "t
u(t) = δ(τ )u(t − τ )dτ = δ(τ )dτ
−∞ −∞

or
du(t)
= δ ( t ). (1.4)
dt
A sinusoidal signal, with amplitude A, frequency Ω0 , and initial phase
ϕ, is a signal of the form

x (t) = A sin(Ω0 t + ϕ). (1.5)

This signal is periodic in time, since it satisfies the periodicity condition

x ( t + T ) = x ( t ). (1.6)

In this case, the period is T = 2π/Ω0 .


A signal periodic with a basic period T could also be considered as
periodic with periods kT, where k is an integer.
A complex sinusoidal signal

x (t) = Ae j(Ω0 t+ ϕ) = A cos(Ω0 t + ϕ) + jA sin(Ω0 t + ϕ) (1.7)

is also periodic with period T = 2π/Ω0 . Fig. 1.1 depicts basic continuous-
time signals.
Ljubiša Stanković Digital Signal Processing 23

u(t) 1 1

δ(t)
0 0
-1 (a) -1 (b)
-4 -2 0 2 4 -4 -2 0 2 4

1 1

sin(πt)
b(t)

0 0
-1 (c) -1 (d)
-4 -2 0 2 4 -4 -2 0 2 4
t t

Figure 1.1 Continuous-time signals: (a) unit-step signal, (b) impulse signal, (c) boxcar signal,
and (d) sinusoidal signal.

Example 1.1. Find the period of a signal


N
x (t) = ∑ An e jnΩ t . 0

n =0

⋆This signal consists of N + 1 components. The constant component A0


can be considered as periodic with any period. The remaining components
A1 e jΩ0 t , A2 e j2Ω0 t , A3 e j3Ω0 t , ..., A N e jNΩ0 t are periodic with periods, T1 =
2π/Ω0 , T2 = 2π/(2Ω0 ), T3 = 2π/(3Ω0 ), ...., TN = 2π/( NΩ0 ), respectively. A
sum of periodic signals is periodic with the period being equal to the small-
est time interval T containing all of the periods T1 , T2 , T3 ,..., TN an integer
number of times. In this case, it is T = 2π/Ω0 .

Example 1.2. Find the periods of signals: x1 (t) = sin(2πt/36), x2 (t) = cos(4πt/15 +
2), x3 (t) = exp( j0.1t), x4 (t) = x1 (t) + x2 (t), and x5 (t) = x1 (t) + x3 (t).

⋆Periods are calculated according to (1.6). For x1 (t) the period follows
from 2πT1 /36 = 2π, as T1 = 36. Similarly, T2 = 15/2 and T3 = 20π. The
period of x4 (t) is the smallest interval containing T1 and T2 . It is T4 = 180 (5
periods of x1 (t) and 24 periods of x2 (t)). For signal x5 (t), when the periods of
components are T1 = 36 and T3 = 20π, there is no common interval T5 such
that the periods T1 and T3 are contained an integer number of times. Thus,
the signal x5 (t) is not periodic.

Some parameters that can be used to describe a signal are:


24 Continuous-Time Signals and Systems

• Maximum absolute value (magnitude) of a signal

Mx = max | x (t)| , (1.8)


−∞<t<∞

• Signal energy
"∞
Ex = | x (t)|2 dt, (1.9)
−∞

• Signal instantaneous power

Px (t) = | x (t)|2 . (1.10)

The average signal power is defined by

"T
1
PAV = lim | x (t)|2 dt.
T →∞ 2T
−T

The average power is a time average of energy. Energy signals are


signals with a finite energy, while power signals have finite and nonzero
power. The average signal power of energy signals is zero.

1.2 PERIODIC SIGNALS AND FOURIER SERIES

Consider a periodic signal x (t) with a period T. It can be expressed as a sum


of weighted periodic complex sinusoidal functions e j2πnt/T , −∞ < n < ∞,

x (t) = · · · + X−1 e− j2πt/T + X0 e− j0 + X1 e j2πt/T + · · · (1.11)



= ∑ Xn e j2πnt/T
n=−∞

if the Dirichlet conditions are met: (1) the signal x (t) has a finite number of
discontinuities within the period T; (2) it has a finite average value in the
period T; and (3) the signal has a finite number of maxima and minima.
Since the signal analysis deals with real-world physical signals, rather than
with mathematical generalizations, these conditions are almost always met.
Ljubiša Stanković Digital Signal Processing 25

The set of basis functions {e j2πnt/T : −∞ < n < ∞}, is an orthonormal


set of functions since their inner product is

# $ 1 T/2"
e j2πmt/T , e j2πnt/T = e j2πmt/T e− j2πnt/T dt
T
− T/2
%
1 for m = n
= sin(π (m−n)) .
π (m−n)
= 0 for m ̸= n

It means that the inner product of any two different basis functions is zero
(orthogonal set), while the inner product of a function with itself is 1 (normal
set). In the case of orthonormal set of basis functions, it is easy to show that
the weighting coefficients Xn can be calculated as projections of x (t) onto
the basis functions e j2πnt/T ,

# $ 1 T/2
"
Xn = x (t), e j2πnt/T = x (t)e− j2πnt/T dt. (1.12)
T
− T/2

This relation follows after a simple multiplication of the right and left sides
& T/2
of (1.11) by e− j2πmt/T and an integration within the period T1 −T/2 (·) dt.
Example 1.3. Show that the Fourier series coefficients Xn of a periodic signal x (t)
can be obtained by minimizing the mean square error between the signal and
∑nN=− N Xn e j2πnt/T within the period T.
⋆The mean square value of error
N
e(t) = x (t) − ∑ Xn e j2πnt/T ,
n=− N

within the period, is


T/2
"
' '2
1 ' N '
' j2πnt/T '
I= ' x ( t ) − ∑ Xn e ' dt.
T ' n=− N
'
− T/2

From ∗
∂I/∂Xm = 0 follows
T/2
"
( )
N
1
e− j2πmt/T x (t) − ∑ Xn e j2πnt/T dt = 0
T n=− N
− T/2
T/2
"
1
Xm = x (t)e− j2πmt/T dt. (1.13)
T
− T/2
26 Continuous-Time Signals and Systems

Note: A derivative of complex function F (z) = u + jv = u( x, y) + jv( x, y) with


z = x + jy is defined by
* +
∂F (z) ∂ ∂
= −j F ( x, y),
∂z ∂x ∂y
* +
∂F (z) ∂ ∂
= + j F ( x, y).
∂z∗ ∂x ∂y
Often a half of these values is used in the definition, what does not change
our results.
In order to prove the form ∂I/∂Xm ∗ = 0 let us denote X by z, all terms
m
N j2πnt/T
in x (t) − ∑n=− N Xn e = f (z) that not depend on z = x + jy = Xm by
a + jb and e j2πnt/T = e jα , then we have to show that

∂F (z) ∂ | f (z)|2
∗ = = 2e− jα f (z).
∂z ∂z∗
In our case
' '
' '
| f (z)|2 = 'a + jb + e jα ( x + jy)'
= ( a + x cos α − y sin α)2 + (b + x sin α + y cos α)2
For the minimization of a function of two variables x and y we need partial
derivatives
∂ | f (z)|2
= 2 cos α( a + x cos α − y sin α)+ (1.14)
∂x
2 sin α(b + x sin α + y cos α)
= 2 Re{e− jα f (z)}
and
∂ | f (z)|2
= 2 Im{e− jα f (z)}. (1.15)
∂y
Therefore, all calculations with two real-valued equations (1.14) and (1.15)
are the same as using one complex valued relation
* +
∂ | f (z)|2 ∂ | f (z)|2 ∂ ∂ ∂F (z)
+j = +j F ( x, y) = .
∂x ∂y ∂x ∂y ∂z∗

Since the signal and the basis functions are periodic with period T, in
all previous integrals, we can use

T/2
" " +Λ
T/2
1 − j2πnt/T 1
x (t)e dt = x (t)e− j2πnt/T dt (1.16)
T T
− T/2 − T/2+Λ
Ljubiša Stanković Digital Signal Processing 27

where Λ is an arbitrary constant.


The signal expansion (1.11) is known as the Fourier series, and the
coefficients Xn are the Fourier series coefficients.
Example 1.4. Calculate the Fourier series coefficients of a periodic signal x (t) =
cos2 (πt/4). What will be the coefficient values if period T = 8 is assumed?
⋆The signal x (t) can be written as x (t) = (1 + cos(πt/2))/2. The
period is T = 4. Assuming that the Fourier series coefficients are calculated
with T = 4, after transforming the signal into (1.11) form, we get
1 − jπt/2 1 1 jπt/2
x (t) = e + + e .
4 2 4
The Fourier series coefficients are recognized as X−1 = 1/4, X0 = 1/2 and
X1 = 1/4 (without the calculation defined by (1.12)). Other coefficients are
equal to zero. In the above transformation, the relation cos (πt/2) = (e jπt/2 +
e− jπt/2 )/2 is used. If the period T = 8 is used, then the signal is decomposed
into complex sinusoids e j2πnt/8 = e jπnt/4 , (1.11). The signal can be written as
1 − j2πt/4 1 1 j2πt/4
x (t) = e + + e . (1.17)
4 2 4
Thus, comparing the signal definition with the basis functions e jπnt/4 , we
may write X−2 = 1/4, X0 = 1/2, and X2 = 1/4. Other coefficients are equal
to zero.

Example 1.5. Calculate the Fourier series coefficients of a periodic signal x (t)
defined as

x (t) = ∑ x0 (t + 2n)
n=−∞
with
x0 (t) = u(t + 1/4) − u(t − 1/4). (1.18)

⋆The signal x (t) is a periodic extension of x0 (t), with period T = 2.


This signal is equal to 1 for −1/4 ≤ t < 1/4, within its basic period. Thus,
1/4
"
1 sin(πn/4)
Xn = 1e− j2πnt/2 dt = , (1.19)
2 πn
−1/4

with X0 = 1/4. Values of Xn are presented in Fig. 1.2.


The signal x (t) can be reconstructed by using the Fourier series (1.11).
In calculations, a finite number of terms denoted by M should be used,
M
x M (t) = ∑ Xn e jπnt .
n=− M

The reconstructed signal, with M = 1, 2, 6, and 30, is shown in Fig. 1.3.


28 Continuous-Time Signals and Systems

x(t) Xn

-1 -1/4 1/4 1
t 0 n

Figure 1.2 Periodic signal (left) and its Fourier series coefficients (right).

1.5 1.5
1 1
x (t)

x (t)

0.5 0.5
1

0 0
(a) (b)
-0.5 -0.5
-2 -1 0 1 2 -2 -1 0 1 2
t t
1.5 1.5
1 1
x (t)
x (t)

0.5 0.5
30
6

0 0
(c) (d)
-0.5 -0.5
-2 -1 0 1 2 -2 -1 0 1 2
t t

Figure 1.3 Illustration of signal reconstruction by using a finite Fourier series with: (a)
coefficients Xn within −1 ≤ n ≤ 1, (b) coefficients Xn within −2 ≤ n ≤ 2, (c) coefficients Xn
within −6 ≤ n ≤ 6, and (d) coefficients Xn within −30 ≤ n ≤ 30.

1.2.1 Fourier Series of Real-Valued Signals

For a real-valued signal x (t) the Fourier series coefficients can be written as

T/2
" T/2
"
1 2πnt 1 2πnt
Xn = x (t) cos( )dt − j x (t) sin( )dt
T T T T
− T/2 − T/2
An − jBn
= . (1.20)
2
Ljubiša Stanković Digital Signal Processing 29


where An /2 and − Bn /2 are real and imaginary part of Xn . Since Xn = X− n
holds for real-valued signals, the values of An and Bn are
T/2
"
2 2πnt
A n = Xn + X− n = x (t) cos( )dt,
T T
− T/2
T/2
"
Xn − X− n 2 2πnt
Bn = = x (t) sin( )dt. (1.21)
−j T T
− T/2

The Fourier series form for real-valued signals is


−1 ∞
x (n) = ∑ Xn e j2πnt/T + X0 + ∑ Xn e j2πnt/T
n=−∞ n =1

= X0 + ∑ (Xn e j2πnt/T + X−n e− j2πnt/T ) (1.22)
n =1
∞ ∞
A0 2πnt 2πnt
= + ∑ An cos( ) + ∑ Bn sin( ) (1.23)
2 n =1
T n =1
T
,
with | Xn | = A2n + Bn2 /2. For real-valued signals the integrals in (1.21),
corresponding to An and Bn , are even and odd functions with respect to
n. Therefore, it is possible to calculate
T/2
" - .
1 2πnt 2πnt
Hn = x (t) cos( ) + sin( ) dt (1.24)
T T T
− T/2
and to get

An = Hn + H−n
Bn = Hn − H−n .

The coefficients calculated by (1.24) are the Hartley series coefficients. For a
real-valued and even signal x (t) = x (−t) this transform reduces to
T/2
"
1 2πnt
Cn = x (t) cos( )dt
T T
− T/2

corresponding to the Fourier cosine series coefficients . Similar expression is


obtained for an odd real-valued signal x (n) when the Fourier series reduces
to the Fourier sine series coefficients.
30 Continuous-Time Signals and Systems

Example 1.6. For a signal


x (t) = t[u(t) − u(t − 1/2)]
we are interested in its reconstruction based on the Fourier series coefficients.
The rate of coefficients convergence may depend on the way how the periodic
extension of this signal is formed.
(a) Calculate the Fourier series of the original signal periodically ex-
tended with period T = 1/2,

1
x p (t) = ∑ x ( t + n ).
2
n=−∞

Write the reconstruction formula with M Fourier series coefficients.


(b) What are the Fourier transform coefficients and the reconstruction
formula for

x p (t) = ∑ x ( t + n ),
n=−∞
when the period is T = 1.
(c) The signal is first extended with its reversed version
x c ( t ) = x ( t ) + x (1 − t )
and then periodically extended with period T = 1. Find the Fourier series
coefficients and the reconstruction formula.
(d) Comment the coefficients convergence in all cases.
⋆ (a) The Fourier series coefficients of this signal are
1/2
"
1 1
Xn = te− j2πn/(1/2)t dt =
1/2 − j4πn
0

with X0 = 1/4. The reconstructed signal with M coefficients is


M - .
1 1 j4πnt 1 − j4πnt
x M (t) = + ∑ − e + e
4 n =1 4jπn 4jπn
M
1 sin(4πnt)
= −∑ .
4 n =1 2πn

The reconstructed signal for some values of M is presented in Fig.1.4.


(b) The Fourier series coefficients of the signal extended with period 1
are
1/2
" '1/2 '1/2
1 1 ' 1 '
Xn = te− j2πnt dt = te− j2πnt '' + 2
e− j2πnt '
1 − j2πn 0 ( 2πn ) 0
0
(−1)n (−1)n − 1
= + ,
− j4πn (2πn)2
Ljubiša Stanković Digital Signal Processing 31

0.6 0.6
0.4 0.4
x1(t)

x (t)
2
0.2 0.2

0 0
(a) (b)
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
t t
0.6 0.6
0.4 0.4

x (t)
x6(t)

30
0.2 0.2
0 0
(c) (d)
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
t t

Figure 1.4 Reconstruction of a signal using the Fourier series. Reconstructed signal is denoted
by x M (t), where M indicates the number of coefficients used in reconstruction.

with X0 = 1/8. Note that the relation between the Fourier coefficients in (a)
(b) ( a)
and (b) is 2X2n = Xn . The reconstruction is presented in Fig.1.5.
(c) For the signal xc (t) extended with its reversed version follows
1/2
" "1
Cn = te− j2πnt dt + (1 − t)e− j2πnt dt
0 1/2
1/2
"
(−1)n − 1
=2 t cos(2πnt)dt =
2π 2 n2
0

with C0 = 1/4. The reconstruction formula is


M
1 1 − (−1)n
x M (t) = −2 ∑ 2 2
cos(2πnt)
4 n=1 2π n
M
1 1
= −2 ∑ 2 2
cos(2π (2n − 1)t).
n=1 π (2n − 1)
4

The reconstructed signal in this case is presented in Fig.1.6.


(d) The coefficients convergence in cases (a) and (b) is of order 1/n
while the convergence in the last case (c) is of order 1/n2 . The best signal
reconstruction with the given number of coefficients will be achieved in
the case (c). Also for a given reconstruction error we will need the smallest
32 Continuous-Time Signals and Systems

0.6 0.6

0.4 0.4
x1(t)

x2(t)
0.2 0.2

0 0
(a) (b)
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
t t
0.6 0.6
0.4 0.4
x30(t)
x6(t)

0.2 0.2
0 0
(c) (d)
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
t t

Figure 1.5 Reconstruction of a periodic signal, with a zero interval extension before using the
Fourier series.

0.6 0.6
0.4 0.4
x1(t)

x2(t)

0.2 0.2
0 0
(a) (b)
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
t t
0.6 0.6
0.4 0.4
x30(t)
x6(t)

0.2 0.2

0 0
(c) (d)
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
t t

Figure 1.6 Reconstruction of a periodic signal after an even extension before using the Fourier
series (cosine Fourier series).
Ljubiša Stanković Digital Signal Processing 33

number of reconstruction terms M in case (c). This kind of signal extension


will be later used as a basis for a definition of the so called cosine signal
transforms.

1.2.2 Linear Systems

A system transforms one signal (input signal) into another signal (output
signal). Assume that x (t) is the input signal. The system transformation will
be denoted by an operator T {◦}. The output signal can be written as

y(t) = T { x (t)}. (1.25)

A system is linear if, for any two signals x1 (t) and x2 (t) and arbitrary
constants a1 and a2 , it holds

y(t) = T { a1 x1 (t) + a2 x2 (t)} = a1 T { x1 (t)} + a2 T { x2 (t)}. (1.26)

We say that a system is time-invariant if its properties and parameters do


not change in time. For a time-invariant system, it holds:

if y(t) = T { x (t)}, then T { x (t − t0 )} = y(t − t0 ), (1.27)

for any t0 .
Linear time-invariant (LTI) systems are fully described by their re-
sponse to the impulse signal. If we know the impulse response of these
systems,
h(t) = T {δ(t)},
then for arbitrary signal x (t) at the input, the output can be calculated, by
using (1.3), as
⎧ ⎫
⎨ "∞ ⎬
y(t) = T { x (t)} = T x (τ )δ(t − τ )dτ
⎩ ⎭
−∞
"∞ "∞
Linearity Time−invariance
= x (τ )T {δ(t − τ )}dτ = x (τ )h(t − τ )dτ.
−∞ −∞

The last integral is of particular significance. It is called a convolution in


time of x (t) and h(t). Its notation is
"∞
y(t) = x (t) ∗t h(t) = x (τ )h(t − τ )dτ. (1.28)
−∞
34 Continuous-Time Signals and Systems

The convolution is a commutative operation

x ( t ) ∗ t h ( t ) = h ( t ) ∗ t x ( t ). (1.29)

Example 1.7. Find a convolution of signals x (t) = u(t + 1) − u(t − 1) and h(t) =
e − t u ( t ).
⋆By using the convolution definition, we get

"∞ "1
y(t) = x (τ )h(t − τ )dτ = 1 · e−(t−τ ) u(t − τ )dτ
−∞ −1
⎧ & t +1

⎪ e−λ dλ = e−t (e − 1/e), for t ≥ 1
t −1
" ⎨ t −1

& t +1 − λ
=− e−λ u(λ)dλ = −(t+1) ,
⎪ 0 e dλ = 1 − e

for − 1 ≤ t < 1
t +1 ⎪

0 for t < −1.

A system is causal if there is no response before the input signal


appears. For causal systems h(t) = 0 for t < 0. In general signals that satisfy
the property that they may be an impulse response of a causal system may
be referred to as causal signals.
A system is stable if any input signal with a finite magnitude Mx =
max−∞<t<∞ | x (t)| produces an output y(t) whose values are finite, |y(t)| <
∞. Sufficient condition that a linear time-invariant system is stable is

"∞
|h(τ )|dτ < ∞ (1.30)
−∞

since
"∞ "∞
|y(t)| = | x (t − τ )h(τ )dτ | ≤ | x (t − τ )h(τ )|dτ
−∞ −∞
"∞ "∞
= | x (t − τ )|| h(τ )|dτ ≤ Mx |h(τ )|dτ < ∞,
−∞ −∞

if (1.30) holds.
It can be shown that the absolute value integrability of the impulse
response is the necessary condition for a linear time-invariant system to be
stable as well.
Ljubiša Stanković Digital Signal Processing 35

1.3 FOURIER TRANSFORM

The Fourier series has been introduced and presented for periodic signals,
with a period T. Assume now that we extend the period to infinity, while not
changing the signal. This case corresponds to the analysis of an aperiodic
signal x (t). Its transform, the Fourier series coefficients normalized by the
period, is given by

T/2
" "∞
− j2πnt/T
lim Xn T = lim x (t)e dt = x (t)e− jΩt dt (1.31)
T →∞ T →∞
− T/2 −∞

with 2π/T = ∆Ω → dΩ (being infinitesimal) and 2πn/T → Ω becoming a


continuous variable, as T → ∞ and −∞ < n < ∞.
The function X (Ω), defined by

"∞
X (Ω) = x (t)e− jΩt dt, (1.32)
−∞

is called the Fourier transform (FT) of a signal x (t). For the Fourier trans-
form existence it is sufficient that a signal is absolutely integrable. There
are some signals that do not satisfy this condition, whose Fourier transform
exists in a form of generalized functions, such as delta function.
The inverse Fourier transform (IFT) can be obtained by multiplying
both sides of (1.32) by e jΩτ and integrating over Ω,

"∞ "∞ "∞


X (Ω)e jΩτ dΩ = x (t)e jΩ(τ −t) dtdΩ.
−∞ −∞ −∞

Using the fact that


"∞
e jΩ(τ −t) dΩ = 2πδ(τ − t)
−∞

we get the inverse Fourier transform

"∞
1
x (t) = X (Ω)e jΩt dΩ. (1.33)

−∞
36 Continuous-Time Signals and Systems

Example 1.8. Calculate the Fourier transform of x (t) = Ae−at u(t), a > 0.
⋆According to the Fourier transform definition we get
"∞
A
X (Ω) = Ae− at e− jΩt dt = .
( a + jΩ)
0

Example 1.9. Find the Fourier transform of



⎨ 1 for t > 0
x (t) = sign(t) = 0 for t = 0 . (1.34)

−1 for t < 0

⋆Since a direct calculation of the Fourier transform for this signal is


not possible, let us consider the signal
⎧ − at
⎨ e for t > 0
x a (t) = 0 for t = 0

−e at for t < 0
where a > 0 is a real-valued constant. It is obvious that
lim x a (t) = x (t).
a →0

The Fourier transform of x (t) can be obtained as


X (Ω) = lim Xa (Ω),
a →0

where
"0 "∞
2Ω
Xa (Ω) = −e at e− jΩt dt + e− at e− jΩt dt = . (1.35)
ja2 + jΩ2
−∞ 0
It results in
2
X (Ω) = . (1.36)
jΩ

Based on the definitions of the Fourier transform and the inverse


Fourier transform, it is easy to conclude that the duality property holds:
If X (Ω) is the Fourier transform of x (t), then the Fourier transform of
X (t) is 2πx (−Ω)

X (Ω) = FT{ x (t)}


2πx (−Ω) = FT{ X (t)}, (1.37)

where FT{◦} denotes the Fourier transform operator.


Ljubiša Stanković Digital Signal Processing 37

Example 1.10. Find the Fourier transform of δ(t), x (t) = 1 and u(t).
⋆The Fourier transform of δ(t) is

"∞
FT{δ(t)} = δ(t)e− jΩt dt = 1. (1.38)
−∞

According to the duality property,

FT{1} = 2πδ(Ω).

Finally,
! 6
sign(t) + 1 1
FT{u(t)} = FT = + πδ(Ω). (1.39)
2 jΩ

1.3.1 Fourier Transform and Linear Time-Invariant Systems

Consider a linear, time-invariant system with an impulse response h(t) and


the input signal x (t) = Ae j(Ω0 t+ ϕ) . The output signal is

"∞
y(t) = x (t) ∗t h(t) = Ae j(Ω0 (t−τ )+ ϕ) h(τ )dτ
−∞
"∞
= Ae j(Ω0 t+ ϕ) h(τ )e− jΩ0 τ dτ = H (Ω0 ) x (t), (1.40)
−∞

where
"∞
H (Ω) = h(t)e− jΩt dt (1.41)
−∞

is the Fourier transform of h(t). The linear time-invariant system does not
change the form of an input complex harmonic signal Ae j(Ω0 t+ ϕ) . It remains
complex harmonic signal after passing through the system, with the same
frequency Ω0 . The amplitude of the input signal x (t) is changed for | H (Ω0 )|
and the phase is changed for arg { H (Ω0 )}.

1.3.2 Properties of the Fourier Transform

The Fourier transform satisfies the following properties:


38 Continuous-Time Signals and Systems

1. Linearity

FT{ a1 x1 (t) + a2 x2 (t)} = a1 X1 (Ω) + a2 X2 (Ω), (1.42)

where X1 (Ω) and X2 (Ω) are the Fourier transforms of signals x1 (t) and
x2 (t), separately.
2. Realness
The Fourier transform of a signal is real (i.e., X ∗ (Ω) = X (Ω)), if

x ∗ (−t) = x (t),

since
"∞ "∞
t→−t
X ∗ (Ω) = x ∗ (t)e jΩt dt = x ∗ (−t)e− jΩt dt = X (Ω), (1.43)
−∞ −∞

if x ∗ (−t) = x (t).
3. Modulation
"∞
FT{ x (t)e jΩ0 t } = x (t)e jΩ0 t e− jΩt dt = X (Ω − Ω0 ) (1.44)
−∞
FT{2x (t) cos(Ω0 t)} = X (Ω − Ω0 ) + X (Ω + Ω0 ).

4. Shift in time
"∞
FT{ x (t − t0 )} = x (t − t0 )e− jΩt dt = X (Ω)e− jt0 Ω . (1.45)
−∞

5. Time-scaling
"∞
1 Ω
FT{ x ( at)} = x ( at)e− jΩt dt = X ( ). (1.46)
| a| a
−∞
6. Convolution
"∞ "∞
FT{ x (t) ∗t h(t)} = x (τ )h(t − τ )e− jΩt dτdt (1.47)
−∞ −∞
"∞ "∞
t−τ →u
= x (τ )h(u)e− jΩ(τ +u) dτdu = X (Ω) H (Ω).
−∞ −∞
Ljubiša Stanković Digital Signal Processing 39

7. Multiplication
"∞ "∞
1
FT{ x (t)h(t)} = x (t) H (θ )e jθt dθe− jΩt dt (1.48)

−∞ −∞
"∞
1
= H (θ ) X (Ω − θ )dθ = X (Ω) ∗Ω H (Ω) = H (Ω) ∗Ω X (Ω).

−∞

Convolution in frequency domain is denoted by ∗Ω with a factor of 1/2π


being included.
8. Parseval’s theorem
"∞ "∞
∗ 1
x (t)y (t)dt = X (Ω)Y ∗ (Ω)dΩ (1.49)

−∞ −∞
"∞ "∞
1
| x (t)|2 dt = | X (Ω)|2 dΩ.

−∞ −∞

9. Differentiation
⎧ ⎛ ⎞⎫
! 6 ⎨d "∞ ⎬
dx (t) ⎝ 1
FT = FT X (Ω)e jΩt dΩ⎠ = jΩX (Ω). (1.50)
dt ⎩ dt 2π ⎭
−∞

10. Integration
The Fourier transform of
"t
x (τ )dτ
−∞

can be calculated as the Fourier transform of


"∞ "t
x (t) ∗t u(t) = x (τ )u(t − τ )dτ = x (τ )dτ.
−∞ −∞

Then,
⎧ ⎫
⎨ "t ⎬
FT = FT{ x (t)}FT{u(t)} =
x (τ )dτ (1.51)
⎩ ⎭
−∞
* +
1 1
X (Ω) + πδ(Ω) = X (Ω) + πX (0)δ(Ω).
jΩ jΩ
40 Continuous-Time Signals and Systems

11. An analytic part of a signal x (t), whose Fourier transform is X (Ω), is a


signal with the Fourier transform defined by

⎨ 2X (Ω) for Ω > 0
Xa (Ω) = X (0) for Ω = 0 . (1.52)

0 for Ω < 0

It can be written as

Xa (Ω) = X (Ω) + X (Ω)sign(Ω) = X (Ω) + jXh (Ω) (1.53)

where Xh (Ω) is the Fourier transform of the Hilbert transform of the signal
x (t). From Example 1.9 with the signal x (t) = sign(t) and the duality prop-
erty of the Fourier transform pair, obviously the inverse Fourier transform
of sign(Ω) is j/(πt). Therefore, the analytic part of a signal, in the time
domain, reads as
"∞
j 1 x (τ )
x a (t) = x (t) + jxh (t) = x (t) + x (t) ∗t = x (t) + j dτ. (1.54)
πt π t−τ
−∞
p.v.

where p.v. stands for Cauchy principal value of the considered integral.

1.3.3 Relationship Between the Fourier Series and the Fourier Transform

Consider an aperiodic signal x (t), with the Fourier transform X (Ω). As-
sume that the signal is of a limited duration (i.e., x (t) = 0 for |t| > T0 /2).
Then,
T"0 /2
X (Ω) = x (t)e− jΩt dt. (1.55)
− T0 /2

If we make a periodic extension of x (t), with a period T, we get a signal



x p (t) = ∑ x (t + nT ).
n=−∞

The periodic signal x p (t) can be expanded into Fourier series with the
coefficients
T/2
"
1
Xn = x p (t)e− j2πnt/T dt. (1.56)
T
− T/2
Ljubiša Stanković Digital Signal Processing 41

If T > T0 it is easy to conclude that

T/2
" T"0 /2
− j2πnt/T
x p (t)e dt = x (t)e− jΩt dt|Ω=2πn/T
− T/2 − T0 /2

or
1
Xn =
X (Ω)|Ω=2πn/T . (1.57)
T
It means that the Fourier series coefficients are the samples of the Fourier
transform, divided by T. The only condition in the derivation of this relation
is that the signal duration is shorter than the period of periodic extension
(i.e., T > T0 ). The sampling interval in frequency is

2π 2π
∆Ω = , ∆Ω < .
T T0

It should be smaller than 2π/T0 , where T0 is the signal x (t) duration. This
is a form of the sampling theorem in the frequency domain. The sampling
theorem in the time domain will be discussed later.
In order to write the Fourier series coefficients in the Fourier transform
form, note that a periodic signal x p (t), formed by a periodic extension of
x (t) with period T, can be written as
∞ ∞
x p (t) = ∑ x (t + nT ) = x (t) ∗t ∑ δ(t + nT ). (1.58)
n=−∞ n=−∞

The Fourier transform of this periodic signal is


% ;

X p (Ω) = FT x (t) ∗t ∑ δ(t + nT ) (1.59)
n=−∞
* + * + * +
2π ∞ 2π 2π 2π 2π ∞
= X (Ω) · ∑ δ Ω− T n = T ∑ X T n δ Ω− T n
T n=− ∞ n=−∞

since
% ; "∞
∞ ∞
FT ∑ δ(t + nT ) = ∑ δ(t + nT )e− jΩt dt
n=−∞ n=−∞−∞
∞ * +
jΩnT 2π ∞ 2π
= ∑ e = ∑ δ Ω− T n .
T n=−
(1.60)
n=−∞ ∞
42 Continuous-Time Signals and Systems

The Fourier transform of a periodic signal is a series of generalized


impulse signals at Ω = 2πn/T with weighting factors X ( 2π T n )/T being
equal to the Fourier series coefficients Xn . The relation between periodic
generalized impulse signals in the time and frequency domain will be
explained (derived) later, (see Example 2.8).

1.4 FOURIER TRANSFORM AND STATIONARY PHASE METHOD

When a signal
x (t) = A(t)e jφ(t) (1.61)
is not of a simple analytic form, it may be possible, in some cases, to obtain
an approximative expression for its Fourier transform by using the method
of stationary phase.
The method of stationary phase states that if the phase function φ(t) is
monotonous and the amplitude A(t) is sufficiently smooth function, then
<
"∞
2πj
A(t)e jφ(t) e− jΩt dt ≃ A(t0 )e jφ(t0 ) e− jΩt0 , (1.62)
|φ′′ (t0 )|
−∞

where t0 is the solution of


φ′ (t0 ) = Ω.
The most significant contribution to the integral on the left side of
(1.62) comes from the region where the phase φ(t) − Ωt of the exponential
function exp( j(φ(t) − Ωt)) is stationary in time, since the contribution of
the intervals with fast varying φ(t) − Ωt tends to zero. It means that locally
around an instant t the signal behaves as exp ( j(φ′ (t)t). Value

Ωi ( t ) = φ′ ( t )

is called instantaneous frequency of a signal. Around the stationary phase


instant t0 holds
d (φ(t) − Ωt)
=0
dt | t = t0
φ′ (t0 ) − Ω = 0.

Around this point the phase can be expanded into a Taylor series as
1
φ(t) − Ωt = [φ(t0 ) − Ωt0 ] + [φ′ (t0 ) − Ω] + φ′′ (t0 )t2 + ...
2
Ljubiša Stanković Digital Signal Processing 43

Since φ′ (t0 ) − Ω = 0 the integral (1.62) is

"∞ "∞
1 ′′ ( t 2
A(t)e j(φ(t)−Ωt) dt ∼
= A(t0 )e j(φ(t0 )−Ωt0 ) ej 2 φ 0 )t dt
−∞ −∞

where A(t) ∼
= A(t0 ) is also used. With
<
"∞
j 12 at2 2πj
e dt =
| a|
−∞

the stationary phase approximation follows.


If the equation φ′ (t0 ) = Ω has two (or more) solutions t0+ and t0− , then
the integral on the left side of (1.62) is equal to the sum of functions at both
(or more) stationary phase points. Finally, this relation holds for φ′′ (t0 ) ̸= 0.
If φ′′ (t0 ) = 0, then similar analysis may be performed, using the lowest
nonzero phase derivative at the stationary phase point.
Example 1.11. Consider signal

x (t) = exp(−(t2 − 1)t2 ) exp( j4πt2 + j10πt).

Find its Fourier transform approximation by using the stationary phase


method.
⋆According to the stationary phase method,

8πt0 + 10π = Ω
Ω − 10π
t0 =

and
φ′′ (t0 ) = 8π. (1.63)
The amplitude of X (Ω) is
'< ' =
' 2π '' 2π
' 2 2
| X (Ω)| ≃ A(t0 ) ' ' = exp (−( t 0 − 1 ) t 0 )
' φ′′ (t0 ) ' 8π
( >* + ?* + )
1 Ω − 10π 2 Ω − 10π 2
= exp − −1 (1.64)
2 8π 8π

The signal, stationary phase approximation of the Fourier transform and the
numerical value of the Fourier transform amplitudes are shown in Fig.1.7
44 Continuous-Time Signals and Systems

1
x(t)

-1

-4 -3 -2 -1 0 1 2 3 4
t
1

Stationary phase method


|X(Ω)|

0.5

0
-100 -80 -60 -40 -20 0 20 40 60 80 100
Ω
1

Numeric calculation
|X(Ω)|

0.5

0
-100 -80 -60 -40 -20 0 20 40 60 80 100
Ω

Figure 1.7 The signal (top), along with the stationary phase method approximation of its
Fourier transform and the Fourier transform obtained by a numeric calculation (bottom).

Example 1.12. Consider a frequency-modulated signal

x (t) = A(t) exp( jat2N ).

where A(t) is a slow-varying non-negative function. Find its Fourier trans-


form approximation by using the stationary phase method.
⋆According to the stationary phase method, we get that the stationary
−1
phase point is 2Nat2N
0 = Ω with
* +1/(2N −1)

t0 =
2Na
Ljubiša Stanković Digital Signal Processing 45

and * +
Ω (2N −2)/(2N −1)
φ′′ (t0 ) = 2N (2N − 1) a . (1.65)
2Na
The amplitude and phase of X (Ω), according to (1.62), are
' '
2 2
' 2π '
'
| X (Ω)| ≃ A (t0 ) ' ′′ ' (1.66)
φ ( t0 ) '
* +1/(2N −1) '' * +1/(2N −1) ''
Ω ' 2π Ω '
= A2 ( )' '
2Na ' (2N − 1)Ω 2aN '
* +1/(2N −1)
(1 − 2N ) Ω
arg { X (Ω)} ≃ φ(t0 ) − Ωt0 + π/4 = Ω + π/4
2N 2aN

for a large value of a.


For N = 1 and A(t) = 1, we get | X (Ω)|2 = |π/a| and arg { X (Ω)} =
−Ω2 /(4a) + π/4.

The method of stationary phase may be defined in the frequency


domain as well. For a Fourier transform

X (Ω) = B(Ω)e jθ (Ω) (1.67)

the method of stationary phase states that if the Fourier transform phase
function θ (t) is monotonous and the amplitude B(t) is sufficiently smooth
function, then
<
"∞
1 jθ (Ω) jΩt jθ (Ω0 ) jΩ0 t j
x (t) = B(Ω)e e dΩ ≃ B(Ω0 )e e , (1.68)
2π 2π |θ ′′ (Ω0 )|
−∞

where Ω0 is the solution of

−θ ′ (Ω0 ) = t,

and
t g = −θ ′ (Ω)
is the group delay.
Example 1.13. Consider a system with transfer function

H (Ω) = exp(−Ω2 ) exp(− jaΩ2 /2 − jbΩ).

Find its impulse response by using the stationary phase method.


46 Continuous-Time Signals and Systems

⋆According to the stationary phase method,

aΩ0 + b = t
t−b
Ω0 =
a
and
θ ′′ (Ω0 ) = − a.
The impulse response is
<
2 j
h(t)) ≃ exp(−Ω20 )e− jaΩ0 /2− jbΩ0 + jΩ0 t
2π |θ ′′ (Ω0 )|
* + =
t − b 2 j((t−b)2 /(2a)+π/4) 1
= exp(− )e .
a 2πa

The signal amplitude is delayed for b. The second order parameter a in


the phase function scales time axis of the impulse response. This is an
undesirable effect in common systems.

Example 1.14. For a system with frequency response H (Ω) = | H (Ω)| e j0 the im-
pulse response is h(t). Find the impulse response of the systems with transfer
functions shown in Fig.1.8 with:
(a) Ha (Ω) = | H (Ω)| e− j4Ω ,
2
(b) Hb (Ω) = | H (Ω)|@e− j2πΩ , and A
3
(c) Hc (Ω) = | H (Ω)| 4 + 14 cos(2πΩ2 ) e j0 .

⋆(a) The impulse response is

"∞
1
h a (t) = H (Ω)e− j4Ω e jΩt = h(t − 4).

−∞

It is delayed with respect to h(t) for t0 = 4.


(b) In this case

"∞
1 2
hb (t) = H (Ω)e− j2πΩ e jΩt dΩ.

−∞

The group delay is t g = −θ ′ (Ω) = 4πΩ. According to the stationary phase


method, by replacing Ω with t/(4π ), we get
* + =
t j(t2 /8π +π/4) 1
hb (t) = H e .
4π 8π 2
Ljubiša Stanković Digital Signal Processing 47

|Hb(jΩ)|
|Ha(jΩ)|

|H (jΩ)|
c
Ω Ω Ω
arg{Hb(jΩ)}
arg{Ha(jΩ)}

arg{H (jΩ)}
c
Ω Ω Ω
|ha(t)|=|h(t-4)|

|hb(t)|

|h (t)|
c

t t t

Figure 1.8 Frequency response of systems (amplitude, top row, and phase, middle row) with
corresponding impulse responses (amplitude - bottom row).
48 Continuous-Time Signals and Systems

Nonlinear group delay causes & ∞ time scaling


&∞and form change of the impulse
response. Note: Check that −∞ h2 (t)dt = −∞ h2b (t)dt. The impulse response
is calculated numerically as well. The agreement with the approximative
result is high, Fig.1.8(third row, middle column)
(c) Since 2 cos(2πΩ2 ) = exp( j2πΩ2 ) + exp(− j2πΩ2 )
3 1 1
hc (t) = h(t) + h (t) + hb (−t)
4 8 b 8
3 1
= h(t) + h ( t ).
4 4 b
Here, fast variations of the amplitude result in a two-component impulse
response, one being proportional to the impulse response from case (a) and
the other proportional to the form from (b).

1.5 LAPLACE TRANSFORM

The Fourier transform could be considered as a special case of the Laplace


transform. At the beginning, Fourier’s work was even not published as an
original contribution due to this fact. The Laplace transform is defined by

"∞
X (s) = L{ x (t)} = x (t)e−st dt, (1.69)
−∞

where s = σ + jΩ is a complex number. It is obvious that the Fourier


transform is the value of a Laplace transform along the imaginary axis, σ = 0
or s = jΩ. This form of the Laplace transform is also known as the bilateral
Laplace transform (in contrast to unilateral one, where the integration limits
are from 0− to ∞).
Example 1.15. Calculate the Laplace transform of x (t) = e−at u(t).
⋆According to the definition
'∞
'
"∞ e−(s+ a)t ' 1
X (s) = e− at e−st dt = − 0
=
s+a s+a
0

if
lim e−(s+ a)t = 0
t→∞
or σ + a > 0, that is, σ > − a. Therefore, the region of convergence of this
Laplace transform is the region where σ > − a. The point s = − a is the pole of
Ljubiša Stanković Digital Signal Processing 49

the Laplace transform. The region of convergence is limited by a vertical line


in the complex s-plane, passing through a pole.

The Laplace transform may be considered as a Fourier transform of a


signal x (t) multiplied by exp(−σt), with varying parameter σ,

"∞ "∞
−σt −σt − jΩt
FT{ x (t)e }= x (t)e e dt = x (t)e−st dt = X (s). (1.70)
−∞ −∞

In this way, we may calculate the Laplace transform of functions that


are not absolutely integrable
&∞ (i.e., do not satisfy condition for the Fourier
transform existence, −∞ | x (t)| dt < ∞) In these cases, for some values of
σ, the new signal x (t)e−σt may be absolutely integrable and the Laplace
transform could exist. In the previous example, the Fourier transform does
not exist for a < 0, while for a = 0 it exists in the generalized functions
sense only. Laplace transform of the considered signal always exists, with
the region of convergence σ > − a. If a > 0, then the region of convergence
σ > − a includes the line σ = 0, meaning that the Fourier transform exists.
The inverse Laplace transform is

γ"+ jT
1
x (t) = lim X (s)est ds
2πj T →∞
γ− jT

where the integration is performed along a path in the region of conver-


gence of X (s).
Example 1.16. Consider a signal x (t) such that x (t) = 0 for |t| > T (time-limited
signal). Its Fourier transform is X (Ω). Derive the relation to calculate the
Laplace transform X (s) for any σ within the region of convergence, based
on the value of X (Ω).
1
&∞ jΩt dΩ. The
⋆Based on X (Ω) the signal values are x (t) = 2π −∞ X (Ω)e
Laplace transform is
⎛ ⎞
"T "∞
1
X (s) = ⎝ X (Ω)e dΩ⎠ e−st dt
jΩt

−T −∞
"∞ "T "∞
1 1 sinh(( jΩ − s) T )
= X (Ω) e−st+ jΩt dt dΩ = X (Ω) dΩ. (1.71)
2π π jΩ − s
−∞ −T −∞

within the region of convergence.


50 Continuous-Time Signals and Systems

Properties of the Laplace transform may easily be generalized from


those presented for the Fourier transform, like for example

L{ ax (t) + by(t)} = aL{ x (t)} + bL{y(t)} = aX (s) + bY (s),

L{ x (t) ∗t h(t)} = L{ x (t)}L{ h(t)} = X (s) H (s).

Since the Laplace transform will be used to describe linear systems de-
scribed by linear differential equations we will consider only the relation of
the signal derivatives with the corresponding forms in the Laplace domain.
In general the Laplace transform of the first derivative dx (t)/d(t) of a signal
x (t) is
"∞ "∞
dx (t) −st
e dt = s x (t)e−st dt = sX (s).
dt
−∞ −∞

This relation follows by integration in part of the first integral, with the
assumption that the values of x (t)e−st are zero as t → ±∞.
In many applications it has been assumed that the systems are causal
with corresponding causal signals used in calculations. In these cases x (t) =
0 for t < 0, i.e., x (t) = x (t)u(t). Then the so called one-sided Laplace trans-
form (unilateral Laplace transform) is used. Its definition is

"∞
X (s) = x (t)e−st dt.
0

When dealing with the derivatives of causal signals we have to take


care about possible discontinuity at t = 0.
In general the first derivative of the function x (t)u(t) is

d( x (t)u(t)) dx (t)
= u ( t ) + x (0 ) δ ( t ).
dt dt

The Laplace transform of the first derivative of a causal signal is

"∞ "∞
dx (t) −st
e dt = x (t)e−st |0∞ + s x (t)e−st dt = sX (s) − x (0).
dt
0 0

Value of signal at t = 0, denoted by x (0), is the initial condition.


Ljubiša Stanković Digital Signal Processing 51

These relations can easily be generalized to higher order derivatives

"∞ n "∞
d x (t) −st
n
e dt = s n
x (t)e−st dt − sn−1 x (0) − sn−2 x ′ (0) − ... − x (n−1) (0)
dt
0 0
= s X (s) − sn−1 x (0) − sn−2 x ′ (0) + ... − x (n−1) (0).
n

The Laplace transform of an integral of x (t) is

"t
1
L{ x (τ )dτ } = L{u(t) ∗t x (t)} = X (s)},
s
0
&∞
since L{u(t)} = 0 e−st dt = 1/s.
The initial and final values of the signal are x (0) = lims→∞ sX (s) and
x (∞) = lims→0 sX (s), respectively.

1.5.1 Linear Systems Described by Differential Equations

After we have established the relation between the Laplace transform and
signals derivatives we may use it to analyze the systems described by
differential equations. Consider a causal system

d N y(t) dy(t) d M x (t) dx (t)


aN + ... + a 1 + a 0 y ( t ) = b M + ... + b1 + b0 x (t)
dt N dt dtn dt

with the initial conditions x (0) = x ′ (0) = x (n−1) (0) = 0. The Laplace trans-
form of both sides of this differential equation is

a N s N Y (s) + ... + a1 sY (s) + a0 Y (s) = b M s M X (s) + ... + b1 sX (s) + b0 X (s).

Transfer function of this system is of the form

Y (s) b s M + ... + b1 s + b0
H (s) = = M N .
X (s) a N s + ... + a1 s + a0

Example 1.17. A causal system is described by the differential equation


d2 y ( t ) dy(t)
+3 + 2y(t) = x (t)
dt2 dt
with the initial conditions y′(0) = 1 and y(0) = 0. Find the system output y(t)
for x (t) = e−4t u(t).
52 Continuous-Time Signals and Systems

⋆The Laplace transform of both sides is


[s2 Y (s) − sy(0) − y′ (0)] + 3[sY (s) − y(0)] + 2Y (s) = X (s)
or
Y (s)(s2 + 3s + 2) = X (s) + sy(0) + y′ (0) + 3y(0).
With X (s) = 1/(s + 4) follows
s+5 A1 A2 A3
Y (s) = = + + .
(s + 4)(s2 + 3s + 2) s+4 s+1 s+2
The coefficients Ai are obtained from
A i = ( s − s i )Y ( s ) | s = s i .
For example,
s+5
A1 = ( s + 4) = 1/6.
(s + 4)(s2 + 3s + 2) |s=−4

The other two coefficients are A2 = −3/2 and A3 = 4/3.


The output signal is
1 −4t 3 4
y(t) = e u(t) − e−2t u(t) + e−t u(t).
6 2 3

1.5.2 Table of the Laplace Transform

Signal x (t) Laplace transform X (s)


δ(t) 1
u(t) 1/s
1
e at u(t) s− a
tu(t) 1/s2
s− a
e at cos(Ω0 t)u(t) (s− a)2 +Ω20
Ω0
e at sin(Ω0 t)u(t) (s− a)2 +Ω20
1
te at u(t) ( s − a )2
x ′ (t)u(t) sX (s) − x (0)
tx (t)u(t) −
&∞dX (s)/ds
x (t)u(t)/t s F (s )ds
e at x (t)u(t) X (s − a)
&t
x (t) ∗ u(t) = 0 x (t)dt X (s)/s
Ljubiša Stanković Digital Signal Processing 53

N=2 N=4 N=32


|H(jΩ)|2

|H(jΩ)|2
|H(jΩ)|
Ω Ω Ω

Figure 1.9 Squared amplitude of the frequency response of a Butterworth filter of order N.

1.6 BUTTERWORTH FILTER

The most common processing systems in communications and signal pro-


cessing are filters, used to selectively pass a part of the input signal in the
frequency domain and to reduce possible interferences. The basic form is a
lowpass filter. Here we will present a simple Butterworth lowpass filter.
The squared frequency response of the Butterworth lowpass filter is

1
| H ( jΩ)|2 = B C2N .

1+ Ωc

It is shown in Fig.1.9. This filter definition contains two parameters. Order of


the filter is N. It is a measure of the transition sharpness from the passband
to the stopband region. For N → ∞ the amplitude form of an ideal lowpass
filter is achieved. The second parameter is the critical frequency. At Ω = Ωc
we get | H ( jΩc )|2 = | H (0)|2 /2 = 1/2, corresponding to −3[dB] gain for any
filter order N.
The squared frequency response may be written as

1
H ( jΩ) H (− jΩ) = B C2N
jΩ
1+ jΩc
1
H (s) H (−s) = B C2N for s = jΩ.
s
1+ jΩc
54 Continuous-Time Signals and Systems

N=3 N=4 N=5


Im{s}

Im{s}

Im{s}
Re{s} Re{s} Re{s}

Figure 1.10 Poles of a stable Butterworth filter for N = 3, N = 4, and N = 5.

Poles of the product of transfer functions H (s) H (−s) are


* +2N
sk
= −1 = e j(2πk+π )
jΩc
sk = Ωc e j(2πk+π )/2N + jπ/2 for k = 0, 1, 2, ..., 2N − 1.

Poles of the Butterworth filter are located on a circle whose radius is Ωc at


the angles
2πk + π π
αk = + for k = 0, 1, 2, ..., 2N − 1.
2N 2
For a given filter order N and frequency Ωc the only remaining decision is
to select a half of the poles sk that belong to H (s) and to declare that the
remaining half of the poles belong to H (−s). Since we want that a filter is
stable then we chose the poles

s0 , s1 , ..., s N −1

within the left side of the s plane, where Re{s} < 0, i.e., π/2 < αk < 3π/2.
The symmetric poles with Re {s} > 0 are the poles of H (−s). They are not
used in the filter design.
Example 1.18. Design a lowpass Butterworth filter with:
(a) N = 3 with Ωc = 1,
(b) N = 4 with Ωc = 3.
⋆(a) Poles for N = 3 with Ωc = 1 have the phases

2πk + π π
αk = + , for k = 0, 1, 2.
6 2
Ljubiša Stanković Digital Signal Processing 55

Their values are



2π 2π 1 3
s0 = cos( ) + j sin( ) = − + j
3 3 2 2
2π π 2π π
s1 = cos( + ) + j sin( + ) = −1
3 3 3 3

2π 2π 2π 2π 1 3
s2 = cos( + ) + j sin( + )=− −j
3 3 3 3 2 2

with
c 1
H (s) = √ √ =
(s + 1
−j 3 1 3 (s2 + s + 1)(s + 1)
2 2 )( s + 2 +j 2 )( s + 1)

where c = 1 is used to make H (0) = 1.


(b) Poles for N = 4 with Ωc = 3 are at angles

2πk + π π
αk = + , for k = 0, 1, 2, 3.
8 2

Their values are


π π π π
s0 = 3 cos( + ) + j3 sin( + )
2 8 2 8
π 3π π 3π
s1 = 3 cos( + ) + j3 sin( + )
2 8 2 8
π 5π π 5π
s2 = 3 cos( + ) + j3 sin( + )
2 8 2 8
π 7π π 7π
s3 = 3 cos( + ) + j3 sin( + )
2 8 2 8

with
c
H (s) =
(s2 + 2.296s + 9)(s2 + 5.543s + 9)
9
= 2
(s + 2.296s + 9)(s2 + 5.543s + 9)

where c = 9 is used to make H (0) = 1.

In practice we usually do not know the filter order, but its passband
frequency Ω p and stopband frequency Ωs , with a maximal attenuation in
the passband a p [dB] and a minimal attenuation in the stopband a p [dB], as
shown in Fig.1.11. Based on these values we can calculate the order N and
the critical frequency Ωc needed for a filter design.
56 Continuous-Time Signals and Systems

1
A
p
|H(jΩ)|2

A
s

Ω Ω
p s

Figure 1.11 Specification of a Butterworth filter parameters in the passband and stopband.

The relations for N and Ωc are

1 2
B C2N ≥ A p (1.72)
Ωp
1+ Ωc
1 2
B C2N ≤ As .
Ωs
1+ Ωc

Using equality in both relations, it follows

ln( A12 − 1) − ln( A12 − 1)


1 p s
N= .
2 ln Ω p − ln Ωs

Nearest greater integer is assumed for the filter order N. Then we can
use any of the relations in (1.72) with equality sign to calculate Ωc . If we
' '2
choose the first one then Ωc will satisfy ' H ( jΩ p )' = A2p , while if we use
the second relation the value of Ωc will satisfy | H ( jΩs )|2 = A2s . These two
values differ. However both of them are within the defined criteria for the
transfer function.
The relation
a = 20 log A
or A = 10a/20 should be used for the attenuation given in [dB] .
All other filter forms, like passband and highpass, may be obtained
from a lowpass filter with appropriate signal modulations. These modula-
tions will be discussed for discrete-time filter forms in Chapter V.
Part II

Discrete Signals and Systems

57
Chapter 2
Discrete-Time Signals and Transforms

first step in numerical processing of signals is in their discretiza-

T
HE
tion in time. A continuous-time signal is converted into a sequence
of numbers, defining the discrete-time signal. The basic definitions
of discrete-time signals and their transforms are presented in this chapter.
The key fact in the conversion from a continuous-time signal into a sequence
of numbers is that these two signal representations are equivalent under cer-
tain conditions. The discrete-time signal may contain the same information
as the original continuous-time signal. The sampling theorem is fundamen-
tal for this relation between two signal forms. It is presented in this chapter,
after basic definitions of discrete-time signals and systems are introduced.

2.1 DISCRETE-TIME SIGNALS

Discrete-time signals (discrete signals) are represented in a form of an or-


dered set of numbers { x (n)}. Commonly, they are obtained by sampling
continuous-time signals. There exist discrete-time signals whose indepen-
dent variable is inherently discrete in nature as well.
In the case that a discrete-time signal is obtained by sampling a
continuous-time signal, we can write (Fig. 2.1),

x (n) = x (t)|t=n∆t ∆t. (2.1)

Discrete-time signals are defined for an integer value of the argument


n. We will use the same notation for continuous-time and discrete-time
signals, x (t) and x (n). However, we hope that this will not cause any
confusion since we will use different sets of variables, for example, t and
τ for continuous time and n and m for discrete time. Also, we hope that the

59
60 Discrete-Time Signals and Transforms

x(t) x(n) = x(t) Δt t = nΔt

Δt t n

Figure 2.1 Signal discretization: continuous-time signal (left) and corresponding discrete-
time signal (right).

context will always be clear, so that there is no doubt what kind of signal is
considered. Notation x [n] is sometimes used in literature for discrete-time
signals, instead of x (n).

Examples of discrete-time signals are presented next.


The discrete-time impulse signal is defined by
!
1, for n = 0
δ(n) = . (2.2)
0, for n ̸= 0

It is presented in Fig. 2.2.


In contrast to the continuous-time impulse signal, that cannot be prac-
tically implemented and used, the discrete-time unit impulse is a signal that
can easily be implemented and used in realizations. In mathematical nota-
tion, this signal corresponds to the Kronecker delta function
!
1, for m = n
δm,n = (2.3)
0, for m ̸= n.

Any discrete-time signal can be written in a form of a sum of shifted


and weighted discrete-time impulses,

x (n) = ∑ x ( k ) δ ( n − k ), (2.4)
k=−∞

as illustrated in Fig.2.3.
The discrete unit-step signal is defined by
!
1, for n ≥ 0
u(n) = . (2.5)
0, for n < 0
Ljubiša Stanković Digital Signal Processing 61

1 1
x(n)=u(n)

δ(n)
0 0

-1 -1
(a) (b)
-10 0 10 -10 0 10
t n
1 1
x(n)=b(n)

sin(nπ/4)
0 0

-1 -1
(c) (d)
-10 0 10 -10 0 10
n n

Figure 2.2 Illustration of discrete-time signals: (a) unit-step function, (b) discrete-time im-
pulse signal, (c) boxcar signal b(n) = u(n + 2) − u(n − 3), and (d) discrete-time sinusoid.

4 4

2 2
-2 δ (n+2)
x(n)

0 0

-2 -2

-4 -4
-5 0 5 -5 0 5
n n
4 4

2 2
- δ(n-1 )
3δ(n)

0 0

-2 -2

-4 -4
-5 0 5 -5 0 5
n n

Figure 2.3 Signal x (n) along with corresponding discrete-time impulses.


62 Discrete-Time Signals and Transforms

The discrete-time impulse and the unit-step signal are related as

δ ( n ) = u ( n ) − u ( n − 1)
n
u(n) = ∑ δ ( k ).
k=−∞

The discrete-time complex sinusoidal signal is defined by

x (n) = Ae j(ω0 n+ ϕ) = A cos(ω0 n + ϕ) + jA sin(ω0 n + ϕ). (2.6)

A discrete-time signal is periodic if there exists an integer N such that

x ( n + N ) = x ( n ). (2.7)

Smallest positive integer N that satisfies this equation is called the


period of the discrete-time signal x (n). Note that the signal x (n) with
a period N is also periodic with any integer multiple of N. Some basic
discrete-time signals are presented in Fig. 2.2.
Example 2.1. Check the periodicity of discrete-time signals x1 (n) = sin(2πn/36),
x2 (n) = cos(4πn/15 + 2), x3 (n) = exp( j0.1n), x4 (n) = x1 (n) + x2 (n), and
x5 ( n ) = x1 ( n ) + x3 ( n ).
⋆Period of the discrete-time signal x1 (n) = sin(2πn/36) is obtained
from 2πN1 /36 = 2πk, where k is an integer. It is N1 = 36, for k = 1. The period
N2 follows from 4πN2 /15 = 2πk as N2 = 15 with k = 2. Period of signal x3 (n)
should be calculated from 0.1N3 = 2πk. Obviously, there is no integer k such
that N3 is an integer. This signal is not periodic. The same holds for x5 (n). The
period of x4 (n) is a common period for signals x1 (n) and x2 (n) with N1 = 36
and N2 = 15. It is N4 = 180.

A discrete-time signal is even if

x (n) = x (−n).

For an odd signal holds


x (n) = − x (−n).
Example 2.2. Show that a discrete-time signal may be written as a sum

x (n) = xe (n) + xo (n)

where xe (n) and xo (n) are its even and odd part, respectively.
Ljubiša Stanković Digital Signal Processing 63

⋆For a signal x (n) we can form its even and odd part as
x (n) + x (−n)
xe (n) =
2
x (n) − x (−n)
xo (n) = .
2
Summing these two parts, the signal x (n) is reconstructed. Note that xo (0) =
0.

A signal is Hermitian if

x (n) = x ∗ (−n).

Magnitude of a discrete-time signal is defined as the maximal value of


the signal amplitude
Mx = max | x (n)| .
−∞<n<∞
Energy of discrete-time signals is defined by

Ex = ∑ | x (n)|2 . (2.8)
n=−∞

The instantaneous power of x (n) is Px (n) = | x (n)|2 , while the average


signal power is

1 N # $
PAV = lim ∑ | x (n)|2 = | x (n)|2 , (2.9)
N →∞ 2N + 1 n=− N
# $
where | x (n)|2 is used to denote an average over large number of signal
values, as N → ∞. The average power of signals with a finite energy (energy
signals) is PAV = 0. For power signals (when 0 < PAV < ∞) the energy is
infinite, Ex → ∞.
Example 2.3. The energy of signal x (n) is Ex = 10. The energy of its even part is
Exe = 3. Find the energy of its odd part.
⋆The energy of signal is
∞ ∞
Ex = ∑ | x (n)|2 = ∑ | xe (n) + xo (n)|2
n=−∞ n=−∞

= ∑ [ xe (n) + xo (n)][ xe (n) + xo (n)]∗
n=−∞
∞ ∞ ∞
= ∑ | xe (n)|2 + ∑ | xo (n)|2 + ∑ [ xo (n) xe∗ (n) + xe (n) xo∗ (n)].
n=−∞ n=−∞ n=−∞
64 Discrete-Time Signals and Transforms

The terms xo (n) xe∗ (n) and xe (n) xo∗ (n) in the last sum correspond to odd
signals

xo (−n) xe∗ (−n) = − xo (n) xe∗ (n)


xe (−n) xo∗ (−n) = − xe (n) xo∗ (n).

Their sum is zero,


∞ ∞
∑ xo (n) xe∗ (n) = ∑ xe (n) x0∗ (n) = 0.
n=−∞ n=−∞

For the signals xe (n) and xo (n), satisfying the previous relation, we say that
they are orthogonal.
Therefore, for the energies Ex , Exe , and Exo , holds

Ex = Ex e + Ex o .

Obviously Ex0 = Ex − Exe = 7.

2.1.1 Discrete-Time Systems

Discrete-time (discrete) system transforms one discrete-time signal (input)


into the other (output signal)

y(n) = T { x (n)}. (2.10)

A discrete system T {·} is linear if for any two signals x1 (n) and x2 (n) and
any two constants a1 and a2 holds

y(n) = T { a1 x1 (n) + a2 x2 (n)} = a1 T { x1 (n)} + a2 T { x2 (n)}. (2.11)

A discrete system is time-invariant if for

y(n) = T { x (n)} (2.12)

holds
T { x (n − n0 )} = y(n − n0 ),
for any t0 .
For any input signal x (n) the signal at the output of a linear time-
invariant discrete system can be calculated if we know the output to the
impulse signal. The output to the impulse signal, h(n) = T {δ(n)}, is the
impulse response.
Ljubiša Stanković Digital Signal Processing 65

3 3
2 2
1 1

h(n)
x(n)

0 0
-1 -1
-2 -2
-4 -2 0 2 4 6 8 -4 -2 0 2 4 6 8
n n
Figure 2.4 Input signal and impulse response.

The output to an input signal x (n) is


% ;

y(n) = T { x (n)} = T ∑ x (k )δ(n − k ) .
k=−∞

For a linear time-invariant discrete system we get


∞ ∞
y(n) = ∑ x (k )T {δ(n − k )} = ∑ x ( k ) h ( n − k ). (2.13)
k=−∞ k=−∞

This is a discrete-time convolution. Its notation is



x (n) ∗n h(n) = ∑ x ( k ) h ( n − k ). (2.14)
k=−∞

Discrete-time convolution is a commutative operation,

x ( n ) ∗ n h ( n ) = h ( n ) ∗ n x ( n ). (2.15)
Example 2.4. Calculate discrete-time convolution of signals x (n) and h(n) shown
in Fig. 2.4.
⋆By definition, according to Fig. 2.5, we have

y (0) = ∑ x (k)h(−k) = 1 − 1 + 2 = 2,
k=−∞

y (1) = ∑ x (k)h(1 − k ) = −1 − 1 + 1 + 4 = 3.
k=−∞

In a similar way y(−2) = 2, y(−1) = −1, y(2) = 6, y(3) = 2, y(4) = −1,


y(5) = −1, and y(n) = 0, for all other n. The convolution y(n) is shown in
Fig. 2.6.
66 Discrete-Time Signals and Transforms

3 3
2 2

h(-k )
1 1
x(k)

0 0
-1 -1
-2 -2
-4 -2 0 2 4 6 8 -4 -2 0 2 4 6 8
n n
3 3
2 2
h(1- k)

h(2- k)
1 1
0 0
-1 -1
-2 -2
-4 -2 0 2 4 6 8 -4 -2 0 2 4 6 8
n n

Figure 2.5 Signals for the output y(0), y(1), and y(2) calculation.

8
6
4
y(n)

2
0
-2
-4 -2 0 2 4 6 8
n

Figure 2.6 Resulting output signal y(n).

Example 2.5. Calculate the convolution of signals x (n) = n[u(n) − u(n − 10)] and
h ( n ) = u ( n ).
⋆The convolution is

y(n) = ∑ k[u(k) − u(k − 10)]u(n − k ) =
k=−∞
⎧ n

⎪ n +1
⎨ ∑ k=n 2 for 0≤n≤9
k =0
= ∑ k=
⎪ 9
0≤k ≤9 and k≤n ⎪
⎩ ∑ k = 45 for n>9
k =0
n+1
=n [u(n) − u(n − 10)] + 45u(n − 10).
2
Ljubiša Stanković Digital Signal Processing 67

Example 2.6. If the response of a linear time-invariant system to the unit-step is


y(n) = T {u(n)} = e−n u(n) find the impulse response h(n) of this system.
⋆The impulse response is
h(n) = T {δ(n)} = T {u(n) − u(n − 1)} = T {u(n)} − T {u(n − 1)}
= e−n u(n) − e−(n−1) u(n − 1) = e−n [u(n) − e u(n − 1)].

A discrete system is causal if there is no response before the input


signal appears. For causal discrete systems h(n) = 0 for n < 0 holds. For a
signal that may be an impulse response of a causal system we say that it is
a causal signal or one-sided signal.
A discrete system is stable if any input signal with finite magnitude
Mx = max−∞<t<∞ | x (n)| produces the output y(n) whose values are finite,
|y(n)| < ∞. A discrete linear time-invariant system is stable if

∑ |h(m)| < ∞. (2.16)
m=−∞

The output of a linear time-invariant system is


∞ ∞
|y(n)| = | ∑ x (n − m)h(m)| ≤ ∑ | x (n − m)||h(m)|
m=−∞ m=−∞

≤ Mx ∑ |h(m)|.
m=−∞

Therefore |y(n)| < ∞ if (2.16) holds. It can be shown that the absolute sum
convergence of the impulse response is the necessary condition for a linear
time-invariant discrete system to be stable as well.

2.2 FOURIER TRANSFORM OF DISCRETE-TIME SIGNALS

The Fourier transform of a discrete-time signal is defined by



X (e jω ) = ∑ x (n)e− jωn . (2.17)
n=−∞

Notation X (e jω ) is used to emphasize the fact that it is a periodic function


of the normalized frequency ω. The period is 2π.
68 Discrete-Time Signals and Transforms

In order to establish the relation between the Fourier transform of


discrete-time signals and the Fourier transform of continuous-time signals,
"∞
X (Ω) = x (t)e− jΩt dt,
−∞
we will write an approximation of the Fourier transform of continuous-time
signal according to the rectangular rule of numerical integration,

X (Ω) ∼
= ∑ x (n∆t)e− jΩn∆t ∆t. (2.18)
n=−∞

By using the notation

x (n∆t)∆t −→ x (n)
Ω∆t −→ ω, (2.19)

the previous approximation can be written as



∑ x (n)e− jωn = X (e jω ). (2.20)
n=−∞

This is the Fourier transform of the discrete-time signal x (n).


Later we will show that, under certain conditions, the Fourier trans-
form X (e jω ) of discrete-time signals is not just an approximation of the
Fourier transform X (Ω) of continuous-time signals, but the equality holds
(i.e., X (Ω) = X (e jω )) with Ω∆t = ω and −π ≤ ω < π.
The inverse Fourier transform of discrete-time signals is obtained by
multiplying both sides of (2.20) by e jωm and integrating them over a period
of X (e jω )
∞ "π "π
− jω (n−m)
∑ x (n) e dω = X (e jω )e jωm dω.
n=−∞ −π −π
Since

sin ((n − m)π )
e− jω (n−m) dω = 2 = 2πδ(n − m),
(n − m)
−π
we get

1
x (n) = X (e jω )e jωn dω. (2.21)

−π
Ljubiša Stanković Digital Signal Processing 69

Example 2.7. Find the Fourier transform of the discrete-time signal

x (n) = Ae−α|n|

where α > 0 is a real constant.


⋆The Fourier transform of this signal is
−1 ∞
X (e jω ) = A + ∑ Aeαn− jωn + ∑ Ae−αn− jωn
n=−∞ n =1
( )
e jω −α e− jω −α 1 − e−2α
= A 1+ + =A . (2.22)
1 − e jω −α 1 − e− jω −α 1 − 2e−α cos(ω ) + e−2α

Example 2.8. Find the inverse Fourier transform of a discrete-time signal if


X (e jω ) = 2πδ(ω ) for −π ≤ ω < π and X (e jω ) = 2π ∑∞
k=−∞ δ (ω + 2kπ ) for
any ω.
⋆By definition

1
x (n) = 2πδ(ω )e jωn dω = 1.

−π

Therefore, the Fourier transform of signal x (n) = 1 is


∞ ∞
∑ e− jωn = 2π ∑ δ(ω + 2kπ ). (2.23)
n=−∞ k=−∞

The equivalent form in the continuous-time domain is obtained (by using


ω = ΩT and δ( TΩ) = δ(Ω)/T) as
∞ ∞
2π ∞
∑ e jΩnT = 2π ∑ δ(ΩT + 2kπ ) = ∑ δ(Ω + 2kπ/T ). (2.24)
n=−∞ k=−∞
T k=− ∞

2.2.1 Properties

The Fourier transform of discrete-time signals is linear

FT{ ax (n) + by(n)} = aX (e jω ) + bY (e jω ), (2.25)

where X (e jω ) and Y (e jω ) are the Fourier transforms of the discrete-time


signals x (n) and y(n), respectively.
70 Discrete-Time Signals and Transforms

With respect to the signal shift and modulation the Fourier transform
of discrete-time signals behaves in the same way as the Fourier transform
of continuous-time signals,

FT{ x (n − n0 )} = X (e jω )e jn0 ω (2.26)

and
FT{ x (n)e jω0 n } = X (e j(ω −ω0 ) ). (2.27)
Example 2.9. The Fourier transform of a discrete-time signal x (n) is X (e jω ).
Find the Fourier transform of y(n) = x (2n).
⋆For y(n) = x (2n) the Fourier transform is

FT{ x (2n)} = ∑ x (2n)e− jωn
n=−∞

x (n) + (−1)n x (n)
= ∑ e− jωn/2
n=−∞ 2

1
= ∑ [x(n) + e− jnπ x(n)]e− jωn/2
2 n=− ∞
1 1
= [ X (e jω/2 ) + X (e j(ω/2+π ) )] = [ X (e jω/2 ) + X (e j(ω +2π )/2 )]. (2.28)
2 2
The period of this Fourier transform is 2π. Period of X (e jω/2 ) is 4π.

Example 2.10. Calculate the Fourier transform of the discrete-time signal (rectan-
gular window),
w R ( n ) = u ( N + n ) − u ( n − N − 1 ). (2.29)
Write the Fourier transform of a Hann(ing) window
1
w H (n) = [1 + cos(nπ/N )] [u( N + n) − u(n − N − 1)] .
2

⋆By definition
N
1 − e− jω (2N +1) sin(ω 2N2+1 )
WR (e jω ) = ∑ e− jωn = e jωN = . (2.30)
n=− N 1 − e− jω sin(ω/2)

The Fourier transform of the Hann(ing) window can easily be written as


* +
1 N 1 1
WH (e jω ) = ∑ 1 + e jnπ/N + e− jnπ/N e− jωn = (2.31)
2 n=− N 2 2
π 2N +1 π 2N +1
sin(ω 2N2+1 ) sin((ω − N ) 2 ) sin((ω + N ) 2 )
= + π + π . (2.32)
2 sin(ω/2) 4 sin((ω − N )/2) 4 sin((ω + N )/2)
Ljubiša Stanković Digital Signal Processing 71

1
N=4

W (ejω)
w (n)

0.5
R

R
0

-10 0 10 -π ω π
n

1
N=8

W (ejω)
w (n)

0.5
R

R
0

-10 0 10 -π ω π
n

1
N=8
W (ejω)
w (n)

0.5
H

-10 0 10 -π ω π
n

Figure 2.7 Discrete-time signal in a form of rectangular window of the widths 2 N + 1 = 9 and
2N + 1 = 17 samples (top and middle), and a Hann(ing) window with 2N + 1 = 17 (bottom).
The time domain values are on the left while the Fourier transforms of these discrete-time
signals are on the right.

As the window width increases in the time domain the main lobe width in
the Fourier domain is narrowing. The first zero value of the Fourier transform
of a rectangular window is at ω (2N + 1)/2 = π, i.e., at ω = 2π/(2N + 1)
where 2N + 1 is the signal duration. In the case of a Hann(ing) window
the main lobe is wider as compared to the rectangular window of the same
width, but its convergence is much faster with very reduced oscillations in
the Fourier transform, Fig.2.7.
72 Discrete-Time Signals and Transforms

The Fourier transform of a convolution of discrete-time signals,

∞ ∞
FT{ x (n) ∗n h(n)} = ∑ ∑ x (k )h(n − k )e− jnω = X (e jω ) H (e jω ), (2.33)
n=−∞ k=−∞

is equal to the product of the Fourier transforms of corresponding discrete-


time signals.
The Fourier transform of the impulse response


H (e jω ) = ∑ h(n)e− jωn
n=−∞

is called frequency response of a discrete linear time-invariant system.

Example 2.11. Find the output of a discrete linear time-invariant system with
frequency response H (e jω ) if the input signals are:
(a) x (n) = Ae jω0 n and (b) x (n) = A cos(ω0 n + ϕ). What is the output if
the impulse response h(n) is real-valued?

⋆(a) The output signal to the input x (n) is

∞ ∞
y(n) = ∑ h(k ) x (n − k ) = ∑ h(k) Ae jω0 (n−k)
k=−∞ k=−∞

= Ae jω0 n ∑ h(k) Ae− jω0 k = Ae jω0 n H (e jω0 )
k =−∞
' '
' ' jω
= A 'H (e jω0 )' e j(ω0 n+arg{ H (e 0 }) .

(b) The input signal can be written as

A j ( ω0 n + ϕ ) A − j ( ω0 n + ϕ )
x (n) = A cos(ω0 n + ϕ) = e + e .
2 2

According to the linearity property, the output is

A '' '
' jω0
y(n) = 'H (e jω0 )' e j(ω0 n+ ϕ)+ j arg{ H (e )}
2
A '' '
' − jω
+ 'H (e− jω0 )' e− j(ω0 n+ ϕ)+ j arg{ H (e 0 )} .
2

For a real-valued impulse response holds

H (e jω ) = H ∗ (e− jω )
Ljubiša Stanković Digital Signal Processing 73

and
∞ ∞
H (e jω ) = ∑ h(n) cos(ωn) + j ∑ h(n) sin(ωn)
n=−∞ n=−∞
' '2 ' '2
' ' ' '
'H (e jω )' = 'H (e− jω )'
! ∞ 6
∑n=−∞ h(n) sin(ωn)

arg{ H (e ) = arctan = − arg{ H (e− jω ).
∑∞ n=−∞ h (n ) cos( ωn )

The output for a real-valued impulse response is


' '
' '
y(n) = A 'H (e jω0 )' cos(ω0 n + ϕ + arg{ H (e jω0 )).

Example 2.12. Find the impulse response of an ideal discrete-time differentiator


H (e jω ) = jω for − π ≤ ω < π.

⋆The impulse response is


"π "π "π
1 j 1
h(n) = jωe jωn dω = ω cos(ωn)dω − ω sin(ωn)dω
2π 2π 2π
−π −π −π
"π ' "π
−1 1 cos(ωn) ''π 1
= ω sin(ωn)dω = ω ' + cos(ωn)dω.
π π n 0 πn
0 0

Since the last integral is equal to 0 the final result is


cos(πn) (−1)n
h(n) = =
n n
for n ̸= 0 and h(n) = 0 for n = 0. Using samples n = ±1, ±2, ...,± N the
approximation of the frequency response is
N N
sin(ωn)
HN (e jω ) = ∑ h(n)e− jωn = 2j ∑ (−1)n−1 .
n=− N n =1
n

Note that this system is not causal.

The Fourier transform of a product of discrete-time signals is equal to


the convolution of the Fourier transforms in frequency,

1
FT{ x (n)h(n)} = X (e jθ ) H (e j(ω −θ ) )dθ = X (e jω ) ∗ω H (e jω ). (2.34)

−π

This convolution is periodic with period 2π (circular convolution).


74 Discrete-Time Signals and Transforms

2.2.2 Spectral Energy and Power Density

Parseval’s theorem for discrete-time signals reads

∞ ∞ "π
1
∑ ∑ 2π X (e jω )e jωn y∗ (n)dω
x (n)y∗ (n) = (2.35)
n=−∞ n=−∞ −π

( ) "π

1 1
=


X (e ) ∑ (e y(n)) dω = 2π X (e jω )Y∗ (e jω )dω.
− jωn ∗

−π n=−∞ −π

For a signal x (n) Parseval’s theorem is

∞ "π ' '2


1 2 ' '
∑ |x(n)| = 2π 'X (e jω )' dω = Ex .
n=−∞ −π
' '2
Function ' X (e jω )' is the spectral energy density of signal x (n).
Since the average power of a signal x (n) is defined by
N
1
PAV = lim ∑ | x (n)|2 , (2.36)
N →∞ 2N + 1 n=− N

its power spectral density may be defined as

1 ' '2
' '
Pxx (e jω ) = lim 'X N (e jω )' , (2.37)
N →∞ 2N + 1

where the Fourier transform of x (n) within − N ≤ n ≤ N is denoted by


X N (e jω ). The power spectral density can be written as

N N
1
Pxx (e jω ) = lim ∑ ∑ x (n) x ∗ (m)e− jω (n−m) . (2.38)
N →∞ 2N + 1 n=− N m=− N

For a very specific signal x (n) = Ae j(ω0 n+ ϕ) which satisfies r (k ) =


x (n) x ∗ (n − k ) = A2 e jω0 k the power spectral density is

2N
1
Pxx (e jω ) = lim ∑ (2N + 1 − |k |)r (k )e− jωk
N →∞ 2N + 1
k=−2N

since the value r (0), for n − m = k = 0, appears 2N + 1 times along the


diagonal in n, m domain in (2.38). The value for n − m = k = ±1 appears 2N
Ljubiša Stanković Digital Signal Processing 75

times, and so on. The value r (k ), for n − m = k, appears 2N + 1 − |k | times


in double summation (2.38). Note that Pxx (e jω ) in this case is the Fourier
transform of r (k ) multiplied by a Bartlett window 1 − |k |/(2N + 1).

2.3 SAMPLING THEOREM IN THE TIME DOMAIN

Continuous-time signal x (t), whose Fourier transform X (Ω) is limited with


Ωm = 2π f m , where f m is a frequency in [Hz], while Ωm is frequency in
[rad/s], i.e.,
X (Ω) = 0 for |Ω| > Ωm , (2.39)
can be reconstructed, for any t, based on samples taken with a sampling
interval ∆t,
x (n) = x (n∆t)∆t,
such that
π 1
∆t < = .
Ωm 2 fm
Now we will prove this statement. Since we have assumed a limited
frequency duration of X (Ω) we can make its periodic extension

X p (Ω) = ∑ X (Ω + 2Ω0 m) (2.40)
m=−∞

with a period 2Ω0 . It is very important to note that X p (Ω) = X (Ω) for
|Ω| < Ω0 if
Ω0 > Ω m .
In this case, it is possible to make transformation from X (Ω) to X p (Ω) and
back without losing any information.
Of course, that would not be the case if Ω0 > Ωm did not hold. By
periodic extension of X (Ω), in that case, overlapping (aliasing) would have
occurred in X p (Ω). It would not be reversible. Then it would not be possible
to recover X (Ω) from X p (Ω). The periodic extension is illustrated in Fig. 2.8.
The periodic function X p (Ω) can be expanded into Fourier series with
coefficients
"Ω0 "∞
1 jπΩn/Ω0 1
X− n = X p (Ω)e dΩ = X (Ω)e jπΩn/Ω0 dΩ.
2Ω0 2Ω0
− Ω0 −∞

The integration limits are extended to the infinity since X (Ω) = X p (Ω)
within the basic period interval and X (Ω) = 0 outside this interval.
76 Discrete-Time Signals and Transforms

X(Ω)

-Ω Ω Ω
m m

X (Ω) = X(Ω)
p
-Ω <Ω<Ω
0 0

- Ω0 - Ωm Ωm Ω0 Ω

Figure 2.8 The Fourier transform of a signal, with X (Ω) = 0 for |Ω| > Ωm (top) and its
periodically extended version, with period 2Ω0 > 2Ωm (bottom).

The inverse Fourier transform of continuous-time signal is

"∞
1
x (t) = X (Ω)e jΩt dΩ. (2.41)

−∞

By comparing the last two equations, we easily conclude that


π
X− n = x (t)|t=πn/Ω0 = x (n∆t)∆t (2.42)
Ω0
π
∆t = ,
Ω0

meaning that the Fourier series coefficients of the periodically extended


Fourier transform of X (Ω) are the samples of the signal, taken with the
sampling interval ∆t = π/Ω0 .
Therefore, the samples of a signal and the periodically extended
Fourier transform are the Fourier series pair

X−n = x (n∆t)∆t ←→ X p (Ω) = ∑ X (Ω + 2Ω0 m) (2.43)
m=−∞

with ∆t = π/Ω0 .
Ljubiša Stanković Digital Signal Processing 77

The reconstruction formula for x (t) then follows from

"∞ "Ω0
1 jΩt 1
x (t) = X (Ω)e dΩ = X p (Ω)e jΩt dΩ (2.44)
2π 2π
−∞ − Ω0
"Ω0
( )

1
= ∑ Xn e jπnΩ/Ω0 e jΩt dΩ
2π n=−∞
− Ω0
"Ω0
( )

1 jπnΩ/Ω0
= ∑ x (−n∆t)∆te e jΩt dΩ
2π n=−∞
− Ω0

as
∞ π
sin( ∆t (t − n∆t))
x (t) = ∑ x (n∆t) π . (2.45)
n=−∞ ∆t (t − n∆t )

The signal x (t), for any t, is expressed in terms of its samples x (n∆t).
Example 2.13. The last relation can be used to prove that X (Ω) = X (e jω ) with
Ω∆t = ω and |ω | < π for the signals sampled at the rate satisfying the
sampling theorem.
⋆Starting from
"∞
X (Ω) = x (t)e− jΩt dt
−∞
the signal x (t), satisfying the sampling theorem, can by written in terms of
samples, according to the third row of (2.44), as

"Ω0
( )

1 − j∆tnθ
x (t) = ∑ x (n∆t)∆te e jθt dθ.
2π n=−∞
− Ω0

It follows
"∞ "Ω0
( )

1 − j∆tnθ
X (Ω) = ∑ x (n∆t)∆te e jθt dθe− jΩt dt
2π n=−∞
−∞ − Ω0

∞ "Ω0
= ∑ x (n∆t)∆t δ(θ − Ω)e− j∆tnθ dθ
n=−∞
− Ω0

= ∑ x (n∆t)∆te− j∆tnΩ for |Ω| < Ω0 (2.46)
n=−∞
78 Discrete-Time Signals and Transforms

resulting in

X (Ω) = ∑ x (n)e− jωn for |ω | < π
n=−∞

with ω = Ω∆t and x (n) = x (n∆t)∆t.

Example 2.14. If the highest frequency in a signal x (t) is Ωm1 and the highest
frequency in a signal y(t) is Ωm2 what should be the sampling interval for the
signal x (t)y(t) and for the signal x (t − t1 )y∗ (t − t2 )? The highest frequency
Ωm in a signal is used in the sense that the Fourier transform of the signal is
zero for |Ω| > Ωm .

⋆The Fourier transform of a product x (t)y(t) is a convolution of the


Fourier transforms X (Ω) and Y (Ω). Since these functions are of limited
duration |Ω| < Ωm1 and |Ω| < Ωm2 , respectively, in general their convolution
is limited to the interval |Ω| < Ωm1 + Ωm2 . Therefore, the sampling interval
for y(t) should be
π
∆t < .
Ωm1 + Ωm2
Shifts in time and complex conjugate operation do not change the Fourier
transform width. Therefore the conclusion remains the same for x (t −
t1 ) y ∗ ( t − t2 ).

Example 2.15. If the signal


x (t) = e−|t|
is sampled with ∆t = 0.1, write the Fourier transform of the obtained discrete-
time signal: (a) by a periodical extension of the continuous-time Fourier
transform and (b) by a direct calculation based on the discrete-time signal.
Comment on the expected error due to the discretization.

⋆The Fourier transform of this signal is

"∞ "0 "∞


X (Ω) = x (t)e− jΩt dt = et e− jΩt dt + e−t e− jΩt dt
−∞ −∞ 0
1 1 2
= + = . (2.47)
1 − jΩ 1 + jΩ 1 + Ω2

After sampling with ∆t = 0.1, the Fourier transform is periodically extended


with period 2Ω0 = 2π/∆t = 20π.
(a) The periodic Fourier transform is

2 2 2
X p (Ω) = ... + + + + ...
1 + (Ω + 20π )2 1 + Ω2 1 + (Ω − 20π )2
Ljubiša Stanković Digital Signal Processing 79

Thus, the value of X p (Ω) at the period ending points ±10π will approxi-
mately be X p (±10π ) = 2/(1 + 100π 2 ) ∼ = 0.002. Comparing with the maxi-
mum value X p (0) = 2, it means that the expected error due to the discretiza-
tion of this signal (since it does not strictly satisfy the sampling theorem) will
be of a 0.1% order.
(b) The discrete-time signal obtained by sampling x (t) = exp(− |t|)
with ∆t = 0.1 is x (n) = 0.1e−0.1|n| . Its Fourier transform is already calculated
with A = 0.1 and α = 0.1, eq.(2.22). The result is

1 − e−0.2
X (e jω ) = 0.1 . (2.48)
1 − 2e−0.1 cos(ω ) + e−0.2

Therefore, the exact value of an infinite sum in X p (Ω) is X (e jω ) with ω =


Ω∆t = 0.1Ω

2 1 − e−0.2
X p (Ω) = ∑ 1 + ( Ω + 20kπ ) 2
= 0.1
1 − 2e − 0.1 cos(0.1Ω) + e−0.2
.
k=−∞

Note that in this way we solve an interesting mathematical problem of


finding a sum of an infinite series.
For Ω = 0, the original value of the Fourier transform is X (0) = 2.
In the signal that could be reconstructed based on the discretized signal
X p (0) = 0.1(1 + e−0.1 )/(1 − e−0.1 ) = 2.00167. The increase of 0.00167 is due
to periods overlapping. It manifests as an aliasing error in X (0). The value of
error corresponds to our previous conclusion of about a 0.1% error order.

Example 2.16. A continuous-time signal x (t) = cos(25πt + π/4) + sin(50πt −


π/3) is sampled with a step ∆t = 1/100 and a discrete-time signal x (n) =
x (n∆t)∆t is formed. The discrete-time signal is processed using the system
whose impulse response is
1 1 1
h(n) = δ ( n ) + δ ( n − 2) + δ ( n + 2)
2 4 4
Find the output signal y(n) and the corresponding continuous-time signal
y a (t) as the result of convolution.
⋆The discrete-time input signal is
x (n) = [cos(nπ/4 + π/4) + sin(nπ/2 − π/3)]∆t

with the Fourier transform



π π π
X (e jω ) = ∑ [δ(ω + + 2kπ )e− jπ/4 + δ(ω − + 2kπ )e jπ/4 ]
100 k=−∞ 4 4

π π π
+ ∑ [δ(ω + + 2kπ )e− jπ/6 + δ(ω − + 2kπ )e jπ/6 ].
100 k=−∞ 2 2
80 Discrete-Time Signals and Transforms

The frequency response of the discrete system is



1
H (e jω ) = ∑ h(n)e− jωn = (1 + cos(2ω )).
n=−∞ 2

The frequency response values at the frequencies of X (e jω ), within the basic


period −π ≤ ω < π, are H (e± jπ/4 ) = 1/2 and H (e± jπ/2 ) = 0. Therefore the
output signal Fourier transforms is
π π π
Y (e jω ) = H (e jω ) X (e jω ) = [δ(ω + )e− jπ/4 + δ(ω − )e jπ/4 ]
200 4 4
for − π ≤ ω < π.

The output discrete-time signal is

1
y(n) = cos(nπ/4 + π/4)∆t
2
corresponding to the continuous-time signal

1 π 1
y(t) = cos(n + π/4) = cos(25πt + π/4).
2 4∆t 2

Find the output signal for h(n) = ∑2i=−2 δ(n − i ).

2.4 PROBLEMS

Problem 2.1. Check the periodicity and find the period of signals:
(a) x (n) = sin(2πn/32), (b) x (n) = cos(9πn/82), (c) x (n) = e jn/32 , and (d)
x (n) = sin(πn/5) + cos(5πn/6) − sin(πn/4).

Problem 2.2. Check the linearity and time-invariance of the discrete system
described by equation
y(n) = x (n) + 2.

Problem 2.3. The output of a linear time-invariant discrete system to the


input signal x (n) = u(n) is y(n) = 2−n u(n). Find the impulse response h(n).
Is the system stable?

Problem 2.4. Find the convolution

y(n) = x (n) ∗ x (n)

for x (n) = u(n) − u(n − 5).


Ljubiša Stanković Digital Signal Processing 81

h(n) = h1(n)*h2(n)*h2(n)
12 3
10 2
8
1

x(n)
6
4 0
2 -1
0
-2
-2 0 2 4 6 8 -2 0 2 4 6 8
n n
Figure 2.9 Problem 2.7, impulse response h(n) (left) and Problem 2.14, discrete signal x (n)
(right).

Problem 2.5. Find the convolution of signals x (n) = e−|n| and h(n) = u(n +
5) − u ( n − 6).
Problem 2.6. A discrete system consists of systems with impulse responses
h1 (n) = e− an u(n), h2 (n) = e−bn u(n), and h3 (n) = u(n). Find the impulse
response of the resulting system for:
(a) Systems h1 (n), h2 (n), and h3 (n) connected in parallel,
(b) System h1 (n) connected in parallel with a cascade of systems h2 (n)
and h3 (n).
Problem 2.7. Consider three causal linear time-invariant systems in cas-
cade. Impulse responses of these systems are h1 (n), h2 (n), and h2 (n), re-
spectively. The impulse response of the second and the third system is
h2 (n) = u(n) − u(n − 2), while the impulse response of the whole system,

h ( n ) = h 1 ( n ) ∗ n h 2 ( n ) ∗ n h2 ( n ),

is shown in Fig. 2.9 (left).


Find h1 (n) and y(n) = h(n) ∗n x (n), with x (n) = δ(n) − δ(n − 1).
Problem 2.8. Find the output of discrete system whose impulse response is

h(n) = ne−n/2 u(n)

to the input signal

x (n) = 5 sin(πn/5) − 3 cos(πn/3 + π/6).

Find

S= ∑ ne−n/2 .
n =0
82 Discrete-Time Signals and Transforms

Problem 2.9. Find the Fourier transform of:


(a) x (n) = u(n),
(b) x (n) = 2 cos(ω0 n)u(n), and
(c) y(n) = ∑∞ k=−∞ x ( n + kN ) if the Fourier transform of discrete-time
signal x (n) is X (e jω ).
Problem 2.10. In implementing an approximation of a signal derivative we
may use a system with impulse response

h(n) = a[δ(n + 1) − δ(n − 1)] + b[δ(n + 2) − δ(n − 2)].

Find the constants a and b such that

H (e jω ) ∼
= jω for small ω,
i.e., ' '
dH (e jω ) '' d2 H (e jω ) ''
= j and = 0.
dω 'ω =0 dω 2 'ω =0
Problem 2.11. Find the Fourier transform of the following discrete-time
signal (triangular window)
* +
|n|
wT (n) = 1 − [u(n + N ) − u(n − N − 1)].
N+1
with N being an even number.
Problem 2.12. Find the value of integral

1 sin2 (( N + 1)ω/2)
I= dω.
2π sin2 (ω/2)
−π

Problem 2.13. A window is formed as

w(n) = w H (n + N ) + w H (n) + w H (n − N )

where w H (n) is the Hann(ing) window


1
w H (n) = [1 + cos(nπ/N )] [u( N + n) − u(n − N − 1)] .
2
Plot the window w(n) and express its Fourier transform as a function of the
Fourier transform of the Hann(ing) window WH (e jω ). Generalize the results
for
K
w(n) = ∑ w H (n + kN ).
k=−K
Ljubiša Stanković Digital Signal Processing 83

Problem 2.14. A discrete-time signal x (n) is given in Fig. 2.9 (right). Without
calculating its Fourier transform X (e jω ) find

"π "π ' '2


j0 jπ jω ' '
X ( e ), X ( e ), X (e )dω, 'X (e jω )' dω,
−π −π

and a signal whose Fourier transform is the real part of X (e jω ), denoted by


Re{ X (e jω )}.

Problem 2.15. Find the Fourier transform of discrete-time signal

y(n) = ne−n/4 u(n).

Using this Fourier transform find the center of gravity of signal x (n) =
e−n/4 u(n) defined by

∑ nx (n)
n=−∞
ng = ∞ .
∑ x (n)
n=−∞

Problem 2.16. Impulse response of a discrete system is given as:

sin(nπ/3)
(a) h(n) = , with h(0) = 1/3,

sin2 (nπ/3)
(b) h(n) = ,
(nπ )2
sin((n − 2)π/4)
(c) h(n) = .
( n − 2) π

Show that the frequency response of the system with h(n) = sin(nπ/3)/nπ
is H (e jω ) = 1 for |ω | ≤ π/3 and H (e jω ) = 0 for π/3 < |ω | < π. Find the
frequency responses in other two cases. Find the systems output to the input
signal x (n) = sin(nπ/6).

Problem 2.17. A continuous-time signal x (t) = cos(20πt + π/4) + sin(90πt)


is sampled with a step ∆t and a discrete-time signal x (n) = x (n∆t)∆t is
formed. The signal is convolved with h(n) = sin(nπ/2)/(nπ ). (a) What is
the result of this convolution for ∆t = 1/100? (b) If the signal is sampled
with ∆t = 1/50 what is the output signal? (c) Find the result of convolution
for ∆t = 3/100.
84 Discrete-Time Signals and Transforms

Problem 2.18. Analytic part x a (n) of a discrete-time signal x (n) is defined


in the frequency domain by

⎨ 2X (e jω ) for 0<ω<π

Xa (e ) = X (e jω ) for ω=0 .

0 for −π ≤ ω < 0

In the time domain the analytic part can be written as

x a (n) = x (n) + jxh (n),

where xh (n) is the Hilbert transform of x (n). Find the impulse response of
the system that transforms a signal x (n) into its Hilbert transform (Hilbert
transformer).

Problem 2.19. The Fourier transform of a continuous signal x (t) is nonzero


only within 3Ω1 < Ω < 5Ω1 . Find the maximum possible sampling interval
∆t such that the signal can be reconstructed based on the samples x (n∆t).

Problem 2.20. For a signal whose Fourier transform is zero for frequencies
Ω ≥ Ωm = 2π f m = π/∆t show that

"∞
sin(π (t − τ )/∆t)
x (t) = x (τ ) dτ.
π (t − τ )
−∞

Write a discrete-time version of this relation.

Problem 2.21. Sampling of a signal is done twice, with the sampling interval
∆t = 2π/Ωm that is twice larger than the sampling interval required by the
sampling theorem (∆t = π/Ωm is required). After first sampling process,
the discrete-time signal x1 (n) = ∆tx (n∆t) is formed, while after the second
sampling process signal x2 (n) = ∆tx (n∆t + a) is formed. Show that we can
reconstruct continuous-time signal x (t) based on x1 (n) and x2 (n) if a ̸= k∆t,
that is, if samples x1 (n) and x2 (n) do not overlap in continuous-time.

Problem 2.22. In general, a sinusoidal signal x (t) = A sin(Ω0 t + ϕ) is de-


scribed with three parameters A, Ω0 and ϕ. Thus, generally speaking, three
points of x (t) would be sufficient to find three signal parameters. If we know
the signal x (t) at t = t0 , t = t0 + ∆t and t = t0 − ∆t what is the relation
and conditions to reconstruct, for example, Ω0 , which is usually the most
important parameter of a sinusoid?
Ljubiša Stanković Digital Signal Processing 85

Problem 2.23. Show that the relation among the amplitudes of a signal
x (n) and its even and odd parts xe (n) = [ x (n) + x (−n)]/2 and xo (n) =
[ x (n) − x (−n)]/2 is

As (n) ≤ | xe (n)| + | xo (n)| ≤ 2As (n)
@ A
with As (n) > 0 defined by A2s (n) = | x (n)|2 + | x (−n)|2 /2.

2.5 SOLUTIONS

Solution 2.1. (a) Calculate x (n + N ) = sin(2π (n + N )/32). For 2πN/32 =


2kπ, k = 1, 2, ..., x (n + N ) = x (n) holds. The smallest integer N satisfying the
previous condition is N = 32 with k = 1. The period of signal is N = 32.
(b) For this signal x (n + N ) = cos(9πn/82 + 9πN/82) = x (n) for
9πN/82 = 2kπ, k = 1, 2, .... The period follows from N = 164k/9. The period
of this signal is N = 164 for k = 9.
(c) In this case x (n + N ) = e j(n/32+ N/32) . The relation N/32 = 2kπ,
k = 1, 2, ..., produces N = 64kπ. This is not an integer for any k, meaning
that the signal is not periodic.
(d) The periods of signal components are obtained from N1 = 10k,
N2 = 12k/5, and N3 = 8k. The smallest value of N when N1 = N2 = N3 = N
is N = 120 containing 12 periods of sin (πn/5), 50 periods of cos(5πn/6),
and 15 periods of sin(πn/4).
Solution 2.2. For linearity we have to check the system output to the linear
combination of input signals x1 (n) and x2 (n),

T { a1 x1 (n) + a2 x2 (n)} = a1 x1 (n) + a2 x2 (n) + 2.

This not equal to

a1 y1 (n) + a2 y2 (n) = a1 x (n) + 2a1 + a2 x2 (n) + 2a2 .

System is not linear.


This system is time-invariant since

T { x ( n − N ) = x ( n − N ) + 2 = y ( n − N ).

Solution 2.3. The impulse response is defined by

h(n) = T {δ(n)}.
86 Discrete-Time Signals and Transforms

It can be written as
h(n) = T {u(n) − u(n − 1)}.

For a linear time-invariant discrete system holds

h(n) = T {u(n)} − T {u(n − 1)}.

In this case it means

h(n) = T { x (n)} − T { x (n − 1)}


= y(n) − y(n − 1) = 2−n u(n) − 2−(n−1) u(n − 1)
= δ(n) + 2−n u(n − 1) − 2−(n−1) u(n − 1)
= δ ( n ) + 2− n (1 − 2 ) u ( n − 1 ) = δ ( n ) − 2− n u ( n − 1 ).

For this system

∞ ∞
2−1
∑ |h(n)| = 1 + ∑ 2− n = 1 + = 2.
n=−∞ n =1 1 − 2−1

The system is stable since the sum of absolute values of impulse response is
finite.

Solution 2.4. The convolution is calculated sample by sample as


y (0) = ∑ x (k ) x (−k ) = x (0) x (0) = 1
k=−∞

y (1) = ∑ x ( k ) x (1 − k ) = x (0 ) x (1 ) + x (1 ) x (0 ) = 2
k=−∞

y(−1) = ∑ x (k ) x (−1 − k ) = 0
k=−∞

y (2) = ∑ x ( k ) x (2 − k ) = 3
k=−∞
...

The calculation, along with the final result y(n), is presented in


Fig.2.10.
Ljubiša Stanković Digital Signal Processing 87

1.5 1.5
1 1

x(-k )
x(k)

0.5 0.5
0 0
-0.5 -0.5
-15 -10 -5 0 5 10 15 -15 -10 -5 0 5 10 15
k k
1.5 1.5
1 1
x(1-k )

x(2-k )
0.5 0.5
0 0
-0.5 -0.5
-15 -10 -5 0 5 10 15 -15 -10 -5 0 5 10 15
k k
1.5 6

x(n)* x(n)
1
x(-1-k )

4
0.5
2
0
-0.5 0
-15 -10 -5 0 5 10 15 -15 -10 -5 0 5 10 15
k n

Figure 2.10 Illustration of a discrete-time signal convolution calculation.

Solution 2.5. Based on the convolution definition



y(n) = x (n) ∗ h(n) = ∑ x (k )h(n − k ) = (2.49)
k =−∞

= ∑ e−|k| (u((n − k ) + 5) − u((n − k ) − 6))
k=−∞

with !
1, for k ≤ n + 5
u((n − k ) + 5) =
0, for k > n + 5
and !
1, for k ≤ n − 6
u((n − k ) − 6) =
0, for k > n − 6
we get
!
1, for n − 6 < k ≤ n + 5
(u((n − k) + 5) − u((n − k) − 6)) =
0, elsewhere.
88 Discrete-Time Signals and Transforms

The infinite sum in (2.49) reduces to the terms for n − 5 ≤ k ≤ n + 5


n +5
y(n) = ∑ e−|k| .
k = n −5

Since !
k, for k ≥ 0
|k | = ,
−k, for k < 0
we have three cases:
1) For n + 5 ≤ 0, i.e., n ≤ −5, we have k ≤ 0 for all terms. Therefore |k | = −k,
n +5
1 − e11 e −5 − e 6
y(n) = ∑ e k = e n −5 = en
k = n −5
1−e 1−e
e0.5 e−5.5 − e5.5 sinh 5.5
= en 0.5 −0.5 = en
e e − e0.5 sinh 0.5
2) For n − 5 ≥ 0, the lowest k = n − 5 is greater than 0. Then k ≥ 0 for all
terms and |k | = k with
n +5
1 − e−11 5
−n e − e
−6
y(n) = ∑ e − k = e − n +5 = e
k = n −5
1 − e −1 1 − e −1
e−0.5 e5.5 − e−5.5 sinh 5.5
= e−n −0.5 0.5 = e−n .
e e − e−0.5 sinh 0.5
3) For −5 < n < 5, index k can assume positive and negative values. The
convolution is split into two sums as
n +5 −1 n +5 5− n n +5
y(n) = ∑ e−|k| = ∑ ek + ∑ e−k = ∑ e−k + ∑ e−k
k = n −5 k = n −5 k =0 k =1 k =0

1−e −( 5 − n ) 1 − e n +6)
−(
= e −1 + =
1 − e −1 1 − e −1
1 − e n −5 1/2 1 − e
−(n+6)
= e−1/2 1/2 + e
e − e−1/2 e1/2 − e−1/2
1
= 0.5 (e−0.5 − en−5.5 + e0.5 − e−n−5.5 ) =
e − e−0.5
−e−5.5 (en + e−n ) + e−0.5 + e0.5
=
e0.5 − e−0.5
cosh 0.5 − e−5.5 cosh(n)
= .
sinh 0.5
Ljubiša Stanković Digital Signal Processing 89

Finally we can write




⎨ e−|n| sinh 5.5
sinh 0.5 for |n| ≥ 5
y(n) =

⎩ cosh 0.5−e−5.5 cosh(n)
sinh 0.5 for |n| < 5.
Solution 2.6. (a) For a parallel connection of systems
y ( n ) = y1 ( n ) + y2 ( n ) + y3 ( n )
∞ ∞ ∞
= ∑ h1 ( k ) x ( n − k ) + ∑ h2 ( k ) x ( n − k ) + ∑ h3 ( k ) x ( n − k )
k =−∞ k=−∞ k=−∞

= ∑ [h1 (k) + h2 (k) + h3 (k )] x (n − k).
k =−∞

The resulting impulse response is


h ( n ) = h1 ( k ) + h2 ( k ) + h3 ( k )
= [e−an + e−bn + 1]u(n).
(b) For a cascade of systems with h2 (n) and h3 (n) holds
∞ ∞
y2 ( n ) = ∑ h2 ( k ) x ( n − k ) = ∑ h2 ( n − k ) x ( k )
k=−∞ k =−∞
∞ ∞ ∞
y3 ( n ) = ∑ h3 ( m ) y2 ( n − m ) = ∑ h3 ( m ) ∑ h2 ( n − m − k ) x ( k )
m=−∞ m=−∞ k =−∞
∞ ∞ ∞
= ∑ ∑ h3 ( m ) h2 ( n − m − k ) x ( k ) = ∑ h23 (n − k ) x (k )
k=−∞ m=−∞ k=−∞

where

h23 (n) = ∑ h 3 ( m ) h2 ( n − m ) = h 2 ( n ) ∗ h 3 ( n ).
m=−∞
The impulse response of the whole system is
h(n) = h1 (n) + h23 (n) = h1 (n) + h2 (n) ∗ h3 (n),
with

h2 ( n ) ∗ h3 ( n ) = ∑ e−b(n−m) u (n − m )u (m )
m=−∞
n
1 − e b ( n +1) e−bn − eb
= u(n) ∑ e−b(n−m) = e−bn 1 − eb
u ( n ) =
1 − eb
u ( n ).
m =0
90 Discrete-Time Signals and Transforms

Solution 2.7. Since we know h2 (n), we can calculate


h2 (n) ∗n h2 (n) = δ(n) + 2δ(n − 1) + δ(n − 2).
Therefore, the total impulse response
h(n) = h1 (n) ∗n [h2 (n) ∗n h2 (n)]
= h1 (n) + 2h1 (n − 1) + h1 (n − 2)
h1 (n) = h(n) − 2h1 (n − 1) − h1 (n − 2).
From the last relation it follows h1 (n) = 0 for n < 0, h1 (0) = h(0) = 1,
h1 (1) = h(1) − 2h1 (0) = 3, h1 (2) = h(2) − 2h1 (1) − h1 (0) = 3, h1 (3) = 2,
h1 (4) = 1, h1 (5) = 0, and h1 (n) = 0 for n > 5.
Output to x (n) = δ(n) − δ(n − 1) can be easily calculated as
y ( n ) = h ( n ) − h ( n − 1 ).
Solution 2.8. Instead of a direct convolution we will calculate the frequency
response of discrete system as

H (e jω ) = ∑ h(n)e− jωn .
n=−∞

Find first the transform of e−n/2 u(n),



1
H1 (e jω ) = ∑ e−n/2 e− jωn = 1 − e−(1/2+ jω)
n =0

and differentiate both sides with respect to ω



− je−(1/2+ jω )
−j ∑ ne−n/2 e− jωn = (1 − e−(1/2+ jω) )2 .
n =0

It follows

e−(1/2+ jω )
H (e jω ) = ∑ ne−n/2 e− jωn = .
n =0 (1 − e−(1/2+ jω ) )2
The output for a real-valued h(n) is
' '
' '
y(n) = 5 'H (e jπ/10 )' sin(πn/5 + arg{ H (e jπ/10 })
' ' ' '
' ' ' '
− 3 'H (e jπ/6 )' cos(πn/3 + π/6 + 'H (e jπ/6 )')
=14.1587 sin(πn/5 − 1.1481)
− 5.7339 cos(πn/3 + π/6 − 1.6605).
Ljubiša Stanković Digital Signal Processing 91

Value of the sum S is


∞ √
−n/2 j0 e
S= ∑ ne = H (e ) = √
( e − 1)2
.
n =0

Solution 2.9. (a) The unit step signal can be written as


- .
1 −an 1 1 − an
x (n) = u(n) = lim e u(n) + − e u(−n − 1) = lim x a (n).
a →0 2 2 2 a →0

The Fourier transform of x a (n) is


∞ - .
1 − an 1 1 −an

Xa (e ) = ∑ e u(n) + − e u(−n − 1) e− jωn
n=−∞ 2 2 2
1 ∞ 1 a+ jω
2 2e
=
1 − e−a− jω
+ ∑ πδ(ω + 2kπ ) −
1 − e a+ jω
k=−∞

1
X (e jω ) = lim Xa (e jω ) = + ∑ πδ(ω + 2kπ ).
a →0 1 − e− jω k=−∞
The result from (2.23) is used to transform the constant signal equal to 1/2.
(b) This signal is

x (n) = 2 cos(ω0 n)u(n) = (e jω0 n + e− jω0 n )u(n).


Its Fourier transform is

1
X (e jω ) = + ∑ πδ(ω − ω0 + 2kπ )
1 − e − j ( ω − ω0 ) k=−∞

1
+ + ∑ πδ(ω + ω0 + 2kπ )
1 − e− j(ω +ω0 ) k=−∞
1 − e− jω cos(ω0 )
=2
1 − 2 cos(ω0 )e− jω + e− j2ω

+ ∑ π [δ(ω − ω0 + 2kπ ) + δ(ω + ω0 + 2kπ )] .
k =−∞

(c) For a periodic signal y(n) the Fourier transform is


∞ ∞ ∞
Y (e jω ) = ∑ ∑ x (n + kN )e− jωn = ∑ X (e jω )e jωkN
k=−∞ n=−∞ k=−∞


= X (e ) ∑ e jωkN .
k=−∞
92 Discrete-Time Signals and Transforms

Using (2.23) we get



2π ∞ 2kπ
Y (e jω ) = X (e jω )2π ∑ δ(ωN + 2kπ ) = X (e jω ) ∑ δ ( ω + N ).
k=−∞
N k=− ∞

Solution 2.10. For the impulse response h(n) the frequency response is

H (e jω ) = 2aj sin(ω ) + 2jb sin(2ω ).

The first derivative of H (e jω ) at ω = 0 is


'
dH (e jω ) ''
= 2aj + 4jb = j,
dω 'ω =0

while the second derivative at ω = 0 is


'
d2 H (e jω ) ''
= −2aj − 8jb = 0.
dω 2 'ω =0

The constants a and b follow from the system

a + 2b = 1/2
a + 4b = 0

as b = −1/4 and a = 1 with the impulse response

1
h(n) = δ(n + 1) − δ(n − 1) − (δ(n + 2) − δ(n − 2)).
4
Solution 2.11. Note that
1
wT (n) = w R (n) ∗n w R (n)
N+1

where w R (n) = u(n + N/2) − u(n − N/2 − 1) is the rectangular window.


Since
sin(ω N2+1 )
WR (e jω ) = ,
sin(ω/2)
we have

1 1 sin2 (ω N2+1 )
WT (e jω ) = WR (e jω )WR (e jω ) = .
N+1 N + 1 sin2 (ω/2)
Ljubiša Stanković Digital Signal Processing 93

Solution 2.12. The integral represents the energy of a discrete-time signal


with Fourier transform

sin(ω N2+1 )
X (e jω ) = .
sin(ω/2)
This signal is the rectangular window, x (n) = u(n + N/2) − u(n − N/2 − 1).
Its energy is

"π N/2 N/2


1 sin2 (( N + 1)ω/2) 2
I=
2π sin2 (ω/2)
dω = ∑ x ( n ) = ∑ 1 = N + 1.
−π n=− N/2 n=− N/2

This integral is also equal to wT (0) multiplied by N + 1.


Solution 2.13. The Hann(ing) window

1
w H (n) = [1 + cos(nπ/N )] [u( N + n) − u(n − N − 1)] .
2

is of duration − N ≤ n ≤ N − 1. Thus the windows w H (n) and w H (n − N )


overlap within 0 ≤ n ≤ N − 1. Within this interval the new window is

w(n) = w H (n) + w H (n − N )
1 1
= [1 + cos(nπ/N )] + [1 + cos((n − N )π/N )]
2 2
1 1
= 1 + cos(nπ/N ) + cos(nπ/N − π ) = 1.
2 2
The same holds for − N ≤ n ≤ −1 when

w(n) = w H (n + N ) + w H (n) = 1.

The resulting window is




⎪ 0 for n < −2N


⎨ 12 [1 − cos(nπ/N )] for −2N + 1 ≤ n ≤ − N + 1
w(n) = 1 for −N ≤ n ≤ N − 1

⎪ 1

⎪ [1 − cos(nπ/N )] for N ≤ n ≤ 2N − 1
⎩ 2
0 for n > 2N − 1

since 12 [1 + cos((n ± N )π/N ) = 12 [1 − cos(nπ/N )] . The Fourier transform


of the resulting window, in terms of the Fourier transform of the Hann(ing)
94 Discrete-Time Signals and Transforms

window WH (e jω ), is

W (e jω ) = WH (e jω )e− jωN + WH (e jω ) + WH (e jω )e jωN


= WH (e jω )[1 + 2 cos(ωN )].

For
K
w(n) = ∑ w H (n + kN )
k=−K
we get


⎪ 0D E for n < −(K + 1) N

⎪ π
⎨ 12 1 + cos((n + KN ) N ) for −(K + 1) N + 1 ≤ n ≤ −KN + 1
w(n) = 1D E for −KN ≤ n ≤ KN − 1

⎪ 1 π

⎪ 2 1 + cos((n − KN ) N ) for KN ≤ n ≤ (K + 1) N − 1

0 for n > ( K + 1) N − 1

with
K
1 − e− jω (2K +1) N
W (e jω ) = WH (e jω ) ∑ e− jωkN = e jωKN
k=−K 1 − e− jωN
sin(ω (2K + 1) N/2)
= WH (e jω ) .
sin(ωN/2)

Similar results hold for the Hamming and triangular window. The results
can be generalized for shifts of N/2, N/4,...
For very large K the second term variations in W (e jω ) are much faster
than the variations of WH (e jω ). Thus, for large K the Fourier transform
W (e jω ) approaches to the Fourier transform of a rectangular window of the
width (2K + 1) N.
Solution 2.14. Based on the definition of the Fourier transform of discrete-
time signals,

X (e j0 ) = ∑ x (n) = 7,
n=−∞

X (e jπ ) = ∑ x (n)(−1)n = 1,
n=−∞

X (e jω )dω = 2πx (0) = 4π,
−π
Ljubiša Stanković Digital Signal Processing 95

"π ' '2 ∞


' '
'X (e jω )' dω = 2π ∑ | x (n)|2 = 30π.
−π n=−∞

Finally, X (e jω ) = Re{ X (e jω )} + j Im{ X (e jω )} and X ∗ (e jω ) = Re{ X (e jω )} −


j Im{ X (e jω )}. Thus,

1B C
Re{ X (e jω )} = X (e jω ) + X ∗ (e jω ) .
2
The inverse Fourier transform of Re { X (e jω )} is

1
y(n) = ( x (n) + x ∗ (−n)).
2
Solution 2.15. The Fourier transform of y(n) is
> ?
∞ ∞
d
Y (e jω ) = ∑ ne−n/4 u(n)e− jωn = j ∑ e−n/4 e− jωn
n=−∞ dω n =0
d 1 e − 1/4 − jω
=j = .
dω 1 − e 1/4− jω
− (1 − e−1/4− jω )2

The center of gravity of x (n) = e−n/4 u(n) is



e−1/4− jω
∑ nx (n)
n=−∞ Y (e j0 ) (1−e−1/4− jω )2 |ω =0 1
ng = ∞ = = 1
= = 3.52.
X (e j0 ) e1/4 − 1
∑ x (n) 1−e−1/4− jω |ω =0
n=−∞

Solution 2.16. (a) The inverse Fourier transform of


!
1 for |ω | ≤ π/3
H (e jω ) =
0 for π/3 < |ω | < π

is
π/3
" 'π/3
1 e jωn '' sin(πn/3)
h(n) = e jωn dω = = .
2π 2jπn '−π/3 πn
−π/3
The value of frequency response at the input signal frequency ω = ±π/6 is
H (e± jπ/6 ) = 1. The output signal is, y(n) = sin(nπ/6).
(b) The frequency response, in this case, is H (e jω ) ∗ω H (e jω ), resulting in
y(n) = 0.25 sin(nπ/6).
(c) Output signal in this case is y(n) = sin((n − 2)π/6) = sin(nπ/6 − π/3).
96 Discrete-Time Signals and Transforms

Solution 2.17. For the signal

x (t) = cos(20πt + π/4) + sin(90πt),

corresponding discrete-time signal is

x (n) = cos(20πn∆t + π/4)∆t + sin(90πn∆t)∆t.

(a) For ∆t = 1/100

x (n) = cos(0.2πn + π/4)/100 + sin(0.9πn)/100

with the Fourier transform

π ∞
X (e jω ) = ∑ [δ(ω − 0.2π + 2kπ )e jπ/4 + δ(ω + 0.2π + 2kπ )e− jπ/4 ]
100 k=− ∞

π
+ ∑
j100 k=−∞
[δ(ω − 0.9π + 2kπ ) − δ(ω + 0.9π + 2kπ )].

Since the Fourier transform of h(n) = sin(nπ/2)/(nπ ) is H (e jω ) = 1 for


|ω | ≤ π/2 and H (e jω ) = 0 for π/2 < |ω | < π, the result of a convolution
is equal to the output of system with transfer function H (e jω ) to the input
signal x (n). In this case

x (n) = cos(0.2πn + π/4)/100.

Continuous-time signal corresponding to the output discrete-time signal is


y(t) = cos(20πt + π/4), Fig.2.11(top).
(b) If the signal is sampled with ∆t = 1/50 the discrete-time signal is

x (n) = cos(0.4πn + π/4)/50 + sin(1.8πn)/50,

with the Fourier transform

π ∞
X (e jω ) = ∑ [δ(ω − 0.4π + 2kπ )e jπ/4 + δ(ω + 0.4π + 2kπ )e− jπ/4 ]
50 k=− ∞
π ∞
+ ∑ [δ(ω − 1.8π + 2kπ ) − δ(ω + 1.8π + 2kπ )].
j50 k=− ∞
Ljubiša Stanković Digital Signal Processing 97

H(ejω), X(ejω)
1

-2 π -π - π/2 0 π/2 π 3π/2 2π ω

H(ejω), X(ejω)
1

-2 π -π - π/2 0 π/2 π 3π/2 2π ω

jω jω
H(e ), X(e )
1

-2 π -π - π/2 0 π/2 π 3π/2 2π ω

Figure 2.11 Illustration of the system output with various sampling intervals (a)-(c).

The Fourier transform components within −π ≤ ω < π are

π
X (e jω ) = [δ(ω − 0.4π )e jπ/4 + δ(ω + 0.4π )e− jπ/4 ]
50
π
+ [δ(ω − 1.8π + 2π ) − δ(ω + 1.8π − 2π )]
j50
π
= [δ(ω − 0.4π )e jπ/4 + δ(ω + 0.4π )e− jπ/4 ]
50
π
+ [δ(ω + 0.2π ) − δ(ω − 0.2π )].
j50

The result of convolution is x (n) = cos(0.4πn + π/4)/50 − sin(0.2πn)/50.


Corresponding continuous-time signal is x (t)= cos(20πt + π/4)− sin(10πt).
The component − sin(10πt) does not correspond to any frequency in the
input signal, , Fig.2.11(middle). This effect is illustrated in Fig.2.12.
(c) For ∆t = 3/100

x (n) = 3 cos(0.6πn + π/4)/100 + 3 sin(2.7πn)/100.


98 Discrete-Time Signals and Transforms

x(n)

Figure 2.12 Illustration of the aliasing caused frequency change, from signal sin (90πt) to
signal − sin(10πt).

The Fourier transform components within −π ≤ ω < π are



X (e jω ) = [δ(ω − 0.6π )e jπ/4 + δ(ω + 0.6π )e− jπ/4 ]
100

+ [δ(ω − 2.7π + 2π ) − δ(ω + 2.7π − 2π )].
j100
The result of convolution is y(n) = 0, , Fig.2.11(bottom).
Solution 2.18. The Fourier transform of an analytic part of a signal is

⎨ 2X (e jω ) for 0 < ω < π

Xa (e ) = X (e jω ) for ω = 0

0 for −π ≤ ω < 0
= X (e jω ) + sign(ω )( X (e jω ) = X (e jω ) + Xh (e jω ).
The frequency response of the discrete Hilbert transformer is

⎨ 1 for 0 < ω < π
H (e jω ) = 0 for ω = 0 = sign(ω )

−1 for −π ≤ ω < 0
for −π ≤ ω < π. The impulse response is

2 sin2 (πn/2)
h(n) = sign(ω )e jωn dω = .
πn
−π
Ljubiša Stanković Digital Signal Processing 99

H(ejω) h(n)
1 2/π

-2 π -π 0 π 2π ω
0 n

Figure 2.13 Frequency and impulse response of the discrete-time Hilbert transformer.

1.5 1.5

1 1

X (Ω)
X(Ω)

p
0.5 0.5

0 0
-3 -2 -1 0 1 2 3 4 5 6 7 -3 -2 -1 0 1 2 3 4 5 6 7
Ω/Ω1 Ω/Ω1

Figure 2.14 Problem 2.19: illustration of the Fourier transform periodic extension.

For n = 0 the impulse response is h(0) = 0, Fig.2.13.

Solution 2.19. By a direct application of the sampling theorem we could


conclude that the sampling interval should be related to the maximum
frequency 5Ω1 as ∆t = π/(5Ω1 ), corresponding to the periodical extension
of the Fourier transform X (Ω) with period 10Ω1 . However, in this case,
there is no need to use such a large period in order to achieve that two
periods do not overlap. It is sufficient to use the period equal to 2Ω1 , as
shown in Fig. 2.14. We will be able to reconstruct the signal, with some
additional processing.
It is obvious that after signal sampling with ∆t = π/Ω1 (periodic ex-
tension of Fourier transform with 2Ω1 ) the basic period −Ω1 < Ω < Ω1 will
contain the original Fourier transform shifted for 4Ω1 . The reconstructed
signal is


sin(π (t − n∆t)/∆t)
x (t) = e j4Ω1 t ∑ x (n∆t) with ∆t = π/Ω1 .
n=−∞ π (t − n∆t)/∆t
100 Discrete-Time Signals and Transforms

Solution 2.20. For signal whose Fourier transform is zero for frequencies
Ω ≥ Ωm = 2π f m = π/∆t hods

X (Ω) = X (Ω) H (Ω)

where !
1 for |Ω| < π/∆t
H (Ω) = .
0 for |Ω| ≥ π/∆t
The impulse response of H (Ω) is

1 π/∆t
& jΩt sin(πt/∆t)
h(t) = e dΩ = .
2π −π/∆t πt

Then x (t) = x (t) ∗ h(t) produces

"∞ "∞
sin(π (t − τ )/∆t)
x (t) = x (τ )h(t − τ )dτ = x (τ ) dτ.
π (t − τ )
−∞ −∞

In order to write this relation in discrete-time form note that

X (Ω) = X p (Ω) H (Ω) (2.50)

holds if the Fourier transform of signal X (Ω) is periodically extended with


π
period 2 ∆t ≥ 2Ωm to produce
∞ * +

X (Ω) ∗Ω ∑ 2πδ Ω − k = X p ( Ω ).
k=−∞
∆t

Convolution in the frequency domain corresponds to the product of signals


in the time domain

x (t) ∑ δ(t + n∆t)∆t = IFT{ X p (Ω)} = x p (t). (2.51)
n=−∞

Relation (1.60)
* + % ; % ;
2π ∞ 2π ∞ ∞
∑ δ Ω − ∆t k = FT ∑ δ(t + n∆t) = FT ∑ δ(t − n∆t)
∆t k=− ∞ n=−∞ n=−∞

is used.
Ljubiša Stanković Digital Signal Processing 101

From (2.50) and then (2.51) follows

"∞ ∞
x (t) = x p (t) ∗t h(t) = x (τ ) ∑ δ(τ − n∆t)h(t − τ )∆tdτ
−∞ n=−∞
∞ ∞ π
sin( ∆t (t − n∆t))
= ∑ x (n∆t)h(t − n∆t)∆t = ∑ x (n∆t) π . (2.52)
n=−∞ n=−∞ ∆t ( t − n∆t )

The convergence of function sin (t)/t is very slow.


The previous derivation provides a possibility that a smooth transition
of H (Ω) is used for Ωm ≤ |Ω| ≤ Ωm + ∆Ωm . This region of smooth changes
from H (Ω) = 1 for |Ω| < Ωm to H (Ω) = 0 for |Ω| ≥ Ωm + ∆Ωm improves
the convergence of h(t), Fig.2.15. The sampling step should be (Ωm +
∆Ωm
2 ) = π/∆t so that the periodic extension of X (Ω ) H (Ω ) does not include
overlapped X (Ω) values. The impulse response h(t) can be then used in the
reconstruction formula

x (t) = ∑ x (n∆t)h(t − n∆t),
n=−∞

∆Ωm
with a reduction of the sampling interval to ∆t = π/(Ωm + 2 ) with
respect to ∆t = π/Ωm .
Solution 2.21. The Fourier transforms of discrete-time signals, in continu-
ous frequency notation, are periodically extended versions of X (Ω) with the
period 2π/∆t,


X1 ( Ω ) = ∑ X (Ω + 2πn/∆t),
n−−∞

X2 ( Ω ) = ∑ X (Ω + 2πn/∆t)e j(Ω+2πn/∆t)a .
n−−∞

Within the basic period (considering positive frequencies 0 ≤ Ω < Ωm ), only


two periods overlap

X1 (Ω) = X (Ω) + X (Ω − 2π/∆t),


X2 (Ω) = X (Ω)e jΩa + X (Ω − 2π/∆t)e j(Ω−2π/∆t)a .

The second term X (Ω − 2π/∆t) in these relations is the overlapped period


(aliasing) that should be eliminated using these two equations. The original
102 Discrete-Time Signals and Transforms

H(Ω)

X(Ω)

- Ωm Ωm Ω

X (Ω) = X(Ω)
p
H(Ω) -Ω <Ω<Ω
0 0

X(Ω)

-Ω -Ω Ω Ω Ω
0 m m 0

Xp(Ω) = X(Ω)
- Ω0 < Ω < Ω0

X(Ω)

-Ω -Ω Ω Ω Ω
0 m m 0

Figure 2.15 Smoothed filter in the sampling theorem illustration (first two graphs) versus
original sampling theorem relation within filtering framework.

signal’s Fourier transform X (Ω) follows as

X1 (Ω)e− j2πa/∆t − X2 (Ω)e− jΩa


X (Ω) = for a ̸= k∆t.
e− j2πa/∆t − 1

Similarly for negative frequencies, within the basic period −Ωm < Ω < 0,
follows
X (Ω)e j2πa/∆t − X2 (Ω)e− jΩa
X (Ω) = 1 for a ̸= k∆t.
e j2πa/∆t − 1
Ljubiša Stanković Digital Signal Processing 103

Therefore, the signal can be reconstructed from two independent


discrete-time signals undersampled with factor of two. A similar result
could be derived for N independently sampled, N times undersampled sig-
nals.
Solution 2.22. It is easy to show that

x (t0 + ∆t) + x (t0 − ∆t)


2x (t0 )
A sin(Ω0 t0 + ϕ + Ω0 ∆t) + A sin(Ω0 t0 + ϕ − Ω0 ∆t)
=
2A sin(Ω0 t0 + ϕ)
2 sin(Ω0 t0 + ϕ) cos(Ω0 ∆t)
= = cos(Ω0 ∆t),
2 sin(Ω0 t0 + ϕ)

with * +
1 x (t0 + ∆t) + x (t0 − ∆t)
Ω0 = arccos .
∆t 2x (t0 )
The condition for a unique solution is that the argument of cosine is 0 ≤
Ω0 ∆t ≤ π, limiting the approach to small values of ∆t.
In addition, here we will discuss the discrete complex-valued signal.
For a complex sinusoid x (n) = A exp( j2πk0 n/N + φ0 ), with available two
samples x (n1 ) = A exp( jϕ(n1 )) and x (n2 ) = A exp( jϕ(n2 )), from

x ( n1 )
= exp( j2πk0 (n1 − n2 )/N )
x ( n2 )

follows
2πk0 (n1 − n2 )/N = ϕ(n1 ) − ϕ(n2 ) + 2kπ,
where k is an arbitrary integer. Then

ϕ ( n1 ) − ϕ ( n2 ) k
k0 = N+ N. (2.53)
2π (n1 − n2 ) n1 − n2

Let us analyze the ambiguous term kN/(n1 − n2 ) role in the determination


of k0 . For n1 − n2 = 1, this term is kN, meaning that any frequency k0
would be ambiguous with kN. Any value k0 + kN for k ̸= 0, in this case,
will be outside the basic period 0 ≤ k ≤ N − 1. Thus, we may find k0
in a unique way, within 0 ≤ k0 ≤ N − 1. However, for n1 − n2 = L > 1,
the terms kN/(n1 − n2 ) = kN/L produce shifts within the frequency basic
period. Then several possible solutions for the frequency k0 are obtained.
For example, for N = 16 and k0 = 5 if we use n1 = 1 and n2 = 5, a possible
104 Discrete-Time Signals and Transforms

solution of (2.53) is k0 = 5, but also

k0 = 5 + 16k/4,

or k0 = 9, k0 = 13, and k0 = 1, for k0 within 0 ≤ k0 ≤ 15, are possible solutions


for frequency.
Solution 2.23. For the absolute values of even and odd part it holds
' ' ' '
' x (n) + x (−n) '2 ' x (n) − x (−n) '2
| xe (n)|2 + | xo (n)|2 = '' ' +'
' '
' .
'
2 2

From this relation follows

| x (n)|2 + | x (−n)|2
| xe (n)|2 + | xo (n)|2 = = A2s (n).
2

Obviously
F | xe (n)|2 ≤ A2s (n) and | xo (n)|2 ≤ A2s (n). Replacing | xo (n)| =
A2s (n) − | xe (n)|2 into | xe (n)| + | xo (n)| we get
F
| xe (n)| + | xo (n)| = | xe (n)| + A2s (n) − | xe (n)|2 .

Now we have to check the function


F
f (χ) = χ + A2s (n) − χ2

for variable χ within 0 ≤ χ ≤ | As (n)|. Variable χ stands for |,


xe (n)|. By dif-
ferentiating f (χ) with respect to χ we get d f (χ)/dχ = 1 − χ/ A2s (n) −√ χ2 .
The stationary point is obtained from d f (χ)/dχ = 0√for χ = As (n)/ 2.
√ d f (χ)/dχ is positive for χ < As (n)/ 2 and negative for
The derivative
χ > As (n)/ 2. Thus the stationary point√is the position of the function
maximum. The maximal function value is 2As (n) since
=
As (n) A2s (n) √
| xe (n)| + | xo (n)| ≤ √ + A2s (n) − = 2As (n).
2 2

The minimal value is achieved at the interval ending points for χ = 0 or


χ = As (n), producing

As (n) ≤ | xe (n)| + | xo (n)| ≤ 2As (n).
Ljubiša Stanković Digital Signal Processing 105

2.6 EXERCISE

Exercise 2.1. Calculate the convolution of signals x (n) = n[u(n) − u(n − 3)]
and h(n) = δ(n + 1) + 2δ(n) − δ(n − 2).

Exercise 2.2. Find the convolution of signals x (n) = e−|n| and h(n) = u(3 −
n ) u (3 + n ).
Exercise 2.3. The output of a linear time-invariant discrete system to the
input signal x (n) = u(n) is y(n) = ( 31n + n)u(n). Find the impulse response
h(n). Is the system stable?
Exercise&2.4. For signal x (n&) = nu(5 − n)u(n + 5) find the values of X (e j0 ),
π π
X (e jπ ), −π X (e jω )dω, and −π | X (e jω )|2 dω without the Fourier transform
calculation. Check the results by calculating the Fourier transform.
Exercise 2.5. For a signal x (n) at an instant m a signal y(n) = x (m −
n) x ∗ (m + n) is formed. Show that the Fourier transform of y(n) is real-
valued. What is the Fourier transform of y(n) if x (n) = A exp( jan2 /4 +
j2ω0 n)? Find the Fourier transform of z(m) = x (m − n) x ∗ (m + n) for a given
n.
Note: The Fourier transform of y(n) is the Wigner distribution of x (n)
for a given m, while the Fourier transform of z(m) is the Ambiguity function
of x (n) for a given n.
Exercise 2.6. For a signal x (n) with Fourier transform X (e jω ) find the
Fourier transform of x (2n). Find the Fourier transform of y1 (2n) = x (2n)
and y1 (2n + 1) = 0. What is the Fourier transform of x (2n + 1) and what is
the Fourier transform of y2 (2n) = 0 and y2 (2n + 1) = x (2n + 1). Check the
result by showing that Y1 (e jω ) + Y2 (e jω ) = X (e jω ).
Exercise 2.7. For a real-valued signal find the relation between the Fourier
transform of signal X (e jω ) and the Hartley transform

H (e jω ) = ∑ x (n)[cos(ωn) + sin(ωn)].
n=−∞

Write this relation if the signal is real-valued and even, x (n) = x (−n).
Exercise 2.8. Systems with impulse responses h1 (n), h2 (n) and h3 (n) are
connected in cascade. If the impulse responses h2 (n) = h3 (n) = u(n) −
u(n − 2) and the resulting impulse response is h(n) = δ(n) + 5δ(n − 1) +
10δ(n − 2) + 11δ(n − 3) + 8δ(n − 4) + 4δ(n − 5) + δ(n − 6). Find the impulse
response h1 (n).
106 Discrete-Time Signals and Transforms

Exercise 2.9. Continuous-time signal x (t) = sin(100πt) + cos(180πt) +


sin(200πt + π/4) is sampled with ∆t = 1/125 and used as an input to the
system with transfer function H (e jω ) = 1 for |ω | < 3π/4 and H (e jω ) = 0
for |ω | ≥ 3π/4. What is the discrete-time output of this system? What is
the corresponding continuous-time output signal? What should be the sam-
pling interval so that the continuous-time output signal y(t) is equal to the
input signal x (t)?
Chapter 3
Discrete Fourier Transform

ISCRETE - TIME signals can be processed on digital computers in the

D time domain. Their Fourier transform is a function of continuous


frequency. For numeric processing of discrete-time signals in the
frequency domain their Fourier transform should be discretized as well.
Discretization in the frequency domain will enable numeric processing of
discrete-time signals in both time and frequency domain.

3.1 DFT DEFINITION

The discrete Fourier transform (DFT) is defined by


N −1
DFT{ x (n)} = X (k ) = ∑ x (n)e− j2πkn/N (3.1)
n =0

for k = 0, 1, 2, ..., N − 1.
In order to establish the relation between the DFT with the Fourier
transform of discrete-time signals, consider a discrete-time signal x (n) of
limited duration. Assume that nonzero samples of x (n) are within 0 ≤ n ≤
N0 − 1. Its Fourier transform is
N0 −1
X (e jω ) = ∑ x (n)e− jωn .
n =0

The DFT values can be considered as the frequency domain samples of the
Fourier transform of discrete-time signals, taken at ∆ω = 2π/N. There are
N frequency samples within the period −π ≤ ω < π,
'
'
X (k ) = X (e j2πk/N ) = X (e jω )' . (3.2)
ω =k∆ω =2πk/N

107
108 Discrete Fourier Transform

x(n)

x(n) = x(t) Δt t = nΔt

0 N0 n

xp(n)

0 N n

Figure 3.1 Periodic extension of a discrete-time signal.

In order to examine how the Fourier Transform sampling in the fre-


quency domain influences the signal in the time domain, we will form a
periodic extension of x (n) with a period N ≥ N0 , Fig.3.1.
With N being greater or equal to the signal duration N0 , we will
be able to reconstruct the original signal x (n) from its periodic extension
x p (n). Furthermore, we will assume that the periodic signal x p (n) is formed
from the samples of periodic continuous-time signal x p (t) with a period T
(corresponding to N signal samples within the period, T = N∆t). Its Fourier
series coefficients are

"T
1
Xk = x p (t)e− j2πkt/T dt.
T
0

Assuming that the sampling theorem is satisfied, the integral can be re-
placed by a sum (in the sense of Example 2.13)

N −1
1
Xk = ∑ x (n∆t)e− j2πkn∆t/T ∆t
T n =0
Ljubiša Stanković Digital Signal Processing 109

with x p (t) = x (t) within 0 ≤ t < T. Using T/∆t = N, x (n∆t)∆t = x (n) and
X (k ) = TXk this sum can be written as

N −1
X (k ) = ∑ x (n)e− j2πkn/N . (3.3)
n =0

Therefore, the relation between the DFT and the Fourier series coeffi-
cients is
X (k ) = TXk . (3.4)
Sampling the Fourier transform of a discrete-time signal corresponds to
the periodical extension of the original discrete-time signal in time by the
period N. The period N in time is equal to the number of samples of the
Fourier transform within one period in frequency. We can conclude that this
periodic extension in time (discretization in frequency) will not influence
the possibility to recover the original signal if the original discrete-time
signal duration was not longer than N (the number of samples in the Fourier
transform of discrete-time signal).
The inverse DFT is obtained by multiplying both sides of the DFT
definition (3.1) by e j2πkm/N and summing over k

N −1 N −1 N −1
∑ X (k )e j2πmk/N = ∑ x (n) ∑ e j2πk(m−n)/N
k =0 n =0 k =0

with
N −1
1 − e j2π (m−n)
∑ e j2πk(m−n)/N = = Nδ(m − n),
k =0 1 − e j2π (m−n)/N
for 0 ≤ m, n ≤ N − 1. The inverse discrete Fourier transform (IDFT) of signal
x (n) is
1 N −1
X (k )e j2πnk/N .
N k∑
x (n) = (3.5)
=0
for 0 ≤ n ≤ N − 1.
The signal calculated by using the IDFT is, by definition, periodic with
the period N since

N −1
1
x (n + N ) = ∑ X (k )e j2π (n+ N )k/N = x (n).
N k =0

Therefore the DFT of a signal x (n) calculated using the signal samples
within 0 ≤ n ≤ N − 1 assumes that the signal x (n) is periodically extended
110 Discrete Fourier Transform

with period N as


IDFT{DFT{ x (n)}} = ∑ x (n + mN )
m=−∞

with ∑ x (n + mN ) = x (n) for 0 ≤ n ≤ N − 1.
m=−∞

The values of this periodical extension within the basic period are equal to
x (n). This is a circular extension of signal x (n). The following notations are
also used for this kind of the signal x (n) extension

IDFT{DFT{ x (n)}} = x (n mod N ) = x ((n)) N .

The original aperiodic signal is then

x (n) = IDFT{DFT{ x (n)}} (u(n) − u(n − N )) ,

assuming that the initial DFT was calculated for signal samples x (n) within
0 ≤ n ≤ N − 1.
In literature it is quite common to use the same notation for both x (n)
and IDFT{DFT{ x (n)}} having in mind that any DFT calculation with N
signal samples implicitly assumes a periodic extension of the original signal
x (n) with period N. Thus, we will use this kind of notation, except in the
cases when we want to emphasize a difference in the results when the
inherent periodicity in the signal (when the DFT is used) is not properly
taken into account.
Example 3.1. For the signals x (n) = 2 cos(2πn/8) for 0 ≤ n ≤ 7 and x (n) =
2 cos(2πn/16) for 0 ≤ n ≤ 7 plot the periodic signals IDFT {DFT{ x (n)}} with
N = 8 without calculating the DFTs.

Example 3.2. ⋆The periodic extensions of these signals resulting from


IDFT{DFT{ x (n)}} = ∑ x (n + 8m)
m=−∞

are shown in Fig.3.2.

Example 3.3. For a signal x (n) whose values are x (0) = 1, x (1) = 1/2, x (2) = −1,
and x (3) = 1/2 find the DFT with N = 4. What is the IDFT for n = −2?
Ljubiša Stanković Digital Signal Processing 111

x(n) x(n)

0 N=8 n 0 N=8 n

...x(n-N)+x(n)+x(n+N)+.. ...x(n-N)+x(n)+x(n+N)+..

0 N=8 n 0 N=8 n

Figure 3.2 Signals x (n) = 2 cos(2πn/8) for 0 ≤ n ≤ 7 (left) and x (n) = 2 cos(2πn/16) for
0 ≤ n ≤ 7 (right) along with their periodic extensions IDFT {DFT{ x (n)}} with N = 8.

⋆The DFT of this signal is


3
1 1
X (k) = ∑ x(n)e− j2πnk/4 = 1 + 2 e− j2πk/4 − e− jπk + 2 e j2πk/4
n =0
= 1 + (−1)k+1 + cos(2πk/4).

The IDFT is

1 3
[1 + cos(2πk/4) + (−1)k+1 ]e j2πnk/4 ,
4 k∑
x (n) =
=0

for 0 ≤ n ≤ 3. The DFT and IDFT inherently assume the signal and its Fourier
transform periodicity. Thus the result for n = −2 is

1 3 k 1 3 k
x (−2) = ∑ X (k )e j2π (−2) 4 = ∑ X (k )e j2π (4−2) 4 = x (4 − 2) = x (2) = −1.
4 k =0 4 k =0

Example 3.4. Assume that there is a routine to calculate the DFT of x (n) for
0 ≤ n ≤ N − 1 as X (k ) = DFT{ x (n)} = R{ x (n)}. How to use it to calculate the
DFT of a signal x (n) whose values are given within − N/2 ≤ n ≤ N/2 − 1?
⋆A periodic extension of the signal x (n) is assumed when the DFT
is calculated. It means that in the DFT calculation the signal x (n), defined
within − N/2 ≤ n ≤ N/2 − 1, will be extended with the period N. Here, we
112 Discrete Fourier Transform

have a routine to calculate the DFT of a signal using samples within 0 ≤ n ≤


N − 1. Samples of the periodic extension of x (n) within 0 ≤ n ≤ N − 1 should
be used in the calculation. They are xs (n) = x (n) within 0 ≤ n ≤ N/2 − 1 and
xs (n) = x (n − N ) for N/2 ≤ n ≤ N − 1. Then the DFT is obtained as

DFT{ x (n)} = DFT{ x (ns )} = R{ xs (n)}


x (n) = IDFT{DFT{ xs (n)}}(u(n + N/2) − u(n − N/2)).

Here, we have used the property that for a signal y(n) periodic with a period
N holds ∑nN=−01 y(n) = ∑nM=+MN −1 y(n) for any M (Generalize the result for the
DFT calculation and inversion for a signal x (n) defined within M ≤ n ≤
M + N − 1, using the given routine R{ x (n)}).

In a matrix form, the DFT can be written as


⎡ ⎤ ⎡ ⎤⎡ ⎤
X (0) 1 1 ··· 1 x (0 )
⎢ X (1) ⎥ ⎢ 1 e − j 2π ··· e − j 2π ( N −1) ⎥⎢
x (1 ) ⎥
⎥ ⎢ ⎥⎢
N N
⎢ ⎥
⎢ .. ⎥=⎢ .. .. .. .. ⎥⎢ .. ⎥
⎣ . ⎦ ⎢
⎣ . . . .
⎥⎣
⎦ . ⎦
2π ( N −1) 2π ( N −1)( N −1)
X ( N − 1) 1 e− j N ··· e− j N x ( N − 1)
(3.6)
or
X = Wx, (3.7)
where X and x are the vectors containing the signal and its DFT values

X=[ X (0) X (1) ... X ( N − 1)] T


x=[ x (0) x (1) ... x ( N − 1)] T ,

respectively, while W is the discrete Fourier transform matrix with coeffi-


cients
⎡ ⎤
1 1 ··· 1
⎢ 1 1 N −1 ⎥
⎢ W N · · · W N ⎥
W = ⎢ .. .. .. .. ⎥, (3.8)
⎣ . . . . ⎦
( N −1) ( N −1)( N −1)
1 WN · · · WN

where
k
WN = e− j2πk/N
is used to simplify the notation, especially in graphical illustrations.
The number of additions to calculate a DFT is N − 1 for each X (k )
in (3.1). Since there are N DFT coefficients the total number of additions is
Ljubiša Stanković Digital Signal Processing 113

N ( N − 1). From the matrix from (3.6) we can see that the multiplications
are not needed for calculation of X (0). There is non need for multiplication
in the first term of each coefficient calculation as well. If we neglect the fact
that some other terms in matrix (3.6) may also assume values 1, −1, j, or − j
then the number of multiplications is ( N − 1)2 . The order of the number of
multiplications and the number of additions for the DFT calculation is N 2 .
The inverse DFT in a matrix form is

x = W−1 X, (3.9)

with W−1 = N1 W∗ , where ∗ denotes complex-conjugate operation. The same


calculation complexity analysis holds for the inverse DFT as for the DFT.

3.2 DFT PROPERTIES

Most of the DFT properties can be derived in the same way as in the Fourier
transform and the Fourier transform of discrete-time signals.

1. Consider a signal x (n) shifted in time x (n − n0 ). If the DFT of signal


x (n) is X (k ) = DFT{ x (n)} then X (k )e− j2πkn0 /N will represent a signal

N −1
1 2π
IDFT{ X (k )e− j2πkn0 /N } = ∑ X (k )e− j2πkn0 /N e j N kn
N k =0
N −1
1 2π
= ∑ X ( k ) e j N k ( n − n0 ) = x ( n − n 0 ). (3.10)
N k =0

Here x (n − n0 ) is the signal obtained when x (n) is periodically ex-


tended with N first and then this periodic signal is shifted for n0 .
The basic period of the original signal x (n) is now within n0 ≤ n ≤
N − n0 − 1.
This kind of shift in periodic signals, used in the above relation,
is also referred to as a circular shift. Thus, with the circular shift

DFT{ x (n − n0 )} = X (k )e− j2πkn0 /N . (3.11)

2. For a modulated signal x (n)e j2πnk0 /N we easily get


M N
DFT x (n)e j2πnk0 /N = X (k − k0 ). (3.12)
114 Discrete Fourier Transform

3. The DFT is real-valued if

x ∗ ( n ) = x ( N − n ).

For a real-valued DFT holds

X (k ) = X ∗ (k )

or
N −1 N −1 N −1
∑ x (n)e− j2πnk/N = ∑ x ∗ (n)e j2πnk/N = ∑ x ∗ ( N − n)e j2π ( N −n)k/N ,
n =0 n =0 n =0

where x ∗ ( N )e j2πNk/N = x ∗ (0)e j2π0k/N is used. Since e j2πn( N −n)/N =


e− j2πnk/N we get
N −1 N −1
∑ x (n)e− j2πnk/N = ∑ x ∗ ( N − n)e− j2πnk/N .
n =0 n =0

It means that if X (k ) = X ∗ (k ) then x ∗ (n) = x ( N − n) = x (−n).


In the same way for a real-valued signal x (n) the DFT satisfies

X ∗ ( k ) = X ( N − k ).

4. Parseval’s theorem for discrete-time periodic signals relates the en-


ergy in the time and the frequency domain
N −1 N −1 N −1 N −1
1
∑ | x (n)|2 = ∑ ∑ ∑ X (k1 ) X ∗ (k2 )e j2πn(k1 −k2 )/N
n =0 N2 n =0 k 1 =0 k 2 =0
N −1 N −1 N −1
1 1
= 2 ∑ ∑ X (k1 ) X ∗ (k2 ) Nδ(k1 − k2 ) = ∑ | X (k)|2 .
N k =0 k =0 N k =0
1 2

5. Convolution of two periodic signals x (n) and h(n), whose period is


N, is defined by
N −1
y(n) = ∑ x ( m ) h ( n − m ).
m =0
The DFT of this signal is
N −1 N −1
Y (k ) = DFT{y(n)} = ∑ ∑ x (m)h(n − m)e− j2πnk/N = X (k ) H (k ).
n =0 m =0
(3.13)
Ljubiša Stanković Digital Signal Processing 115

Thus, the DFT of a convolution of two periodic signals is equal to


the product of DFTs of individual signals. Since the convolution is
performed on periodic signals (the DFT inherently assumes signals
periodicity), a circular shift of signals is assumed in the calculation.
This kind of convolution is called circular convolution.
Relation (3.13) indicates that we can calculate convolution of two
aperiodic discrete-time signals of a limited duration in the following
way:
• Calculate DFTs of x (n) and h(n) and obtain X (k ) and H (k ). At
this point, we inherently make periodic extension of x (n) and
h(n) with period N.
• Multiply these two DFTs to obtain DFT of the output signal
Y ( k ) = X ( k ) H ( k ).
• Calculate the inverse DFT to get the convolution

y(n) = IDFT{Y (k )}.

This procedure looks more complex than the direct calculation


of convolution by definition. However, due to very efficient and fast
routines for the DFT and the IDFT calculation, this way of calculation
could be more efficient than the direct one.
In using this procedure, we have to take care about the length of
signals and their DFTs that assume periodic extension.
Example 3.5. Consider a discrete-time signal
x ( n ) = u ( n ) − u ( n − 5).

Calculate the convolution x (n) ∗ x (n). Extend signals with period N = 7 and
calculate the circular convolution (corresponding to the DFT based convolu-
tion calculation with N = 7, which is longer than the signal duration). Com-
pare the results. What value of N should be used for the period so that the
direct convolution corresponds to one period of the circular convolution?
⋆Signal x (n) and its reversed version x (−n), along with the
shifted signal used in the convolution calculation, are presented in Fig.3.3.
In the circular (DFT) calculation, for example, at n = 0, the con-
volution value is
6
x p (n) ∗ x p (n) = ∑ x p (m) x p (0 − m) = 1 + 1 + 1 = 3.
m =0

In addition to the term x (0) x (0) = 1 which exists in the aperiodic convolution,
two terms for m = 3 and m = 4 appeared due to the periodic extension of
116 Discrete Fourier Transform

1.5 6

x(n)* x(n)
1 4
x(n)

0.5
2
0
-0.5 0
-15 -10 -5 0 5 10 15 -15 -10 -5 0 5 10 15
n n
1.5 1.5

xp(-m+1 )
1 1
x (m)

0.5 0.5
p

0 0
-0.5 -0.5
-15 -10 -5 0 5 10 15 -15 -10 -5 0 5 10 15
n n
1.5 1.5
xp(-m+3 )

1 1
x (-m )

0.5 0.5
p

0 0
-0.5 -0.5
-15 -10 -5 0 5 10 15 -15 -10 -5 0 5 10 15
n n
1.5 6
xp(n)* xp(n)
x (-m+5 )

1 4
0.5
2
0
p

-0.5 0
-15 -10 -5 0 5 10 15 -15 -10 -5 0 5 10 15
n n

Figure 3.3 Illustration of the discrete-time signal convolution and circular convolution for
signals whose length is 5 and the circular convolution is calculated with N = 7.

the signal. They made that the circular convolution value differs from the
convolution of original aperiodic signals. The same situation occurred for
n = 1 and n = 2. For n = 3, 4, and 5 the correct result for aperiodic convolution
is obtained using circular convolution. It could be concluded that if the signal
in circular convolution were separated by at least two more zero values (if the
period N were N ≥ 9) this difference would not occur, Fig.3.4 for N = 9. Then
one period of circular convolution 0 ≤ n ≤ N − 1 would correspond to the
original aperiodic convolution.

If a signal x (n) is of length M, then we can calculate its DFT with


any N ≥ M, so that the signal will not overlap with its periods, added
Ljubiša Stanković Digital Signal Processing 117

1.5
1

xp(-m )
xp(m)

0.5
0
-0.5
-15 -10 -5 0 5 10 15 n
n
1.5 6

xp(n)* xp(n)
xp(-m+8 )

1 4
0.5
2
0
-0.5 0
-15 -10 -5 0 5 10 15 -15 -10 -5 0 5 10 15
n n

Figure 3.4 Illustration of the discrete-time signal circular convolution for signals whose
length is 5 and the circular convolution is calculated with N = 9.

using the DFT. If a signal h(n) is of length L, then we can calculate


its DFT with any N ≥ L. However, if we want to use their DFTs for
a convolution calculation (to use circular convolution), then from the
previous example we see that the length of convolution y(n) is M +
L − 1. Therefore, for the DFT-based calculation of y(n), we have to use
at least N ≥ M + L − 1. It means that both DFTs, X (k ) and H (k ), whose
product results in Y (k ), must be at least of N ≥ M + L − 1 duration.
Otherwise, aliasing (overlapping of the periods) will appear. Then
the circular convolution calculated in this way would not correspond
(within the basic period) to the convolution of the original discrete-
time (aperiodic) signals.

Duration of the input signal x (n) may be much longer that the dura-
tion of the impulse response h(n). For example, an input signal may have
tens of thousands of samples, while the impulse response of a discrete sys-
tem duration is, for example, tens of samples, M ≫ L. A direct convolution
would be calculated (after first L − 1 output samples) as

n
y(n) = ∑ x ( m ) h ( n − m ).
m = n − L +1

For each output sample, L multiplications would be used. For a direct DFT
application in the convolution calculation we should wait until the end of
the signal and then zero-pad both the input signal and the impulse response
118 Discrete Fourier Transform

up to M + L − 1. This kind of calculation is not efficient. Instead of using


a direct DFT calculation, the signal is split into nonoverlapping sequences
whose duration N is of the order of impulse response duration L,
K −1
x (n) = ∑ x k ( n ),
k =0

where xk (n) = x (n)[u(n − kN ) − u(n − (k + 1) N ] and M = KN (the input


signal can always be zero-padded up to the nearest KN duration, where K
is an integer). The output signal is
( )
K −1 n K −1
y(n) = ∑ ∑ xk (m)h(n − m) = ∑ y k ( n ). (3.14)
k =0 m = n − L +1 k =0

For the convolutions yk (n) = xk (n) ∗n h(n) calculation the signals xk (n)
and h(n) should be of duration N + L − 1 only. These convolutions can be
calculated after each N ≪ M input signal samples. The output sequence
yk (n) duration is N + L − 1. Since yk (n), k = 0, 1, . . . , K − 1, are calculated
with step N in time, they overlap, although the input signals xk (n) are
nonoverlapping. For two successive yk (n) and yk+1 (n) and L ≤ N, L − 1
samples within kN + N ≤ n < kN + N + L − 1 overlap. This should be taken
into account, by summing the overlapped output samples in y(n), after the
individual convolutions yk (n) = xk (n) ∗n h(n) are calculated using the DFTs,
Fig.3.5.

3.3 ZERO-PADDING AND INTERPOLATION

The basic period of the DFT X (k ), calculated for k = 0, 1, 2, ..., N − 1, should


be considered as having two parts: one part for 0 ≤ k ≤ N/2 − 1, that
corresponds to the positive frequencies

2π 2π
ω= k or Ω = k, for 0 ≤ k ≤ N/2 − 1, (3.15)
N N∆t
and the other part being a shifted version of the negative frequencies (in the
original aperiodic signal)

2π 2π
ω= (k − N ) or Ω = (k − N ), for N/2 ≤ k ≤ N − 1. (3.16)
N N∆t
Illustration of the frequency correspondence to the frequency index in the
DFT is given in Fig.3.6
Ljubiša Stanković Digital Signal Processing 119

x(n)

0 n

h(n)

0 n

x (n)
1

0 n

x (n)
2

0 n

x (n)
3

0 n

y1(n)

0 n

y2(n)

0 n

y (n)
3

0 n

y(n)

0 n

Figure 3.5 Illustration of the convolution calculation when the input signal duration is much
longer then the duration of the system impulse response.
120 Discrete Fourier Transform

X(Ω)|Ω=2πk/(NΔt)

-N/2 0 N/2-1 k
Ω=2πk/(NΔt)

X(k)

0 N k

Figure 3.6 Relation between the frequency in continuous-time and the DFT frequency index.

We have seen that the DFT of a signal whose duration is limited to


M samples can be calculated by using any N ≥ M. In practice, this means
that we can add (use) as many zeros, after the nonzero signal x (n) values,
as we like. By doing this, we increase the calculation complexity, but we
also increase the number of samples within the same frequency range of the
Fourier transform.
If we recall that

X (k ) = X (e jω )|ω =k∆ω =2πk/N = X (Ω)|Ω=k∆Ω=2πk/( N∆t) , (3.17)

holds in the case when the sampling theorem is satisfied, then we see that by
increasing N in the DFT calculation, the density of sampling (interpolation)
in the Fourier transform of the original signal increases. The DFT interpo-
lation by zero padding the signal in the time domain is illustrated in Fig.
3.7.
The same holds for the frequency domain. If we calculate DFT with N
samples and then add, for example, N zeros after the region corresponding
to the highest frequencies, then by the IDFT of this 2N point DFT, we will
interpolate the original signal in time. All zero values in the frequency
domain should be inserted between two parts (regions) of the original DFT
corresponding to positive and negative frequencies.
Ljubiša Stanković Digital Signal Processing 121

x(n)

n
X(k)

k
x(n)

n
X(k)

k
x(n)

n
X(k)

Figure 3.7 Discrete-time signal and its DFT (top two subplots). Discrete-time signal zero-
padded and its DFT interpolated (two subplots in the middle). Zero-padding (interpolation)
factor was 2. Discrete-time signal zero-padded and its DFT interpolated (two bottom subplots).
Zero-padding (interpolation) factor was 4. According to the duality property, the same holds if
X (k) were signal in the discrete-time and x (−n) was its Fourier transform.
122 Discrete Fourier Transform

Example 3.6. The Hann(ing) window for a signal within − N/2 ≤ n ≤ N/2 − 1, is
1 2πn
w(n) = [1 + cos( )], for − N/2 ≤ n ≤ N/2 − 1. (3.18)
2 N
If the original signal values are within 0 ≤ n ≤ N − 1 then the Hann(ing)
window form is
1 2πn
w(n) = [1 − cos( )], for 0 ≤ n ≤ N − 1. (3.19)
2 N
Present the zero-padded forms of Hann(ing) windows with 2N samples.
⋆The zero-padded form of the Hann(ing) windows used for window-
ing data within the intervals − N/2 ≤ n ≤ N/2 − 1 and 0 ≤ n ≤ N − 1 are
shown in Fig.3.8. The DFTs of windows (3.18) and (3.19) are W (k ) = N [δ(k) +
δ(k − 1)/2 + δ(k + 1)/2]/2 and W (k ) = N [δ(k) − δ(k − 1)/2 − δ(k + 1)/2]/2,
respectively. After the presented zero-padding the window DFT realness
property w pz (n) = w pz (n − 2N ) is preserved (for an even N in the case
− N/2 ≤ n ≤ N/2 − 1 and for an odd N for data within 0 ≤ n ≤ N − 1).

3.4 RELATION AMONG THE FOURIER REPRESENTATIONS

Presentation of the DFT will be concluded with an illustration (Fig. 3.9) of


the relation among four forms of the Fourier domain signal representations
for the cases of:

1. Continuous-time aperiodic signal (Fourier transform):

"∞ "∞
x (t) = 1
2π X (Ω)e jΩt dΩ, X (Ω) = x (t)e− jΩt dt.
−∞ −∞

2. Continuous-time periodic signal (Fourier series):


x p (t) = ∑ x (t + mT )
m=−∞

∞ T/2
"
x p (t) = ∑ Xn e j2πnt/T
, Xn = 1
T x (t)e− j2πnt/T dt,
n=−∞
− T/2

1
Xn = X (Ω)|Ω=2πn/T .
T
Ljubiša Stanković Digital Signal Processing 123

w(n)

-N/2 0 N/2-1 n

wp(n)

0 N n

w (n)
p

0 N 2N n

w(n)

0 N n

wp(n)

0 N n

w (n)
p

0 2N n

Figure 3.8 Zero-padding of the Hann(ing) windows used to window data within − N/2 ≤
n ≤ N/2 − 1 and 0 ≤ n ≤ N − 1.
124 Discrete Fourier Transform

If the periodic signal is formed by a periodic extension of an aperiodic


signal x (t) then there is no signal overlapping (aliasing) in the periodic
signal if the original aperiodic signal duration is shorter than the
extension period T.
3. Discrete-time aperiodic signal (Fourier transform of discrete-time
signals)
x (n) = x (n∆t)∆t,
"∞ ∞
x (n) = 1
2π X (e jω )e jωt dω, X (e jω ) = ∑ x (n)e− jωn ,
−∞ n=−∞



X (e jω ) = ∑ X (Ω + m ) .
m=−∞ ∆t |Ω=ω/∆t
The Fourier transform of the discrete-time signal is a periodic exten-
sion X (e jω ), ω = Ω∆t, of the Fourier transform X (Ω) of a continuous-
time signal. There is no overlapping (aliasing) if the width of the
Fourier transform of the original continuous-time signal is shorter
than the extension period 2π/∆t.
4. Discrete-time periodic signal (discrete Fourier transform)


x p (n) = ∑ x (n + mN ) = x p (t)|t=n∆t ,
m=−∞

N −1 N −1
x p (n) = 1
N ∑ X (k )e j2πnk/N , X (k ) = ∑ x (n)e− j2πnk/N ,
k =0 n =0

X (k ) = X (e jω )|ω =2πk/N = X (Ω)|Ω=2πk/( N∆t) = TXk .

In the periodic discrete-time signal x p (n) it has been assumed that


there is no overlapping of the original aperiodic discrete-time signal
x (n) samples, i.e, that its duration is shorter than the period N, x (n) =
x p (n) for 0 ≤ n ≤ N − 1.

3.5 FAST FOURIER TRANSFORM

Algorithms that provide efficient calculation of the DFT, with a reduced


number of arithmetic operations, are called the fast Fourier transform (FFT).
A unified approach to the DFT and the inverse DFT, (3.5), is used. The only
Ljubiša Stanković Digital Signal Processing 125

x(t) X(Ω)

X(Ω)
x(t)

t Ω

x(n) = x(t) Δt t = nΔt X(e jω ) = X(Ω)


Ω = ω/Δt
-π≤ω<π

)

x(n)

X(e

-π π

n ω

xp(t) = x(t) Xn = X(Ω)/T Ω = 2πn/T


- T/2 ≤ t < T/2
x (t)

Xn
p

- T/2 T/2

t n

j2πk/T
xp(n) = x(n) X(k) = X(e ) = TX
k
- N/2 ≤ n < N/2 - N/2 ≤ k < N/2
x (n)

X(k)
p

- N/2 N/2 - N/2 N/2

n k

Figure 3.9 Aperiodic continuous-time signal and its Fourier transform (first row). Discrete-
time signal and its Fourier transform (second row). Periodic continuous-time signal and its
Fourier series coefficients (third row). Periodic discrete-time signal and its discrete Fourier
transform (DFT), (fourth row).
126 Discrete Fourier Transform

differences between the DFT and inverse DFT calculation are in the sign of
the exponent and the division of the final result by N.
Here we will present an algorithm based on splitting the signal x (n),
with N samples, into two signals x (n) for 0 ≤ n ≤ N/2 − 1 and x (n) for
N/2 ≤ n ≤ N − 1, whose duration is N/2. It is assumed that N is an even
number. By definition, a DFT of a signal with N samples is

N −1
DFT N { x (n))} = X (k ) = ∑ x (n)e− j2πnk/N
n =0
N/2−1 N −1
= ∑ x (n)e− j2πnk/N + ∑ x (n)e− j2πnk/N
n =0 n= N/2
N/2−1 @ A
= ∑ x (n) + x (n + N/2)(−1)k e− j2πnk/N
n =0

since e− j2π (n+ N/2)k/N = e− j2πnk/N e− jπk = (−1)k e− j2πnk/N .


For an even number k = 2r we have
N/2−1
DFT N/2 { g(n)} = X (2r ) = ∑ g(n)e− j2πnr/( N/2)
n =0

with
g(n) = x (n) + x (n + N/2).
For an odd number k = 2r + 1, follows

N/2−1
DFT N/2 {h(n)} = X (2r + 1) = ∑ h(n)e− j2πnr/( N/2)
n =0

where
h(n) = ( x (n) − x (n + N/2))e− j2πn/N .
In this way, we split one DFT of N elements into two DFTs of N/2
elements. Having in mind that the direct calculation of a DFT with N
elements requires an order of N 2 operations, it means that we will reduce
the calculation complexity, since N 2 > ( N/2)2 + ( N/2)2 . An illustration of
this calculation, with N = 8, is shown in Fig. 3.10. We can continue and
split N/2 DFTs into N/4 DFTs, and so on. A complete calculation scheme is
shown in Fig. 3.11. We can conclude that in the FFT algorithms an order of
N log2 N of operations is required. Here it is assumed that log 2 N = p is an
integer, i.e., N = 2 p . This a decimation-in-frequency algorithm.
Ljubiša Stanković Digital Signal Processing 127

x(0) X(0)

x(1) X(2)
DFT
4
x(2) X(4)

x(3) X(6)

x(4) 0 X(1)
-1 W8
x(5) 1 X(3)
-1 W8 DFT
4
x(6) 2 X(5)
-1 W8
x(7) X(7)
-1 W3
8

Figure 3.10 DFT of length 8 calculation using two DFTs of length 4.

x(0) X(0)

x(1) 0 X(4)
-1 W8

x(2) 0 X(2)
-1 W8

x(3) 2 0 X(6)
-1 W8 -1 W8

x(4) 0 X(1)
-1 W8

x(5) 1 0 X(5)
-1 W8 -1 W8

x(6) 2 0 X(3)
-1 W8 -1 W8

x(7) X(7)
-1 W3 -1 W8
2 -1 W8
0
8

Figure 3.11 FFT calculation scheme obtained by decimation-in-frequency for N = 8.


128 Discrete Fourier Transform

If we want to be precise the number of additions is exactly

Nadditions = N log2 N.

For the number of multiplications we can see that in the first stage there are
( N/2 − 1) multiplications. In the second stage there are 2 ( N/4 − 1) mul-
B be 4C( N/8 − 1) multiplications. Finally
tiplications. In the next stage would
in the last stage would be 2 p−1 2Np − 1 = N2 ( N N − 1) = 0 multiplications
p
(N = 2 or p = log2 N). The total number of multiplications, in this algo-
rithm, is
* + * + * + * +
N N N p −1 N
Nmultiplicat. = −1 +2 −1 +4 − 1 + ... + 2 −1
2 4 8 2p
N N N N N
= − 1 + − 2 + − 4 + ... + −
2 2 2 2 2
N N 1 − 2p
= p − (1 + 2 + 22 + ... + 2 p−1 ) = p −
2 2 1−2
N N
= log2 N − ( N − 1) = [log2 N − 2] + 1.
2 2
If the multiplications by j and − j were excluded the number of multiplica-
tions would be additionally reduced.
Example 3.7. Consider a signal x (n) within 0 ≤ n ≤ N − 1. Assume that N is an
even number. Show that the DFT of x (n) can be calculated as two DFTs, one
using the even samples of x (n) and the other using odd samples of x (n).
⋆By definition
N −1
X (k ) = ∑ x (n)e− j2πkn/N
n =0
N/2−1 N/2−1
= ∑ x (2m)e− j2πk2m/N + ∑ x (2m + 1)e− j2πk(2m+1)/N
m =0 m =0
N/2−1 N/2−1
= ∑ xe (m)e− j2πkm/( N/2) + e− j2πk/N ∑ xo (m)e− j2πkm/( N/2) , (3.20)
m =0 m =0

where xe (m) = x (2m) and xo (m) = x (2m + 1) are even and odd samples of the
signal, respectively. Thus, a DFT of N elements is split into two DFTs of N/2
elements. Two DFTs of N/2 elements require an order of 2 ( N/2)2 = N 2 /2
operations. It is less than N 2 . In this way, if N/2 is an even number, we can
continue and split two DFTs of N/2 elements into four DFTs of N/4 elements,
and so on. This is a decimation-in-time algorithm, Fig.3.12.
Ljubiša Stanković Digital Signal Processing 129

x(0) X(0)

x(4) X(1)
W0 -1
8

x(2) X(2)
W0 -1
8

x(6) X(3)
W0 -1 W2 -1
8 8

x(1) X(4)
W0 -1
8

x(5) X(5)
W0 -1 W1 -1
8 8

x(3) X(6)
W0 -1 W2 -1
8 8

x(7) X(7)
W0 -1 W2 -1 W3 -1
8 8 8

Figure 3.12 Decimation-in-time FFT algorithm for N = 8.

Example 3.8. Consider a signal x (n) within 0 ≤ n ≤ N − 1. Assume that N = 3M.


Show that the DFT of x (n) can be calculated using three DFTs of M samples.
⋆The DFT of x (n) is
3M−1
X (k) = ∑ x (n)e− j2πkn/(3M)
n =0
M −1 2M −1 3M −1
= ∑ x (m)e− j2πkm/(3M) + ∑ x (m)e− j2πkm/(3M) + ∑ x (m)e− j2πkm/(3M)
m =0 m= M m=2M
M −1 @ 2πkM 2πk2M
A 2πmk
= ∑ x (m) + x (m + M )e− j 3M + x (m + 2M)e− j 3M e− j 3M .
m =0

Now we can consider three cases for frequency index k

M −1
X (3k) = ∑ g(n)e− j2πmk/M
m =0

with g(n) = x (m) + x (m + M) + x (m + 2M )

M −1
X (3k + 1) = ∑ r (n)e− j2πmk/M
m =0
130 Discrete Fourier Transform

D E
with r (n) = x (m) + ax (m + M ) + a2 x (m + 3M ) e− j2πm/(3M) ,

M −1
X (3k + 2) = ∑ p(n)e− j2πmk/M
m =0
D E
with p(n) = x (m) + a2 x (m + M ) + ax (m + 3M ) e− j2π2m/(3M) , where a =
e− j2π/3 . Thus, a DFT of N = 3M elements is split into three DFTs of N/3 = M
elements. Three DFTs of N/3 elements require an order of 3 ( N/3)2 = N 2 /3
operations. If, for example, M = N/3 is an even number, we can continue
and split three DFTs of N/3 elements into six DFTs of N/6 elements, and so
on.

3.6 SAMPLING OF PERIODIC SIGNALS

A periodic signal x (t), with a period T, can be reconstructed if its Fourier se-
ries is with limited number of nonzero coefficients so that Xk = 0 for k > k m
corresponding to frequencies greater than Ωm = 2πk m /T. The periodic sig-
nal can be reconstructed from the samples taken at ∆t < π/Ωm = 1/(2 f m ).
The number of samples within the period is N = T/∆t.
The reconstructed signal is

N −1 t
sin[(n − ∆t )π ]
x (t) = ∑ x (n∆t)
N sin[(n − t
n =0 ∆t )π/N ]

for and odd N and

N −1 t
sin[(n − ∆t )π ]
x (t) = ∑ x (n∆t)e j(n−t/∆t)π/N t
n =0 N sin[(n − ∆t ) π/N ]

for an even N.
Example 3.9. Samples of a signal x (t) are taken with step ∆t = 1. Obtained discrete-
time values are x (n) = [0, 2.8284, − 2, 2.8284, 0, − 2.8284, 2, − 2.8284] for 0 ≤
n ≤ N − 1 with N = 8. Assuming that the signal satisfies the sampling
theorem find its value at t = 1.5. Check the accuracy if the original signal
values were known, x (t) = 3 sin(3πt/4) + sin(πt/4).
⋆Using the reconstruction formula for an even N we get
7
sin[(n − 1.5)π ]
x (1.5) = ∑ x(n)e j(n−1.5)π/8 8 sin[(n − 1.5)π/8] = −0.2242.
n =0
Ljubiša Stanković Digital Signal Processing 131

x(t), x(n) with Δt=1


2

-2

-4
0 2 4 6 8
time

Figure 3.13 Periodic signal reconstructed from its samples at ∆t = 1.

This result is equal to the original signal value. Calculation is repeated with
0 ≤ t ≤ 8, with step 0.01. The reconstructed values of x (t) are presented in
Fig.3.13.

In order to prove the sampling theorem of periodic signals write the


signal in a form of the Fourier series

km
x (t) = ∑ Xk e j2πkt/T . (3.21)
k=−k m

Using N samples of x (t) within the signal period (assuming that N is an


odd number), i.e., by sampling the signal at ∆t = T/N, we get

km
x (n∆t) = ∑ Xk e j2πkn/N .
k =−k m

With ( N − 1)/2 ≥ k m we can write

( N −1)/2
T km T
x (n∆t)∆t = ∑ Xk e j2πkn/N = N
N k=− ∑ Xk e j2πkn/N .
k m k=−( N −1)/2
132 Discrete Fourier Transform

With x (n∆t)∆t = x (n) and TXk = X (k ) this form reduces to the DFT and the
inverse DFT
( N −1)/2 N −1
1
X (k )e j2πkn/N , x (n)− j2πkn/N .
N k=−(∑ ∑
x (n) = X (k ) =
N −1)/2 n =0

Substituting the Fourier series coefficients Xk , expressed in terms of X (k )


and x (n), into signal (3.21), with k m = ( N − 1)/2, we get

N −1 N −1
2 N −1 N −1 2
1 n j2πk t
− j2πk N 1 t n
x (t) = ∑ ∑ x (n)e e T = ∑ ∑ x (n∆t)e j2πk( T − N )
T N
k=− N2−1 n=0 n=0 k=− N −1
2
N −1 n )( N −1)/2 1 − e
j2π ( Tt − N
n )N
1 − j2π ( Tt − N
=
N ∑ x (n∆t)e t n
n =0 1 − e j2π ( T − N )
N −1 π
sin[ ∆t (t − n∆t)]
= ∑ x (n∆t) π
N sin[ N∆t (t − n∆t)]
.
n =0

This is the reconstruction formula that can be used to calculate x (t) for any
t based on the signal values at x (n∆t) with ∆t < π/Ωm = 1/(2 f m ).
In a similar way the reconstruction formula for an even number of
samples N can be obtained.
The sampling theorem reconstruction formula of aperiodic signals
follows as a special case as N → ∞, since for a small argument

π π
sin[ (t − n∆t)] → (t − n∆t)
N∆t N∆t
and
∞ π
sin[ ∆t (t − n∆t)]
x (t) → ∑ x (n∆t) π .
n=−∞ ∆t (t − n∆t )

Example 3.10. For a signal x (t) whose period is T it is known that the signal has
components corresponding to the nonzero Fourier series coefficients at k1 , k2 ,
..., k K . What is the minimal number of signal samples needed to reconstruct
the signal? What condition the sampling instants and the frequencies should
satisfy for the reconstruction?
⋆The signal x (t) can be reconstructed by using the Fourier series
(1.11). In calculations, a finite number of K nonzero terms will be used,
K
x (t) = ∑ Xkm e j2πkm t/T .
m =1
Ljubiša Stanković Digital Signal Processing 133

Since there are K unknown values Xk1 , Xk2 ,...,XkK the minimal number of
equations to calculate their values is K. The equations are written for K time
instants
K
∑ Xkm e j2πkm ti /T = x (ti ), for i = 1, 2, ..., K
m =1
or

Xk1 e j2πk1 t1 /T + Xk2 e j2πk2 t1 /T + ... + XkK e j2πkK t1 /T = x (t1 )


Xk1 e j2πk1 t2 /T + Xk2 e j2πk2 t2 /T + ... + XkK e j2πkK t2 /T = x (t2 )
...
j2πk1 tK /T j2πk2 tK /T j2πk K tK /T
Xk 1 e + Xk 2 e + ... + XkK e = x ( t K ).
In a matrix from

ΦX= y, X = Φ −1 y

where

X = [ Xk1 Xk2 ... XkK ] T , y = [ x (t1 ) x (t2 ) ... x (tK )] T

⎡ ⎤
e j2πk1 t1 /T e j2πk2 t1 /T ... e j2πkK t1 /T
⎢ e j2πk1 t2 /T e j2πk2 t2 /T ... e j2πkK t2 /T ⎥
Φ=⎢
⎣ ...


... ... ...
e j2πk1 tK /T e j2πk2 tK /T ... e j2πkK tK /T

The reconstruction condition is det ∥Φ∥ ̸= 0 for selected time instants ti and
given frequency indices k i .

3.7 ANALYSIS OF A SINUSOID BY USING THE DFT

Analysis and estimation of frequency and amplitude of pure sinusoidal


signals is of great importance in many applications.
Consider a simple continuous-time sinusoidal signal

x (t) = Ae jΩ0 t (3.22)

whose Fourier transform is X (Ω) = 2πAδ(Ω − Ω0 ). The whole signal en-


ergy is concentrated just in one frequency point at Ω = Ω0 . Obviously, the
position of maximum is equal to the signal frequency. For this operation we
will use the notation
! 6
Ω0 = arg max | X (Ω)| . (3.23)
−∞<Ω<∞
134 Discrete Fourier Transform

Assume that the signal x (t) is sampled with ∆t. The discrete-time form
of this signal is
x (n) = Ae jω0 n ∆t,
with ω0 = Ω0 ∆t.
In order to compute the DFT of this signal, we will assume a value of
N and calculate
N −1
X (k ) = ∑ Ae jω0 n e− j2πnk/N ∆t.
n =0

In general, the DFT is of the form

N −1
1 − e jω0 N e− j2πk
X (k ) = A ∑ e jω0 n e− j2πnk/N ∆t = A ∆t (3.24)
n =0 1 − e jω0 e− j2πk/N
sin( N (ω0 − 2πk/N )/2)
= Ae j(( N −1)(ω0 −2πk/N )/2) ∆t (3.25)
sin((ω0 − 2πk/N )/2)
' '
' sin( N (ω0 − 2πk/N )/2) '
| X (k)| = | A| '' ' ∆t. (3.26)
sin((ω0 − 2πk/N )/2) '

3.7.1 Leakage Effect

Two cases may appear in the analysis of a sinusoidal signal:


1. The signal frequency is such that

ω0 = 2πk0 /N

or Ω0 = 2πk0 /( N∆t), where 0 ≤ k0 ≤ N − 1 is an integer. The discretization


step ∆t is such that it is contained an integer number of times within the
signal period T0 = 2π/Ω0 . Then

N −1
X (k ) = A ∑ e j2πk0 n/N e− j2πnk/N ∆t = N Aδ(k − k0 )∆t. (3.27)
n =0

Obviously we can find the signal frequency index from

k0 = arg{ max | X (k )|}. (3.28)


0≤ k ≤ N −1

Frequency is calculated as Ω0 = 2πk0 /( N∆t) for 0 ≤ k0 ≤ N/2 − 1 and


Ω0 = 2π (k0 − N )/( N∆t) for N/2 ≤ k0 ≤ N − 1. This case is illustrated in
Fig. 3.14, top row. Noisy signals will be considered later in the book.
Ljubiša Stanković Digital Signal Processing 135

X(k)
x(n)

n k

X(k)
x(n)

n k

Figure 3.14 Sinusoid x (n) = cos(8πn/64) and its DFT with N = 64 (top row) and sinusoid
x (n) = cos(8.8πn/64) and its DFT absolute value, with N = 64 (bottom row).

Estimation of amplitude is easy in this case as


1
A= X ( k 0 ).
N∆t
2. In reality, we never know the signal period (or Ω0 ) in advance (if we knew
it, then this analysis would not be needed). So, it is highly unlikely to have a
case with frequency on the grid, when Ω0 = 2πk0 /( N∆t) as in Fig. 3.14, top
row. More common is the case illustrated in Fig. 3.14, bottom row, when the
true signal frequency does not correspond to any DFT sample position. A
simple sinusoidal signal produces then DFT components at all frequencies.
This effect is known as leakage effect.
Estimation of frequency, based on
! ' '6
' sin( N (ω0 − 2πk/N )/2) '
k̂0 = arg max ' ' ' ,
0≤k≤ N −1 sin(( ω0 − 2πk/N )/2)
'

will produce an estimation error



e = Ω0 − k̂0 .
N∆t
The estimation error could be up to a half of the discretization period in
frequency, ∆Ω = 2π/( N∆t),
π π 2π π 2π π
− ≤e< and k̂0 − ≤ Ω0 < k̂0 + . (3.29)
N∆t N∆t N∆t N∆t N∆t N∆t
136 Discrete Fourier Transform

Two ways to improve the estimation will be described here.


1. The simplest way to reduce the estimation error is to increase the number
of samples and to reduce the discretization interval in frequency ∆Ω =
2π/( N∆t). This could be achieved by appropriate zero-padding in the time
domain, before the DFT calculation (corresponding to the interpolation in
the frequency domain). This way increases the calculation complexity.
2. The other way is based on a window function application in the DFT
calculation

N −1 B 2πk C
X (k ) = ∑ w(n) Ae jω0 n e− j2πnk/N ∆t = W e j( N −ω0 ) ∆t,
n =0

where W (e jω ) is the Fourier transform of the window function. Windows,


like for example Hann(ing) or Hamming window, smooth the transition and
reduce discontinuities at the ending calculation points that cause leakage. A
simple realization with, for example, the Hann(ing) window (relation (2.31)
and Fig.2.7)

1
w(n) = [1 − cos(2nπ/N )] [u(n) − u(n − N − 1)] .
2

adjusted to the time interval 0 ≤ n ≤ N − 1, produces

N −1
1
X H (k ) = ∑ [1 − cos(2nπ/N )] Ae jω0 n e− j2πnk/N ∆t
n =0 2
- .
A N −1 1 j2nπ/N 1 − j2nπ/N
Ae jω0 n e− j2πnk/N ∆t
2 n∑
= 1− e − e
=0 2 2
- .
1 1 1
= X R ( k ) − X R ( k − 1) − X R ( k + 1) ,
2 2 2

where XR (k ) would be the DFT if the rectangular window were used. It is


defined by (3.24). The DFT of sinusoids on the grid and outside of the grid,
multiplied by a Hann(ing) window, are shown in Fig.3.15.
The leakage effect is reduced. However the DFT is spread over two
additional consecutive samples even in the case when the frequency is on
the DFT grid, Fig.3.15(top). In this case the amplitude is estimated as

1
A= [ X (k0 ) + X (k0 + 1) + X (k0 − 1)].
N∆t
Ljubiša Stanković Digital Signal Processing 137

x(n)w(n)

XH(k)
n k
x(n)w(n)

XH(k)
n k

Figure 3.15 Sinusoid x (n) = cos(8πn/64) multiplied by a Hann(ing) window and its DFT
with N = 64 (top row) and sinusoid x (n) = cos(8.8πn/64) multiplied by a Hann(ing) window
and its DFT absolute value, with N = 64 (bottom row).

3.7.2 Displacement

A relation of the maximum DFT value with the few surrounding values of
the windowed DFT is used to calculate correction, the displacement bin of
the estimated frequency. If we apply a window function w(n) in the DFT
calculation, we get
B 2πk C
X (k ) = W e j( N −ω0 ) ∆t.

For a given window function it is possible to derive the exact displacement


formula.
Instead of deriving an exact formula for each window form, here we
will present an approach that combines the interpolation and a general
fitting polynomial form. It can be used with any window.
We can always interpolate the DFT, so that there are several DFT
samples within the main lobe. Then for any symmetric window we can
approximate the Fourier transform around the maximum by a quadratic
function (in analog domain X (Ω) = aΩ2 + bΩ + c). Let us denote the largest
sample, following from

! 6
k̂0 = arg max | X (k)| ,
0≤ k ≤ N −1
138 Discrete Fourier Transform

by
X0 = | X (k̂0 )|
and two neighboring samples by

X−1 = | X (k̂0 − 1)|


X1 = | X (k̂0 + 1)|.

By using the Lagrange polynomial interpolation of the second-order, at a


point x = d, taking the bin index as the independent variable k −1 = −1,
k0 = 0, k1 = 1, with the function values at these points being denoted by
X−1 , X0 and X1 , we have the Lagrange second-order polynomial

(d − 0)(d − 1) (d + 1)(d − 1) (d − 0)(d + 1)


X (k̂0 + d) = X−1 + X0 + X1
(−1 − 0)(−1 − 1) (0 + 1)(0 − 1) (1 − 0)(1 + 1)
= d2 [− X0 + X−1 /2 + X1 /2)] + d[ X1 − X−1 ]/2 + X0 . (3.30)

This function reaches maximum at

∂X (k̂0 + d)/∂d = 0,

resulting in the displacement bin for the frequency correction

| X (k̂0 + 1)| − | X (k̂0 − 1)|


d = 0.5 , (3.31)
2| X (k̂0 )| − | X (k̂0 + 1)| − | X (k̂0 − 1)|

with frequency as in (3.32). The displacement procedure is illustrated in Fig.


3.16.
Thus, the best frequency estimation is


Ω0 = (k̂0 + d) (3.32)
N∆t

for 0 ≤ k̂0 ≤ N/2 − 1 and Ω0 = N∆t (( k̂ 0 + d) − N ) for N/2 ≤ k̂0 ≤ N − 1.
Example 3.11. A sinusoidal signal x (t) = A exp( jΩ0 t) is sampled with a sampling
interval ∆t = 1/128 and N0 = 64 samples are considered. Prior to the DFT
calculation, the signal is zero padded four times. The DFT maximum is
detected at k̂0 = 95. The maximum DFT value is X (95) = 0.9. Neighboring
values are X (96) = 0.7 and X (94) = 0.3. Calculate the displacement bin d and
estimate the value of Ω0 .
Ljubiša Stanković Digital Signal Processing 139

X(0) X(1)
X(Ω), X(k)

X(Ω), X(k)
X(-1)

Ω, k Ω, k

Figure 3.16 Illustration of the displacement bin correction for a true maximum position
calculation based on three neighboring values (full range – left and zoomed graph – right)
.

⋆The displacement bin value is


0.7 − 0.3
d = 0.5 = 0.25.
1.8 − 0.7 − 0.3
The total number of samples in the DFT calculation was N = 4N0 = 256,
meaning that the value k̂0 = 95 is within the first half of the samples (cor-
responding to positive frequency Ω0 ). Therefore, we can use (3.32) for the
frequency calculation

Ω0 = (k̂ + d) = 95.25π.
N∆t 0

It is possible to derive the exact displacement formula for some win-


dows, based on their Fourier transform function. For example, for the
Hann(ing) window the exact displacement formula is

1.5[| X (k̂0 + 1)| − | X (k̂0 − 1)|]


dH = B C . (3.33)
| X (k̂0 − 1)| 1 + |X (k̂0 +1)| + | X (k̂0 )| + | X (k̂0 + 1)|
| X (k̂0 )|

After the displacement is calculated the signal can also be modulated


for the displacement frequency shift in order to produce a signal with the
frequency on the frequency grid. This is especially important if we expect
that the signal contains much smaller higher order harmonics that were
masked with strong values of the dominant harmonic. If we detected that
the k0 th harmonic is dominant and displaced for d then this harmonic
should be removed from a signal modulated by the displacement frequency.
The DFT of the new signal is used for the analysis of the second largest
harmonic and so on.
140 Discrete Fourier Transform

3.8 DISCRETE COSINE AND SINE TRANSFORMS

The DFT of signal satisfies many desirable properties. Also its calculation is
simple and efficient using the FFT algorithm. With the DFT calculation the
signal periodic extension is assumed and embedded in the discrete trans-
form. However, in the DFT case the periodic signal extension will, in gen-
eral, introduce significant signal change (corresponding to discontinuities in
continuous time) at the period ending points Fig.3.17 (first and second row).
This change will significantly worsen the DFT coefficients convergence and
increases number of coefficients in signal reconstruction. In order to reduce
this effect and to improve convergence of the signal transform coefficients
the signal could be extended in an appropriate way.
The discrete cosine transforms (DCT) and discrete sine transforms
(DST) are used to analyze real-valued discrete signals, periodically extended
to produce even or odd signal forms, respectively. However, this extension
is not straightforward for discrete-time signals. Consider a discrete-time
signal of duration N, when x (n) assumes nonzero values for 0 ≤ n ≤ N − 1.
If we try with a direct extension (using all signal values) and form a periodic
signal y(n), whose basic period is of duration 2N, as
!
x (n) for 0 ≤ n ≤ N − 1
y(n) =
x (2N − n − 1) for N ≤ n ≤ 2N − 1

the obtained signal is not even, Fig.3.17(third row). It is obvious that y(n)
does not satisfy the condition y(n) = y(−n) = y(2N − n), required for a
real-valued DFT.
The same holds for an odd extension, Fig.3.17(fourth row),
!
x (n) for 0 ≤ n ≤ N − 1
y(n) = .
− x (2N − n − 1) for N ≤ n ≤ 2N − 1
Thus we have not achieved one of our goals to have a real-valued transform
after a real-valued signal periodic extension. However from Fig.3.17(third
and fourth row) we can see that the signals y(n) are even (or odd) with
respect to the vertical line at n = −1/2. Thus, if we add zeros between each
sample of y(n) and assume that the position which was at n = −1/2 in the
initial signal is the new coordinate origin n = 0 in the new signal z(n), then
these signals will be even and odd, respectively, Fig.3.17(last two rows).
This is just one of possible extensions to make the original discrete-
time signal even (or odd). Several forms of the DCT and DST are defined
based on other ways of getting an even (odd) signal extension.
The most commonly used is the so called DCT-II or just DCT. It will
be presented here. Signal extension for this transform corresponds to the
Ljubiša Stanković Digital Signal Processing 141

x(n)

x(n+N) x(n) x(n-N )

x(-n-1 ) y(n) x(n) x(2N-n-1 )

- x(-n-1 ) y(n) x(n) - x(2N-n-1 )

z(n)

z(n)

Figure 3.17 Illustration of a signal x (n), its periodic extension corresponding to the DFT, an
even and odd discrete-time signal extension corresponding to the DCT and DST of type II.

already described one, Fig.3.17. If no form of the DCT is referred to in its


name, then it is assumed that DCT-II form is used. The DCT definition is
N −1
π (2n + 1)
C (k ) = ∑ 2x(n) cos( 2N
k ), 0 ≤ k ≤ N − 1.
n =0

There are two main advantages of this transform over the standard DFT
calculation. The DCT coefficients are real-valued for a real-valued signal.
142 Discrete Fourier Transform

This transform can produce a better energy concentration than the DFT. In
order to understand why a better energy concentration can be obtained we
will compare the DCT to the standard DFT
N −1
X (k ) = ∑ x (n)e− j2πnk/N ), 0≤k≤ N−1
n =0

calculation procedures for a real-valued signal x (n) with N samples.


In the DCT calculation it is assumed that the signal is extended as an
even function, by creating a sequence
!
x (n) for 0 ≤ n ≤ N − 1
y(n) = .
x (2N − n − 1) for N ≤ n ≤ 2N − 1

This extension eliminates the signal discontinuity at the period ending


points. Thus, in general the Fourier transform of such a signal will converge
faster, requiring fewer coefficients in the reconstruction.
A zero value is then inserted between each pair of samples and a 4 N
even signal z(n) is formed

z(2n + 1) = y(n), z(2n) = 0.

The 4N-sample DFT of z(n) is calculated


4N −1
XC (k ) = DFT{z(n)} = ∑ z(n)e− j2πnk/(4N )
n =0
2N −1 2N −1
= ∑ z(2n + 1)e− j2π (2n+1)k/(4N ) = ∑ y(n)e− j2π (2n+1)k/(4N )
n =0 n =0
N −1
2π (2n + 1)k
= ∑ 2x(n) cos( 4N
) = C ( k ).
n =0

Only N terms of the transform are used and the DCT values are obtained.
Since the basis functions are orthogonal the inverse DCT is obtained
2π (2m+1)k
by multiplying both sides of the DCT by cos ( 4N ) and summing over
0 ≤ k ≤ N − 1,
N −1 N −1
2π (2n + 1)k 2π (2m + 1)k
∑ 2x(n) ∑ wk cos(
4N
) cos(
4N
)
n =0 k =0
N −1
2π (2m + 1)k
= ∑ wk C (k ) cos(
4N
),
k =0
Ljubiša Stanković Digital Signal Processing 143

where w0 = 1/2 and wn = 1 for n ̸= 1. Since


N −1
2π (2n + 1)k 2π (2m + 1)k N
∑ wk cos(
4N
) cos(
4N
) = δ(m − n)
2
k =0

we get
N −1
1 2π (2n + 1)k
x (n) =
N ∑ wk C (k ) cos(
4N
). (3.34)
k =0
A symmetric relation, with the same coefficients in the time and fre-
quency domain, is
N −1
2π (2n + 1)k
C (k ) = vk ∑ x (n) cos(
4N
)
n =0
N −1
2π (2n + 1)k
x (n) = ∑ vk C (k ) cos(
4N
),
k =0
√ √
where v0 = 1/N and vn = 2/N for n ̸= 1.
In a similar way the discrete sine transforms are defined. The most
common form is the DST of type II (DST-II), whose definition is
N −1
2π (2n + 1)
S(k ) = ∑ 2x(n) sin( 2N
(k + 1))
n =0

for ≤ k ≤ N − 1. Its relation to the DFT can be established by creating a


sequence
!
x (n) for 0 ≤ n ≤ N − 1
y(n) =
− x (2N − n − 1) for N ≤ n ≤ 2N − 1

Zero values are inserted and a signal z(n) is formed

z(2n + 1) = y(n)
z(2n) = 0.

Again a 4N-sample DFT is calculated


4N −1 2N −1
XS ( k ) = ∑ z(n)e− j2πnk/(4N ) = ∑ y(n)e− j2π (2n+1)k/(4N )
n =0 n =0
% ;
N −1
2π (2n + 1)k
= Im ∑ 2jx(n) sin( 4N
) = S ( k ),
n =0
144 Discrete Fourier Transform

X(k)
x(n)

n k
[x(n) x(n)]

X (k)
2
n k
C(k)
y(n)

n k

Figure 3.18 Illustration of the DCT calculation.

with N terms of the transform being used. The DST is the imaginary part of
this DFT.
Example 3.12. Consider a signal
x (n) = cos(2π (2n + 1)/64) + 0.75 cos(7π (2n + 1)/64).

Calculate its DFT with N = 32. Plot the periodic extension of this signal. Plot
the even extension y(n) of x (n). Calculate the DFT (the DCT) of such a signal
and discuss the results.
⋆Signal x (n), along with its extended versions and corresponding
transforms, is presented in Fig.3.18. Better energy concentration in the DCT
is due to the introduced symmetry in y(n). The artificial discontinuity in the
DFT, which causes its slow convergence, is eliminated in the DCT.

By using periodic extensions in cosine transform the convolution


property of the DFT is lost. Thus, this kind of transforms may be used for a
signal reconstruction and compression but not in the realization of discrete
systems, unless they are properly related to the corresponding DFT values
(see Problem 3.10).
Ljubiša Stanković Digital Signal Processing 145

Example 3.13. For signal


x (n) = sin(2π (2n + 1)/64) − 0.5 cos(7π (2n + 1)/64).
Calculate its DFT with N = 32. Plot the periodic extension of this signal. Plot
even and odd extensions y(n) of x (n). Calculate the DCT and DST. Comment
the results.
⋆Signal with its periodic extensions, corresponding to the DFT, DCT,
and DST, is presented in Fig.3.19(left), as x (n), [ x (n) x (n)], yc (n), and ys (n),
respectively. The corresponding transforms are shown in the right side of
this figure. Note that the convergence of the DFT and DCT is similar. Here
the DST converges faster, since its extension is smoother.

3.9 DISCRETE WALSH-HADAMARD AND HAAR TRANSFORMS

Here we will present two discrete signal transform that can be calculated
without using multiplications. One of them will be used to explain the basic
principle of the wavelet transform calculation as well.
Let us consider a two-sample signal x (n), with N = 2. The correspond-
ing two-sample DFT is
1
X (k) = ∑ x(n)e− j2πnk/2 = x(0) + (−1)k x(1).
n =0
It can be calculated without using multiplications, X (0) = x (0) + x (1) and
X (1) = x (0) − x (1). Now we can show that it is possible to define basis
functions for any signal duration in such a way that the multiplications
are not used in the signal transformation. These transform values will be
denoted by H (k ). For two-sample signal case

H (0) = x (0) + x (1), for k = 0 and H (1) = x (0) − x (1), for k = 1.

The whole frequency interval is represented by a low-frequency value X (0)


and a high-frequency value X (1). In a matrix form
- . - .- .
H (0) 1 1 x (0 )
= . (3.35)
H (1) 1 −1 x (1 )

The transformation matrix is


- .
1 1
T2 = . (3.36)
1 −1
146 Discrete Fourier Transform

X(k)
x(n)

n k
[x(n) x(n)]

X2(k)
n k
y (n)

C(k)
c

n k
y (n)

S(k)
s

n k

Figure 3.19 Signal and its periodic extensions, corresponding to: the DFT (second row), the
cosine transform (third row), and the sine transform (fourth row). Positive frequencies for the
DFT are shown.

Example 3.14. For the signal shown in Fig. 3.20 calculate the two-sample The DFT
for each pair of signal samples

Hn (0) = y L (n) = x (2n) + x (2n + 1)


Hn (1) = y H (n) = x (2n) − x (2n + 1)

for 0 ≤ n ≤ N/2 − 1. Discuss the results.


⋆The values of Hn (0) = y L (n) and Hn (1) = y H (n) are calculated and
are presented in Fig. 3.20. Signal y L (n) is a low-frequency, smoothed version
of the original signal, while the signal y H (n) contains the details that are
lost in the smoothed version y L (n). The original signal values may easily
Ljubiša Stanković Digital Signal Processing 147

x(n)

n
y (n)
L

n
y (n)
H

Figure 3.20 Original signal x (n) and its two-sample lowpas part y L (n) and highpass part
y H ( n ).

be reconstructed from Hn (0) = y L (n) and Hn (1) = y H (n) as


- . - .- .
x (2n) 1 1 1 Hn (0)
=
x (2n + 1) 2 1 −1 Hn (1)

for 0 ≤ n ≤ N/2 − 1.
In some cases the smoothed version y L (n), with a half of the samples of
the original signal, (3.20), is quite good representative of the original signal,
so there is no need to use corrections. Note that for many instants correction
is zero as well.

There are two possibilities to continue and apply the two-point DFT
scheme to a signal with N samples. One of them is in further splitting of
both y L (n) and y H (n) into their low and highpass parts. It leads to a discrete
Walsh-Hadamard transform Fig.3.21. In the other case the splitting is done
for the lowpass part only, while the highpass correction is kept as it is.
It leads to the Haar wavelet transform, Fig.3.22. These two forms will be
explained in details next.
148 Discrete Fourier Transform
x(n)

yH(n)
y (n)
L

n n
yHL(n)
y (n)
LL

n n
yHH(n)
y (n)
LH

n n

Figure 3.21 Illustration of the procedure leading to the Walsh-Hadamard transform calcula-
tion.

3.9.1 Discrete Walsh-Hadamard Transform

Let us continue the idea of splitting both (lowpass and highpass) parts of the
signal and define a transformation of a four-sample signal. For this signal
form two auxiliary two-sample signals y L (n) and y H (n) as

y L (0 ) = x (0 ) + x (1 ), y L (1 ) = x (2 ) + x (3 ) (3.37)
y H (0 ) = x (0 ) − x (1 ), y H (1 ) = x (2 ) − x (3 ). (3.38)

They represent low-frequency and high-frequency parts of the pairs: x (0),


x (1) and x (2), x (3) of two-sample signals. The lowpass part of the auxiliary
Ljubiša Stanković Digital Signal Processing 149

yH(n)
x(n)

n n

yLH(n)
y (n)
L

n n
y (n)
LL

Figure 3.22 Illustration of the procedure leading to the Haar wavelet transform calculation.

two-sample lowpass signal y L (n) is

H (0 ) = y L (0 ) + y L (1 ) = x (0 ) + x (1 ) + x (2 ) + x (3 ).

The highpass part of the auxiliary two-sample lowpass signal y L (n) is

H (1 ) = y L (0 ) − y L (1 ) = x (0 ) + x (1 ) − x (2 ) − x (3 ).

Then we calculate the lowpass part of the auxiliary highpass signal as

H (3 ) = y H (0 ) + y H (1 ) = x (0 ) − x (1 ) + x (2 ) − x (3 ).

Finally the highpass part of the auxiliary highpass signal is

H (4 ) = y H (0 ) − y H (1 ) = x (0 ) − x (1 ) − x (2 ) + x (3 ).
150 Discrete Fourier Transform

The transformation matrix, for the case of four-sample transform, is


⎡ - .- . ⎤
⎡ ⎤ 1 1 y L (0 )
H (0) ⎢ ⎥
⎢ H (1) ⎥ ⎢ 1 −1 y L (1 ) ⎥
⎢ ⎥=⎢ ------------------- ⎥. (3.39)
⎣ H (2) ⎦ ⎢ - .- . ⎥
⎣ 1 1 y H (0 ) ⎦
H (3)
1 −1 y H (1 )

By replacing the values of y L (n) and y H (n) with signal values x (n),
we get the transformation equation
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
H (0) 1 1 1 1 x (0 ) x (0 )
⎢ H (1) ⎥ ⎢ 1 −1 −1 ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥=⎢ 1 ⎥ ⎢ x (1 ) ⎥ = T 4 ⎢ x (1 ) ⎥ , (3.40)
⎣ H (2) ⎦ ⎣ 1 −1 1 −1 ⎦ ⎣ x (2 ) ⎦ ⎣ x (2 ) ⎦
H (3) 1 −1 −1 1 x (3 ) x (3 )

with the transformation matrix T4 .


The next step would be in grouping two four-sample transforms into
an eight-sample-based analysis. The transformation equation in the case of
eight signal samples is
⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤
H (0) 1 1 1 1 1 1 1 1 x (0) x (0)
⎢ H (1) ⎥ ⎢ 1 1 1 1 −1 −1 −1 −1 ⎥ ⎢ x (1) ⎥ ⎢ x (1) ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ H (2) ⎥ ⎢ 1 1 −1 −1 1 1 −1 −1 ⎥ ⎢ x (2) ⎥ ⎢ x (2) ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ H (3) ⎥ ⎢ 1 1 −1 −1 −1 −1 1 1 ⎥ ⎢ x (3) ⎥ ⎢ x (3) ⎥
⎢ ⎥=⎢ ⎥ ⎢ ⎥ = T8 ⎢ ⎥, (3.41)
⎢ H (4) ⎥ ⎢ 1 −1 1 −1 1 −1 1 −1 ⎥ ⎢ x (4) ⎥ ⎢ x (4) ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ H (5) ⎥ ⎢ 1 −1 1 −1 −1 1 −1 1 ⎥ ⎢ x (5) ⎥ ⎢ x (5) ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎣ H (6) ⎦ ⎣ 1 −1 −1 1 1 −1 −1 1 ⎦ ⎣ x (6) ⎦ ⎣ x (6) ⎦
H (7) 1 −1 −1 1 −1 1 1 −1 x (7) x (7)

where the transformation matrix is denoted by T8 .


The inverse Walsh-Hadamard transform is x = T− 1 1 T
8 H = 8 T8 H.
The four-sample transformation matrix could be written as
> D E ? > ?
T2 ⊗ 1 1 T2 ⊗ [T2 (1, :)]
T4 = D E =
T2 ⊗ 1 −1 T2 ⊗ [T2 (2, :)]

where ⊗ denotes Kronecker multiplication of two submatrices in T2 (its


rows) with T2 , defined by (3.36). Notation T2 (i, :) is used for the ith row
of T2 . The transformation matrix of order N is obtained by a Kronecker
Ljubiša Stanković Digital Signal Processing 151

product of N/2-order transformation matrix rows and T2 ,


⎡ ⎤
T2 ⊗ [T N/2 (1, :)]
⎢ ⎥
⎢ T2 ⊗ [T N/2 (2, :)] ⎥
TN = ⎢⎢ ⎥. (3.42)
... ⎥
⎣ ⎦
T2 ⊗ [T N/2 ( N/2, :)]

In this way, although we started from a two-point DFT, in splitting


the frequency domain, we did not obtain the Fourier transform of a signal,
but a form of the Walsh-Hadamard transform. In ordering the coefficients
(matrix rows) in our example, we followed the frequency region order from
the Fourier domain (for example, in the four-sample case, low-low, low-
high, high-low, and high-high frequency region).
Three ways of ordering transform coefficients in the Walsh-Hadamard
transform (ordering or transformation matrix rows) are used. They produce
the same result with different coefficients order and different recursive
formulae for constructing transformation matrices. The presented way of
ordering coefficients, as in (3.41), is known as the Walsh transform with
dyadic ordering . It will be used in examples and denoted as the Walsh-
Hadamard transform.
The Hadamard transform would correspond to the so called natural
ordering of rows from the transformation matrix T8 ,
⎡ ⎤
1 1 1 1 1 1 1 1
⎢ 1 −1 1 −1 1 −1 1 −1 ⎥
⎢ ⎥
⎢ 1 1 −1 −1 1 1 −1 −1 ⎥
⎢ ⎥
⎢ 1 −1 −1 1 1 −1 −1 1 ⎥
H8 = ⎢ ⎥
⎢ 1 1 1 1 −1 −1 −1 −1 ⎥
⎢ ⎥
⎢ 1 −1 1 −1 −1 1 −1 1 ⎥
⎢ ⎥
⎣ 1 1 −1 −1 −1 −1 1 1 ⎦
1 −1 −1 1 −1 1 1 −1

It would correspond to [ H (0), H (4), H (2), H (6), H (1), H (5), H (3), H (7)]T
order of coefficients in the Walsh transform with dyadic ordering (3.41).
Recursive construction of a Hadamard transform matrix H2N is easy
using the Kronecker product of T2 defined by (3.36) and HN ,
- .
HN HN
H2N = T2 ⊗ HN = .
HN −HN

Order [ H (0), H (1), H (3), H (2), H (6), H (7), H (5), H (4)] T in (3.41) would
correspond to a Walsh transform with sequency ordering.
Calculation of the Walsh-Hadamard transforms requires only addi-
tions. For an N-order transform the number of additions is ( N − 1) N.
152 Discrete Fourier Transform

3.9.2 Discrete Haar Wavelet Transform

Consider again two pairs of signal samples, x (0), x (1) and x (2), x (3). The
high frequency parts of these pairs are calculated as y H (n) = x (2n) − x (2n +
1), for n = 0, 1. They are used in the Haar transform without any further
modification. Since they represent highpass Haar transform coefficients
they will be denoted, in this case, by W (2) = y H (0) = x (0) − x (1) and
W (3) = y H (1) = x (2) − x (3). The lowpass coefficients of these pairs are
y L (0) = x (0) + x (1) and y L (1) = x (2) + x (3). The highpass and lowpass
parts of these signals are calculated as y LH (0) = [ x (0) + x (1)] − [ x (2) + x (3)]
and y LL (0) = [ x (0) + x (1)] + [ x (2) + x (3)]. For a four-sample signal the
transformation ends here with W (1) = y LH (0) and W (0) = y LL (0). Note
that the order of coefficients is such that the lowest frequency coefficient
corresponds to the transform index k = 0. Matrix form for a four-sample
signal is
⎡ ⎤ ⎡ ⎤⎡ ⎤
W (0) 1 1 1 1 x (0)
⎢ W (1) ⎥ ⎢ 1 1 −1 −1 ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ x (1) ⎥ .
⎣ W (2) ⎦ = ⎣ 1 −1 0 0 ⎦ ⎣ x (2) ⎦
W (3) 0 0 1 −1 x (3)

For an eight-sample signal the highpass coefficients would be kept with-


out further modification in each step (scale), while for the lowpass parts of
signal their highpass and lowpass parts would be calculated. The transfor-
mation matrix in the case of a signal with eight samples is
⎡ ⎤ ⎡ ⎤⎡ ⎤
W (0) 1 1 1 1 1 1 1 1 x (0)
⎢ W (1) ⎥ ⎢ 1 1 1 1 −1 −1 −1 −1 ⎥ ⎢ x (1) ⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥
⎢ W (2) ⎥ ⎢ 1 1 −1 −1 0 0 0 0 ⎥ ⎢ x (2) ⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥
⎢ W (3) ⎥ ⎢ 0 0 0 0 1 1 −1 −1 ⎥ ⎢ x (3) ⎥
⎢ ⎥=⎢ ⎥⎢ ⎥. (3.43)
⎢ W (4) ⎥ ⎢ 1 −1 0 0 0 0 0 0 ⎥ ⎢ x (4) ⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥
⎢ W (5) ⎥ ⎢ 0 0 1 −1 0 0 0 0 ⎥ ⎢ x (5) ⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥
⎣ W (6) ⎦ ⎣ 0 0 0 0 1 −1 0 0 ⎦ ⎣ x (6) ⎦
W (7) 0 0 0 0 0 0 1 −1 x (7)
This is the Haar transform or Haar wavelet transform of a signal with eight
samples.
The Haar transform is useful in the analysis of signals when we can
expect that in a slow-varying signal there are few details.
The Haar wavelet transform is computationally very efficient. The
efficiency comes from the fact that the Haar wavelet transform almost does
not transform the signal at high frequencies. It leaves it almost as it is, using
a very simple two-sample transform. For lower frequencies the number of
operations is increased.
Ljubiša Stanković Digital Signal Processing 153

In specific, for the highest N/2 coefficients the Haar transform does
only one addition (of two signal values) for each coefficient. For next N/4
coefficients the Haar wavelet uses 4 signal values with 3 additions and so
on. The total number of additions is for a Haar transform is
N N N N
Nadditions = (2 − 1) + (4 − 1) + (8 − 1) + ... + ( N − 1).
2 4 8 N
For N of the form N = 2m we can write
1 1 1 1
Nadditions = N log2 N − N ( + 2 + 3 + ... + m )
2 2 2 2
1 1 − 21m
= N log2 N − N = N log2 N − ( N − 1) = N [log2 N − 1] + 1.
2 1 − 12

This is the same order of additions as in the FFT algorithms.


Example 3.15. Consider a signal
x (n) = [2, 2, 12, −8, 2, 2, 2, 2, −3, −3, −3, −3, 3, −9, −3, −3].

Calculate its Haar and Walsh-Hadamard transform with N = 16. Discuss the
results.
⋆Signal x (n) is presented in Fig.3.23. In full analogy with (3.43) a
Haar transformation matrix of order N = 16 is formed. For example, higher
coefficients are just two-sample signal transforms,

W (k ) = x (2(k − 8)) − x (1 + 2(k − 8)), k = 8, 9, ..., 15.

Although there are some short duration pulses (x (2), x (3), x (13)), the Haar
transform coefficients W (2), W (3), ..., W (8), W (10), W (11), W (12), W (13),
W (15) are zero-valued, Fig.3.23. This is the result of its property to decom-
pose the high frequency signal region into short duration (two-sample) basis
functions. Then a short duration pulse is contained in high frequency part
of only one Haar coefficient. That is not the case in the Fourier transform
(or Walsh-Hadamard transform) where a single delta pulse will cause that
all coefficients are nonzero, Fig.3.24. Transformation matrix T16 is obtained
from T8 using (3.42).
Property that high-frequency coefficients are well localized in time and
they represent a short duration signal components is used in image compres-
sion where adding high frequency coefficients adds details into an image,
with important property that one detail in the image corresponds to one (a
few) nonzero coefficient. Reconstruction with the Haar transform with dif-
ferent number of coefficients is presented in Fig.3.23. As explained it can be
considered as "a zooming" a signal toward the details when the higher fre-
quency coefficients are added. Since a half of the coefficients are zero-valued
154 Discrete Fourier Transform

W(k)
x(n)

n k

x0-1 (n)
x (n)
0

n n
x0-1,9,14 (n)
(n)
0-1,9
x

n k

Figure 3.23 Signal x (n) and its discrete Haar transform H (k ). Reconstructed signals: using
H (0) presented by x0 (n), using two coefficients H (0) and H (1) denoted by x0−1 (n), using
H (0), H (1), and H (9) denoted by x0−1,9 (n), and using H (0), H (1), H (9), and H (14) denoted
by x0−1,9,14 (n). Vertical axes scales for the signal and transform are different.
H(k)
x(n)

n k

Figure 3.24 Signal x (n) and its Walsh-Hadamard transform HD (k).

a significant compression ratio can be achieved by storing or transmitting


the nonzero coefficients only. This is a basic idea for multiresolution wavelet
based image representations and compression.
Ljubiša Stanković Digital Signal Processing 155

x(n)

x(n)
n n
W(k)

W(k)
k k
H(k)

H(k)

k k

Figure 3.25 The Haar wavelet transform (second row) and the Walsh-Hadamard transform
(third row) for high frequency long duration signals (first row). Vertical axes scales for the
signal and transform are different.

Example 3.16. For long duration signals with high-frequency components:


(a) x (n) = [1, −1, 1, −1, 1, −1, 1, −1, 1, −1, 1, −1, 1, −1] and
(b) x (n) = [2, 0, −2, 0, 0, −2, 0, 2, 0, 2, 0, −2, −2, 0, 2, 0], calculate the Haar
wavelet transform and the Walsh-Hadamard transform with N = 16.

⋆The Haar wavelet transform and the Walsh-Hadamard transform are


shown in Fig.3.25. We can see that for a signal of long duration on high
frequencies the number of nonzero coefficients in the Haar wavelet trans-
form is large. Just one such component in the Walsh-Hadamard transform
can require a half of the available coefficients in the Haar wavelet transform,
Fig.3.25(left). In addition to the fact that a much smaller number of coef-
ficients is used for the Walsh-Hadamard transform based reconstruction, a
very large number of coefficients in the Haar wavelet transform reconstruc-
tion may annul its calculation complexity advantage in this case.
156 Discrete Fourier Transform

3.10 PROBLEMS

Problem 3.1. Calculate the DFT of signals using the smallest possible value
of N: a) x (n) = δ(n), b) x (n) = δ(n) + δ(n − 1) − 2jδ(n − 2) + 2jδ(n − 3) +
δ(n − 4), and c) x (n) = an (u(n) − u(n − 10)).
Problem 3.2. If the signals g(n) and f (n) are real-valued show that their
DFTs, G (k ) and F (k ), can be obtained from the DFT Y (k ) of the signal
y(n) = g(n) + jh(n).
Problem 3.3. The relationship between the DFT index and the continuous
signal frequency is given by
%
2πk/( N∆t) for 0 ≤ k ≤ N/2 − 1
Ω=
2π (k − N )/( N∆t) for N/2 ≤ k ≤ N − 1.

This mapping is achieved in programs by using shift functions. Show that


the shift will not be necessary if we use the signal x (n)(−1)n . The DFT
values of this signal will start from the lowest negative frequency, toward
the highest positive frequency.
Problem 3.4. If the DFT of signal x (n) with period N is X (k ) find the DFT
of signals !
x (n) for n = 2m
y(n) =
0 for n = 2m + 1
and !
0 for n = 2m
z(n) = .
x (n) for n = 2m + 1
Problem 3.5. Using the DFT find a convolution of signals x (n) and h(n)
whose nonzero values are x (0) = 1, x (1) = −1 and h(0) = 2, h(1) = −1,
h(2) = 2.
Problem 3.6. Find a circular convolution of x (n) = e j4πn/N + sin(2πn/N )
and h(n) = cos(4πn/N ) + e j2πn/N within the common period of signals.

Problem 3.7. Find the signal whose DFT is Y (k ) = | X (k )|2 and X (k ) is the
DFT of x (n) = u(n) − u(n − 3) with period N = 10.
Problem 3.8. What is the relation between the discrete Hartley transform
(DHT) of real-valued signals

N −1 * +
2πnk 2πnk
H (k ) = ∑ x (n) cos + sin
n =0
N N
Ljubiša Stanković Digital Signal Processing 157

and the DFT? Express the DHT in terms of the DFT and the DFT in terms of
the DHT.

Problem 3.9. Show that the DCT of a signal x (n) with N samples, defined
by
N −1
2πk 1
C (k ) = ∑ 2x(n) cos( 2N (n + 2 ))
n =0

can be calculated using an N-sample DFT of the signal


!
2x (2n) for 0 ≤ n ≤ N/2 − 1
y(n) =
2x (2N − 2n − 1) for N/2 ≤ n ≤ N − 1

as
πk
N −1 2πk n πk
C (k ) = Re{e− j 2N ∑ y(n)e− j N } = Re{e− j 2N DFT{y(n)}}.
n =0

Problem 3.10. A real-valued signal x (n) of a duration shorter than N,


defined for 0 ≤ n ≤ N − 1, has the Fourier transform X (k ). A signal y(n)
is formed as
!
2x (n) for 0 ≤ n ≤ N − 1
y(n) = , (3.44)
0 for N ≤ n ≤ 2N − 1

with the DFT Y (k ), then a signal z(n) is formed using

z(2n + 1) = y(n)
z(2n) = 0.

(a) What are the real and imaginary parts of Z (k ) = DFT{z(n)}? How
they are related to the DCT and DST of x (n)? (b) The signal x (n) is applied
as an input to a system with impulse response h(n) such that h(n) is of
duration shorter than N, defined within 0 ≤ n ≤ N − 1, and x (n) ∗n h(n) is
also within 0 ≤ n ≤ N − 1. The DCT of the output signal is calculated. How
it is related to the DCT and DST of x (n)?

Problem 3.11. Consider a signal x (n) whose duration is N, with nonzero


values within the interval 0 ≤ n ≤ N − 1. Define a system with the output

N −1
yk (n + ( N − 1)) = ∑ x (n + m)e− j2πmk/N
m =0
158 Discrete Fourier Transform

so that its value yk ( N − 1) at the last instant of the signal duration is equal
to the DFT of signal, for a given k,
N −1
y k ( N − 1) = ∑ x (m)e− j2πmk/N = DFT{ x (n)} = X (k ).
m =0

Note that the system is causal since yk (n) uses only x (n) at instant n and
previous instants.
Show that the output signal yk (n) is related to previous output value
yk (n − 1) by the equation

yk (n) = e j2πk/N yk (n − 1) + e j2πk/N [ x (n) − x (n − N )].

This equation can be used for a recursive DFT calculation.


Problem 3.12. Show that the discrete Hartley transform (DHT) coefficients
of a signal x (n) with an even number of samples N can be calculated, for an
even frequency index k = 2r, as a DHT with N/2 samples.

Problem 3.13. Find the DFT of signal x (n) = exp( j4π 3n/N ), for n =
0, 1, . . . , N − 1 with N = 16. If the DFT is interpolated four times (signal zero-
padded), find the displacement bin, estimate the frequency, and compare it
with the true frequency value. What is the displacement bin if the general
formula is applied without interpolation?

3.11 SOLUTIONS

Solution 3.1. The DFT assumes that the signals are periodic. In order to
calculate the DFT we have to assume a period of signals first. Period N
should be greater or equal to the duration of signal, so that the signal values
do not overlap. Larger values of N will increase the density of the frequency
domain samples, but will also increase the computation time.
a) For this signal any N ≥ 1 is acceptable, producing

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

with period N.
b) We may use any N ≥ 5. Using N = 5 we get:
5−1
X (k ) = ∑ x(n)e− j2πnk/5 = 1 + e− j2πk/5 − 2je− j4πk/5 + j2e− j6πk/5 + e− j8πk/5
n =0
= 1 + 2 cos(2πk/5) − 4 sin(4πk/5).
Ljubiša Stanković Digital Signal Processing 159

c) For a period N ≥ 10

9
1 − a10 e− j2πk(10/N )
X (k ) = ∑ (ae− j2πk/N )n = 1 − ae− j2πk/N
.
n =0

Solution 3.2. From y(n) = g(n) + j f (n) the real and imaginary parts g(n)
and f (n) can be obtained as

y(n) + y∗ (n) y(n) − y∗ (n)


g(n) = , and f (n) = .
2 2j

Since the DFT of y∗ (n) is equal to


( )∗
N −1 N −1
∗ ∗ − j2πnk/N j2πnk/N
DFT{y (n)} = ∑ y (n)e = ∑ y(n)e
n =0 n =0

with e j2πnk/N = e j2πn(k− N )/N = e− j2πn( N −k)/N , it follows

DFT{y∗ (n)} = Y ∗ ( N − k ).

Then the DFTs of signals g(n) and f (n) are

Y (k ) + Y ∗ ( N − k ) Y (k ) − Y ∗ ( N − k )
G (k) = and F (k ) = .
2 2j

Solution 3.3. The DFT of x (n)(−1)n is

N −1
X1 ( k ) = ∑ x (n)(−1)n e− j2πnk/N .
n =0

For 0 ≤ k ≤ N/2 − 1

N −1 N −1
N
X1 ( k ) = ∑ x (n)e− jπn e− j2πnk/N = ∑ x (n)e− j2πn(k+ N/2)/N = X (k + ).
n =0 n =0 2

For N/2 ≤ k ≤ N − 1

N −1 N −1
N
X1 ( k ) = ∑ x (n)e jπn e− j2πnk/N = ∑ x (n)e− j2πn(k− N/2)/N = X (k − ).
n =0 n =0
2
160 Discrete Fourier Transform

Solution 3.4. The DFT of signal y(n) is

N −1 N −1
Y (k ) = ∑ y(n)e− j2πnk/N = ∑ [x(n) + (−1)n x(n)]e− j2πnk/N
n =0 n =0
N −1
N
= ∑ [x(n) + x(n)e− jπnN/N ]e− j2πnk/N = X (k) + X (k + 2
)
n =0

with X (k + N/2) = X (k − N/2) for k > N/2.


For z(n) the DFT is

N −1 N −1
Z (k ) = ∑ z(n)e− j2πnk/N = ∑ [x(n) − (−1)n x(n)]e− j2πnk/N
n =0 n =0
N
= X ( k ) − X ( k + ).
2

Obviously Y (k ) + Z (k ) = X (k ).

Solution 3.5. For the convolution calculation, using the DFT, the minimal
number N is N = K + L − 1 = 4, where K = 2 is the duration of x (n) and
L = 3 is the duration of h(n). With N = 4 follows

X (k ) = 1 − e− j2πk/4
H (k ) = 2 − e− j2πk/4 + 2e− j4πk/4
Y (k ) = X (k ) H (k ) = (1 − e− j2πk/4 )(2 − e− j2πk/4 + 2e− j4πk/4 )
= 2 − 3e− j2πk/4 + 3e− j4πk/4 − 2e− j6πk/4 .

The signal is

y(n) = IDFT{Y (k )} = 2δ(n) − 3δ(n − 1) + 3δ(n − 2) − 2δ(n − 3).

Solution 3.6. The circular convolution of y(n) = x (n) ∗ h(n) has the DFT
Y (k ) = X (k) H (k ) with

N −1
1 1
X (k ) = ∑ [e j4πn/N + 2j e j2πn/N − 2j e− j2πn/N ]e− j2πnk/N
n =0
N N
= Nδ(k − 2) + δ ( k − 1) − δ ( k + 1)
2j 2j
Ljubiša Stanković Digital Signal Processing 161

and
N −1
1 1
H (k) = ∑ [ 2 e j4πn/N + 2 e− j4πn/N + e j2πn/N ]e− j2πnk/N
n =0
N N
= δ(k − 2) + δ(k + 2) + Nδ(k − 1).
2 2
The value of Y (k ) is

N2 N2
Y (k ) = δ ( k − 2) + δ ( k − 1 ).
2 2j

The inverse DFT is


N j4πn/N N j2πn/N
y(n) = e + e .
2 2j

Solution 3.7. The DFT can be written as Y (k ) = X (k ) X ∗ (k ) with

y(n) = IDFT{ X (k )} ∗n IDFT{ X ∗ (k )}.

Since
( )∗
N −1 N −1
IDFT{ X ∗ (k )} = ∑ X ∗ (k )e j2πnk/N = ∑ X (k )e− j2πnk/N
k =0 k =0
( )∗
N −1
= ∑ X (k )e j2πk( N −n)/N = x∗ ( N − n)
k =0

we get

y(n) = ( x (n))10 ∗n ( x ∗ (10 − n))10


= (u(n) − u(n − 3))10 ∗n (u(10 − n) − u(7 − n))10
= (δ(n + 2) + 2δ(n + 1) + 3δ(n) + 2δ(n − 1) + δ(n − 2))10

where ( x (n)) N indicates that the signal is periodically extended with N.


Solution 3.8. For a real-valued signal holds
N −1
2πnk 2πnk
X (k ) = ∑ [x(n) cos N
− jx (n) sin
N
]
n =0
N −1
2πnk 2πnk
X ( N − k) = ∑ [x(n) cos N
+ jx (n) sin
N
].
n =0
162 Discrete Fourier Transform

Thus,

N −1
2πnk X (k ) + X ( N − k ) H (k ) + H ( N − k )
∑ x (n) cos
N
=
2
=
2
n =0
N −1
2πnk X ( N − k ) − X (k ) H (k ) − H ( N − k )
∑ x (n) sin
N
=
2j
=
2
.
n =0

The DHT can be calculated as a sum of these terms,

2H (k ) = X (k ) + X ( N − k ) − j[ X ( N − k ) − X (k )].

The DFT is obtained using the DHT in the same way as

2X (k ) = H (k ) + H ( N − k ) − j[ H (k ) − H ( N − k )].

Solution 3.9. We can split the DCT sum into an even and odd part

N −1
2πk 1
C (k ) = ∑ 2x(n) cos( 2N (n + 2 )) =
n =0
N/2−1 N/2−1
2πk 1 2πk 1
∑ 2x (2n) cos(
2N
(2n + )) + ∑ 2x (2n + 1) cos(
2 2N
(2n + 1 + )).
2
n =0 n =0

By reverting the summation index in the second sum using n = N/2 − 1 − m


the summation in m is from m = N/2 − 1 for n = 0 down to m = 0 for
n = N/2 − 1. Then

N/2−1
2πk 1
∑ 2x (2n + 1) cos(
2N
(2n + 1 + ))
2
n =0
N/2−1
2πk 1
= ∑ 2x ( N − 2m − 1) cos(
2N
( N − 2m − 1 + )).
2
m =0

Shifting now the summation index in this sum for N/2 + m = n follows

N/2−1
2πk 1
∑ 2x ( N − 2m − 1) cos(
2N
( N − 2m − 1 + ))
2
m =0
N −1
2πk 1
= ∑ 2x (2N − 2n − 1) cos(
2N
(2N − 2n − )).
2
n= N/2
Ljubiša Stanković Digital Signal Processing 163

Now we can go back to the DCT and to replace the second sum, to get

N/2−1
2πk 1
C (k ) = ∑ 2x (2n) cos(
2N
(2n + ))
2
n =0
N −1 N −1
2πk 1 2πk 1
+ ∑ 2x (2N − 2n − 1) cos(
2N
(2n + )) = ∑ y(n) cos(
2 2N
(2n + ))
2
n= N/2 n =0

with cos( 2πk 1 2πk 1


2N (2N − 2n − 2 )) = cos( 2N (2n + 2 )) and
!
2x (2n) for 0 ≤ n ≤ N/2 − 1
y(n) =
2x (2N − 2n − 1) for N/2 ≤ n ≤ N − 1
or
N −1 2πk 1 πk
C (k ) = Re{ ∑ y(n)e− j 2N (2n+ 2 ) } = Re{e− j 2N DFT{y(n)}}.
n =0

Solution 3.10. (a) For the signal z(n) we can write


4N −1 2N −1
DFT{z(n)} = ∑ z(n)e− j2πnk/(4N ) = ∑ z(2n + 1)e− j2π (2n+1)k/(4N )
n =0 n =0
2N −1 N −1
= ∑ y(n)e− j2π (2n+1)k/(4N ) = ∑ 2x(n)e− j2π(2n+1)k/(4N ) .
n =0 n =0

The real and imaginary parts of DFT {z(n)} are


N −1
2π (2n + 1)k
Re{DFT{z(n)}} = ∑ 2x(n) cos( 4N
) = C (k )
n =0
N −1
2π (2n + 1)k
Im{DFT{z(n)}} = − ∑ 2x(n) sin( 4N
) = −S(k )
n =0
DFT{z(n)} = C (k ) − jS(k ),

and
N −1
Z (k ) = DFT{z(n)} = e− j2πk/(4N ) ∑ 2x(n)e− j2πnk/(2N )
n =0
jπk/(2N )
Z (k )e = Y (k) = 2X (k/2).

Note that X (k/2) is just a notation for 2X ( 2k ) = Y (k ), where Y (k ) =


DFT{y(n)} and y(n) is zero-padded version of 2x (n) defined by (3.44).
164 Discrete Fourier Transform

b) If the signal x (n) is input to a system then the DCT is calculated for

xh (n) = x (n) ∗n h(n)


X h ( k ) = X ( k ) H ( k ).

It has been assumed that all x (n), h(n), and x (n) ∗n h(n) are zero-valued
outside 0 ≤ n ≤ N − 1 (it means that the duration of x (n) and h(n) should
be such that their convolution is within 0 ≤ n ≤ N − 1) . Then for a signal
zh (n) related to xh (n) = x (n) ∗n h(n) in the same way as z(n) to x (n) in a)
we can write
k k k k
DFT{zh (n)}e jπk/(2N ) = 2Xh ( ) = 2X ( ) H ( ) = Y (k ) H ( ).
2 2 2 2
Then
k
Ch (k ) = DCT{ xh (n)} = Re{Y (k ) H ( )e− jπk/(2N ) }
2
− jπk/(4N ) k k
= Re{Y (k)e } Re{ H ( )} − Im{Y (k)e− jπk/(4N ) } Im{ H ( )}
2 2
k k
= C (k) Re{ H ( )} + S(k) Im{ H ( )}.
2 2
The system output is x (n) ∗n h(n) = xh (n) = IDCT{Ch )k )}, (3.34). Transform
H (k/2) is the DFT of zero-padded h(n) with factor 2. Only first half of the
DFT samples are then used.
Solution 3.11. For the signal yk (n) we may write
N −1
yk (n) = ∑ x (n − N + 1 + m)e− j2πmk/N .
m =0

Now let us shift the summation


N 2π
N
yk (n) = ∑ x(n − N + m)e− j2π(m−1)k/N = e j N k ∑ x(n − N + m)e− j2πmk/N
m =1 m =1

N −1
= e j N k [ ∑ x (n − N + m)e− j2πmk/N − x (n − N )e− j2π0k/N + x (n)e− j2πNk/N ]
m =0
= e j2πk/N [yk (n − 1) − x (n − N ) + x (n)].

For 0 ≤ n ≤ N − 1

yk (n) = e j2πk/N [yk (n − 1) + x (n)]


Ljubiša Stanković Digital Signal Processing 165

since x (n − N ) = 0. This proves the problem statement.


If the signal x (n) continues as a periodic signal after n = 0,

x p (n) = ∑ x(n − lN ) (3.45)
l =0

then, for n ≥ N, it holds x p (n − N ) = x p (n) and yk (n) = e j2πk/N yk (n − 1),



⎨ 0 for n<0
yk (n) = y (n) = e j2πk/N [yk (n − 1) + x (n)] for 0≤n≤ N−1
⎩ k
yk (n) = e j2πk/N yk (n − 1) for n≥N

for x p (n) defined by (3.45).


Solution 3.12. For k = 2r the DHT can be written as
N/2−1 @ A N −1 @ A
H (2r ) = ∑ x (n) cos 2πrn
N/2 + sin 2πrn
N/2 + ∑ x (n) cos 2πrn
N/2 + sin 2πrn
N/2
n =0 n= N/2
N/2−1 @ A
2πrn
= ∑ ( x (n) + x (n + N/2)) cos N/2 + sin 2πrn
N/2 .
n =0

Therefore H (2r ) is
N/2−1 - .
2πrn 2πrn
H (2r ) = ∑ g(n) cos
N/2
+ sin
N/2
n =0

where g(n) = x (n) + x (n + N/2). This is a DHT of g(n) with N/2 samples.
Note: For odd frequency indices k = 2r + 1 we can write
N −1 - .
2π (2r + 1)n 2π (2r + 1)n
H (2r + 1) = ∑ x (n) cos + sin .
n =0
N N

After some lengthy, but straightforward transformations, we get

N/2−1 - .
2πnr 2πnr
H (2r + 1) = ∑ f (n) cos
N/2
+ sin
N/2
n =0

where
N 2πn N 2πn
f (n) = [ x (n) − x (n + )] cos + [ x ( − n) − x ( N − n)] sin .
2 N 2 N
This is again a DHT of a signal f (n) with N/2 samples.
166 Discrete Fourier Transform

Solution 3.13. The DFT is


' B C '
15 √ ' sin π (2√3 − k ) '
' '
| X (k)| = | ∑ e j2π (2 3−k)n/16 '
|=' B √ C '' , with (3.46)
n =0 ' sin π (2 3 − k )/16 '
|X| = (1.5799, 2.1361, 3.5045, 10.9192, 9.4607, 3.3454,
2.0805, 1.5530, 1.2781, 1.1225, 1.0362, 0.99781, 0.9992, 1.0406, 1.1310, 1.2929),

where |X| is the vector whose elements are the DFT values | X (k )|, k =
0, 1, ..., 15. Maximal value is at k = 3, meaning that the frequency estimation
without displacement √ bin would be (2π · 3)/16 = 1.1781, while the true
frequency is (2π · 2 3)/16 = 1.3603. The error is 13.4%.
For the zero-padded signal (interpolated DFT), with a factor of 4,
15 √ 15 √
3n/16 − j2πnk/64
| X (k)| = | ∑ e j4π e | =| ∑ e j2π (8 3−k)n/64
|
n =0 n =0
' B C'
' sin π (8√3 − k )/4 '
' '
= '' B √ C '' .
' sin π (8 3 − k )/64 '
@ √ A @ √ A
Maximal value is obtained for k = 8 3 = 14, where 8 3 denotes the
nearest integer value. Then
' B C'
' sin π (8√3 − 14)/4 '
' '
| X (14)| = '' B √ C '' = 15.9662,
' sin π (8 3 − 14)/64 '
' B C'
' sin π (8√3 − 15)/4 '
' '
| X (15)| = '' B √ C '' = 13.9412
' sin π (8 3 − 15)/64 '
' B C'
' sin π (8√3 − 13)/4 '
' '
| X (13)| = '' B √ C '' = 14.8249,
' sin π (8 3 − 13)/64 '

and the displacement bin is

| X (15)| − | X (13)|
d = 0.5 = −0.1395.
2 | X (14)| − | X (15)| − | X (15)|

The true frequency index would be 8 3 = 13.8564, with the true frequency
2π · 13.8564/64 = 1.3603. The correct value of frequency index is shifted
Ljubiša Stanković Digital Signal Processing 167

4
3
2
x( n)

1
0
-1
-2
-3

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
n

Figure 3.26 Discrete signal x (n) (Exercise 3.4)

from the nearest integer k = 14 (on the frequency grid) for 14 − 13.8564 =
−0.1436, when the interpolation is done. Thus, the obtained displacement
bin value −0.1395 is close to the true shift value −0.1436. The estimated
frequency, using the displacement bin, is 1.3608. As compared to the true
frequency the error is 0.03%.
If the displacement formula is applied on √ the DFT values, without
interpolation, we would get d = 0.3356, while 2 3 = 3.4641 is displaced
from the nearest integer for 0.4641.

3.12 EXERCISE

Exercise 3.1. Find the DFT of x (n) = δ(n) − δ(n − 3) with N = 4 and N = 8.

Exercise 3.2. Calculate the DFT of signal x (n) = sin(nπ/4) for 0 ≤ n < N
with N = 8 and N = 16.

Exercise 3.3. For a real-valued signal the DFT is calculated with N = 8 and
the following DFT values are known: X (0) = 1, X (2) = 2 − j, X (5) = j,
X (7) = 3. Find the remaining values. What are the values of x (0) and
∑7n=0 x (n)?

Exercise 3.4. Signal x (n) is presented in Fig. 3.26. Find X (0), X (4), and X (8),
where X (k ) is the DFT of x (n) calculated with N = 16.

Exercise 3.5. Prove that for an arbitrary real-valued signal x (n), defined for
0 ≤ n < N, where N is an even integer, the DFT value X ( N/2) is real-valued.
168 Discrete Fourier Transform

4
3
2
X( k)

1
0
-1
-2
-3

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
k

Figure 3.27 DFT of the discrete signal x (n) (Exercise 3.6)

Exercise 3.6. Consider a signal x (n) whose DFT values X (k ), calculated


with N = 16, are presented in Fig. 3.27.
1. Find the DFT of signal y1 (n) = x (n) + (−1)n x (n).
2. Find the DFT of signal y2 (n) = x (n) − (−1)n x (n).
3. Find the DFT of signal y3 (n) = x (n) ∗ x ( N − n) where ∗ denotes a
circular convolution with period N.
4. Find the DFT of signal
%
x (n) for n ̸= 8
y4 ( n ) =
0 for n = 8.

5. Find x (0).
6. Calculate ∑15
n =0 x ( n ).

7. Calculate ∑15 2
n=0 | x ( n )| .

8. Calculate ∑15 n
n=0 (−1) x (n ).

Exercise 3.7. Prove that if | x (n)| ≤ A for 0 ≤ n < N then | X (k )| ≤ N A for


any k, where X (k ) is the DFT of x (n) calculated with N points.

Exercise 3.8. Prove that if ∑nN=−01 | x (n)| ≤ A then ∑kN=−01 | X (k )| ≤ N A where


X (k ) is the DFT of x (n) calculated with N points.
Chapter 4
z-Transform

Fourier transform of discrete signals and the DFT are used for

T
HE
direct signal processing and calculations. A transform that gener-
alizes these transforms, in the same way as the Laplace transform
generalizes the Fourier transform of continuous signals, is the z-transform.
This transform provides an efficient tool for qualitative analysis and design
of the discrete systems.

4.1 DEFINITION OF THE Z-TRANSFORM

The Fourier transform of a discrete-time signal x (n) can be considered as a


special case of the z-transform defined by


X (z) = ∑ x (n )z−n , (4.1)
n=−∞

where z = r exp( jω ) is a complex number. Value of the z-transform along


the unit circle |z| = 1 or z = exp( jω ) is equal to the Fourier transform of
discrete-time signals.
The z-transform, in general, converges only for some values of the
complex argument z. The region of values of z where X (z) is finite is the
region of convergence (ROC) of the z-transform.
Example 4.1. Consider a discrete-time signal

x ( n ) = a n u ( n ) + b n u ( n ),

where a and b are complex numbers, | a| < |b|. Find the z-transform of this
signal and its region of convergence.

169
170 z-Transform

a a
Im{z}

Im{z}

Im{z}
b b
Re{z} Re{z} Re{z}

Figure 4.1 Regions of convergence (gray area)

⋆The z-transform of x (n) is


∞ ∞ ∞
X (z) = ∑ (an z−n + bn z−n ) = ∑ (a/z)n + ∑ (b/z)n
n =0 n =0 n =0
1 1 z z
= + = + .
1 − a/z 1 − b/z z−a z−b
Infinite geometric series with progression coefficient ( a/z) converges for
| a/z| < 1. Thus, the region of convergence for the first part of the z-transform
is |z| > | a|. The other series converges for |b/z| < 1, i.e., for |z| > |b|. The
resulting transform is finite if both parts are finite (or do not cancel out to
produce a finite value). Since | a| < |b|, the region of convergence for X (z) is
|z| > |b|, Fig.4.1.

Example 4.2. Consider a discrete-time signal


x (n) = an u(n − 1) − bn u(−n − 1) + 2δ(n − 2),
where a and b are complex numbers, |b| > | a|. Find the z-transform of x (n)
and its region of convergence.
⋆The z-transform is
∞ −1 ∞ ∞
X (z) = ∑ an z−n − ∑ bn z−n + 2z−2 = ∑ an z−n − ∑ b−n zn + 2z−2
n =1 n=−∞ n =1 n =1
a/z z/b a z
= − + 2z−2 = + + 2z−2 .
1 − a/z 1 − z/b z−a z−b
Infinite geometric series with progression coefficient ( a/z) converges for
| a/z| < 1. The other series converges for |z/b| < 1. The last term has pole
at z = 0. Since |b| > | a| the region of convergence is | a| < |z| < |b|, Fig.4.2.
Note that in this example and the previous one two different signals
bn u(n) and −bn u(−n − 1) produced the same z-transform Xb (z) = z/(z − b),
but with different regions of convergence.
Ljubiša Stanković Digital Signal Processing 171

a a
Im{z}

Im{z}

Im{z}
b b
Re{z} Re{z} Re{z}

Figure 4.2 Regions of convergence (gray area)

4.2 PROPERTIES OF THE Z-TRANSFORM

4.2.1 Linearity

The z-transform is linear since


Z{ ax (n) + by(n)} = ∑ [ ax (n) + by(n)]z−n = aX (z) + bY (z)
n=−∞

with the region of convergence being at least the intersection of the regions
of convergence of X (z) and Y (z). In special cases the region can be larger
than the intersection of the regions of convergence of X (z) and Y (z) if
some poles, defining the region of convergence, cancel out in the linear
combination of transforms.

4.2.2 Time-Shift

For a shifted signal x (n − n0 ) the z-transform is

∞ ∞
Z{ x (n − n0 )} = ∑ x ( n − n0 ) z − n = ∑ x (n)z−(n+n0 ) = X (z)z−n0 .
n=−∞ n=−∞

Additional pole at z = 0 is introduced for n0 > 0. The region of convergence


is the same except for z = 0 or z → ∞, depending on the value of n0 .

Example 4.3. For a causal signal x (n) = x (n)u(n) find the z-transform of x (n +
n0 )u(n), for n0 ≥ 0.
172 z-Transform

⋆ The signal x (n + n0 )u(n) has a z-transform


∞ ∞
Z{ x (n + n0 )u(n)} = ∑ x(n + n0 )z−n = ∑ x(n + n0 )z−(n+n ) zn 0 0

n =0 n =0
> ?

= z n0 ∑ x (n)z−n − x (0) − x (1)z−1 − ... − x (n0 − 1)z−n0 +1
n =0
@ A
= zn0 X (z) − x (0) − x (1)z−1 − ... − x (n0 − 1)z−n0 +1 .

For n0 = 1 follows Z{ x (n + 1)u(n)} = zX (z) − x (0). Note that for this signal
x ( n + n0 ) u ( n ) ̸ = x ( n + n0 ) u ( n + n0 ).

4.2.3 Multiplication by exponential signal: Modulation

For a signal multiplied by an exponential signal the z-transform is



z
Z{ an x (n)} = x ( n ) a n z − n = X ( ),

n=−∞ a

with region of convergence being scaled by | a|. In a special case when


a = e jω0 , the z-transform plane is just rotated

Z{e jω0 n x (n)} = ∑ x (n)e jω0 n z−n = X (ze− jω0 )
n=−∞

with the same region of convergence as X (z).

4.2.4 Differentiation

Consider the z-transform of a causal signal x (n)


∞ ∞
dX (z)
X (z) = ∑ x(n)z−n and dz
= ∑ −nx (n)z−n−1 .
n =0 n =0

We can conclude that


dX (z)
Z{nx (n)u(n)} = −z .
dz
This kind of the z-transform derivations can be generalized to

d N X (z)
Z{n(n − 1)...(n − N − 1) x (n)u(n)} = (−1) N z N .
dz N
Ljubiša Stanković Digital Signal Processing 173

4.2.5 Convolution in time

The z-transform of a convolution of signals x (n) and y(n) is


Z{ x (n) ∗ y(n)} = Z{ ∑ x (m)y(n − m)}
m=−∞
∞ ∞ ∞ ∞
= ∑ ∑ x (m )y (n − m )z−n = ∑ ∑ x ( m ) y ( l ) z − m − l = X ( z )Y ( z )
n=−∞ m=−∞ l =−∞ m=−∞

with the region of convergence being at least the intersection of the re-
gions of convergence of X (z) and Y (z). In the case of a product of two z-
transforms it may happen that some poles are canceled out causing that the
resulting region of convergence is larger than the intersection of the individ-
ual regions of convergence.

4.2.6 Table of the z-transform

Signal x (n) z-transform X (z)


δ(n) 1
z
u(n) 1− z , | z | > |1 |
z
an u(n) a−z , |z | > | a |
nan−1 u(n) −z , z > a
( a − z )2
| | | |
z
− an u(−n − 1) a−z ,|z| < | a|
an x (n) X (z/a)
z (1− a2)
a|n| , | a | < 1 (z− a)(1− az)
, | a| < |z| < |1/a|
x ( n − n0 ) z − n 0 X (z)
nx (n)u(n) −zdX (z)/dz
n ( n − 1) x ( n ) u ( n ) z2 d2 X (z)/dz2
1−z−1 cos(ω0 )
cos(ω0 n)u(n) 1−2z−1 cos(ω0 )+z−2
1−z−1 sin(ω0 )
sin(ω0 n)u(n) 1−2z−1 cos(ω0 )+z−2
1
n! u ( n ) exp(z)
[ x (n)u(n)] ∗ u(n) = ∑nm=−∞ x (m) z
z −1 X ( z )
174 z-Transform

4.2.7 Initial and Stationary State Signal Value

The initial value of a causal signal may be calculated as

x (0) = lim X (z). (4.2)


z→∞

According to the z-transform definition all terms with z−n vanishes as


z → ∞. The term which does not depend on z follows then. It is the term
with x (0).
The stationary state value of a causal signal x (n) is

lim x (n) = lim (z − 1) X (z). (4.3)


n→∞ z →1

This relation follows from

Z{ x (n + 1)u(n))} − Z{ x (n)u(n))} = zX (z) − x (0) − X (z)


> ?
N N
−n −n
Z{ x (n + 1)u(n))} − Z{ x (n)u(n))} = lim ∑ x ( n + 1) z
N → ∞ n =0
− ∑ x (n)z
z →1 n =0

= lim [ x ( N + 1) − x (0)].
N →∞

Thus,
lim [ x ( N + 1) − x (0)] = zX (z) − x (0) − X (z),
N →∞

produces the stationary state value (4.3).

4.3 INVERSE Z-TRANSFORM

4.3.1 Direct Power Series Expansion

Most common approach to the z-transform inversion is based on a direct


expansion of the given transform into power series with respect to z−1
within the region of convergence. After the z-transform is expanded into
series

X (z) = ∑ Xn z − n
n=−∞

the signal is identified as x (n) = Xn for −∞ < n < ∞.


Ljubiša Stanković Digital Signal Processing 175

In general various techniques may be used to expand a function into


power series. Most of the cases in signal processing, after some transforma-
tions, reduce to a simple form of an infinite geometric series

1
= 1 + q + q2 + ... = ∑ qn
1−q n =0

for |q| < 1.


Example 4.4. For the z-transform
1 1
X (z) = +
1 − 12 z−1 1 − 3z

identify possible regions of convergence and find the inverse z-transform for
each of them.
⋆Obviously the z-transform has the poles z1 = 1/2 and z2 = 1/3. Since
there are no poles in the region of convergence there are three possibilities
to define the region of convergence: 1) |z| > 1/2, 2) 1/3 < |z| < 1/2, and 3)
|z| < 1/3. The signals are obtained by using power series expansion for each
case.
1) For the region of convergence |z| > 1/2 the z-transform should be
written in the form
1 1
X (z) = 1
+ 1
.
1− 2z −3z(1 − 3z )

Now we have two sums of the geometric series


∞ * + ' '
1 1 n ∞
1 −n '1'
' ' < 1 or |z| > 1
1
1 − 2z
= ∑ 2z
= ∑ 2 n
z for ' 2z ' 2
n =0 n =0
* + ' '
1 ∞
1 n ∞
1 −n '1'
' ' < 1 or |z| > 1
1
1 − 3z
= ∑ 3z
= ∑ 3 n
z for ' 3z ' 3
.
n =0 n =0

Both of these sums converge for |z| > 1/2. The resulting power series expan-
sion of X (z) is

1 −n 1 ∞ 1 −n
X (z) = ∑ 2n
z −
3z n∑ n
z
n =0 =0 3
∞ ∞
1 1
= ∑ n z−n − ∑ n z−n .
n =0
2 n =1
3

The inverse z-transform, for this region of convergence, is


1 1
x (n) = u ( n ) − n u ( n − 1).
2n 3
176 z-Transform

2) For 1/3 < |z| < 1/2 the z-transform should be written in the form
−2z 1
X (z) = + 1
.
1 − 2z −3z(1 − 3z )
The corresponding geometric series are
∞ 0
1 1
= ∑ (2z)n = ∑ 2−n z−n for |2z| < 1 or |z| <
1 − 2z n=0 n=−∞ 2
∞ * + ' '
1 1 n ∞
1 −n '1' 1
1
= ∑ = ∑ n z for '' '' < 1 or |z| > .
1 − 3z n =0
3z n =0
3 3z 3

They converge for 1/3 < |z| < 1/2. The resulting power series expansion is
0
1 ∞ 1 −n
∑ 2− n z − n −
3z n∑
X (z) = −2z n
z
n=−∞ =0 3
−1 1 −n ∞
1
=− ∑ n
z − ∑ n z−n .
n=−∞ 2 n =1
3
The inverse z-transform for this region of convergence is
1 1
x (n) = − u(−n − 1) − n u(n − 1).
2n 3
3) For |z| < 1/3 we can write
−2z 1
X (z) = + .
1 − 2z 1 − 3z
The corresponding geometric series are
∞ 0
1 1
= ∑ (2z)n = ∑ 2−n z−n for |2z| < 1 or |z| <
1 − 2z n=0 n=−∞ 2
∞ 0
1 1
= ∑ (3z)n = ∑ 3−n z−n for |3z| < 1 or |z| < .
1 − 3z n=0 n=−∞ 3

Both series converge for |z| < 1/3. The expansion is


0 0
X (z) = −2z ∑ 2− n z − n + ∑ 3− n z − n
n=−∞ n=−∞
−1 1 −n 0
1
=− ∑ n
z + ∑ n z−n .
n=−∞ 2 n=−∞ 3
The inverse z-transform, in this case, is
1 1
x (n) = − u(−n − 1) + n u(−n).
2n 3
Ljubiša Stanković Digital Signal Processing 177

Example 4.5. For the z-transform


X (z) = e a/z
identify the region of convergence and find the inverse z-transform.
⋆ Expanding e a/z into a complex Taylor (Laurant) series

1 1
X (z) = e a/z = 1 + ( a/z) + ( a/z)2 + ( a/z)3 + ...
2! 3!
follows
1 2 1
x (n) = δ(n) + aδ(n − 1) + a δ(n − 2) + a3 δ(n − 3)+
2! 3!
1
= an u ( n ).
n!
The series converges for any z except z = 0.

Example 4.6. For the z-transform

z2 + 1
X (z) =
(z − 1/2)(z2 − 3z/4 + 1/8)

find the signal x (n) if the region of convergence is |z| > 1/2.
⋆ The denominator of X (z) will be rewritten in the form

z2 + 1 z2 + 1
X (z) = =
(z − 1/2)(z − z1 )(z − z2 ) (z − 1/2)2 (z − 1/4)

where z1 = 1/2 and z2 = 1/4. Writing X (z) in the form of partial fractions

A B C
X (z) = + +
(z − 12 )2 z − 1
2 z− 1
4

the coefficients A, B, and C follow from

( z2 + 1) A(z − 14 ) + B(z − 12 )(z − 14 ) + C (z − 12 )2


=
(z − 12 )2 (z − 14 ) (z − 12 )2 (z − 14 )

or from
1 1 1 1
(z2 + 1) = A(z − ) + B(z − )(z − ) + C (z − )2 . (4.4)
4 2 4 2
For z = 1/4 we get 17/16 = C/16 or C = 17. Value of z = 1/2 gives

1 1 1
( + 1) = A ( − )
4 2 4
178 z-Transform

and A = 5 is obtained. Finally if the highest order coefficients in the relation


(4.4) with z2 are equated
z2 = Bz2 + Cz2
we get 1 = B + C, producing B = −16. The z-transform is
5 −16 17
X (z) = 1 2
+ 1
+ .
(z − 2) z− 2 z − 1/4

For the region of convergence |z| > 1/2 and a parameter | a| ≤ 1/2 holds

1 1 −1 −1
= a = z (1 + az + a 2 z −2 + . . . ) = ∑ a n −1 z − n .
z−a z (1 − z ) n =1

Differentiating both sides of the previous equation with respect to a we get



d 1 1
( )= 2
= ∑ ( n − 1 ) a n −2 z − n
da z − a (z − a) n =2

Using this relation with a = 1/2 the inverse z-transform of X (z) is


n−1 1 1
x (n) = 5 u(n − 2) − 16 n−1 u(n − 1) + 17 n−1 u(n − 1).
2n −2 2 4
Note: In general, the relation
1 1 dm 1
m + 1
= m
( )=
(z − a) m! da z − a
( )

1 dm (n − 1)(n − 2)..(n − m) ∞ n−m−1 −n
= m ∑ a n −1 z − n = ∑a z
m! da n =1
m! n =1

produces the inverse z-transform


(n − 1)(n − 2)..(n − m) n−m−1
x (n) = a u(n)
m!
(n − 1)(n − 2)..(n − m) n−m−1
= a u ( n − m − 1)
m!
* +
n
= a n − m −1 u ( n − m − 1 ).
m

4.3.2 Theorem of Residues Based Inversion

In general the inversion is calculated by using the Cauchy relation from the
complex analysis
O
1
zm−1 dz = δ(m),
2πj
C
Ljubiša Stanković Digital Signal Processing 179

where C is any closed contour line within the region of convergence. The
complex plane origin is within the contour. By multiplying both sides of
X (z) by zm−1 , after integration along the closed contour within the region
of convergence we get
O ∞ O
1 1
zm−1 X (z)dz = ∑ 2πj zm−1 x (n)z−n dz = x (m).
2πj n=−∞
C C

The integral is calculated by using the theorem of residues


O
% ;
1 n −1 1 d(k−1) [zn−1 X (z)(z − zi )k ]
x (n) = z X (z)dz = ∑ ,
2πj zi ( k − 1) ! dzk−1 | z = zi
C

where zi are the poles of zn−1 X (z) within the integration contour C that is
in the region of convergence and k is the pole order. If the signal is causal,
n ≥ 0, and all poles of zn−1 X (z) within contour C are simple (first-order
poles with k = 1) then, for a given instant n,
M N
x (n) = ∑ [zn−1 X (z)(z − zi )]|z=zi . (4.5)
zi

Example 4.7. For the z-transform


2z + 3
X (z) =
(z − 1/2)(z − 1/4)
find a causal signal x (n).
⋆ According to the residuum theorem for n ≥ 1
M N
x (n) = ∑ [zn−1 X (z)(z − zi )]|z=zi
zi

zn−1 (2z + 3) 1 zn−1 (2z + 3) 1


= 1 1
(z − )|z=1/2 + 1 1
(z − )|z=1/4
(z − 2 )( z − 4 )
2 (z − 2 )(z − 4 ) 4
1 1 7
n −1 4 4n −1 2 1 1
= 2 1 + −1
= 16 − 14 n−1 .
4 4
2n −1 4

For n = 0 additional pole at z = 0 exists

z−1 (2z + 3) z−1 (2z + 3) 1


x (0) = 1 1
z | z =0 + 1 1
(z − )|z=1/2
(z − 2 )( z − 4 ) (z − 2 )( z − 4 )
2
z−1 (2z + 3) 1
+ 1 1
(z − )|z=1/4 = 0.
(z − 2 )( z − 4 )
4
180 z-Transform

An easy way to get x (0) is x (0) = limz→∞ X (z).


The resulting inverse z-transform is
1 1
x (n) = 16 u(n − 1) − 14 n−1 u(n − 1).
2n −1 4
It has been assumed that the signal is causal. Using the theorem of
residuum prove that x (n) = 0 for n < 0 with |z| > 1/2.
Hint: Since for each n < 0 there is a pole at z = 0 of the order n + 1, to
avoid different derivatives for each n we can make a substitution of variables
z = 1/p, with dz = −dp/p2 . New region of convergence in the complex
plane p will be p < 2. All poles are now outside this region and outside the
integration contour, producing the zero-valued integral.

4.4 DISCRETE SYSTEMS AND THE Z-TRANSFORM

For a linear time-invariant discrete system described by



y(n) = x (n) ∗ h(n) = ∑ x (m)h(n − m)
m=−∞

the z-transform is given by

Y ( z ) = X ( z ) H ( z ).

The output signal z-transform is obtained by multiplying the input signal


z-transform by the transfer function

H (z) = ∑ h (n )z−n .
n=−∞

It is possible to relate two important properties of a system with the transfer


function properties.
The system is stable if

∑ |h(m)| < ∞.
m=−∞

It means that the z-transform exists at |z| = 1, i.e., that the circle

|z| = 1
Ljubiša Stanković Digital Signal Processing 181

a a a
Im{z}

Im{z}

Im{z}
1 1 1
c

b b
Re{z} Re{z} Re{z}

2 4
60 h (n) 1.5 h2(n) 3 h3(n)
1
40 1 2
20 0.5 1

0 0 0

-10 0 10 -10 0 10 -10 0 10

Figure 4.3 Regions of convergence (gray) with corresponding signals. Poles are denoted by
"x".

belongs to the region of convergence for a stable system.


The system is causal if h(n) = 0 for n < 0. Since H (z) = h(0) +
h(1)z−1 + h(2)z−2 + ... it is obvious that z → ∞ belongs to the region of
convergence for a causal system.
From the previous two properties we can conclude that a linear time-
invariant system is stable and causal if the unit circle |z| = 1 and z → ∞
belong to the region of convergence. Since there are no poles within the
region of convergence one may conclude that a transfer function H (z) may
correspond to a stable and causal system only if all of its poles are inside the
unit circle.
Example 4.8. For the systems whose transfer functions are
1
H1 (z) = , |z| > 3/2
(z − 1/3)(z − 3/2)
1
H2 (z) = , 1/3 < |z| < 3/2
z(z − 1/3)(z − 3/2)
1
H3 (z) = , |z| > 3/4
(z − 1/3)(z − 3/4)
plot the regions of convergence and discuss the stability and causality. Find
and plot the impulse response for each case.
182 z-Transform

⋆ The regions of convergence are shown in Fig.4.3. The system de-


scribed by H1 (z) is causal but not stable. The system H2 (z) is stable but not
causal, while the system H3 (z) is both stable and causal. Their impulse re-
sponses are presented in Fig.4.3 as well.

Amplitude of the frequency response (gain) of a discrete system is


related to the transfer function as

| H (e jω )| = | H (z)||z=e jω .

Consider a discrete system whose transfer function assumes the form of a


ratio of two polynomials

B0 + B1 z−1 + ... + B M z− M B (z − z01 )(z − z02 )...(z − z0M )


H (z) = = 0 zN−M
A0 + A1 z−1 + ... + A N z− N A0 (z − z p1 )(z − z p2 )...(z − z pN )

where z0i are zeros and z pi are poles of the transfer function. For the
amplitude of frequency response we my write
' '
' B ' TO1 TO2 ...TO M
| H (e jω )| = '' 0 ''
A0 TP1 TP2 ...TPN

where TOi are the distances from point T at a given frequency z = e jω to


zero Oi at z0i . Distances from point T to poles Pi at z pi are denoted by TPi .

Example 4.9. Plot the frequency response of the causal notch filter with the transfer
function
z − e jπ/3
H (z) =
z − 0.95e jπ/3

⋆ The transfer functions calculation is illustrated in Fig.4.4. Its value is

TO1
| H (e jω )| =
TP1

where O1 is positioned at z01 = e jπ/3 and pole P1 is at z p1 = 0.95e jπ/3 . For


any point T at z = e jω , ω ̸= π/3, the distances TO1 and TP1 from T to O1 and
from T to P1 are almost the same, TO1 ∼ = TP1 . Then | H (z)||z=e jω ∼
= 1 except
at ω = π/3, when TO1 = 0 and TP1 ̸= 0 resulting in | H (z)||z=e jπ/3 = 0. The
frequency response | H (e jω )| is shown in Fig.4.4.
Ljubiša Stanković Digital Signal Processing 183

O1
1.5
T P
1
ω
π/3

|H(ejω)|
Im{z}

0.5

0
Re{z} -2 0 π/3 2 ω

Figure 4.4 Poles and zeros of a first-order notch filter (left). The frequency response of this
notch filter (right).

4.5 DIFFERENCE EQUATIONS

An important class of discrete systems can be described by difference equa-


tions. They are obtained by converting corresponding differential equations
or by describing an intrinsically discrete system relating the input and out-
put signal in a recursive way. A general form of a linear difference equation
with constant coefficients, that relates the output signal at an instant n with
the input signal x (n) and the previous input and output samples, is

y(n)+ A1 y(n − 1) + ... + A N y(n − N ) = B0 x (n)+ B1 x (n − 1) + ... + B M x (n − M ).

4.5.1 Solution Based on the z-transform

The z-transform of the linear difference equation, assuming zero-valued


initial conditions, is

[1 + A1 z−1 + ... + A N z− N ]Y (z) = [ B0 + B1 z−1 + ... + B M z− M ] X (z),

since Z{ x (n − i )} = X (z)z−i and Z{y(n − k )} = Y (z)z−k . The solution y(n)


of the difference equation is obtained as an inverse z-transform of

B0 + B1 z−1 + ... + B M z− M
Y (z) = X ( z ).
1 + A1 z−1 + ... + A N z− N
184 z-Transform

Example 4.10. A causal discrete system is described by the difference equation

5 1
y ( n ) − y ( n − 1) + y ( n − 2) = x ( n ). (4.6)
6 6

If the input signal is x (n) = 1/4n u(n) find the output signal.

⋆The z-transform domain form of the system is

1
Y (z) = X ( z ).
1 − 12 z−1 + 16 z−2

The z-transform of the input signal is X (z) = 1/(1 − 14 z−1 ) for |z| > 1/4. The
output signal z-transform is

z3
Y (z) = .
(z − 12 )(z − 13 )(z − 14 )

For a causal system the region of convergence is |z| > 1/2. The output signal
is the inverse z-transform of Y (z). For n > 0 it is
M N
y(n) = ∑ [zn−1 Y (z)(z − zi )]|z=zi
zi =1/2,1/3,1/4

z n +2 z n +2 z n +2
= 1 1
+ 1 1
+
(z − 3 )( z − 4 ) |z=1/2 (z − 2 )( z − 4 ) |z=1/3 (z − 12 )(z − 13 ) |z=1/4
1 8 3
=6 − n + n.
2n 3 4
For n = 0 there is no pole at z = 0. Thus, the above expressions hold for n = 0
as well. The output signal is
- .
6 8 3
y(n) = − + u ( n ).
2n 3n 4n

Note: This kind of solution assumes the initial values from the system causal-
ity and x (n) as y(0) = x (0) = 1 and y(1) − 5y(0)/6 = x (1), i.e., y(1) =
13/12.

Example 4.11. A first-order causal discrete system is described by the following


difference equation

y(n) + A1 y(n − 1) = B0 x (n) + B1 x (n − 1). (4.7)

Find its impulse response and discuss its behavior in terms of the system
coefficients.
Ljubiša Stanković Digital Signal Processing 185

⋆For the impulse response calculation the input signal is x (n) = δ(n)
with X (z) = 1. Then we have

(1 + A1 z−1 )Y (z) = ( B0 + B1 z−1 )


B0 + B1 z−1
Y (z) = .
1 + A 1 z −1

The pole of this system is z = − A1 . The are two possibilities for the region
of convergence |z| > | A1 | and |z| < | A1 |. For a causal system the region of
convergence is |z| > | A1 |. Thus, the z-transform Y (z) can be expanded into a
geometric series with q = A1 z−1 = ( A1 /z) < 1
B CB C
Y (z) = B0 + B1 z−1 1 − A1 z−1 + A21 z−2 − A31 z−3 + ... + (− A1 z−1 )n + ...
∞ ∞
= B0 + B0 ∑ (− A1 )n z−n + B1 ∑ (− A1 )(n−1) z−n
n =1 n =1

with
y(n) = B0 δ(n) + (− A1 )n−1 (− A1 B0 + B1 )u(n − 1).

We can conclude that, in general, the impulse response has an infinite dura-
tion for any A1 ̸= 0. It is a result of the recursive relation between the output
y(n) and its previous value(s) y(n − 1). This kind of systems are referred to
as infinite impulse response (IIR) systems or recursive systems. If the value
of coefficient A1 is A1 = 0 then there is no recursion and

y(n) = B0 δ(n) + B1 δ(n − 1).

Then we have a system with a finite impulse response (FIR). This kind of
system produces an output to a signal x (n) as

y(n) = B0 x (n) + B1 x (n − 1).

They are called moving average (MA) systems. Systems without recursion
are always stable since a finite sum of finite signal values is always finite.
Systems that would contain only x (n) and the output recursions, in this
case,
y(n) + A1 y(n − 1) = B0 x (n)

are auto-regressive (AR) systems or all pole systems. This kind of systems
could be unstable, due to recursion. In our case the system is obviously
unstable if | A1 | > 1. Systems (4.7) are in general auto-regressive moving
average (ARMA) systems.
186 z-Transform

If the region of convergence were |z| < | A1 | then the function Y (z)
would be expanded into series with q = z/A1 < 1 as
* + ∞
B0 + B1 z−1 B0 B1
(− A1−1 z)n
A1 n∑
Y (z) = = z +
A1 z−1 (z/A1 + 1) A1 =0
0
B1 0
= B0 ∑ (− A1 )n−1 z−(n−1) + ∑ (− A1 )n z−n
n=−∞ A1 n=− ∞
−1 B1 0
= B0 ∑ (− A1 )n z−n + ∑ (− A1 )n z−n
n=−∞ A1 n=− ∞

with
B1
y(n) = B0 (− A1 )n u(−n − 1) + (− A1 )n u(−n).
A1
This system would be stable if |1/A1 | < 1 and unstable if |1/A1 | > 1, having
in mind that y(n) is nonzero for n < 0. This is an anticausal system since it
has impulse response satisfying h(n) = 0 for n ≥ 1.
Here, we have just introduced the notions. These systems will be
considered in Chapter 5 in details.

4.5.2 Solution of Difference Equations in the Time Domain

A direct way to solve a linear difference equation with constant coefficients


of the form

y(n) + A1 y(n − 1) + ... + A N y(n − N ) = x (n) (4.8)

in the time domain will be described next.


A homogeneous part of this difference equation is

y(n) + A1 y(n − 1) + ... + A N y(n − N ) = 0. (4.9)

Solution for the homogeneous equation is of the form

yi (n) = Ci λin .

Replacing yi (n) into (4.9), the characteristic polynomial equation follows

Ci λin + Ci A1 λin−1 + ... + Ci A N λin− N = 0,


or λiN + A1 λiN −1 + ... + A N = 0.

This is a polynomial of the Nth order. In general, it has N solutions λi ,


i = 1, 2, . . . , N. All functions yi (n) = λin , i = 1, 2, . . . , N are the solutions of
Ljubiša Stanković Digital Signal Processing 187

equation (4.9). Since the equation is linear, a linear combination of these


solutions,
N
yh (n) = ∑ Ci λin
i =1
is also a solution of the homogeneous equation (4.9). This solution is called
homogeneous part of the solution of (4.8).
Next a particular solution y p (n), corresponding to the form of input
signal x (n), should be found using the form of x (n). The solution of equa-
tion (4.8) is then
y ( n ) = y h ( n ) + y p ( n ).
The constants Ci , i = 1, 2, . . . , N are calculated based on initial conditions
y(i − 1), i = 1, 2, . . . , N.
Example 4.12. Find the output of a causal discrete system
5 1
y ( n ) − y ( n − 1) + y ( n − 2) = x ( n ) (4.10)
6 6
to the input signal x (n) = (n + 11/6)u(n) by solving the difference equation
in the discrete-time domain. The initial conditions are y(0) = 1 and y(1) = 5.
⋆Solution of the homogeneous part of (4.10)
5 1
y ( n ) − y ( n − 1) + y ( n − 2) = 0
6 6
is of the form yi (n) = Ci λin . Its replacement into the equation results in the
characteristic polynomial
5 1
λ2i − λi + = 0,
6 6
producing λ1 = 1/2 and λ2 = 1/3. The homogeneous part of the solution is
1 1
yh (n) = C1 + C2 n .
2n 3
Since x (n) is a linear function of n, a particular solution is of the form
y p (n) = An + B. Replacing y p (n) into (4.10) we obtain
5 1
y p (n) − y p (n − 1) + y p (n − 2) = n + 11/6
6 6
5 1
An + B − ( An − A + B) + ( An − 2A + B) = n + 11/6,
6 6
and A = 3, B = 1 follow. The solution of (4.10) is a sum of homogeneous and
particular solutions,
1 1
y(n) = yh (n) + y p (n) = C1 + C2 n + 3n + 1.
2n 3
188 z-Transform

Using the initial conditions

y(0) = C1 + C2 + 1 = 1
C1 C
y (1) = + 2 +4=5
2 3
the constants C1 = 6 and C2 = −6 follow. The final solution is
- .
6 6
y(n) = n − n + 3n + 1 u(n).
2 3
Note: The z-transform based solution would assume y(0) = x (0) =
11/6 and y(1) = 5y(0)/6 + x (1) = 157/36. The solution with the initial
conditions y(0) = 1 and y(1) = 5 could be obtained from this solution with
appropriate changes of the first two samples of the input signal in order to
take into account the previous system state and to produce the given initial
conditions y(0) = 1 and y(1) = 5 .
If multiple polynomial roots are obtained, for example λi = λi+1 , then
yi (n) = λin and yi+1 (n) = nλin .

Example 4.13. Goertzel algorithm: Show that a discrete-time signal

y(n) = e j(2πk0 n/N + ϕ)

is a solution of the homogeneous difference equation

y(n) − e j2πk0 /N y(n − 1) = 0. (4.11)

Consider a periodic signal x (n) with a period N and its DFT values X (k ),

1 N −1
x (n) = ∑ X (k )e j2πnk/N . (4.12)
N k =0

If the signal within one of its periods, for 0 ≤ n ≤ N − 1, is applied as the


input to the system described by difference equation (4.11) show that the
output signal at n = N − 1 is equal to the DFT of signal at frequency k = k0 ,
i.e.,
y ( N − 1) = X ( k 0 ).

⋆For the signal y(n) holds

y(n) = e j(2πk0 n/N + ϕ) = e j(2πk0 (n−1+1)/N + ϕ)


= e j(2πk0 /N ) y(n − 1).
Consider now the case when the input signal x (n) is applied to the system.
Since the system is linear, consider one component of the input signal (4.12)
1
xk (n) = X (k)e j2πnk/N ,
N
Ljubiša Stanković Digital Signal Processing 189

for an arbitrary 0 ≤ k ≤ N − 1. Then the difference equation for this input


signal reads
yk (n) − e j2πk0 /N yk (n − 1) = xk (n)
Z{ xk (n)}
Yk (z) = . (4.13)
1 − e j2πk0 /N z−1
The z-transform of xk (n), for 0 ≤ n ≤ N − 1, is
1
Z{ xk (n)} = Z{ X (k )e j2πnk/N } (4.14)
N
1 N −1 1 1 − e j2πk z− N
= X (k) ∑ e j2πnk/N z−n = X (k) .
N n =0 N 1 − e j2πk/N z−1
The transform Z{ xk (n)}, for a given k, has zeros at
z0N = e j2πk+ j2lπ , l = 0, 1, 2, ...,N − 1
or
z0 = e j2π (k+l )/N , l = 0, 1, 2, ..., N − 1.
Note that the zero
z0 = e j2πk/N , obtained for l = 0
is canceled with the pole z p = e j2πkn/N in (4.14). Therefore the remaining
zeros are at
z0 = e j2π (k+l )/N , l = 1, 2, ...,N − 1
The output z-transform Yk (z), defined by (4.13), has a pole at
z p = e j2πk0 /N

- If k ̸= k0 then one of zeros z0 = e j2π (k+l )/N , l = 1, 2,...,N − 1 will coincide


with the pole z p = e j2πk0 /N and will cancel it. Thus for k ̸= k0 the function
Yk (z) will not have any poles. Then
O
1
y k ( N − 1) = z N −2 Yk (z)dz = 0 (4.15)
2πj
C
since there are no poles, Fig.4.5.
- If k = k0 then the pole at k = k0 is already canceled in Z{ xk (n)}
and z p = e j2πk0 /N remains as a pole of Y (z). In this case the signal value
at n = N − 1 is equal to the residuum of function in (4.15) at the pole
z p = e j2πk0 /N , relation (4.5),
'
'
yk0 ( N − 1) = z N −2 Yk0 (z)(z − e j2πk0 /N )' j2πk /N
' z=e
0

1 1 − e j2πk0 z− N '
'
= z N −1 X ( k 0 ) '
N 1 − e j2πk0 /N z−1 ' j2πk0 /N
z=e
1 z N − e j2πk0
= X (k0 ) lim j2πk0 /N
= X ( k 0 ).
N z→e j2πk0 /N z − e
190 z-Transform

j2π k n/N -1 j2π k n/N -1


Z {xk(n)} 1/(1-e 0 z ), k≠ k0 1/(1-e 0 z ), k=k0

z=ej2πk/N z=e
j2πk/N
k0=k
Im{z}

Im{z}

Im{z}
z=ej2πk0/N
k0≠ k
Re{z} Re{z} Re{z}

Figure 4.5 Zeros and the pole in Z{ xk (n)} (left), the pole in 1/ (1 − e j2πk0 n/N z−1 ) for k ̸= k0
(middle), and the pole in 1/ (1 − e j2πk0 n/N z−1 ) for k = k0 (right). Illustration is for N = 16.

Therefore the output of the system , at n = N − 1, is

y k ( N − 1) = X ( k ) δ ( k − k 0 ).

Note: The difference relation

y(n) − e j2πk0 n/N y(n − 1) = x (n) (4.16)

with the z-transform domain form


X (z)
Y (z) =
1 − e j2πk0 n/N z−1
is often extended to

X (z) 1 − e− j2πk0 n/N z−1


Y (z) =
1 − e j2πk0 n/N z−1 1 − e− j2πk0 n/N z−1
1 − e− j2πk0 n/N z−1
Y (z) = X (z)
1 − 2 cos(2πk0 n/N )z−1 + z−2

In the discrete-time domain the system

y(n) − 2 cos(2πk0 /N )y(n − 1) + y(n − 2) = x (n) − e− j2πk0 n/N x (n − 1)


(4.17)
is called Goertzel algorithm for the DFT calculation at a given single fre-
quency X (k0 ).
It is interesting to note that the computation of (4.17) is more efficient
than the computation of (4.16). For the calculation of (4.16), for one k0 , we
need one complex multiplication (4 real multiplications) and one complex
addition (2 real additions). For N instants and one k0 we need 4N real
multiplications and 2N real additions. For the calculation of (4.17)we can use
Ljubiša Stanković Digital Signal Processing 191

linear property and calculate only

y1 (n) − 2 cos(2πk0 /N )y1 (n − 1) + y1 (n − 2) = x (n) (4.18)

at each instant. It requires a multiplication of complex signal with a real


coefficient. It means 2 real multiplications for each instant or 2N in total for
N instants. The resulting output, at the instant N − 1, is

y( N − 1) = T { x ( N − 1)} − e− j2πk0 ( N −1)/N T { x ( N − 1)}


= y1 ( N ) − e j2πk0 y1 ( N − 1).

It requires just one additional complex multiplication for the last instant
and for one frequency. The total number of multiplications is 2N + 4. It
is reduced with respect to the previously needed 4N real multiplications.
The total number of additions is 4N + 2. It is increased. However the time
needed for a multiplication is much longer than the time needed for an
addition. Thus, the overall efficiency is improved. The efficiency is even more
improved having in mind that (4.18) is the same for calculation of X (k0 ) and
X (−k0 ) = X ( N − k0 ).

4.6 RELATION OF THE Z-TRANSFORM TO OTHER TRANSFORMS

By sampling a signal x (t), the Laplace transform integral can be approxi-


mated by a sum

"∞ ∞ ∞
X (s) = x (t)e−st dt ∼
= ∑ x (n∆t)e−sn∆t ∆t = ∑ x (n)e−sn∆t
−∞ n=−∞ n=−∞

with x (n) = x (n∆t)∆t. Comparing this relation with the z-transform defini-
tion we can conclude that the Laplace transform of x (t) corresponds to the
z-transform of its samples with

z = exp(s∆t),

that is,
X (s) ↔ X (z)|z=exp(s∆t) . (4.19)
A point s = σ + jΩ from the Laplace domain maps into the point
z = re jω with r = eσ∆t and ω = Ω∆t. Points from the left half-plane in the
s domain, σ < 0, map to the interior of unit circle in the z domain, r < 1.
192 z-Transform

According to the sampling theorem, for the Laplace transform of


discrete-time signal holds X (s)|σ=0 = X ( jΩ) = X ( j(Ω + 2kπ/∆t)).
The Fourier transform of a discrete-time signal is

X (e jω ) = X (z)|z=e jω = ∑ x (n)z−n jω .
n=−∞
|z=e

Example 4.14. A causal discrete-time signal x (n) has the Fourier transform X (e jω ).
Write its z-transform in terms of the Fourier transform of the discrete-time
signal, i.e., write the z-transform value based on its values on the unit circle.
⋆The signal can be expressed in term of its Fourier transform as

1
x (n) = X (e jω )e jωn dω

−π
∞ "π ∞
−n 1
X (z) = ∑ x (n)z =

X (e jω ) ∑ e jωn z−n dω
n =0 −π n =0


1 X (e jω )
= dω,
2π 1 − e jω z−1
−π

for |z| > 1.

The DFT of discrete-time signal with N nonzero samples is

N −1
X (k ) = X (e jω )|ω =2πk/N = X (z)|z=e j2πk/N = ∑ x (n)z−n j2πk/N .
n =0
|z=e

Example 4.15. Consider a discrete-time signal with N samples different from zero
within 0 ≤ n ≤ N − 1. Show that all values of X (z), for any z, can be calculated
based on its N samples on the unit circle in the z-plane.
⋆If the signal has N nonzero samples, then it can be expressed in term
of its DFT as
N −1
1 N −1
∑ x (n)e− j2πnk/N and x (n) = X (k )e j2πnk/N .
N k∑
X (k ) =
n =0 =0

Thus, the z-transform of x (n), using only the values of the IDFT where the
original signal is nonzero, 0 ≤ n ≤ N − 1,

1 N −1 N −1 1 N −1 1 − z− N e j2πk
∑ ∑ X (k )e j2πnk/N z−n =
N k∑
X (z) = −1 j2πk/N
X (k)
N k =0 n =0 =0 1 − z e
Ljubiša Stanković Digital Signal Processing 193

N=16
jω j2π k/16
z=e z=e

π/Δt
Im{s}=Ω

Im{z}

Im{z}
0

- π/Δt

Re{s}=σ Re{z} Re{z}

Figure 4.6 Illustration of the z-transform relation with the Laplace transform (left), the Fourier
transform of discrete signals (middle), and the DFT (right).

with X (k ) = X (z) at z = exp( j2πk/N ), k = 0, 1, 2, ..., N − 1.


For a periodic signal, including all periods in the z-transform calcula-
tion, holds
1 N −1 ∞ 1 N −1 1
∑ ∑ X (k )e j2πnk/N z−n =
N k∑
X (z) = −1 e j2πk/N
X ( k ).
N k =0 n =0 =0 1 − z

4.7 PROBLEMS

Problem 4.1. Find the z-transform and the region of convergence for the
following signals:
(a) x (n) = δ(n − 2),
(b) x (n) = a|n| u(n),
(c) x (n) = 21n u(n) + 31n u(n)
Problem 4.2. Find the z-transform and the region of convergence for the
following signals:
(a) x (n) = δ(n + 1) + δ(n) + δ(n − 1),
(b) x (n) = 21n [u(n) − u(n − 10)].
Problem 4.3. Using the z-transfrom property that

dX (z)
Y (z) = −z
dz
corresponds to
y(n) = nx (n)u(n)
194 z-Transform

in the discrete-time domain, with the same region of convergence for X (z)
and Y (z), find a causal signal whose z-transform is
(a) X (z) = e a/z , |z| > 0.
(b) X (z) = ln(1 + az−1 ), |z| > | a|.
Problem 4.4. (a) How the z-transform of x (−n) is related to the z-transform
of x (n)?
(b) If the signal x (n) is real-valued show that its z-transfrom satisfies
X ( z ) = X ∗ ( z ∗ ).
Problem 4.5. If X (z) is the z-transform of a signal x (n) find the z-transform
of

y(n) = ∑ x ( k ) x ( n + k ).
k =−∞

Problem 4.6. Find the inverse z-transform of


1 2
X (z) = , |z| > .
2 − 3z 3
Problem 4.7. The z-transform of a causal signal x (n) is

z+1
X (z) = .
(2z − 1)(3z + 2)

Find the signal x (n).


Problem 4.8. The transfer function of a discrete system is

3 − 56 z−1
H (z) = .
(1 − 14 z−1 )(1 − 13 z−1 )

Find the impulse response if:


(a) System is stable,
1
(b) Region of convergence is 4 < |z| < 13 ,
(c) System is anticausal.
Problem 4.9. For the z-transform
1
H (z) = √
3
(1 − 4z)( 14 − 2
2 z+z )

identify possible regions of convergence. In each case comment stability and


causality of the system whose transfer function is H (z). What is the output
of the stable system to the input x (n) = 2 cos(nπ/2)?
Ljubiša Stanković Digital Signal Processing 195

Problem 4.10. Find the impulse response of a causal system whose transfer
function is
z+2
H (z) = .
( z − 2) z2
Problem 4.11. Find the inverse z-transform of

z2
X (z) = .
z2 + 1

Problem 4.12. The system is described by a difference equation

5 1 5 3
y ( n ) − y ( n − 1) + y(n − 2) − y(n − 3) = 3x (n) − x (n − 1) + x (n − 2).
16 16 4 16

Find the impulse response of a causal system.

Problem 4.13. Show that the system defined by

3 1
y ( n ) = x ( n ) − x ( n − 1) + x ( n − 2)
4 8

has a finite output duration for an infinite duration input x (n) = 1/4n u(n) .

Problem 4.14. A linear time-invariant system has impulse response

h(n) = 1/3n u(n).

Using the z-transform find the output to the input signal x (n) = u(n) −
u ( n − 6) .

Problem 4.15. Find the output of a causal discrete system

11 1 3
y(n) − y(n − 1) + y(n − 2) = 2x (n) − x (n − 1)
6 2 2

if the input signal is x (n) = δ(n) − 32 δ(n − 1).

Problem 4.16. Solve the difference equation using the z-transform

x (n + 2) + 3x (n + 1) + 2x (n) = 0

with the initial condition x (0) = 0 and x (1) = 1. Signal x (n) is causal.
196 z-Transform

Problem 4.17. Solve the difference equation

x ( n + 1) = x ( n ) + a n

using the z-transform with the initial condition x (0) = 0.


Problem 4.18. Find the output of a causal discrete system

2 1
y(n) − y ( n − 1) + y ( n − 2) = x ( n ) (4.20)
2 4

to the input signal x (n) = 31n u(n) by a direct solution of the differential
equation in the discrete-time domain and by using the z-transform. The
initial conditions are y(n) = 0 for n < 0.
Problem 4.19. The first backward difference is defined as

∇ x ( n ) = x ( n ) − x ( n − 1 ),

and the mth backward difference is defined by

∇ m x ( n ) = ∇ m −1 x ( n ) − ∇ m −1 x ( n − 1 ).

The first forward difference is

∆x (n) = x (n + 1) − x (n),

with the mth forward difference being

∆ m x ( n ) = ∆ m −1 x ( n + 1 ) − ∆ m −1 x ( n ).

Find the z-transforms of these differences.


Problem 4.20. Based on the poles-zero geometry plot the amplitude of the
frequency response of system
√ √
y(n) = x (n) − 2x (n − 1) + x (n − 2) + r 2y(n − 1) − r2 y(n − 2)

for r = 0.99. Based on the frequency response, find approximative values of


the output signal if the input is a continuous-time signal

x (t) = 2 cos(10πt) − sin(15πt) + 0.5e j20πt

sampled at ∆t = 1/60.
Ljubiša Stanković Digital Signal Processing 197

Problem 4.21. Plot the frequency response of the discrete system (comb
filter)
1 − z− N
H (z) =
1 − rz− N
with r = 0.9999 and r 1/N ∼
= 1. Show that this system has the same transfer
function as

(1 − z−2 ) N/2−1 1 − 2 cos(2kπ/N )z−1 + z−2


(1 − r2 z−2 ) k∏
H (z) = −1 + z −2
.
=1 1 − 2r cos(2kπ/N )z

4.8 SOLUTIONS

Solution 4.1. (a) The z-transform is



X (z) = ∑ δ ( n − 2 ) z − n = z −2
n=−∞

for any z ̸= 0.
(b) For this signal
∞ −1 ∞
(1 − a 2 ) z
X (z) = ∑ a|n| z−n = ∑ a−n z−n + ∑ an z−n = (1 − az)(z − a)
n=−∞ n=−∞ n =0

for |z| < 1/a and |z| > a. If | a| < 1 then the region of convergence is
a < |z| < 1/a.
(c) In this case
∞ ∞
1 −n 1 1 1
X (z) = ∑ n
z + ∑ n z−n = 1 −1
+ 1 −1
n =0 2 n =0 3 1 − 2 z 1 − 3z
2 − 56 z−1 z(2z − 56 )
X (z) = =
(1 − 12 z−1 )(1 − 13 z−1 ) (z − 12 )(z − 13 )

for |z| > 1/2 and |z| > 1/3. The region of convergence is |z| > 1/2.
Solution 4.2. (a) The z-transform is

X (z) = ∑ (δ(n + 1) + δ(n) + δ(n − 1)) z−n =
n=−∞
1
= z + 1 + z −1 = z + 1 + .
z
198 z-Transform

pole-zero cancellation at z=1/2

j2π/10
z=e /2
Im{z}

z=1/2

Re{z}

Figure 4.7 Pole-zero cancellation at z = 1/2.

The region of convergence excludes z = 0 and z −→ ∞.


(b) For x (n) = 21n [u(n) − u(n − 10)] we know that
!
1, n = 0, 1, ..., 9
u(n) − u(n − 10) =
0, elsewhere.

The z-transform is
∞ 9 9
1 −n −n 1 − (2z)−10
X (z) = ∑ x (n )z−n = ∑ z = ∑ ( 2z ) = =
n=−∞ n =0 2
n
n =0 1 − (2z)−1
z−10 z10 − ( 12 )10 z10 − ( 12 )10
= =
z −1 z − 12 z9 (z − 12 )

The expression for X (z) is written in this way in order to find the region of
convergence, observing the zero-pole locations in the z-plane, Fig.4.7. Poles
are at z p1 = 0 and z p2 = 1/2. Zeros are z0i = e j2iπ/10 /2, Fig.4.7. Since the z-
transform has a zero at z0 = 1/2, it will cancel out the pole z p2 = 1/2. The
resulting region of convergence will include the whole z plane, except the
point at z = 0.
Solution 4.3. (a) For X (z) = e a/z holds

dX (z) a a
−z = z 2 e a/z = X (z)
dz z z
Ljubiša Stanković Digital Signal Processing 199

The inverse z-transform of left and right side of this equation is

nx (n)u(n) = ax (n − 1)u(n)

dX (z)
since Z [nx (n)] = −z dz and z−1 X (z) = Z [ x (n − 1)]. It means that

a
x (n) = x ( n − 1)
n

for n > 0. According to the initial value theorem

x (0) = lim X (z) = 1.


z→∞

It means that
a2 a3
x (1) = a, x (2) = , x (3 ) = ,...
2 2·3
or
an
x (n) = u ( n ).
n!
(b) For X (z) = ln(1 + az−1 )

dX (z) d(ln(1 + az−1 )) az−2 az−1


Y (z) = −z = −z =z = .
dz dz 1 + az−1 1 + az−1

Therefore
dX (z) az−1
Z [nx (n)] = −z =
dz 1 + az−1
nx (n) = a(− a)n−1 u(n − 1),
producing
−(− a)n
x (n) = u ( n − 1 ).
n
Solution 4.4. (a) The z-transform of signal x (−n) is


X1 ( z ) = ∑ x (−n)z−n .
n=−∞

With a substitution −n = m it follows



X1 ( z ) = ∑ x (n)zm = X (1/z).
m=−∞
200 z-Transform

The region of convergence is complementary to the one of the original


signal. If the region of convergence for x (n) is |z| > a, then the region of
convergence for x (−n) is |z| < a .
(b) For a real-valued signal holds x ∗ (n) = x (n). Then we can write
∗ ∗
X (z ) as
∞ P Q∗
X ∗ (z∗ ) = ∑ x ∗ (n ) (z∗ )−n .
n=−∞

Since (z∗ )−n = ( z−n )∗ we get


∞ ∞
X ∗ (z∗ ) = ∑ x ∗ (n )z−n = ∑ x ( n ) z − n = X ( z ),
n=−∞ n=−∞

for a real-valued signal x (n).


Solution 4.5. From
∞ ∞ ∞
Y (z) = ∑ y (n )z−n = ∑ ∑ x (k ) x (n + k )z−n ,
n=−∞ n=−∞ k=−∞

using the substitution n + k = m, follows

1
Y ( z ) = X ( z ) X ( ).
z
Solution 4.6. A direct expansion of the given transform into power series,
within the region of convergence, will be used. In order to find the signal
x (n) whose z-transform is X (z) = 2−13z , it should be written in a form of
' '
power series with respect to z−1 . Since the condition ' 3z '
2 < 1 does not
correspond to the region of convergence given in the problem formulation
we have to rewrite X (z) as

1 1
X (z) = − 2
.
3z 1 − 3z
'2'
Now the condition ' 3z ' < 1, that is |z| > 2 , corresponds to the problem for-
3
mulation region of convergence. In order to obtain the inverse z-transform,
write
1 1 1
X (z) = − 2
= − X1 ( z ) ,
3z 1 − 3z 3z
where
1
X1 ( z ) = 2
.
1 − 3z
Ljubiša Stanković Digital Signal Processing 201

For X1 (z) holds

∞ * +n ∞ * +n
2 2
X1 ( z ) = ∑ = ∑ z−n .
n =0 3z n =0 3

It can be concluded that X (z) can be written as


* +
1 ∞ 2 n −n
3z n∑
X (z) = − z .
=0 3

Comparing the z-transform definition


X (z) = ∑ x (n ) z−n (4.21)
n=−∞

and the last expression it follows


* +
1 ∞ 2 n − n −1
3 n∑
X (z) = − z z =
=0 3
* +
1 ∞ 2 n −(n+1)
=− ∑ z .
3 n =0 3

With the substitution n → n + 1 we get


* +
1 ∞ 2 n −1 − n
X (z) = − ∑ z .
3 n =1 3

Finally, comparing this result with (4.21) we get


⎧ P Q n −1
⎨ − 13 23 , for n = 1, 2, ..., ∞
x (n) = ,

0 , elsewhere,

or
* + n −1
1 2
x (n) = − u ( n − 1 ).
3 3
Solution 4.7. Since the signal is causal the region of convergence is outside
the pole with the largest radius (outside the circle passing through this pole).
202 z-Transform

Poles of the z-transform are


1 2
z p1 = and z p2 = − .
2 3
The region of convergence is |z| > 23 .
The z-transform is
z+1 A B
X (z) = = +
(2z − 1)(3z + 2) 2z − 1 3z + 2
3 1
A= , B=− .
7 7
The terms in X (z) should be written in such a way that they represent sums
of geometric series for the given region of convergence. From the solution
of the previous problem, we conclude that
A 1 B 1
X (z) = 1
+ 2
.
2z 1 − 2z 3z 1 + 3z

Now we can write


* + * +
A 1 A ∞ 1 n −n A ∞ 1 n − n −1 1
2z n∑ 2 n∑
1
= z = z , |z| >
2z 1 − 2z =0 2 =0 2 2

and
* + * +
B 1 B ∞ 2 n −n B ∞ 2 n − n −1 2
3z n∑
2
= − z = ∑ − z , |z| > .
3z 1 + 3z =0 3 3 n =0 3 3

The z-transform, with m = n + 1, assumes the form


* + * +
A ∞ 1 m −1 − m B ∞ 2 m −1 − m
2 m∑ 3 m∑
X (z) = z + − z .
=1 2 =1 3

Replacing the values for A and B it follows


* + * +
3 ∞ 1 m −m 1 ∞ 2 m −m
X (z) = ∑
14 m∑
z + − z .
7 m =1 2 =1 3

The signal x (n) is obtained by comparing this transform with the z-


transform definition,
* * +n * + +
3 1 1 2 n
x (n) = + − u ( n − 1 ).
7 2 14 3
Ljubiša Stanković Digital Signal Processing 203

Solution 4.8. The transfer function may be written as

3 − 56 z−1 A B
H (z) = 1 −1 1 −1
= 1 −1
+
(1 − 4 z )(1 − 3 z ) 1− 4z 1 − 13 z−1
with A = 1, B = 2.

(a) The region of convergence must contain |z| = 1, for a stable system. It is
|z| > 13 .
From

1 2
H (z) = + =
1 − 14 z−1 1 − 13 z−1
∞ * +n ∞ * +n
1 −n 1 1 1
= ∑ z +2 ∑ z−n , |z| > and |z| >
n =0
4 n =0
3 3 4

the impulse response is obtained as

h ( n ) = ( 4− n + 2 × 3− n ) u ( n ).

(b) The region of convergence is 14 < |z| < 13 . The first term in H (z) is the
same as in (a), since it converges for |z| > 14 . It corresponds to the signal
4−n u(n). The second term must be rewritten in such a way that its geometric
series converges for |z| < 13 . Then

∞ −1
2 3z 1
1 −1
= −2 = −2 ∑ (3z)n = −2 ∑ (3z)−m with |z| < .
1− 3z
1 − 3z n =1
m=−n
m=−∞ 3

Signal corresponding to this z-transform is −2 × 3−n u(−n − 1). Then the


impulse response of the system with the region of convergence 14 < |z| < 13
is obtained in the form

h(n) = 4−n u(n) − 2 × 3−n u(−n − 1).

c) For an anticausal system the region of convergence is |z| < 14 . Now the
second term in H (z) is the same as in (b). For |z| < 14 the first term in H (z)
should be written as:
∞ −1
1 4z 1
=− = − ∑ (4z)n = − ∑ (4z)−m with |z| < .
1 − 14 z−1 1 − 4z n =1
m=−n
m=−∞ 4
204 z-Transform

The signal corresponding to this term is −4−n u(−n − 1). The impulse
response of the anticausal discrete system with given transfer function is

h(n) = −4−n u(−n − 1) − 2 × 3−n u(−n − 1).

Solution 4.9. The z-transform


1
H (z) = √
3
(1 − 4z)( 14 − 2
2 z+z )

can be written as
1
H (z) = √ √
3 3
(1 − 4z)(z − 4 + j 14 )(z − 4 − j 14 )
√ √
with poles z1 = 1/4, z2 = 43 − j 14 , and z3 = 43 + j 14 . Since |z2 | = |z3 | = 1/2
possible regions of convergence are: 1) |z| < 1/4, 2) 1/4 < |z| < 1/2, and 3)
|z| > 1/2. In the first two cases the system is neither causal nor stable, while
in the third case the system is causal and stable since |z| = 1 and |z| → ∞
belong to the region of convergence.
The output to x (n) = 2 cos(nπ/2) = 1 + cos(nπ ) = 1 + (−1)n is y(n) =
H (e )|ω =0 × 1 + H (e jω )|ω =π × (−1)n = H (z)|z=1 + H (z)|z=−1 (−1)n =

−0.8681 + 0.0945(−1)n .
Solution 4.10. The transfer function can be written as
z+2 A B C
H (z) = = + + 2.
z2 ( z − 2) z−2 z z

Multiplying both sides by z2 (z − 2) yields

Az2 + Bz(z − 2) + C (z − 2) = z + 2
( A + B)z2 + (−2B + C ) − 2C = z + 2.

The coefficients follow from

A+B=0
−2B + C = 1
−2C = 2,

as A = 1, B = −1, and C = −1. The transfer function is

z −1 1 1
H (z) = − 1
− 2− .
1 − 2z z z
Ljubiša Stanković Digital Signal Processing 205

The region of convergence for a causal system is |z| > 2. The inverse z-
transform for a causal system is the system impulse response

h ( n ) = 2n −1 u ( n − 1 ) − δ ( n − 2 ) − δ ( n − 1 ) = δ ( n − 2 ) + 2n −1 u ( n − 3 ).

The system is not stable.


Solution 4.11. The z-transform X (z) can be written in the form
1 1
z2 2z 2z
X (z) = 2
= + .
z +1 z+j z−j

For the region of convergence defined by |z| > 1 the signal is causal and
1 1
x (n) = [1 + (−1)n ] jn u(n) = [1 + (−1)n ]e jπn/2 u(n).
2 2
For n = 4k, where k ≥ 0 is an integer, x (n) = 1 , while for n = 4k + 2 the
signal values are x (n) = −1. For other n the signal is x (n) = 0.
For |z| < 1 the inverse z-transform is
1
x (n) = − [1 + (−1)n ] jn u(−n − 1).
2
Solution 4.12. The transfer function of this system is

3 − 54 z−1 + 3 −2
16 z 3 − 54 z−1 + 3 −2
16 z
H (z) = 5 −2 1 −3
=
1 − z −1 + 16 z − 32 z (1 − 12 z−1 + 1 −2 1 −1
16 z )(1 − 2 z )
1 1 1
= 1 −1
+B C2 + .
1 − 4z 1 − 14 z−1 (1 − 12 z−1 )

For a causal system the region of convergence is outside of the pole z = 1/2,
that is |z| > 1/2. Since
* +'
1 d z '
B C2 = '
da 1 − az − 1 '
1 − 14 z−1 a=1/4
' '
d ∞ n −(n−1) '' ∞ '
n−1 −(n−1) '

1
= ∑ a z ' = ∑ na z ' = ∑ ( n + 1) n z − n ,
da n=0 ' n =0
' n =0
4
a=1/4 a=1/4

the inverse z-transform is


1 1 1
h(n) = n
u ( n ) + ( n + 1 ) n u ( n ) + n u ( n ).
4 4 2
206 z-Transform

Solution 4.13. The transfer function of the system defined by

3 1
y ( n ) = x ( n ) − x ( n − 1) + x ( n − 2)
4 8
is
3 1
H ( z ) = 1 − z −1 + z −2 .
4 8
The z-transform of the input signal x (n) = 1/4n u(n) is

1
X (z) = ,
1 − 14 z−1

with the region of convergence |z| > 1/4. The output signal z-transform is

(1 − 12 z−1 )(1 − 14 z−1 ) 1


Y (z) = H (z) X (z) = 1 −1
= 1 − z −1 .
(1 − 4 z ) 2

Its inverse is a finite duration output signal

y(n) = δ(n) − δ(n − 1)/2.

Solution 4.14. The system transfer function is

1
H (z) =
1 − 13 z−1

and the input signal z-transform is

1 − z −6
X ( z ) = 1 + z −1 + z −2 + z −3 + z −4 + z −5 = .
1 − z −1
The z-transform of the output signal is

1 − z −6
Y (z) = = Y1 (z) − Y1 (z)z−6
(1 − z−1 )(1 − 1/3z−1 )

with
1 3/2 1/2
Y1 (z) = = − .
(1 − z−1 )(1 − 1/3z−1 ) 1 − z−1 1 − 13 z−1
Its inverse is - * +n .
3 1 1
y1 ( n ) = − u ( n ).
2 2 3
Ljubiša Stanković Digital Signal Processing 207

Im{z}

Im{z}

Im{z}
1/3 1/3
3/2 3/2 3/2

Re{z} Re{z} Re{z}

Figure 4.8 Poles and zeros of the system (left), input signal z-transform (middle), and the
z-transform of the output signal (right).

Thus the system output is


- * +n . > * + ?
3 1 1 3 1 1 n −6
y(n) = − u(n) − − u ( n − 6).
2 2 3 2 2 3

Solution 4.15. The transfer function is obtained from


11 −1 1 −2 3
Y (z)(1 − z + z ) = X (z)(2 − z−1 )
6 2 2
as
2 − 32 z−1
H (z) = 11 −1
.
1− 6 z + 12 z−2
The poles are at z p1 = 1/3 and z p2 = 3/2 with the region of convergence
|z| > 3/2. It means that the system is not stable, Fig.4.8.
The z-transform of the input signal is
3
X (z) = 1 − z−1 for |z| > 0.
2
The output signal transform is
* +
2 − 32 z−1 3 2 − 32 z−1
Y (z) = 11 −1
1 − z −1 = .
1− 6 z + 12 z−2 2 1 − 13 z−1

The output signal transform does not have a pole z = 3/2 since this pole is
canceled out. The output signal is

1 3 1
y(n) = u(n) − u ( n − 1).
3 n 2 3n −1
208 z-Transform

Solution 4.16. The z-transform of signal x (n + 2) is

X2 (z) = z2 X (z) − z2 x (0) − zx (1)

while for x (n + 1) the transform is

X1 (z) = zX (z) − zx (0).

The z-transform domain form is

z2 X (z) − z2 x (0) − zx (1) + 3zX (z) − 3zx (0) + 2X (z) = 0

with
z 1 1
X (z) = = − .
z2 + 3z + 2 1 + z −1 1 + 2z−1
The inverse z-transform of X (z) is

x (n) = [(−1)n − (−2)n ]u(n).

Solution 4.17. The z-transforms of the left and right side of the equation are
z
zX (z) − zx (0) = X (z) +
z−a
- .
z 1 1 a
X (z) = = − .
(z − a)(z − 1) 1 − a z − 1 z − a
The inverse z-transform is
1 1 − an
x (n) = [u(n − 1) − an u(n − 1)] = u ( n − 1)
1−a 1−a
or
n −1
x (n) = ∑ ak , n > 0.
k =0

Solution 4.18. For a direct solution in the discrete-time domain we assume


a solution of the homogenous part of the equation

2 1
y(n) − y ( n − 1) + y ( n − 2) = 0 (4.22)
2 4
in the form yi (n) = Ci λin . The characteristic polynomial is

2 2 1
λ − λ+ =0
2 4
Ljubiša Stanković Digital Signal Processing 209

√ √
2 2
with λ1,2 = 4 ±j 4 . The homogenous solution is
√ √ √ √
2 2 n 2 2 n
yh (n) = C1 ( +j ) + C2 ( −j )
4 4 4 4
1 1
= C1 n e jnπ/4 + C2 n e− jnπ/4 .
2 2

A particular solution is of the input signal x (n) = 31n u(n) form. It is y p (n) =
A 31n u(n). The constant A is obtained by replacing this signal into (4.20)

1 2 1 1 1 1
A n− A + A n −2 = n
3 2 3n −1 4 3 3

3 2 9
A (1 − + ) = 1.
2 4
Its value is A = 0.886. The general solution is

1 jnπ/4 1 1
y(n) = yh (n) + y p (n) = C1 n
e + C2 n e− jnπ/4 + 0.886 n .
2 2 3
Since the system is causal with y(n) = 0 for n < 0 then the constants C1
and

C2 may be obtained from the initial condition following from

y(n) −
2 2
2 y(n − 1) + 14 y(n − 2) = x (n) as y(0) = x (0) = 1 and y(1) = 2 y (0 ) +

x (1) = 22 + 13 ,

C1 + C2 + 0.886 = 1 (4.23)
√ √ √ √ √
2 2 2 2 1 2 1
C1 ( +j )/2 + C2 ( −j )/2 + 0.886 = + ,
2 2 2 2 3 2 3
as C1 = 0.057 − j0.9967 = 0.9984 exp(− j1.5137) = C2∗ . The final solution is

1 1
y(n) = 2 × 0.9984 cos(nπ/4 − 1.5137) + 0.886 n .
2n 3
For the z-domain we write

2 1
Y (z) − Y ( z ) z −1 + Y ( z ) z −2 = X ( z )
2 4
with
1 1
Y (z) = √
1− 2 −1
+ 1 −2 1 − 13 z−1
2 z 4z
210 z-Transform

with
z3
Y (z) = √ √ √ √
2 2 2 2 1
(z − ( 4 +j 4 ))( z − ( 4 −j 4 ))( z − 3 )
Using, for example, the residual value based inversion of the z-transform,
M N
n −1
y (n) = ∑ [

z

Y ( z )( z − z )]
i | z = zi
2 2
z1,2,3 = 4 ± j 4 ,1/3
' '
' '
1 ' '1
= z n +2 √ √ '
' + z n +2 √ √ '
'
2− j 2 1 '√ √ 2+ j 2 1 ' √ √
(z − 4 )(z − 3 ) 2+ j 2 (z − 4 )(z − 3 ) z= 2− j 2
4 4
'
'
1 '
+ z n +2 √ √ √ √ '
'
(z − 2+4 j 2 )(z − 2−4 j 2 ) 'z=1/3

(√ √ ) n +2 (√ √ ) n +2
1 2+j 2 1 1 2−j 2 1
= √ √ √ − √ √ √
j 2 4 2+ j 2
− 1 j 2 4 2− j 2
− 1
2 4 3 2 4 3
1 1
+ √
3n +2 ( 1 − 1 2 + 1 )
9 3 2 4
√ √
1 −j 2 1 j 2 1
= e j(n+2)π/4 √ √ + e− j(n+2)π/4 √ √ + 0.886
2n +2 2+ j 2
− 13 2n +2 − 13 2− j 2 3n
4 4
√ √
1 2 1 2 1
= n e jnπ/4 √ √ 4
+ n e− jnπ/4 √ √ 4
+ 0.886 n
2 2+j 2− 3 2 2−j 2− 3 3
1 1
= 2 × 0.9984 n cos(nπ/4 − 1.5137) + 0.886 n ,
2 3
for n ≥ 1. For n = 0 there is no additional pole at z = 0 the previous result
holds for n ≥ 0.
Solution 4.19. The z-transform of the first backward difference is

Z [∇ x (n)] = Z [ x (n)] − Z [ x (n − 1)] = (1 − z−1 ) X (z).

The second backward difference may be written as

∇2 x (n) = ∇[∇ x (n)] = ∇[ x (n) − x (n − 1)] = ∇ x (n) − ∇ x (n − 1)


= x (n) − 2x (n − 1) + x (n − 2).
Ljubiša Stanković Digital Signal Processing 211

Its z-transform is
Z [∇2 x (n)] = (1 − z−1 )2 X (z).
In the same way we get

Z [∇m x (n)] = (1 − z−1 )m X (z).

The z-transform of the first forward difference is

Z [∆x (n)] = Z [ x (n + 1) − x (n)] = zX (z) − zx (0) − X (z)


= (z − 1) X (z) − zx (0).

The second forward difference is

Z [∆2 x (n)] = x (n + 2) − 2x (n + 1) + x (n)

with the z-transform

Z [∆2 x (n)] = ( z − 1)2 X (z) − z(z − 1) x (0) − z∆x (0).

In a recursive way, the z-transform of the mth forward difference is

m −1
Z [∆m x (n)] = ( z − 1)m X (z) − z ∑ ( z − 1 ) m − j −1 ∆ j x (0 ).
j =0

Solution 4.20. The transfer function of this system is


√ −1 √ √ √ √
1− 2z + z−2 [1 − ( 22 + j 22 )z−1 ][1 − ( 22 − j 22 )z−1 ]
H (z) = √ = √ √ √ √
1 − r 2z−1 + r2 z−2 [1 − r ( 22 + j 22 )z−1 ][1 − r ( 22 − j 22 )z−1 ]
√ √ √ √
2 2 2 2
[z − ( +j )][ z − ( − j 2√ )]
= √2 √2 2√
[z − r ( 22 + j 22 )][z − r ( 22 − j 22 )]
√ √ √ √
The zeros and poles are z01,02 = 22 ± j 22 and z p1,p2 = r 2
2
± jr 2
2 .They are
located as in Fig.4.9.
The amplitude of the frequency response is
' '
' B ' TO1 TO2 TO1 TO2
| H (e jω )| = '' 0 '' = .
A0 TP1 TP2 TP1 TP2

The values of TP1 and TO1 , and TP2 and TO2 , are almost the same for
any ω except ω = ±π/4 where the distance to the transfer function zero is
212 z-Transform

O1
1.5
T
P
1

|H(ejω)|
Im{z}

P
2
0.5
O
2

0
Re{z} -2 - π/4 0 π/4 2 ω

Figure 4.9 Location of zeros and poles for a second order system.

0, while the distance to the corresponding pole is small but finite. Based on
this analysis the amplitude of frequency response is presented in Fig.4.9.
The input discrete-time signal is

x (n) = x (n∆t)n∆t = [2 cos(πn/6) − sin(πn/4) + 0.5e jπn/3 ]/60.

This system will filter out signal components at ω = ±π/4. The output
discrete-time signal is

y(n) = [2 cos(nπ/6) + 0.5e jnπ/3 ]/60.

Corresponding continuous-time output signal is

y(t) = 2 cos(10πt) + 0.5e j20πt .

Solution 4.21. The zeros of the system are

z−
o
N
= 1 = e− j2πm
zom = e j2πm/N , m = 0, 1, ..., N − 1

Similarly, the poles are zmp = r1/N e j2πm/N , m = 0, 1, ..., N − 1. The frequency
response of the comb filter is

N −1 N −1
z − zom z − e j2πm/N
H (z) = ∏ = ∏ 1/N e j2πm/N
.
m=0 z − z pm m =0 z − r
Ljubiša Stanković Digital Signal Processing 213

With r = 0.9999 and r1/N ∼


= 1 follows

| H (e jω )| ∼
= 1 for z ̸= e j2πm/N
| H (e jω )| = 0 for z = e j2πm/N .

The same holds for

(1 − z−1 )(1 + z−1 ) N/2−1 1 − 2 cos(2kπ/N )z−1 + z−2


(1 − rz−1 )(1 + rz−1 ) k∏
H (z) = −1 + r 2 z −2
=1 1 − 2r cos(2kπ/N )z

since for 1 ≤ k ≤ N/2 − 1 we can group the terms

(1 − e2kπ/N z−1 )(1 − e2( N −k)π/N z−1 ) 1 − 2 cos(2kπ/N )z−1 + z−2


= .
(1 − re2kπ/N z−1 )(1 − re2( N −k)π/N z−1 ) 1 − 2r cos(2kπ/N )z−1 + r2 z−2

4.9 EXERCISE

Exercise 4.1. Find the z-transform and the region of convergence for the
following signals:
(a) x (n) = δ(n − 3) − δ(n + 3),
(b) x (n) = u(n) − u(n − 20) + 3δ(n),
(c) x (n) = 1/3|n| + 1/2n u(n),
(d) x (n) = 3n u(−n) + 2−n u(n),
(e) x (n) = n(1/3)n u(n).
(f) x (n) = cos(n π2 ).
Exercise 4.2. Find the z-transform and the region of convergence for the
signals:
(a) x (n) = 3n u(n) − (−2)n u(n) + n2 u(n).
(b) x (n) = ∑nk=0 2k 3n−k ,
(c) x (n) = ∑nk=0 3k .
Exercise 4.3. Find the inverse z-transform of:
−8
(a) X (z) = 1z−z + 3, if X (z) is the z-transform of a causal signal x (n).
(b) X (z) = (zz−+22)z2 , if X (z) is the z-transform of a causal signal x (n).
2+3z−2 , if X (z ) is the z-transform of an unlimited-duration
(c) X (z) = 6z
6z2 −5z+1
signal x (n). Find ∑∞ n=−∞ x ( n ) in this case.

Exercise 4.4. Find the inverse z-transforms of:


z5 (5z−3)
(a) X (z) = (3z−1)(2z−4) , if x (n) is causal,
214 z-Transform

(b) Y (z) = X ( 2z ), for a causal signal y(n),


(c) Y (z) = z−2 X (z), for a causal signal y(n).
Exercise 4.5. Find the inverse z-transforms of X (z) = cosh( az) and X (z) =
sinh( az).
Exercise 4.6. If X (z) is the z-transform of a signal x (n), with the region of
convergence |z| > 12 , find the z-transforms for the following signals:
(a) y(n) = x (n) − x (n − 1),

(b) y(n) = ∑ x (n − kN ), where N is an integer,
k=−∞
(c) y(n) = x (n) ∗ x (−n), where ∗ denotes convolution.
d
(d) find the signal whose z-transform is Y (z) = dz X ( z ).
Exercise 4.7. If X (z) is the z-transform of a signal x (n) find the z-transform
of

y(n) = ∑ x ∗ ( n − k ) x ( n + k ).
k=−∞

Exercise 4.8. For the z-transform


(2 − z )
H (z) =
(1 − 4z)(1 − 3z)

identify possible regions of convergence and find the inverse z-transform


for each of them. For each case comment stability and causality. What is the
output of the stable system to x (n) = 1 + (−1)n ?
Exercise 4.9. Find the output of a causal discrete system

3 1
y ( n ) − y ( n − 1) + y ( n − 2 ) = x ( n ). (4.24)
4 8
to the input signal x (n) = nu(n) by:
(a) a direct solution in the time domain.
(b) using the z-transform.
The initial conditions are y(n) = 0 for n < 0, that is y(0) = x (0) = 0 and
y(1) = 3y(0)/4 + x (1) = 1.
Exercise 4.10. A causal discrete system is described by the difference equa-
tion
5 1
y ( n ) − y ( n − 1) + y ( n − 2 ) = x ( n ). (4.25)
6 6
If the input signal is x (n) = 1/4n u(n) find the output signal if the initial
value of the output was y(0) = 2.
Ljubiša Stanković Digital Signal Processing 215

Hint: Since y(0) does not follow from (4.25) obviously the system
output was "preloaded" before the input is applied. This fact can be taken
into account by changing the input signal at n = 0 to produce the initial
output. It is x (n) = 1/4n u(n) + δ(n). Now the initial conditions are y(0) = 2
and y(1) = 5/3 + 1/4 = 23/12 and we can apply the z-transform with this
new input signal.

Exercise 4.11. Solve the difference equation using the z-transform

1
x ( n + 2) − x ( n + 1) + x ( n ) = 0
2

with initial condition x (0) = 0 and x (1) = 1/2. The signal x (n) is causal.

Exercise 4.12. Using the basic trigonometric transformations show that a


real-valued signal y(n) = cos(2πk0 n/N + ϕ) is a solution of the homoge-
neous difference equation

y(n) − 2 cos(2πk0 /N )y(n − 1) + y(n − 2) = 0.

with similar conclusions as in the complex-valued signal case.

Exercise 4.13. For the system

(1 − z−1 )(1 + z−1 ) 3 1 − 2 cos(2kπ/8)z−1 + z−2


(1 − rz−1 )(1 + rz−1 ) k∏
H (z) = −1 + z −2
=1 1 − 2r cos(2kπ/8)z

and r = 0.9999 plot the amplitude of the frequency response and find the
output to the signal

x (n) = cos(nπ/3 + π/4) + sin(nπ/2) + (−1)n .


216 z-Transform
Chapter 5
From Continuous to Discrete Systems

of continuous-time systems into corresponding

T
RANSFORMATION
discrete-time systems is of high importance. Some discrete-time sys-
tems are designed and realized in order to replace or perform as
equivalents of continuous-time systems. It is quite common to design a
continuous-time system with desired properties, since the designing pro-
cedures in this domain are simpler and well developed. In the next step
the obtained continuous-time system is transformed into an appropriate
discrete-time system.
Consider an Nth order linear continuous-time system described by a
differential equation with constant coefficients

d N y(t) dy(t) d M x (t) dx (t)


aN + ... + a1 + a0 y ( t ) = b M + ... + b1 + b0 x (t).
dt N dt dtn dt
The Laplace transform domain equation for this system is

[ a N s N + ... + a1 s + a0 ]Y (s) = [b M s M + ... + b1 s + b0 ] X (s),


assuming zero-valued initial conditions. The topic of this chapter is to find
a corresponding discrete-time system, described by
A0 y(n) + A1 y(n − 1) + ... + A N y(n − N )
= B0 x (n) + B1 x (n − 1) + ... + B M x (n − M).
The z-transform domain form of this system is

[ A0 + A1 z−1 + ... + A N z− N ]Y (z) = [ B0 + B1 z−1 + ... + B M z− M ] X (z).


There are several approaches to establish a relation between continuous-
time and discrete-time systems represented by their impulse responses or
transfer functions.

217
218 From Continuous to Discrete Systems

h(t) h(n) = h(t) Δt


t = nΔt

Δt t n

Figure 5.1 Sampling of the impulse response for the impulse invariance method.

5.1 IMPULSE INVARIANCE METHOD

A natural approach to transform a continuous-time system into a discrete-


time system is based on the relation between the impulse responses of these
systems. Assume that the impulse response of the continuous-time system is
hc (t). The impulse response h(n) of the corresponding discrete-time system,
according to this approach, is equal to the samples of hc (t),

h(n) = hc (n∆t)∆t.

Obviously this relation can be used only if the sampling theorem is satisfied
for the sampling interval ∆t. It means that the frequency response of the
continuous-time system satisfies the condition

H (Ω) = FT{hc (t)} = 0


for |Ω| > Ωm

and ∆t < π/Ωm . Otherwise the discrete-time version will not correspond to
the continuous-time version of the frequency response. Here, the discrete-
time system frequency response is related to a periodically extended form
of the continuous-time system frequency response H (Ω) as

∑ H (Ω + 2kπ/∆t) = H (e jω ), Ω = ω/∆t.
k=−∞

Transfer function of the continuous-time system may be written as

a N s N + ... + a1 s + a0 k1 k2 kM
H (s) = = + + ··· + , (5.1)
b M s M + ... + b1 s + b0 s − s1 s − s2 s − sM
Ljubiša Stanković Digital Signal Processing 219

where only simple poles of the transfer function are assumed. The case of
multiple poles will be discussed later. The inverse Laplace transform of a
causal system, described by the previous transfer function, is

h c ( t ) = k 1 e s1 t u ( t ) + k 2 e s2 t u ( t ) + · · · + k M e s M t u ( t ).

The impulse response of the corresponding discrete-time system is equal to


the the samples of hc (t),

h(n) = hc (n∆t)∆t = [k1 ∆tes1 n∆t u(n) + k2 ∆tes2 n∆t u(n) + ... + k M ∆tes M n∆t u(n)],

since u(n∆t) = u(n). The z-transform of the impulse response h(n) of the
discrete-time system is

k1 ∆t k2 ∆t k M ∆t
H (z) = −
+ −
+ ··· + . (5.2)
1−e s 1 ∆t z 1 1−e s 2 ∆t z 1 1 − es M ∆t z−1

By comparing (5.1) and (5.2) it can be concluded that the terms in the
transfer functions are transformed from the continuous-time to the discrete-
time case as
ki k i ∆t
→ . (5.3)
s − si 1 − esi ∆t z−1
If a multiple pole, of an (m + 1)th order, exists in the continuous-time
system transfer function then it holds

ki 1 dm k i
= .
( s − si ) m + 1 m! dsim s − si

A term in the discrete-time system, corresponding to this continuous-time


system term, is
! 6
1 dm k i 1 dm k i ∆t
m → . (5.4)
m! dsi s − si m! dsim 1 − esi ∆t z−1

In the impulse invariance method the poles are mapped according to

si → esi ∆t .

This mapping relation does not hold for zeros, Fig.5.2.


In the case when the continuous-time impulse response hc (t) has a
discontinuity at t = 0, i.e., when hc (t)|t=−0 ̸= hc (t)|t=+0 then the previous
220 From Continuous to Discrete Systems

s=jΩ
j2π/Δt

jπ/Δt jω
z=e

Im{z}
Im{s}

-j π/Δt

-j2 π/Δt

Re{s} Re{z}

Figure 5.2 Illustration of the impulse invariance method mapping.

forms assume that the discrete-time impulse response h(n) = hc (t)|t=+0 . Re-
mind that the theory of Fourier transforms in this case states that the inverse
Fourier transform IFT P { H ( jΩ)} = hc (t) where
Q the signal hc (t) is continuous
and IFT{ H ( jΩ)} = hc (t)|t=−0 + hc (t)|t=+0 /2 at the discontinuity points,
in this case at t = 0. The special case of discontinuity at t = 0 can be easily
detected by mapping H (s) into H (z) and by checking, for a causal system,
is the following relation satisfied

0 = hc (t)|t=−0 = hc (t)|t=+0 = h(n)|n=0 = lim H (z).


z→∞

If limz→∞ H (z) ̸= 0 then a discontinuity existed and we should use

h(0) = lim H (z)/2


z→∞

since hc (t)|t=−0 = 0 and hc (t)|t=+0 ∆t = limz→∞ H (z). The resulting fre-


quency response is
H (z) − lim H (z)/2.
z→∞

Example 5.1. A continuous-time system has a transfer function of the form


3
s+ 2
H (s) = .
s2 + 32 s + 1
2

What is the corresponding discrete-time system according to the impulse


invariance method with ∆t = 1?
Ljubiša Stanković Digital Signal Processing 221

⋆The transfer function should be written as


3
s+ k1 k
H (s) = 2
= + 21
(s + 1)(s + 12 ) s+1 s+ 2

with
k1 = H (s)(s + 1)|s=−1 = −1,
'
1 ''
k2 = H (s)(s + )' = 2.
2 s=−1/2
Thus, we get
−1 2
H (s) = + .
s+1 s + 12
According to (5.3) the discrete-time system is

−1 2
H (z) = + .
1 − e −1 z −1 1 − e−1/2 z−1
Since limz→∞ H (z) = 1 obviously there is a discontinuity in the impulse
response and the resulting transfer function should be corrected as

−1 2
H (z) = + − 1/2.
1 − e −1 z −1 1 − e−1/2 z−1
Impulse and frequency responses of the systems with uncorrected and cor-
rected discontinuity effect are presented in Fig.5.3.

Example 5.2. A continuous-time system has a transfer function of the form


(1 − 3s/2)
H (s) = .
(6s2 + 5s + 1)(s + 1)2

What is the corresponding discrete-time system according to the impulse


invariance method with ∆t = 1?
⋆The transfer function should be written as
1 − 3s/2
H (s) =
6(s + 12 )(s + 13 )(s + 1)2
k1 k2 k3 k
= + + + 4
s+ 1
2 s+ 1
3
( s + 1)2 s + 1

with
k1 = H (s)(s + 1/2)|s=−1/2 = −7,
k2 = 27/8,
222 From Continuous to Discrete Systems

1.5 h (t) 1.5 h (t)


c c
h(n) h(n)
1 1

0.5 0.5

0 0
-5 0 5 10 15 -5 0 5 10 15

4 jω
4 jω
|H(e )| |H(e )|
3 |H(jΩ)| 3 |H(jΩ)|

2 2

1 1

0 0
-2 0 2 -2 0 2

Figure 5.3 Impulse responses of systems in continuous and discrete-time domains (top). Am-
plitude of the frequency response of systems in continuous and discrete-time domains (bot-
tom). System without discontinuity correction (left) and system with discontinuity correction
(right).

'
'
k3 = H (s)(s + 1)2 ' = 5/4.
s=−1
The coefficient k4 follows, for example, from
H (0) = 1 = 2k1 + 3k2 + k3 + k4 ,
as
k4 = 29/8.
Thus, we get
−7 27/8 5/4 29/8
H (s) = 1
+ 1
+ 2
+ .
s+ 2 s+ 3 ( s + 1) s+1
According to (5.3) and (5.4) the discrete-time system is
−7 27/8
H (z) = +
1 − e−1/2 z−1 1 − e−1/3 z−1
'
d 5/4 ' 29/8
+ { } ' +
s
dsi 1 − e i z − 1 ' 1 − e −1 z −1
si =−1
−7z 27z/8 5e−1 z/4 29z/8
= + + + .
z−e − 1/2 z−e − 1/3 ( z − e −1 )2 z − e −1
Ljubiša Stanković Digital Signal Processing 223

s=jΩ


z=e

Im{z}
Im{s}

1
-1 2/32/3 1.9894

Re{s} Re{z}

Figure 5.4 Pole-zero locations in the s-domain and the z-domain using the impulse invariance
method.

Since h(0) = limz→∞ H (z) = 0 there no need to consider possible impulse


response correction due to discontinuity.
Writing the transfer function in the form

0.0341z(z − 1.9894)(z + 0.3259)


H (z) = −
(z − 0.7165) (z − 0.6065) (z − 0.3679)2

we can easily see that the poles are mapped according to s pi → es pi ∆t , Fig.5.4,
while there is no direct correspondence among zeros of the transfer functions.
Impulse responses of continuous-time system and discrete-time system are
presented in Fig.5.5.

5.2 MATCHED Z-TRANSFORM METHOD

The matched z-transform method is based on a discrete-time approximation


of the Laplace transform derived in the previous chapter as

"∞ ∞
X (s) = x (t)e−st dt ∼
= ∑ x (n)e−sn∆t = X (z)|z=es∆t .
−∞ n=−∞

This approximation leads to a relation between the Laplace domain and the
z-domain in the form of
z = es∆t .
224 From Continuous to Discrete Systems

0.3
h (t), h(n)
c
0.2

0.1

-0.1
0 5 10 15 20 25 30 35 40


|H(jΩ)|, |H(e )|
1

0.5

0
-3 -2 -1 0 1 2 3

1
10
20log|H(jΩ)|

0 20log|H(e )|
10

-1
10

-2
10
-3 -2 -1 0 1 2 3

Figure 5.5 Impulse responses of systems in continuous and discrete-time domains (top).
Amplitude of the frequency response of systems in continuous and discrete-time domains
(middle). Amplitude of the frequency response of systems in continuous and discrete-time
domains in logarithmic scale (bottom).

If we use this relation to map all zeros and poles of a continuous system
transfer function

b M s M + ... + b1 s + b0 b (s − s01 )(s − s02 )...(s − s0M )


H (s) = N
= M
a N s + ... + a1 s + a0 a N (s − s p1 )(s − s p2 )...(s − s pN )

into the corresponding z-plane locations

z0i = es0i ∆t
z pi = es pi ∆t ,
Ljubiša Stanković Digital Signal Processing 225

s=jΩ
j2π/Δt

jπ/Δt jω
z=e

Im{z}
Im{s}

-j π/Δt

-j2 π/Δt

Re{s} Re{z}

Figure 5.6 Illustration of the zeros and poles mapping in the matched z−transform method.

the matched z-transform method of the system follows. The discrete-time


system transfer function is

(z − es01 ∆t )(z − es02 ∆t )...(z − es0M ∆t )


H (z) = C .
(z − es p1 ∆t )(z − es p2 ∆t )...(z − es pN ∆t )

Constant C follows from the amplitude condition. For example, it can be


calculated from H (s)|s=0 = H (z)|z=1 .
Example 5.3. For the continuous-time system with a transfer function of the form
1−s
H (s) =
8s2 + 6s + 1
find the corresponding discrete-time system according to the matched z-
transform method and ∆t = 1?
⋆The transfer function of discrete-time system is obtained from
1−s
H (s) = ,
8(s + 12 )(s + 14 )

using the mapping z0i = es0i ∆t and z pi = es pi ∆t , as


z−e
H (z) = k .
8(z − e−1/2 )(z − e−1/4 )

Since H (s)|s=0 = 1 if we want that H (z)|z=e j0 = 1 then k = −1/2.4678 =


−0.4052.
226 From Continuous to Discrete Systems

5.3 DIFFERENTIATION AND INTEGRATION

The first-order backward difference is a common method to approximate


the first-order derivative of a continuous-time signal

dx (t)
y(t) =
dt
∼ n∆t) − x ((n − 1)∆t) .
y(n∆t) =
x (
∆t
The Laplace transform domain of the continuous-time first derivative is

Y (s) = sX (s). (5.5)

In the discrete-time domain, with y(n) = y(n∆t)∆t and x (n) = x (n∆t)∆t,


this derivative approximation results in the first-order linear difference
equation
x ( n ) − x ( n − 1)
y(n) = .
∆t
In the z-transform domain this equation is

1 − z −1
Y (z) = X ( z ). (5.6)
∆t
Based on (5.5) and (5.6) we can conclude that a mapping of the correspond-
ing differentiation operators from the continuous-time to the discrete-time
domain is
1 − z −1
s= . (5.7)
∆t
With a normalized discretization step ∆t = 1 this mapping is of the form

s = 1 − z −1 .

The same result could be obtained by considering a rectangular rule


approximation of a continuous-time integral

"t −∆t
t"
y(t) = x (t)dt ∼
= x (t)dt + x (n∆t)∆t.
−∞ −∞

At an instant t = n∆t, the value of integral can be approximated as

y(n∆t) ∼
= y(n∆t − ∆t) + x (n∆t)∆t.
Ljubiša Stanković Digital Signal Processing 227

In the discrete-time domain this relation reads

y(n) = y(n − 1) + x (n)∆t.

The Laplace and the z-transform domain forms of the previous integral
equations are

1
Y (s) = X (s)
s
∆t
Y (z) = X ( z ).
1 − z −1

The same mapping of the z-plane to the s-plane as in (5.7) follows.


Consider the imaginary axis from the s-plane (the Fourier transform
line). According to (5.7) the mapping, with ∆t = 1, is defined by

1 − s → z −1 . (5.8)

Now we will consider the region that corresponds to the imaginary axis and
the left semi-plane of the s-domain (containing poles of a stable system),
Fig.5.7(left). The aim is to find the corresponding region in the z-domain.
If we start from the s-domain and the region in Fig.5.7(left), the first
mapping is to reverse the s-domain to −s and shift it for +1, as

1 − s → p.

The corresponding domain, after this mapping, is shown in Fig.5.7(middle).


The next step is to map the region from p-domain into the z-domain,
according to (5.8), as
p → z −1 .
By denoting Re{z} = x and Im{z} = y we get that the line Re { p} = 1
in the p−domain, corresponding to the imaginary axis in the s-plane, is
transformed into the z-domain according to

1
Re{ p} = Re{ }
z
1
1 = Re{ }
x + jy
1 x − jy
1 = Re{ }
x + jy x − jy
228 From Continuous to Discrete Systems

s=0+jΩ p=1

z=ejω

Im{p}

Im{z}
Im{s}

-1
1-s → p p→ z

Re{s} Re{p} Re{z}

Figure 5.7 Illustration of the differentiation based mapping of the left s−semi-plane with the
imaginary axis (left), translated and reversed p−domain (middle), and the z−domain (right).

resulting in
x
1=
x2 + y2
or in * +2
1 1
( x − )2 + y2 = . (5.9)
2 2
Therefore, the imaginary axis in the s-plane is mapped onto a circle defined
by (5.9), Fig.5.7(right) in the z-plane. From the mapping relation 1 − s → z−1
it is easy to conclude that the origin s = 0 + j0 maps into z = 1 and that
s = 0 ± j∞ maps into z = ±0, according to 1/ (1 − s) → z.
Mapping of the imaginary axis into z-domain can also be analyzed
from
1 − (re jω )−1 1 − r −1 cos ω r −1
σ + jΩ → = +j sin ω.
∆t ∆t ∆t
For σ = 0 follows

1 − r −1 cos ω = 0 (5.10)
r = cos ω,

with
r −1 tan ω
Ω=sin ω = .
∆t ∆t
Obviously ω = 0 maps to Ω = 0 (with Ω ∼ = ω/∆t for small ω), and ω =
±π/2 maps into Ω → ±∞. Thus, the whole imaginary axis maps onto
−π/2 ≤ ω ≤ π/2. These values of ω could be used within the basic period.
Relation (5.10), with −π/2 ≤ ω ≤ π/2, is a circle defined by (5.9) if we
Ljubiša Stanković Digital Signal Processing 229

, ,
replace r = x2 + y2 and cos ω = x/ x2 + y2 with σ < 0 (semi-plane with
negative real values) being mapped into r < cos ω (interior of unit circle).
Example 5.4. A continuous-time system is described by a differential equation
3 1
y′′ (t) + y′ (t) + y(t) = x (t),
4 8
with zero initial conditions and the transfer function
1
H (s) = .
s + 4 s + 18
2 3

What is the corresponding transfer function of a discrete-time system using


the first-order backward difference approximation with ∆t = 1/2? What is
the solution of the differential equation for x (t) = u(t). Compare it with the
solution of difference equation y(n) with ∆t = 1/8.

P ⋆A discrete-time
Q system transfer function is obtained by replacing
s = 1 − z−1 /∆t in H (s) as
1
H (z) = B C2
1 − z −1 3 1 − z −1 1
∆t + 4 ∆t + 8

(∆t)2
= 2
1 + 34 ∆t + 18 (∆t) − [2 + 34 ∆t]z−1 + z−2
with
y(n) = B0 x (n) + A1 y(n − 1) + A2 y(n − 2)
(∆t)2
B0 = = 0.1778
1 + 34 ∆t + 18 (∆t)2
[2 + 34 ∆t]
A1 = 3 1 2
= 1.6889
1+ 4 ∆t + 8 (∆t )
1
A2 = − = −0.7111,
1 + 34 ∆t + 18 (∆t)2
where ∆t = 1/2. For x (t) = u(t) in the continuous-time case
1
Y (s) = H (s) X (s) =
s(s2 + 34 s + 18 )
8 8 16
= + 1
− 1
s s+ 2 s+ 4
with
y(t) = [8 + 8e−t/2 − 16e−t/4 ]u(t).
The results of the difference equation for y(n) are compared with the exact
solution y(t) in Fig.5.8. The agreement is high. It could be additionally
improved by reducing the sampling interval, for example, to ∆t = 1/8.
230 From Continuous to Discrete Systems

10
y(t), y(n)

0 5 10 15

Figure 5.8 Exact solution of the difference equation y(t) in solid line and the discrete-time
system output y(n) in large dots for ∆t = 1/2 and in small dots for ∆t = 1/8..

5.4 BILINEAR TRANSFORM

In the case of a differentiator based mapping the imaginary axis in the


s−domain, corresponding to the Fourier transform values, has been mapped
onto a circle with radius 1/2 and the center at z = 1/2 in the z−domain. It
does not correspond to the Fourier transform of discrete-time signals posi-
tion in the z−plane, that is along |z| = 1. A transformation that will map the
imaginary axis from the s−domain onto the unit circle in the z−domain is
presented next.
Consider numerical integration by using the trapezoid rule

"t −∆t
t"
x (n∆t) + x ((n − 1)∆t)
y(t) = x (t)dt ∼
= x (t)dt + ∆t
2
−∞ −∞
x ( n ) + x ( n − 1)
y ( n ) = y ( n − 1) + ∆t.
2
In the Laplace and the z-transform domain, these relations have the forms

1
Y (s) = X (s)
s
∆t 1 + z−1
Y (z) = X ( z ).
2 1 − z −1
Ljubiša Stanković Digital Signal Processing 231

Mapping from the s−domain to the z−domain follows as

2 1 − z −1
s→ . (5.11)
∆t 1 + z−1

In the complex analysis this mapping is known as a bilinear transform.


Within the derivatives framework the bilinear transform can be under-
stood as the following derivative approximation. Consider the first-order
backward derivative approximation

y ( n ) = x ( n ) − x ( n − 1 ).

The same signal samples can used for the first-order forward derivative
approximation
y ( n − 1 ) = x ( n ) − x ( n − 1 ).
If we assume that the difference x (n) − x (n − 1) fits better to the mean
of y(n) and y(n − 1) than to any single one of them, then the derivative
approximation by using the difference equation

y ( n ) + y ( n − 1)
= x ( n ) − x ( n − 1 ),
2
produces the bilinear transform.
In order to prove that the imaginary axis in the s−domain corresponds
to the unit circle in the z−domain we may simply replace z = e jω into (5.11)
and obtain

1 − e− jω e jω/2 − e− jω/2 ω
2 −
= 2 jω/2 = 2j tan( ) → s∆t.
1+e jω e + e− jω/2 2

For s = σ + jΩ follows

σ=0
2 ω
Ω= tan( ).
∆t 2

Therefore, the unit circle z = e jω maps onto the imaginary axis σ = 0.


The frequency points ω = 0 and ω = ±π map into Ω = 0 and Ω → ±∞,
respectively. The linearity of frequency mapping Ω → ω is lost. It holds for
small values of ω only

2 ω ω
Ω= tan( ) ∼
= , for |ω | ≪ 1.
∆t 2 ∆t
232 From Continuous to Discrete Systems

From
s∆t
1+ 2
z= s∆t
1− 2
F
(1 + σ∆t 2
2 ) + ( Ω∆t
2 )
2
|z| = F
(1 − σ∆t 2
2 ) + ( Ω∆t
2 )
2

it may easily be concluded that σ < 0 maps into |z| < 1, since 1 + σ∆t
2 <
σ∆t
1 − 2 for σ < 0.
The bilinear transform mapping can be derived by using a series of
complex plane mappings. Since
s∆t
1+ 2 2
z= s∆t
= − 1,
1− 2 1 − s∆t
2

we can write
s∆t
1− → p1 ,
2
1
→ p2 ,
p1
2p2 − 1 → z.

This series of mappings from the s-domain to the z-domain is illustrated in


Fig.5.9, with ∆t = 1. The fact that p1 → p2 maps the line Re{ p1 } = 1 into the
1
B C2
1 2 2 1
circle ( x − 2 ) + y = 2 in p2 -domain is proven in the previous section.
Since the bilinear transform introduces a nonlinear transformation
of the frequency axis from the continuous-time domain to the discrete-
time domain, Ω = ∆t 2
tan( ω2 ), in system design it is necessary to take into
account this nonlinearity. Usually it is done by pre-modifying the projected
important frequency values from the analog domain Ωc → ∆t 2
tan( ω2d ), and
ωd → Ωd ∆t. The frequencies Ωd will, after the bilinear transformation, be
returned to the desired values Ωc = ωc /∆t.
Example 5.5. A continuous-time system
2QΩ1 2QΩ2
H (s) = + 2
s2 + 2Ω1 Qs + Ω21 + Q2 s + 2Ω2 Qs + Ω22 + Q2
is designed to pass the signal
x (t) = A1 cos(Ω1 t + ϕ1 ) + A2 cos(Ω2 t + ϕ2 ).
Ljubiša Stanković Digital Signal Processing 233

s=0+jΩ p=1

Im{p1}
Im{s}

-1
p1 → p2
Re{s} Re{p1}


z=e
Im{p }

Im{z}

1 1
2

Re{p2} 2p2-1 → z
Re{z}

Figure 5.9 Bilinear mapping illustration trough a series of elementary complex plane map-
pings.

and to stop all other possible signal components. The parameters are Q =
0.01, Ω1 = π/4, and Ω2 = 3π/5. The signal is sampled with ∆t = 1 and
the discrete-time signal x (n) is formed. Using the bilinear transform, design
the discrete system that corresponds to the continuous-time system with the
transfer function H (s).
⋆For the beginning just use the bilinear transform relation

1 − z −1
s→2 (5.12)
1 + z −1
and map H (s) to HB (z) without any pre-modification. The result is presented
in the first two subplots of Fig.5.10. The discrete frequencies are shifted since
the bilinear transform (5.12) made a nonlinear frequency mapping from the
234 From Continuous to Discrete Systems

continuous-time to discrete-time domain, according to


ω
Ω = 2 tan( ).
2
Thus, obviously, the system HB (z) is not a system that will filter the corre-
sponding frequencies in x (n) in the same way as H (s) filters x (t).
In order to correct the shift introduced by the bilinear transform map-
ping the continuous-time system should be pre-modified as
2QΩ1d 2QΩ2d
Hd (s) = 2
+ 2
s2 + 2Ω1d Qs + Ω1d + Q 2 s + 2Ω2d Qs + Ω22d + Q2
with
2 Ω ∆t
Ω1d = tan( 1 ) = 0.8284 = 0.2637π
∆t 2
2 Ω2 ∆t
Ω2d = tan( ) = 2.7528 = 0.8762π.
∆t 2
We see that the shift of Ω1 = 0.25π to Ω1d = 0.2637π is small since the bilin-
ear transform frequency mapping for small frequency values is almost linear.
However for Ω2 = 0.6π the shift to Ω2d = 0.8762π is significant due to a high
nonlinearity of mapping in that region. The modified system Hd (s) is pre-
sented in subplot 3 of Fig.5.10. Next, by using the bilinear transform mapping
−z−1 the modified frequencies will map to the desired ones ω = Ω ∆t
s → 2 11+ z −1 1 1
and ω2 = Ω2 ∆t. The obtained discrete-time system transfer function
2QΩ1d
H (z) = B C2 +
1 − z −1 −1
− z + Ω2 + Q2
2 1 + z −1
+ 4Ω1d Q 11+ z −1 1d
2QΩ2d
+B C2
− z −1
2 11+ + 4Ω2d Q 11−
−1
z
+ Ω22d + Q2
z −1 + z −1
0.016569
=B C2
1 − z −1 −1
−z + 0.68641
2 1 + z −1
+ 0.0331375 11+ z −1
0.0551
+B C2
1 − z −1 −1
−z + 7.5778
2 1 + z −1
+ 0.1101 11+ z −1

0.016569(1 + z−1 )2
=
4.65327z−2 − 6.6272z−1 + 4.7195
0.0551(1 + z−1 )2
+
11.4677z 2 + 7.1556z−1 + 11.6879

0.003567(1 + z−1 )2
= −1
(z − 1.0071e j0.25π )(z−1 − 1.0071e− j0.25π )
0.0048(1 + z−1 )2
+
( z −1 − 1.0096e j0.6π )(z−1 − 1.0096e− j0.6π )
Ljubiša Stanković Digital Signal Processing 235

Ω1 Ω2
1
H(s)

s → 2(1-z
0.5

0
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

-1
)/(1+z )
1
HB(z)

-1
0.5

0
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
frequency ω/π or ΩΔt/π

modified H(s) Ω1d=2tan(Ω1Δt/2)/Δt Ω =2tan(Ω Δt/2)/Δt


2d 2
1
H (s)
d

s → 2(1-z
0.5

0
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

-1
)/(1+z )
1
H(z) ω =Ω Δt ω2=Ω2Δt
1 1

-1
0.5

0
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
frequency ω/π or ΩΔt/π

Figure 5.10 Amplitude of the continuous-time system with transfer function H (s) and the
amplitude of the transfer function HB (z) of the discrete-time system obtained by the bilinear
transform (first two subplots). A premodified system to take into account the frequency map-
ping nonlinearity in the bilinear transform Hd (s) and the amplitude of the transfer function
H (z) of the discrete-time system obtained by the bilinear transform of Hd (s) (last two subplots).

is shown in subplot 4 of Fig.5.10.


This is the desired discrete-time system corresponding to the continuous-
time system in subplot 1 of this figure. In calculations the coefficients are
rounded to four decimal places.

Comparison of the mapping methods presented in this section is


summarized in the next table.
236 From Continuous to Discrete Systems

Sampling
Fourier transform
Method theorem
H (s)|s= jΩ → H (z)|z=e jω
condition
Impulse Invariance Yes, Ω = ω/∆t Yes
Matched z-transform No No
First-oder difference No No
tan(ω/2)
Bilinear transform Yes, Ω = ∆t/2 No

5.5 DISCRETE FILTERS DESIGN

5.5.1 Lowpass filters

An ideal discrete lowpass filter is defined by the frequency response


!
jω 1 for |ω | < ωc
H (e ) = .
0 for ωc < |ω | < π

The frequency response is periodic in ω with period 2π.


The implementation of an ideal lowpass filter in the DFT domain is
obvious, by multiplying all DFT coefficients corresponding to ωc < |ω | < π
by zero. In on-line implementations in the discrete-time domain the ideal
filter should be approximated by a corresponding transfer function form
that can be implemented, since the impulse response h(n) = 2 sin(ωc n)/n
of the ideal filter is noncausal signal with a slow convergence.
There are several methods to approximate the ideal lowpass filter
frequency response. One of them is the Butterworth approximation. Some of
commonly used approximations are Chebyshev and elliptic forms as well.
A lowpass filter of the Butterworth type is shown in Fig.5.11, along
with the ideal one.
|H(ejω)|2

|H(ejω)|2

ω ω
-2 π -π - ωc ωc π 2π -2 π -π 0 π 2π

Figure 5.11 Lowpass filter frequency response: ideal case (left) and Butterworth type (right).
Ljubiša Stanković Digital Signal Processing 237

Example 5.6. Implement a Butterworth discrete filter of order N = 4 with a critical


frequency corresponding to the continuous domain filter with the critical
frequency f c = 4[kHz] and the sampling interval ∆t = 31.25[µ sec]. Using:
(a) The impulse invariance method and
(b) the bilinear transform.
⋆Note that the discrete-time frequency is ωc = Ωc ∆t = 2π f c ∆t = π/4.
The poles of the fourth order Butterworth filter in the continuous-time
domain (Chapter I, Subsection 1.6) are
@ π π π π A
s0 = Ωc cos( + ) + j sin( + ) = Ωc (−0.3827 + j0.9239)
- 2 8 2 8 .
π 3π π 3π
s1 = Ωc cos( + ) + j sin( + ) = Ωc (−0.9239 + j0.3827)
2 8 2 8
- .
π 5π π 5π
s2 = Ωc cos( + ) + j sin( + ) = Ωc (−0.9239 − j0.3827)
2 8 2 8
- .
π 7π π 7π
s3 = Ωc cos( + ) + j sin( + ) = Ωc (−0.3827 − j0.9239).
2 8 2 8
The transfer function is
Ω4c
H (s) = 2
. (5.13)
( s2 + 0.7654Ωc s + Ωc )(s2 + 1.8478Ωc s + Ω2c )
(a) For the impulse invariance method the transfer function (5.13) should be
written in the form
k0 k1 k2 k3
H (s) = + + + ,
s − s0 s − s1 s − s2 s − s3
with

k i = H (s)(s − si )|s=si
k0 = (−0.3628 + j0.1503)/∆t,
k1 = (0.3628 − j0.8758)/∆t,
k2 = (0.3628 + j0.8758)/∆t,
k3 = (−0.3628 − j0.1503)/∆t.

Using the impulse invariance method we get the transfer function of the
discrete-time fourth order Butterworth filter
k0 ∆t k1 ∆t k2 ∆t k3 ∆t
H (z) = + + +
1 − es0 ∆t z−1 1 − es1 ∆t z−1 1 − es2 ∆t z−1 1 − es3 ∆t z−1
−0.3628 + j0.1503 0.3628 − j0.8758
= +
1 − eωc (−0.3827+ j0.9239) z−1 1 − eωc (−0.9239+ j0.3827) z−1
0.3628 + j0.8758 −0.3628 − j0.1503
+ + .
1 − eωc (−0.9239− j0.3827) z−1 1 − eωc (−0.3827− j0.9239) z−1
238 From Continuous to Discrete Systems

It can be seen that the discrete-time filter is a function of ωc . Thus, for a


given continuous domain frequency and sampling interval, it is possible to
calculate ωc = Ωc ∆t and to to use this frequency in the continuous filter
design with normalized ∆t = 1. Replacing the value for ωc = π/4 we get
−0.3628 + j0.1503 −0.3628 − j0.1503
H (z) = +
1 − (0.5539 + j0.4913)z−1 1 − (0.5539 − j0.4913)z−1
0.3628 − j0.8758 0.3628 + j0.8758
+ + .
1 − (0.4623 + j0.1433)z−1 1 − (0.4623 − j0.1433)z−1
Grouping the complex-conjugate terms, a system form with real-valued co-
efficients is obtained
−0.7256 + 0.2542z−1 0.7256 − 0.084z−1
H (z) = − −
+ .
1
1 − 1.1078z + 0.5482z 2 1 − 0.9246z−1 + 0.2343z−2
(b) For the bilinear transform the critical frequency ωc has to be pre-
modified according to
2 ωc 0.8284
Ωd = tan( ) = .
∆t 2 ∆t
Then the frequency Ωd is used for the design in (5.13) instead Ωc . It will be
transformed back to Ωc = ωc /∆t after the bilinear transform is used. Using
2 1 − z −1
substitutions s → ∆t 1 + z −1
and

ωd = Ωd ∆t = 0.8284

in (5.13) the transfer function follows as

H (z) =
ωd 4
z −1 2 − z −1 −1 −1
[4( 11−
+ z −1
) + 2ωd 0.7654 11+ z −1
−z )2 + 2ω 1.8478 1−z + ω 2 ]
+ ωd2 ][4( 11+ z −1 d 1 + z −1 d
0.4710
= z −1 2 − z −1 −1 −1
[4( 11−
+ z −1
) + 0.6863][4( 11−
+ 1.2626 11+ z −1
z
+ z −1
−z + 0.6863]
)2 + 3.0481 11+ z −1
P − 1
Q 4
0.4710 1 + z
=P QP Q

3.4237z − 6.6274z + 5.9484 1.6382z−2 − 6.6274z−1 + 7.7704
2 − 1
P Q4
0.084 1 + z−1
P
= −2 Q P Q
z − 1.9357z−1 + 1.7343 z−2 − 4.0455z−1 + 4.7433
0.084z−4 + 0.336z−3 + 0.504z−2 + 0.336z−1 + 0.084
= .
z−4 − 5.9810z−3 + 14.3z−2 − 16.1977z−1 + 8.2263
The transfer function (amplitude and phase) of the continuous-time
filter and the discrete-time filters obtained by using the impulse invariance
method and the bilinear transform are presented in Fig.5.12, within one
Ljubiša Stanković Digital Signal Processing 239

1.5

arg{H(e }
1


|H(e |

0
0.5

0 ω ω
-π - π/2 0 π/2 π -π - π/2 0 π/2 π

Figure 5.12 Amplitude and phase of the fourth order Butterworth filter frequency response
obtained by using the impulse invariance method and bilinear transform.

frequency period. Agreement between amplitude and phase functions is


high. The difference equation describing this Butterworth filter is
y(n) = 1.969y(n − 1) − 1.7383y(n − 2) + 0.7271y(n − 3) − 0.1216y(n − 4)
+0.0102x (n) + 0.0408x (n − 1) + 0.0613x (n − 2)
+0.0408x (n − 3) + 0.0102x (n − 4).
In calculations the coefficients are rounded to four decimal places, what
may cause small quantization error (that will be discussed within the next
chapter).
Example 5.7. Design a continuous-time lowpass filter whose parameters are:
- passband frequency Ω p = 2π f p , f p = 3 kHz,
- stopband frequency Ωs = 2π f s , f s = 6 kHz,
- maximal attenuation in the passband a p = −2 dB, and
- minimal attenuation in the stopband as = −15 dB.
Find the corresponding discrete-time filter using the bilinear transform
and ∆t = 0.05 × 10−3 sec.
⋆The maximal attenuation in the passband and the minimal attenua-
tion in the stopband are
a p = 20 log( A p )
A p = 10a p /20 = 0.7943
As = 10as /20 = 0.1778.
The relations for the filter order N and frequency Ωc are (Chapter I, Subsec-
tion 1.6)
1 2 1 2
B C2N ≥ A p , B C2N ≤ As . (5.14)
Ωp Ωs
1+ Ωc 1+ Ωc
240 From Continuous to Discrete Systems

Using the equality in both of these relations it follows


1
−1
A2p
ln 1
1 −1
A2s
N= = 2.8551.
2 ln Ω p
Ωs

The first greater integer is assumed for the filter order as


N = 3.
Then we can use any relation in (5.14) with equality sign in order to calculate
' '2
Ωc . For the first one, the value of Ωc will be such to satisfy ' H ( jΩ p )' = A2p .
Then
Ωp
Ωc = F = 2π × 3.2805 kHz,
1
2N
A2p
−1
ωc = Ωc ∆t = 1.0306.
Poles of the Butterworth filter in the continuous domain are
sk = Ωc e j(2πk+π )/6+ jπ/2 , k = 0, 1, 2
- .
2π 2π
s0 = 2π × 3.2805 cos + j sin × 103
3 3
s1 = −2π × 3.2805 × 103
- .
2π 2π
s2 = 2π × 3.2805 cos − j sin × 103 .
3 3
The transfer function is
(2π3.2805 × 103 )3
H (s) = .
(s + 2π3.2805 × 103 )(s2 + 2π3.2805 × 103 s + (2π3.2805 × 103 )2 )
In the design we will not use this transfer function.
For the bilinear transform we have to pre-modify the frequency Ωc so
that it will be returned back to the desired value when the bilinear transform
is applied. This frequency is
2 ωc 1.1327
Ωd = tan( ) = 2π × 3.6054 kHz = .
∆t 2 ∆t
The modified transfer function in the continuous domain is
(2π3.6054 × 103 )3
Hd (s) = .
(s + 2π3.6054 × 103 )(s2 + 2π3.6054 × 103 s + (2π3.6054 × 103 )2 )
The discrete-time Butterworth filter transfer function H (z) follows with

2 1 − z −1
s=
∆t 1 + z−1
Ljubiša Stanković Digital Signal Processing 241

as
1.13273
H (z) = B C2
1 − z −1 − z −1 −z−1 + 1.13272 )
(2 1 + z −1
+ 1.1327)( 2 11+ z − 1 + 2.2653 11+ z −1

1.4533(1 + z−1 )3
=
(−0.8673z−1 + 3.1327)(3.0177z−2 − 5.434z−1 + 7.54)
−0.5553z−3 − 1.6658z−2 − 1.6658z−1 − 0.5553
=
z−3 − 5.4127z−2 + 9.0028z−1 − 9.0249
0.0615z3 + 0.1846z2 + 0.1846z + 0.0615
= .
z3 − 0.9975z2 + 0.5998z − 0.1108
The corresponding difference equation is
y(n) = 0.9975y(n − 1) − 0.5998y(n − 2) + 0.1108y(n − 3)
+ 0.0615x (n) + 0.1846x (n − 1) + 0.1846x (n − 2) + 0.0615x (n − 3).

Example 5.8. A continuous-time signal


22π 8π π
t) + 4 sin(πt) + 4 cos(
x (t) = 8 cos( t+ )
3 3 4
is sampled with ∆t = 1/4. The discrete-time signal is passed through an ideal
lowpass filter with frequency ωc = π/3. Find the output signal. What is the
corresponding continuous-time output signal?
⋆The discrete-time signal is
11π π 2π π
x (n) = 2 cos( n) + sin( n) + cos( n+ )
6 4 3 4
with the Fourier transform

11π 11π
X (e jω ) = 2π ∑ [δ(ω − + 2kπ ) + δ(ω + + 2kπ )]
k=−∞
6 6

π π π
+ ∑ [δ(ω − 4 + 2kπ ) − δ(ω + 4 + 2kπ )]
j k=− ∞

2π 2π
+π ∑ [δ(ω − + 2kπ )e jπ/4 + δ(ω + + 2kπ )e− jπ/4 ].
k =−∞
3 3
Within the basic period −π ≤ ω ≤ π the Fourier transform value is
11π 11π
X (e jω ) = 2π [δ(ω − + 2π ) + δ(ω + − 2π )]
6 6
π π π
+ [δ(ω − ) − δ(ω + )]
j 4 4
2π jπ/4 2π − jπ/4
+ π [δ(ω − )e + δ(ω + )e ].
3 3
242 From Continuous to Discrete Systems

In addition to the last two components that have frequencies corre-


sponding to the analog signal there is the first component
11π 12π 11π 12π
2π [δ(ω − + ) + δ(ω + − )]
6 6 6 6
corresponding to
π
x1 (n) = 2 cos( n ).
6
The lowpass filter output is
π π
y(n) = 2 cos( n) + sin( n).
6 4
It corresponds to the continuous-time signal
π
y(t) = 8 cos( t) + 4 sin(πt).
6
One component at frequency ω = 2π/3 > π/3 is filtered out. The component
at ω = π/4 is unchanged. One more component appeared at ω = π/6 due to
the periodic extension of the Fourier transform of a discrete-time signal.
In general a signal component x (t) = exp( jΩ0 t), Ω0 < 0, with a sam-
pling interval ∆t such that

Kπ ≤ Ω0 ∆t < (K + 1)π

will, after sampling, result into a component within the basic period of the
Fourier transform of discrete-time signal, corresponding to the continuous
K
signal at exp( j(Ω0 t − ∆t πt) This effect is known as aliasing. The most
obvious visual effect is when a wheel rotating with f 0 = 25 [Hz], Ω0 = 50π, is
sampled in a video sequence at ∆t = 1/50 [sec]. Then Ω0 ∆t = π corresponds
to exp( j(Ω0 t − 50πt)) = e j0 , i.e., the wheel looks as a static (nonmoving)
object.

5.5.2 Highpass Filters

Highpass filters can be obtained by transforming corresponding continuous-


time filters into the discrete-time domain. In the discrete-time domain a
highpass filter frequency response is equal to a lowpass filter response
shifted in frequency for π, Fig.5.13,

HH (e jω ) = H (e j(ω −π ) ).

A frequency shift corresponds to the impulse response modulation

h H (n) = e jπn h(n) = (−1)n h(n).


Ljubiša Stanković Digital Signal Processing 243

|H (ejω)|2
jω 2

1
|H(e )|

H
ω ω
-2 π -π -ω ω π 2π -2 π -π 0 π 2π
c c

Figure 5.13 Highpass filter as a shifted version of the lowpass filter.

x(n) y(n)
× h(n) ×

n n
(-1) (-1)

Figure 5.14 Highpass filter realization using lowpass filter.

Thus, if we have a lowpass filter, the corresponding highpass filter is ob-


tained by multiplying the impulse response values h(n) by (−1)n . The out-
put of a highpass filter to any input signal x (n) is, Fig.5.14,

y(n) = x (n) ∗n h H (n) = ∑ x (m)(−1)n−m h(n − m)
m=−∞

= (−1)n ∑ (−1)m x (m)h(n − m) = (−1)n × [(−1)n x (n)] ∗n h(n) (5.15)
m=−∞

Example 5.9. For the lowpass Butterworth discrete-time filter


P Q4
0.1236 1 + z−1
H ( z ) = P −2 QP Q
z − 1.9389z−1 + 1.7420 z−2 − 4.0790z−1 + 4.7686
from Fig.5.15 plot the frequency response if z is replaced by −z.
⋆The impulse response is obtained by changing the sign for each
other sample in h(n). In the z-transform definition that means using (−z)−n
instead of z−n . The frequency response of
P Q4
0.1236 1 − z−1
H H ( z ) = P −2 QP Q
z + 1.9389z−1 + 1.7420 z−2 + 4.0790z−1 + 4.7686
is shown in Fig.5.15.
244 From Continuous to Discrete Systems

1.5 1.5

1 1

|HH(ejω|
|H(e |

0.5 0.5

0 ω 0 ω
-π - π/2 0 π/2 π -π - π/2 0 π/2 π

Figure 5.15 Amplitude of frequency response of a lowpass Butterworth filter (left) and a filter
obtained from the lowpass Butterworth filter when z is replaced by −z (right).
jω 2
|H(ejω)|2

|HB(e )|

ω ω
-2 π -π - ωc ωc π 2π -2 π - π - ω0 0 ω0 π 2π

Figure 5.16 Bandpass filter as shifted version of a lowpass filter.

5.5.3 Bandpass Filters

A bandpass filter is obtained from a lowpas filter by shifting its frequency


response for ω0 and −ω0 , as shown in Fig.5.16. The frequency response is

HB (e jω ) = H (e j(ω −ω0 ) ) + H (e j(ω +ω0 ) ).

In the discrete-time domain this frequency shift corresponds to

h B (n) = e jω0 n h(n) + e− jω0 n h(n) = 2 cos(ω0 n)h(n).


Ljubiša Stanković Digital Signal Processing 245

× h(n) ×

x(n) sin(ω n) 2sin(ω n) y(n)


0 0

× h(n) ×

cos(ω0n) 2cos(ω0n)

Figure 5.17 Bandpass system realization using corresponding lowpass systems and signal
modulation.

In general for an input signal x (n) the output of a bandpass filter is

∞ ∞
y(n) = h B (n) ∗ x (n) = ∑ h B (m) x (n − m) = 2 ∑ cos(ω0 m)h(m) x (n − m)
m=−∞ m=−∞

=2 ∑ cos(ω0 n + ω0 m − ω0 n)h(m) x (n − m)
m=−∞

=2 ∑ [cos(ω0 n) cos(ω0 m − ω0 n) − sin(ω0 n) sin(ω0 m − ω0 n)]h(m) x (n − m)
m=−∞

= 2 cos(ω0 n) ∑ cos(ω0 (n − m)) x (n − m)h(m)
m=−∞

+2 sin(ω0 n) ∑ sin(ω0 (n − m)) x (n − m)h(m).
m=−∞

Finally we may write the output of a bandpass filter as a function of the


lowpass impulse response as

y(n) = 2 cos(ω0 n) {[cos(ω0 n) x (n)] ∗ h(n)}


+ 2 sin(ω0 n) {[sin(ω0 n) x (n)] ∗ h(n)} .

This relation leads to a realization of a bandpass filter using lowpass filters,


as shown in Fig.5.17.
246 From Continuous to Discrete Systems

5.5.4 Allpass Systems - System Stabilization

A system (filter) with unit (constant) amplitude of the frequency response is

z−1 − ae− jθ 1 − zae− jθ z − 1a e jθ − j2θ


H A (z) = −
= = e ,

1 − ae z 1 z − ae jθ
1 − 1a e− jθ z

where 0 < a < 1 and θ is an arbitrary phase. For this system


' '
' '
'H A (e jω )' = 1.
To prove the statement consider
' '
' ' '' e− jω − ae− jθ '' ' e j(θ −ω ) − a '
' jω ' ' '
'H A (e )' = '' '=' '
1 − ae jθ e− jω ' ' 1 − ae jθ e− jω '
< <
(cos(θ − ω ) − a)2 + sin2 (θ − ω ) a2 − 2a cos(θ − ω ) + 1
= 2
= = 1.
2 2
(1 − a cos(θ − ω )) + a sin (θ − ω ) 1 − 2a cos(θ − ω ) + a2

Example 5.10. Given a system


z+2
H (z) = 1 1
.
(z − 2 )( z − 3 )( z − 2)

System cannot be causal and stable since there is a pole at z = 2. Define an


allpass system to be connected to H (z) in cascade such that the resulting sys-
tem is causal and stable, with the same amplitude of the frequency response
as H (z).
⋆The system is

z+2 z − 1a e jθ
Hs (z) = H (z) H A (z) = e− j2θ .
(z − 12 )(z − 13 )(z − 2) 1 − 1a e− jθ z
For a = 1/2 and θ = 0 we get
z+2 z−2
Hs (z) =
(z − 12 )(z − 13 )(z − 2) 1 − 2z
z+2
=− .
2(z − 12 )2 (z − 13 )
This system has the same frequency response amplitude as the initial system
' ' ' ' ' '
' ' ' ' ' '
'Hs (e jω )' = 'H (e jω ) H A (e jω )' = 'H (e jω )' .
Ljubiša Stanković Digital Signal Processing 247

The allpass system can be generalized to the form

z−1 − a1 e− jθ1 z−1 z−1 − a2 e− jθ2 z−1 z−1 − a N e− jθ N z−1


H A (z) = ...
1 − a1 e jθ1 z−1 1 − a2 e jθ2 z−1 1 − a N e jθ N z−1

where 0 < ai < 1 and θi , i = 1, 2, ..., N are arbitrary constants and phases. The
resulting frequency response amplitude is
' '
' '
'H A (e jω )' = 1.

This system can be used for multiple poles cancellation and phase correc-
tion.

5.5.5 Inverse and Minimum Phase Systems

An inverse system to the system H (z) is defined as

1
Hi (z) = .
H (z)

It is obvious that

H (z) Hi (z) = 1
h ( n ) ∗ h i ( n ) = δ ( n ).

This kind of system can be used to reverse the signal distortion. For ex-
ample, assume that the Fourier transform of a signal x (n) is distorted dur-
ing transmission by a transfer function H (z), i.e., the received signal z-
transform is R(z) = H (z) X (z). In that case the distortion can be compen-
sated by processing the received signal using the inverse system. The output
signal is obtained as

1
Y (z) = R ( z ) = X ( z ).
H (z)

The system Hi (z) = 1/H (z) should be stable as well. It means that the poles
of the inverse system should be within the unit circle. The poles of the
inverse system are equal to the zeros of H (z).
The system H (z) whose both poles and zeros are within the unit circle
is called a minimum phase system.
248 From Continuous to Discrete Systems

Example 5.11. (a) Which of these two systems


5
z2 + z − 16
H1 (z) = 3
z2 + z + 16
3
z2 − z + 16
H2 (z) = 3
z2 + z + 16
is a minimum phase system?
(b) If the amplitude of the Fourier transform of the discrete-time re-
ceived signal is distorted as R(z') = H1'(z) X' (z) what' is a stable and causal
' ' ' '
system HD (z) that will produce 'Y (e jω )' = 'X (e jω )' at its output if the input
is the received signal r (n)?
⋆ a) The systems can be written as
(z − 14 )(z + 54 )
H1 (z) =
(z + 14 )(z + 34 )
(z − 14 )(z − 34 )
H2 (z) =
(z + 14 )(z + 34 )
The first system is causal and stable for the region of convergence |z| > 3/4.
However one of its zeros is at |z| = 5/4 > 1 and the system is not a minimum
phase system, since its causal inverse form is not stable. The second system is
causal and stable. The same holds for its inverse since all poles of the inverse
system are within |z| < 1. Thus, the system H2 (z) is a minimal phase system.
(b) In this case
5
z2 + z − 16 (z − 14 )(z + 54 )
R(z) = 3
X (z) = X ( z ).
z2 + z + 16 (z + 14 )(z + 34 )
An inverse system to H1 (z) cannot be used since it will not be stable. How-
ever the inverse can be stabilized with an allpass system H A (z) so that the
amplitude is not changed
1 1
Y (z) = R(z) H (z) = H1 (z) X (z) H (z)
H1 (z) A H1 (z) A
where
5
z+ 4
H A (z) = 5
1+ 4z
and
1 (z + 14 )(z + 34 ) (z + 54 )
HD ( z ) = H A (z) =
H1 (z) (z − 14 )(z + 54 ) (1 + 54 z)
(z + 14 )(z + 34 )
=
(z − 14 )(1 + 54 z)
Ljubiša Stanković Digital Signal Processing 249

' ' ' '


' ' ' '
This system is stable and causal and will produce 'Y (e jω )' = 'X (e jω )'.

If a system is the minimum phase system (with all poles and zeros
within |z| < 1) then this system has a minimum group delay out of all
systems with the same amplitude of the frequency response. Thus, any
nonminimum phase system will have a more negative phase compared
to the minimum phase system. The negative part of the phase is called
the phase-lag function. The name minimum phase system comes from the
minimum phase-lag function.
In order to prove this statement consider a system H (z) with the sam-
ple amplitude of the frequency response as a nonminimum phase system
Hmin (z). Its frequency response can be written as

z−1 − ae− jθ
H (z) = Hmin (z) H A (z) = Hmin (z)
1 − ae jθ z−1

Here we assumed the first-order allpass system without any loss of gener-
ality, since the same proof can be used for any number of allpass systems
that multiply Hmin (z). Since 0 < a1 < 1 and the system Hmin (z) is stable the
system H (z) has a zero at |z| = 1/a1 > 1.
The phases of the system are related as

arg{ H (e jω )} = arg{ Hmin (e jω )} + arg{ H A (e jω )}.

The phase of allpass system is

e− jω − ae− jθ
arg{ H A (e jω )} = arg{ }
1 − ae jθ e− jω
1 − ae− jθ e jω
= arg{e− jω } = −ω + arg{1 − ae− jθ e jω }
1 − ae jθ e− jω
a sin(ω − θ )
− arg{1 − ae jθ e− jω } = −ω − 2 arctan .
1 − a cos(ω − θ )

Its derivative (group delay) is

d arg{ H A (e jω )} a cos(ω − θ ) − a2
τgA (ω ) = − =1+2
dω 1 − 2a cos(ω − θ ) + a2
1 − a2 1 − a2
= 2
=' ' .
1 − 2a cos(ω − θ ) + a '1 − ae j(ω −θ ) '2
250 From Continuous to Discrete Systems

Since a < 1 then the group delay is always positive and

τg (ω ) = τg min (ω ) + τgA (ω )
τg (ω ) ≥ τg min (ω ),

with τg (ω ) and τg min (ω ) being the phase derivatives (group delays) of


systems H (z) and Hmin (z), respectively.
The phase behavior of all pass system is

1 − ae− jθ
arg{ H A (e j0 )} = arg{ }=0 (5.16)
1 − ae jθ

arg{ H A (e jω )} = − τg (ω )dω ≤ 0 (5.17)
0
since τg (ω ) > 0 for 0 ≤ ω < π.

We can conclude that the minimum phase systems satisfy the following
conditions.
1. A minimum phase system is system of minimum group delay out
of the systems with the same amplitude of frequency response. A system
containing one or more allpass parts with uncompensated zeros outside of
the unit circle will have larger delay than the system which does not contain
zeros outside the unit circle.
2. The phase of a minimal phase system will be lower than the phase
of any other system with the same amplitude of frequency response since,
according to (5.17),

arg{ H (e jω ) = arg{ Hmin (e jω )} + arg{ H A (e jω )}


≤ arg{ Hmin (e jω )}.

This proves the fact that the phase of any system arg { H (e jω ) is always
lower than the phase of minimal phase system arg { Hmin (e jω )}, having the
same amplitude of the frequency response.
3. Since the group delay is minimal we can conclude that
n n
∑ |hmin (m)|2 ≥ ∑ |h(m)|2
m =0 m =0

This relation may be proven in a similar way like minimal phase property,
by considering the outputs of a minimum phase system and a system
H (z) = Hmin (z) H A (z).
Ljubiša Stanković Digital Signal Processing 251

Example 5.12. A system has absolute squared amplitude of the frequency response
equal to
B C2
' '2 5
' ' 2 cos(ω ) + 2
'H (e jω )' =
(12 cos(ω ) + 13)(24 cos(ω ) + 25)
Find the corresponding minimal phase system.
⋆ For the system we can write
' '2
' '
'H (e jω )' = H (e jω ) H ∗ (e jω ) = H (e jω ) H (e− jω )

In the z−domain the system with this amplitude of the frequency response
(with real-valued coefficients) satisfies
' ' ' '2
∗ 1 '
' 1 '' ' '
H (z) H ( ∗ )' = H (z) H ( )' = 'H (e jω )' = H (e jω ) H (e− jω ).
z z=e jω z z=e jω
In this sense
B C2
'
'
'2
' e jω + e− jω + 5
2
'H (e jω )' =
(6e jω + 6e− jω + 13)(12e jω + 12e− jω + 25)
and
B C2
1 z+ 5
2 + z −1
H (z) H ( ) =
z (6z + 13 + 6z−1 )(12z + 25 + 12z−1 )
B C2
z2 + 52 z + 1
=
(6z2 + 13z + 6)(12z2 + 25z + 12)
1 (z + 2)2 (z + 12 )2 1 ( 1z + 12 )2 (z + 12 )2
= = .
36 (z + 23 )(z + 32 )(z + 34 )(z + 43 ) 36 (z + 23 )( 1z + 23 )(z + 34 )( 1z + 34 )
The minimum phase system, with the desired amplitude of the frequency
response, is a part of H (z) H ∗ ( z1∗ ) with zeros and poles inside the unit circle

1 (z + 12 )2
H (z) = .
6 (z + 23 )(z + 34 )

The other poles and zeros then belong to H ∗ (1/z∗ ).

5.6 PROBLEMS

Problem 5.1. An RLC circuit transfer function is


1
LC
H (s) =
s2 + s RL + LC
1
252 From Continuous to Discrete Systems

with R/L = 8 and 1/ ( LC ) = 25. Find the difference equation describing


the corresponding discrete-time system obtained by the impulse invariance
method. What is the impulse response of the discrete-time system. Use
∆t = 1.
Problem 5.2. Could the method of impulse invariance be used to map the
system
s2 − 3s + 3
H (s) = 2
s + 3s + 3
to the discrete-time domain. What is the corresponding discrete-time system
obtained by the bilinear transform with ∆t = 1?
Problem 5.3. A continuous-time system is described by a differential equa-
tion
3 1
y′′ (t) + y′ (t) + y(t) = x (t)
2 2
with zero initial conditions. What is the corresponding transfer function
of discrete-time system using the first-order backward difference approxi-
mation with ∆t = 1/10? Write the difference equation of the system whose
output approximates the output of the continuous-time system.
Problem 5.4. Transfer function of a continuous-time system is

2s
H (s) = − .
s2 + 2s + 2

What is the corresponding discrete-time system using the invariance im-


pulse method and the bilinear transform with ∆t = 1?
Problem 5.5. A continuous-time system has a transfer function of the form

(1 + 4s)
H (s) = .
(s + 1/2)(s + 1)3

What is the corresponding discrete-time system according to:


(a) the impulse invariance method,
(b) the bilinear transform,
(c) the matched z-transform?
Use ∆t = 1.
Problem 5.6. A continuous-time system

2QΩ1
H (s) =
s2 + 2Ω1 Qs + Ω21 + Q2
Ljubiša Stanković Digital Signal Processing 253

is designed to pass the signal

x (t) = A1 cos(Ω1 t + ϕ1 )

and to stop all other possible signal components. The parameters are Q =
0.01, Ω1 = π/2. The signal is sampled with ∆t = 1 and a discrete-time signal
x (n) is formed. Using bilinear transform design the discrete system that
corresponds to the continuous-time system with transfer function H (s).
Problem 5.7. (a) By using the bilinear transform find the transfer function of
the second-order Butterworth filter with f ac = 4kHz. The sampling interval
is ∆t = 50µ sec.
(b) Translate the discrete-time transfer function to obtain a highpass filter.
Find its corresponding critical frequency in the continuous-time domain.
Problem 5.8. Design a discrete-time lowpass Butterworth filter for the sam-
pling frequency 1/∆t = 10 kHz. The passband should be from 0 to 1 kHz,
maximal attenuation in the passband should be 3 dB and the attenuation
should be more than 10 dB for frequencies above 2 kHz.
Problem 5.9. Using the impulse invariance method design a Butterworth
filter with the passband frequency ω p = 0.1π and stopband frequency
ωn = 0.3π in the discrete domain. Maximal attenuation in the passband
region should be less than 2dB, and the minimal attenuation in the stopband
should be 20dB.
Problem 5.10. Highpass filter can be obtained from a lowpass by using
HH (s) = H (1/s). Using the bilinear transform with ∆t = 2 we can trans-
form the continuous-time domain function into discrete domain using the
relation s = (z − 1)/(z + 1). If we have a design of a lowpass filter how to
change its coefficients in order to get a highpass filter.
Problem 5.11. For filtering of a continuous-time signal a discrete-time filter
is used. Find the corresponding continuous-time filter frequencies if the
discrete-time filter is: a) a lowpass with ω p = 0.15π, b) bandpass within
0.2π ≤ ω ≤ 0.25π, c) a highpass with ω p = 0.35. Consider cases when
∆t = 0.001s and ∆t = 0.1s.
What should be the starting frequencies to design these systems in the
continuous-time domain if the impulse invariance method is used and what
are the design frequencies if the bilinear transform is used?
Problem 5.12. A transfer function of the first-order lowpass system is

1−α
H (z) = .
1 − αz−1
254 From Continuous to Discrete Systems

Find the corresponding bandpass system transfer function with frequency


shifts for ±ωc .

Problem 5.13. Using allpass system find stable systems with the same
amplitude of the frequency response as the systems:
(a)
2 − 3z−1 + 2z−2
H1 (z) =
1 − 4z−1 + 4z−2
(b)
z
H2 (z) = .
(4 − z)(1/3 − z)
Problem 5.14. The z-transform

(z − 14 )(z−1 − 14 )(z + 12 )(z−1 + 12 )


R(z) =
(z + 45 )(z−1 + 45 )(z − 37 )(z−1 − 37 )

can can be written as


1
R(z) = H (z) H ∗ ( ).
z∗
Find H (z) for the minimum phase system.

Problem 5.15. A signal x (n) has passed trough a media whose influence
can be described by the transfer function

(4 − z)(1/3 − z)(z2 − 2z + 14 )
H (z) = .
z − 12

Signal r (n) is obtained. Find a causal and stable


' system
' ' to process ' r (n) in
order to obtain output signal y(n) such that 'Y (e jω )' = ' X (e jω )'.

5.7 SOLUTIONS

Solution 5.1. For this system we can write

1
LC 25
H (s) = =
s2 + s RL + LC
1 s2 + 8s + 25
25
=
(s + 4 + 3j)(s + 4 − j3)
Ljubiša Stanković Digital Signal Processing 255

j 25
6 − j 25
6
H (s) = + .
s + 4 + j3 s + 4 − j3
The poles are mapped using

s i → zi = e si .

The discrete-time system is

j 25
6 − j 25
6
H (z) = +
1 − e−(4+ j3) z−1 1 − e−(4− j3) z−1
25 −4 −1
3 e z sin 3
= ,
1 − 2e cos 3z 1 + e−8 z−2
− 4 −

with corresponding difference equation

25 −4
y(n) = e sin(3) x (n − 1) + 2e−4 cos(3)y(n − 1) − e−8 y(n − 2).
3

The output signal values can be calculated for any input signal using
this difference equation. For x (n) = δ(n) the impulse response would follow.
The impulse response can be obtained in a closed form from

25 ∞ −(4+ j3)n −n 25 ∞ −(4− j3)n −n


H (z) = j ∑
6 n =0
e z −j
6 n∑
e z
=0

as

25 −4n − j3n
h(n) = e ( je − je j3n )u(n) =
6
25
= e−4n sin(3n)u(n).
3

Solution 5.2. The system is not of lowpass type. For s → ∞ we get H (s) → 1.
Thus, the impulse invariance method cannot be used. The bilinear trans-
form can be used. It produces

(1 − z −1 )2 −z + 3−1
4 (1+z−1 )2 − 6 11+ z −1 13z−2 − 2z−1 + 1
H (z) = = .
(1 − z −1 )2 −z + 3
4 (1+z−1 )2 + 6 11+
−1 z−2 − 2z−1 + 13
z −1
256 From Continuous to Discrete Systems

Solution 5.3. For the system

3 1
y′′ (t) + y′ (t) + y(t) = x (t)
2 2
the transfer function is
1
H (s) = 3 1
.
s2 + 2s + 2
Corresponding discrete system is obtained using

1 − z −1
s→ = 10(1 − z−1 )
∆t
as
1
H (z) =
100(1 − z−1 )2 + 32 10(1 − z−1 ) + 1
2
1
= 231
.
100z−2 − 215z−1 + 2

The difference equation of this system is

2 430 200
y(n) = x (n) + y ( n − 1) − y ( n − 2 ).
231 231 231
Solution 5.4. The transfer function can be written as
1+j 1−j
H (s) = − − .
s+1−j s+1+j

Using the invariance impulse method it follows

2 − 2(cos(1) + sin(1))e−1 z−1


H (z) = − .
1 − 2 cos(1)e−1 z−1 + e−2 z−2

The bilinear transform produces

1 − z −2
H ( z ) = −2 .
5 − 2z−1 + z−2
Solution 5.5. (a) The transfer function

(1 + 4s)
H (s) =
(s + 1/2)(s + 1)3
Ljubiša Stanković Digital Signal Processing 257

is written to a form appropriate for the impulse invariance method

k1 k2 k3 k4
H (s) = + + +
s + 1/2 (s + 1) (s + 1)2 ( s + 1 )3
'
with k1 = H (s)(s + 1/2)|s=−1/2 = −8 and k4 = H (s)(s + 1)3 's=−1 = 6. By
equating the coefficients with s3 to 0 we get the relation k1 + k2 = 0. Similar
relation follows for the coefficients with s2 as 3k1 + 5k2 /2 + k3 = 0 or
k1 /2 + k3 = 0. Then k2 = 8 and k3 = 4. With

ki ki

s − si 1 − e s i z −1

and
1 dm k i 1 dm ki
m → m { }
m! dsi s − si m! dsi 1 − esi z−1
we get the discrete system

−8 8
H (z) = +
1 − e−1/2 z−1 1 − e −1 z −1
* +' * +'
d 4 '
' d2 6 '
'
+ s − 1 ' + 2 s − 1 '
ds1 1 − e 1 z s1 =−1 ds1 1 − e 1 z s1 =−1
−8 8 4e−1 z−1 3e−2 z−2 + 3e−1 z−1
= + − −
+ − −
+
1 − e−1/2 z−1 1−e z1 1 1
(1 − e z ) 1 2 (1 − e −1 z −1 )3
−5.83819z−3 − 9.68722z−2 + 22.0531z−1
=
(z−1 − e)3 (z−1 − e1/2 )

(b) Discrete system obtained using the bilinear transform is

−1
(1 + 8 11− z
+ z −1
)
H (z) = −1 −1
−z + 1/2)(2 1−z
(2 11+ + 1 )3
z −1 1 + z −1
−14z−4 − 24z−3 + 12z−2 + 40z−1 + 18
= .
3z−4 − 32z−3 + 126z−2 − 216z−1 + 135

(c) The matched z-transform produces

4(1 − e−1/4 z−1 )


H (z) = P Q 3
.
1 − e−1/2 z−1 (1 − e−1 z−1 )
258 From Continuous to Discrete Systems

Solution 5.6. Since we use the bilinear transform we have to pre-modify the
system according to

2 Ω ∆t
Ωd = tan( 1 ) = 2.0 = 0.6366π.
∆t 2
The frequency value is shifted from Ω1 = 0.5π to Ωd = 0.6366π. The modi-
fied system is
2QΩd
Hd (s) = 2 .
s + 2Ωd Qs + Ω2d + Q2
−z −1
Now using s = 2 11+ z −1
the corresponding discrete- system is obtained,

2QΩd
H (z) = B C2 B C .
− z −1
2 11+ + 2Ωd Q 2 11− z −1
+ Ω 2 + Q2
z −1 + z −1 d

The bilinear transform returns the pre-modified frequency to the desired


one.
Solution 5.7. The poles of H (s) H (−s) for a continuous-time second order
(N = 2) Butterworth filter are

sk = Ωc e j(2πk+π )/2N + jπ/2 = 2π f c e j(2πk+π )/4+ jπ/2 ,


2
where f c = ∆t tan(2π f ac ∆t/2)/(2π ) = 4.6253 kHz. With k = 0, 1, 2, 3 follows
√ √
2 2
sk = 2π f c (± ±j ).
2 2
For a stable system the poles satisfy Re {s p } < 0, thus
√ √
2 2
s1,2 = 2π f c (− ±j ).
2 2
The transfer function H (s) is

s1 s2 4π 2 f c2
Ha ( s ) = = √ .
(s − s1 )(s − s2 ) s + 2π f c 2s + 4π 2 f c2
2

Using the bilinear transform with ∆t = 50 · 10−6 we get the corresponding


discrete system transfer function

1.0548(1 + z−1 )2
H (z) = .
5.1066 − 1.8874z−1 + z−2
Ljubiša Stanković Digital Signal Processing 259

This filter has −3 dB attenuation at ω = 0.4π corresponding to Ω =


0.4π/∆t = 2π × 4 × 103 .
b) The discrete highpass filter is obtained by a shift corresponding to
Hh (e jω ) = H (e j(ω +π ) ). It corresponds to the impulse response modulation
hh (n) = (−1)n h(n) or substitution of z by −z in the transfer function,

1.0548(1 − z−1 )2
H (z) = .
5.1066 + 1.8874z−1 + z−2

The critical frequency of highpass filter is ωc = 0.6π or f ac = 6 kHz.

Solution 5.8. For the continuous-time system the design frequencies are

f p = 1 kHz
f s = 2 kHz.

They correspond to

Ω p = 2π 103 rad/s
Ωs = 4π 103 rad/s.

The discrete-time frequencies are obtained from ω = Ω∆t = Ω/104 as

ω p = 0.2π
ωs = 0.4π.

The frequencies for the filter design, that will be mapped to ωs and ω p by
using the bilinear transform, are

2 0.6498
Ω pd = tan(0.2π/2) =
∆t ∆t
2 1.4531
Ωsd = tan(0.4π/2) = .
∆t ∆t

The filter order follows from

1−100.1a p
1 log 1−100.1as
N= = 1.368.
2 log Ω pd
Ωsd

We assume N = 2.
260 From Continuous to Discrete Systems

Since the frequency for −3 dB attenuation is given the design critical


frequency is
0.6498
Ωcd = Ω pd = .
∆t
The poles of the filter transfer function are
√ √
0.6498 2 2
s p1/2 = (− ±j )
∆t 2 2

with the transfer function


1
s p1 s p2 ∆t2
0.4223
H (s) = = 1
.
(s − s p1 )(s − s p2 ) s2 + 0.919s ∆t + 0.4223 ∆t1 2

Mapping this system into the discrete-time domain by using the bilinear
transform,
2 1 − z −1
s= ,
∆t 1 + z−1
produces
0.067569(1 + z−1 )2
H (z) = .
1 − 1.14216z−1 + 0.412441z−2
Solution 5.9. The Butterworth filter order is

1−100.1a p
1 log 1−100.1as
N= = 2.335.
2 log Ω p
Ωs

with Ω p = ω p /∆t, Ωs = ωs /∆t, and ∆t = 1. Assume N = 3.


Critical frequency Ωc , where the amplitude of the frequency response
is attenuated for 3 dB, is

Ωp
Ωc = 2N
, = 0.109345π = 0.3435.
100.1a p − 1

The transfer function H (s) poles are

s p2/3 = −0.17175 ± j0.29748


s p1 = −Ωc = −0.3435.
Ljubiša Stanković Digital Signal Processing 261

The transfer function form is


−s p1 s p2 s p3 0.0405
H (s) = =
(s − s p1 )(s − s p2 )(s − sp3 ) (s + 0.3435)(s3 + 0.3435s + 0.1178
k1 k2 k3
= + +
s − s p1 s − s p2 s − s p3
0.3435 0.17175 − j0.09916 0.17175 + j0.09916
= − − .
s + 0.3435 s + 0.17175 + j0.29748 s + 0.17175 − j0.29748

The coefficients k i are calculated from


'
'
k i = H (s)(s − s pi ) 's=s pi .

Using the impulse invariance method, mapping from the continuous-time


domain to the discrete-time domain, is done according to

ki ∆tk i
→ .
s − spi 1 − es pi ∆t z−1
The discrete-time system transfer function is

−0.0253z−2 − 0.0318z−1
H (z) = .
−1.98774 + 4.61093z−1 − 3.68033z−2 + z−3
Solution 5.10. The transfer function is
1
HH (s) = H ( )
s
2 1− z −1 2 z −1
with s = ∆t 1+z−1 = ∆t z+1 and ∆t = 2. Corresponding lowpass filter would
be
z−1
HL (z) = H (s)|s= z−1 = H ( ).
z +1 z+1
The discrete highpass filter is
'
1 '
HH (z) = HH (s)|s= z−1 = H ( )''
z +1 s s = z −1
z +1

z+1
HH (z) = H (
).
z−1
Obviously HH (z) = HL (−z). It means that a discrete highpass system can be
realized by replacing z with −z in the transfer function. For ∆t ̸= 2 a scaling
is present as well.
262 From Continuous to Discrete Systems

Solution 5.11. a) The mapping with ∆t = 0.001 s produces a lowpass filter


with Ω p = ω p /∆t = 150 π rad/s. For ∆t = 0.1 s the frequency is Ω p =
ω p /∆t = 1.5 π rad/s.
b) For ∆t = 0.001 s a bandpass filter is obtained for the range 200π
rad/s ≤ Ω ≤ 250π rad/s, while ∆t = 0.1 s produces a bandpass filter with
2π rad/s ≤ Ω ≤ 2.5π rad/s.
c) For ∆t = 0.001 s a highpass filter has the frequency Ω p = 350 rad/s,
while for ∆t = 0.1 s the highpass filter has critical frequency Ω p = 3.5 rad/s.
For the impulse invariance method starting design frequencies should
be equal to the calculated analog frequencies. If the bilinear transform
is used calculated analog frequencies Ω p should be pre-modified to Ωm
2 Ω p ∆t
according to Ωm = ∆t tan 2 .
Solution 5.12. The impulse response of the passband filter is h B (n) =
2h(n) cos(ωc n). The z-transform of the impulse response is
∞ ∞ ∞
HB ( z ) = ∑ 2h(n) cos(ωc n)z−n = ∑ h(n)(e− jωc z)−n + ∑ h(n)(e jωc z)−n
n=−∞ n=−∞ n=−∞

2(1 − α)(1 − α cos ωc z−1 )


HB (z) = H (e− jωc z) + H (e jωc z) = .
1 − 2α cos ωc z−1 + α2 z−2
Solution 5.13. The causal system

2 − 3z−1 + 2z−2
H1 (z) =
(1 − 2z−1 )2
is not stable since it has a second-order pole at z = 2. This system may be
stabilized, keeping the same amplitude of the frequency response, using a
second-order allpass system with zero at z = 2
( )2
z −1 − 1
2
H A (z) = 1 −1
.
1− 2 z

The new system has a transfer function

2 − 3z−1 + 2z−2
H1 (z) = .
( z −1 − 2 )2
Causal system H2 (z) has a pole at z = 4. It can be stabilized by using allpass
system
z−1 − 14 4−z
H A (z) = 1 −1
= .
1 − 4z 4z − 1
Ljubiša Stanković Digital Signal Processing 263

The transfer function of a stable system is


z
H2 (z) = .
(4z − 1)(1/3 − z)
Solution 5.14. For the z-transform
(z − 14 )(z−1 − 14 )(z + 12 )(z−1 + 12 )
R(z) =
(z + 45 )(z−1 + 45 )(z − 37 )(z−1 − 37 )
and
1
R(z) = H (z) H ∗ (
).
z∗
the minimum phase system is a part of R(z) whose all zeros and poles
are inside the unit circle, meaning that H (z) system and its inverse system
1/H (z) can be a causal and stable. Therefore,

(z − 14 )(z + 12 )
H (z) = .
(z + 45 )(z − 37 )

It is easy to check that H ∗ ( z1∗ ) is equal to he remaining terms in R(z), since

1 ( z1∗ − 14 )∗ ( z1∗ + 12 )∗ (z−1 − 14 )(z−1 + 12 )


H∗ ( ) = = .
z∗ ( z1∗ + 45 )∗ ( z1∗ − 37 )∗ (z−1 + 45 )(z−1 − 37 )
B C∗
Here we used, for example, ( z1∗ − 14 )∗ = z1∗ − 14 = 1z − 14 .
Solution 5.15. The received signal should be processed by the inverse
system
1 z − 12
Hi (z) = = √ .
H (z) (4 − z)(1/3 − z)(z2 − 2z + 14 )
However this system has two poles outside the unit circle since

z − 12
Hi (z) = .
(4 − z)(1/3 − z)(z − 1.2071)(z − 0.2071)
These poles have to be compensated, keeping the same amplitude, by using
two first-order allpass systems. The resulting system transfer function is
z − 4 z − 1.2071
Hi (z)
1 − 4z 1 − 1.2071z
z − 12
= .
(1/3 − z)(z − 0.2071)(1 − 4z) (1 − 1.2071z)
264 From Continuous to Discrete Systems

5.8 EXERCISE

Exercise 5.1. Transfer function of a continuous-time system is

( s + 2)
H (s) = .
4s2 + s + 1
What is the corresponding discrete-time system obtained with ∆t = 1 by
using the impulse invariance method and the bilinear transform.
Exercise 5.2. A continuous system is described by a differential equation
1
y′′ (t) + 6y′ (t) − y(t) = x (t) + x ′ (t)
2
with zero initial conditions. What is the corresponding transfer function
of a discrete system obtained by using the first-order backward difference
approximation with ∆t = 1?
Exercise 5.3. (a) A continuous system

2QΩ0
H (s) =
s2 + 2Ω0 Qs + Ω20 + Q2

with Q = 0.01 is designed to pass the signal

x (t) = A cos(Ω0 t + ϕ)

for Ω0 = 3π/4 and to stop all other possible signal components.


The signal is sampled with ∆t = 1 and a discrete-time signal x (n) is
formed. Using the bilinear transform, design a discrete system that corre-
sponds to the continuous system with transfer function H (s).
(b) What is the output r (n) of the obtained discrete-time system to the
samples y(n) of the analog signal

y(t) = 1 + 2 sin(250πt) − cos(2750πt) + 2 sin(750πt)

sampled with the sampling interval ∆t = 10−3 s. What would be the corre-
sponding continuous-time output signal after an ideal D/A converter.
Exercise 5.4. (a) By using the bilinear transform find the transfer function
of a third-order Butterworth filter with f ac = 3.4 kHz. The sampling step is
∆t = 40 µ sec.
(b) Translate the discrete transfer function to obtain a bandpass system
with corresponding central frequency f ac = 12.5 kHz in the continuous
domain.
Ljubiša Stanković Digital Signal Processing 265

Exercise 5.5. Design a continuous lowpass filter whose parameters are:


- passband frequency Ω p = 2π f p , f p = 3.5 kHz,
- stopband frequency Ωs = 2π f s , f s = 6 kHz,
- maximal attenuation in passband a p = 2 dB, and
- minimal attenuation in the stopband as = 16 dB.
Find the corresponding discrete-time filter using:
(a) the impulse invariance method and
(b) the bilinear transform,
with ∆t = 0.05 × 10−3 sec.
(c) Write the corresponding highpass filter transfer functions, obtained
by a frequency shift in the discrete domain for π, for both cases.
Exercise 5.6. Using allpass system find a stable and causal system with the
same amplitude of the frequency response as the systems:

2 − 5z−1 + 2z−2
H1 (z) = ,
1 − 4z−1 + z−2
z−1
H2 (z) = .
(2 − z)(1/4 − z)
Exercise 5.7. The z-transform
(z − 13 )(z−1 − 13 )
R(z) =
(z + 12 )(z−1 + 12 )
can can be written as
1
R(z) = H (z) H ∗ ().
z∗
Find H (z) for the minimum phase system. If h(n) is the impulse response
of H (z) and h1 (n) is the impulse response of

z−1 − a1 e− jθ1
H1 (z) = H (z)
1 − a1 e jθ1 z−1
show that |h(0)| ≤ |h1 (0)| for any θ1 and | a1 | < 1. All systems are causal.
Exercise 5.8. A signal x (n) has passed trough a media whose influence can
be described by the transfer function

(1 − z/3)(1 − 5z)(z2 − z + 34 )
H (z) =
z2 − 2/3
and the signal r (n) = x (n) ∗ h(n) is' obtained.
' Find
' a causal
' and stable system
to process r (n) in order to obtain 'Y (e jω )' = ' X (e jω )'.
266 From Continuous to Discrete Systems
Chapter 6
Realization of Discrete Systems

discrete-time systems may, in general, be described by a differ-

L
INEAR
ence equation relating the output signal with the input signal at the
considered instant and the previous values of the output and input
signal. The transfer function can be written in various forms producing dif-
ferent system realizations. Some of them will be presented next. Symbols
that are used in the realizations are presented in Fig.6.1.

6.1 REALIZATION OF IIR SYSTEMS

A system that includes recursions of the output signal values results in an


infinite impulse response (IIR). These systems will be presented first.

a
z -1
x(n) ax(n) x(n) x(n-1) x(n) x(n)

x(n)

+ + ×
x(n) x(n)+y(n) x(n) - x(n)- y(n) x(n) x(n)y(n)

y(n) y(n) y(n)

Figure 6.1 Symbols and their function in the realization of discrete-time systems.

267
268 Realization of Discrete Systems

x(n) B0 y(n)
+ +

z-1 z-1

x(n-1) + + y(n-1)
B A1
-1 1 -1
z z

x(n-2) y(n-2)
B A
2 2

Figure 6.2 Direct form implementation of a second order system.

6.1.1 Direct realization I

Consider a discrete system described by a linear difference equation

y(n) = A1 y(n − 1) + ... + A N y(n − N ) (6.1)


+ B0 x (n) + B1 x (n − 1) + ... + B M x (n − M).

A second-order system, as a special case, will be presented first. Its imple-


mentation is shown in Fig.6.2.
A general system described by (6.1) can be implemented as in Fig.6.3.
This form is a direct realization I of a discrete-time system.

6.1.2 Direct realization II

Direct realization I, presented in Fig.6.3, consists of two blocks in cascade.


The first block realizes

y1 (n) = B0 x (n) + B1 x (n − 1) + ... + B M x (n − M )

and the second block corresponds to the recursive relation

y(n) = A1 y(n − 1) + ... + A N y(n − N ) + y1 (n).

These two blocks have transfer functions

H1 (z) = B0 + B1 z−1 + ... + B M z− M


Ljubiša Stanković Digital Signal Processing 269

x(n) B y (n) y(n)


0
1
+ +

z-1 z-1

+ +
B A
-1 1 1
z z-1

+ +
B A
2 2

-1 -1
z z

B A
M N

Figure 6.3 Direct form I implementation of a discrete-time system.

and
1
H2 (z) = .
1 − A1 z−1 − ... − A N z− N
The overall transfer function is

H (z) = H1 (z) H2 (z) = H2 (z) H1 (z).

It means that these two blocks can interchange their positions. After the
positions are interchanged, then by using the same delay systems, we get
the resulting system in the direct realization II form, presented in Fig.6.4.
This system uses a reduced number of delay blocks in the realization.

Example 6.1. Find the transfer function of a discrete system presented in Fig.6.5.
⋆The system can be recognized as a direct realization II form. After
its blocks are separated and interchanged the system in a form presented in
Fig.6.6 is obtained.
The output of the first block is

1 1
y1 ( n ) = x ( n ) − x ( n − 1) + x ( n − 2). (6.2)
2 3
Its transfer function is
1 1
H1 (z) = 1 − z−1 + z−2 .
2 3
270 Realization of Discrete Systems

x(n) B0 y(n)
+ +

z-1

+ +
A B
1 -1 1
z

+ +
A B
2 2

z-1

A B
N M

Figure 6.4 Direct realization II of a discrete-time system.

x(n) y(n)
+ +
-1
z
+
-1/2
-1
z
+
1/2 1/3
z-1

-1/6

Figure 6.5 A discrete-time system.

The output of the second block is described by the following difference


equation
1 1
y ( n ) = y ( n − 2) − y ( n − 3) + y1 ( n ). (6.3)
2 6
The transfer function of this block is

1
H2 (z) = .
1 − 12 z−2 + 16 z−3
Ljubiša Stanković Digital Signal Processing 271

x(n) y (n) y(n)


1
+ +
-1 -1
z z

+
-1/2
-1 -1
z z

+
1/3 1/2
-1
z

-1/6

Figure 6.6 System with interchanged blocks.

The difference equation for the whole system is obtained after y1 (n) from
(6.2) is replaced into (6.3)

1 1 1 1
y(n) = y ( n − 2) − y ( n − 3) + x ( n ) − x ( n − 1) + x ( n − 2).
2 6 2 3
The system transfer function is

1 − 12 z−1 + 13 z−2
H (z) = H1 (z) H2 (z) = .
1 − 12 z−2 + 16 z−3

6.1.3 Sensitivity of the System Poles/Zeros to Errors in Coefficients

Systems with a large number of elements in a recursion may be sensitive to


the errors due to the coefficients deviations. Deviations of the coefficients
from the true values are caused by finite order registers used to memorize
them in a computer. Influence of the finite register lengths to the signal and
system realization will be studied later, as a part of random disturbance.
Here, we will only consider influence of this effect to the system coefficients
since it may influence the way how to realize a discrete system.
For the first-order system with a real-valued pole

1 1
H (z) = −
=
1 + A1 z 1 1 − z p1 z−1
272 Realization of Discrete Systems

the error in coefficient A1 is the same as the error in the system pole z p1 . If
the coefficient is quantized with a step ∆ then the error in the pole location
is of order ∆. The same holds for the system zeros.
For a second-order system with real-valued coefficients and a pair of
complex-conjugated poles
1 1
H (z) = =
1 + A 1 z −1 + A 2 z −2 (1 − z p1 z−1 )(1 − z p2 z−1 )
the relation between the coefficients and the real and imaginary parts of the
poles z p1/2 = x p ± jy p is

1
H (z) =
1 − 2x p z −1 + ( x2p + y2p )z−2
A1 = −2x p
A2 = x2p + y2p .

The error in coefficient A1 defines the error in the real part of poles x p .
When the coefficient A2 assumes discrete values A2 = m∆, with A1 ∼
x p = n∆ then the imaginary part of poles may assume the values y p =
F √
± A2 − x2p = ± m∆ − n2 ∆2 with n2 ≤ mN. For small n, i.e., for small real

part of a pole, y p = ± ∆m. For N discretization levels, assuming that the
poles are within the unit circle x2p + y2p ≤ 1, the first discretization step is

changed from 1/N order to 1/ N order. The error, in this case, could be
significantly increased. The changes in y p due to the discretization of A2
may be large.
The quantization of x p and y p as a result of quantization of − A1 /2
and A2 = x2p + y2p is shown in Fig.6.7 for the case of N = 16 and N = 32
quantization levels. We see that the error in y p , when it assumes small
values, can be very large. We can conclude that the poles close to the unit
circle with larger imaginary values y p are less sensitive to the errors. The
highest error could appear if a second order real-valued pole (with y p = 0)
were implemented by using a second order system.
We have concluded that the poles close to the real axis (small y p )
are sensitive to the error in coefficients even in the second order systems.
The sensitivity increases with the system order, since the higher powers in
polynomial increase the maximal possible error.
Consider a general form of a polynomial in the transfer function,
written in two forms

P(z) = z M + z M−1 A1 + ... + A M


Ljubiša Stanković Digital Signal Processing 273

y =Im{z } y =Im{z }
p p p p

1 1

0.5 0.5

0 0

-0.5 -0.5

-1 -1
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
x =Re{z } x =Re{z }
p p p p

Figure 6.7 Quantization of the real and imaginary parts x p = Re{z p } and y p = Im{z p } of
poles (zeros) as a result of the quantization in 16 levels (left) and 32 levels (right) of the
coefficients A1 = −2x p and A2 = x2p + y2p .

and
P(z) = (z − z1 )(z − z2 )...(z − z M ).
If the coefficients A1 , A2 , ..., A M are changed for small ∆A1 , ∆A2 , ..., ∆A M
(due to quantization) then the pole position (without loss of generality and
for notation simplicity consider the pole z1 ) is changed for
- .
∼ ∂z1 ∂z1 ∂z1
∆z1 = ∆A1 + ∆A2 + ... + ∆A M . (6.4)
∂A1 ∂A2 ∂A M | z = z1

Since there is no a direct relation between z1 and A1 we will find ∂z1 /∂Ai
using
∂P(z) ∂P(z) ∂z1
= .
∂Ai |z=z1 ∂z1 ∂Ai |z=z1
From this relation it follows
∂P(z)
∂z1 ∂Ai |z=z1 z1M−i
= ∂P(z)
= .
∂Ai |z=z1 −(z1 − z2 )(z1 − z3 )...(z1 − z M )
∂z1 |z=z1

The coefficients ∂z1 /∂Ai|z=z1 could be large, especially in the case when
there are close poles, with a small distance (zi − zk ).
274 Realization of Discrete Systems

Example 6.2. Consider a discrete system


1
H (z) =
P(z)

with
12 7 111 95
P(z) = (z − )(z − )(z − )(z − )
27 29 132 101

= (z − 0.4444)(z − 0.2414)(z − 0.8409)(z − 0.9406)

In the realization of this system the coefficients are rounded to two decimal
positions, with absolute error up to 0.005. Find the poles of the system with
rounded coefficients.
⋆The system denominator is

P(z) ∼
= z4 − 2.4673z3 + 2.1200z2 − 0.7336z + 0.0849.

With rounded coefficients to two decimal positions we get

P̂(z) = z4 − 2.47z3 + 2.12z2 − 0.73z + 0.08

with poles

P̂(z) = (z − 0.2045)(z − 0.5370)(0.7285)(z − 1).

The poles of the function with rounded coefficients can differ significantly
from the original pole values. Maximal error in poles is 0.115. One pole is on
the unit circle making the system with rounded coefficients unstable, in this
case.
Note that if the system is written as a product of the first-order func-
tions in the denominator and each pole value is rounded to two decimals

1
H (z) = 7 12 111 95
(z − 29 )( z − 27 )( z − 132 )( z − 101 )
P(z) ∼
= (z − 0.24)(z − 0.44)(z − 0.84)(z − 0.94)

the poles will differ from the original ones for no more than 0.005.
If the poles are grouped into the second-order terms (what should be
done if the coefficients were complex-conjugate in order to avoid calculation
with complex valued coefficients), then

P(z) ∼
= (z − 0.6858z + 0.1073)(z − 1.7815z + 0.7910).

If the coefficients are rounded to two decimal positions

P̂(z) = (z − 0.69z + 0.11)(z − 1.78z + 0.79)


Ljubiša Stanković Digital Signal Processing 275

P(z)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1


Re{z}
P1(z)P2(z)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1


Re{z}

Figure 6.8 Poles for a system with errors in coefficients

we will get

P̂(z) = (z − 0.25)(z − 0.44)(z − 0.8442)(z − 0.9358)

with maximal error of 0.01.


The pole values are illustrated in Fig.6.8.

The sensitivity analysis for this example can be done for each pole.
Assume that the poles are denoted as z1 = 12/27, z2 = 7/29, z3 = 111/132
and z4 = 95/101. Then

(z1 − z2 )(z1 − z3 )(z1 − z4 ) = 0.0399


∂z1 z41−1
= = −2.1979
∂A1 |z=z1 −(z1 − z2 )(z1 − z3 )(z1 − z4 )
∂z1 z41−2
= = −4.9452,
∂A2 |z=z1 −(z1 − z2 )(z1 − z3 )(z1 − z4 )
∂z1
= −11.1267,
∂A3 |z=z1
∂z1
= −25.0350
∂A4 |z=z1
276 Realization of Discrete Systems

with the errors in the coefficients

∆A1 = −2.4673 − (−2.47) = 0.0027,


∆A2 = 2.12 − 2.12 = 0,
∆A3 = −0.7336 − (−0.73) = −0.0036,
∆A4 = 0.0849 − 0.08 = 0.0049.

Replacing these values into (6.4) the approximation of the error is

∆z1 ∼
= 0.0878.

The true error is ∆z1 = 0.0926. A small difference is due to the linear approx-
imation, assuming small ∆Ai . The obtained result is a good estimate of an
order of error for the pole z1 . The error in z1 is about 18.5 time greater than
the maximal error in the coefficients Ai , that is of order 0.005.

6.1.4 Cascade Realization

A transfer function of discrete-time system might be written as a product of


the first-order subsystems

1 − zo0 z−1 1 − zo1 z−1 1 − zoN z−1


H (z) = k × ... × .
1 − z p0 z−1 1 − z p1 z−1 1 − z pN z−1

Commonly real-valued signals are processed and the poles and zeros in the
transfer function are in complex-conjugated pairs. In that case it is better to
group these pairs into second order systems to avoid complex calculations.
The transfer function is of the form

B00 + B10 z−1 + B20 z−2 B0K + B1K z−1 + B2K z−2
H (z) = × ... ×
1 − A10 z−1 − A20 z−2 1 − A1K z−1 − A2K z−2
= H0 (z) H1 (z)...HK (z),

where
B0i + B1i z−1 + B2i z−2
Hi (z) =
1 − A1i z−1 − A2i z−2
are second-order systems with real-valued coefficients. The whole system
may be realized as a cascade of lower-order (first or second-order) systems,
Fig.6.9. Of course, if there are some real-valued poles then there is no need
to group them. It is better to keep the realization order of the subsystems as
low as possible.
Ljubiša Stanković Digital Signal Processing 277

x(n) B00 B0K y(n)


+ + + +

z-1 z-1
+ + + +
A B A B
10 -1 10 1K -1 1K
z z

A B A B
20 20 2K 2K

Figure 6.9 Cascade realization of a discrete-time system.

x(n) r(n) y(n)


+ H(z)
-

H(z)

Figure 6.10 System with a feedback.

In the realization the second-order subsystems are commonly used.


It is possible to realize these second-order subsystems using the first-order
systems with real-valued coefficients x pL and y pL that are real and imag-
inary parts of the complex-conjugated pair of poles, z pL = x pL ± jy pL , re-
spectively. To this aim consider first an example.
Example 6.3. Find the transfer function of a system with a feedback shown in
Fig.6.10.
⋆The z-transform of the signal at the output of adder is
R ( z ) = X ( z ) − H ( z )Y ( z ) .

The output signal z-transform is

Y ( z ) = H ( z ) R ( z ) = H ( z ) X ( z ) − H 2 ( z )Y ( z ) .

The transfer function of this system is

Y (z) H (z)
He (z) = = .
X (z) 1 + H 2 (z)
278 Realization of Discrete Systems

H2(z)
x(n) y(n)
+ H(z) +
- +
z -1
xp

H(z)

Figure 6.11 Complete second-order subsystem with complex-conjugate pair of poles realized
using the first-order systems.

Let us now consider a realization of the second-order subsystem of the


form
y pL z−1
Qi ( z ) = .
1 + A1i z−1 + A2i z−2
Using the real and imaginary parts of the poles z pL = x pL + jy pL the transfer
function can be expressed as

y pL z−1
Qi ( z ) =
1 − 2x pL z−1 + x2pL z−2 + y2pL z−2
y pL z−1
=
(1 − x pL z−1 )2 + y2pL z−2
1 1
= y pL z−1 * +2
(1 − x pL z−1 )2 y pL z−1
1+ 1− x pL z−1

H (z) H2 (z)
=
1 + H 2 (z)

where

y pL z−1 1
H (z) = −
and H2 (z) = .
1 − x pL z 1 1 − x pL z−1

Therefore the second-order system can be implemented as in Fig.6.11, by


using the first-order systems as in Fig.6.12. In this case there is no grouping
of the coefficients into second or higher order polynomial.
Ljubiša Stanković Digital Signal Processing 279

H(z)

x(n) yp y(n)
-1
+ z
+

xp

Figure 6.12 First-order system for the realization of the second-order system with complex-
conjugate pair of poles.

The error in one coefficient (real or imaginary part of a pole) does not
influence the other coefficients. However if an error in the signal calculation
happens in one cascade, then it will propagate as an input to the following
cascades. In that sense it would be the best to order cascades in such a way
that the lowest probability of an error appears in early cascades. From the
analysis of error we can conclude that the cascades with the poles and zeros
close to the origin are more sensitive to the error and should be used in later
stages.

Example 6.4. For the system

1.4533(1 + z−1 )3
H (z) =
(−0.8673z−1 + 3.1327)(3.0177z−2 − 5.434z−1 + 7.54)
1 + z −1 1 + 2z−1 + z−2
= 0.0615 ×
1 − 0.2769z−1 1 − 0.7207z−1 + 0.4002z−2

present the cascade realization using:


(a) both the first and the second-order systems;
(b) the first-order systems with real-valued coefficients only.

⋆(a) Realization of the system H (z) when both the first and the
second-order subsystems can used is done according to system transfer func-
tion as in Fig.6.13.
(b) For the first-order systems the realization should be done based on

1 + z −1
H (z) = 0.0615 × (1 + z −1 ) × (1 + z −1 )
1 − 0.2769z−1
1
× ,
1 − 0.7207z−1 + 0.4002z−2
280 Realization of Discrete Systems

x(n) 0.0615 y(n)


+ + + +
-1 -1
z z

+ +
1 0.2769 0.7207 -1 2
z

-0.4002 1

Figure 6.13 Cascade realization of a system.

with
1
1 − 0.7207z−1 + 0.4002z−2
1
=
(1 − (0.3603 + j0.5199)z−1 )(1 − (0.3603 − j0.5199)z−1 )
1
=
1 − 2 × 0.3603z−1 + 0.36032 z−2 + 0.51992 z−2
1 1 1
= = .
0.51992 z−2 + (1 − 0.3603z−1 )2 (1 − 0.3603z−1 )2 1 + ( 0.5199z−1−1 )2
1−0.3603z

In this way the system can be written and realized in terms of the first-order
subsystems

1 + z −1 1 + z −1
H (z) = 0.0615 ×
1 − 0.2769z−1 1 − 0.3603z−1
1+z − 1 1
× × −1 .
1 − 0.3603z−1 −1
1 + 0.5199z −1 × 0.5199z −1
1−0.3603z 1−0.3603z

6.1.5 Parallel realization

This realization is implemented based on a transfer function written in the


form

B00 + B10 z−1 + B20 z−2 B + B1K z−1 + B2K z−2


H (z) = − −
+ ... + 0K
1
1 − A10 z − A20 z 2 1 − A1K z−1 − A2K z−2
= H0 (z) + H1 (z) + ... + HK (z).
Ljubiša Stanković Digital Signal Processing 281

x(n) 0.0615
+ + + +
-1 -1
z z

0.2769 0.3603

y(n)
+ + +
-1
z yp=0.5199
y yp
p
-1 + -1 +
z z
0.3603

0.3603 0.3603

Figure 6.14 Discrete-time system realized using first-order subsystems.

In the case of a parallel realization the error in one subsystem does not
influence the other subsystems. If an error in the signal calculation appears
in one parallel subsystem, then it will influence the output signal, but will
not influence the outputs of other parallel subsystems.

Example 6.5. For the system

−0.7256 + 0.2542z−1 0.7256 − 0.084z−1


H (z) = +
1 − 1.1078z−1 + 0.5482z−2 1 − 0.9246z−1 + 0.2343z−2

present a parallel and a cascade realization using the second-order subsys-


tems.

⋆Parallel realization follows directly from the system transfer function


definition. It is presented in Fig.6.16.
For the cascade realization the system transfer function should be
written in a form of the product of second-order transfer functions,
282 Realization of Discrete Systems

x(n) y(n)
+ + +
B00
z-1

+ +
A10 B10
-1
z

A B
20 20

+ +
B01
z-1

+ +
A B
11 11
z-1

A21 B21

+ +
B0K
z-1

+ +
A1K B1K
-1
z

A2K B2K

Figure 6.15 Parallel realization of a discrete-time system.


Ljubiša Stanković Digital Signal Processing 283

x(n) -0.7256 y(n)


+ +

z-1

1.1078 -1 0.2542
z

-0.5482
0.7256
+ +
-1
z

0.9246 -0.084
z-1

-0.2343

Figure 6.16 Parallel realization of a discrete-time system.

0.0373z−1 + 0.0858z−2 + 0.0135z−3


H (z) = P QP Q
1 − 1.1078z−1 + 0.5482z−2 1 − 0.9246z−1 + 0.2343z−2
z −1
=
1 − 1.1078z−1 + 0.5482z−2
0.0373 + 0.0858z−1 + 0.0135z−2
× .
1 − 0.9246z−1 + 0.2343z−2
Cascade realization is presented in Fig.6.17.

6.1.6 Inverse realization

For each of the previous realization an inverse form may be implemented by


switching the input and the output signal and changing the flow directions
of the signal. As an example consider the direct realization II from Fig.6.4.
This realization, with separated delay circuits is shown in Fig.6.18. Its in-
verse form is presented in Fig.6.19. It is easy to conclude that the inverse
realization of the direct realization II has the same transfer function as the
direct realization I. Since both realization I and realization II have the same
284 Realization of Discrete Systems

x(n) 0.0373 y(n)


+ + +
-1 -1
z z

+ + +
1.1078 1 0.9246 0.0858
z-1 z
-1

-0.5482 -0.2343 0.0135

Figure 6.17 Cascade realization of a discrete system.

x(n) B y(n)
0
+ +

z-1 z-1
+ +
A B
1 -1 -1 1
z z
+ +
A B
2 2

-1 -1
z z

AN BM

Figure 6.18 Direct realization II with separated delay circuits.

transfer functions it follows that the inverse realization has the same transfer
function as the original realization.

6.2 FIR SYSTEMS AND THEIR REALIZATIONS

In general, transfer functions of discrete systems are obtained in the form


of a ratio of two polynomials. The polynomial in the transfer function
denominator defines poles. In the time domain it means a recursive relation,
relating the output signal at the current instant with the previous output
signal values. Realization of this kind of system is efficient, as described
Ljubiša Stanković Digital Signal Processing 285

y(n) B x(n)
0
+ +

z-1 z-1
+ +
A B
1 1
z-1 z-1
+ +
A B
2 2

-1 -1
z z

A B
N M

Figure 6.19 Inverse realization of the direct realization II.

in the pervious section. Systems that would not have recursions, when the
output signal is a linear combination of the input signal and its delayed
versions only,

y(n) = B0 x (n) + B1 x (n − 1) + ... + B M x (n − M )

are the FIR systems. These systems are always stable. The FIR systems can
also have a linear phase.

6.2.1 Linear Phase Systems and Group Delay

In an implementation of a discrete system it is important to modify the


amplitude of the Fourier transform of the input signal in a desired way. At
the same time we should take care about the phase function changes in the
input signal. In an ideal case of signal filtering the phase function should
remain the same, meaning a zero-phase transfer function. A linear phase
form of the transfer function

Im{ H (e jω }
arg{ H (e jω } = arctan{ } = −ωq (6.5)
Re{ H (e jω }

is also acceptable in these systems. They will have a constant group delay

d(arg{ H (e jω })
τg = − =q

286 Realization of Discrete Systems

and will not distort the impulse response with respect to the zero-phase
system. The impulse response will only be delayed in time for q.
Example 6.6. Consider an input signal of the form
M
x (n) = ∑ A m e j ( ωm n + θ m ).
m =1

After passing through a system with frequency response H (e jω ) this signal is


changed to
M jωm
y(n) = ∑ Am | H (e jωm )|e j(ωm n+θm +arg{ H (e })
.
m =1

In general the phase of each signal component is changed in a different


way for arg{ H (e jωm }, causing the signal distortion due to different delays
corresponding to different frequencies. If the phase function of the frequency
response is linear then all signal component phases are changed in the same
way for arg{ H (e jωm } = −ωm q. They corresponding to a constant delay for
all components. A delayed signal, without distortion, is obtained
M
y(n) = ∑ Ai | H (e jωm )|e j(ωm (n−q)+θm ) .
m =1

In the case of a linear phase arg { H (e jω } = −ωq the phase delay

arg{ H (e jω }
τϕ = − =q
ω
and the group delay τg are the same. In general, the group delay and the
phase delays are different. The group delay, as notion dual to the instanta-
neous frequency, is introduced and discussed in the first chapter.

Consider a system with a real-valued impulse response h(n). Its fre-


quency response is

N −1 N −1 N −1
H (e jω ) = ∑ h(n)e− jωn = ∑ h(n) cos(ωn) − j ∑ h(n) sin(ωn). (6.6)
n =0 n =0 n =0

Combining the linear phase condition (6.5) with form (6.6), we get

Im{ H (e jω } ∑nN=−01 h(n) sin(ωn)


− tan(ωq) = = − ,
Re{ H (e jω } ∑nN=−01 h(n) cos(ωn)
Ljubiša Stanković Digital Signal Processing 287

or
N −1
∑ h(n)[sin(ωq) cos(ωn) − cos(ωq)sin (ωn)] = 0.
n =0

The last equation can be written as

N −1
∑ h(n) sin(ω (n − q)) = 0. (6.7)
n =0

The middle point of interval where h(n) ̸= 0 is n = ( N − 1)/2. If q = ( N −


1)/2, then sin(ω (n − q)) is an odd function with respect to n = ( N − 1)/2.
The summation (6.7) is zero if the impulse response h(n) is an even function
with respect to n = ( N − 1)/2. Hence, the solution of (6.7) is

N−1
q=
2

h(n) = h( N − 1 − n), 0 ≤ n ≤ N − 1.
Since the Fourier transform is unique, this is the unique solution for the
linear phase condition. It is illustrated for an even and odd N in Fig.6.20.
From the symmetry condition it is easy to conclude that there is no a causal
linear phase system with infinite impulse response.

6.2.2 Windows

When a system obtained from the design procedure is an IIR system and
the requirement is to implement it as an FIR system, in order to get a linear
phase or to guaranty the system stability (when small changes of coefficients
are possible), then the most obvious way is to truncate the desired impulse
response hd (n) of the resulting IIR system. The impulse response of the FIR
system is
!
hd (n) for 0 ≤ n ≤ N − 1
h(n) =
0 elsewhere.
This form can be written as

h ( n ) = h d ( n ) w ( n ),

where !
1 for 0≤n≤ N−1
w(n) =
0 elsewhere
288 Realization of Discrete Systems

q=16
h(n)

N=32

0 16 32
n

q=16.5
h(n)

N=33

0 16.5 33
n

Figure 6.20 Impulse response of a system with a linear phase for an even and odd N.

is the rectangular window function. In the Fourier domain the desired im-
pulse response truncation by a window function will mean a convolution of
the desired frequency response with the frequency response of the window
function
H (e jω ) = Hd (e jω ) ∗ W (e jω ).

Since the rectangular window function has a Fourier transform of the


form
N −1
sin(ωN/2)
W (e jω ) = ∑ e− jωn = e− jω ( N −1)/2
n =0
sin(ω/2)

its convergence is slow with significant oscillations. It will cause oscilla-


tions in the resulting frequency response H (e jω ), Fig.6.21. By increasing the
number of samples N the convergence speed will increase. However the
oscillations amplitude will remain the same, Figs.6.21 (d) and (f). Even with
N → ∞ the amplitude oscillations will remain, Figs.6.21 (b). This effect is
called the Gibbs phenomenon.

Example 6.7. A desired frequency response of a system is Hd (e jω ) with the IIR


hd (n) for −∞ < n < ∞. Find the FIR system impulse response hc (n) that
approximates the desired transfer function with a minimal mean absolute
squared error.
Ljubiša Stanković Digital Signal Processing 289

⋆The mean squared absolute error is


"π ' '2
1 ' '
e2 = 'Hd (e jω ) − Hc (e jω )' dω.

−π

According to Parseval’s theorem


"π ' '2 ∞
1 ' '
2
e = 'Hd (e jω ) − Hc (e jω )' dω = ∑ |hd (n) − hc (n)|2
2π n=−∞
−π

Without loss of generality, assume that the most significant values of hd (n)
are within − N/2 ≤ n ≤ N/2 − 1. The impulse response hc (n) can assume
nonzero values only within − N/2 ≤ n ≤ N/2 − 1. Therefore,
N/2−1 − N/2−1 ∞
e2 = ∑ |hd (n) − hc (n)|2 + ∑ |hd (n)|2 + ∑ |hd (n)|2 .
n=− N/2 n=−∞ n= N/2

Since the last two terms are hc (n) independent and all three terms are
non negative, the error e2 is minimal if