Discrete-Time Signals and Systems
Discrete-Time Signals and Systems
Discrete-Time Signals and Systems
The arrow is often omitted if it is clear from the context which sample is x[0]. Sample
values can either be real or complex. In the rest of this book, the terms discrete-time
signals and sequences are used interchangeably.
The time interval between samples is not explicitly shown. It can be assumed to be
normalized to 1 unit of time. So the corresponding normalized sampling frequency is 1
Hz. If the actual sampling interval is T seconds, then the sampling frequency is given by
fs = T1 .
20
Amplitude
1.2
1
0.8
0.6
0.4
0.2
0
3
Index (n)
1, n = 0
0, n =
6 0
(2.1)
This is depicted graphically in Figure 2.1. Note that while the continuous-time unit impulse function is a mathematical object that cannot be physically realized, the unit impulse sequence can easily be generated.
2.1.1.2 Unit Step Sequence
The unit step sequence is one that has an amplitude of zero for negative indices and an
amplitude of one for non-negative indices. It is shown in Figure 2.2.
Discrete-time signals
21
2
1.8
1.6
1.4
Amplitude
1.2
1
0.8
0.6
0.4
0.2
0
3
Index (n)
(2.2)
This function can also be decomposed into its in-phase xi [q] and quadrature xq [n] components.
x[n] = A cos cos 0 n A sin sin 0 n
= xi [n] + xq [n]
(2.3)
(2.4)
(2.5)
(2.6)
22
Amplitude
0.1
0
0.1
0.2
0.3
0.4
0.5
10
15
Index (n)
20
25
30
Figure 2.3: Uniformly distributed random sequence with amplitudes between -0.5 and
0.5.
2.1.1.5 Random Sequences
The sample values of a random sequence are randomly drawn from a certain probability
distribution. They are also called stochastic sequences. The two most common distributions are the Gaussian (normal) distribution and the uniform distribution. The zero-mean
Gaussian distribution is often used to model noise. Figure 2.3 and figure 2.4 show examples of uniformly distributed and Gaussian distributed random sequences respectively.
Discrete-time signals
23
2.5
1.5
Amplitude
0.5
0.5
1.5
10
15
Index (n)
20
25
30
Figure 2.4: Gaussian distributed random sequence with zero mean and unit variance.
Finite vs. Infinite Length Signals Finite length sequences are defined only for a range
of indices, say N1 to N2 . The length of this finite length sequence is given by |N2 N1 + 1|.
Causal Signals A sequence x[n] is a causal sequence if x[n] = 0 for n < 0.
Symmetric Signals First consider a real-valued sequence {x[n]}. Even symmetry implies that x[n] = x[n] and for odd symmetry x[n] = x[n] for all n.
Any real-valued sequence can be decomposed into odd and even parts so that
x[n] = xe [n] + xo [n]
where the even part is given by
xe [n] =
1
(x[n] + x[n])
2
xo [n] =
1
(x[n] x[n])
2
24
(2.7)
(2.8)
(2.9)
(2.10)
for all integer values of k. Note that N has to be a positive integer. If a sequence is not
periodic, it is aperiodic or non-periodic.
We know that continuous-time sinusoids are periodic. For instance, the continuous-time
signal
x(t) = cos (0 t)
(2.11)
has a frequency of 0 radians per second or f0 = 0 /2 Hz. The period of this sinusoidal
signal is T = 1/f0 seconds.
Now consider a discrete-time sequence x [n] based on a sinusoid with angular frequency
0 :
x[n] = cos (0 n)
(2.12)
If this sequence is periodic with a period of N samples, then the following must be true:
cos 0 (n + N ) = cos 0 n
(2.13)
(2.14)
and the cosine function is periodic with a period of 2 and therefore the right hand side
of (2.13) is given by
cos 0 n = cos (0 n + 2r)
(2.15)
Discrete-time signals
25
(2.16)
where 0 = 2f0 . Since both r and N are integers, a discrete-time sinusoidal sequence
is periodic if its frequency is a rational number. Otherwise, it is non-periodic.
Example 2.1. Is x[n] = cos 8 n periodic? If so, what is the period?
The sequence can be expressed as
x[n] = cos 2
1
16
n
So in this case, f0 = 1/16 is a rational number and the sinusoidal sequence is periodic
with a period N = 16.
Example 2.2. Determine the fundamental period of the following sequence:
x[n] = cos (1.1n) + sin (0.7n)
Solution:
For the cosine function, the angular frequency is
1 = 1.1 = 2 (0.55) = 2f1
Therefore,
55
100
11
=
20
f1 =
26
where
35
100
7
=
20
f2 =
N2
X
|x[n]|2
(2.17)
|x[n]|2
(2.18)
n=N1
n=
Note that the energy of an infinite length sequence may not be infinite. A signal with
finite energy is usually referred to as an energy signal.
Example 2.3. Find the energy of the infinite length sequence
n
2 , n0
x[n] =
0,
n<0
Discrete-time signals
27
2n
n=0
N
1
X
n=0
n
X
1
n=0
an = 1 + a + a2 + + aN 1
(2.19)
(2.20)
1 aN
1a
(2.21)
(2.22)
(2.23)
Equations (2.22) and (2.23) are very useful and we shall be making use of them later.
The average power of a periodic sequence with a period of N samples is defined as
N 1
1 X
Px =
|x[n]|2
N n=0
(2.24)
and for non-periodic sequences, it is defined in terms of the following limit if it exists:
K
X
1
Px = lim
|x[n]|2
K 2K + 1
n=K
(2.25)
28
Example 2.4. Find the average power of the unit step sequence u[n].
The unit step sequence is non-periodic, therefore the average power is
X
1
u2 [n]
P = lim
K 2K + 1
n=0
K +1
K 2K + 1
1
=
2
lim
Therefore the unit step sequence is a power signal. Note that its energy is infinite and so
it is not an energy signal.
Bounded Signals A sequence is bounded if every sample of the sequence has a magnitude which is less than or equal to a finite positive value. That is,
|x[n]| Bx <
(2.26)
Summable Signals A sequence is absolutely summable if the sum of the absolute value
of all its samples is finite.
X
|x[n]| <
(2.27)
n=
A sequence is square summable if the sum of the magnitude squared of all its samples is
finite.
X
|x[n]|2 <
(2.28)
n=
Discrete-time signals
29
x[n]
Ax[n]
y[n]=x[n]+w[n]
w[n]
y[n] = x[nM ]
x[n1]
30
x[n]
y[n]
y[n]
(2.30)
An interpolated signal can be obtained by passing the up-sampled signal through a lowpass filter with an appropriate bandwidth. This process will be discussed in more detail
in a later chapter.
Modulation
(2.31)
Then we say that y[n] is w[n] modulated by x[n]. This is analogous to carrier modulation
in communication systems.
Correlation The correlation, or more precisely cross-correlation, between two finite
length data sequences x[n] and w[n] is defined by
N
1 X
r=
x[n]w[n]
N n=0
(2.32)
Discrete-time Systems
31
(2.33)
where A and B are arbitrary constants, then the system is linear if its corresponding
output is
y[n] = Ay1 [n] + By2 [n]
(2.34)
Superposition is a very nice property which makes analysis much simpler. Although
many real systems are not entirely linear throughout its operating region (for instance, the
bipolar transistor), they can be considered approximately linear for certain input ranges.
Linearization is a very useful approach to analyzing nonlinear systems. Almost all the
discrete-time systems considered in this book are linear systems.
Example 2.5. Are the down-sampler and up-sampler linear systems?
Consider the down-sampler
y[n] = x[nM ]
For input x1 [n], the corresponding output is y1 [n] = x1 [nM ]. For input x2 [n], the output
is y2 [n] = x2 [nM ]. Let x[n] be a linear combination of these two input with arbitrary
constants A and B so that
x[n] = Ax1 [n] + Bx2 [n]
The output is given by
y[n] = Ax1 [nM ] + Bx2 [nM ]
= Ay1 [n] + By2 [n]
32
x[n/L], n = 0, L, 2L, . . .
0,
otherwise
Let y1 [n] and y2 [n] be the outputs for inputs x1 [n] and x2 [n] respectively. For
x[n] = Ax1 [n] + Bx2 [n]
then the output is
y[n] =
(2.36)
In the remainder of this book, we shall use the terms linear time-invariant (LTI) and linear
shift-invariant interchangeably.
Example 2.6. A system has input-output relationship given by
y[n] =
n
X
k=
x[k]
Discrete-time Systems
33
n
X
k=
n
X
k=
nn
X0
x1 [k]
x[k n0 ]
x[k]
k=
= y[n n0 ]
Therefore the system is shift invariant.
Example 2.7. Is the down-sampler a shift invariant system?
Let M (a positive integer) be the down-sampling ratio. So for an input x[n] the output is
y[n] = x[nM ]. Now if x1 [n] is x[n] delayed by n0 samples, then
x1 [n] = x[n n0 ]
and the corresponding output is
y1 [n] = x[nM n0 ]
h
n0 i
M
= x n
M
k=
(n k) u[n k]x[k]
34
Note that u[n k] = 0 for n < k because the unit step sequence is zero for negative
indices. In other words, for a certain n, u[n k] = 0 for k > n. So the output can be
written as
n
X
(n k) x[k]
y[n] =
k=
X
(n k) u[n k]x[k]
y[n] =
k=
k=
(n k) u[n k][k]
= nu[n]
which is unbounded as it grows linearly with n. Therefore the system is not BIBO stable.
Example 2.10. Determine if the following system is BIBO stable. Note that this system
is an averager, taking the average of the past M samples.
M 1
1 X
y[n] =
x[n k]
M k=0
Discrete-time Systems
35
Let the input |x[n]| B for some finite value B. Consider the magnitude of the output
1
1 M
X
|y[n]| =
x[n k]
M
1
M
k=0
M
1
X
k=0
|x[n k]|
1
(M B)
M
= B
Hence the output is bounded and the system is BIBO stable.
Lossy or Lossless For a passive system that does not generate any energy internally,
the output should have at most the same energy as the input. So
n=
|y[n]|
n=
|x[n]|2 <
(2.37)
36
0.8
0.7
0.6
h[n]
0.5
0.4
0.3
0.2
0.1
4
Index (n)
2.5
1.5
0.5
4
Index (n)
Discrete-time Systems
37
Since the system is linear and time invariant, we can make use of the superposition principle to compute the output. The input sequence is composed of three impulses. Mathematically, it can be expressed as
x[n] = [n] + 0.5[n 1] + 2[n 2]
(2.38)
Let
x1 [n] = [n]
x2 [n] = 0.5[n 1]
x3 [n] = 2[n 2]
and the system response to each of these inputs are respectively y 1 [n], y2 [n] and y3 [n].
The sample values of y1 [n] are given by
y1 [0] = h[0]x1 [0]=0.8
y1 [1] = h[1]x1 [0]=0.4
y1 [2] = h[2]x1 [0]=0.2
y1 [3] = h[3]x1 [0]=0.1
which is the same as the impulse response since x1 [n] is a unit impulse. Similarly,
y2 [1] = h[0]x2 [1]=0.4
y2 [2] = h[1]x2 [1]=0.2
y2 [3] = h[2]x2 [1]=0.1
y2 [4] = h[3]x2 [1]=0.05
and
y3 [2] = h[0]x3 [2]=1.6
y3 [3] = h[1]x3 [2]=0.8
y3 [4] = h[2]x3 [2]=0.4
y3 [5] = h[3]x3 [2]=0.2
The system output y[n] in response to input x[n] is therefore, through the superposition
principle, given by
y[n] = y1 [n] + y2 [n] + y3 [n]
= {0.8, 0.8, 2, 1, 0.45, 0.2}
38
Note that
y[0]
y[1]
y[2]
y[3]
y[4]
y[5]
=
=
=
=
=
=
h[0]x[0]
h[1]x[0] + h[0]x[1]
h[2]x[0] + h[1]x[1] + h[0]x[2]
h[3]x[0] + h[2]x[1] + h[1]x[2]
h[3]x[1] + h[2]x[2]
h[3]x[2]
In general, we have
or
n
X
h[k]x[n k]
(2.40)
n
X
x[n]h[n k]
(2.41)
k=0
Alternatively,
y[n] =
(2.39)
k=0
Equations 2.40 and 2.41 are the linear convolution equations for finite length sequences.
If the length of h[n] is M and the length of x[n] is N , then the length of y[n] is N +M 1.
We can further generalize it for infinite length sequences:
y[n] =
=
k=
k=
h[k]x[n k]
(2.42)
x[k]h[n k]
(2.43)
These equations are analogous to the linear convolution equation for continuous-time
signals. Note that the linear convolution equation comes about as a result of the superposition principles and therefore applies only to LTI systems.
The convolution equation for discrete-time signals is also called the convolution sum. It
is denoted by ?. So equations 2.42 and 2.43 can be written as
y[n] = x[n] ? h[n]
The convolution sum is one of the most important fundamental equations in DSP.
(2.44)
Discrete-time Systems
39
(2.45)
(2.46)
(2.47)
2. Associative
3. Distributive
X
|y[n]| =
h[k]x[n k]
k=
|h[k]| |x[n k|
k=
k=
|h[k]|
P
So the magnitude of y[n] is bounded if
k= |h[k]| is finite. In other words, the impulse
response must be absolutely summable.
40
k=
h[k]x1 [n0 k]
1
X
h[k]x1 [n0 k] +
h[k]x2 [n0 k]
k=
h[k]x1 [n0 k]
h[k]x2 [n0 k]
k=0
and
y2 [n0 ] =
k=
1
X
k=
h[k]x2 [n0 k] +
k=0
Since x1 [n] = x2 [n] for n n0 , if the system is causal, then the outputs y1 [n] and y2 [n]
must be the same for n n0 . More specifically, y1 [n0 ] = y2 [n0 ]. Now,
X
k=0
h[k]x1 [n0 k] =
X
k=0
h[k]x2 [n0 k]
because x1 [n0 k] = x2 [n0 k] for non-negative values of k. Since x1 [n] may not be
equal to x2 [n] for n > n0 , we must have
1
X
k=
h[k]x1 [n0 k] =
1
X
k=
h[k]x2 [n0 k] = 0
Discrete-time Systems
41
M
X
k=0
h[k]x[n k]
(2.48)
The impulse response of an IIR system, however, has infinite length. So the filtering
equation for a causal filter is given by
y[n] =
X
k=0
h[k]x[n k]
(2.49)
This equation is not computable in practice due to the infinite limit. But there is a type
of IIR systems that admits recursive computation of y[n] and so it can be computed. This
42
type of IIR systems are the only IIR filters that are used in DSP. The general input-output
relationship of these IIR filters is
y[n] =
N
X
k=1
a[k]y[n k] +
M
X
k=0
b[k]x[n k]
(2.50)
where {a[k]} and {b[k]} are the filter coefficients. The present output y[n] is a linear
combination of previous N outputs and the present and previous M outputs. The order
of the filter is M 1 or N , whichever is larger.
Example 2.12. A causal LTI system has impulse response
h[n] = ah[n 1] + [n]
where a is a constant. What is the input-output equation for this system?
Since y[n] = h[n] for x[n] = [n], it is obvious from the impulse response that the
input-output equation for this system is
y[n] = ay[n 1] + x[n]
Example 2.13. Find the impulse response of the causal system with the following inputoutput equation:
y[n] = 0.25y[n 2] + x[n]
The impulse response of this system is given by
h[n] = 0.25h[n 2] + [n]
and so
h[0] = 0.25h[2] + [0]=1
h[1] = 0.25h[1] + [1]=0
h[2] = 0.25h[0] + [2] =(0.25)2
h[3] = 0.25h[1] + [3] =0
..
..
.
.
Hence
h[n] =
Summary
43
2.3 Summary
In this chapter, we have studied the fundamentals of discrete-time signals and systems
in the time domain. Discrete-time signals are essentially a sequence of numbers. Some
fundamental sequences, such as the unit impulse, unit step and sinusoidal (both real and
complex) sequences are examined because more complex sequences can be expressed as
a combination of some or all of these fundamental ones.
The most important discrete-time systems are the linear time invariant (LTI) systems. For
these systems, the superposition principle applies which leads to the linear convolution
sum. This convolution sum is the way by which we derive the output of the system given
an input. An LTI system is completely characterized by its impulse response. All the
properties of such a system is revealed by its impulse response, including causality and
BIBO stability.