EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR...

24
EE 477 Digital Signal Processing 8a IIR Systems

Transcript of EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR...

Page 1: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477Digital Signal Processing

8aIIR Systems

Page 2: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 2

General Difference Equation

•FIR: output depends on current andpast inputs only

•IIR: output depends on current andpast inputs and past outputs

[ ] [ ] [ ]∑∑==

−+−=N

ll

M

kk lnyaknxbny

10

Page 3: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 3

IIR Block Diagram

z-1

z-1

z-1

Σb0

b1

b2

b3

x[n]

x[n-1]

x[n-3]

x[n-2]

z-1

z-1

z-1

Σ

a1

a2

a3

y[n-1]

y[n-3]

y[n-2]

y[n]

Page 4: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 4

IIR Recursion

•Since current output depends on pastoutputs, we must either know orassume the prior state

•Generally use initial rest assumptions:–Input is a right-handed sequence (zero

before some n=n0)–Output is zero prior to n0

Page 5: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 5

IIR Recursion (cont.)

•Example: compute response of systemdescribed by:

with input:]1[5.0]1[][][ −+−−= nynxnxny

]2[5.0]1[2.0][][ −+−−= nnnnx δδδ

1

-0.2

0.5 ΣZ-1 -1

ΣZ-1 -1 Z-10.5

Page 6: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 6

IIR Recursion (cont.)

•Assume initial restn x[n] y[n]-2 0 0-1 0 00 1 11 -0.2 -0.72 0.5 0.353 0 -0.3254 0 -0.16255 0 -0.081256 0 -0.040637 0 -0.020318 0 -0.010169 0 -0.0050810 0 -0.0025411 0 -0.00127

y[n]

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

-2 0 2 4 6 8 10 12 14 16 18 20 22 24 26

n

Page 7: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 7

Impulse Response

•The general IIR system expression islinear and time invariant (assuminginitial rest)

•Output is given by the convolution sum:

•Due to recursion, unit sample responsecan be of infinite extent

∑∞

−∞=

−=k

knhkxny ][][][

Page 8: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 8

Response Example

•Example:•Unbounded unit sample response

]1[2][][ −+= nynxny

0

200

400

600

800

1000

1200

-2 -1 0 1 2 3 4 5 6 7 8 9 10

n

][2][ nunh n=

Page 9: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 9

Closed Form Summation

•Some responses can be described inclosed form. One useful example:

( )

=+−

≠−

−=

+

=∑

1,1

1,1

12

121

2

1

rLL

rr

rrr

LL

L

Lk

k

Page 10: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 10

Response Behavior•Consider unit step response of simple

IIR system: ][]1[][ 1 nxnyany +−=

1n

…1…

1+a1+a12+ a1

3 + a14 + a1

515

1+a1+a12+ a1

3 + a1414

1+a1+a12+ a1

313

1+a1+a1212

1+a111

110

00-1

y[n]x[n]n

∑=

n

k

ka0

1 1

1

1

11

11

11][

,nlimit thein

aa

aany

n

−−

→−

−=

∞→∞+

][][

isresponsesampleunit thatnote

1 nuanh n=

Page 11: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 11

Response Behavior (cont.)

•Now consider what happens if:|a1|<1: sum converges to

|a1|>1: sum diverges

|a1|=1: sum diverges if a1=1, or alternates[1,0,1,0,… ] if a1= -1

111a−

Page 12: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 12

Response Behavior (cont.)•In general, we can use convolution sum:

•In this example with unit step input:∑

−∞=

−=k

knhkxny ][][][

1

11

1

1

11

01

1

11

11

11

0,

0,0

][][][

aa

a

aa

na

n

knuakuny

n

n

n

n

k

kn

k

kn

−−

=

=

<=

−=

+

+

=

−∞=

Page 13: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 13

IIR System Function

•General first-order IIR:

•Take z-transform of both sides:

•Collect terms

]1[][]1[][ 101 −++−= nxbnxbnyany

)()()()( 110

11 zXzbzXbzYzazY −− ++=

)()()()1()()()()(

110

11

110

11

zXzbbzYzazXzbzXbzYzazY

−−

−−

+=−

+=−

Page 14: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 14

IIR System Function (cont.)

•Since Y(z)=H(z)X(z), we can writeH(z)=Y(z)/X(z)

•Note form of numerator anddenominator: feed forward on top,1 with negative of feed back on bottom

)1()(

)()()( 1

1

110

−+

==zazbb

zXzYzH

Page 15: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 15

Poles and Zeros

•The numerator polynomial has rootsthat are the zeros of the system

•The denominator polynomial has rootsthat are the poles of the system

•If the order of the numerator anddenominator polynomials differ, therewill be zeros and/or poles at 0 or infinity

Page 16: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 16

Structures: Direct Form I•Direct Form I: feed-forward calculation

followed by feedback calculation

z-1

z-1

z-1

Σb0

b1

b2

b3

x[n]

x[n-1]

x[n-3]

x[n-2]

z-1

z-1

z-1

Σ

a1

a2

a3

y[n-1]

y[n-3]

y[n-2]

y[n]

Page 17: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 17

Direct Form II•Direct Form II: feedback first, then

feed-forward (OK because LTI system)

x[n]

z-1

z-1

z-1

Σb0

b1

b2

b3

w[n-1]

w[n-3]

w[n-2]

z-1

z-1

z-1

Σ

a1

a2

a3

w[n-1]

w[n-3]

w[n-2]

w[n]y[n]

Page 18: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 18

Direct Form II (cont.)•Note that delay lines contain the same

values, so they can be merged.

x[n] Σb0

b1

b2

b3

z-1

z-1

z-1

Σ

a1

a2

a3

w[n-1]

w[n-3]

w[n-2]

w[n]y[n]

Page 19: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 19

Transpose Forms

•Oddly enough, the delay/branch/sumblock diagram can be “run in reverse”tocreate an equivalent transpose form:–Reverse all arrows in block diagram–Branch points become sum points; sum

points become branch points–Input and Output are exchanged

Page 20: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 20

Transpose Example•Original: first-order direct form II

•Transposed version

x[n] Σb0

b1

z-1

Σ

a1

w[n-1]

w[n]y[n]

x[n]

Σ

b0

b1

z-1

Σ

a1

y[n]

Page 21: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 21

Region of Convergence

•The z-transform of the unit sampleresponse is the system function, H(z)

•The z-transform is computed from

•This was OK for FIR, but for IIR wemust be sure that the infinite sumactually converges!

∑∞

−∞=

−=n

nznhzH ][)(

Page 22: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 22

Region of Convergence (cont.)

•Example: h[n]=anu[n]

•If |az-1|<1, then sum converges

x[n]

z-1

Σ

a

y[n]

( )∑∑∞

=

−∞

=

− ==0

1

0)(

n

n

n

nn azzazH

( )1

0

1

11

=

−=∑ az

azn

n

Page 23: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 23

v

Region of Convergence (cont.)

•Since |az-1|<1, this implies |z| > |a|.•This means that the ROC will be all

values of |z| outside a radius r = |a|

|a|

ROC

Page 24: EE 477 Digital Signal Processing - Montana State University · Digital Signal Processing 8a IIR Systems. EE 477 DSP Spring 2007 Maher 2 General Difference Equation •FIR: output

EE 477 DSP Spring 2007 Maher 24

Region of Convergence (cont.)

• In order for a causal system to be stable, theROC must include the unit circle.

• The poles of the system define the edge ofthe ROC.

• This means: a stable, causal system willhave all its poles inside the unit circle, so thatthe ROC extends outward (including the unitcircle) from the largest pole.