You are on page 1of 47

EE3054 Signals and Systems

Lecture 2 Linear and Time Invariant Systems


Yao Wang Polytechnic University

Most of the slides included are extracted from lecture presentations prepared by McClellan and Schafer

License Info for SPFirst Slides


This work released under a Creative Commons License with the following terms: Attribution
The licensor permits others to copy, distribute, display, and perform the work. In return, licensees must give the original authors credit.

Non-Commercial
The licensor permits others to copy, distribute, display, and perform the work. In return, licensees may not use the work for commercial purposesunless they get the licensor's permission.

Share Alike
The licensor permits others to distribute derivative works only under a license identical to the one that governs the licensor's work.

Full Text of the License This (hidden) page should be kept with the presentation
1/30/2008
2003, JH McClellan & RW Schafer

Review of Last Lecture


General FIR System
FIR case: h[n]=b_n
{bk }

IMPULSE RESPONSE h[n ] CONVOLUTION

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

For any FIR system: y[n] = x[n] * h[n]

1/30/2008

2003, JH McClellan & RW Schafer

GENERAL FIR FILTER


FILTER COEFFICIENTS {bk}
DEFINE THE FILTER

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

For example, bk = {3, 1, 2,1}

y[n ] = bk x[n k ]
k =0
1/30/2008

Feedforward Difference Equation

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


2003, JH McClellan & RW Schafer

GENERAL FIR FILTER


SLIDE a Length-L WINDOW over x[n] When h[n] is not symmetric, needs to flip h(n) first!

x[n-M]
1/30/2008

x[n]
2003, JH McClellan & RW Schafer

7-pt AVG EXAMPLE


Input : x[n ] = (1.02)n + cos(2 n / 8 + / 4) for 0 n 40

CAUSAL: Use Previous

1/30/2008

2003, JH McClellan & RW Schafer

LONGER OUTPUT

Unit Impulse Signal


x[n] has only one NON-ZERO VALUE

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

1 n

1/30/2008

2003, JH McClellan & RW Schafer

4-pt Avg Impulse Response


y[n ] = 1 ( x[n ] + x[n 1] + x[n 2] + x[n 3]) 4
[n] READS OUT the FILTER COEFFICIENTS

h[n ] = { , 0, 0, 1 , 1 , 1 , 1 , 0, 0, } 4 4 4 4
h in h[n] denotes Impulse Response

n=0
n=1 n=0 n=1

NON-ZERO When window overlaps [n]

n
n=4 n=5
1/30/2008
2003, JH McClellan & RW Schafer

What is Impulse Response?


Impulse response is the output signal when the input is an impulse Finite Impulse Response (FIR) system:
Systems for which the impulse response has finite duration

For FIR system, impulse response = Filter coefficients


h[k] = b_k Output = h[k]* input
1/30/2008
2003, JH McClellan & RW Schafer

FIR IMPULSE RESPONSE


Convolution = Filter Definition
Filter Coeffs = Impulse Response

y[n ] = bk x[n k ]
k =0
1/30/2008

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


k =0 CONVOLUTION
10

2003, JH McClellan & RW Schafer

Convolution Operation
Flip h[n] SLIDE a Length-L WINDOW over x[n]

y[n ] =

k =0

h[k ]x[n k ]

CONVOLUTION

x[n-M]
1/30/2008

x[n]
2003, JH McClellan & RW Schafer

11

More on signal ranges and lengths after filtering


Input signal from 0 to N-1, length=L1=N Filter from 0 to M, length = L2= M+1 Output signal?
From 0 to N+M-1, length L3=N+M=L1+L2-1

1/30/2008

2003, JH McClellan & RW Schafer

12

DCONVDEMO: MATLAB GUI

1/30/2008

2003, JH McClellan & RW Schafer

13

Go through the demo program for different types of signals Do an example by hand
Rectangular * rectangular Step function * rectangular

1/30/2008

2003, JH McClellan & RW Schafer

14

CONVOLUTION via Synthetic Polynomial Multiplication

1/30/2008

2003, JH McClellan & RW Schafer

15

Convolution via Synthetic Polynomial Multiplication


More example

1/30/2008

2003, JH McClellan & RW Schafer

16

MATLAB for FIR FILTER


yy = conv(bb,xx) VECTOR bb contains Filter Coefficients DSP-First: yy = firfilt(bb,xx)
FILTER COEFFICIENTS {bk} conv2()
for images

y[n ] = bk x[n k ]
k =0
1/30/2008
2003, JH McClellan & RW Schafer

17

POP QUIZ
FIR Filter is FIRST DIFFERENCE
y[n] = x[n] - x[n-1]

INPUT is UNIT STEP


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

Find y[n]
1/30/2008

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


2003, JH McClellan & RW Schafer

18

SYSTEM PROPERTIES
x[n] SYSTEM y[n]

MATHEMATICAL DESCRIPTION TIME-INVARIANCE LINEARITY CAUSALITY


No output prior to input
1/30/2008
2003, JH McClellan & RW Schafer

19

TIME-INVARIANCE
IDEA:
Time-Shifting the input will cause the same time-shift in the output

EQUIVALENTLY,
We can prove that
The time origin (n=0) is picked arbitrary

1/30/2008

2003, JH McClellan & RW Schafer

20

TESTING Time-Invariance

1/30/2008

2003, JH McClellan & RW Schafer

21

Examples of systems that are time invariant and non-time invariant

1/30/2008

2003, JH McClellan & RW Schafer

22

LINEAR SYSTEM
LINEARITY = Two Properties SCALING
Doubling x[n] will double y[n]

SUPERPOSITION:
Adding two inputs gives an output that is the sum of the individual outputs

1/30/2008

2003, JH McClellan & RW Schafer

23

TESTING LINEARITY

1/30/2008

2003, JH McClellan & RW Schafer

24

Examples systems that are linear and non-linear

1/30/2008

2003, JH McClellan & RW Schafer

25

LTI SYSTEMS
LTI: Linear & Time-Invariant Any FIR system is LTI Proof!

1/30/2008

2003, JH McClellan & RW Schafer

26

LTI SYSTEMS
COMPLETELY CHARACTERIZED by:
IMPULSE RESPONSE h[n] CONVOLUTION: y[n] = x[n]*h[n]
The ruledefining the system can ALWAYS be rewritten as convolution

FIR Example: h[n] is same as bk

1/30/2008

2003, JH McClellan & RW Schafer

27

Proof of the convolution sum relation


by representing x(n) as sum of delta(n-k), and use LTI property!

Properties of Convolution
Convolution with an Impulse Commutative Property Associative Property

Convolution with Impulse


x[n]*[n]=x[n] x[n]*[n-k]=x[n-k] Proof

Commutative Property
x[n]*h[n]=h[n]*x[n] Proof

Associative Property
(x[n]* y[n])* z[n]=x[n]*(y[n]*z[n]) Proof

HARDWARE STRUCTURES
x[n]

FILTER

y[n]

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

INTERNAL STRUCTURE of FILTER


WHAT COMPONENTS ARE NEEDED? HOW DO WE HOOK THEM TOGETHER?

SIGNAL FLOW GRAPH NOTATION


1/30/2008
2003, JH McClellan & RW Schafer

33

HARDWARE ATOMS
Add, Multiply & Store

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

y[n ] = x[n ]

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

1/30/2008

2003, JH McClellan & RW Schafer

y[n ] = x[n 1]

34

FIR STRUCTURE
Direct Form
SIGNAL FLOW GRAPH

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

1/30/2008

2003, JH McClellan & RW Schafer

35

FILTER AS BUILDING BLOCKS


x[n] FILTER
INPUT OUTPUT

FILTER

+ +

y[n]

FILTER

BUILD UP COMPLICATED FILTERS


FROM SIMPLE MODULES Ex: FILTER MODULE MIGHT BE 3-pt FIR

Is the overall system still LTI? What is its impulse response?


1/30/2008
2003, JH McClellan & RW Schafer

36

CASCADE SYSTEMS
Does the order of S1 & S2 matter?
NO, LTI SYSTEMS can be rearranged !!! WHAT ARE THE FILTER COEFFS? {bk}

S1
1/30/2008

S2
37

2003, JH McClellan & RW Schafer

proof

1/30/2008

2003, JH McClellan & RW Schafer

38

CASCADE SYSTEMS

h1[n] x[n]

h2[n] y[n]

Is the cascaded system LTI? What is the impulse response of the overall system?
1/30/2008
2003, JH McClellan & RW Schafer

39

CASCADE SYSTEMS

h[n] = h1[n]*h2[n]! Proof on board

Does the order matter?

S1

S2

S2
1/30/2008
2003, JH McClellan & RW Schafer

S1
41

proof

Example
Given impulse responses of two systems, determine the overall impulse response

Parallel Connections

h1[n] x[n] h2[n] + y[n]

h[n]=?

Parallel and Cascade

h1[n] x[n] h3[n]

h2[n] + y[n]

h[n]=?

Summary of This Lecture


Properties of linear and time invariant systems Any LTI system can be characterized by its impulse response h[n], and output is related to input by convolution sum: y[n]=x[n]*h[n] Properties of convolution Computation of convolution revisited
Sliding window Synthetic polynomial multiplication

Block diagram representation


Hardware implementation of one FIR Connection of multiple FIR
Know how to compute overall impulse response

READING ASSIGNMENTS
This Lecture:
Chapter 5, Sections 5-5 --- 5-9

You might also like