You are on page 1of 50

1

Chapter 1

Discrete-Time Signals and Systems


1.1 Introduction

A signal is defined as any physical quantity that conveys information. It may be represented
in many ways; often mathematically as a function of one or more independent variables. The
independent variable(s) type and nature depends on the information represented. Time is
often the independent variable in the mathematical representation of many signals. There are,
however, cases where a functional representation for the signal may not be possible. For
example, a speech signal cannot be described mathematically. Other examples of a natural
signals include an electrocardiogram (ECG) which provides information on the operation of
the heart and an electroencephalogram (EEG) which provides information about the electrical
activity of the brain over a short period of time. These are information-bearing signals that
can be represented as functions of time.

Depending on the nature of the signal and the representation desired, the independent variable
may be continuous or discrete. Continuous-time signals are defined for all points in time over
a finite or infinite interval (the independent variable time is continuous). Discrete-time signals
are defined at discrete times over a finite or infinite interval (the independent variable time
assumes discrete values). Discrete-time signals may thus be represented as sequences of
numbers. Any signal, if certain conditions hold, may have either a continuous- or a discrete-
variable representation, these representations are entirely equivalent. In both cases, the signal
amplitude may be continuous or discrete. Digital signals are, however, those for which both
the amplitude and the independent variable are discrete.

A system may be defined as a physical device that performs an operation on a signal, called
an input signal. A filter that is used to reduce noise and interference from a desired
information-bearing signal is an example of a signal processing system. We may also broaden
the system definition to include software realizations of operations on a signal. In such cases
the operations performed on a signal consist of a number of mathematical operations as
specified by a software program. This represents system implementation in software, i.e., a
signal processing system realized in software.

Signal processing systems may be classified along the same lines as signals. Continuous-time
systems are those for which both the input and output are continuous-time signals, and
discrete-time systems are those for which both the input and output are discrete-time signals.
Similarly, a digital system is one for which both the input and output are digital signals.
Discrete-time signal processing, then, deals with the study of discrete-time systems that
2. Introduction to Discrete-time Signals Processing

perform discrete-time signal transformation. Thus, the principal focus in this Chapter is on
basic time- and frequency-domain representation and analysis of discrete-time signals and
systems.

Discrete-time signal processing systems have many attractive features and may be realized
with great flexibility in a variety of technologies such as general purpose computers,
microcomputers, and special purpose DSP chips. Discrete-time systems can be used to
simulate analog systems or, more important, to realize signal transformations that cannot be
implemented with continuous-time hardware. Thus, discrete-time representations of signals
are often desirable when sophisticated and flexible signal processing is required. We will
consider the fundamental concepts of discrete-time signals and linear time-invariant discrete-
time signal processing systems in this Chapter.

1.2 Discrete-Time Signals: Sequences

Discrete-time signals are represented as sequences of numbers in which the nth number in the
sequence is denoted by x(n). It is only defined for integral values of n, and x(n) is not defined
for non-integral values of n. If x(n) is obtained from sampling an analog signal xa(t), then x(n)
= xa(nT), where T is the sampling interval and its reciprocal is the sampling frequency.

Discrete-time signals may be represented mathematically in several ways:


i) functional representation:
n

( 0 .5 ) , n  0
x(n)  

 0 n 0
ii) sequence representation:
 
 
x ( n )  , 0 , x ( 0 ), x (1), x ( 2 ), x ( 3), x ( 4 ), 
 
n 0 
 
 
 , 0 , x 0 , x 1 , x 2 , x 3 , x 4 , 
 
n 0

 
x (n)   , 0, 0, 1 , 4, 1, 0, 0,  , infinite sequence

 n 0


 
x ( n)   1 , 4, 1, 0, 0,  , infinite sequence
 n 0 
 
x ( n)   1 , 4, 1, 0, 0 , finite sequence
 n 0 
Chapter 1 - Discrete-time Signals and Systems 3

( )= 1, −0.3, ⏟
1 , −1, 0.5 ,

iii) vector representation: a finite length discrete-time signal may be represented as


a column vector or row vector. The convention we use here is that vectors are
assumed to be column vectors. The time reference may also be defined
( ) = [ , , ,⋯, ] , column vector of N elements
( ) = [1, 4, 1, 0, −1] , column vector of 5 elements
Several basic sequences are of particular importance in the representation and analysis of
discrete-time signals and systems. Some of these basic discrete-time signals are described
below.

Unit sample sequence:- Unlike the continuous-time impulse the unit sample sequence
(discrete-time impulse) has a precise mathematical representation, given by:
1, =0
( ) = 1 δ(n)
0, ≠0
A more general mathematical representation -2 -1 0 1 2 3 4 n
is given by
1, ( )=0
( ( )) =
0, ( ) Ζ≠0
where g(n) is any well defined, finite-valued
discrete-time signal. Some examples δ(n-3) 1
commonly encountered are
 1, n  3  0, i. e., n 3 -2 -1 0 1 2 3 4 n
 (n  3)  
 0, n  3  0, i. e., n 3

 1, n  2  0, i. e., n   2 1 δ(n+2)
 (n  2)  
 0, n  2  0, i. e., n   2
-2 -1 0 1 2 3 4 n

 1,  (n  3)  0, i. e., n   3
 (  (n  3))     (n  3)  n  3
 0,  (n  3)  0, i. e., n   3

We will use the notation


≡ ( + )
freely in the rest of the material.

The unit sample sequence is sometimes called the discrete-time impulse, or simply as
an impulse. It plays the same role for discrete-time signals and systems that the unit
impulse function (Dirac delta function) does for continuous-time signals and systems.
The discrete-time impulse has simple and precise mathematical definition as opposed
4. Introduction to Discrete-time Signals Processing

to that of the continuous-time impulse. One of the important uses of the impulse
sequence is that it can be used to express any sequence as a sum of scaled and delayed
impulses, as follows

( ) = ( ) ( − )

= ⋯+ + + + ⋯
We will make use of this property in the representation of linear discrete-time signal
and systems.

Unit step sequence:


The unit step sequence (discrete-time unit step) also has a well defined mathematical
definition for all n, given as

1 n 0 u(n) 1
u( n)   •••
 0, n  0 • •
-2 -1 0 1 2 3 4 n

A more general mathematical representation is given by


 1, g (n)  0
u( g (n))  
 0, g (n)  0
where g(n) is any well defined, finite-valued discrete-time signal. Some examples
commonly encountered are
u(n-3) 1
•••
 1, n  3  0, i. e., n 3
u (n  3)   • • • • •
-2 -1 0 1 2 3 4 5 n
 0, n  3  0, i. e., n 3

u(n+2) 1
•••
 1, n  2  0, i. e., n   2
u(n  2)   • •
 0, n  2  0, i. e., n   2 -4 - 3 -2 -1 0 1 2 3 4 n

1 u(-(n+3))
•••
 1,  (n  3)  0, i. e., n   3
u(  (n  3))   • • • •
 0,  (n  3)  0, i. e., n   3 -7 -6 - 5 -4 -3 -2 -1 0 1 n

The unit step sequence may also be written as an infinite sum of delayed impulses as
Chapter 1 - Discrete-time Signals and Systems 5

 
u (n )   1 , 1, 1, 1, 1, 1, 
 n 0 
  (n)   (n  1)   (n  2)   (n  3)  

i.e., u ( n)    (n  k )
k0

The unit step sequence at time index n may also be expressed as the accumulated sum
of the impulse at index n and all previous values of the impulse sequence, i.e.,
n
u ( n)    (k)
k  

Conversely, the impulse sequence can be expressed as the first backward difference of
the unit step sequence, i.e.,

 ( n)  u(n)  u(n  1)

Example 1.2.1: Plot the sequence


( )= sin
Solution:
1, sin = 0
( ) = (sin( )) = 4
4 0, ℎ

1, = 0+ , k integer
= 4
0, otherwise
1, = 4 , k integer
=
0, ℎ

x(n)
1
••• •••
••• ••• ••• ••• ••• ••• ••• ••• •••
-8 -4 0 4 8 12 16 20 n

Exponential sequence:
Exponential sequences are extremely important in linear time-invariant system (LTI)
and signal analysis and representation. The general form of an exponential sequence is
x (n)  an , for all n
6. Introduction to Discrete-time Signals Processing

where the parameter ‘a’ may be real or complex. We may consider several forms of
x(n) with ‘a’ real and complex.

1) Case when ‘a’ is real:- Consider the case when ‘a’ is real in ( ) =
all n. The exponential sequence takes either of the following four forms

i) 0 < a < 1: sequence values are positive and decrease with n.


ii) a > 1: sequence values are positive and increase with n.
iii) -1 < a < 0: sequence values alternate and decrease with n.
iii) a < -1: sequence values alternate and increase with n.
1

x(n), 0 < a < 1 x(n), a > 1

••• ••• ••• •••

0 10 20 30 0 10 20 30
n n

1
x (n) , -1 < a < 0 x (n) , a < -1

••• ••• ••• •••


0 n 0
n

-1

2) Complex ‘a’:- Consider the case when ‘a’ is complex in ( ) = all n. A


more general case to consider is the complex exponential sequence:

x (n)  Aa n , all n

where a  a e j 0 and A  A e j . Thus,

n
x ( n)  Aa n  A e j a e j 0n
n
 A a e j ( 0 n   )
n n
 A a cos( 0 n   )  j A a sin( 0 n   )

is the rectangular form representation of the complex exponential sequence x(n)


Chapter 1 - Discrete-time Signals and Systems 7

i.e., x ( n)  Rex (n)  j Imx (n)

The real and imaginary component sequence magnitudes oscillate with an


exponentially growing envelopes if |a| > 1, or with an exponentially decaying
envelopes if |a| < 1. The envelopes remains constant when |a| = 1. The special case
where |a| = 1 is referred to as the discrete-time complex sinusoid and has the form
x ( n)  A cos( 0 n   )  j A sin( 0 n   )
The real and imaginary components of the complex sinusoid vary sinusoidally with n.
By analogy with the continuous case, the quantity ω0 is called the frequency (in
radians/sample) of the complex sinusoid and is called the phase.

Im{x(n)}, 0<a<1
Re{x(n)}, 0<a<1

••• ••• ••• •••

0 20 n 0 10 30 n
30

••• •••
Im{x(n)}, |a| > 1
0 20 n

Re{x(n)}, |a| > 1 ••• •••


0 30 n

Re{x(n), |a| = 1 Im{x(n), |a| = 1

••• ••• ••• •••

0 20 n 0 10 30 n

Alternatively, the complex exponential sequence x(n) may be represented in the polar
(magnitude and phase form) as
n
x ( n)  A a e j ( 0 n   )
 x (n ) e j (  0 n   )
8. Introduction to Discrete-time Signals Processing
n
where x (n)  A a is the magnitude function and  (n)   0 n   is the
phase function of x(n). For this particular case the phase function is linear with n, and
may be plotted as a function of n.

Complex exponential sequences having frequencies ω0 and ω0 + 2πk, k an integer, are


indistinguishable from one another, i.e.,
( )= ( )
= = , k an integer.
The same statement holds true for sinusoidal sequences, i.e.,
( )= cos[( +2 ) ] = cos( )
This implies that a complete description of x(n) is obtained by considering frequencies
in a frequency interval of length 2π such as – < ≤ or 0 < ≤2 .

Periodicity for discrete-time signals is defined as


x (n)  x (n  N )
where the integer N is the period. The periodicity condition for the discrete-time
sinusoid is
cos( + ) = cos( + + )
The periodicity condition requires that
0 N  2 k
i.e.,
k
0  2
N
and
2
N  k.
0
Since N must be an integer, this suggests that the ratio 2 /  0 must be a rational
number and hence ω0 = rπ, where r is a rational number. This also holds for complex
exponential sequences, i.e.,

e j 0 ( n  N )  e j 0 n
Consequently, complex exponential and sinusoidal sequences may not necessarily be
periodic. For example, for ω0 = 3π/4 the smallest value of N is 8, obtained with k = 3.
On the other hand, ( ) cannot be periodic for ω0 = 1, since N = 2πk can never be an
integer for k an integer.

The concept of high and low frequencies is somewhat different for discrete-time
sinusoidal and complex exponential signals from their continuous-time counterparts.
A continuous-time sinusoidal signal x (t )  A cos( 0 t   ) oscillates more and
Chapter 1 - Discrete-time Signals and Systems 9

more rapidly as Ω0 increases. The frequency of a discrete-time sinusoidal signal


x (n)  A cos( 0 n   ) increases as ω0 increases from ω0 = 0 to ω0 = π, decreases
back as ω0 increases from ω0 = π to ω0 = 2π. Because of the periodicity in ω0 of
sinusoidal and complex exponential sequences, ω0 = 2π is indistinguishable from ω0 =
0 and, more generally, frequencies around ω0 = 2π are indistinguishable from
frequencies around ω0 = 0. As a result, values of ω0 in the vicinity of ω0 = 2πk for any
integer k are typically referred to as low frequencies, while values of ω0 in the vicinity
of ω0 = (π + 2πk), for any integer k, are typically referred to as high frequencies. This
fact is illustrated below for the sinusoid cos(ω0n), for some values of ω0.

x(n), a = 1, ω0 = 0, N =∞

••• •••

0 10 20 30 35 n
x(n), |a| = 1, ω0 = π/8, x(n), |a| = 1, ω0 = π/4,
N = 16 N=8

••• ••• ••• •••

0 20 30 n 0 10 30 n

x(n), |a| = 1, ω0 = π/2, N = 4 x(n), |a| = 1, ω0 = π, N = 2

••• ••• ••• •••

0 20 n 0 10 34 n

Example 1.2.2: Consider the sequence x(n) given as


( ) = −0.5 ( + 2) + 1.5 ( ) + ( − 2) − 2 ( − 3) + ( − 5)
Determine and plot the following related sequences:
10. Introduction to Discrete-time Signals Processing

) ( ), ) ( − 2) , ) ( + 2) , ) (− ), ) (3 − ), ) (2 ),

) , ℎ) ( ) .
2

Solution: The plots of the manipulated sequences of the sequence x(n) is shown
below.
1.5 1.5
a) x(n) b) x(n-2)
1 1 1 1

-2 0 2 4 6 n -1 0 2 4 6 8 n
-0.5 -0.5

-2 -2
1.5 1.5
c) x(n+2) d) x(-n)
1 1 1 1

-4 -2 0 2 4 n -6 -4 -2 0 2 n
-0.5 -0.5

-2 -2

1.5 1.5
e) x(3-n) f) x(2n)
1 1 1

-2 0 2 4 6 n -2 -1 0 1 2 3 n
-0.5 -0.5

-2
1.5
g) x(n/2) h) δ(x(n))
1 1 1 1 1 1 1 1 1
••• •••
• • • • 0 • • •4 • • •8 • • •12
•-4 n

-2
•0 • •
2 4 6 n
-0.5

-2
Chapter 1 - Discrete-time Signals and Systems 11

1.3 Classification of Discrete-Time Signals

There are a number of ways that discrete-time signals may be classified. In this section, only
some major classifications that depend on major signal characteristics will be indicated.

Energy Signals and Power Signals:

The energy E of a discrete-time signal is defined as



2
E  
n  
x ( n)

This definition of signal energy applies to complex-valued signals as well as real-valued


signals. The energy of a signal may be finite or infinite. If E is finite, i.e., E < ∞, then x(n) is
called an energy signal.

Example 1.3.1: i) Consider the sequence


 (1 / 2) n , n  0
x ( n)   n
 3 , n 0

The signal energy is



2
E  
n  
x ( n)
 2n 1
 1 2n
   
 
n 0 2
   3
n  
2n
  1
4  

3
 n 1
 3

4 1 35
  
3 8 24
Since E is finite, x(n) is an energy signal.

ii) Consider the unit step sequence u(n).


  
2
E  
n  
x ( n)   [u(n)]
n 0
2
 1
n0
 

Since the sum is not finite the unit step sequence, u(n), is not an energy signal.

iii) Consider the constant-amplitude complex exponential sequence


x ( n)  Ae j 0n
where A and ω0 are constants. The energy of the signal is
12. Introduction to Discrete-time Signals Processing
 
2
E  
n  
Ae j 0n  A
n0
2
 

Thus, the energy of a constant-amplitude complex-valued exponential


sequence is infinite.

Signals that have non-finite energy, however, may have finite average power. The average
power of a discrete-time signal x(n) is defined as
N
1 2
P  lim 
N   2 N  1 n  N
x(n )

If we define the signal energy over the finite interval − ≤ ≤ as


N
2
EN  
n  N
x ( n)

then we may express the total signal energy E as


E  lim E N
N 

and the average power of the signal x(n) as


1
P  lim EN
N 2 N  1

If E is finite, then the average power P = 0. If, on the other hand, E is infinite, then the
average power P may be either finite or infinite. The signal is called a power signal if the
average power is finite.

Example 1.3.2: i) Consider the unit step sequence. We have seen that it is not an energy
signal. The average power of the unit step sequence is

N
1 N1 1
P  lim  u 2 ( n) 
N   2 N  1 n  N
lim
N  2 N  1

2
Since the average power of the unit step sequence is finite u(n) is a power signal.

ii) The constant-amplitude complex-valued exponential signal has infinite energy.


Check if it is a power signal.
N N
1 1 2N  1 2
P  lim 
N   2 N  1 n  N
| Ae j 0n |2  lim 
N   2 N  1 n  N
A 2  lim
N 2 N  1
A  A2

Since A, the signal amplitude, is assumed to be finite, A2 is finite. Thus, the


complex exponential signal is a power signal.
Chapter 1 - Discrete-time Signals and Systems 13

iii) Consider the discrete-time unit ramp signal


n n  0
x (n)  
0 n  0
Over the finite interval -N < n < N, the unit ramp has signal energy

N ( N  1)(2 N  1)
EN  n
n 0
2

6
  (as N   )

The total signal energy, over all time, is infinite. Hence, the unit ramp signal is
not an energy signal. The average power of the signal is
1 N ( N  1)
P  lim EN  lim  
N  2 N  1 N  6
which clearly is also infinite. Since this signal has infinite energy and infinite
power it is neither an energy signal nor a power signal.

Periodic Signals and Aperiodic Signals:

As seen earlier, a discrete-time signal x(n) is periodic, with period N, if and only if
x(n + N) = x(n), for all n.
The smallest integral value of N for which this condition holds is called the fundamental
period. If there is no value N that satisfies the above condition, then the signal x(n) is non-
periodic or aperiodic. We have already observed that the sinusoidal signal
2f 0
x (n )  sin( n)  sin( 0 n)
fs
is periodic when f0 is a rational number multiplied by the sampling rate, fs, i.e., if f0 can be
expressed as
2
= , ( = =2 )

where k and N are integers. For periodic signals the signal energy is specified over one
period, over the interval 0 ≤ ≤ − 1. For finite-valued signals this energy will be finite.
The average power of a periodic signal is equal to the average power over a single period.
Thus, the average power of a finite-valued periodic signal x(n), with fundamental period N, is
N 1
1 2
P 
N

n0
x ( n)

The average power of such signals is finite. Consequently, finite-valued periodic signals are
power signals.
14. Introduction to Discrete-time Signals Processing

The sum and product of two periodic signals is also a periodic signal. Let ( ) be a
sequence with period and ( ) be another sequence with period . Then
( ) = ( )+ ( )
and
( ) = ( ) ( )
are always periodic with fundamental period N, where

=
gcd ( , )
where gcd( , ) is the greatest common divisor of and .

Symmetric and Anti-symmetric Signals

i) x(n) real:- A real-valued signal x(n) is called symmetric (even) if


x(-n) = x(n), for all n,
and it is called anti-symmetric (odd) if
x(-n) = - x(n), for all n.
Note that if x(n) is odd, then x(0) = 0 is a requirement since for any other value we will
get a = -a, which is impossible unless a = 0. An arbitrary real-valued signal x(n) that is
neither even nor odd can be expressed as the sum of an even component and an odd
component, i.e.,
x ( n)  x e (n )  x o ( n)
The even signal component xe(n) and the odd component xo(n) can be expressed in terms
of x(n), using the relations
( )= ( )+ ( )
(− ) = (− ) + (− ) = ( )− ( )
and from
( ) + (− ) = 2 ( ) ( ) − (− ) = 2 ( ),
as
x ( n)  x (  n)
x e ( n) 
2
x ( n)  x (  n)
x o ( n) 
2

ii) x(n) complex:- A complex-valued signal x(n) is called conjugate symmetric (real part
even and imaginary part odd) if
Chapter 1 - Discrete-time Signals and Systems 15

x(n) = x*(-n), for all n,


It is called conjugate anti-symmetric if
x(n) = - x*(-n), for all n,
If, however, the signal is neither conjugate symmetric nor conjugate anti-symmetric, then
it can be expressed as a sum of its conjugate symmetric components xe(n) and its
conjugate anti-symmetric component xo(n) as
x ( n)  x e (n )  x o ( n)
where
x (n)  x * (  n)
x e ( n) 
2
x ( n)  x * (  n)
x o ( n) 
2
We will have several occasions to look at other characteristics, properties, and manipulations
of discrete-time signals that may be used to classify discrete-time signals.

1.4 Discrete-Time Systems

A discrete-time system is defined mathematically as a transformation (processor or


algorithm) that transforms an input sequence ( ) into an output sequence ( ) according to
some input/output rule. This definition may be denoted in many ways.

( )= [ ( )], ( ) ⎯⎯⎯⎯⎯⎯⎯⎯⎯ ( )

x(n) H y(n)
input sequence output sequence

The symbol H denotes the transformation or rule used for computing the output sequence
values, ( ), from the input sequence values, ( ). This transformation describes the
characteristics of the system and may be used to classify discrete-time systems.

Among the various ways used to describe the characteristics of the system and the operations
it performs on ( ) to produce ( ), the input/output description will be discussed first. At
this point we will look at the time domain characterization of systems. The input/output
description gives a mathematical expression which explicitly defines the relationship between
the input and output signals. The exact internal structure of the system is not important, or is
ignored. Some examples of the input/output description for discrete-time systems are given
below.
16. Introduction to Discrete-time Signals Processing

Example 1.4.1:- a) An ideal delay system is defined by


( )= ( − )
where D is a fixed integer that indicates the amount of time the system delays (if
D is positive) the input to produce the output. This corresponds to a shift of x(n)
by D samples to the right. If D is negative, then this corresponds to a time
advance, i.e., a shift to the left by the same amount.

b) A moving average system is defined by


M2
1
y ( n)   x (n  k )
M 1  M 2  1 k  M1

This system computes the nth sample of the output sequence as the average of
(M1 + M2 + 1) samples of the input sequence around the nth-sample. A similar
system which gives as output a weighted average of three input samples, for
example, is the following

( ) = 2 ( ) + 3 ( − 1) + 4 ( − 2) = ℎ ( − )

At each instant n, the system must remember the previous input samples x(n-1)
and x(n-2).

c) An accumulator is defined by
n n 1
y ( n)  
k  
x( k )   x( k )
k  
 x (n)

i.e., y (n)  y (n  1)  x (n)

The system computes the current value of the output by adding (accumulating)
the current value of the input to the previous value of the output. Note that all
effects of previous inputs have been remembered by the previous output y(n-1).

d) The second example in (b) may also be represented in a compact matrix form
for a finite input sequence x = [x0, x1, x2, x3] as
 y0  2 0 0 0
y  3 2 0 0  x 0 
 1  
 y2  4 3 2 0  x1 
y         Hx
 y3  0 4 3 2   x2 
 y4  0  
0 4 3  x 3 
   
 y5  0 0 0 4
As we shall see later this is a linear transformation representation of the system
which is important in the block processing operation of the input to produce the
Chapter 1 - Discrete-time Signals and Systems 17

output. As can be seen a length-4 input block is transformed into a length-6


output block. The transformation matrix H has a special form which carries
information on the system. As we shall see later, its columns are shifted versions
of the impulse response sequence.

e) if we introduce state variables w1(n) and w2(n) defined as x(n-1) = w1(n) and
x(n-2) = w2(n), then the second example above (b) may also be represented in a
different form (state variable representation) by the following system of three
equations:
y (n)  2 x (n)  3w1 (n)  4 w2 (n)
w2 (n  1)  w1 (n)
w1 (n  1)  x ( n)
i.e.,
 w1 (n  1)   0 0  w1 (n)   1
 w (n  1)   1 0  w ( n )    0 x ( n )
 2    2   
w
 1  ( n )
y ( n)  
3 4     2 x ( n)
 w 2 (n ) 
i.e.,

( + 1) = ( ) + ( )
( ) = ( )+ ( )

This is a special case of the more general state-variable representation of


discrete-time systems. w(n) is an internal state vector. The first equation is the
state equation or state-updating equation (vector equation, i.e., a set of
equations) and the second equation is the output equation (scalar equation in
this case). The matrix form representation of the state variable equations is
much preferred. The order in which the state equations are updated is as
follows: w2(n+1) is evaluated first and then w1(n+1) is evaluated next, as
indicated in the first set of equations. This form is well suited to the sample-by-
sample processing of the input sequence. We will discuss the state-variable
representation of systems in later chapters.

f) A discrete-time system that squares its input is defined by


y ( n)  x 2 (n)
g) A rate compressor or down-sampler is defined as
y ( n)  x ( 2 n)
It keeps every other sample from the input at the output. This operation of down
sampling is called decimation.

h) A rate expander or up-sampler is defined as


18. Introduction to Discrete-time Signals Processing

n
y ( n)  x( )
2
This operation inserts a zero sample value in between the samples of the input
sequence x(n) for every odd value of n. This general operation of up-sampling is
called interpolation.

The representations above give input/output (I/O) description of systems. A block diagram
may also be used to represent discrete-time systems. The basic building blocks of discrete-
time systems for this representation are: an adder, a constant multiplier, a unit delay element,
and a signal multiplier. The block diagram representation is nothing but a realization of the
input/output rule described above. As we shall see in a later chapter, this realization is not
unique, i.e., there are a number of different realizations for a system described by a given I/O
rule. These different realizations (structures) are all realized using the same basic building
blocks.

An adder:- This basic unit (elementary system) performs the addition of two sequences x1(n)
and x2(n) to form another sequence (the sum) y(n). This unit is memory less, i.e., none of the
sequences are stored to perform the operation.

x1(n) + y(n) = x1(n) + x2(n)

x2(n)

A scalar multiplier:- This operation multiplies the sequence by a scalar. This operation is
also memory less.
a
x(n) y(n) = ax (n)

A unit delay: This unit simply delays the sequence by one sample. If the input sequence is
x(n), then the output sequence is x(n-1). In fact, the sample x(n-1) can be taken to be stored in
memory at time n-1 and recalled from memory at time n to form the output y(n) = x(n-1).
This basic unit requires memory. In the block diagram representation the unit delay is
represented by z-1 and the unit advance is represented by z. This convention will be apparent
when we look at the z-transform.

x(n) z-1 y(n) = x(n-1) x(n) z y(n) = x(n+1)

unit delay: unit advance:

A signal multiplier: This unit multiplies two sequences sample by sample. It is a memory less
system.
Chapter 1 - Discrete-time Signals and Systems 19

x1(n) × y(n) = x1(n) x2(n)

x2(n)

1.4.1 Classification of Discrete-Time Systems

A general classification of discrete-time systems will be given below. There are a variety of
ways in which systems may be classified according to the general properties that they satisfy.

Linear systems

A linear system is one that satisfies the superposition principle. The superposition principle
requires that the response of a system to a weighted sum of signals be equal to the
corresponding weighted sum of the responses of the system to each of the individual input
signals, i.e.,
H
If x1 (n)   y1 (n)
H
and x 2 (n) 
 y 2 (n)
H
then ai xi (n) 
 ai yi (n)
H
and x1 (n)  x 2 (n) 
 y1 (n)  y 2 (n)

where the ai’s, i = 1, 2, are arbitrary constants. The first property is called the homogeneity or
scaling property and the second one is called the additivity property. These two properties are
combined into the principle of superposition, stated as

H
a1 x1 (n)  a 2 x 2 (n)  a1 y1 (n)  a 2 y 2 (n)

By using the definition of the principle of superposition, we see that some of the systems of
Example 1.4.1 are linear systems ((b) & (c) for instance). If the system does not obey the
principle of superposition, then the system is said to nonlinear. The systems considered in
this text will all be assumed to be linear.

Time-invariant (shift-invariant) Systems


A time-invariant system is one for which a time shift or delay of the input sequence causes a
corresponding shift in the output sequence. Suppose a system transforms an input sequence
x(n) into an output sequence y(n). The system is said to be time-invariant if, for all integral
no, the input sequence x1(n) = x(n-n o) produces the output sequence y1(n) = y(n-n o), i.e.,
irrespective of the time of application of the input the output will have exactly the same
characteristics except for the shift in time. Thus, a system is time-invariant if and only if
20. Introduction to Discrete-time Signals Processing
H
x (n)  y (n)
implies that
H
x(n  n0 ) 
 y (n  n0 )
for every input sequence x(n) and every time shift n0. If the above condition is not satisfied,
then the system is said to be time varying.

Example 1.4.2: Test the following systems for time-invariance (backward difference system).
a ) y (n)  x (n)  x (n  1)
b) y (n)  nx (n)
a) Let the input be delayed by some value n o = D samples, i.e., ( ) = ( −
). Then the corresponding output, using the input output equation,

y (n )  x (n)  x (n  1)
is
y D ( n)  x D (n)  x D (n  1)
 x(n  D)  x (n  D  1)
Delaying the output y(n) by D samples gives
y ( n  D)  x (n  D)  x (n  D  1)
i.e.,
y ( n  D)  y D ( n)
Thus, the differentiator realized as a backward difference system is a time-
invariant system.

b) Let the input be delayed by some value n o=D samples, i.e., ( ) = ( − ).


Then the corresponding output is
y D ( n)  nx D (n)  nx(n  D)
Delaying the output y(n) by D samples gives
y ( n  D)  ( n  D) x ( n  D)
 nx (n  D)  Dx (n  D)
Can see that
y D ( n)  y ( n  D)
The systems we deal with, in this text, will all be assumed to be time-invariant. An important
class of systems often encountered in analysis and design is the linear time-invariant (LTI)
system.
Chapter 1 - Discrete-time Signals and Systems 21

Memoryless (Static) Systems


A discrete-time system is referred to as memoryless or static if its output y(n) at any instant n
depends only on the input x(n) at the same instant n and not on past or future input values. If
the output of the system at time n is completely determined by the input samples in the
interval n-N to n, N positive, then the system is said to have memory of duration N. Static or
memoryless systems do not include delay units.

The following I/O equations describe static or memoryless systems:


y ( n)  ax (n)
y ( n)  a1 x ( n)  a 2 x 2 ( n)
Note that there is no need to store any of the past input or output values to compute the
present output. The following I/O equations describe dynamic or systems with memory.
Dynamic systems may have finite or infinite memory.
y ( n)  2 x (n)  3x (n  1)
N
y ( n)  a
k0
k x (n  k ), N1

Causal Systems
A system is causal if for every integer n o the output sequence value at n = no depends only on
the input sequence values for ≤ . In other words, the output of the system at any time n
depends only on present and past values of the input (i.e., x(n), x(n-1), x(n-2), ...), but does
not depend on future inputs [i.e., x(n+1), x(n+2), x(n+3), ...]. That is, the system is non-
anticipative, it does not anticipate a future input and respond now. Mathematically, the output
of a causal system is some function of the present and past input values, i.e.,

y ( n)  f [ x (n), x (n  1), x(n  2),  ]


where f[.] is some function. If the system does not satisfy this condition, it is called
noncausal. A noncausal system is physically unrealizable. On the other hand, if the signal is
recorded so that the processing is done off-line (non-real time), it is possible to implement a
noncausal system, since all values of the signal are available at the time of processing. This is
often the case in many applications like image processing and geophysical signals processing.
In some cases, a noncausal system may be made causal by introducing a sufficient amount of
delay. We will encounter such systems later in finite-impulse-response (FIR) filter design.

As an example, the forward difference system, defined by the relation


y (n)  x ( n  1)  x (n)
is obviously noncausal since the output at time n depends on x(n+1), i.e. an input at time n+1.
The backward difference system, defined by
y (n)  x ( n)  x (n  1)
22. Introduction to Discrete-time Signals Processing

is causal.

Stable systems
A system is stable in the bounded-input bounded-output (BIBO) sense if and only if every
bounded input sequence produces a bounded output sequence. An input x(n) is bounded if
there exists a fixed positive finite value Bx such that
x ( n)  B x   , all n
Stability requires that for every bounded input there exists a fixed positive finite value By
such that
y (n)  B y   , all n
If for some bounded input x(n) the output is unbounded (infinite), then the system is
classified as unstable.

Consider the accumulator with a bounded input x(n) = u(n). The output of the accumulator to
the unit step input is
n n
y ( n)   u( k )
k  
 1
k  
 n1

The response of the accumulator is finite for n finite. It is, however, unbounded, i.e., there is
no fixed positive finite value By such that ( + 1 ≤ < ∞) for all n.

Note that the existence of inputs that satisfy the stability property does not mean that the
system is stable. The stability property has to hold true for all inputs for the system to be
stable. An unstable system may have some bounded inputs for which the output is bounded,
but for the system to have the property of stability, it must be true that for all bounded inputs
the output is bounded.

Stability is an important property that must be considered in the study and implementation of
systems. The general study of stability will not be dealt within this book. Other stability
criteria have also been developed. The above condition will be explored further later on.

1.5. Linear Time-Invariant (LTI) Systems


This is a particularly important class of systems that combines the properties of linearity and
time-invariance. This class of systems has significant signal processing applications. The
linearity property, combined with the representation of a general sequence as a linear
combination of delayed impulses, help to completely characterize a linear system by its
impulse response. Linear time-invariant systems are characterized uniquely by their impulse
response sequence.

Consider a discrete-time linear time-invariant system. Let the input be an impulse x(n) = δ(n).
Chapter 1 - Discrete-time Signals and Systems 23

The response of the system to this input is called the impulse response, denoted by h(n), i.e.,
H
x (n )   (n)  y (n)  h( n)
i.e.,

1, 0, 0, 0, 

H  
  h0 , h1 , h2 , h3 ,  

 
and using the time-invariance property, we get
H
 (n  D)  h(n  D)
i.e., say for D = 3,

0, 0, 0, 1, 0, 0, 0,  

H

 0, 0, 0, h , h , h , h ,  

0 1 2 3

Using the linearity property, i.e., the principle of superposition, we get


H
 (n)   (n  1)   (n  2)    h(n)  h(n  1)  h(n  2)  
or, more generally, for an arbitrary input signal x(n), defined over [0,∞), we get
H
x ( n)  x0 (n)  x1 (n  1)    x 0 h(n)  x1h(n  1)    y(n )
i.e.,
 
H
x ( n)  
k0
x k  (n  k )   x h( n  k )
k0
k  y ( n)

In general, the output y(n) of a linear time-invariant (LTI) system for an input x(n) is given as

y ( n)  x 0 h(n)  x1h(n  1)  x2 h(n  2)  



 x
m 0
m h(n  m), LTI form of convolution

This expression is discrete-time convolution or convolution sum. Since this is derived using
LTI properties of a system, it is referred to as the LTI form of convolution. Alternatively, it
may be expressed as

y (n )  h
m
m x (n  m), direct form of convolution

As a consequence of these expressions, we say a linear time-invariant system is completely


characterized by its impulse response, h(n). This is to say, given h(n), it is possible to use any
one of the above equations to compute the output y(n) due to any input x(n). We say y(n) is
the convolution of x(n) and h(n). This is represented as
y ( n)  x ( n) * h( n )
In implementing convolution, the sequence h(n-m) is obtained by first reflecting h(m) about
the origin to obtain h(-m) and shifting the origin of the reflected sequence to m = n. Then the
24. Introduction to Discrete-time Signals Processing

two sequences x(m) and h(n-m) are multiplied sample-by-sample for - ∞ < m < ∞ and the
products are summed to compute the output sample, at time n, y(n). This is repeated for each
shift n. The convolution sum may be carried out numerically or analytically. The following
example illustrates discrete-time convolution evaluated analytically.

Example 1.5.1:- Consider a system with impulse response


y ( n)  u(n)  u(n  6)
 1, 0  n  5
 
 0, otherwisw
Let the input to the system be
x ( n )  a n u ( n)
Note that the input exists for n in [0, ∞] and the impulse response exists for n in the
interval [0, 5]. The convolution sum for different values of n is given by

y ( n)   x(m) h(n  m)
m

where h(n-m) and x(m) are plotted as shown below on the same axes, for N=6 and
n=-3. The convolutional equation will be plotted for various possible values of n.
These plots are shown below.

h(n-m), N = 6, n=-3
1

x(m)

•••
-10 0 10 20 m
n-(N-1) n = -3
= -8

i) For positive values of n, h(n-m) is shifted right and it is shifted left for negative
values of n. The sample by sample product x(m)h(n-m) is zero when there is no
overlap. Thus, for this example, x(n) and h(n-m) do not overlap when n < 0.
Hence, the output for n < 0 is

y ( n)  0, n 0

ii) For n  0 and n  5  0, i. e., 0  n  5 we see that there is some overlap between
h(n-m) and x(m) and
Chapter 1 - Discrete-time Signals and Systems 25

x (m) h(n  m)  am, 0 n 5


as shown below.
h(n-m), N = 6, n=3
1

x(m)

-10 -5 0 5 10 15 20 m
n-(N-1) n=3
= -2

Thus, the output over this interval is


n n
y (n )  
m 0
x (m)h(n  m)  a
m 0
m
, 0 n 5

This is a geometric series of ( + 1) terms whose sum can be expressed in closed-


form using the general formula
N2
a N1  a N 2
a
m   N1
m

1 a
, N 2  N1

Applying this to y(n) gives


1  a n 1
y ( n)  , 0 n 5
1 a
iii) Finally, for 0  n  5 or n  5 , h(n-m) overlaps completely with x(m), as
shown below, and
x (m) h(n  m)  a m , n 5 m n

h(n-m), N = 6, n = 14
1

x(m)

•••
-10 -5 0 5 10 15 20 m
n-(N-1) n = 14
= 9

The output for this region becomes


26. Introduction to Discrete-time Signals Processing
n
y ( n)  a
m n  5
m
, 5 n

And using the geometric sum result, we get


a n 5  a n 1 1  a 5 n 5
y (n )   a
1 a 1 a
Note that the closed form solution was computed over three different regions.
Thus, the complete solution is

 0, n 0
 n 5
 a  a n1
y ( n)   , 0 n 5
 1 5 a
 1  a a n 5 , n5
 1 a

The final output is shown below. When a closed-form solution is not possible the
convolution sum can still be evaluated numerically or graphically, especially
when the sequences involved are of finite duration.

y(n)

•••
-5 0 5 10 15 20 25 30 n

Finally, since all linear time-invariant systems are described by the convolution sum, the
properties of this class of systems are defined by the properties of discrete-time convolution.
General properties of the class of linear time-invariant systems can be found by considering
properties of the convolution operation, which may be obtained from the defining sum.

Linearity and time-invariance define a class of systems with very special properties. Stability
and causality represent additional properties. It was noted earlier that a stable system is one
for which every bounded input produces a bounded output. A necessary and sufficient
condition for stability of linear time-invariant system is that the impulse response be
absolutely summable, i.e.,

S   h(m)
m 
 

Causality of linear time-invariant systems imposes a condition on the impulse response of the
Chapter 1 - Discrete-time Signals and Systems 27

system, i.e.,
h(n) = 0, n < 0.
Consequently we may refer sequences that are zero for n < 0 as causal sequences.

1.6. Finite Impulse Response (FIR) and Infinite Impulse Response (IIR) Filters

The impulse response of LTI systems may be used to classify LTI systems into finite-duration
impulse response (FIR) and infinite-duration impulse response (IIR) systems depending on
whether the duration of the impulse response is finite or infinite, respectively.

FIR systems have finite-duration impulse response and hence are always stable (i.e., S < ∞ ).
Let h(n), nonzero over 0  n  M and zero for n  M , be the impulse response of a causal
FIR filter, i.e.,

h(n)  h(0), h(1), h(2),  , h( M )  h , h , h ,  , h 


0 1 2 M

or, in vector form


h = [ h 0, h1, h 2, . . ., hM ]T
The integer M is the order of the filter. The length of the filter impulse response, h(n),
becomes Lh = M +1. The hi‘s, i = 0, 1, 2, 3, . . ., M are called filter coefficients, or filter
weights, or filter taps.

The response of an FIR filter to an input x(n) may be computed using the convolution sum.
Taking the direct form of convolution, and assuming a causal FIR impulse response, the
output becomes
M
y ( n)   h(m) x(n  m),
m 0
FIR filtering equation

 h0 x (n)  h1 x(n  1)  h2 x (n  2)    hM x (n  M )
This is the I/O equation of the FIR filter and is referred to as the FIR filtering equation. Thus,
the I/O equation is obtained as a weighted sum of the present input sequence value, ( ), and
the past M input sequence values, ( − 1), ( − 2), ( − 3), . . . , ( − ). Given an I/O
equation finding the impulse response is straight forward.

Example 1.6.1:- Consider a 3 rd - order filter characterized by four weights


h = [ h 0, h1, h 2, h 3 ]T
The I/O equation of this third-order filter is
y ( n)  h0 x (n)  h1 x (n  1)  h2 x (n  2)  h3 x (n  3)
The length of this filter is Lh = M+1 = 4, i.e., the impulse response has four sequence
values.
28. Introduction to Discrete-time Signals Processing

A causal IIR filter has an impulse response h(n) of infinite duration. Thus, the I/O equation
has an infinite number of terms, i.e.,

y ( n)   h(m) x(n  m),
m 0
IIR filtering equation

 h0 x (n)  h1 x (n  1)  h2 x (n  2)  
This form of the I/O equation is not computationally feasible since we cannot deal with an
infinite number of terms. This type of filter has an infinite number of filter coefficients {h 0,
h1, h2, h3, . . .}. We will consider a subclass of IIR filters for which the infinite number of
filter coefficients is coupled to each other through constant-coefficient linear difference
equations. The filter coefficients in such cases are recursively related to each other. Thus, IIR
filters of this subclass are referred to as recursive digital filters in the literature.

Example 1.6.2:- i) Determine the I/O difference equation of the causal IIR system whose
impulse response coefficients are coupled to each other by the difference equation

h ( n)  h(n  1)   (n), coupled equation in h(n)

Assume causality, i.e., h(-1) = 0. Thus, from the coupled difference equation we get
h(0) = h0 = 0 + 1 = 1
h(1) = h1 = h0 + 0 = 1
h(2) = h2 = h1 + 0 = 1
. .
. .
. .
h(n) = hn = hn-1 + 0 = 1

i.e., h(n) = u(n).

Thus, putting this into the convolutional I/O equation

= ℎ( ) ( − ) = ( − )

= + + +⋯
Note also that the previous output at n = n-1 becomes
yn 1  xn 1  x n 2  x n 3  xn  4  

Then, we form the difference y(n) - y(n-1), i.e.,


xn + yn
yn  yn 1  xn
z-1
The I/O convolutional equation thus becomes
the recursive difference equation yn-1
Chapter 1 - Discrete-time Signals and Systems 29

= +
This equation represents an accumulator or discrete-time integrator. Note that the
form of the coupled equation for h(n) is the same as that of the difference equation.
This is normally the case.

ii) Let the filter coefficients satisfy the difference equation


h (n )  ah(n  1)   (n),
where ‘a’ is a constant. Determine the I/O difference equation relating x(n) and y(n).

Get an analytical form for h(n) to be used in the convolutional form, as follows:

ℎ = ℎ + = .0+1 = 1
ℎ = ℎ + = .1 +0 =
ℎ = ℎ + = . +0 =
ℎ = ℎ + = . +0=

Thus, we see that the impulse response may be represented by the expression

an , n  0
h ( n)  hn  a n u( n)  
 0, n  0

Using this form of h(n) in the convolutional equation gives

yn  x n  axn 1  a 2 x n  2  a 3 xn  3  
 x n  a[ x n 1  ax n 2  a 2 x n 3   ]
 x n  ay n 1

Thus, the I/O difference equation is

yn  ay n1  xn

iii) Determine the convolutional form and the (causal) impulse response of the IIR filter
described by the following difference equation.

yn   0.8 yn 1  xn

With x(n) = δ(n), we get

hn   0.8hn1  n
30. Introduction to Discrete-time Signals Processing

Assuming causal initial condition, h(-1) = 0 and iterating for a few values of n, we
get

(−0.8) ≥0
ℎ = (−0.8) ( )=
0, ≤ −1
Inserting this in the convolutional equation gives

= (−0.8) ( − )

= ( ) + (−0.8) ( − 1) + (−0.8) ( − 2) + ⋯
= −0.8 + ( )

iv) Determine the I/O difference equation of the IIR filter that has the following causal
periodic impulse response.

h(n) = {2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, . . . }

Note that the period of this signal is N = 4. Delay the impulse response by one period,
i.e.,
h(n-4) = { 0, 0, 0, 0, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, . . . }

Then, form the difference

h(n) - h(n-4) = {2, 3, 4, 5 }

Thus,
h(n) - h(n-4) = 2 δ(n) + 3 δ(n-1) + 4 δ(n-2) + 5 δ(n-3)
i.e.,
h(n) = h(n-4) + 2 δ(n) + 3 δ(n-1) + 4 δ(n-2) + 5 δ(n-3)

and hence, the difference equation is

y(n) = y(n-4) + 2 x(n) + 3 x(n-1) + 4 x(n-2) + 5 x(n-3)

This example shows you how to construct a discrete-time periodic waveform


generator. Its realization is shown below
Chapter 1 - Discrete-time Signals and Systems 31

2
xn + yn

z-1 3 z-1
xn-1 yn-1
-1
z-1 z
4 yn-2
xn-2
z-1
z-1
5 yn-3
xn-3 z-1

yn-4

In general, the IIR filters we shall consider will have impulse responses, h(n), that satisfy
constant-coefficient difference equations of the general type:
M L
h ( n)  a
k 1
k h( n  k )   a  (n  k )
k 0
k

The corresponding convolutional form can be expressed as the difference equation of the
general type:
M L
y ( n)  a
k 1
k y (n  k )  a
k 0
k x (n  k )

where the first sum is the recursive term and the second sum is the non-recursive term.

Other equivalent descriptions of FIR and IIR filters or LTI discrete-time systems are:
i) I/O difference equation
ii) Convolutional equation
iii) Impulse response, h(n)
iv) Transfer function, H(z)
v) Frequency response, H(ω)
vi) Pole-zero pattern
vii) Block diagram realization and sample processing algorithm.

We will look at most of these equivalent descriptions in subsequent chapters. Since we use
the difference equation description in the analysis of systems we need to look at the time-
domain solution of difference equations in the next section.

1.7 Solution of Linear Constant-coefficient Difference Equations


The objective in this section is to determine an explicit expression for the output of a system
described by a linear constant-coefficient difference equation. The time-domain method of
solution is presented here; the z-domain solution will be presented in a later chapter.
32. Introduction to Discrete-time Signals Processing

A linear constant-coefficient difference equation of order-N has the general form

( )= ( − )+ ( − )

or

( − ) = ( − ), = 1.

The information is complete given the initial state of the system. The form of the solution
will also depend on the initial state and the second term of the difference equation. When the
second term is zero the resulting equation is a homogeneous equation and the response is the
homogeneous response or the zero-input response. The zero-input response is a characteristic
response of the system and it is also known as the natural response or free response of the
system. The zero-input response is due to the initial state of the system. On the other hand, if
the system is initially relaxed and an input is applied, then the response is called the zero-
state response or forced response. The zero-state response depends on the nature of the
system and the input signal.

Homogeneous Equation and the Zero-Input Response:- Consider the linear constant-
coefficient homogeneous equation:
N

a
k 0
k y(n  k )  0, a0  1.

the general method of solution to the homogeneous equation is to assume a homogeneous


solution, yh(n), of the form
y h (n)  n
If the assumed solution is a solution, then it has to satisfy the equation. Substitute the
assumed solution into the difference equation and solve to determine the value(s) of λ that
satisfy the equation,
N

a k n  k  n  a1n 1  a2 n  2   a N n  N  0
k 0
i.e.,
n N { N  a1 N 1  a 2  N  2   a N }  0

The expression inside the parenthesis is the characteristic polynomial. The characteristic
equation will have N roots, { }, i = 1, 2, 3, 4, . . ., N, which may be real or complex. If the
coefficients {ai} are real, then complex roots appear in complex conjugate pairs. The roots
may be distinct or repeated.

i) Distinct roots case:- the form of the most general solution will be a linear combination of
those for each characteristic root, i.e.,
yh (n)  c11n  c2 n2  c3 3n   c N nN
Chapter 1 - Discrete-time Signals and Systems 33

where the coefficients {ci} are determined from the initial conditions specified for the system.
Since x(n) = 0, the above solution is the zero-input response.

Example 1.7.1:- Determine the zero-input response of the system described by the difference
equation
y(n)  a1 y (n  1)  0
Assume
y (n)  n
Then
+ = 0
( + ) = 0
= −
Hence, the homogeneous solution is
yh (n)  cn  c(  a1 ) n
The zero-input response may be obtained for a given initial condition. From the
difference equation, we have
y (0)   a1 y ( 1)
And from the homogeneous solution we get
y h (0)  c
Hence, the zero-input response of the system is
y zi (n)   a1 y (1)(  a1 ) n
 y ( 1)(  a1 ) n1

Example 1.7.2 :- Determine the zero-input response of


y (n)  3 y (n  1)  4 y (n  2)  0
First find yh (n) . Assume

y h (n)  n
Substitute this in the difference equation and solve for the characteristic roots. The
characteristic equation is
2  3  4  0
The characteristic roots are λ = -1 and λ = 4. The form of the general homogeneous
solution is
yh (n)  c11n  c2 n2  c1 ( 1) n  c2 4 n
34. Introduction to Discrete-time Signals Processing

To determine the zero-input response, we need to be given the initial conditions y(-1)
and y(-2). Use the initial condition to solve for unique values for c1 and c2. Thus, for
y(-2) = 0 and y(-1) = 5, we get
yh (n)  ( 1) n 1  4 n 2

ii) Repeated roots:- If some of the roots of the characteristic equation are repeated, then the
form of the solution will be modified. Assume that λ1 is a root of multiplicity m of the
characteristic equation. Then, the form of the homogeneous solution is
y h (n)  c11 1n  c12 n1n  c13 n 2 1n    c1m n m11n  c2 n2    c N nN
where the coefficients, {ci, cij}, are solved using the specified initial conditions of the system.

Nonhomogeneous Difference Equation and the Zero-state Response: The solution to a


nonhomogeneous difference equation consists of two components: a homogeneous solution
and a particular solution. The homogeneous solution is the natural response or the zero-input
response due to the initial conditions of the system. The particular solution component is the
solution in response to the applied input signal. We will concentrate on the particular solution
at this point, since the homogeneous solution may be obtained as before. Thus, the overall
solution is
y ( n)  y h (n )  y p ( n )
where y p (n) is the particular or zero-state response of the system.

The technique used to determine the particular solution is to assume that the response will
have the same form as the input itself to within a multiplier constant. Thus, assume a
particular solution to have the same form as the input. This will be demonstrated with an
example.

Example 1.7.3: Determine the particular solution for a system described by


y (n)  a1 y(n  1)  x(n)
when
x(n) = u(n).
Assume a particular solution of the form
y p (n)  Ku(n)

where K is a constant whose value will have to be determined from the difference
equation. Substitute the assumed solution in the difference equation and determine the
value of K. Thus,
Ku(n)  a1 Ku(n  1)  u(n)
Chapter 1 - Discrete-time Signals and Systems 35

For n ≥ 1, we get
K  a1 K  1
1
i.e., K 
1  a1
Thus, the particular solution to the difference equation is
1
y p ( n)  u( n)
1  a1
and together with the homogeneous solution constitute the general solution of the
difference equation, i.e.,
y (n )  y h (n)  y p ( n)
as stated before.

In general, the form of the particular solution depends on the type of the input and on the
nature of the characteristic roots in relation with the input signal. The form of the general
solution for some input signals is summarized below for your reference.

General form of particular solution


Input signal, x(n) Form of particular solution
A (constant) K (constant)
K(a)n, if ‘a’ is not a characteristic root.
A(a)n
Kn(a)n, if ‘a’ is a double root.

A(n)p K0 n p  K1n p 1    K p

Annp An ( K 0 n p  K1n p 1    K p )
Acos(ωn) K1 cos(n)  K2 sin(n)
Asin(ωn)

Example 1.7.4 : Find the particular solution for


5 1
y ( n)  y (n  1)  y(n  2)  x (n)
6 6
when
( )= 2 , ≥ 0.
Assume a particular solution (2 is not a characteristic root)
y p ( n)  K2n , n0

Substituting this in the difference equation, we get


36. Introduction to Discrete-time Signals Processing

5 1
K 2 n u( n)  K 2 n1 u(n  1)  K 2 n  2 u( n  2 )  2 n u( n)
6 6
To determine K, evaluate this equation for any ≥ 2, where none of the terms vanish
or divide the equation by 2 n. Thus,
5 1
4K  (2 K )  K  4
6 6
i.e.,
8
K  .
5
Thus,
8 n
y p ( n)  (2 ), n0
5
The total solution becomes
y ( n)  y h ( n)  y p (n).

Example 1.7.5 : Determine the response, y(n) for ≥ 0.


( ) − 3 ( − 1 ) − 4 ( − 2) = ( ) + 2 ( − 1)
when
x ( n)  4 n u(n).

The homogeneous solution is


y h ( n)  c1 (  1) n  c2 (4) n .
Assume
y p (n)  K 4 n u(n).
But, y p (n) is already contained in yh (n) . We need to select y p (n) to be linearly
independent of the terms in yh (n). In fact, treat this in the same manner as multiple
roots case. Thus, assume
y p (n)  Kn4 n u(n).
Substituting this into the difference equation, we get
4 ( ) − 3 ( − 1) 4 ( − 1) − 4 ( − 2) 4 ( − 2)
= 4 ( ) + 2( 4) ( − 1)
Evaluate this at any value ≥ 2, where none of the unit step terms vanish. Let n = 2.
Then, K = 6/5. Thus,
6 n
y p ( n)  n4 u(n).
5
and
Chapter 1 - Discrete-time Signals and Systems 37

6 n
y ( n)  c1 (  1) n  c2 4 n  n4 u(n), n  0.
5

Note:- when the input is an impulse, and a relaxed system assumed, the particular solution is
zero, since x(n) = 0 for n > 0. Thus, the response of a system to an impulse consists of the
solution to the homogeneous equation.

Example 1.7.6 : Determine the impulse response, h(n), of the system described by
( ) − 3 ( − 1) − 4 ( − 2) = ( ) + 2 ( − 1)
Note that, from our previous result (Example 1.7.5.), the homogeneous solution is
( )= (−1) + 4 , ≥ 0.
Since the particular solution is zero when the input is an impulse, the above solution
is the total solution. Since the solution is applicable for n ≥ 0, we must derive an
equivalent set of initial conditions for y(0) and y(1) by evaluating the difference
equation at n = 0 and n = 1, with x(n) = δ(n). Thus we get, assuming the system is
initially relaxed, i.e., y(-1) = y(-2) = 0,
y(0) = 1, y(1) = 5.
Put these values in the homogeneous solution to get
( 0) = 1 = ( 1) + ( 1)
( 1) = 5 = (−1) + (4)
Solving the above set of equations, we get
1 6
c1   and c2 
5 5
Thus,
1 6
( ) = ℎ( ) = − (−1) + (4) ( ).
5 5

1.8 Frequency-Domain Representation of Discrete-time Signals and Systems

Discrete-time signals may be represented in a number of different ways. Sinusoidal and


exponential sequences play a particularly important role in representing discrete-time signals.
This is because complex exponential sequences are eigenfunctions of linear time-invariant
(LTI) systems, and the response to a sinusoidal input is sinusoidal with the same frequency as
the input and with amplitude and phase determined by the system. Eigenfunctions of linear
time-invariant systems are sequences that pass through the LTI system with only a change in
amplitude (complex). Thus, if x(n) is an eigenfunction input then the output is
( )= ( )
where λ is the eigenvalue. This fundamental property of linear time-invariant systems makes
representations of signals in terms of sinusoids or complex exponentials very useful in linear
38. Introduction to Discrete-time Signals Processing

systems theory.

To demonstrate the eigenfunction property of complex exponentials for discrete-time


systems, consider an input sequence ( ) = for -∞<n<∞, i.e., a complex
exponential of radian frequency ω. Using the convolution sum, the corresponding output of a
linear time-invariant system with impulse response h(n) is

  
y ( n)   h( k )e
k  
j ( n  k )
 e j n
  h( k ) e  j  k 
 k   
Let us define

H ( )   h( k )e
k  
 jk

then the output becomes


( )= ( ) ≡ ( ), ( )=
Thus, is an eigenfunction of the system, and the associated eigenvalue is H(ω). Note
that H(ω) is responsible for the change in amplitude of a complex exponential input to
produce the output. H(ω) is a complex quantity and is called the frequency response of the
system.

Example 1.8.1: Consider a simple ideal delay system defined by


( ) = ( − ), N an integer.
Assume a complex sinusoidal input ( ) = . The output of the delay system is
( ) = ( − )= ( )

=
= ( )
Thus, the frequency response of an ideal delay system is
( )=
Alternatively, the frequency response may be obtained from

H ( )   h( n) e  j n

n  

where h(.) is the impulse response of the system. Note that ℎ( ) = ( − ) and
thus, for an ideal delay system

( )= ( − ) =

The concept of the frequency response of linear time-invariant systems is essentially the same
for continuous-time and discrete-time systems. However, the frequency response of discrete-
time linear time-invariant systems is always a periodic function of the frequency variable ω,
Chapter 1 - Discrete-time Signals and Systems 39

with period 2π, i.e.,


 
H (  2 )  
n  
h( n) e  j (   2  ) n   h( n) e
n  
 j n
.e j 2 n

  h( n) e
n  
 j n
.1

 H ( )
and, in general, for any integer k, we get
( +2 )= ( )
i.e., ( ) is periodic with period 2π. Since ( ) is periodic with period 2π, and since
frequencies ω and ω + 2π are indistinguishable, it follows that we need only specify ( )
over any convenient interval of length 2π, i.e., − < ≤ or 0 ≤ < 2 . In general,
it is more convenient to specify ( ) over the interval − < ≤ . With respect to this
interval, the low frequencies are frequencies around zero, while the high frequencies are those
close to ± π. In general, the low frequencies are those that are close to an even multiple of π,
while the high frequencies are those that are odd multiples of π.

As an example, consider the class of ideal frequency-selective linear time-invariant filters for
which the frequency response is unity over a certain range of frequencies and zero over the
remaining frequencies.

Hlp(ω)
1

-2π -2π+ωc -π -ωc 0 ωc π 2π-ωc 2π ω

a)

Hlp(ω)
1

-π -ωc 0 ωc π ω

b)

Fig. 1.1. Ideal lowpass filter showing (a) periodicity of the frequency response
b) one period of the frequency response.
40. Introduction to Discrete-time Signals Processing

1.8.1 Representation of Sequences by Fourier Transforms

The frequency domain representation of discrete-time signals and systems may be


generalized by the Fourier transform. Many signals can be represented by a Fourier integral
of the form

1
X ( )e j n d ,
2 
x (n) 

where X(ω) is the Fourier transform of x(n), given by



X ( )   x ( n) e  j n
.
n  

Note that the synthesis integral represents x(n) as a superposition of infinitesimally small
complex sinusoids of the form
1
X ( )e j n d
2
with X(ω) determining the relative amount of each complex sinusoidal component.

The frequency response of a linear time-invariant system is simply the Fourier transform of
the impulse response. Hence, the impulse response and the frequency response are Fourier
transform pairs, i.e.,

1
h ( n) 
2 
 H ( )e 
j n
d ,

and

H ( )   h (n ) e  j n
.
n  

Note that the frequency response H(ω) is a periodic function of ω, with period 2π. It is
beneficial to compare this pair with that of the Fourier series representation of continuous-
time signals, since many Fourier series properties may be applied to the Fourier transform,
with appropriate interpretation. From convergence requirements at every ω of the infinite
series, H(ω), a sufficient condition for existence of the Fourier transform is that the sequence
x(n) be absolutely summable, i.e.,

| ( )| ≤ | ( )| < ∞.

Example 1.8.2: Determine the impulse response of the ideal lowpass filter, defined by
 1,   c
H ( )  
 0, c  | |  
The impulse response is obtained using the synthesis formula
Chapter 1 - Discrete-time Signals and Systems 41

1 sin ( )
ℎ ( ) = 1. = , −∞< <∞
2

Note that hlp(n) is nonzero for n < 0, i.e., the ideal lowpass filter is noncausal. Also,
hlp(n) is not absolutely summable and thus ( )

sin( ) sin ( )
( )= = lim = lim ( ),
→ →

does not converge uniformly for all values of . The convergence property of
( )is shown below for several values of M. Uniform convergence requires that
for every value of ω we get
lim | ( )− ( ) | = 0.

HM(ω)
M = 19
ideal case M =7
1
Hlp(ω) M =3
M =1

0.5

-π -ωc 0 ωc π ω

Fig. 1.2. Convergence of the Fourier transform (Gibbs phenomenon at ω = ωc)

1.8.2. Fourier Transform Theorems

Fourier transform theorems relate operations on sequences to operations on the Fourier


transforms. These theorems are very helpful in evaluating transforms of discrete-time signals.
To facilitate the statement of these theorems, we introduce the following operator notations:
FT
x(n)  X ( )
i.,e.,
1
( )= ( ) ⎯⎯⎯ ( )= ( )
2

1. Linearity of the Fourier Transform


FT
If x1(n)  X 1 ( )
42. Introduction to Discrete-time Signals Processing
FT
and x 2 (n)  X 2 ( )
FT
then a1 x1(n)  a 2 x 2 ( n)  a1 X 1 ( )  a2 X 2 ( )

2. Time Shifting and Frequency Shifting

FT
If x(n)  X ( )
then for the time-shifted sequence,
FT
x(n  N)  e  j N X ( )
and for the frequency-shifted Fourier transform,
FT
e j 0n x(n)  X (   0 )

3. Time Reversal
FT
If x(n)  X ( )
then the time reversed sequence
FT
x(  n)  X (  )
If x(n) is real, this theorem reduces to
FT
x(  n)  X * ( )

4. Differentiation in Frequency

FT
If x(n)  X ( )
FT d
then nx(n)  j X ( )
d

5. Parseval’s Theorem
FT
If x(n)  X ( )
 
1 2 2
then E  
n  
x ( n) 
2  
X ( ) d

The function | ( )| is called the energy density spectrum. It defines how signal energy is
distributed with frequency and is defined for energy signals only.

6. The Convolution Theorem


FT
If x(n)  X ( )
FT
and h(n)  H ( )
Chapter 1 - Discrete-time Signals and Systems 43

and if y ( n)   x ( k ) h( n  k )
k  
 x (n) * h(n),

then Y()  X ( ) H ( )

7. The Modulation or Windowing Property


FT
If x(n)  X ( )
FT
and w(n)  W ( )
then, the windowed signal would have a Fourier transform
( )=
( ) ( )

1
2 
Y()  X ( )W (   )d

This is periodic convolution of two periodic functions with the limits of integration extending
over only one period.

Summary of Fourier Transform Theorems

Sequence operation Fourier Transform, X(ω)


1. ax (n)  by (n) aX ( )  bY ( )

2. x (n  N ) e  jN X ( )
3. e j 0n x (n) X (   0 )

4. x(-n) X(-ω)
d
5. nx(n) j X ( )
d

6. x(n)*y(n) X ( )Y ( )

1
7. x(n)y(n)
2  X ( )Y (   )d



2 1
8. E  
n  
x ( n)
2
| ( )|

Fourier Transform Pairs


Sequence Fourier Transform
1. δ(n) 1
2. δ(n-no)
44. Introduction to Discrete-time Signals Processing

3. 1, (- ∞ < n < ∞ )
 2 (  2k )
k  

4. a nu(n), |a| < 1 1


1 ae  j
5. u(n) 1
+ ( +2 )
1−
6. (n+1) anu(n), |a| < 1 1
(1 − )
n
r sin( p (n  1) 1
7. u(n), r 1 1  2r cos( p )e  j  r 2 e  j 2
sin( p )
sin( c n)  1, | |   c
8.
n X ( )  
 0,  c  | |  
 1, 0  n  M sin[ ( M  1) / 2]  j M / 2
9. x ( n)   e
 0, otherwise sin( / 2)
10. e j 0 n 

 2 (   0  2k )
k  

11. cos( 0 n   )
  [e   (  
k 
j
0  2k )  e  j  (   0  2k )]

The student is advised to try the proofs of these theorems or refer to the proofs elsewhere. We
will encounter the Fourier transform at various places in this book. The above theorems and
some basic transform pairs are summarized here for easy reference only. Some examples will
be given towards the end of this section.

Example 1.8.3: Let x (n)  a n u(n  5) . The Fourier transform is


 
X ( )  
n  
x ( n) e  j  n  a
n  
n
u(n  5)e  j n

 a
n 5
n
e  j n  a 5 e  j 5  a 6 e  j 6  a 7 e  j 7  

a 5 e  j 5

1  ae  j
We could have used Theorems 1 and 2 to express the transform by considering the
fact that we could have represented the sequence x(n) as
x ( n)  a 5a n 5 u(n  5)

Example 1.8.4: Determine the impulse response of the stable linear time-invariant system
for which the input x(n) and output y(n) satisfy the linear constant-coefficient
difference equation
Chapter 1 - Discrete-time Signals and Systems 45

1 1
y ( n)  y (n  1)  x ( n)  x (n  1)
2 4
To find the impulse response, set x (n)   (n) . Then, the impulse response of the
system becomes
1 1
h ( n)  h(n  1)   ( n)   (n  1)
2 4
Applying the Fourier transform to both sides, we get
1  j 1  j
H ( )  e H ( )  1 e
2 4
i.e.,
1  j
1 e
H ( )  4
1
1  e  j
2
To obtain h(n), we need to determine the inverse Fourier transform of H(ω). To do
this, we need to represent H(ω) in a partial fraction expansion, i.e.,
1  j
1 e
H ( )   4
1 1
1  e  j 1  e  j
2 2
Using Fourier transform pairs, we get
n n1
 1 1  1
h ( n)    u( n )    u(n  1)
 2 4  2
46. Introduction to Discrete-time Signals Processing

Problems

1.1. Given the sequence ( ) = (6 − )( ( ) − ( − 6)). Sketch x(n) and the


following related sequences:

a) ( ) = (4 − )
b) ( ) = (2 − 3)
c) ( ) = (8 − 3 )
d) ( ) = ( 2 − 3)
e) ( )= ( − 2 + 1)

1.2. Find the conjugate symmetric and conjugate antisymmetric parts of the following
signals:

a) ( )= ( )
b) ( )= ( ), = 0.5 + 0.5.
( )= / ( )
c)

1.3. Consider the sequence

( )= (− )
a) Is x(n) absolutely summable? If so find the absolute sum of x(n).
b) Compute the power in x(n).
c) If x(n) is input to a system defined by
( )= ( ),
find the power in the output signal.

1.4. Express
( )= ( ) + 2 ( − 1) + 3 ( − 2)
as a sum of scaled and shifted unit step sequences.

1.5. Each of the following systems have x(n) as input and y(n) as output. Determine
whether the system is i) stable, ii) causal, iii) linear, and iv) time-invariant.

a) ( )= ( ) + 3 ( + 1)
b) ( ) = 6 ( + 2 ) + 4 ( + 1) + 2 ( ) + 1
c) ( ) = log ( )
( )= ( )
d)
Chapter 1 - Discrete-time Signals and Systems 47

e) ( )= (− )

1.6. Use convolution principles to determine the response of a system whose impulse
response is
ℎ( ) = (0.5) ( )
to the input
1
( )= ( )− ( − 1)
2
This can be done easily since convolving any sequence with an impulse is the signal
itself placed at the location of the impulse.

1.7. By direct evaluation of the convolution sum, determine the step response of a linear
time-invariant system whose impulse response is given by
ℎ( ) = (− ), 0< < 1.
1.8. If the response of a linear shift-invariant system to a unit step is
1
( )= ( ),
2
find the impulse h(n) response of the system.

1.9. Find
( ) = ( ) ∗ ℎ( )
given

ℎ( ) = { ( ) − ( − 11)}

and
( )= ( ) − ( − 6)

1.10. The correlation of two sequences is an operation defined by

( )= ( )⋆ ( ) = ( )ℎ( + ).

Note that we use a star ⋆ to denote correlation and an asterisk ∗ to denote convolution.
a) Find and plot the correlation (often known as the cross correlation function)
between the sequence
( )= ( ) − ( − 6)
and
ℎ( ) = ( − 2) − ( − 5) .
48. Introduction to Discrete-time Signals Processing

b) Find and plot the correlation of


( )= ( )
with itself. This is known as the autocorrelation of x(n). Assume a < 1.

1.11. A commonly used numerical approximation called the first backward difference is
defined as
( )= ∇ ( ) = ( ) − ( − 1)
where x(n) is the input and y(n) is the output of the first-difference system.
a) Show that this system is linear and time-invariant.
b) Find the impulse response of this system.
c) Find and sketch the frequency response (magnitude and phase).
d) Implement this differentiator on the sequence x(n) and plot the results.
( ) = 5{ ( ) − ( − 20)}
Comment on the appropriateness of this simple differentiator.

1.12. For the system shown, determine the output y(n) when the input ( ) = ( ) and
( ) is an ideal lowpass filter, i.e.,
1, | |< ,
( )=
0, <| |≤ .

n
(-1) w(n)
×

w(n) n
x(n) ( ) (-1) + y(n)

1.13. A second-order recursive system is described by the difference equation


( )= ( − 1) − ( − 2) + ( ) − ( − 1)

a) Find the unit sample response h(n) of this system.


b) Find the system’s response to the input x(n) = u(n) – u(n-10) with zero initial
conditions.

c) Find the zero state system’s response to the input ( ) = ( ).


Chapter 1 - Discrete-time Signals and Systems 49

1.14. The operation of signal dilation (or decimation or down-sampling) is defined by


( )= ( )
In which the sequence x(n) is down-sampled by an integer factor of M. For example,
if

( ) = ⋯ , −2, 4, ⏟
3 , −6, 5, −1, 8, ⋯

then the down sampled sequence by a factor of 2 is given by

( ) = ⋯ , −2, ⏟
3 , 5, 8, ⋯

a) Develop a MATLAB function dnsample that has the form


function y = dnsample(x,M)
to implement the decimation operation. Take special care on indexing in MATLAB.
b) Generate
( ) = sin(0.125 ), − 50 ≤ ≤ 50.
Decimate x(n) by a factor of 4 to generate y(n ). Plot both x(n) and y(n) using
subplot and comment on the results.
c) Repeat the above for
( ) = sin (0.5 ), − 50 ≤ ≤ 50.
Discuss the effect of down-sampling on signals.

1.15. Let X(ω) denote the Fourier transform of the signal x(n) shown below. Perform the
following calculations without explicitly evaluating X(ω).
a) Evaluate X(ω) at ω = 0.
b) Find ∢ ( ).
c) Evaluate

( ) .

2 2

1 1

-5 0 5 10 15 n
-1 -1
50. Introduction to Discrete-time Signals Processing

You might also like