0% found this document useful (0 votes)
40 views35 pages

SPFirst-L11 EV0

ece2011 at monash university signal processing first lecture notes if you are studying at monash uni electrical engineering than this will help

Uploaded by

kewancam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views35 pages

SPFirst-L11 EV0

ece2011 at monash university signal processing first lecture notes if you are studying at monash uni electrical engineering than this will help

Uploaded by

kewancam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Signall

Si
Processing
First

Copyright Monash University 2009

Lecture11
Linearity
TimeInvariance
Convolution

READING ASSIGNMENTS
ThisLecture:
Chapter5,Sections55and56
p 5,
55
5

OtherReading:
Recitation:Ch.5,Sects56,57&58
R i i Ch S
6 & 8
CONVOLUTION

NextLecture:startChapter6

Copyright Monash University 2009

LECTURE OBJECTIVES
GENERAL PROPERTIES of FILTERS
LINEARITY
TIME-IINVARIANCE
CONVOLUTION

LTI SYSTEMS

BLOCKDIAGRAMREPRESENTATION
Componentsfor
Hardware
p
ConnectSimpleFiltersTogethertoBuildMore
ComplicatedSystems
Copyright Monash University 2009

OVERVIEW
IMPULSERESPONSE, h[n ]
FIRcase:sameas
FIR

{{bbk }

CONVOLUTION
GENERAL: y[ n ] = h[ n ] x[ n ] = k h[ k ] x[ n k ]
GENERALCLASSofSYSTEMS
GENERALCLASS fSYSTEMS
LINEARandTIMEINVARIANT

ALLLTI systemshaveh[n]&useconvolution
Copyright Monash University 2009

DIGITAL FILTERING
x(t)

A-to-D

x[n]

FILTER

y[n]

D-to-A

y(t)

(
)
CONCENTRATEontheFILTER(DSP)
DISCRETETIMESIGNALS
FUNCTIONSofn,thetimeindex
f
h
d
INPUTx[n]
OUTPUTy[n]
Copyright Monash University 2009

GENERAL FIR FILTER


FILTERCOEFFICIENTS{bk}
M
DEFINETHEFILTER
y[n ] = bk x[n k ]
(k=0 CAUSAL
k =0
M<
FIR)
M
Forexample,bk = {3, 1, 2,1}

y[n ] =

bk x [ n k ]

Difference Equation

k =0

= 3 x [ n ] x [ n 1] + 2 x [ n 2 ] + x [ n 3 ]
Copyright Monash University 2009

3/23/2011

IMPULSE SIGNAL
x[n]hasonlyoneNONZEROVALUE

1 n = 0
[n ] =
0 n 0
UNIT-IMPULSE
UNIT
IMPULSE

1
n

Copyright Monash University 2009

FIR IMPULSE RESPONSE


Convolution=FilterDefinition
FilterCoeffs=ImpulseResponse
p
p

M
M

hy[n ] = bkkx[n k ]
kk==00

Copyright Monash University 2009

Use SHIFTED
IMPULSES to
write h[n]
8

MATH FORMULA for h[n]


UseSHIFTED IMPULSEStowriteh[n]
h[n ] = [n ] [n 1] + 2 [n 2] [n 3] + [n 4]
2

h[n ]
1

1
1

3
2

bk = { 1, 1, 2, 1, 1 }
y [ n ] = x[ n ] x[ n 1] + 2 x[ n 2] x[ n 3] + x[ n 4]
Copyright Monash University 2009

Convolution Sum
Output=Convolutionofx[n]&h[n]
y[n ] = h[n ] x[n ]
NOTATION:
HereistheFIRcase:
FINITE LIMITS

y[n ] =

* is convolution
not multiplication

h[ k ] x[ n k ] =: h[ n ] * x[ n ]
k =0

Same as bk
Copyright Monash University 2009

FINITE LIMITS
10

CONVOLUTION Example
p
M

y[n] = h[k ] x[n k ] = h[0] x[n] + h[1] x[n 1] + L + h[ M ] x[n M ]


k =0

Finite

Finite y[n]
Copyright Monash University 2009

3/23/2011

11

CONVOLUTION Commutes
M
M

y[n] = hx[k ]hx[n k ] = hx[[0]]hx[n] + hx[[1]]hx[n 1]] + L + hx[ M ]hx[n M ]


k =0

y [ n ] = h[ k ] x[ n k ] = h[ n ] * x[ n ]
x[0]h[n-0]
[ ] [ ]
x[1]h[n-1]
x[2]h[n-2]
x[3]h[n-3]
x[3]h[n
3]
x[4]h[n-4]

|
|
|
|
|

k =0
6

-2
12

4
-4
18

2
8
-6
2

4
12
-4
4
6

= x[ k ]h[ n k ] = x[4n ] * h[ n ]
k =0

6
8
-2

3/23/2011
Copyright Monash University 2009

12

h[ n ] = [ n ] [ n 1] + 2 [ n 2] [ n 3] + [ n 4]
x[ n ] = u [ n ]

CONVOLUTION Example
4

y[ n ] = h[ n ] * x[ n ] = h[ k ]u[ n k ]
k =0

n 1 0
1 2 3 4
5 6
7
x[n] 0 1 1
1 1 1 1 1 ...
h[n] 0 1 1 2 1 1 0 0 0
0 1 1
1 1 1 1 1 1
h[0]x[n ]
0 0 1 1 1 1 1 1 1
h[1]x[n 1]

h[2]x[n 2]
h[3]x[n 3]
h[4]x[n 4]
y[n]

0 0
0 0
0 0
0 1

0
0
0
0

IInfinite
fi i
x[n]

2 2 2 2 2 2
0 1
1 1
1 1
1 1
1 1
1
0 0
1 1 1 1 Infinite
2
1 2 2 2 ... y[n]
3/23/2011

Copyright Monash University 2009

13

GENERAL FIR FILTER


SLIDEaLengthLWINDOWoverx[n]
g
L=M+1

x[n-M]
Copyright Monash University 2009

x[n]
14

MATLAB for FIR FILTER


xx)
yy = conv(bb
conv(bb,xx)
VECTORbb containsFilterCoefficients
SPFirst:yy = firfilt(bb,xx)
(
)
Previousexample
bb=[3
[ -2 2 1];
] xx=[2
[ 4 6 4 2];
]

yy = firfilt(bb,xx)
ans = [6 10 18 16 18 12 8 2]
Copyright Monash University 2009

15

Polynomial
y
product
p
and convolution
p ( x ) = 1 2 x + x 2 deg( p ) = 2
q ( x ) = 1 x deg(
d ( p) = 1
p ( x ) q ( x ) = 1 x + 3 x 2 x 3 deg( pq ) = 3
x[ n] = {..., 0, 0, 1, 2,1, 0, 0,...}
h[ n] = {..., 0, 0,1, 1, 0, 0,...}

L1 = 3 ( M 1 = 2)

L2 = 2 ( M 2 = 2)

y[ n] = h[ n]* x[ n] = h[ k ]u[ n k ] = {..., 00, 00,1,


1 11, 33, 11, 00, 00,...}
k =0

L1 + L2 1 = 4

( M 1 + M 2 1 = 3)

([ -2 1],[1
],[ -1])
]) =>
>> conv([-1
Copyright Monash University 2009

[ -1

-1

-1]]
16

DCONVDEMO: MATLAB GUI

3/23/2011
Copyright Monash University 2009

17

POP QUIZ
FIRFilterisFIRSTDIFFERENCE
FIRFilteris
FIRSTDIFFERENCE
y[n]=x[n] x[n1]

INPUTisUNITSTEP
1 n 0
u[n ] =
0 n < 0

Find y[n]

y[n ] = u[n ] u[n 1] = [n ]


3/23/2011

Copyright Monash University 2009

18

HARDWARE STRUCTURES
M

x[n]

FILTER

y[n]

y[n ] = bk x[n k ]
k =0

INTERNALSTRUCTURE
ofFILTER
S
C
f
WHATCOMPONENTSARENEEDED?
HOWDOWEHOOKTHEMTOGETHER?

SIGNALFLOWGRAPHNOTATION

Copyright Monash University 2009

19

HARDWARE ATOMS
Multiply,Store&Add

y[n ] = bk x[n k ]
k =0

y[n] = x[n]

y[n] = x1[n] + x2[n]

y[n ] = x[n 1]
Copyright Monash University 2009

20

FIR STRUCTURE
S UC U
DirectForm
SIGNAL
FLOW GRAPH

y[n ] =

bk x[ n k ]

k =0

Stored sequence

Copyright Monash University 2009

21

FIR TRANSPOSE
S OS S
STRUCTURE
UC U
y[n ] =

bk x[ n k ]

k =0

x[n]
X

b3

b2
Unit
Delay

Copyright Monash University 2009

b1

Unit
Delay

b0

Unit
Delay

y[n]

22

SYSTEM PROPERTIES
x[n]

SYSTEM

y[n]

MATHEMATICALDESCRIPTION
TIMEINVARIANCE
TIME
LINEARITY
CAUSALITY
Nooutputpriortoinput

Copyright Monash University 2009

23

TIME INVARIANCE
TIME-INVARIANCE
IDEA:
TimeShiftingtheinputwillcausethesame
g
p
timeshiftintheoutput

EQUIVALENTLY,
Wecanprovethat
Thetimeorigin(n=0)ispickedarbitrary

Copyright Monash University 2009

24

Time Invariance
TESTING Time-Invariance

Copyright Monash University 2009

25

1, n = 0
,
Q [n] =
0 n0
0,

2003, JH McClellan & RW Schafer

n [n] = 0 for all n

3/23/2011
Copyright Monash University 2009

26

LINEAR SYSTEM
LINEARITY=TwoProperties
SCALING
Doublingx[n]willdoubley[n]

SUPERPOSITION:
Addingtwoinputsgivesanoutputthatisthe
sumoftheindividualoutputs
sumoftheindividualoutputs

Copyright Monash University 2009

27

TESTING LINEARITY

3/23/2011
Copyright Monash University 2009

28

Ex: time-flip system y[n]=x[-n] is a


linear system

3/23/2011
Copyright Monash University 2009

29

LTI SYSTEMS
LTI:Linear&TimeInvariant
COMPLETELYCHARACTERIZEDby:
COMPLETELYCHARACTERIZEDby
IMPULSERESPONSE h[n]
CONVOLUTION:y[n]=x[n]*h[n]
The
TheruledefiningthesystemcanALWAYSbere
rule definingthesystemcanALWAYSbere
writtenasconvolution

FIRExample:h[n]issameasbk
Exampletransparence

Copyright Monash University 2009

30

LTI syste
system a
and
d co
convolution
o ut o
y[n]=LTI(x[n])h[n]=LTI([n])
y[n] LTI(x[n])h[n] LTI([n])
yy[n]=LTI(
x[k][nk])impulse
p
repres.of
p
x[n]
y[n]=LTI(x[k] [nk])linearity
y[n]=x[k] LTI([nk])linearity
y[n]=x[k] h[nk]time invariance
y[n]=x[n]*h[n]
Copyright Monash University 2009

3/23/2011

31

CASCADE SYSTEMS
DoestheorderofS1 &S2 matter?
NO,LTISYSTEMScanberearranged!!!
,
g
WHATARETHERESULTINGFILTERCOEFFS?
{bk}ORh[n]

S1
Copyright Monash University 2009

S2
32

CASCADE
C
SC
EQUIVALENT
QU
Findoverallh[n]foracascade?

S1

S2

h[ n ] = h1 [ n ] * h2 [ n ]
= h2 [ n ] * h1 [ n ]

S2
Copyright Monash University 2009

S1

3/23/2011

33

03
1
h1[n]
0 otherwise

Example

1 3
1
h 2 [[n]]
h
i
0 otherwise
h[n]=h
[ ] 1[[n]*h
] 2 [[n]]
6

y[n]= h[k]x[n-k]
k=0

or
3

w[n]= x[n-k]
k=0

3/23/2011
Copyright
Monash University 2009

y[n]= w[n-k]
k=1

5 +, 4 x
5 + only
only, no x
34

BUILDING BLOCKS
OUTPUT

x[n]
FILTER

FILTER

y[n]

INPUT

FILTER

BUILDUPCOMPLICATEDFILTERS
FROMSIMPLEMODULES
Eg

FILTER = 3x[n]-x[n-1] +2x[n-2]+x[n-3]

Copyright Monash University 2009

35

You might also like