hossein sameti department of computer engineering sharif university of technology

49
CE 40763 Digital Signal Processing Fall 1992 LTI Systems Hossein Sameti Department of Computer Engineering Sharif University of Technology

Upload: posy-butler

Post on 14-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Hossein Sameti Department of Computer Engineering Sharif University of Technology

CE 40763

Digital Signal Processing

Fall 1992

LTI Systems

Hossein Sameti

Department of Computer Engineering

Sharif University of Technology

Page 2: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Block Diagram of a Digital Signal Processing System

2

Our focus in the next few lectures

Hossein Sameti, CE, SUT, Fall 1992

Page 3: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Discrete-time Signal

3

• A discrete-time signal is a function of independent integer variables.

• x(n) is not defined at instants between two successive samples.

• Sequence representation: ,...}3,1,2,1,1{)(

nx

• Functional representation:

elsewhere

nnx

,0

0,1)(

Hossein Sameti, CE, SUT, Fall 1992

Page 4: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Some Elementary Discrete-time Signals

4

Unit Sample Unit Step

Unit Ramp

Hossein Sameti, CE, SUT, Fall 1992

Page 5: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Some Elementary Discrete-time Signals

5

Exponential Signals: nanx n allfor)(

Hossein Sameti, CE, SUT, Fall 1992

Page 6: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Energy of Signals

Energy and Power of Signals

6

2|)(| nxE

N

NnNnx

NP 2|)(|

12

1lim

vs. Power of Signals

Hossein Sameti, CE, SUT, Fall 1992

Page 7: Hossein Sameti Department of Computer Engineering Sharif University of Technology

7

Classification of Discrete-Time Signals Periodic vs. aperiodic signals A signal is periodic with period N (N>0) iff x(n+N)=x(n) for all n The smallest value of N where this holds is called the

fundamental period.

N

Hossein Sameti, CE, SUT, Fall 1992

Page 8: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Symmetric (even) and anti-symmetric (odd) signals:◦ Even: x(-n) = x(n)◦ Odd: x(-n) = -x(n)

Any arbitrary signal can be expressed as a sum of two signal components, one even and the other odd:

Classification of Discrete-Time Signals

8

)()()( nxnxnx oe

=+

)()()(21 nxnxnxe

)()()(21 nxnxnxo

Hossein Sameti, CE, SUT, Fall 1992

Page 9: Hossein Sameti Department of Computer Engineering Sharif University of Technology

A discrete-time system is a device that performs some operation on a discrete-time signal.

A system transforms an input signal x(n) into an output signal y(n) where: .

Some basic discrete-time systems:◦ Adders◦ Constant multipliers◦ Signal multipliers◦ Unit delay elements◦ Unit advance elements

Discrete- Time Systems

9

)]([)( nxTny

Hossein Sameti, CE, SUT, Fall 1992

Page 10: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Time Delay and Time Advance

10Hossein Sameti, CE, SUT, Fall 1992

Page 11: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Folding and Shifting Operations

11Hossein Sameti, CE, SUT, Fall 1992

Page 12: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Downsampling

12

Source: Stanford)2()( nxny

Hossein Sameti, CE, SUT, Fall 1992

Page 13: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Addition, Multiplication and Scaling

13

◦Addition: y(n) = x1(n) + x2(n)

◦Multiplication: y(n) = x1(n) x2(n)

◦Scaling: y(n) = a x(n)

Hossein Sameti, CE, SUT, Fall 1992

Page 14: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Example of a Discrete-time System

14

elsewhere,0

33,)(

nnnx )]1()()1([

3

1)( nxnxnxny

Moving average filter

}0,3,2,1,0,1,2,3,0{)(

nxSolution:

3

2]101[

3

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

3

1)0( xxxy

}0,1,3

5,2,1,

3

2,1,2,

3

5,1,0{)(

ny

Hossein Sameti, CE, SUT, Fall 1992

Page 15: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Example of a Discrete-time System

15

elsewhere,0

33,)(

nnnx ...])2()1()([)( nxnxnxny

Accumulator

}0,3,2,1,0,1,2,3,0{)(

nxSolution:

}12,12,9,7,6,6,5,3,0{)(

ny

Hossein Sameti, CE, SUT, Fall 1992

Page 16: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Memoryless systems: If the output of the system at an instant n only depends on the input sample at that time (and not on past or future samples) then the system is called memoryless or static,

e.g. y(n)=ax(n)+bx2(n) Otherwise, the system is said to be dynamic or to have

memory, e.g. y(n)=x(n)−4x(n−2)

Classification of Discrete-time Systems

16Hossein Sameti, CE, SUT, Fall 1992

Page 17: Hossein Sameti Department of Computer Engineering Sharif University of Technology

In a causal system, the output at any time n only depends on the present and past inputs.

An example of a causal system: y(n)=F[x(n),x(n−1),x(n− 2),...] All other systems are non-causal. A subset of non-causal system where the system

output, at any time n only depends on future inputs is called anti-causal.

y(n)=F[x(n+1),x(n+2),...]

Causal vs. Non-causal Systems

17Hossein Sameti, CE, SUT, Fall 1992

Page 18: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Unstable systems exhibit erratic and extreme behavior. BIBO stable systems are those producing a bounded output for every bounded input:

Example: Solution:

Stable vs. Unstable Systems

18

yx MnyMnx )()(

)()1()( 2 nxnyny Stable or unstable?)()( nCnx Bounded signal

nCnyCyCyCy 242 )(,...,)2(,)1(,)0(

C1 unstable

Hossein Sameti, CE, SUT, Fall 1992

Page 19: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Superposition principle:T[ax1(n)+bx2(n)]=aT[x1(n)]+bT[x2 (n)] A relaxed linear system with zero input

produces a zero output.

Linear vs. Non-linear Systems

19

Scaling property

Additivity property

Hossein Sameti, CE, SUT, Fall 1992

Page 20: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Example: Solution:

Example:

Linear vs. Non-linear Systems

20

)()( 2nxny

)()( 211 nxny

Linear or non-linear?

)()( 222 nxny

)()())()(()( 222

21122113 nxanxanxanxaTny

)()()()( 222

2112211 nxanxanyanya Linear!

)()( nxeny

1)(0)( nynx Non-linear!

Useful Hint: In a linear system, zero input results in a zero output!

Hossein Sameti, CE, SUT, Fall 1992

Page 21: Hossein Sameti Department of Computer Engineering Sharif University of Technology

If input-output characteristics of a system do not change with time then it is called time-invariant or shift-invariant. This means that for every input x(n) and every shift k

Time-invariant vs. Time-variant Systems

21

)()()()( knyknxnynx TT

Hossein Sameti, CE, SUT, Fall 1992

Page 22: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Time-invariant example: differentiator

Time-variant example: modulator

Time-invariant vs. Time-variant Systems

22

)1()()()( nxnxnynx T

)2()1()1()1( nxnxnynx T

).().()()( 0 nCosnxnynx T

Hossein Sameti, CE, SUT, Fall 1992

Page 23: Hossein Sameti Department of Computer Engineering Sharif University of Technology

LTI systems have two important characteristics: ◦ Time invariance: A system T is called time-invariant or shift-

invariant if input-output characteristics of the system do not change with time

◦ Linearity: A system T is called linear iff

Why do we care about LTI systems?◦ Availability of a large collection of mathematical techniques◦ Many practical systems are either LTI or can be approximated by LTI

systems.

Linear Time-Invariant (LTI) Systems

23

)()()()( knyknxnynx TT

T[ax1(n)+bx2(n)]=aT[x1(n)]+bT[x2 (n)]

Hossein Sameti, CE, SUT, Fall 1992

Page 24: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Impulse Response of LTI Systems h(n): the response of the LTI system to the input unit sample

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

An LTI system is completely characterized by a single impulse response h(n).

)(*)()()( nhnxknhkxk

Response of the system to the input unit sample sequence at n=k

Convolution sum

24Hossein Sameti, CE, SUT, Fall 1992

Page 25: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Computing the Convolution Sum

25

Folding

Shifting and

kknhkxny )()()(

Multiplying

kknhkxny )()()( 00

Repeat for all n0

Summation

Hossein Sameti, CE, SUT, Fall 1992

Page 26: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Properties of Convolution of LTI Systems

26

)(*)()(*)( nxnhnhnx • Commutative law:

)](2*)()(1*)()](2)](1[*)( nhnxnhnxnhnhnx

Distributive law:

Hossein Sameti, CE, SUT, Fall 1992

Page 27: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Properties of Convolution of LTI Systems

27

)](2*)(1[*)()(2*)](1*)([ nhnhnxnhnhnx

Associative law:

Hossein Sameti, CE, SUT, Fall 1992

Page 28: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Example – Associative law

28

)(2

1)(1 nunh

n

)(

4

1)(2 nunh

n

?)( nh

• Solution:

kknhkhnh )()()( 21

)(4

1)(

2

1)()()( 21 knukuknhkhnv

knk

k

Non-zero for

0,0 knk

0,0)( nnh

n

k

knk

nh0 4

1

2

1)(

n

k

kn

02

4

10),12()

4

1( 1 nnn

1

0 1

1n

k

nk

r

raar

Hossein Sameti, CE, SUT, Fall 1992

Page 29: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Properties of LTI Systems

Page 30: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Remember that for a causal system, the output at any point of time, depends only on the present and past values of the input.

In the case of an LTI system, causality is translated to a condition on the impulse response. An LTI system is causal iff its impulse response is zero for negative values of n , i.e. h(n)=0 for n<0

This means that the convolution sum is modified to:

Example: exponential input; h(n)=an u(n) with |a|<1

Causality in LTI Systems

30

n

kk

knhkxknxkhny )()()()()(0

Hossein Sameti, CE, SUT, Fall 1992

Page 31: Hossein Sameti Department of Computer Engineering Sharif University of Technology

31

Causality Condition :

0for 0)( nnh

0

0

)()()(

)()(

)()()()()(

:Proof

k

k

kk

khknxnyso

khknx

khknxknhkxny

But x(n-k) for k>=0 showsthe past values of x(n). So y(n) depends only on thepast values of x(n) and the system is causal.

Neither necessary nor sufficient condition for all systems, but necessary and sufficient for LTI systems

Causality in LTI Systems

Hossein Sameti, CE, SUT, Fall 1992

Page 32: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Stability: BIBO (bounded-input-bounded-output) stable

|x(n)|< => |y(n)|<

In the case of an LTI system, stability is translated to a condition on the impulse response too. An LTI system is stable iff its impulse response is absolutely summable.

This implies that the impulse response h(n) goes to zero as n approaches infinity:

Stability of LTI Systems

32

kh khS )(

Hossein Sameti, CE, SUT, Fall 1992

Page 33: Hossein Sameti Department of Computer Engineering Sharif University of Technology

33

Stability Condition : A linear time-invariant system is stable iff

k

xkk

khBknxkhknxkhnya ][][][][][][ :cy)(Sufficien )

output unbounded

][

][][][]0[

0][0

0][][

][][

valuesinput with theTake . that assume usLet :)(Necessity )

2

*

h

kk

h

Skh

khkhkxy

nh

nhnh

nhnx

Sb

Stability of LTI Systems

k

h khS )(

Hossein Sameti, CE, SUT, Fall 1992

Page 34: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Example

34

0,

0,)(

nb

nanh

n

n a,b=? System Stable

• Solution:

1

0)(

n

n

n

n

nbanh

11

1...1

2

00

a

aaaaa

n

n

n

n

...)11

1(11

21

1

bbbbb

nn

n

n

b

1

1

...)1( 2)11( bor

Hossein Sameti, CE, SUT, Fall 1992

Page 35: Hossein Sameti Department of Computer Engineering Sharif University of Technology

LTI systems can be divided into 2 types based on their impulse response: An FIR system has finite-duration h(n), i.e. h(n) = 0 for n < 0 and n ≥ M.

This means that the output at any time n is simply a weighted linear combination of the most recent M input samples (FIR has a finite memory of length M).

An IIR system has infinite-duration h(n), so its output based on the convolution formula becomes (causality assumed)

In this case, the weighted sum involves present and all past input samples thus the IIR system has infinite memory.

Finite vs. Infinite-Duration LTI System Response

35

1

0)()()(

M

kknxkhny

0)()()(

kknxkhny

Hossein Sameti, CE, SUT, Fall 1992

Page 36: Hossein Sameti Department of Computer Engineering Sharif University of Technology

FIR systems can be readily implemented by their convolution summation (involves additions, multiplications, and a finite number of memory locations).

IIR systems, however, cannot be practically implemented by convolution as this requires infinite memory locations, multiplications, and additions.

However, there is a practical and computationally efficient means for implementing a family of IIR systems through the use of difference equations.

Discrete-Time Systems Described by Difference Equations

36Hossein Sameti, CE, SUT, Fall 1992

Page 37: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Cumulative Average System:

Example- Difference Equation

37

n

knkx

nny

0,...1,0),(

1

1)(

)()()()1(1

0nxkxnyn

n

k

)()1( nxnny

)(1

1)1(

1)( nx

nny

n

nny

+ Initial Condition

1

0

,...1,0),(1

)1(n

k

nkxn

ny

Hossein Sameti, CE, SUT, Fall 1992

Page 38: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Cross-Correlation

Page 39: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Cross-Correlation Concept

39

Shifted version of the transmitted

waveform + noise

Transmitted waveform

Page 40: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Cross-correlation is an efficient way to measure the degree to which two signals (one template and the other the test signal) are similar to each other.

Cross-Correlation is a mathematical operation that resembles convolution. It measures the degree of similarity between two signals.

Cross-Correlation of Discrete-time Signals

Template

Shifted version of the template+ noise

40Hossein Sameti, CE, SUT, Fall 1992

Page 41: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Visual Demonstration

41

Test signal

Cross-Correlation Machine

Output

Hossein Sameti, CE, SUT, Fall 1992

Page 42: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Visual Demonstration (Cont.)

42

• Applications include radar, sonar, biomedical signal processing and digital communications.

• The amplitude of each sample in the cross-correlation signal is a measure of how much the received signal resembles the target signal, at that location. • The value of the cross-correlation is

maximized when the target signal is aligned with the same features in the received signal.• Using cross-correlation to detect a known

waveform is frequently called matched filtering.

Hossein Sameti, CE, SUT, Fall 1992

Page 43: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Mathematical Definition

43

)()()( nDnxny )(nx Transmitted/Desired Signal

Received/Test SignalDelayed version

of the inputAdditive noise

Attenuation factor

nnxy lnylnxlnynxlr ,...2,1,0),()()()()(

• ryx(l) is thus the folded version of rxy(l) around l = 0 :

)()( lrlr yxxy

Hossein Sameti, CE, SUT, Fall 1992

Page 44: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Calculation of cross-correlation

44

• Cross-correlation involves the same sequence of steps as in convolution except the folding part, so basically the cross-correlation of two signals involves:

1. Shifting one of the sequences2. Multiplication of the two sequences3. Summing over all values of the product

Hossein Sameti, CE, SUT, Fall 1992

Page 45: Hossein Sameti Department of Computer Engineering Sharif University of Technology

The cross-correlation machine and convolution machine are identical, except that in the correlation machine this flip doesn't take place, and the samples run in the normal direction.

Convolution is the relationship between a system's input signal, output signal, and the impulse response. Correlation is a way to detect a known waveform in a noisy background.

The similar mathematics is only a convenient coincidence.

Cross-correlation vs. Convolution

45

)(*)()( lylxlrxy Cross-correlation is non-commutative.

Hossein Sameti, CE, SUT, Fall 1992

Page 46: Hossein Sameti Department of Computer Engineering Sharif University of Technology

Auto-correlation

46

)()()(

)()()(

lrnxlnx

lnxnxlr

xxn

nxx

Hossein Sameti, CE, SUT, Fall 1992

Page 47: Hossein Sameti Department of Computer Engineering Sharif University of Technology

It can be shown that:

For autocorrelation, we thus have:

This means that autocorrelation of a signal attains its maximum value at zero lag (makes sense as we expect the signal to match itself perfectly at zero lag).

Properties of Autocorrelation and Cross-correlation Sequences

47

yxyyxxxy EErrlr )0()0()(

xxxxx Erlr )0()(

Hossein Sameti, CE, SUT, Fall 1992

Page 48: Hossein Sameti Department of Computer Engineering Sharif University of Technology

If signals are scaled, the shape of the cross-correlation sequence does not change. Only the amplitudes are scaled.

It is often desirable to normalize the auto-correlation and cross-correlation sequences to a range from -1 to 1.

Normalized autocorrelation:

Normalized cross-correlation:

Properties of Autocorrelation and Cross-correlation Sequences

48

)0(

)()(

xx

xxxx r

lrl

)0()0(

)()(

yyxx

xyxy

rr

lrl

Hossein Sameti, CE, SUT, Fall 1992

Page 49: Hossein Sameti Department of Computer Engineering Sharif University of Technology

In this lecture, we learned about: Representations of discrete time signals and common basic DT signals Manipulation and representations/diagrams of DT systems Various classification of DT signals: Periodic vs. non-periodic, symmetric vs. anti-symmetric Classifications of DT systems:

◦ Static vs. dynamic, time-invariant vs. time-variant, linear vs. non-linear, causal vs.◦ non-causal, stable vs. non-stable, FIR vs. IIR

LTI systems and their representation Convolution for determining response to arbitrary inputs Cross-correlation

Summary

49Hossein Sameti, CE, SUT, Fall 1992