Notes Chapter2 PDF
Notes Chapter2 PDF
Discrete-Time Sequences
and Systems
Contents
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . 82
2.2 Sequences . . . . . . . . . . . . . . . . . . . . . . . . 84
2.3 Systems . . . . . . . . . . . . . . . . . . . . . . . . . 90
2.4 Analysis of Sequences and Systems . . . . . . . . . 98
2.5 Multirate Sequences and Systems . . . . . . . . . . 131
2.6 Stochastic Sequences and Systems . . . . . . . . . 147
2.7 Algorithms . . . . . . . . . . . . . . . . . . . . . . . 147
2.A Elements of Complex Analysis . . . . . . . . . . . . 149
2.B Elements of Algebra: Discrete Polynomials . . . . 151
Chapter at a Glance . . . . . . . . . . . . . . . . . . . . . . 153
Historical Remarks . . . . . . . . . . . . . . . . . . . . . . . 155
Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . 155
Exercises with Solutions . . . . . . . . . . . . . . . . . . . . 156
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
The key word in the title of this chapter is time, and the key property of time
is that it has an inherent direction; it goes from past to future. The word discrete
brings about yet another key concept—the time points are equidistant. To move
from one time point to the next, we use the shift operator. If we consider vectors
now to be sequences (the domain is discrete time), appropriate Hilbert spaces of
such sequences might be ℓ1 (Z), ℓ2 (Z) and ℓ∞ (Z), all corresponding to real physical
phenomena (finite power, finite energy, boundedness). The shift operator can be
applied repeatedly to such sequences, forming new sequences. Moreover, it generates
a whole space of operators we call discrete-time systems, which typically belong to
ℓ1 (Z) or ℓ2 (Z). As we will see later in the chapter, a shift induces convolution,
the operation of the discrete-time system on a sequence. Once these concepts are
0 Last edit: JK Mar 04 08.
81
82 Chapter 2. Discrete-Time Sequences and Systems
available (shift, sequence and system spaces, convolution), spectral theory allows us
to construct an appropriate Fourier transform.
All of the above discussion implicitly assumed that the underlying domain—
time, was infinite. While this is true, in practice, we do not observe infinite time,
and thus, typically, we only glimpse a finite portion of it. While one might think
that dealing with finite time is mathematically easier, a host of issues arises. We
discuss these throughout the chapter.
The purpose of this chapter is the study sequences in their different guises and
review methods for analyzing and processing such sequences.
2.1 Introduction
While sequences in the real world are often one-sided infinite (they start at some
initial point and then go on), for mathematical convenience, we look at them as
two-sided infinite:6
T
x = . . . x−2 x−1 x0 x1 x2 . . . . (2.1)
For example, if you measure some physical quantity every day at some fixed time
(for example, the temperature at noon in front of your house), you obtain a sequence
starting at time 0 (say January 14th) and continuing to infinity,
h iT
x = ... 0 32◦ 29◦ 30◦ ... . (2.2)
Implicit in the index is the fact that xn corresponds to the temperature (at noon)
on the nth day. A sequence is also known under the names discrete-time signal (in
signal processing) or time series (in statistics); mathematically, these are all vectors,
most often in an infinite-dimensional Hilbert space.
In real life, most things are finite, that is, we observe only a finite portion
of an infinite sequence. Moreover, computations are always done on finite inputs.
For our temperature example, serious observations started in the 18th century and
necessarily stop at the present time. Thus, we have a finite sequence of length N ,
T
x = x0 x1 x2 . . . xN −1 . (2.3)
Once we have a finite sequence, the questions immediately arises: where does it
come from? Is it a truly finite sequence, or, is it a piece of an infinite one? In
either case, how do we analyze such a sequence? As we will see later in the chapter,
this question immediately calls for a decision on what happens at the boundaries.
Do we assume everything outside the sequence support is zero? Do we extend it
periodically, symmetrically, ...?
While perhaps not a natural extension, a typical one is periodic; We periodize
the finite sequence and assume we are dealing with one period of a periodic sequence
6 The“boxing” of the origin is intended to serve as a reference point. When we deal with finite
vectors/matrices, this is not necessary; however, when these are infinite, knowing where the origin
is, is essential.
2.1. Introduction 83
with period N ∈ N:
x = [. . . x0 x1 . . . xN −1 x0 x1 . . .]T . (2.4)
| {z }
one period
While finite sequences in (2.3) and infinite periodic ones in (2.4) are clearly different
in nature, we will use the same types of tools to analyze them. We will assume that
both belong to some space on the domain {0, 1, . . . , N − 1} (say ℓ1 or ℓ2 ), with
circular boundary conditions, implicitly making even the first type periodic. When
we want to analyze finite sequences as windowed versions of infinite sequences, we
will do just that; we will assume such sequence are infinite in nature with only a
finite number of nonzero samples.
These considerations allow us to define two broad classes of sequences:
(i) Those with support in Z we will call infinite dimensional ; and
(ii) Those with support in {0, 1, . . . , N − 1} we will call finite dimensional.
Example 2.1 (Sequences). As an illustration:
• Infinite-Dimensional Sequences: The geometric sequence from (P1.20-1) with
x = 21 :
1 h iT
xn = ( )n , n ∈ Z, x = . . . 4 2 1 12 14 . . . , (2.5)
2
is infinite dimensional and not convergent (if we made it nonzero only for
n ≥ 0, it would be).
• Finite-Dimensional Sequences: The sequence obtained by tossing a fair coin
N times is finite dimensional:
h iT
x = h h t ... h .
Given sequences (signals, vectors), one can apply operators (systems, filters). These
map input sequences into output ones, and since they involve discrete-time se-
quences, they are usually called discrete-time systems (operators). Among them,
linear ones are most common. Even more restricted is the class of linear shift-
invariant systems (filters, defined later in the chapter), an example of which is the
moving average filter:
84 Chapter 2. Discrete-Time Sequences and Systems
Example 2.2 (Moving average filter). Consider our temperature example, and
assume we want to detect seasonal trends. The day-by-day variation might be too
noisy, and thus, we can compute a local average
N
X
1
yn = xn+k , n ∈ Z, (2.6)
2N + 1
k=−N
where N is a small integer. The “local” average eliminates daily variations; this
simple filter is linear and shift invariant, since at all n, the same local averaging is
performed.
Chapter Outline
The next several sections follow the progression of topics in this brief introduction:
We start by formally defining the various types of sequences we discussed above.
Section 2.3 considers linear discrete-time systems, especially of the shift-invariant
kind, which correspond to difference equations, the discrete-time analog of differen-
tial equations. Next, in Section 2.4, we develop the tools to analyze discrete-time
sequences and systems, in particular the discrete-time Fourier transform, the dis-
crete Fourier transform and the z-transform. We discuss the fundamental theorem
relating filtering to multiplication in Fourier domain—the convolution theorem.
Section 2.5 looks into discrete-time sequences and systems that operate with dif-
ferent rates—multirate systems, which are key for filter bank development in later
chapters. Then, we present discrete-time stochastic sequences and systems in Sec-
tion 2.6, while important algorithms for discrete-time processing, such as the fast
Fourier transform, are covered in Section 2.7. Appendix 2.A lists basic elements of
complex analysis, while Appendix 2.B discusses polynomial sequences.
2.2 Sequences
2.2.1 Infinite-Dimensional Sequences
The set of sequences as in (2.1), where xn is either real or complex, together with
vector addition and scalar multiplication, forms a vector space (see Definition 1.1).
The inner product between two sequences is defined as in (1.14), and induces the
standard ℓ2 , Euclidean norm given in (1.21a), with p = 2. Other norms of interest
are the ℓ1 -norm given in (1.21a) with p = 1, and the ∞-norm given in (1.21b).
As opposed to generic infinite-dimensional spaces, where ordering of indices
does not matter in general, discrete-time sequences belong to an infinite-dimensional
space where the order of indices is important, since it represents time (or space in
two dimensions).
Sequence Spaces
Space of Finite-Energy Sequences ℓ2 (Z) The constraint of a finite square norm
is necessary for turning a simple vector space into a Hilbert space of finite-energy
sequences ℓ2 (Z).
2.2. Sequences 85
Example 2.3 (Sequence spaces). Revisiting the sequences seen in Example 2.1,
we see that xn = αn , this time zero for n < 0, α ∈ R, is in the following spaces:
Geometry in ℓ2 (Z) We now recall a few “geometrical” facts from Chapter 1, valid
for sequences in ℓ2 (Z):
(i) As in (1.15),
hx, yi = kxk kyk cos θ,
where θ is the angle between the two infinite sequences (vectors).
(ii) As in (1.12), if the inner product is zero,
hx, yi = 0,
then either at least one of the sequences is identically zero, or they are said to
be orthogonal to each other.
(iii) As in (1.32), given a unit-norm sequence y, kyk = 1,
x̂ = hx, yi y
is the orthogonal projection of the sequence x onto the space spanned by the
sequence y.
Special Sequences
Dirac impulse Sequence The simplest and one of the most useful sequences is
the Dirac impulse sequence at location k (it is also defined in the Quick Reference
section at the beginning of the book)
1, for n = k;
δn−k = 1 . . .]T ,
δn−k = [. . . 0 0 . . . |{z} (2.7)
0, otherwise,
n=k
86 Chapter 2. Discrete-Time Sequences and Systems
where n, k ∈ Z. The set of Dirac impulses {δn−k }k∈Z along the discrete timeline
forms an ONB for ℓ2 (N). We can easily check that as (a) it is clearly an orthonormal
set, and (b) any sequence from ℓ2 (N) can be written as a linear combination of the
basis vectors ϕkn = δn−k :
!
X X X X
xn = hxn , ϕkn in ϕkn = xn δn−k δn−k = xk δn−k . (2.8)
k∈Z k∈Z n∈Z k∈Z
This identity, while seemingly trivial, might require a moment of thought: for any
n, a single term in the infinite sum that is different from zero is the one for k = n,
when the sum equals . . . xn ! A list of properties of this sequence is given in Chater
at a Glance.
This sequence is in ℓ∞ (Z) and in ℓ2 (Z), but not in ℓ1 (Z), since the sequence decays
as 1/n (see the illustration of the inclusion property (1.22) of ℓp spaces). The value
of sinc at t = 0 is obtained the same way as for the continuous-domain sinc, leading
to:
sincT,0 = 1. (2.12)
that is, a unit-step sequence at the origin. As this sequence is bounded, it belongs
to ℓ∞ (Z), but not to ℓ1 (Z) or ℓ2 (Z). The two sequences we introduced so far—Dirac
and Heaviside—are related (via “integration” or “differentiation”):
n
X
un = δk .
k=−∞
2.2. Sequences 87
Figure 2.1: A sinusoidal sequence and its windowed versions using a (a) rectangular
window and a (b) raised cosine window.
Window Sequences Most often, both because of real-world considerations and for
mathematical convenience, a finite-length sequence is seen as a glimpse of an infinite
sequence. One way to state this is by introducing a rectangular window sequence
as the indicator sequence of {0, 1, . . . , N − 1},
1, 0 ≤ n ≤ N − 1;
wn = w = [. . . 0 1 1 . . . 1 0 . . .]. (2.14)
0, otherwise, | {z }
N
Then, we can define an infinite sequence y with values given by (2.3) for n ∈
{0, 1, . . . , N − 1}, and arbitrary otherwise,
xn , 0 ≤ n ≤ N − 1;
yn = y = [. . . y−1 x0 x1 . . . xN −1 yN . . .].
arbitrary, otherwise, | {z }
N
These sequences are periodic with period N , and their linear combinations span the
space of all N -periodic sequences. In Exercise 2.1, we explore a few properties of
complex exponential sequences and their periodicity.
xnm , n, m ∈ Z, (2.18)
the sequence.
9 A megapixel is either a true set of 1000 by 1000 pixels, or more often a combination of 500 000
while the ℓ -norm and the appropriate space ℓ2 (Z2 ) are given in Table 2.1 (together
2
with other relevant norms and spaces). For example, a digital picture, having finite
size and pixel values that are bounded, clearly belongs to all three spaces defined in
Table 2.1. Infinite multidimensional sequences, on the other hand, can be trickier
to analyze.
Example 2.5 (Norms of two-dimensional sequences). Consider the sequence
1
xnm = , n, m ∈ N.
2n 3m
Its ℓ2 -norm can be evaluated as
XX 1 1 4 X 1 4 9 3
hx, xi = n m
= = = , (2.21)
4 9 3 9m 3 8 2
n∈N m∈N m∈N
p
yielding kxk = 3/2. Similarly, kxk1 = 3 and kxk∞ = 1.
Three-Dimensional Sequences
Higher-dimensional objects are also possible; we briefly consider the three-dimensional
case, video, for example. A video sequence is a sequence of digital pictures we rep-
resent as:
xnmk , n ∈ {0, 1, . . . , N − 1}, m ∈ {0, 1, . . . , M − 1}, k ∈ Z, (2.22)
90 Chapter 2. Discrete-Time Sequences and Systems
Figure 2.2: Multidimensional data sets. (a) Two-dimensional sequence (image), with the
first quadrant indicated, as well as a finite N × M digital picture. (b) Three-dimensional
sequence (video).
where N × M is the size of the individual picture in the sequence, while k is a time
index (assumed here to be doubly infinite). The size of multidimensional sequences
grows as the product of the sizes in each dimension. For example, a video sequence
in (2.22) with k ∈ {0, 1, . . . , K − 1}, has N M K pixels, which quickly leads to
enormous amounts of data. Figure 2.2 gives examples of two- and three-dimensional
sequences.
2.3 Systems
Discrete-time systems are operators having discrete-time sequences as inputs and
outputs. Among all discrete-time systems, we will concentrate on the subclass of
linear systems, in particular, linear and shift-invariant (LSI) systems. This last
class is both important in practice and amenable to easy analysis. The moving
average filter in (2.6) is such an LSI system. After an introduction to difference
equations, which are natural descriptions of discrete-time systems, we study LSI
systems in detail. We then turn our attention to shift-varying systems and an
important subclass, linear periodically shift-varying systems.
yn = Tn x. (2.23)
The subscript n in Tn indicates that the operator may be changing over time. While
in the above, Tn operates only on x, in general, it can operate both on x and y.
While this may seem self-referential, it can be done as long as yn is computable.
As a discrete-time system Tn is an operator, everything we learned in Chap-
ter 1 about operators (in particular, linear operators) holds here. In general, oper-
ators map a sequence from H1 to H2 , while here, we stay in the same Hilbert space
H, space of sequences.
2.3. Systems 91
Basic Systems
Shift The shift-by-k operator is defined as:
yn = T x = xn−k , (2.24a)
. . . x−1 x0 x1 . . . → . . . xk−1 xk xk+1 ... . (2.24b)
which simply delays xn by k samples. While this is one of the simplest discrete-time
systems, it is also the most important, as the whole concept of time processing is
based on this simple operator. The shift-by-one is usually termed a delay.
Modulation While the shift we just saw is the shift in time, modulation is shift
in frequency (as we will see later in this chapter). A modulation by a sinusoid of
frequency ω0 , is given by (we use the cosine here)
yn = T x = cos(ω0 n) xn . (2.25)
For those already familiar with Fourier analysis, (2.25) shifts the spectrum of x to a
position ω0 in frequency (and to a corresponding negative frequency −ω0 ). Imagine
xn = α, for all n. Assume now ω0 = π. The corresponding cos(ω0 n) becomes
cos(πn) = (−1)n . Thus, a constant sequence xn turns into a fast-varying sequence
xn = (−1)n α (shifted in frequency to higher frequency):
... α α α α α ... → . . . α −α α −α α . . . .
Hard Limiter Given a bound ∆, the hard limiter computes the following output:
∆, xn ≥ ∆;
yn = T x = −∆, xn ≤ −∆; (2.26)
xn , otherwise,
h iT
[. . . x−2 x−1 x0 x1 x2 . . .]T → . . . x−2 ∆ ∆ x1 −∆ . . . .
|{z} |{z} |{z}
≥∆ ≥∆ ≤∆
Linear Systems
Definition 2.1 (Linear system). A discrete-time system is linear if Tn is linear,
that is, if it satisfies Definition 1.16.
For the examples above, it is easy to verify that except for the hard limiter, the
systems are linear.
92 Chapter 2. Discrete-Time Sequences and Systems
Memoryless Systems
Definition 2.2 (Memoryless system). A system y = Tn x is memoryless, if its
output yn at time n depends only on the input xn at time n:
yn = T xn . (2.27)
In the examples seen previously, the modulation and the hard limiter are memory-
less, while the two others are clearly not.
Shift-Invariant Systems
Definition 2.3 (Shift-invariant system). Given an input xn and an output
yn , a system is shift invariant if a shifted input produces a shifted output:
The above implies that the operator Tn in (2.23) cannot be dependent on time,
and thus Tn = T . Shift invariance is often a very desirable property. For example,
listening to a piece of music on an MP3 player should produce the same music the
first as well as the seventh time. Moreover, shift-invariant systems have desirable
mathematical properties, especially when they are also linear. Among the examples
studied earlier, only modulation is not shift invariant.
Causal Systems
Definition 2.4 (Causal system). A causal system is a system whose output at
time n depends only on the present and past inputs:
yn = Tn xk , k ≤ n. (2.29)
We will see once we define the impulse response of a system, that causality implies
that the impulse response hn satisfies hn = 0 for all n < 0. If the domain of our
function is time, then any real-world system will necessarily be causal. There are
no real systems where the output can depend on future inputs, unless the input is
completely deterministic and known in advance (for example, it is a constant). Note
that causality is a property of discrete-time systems and not of sequences. However,
by abuse of language, we often refer to sequences which are nonzero only for positive
n as causal sequences, meaning they could be impulse responses of causal systems.
Often times this can lead to confusion since we will try to interpret the statement
of causality as “there is no future” and thus will think that the past in the sequence
is expressed on the right side of the origin. Of course, this is not true, as a sample
at (n + 1) definitely comes after the sample at n.
Stable Systems
While there are various definitions of stability for systems, we consider bounded
input bounded output (BIBO) stability exclusively.
2.3. Systems 93
Definition 2.5 (BIBO stability). A system is BIBO stable if, for every bounded
input x ∈ ℓ∞ (Z), the input y = Tn x is bounded as well:
In the four example systems seen at the start of the section, the first three are BIBO
stable, while the accumulator is not, since, for example, a constant input xn = 1
will lead to an unbounded output.
X ∞
X
(n) (n)
yn = ak xn−k + bk yn−k .
k∈Z k=1
(n) (n)
If we require shift invariance, then the coefficients ak and bk are constant, and
we get a linear, constant-coefficient difference equation. To make the system causal,
we restrict the inputs xn to the current and past inputs, leading to
∞
X ∞
X
yn = ak xn−k + bk yn−k . (2.31)
k=0 k=1
To find the solution to such a difference equation, we follow a similar path as for
ordinary differential equations.
10 In this discussion, we concentrate on sequences where the index n corresponds to time, and
one solves the system forward in time, as is natural in causal systems. A general treatment of
difference equations involves also anti-causal solutions, obtained by solving backward in time.
94 Chapter 2. Discrete-Time Sequences and Systems
where λnk are obtained by solving the characteristic equation of the system
N
X
bk λN −k = 0. (2.33c)
k=1
(p)
• Particular solution: Then, any particular solution to (2.32), yn , is found
(h) (h)
(independent of yn ). This is typically done by assuming that yn is of the
same form as xn , possibly scaled.
(h)
We determine the coefficients βk in yn by specifying initial conditions for yn
and then solving the system.
which is of the form (2.32), with a0 = 1, b1 = 1. The infinite sum has been turned
into a recursive formula, which now requires initial conditions. For example, assume
the system starts at n = 0, with initial condition y−1 given:
n
X
yn = y−1 + xk , n ∈ N.
k=0
From the above example, we see that unless the initial conditions are zero, the
system is not linear. Similarly, the system is shift invariant only if the initial
conditions are zero. These properties are fundamental and hold beyond the case
of the accumulator: difference equations as in (2.32) are linear and shift invariant
if and only if initial conditions are zero. This also means that the homogeneous
solution is necessarily zero (the proof is left as Exercise 2.2).
This is called the impulse response of the LSI difference equation and can be seen
as the output (response) of the system to the Dirac impulse input.
Convolution
If the input is an impulse at time ℓ, or δn−ℓ , then the output is delayed by ℓ:
∞
X ∞
X ∞
X
yn = ak δn−ℓ−k + bk yn−k = an−ℓ + bk yn−k , = hn−ℓ ,
k=0 k=1 k=1
for n => ℓ, since, by shift invariance, it is the solution of the difference equation,
but starting at time ℓ. We can use the superposition principle, since the system is
linear, and use the decomposition of the input sequence seen in (2.8) but now for
two-sided sequences: X
xn = xk δn−k ,
k∈Z
This is the convolution 11 of the input sequence xn with the impulse response hn of
the system, denoted by (h ∗ x) (symmetric in xn and hn ). When not obvious, we
will use subscript to denote theP argument over which we perform the convolution
(2.36). For example, the sum k xk hn−k−ℓ will be (xk ∗ hn−k−ℓ )k .
Example 2.7 (Solution of LSI difference equations). Consider the differ-
ence equation
yn = a0 xn + b1 yn−1 , n ∈ N,
with zero initial conditions, y−1 = 0. The impulse response, or solution for the
input x = δn , is
T
h = . . . 0 a0 b1 a0 b21 a0 b31 a0 . . . .
If the input is delayed by k samples, x = δn−k , the output is
y = [. . . 0 0 0 . . . 0 a0 b1 a0 b21 a0 . . .],
| {z }
k
Filters The impulse response plays a key role (2.35); an LSI difference equation
(with zero initial conditions) is entirely specified by its impulse response. The
impulse response is often called a filter and the convolution is called filtering. Here
are some basic classes of filters:
• Causal filters: are such that hn = 0, n < 0. This corresponds to a causal
solution of a difference equation.
• Anticausal filters: are such that hn = 0, n > 0.
• Two-sided filters: are neither causal nor anticausal.
• Finite impulse response filters (FIR): have only a finite number of coefficients
hn different from zero.
• Infinite impulse response filters (IIR): have an infinite number of nonzero
terms. For example, the impulse response in Example 2.7 is causal and IIR.
Figure 2.4: Example of the convolution between a sequence and a filter. (a) Sequence xn .
(b) Impulse response hn . (c)–(e) Various time-reversed or shifted versions of the impulse
response. (f) Output y = (h ∗ x).
where (a) follows from (2.36); (b) from the triangle inequality (Definition 1.7); (c)
from x ∈ ℓ∞ (Z); and (d) from h ∈ ℓ1 (Z), proving that y is bounded.
We prove necessity (BIBO stability implies absolute summability) by contra-
diction. For any hn that is not absolutely summable we choose a particular input
xn (that depends on hn ), to create an unbounded output. Consider a real impulse
98 Chapter 2. Discrete-Time Sequences and Systems
Among examples we have seen so far, the accumulator does not belong to
ℓ1 (Z), and can lead to unbounded outputs. Example 2.7, for |b1 | < 1, leads to an
absolutely-summable geometric series, and thus a BIBO-stable filter. For |b1 | > 1,
any nonzero input leads to an unstable system. Lastly, for |b1 | = 1 (which means
+1 or −1 for b1 real), the system is not BIBO stable either.
Among spaces we considered for our filters, two are most often used: (a) ℓ1 (Z)
as it ensures BIBO stability and (b) CN (or RN ) when sequences on which we
operate are truly finite.
a 2π-periodic function X(ejω ), with the argument, ejω , a complex number of mag-
nitude 1. The extension to more general complex arguments is the z-transform (ZT)
X(z), and we discuss when such a generalization makes sense. We then discuss the
discrete Fourier transform (DFT)—the Fourier transform for both infinite periodic
sequences as well as finite sequences with integer period N (both of these can be
viewed as existing on a “discrete” circle of length N ). The sequence is thus specified
by one of its periods; this also allows us to analyze the system as if it were finite
dimensional of size N (with appropriate boundary considerations). The transform
is then finite dimensional of the same size, and denoted as Xk . Both DTFT as well
as DFT will then have a corresponding matrix/vector product (infinite for DTFT
and finite for DFT). We end the section by discussing some real-world issues, in
particular, when to use which transform.
The above is true for any vω ∈ Hω , and thus, that space does not change under the
operation of convolution, making it an eigenspace.
Finding the appropriate Fourier transform of x now amounts to projecting x
onto each of the eigenspaces Hω :
DTFT Vs Frequency Response The DTFT is defined for sequences and we use
spectrum to denote their DTFTs. The frequency response is defined for filters
(systems), and thus, strictly speaking, “DTFT of a filter” or the “spectrum of a
filter” are not correct. However, by abuse of language, as the form of the DTFT
of a sequence (2.45a) and the frequency response of a filter (2.43) are the same, we
often interchange the two; this is fine as long as we keep in mind the fundamental
difference between them.
13 We follow a somewhat redundant practice in signal processing of explicitly showing the peri-
where the subscript N indicates the boundaries of the summation. This can be seen
as a partial sum, and the DTFT as the limit of XN as N → ∞, assuming the limit
exists.
• If x ∈ ℓ1 (Z), then X(ejω ) is bounded, since
X (a) X
X(ejω ) =
xn e−jωn ≤ |xn | ejωn = kxk1 < ∞,
n∈Z n∈Z
where (a) follows from the triangle inequality. To verify the inversion formula,
note that from the definitions (2.45a) and (2.45b), we have
Z π X X Z π
1 1
xn = xk e−jωk ejωn dω = xk ejω(n−k) dω.
2π −π 2π −π
k∈Z k∈Z
Figure 2.5: Ideal lowpass filter. (a) Impulse response of an ideal lowpass filter. (b)
Magnitude response of an ideal lowpass filter. (c) Impulse response of an ideal highpass
filter. (d) Magnitude response of an ideal highpass filter. (e) Impulse response of an idea
bandpass filter. (f) Magnitude response of an ideal bandpass filter.
Figure 2.6: DTFT of the truncated impulse response of the ideal lowpass filter, illustrat-
ing the Gibbs phenomenon. Shown are HN (ejω ) for N = 10, 100 and 1000.
For this design example, we set the phase to zero. Applying the inverse DTFT15
given in (2.45b), we obtain the impulse response as
Z ω0 ω
1 1 jωn 0 1 ejω0 n − e−jω0 n 1 sin(ω0 n)
hn = ejωn dω = e = = .
2π −ω0 2πjn −ω0 π 2jn π n
In the above example, we saw the lack of uniform convergence, and the poten-
tially disturbing oscillations around points of discontinuity due to the Gibbs’ phe-
nomenon. Fortunately, there is mean-square convergence; Given a 2π-periodic func-
tion H(ejω ), square integrable on a period, and its coefficients hn from (2.45b), the
truncated DTFT is
XN
HN (ejω ) = hn e−jωn .
n=−N
15 The inverse frequency response is equal to the inverse IDTFT.
2.4. Analysis of Sequences and Systems 103
While the limit of HN (ejω ) is not necessarily equal to H(ejω ) everywhere, it is equal
almost everywhere.
Example 2.9. When sequences are not in ℓ1 (Z) or ℓ2 (Z), one needs to be careful
about associativity, as the following counterexample shows: Take the Heaviside
sequence from (2.13) an = un . As the second sequence, choose the first-order
differencing sequence bn = δn − δn−1 . Finally, choose as cn = 1, the constant
sequence. Note that neither an nor cn is in ℓ1 (Z). Now,
(a ∗ (b ∗ c)) = (a ∗ 0) = 0,
while
((a ∗ b) ∗ c) = (δn ∗ cn )n = 1.
Thus, the convolution of these particular sequences is not associative.
Modulation Given sequences x and h, their product maps into the convolution of
their spectra in the DTFT domain,
1
DT F T
xn hn ←→
(X ∗ H)ω , (2.51)
2π
where the convolution of the 2π-periodic spectra is defined as
Z π
(X ∗ H)ω = X(ejθ )H(ej(ω−θ) ) dθ. (2.52)
−π
To verify this formula, recall that the left-hand side is equal to the central term a0 in
the autocorrelation (2.53). Inverting the spectrum and using the inversion formula
(2.45b) leads to the desired result. Similarly, generalized Parseval’s relation can be
written as Z π
X 1
xn h∗n = X(ejω )H ∗ (ejω) dω, (2.56b)
n
2π −π
Figure 2.7: Moving average filter (2.6). (a) Impulse response (2.59a). (b) Frequency
response (2.59b).
where (a) follows from (P1.20-6). Figure 2.7 shows the impulse response and fre-
quency response of this filter for N = 7.
from which
H(ejω ) = 1, arg(H(ejω )) = ωk mod 2π.
Since all frequencies are going through without change of magnitude, this is an
example of an allpass filter. In addition, it has linear phase with a slope k given by
the delay.
An example of both a more sophisticated allpass filter, as well as the fact
that while key properties are sometime not plainly visible in the time domain, they
become obvious in the frequency domain, is
h iT
g n = an u n , g = ... 0 1 a a2 a3 ... ,
where a is real or complex with |a| < 1, and un is the Heaviside sequence from
(2.13). Now, construct
hn = −a∗ gn + gn−1 .
We will show that filtering a sequence x with h will not change its magnitude, and
that, moreover, h is of norm 1 and orthogonal to all its shifts
DT F T
H(ejω ) = 1 ←→ hhn , hn−k in = δk .
ejω − a∗
H(ejω ) = −a∗ G(ejω ) + e−jω G(ejω ) = . (2.60)
1 − ae−jω
2.4. Analysis of Sequences and Systems 107
The magnitude remains unchanged, from which the name—allpass filter—is derived.
As to be expected, this also corresponds to energy conservation, since using
Parseval’s relation (2.56a), we have
Z π
1 1
jω
kH(e )X(e )k =jω 2 H(ejω )X(ejω )2 dω
2π 2π −π
Z π
1
= X(ejω )2 dω = kxk2 .
2π −π
Finally, let us show that H(ejω ) = 1 implies that the impulse response hn
is orthogonal to all its shifts. Using the generalized Parseval’s relation (2.56b) and
DT F T
hn−k ←→ e−jωk H(ejω ):
X Z π
(a) 1 ∗
hhn , hn−k in = hn h∗n−k = H(ejω ) e−jωk H(ejω ) dω
n
2π −π
Z π Z π
1 (b) 1
= ejωk H(ejω )H ∗ (ejω ) dω = ejωk |H(ejω )|2 dω
2π −π 2π −π | {z }
1
Z π jkπ −jkπ
1 e −e (c) sin kπ (d)
= ejωk dω = = = δk ,
2π −π 2jkπ kπ
where (a) follows from the generalized Parseval’s relation (2.56b); (b) from our
assumption; (c) from Euler’s formula (2.163); and (d) from the properties of the
sinc function (1.68). Therefore, the set {ϕkn = hn−k }k∈Z forms an orthonormal set
in ℓ2 (Z). To check whether it is ONB, we check if we can write any xn as
X X
xn = αk ϕkn = αk hn−k ,
k∈Z k∈Z
with αk = hxn , hn−k in , for which, it is sufficient to verify that kαk = kxk. Write
α as X X
αk = xn hn−k = xn h−(k−n) = (xn ∗ h−n )n .
n∈Z n∈Z
We now prove kαk = kxk:
(a) (b) (c)
kαk2 = kX(ejω )H ∗ (ejω )k2 = kX(ejω )k2 = kxk2 ,
where (a) follows from the convolution theorem (2.50), Parseval’s equality (2.56a)
and (2.54); (b) from h being an allpass filter; and (c) from Parseval’s equality again.
Figure 2.8 shows the phase of H(ejω ) given in (2.60).
108 Chapter 2. Discrete-Time Sequences and Systems
The above example contains a piece of good news—there exist shift-invariant ONBs
for ℓ2 (Z), as well as a piece of bad news—these bases have no frequency selectivity
(they are allpass sequences). This is one of the main reasons to search for more
general ONBs for ℓ2 (Z), as will be done in Part II of the book.
where X
H(r) = hn r−n (2.61)
n∈Z
is now the counterpart of the frequency response in (2.43), and is well defined for
values of r for which hn r−n is absolutely summable.
This sets the stage for an extension of the DTFT to a larger class, those based
on exponential sequences of the form
z = rejω ,
2.4. Analysis of Sequences and Systems 109
where r ≥ 0 is the magnitude, ω the phase, and the associated transform is called
the z-transform:
Definition 2.7 (z-transform). Given a sequence x, the power series
X
X(z) = xn z −n , z = rejω , r ∈ R+ , ω ∈ [−π, π), (2.63)
n∈Z
Sequence ROC
Table 2.2: Some properties of the ROC of the z-transform. A right-sided sequence is
zero for some n < N , and a left-sided sequence is zero for some n > N , with N arbitrary
but finite.
Figure 2.9: ROC for Example 2.12. (a) The right-sided sequence, α < 1. (b) The
left-sided sequence, α < 1.
with the ROC = {z | |z| > |α|}. Now, z = α is a pole (zero of the denominator)
of the complex function X(z), and we see that the ROC is bounded from
inside by a circle containing the pole. This is a general property, since the
ROC cannot contain a singularity where X(z) does not exist.
(iii) The left-sided geometric series has the following z-transform pair:
ZT
X 1
xn = −u−n−1 αn ←→ X(z) = (αz −1 )n = , (2.67)
1 − αz −1
n∈N
with the ROC = {z | |z| < |α|}. The expression for X(z) is exactly as in
the previous case; the only difference is in the ROC. Had we been given only
the this X(z) without the associated ROC, we would not be have been able
to tell whether it originated from x in (2.66) or (2.67). This shows why the
z-transform and its ROC form a pair that should not be broken.
A standard way of showing the ROC is a picture of the complex plane,
see Figure 2.9. Note the importance of the unit circle z = ejω .
A number of useful z-transforms are given in Table 2.3.
z-transform and the DTFT Given a sequence x and its z-transform X(z), with
an ROC that includes the unit circle |z| = 1, the z-transform evaluated on the unit
circle is equal to the DTFT of the same sequence:
Conversely, given a sequence x scaled by rn and its DTFT X(rejω ), for all
values of r for which it is absolutely summable, the DTFT of that scaled sequence
is equal to the z-transform of the same sequence evaluated on the circle z = rejω :
Rational z-transforms
An important class of z-transforms are those that are rational functions, since z-
transforms of most realizable systems (systems that can be built and used in prac-
2.4. Analysis of Sequences and Systems 111
δn 1 all z
δn−k z −k all z except possibly
z = 0 (for k > 0)
or z = ∞ (for k < 0)
Table 2.3: Commonly encountered sequences and their z-transforms with the associated
ROCs.
where the form of the factorization shows explicitly both the roots as well as the
multiplicative factor h0 .
The rational z-transform in (2.70) can thus also be written as
Q
a0 M k=1 (1 − zk z
−1
)
H(z) = QN , (2.72)
b0 k=1 (1 − pk z ) −1
17 The fundamental theorem of algebra (see Theorem 1.8) states that a degree-M polynomial
Figure 2.10: Simple discrete-time system, where z −1 stands for a unit delay.
where {zk }M N
k=1 are the zeros and {pk }k=1 are the poles of the rational function.
(Without loss of generality, we can set b0 = 1.) The ROC cannot contain any
poles, and is thus, assuming a right-sided sequence, outside of the pole largest in
magnitude. If M is smaller than N , then H(z) has additional (N − M ) zeros at
0. This can be best seen on our previous example (2.66), which can be written as
1/(1 − αz −1 ) = z/(z − α) and has thus a pole at z = α and a zero at z = 0.
In other words, the impulse response of the difference equation (2.32) (when xn = δn
or X(z) = 1), is given by a rational H(z) in the ZT domain. That is, the impulse
response of a linear discrete-time system with a finite number of coefficients has a
rational z-transform.
Example 2.13 (Transfer function). Consider the simple system in Figure 2.10,
where the z −1 operators stand for unit delays. The output yn and the associated
transfer function are:
1 + a1 z −1
yn = xn + a1 xn−1 − b1 yn−1 − b2 yn−2 ⇒ H(z) = .
1 + b1 z −1 + b2 z −2
Proof. By what we have just seen, the z-transform of the transfer function of such
a system is a rational function H(z) = A(z)/B(z). We assume that any pole-zero
cancellation has been done (reduced system),18 as well as that N > N . Using
partial fraction expansion, we can write H(z) as a sum of first-order terms
N
X αk
H(z) =
1 − pk z −1
k=1
when all poles are distinct. (In the case of multiple poles, powers of (1 − pk z −1 ) are
involved.) Each pole pk leads to a geometric series (pk )n , and thus
N
X
hn = αk pnk .
k=1
Each term in the above sum is absolutely summable if |pi | < 1. Since hn is a
finite sum of such terms, the sum is absolutely summable as well, and according to
Proposition 2.1, the system is BIBO stable.
Inverse z-transform
Given a z-transform and its ROC, what is the time-domain sequence, how do we
invert the z-transform? The question is all the more important as we have seen
that only when the z-transform is accompanied by it ROC can we say which se-
quence it originated from without ambiguity. The general inversion formula for
the z-transform involves contour integration, a standard topic of complex analysis.
However, most z-transforms encountered in practice can be inverted using simpler
methods which we now discuss; for a more detailed treatment inverse z-transform,
Further Reading gives pointers.
Inversion Using Partial Fraction Expansion This method works when the z-
transform is given as ratio of two polynomials as in (2.70), which can also be
expressed as in (2.72).
18 While in real systems, pole-zero cancellation can be a delicate issue, we do not discuss it here.
114 Chapter 2. Discrete-Time Sequences and Systems
• When M < N , we have (N − M ) zeros. If, moreover, all the poles are first
order, we can express X(z) as
N
X Ak
X(z) = , Ak = (1 − dk z −1 )X(z)z=d . (2.75)
1 − dk z −1 k
k=1
where, depending on the ROC we are given, each xk will be either (dk )n un or
−(dk )n u−n−1 .
• When M ≥ N , then we can write X(z) as
M−N
X N
X Ak
X(z) = Bk z −k + . (2.77)
1 − dk z −1
k=0 k=1
Inversion Using Power-Series Expansion This method is most useful for finite-
length sequences. For example, given X(z) = (1 − z −1 )(1 − 2z −1 ), we can expand
it in its power-series form as
X(z) = 1 − 3z −1 + 2z −2 . (2.82)
Knowing that each of the elements in this power series corresponds to a delayed
Dirac impulse, we can read directly that the sequence is
xn = δn − 3δn−1 + 2δn−2 . (2.83)
2.4. Analysis of Sequences and Systems 115
T
Convolution Given a length-N sequence x = x0 x1 . . . xN −1 and a length-
T
M impulse response h = h0 h1 . . . hM−1 , their convolution is given by
116 Chapter 2. Discrete-Time Sequences and Systems
Example 2.16 (DTFT does not work, z-transform works). Given are
xn = un , hn = αn un , 0 < α < ∞,
where un is the Heaviside sequence from (2.13). We would like to compute the
convolution y = (h ∗ x), where x is not absolutely summable, and for α ≥ 1, neither
is h. While using the DTFT does not seem to be a viable option, for |z| > max{α, 1},
the z-transforms of both x and h are well defined:
1 1
X(z) = , |z| > 1, H(z) = , |z| > α,
1 − z −1 1 − αz −1
and thus
1
Y (z) = , |z| > max{α, 1}.
(1 − αz −1 )(1 − z −1 )
By partial fraction expansion, we can rewrite Y (z) as
A B
Y (z) = + ,
(1 − αz −1 ) (1 − z −1 )
1 − αn+1
yn = Aαn un + Bun = un .
1−α
As a sanity check, we can compute the time-domain convolution directly:
X ∞
X n
X 1 − αn+1
yn = xk hn−k = hn−k = αn−k = , n ≥ 0,
1−α
k∈Z k=0 k=0
and is 0 otherwise. When α > 1, yn is unbounded as well, but the z-transform Y (z)
exists for |z| > α.
19 Again, for historical reasons, the polynomial is in z −1 , but one can think of x = z −1 .
2.4. Analysis of Sequences and Systems 117
Example 2.17 (DTFT does not work, z-transform does not work either).
Here is an example where even the z-transform does not help:
xn = 1, n ∈ Z, hn = αn un , 0 < α < 1.
In sequence domain,
X X 1
yn = (h ∗ x)n = hn xk−n = αn = .
1−α
n∈N n∈N
However, because xn is two-sided and not absolutely summable on either side, there
is no z for which the z-transform converges, thus leading to an empty ROC. This
prohibits the use of the z-transform for the computation of this convolution.
with the special case of possibly double zeros at z = ±1. There are no poles
on the unit circle.
Proof.
The proof follows from the following two facts:
20 By 1/ROCx , we denote the set {z|z −1 ∈ ROCx }.
118 Chapter 2. Discrete-Time Sequences and Systems
pi pole ⇒ p−1
i pole
A(z −1 ) = A(z) ⇒ (2.88b)
zi zero ⇒ zi−1 zero
p∗i pole
pi pole ⇒ ⇒ (p∗i )−1 pole,
p−1
i pole
Thus, both X(z) and X(z −1 ) have zi as a zero, leading to double zeros on the
unit circle.
zeros double on the unit circle ⇒ xn stable, real: TBD.
Spectral Factorization The particular pattern of poles and zeros which character-
ize a rational autocorrelation lead to a key procedure called spectral factorization.
It is essentially taking the square root of A(ejω ), and by extension, of A(z), factoring
it into rational factors X(z) and X(z −1 ).21
Instead of proving the theorem, we discuss the actual procedure, based on the results
of Proposition 2.3. As A(z) is rational, it is of the form (2.72), with poles and zeros
p
21 Note that since A(ejω ) ≥ 0 and real, one could write X(ejω ) = A(ejω ). However, such a
spectral root will in general not be rational.
2.4. Analysis of Sequences and Systems 119
Figure 2.11: Pole/zero locations of rational autocorrelations. (a) Zero locations, with
double zeros on the unit circle. (b) Pole locations.
being poles and zeros of X(z). Thus, spectral factorization amounts to assigning
poles and zeros from quadruples and pairs (2.87a)-(2.87c), to X(z) and X(z −1 ).
For the poles, there is a unique rule: take all poles inside the unit circle and
assign them to X(z). This is because x stable requires X(z) to have only poles
inside the unit circle (Proposition 2.2), while x real requires the conjugate pairs be
kept together.
For the zeros, there is a choice, since we are not forced to only assign zeros
inside the unit circle to X(z). Doing so, however, creates a unique solution called
the minimum-phase solution.22 It is now clear why it is important that the zeros
on the unit circle appear in pairs: it allows for the assignment of one each to X(z)
and X(z −1 ).
(i) A finite symmetric sequence that has spectral factors, showing zero locations.
(ii) An infinite symmetric sequence that has spectral factors, showing pole loca-
tions.
(iii) A symmetric, finite-length sequence that is not always positive on the unit
circle, and is therefore not an autocorrelation, showing the necessity of positive
semidefinitiveness.
with ROC containing 1/ROCx ∩ ROCh . The proof of this is left as an exercise.
delay, or that the sequence is most concentrated towards the origin of time.
120 Chapter 2. Discrete-Time Sequences and Systems
L−1
X
H(z) = hn z −n ,
n=0
Linear Phase Filters An important subclass of FIR filters are linear phase filters,
obtained when filters (of length L) possess certain symmetries:
symmetric antisymmetric ZT
←→ H(z) = ±z −L+1H(z −1 ), (2.90)
hn = hL−1−n hn = −hL−1−n
L−1 L/2−1
X X
jω −jωn
H(e ) = hn e = hn e−jωn + e−jω(L−1−n)
n=0 n=0
L/2−1
X
= hn e−jω(L−1)/2 ejω(n−(L−1)/2) + e−jω(n−(L−1)/2)
n=0
L/2−1
X L−1
=2 hn cos ω(n − 12 (L − 1)) e−jω 2 = rejaω ;
n=0
because of symmetry, the sum is real with a single phase factor making it linear.
Allpass Filters The basic single-zero/single-pole allpass building block has the z-
transform was given in (2.60) in Example 2.11:
z −1 − a∗
H(z) = , (2.91)
1 − az −1
2.4. Analysis of Sequences and Systems 121
Figure 2.12: Filters with symmetries. (a) Symmetric filter of even length. (b) Symmetric
filter of odd length. (c) Antisymmetric filter of even length. (d) Antisymmetric filter of
odd length.
Figure 2.13: Magnitude response of a 17-tap, symmetric filter designed with the Parks-
McClellan algorithm, and approximating a lowpass filter.
with the zero (a∗ )−1 and pole a. For stability, |a| < 1 is required. A more general
allpass filter is formed by cascading these elementary building blocks as
YN
z −1 − a∗i −N A∗ (z
−1
)
H(z) = −1
= z , (2.92)
i=1
1 − a i z A(z)
YN N
−1 z −1 − a∗i Y z − ai
P (z) = H(z)H∗ (z ) = = 1.,
i=1
1 − ai z −1 i=1 1 − a∗i z
and thus, an allpass filter has an autocorrelation function with pm = δm and P (z) =
P (ejω ) = 1. Poles and zeros appear in pairs as {a, (a∗ )−1 } = {r0 ejω0 , 1/r0 ejω0 } for
some real r0 < 1 and angle ω0 . They appear across the unit
circle at reciprocal
magnitudes, and is the reason why the magnitude H(ejω ) is not influenced, but
phase is, as shown in Figure 2.14.
122 Chapter 2. Discrete-Time Sequences and Systems
Circular Convolution Take now an LSI filter with impulse response h ∈ ℓ2 (Z).
The convolution of a periodic input xn with hn leads to a periodic output of the
2.4. Analysis of Sequences and Systems 123
and, according to Proposition 2.1, the output is bounded. Therefore, the convolu-
tion y = (h ∗ x) when xn is periodic of period N is a map from RN (or CN ) to RN
(or CN )).
We want to describe this map based on the impulse response hn . While hn is
not periodic, each subsequent piece of length N sees an identical piece of the input.
More precisely, breaking the time index into pieces of length N , or k = ℓN + m
where m ∈ {0, 1, . . . , N − 1},
X (a) X NX
−1
yn = xn−k hk = xn−ℓN −m hℓN +m
k∈Z ℓ∈Z m=0
N
X −1 X N
X −1
(b) (c)
= xn−m hℓN +m = xn−m gm (2.94)
m=0 ℓ∈Z m=0
where in (a) we split the sum over k = ℓN + m into pieces of length N ; in (b) we
used periodicity of xn ; and in (c) we introduced
X
gm = hℓN +m , m ∈ {0, 1, . . . , N − 1}, (2.95)
ℓ∈Z
T P P P T
g = g0 g1 . . . gN −1 = ℓ hℓN ℓ hℓN +1 ... ℓ hℓN +N −1 .
As we can see, the elements of this sequence are sums of the impulse response hn
at multiples of N shifted by m, and is bounded since hn is absolutely summable by
assumption. Note that gm is itself periodic with period N . Because both xn and gn
are periodic, their indices can be taken mod N , leading to the periodic or circular
convolution as
N
X −1 N
X −1
yn = x[(n−m) mod N ] gm = xm g[(n−m) mod N ] = (g ∗ x) . (2.96)
m=0 m=0
We use the same notation for circular convolution as for the convolution we defined
before without risking confusion; depending on the domain of the sequence, we will
use one or the other.
In matrix format,
y0 g0 gN −1 gN −2 . . . g1 x0
y1 g1 g0 gN −1 . . . g2
x1
y2 g2 g1 g0 . . . g3 x2
= = Gx, (2.97)
.. .. .. .. .. .. ..
. . . . . . .
yN −1 gN −1 gN −2 gN −3 . . . g0 xN −1
124 Chapter 2. Discrete-Time Sequences and Systems
n ∈ {0, 1, . . . , N − 1}.
where (a) follows from sampling the DTFT uniformly at ω = 2π N k; (b) from the
expression for the DTFT (2.45a); (c) from breaking the sum into subsequences
modulo N ; (d) from x being finite of lenght N , and thus ℓ = 0. The final expression
is the one for the DFT we have seen in (2.102a). Thus, sampling the DTFT results
in the DFT.
We can now easily find the appropriate convolution operator corresponding to
the DFT (we know what it is already, but we reverse engineer it here). The way to
do it is to ask ourselves which operator will have as its eigensequences the columns
of the DFT matrix F ∗ (since then, that operator is diagonalized by the DFT). In
other words, which operator T will satisfy the following:
1 ∗
T vk = λk vk ⇒ T F ∗ = F ∗Λ ⇒ T = F ΛF.
N
Even though we do not know Λ, we know it is a diagonal matrix of eigenvalues λk .
Using the expressions (2.103)-(2.104) for F and F ∗ , we can find the expression for
the element Tim as
NX−1
ℓ(m−i)
Tim = λℓ WN ,
ℓ=0
126 Chapter 2. Discrete-Time Sequences and Systems
which shows that F is a unitary matrix up to a scaling factor.23 To prove this, the
product of the ℓth row of F with the kth column of F ∗ is of the form
N −1 N −1
1 X −kn ℓn 1 X n(k−ℓ)
WN WN = W .
N n=0 N n=0 N
Using the orthogonality of the roots of unity from (2.170c), this is equal to 1 when
k = ℓ, and otherwise it is 0.
The DFT and the Circular Convolution Equipped with the DFT matrix and its
inverse, we are ready to state the various properties seen so far.
Proposition 2.5 (DFT and circular convolution). Given are a periodic se-
quence xn , or a length-N sequence periodically extended with period N , and a filter
hn with absolutely-summable
P impulse response h ∈ ℓ1 (Z). The periodized impulse
response is gn = ℓ∈Z hℓN +n . Then,
23 A
√
normalized version uses a 1/ N on both F and its inverse.
2.4. Analysis of Sequences and Systems 127
Proof. Parts (i)-(iii) follow readily from the developments above, and the details
are the subject of Exercise 2.6. Part (iv) follows from Part (iii) by right multiplying
with F , using F ∗ F = N I and dividing by N . For Part (v) write
(a) 1 ∗
Gx = F ΛF x, (2.109)
N
G0 X0
(b) 1
(e) G1 X1
(c) (d)
F (Gx) = (F F ∗ )ΛF x = ΛF x = ΛX = .. , (2.110)
N .
GN −1 XN −1
where the left side of (a) describes circular convolution as in (2.97), the equality
in (a) follows from Part (iv); (b) follows by left multiplying (2.109) by F ; (c) from
(F F ∗ ) = N I; (d) from X being the DFT of x, X = F x; and (e) from evaluating
GX.
Figure 2.15: Convolution of periodic sequence. (a) The filter hn , convolved with the
sequence xn , leads to a periodic output. (b) The equivalent, periodized filter gn , circularly
convolved with xn , leads to the same output.
where
N
X −1
Xk = hx, ϕk i = xn ϕ∗kn , (2.113b)
n=0
which is an ONB representation of periodic sequences. The coefficients Xk are the
expansion coefficients, and the representation is the DFT.
Example 2.19. Consider the “square wave” given by
1, 0 ≤ n < N ;
xn =
0, K ≤ n < N,
periodic with period N . The expansion coefficients are
K−1
X 1 − WNKk
Xk = WN−nk = .
n=0
1 − WNk
which is true in general for real sequences. Table 2.5 summarizes the important
properties of the DFT, while Exercise 2.7 works out some details.
(g ∗ x) Gk Xk Circular convolution
xg (G ∗ X) Modulation
Relation between Linear and Circular Convolutions We have seen how a linear
convolution of a periodic or periodized sequence with h, can be computed as a
circular convolution with the periodized impulse response g. When the input x
is not periodic and has a finite number of nonzero samples M , with the impulse
response of hn with a finite number of nonzero samples L,
T
x = ... 0 x0 x1 . . . xM−1 0 ... ,
h iT
h = ... 0 h0 h1 . . . hL−1 0 ... ,
the result of the convolution has also a finite number of nonzero samples, since
L−1
X
yn = (h ∗ x) = hk xn−k (2.114)
k=0
We have chosen to write the vectors as infinite sequences, as their finite supports are
all different. We could have written each as a finite-length vector with appropriate
length; however, as they are all different, one would have to choose a common period
130 Chapter 2. Discrete-Time Sequences and Systems
Figure 2.16: Equivalence of circular and linear convolutions: (a) Linear convolution of
two sequences of length M and L, resulting in a sequence of length L + M − 1. (b) Periodic
convolution with a period N ≥ L + M − 1 leads to the same result as in (a).
N for both the input and the impulse response. Choosing this common period has
implications in computing convolutions, as is shown next.
Observe that if a sequence x has M nonzero coefficients, then its periodized
version, with a period N ≥ M , conserves the M coefficients of the sequence. This,
of course, is not the case when N < M (as the copies of the base period will overlap).
Proposition 2.6 (Equivalence of circular and linear convolutions). For
two finite-length sequences x and h of lengths M and L, respectively, linear and
circular convolution lead to the same result, if N , the period of the circular convo-
lution, satisfies
N ≥ M + L − 1. (2.115)
T T
Proof. Take x = x0 x1 . . . xM−1 and h = h0 h1 . . . hL−1 . Assum-
ing x and h are of infinite support with just a finite number of nonzero samples,
the linear convolution y (lin) is given by (2.114), while the circular convolution (see
(2.96)) is
N
X −1 n
X L−1
X
yn(circ) = hk x[(n−k) mod N ] = hk xn−k + hk xn+N −k ,
k=0 k=0 k=n+1
for n ∈ {0, 1, . . . , N − 1}. In the above, we broke the sum into positive indices of
xn , while the negative ones, mod N , are made positive by adding N . Also, k goes
from 0 to (N − 1), but stops at (L − 1) since hk is zero after that. Now it suffices
to show that the second sum is zero when N ≥ L + M − 1. When the index k goes
from (N + 1) to (L − 1), xn goes from xN −1 to xN −L+1 . But since N ≥ L + M − 1,
and xn is zero for n ≥ M , xn−N −k is zero, and the right sum vanishes, proving that
(lin) (circ)
yn = yn .
Figure 2.16 depicts this equivalence, and the following example shows it in matrix
notation in a particular case.
Example 2.20 (Equivalence of circular and linear convolutions). We now
look at a length-3 filter convolved with a length-4 sequence. The result of the linear
convolution is of length 6, and is given by
y0 h0 0 0 0
y1 h1 h0 0 0
x0
y2 h2 h1 h0 0 x1
=
y3 0 h2 h1 h0 x2 .
y4 0 0 h2 h1 x3
y5 0 0 0 h2
2.5. Multirate Sequences and Systems 131
Strictly speaking, we should have used infinite matrices above; however, since yn is
nonzero only for n ∈ {0, 1, . . . , 5}, we can use finite matrices only.
To calculate circular convolution, we choose N = M + L − 1 = 6, and form a
6×6 circulant matrix G by using h as its first column. Then the circular convolution
leads to the same result as before:
y0 h0 0 0 0 h2 h1 x0
y1 h1 h0 0 0 0 h 2
x1
y2 0
= h2 h1 h0 0 0 x2 .
y3 0 h2 h1 h0 0 0
x3
y4 0 0 h2 h1 h0 0 0
y5 0 0 0 h2 h1 h0 0
Note that if the period N had been chosen smaller (for example, N = 5), then the
equivalence would not hold anymore.
This example also shows that to compute the linear convolution, we can compute
the circular convolution instead by choosing the appropriate period N ≥ M + L − 1.
Then, the circular convolution can be computed using the DFT of size N (see
Exercise 2.8).
The index of yn corresponds to a time that is half of that for xn . For example, if xn
has an interval of 1 second between samples, then yn has intervals of 0.5 seconds;
the clock of the process is twice as fast.
What we just saw for rate changes by 2 can be done for any integer as well
as rational rate changes (the latter ones by combining upsampling by N and down-
sampling by M ). In addition, to smooth the sequence before dropping samples
downsampling is preceded by lowpass filtering, while to fill in the zeros upsampling
is followed by interpolation, thus combining filtering with sampling rate changes.
The multirate operations are used in any number of today’s physical systems, from
MP3 players, to JPEG, MPEG, to name a few.
The purpose of this section is to study these various multirate operations
and their consequences on the resulting sequences and their spectra. While the
periodically shift-varying nature of multirate systems does complicate analysis, we
use a relatively simple and powerful tool called polyphase analysis to mediate the
problem. The outline of the section follows naturally the above introduction, moving
from down- and upsampling together with filtering to polyphase analysis. Multirate
processing, while not standard DSP material, is central to filter bank and wavelet
constructions.
2.5.1 Downsampling
Downsampling by 2 Downsampling25 by 2, as introduced in (2.116) and shown in
Figure 2.17(a), is clearly not shift invariant. If the input is xn = δn , the output is
yn = δn ; however, if the input is xn = δn−1 , the output is zero! It is instructive to
look at (2.116) in matrix notation:
..
.
.. .. .. .. .. .. .. .. .. .. ..
. . x−2
. . . . . . . . .
y−1 . . . 1 0 0 0 0 0 0 . . . x−2
x−1
y0 . . . . . . x0
0 0 1 0 0 0 0 x0
y1 = . . . . . .
0 0 0 0 1 0 0 x1 = x2 , (2.118a)
y2 . . .
. . . x2
0 0 0 0 0 0 1 x4
y3 . . . 0 0 0 0 0 0 0
. . . x3
x6
.. .. .. .. .. .. .. .. ..
. . x4 ..
. . . . . . . . . . . .
| {z } ..
D2
y = D2 x, (2.118b)
where D2 stands for the operator describing downsampling by 2. Inspection of D2
shows that it is similar to an identity matrix, but with the odd rows taken out.
Intuitively, it is a ”rectangular” operator, with the output space being a subspace
of the input space (one would like to say of half the size, but both are infinite
dimensional). It is a linear operator and has no inverse.
25 Other possible terms are subsampling or decimation.
2.5. Multirate Sequences and Systems 133
Figure 2.17: Downsampling by 2. (a) The block diagram of the downsampling operation
by 2. (b) The spectrum of a sequence and (c) its downsampled version.
Given an input sequence xn , the output yn keeps only every second sample,
given by (2.116). To find the z-transform Y (z), the downsampled sequence may be
seen as a sequence of even samples with ones set to zero x0n , followed by contraction
of the sequence by removing those zeros. Thus,
xn , n even;
x0n =
0, n odd.
Its z-transform is
1
X0 (z) = [X(z) + X(−z)]
2
= (· · · + x0 + x1 z −1 + x2 z −2 + · · · ) + (· · · x0 − x1 z −1 + x2 z −2 + · · · )
1
2
X
= (· · · + x−2 z 2 + x0 + x2 z −2 + · · · ) = x2n z −2n ,
n∈Z
canceling the odd powers of z cancel and keeping the even ones. We now get Y (z)
by contracting X0 (z) as:
X 1
h 1 1
i
Y (z) = x2n z −n = X0 (z 2 ) = 12 X(z 2 ) + X(−z 2 ) . (2.119)
n∈Z
where −ejω/2 can be written as ej(ω−2π)/2 since e−jπ = −1. With the help of
Figure 2.17, we now analyze this formula. X(ejω/2 ) is a stretched version of X(ejω )
(by a factor of 2) and is 4π periodic (since downsampling contracts time, it is natural
that frequency expands accordingly). This is shown as solid line in Figure 2.17(c).
X(ej(ω−2π)/2 ) is not only a stretched version of X(ejω ), but also shifted by 2π,
shown as dashed line in Figure 2.17(c). The sum is again 2π-periodic, since Y (ejω ) =
Y (ej(ω−k2π) ). Both stretching and shifting create “new frequencies”, an unusual
occurrence, since in LSI processing, no new frequencies ever appear. The shifted
version X(ej(ω−2π)/2 ) is called the aliased version of the original (a ghost image!).
yn = xnN , (2.121)
In the ZT domain as
N −1
1 X 1
Y (z) = X(WNk z N ). (2.122)
N
k=0
2.5. Multirate Sequences and Systems 135
The DTFT of yn is obtained by evaluating the above on the unit circle and using
1 2π ω (ω−2πk)
WNk z N jω = e−j N k ej N = ej N ,
z=e
leading to
N −1
jω 1 X (ω−2πk)
Y (e ) = X(ej N ). (2.123)
N
k=0
The proof is an extension of the N = 2 case, and we leave it as an exercise.
2.5.2 Upsampling
Upsampling by 2 Upsampling by 2 as introduced in (2.117) and shown in Fig-
ure 2.18(a), also creates new frequencies, as it “stretches” time by a factor of 2. In
matrix notation, similarly to (2.118a), we have
.. .. .. .. .. .. . . ..
. .
. . . . . .. .
y−2 . . . 1 0 0 0 . . . . x−1
y−1 . . . 0 0 0 0 . . . x−1 0
y0 . . . 0 1 0 0 . . . x0 x0
y1 = . . . 0 0 0 0 . . . x1 = 0 , (2.124a)
y2 . . . 0 0 1 0 . . . x2 x1
y3 . . . 0 0 0 0 . . . x3 0
y4 . . . 0 0 0 1 . . . .. x2
.
.. .. .. .. .. .. . . ..
. . . . . . . .
| {z }
U2
y = U2 x, (2.124b)
where U2 stands for the upsampling-by-2 operator. The matrix U2 looks like an
identity matrix with rows of zeros in between every two rows. Another way to look
at it is as an identity matrix with every other column removed. It is a “rectangular”
matrix in the sense that is has twice as many rows as columns—but when we say
that, remember that twice infinity is infinity. The downsampling and upsampling
operators are transposes of each other, D2 removes every other row, while U2 adds
a row in between every two rows:
U2 = D2T . (2.125)
In the ZT domain, the expression for upsampling by 2 is
X X
Y (z) = yn z −n = xn z −2n = X(z 2 ), (2.126)
n∈Z n∈Z
since all odd terms of yn are zero, while the even ones are y2n = xn following (2.117).
In frequency domain,
Y (ejω ) = X(ej2ω ), (2.127)
a contraction by a factor of 2 as shown in Figure 2.18(b) and (c).
136 Chapter 2. Discrete-Time Sequences and Systems
Figure 2.18: Upsampling by 2. (a) The block diagram of the upsampling operation. (b)
The spectrum of a sequence and (c) its upsampled version.
yn = 1
2 [1 + (−1)n ] = 1
2 (cos 2πn + cos πn),
indicating that it contains both the original frequency (constant, DC value at the
origin) and a new high frequency (at ω = π, since (−1)n = ejπn = cos πn).
D2 U2 = I, (2.128)
since the zeros added by upsampling are at odd-indexed locations and are subse-
quently eliminated by downsampling. The operations in the reverse order is more
interesting; Downsampling by 2 followed by upsampling by 2 results in a sequence
where all odd-indexed samples have been replaced by zeros, or
T 2↓,2↑ T
. . . x−1 x0 x1 x2 ... −→ . . . 0 x0 0 x2 ...
using (2.125).
that is, (N − 1) zeros are inserted between every two samples. By the same argu-
ments used for (2.126), the z-transform of yn is simply
nothing else but the convolution operator H with the odd rows removed. From
the above matrix-vector product, we can also write the filtered and downsampled
sequence using inner products as
L−1
X L−1
X
yn = hk x2n−k = hx2n−k , hk ik = xk h2n−k = hh2n−k , xk ik . (2.133)
k=0 k=0
Note how the convolution and the inner product operators are related by time
reversal:
(h ∗ x)n = hh2n−k , xk ik . (2.134)
in the ZT domain, apply (2.119) to H(z)X(z),
h 1 1 1 1
i
Y (z) = 12 H(z 2 )X(z 2 ) + H(−z 2 )X(−z 2 ) , (2.135)
Figure 2.19 shows an input spectrum and its downsampled version. Figure 2.17(c)
showed the spectrum without filtering, while Figure 2.19(c) shows the spectrum
with filtering. As can be seen, when no filtering is used, then aliasing perturbs
the spectrum. When ideal lowpass filtering is used (Figure 2.19(b)), the spectrum
from −π/2 to π/2 is conserved, the rest is put to zero, then no aliasing occurs, and
the central lowpass part of the spectrum is conserved in the downsampled version
(Figure 2.19(c)).
Because of filtering, all samples of the input influence the output, as opposed to
downsampling without filtering, where the odd-indexed samples had no impact.
2.5. Multirate Sequences and Systems 139
Figure 2.19: Filtering and downsampling. (a) Block diagram. (b) Original spectrum
with and without filtering. (c) Downsampled spectrum when filtering is applied first.
nothing else but the convolution operator H with the odd columns removed. Using
inner products, we can express yn as
X
yn = gn−2k xk = hxk , gn−2k ik . (2.138)
k
Another way to look at (2.137)–(2.138) is to see that each input sample xk generates
an impulse response gn delayed by 2k samples and weighted by xk . In the ZT
140 Chapter 2. Discrete-Time Sequences and Systems
while it is
Y (ejω ) = G(ejω )X(ej2ω ) (2.140)
in the DTFT domain.
Figure 2.21 shows a spectrum, its upsampled version, and finally, its ideally
filtered or interpolated version. As can be seen, the “ghost” spectrum at ωπ is
removed, and only the base spectrum around the origin remains.
From (2.137) or (2.138), we can see that even-indexed outputs are equal to input
samples (at half the index), while odd-indexed outputs are averages of two input
2.5. Multirate Sequences and Systems 141
Figure 2.21: Upsampling and interpolation. (a) Block diagram. (b) Original spectrum
(c) Upsampled spectrum after filtering with an ideal filter which keeps only frequencies
between [−π/2, π/2].
Figure 2.22: Upsampling and interpolation. (a) Example signal. (b) Piecewise constant
interpolation. (c) Linear interpolation.
samples,
xn/2
, n even;
yn = 1 (2.142)
2 x(n+1)/2 + x(n−1)/2 , n odd.
1 1
T
y = . . . x−1 2 (x−1 + x0 ) x0 2 (x0 + x1 ) x1 ... .
Compare (2.142) with (2.141) to see why (2.142) is a smoother interpolation, and
see Figure 2.22 for an example.
where we used (2.143). The above “transposition equals time-reversal” will appear
prominently in our analysis of orthogonal filter banks in Chapter 6. In particular,
we will prove that when the impulse response of the filter gn is orthogonal to its even
shifts as in (2.145), and hn = g−n , then the operation of filtering, downsampling by
2, upsampling by 2 and interpolation as in (6.16) is an orthogonal projection onto
the subspace spanned by gn and its even shifts.
will play an important role in the analysis of filter banks. Geometrically, (2.145)
means that the columns of GU2 in (2.137) are orthonormal to each other (similarly
for the rows of D2 H). Moreover, we can see (2.145) as the autocorrelation of g
sampled by 2. Write the autocorrelation as
ak = hgn , gn−k in ,
a2k = δk . (2.146)
In the ZT domain, A(z) = G(z)G(z −1 ) using (2.86). Keeping only the even terms
can be accomplished by adding A(z) and A(−z) and dividing by 2. Therefore,
(2.146) can be expressed as
Figure 2.23: Interchange of multirate operations and filtering. (a) Filtering and down-
sampling. (b) Upsampling and filtering. (c) Commutativity of up- and downsampling
(TBD).
This quadrature formula, also called power complementarity, will be central in the
design of orthonormal filter banks in Chapter 6. In the above we have assumed that
gn is real, and used both
2
G(z)G(z −1 )z=ejω = G(ejω )G(e−jω ) = G(ejω )G∗ (ejω ) = G(ejω ) ,
as well as 2
G(−z)G(−z −1 ) = G(ej(ω+π) ) .
In summary, a filter satisfying any of the conditions below is called orthogonal :
ZT
←→ G(z)G(z −1 ) + G(−z)G(−z −1 ) = 2
hgn , gn−2k i = δk (2.149)
DT F T
←→ G(ejω )2 + G(ej(ω+π) )2 = 2
followed by D3 , we get
T
D3 U2 x = . . . x−3 0 x0 0 x3 0 x6 ... .
Applying D3 first
T
D3 x = . . . x−3 x0 x3 x6 ... ,
X(z) = X0 (z 2 ) + z −1 X1 (z 2 ), (2.150)
which clearly shows the even and odd parts of X(z). This very simple transform
that separates X(z) into X0 (z) and X1 (z) is called the polyphase transform, is
shown in Figure 2.24(a). The even and odd parts X0 (z) and X1 (z) are called the
polyphase components of X(z). The inverse transform simply upsamples the two
polyphase components and puts them back together by interleaving, as in (2.150),
shown in Figure 2.24(b).
For example, in polyphase transform domain, the effect of the operator Y =
U2 D2 in is very simple: X0 (z) is kept while X1 (z) is zeroed out:
Y (z) = X0 (z 2 ).
Polyphase Representation of Filters We now look into how filters can be ex-
pressed in the polyphase transform domain.
We start with filtering followed by downsampling by 2, as we discussed previ-
ously. We need to find the polyphase components of H(z)X(z), given the polyphase
components of X(z):
H(z)X(z) = H0 (z 2 )X0 (z 2 )+H1 (z 2 )X1 (z 2 )+z −1 (H0 (z 2 )X1 (z 2 )+z 2 H1 (z 2 )X0 (z 2 )).
Figure 2.24: Forward and inverse polyphase transform for (a)-(b) rate changes by 2, and
(c)-(d) rate changes by N .
Figure 2.25: Polyphase representation of filters. (a) Filtering and downsampling. (b)
Upsampling and interpolation.
Y (z) = Y0 (z 2 ) + z −1 Y1 (z 2 ),
G(z) = G0 (z 2 ) + z −1 G1 (z 2 ), (2.153)
shown in Figure 2.25(b). Note that the duality between (filtering, downsampling)
and (upsampling, interpolation) we have seen earlier, shows through polyphase
decomposition as well, (2.151) and (2.153). This duality, including the change from
z −1 to z, is related to the transposition and time reversal seen in (2.143).
T
xk = . . . xN (n−1)+k xN n+k xN (n+1)+k ... , (2.155)
N
X −1
X(z) = z −k Xk (z N ). (2.156)
k=0
N
X −1
H(z) = z k Hk (z N ), (2.157)
k=0
N
X −1
Y (z) = Hk (z)Xk (z). (2.158)
k=0
where (a) uses separates the summation over odd- and even-numbered terms; and
(b) follows from WN2 = WN/2 . Recognize the first sum as the length-(N/2) DFT
T
of the sequence x0 x2 . . . xN −2 , and the second sum as the length-(N/2)
26 We are counting complex multiplications and complex additions. It is customary to not count
T
DFT of the sequence x1 x3 . . . xN −1 . It is now apparent that the length-
N DFT computation can make use of FN/2 D2 x and FN/2 C2 x, where D2 is the
downsampling-by-2 operator defined in (2.118b), and C2 is a similar operator, except
that it keeps the odd-indexed values. Since the length-(N/2) DFT expression is
(N/2)-periodic in k, the length-(N/2) DFT is useful even for k ∈ {N/2, N/2 +
1, . . . , N − 1}.
To help get a compact matrix representation, we define a diagonal matrix to
encapsulate the WNk factor:
h i
AN/2 = diag( 1 WN WN2 . . . WN(N/2)−1 ).
k−N/2
where the final twist is to realize that WNk = −WN . If this turns out to be a
useful factorization, then we can repeat it to represent FN/2 using FN/4 , etc. So let
us count computations in the factored form.
Let µN and νN denote the number of multiplications and additions in comput-
ing a length-N DFT. The factorization (2.159) shows that a length-N DFT can be
accomplished with two length-(N/2) DFTs, N/2 multiplications and N additions,
yielding the following recursions:
N N N N
µN = 2µN/2 + = µ2 + (log N − 1) = (log N − 1) ,
2 2 2 2
N
νN = 2νN/2 + N = ν2 + (log N − 1)N = (log N − 1)N,
2
solved with the initial conditions µ2 = 0 and ν2 = 0. Thus, recursive application of
(2.159) has allowed us to reduce the number of multiplications from N 2 to (log N −
1)N/2.
Other well-known FFT algorithms are split-radix which reduces the number
of multiplications; Good-Thomas for N = N1 N2 where N1 and N2 are coprime;
Winograd, typically used for small factors; Rader’s for prime size N ; and many
others. Further Reading gives pointers to texts discussing this wealth of FFTs.
2.7.2 Convolution
TBD
2.A. Elements of Complex Analysis 149
Appendix
2.A Elements of Complex Analysis
A complex number z ∈ C, is a number of the form:
z = a + jb, a, b ∈ R, (2.160)
and j is by definition
√ the positive root of −1. (Mathematicians and physicists
typically use i for −1, while j is more common in engineering.)
In (2.160), a is called the real part while b is called the imaginary part. The
complex conjugate of z is denoted by z ∗ and is by definition:
z ∗ = a − jb. (2.161)
z = rejθ , (2.162)
where r is called the modulus or magnitude and θ is the argument. Using the Euler’s
formula:
ejθ = cos θ + j sin θ, (2.163)
we can express a complex number further as
Euler’s formula is particularly useful, since then we can easily find a power of a
complex number as
z1 + z2 = (a1 + a2 ) + j(b1 + b2 ),
z1 − z2 = (a1 − a2 ) + j(b1 − b2 ),
z1 · z2 = (a1 a2 − b1 b2 ) + j(b1 a2 + a1 b2 ),
z1 a1 a2 + b 1 b 2 a2 b 1 − a1 b 2
= 2 2 + j .
z2 a2 + b 2 a22 + b22
150 Chapter 2. Discrete-Time Sequences and Systems
Im z Im z
jθ 1
z =r e ( W3)
b
r
( W3)0
θ
a Rez 1 Rez
( W3) 2
(a) (b)
Figure 2.27: (a) A pictorial representation of a complex number in a complex plane.
(b) Third roots of unity.
Complex numbers are typically shown in the complex plane (see Fig. 2.27(a)).
Similarly to the triangle inequality we have seen in Definition 1.7, we have the
triangle inequality for complex numbers
X X
zi ≤ |zi | . (2.168)
i i
Roots of Unity The same way j was defined as the second root of unity, we can
define the principal N th root of unity as
1
WN = (1) N = e−j2π/N . (2.169)
You can easily check that WNk , for k ∈ {1, 2, . . . , N − 1}, are also roots of unity. If
we drew all N roots of unity in the complex plane, we would see that they slice up
the unit circle by equal angles. An example with N = 3 is given in Fig. 2.27(b),
while for N = 4 they are 1, −j, −1, j. Here are some useful identities involving the
roots of unity:
WNN = 1, (2.170a)
WNkN +n = WNn , with k, n ∈ Z, (2.170b)
N
X −1
N, n = ℓN, ℓ ∈ Z;
WNnk = (2.170c)
0, otherwise.
k=0
The last relation is often referred to as orthogonality of the roots of unity. Its proof
is given next.
2.B. Elements of Algebra: Discrete Polynomials 151
If n = ℓN + p, this reduces to
N
X −1
WNkn = 0. (2.171b)
k=0
When we study wavelets and filter banks, we will be concerned with the moment
anihilating/preserving properties of such systems. In that, the following fact will
be of use: Convolution of the polynomial sequence with a differencing filter dn =
(δn − δn−1 ), or, multiplication of P (z) by D(z) = (1 − z −1 ), reduces the degree of
the polynomial by 1, as in
N
!
X X X
−1 −n −1
D(z)P (z) = (1 − z ) pn z = (1 − z ) k
ak n z −n
n n k=0
N
XX N
XX
= ak nk z −n − ak nk z −(n+1)
n k=0 n k=0
N
XX N
XX
= ak nk z −n − ak (n − 1)k z −n
n k=0 n k=0
N
XX
= ak (nk − (n − 1)k )z −n
n k=0
N −1
!
(a) X X X
k
= bk n z −n = rn z −n ,
n k=0 n
152 Chapter 2. Discrete-Time Sequences and Systems
where rn is a polynomial of degree (N − 1), and (a) follows from (nN − (n − 1)N )
being a polynomial of degree (N − 1). The above process can be seen as applying a
differencing filter with a zero at z = 1. Extending the above argument, we see that
by repeatedly applying the differencing filter, we will kill the constant term, then
the linear, then the quadratic, and so on.
Chapter at a Glance 153
Chapter at a Glance
We now summarize the main concepts and results seen in this chapter in a tabular form.
X N−1
X
convolution (h ∗ x) xk hn−k xk hn−k
k∈Z k=0
2πk
eigensequence v ejωn ej N n
satisfies (h ∗ vλ ) = λvλ (h ∗ vω ) = H(ejω ) vω (h ∗ vk ) = Hk vk
eigenspace Hλ Hω = {αejωn } Hk = {αejωn }
α ∈ C, ω ∈ R α ∈ C, k ∈ Z
Historical Remarks
Cooley-Tukey FFT The impact signal processing has had in
practical terms is perhaps due in large part to the advent of the
fast Fourier transform algorithms, spurred by the paper of Cooley
and Tukey in 1965 [13]. It breaks the computation of the DFT of
size N = N1 N2 into a recursive computation of smaller DFTs of
sizes N1 and N2 , respectively (see Section 2.7.1). Unbeknownst
to them, a similar algorithm was published by Gauss some 150
years earlier, in his attempt to track asteroid trajectories.
Further Reading
Books and Textbooks A standard book on discrete-time processing is the one Oppen-
heim, Schafer and Buck [45]. For statistical signal processing, see the text by Porat [49].
An early account of multirate signal processing was given by Crochiere and Rabiner [14], a
more recent one is by Vaidyanathan [60]. Dugeon and Mersereau cover multidimensional
signal processing in [22]. Blahut in [5] discusses fast algorithms for DSP, and in particular,
various classes of FFTs.
Inverse z-transform Via Contour Integration The formal inversion process for the
z-transform is given by contour integration using Cauchy’s integral formula when X(z) is
a rational function of z. When X(z) is not rational, inversion can be quite difficult. A
short account of inversion using contour integration is given in [39]; more details can be
found in [45].
Filter Design Numerous filter design techniques exist. They all try to approximate
the desired specifications of the system/filter by a realizable discrete-time system/filter.
For IIR filters, one of the standard methods is to design the discrete-time filters from
continuous-time ones using bilinear transformation. For FIR filters, windowing is often
used to approximate the desired response by truncating it with a window, a topic we
touched upon in Example 2.4. Then, linear phase is often incorporated as a design re-
quirement. Kaiser window design method is a standard method for FIR filter design
using windowing. Another commonly used design method is called Parks-McClellan. An
excellent overview of filter design techniques is given in [45].
for building a signal model bases on sequence and filter spaces, appropriate convolutions
and appropriate Fourier transforms. As such, the existence and form of fast algorithms
for computing such transforms (among which are the well-known trigonometric ones) are
automatically given. Some of the observations in this chapter were inspired by the algebraic
framework.
Consider now the class of real-valued discrete-time filters that perform an orthogonal pro-
jection. Give a precise characterization of this class (be more specific than just repeating
the conditions for an operator being an orthogonal projection.)
Solution:
We can represent our system as y = Gx, with the corresponding matrix notation as in
(2.37). To check that a filter (operator) is an orthogonal projection, we must check that it
is idempotent and self-adjoint as in Definitions 1.20 and 1.21.
Checking idempotency is easier in the Fourier domain since G2 = G has as its DTFT
pair G(ejω ) = G2 (ejω ). Checking self-adjointness is equivalent to checking that the oper-
ator matrix G is Hermitian.
(i) We have that G(ejω ) = e−jωk and G2 (ejω ) = e−jω2k . Thus, G2 (ejω ) 6= G(ejω ),
unless k = 0, and the filter operator is not a projection.
(ii) Similarly, we have
1 1
G(ejω ) = ejω + 1 + e−jω ,
2 2
and
„ «2
1 jω 1 1 3 1
G2 (ejω ) = e + 1 + e−jω = ej2ω + ejω + + e−jω + e−j2ω .
2 2 4 2 4
Thus, G2 (ejω ) 6= G(ejω ), and this filter is not a projection operator either.
(iii) We can rewrite gn as
Z π/2 √
1 sin nπ/2 1
gn = √ = 2 ejωn dω,
2 nπ/2 2π −π/2
yielding G(ejω ) as
√
2, for ω ∈ [−π/2, π/2];S
G(ejω ) =
0, for ω ∈ [−π, −π/2] [π/2, π],
as well as
2, for ω ∈ [−π/2, π/2];S
G2 (ejω ) =
0, for ω ∈ [−π, −π/2] [π/2, π].
Again, G2 (ejω ) 6= G(ejω ), and this filter is not a projection operator either. Note
sin nπ/2
that for gn = nπ/2 we would have had a projection.
Exercises with Solutions 157
In the most general case, again trying to satisfy idempotency, we see that for G2 (ejω ) =
G(ejω ), G(ejω ) can only be 1 or 0:
S S S
1, for ω ∈ R1 R2 ... Rn ;
G(ejω ) =
0, otherwise,
where R1 , R2 , . . . , Rn are disjoint regions in [−π, π].
Self-adjointness is satisfied if gn = g−n ∗ . In Fourier domain:
X X X
G(ejω ) = gn e−jωn = ∗
g−n e−jωn = ) = G∗ (ejω ).
∗ −jωn ∗
gn (e
n n n
Since, from the first condition, G(ejω ) is real, we conclude that self-adjointness is auto-
matically satisfied.
2.2. Circulant Matrices
Given is an N × N circulant matrix C as in (1.86).
(i) Give a simple test for the singularity of C.
(ii) Give a formula for det(C).
(iii) Prove that C −1 is circulant.
(iv) Given two circulant matrices C1 and C2 , show that they commute, C1 C2 = C2 C1
and that the result is circulant as well.
Solution:
Most of the developments in this problem follow from Proposition 2.5.
(i) Consider circularly convolving two length-N sequences cn and gn :
(a) (b) 1 ∗ (c) 1 (d) 1 (e) 1
c ∗ g = Cg = F (C G) = F ∗ (C F g) = F ∗ (ΛF g) = F ∗ ΛF g,
N N N |N {z }
C
ˆ ˜T
where F is the DFT matrix given in (2.103), C1 = C0 C1 . . . CN−1 is the
DFT of c, and Λ = diag C1 . In the above, (a) is obtained by applying the circular
convolution operator of c to g; (b) follows from taking the IDFT of the DFT pair of
Cg which is C G (convolution in time corresponds to muliplication in frequency, also
F −1 = (1/N )F ∗ ); in (c) we write G as the DFT of g; in (d) we write the pointwise
multiplication in frequency as a diagonal matrix Λ multiplying F g; and finally in (e)
we recognize that C = F ∗ ΛF . In other words, we have rederived (2.107), stating
that any circulant matrix C can be diagonalized using the DFT.
This formulation implies that the columns of F ∗ are the eigenvectors of C, with
Ck being the associated eigenvalues. So the matrix C is nonsingular if and only if
none of the DFT coefficients Ck are zero.
(ii) From the diagonalization of C, and from (1.84):
N−1
Y
det(C) = Ck .
k=0
(iii) Since
1 ∗ 1 −1 −1 ∗ −1 1 1 ∗ −1 1 ∗ −1
C −1 = ( F ΛF )−1 = F Λ (F ) = ( F )Λ (N F ) = F Λ F,
N N N N N
it has the same form as C in (2.107), and is thus circulant as well.
(iv) Writing C1 and C2 as C1 = F ∗ Λ1 F and C2 = F ∗ Λ2 F , we see that
C = C1 C2 = (F ∗ Λ1 F )(F ∗ Λ2 F ) = F ∗ Λ1 Λ2 F = F ∗ ΛF,
where Λ = diag{C10 C20 , C11 C21 , . . . , C1N −1 C2N −1 }. So C = C1 C2 is a circulant
matrix with eigenvalues C1k C2k , k ∈ {0, 1, . . . , N − 1.
Since Λ1 Λ2 = Λ2 Λ1 , we have C1 C2 = C2 C1 .
158 Chapter 2. Discrete-Time Sequences and Systems
Solution:
We will solve the problem using matrix notation for U3 , U4 and D2 :
2 3
2 3 . . . . ..
.. . . . . 6 .. .. .. .. .7
. . . . 6 7
6 . . . . .7 6· · · 1 0 0 · · ·7
6 7 6 7 2 3
6· · · 1 0 0 · · ·7 6· · · 0 0 0 · · ·7 .. .. .. .. .. .. ..
6 7 6 7
6· · · 0 0 0 · · ·7 6· · · 0 0 0 · · ·7 6 . . . . . . .7
6 7 6 7 6 7
6· · · 0 0 0 · · ·7 6· · · 0 0 0 · · ·7 6· · · 1 0 0 0 0 · · ·7
6 7 6 7 6 7
U3 = 6· · · 0 1 0 · · ·7 U4 = 6· · · 0 1 0 · · ·7 D2 = 6· · · 0 0 1 0 0 · · ·7 .
6 7 6 7 6 7
6· · · 0 0 0 · · ·7 6· · · 0 0 0 · · ·7 6· · · 0 0 0 0 1 · · ·7
6 7 6 7 4 5
6· · · 0 0 0 · · ·7 6· · · 0 0 0 · · ·7 .. .. .. .. .. .. ..
6· · · 0 0 1 · · ·7 6· · · 0 0 0 · · ·77 . . . . . . .
6 7 6
4 5 6· · · 0 0 1 · · ·7
.. .. .. .. . . 6 7
. . . . . 4 .. .. .. 5
.. ..
. . . . .
Solution:
A linear, shift-varying system is characterized by a two-variable impulse response hkn ,
the response
P of the system to the input xn = Pδn−k . Since the input can be written as
xn = k xk δn−k , the output is given by yn = k xk hkn .
When hkn is periodic in k with period N , we define the polyphase components xk as
in (2.155), to yield
h iT
xkn = xnN+k , xk = . . . x−2N+k x−N+k xk xN+k x2N+k . . . ,
(N)
for k ∈ {0, 1, . . . , N − 1}. Denote the upsampled version of xkn by xkn , so
(N) xk,n/N , n/N ∈ Z; xn+k , n/N ∈ Z;
xkn = =
0, otherwise; 0, otherwise.
(N)
xk = [. . . 0 xk 0 0 . . . 0 xN+k 0 . . .]T .
| {z }
N−1
If we take the above upsampled components, delay each by k, and sum them up, we get x
back:
N−1
X (N)
xn = xk,n−k .
k=0
As this is a linear system, we can find the output as
X N−1
X N−1
XX N−1
X X
(N) (N) (a) (N)
yn = hkn xi,n−i = hkn xi,n−i = hkn xi,n−i
k i=0 i=0 k i=0 k−i ∈Z
N
N−1
X X N−1
X X
(b) (N) (c) (N)
= hin xi,n−i = hkn xi,n−i ,
i=0 k−i ∈Z i=0 k
N
where (a) follows from the excluded terms being zero; (b) from the periodicity of h; and
(c) because the added terms are zero. The final expression shows the output as a sum
of N terms. The ith term is the ith polyphase component, upsampled and filtered by an
i-sample delayed version of hkn .
Exercises
2.1. Properties of Periodic Sequences
Given are complex exponential sequences of the form
xn = ejω0 n .
(i) Show that if α = ω0 /2π is a rational number, α = p/q, with p and q coprime integers,
then xn is periodic with period q.
(ii) Show that if α = ω0 /2π is irrational, then xn is not periodic
(iii) Show that if x and y are two periodic sequences with periods N and M respectively,
then x + y is periodic with period N M (in general).
2.2. Linear and Shift-Invariant Difference Equations
Consider the difference equation (2.32).
160 Chapter 2. Discrete-Time Sequences and Systems
(i) Show, possibly using a simple example, that if the initial conditions are nonzero,
then the system is not linear and not shift-invariant.
(ii) Show that if the initial conditions are zero, then (a) the homogeneous solution is
zero, (b) the system is linear and (c) the system is shift invariant.
2.3. Modulation Property of the DTFT
Given are two sequences x and h, both in ℓ1 (Z). Verify that
DT F T 1
xh ←→ X ∗ H.
2π
2.4. Auto- and Crosscorrelation
Consider autocorrelation and crosscorrelation sequences and their DTFTs as defined in
(2.53) and (2.55). Show that:
(i) an = a−n and |an | ≤ a0 ;
(ii) cn is in general not symmetric and C(ejω ) = X(ejω )H ∗ (ejω );
(iii) The generalized Parseval’s formula (2.56b) holds.
2.5. Generalized Parseval’s Relation for the DTFT
Prove the generalized Parseval’s relation for the DTFT given in (2.56b).
2.6. Circulant Matrices and the DFT
Given is the circulant matrix from Proposition 2.5:
2 3
g0 gN−1 gN−2 ... g1
6 g1 g0 gN−1 ... g2 7
6 7
G = 6 . . .. .. .. 7
4 .. .. . . .5
gN−1 gN−2 gN−3 ... g0
(i) Prove that the eigenvalues are given by (2.105) and that the right eigenvectors are
the columns of F ∗ .
(ii) Show that the left eigenvectors are the rows of F .
2.7. DFT Properties
Verify the following DFT pairs from Table 2.5:
(i) Time reversal yn = x−n ;
(ii) Real symmetric xn = x−n and real antisymmetric xn = −x−n sequences;
(iii) Modulation property.
(Hint: Start with the convolution in frequency domain.)
2.8. Computing Linear Convolution with the DFT
Prove that the linear convolution of two sequences of length M and L, can be computed
using DFTs of size N ≥ M + L − 1, and show how to do it.
2.9. ROC of z-Transform
Verify the properties of the ROCs listed in Table 2.3.
2.10. Interchange of Filtering and Sampling Rate Change
(i) Prove that downsampling by 2 followed by filtering with H(z) is equivalent to filter-
ing with H(z 2 ) followed by downsampling by 2.
(ii) Prove that filtering with G(z) followed by upsampling by 2 is equivalent to upsam-
pling by 2 followed by filtering with G(z 2 ).
2.11. Commutativity of Up- and Downsampling
Prove that downsampling by M and upsampling by N commute if and only if M and N
are coprime.