Professional Documents
Culture Documents
Discrete-Time Signals and Systems
Discrete-Time Signals and Systems
See Oppenheim and Schafer, Second Edition pages 8–93, or First Edition
pages 8–79.
1 Discrete-time signals
... ...
t
x[1]
For this reason, although xŒn is strictly the nth number in the sequence, we
often refer to it as the nth sample. We also often refer to “the sequence xŒn”
when we mean the entire sequence.
Discrete-time signals are often depicted graphically as follows:
1
x[−3]
x[−2]
x[−4] x[−1]
x[4]
... x[0] ...
1 2 3
n
−4 −3 −2 −1 0 4
x[1]
x[3]
x[2]
(This can be plotted using the MATLAB function stem.) The value xŒn is
undefined for noninteger values of n.
Sequences can be manipulated in several ways. The sum and product of two
sequences xŒn and yŒn are defined as the sample-by-sample sum and product
respectively. Multiplication of xŒn by a is defined as the multiplication of
each sample value by a.
A sequence yŒn is a delayed or shifted version of xŒn if
yŒn D xŒn n0 ;
with n0 an integer.
The unit sample sequence
1
n
0
is defined as 8
<0 n¤0
ıŒn D
:1 n D 0:
This sequence is often referred to as a discrete-time impulse, or just impulse.
It plays the same role for discrete-time signals as the Dirac delta function does
for continuous-time signals. However, there are no mathematical
2
complications in its definition.
An important aspect of the impulse sequence is that an arbitrary sequence can
be represented as a sum of scaled, delayed impulses. For example, the
sequence
a 3
a 2
a 4 a 1
a4
... a0 ...
1 2 3
n
−4 −3 −2 −1 0 4
a1
a3
a2
can be represented as
xŒn D a 4 ıŒn C 4 C a 3 ıŒn C 3 C a 2 ıŒn C 2 C a 1 ıŒn C 1 C a0 ıŒn
Ca1 ıŒn 1 C a2 ıŒn 2 C a3 ıŒn 3 C a4 ıŒn 4:
n
0
is defined as 8
<1 n0
uŒn D
:0 n < 0:
3
The unit step is related to the impulse by
n
X
uŒn D ıŒk:
kD 1
Conversely, the unit sample sequence can be expressed as the first backward
difference of the unit step sequence
xŒn D A˛ n :
If A and ˛ are real numbers then the sequence is real. If 0 < ˛ < 1 and A is
positive, then the sequence values are positive and decrease with increasing n:
...
...
n
0
For 1 < ˛ < 0 the sequence alternates in sign, but decreases in magnitude.
For j˛j > 1 the sequence grows in magnitude as n increases.
A sinusoidal sequence
...
n
0 ...
4
has the form
xŒn D A cos.!0 n C / for all n;
with A and real constants. The exponential sequence A˛ n with complex
˛ D j˛je j!0 and A D jAje j can be expressed as
5
Thus the discrete-time sinusoid is only periodic if
6
1
!0 D 0
0
−1
1
!0 D
8
0
−1
1
!0 D
4
0
−1
1
!0 D
0
−1
1
!0 D 7
4
0
−1
1
!0 D 15
8
0
−1
−8 −6 −4 −2 0 2 4 6 8
7
2 Discrete-time systems
yŒn D T fxŒng:
T fg
x[n] y[n]
yŒn D xŒn nd W
x[n]
... ...
n
−3 −2 −1 0 1 2 3
y[n]=x[n−2]
... ...
n
−1 0 1 2 3 4 5
8
Example: Moving average
M2
1 X
yŒn D xŒn k
M1 C M2 C 1
kD M1
x[n]
... ...
n
−1 0 1 2 3 4 5
y[2]
A system is memoryless if the output yŒn depends only on xŒn at the same n.
For example, yŒn D .xŒn/2 is memoryless, but the ideal delay
9
yŒn D xŒn nd is not unless nd D 0.
Scaling:
T fax1 Œng D aT fx1 Œng D ay1 Œn:
T fax1 Œn C bx2 Œng D aT fx1 Œng C bT fx2 Œng D ay1 Œn C by2 Œn:
A system is time invariant if a time shift or delay of the input sequence causes
a corresponding shift in the output sequence. That is, if yŒn is the response to
xŒn, then yŒn n0 is the response to xŒn n0 .
For example, the accumulator system
n
X
yŒn D xŒk
kD 1
10
is time invariant, but the compressor system
yŒn D xŒM n
2.4 Causality
A system is causal if the output at n depends only on the input at n and earlier
inputs.
For example, the backward difference system
is not.
2.5 Stability
11
is an example of an unbounded system, since its response to the unit step uŒn
is 8
n <0
X n<0
yŒn D uŒn D
:n C 1 n 0;
kD 1
This expression is called the convolution sum. Therefore, a LTI system has
the property that given hŒn, we can find yŒn for any input xŒn. Alternatively,
yŒn is the convolution of xŒn with hŒn, denoted as follows:
12
The previous derivation suggests the interpretation that the input sample at
n D k, represented by xŒkıŒn k, is transformed by the system into an
output sequence xŒkhŒn k. For each k, these sequences are superimposed
to yield the overall output sequence:
xŒn hŒn
1
−1 0 n 0 n
xŒ 1ıŒn C 1 xŒ 1hŒn C 1
−1 0 n 0 n
xŒ1ıŒn 1 xŒ1hŒn 1
1
0 n 0 n
0 n
13
h[k]
k
−2 0 5
Reflect h[−k]
k
−5 0 2
Shift h[n−k]
k
n−5 0 n n+2
The sequence hŒn k is then obtained by shifting the origin of the sequence
to k D n.
To implement discrete-time convolution, the sequences xŒk and hŒn k are
multiplied together for 1 < k < 1, and the products summed to obtain the
value of the output sample yŒn. To obtain another output sample, the
procedure is repeated with the origin shifted to the new sample position.
Example: analytical evaluation of the convolution sum
Consider the output of a system with impulse response
8
<1 0nN 1
hŒn D
:0 otherwise
to the input xŒn D an uŒn. To find the output at n, we must form the sum over
all k of the product xŒkhŒn k.
14
1
x[n]
0.5
0
−10 −5 0 5 10
k
1
h[n−k]
0.5
0
−10 −5 n−(N−1) 0 n 5 10
k
Since the sequences are non-overlapping for all negative n, the output must be
zero:
yŒn D 0; n < 0:
For 0 n N 1 the product terms in the sum are xŒkhŒn k D ak , so it
follows that
n
X
yŒn D ak ; 0nN 1:
kD0
Finally, for n > N 1 the product terms are xŒkhŒn k D ak as before, but
the lower limit on the sum is now n N C 1. Therefore
n
X
yŒn D ak ; n>N 1:
kDn N C1
15
4 Properties of LTI systems
All LTI systems are described by the convolution sum
1
X
yŒn D xŒkhŒn k:
kD 1
Cascade connection:
h1 Œn h2 Œn
x[n] y[n]
h2 Œn h1 Œn
x[n] y[n]
h1 Œn
x[n] y[n]
h2 Œn
16
delay system hŒn D ıŒn nd is stable since S D 1 < 1; the moving
average system
M2
1 X
hŒn D ıŒn k
M1 C M2 C 1
kD M1
8
1
<
M1 CM2 C1
M1 n M2
D
:0 otherwise;
the forward difference system hŒn D ıŒn C 1 ıŒn, and the backward
difference system hŒn D ıŒn ıŒn 1 are stable since S is the sum of a
finite number of finite samples, and is therefore less than 1; the
accumulator system
n
X
hŒn D ıŒk
kD 1
8
<1 n0
D
:0 n<0
D uŒn
P1
is unstable since S D nD0 uŒn D 1.
A LTI system is causal if and only if hŒn D 0 for n < 0. The ideal delay
system is causal if nd 0; the moving average system is causal if
M1 0 and M2 0; the accumulator and backward difference systems
are causal; the forward difference system is noncausal.
Systems with only a finite number of nonzero values in hŒn are called Finite
duration impulse response (FIR) systems. FIR systems are stable if each
impulse response value is finite. The ideal delay, the moving average, and the
forward and backward difference described above fall into this class. Infinite
impulse response (IIR) systems, such as the accumulator system, are more
difficult to analyse. For example, the accumulator system is unstable, but the
17
IIR system
hŒn D an uŒn; jaj < 1
is stable since
1 1
X
n
X 1
SD ja j jajn D <1
nD0 nD0
1 jaj
Forward One−sample
difference delay
which has
One−sample Forward
delay difference
Backward
difference
Here a non-causal system has been converted to a causal one by cascading with
a delay. In general, any non-causal FIR system can be made causal by
cascading with a sufficiently long delay.
Consider the system consisting of an accumulator followed by a backward
difference:
18
Backward
Accumulator
difference
The output is therefore equal to the input because xŒn ıŒn D xŒn. Thus the
backward difference exactly compensates for (or inverts) the effect of the
accumulator — the backward difference system is the inverse system for the
accumulator, and vice versa. We define this inverse relationship for all LTI
systems:
hŒn hi Œn D ıŒn:
Backward
Accumulator
difference
x[n] y[n] x[n]
Here yŒn yŒn 1 D xŒn, which can be written in the desired form with
N D 1, a0 D 1, a1 D 1, M D 0, and b0 D 1. Rewriting as
19
we obtain the recursion representation
x[n] y[n]
One−sample
delay
where at n we add the current input xŒn to the previously accumulated sum
yŒn 1.
Example: difference equation representation of moving average
Consider now the moving average system with M1 D 0:
1
hŒn D .uŒn uŒn M2 1/:
M2 C 1
The output of the system is
M2
1 X
yŒn D xŒn k;
M2 C 1
kD0
Attenuator + x1 Œn
Accumulator
x[n] 1=.M2 C 1/ y[n]
−
.M2 C 1/
sample delay
20
Here x1 Œn D 1=.M2 C 1/.xŒn xŒn M2 1/ and for the accumulator
yŒn yŒn 1 D x1 Œn. Therefore
1
yŒn yŒn 1 D .xŒn xŒn M2 1/;
M2 C 1
which is again a (different) LCCD equation with N D 1, a0 D 1, a1 D 1,
b0 D bM2 C1 D 1=.M2 C 1/.
As for constant coefficient differential equations in the continuous case,
without additional information or constraints a LCCDE does not provide a
unique solution for the output given an input. Specifically, suppose we have
the particular output yp Œn for the input xp Œn. The same equation then has the
solution
yŒn D yp Œn C yh Œn;
where yh Œn is any solution with xŒn D 0. That is, yh Œn is an homogeneous
solution to the homogeneous equation
N
X
ak yh Œn k D 0:
kD0
It can be shown that there are N nonzero solutions to this equation, so a set of
N auxiliary conditions are required for a unique specification of yŒn for a
given xŒn.
If a system is LTI and causal, then the initial conditions are initial rest
conditions, and a unique solution can be obtained.
6 Frequency-domain representation of
discrete-time signals and systems
The Fourier transform considered here is strictly speaking the discrete-time
Fourier transform (DTFT), although Oppenheim and Schafer call it just the
21
Fourier transform. Its properties are recapped here (with examples) to show
nomenclature.
Complex exponentials
Defining
1
X
j! j!k
H.e /D hŒke
kD 1
H.e j! / D e j!nd
:
22
HR .e j! / D cos.!nd / and HI .e j! / D sin.!nd /, or alternatively
jH.e j! /j D 1
^H.e j! / D !nd :
The frequency response of a LTI system is essentially the same for continuous
and discrete time systems. However, an important distinction is that in the
discrete case it is always periodic in frequency with a period 2:
1
X
j.!C2/ j.!C2/n
H.e /D hŒne
nD 1
X1
j!n j 2 n
D hŒne e
nD 1
X1
j!n
D hŒne D H.e j! /:
nD 1
A system will therefore respond in exactly the same way to both sequences.
Example: ideal frequency selective filters
The frequency response of an ideal lowpass filter is as follows:
23
Hlp .e j! /
1
!
2 !c 0 !c 2
Highpass
!
!c 0 !c
j!
1 Hbs .e /
Bandstop
!
!b !a 0 !a !b
Hbp .e j! /
1
Bandpass
!
!b !a 0 !a !b
In these cases it is implied that the frequency response repeats with period 2
outside of the plotted interval.
Example: frequency response of the moving-average system
24
The frequency response of the moving average system
8
1
<
M1 CM2 C1
M1 n M2
hŒn D
:0 otherwise
is given by
0 2 2
2 5
0
5
2
!
^H.e j! /
2 0 2
!
This system attenuates high frequencies (at around ! D ), and therefore has
the behaviour of a lowpass filter.
25
7 Fourier transforms of discrete sequences
The discrete time Fourier transform (DTFT) of the sequence xŒn is
1
X
j! j!n
X.e /D xŒne :
nD 1
This is also called the forward transform or analysis equation. The inverse
Fourier transform, or synthesis formula, is given by the Fourier integral
Z
1
xŒn D X.e j! /e j!n d!:
2
The quantities jX.e j! /j and ^X.e j! / are referred to as the magnitude and
phase of the Fourier transform. The Fourier transform is often referred to as
the Fourier spectrum.
Since the frequency response of a LTI system is given by
1
X
j! j!k
H.e /D hŒke ;
kD 1
26
8 Symmetry properties of the Fourier transform
where xe Œn is conjugate symmetric (xe Œn D xe Œ n) and xo Œn is conjugate
antisymmetric (xo Œn D xo Œ n). These two components of the sequence
can be obtained as:
1
xe Œn D .xŒn C x Œ n/ D xe Œ n
2
1
xo Œn D .xŒn x Œ n/ D xo Œ n:
2
If a real sequence is conjugate symmetric, then it is an even sequence, and if
conjugate antisymmetric, then it is odd.
Similarly, the Fourier transform X.e j! / can be decomposed into a sum of
conjugate symmetric and antisymmetric parts:
X.e j! / D Xe .e j! / C Xo .e j! /;
where
1
Xe .e j! / D ŒX.e j! / C X .e j!
/
2
1
Xo .e j! / D ŒX.e j! / X .e j!
/:
2
With these definitions, and letting
X.e j! / D XR .e j! / C jXI .e j! /;
27
Sequence xŒn Transform X.e j! /
j!
x Œn X .e /
x Œ n X .e j! /
RefxŒng Xe .e j! /
j ImfxŒng Xo .e j! /
xe Œn XR .e j! /
xo Œn jXI .e j! /
Most of these properties can be proved by substituting into the expression for
the Fourier transform. Additionally, for real xŒn the following also hold:
Let X.e j! / be the Fourier transform of xŒn. The following theorems then
apply:
28
Sequences xŒn, yŒn Transforms X.e j! /, Y .e j! / Property
axŒn C byŒn aX.e j! / C bY .e j! / Linearity
j!nd
xŒn nd e X.e j! / Time shift
e j!0 n xŒn X.e j.! !0 /
/ Frequency shift
j!
xŒ n X.e / Time reversal
dX.e j! /
nxŒn j d!
Frequency diff.
j! j!
xŒn yŒn X.e /Y .e / Convolution
1
R
xŒnyŒn 2 X.e j /Y .e j.! /
/d Modulation
29