chapter 2 discrete-time signals and systems. §2.1.1 discrete-time signals: time-domain...

257
Chapter 2 Discrete-Time Discrete-Time Signals and Syste Signals and Syste ms ms

Upload: hollie-ramsey

Post on 25-Dec-2015

271 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Chapter 2

Discrete-Time Discrete-Time Signals and SystemsSignals and Systems

Page 2: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

Signals represented as sequences of numbers, called samples

Sample value of a typical signal or sequence denoted as x[n] with n being an integer in the range - n

x[n] defined only for integer values of n and undefined for noninteger values of n

Discrete-time signal represented by {x[n]}

Page 3: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

Discrete-time signal may also be written as a sequence of numbers inside braces:

{x[n]}={…,-0.2,2.2,1.1,0.2,-3.7,2.9,…}

In the above, x[-1]= -0.2, x[0]=2.2, x[1]=1.1, et

c. The arrow is placed under the sample at tim

e index n = 0

Page 4: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

Graphical representation of a discrete-time signal with real-valued samples is as shown below:

Page 5: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

In some applications, a discrete-time sequence {x[n]} may be generated by periodically sampling a continuous-time signal xa(t) at uniform intervals of time

Page 6: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

Here, n-th sample is given by

x[n]=xa(t) |t=nT=xa(nT), n=…,-2,-1,0,1,… The spacing T between two consecutive sam

ples is called the sampling interval or sampling period

Reciprocal of sampling interval T, denoted as FT , is called the sampling frequency:

TFT

1

TFT

1

Page 7: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

Unit of sampling frequency is cycles per second, or hertz (Hz) , if T is in seconds

Whether or not the sequence {x[n]} has been obtained by sampling, the quantity x[n] is called the n-th sample of the sequence

{x[n]} is a real sequence, if the n-th sample x[n] is real for all values of n

Otherwise, {x[n]} is a complex sequence

Page 8: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

A complex sequence {x[n]} can be written as {x[n]}={xre[n]}+j{xim[n]} where xre and xim are the real and imaginary parts of x[n]

The complex conjugate sequence of {x[n]} is given by {x*[n]}={xre[n]}-j{xim[n]}

Often the braces are ignored to denote a sequence if there is no ambiguity

Page 9: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

Example - {x[n]}={cos0.25n} is a real sequence

{y[n]}={ej0.3n} is a complex sequence We can write {y[n]}={cos0.3n + jsin0.3n} ={cos0.3n} + j{sin0.3n}

where {yre[n]}={cos0.3n}

{yim[n]}={sin0.3n}

Page 10: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

Example –

{w[n]}={cos0.3n}- j{sin0.3n}={e-j0.3n} is the complex conjugate sequence of {y[n]}

That is,

{w[n]}= {y*[n]}

Page 11: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

Two types of discrete-time signals: - Sampled-data signals in which samples are continuous-valued- Digital signals in which samples are discrete-valued

Signals in a practical digital signal processing system are digital signals obtained by quantizing the sample values either by rounding or truncation

Page 12: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

Example –

Am

pli

tud

eDigital signal

Am

pli

tud

e

Boxedcar signal

Time,t Time,t

Page 13: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

A discrete-time signal may be a finite-length or an infinite-length sequence

Finite-length (also called finite-duration or finite-extent) sequence is defined only for a finite time interval: N1 n N2

where - < N1 and N2 < with N1 N2

Length or duration of the above finite-length sequence is N= N2 - N1+ 1

Page 14: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

Example – x[n]=n2, -3 n 4 is a finite-length sequence of length 4 -(-3)+1=8

y[n]=cos0.4n is an infinite-length sequence

Page 15: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

A length- N sequence is often referred to as an N-point sequence

The length of a finite-length sequence can be increased by zero-padding, i.e., by appending it with zeros

Page 16: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

Example –

is a finite-length sequence of length 12 obtained by zero-padding x[n] =n2, -3≤n≤4 with 4 zero-valued samples

85,0

43,][

2

n

nnnxe

Page 17: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

A right-sided sequence x[n] has zero-valued samples for n < N1

nN1

A right-sided sequence

If N1 0, a right-sided sequence is called a causal sequence

Page 18: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

A left-sided sequence x[n] has zero-valued samples for n > N2

If N2≤0, a left-sided sequence is called a anti-causal sequence

N 2

n

A left-sided sequence

Page 19: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

Size of a Signal

Given by the norm of the signal

Lp - norm

where p is a positive integer

p

n

p

pnxx

/1

][

Page 20: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

The value of p is typically 1 or 2 or ∞

L2 –norm

2x

is the root-mean-squared (rms) value of {x[n]}

Page 21: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

is the peak absolute value of {x[n]}

is the peak absolute value of {x[n]}, i.e.

1xL1 - norm

xL∞ - norm

maxxx

Page 22: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.1 Discrete-Time Signals:Time-Domain Representation

Example – Let {y[n]}, 0≤n≤N-1, be an approximation of {x

[n]}, 0≤n≤N-1 An estimate of the relative error is given by the

ratio of the L2 -norm of the difference signal and the L2 -norm of {x[n]}:

p

N

n

N

nrel

nx

nxnyE

/1

1

0

2

1

0

2

][

][][

Page 23: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.2 Operations on Sequences

A single-input, single-output discrete-time system operates on a sequence, called the input sequence, according some prescribed rules and develops another sequence, called the output sequence, with more desirable properties

x[n] y[n]

Input sequence Output sequence

Discrete-timesystem

Page 24: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.1.2 Operations on Sequences

For example, the input may be a signal corrupted with additive noise

Discrete-time system is designed to generate an output by removing the noise component from the input

In most cases, the operation defining a particular discrete-time system is composed of some basic operations

Page 25: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Basic Operations Product (modulation) operation:

x[n] y[n]

w[n]y[n]=x[n].w[n]-Modulator

An application is in forming a finite-length sequence from an infinite-length sequence by multiplying the latter with a finite-length sequence called an window sequence

Process called windowing

Page 26: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Basic Operations Addition operation:

Ax[n] y[n] y[n]=A.x[n]–Multiplier

Multiplication operation

y[n]=x[n]+w[n]–Adderx[n] y[n]

w[n]

Page 27: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Basic Operations Time-shifting operation: y[n]=x[n-N] where N

is an integer If N>0, it is delaying operation

1z y[n]x[n] y[n]=x[n-1]

–Unit delay

y[n]x[n] z y[n]=x[n-1]

–Unit advance

If N<0, it is an advance operation

Page 28: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Basic Operations

Time-reversal (folding) operation:

y[n]=x[n-1] Branching operation: Used to provide multipl

e copies of a sequence

x[n] x[n]

x[n]

Page 29: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Basic Operations

Example - Consider the two following sequences of length 5 defined for 0n4 :

{a[n]}={3 4 6 –9 0}

{b[n]}={2 –1 4 5 –3} New sequences generated from the above t

wo sequences by applying the basic operations are as follows:

Page 30: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Basic Operations

{c[n]}={a[n].b[n]}={6 –4 24 –45 0}

{d[n]}={a[n]+b[n]}={5 3 10 –4 -3}

{e[n]}=(3/2){a[n]}={4.5 6 9 –13.5 0} As pointed out by the above example, opera

tions on two or more sequences can be carried out if all sequences involved are of same length and defined for the same range of the time index n

Page 31: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Basic Operations

However if the sequences are not of same length, in some situations, this problem can be circumvented by appending zero-valued samples to the sequence(s) of smaller lengths to make all sequences have the same range of the time index

Example - Consider the sequence of length 3 defined for 0n 2: {f[n]}={-2, 1, -3}

Page 32: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Basic Operations

We cannot add the length-3 sequence to the length-5 sequence {a[n]} defined earlier

We therefore first append {f[n]} with 2 zero-valued samples resulting in a length-5 sequence {fe[n]}={-2 1 –3 0 0}

Then

{g[n]}={a[n]}+{f[n]}={1 5 3 –9 0}

Page 33: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Basic Operations

Ensemble Averaging A very simple application of the addition ope

ration in improving the quality of measured data corrupted by an additive random noise

In some cases, actual uncorrupted data vector s remains essentially the same from one measurement to next

Page 34: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Basic Operations

While the additive noise vector is random and not reproducible

Let di denote the noise vector corrupting the i-th measurement of the uncorrupted date vector s:

xi=s+di

Page 35: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Basic Operations

The average data vector, called the ensemble average, obtained after K measurements is given by

For large values of K, xave is usually reasonable replica of the desired data vector s

k

ii

k

ii

k

iiave d

ksds

kx

kx

111

1)(

11

Page 36: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Basic Operations Example

Page 37: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Basic Operations

We cannot add the length-3 sequence {f[n]} to the length-5 sequence {a[n]} defined earlier

We therefore first append {f[n]} with 2 zero-valued samples resulting in a length-5 sequence {fe[n]}={−2 1 -3 0 0}

Then

{g[n]}= {g[n]}+{fe[n]}={1 5 3 -9 0}

Page 38: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.1 Combinations of Basic Operations

Example -

y[n]=1x[n]+ 2x[n-1]+ 3[n-2]+ 4x[n-3]

Page 39: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.2 Sampling Rate Alteration

Employed to generate a new sequence y[n] with a sampling rate F’T higher or lower than that of the sampling rate FT of a given sequence x[n]

Sampling rate alteration ratio is

R= F’T / FT If R>1, the process called interpolation If R<1, the process called decimation

Page 40: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.2 Sampling Rate Alteration

In up-sampling by an integer factor L>1, L−1 equidistant zero-valued samples are inserted by the up-sampler between each two consecutive samples of the input sequence x[n]:

otherwise,0

,2,,0],/[][

LLnLnxnxu

x[n] xu[n]L

Page 41: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.2 Sampling Rate Alteration

An example of the up-sampling

Page 42: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.2 Sampling Rate Alteration

In down-sampling by an integer factor M>1, every M-th samples of the input sequence are kept and M-1 in-between samples areremoved:

x[n]=x[nM]

x[n] y[n]M

Page 43: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.2 Sampling Rate Alteration

An example of the down-sampling operation

Page 44: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

Conjugate-symmetric sequence:

x[n]=-x*[n] If x[n] is real, then it is an even sequence

Page 45: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

Conjugate-antisymmetric sequence:

x[n]=-x*[-n] If x[n] is real, then it is an odd sequence

Page 46: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

It follows from the definition that for a conjugate-symmetric sequence {x[n]}, x[0] must be a real number

Likewise, it follows from the definition that for a conjugate anti-symmetric sequence {y[n]}, y[0] must be an imaginary number

From the above, it also follows that for an odd sequence {w[n]}, w[0]=0

Page 47: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

Any complex sequence can be expressed as a sum of its conjugate-symmetric part and its conjugate-antisymmetric part:

x[n]=xcs[n]+ xca[n]where

xcs[n]=1/2(x[n]+x*[-n])

xca[n]=1/2(x[n]-x*[-n])

Page 48: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

Example – Consider the length-7 sequence defined for -3≤n≤3

}3,2,65,24,32,41,0{]}[{ jjjjjng

Its conjugate sequence is then given

The time-reversed version of the above

}3,2,65,24,32,41,0{]}[*{ jjjjjng

}0,41,32,24,65,2,3{]}[*{ jjjjjng

Page 49: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

Likewise

}5.1,5.0,5.15.1,2,5.15.1,5.0,5.1{

]}[*][{2

1]}[{

jjjjj

ngngngca

Therefore

}5.1,35.0,5.45.3,4,5.45.3,35.0,5.1{

]}[*][{2

1]}[{

jjjj

ngngngcs

It can be easily verified that

and ][][ * ngng caca ][][ * ngng cscs

Page 50: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

Any real sequence can be expressed as a sum of its even part and its odd part:

x[n]=xev[n]+ xod[n]

where

xev[n]=1/2(x[n]+x[-n])

xod[n]=1/2(x[n]-x[-n])

Page 51: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

A length-N sequence x[n], 0≤n≤N-1, can be expressed as x[n]=xpcs[n]+ xpca[n]

where

xpcs[n]=1/2(x[n]+x*[<-n>N]), 0≤n≤N-1,

is the periodic conjugate-symmetric part and

xpca[n]=1/2(x[n]-x*[<-n>N]), 0≤n≤N-1,

is the periodic conjugate-antisymmetric part

Page 52: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

For a real sequence, the periodic conjugate- symmetric part, is a real sequence and is called the periodic even part xpe[n]

For a real sequence, the periodic conjugate- antisymmetric part, is a real sequence and is called the periodic odd part xpo[n]

Page 53: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

A length-N sequence x[n] is called a periodic conjugate-symmetric sequence, if

x[n]=x*[<-n>N ]=x*[<N-n>N ] and is called a periodic conjugate-antisymmetric sequence if

x [n]=-x*[<-n>N])=- x*[<N-n>N ]

Page 54: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

A finite-length real periodic conjugate- symmetric sequence is called a symmetric sequence

A finite-length real periodic conjugate- antisymmetric sequence is called a antisymmetric sequence

Page 55: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

Example - Consider the length-4 sequence defined for 0≤n≤3: {u[n]}={1+j4, -2+j3, 4-j2, -5-j6}

Its conjugate sequence is given by {u*[n]}={1-j4, -2-j3, 4+j2, -5+j6}

To determine the modulo-4 time-reversed version {u*[<-n>4]} observe the following:

Page 56: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

u*[<-0>4]=u*[0]=1-j4

u*[<-1>4]=u*[3]=5+j6

u*[<-2>4]=u*[2]=4+j2

u*[<-3>4]=u*[1]=-2-j3 Hence

{u*[<-n>4]}={1-j4, -5+j6, 4+j2, -2-j3}

Page 57: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Classification of SequencesBased on Symmetry

Therefore

{upcs[n]}=1/2(u[n]+u*[<-n>4])

={1, -3.5+j4.5, 4, -3.5-j4.5} Likewise

{upca[n]}=1/2(u[n]-u*[<-n>4])

={j4, 1.5-j1.5, -2, -1.5-j1.5}

Page 58: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

A sequence satisfying][~ nx ][~][~ kNnxnx

Classification of SequencesBased on Symmetry

Smallest value of N satisfying is called the fundamental period

][~][~ kNnxnx

is called a periodic sequence with a period N where N is a positive integer and k is any integer

Page 59: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.3 Classification of Sequences based on periodicity

Example –

A sequence satisfying the periodicity condition is called an periodic sequence

Page 60: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.4 Classification of Sequences Energy and Power Signals

Total energy of a sequence x[n] is defined by

nnx 2

x ][ An infinite length sequence with finite sampl

e values may or may not have finite energy A finite length sequence with finite sample v

alues has finite energy

Page 61: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.4 Classification of Sequences Energy and Power Signals

The average power of an aperiodic sequence is defined by

K

KnKK

nxP 2

121

x ][lim

K

KnKx nx 2

, ][

Define the energy of a sequence x[n] over a finite interval -K n K as

Page 62: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.4 Classification of Sequences Energy and Power Signals

ThenKx

K KP ,x 12

1lim

The average power of an infinite-length sequence may be finite

1

0

2][~1 N

nx nx

NP

The average power of a periodic sequence

with a period N is given by][~ nx

Page 63: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.4 Classification of Sequences Energy and Power Signals

Example –Consider the causal sequence defined by

5.412

)1(9lim19

12

1lim

0x

K

K

KP

K

K

nK

Note: x[n] has infinite energy Its average power is given by

0,0

0,)1(3][

n

nnx

n

Page 64: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.2.4 Classification of Sequences Energy and Power Signals

An infinite energy signal with finite average power is called a power signal

Example - A periodic sequence which has a finite average power but infinite energy

A finite energy signal with zero average power is called an energy signal

Example - A finite-length sequence which has finite energy but zero average power

Page 65: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Other Types of Classiffications

A sequence x[n] is said to be bounded if

xBnx ][

13.0cos][ nnx

Example - The sequence x[n]=cos(0.3n) is a bounded sequence as

Page 66: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Other Types of Classiffications A sequence x[n] is said to be absolutely sum

mable if

nnx ][

00030

nnny

n

,,.][

is an absolutely summable sequence as

428571

3011

300

..

.n

n

Example - The sequence

Page 67: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Other Types of Classiffications

A sequence x[n] is said to be square-summable if

nnx 2][

nnnh 4.0sin][

is square-summable but not absolutely summable

Example - The sequence

Page 68: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences

Unit sample sequence -

0,0

0,1][

n

nn

1

–4 –3 –2 –1 0 1 2 3 4 5 6n

0,0

0,1][

n

nn

–4 –3 –2 –1 0 1 2 3 4 5 6

1

n

Unit step sequence -

Page 69: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences

Real sinusoidal sequence -

x[n]=Acos(0n+)

where A is the amplitude, 0 is the angular frequency, and is the phase of x[n]

Example -

Page 70: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences Exponential sequence -

,][ nAnx n

,)( oo je , jeAA

],[][][ )( nxjnxeeAnx imrenjj oo

),cos(][ neAnx on

reo

)sin(][ neAnx on

imo

where

then we can express

where A and are real or complex numbers

If we write

Page 71: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences xre[n] and xim[n] of a complex exponential seque

nce are real sinusoidal sequences with constant (0=0), growing (0>0) , and decaying (0<0) amplitudes for n > 0

njnx )exp(][612

1

Real part Imaginary part

Page 72: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences

Real exponential sequence -

x[n]=An, -< n < where A and are real numbers

=1.2 =0.9

Page 73: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences Sinusoidal sequence Acos(0n + ) and comp

lex exponential sequence Bexp(j0n) are periodic sequences of period N if 0N=2rwhere N and r are positive integers

Smallest value of N satisfying 0N=2ris the fundamental period of the sequence

To verify the above fact, consider

x1[n]= Acos(0n + )

x2[n]= Acos(0 ( n+N) + )

Page 74: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences

Now

x2[n]= cos(0 ( n+N) + )

= cos(0n+)cos0N - sin(0n+)sin0N

which will be equal to cos(0n+)=x1[n] only if sin0N= 0 and cos0N = 1

These two conditions are met if and only if 0N= 2r or 2/0 = N/r

Page 75: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences

If 2/0 is a noninteger rational number, then the period will be a multiple of 2/0

Otherwise, the sequence is aperiodic

Example - is an aperiodic sequence

)3sin(][ nnx

Page 76: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences

Here 0=0

Hence period N=2r/0=20 for r=0

Page 77: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences

Here 0=0.1

Hence N=2r/0=20 for r=1

0 = 0.1

Page 78: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences

Property 1 - Consider x[n]=exp(j1n) and y[n]=exp(j2n) with 0≤ 1< and 2k≤ 2

<2(k +1) where k is any positive integer If 2= 1+2k, then x[n]= y[n] Thus, x[n] and y[n] are indistinguishable

Page 79: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences

Property 2 - The frequency of oscillation of Acos(0n) increases as 0 increases from 0 to ,and then decreases as 0 increases from

to 2 Thus, frequencies in the neighborhood of =

0 are called low frequencies, whereas, frequencies in the neighborhood of = are called high frequences

Page 80: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences

Because of Property 1, a frequency 0 in the neighborhood =2k is indistinguishable from a frequency 0-2k in the neighborhood of ω=0 and a frequency 0 in the neighborhood of =(2k+1) is indistinguishable from a frequency 0- (2k+1) in the neighborhood of ω=π

Page 81: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences

Frequencies in the neighborhood of ω=2πk are usually called low frequencies

Frequencies in the neighborhood of ω=π(2k+1) are usually called high frequencies

v1[n]=cos(0.1πn)= cos(0.9πn) is a low frequency signal

v2[n]=cos(0.8πn)= cos(1.2πn) is a high frequency signal

Page 82: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.3 Basic Sequences An arbitrary sequence can be represented in

the time-domain as a weighted sum of some basic sequence and its delayed (advanced) versions

]6[75.0]4[

]2[]1[5.1]2[5.0][

nn

nnnnx

Page 83: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process Often, a discrete-time sequence x[n] is devel

oped by uniformly sampling a continuous-time signal xa(t) as indicated below

The relation between the two signals is x[n] =xa(t)|t=nT=xa (nT), n=…, -2, -1, 0, 1, 2, …

Page 84: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process

Time variable t of xa(t) is related to the time variable n of x[n] only at discrete-time instants tn given by

with FT=1/T denoting the sampling frequency and T= 2πFT denoting the sampling angular frequency

TTn

n

F

nnTt

2

Page 85: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process Consider the continuous-time signal

)cos()2cos()( tAtfAtx oo

is the normalized digital angular frequency of x[n]

ToToo /2where

The corresponding discrete-time signal is

)cos(

)2

cos()cos(][

0

nA

nAnTAnxT

oo

Page 86: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process

If the unit of sampling period T is in seconds The unit of normalized digital angular

frequency 0 is radians/sample The unit of normalized analog angular

frequency 0 is radians/second The unit of analog frequency f0 is hertz (Hz)

Page 87: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process The three continuous-time signals

)6cos()(1 ttg )14cos()(2 ttg )26cos()(3 ttg

)6.0cos(][1 nng )4.1cos(][2 nng )6.2cos(][3 nng

of frequencies 3Hz, 7Hz, and 13Hz, are sampled at a sampling rate of 10Hz, i.e. with T = 0.1 sec. generating the three sequences

Page 88: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process Plots of these sequences (shown with circles)

and their parent time functions are shown below:

0 0.2 0.4 0.6 0.8 1-1

-0.5

0

0.5

1

time

Am

plitu

de

Note that each sequence has exactly the same sample value for any given n

Page 89: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process

This fact can also be verified by observing that

)6.0cos()6.02(cos)4.1cos(][2 nnnng

)6.0cos()6.02(cos)6.2cos(][3 nnnng

As a result, all three sequences are identical and it is difficult to associate a unique continuous-time function with each of these sequences

Page 90: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process

The above phenomenon of a continuous-time signal of higher frequency acquiring the identity of a sinusoidal sequence of lower frequency after sampling is called aliasing

Page 91: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process

Since there are an infinite number of continuous-time signals that can lead to the same sequence when sampled periodically, additional conditions need to imposed so that the sequence {x[n]}={xa[nT]} can uniquely represent the parent continuous-time signal xa(t)

In this case, xa(t) can be fully recovered from {x[n]}

Page 92: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process Example - Determine the discrete-time sign

al v[n] obtained by uniformly sampling at a sampling rate of 200Hz the continuous- time signal

Note: va(t) is composed of 5 sinusoidal signals of frequencies 30Hz, 150Hz, 170Hz, 250Hz and 330Hz

)660sin(10)500cos(4)340cos(2)300sin()60cos(6)(

ttttttva

Page 93: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process

The sampling period is T=1/200=0.005 sec The generated discrete-time signal v[n] is th

us given by

Page 94: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process

Note: v[n] is composed of 3 discrete-time sinusoidal signals of normalized angular frequencies: 0.3π, 0.5π, and 0.7π

)7.0sin(10)6435.05.0cos(5)3.0cos(8)7.0sin(10)5.0cos(4

)3.0cos(2)5.0sin(3)3.0cos(6))7.04sin((10))5.02cos((4

))3.02cos((2))5.02sin((3)3.0cos(6)3.3sin(10)5.2cos(4

)7.1cos(2)5.1sin(3)3.0cos(6][

nnnnn

nnnnn

nnnnn

nnnnv

Page 95: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process

Note: An identical discrete-time signal is also generated by uniformly sampling at a 200-Hz sampling rate the following continuous-time signals:

)700sin(3)460cos(6)260sin(10)100cos(4)60cos(2)(

)140sin(10)6435.0100cos(5)60cos(8)(

ttttttg

ttttw

a

a

Page 96: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process

Recall 0=20/T

Thus if T>20, then the corresponding normalized digital angular frequency 0 of the discrete-time signal obtained by sampling the parent continuous-time sinusoidal signal will be in the range -<<

Conclusion: No aliasing

Page 97: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process

On the other hand, if T < 20 , the normalized digital angular frequency will foldover into a lower digital frequency

0=(20/T)2 in the range -<< because of aliasing

Hence, to prevent aliasing, the sampling frequency T should be greater than 2 times the frequency 0 of the sinusoidal signal being sampled

Page 98: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process Generalization: Consider an arbitrary contin

uous-time signal xa(t) composed of a weighted sum of a number of sinusoidal signals

xa(t) can be represented uniquely by its sampled version {x[n]} if the sampling frequency T is chosen to be greater than 2 times the highest frequency contained in xa(t)

Page 99: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.4 The Sampling Process

The condition to be satisfied by the sampling frequency to prevent aliasing is called the sampling theorem

A formal proof of this theorem will be presented later

Page 100: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5 Discrete-Time Systems A discrete-time system processes a given

input sequence x[n] to generates an output sequence y[n] with more desirable properties

In most applications, the discrete-time system is a single-input, single-output system:

x[n] y[n]

Input sequence Output sequence

Discrete-TimeSystem

Page 101: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

2-input, 1-output discrete-time systems - Modulator, adder

1-input, 1-output discrete-time systems - Multiplier, unit delay, unit advance

Page 102: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

Accumulator :

nxny

][][

][]1[][][1

nxnynxxn

The output y[n] at time instant n is the sum of the input sample x[n] at time instant n and the previous output y[n-1] at time instant n-1 which is the sum of all previous input sample values from - to n-1

The system accumulatively adds, i.e., it accumulates all input sample values

Page 103: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

Accumulator - Input-output relation can also be written in the form

The second form is used for a causal input sequence, in which case y[-1] is called the initial condition

0,][]1[

][][][

0

0

1

nxy

xxny

n

n

Page 104: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

Used in smoothing random variations in data

In most applications, the data x[n] is a bounded sequence

M-point moving-average system –

1

0

][1

][M

k

knxM

ny

M-point average y[n] is also a bounded sequence

Page 105: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

If there is no bias in the measurements, an improved estimate of the noisy data is obtained by simply increasing M

A direct implementation of the M-point moving average system requires M−1 additions, 1 division, and storage of M−1 past input data samples

A more efficient implementation is developed next

Page 106: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

Hence

1

0

1

1

1

0

][][]1[1

][][][1

][][][1

][

M

M

M

MnxnxnxM

MnxnxnxM

MnxMnxnxM

ny

])[][(1

]1[][ MnxnxM

nyny

Page 107: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

Computation of the modified M-point moving average system using the recursive equation now requires 2 additions and 1 division

An application: Consider

x[n] = s[n] + d[n],

where s[n] is the signal corrupted by a noise d[n]

Page 108: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

s[n]=2[n(0.9)n], d[n]-random signal

Page 109: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples Exponentially Weighted Running Average Filter

Computation of the running average requires only 2 additions, 1 multiplication and storage of the previous running average

Does not require storage of past input data samples

10,][]1[][ nxnyny

Page 110: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

For 0<α<1, the exponentially weighted average filter places more emphasis on current data samples and less emphasis on past data samples as illustrated below

][]1[]2[]3[][]1[])2[]3[(

][]1[]2[][])1[]2[(][

23

2

2

nxnxnxnynxnxnxny

nxnxnynxnxnyny

Page 111: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples Linear interpolation - Employed to estimate sa

mple values between pairs of adjacent sample values of a discrete-time sequence

Factor-of-4 interpolation

Page 112: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

Factor-of-2 interpolator –

])1[]1[(2

1][][ nxnxnxny uuu

Factor-of-3 interpolator –

])1[]2[(3

2

])2[]1[(3

1][][

nxnx

nxnxnxny

uu

uuu

Page 113: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

Factor-of-2 interpolator –

Page 114: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

Median Filter – The median of a set of (2K+1) numbers is th

e number such that K numbers from the set have values greater than this number an

d the other K numbers have values smaller Median can be determined by rank-ordering

the numbers in the set by their values and choosing the number at the middle

Page 115: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

Median Filter – Example: Consider the set of numbers

{2, -3, 10, 5, -1} Rank-order set is given by

{-3, -1, 2, 5, 10} Hence,

Med{2, -3, 10, 5, -1}=2

Page 116: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

Median Filter – Implemented by sliding a window of odd len

gth over the input sequence {x[n]} one sample at a time

Output y[n] at instant n is the median value of the samples inside the window centered at n

Page 117: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples

Median Filter – Finds applications in removing additive rand

om noise, which shows up as sudden large errors in the corrupted signal

Usually used for the smoothing of signals corrupted by impulse noise

Page 118: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Discrete-Time Systems:Examples Median Filtering Example –

Page 119: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5 Discrete-Time Systems: Classification

Linear System Shift-Invariant System Causal System Stable System Passive and Lossless Systems

Page 120: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.1 Linear Discrete-Time Systems

Definition - If y1[n] is the output due to an input x1[n] and y2[n] is the output due to an input x2[n] then for an input

x[n] =αx1[n] +βx2[n] the output is given by

y[n] =αy1[n] +βy2[n] Above property must hold for any arbitrary cons

tants α and β and for all possible inputs x1[n] and x2[n]

Page 121: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.1 Linear Discrete-Time Systems

][][][ 21 nxnxnx For an input

the output is

Hence, the above system is linear

nn

xnyxny

][][,][][ 2211 Accumulator –

nn

n

nynyxx

xxny

][][][][

])[][(][

2121

21

Page 122: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.1 Linear Discrete-Time Systems

The outputs y1[n] and y2[n] for inputs x1[n] and x2[n] are given by

])[][(]1[][ 20

1

xxynyn

The output y[n] for an input αx1[n]+βx2[n] is given by

nn

xynyxyny0

2220

111 ][]1[][][]1[][

Page 123: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.1 Linear Discrete-Time Systems

]1[]1[]1[ 21 yyy

Now

][][][ 21 nynyny if Thus

)][][(]1[]1[

)][]1[()][]1[(

])[][

02

0121

022

011

21

nn

nn

xxyy

xyxy

nyny

Now

)][][(]1[]1[

)][]1[()][]1[(

])[][

02

0121

022

011

21

nn

nn

xxyy

xyxy

nyny

Page 124: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.1 Linear Discrete-Time Systems

For the causal accumulator to be linear the condition y[-1]=αy1[-1]+βy2[-1] must hold for all initial conditions y[-1], y1[-1], y2[-1], and all constants α and β

This condition cannot be satisfied unless the accumulator is initially at rest with zero initial condition

For nonzero initial condition, the system is nonlinear

Page 125: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Nonlinear Discrete-Time Systems

The median filter described earlier is a nonlinear discrete-time system

To show this, consider a median filter with a window of length 3

Output of the filter for an input

{x1[n]}={3, 4, 5}, 0≤n≤2is

{y1[n]}={3, 4, 4}, 0≤n≤2

Page 126: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Nonlinear Discrete-Time Systems

Output for an input

{x2[n]}={2, -1, -1}, 0≤n≤2is

{y2[n]}={0, -1, -1}, 0≤n≤2 However, the output for an input

{x[n]}={x1[n]+ x2[n]}is

{y[n]}={3, 4, 3}

Page 127: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Nonlinear Discrete-Time Systems

Note

{y1[n]+y2[n]}={3, 3, 3}≠{y [n]} Hence, the median filter is a nonlinear discre

te-time system

Page 128: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.1 Shift-Invariant System For a shift-invariant system, if y1[n] is the re

sponse to an input x1[n] , then the response to an input x[n]=x1[n-n0]

is simply y[n]=y1[n-n0]

where n0 is any positive or negative integer The above relation must hold for any arbitrar

y input and its corresponding output The above property is called time-invariance

property, or shift-invariant proterty

Page 129: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.1 Shift-Invariant System

In the case of sequences and systems with indices n related to discrete instants of time, the above property is called time-invariance property

Time-invariance property ensures that for a specified input, the output is independent of the time the input is being applied

Page 130: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.1 Shift-Invariant System Example - Consider the up-sampler with an i

nput-output relation given by

otherwise,0

,2,,0,]/[][

LLnLnxnxu

For an input x1[n]=x[n-n0] the output x1,u[n] is given by

otherwise,0

,2,,0,]/)[(otherwise,0

,2,,0,]/[][

0

1,1

LLnLLnnx

LLnLnxnx u

Page 131: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.1 Shift-Invariant System

However from the definition of the up-sampler

Hence, the up-sampler is a time-varying system

][otherwise,0

,2,,,/][][

,1

0000

0

nx

LnLnnnLnnxnnx

u

u

Page 132: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.2 Linear Time-Invariant system

Linear Time-Invariant (LTI) System - A system satisfying both the linearity and

the time-invariance property LTI systems are mathematically easy to

analyze and characterize, and consequently, easy to design

Highly useful signal processing algorithms have been developed utilizing this class of systems over the last several decades

Page 133: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Causal System

In a causal system, the n0-th output sampley[n0] depends only on input samples x[n] forn≤n0 and does not depend on input samples for n>n0

Let y1[n] and y2[n] be the responses of acausal discrete-time system to the inputs x1

[n] and x2[n], respectively

Page 134: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Causal System

Then

x1[n]= x2[n] for n<N

implies also that

y1[n]= y2[n] for n<N For a causal system, changes in output sam

ples do not precede changes in the input samples

Page 135: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Causal System Examples of causal systems:

y[n]=α1x[n]+α2x[n-1]+α3x[n-2]+α4x[n-3]

y[n]=b0x[n]+b1x[n-1]+b2x[n-2]

+a1y[n-1]+a2y[n-2]y[n]=y[n-1]+x[n]

Examples of noncausal systems:

y[n]=xu[n]+1/2(xu[n-1]+ xu[n+1])

y[n]=xu[n]+1/3(xu[n-1]+ xu[n+2])

+ 2/3(xu[n-2]+ xu[n+1])

Page 136: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Causal System

A noncausal system can be implemented as a causal system by delaying the output by an appropriate number of samples

For example a causal implementation of the factor-of-2 interpolator is given by

y[n]=xu[n-1]+1/2(xu[n-2]+ xu[n])

Page 137: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Stable System

There are various definitions of stability We consider here the bounded-input, bound

ed-output (BIBO) stability If y[n] is the response to an input x[n] and if

|x[n]|≤Bx for all values of n Then

|y[n]|≤By for all values of n

Page 138: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Stable System

Example - The M-point moving average filter is BIBO stable:

For a bounded input |x[n]|≤Bx we have

1

0

][1

][M

k

knxM

ny

xx

M

k

M

k

BMBM

knxM

knxM

ny

)(1

][1

][1

][1

0

1

0

Page 139: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.3 Passive and Lossless Systems

A discrete-time system is defined to be passive if, for every finite-energy input x[n], the output y[n] has, at most, the same energy, i.e.

nnnxny 22 ][][

For a lossless system, the above inequality is satisfied with an equal sign for every input

Page 140: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.3 Passive and Lossless Systems

Example - Consider the discrete-time system defined by y[n]=x[n-N] with N a positive integer

Its output energy is given by

nnnxny 222 ][][

Hence, it is a passive system if || 1 and is a lossless system if || =1

Page 141: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.4 Impulse and Step Responses

The response of a discrete-time system to a unit sample sequence {δ[n]} is called the unit impulse response or simply, the impulse response, and is denoted by {h[n]}

The response of a discrete-time system to a unit step sequence {μ[n]} is called the unit step response or simply, the step response, and is denoted by {s[n]}

Page 142: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.4 Impulse and Step Responses

Example - The impulse response of the system

y[n]=a1x[n]+a2x[n-1]+a3x[n-2]+a4x[n-3]

is obtained by setting x[n]=δ[n] resulting in

h[n]=a1δ[n]+a2δ[n-1]+a3δ[n-2]+a4δ[n-3] The impulse response is thus a finite-length

sequence of length 4 given by{h[n]={a1, a2, a3, a4}

Page 143: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.4 Impulse and Step Responses

Example - The impulse response of the discrete-time accumulator

n

xny

][][

][][][ nnhn

is obtained by setting x[n] = δ[n] resulting in

Page 144: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.5.4 Impulse and Step Responses

Example - The impulse response {h[n]} of the factor-of-2 interpolator

])[][(][][ 1121 nxnxnxny uuu

])[][(][][ 1121 nnnnh

}.,.{]}[{ 50150

nh

is obtained by setting xu[n]= [n] and is given by

The impulse response is thus a finite-length sequence of length 3:

Page 145: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6 Time-Domain Characterization of LTI Discrete-Time System

Input-Output Relationship –

A consequence of the linear, time-invariance property is that an LTI discrete-time system is completely characterized by its impulse response

Knowing the impulse response one can compute the output of the system for any arbitrary input

Page 146: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6 Time-Domain Characterization of LTI Discrete-Time System

Let h[n] denote the impulse response of a LTI discrete-time system

Compute its output y[n] for the input:

]5[75.0]2[]1[5.1]2[5.0][ nnnnnx

As the system is linear, we can compute its outputs for each member of the input separately and add the individual outputs to determine y[n]

Page 147: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6 Time-Domain Characterization of LTI Discrete-Time System

Since the system is time-invariant

]5[]5[]2[]2[

]1[]1[]2[]2[

outputinput

nhnnhnnhnnhn

Page 148: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6 Time-Domain Characterization of LTI Discrete-Time System

Likewise, as the system is linear

][.][.][ 151250 nhnhny][.][ 57502 nhnh

Hence because of the linearity property we get Likewise, as the system is linear

]5[75.0]5[75.0]2[]2[]1[5.1]1[5.1]2[5.0]2[5.0

outputinput

nhnnhn

nhnnhn

Page 149: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6 Time-Domain Characterization of LTI Discrete-Time System

Now, any arbitrary input sequence x[n] can be expressed as a linear combination of delayed and advanced unit sample sequences in the form

kknkxnx ][][][

The response of the LTI system to an input x[k][n-k] will be x[k]h[n-k]

Page 150: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6 Time-Domain Characterization of LTI Discrete-Time System

Hence, the response y[n] to an input

kknkxnx ][][][

kknhkxny ][][][

kkhknxny ][][][

which can be alternately written as

will be

Page 151: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

The summation

kknhknxknhkxny ][][][][][

y[n] = x[n] h[n]*

is called the convolution sum of the sequences x[n] and h[n] and represented compactly as

Page 152: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution SumProperties -

Commutative property:

x[n] h[n] = h[n] x[n]* *

(x[n] h[n]) y[n] = x[n] (h[n] y[n])****

x[n] (h[n] + y[n]) = x[n] h[n] + x[n] y[n]** *

Associative property :

Distributive property :

Page 153: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Interpretation - 1) Time-reverse h[k] to form h[-k] 2) Shift h[-k] to the right by n sampling perio

ds if n > 0 or shift to the left by n sampling periods if n < 0 to form h[n-k]

3) Form the product v[k]=x[k]h[n-k] 4) Sum all samples of v[k] to develop the

n-th sample of y[k] of the convolution sum

Page 154: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Schematic Representation -

nz][ knh

][ kh

][kx

][kv][ny

k

The computation of an output sample using the convolution sum is simply a sum of products

Involves fairly simple operations such as additions, multiplications, and delays

Page 155: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum We illustrate the convolution operation for th

e following two sequences:

Figures on the next several slides the steps involved in the computation of

otherwise,0

50,1][

nnx

otherwise,0

50,3.08.1][

nnnh

y[n]= x[n] h[n]*

Page 156: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Page 157: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Page 158: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Page 159: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Page 160: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Page 161: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Page 162: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Page 163: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Page 164: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Page 165: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Page 166: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Page 167: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.1 Convolution Sum

Page 168: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Time-Domain Characterization of LTI Discrete-Time System

In practice, if either the input or the impulse response is of finite length, the convolution sum can be used to compute the output sample as it involves a finite sum of products

If both the input sequence and the impulse response sequence are of finite length, the output sequence is also of finite length

Page 169: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Time-Domain Characterization of LTI Discrete-Time System

If both the input sequence and the impulse response sequence are of infinite length, convolution sum cannot be used to compute the output

For systems characterized by an infinite impulse response sequence, an alternate time-domain description involving a finite sum of products will be considered

Page 170: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Time-Domain Characterization of LTI Discrete-Time System

Example - Develop the sequence y[n] generated by the convolution of the sequences x[n] and h[n] shown below

Page 171: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Time-Domain Characterization of LTI Discrete-Time System

As can be seen from the shifted time-reversed version {h[n-k]} for n<0, shown below for n =-3 , for any value of the sample index k, the k-th sample of either {x[k]} or is zero

Page 172: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Time-Domain Characterization of LTI Discrete-Time System

As a result, for n<0, the product of the k-th samples of {x[k]} and {h[n-k]} is always zero, and hence y[n] = 0 for n < 0

Consider now the computation of y[0]

The sequence {h[n-k]} is shown on the right

Page 173: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Time-Domain Characterization of LTI Discrete-Time System

The product sequence {x[k]h[-k]} is plotted below which has a single nonzero sample x[0]h[0] for k=0

Thus y[0]=x[0]x[0]=-2

Page 174: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Time-Domain Characterization of LTI Discrete-Time System

For the computation of y[1], we shift {h[-k]} to the right by one sample period to form {h[1-k]} as shown below on the left

The product sequence {x[k]h[1-k]} is shown below on the right

Hence, y[1]=x[0]h[1]+x[1]h[0]=-4+0=-4

Page 175: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Time-Domain Characterization of LTI Discrete-Time System

To calculate y[2], we form as shown below on the left -6

The product sequence {x[k]h[2-k]} is plotted below on the right

y[2]=x[0]h[2]+x[1]h[1]+x[2]h[0]=0+0+1=1

Page 176: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Time-Domain Characterization of LTI Discrete-Time System

Continuing the process we get y[3]=x[0]h[3]+x[1]h[2]+x[2]h[1]+x[3]h[0] =2+0+0+1=3 y[4]=x[1]h[3]+x[2]h[2]+x[3]h[1]+x[4]h[0] =0+0-2+3=1 y[5]=x[2]h[3]+x[3]h[2]+x[4]h[1]=-1+0+6=5 y[6]=x[3]h[3]+x[4]h[2]=1+0=1 y[6]=x[4]h[3]=-3

Page 177: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Time-Domain Characterization of LTI Discrete-Time System

From the plot of {h[n-k]} for n > 7 and theplot of {x[k]} as shown below, it can be seen that there is no overlap between these two sequences

As a result y[n] = 0 for n > 7

Page 178: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Time-Domain Characterization of LTI Discrete-Time System

The sequence {y[n]} generated by the convolution sum is shown below

Page 179: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Time-Domain Characterization of LTI Discrete-Time System

Note: The sum of indices of each sample product inside the convolution sum is equal to the index of the sample being generated by the convolution operation

For example, the computation of y[3] in the previous example involves the products x[0]h[3], x[1]h[2], x[2]h[1], and x[3]h[0]

The sum of indices in each of these products is equal to 3

Page 180: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Time-Domain Characterization of LTI Discrete-Time System

In the example considered the convolution of a sequence {x[n]} of length 5 with a sequence {h[n]} of length 4 resulted in a sequence {y[n]} of length 8

In general, if the lengths of the two sequences being convolved are M and N, then the sequence generated by the convolution is of length M+N-1

Page 181: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Tabular Method ofConvolution Sum Computation

Can be used to convolve two finite-length sequences

Consider the convolution of {g[n]}, 0≤n≤3, with {h[n]}, 0≤n≤2, generating the

Samples of {g[n]} and {h[n]} are then multiplied using the conventional multiplication method without any carry operation

sequence y[n]= g[n] h[n]*

Page 182: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Tabular Method ofConvolution Sum Computation

The samples y[n] generated by the convolution sum are obtained by adding the entries in the column above each sample

]5[]4[]3[]2[]1[]0[:][

]2[]3[]2[]2[]2[]1[]2[]0[]1[]3[]1[]2[]1[]1[]1[]0[

]0[]3[]0[]2[]0[]1[]0[]0[]2[]1[]0[:][

]3[]2[]1[]0[:][543210:

yyyyyyny

hghghghghghghghg

hghghghghhhnh

ggggngn

Page 183: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Tabular Method ofConvolution Sum Computation

The samples of {y[n]} are given by y[0]=g[0]h[0] y[1]=g[1]h[0]+g[0]h[1] y[2]=g[2]h[0]+g[1]h[1]+g[0]h[2] y[3]=g[3]h[0]+g[2]h[1]+g[1]h[2] y[4]=g[3]h[1]+g[2]h[2] y[5]=g[3]h[2]

Page 184: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Tabular Method ofConvolution Sum Computation

The method can also be applied to convolve two finite-length two-sided sequences

In this case, a decimal point is first placed to the right of the sample with the time index n = 0 for each sequence

Next, convolution is computed ignoring the location of the decimal point

Page 185: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Tabular Method ofConvolution Sum Computation

Finally, the decimal point is inserted according to the rules of conventional multiplication

The sample immediately to the left of the decimal point is then located at the time index n = 0

Page 186: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Convolution Using MATLAB

The M-file conv implements the convolution sum of two finite-length sequences

If a=[-2 0 1 -1 3]

b=[1 2 0 -1]

then conv(a,b) yields

[-2 -4 1 3 1 5 1 -3]

Page 187: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Simple InterconnectionSchemes

Two simple interconnection schemes are: Cascade Connection Parallel Connection

Page 188: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Cascade Connection

Impulse response h[n] of the cascade of two LTI discrete-time systems with impulse responses h1[n] and h2[n] is given by

y[n]= h1[n] h2[n]*

][nh1][nh2][nh1 ][nh2

][][ nhnh 1 ][nh2][nh1 *

Page 189: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Cascade Connection

Note: The ordering of the systems in the cascade has no effect on the overall impulse response because of the commutative property of convolution

A cascade connection of two stable systems is stable

A cascade connection of two passive (lossless) systems is passive (lossless)

Page 190: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Cascade Connection

An application is in the development of an inverse system

If the cascade connection satisfies the relation

then the LTI system h1[n] is said to be the inverse of h2[n] and vice-versa

=[n]

h1[n] h2[n]*

Page 191: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

If the impulse response of the channel is known, then x[n] can be recovered by designing an inverse system of the channel

Cascade Connection An application of the inverse system concept

is in the recovery of a signal x[n] from its distorted version appearing at the output of a transmission channel

][ˆ nx

=[n]

h1[n] h2[n]*

][nh2][nh1x[n]

x[n]

][ˆ nxchannel Inverse system

Page 192: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Cascade Connection

Example - Consider the discrete-time accumulator with an impulse response µ[n]

Its inverse system satisfy the condition It follows from the above that h2[n]=0 for n<0

and

1for0][

1]0[

02

2

nh

hn

Page 193: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Cascade Connection

Thus the impulse response of the inverse system of the discrete-time accumulator is given by

h2[n]=[n]- [n-1]

which is called a backward difference system

Page 194: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Parallel Connection

Impulse response h[n] of the parallel connection of two LTI h1[n] discrete-time systems with impulse responses and h2[n] is given by

h[n]=h1[n]+h2[n]

][nh2

][nh1 ][][ nhnh 1 ][nh2][nh1

Page 195: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.2 Simple Interconnection Schemes

h1[n]=[n]+0.5[n-1],

h2[n]=0.5[n]-0.25[n-1],

h3[n]=2[n],

h4[n]=- 2(0.5)n[n]

][nh2

][nh1

][nh4

][nh3

Consider the discrete-time system where

Page 196: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.2 Simple Interconnection Schemes

Simplifying the block-diagram we obtain

][nh2

][nh1

][][ 43 nhnh

][nh1

])[][(][ 432 nhnhnh *

Page 197: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.2 Simple Interconnection Schemes

Overall impulse response h[n] is given by

][][][][][ nhnhnhnhnh 42321 ])[][(][][][ nhnhnhnhnh 4321 *

* *

][2])1[][(][][41

21

32 nnnnhnh

]1[][21 nn

* *

Now,

Page 198: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.6.2 Simple Interconnection Schemes

Therefore][][]1[

2

1][]1[

2

1][][ nnnnnnnh

][)

2

1(2])1[

4

1][

2

1(][][ 42 nnnnhnh n* *

][][)2

1(

]1[)2

1(][)

2

1(

]1[)2

1(

2

1][)

2

1( 1

nn

nn

nn

n

nn

nn

Page 199: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Stability Condition of an LTI Discrete-Time System

BIBO Stability Condition - A discrete- time is BIBO stable if and only if the output sequence {y[n]} remains bounded for all bounded input sequence {x[n]}

An LTI discrete-time system is BIBO stable if and only if its impulse response sequence {h[n]} is absolutely summable, i.e.

n

nhS ][

Page 200: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Stability Condition of an LTI Discrete-Time System

Proof: Assume h[n] is a real sequence Since the input sequence x[n] is bounded w

e have xBnx ][

Therefore

SBkhB

knxkhknxkhny

xk

x

kk

][

][][][][][

Page 201: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Stability Condition of an LTI Discrete-Time System

Thus, S < ∞ implies |y[n]|≤By < ∞ indicating that y[n] is also bounded

To prove the converse, assume y[n] is bounded, i.e., |y[n]|≤By

Consider the input given by

0][if,

0][if}),{sgn(][

nhK

nhnhnx

Page 202: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Stability Condition of an LTI Discrete-Time System

where sgn(c) = +1 if c > 0 and sgn(c) =-1 if c < 0 and |K| ≤ 1

Note: Since |x[n]| ≤ 1, is obviously bounded For this input, y[n] at n = 0 is

Therefore, |y[n]|≤By implies S < ∞

k

yBSkhkhy ][])[sgn(]0[

Page 203: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Stability Condition of an LTI Discrete-Time System

Example - Consider a causal LTI discrete- time system with an impulse response h[n]=(α)nµ[n]

For this system

Therefore S < ∞ if |α|<1 for which the system is BIBO stable

If |α|<1, the system is not BIBO stable

1if1

1][

0

n

n

n

n nS

Page 204: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Causality Condition of an LTI Discrete-Time System

Let x1[n] and x2[n] be two input sequences with

x1[n]=x2[n] for n≤n0

The corresponding output samples at n=n0 of an LTI system with an impulse response {h[n]} are then given by

Page 205: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Causality Condition of an LTI Discrete-Time System

][][

][][][][][

01

1

010

0101

knxkh

knxkhknxkhny

k

kk

][][

][][][][][

02

1

020

0202

knxkh

knxkhknxkhny

k

kk

Page 206: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Causality Condition of an LTI Discrete-Time System

If the LTI system is also causal, then

y1[n0]=y2[n0]

As x1[n]=x2[n] for n≤n0

][][][][ 020

010

knxkhknxkhkk

This implies

][][][][ 02

1

01

1

knxkhknxkhkk

Page 207: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Causality Condition of an LTI Discrete-Time System

As x1[n] ≠x2[n] for n>n0 the only way the condition

will hold if both sums are equal to zero, which is satisfied if h[k] = 0 for k < 0

][][][][ 02

1

01

1

knxkhknxkhkk

Page 208: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Causality Condition of an LTI Discrete-Time System

]3[]2[]1[][][ 4321 nxnxnxnxny

An LTI discrete-time system is causal if and only if its impulse response {h[n]} is a causal sequence

Example - The discrete-time system defined by

is a causal system as it has a causal impulse response

}{]}[{ 4321 nh

Page 209: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Example - The discrete-time accumulator defined by

Causality Condition of an LTI Discrete-Time System

is a causal system as it has a causal impulse response given by

][][][ nnyn

][][][ nnhn

Page 210: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Causality Condition of an LTI Discrete-Time System

Example - The factor-of-2 interpolator defined by

])1[]1[(2

1][][ nxnxnxny uuu

is noncausal as it has a noncausal impulse response given by

}5.015.0{]}[{ nh

Page 211: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Causality Condition of an LTI Discrete-Time System

Note: A noncausal LTI discrete-time system with a finite-length impulse response can often be realized as a causal system by inserting an appropriate amount of delay

For example, a causal version of the factor- of-2 interpolator is obtained by delaying the input by one sample period:

])[]2[(2

1]1[][ nxnxnxny uuu

Page 212: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Finite-Dimensional LTI Discrete-Time Systems

An important subclass of LTI discrete-time systems is characterized by a linear constant coefficient difference equation of the form

x[n] and y[n] are, respectively, the input and the output of the system

{dk} and {pk} are constants aracterizing the system

M

kk

N

kk knxpknyd

00

][][

Page 213: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Finite-Dimensional LTI Discrete-Time Systems

The order of the system is given by max(N,M), which is the order of the difference equation

It is possible to implement an LTI system characterized by a constant coefficient difference equation as here the computation involves two finite sums of products

Page 214: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Finite-Dimensional LTI Discrete-Time Systems

If we assume the system to be causal, then the output y[n] can be recursively computed using

provided d0≠0

y[n] can be computed for all n≥n0, knowing x[n] and the initial conditions

y[n0-1], y[n0-2],…, y[n0-N]

M

k

kN

k

k knxd

pkny

d

dny

0 01 0

][][][

Page 215: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.7 Classification of LTI Discrete-Time Systems

Based on Impulse Response Length - If the impulse response h[n] is of finite length,

i.e.,

h[n]=0 for N1<n<N2 and N1<N2

then it is known as a finite impulse response (FIR) discrete-time system

The convolution sum description here is

2

1

][][][N

Nkknxkhny

Page 216: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.7 Classification of LTI Discrete-Time Systems

The output y[n] of an FIR LTI discrete-time system can be computed directly from the convolution sum as it is a finite sum of products

Examples of FIR LTI discrete-time systems are the moving-average system and the linear interpolators

Page 217: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.7 Classification of LTI Discrete-Time Systems

If the impulse response is of infinite length, then it is known as an infinite impulse response (IIR) discrete-time system

The class of IIR systems we are concerned with in this course are characterized by linear constant coefficient difference equations

Page 218: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.7 Classification of LTI Discrete-Time Systems

Example - The discrete-time accumulator defined by

y[n]=y[n-1]+x[n]

is seen to be an IIR system

Page 219: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.7 Classification of LTI Discrete-Time Systems

Example - The familiar numerical integration formulas that are used to numerically solve integrals of the form

t

dxty0

)()(

can be shown to be characterized by linear constant coefficient difference equations, and hence, are examples of IIR systems

Page 220: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.7 Classification of LTI Discrete-Time Systems

If we divide the interval of integration into n equal parts of length T, then the previous integral can be rewritten as

nT

Tn

dxTnynTy)1(

)())1(()(

nT

dxnTy0

)()(

where we have set t = nT and used the notation

Page 221: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.7 Classification of LTI Discrete-Time Systems

Using the trapezoidal method we can write

)}())1(({)(2

)1(

nTxTnxdx TnT

Tn

)}())1(({))1(()(2

nTxTnxTnynTy T

Hence, a numerical representation of the definite integral is given by

Page 222: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.7 Classification of LTI Discrete-Time Systems

Let y[n] = y(nT) and x[n] = x(nT) Then

)}())1(({))1(()(2

nTxTnxTnynTy T

]}1[][{]1[][2

nxnxnyny T

which is recognized as the difference equation representation of a first-order IIR discrete-time system

reduces to

Page 223: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.7 Classification of LTI Discrete-Time Systems

Based on the Output Calculation Process Nonrecursive System - Here the output can

be calculated sequentially, knowing only the present and past input samples

Recursive System - Here the output computation involves past output samples in addition to the present and past input samples

Page 224: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.7 Classification of LTI Discrete-Time Systems

Based on the Coefficients - Real Discrete-Time System - The impulse re

sponse samples are real valued Complex Discrete-Time System - The impul

se response samples are complex valued

Page 225: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.8 Correlation of Signals

There are applications where it is necessary to compare one reference signal with one or more signals to determine the similarity between the pair and to determine additional information based on the similarity

Page 226: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.8 Correlation of Signals

For example, in digital communications, a set of data symbols are represented by a set of unique discrete-time sequences

If one of these sequences has been transmitted, the receiver has to determine which particular sequence has been received by comparing the received signal with every member of possible sequences from the set

Page 227: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.8 Correlation of Signals

Similarly, in radar and sonar applications, the received signal reflected from the target is a delayed version of the transmitted signal and by measuring the delay, one can determine the location of the target

The detection problem gets more complicated in practice, as often the received signal is corrupted by additive random noise

Page 228: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.8 Correlation of Signals

Definitions A measure of similarity between a pair of en

ergy signals, x[n] and y[n], is given by the cross-correlation sequence rxy [ℓ] defined by

...,,,],[][][ 210

nxy nynxr

The parameter ℓ called lag, indicates the time-shift between the pair of signals

Page 229: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.8 Correlation of Signals

y[n] is said to be shifted by ℓ samples to the right with respect to the reference sequence x[n] for positive values of ℓ, and shifted by ℓ samples to the left for negative values of

The ordering of the subscripts xy in the definition of rxy [ℓ] specifies that x[n] is the reference sequence which remains fixed in time while y[n] is being shifted with respect to x[n]

Page 230: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.8 Correlation of Signals If y[n] is made the reference signal and shift

x[n] with respect to y[n], then the corresponding cross-correlation sequence is given by

Thus, ryx [ℓ] is obtained by time-reversing rxy [ℓ]

][][][

][][][

xym

nyx

rmxmy

nxnyr

Page 231: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.8 Correlation of Signals

The autocorrelation sequence of x[n] is given by

nxx nxnxr ][][][

obtained by setting y[n] = x[n] in the definition of the cross-correlation sequence rxy [ℓ]

Note: , the energy of the signal x[n]

xnxx Enxr

][]0[ 2

Page 232: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.8 Correlation of Signals From the relation ryx [ℓ]= rxy [-ℓ] it follows that

rxx [ℓ]= rxx [-ℓ] implying that rxx [ℓ] is an even function for real x[n]

An examination of

reveals that the expression for the cross- correlation looks quite similar to that of the linear convolution

yxyyxxxy EErrr ]0[]0[][

Page 233: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.8 Correlation of Signals This similarity is much clearer if we rewrite t

he expression for the cross-correlation as

The cross-correlation of y[n] with the reference signal x[n] can be computed by processing x[n] with an LTI discrete-time

system of impulse response y[−n]

][][)]([][][

yxnynxr

nxy *

x[n] rxy[n]y[-n]

Page 234: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

§2.8 Correlation of Signals

Likewise, the autocorrelation of x[n] can be computed by processing x[n] with an LTI discrete-time system of impulse response x[-n]

x[n] rxx[n]x[-n]

Page 235: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Properties of Autocorrelation andCross-correlation Sequences

Consider two finite-energy sequences x[n] and y[n]

The energy of the combined sequence ax[n]+y[n-ℓ] is also finite and nonnegative, i.e.,

0][][][2

][)][][(2

222

nn

nn

nynynxa

nxanynax

Page 236: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Properties of Autocorrelation andCross-correlation Sequences

Thus

a2 rxx[0]+2arxy[ℓ]+ryy[0]≥0

where rxx[0]=Ex>0 and ryy[0]=Ey>0 We can rewrite the equation on the previous

slide as

for any finite value of a

01]0[][

][]0[1

a

rr

rra

yyxy

xyxx

Page 237: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Properties of Autocorrelation andCross-correlation Sequences

or, equivalently,

]0[][

][]0[

yyxy

xyxx

rr

rr

Or, in other words, the matrix

is positive semidefinite 0][]0[]0[ 2 xyyyxx rrr

yxyyxxxy EErrr ]0[]0[][

Page 238: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Properties of Autocorrelation andCross-correlation Sequences

The last inequality on the previous slide provides an upper bound for the cross- correlation samples

If we set y[n] = x[n], then the inequality reduces to

xxxxy Err ]0[][

Page 239: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Properties of Autocorrelation andCross-correlation Sequences

Thus, at zero lag (ℓ=0), the sample valuel of the autocorrelation sequence has its maxi

mum value Now consider the case

y[n] =±bx[n-N] where N is an integer and b > 0 is an arbitrary number

In this case Ey=b2Ex

Page 240: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Properties of Autocorrelation andCross-correlation Sequences

Therefore

xxyx bEEbEE 22

Using the above result in

we get

yxyyxxxy EErrr ]0[]0[][

]0[][]0[ xxxyxx brrbr

Page 241: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation ComputationUsing MATLAB

The cross-correlation and autocorrelation sequences can easily be computed using MATLAB

Example - Consider the two finite-length sequences

x[n]=[1 3 -2 1 2 -1 4 4 2]

y[n]=[2 -1 4 1 -2 3]

Page 242: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation ComputationUsing MATLAB

The cross-correlation sequence rxy[n] computed using Program 2_7 of text is plotted below

Page 243: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation ComputationUsing MATLAB

The autocorrelation sequence rxx[ℓ] computed using Program 2_7 is shown below

Note: At zero lag, rxx[0] is the maximum

Page 244: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation ComputationUsing MATLAB

The plot below shows the cross-correlation of x[n] and y[n]=x[n-N] for N = 4

Note: The peak of the cross-correlation is precisely the value of the delay N

Page 245: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation ComputationUsing MATLAB

The plot below shows the autocorrelation of x[n] corrupted with an additive random noise generated using the function randn

Note: The autocorrelation still exhibits a peak at zero lag

Page 246: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation ComputationUsing MATLAB

The autocorrelation and the cross- correlation can also be computed using the function xcorr

However, the correlation sequences generated using this function are the time- reversed version of those generated using Programs 2_7 and 2_8

Page 247: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Normalized Forms ofCorrelation

Normalized forms of autocorrelation and cross-correlation are given by

They are often used for convenience in comparing and displaying

Note: |ρxx [ℓ]|≤1 and |ρxy [ℓ]|≤1 independent of the range of values of x[n] and y[n]

]0[]0[

][][,

]0[

][][

yyxx

xyxy

xx

xxxx

rr

r

r

r

Page 248: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation Computation forPower Signals

The cross-correlation sequence for a pair of power signals, x[n] and y[n], is defined as

K

KnK

xx nxnxK

r ][][12

1lim][

The autocorrelation sequence of a power signal x[n] is given by

K

KnK

xy nynxK

r ][][12

1lim][

Page 249: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation Computation forPeriodic Signals

1

0~~ ][~][~1

][N

nyx nynxN

r

1

0~~ ][~][~1

][N

nxx nxnxN

r

The autocorrelation sequence of a periodic signal of period N is given by][~ nx

The cross-correlation sequence for a pair of periodic signals of period N, and

is defined as

][~ nx ][~ ny

Page 250: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

The periodicity property of the autocorrelation sequence can be exploited to determine the period of a periodic signal that may have been corrupted by an additive random disturbance

Correlation Computation forPeriodic Signals

Note: Both and are also periodic signals with a period N

][~~ yxr][~~ xxr

Page 251: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation Computation forPeriodic Signals

Let be a periodic signal corrupted by the random noise d[n] resulting in the signal

][~ nx

which is observed for 0≤n≤M-1 where M>>N

][][~][ ndnxnw

Page 252: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation Computation forPeriodic Signals

The autocorrelation of w[n] is given by

][][][][

][~][1

][][~1

][][1

][~][~(1

])[][~])([][~(1

][][1

][

~~~~

1

0

1

0

1

0

1

0

1

0

1

0

xddxddxx

M

n

M

n

M

n

M

n

M

n

M

nww

rrrr

nxndM

ndnxM

ndndM

nxnxM

ndnxndnxM

nwnwM

r

Page 253: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation Computation forPeriodic Signals

In the last equation on the previous slide,

is a periodic sequence with a period N and hence will have peaks at ℓ=0, N, 2N,… with the same amplitudes as ℓ approaches M

][~~ xxr

As and d[n] are not correlated, samples of cross-correlation sequences

and are likely to be very small relative to the amplitudes of ][~~ xxr

][~ dxr ][~ xdr

][~ nx

Page 254: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation Computation forPeriodic Signals

The autocorrelation rdd [ℓ] of d[n] will show a peak at ℓ=0 with other samples having rapidly decreasing amplitudes with increasing values of |ℓ|

Hence, peaks of rww [ℓ] for ℓ>0 areessentially due to the peaks of and can be used to determine whether is a periodic sequence and also its period N if the peaks occur at periodic intervals

][~~ xxr][~ nx

Page 255: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation Computation of aPeriodic Signal Using MATLAB

Example - We determine the period of the sinusoidal sequence x[n] =cos(0.25n), 0≤n≤95 corrupted by an additive uniformly distributed random noise of amplitude in the range [-0.5,0.5]

Using Program 2_8 of text we arrive at the plot of rww[ℓ] shown on the next slide

Page 256: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation Computation of aPeriodic Signal Using MATLAB

As can be seen from the plot given above, there is a strong peak at zero lag

However, there are distinct peaks at lags that are multiples of 8 indicating the period of the sinusoidal sequence to be 8 as expected

Page 257: Chapter 2 Discrete-Time Signals and Systems. §2.1.1 Discrete-Time Signals: Time-Domain Representation  Signals represented as sequences of numbers, called

Correlation Computation of aPeriodic Signal Using MATLAB

Figure below shows the plot of rdd[ℓ]

As can be seen rdd[ℓ] shows a very strongpeak at only zero lag