discrete -time signals and systems z-transform & iir filters 1

43
Yogananda Isukapalli Discrete - Time Signals and Systems Z - Transform & IIR Filters 1

Upload: others

Post on 04-Nov-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Yogananda Isukapalli

Discrete - Time Signals and Systems

Z-Transform & IIR Filters 1

Page 2: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

{ } { }

1 0

1 1

1

1 0 1

1 0 1

[ ] [ 1] [ ] [ 1]

[ ]

( ) ( ) ( ) ( )

[ 1] [ ] [ 1

)

]

(

st

Consider the difference equation of a general

1 order IIR system

Apply the Z transform on both sides

Z y n Z a y n b x n b x n

y n a y n b x n b x

Y z a z Y z b X z b z X z

Y

n

z

- -

-

= - + + -

Þ

- +

+

= +

+

-

=1 1

1 0 1(1 ) ( )( )a z X z b b z- -- = +

Transfer function: 1st Order IIR Filters

Page 3: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

{ }

10 1

11

,

( )(1 )

( )...

( ) ( )( ) =

( ) ( )

k

Unlike FIR IIR filter transfer function is a ratio

of polyn

b b za

B z numerator polynomial is defined by the

weight

Y z B zH z

X

ing coefficie

omia

nts b that mult

l

z A z

s

z

-

-= =

+

-

[ ]

( )...

iply x n

and its delayed versions

A z denominator polynomial is defined by

feedback coefficients

Page 4: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

An implementation view

10 1

11

1 2

1 2

0

2

1

1

1

( )

( )(1 )

( ) ( ) ( )1( ) ,

( ) ( )(

[ ] [ 1] [ ] [ 1]

( )

( ) ( )( )

) =( ) ( )

b b za z

using the cascading propertyH z H z H z

y n a

Y z B zH z

H z H z

y n b x n b x n

H z H

B zA z

X z A z

z

-

-

= - + + -

=

=

=

=

=

=+-

Page 5: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Direct form I

Page 6: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Direct form II

Page 7: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 1

( )

[ ] 2 [ 1] [ ] 3 4 [ 1]

stFind the transfer function of the 1 order IIR system

y n y n x n x n= - - + -

{ } ( ){ }

( )

( )

( )1

1 1

1 1

1( ) (

( ) 2 ( ) ( ) 3 4 ( )

[ ] 2 [ 1] [ ]

1 3 4 )( )

( ) (1 2

( )(1 2 ) ( )( 1 3 4

4 1]

)

3

)

[

Apply the Z transform on both sides

Z y n Z y n x n x

Y z z Y z X z z X z

Y z z

Y z zH z

X z

X z z

n

z

- -

- -

-

-

= - +

-

= - - + -

Þ

- =

-=

-

- +

+=

Page 8: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 2

[ ] [ 1] [ ]

'

[ 1]

',

st

Directly pick the numerator and denominator coefficients

coefficien

Find the tran

ts related with

sfer function of the 1 order IIR syste

numerator

coeffici

m

y n ay

ents

n bx

x

related wi

n cx n= - + + -

' ' ,th denominay rator

1

1

( ) ( )( )

( ) (1 )

Y z b czH z

X z az

-

-

+= =

+

Page 9: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Transfer function: 2nd order IIR Filters

{ }

1 2 0 1 2

1 2 0 1

2

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

[ 1] [ 2] [ ] [ 1]

[ ]

ndConsider the difference equation of a general order IIR system

Apply the Z transform on both sides

Z

y n a y n a y n b x n b x n b x n

a y n a y n by n

x n b xZ

n

= - + - + + - + -

- + - -

-

=+ +

1 2 1 2

1 2 0 1

2

2

1 2 1 21 2 0 1 2

( ) ( ) ( )

( ) ( ) ( )

[ 2]

( )(1 ) ( )( )

Y z a z Y z a z Y z b X z b z X z b

b x n

z X z

Y z a z a z X z b b z b z

- - - -

- - - -

=

+

+ + +Þ

-

+

- - = + +

ì üí ýî þ

Page 10: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

1

0 1

1

1

22

22

( )( )( )

( ) (1 )

b b zY zH z

X z a

b zz a z

-

-

-

-

+=

-

+=

-

Page 11: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example

{ }1 2 1 2

( ) 0.5 [ 1] 0.3 [ 2] [ ] 3 [ 1]

2

[ ] 0

2 [ 2]

( ) 0.5 ( ) 0.3 ( ) ( ) 3 ( ) 2 ( )

.5 [ 1] 0.3 [ 2

(

] [ ]

3 [ 1] 2 [ 2]

ndFind th

Y z Z y n y n x n x n x n

Y z

e transfer function of a order IIR system

y n y n y n x n x n x n

z Y z z Y z X z z X z z X z

Y z

- - - -

= - + - - + -

= - + - - + - - -

Þ -

-

=

-

+ + -

1 2

1

1 2

2 1 2)(1 0.5 0.3 ) ( )( 1 3 2 )

( ) ( 1 3 2 )( )

( ) (1 0.5 0.3 )

Y z z zH z

X z

z

z z

z z X z z- -

-

- -

-

- -

- + -=

- - = - +

-

-

=-

Page 12: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

1 0

0

0

1

1

(

)( )

( ) 1

[ ] [ ] [ ]

( ) ( ) ( )

N M

l kl

Mk

kk

Nl

ll

l

k

N Ml k

l kl k

k

b zY z

H zX z

feed

y n a y n l

a coefficients

b coefficient

back

a

feed forwa

b x n k

Y

z

z a z Y z b z X z

srd

= =

- -

= =

-

=

-

=

= - +

=

+

-

=

=

-

-

å

å å

å

å

å

!

!

Transfer function: General expression

Page 13: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Transfer function: Impulse Response

1 0 11

0 1 1 1

1

,

[ ] [ 1] [ ] [ 1]

[ ] [ ] [ 1]1[ ]

, ( ) [ ]

1

n

n

n

zn

n

From previous lecture Impulse response of

Transfer function is also Z trans

y n a y n b x n b x n

h n b a u n b

form of impulse

response H z h

a u n

a

n

u nz

s

z

i

a

¥

-

-

=-¥

-

-

=

= - + + -

= + -

¬¾®-

å

!

Page 14: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

10 11 1

1 1

10 1

11

1 1(

,

)1 1

( )

,

1

In summary except for polynomial functions

on both numerator and denominator gener

H z b b za z a z

b

al

properti

b zH z sam

es of

e resul

Z transforms are same for II

ta z

-

- -

-

-

= +- -

+=

-

-

æ ö æ öç ÷ ç ÷è ø è ø

!

R

and FIR filters

Page 15: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 1: Application of inverse Z-transform

1

1 1

1

1

1

1

1

1

1

11 3

1 2 1 2

1[ ] & ( ) [ 1]

1

1 3

1 3( )

1 2

( 2) [ ] & 3( 2

( )1 2 1 2

) [ 1]

[ ] ( 2) [ ] 3( 2)

z zn

z zn n

n

z

z z

z

zH z

z

a u n z X z x naz

u n u

H zz z

n

Find the impulse response of the feedback system

h n u n

-

- -

-

-

-

-

-

-

-

-

+ +

-=

--

-

=

-

+

+

-

+

¬¾® ¬¾®

¬¾® ¬

= - -

¾®

-

-

!

1 [ 1]n u n- -

Page 16: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 2

1 2

10.2 0.2

2

2

( 2)( 0.2)( 0.6)

2( )

( 0.4 .12)

( 0.2) ( 0.6)

( 0.2) 2

(

) 2.75( 0.6)z z

Find the impulse response

z zc X z

of the feedback system

zH z

z z

z z

z zz zc z c zz z

= =

+=

- +

= +-

- += = =

+

+

+=

+ -

Page 17: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

( )

( ) ( )

2

0.6 0.6

2.75 1.75

( 0.6) 2( ) 1.75

( )0.2 0.6

[ ]

2.75(0.2) [ ][

0.2

] 1.75( 0.6) [ ]

zn

n

z

n

z

z zH z

z z

za u

z zc X

nz a

u nh n

n

zz z

u

=- =-

= -- +

-

=- -

+ += = = -

-

¬¾®

ì üï ïí ýï ïî þ

!

Page 18: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Poles & Zeros

0. ,

,

( )

,

FIR filters had poles only at z However IIR filters can

have poles anywhere because the poles are nothi

Consid

ng but the

roots of t

er a fir

he de

st order

nominator polynomial A z

transfer function

=

1 1

1

0 1

1

1

0 1

0

1

1 1

1

1

... 0

1

( )1

0

bZero b b z z

b

b

Pole a

b zH z

a z

z p a

-

-

-

-

+ = Þ =

=-

- = Þ

+

-

=!

Page 19: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Poles & Zeros — 2nd order IIR filter

2 1

1 2

0 1 2

1 2

0 1 2

2

1

1

1 2

2

( )( )(

' '

( )( )

)( ) )

(

1

)

(

Convert the function as a function of z

b z b z bH z

z

A polynomial of degree 'N' has 'N' roots

b b z b zY zH z

X z a

order 2 po

z a

lynomial will have 2 zeros

a z

z

an

a

d 2

- -

- -

+ +

+ += =

-

\

-

=- -

poles

Page 20: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

[ ]

( )

2

1 1 0 2

1 2

0

2 2

1 1 0 2 1 1 0

2

0 1

2 2

1 0 2 1

2

0 2

1 2

1 2

0

1

2

0

*2

4 0 4

4,

2

4

,

4,

0

;

2 2

if b b b o

Zeros from numerator

b

r b b b

Then the z and z will

b b b

be a complex conjugate pai

bz z

b

b b b b b b b bz z

b

z

b

z

r

z b b

z

- ± -=

- + -

+ + =

-

- - -=

<

=

<

=

Page 21: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

[ ]

( )

21 1 2

1 2

2 21 1 2 1 1 2

1

21

2

2

4,

2

4 4,

0

2

,

2

221 2

1

2 1

2

*1 2

if < 0 or a < -

Then th

a a ap p

a a a

Poles from denominator;

z a

e p and p will be a complex conjugate p

a

air

p = p

a ap p

a +4a 4

z

a

a-

± +=

+ + - +=

- =

=

Page 22: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 1

1

...2 0

[ ] 0.5 [ 1]

2 2( )

1 0.

2

0

0.5 0 0.5

[

5 0.5

]

Ze

Find the poles and zeros of the feedback system

y n y n x n

Always convert the transfer

ro

function as a functi

z z

Pole z

on of z

z

z

zH z

z -=

= Þ =

- = Þ =

- +

- -

=

=

!

Fig 14.5

Page 23: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 2

1

1

0 , .

... lim ( ) 0

3 3( )

1 0.5

[

0.5 0 0.5

] 0.

0

5 [ 1 3 [ ]

.

] 1

5

z

if all poles and zeros at

z or are also counted no of pole

Zero H z z

Pole z z

Find the poles and zeros of the feedback system

y n y n x n

zH z

z z

-

-

®¥

= ¥

=

= Þ = ¥

- = Þ

-

=-

-

-

=

+

=

!

. s no of zeros=Fig 14.6

Page 24: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 3

1

1 2

1 2 2

1 2 2 2

2

1 2

2 2( )

1 ( )

,

2 2 2

... 0;

2( )

1 1

2 2 2

0,

( 1) 0

1

zH z

z zConvert H z into a function o

Find the poles and zeros of the feedback system

f z

z z z zH z

z z z z z

zZero z zs

z

z

z

-

- -

-

- -

=

Þ

+=

- +

+ += =

- +

-

+

+ =

= =

-

+

æ öç ÷è ø

Page 25: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

2

31

32

3 3

1 0

1 1 4 1 32 2 2

1 1 4 1 32 2 2

2 ( 1)( )

( )(

. .

)

.

j

j

j j

The system function can now be written in factored form also

z z

p j e

p j e

z zH z

z e z

p l

e

o es

p

p

p p

-

-

- + =

+ -= = + =

- -= = - =

+=

- -

Page 26: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

PolesZeros

3 3

2 ( 1)( )

( )( )j j

z zH z

z e z ep p-

+=

- -

Page 27: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 4

1 2 2 2

1 2 2 2

1 2

1 2

( ) (1 2

[ ] [ 1] [ 2] [

)( )

( ) (1 ) ( ) ,

1 2 2

] [ 1] [ 2

( )1

2 ]

z z z

Find the poles and zeros of the feedb

Y z z zH z

X z z zConvert H z into a fu

ack syste

nction

z zH z

z z z

of z

m

y n y n y n n n x n

z

x x- -

- -

- -

- -

+ += =

=

-

-

+ + + += =

- -

+ - + + -

-

+ -

-

æ öç ÷è ø

2 2... 0

1

z zr

z

Ze os + +

-

=

Page 28: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

2

1

2

1

2

1 1 8 1 7

2 2 2

1

... 1 0

1 1 4 1 5

2 2

1 1 4 1 5

2 2

1 8 1 7

2 2 2

Poles z z

p

p

jz

jz

- + -= = - +

-

- - =

+ + += =

- + -= =

- -= = - -

Fig 14.8

Page 29: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 5

1

1 2

1 2

2 2 2

1 2 2

( ) (3 2 )( )

( ) (1 2 3 )

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

( )

3 2 3

,

2(

] 2 [ 1] [ 2

)1 2 3

]Find the poles an

Y z z zH z

X z z zConvert H z into a f

d zeros of the IIR filt

z

unction

er

o

y n y n y n x n x n x n

z z z zH z

z z z

f z-

-

-

-

-

-

-

-

=

+ +=

- - -

+ +

+ + -

=-

+=

-

-

=

+

æ

+

ö+ç ÷+è ø

2

2

3 2 1.

13

.. 0

2

z z

z z

Zeros + +

- +

=

Page 30: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

1

1

2

2

2

-2 4 -12 2 2-1 -1 2

2 2

-2 - 4 -12 2 2-1- -1- 2

... 2 3 0

2 4 12 2 81 2

2 2

2 4 12 2 82

2

2

12

2

Poles

j

z z

j

z j

jz j

p j

jp j

+= = + = +

= =

- + =

+ - += = = +

- - -= = = -

=

Fig 14.9

Page 31: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Poles locations & Stability•All FIR filters are stable• The location of poles plays an important role inthe stability of IIR filters due to recursion

1

0 1 1 1

1

0 1

1

1

( )1

[ ] [ ] [ 1]

,

n n

Consider the s

h n b a u n b a u n

ystem functi

b b zH z

o

z

n

athe impulse response

-

-

-

= +

-

-

+=

Page 32: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

( )( )

( )

1

0

10 1 1 1

1 1

0 1 1 1

10 1 1

[ ]=

0 0 0

1

lim 0

1,

1

n

n

n

n

h n

for nb for n

b b a a fo

Consider the part with n b b a a

le

r n

t b b a

ka a

k

if

-

-

-

®¥

³ +

+

ì <ïï =íï +

=

³ïî

® <

Page 33: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

1

1

1

,

1

lim 1

n

n

It is desirable to have the impulse response die

down as n otherwise an unboun

a implies

d output result

that th

s

even from a few inpu

e pole wi

t samp

ll be inside the unit

ka if

les

a®¥

® ¥ ³

® ¥

<

Thus a causal LTI IIR system with initial res

circle

t conditions

is stable only if all the poles lie inside the unit

in z

c

plane

ircle

-

Page 34: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Unit Circle

|z|=1Re(z)

w

Im(z)

1

ka

stable system

<

1

ka

Unstable system

³

IIR stability: All poles must be inside unit circle

Location of Zeros has nothing to do with stability

Fig 14.10

Page 35: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 1

1

1

1

1

1 2( )

1 0.8

...1 2 0 2.

0.8 1..1 0.8 0 0.

,8

.

zH

Comment on the stability of the IIR filter with transfer functio

z

n

z

zero z z

polinside unit circle

The filter is sta

e z

b e

z

l

-

-

-

-

-=

-

- = Þ =

<

- = Þ =

Fig 14.11

Page 36: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 2

1

1

1

1

1 0.8( )

1

[ ] 2 [ 1]

2

[ ] 0.8 [ 1]

2 1, .

...1 0.8 0 0.8...1 2 0 2

Comment on the stability of the filter with diferrence equatio

zH z

z

n

y n y n x n x n

outside unit circle

The filter is

zero z z

pole z z

-

-

-

-

-=

-

= - + - -

>

- = Þ =

- = Þ =

unstable

Page 37: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 3

[ ]

2

2 2

2 2

2

2

1 2

2

[ ] [ 2] [

... 0 , [0,0]

...

1( )

11

1

1

]

1

0

C

zeros z z

pole

omment on the stability of the feedback system

y n y n x n

H zz

zz

z

zs

zz z

-

-

=+

= =+ +

+

= Þ =

=

= - - +

æ öç ÷è ø

Page 38: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

[ ]1 2

1,

.

1 , [ , ] j on the unit circle

The filte

z p p

r is unsta

j

ble

jÞ = ± - =

=

= -

2nd orderzero

Fig 14.13

Page 39: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 4

1 2

1 2

1 2 2

1 2 2

2

2

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

1 2 3( )

1 2

1 2 3

1 2

2 3

2

]

Comme

z zH z

z

nt on the stability of the feedback system

y n y n y n

z

z z z

x n x n

z z z

z z

z

x

z

n- -

- -

- -

- -

- +=

-

= - - - + - - + -

+

- +=

- +

- +=

- +

æ öç ÷è ø

Page 40: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

2

2

1

2

1

2

... 0

2 4 121 2

2

2 4 121 2

2

... 0

1 1 8 1 7

2 2 2

1 1 8 1

2

7

2 2 2

3

2

zeros

z j

z j

poles

j

z z

z z

p

jp

=

+ -= = +

- -= = -

=

+ -= = +

- -=

+

= -

-

- +

Unstable systemFig 14.14

Page 41: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

Example 5

1 2

1 2

1 2 2

1 2 2

2

2

1 5 6( )

4 2

1 5 6

4 [ ]

4 2

5 6

[ 1] 2 [ 2] [ ] 5 [ 1] 6 [ 2]

4 2

z zH z

z z

z

Comment on the stability of the IIR system

y n y n y n x n x n x n

z z

z z z

z z

z z

- -

- -

- -

- -

- +

= - - -

=-

- +=

-

- +=

- +

+ - - + -

+æ öç ÷+è ø

Page 42: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

[ ]

2

1

2

2

1

2

... 5 6 0, ( 2)( 3) 0

, [2,3]

...4 2 0

1 1 32 1 318 8 8

1 1 32 1 318 0. 7

8 870

Pol

Magnitude of pole

es z

Zeros

z

p j

p j

z z z

z

s

z

z

- + =

+ -= = +

- -= = -

- + = - -

=

=

=

Þ

Stable systemFig 14.15

Page 43: Discrete -Time Signals and Systems Z-Transform & IIR Filters 1

James H. McClellan, Ronald W. Schafer and Mark A. Yoder, “ 8.3, 8.4, and 8.9 “Signal Processing First”, Prentice Hall, 2003

Reference