24
1 EE3054 Signals and Systems Lectures 9 IIR Systems: First Order System Yao Wang Polytechnic University Some slides included are extracted from lecture presentations prepared by McClellan and Schafer 2/29/2008 © 2003, JH McClellan & RW Schafer 2 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 purposes—unless 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

Lectures 9 IIR Systems: First Order System · 2008. 2. 29. · 1 EE3054 Signals and Systems Lectures 9 IIR Systems: First Order System Yao Wang Polytechnic University Some slides

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

  • 1

    EE3054

    Signals and Systems

    Lectures 9

    IIR Systems: First Order System

    Yao Wang

    Polytechnic University

    Some slides included are extracted from lecture presentations prepared by McClellan and Schafer

    2/29/2008 © 2003, JH McClellan & RW Schafer 2

    License Info for SPFirst Slides

    � This work released under a Creative Commons Licensewith 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 purposes—unless 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

  • 2

    FIR system: Review

    � Described by a feedforwarddifference equation

    � Impulse response is finite duration (finite impulse response or FIR)

    � Characterized by impulse response h[n], system function H(z) (Z-transform of h[n]) and frequency response H(e^jw)

    ∑=

    −==

    =

    M

    k

    n

    knxkhnhnxny

    bnh

    0

    ][][][*][][

    ][

    ∑=

    −=M

    k

    k knxbny

    0

    ][][

    )()(][ ω̂jeHzHnh ↔↔

    IIR System: General

    ∑∑==

    −+−=M

    k

    k

    N

    k

    k knxbknyany

    01

    ][][][

    Weighted average of

    input samples

    Weighted average of

    past output samples

    (feedback)

    Still a linear time-invariant system

    Impulse response is infinitely long generally

    Called Infinite Impulse Response (IIR) system

  • 3

    Roadmap

    � First discuss first order system

    � Time domain: output for given input, impulse response

    � Z-domain: transfer function, characterization by poles, how to compute output using Z-domain

    � Frequency response

    � Next discuss second order system

    � Finally to general IIR system

    ∑=

    −+−=M

    k

    k knxbnyany

    0

    1 ][]1[][

    ∑=

    −+−+−=M

    k

    k knxbnyanyany

    0

    21 ][]2[]1[][

    2/29/2008 © 2003, JH McClellan & RW Schafer 6

    ONE FEEDBACK TERM (First

    Order System)

    � CAUSALITY

    � NOT USING FUTURE OUTPUTS or INPUTS

    y[n] = a1y[n −1]+ b0x[n] +b1x[n −1]FIR PART of the FILTER

    FEED-FORWARDPREVIOUS

    FEEDBACK

    � ADD PREVIOUS OUTPUTS

  • 4

    2/29/2008 © 2003, JH McClellan & RW Schafer 7

    FILTER COEFFICIENTS

    � ADD PREVIOUS OUTPUTS

    � MATLAB

    � yy = filter([3,-2],[1,-0.8],xx)

    y[n] = 0.8y[n −1]+ 3x[n] −2x[n −1]

    SIGN CHANGEFEEDBACK COEFFICIENT

    2/29/2008 © 2003, JH McClellan & RW Schafer 8

    COMPUTE OUTPUT

  • 5

    2/29/2008 © 2003, JH McClellan & RW Schafer 9

    COMPUTE y[n]

    � FEEDBACK DIFFERENCE EQUATION:

    y[n] = 0.8y[n −1]+ 5x[n]

    y[0] = 0.8y[−1] + 5x[0]

    � NEED y[-1] to get started

    2/29/2008 © 2003, JH McClellan & RW Schafer 10

    AT REST CONDITION

    � y[n] = 0, for n

  • 6

    2/29/2008 © 2003, JH McClellan & RW Schafer 11

    COMPUTE y[0]

    � THIS STARTS THE RECURSION:

    � SAME with MORE FEEDBACK TERMS

    y[n]= a1y[n −1]+ a2y[n − 2] + bk x[n − k]k=0

    2

    2/29/2008 © 2003, JH McClellan & RW Schafer 12

    COMPUTE MORE y[n]

    � CONTINUE THE RECURSION:

  • 7

    2/29/2008 © 2003, JH McClellan & RW Schafer 13

    PLOT y[n]y[n] has infinite duration!

    Is IIR system LTI?

    � If x[n]=0, y[n]=0 for n

  • 8

    Properties of LTI system:

    Review

    � Any LTI system can be characterized by

    its impulse response h[n]=T(δ[n])

    � Output to any input is related by

    � y[n]=x[n]*h[n]

    2/29/2008 © 2003, JH McClellan & RW Schafer 16

    y[n]= a1y[n −1]+ b0x[n]

    IMPULSE RESPONSE

    u[n] =1, for n ≥ 0

    h[n]= a1h[n −1]+ b0δ[n]

    ][)(][ 10 nuabnhn=

    h[n] has infinite duration!

  • 9

    2/29/2008 © 2003, JH McClellan & RW Schafer 17

    PLOT IMPULSE RESPONSE

    h[n] = b0 (a1)nu[n] = 3(0.8)nu[n]

    � Show that for the example system� y[n]=0.8 y[n-1] + 5 x[n]

    y[n] = x[n]* h[n] yields same result as the direct computation using recursion

    h[n]=5 * 0.8^n u[n]

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

    By linearity and time invariance:

    y[n] = 2 h[n] – 3 h[n-1] + 2 h[n-3]

  • 10

    � When x[n] and h[n] are both infinite duration,

    numerical computation of convolution is

    generally infeasible.

    � But we can still use the recursion based on the

    difference equation, although this is tedious.

    � Z-transform comes to rescue!

    � Y(z)= X(z) H(z)

    � Determine H(z), X(z), Y(z)

    � From Y(z), determine y[n] (inverse Z-transform)

    2/29/2008 © 2003, JH McClellan & RW Schafer 20

    CONVOLUTION PROPERTY

    � MULTIPLICATION of z-TRANSFORMS

    � CONVOLUTION in TIME-DOMAIN

    Y (z) = H(z)X(z)X(z)

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

    H(z)

    IMPULSE

    RESPONSE

  • 11

    2/29/2008 © 2003, JH McClellan & RW Schafer 21

    System Function of First

    Order System

    � Impulse response:

    � Infinite duration!

    � Z-transform (System

    Function) H(z) = h[n]z−n

    n=−∞

    ∑∑∞

    =

    −−∞

    −∞=

    ==0

    1010 ][)()(n

    nnn

    n

    n zabznuabzH

    ][)(][ 10 nuabnhn=

    2/29/2008 © 2003, JH McClellan & RW Schafer 22

    Derivation of H(z)

    � Recall Sum of Geometric Sequence:

    � Yields a COMPACT FORMrn

    n=0

    ∑ =1

    1− r

    11

    1

    0

    0

    1

    10

    0

    10

    if1

    )()(

    azza

    b

    zabzabzHn

    n

    n

    nn

    >−

    =

    ==

    =

    −∞

    =

    − ∑∑If |r|

  • 12

    2/29/2008 © 2003, JH McClellan & RW Schafer 23

    Recap:

    � FIRST-ORDER IIR FILTER:

    y[n]= a1y[n −1]+ b0x[n]

    H(z) =b0

    1− a1z−1

    ][)(][ 10 nuabnhn=

    Transform pair

    2/29/2008 © 2003, JH McClellan & RW Schafer 24

    Another first order system

    y[n] = a1y[n −1]+ b0x[n] +b1x[n−1]

    H(z)=b0

    1− a1z−1 +

    b1z−1

    1− a1z−1 =

    b0 + b1z−1

    1 − a1z−1

    ]1[)(][)(][ 11110 −+=− nuabnuabnh nn

    shifta is1−z

  • 13

    Can we determine H(z) more

    easily

    � Can we determine H(z) w/o determining

    h[n] first?

    � YES: by apply Z-transform to the

    difference equation!

    2/29/2008 © 2003, JH McClellan & RW Schafer 26

    DELAY PROPERTY of X(z)

    � DELAY in TIMEMultiply X(z) by z-1

    x[n]↔ X(z)

    x[n −1]↔ z −1X(z)

    Proof: x[n −1]z −n

    n= −∞

    ∑ = x[ℓ]z− (ℓ+1)ℓ=−∞

    = z−1 x[ℓ]z −ℓ

    ℓ= −∞

    ∑ = z−1X(z)

  • 14

    2/29/2008 © 2003, JH McClellan & RW Schafer 27

    y[n] = a1y[n −1]+ b0x[n] +b1x[n −1]

    Z-Transform of IIR Filter

    � DERIVE the SYSTEM FUNCTION H(z)

    � Use DELAYDELAY PROPERTY

    � Apply transform on both sides

    Y (z) = a1z−1Y(z) + b0X(z) + b1z

    −1X(z)

    2/29/2008 © 2003, JH McClellan & RW Schafer 28

    H(z)=Y (z)

    X(z)=b0 +b1z

    −1

    1− a1z−1 =

    B(z)

    A(z)

    Y (z) − a1z−1Y(z) = b0X(z) + b1z

    −1X(z)

    (1 − a1z−1)Y (z) = (b0 + b1z

    −1)X(z)

    Y (z) = a1z−1Y(z) + b0X(z) + b1z

    −1X(z)

  • 15

    2/29/2008 © 2003, JH McClellan & RW Schafer 29

    Example

    � DIFFERENCE EQUATION:

    �� READREAD the FILTER COEFFS:

    y[n] = 0.8y[n −1]+ 3x[n] −2x[n −1]

    )(8.01

    23)(

    1

    1

    zXz

    zzY

    −=

    H(z)

    2/29/2008 © 2003, JH McClellan & RW Schafer 30

    POLES & ZEROS

    � ROOTS of Numerator & Denominator

    POLE: H(z) ���� inf

    ZERO:

    H(z)=0

    H(z) =b0 + b1z

    −1

    1 − a1z−1 → H (z) =

    b0z + b1z − a1

    b0z + b1 = 0 ⇒ z = −b1

    b0

    z − a1 = 0 ⇒ z = a1

  • 16

    2/29/2008 © 2003, JH McClellan & RW Schafer 31

    EXAMPLE: Poles & Zeros

    � VALUE of H(z) at POLES is INFINITEINFINITE

    POLE at z=0.8

    ZERO at z= -1

    ∞→=−

    +=

    =−−

    −+=

    +=

    0)(8.01

    )(22)(

    0)1(8.01

    )1(22)(

    8.01

    22)(

    29

    1

    54

    1

    54

    1

    1

    zH

    zH

    z

    zzH

    2/29/2008 © 2003, JH McClellan & RW Schafer 32

    POLE-ZERO PLOT

    2 + 2z −1

    1−0.8z−1

    ZERO at z = -1

    POLE at

    z = 0.8

  • 17

    Stability of the System

    � FIRST-ORDER IIR FILTER:

    y[n]= a1y[n −1]+ b0x[n]

    H(z) =b0

    1− a1z−1

    ][)(][ 10 nuabnhn=

    Pole at z=a_1

    When |a_1| < 1

    h[n] = b0 (a1)nu[n] = 3(0.8)nu[n]

  • 18

    When |a_1| >1

    � Show h[n]

    � System produce unbounded output for

    finite input!

    � Unstable!

    � BIBO stability

    � BIBO: bounded input bounded output

    Stability from Pole Location

    � A causal LTI system with initial rest conditions is stable if all of its poles lie strictly inside the unit circle!� Our example is for 1st order system with 1 pole only. Above statement is true for systems of any order, which can be decomposed into sum of first order systems.

    � Zero locations do not affect system stability

    � FIR systems are always stable (poles at zeros only)

  • 19

    2/29/2008 © 2003, JH McClellan & RW Schafer 37

    FREQUENCY RESPONSE

    � SYSTEM FUNCTION: H(z)

    � H(z) has DENOMINATOR

    � FREQUENCY RESPONSE of IIR

    � We have H(z)

    � THREE-DOMAIN APPROACH

    H(ej ?ω ) = H(z ) z = e j ?ω

    h[n]↔ H (z)↔ H(e j?ω )

    2/29/2008 © 2003, JH McClellan & RW Schafer 38

    FREQUENCY RESPONSE

    � EVALUATE on the UNIT CIRCLE

    H(ej ?ω ) = H(z ) z = e j ?ω

  • 20

    2/29/2008 © 2003, JH McClellan & RW Schafer 39

    FREQ. RESPONSE FORMULA

    ω

    ωω

    ˆ

    ˆˆ

    1

    1

    8.01

    22)(

    8.01

    22)(

    j

    jj

    e

    eeH

    z

    zzH

    +=→

    +=

    =2ˆ)( ωjeH ω

    ω

    ω

    ω

    ω

    ω

    ˆ

    ˆ

    ˆ

    ˆ2

    ˆ

    ˆ

    8.01

    22

    8.01

    22

    8.01

    22j

    j

    j

    j

    j

    j

    e

    e

    e

    e

    e

    e

    +⋅

    +=

    +−

    =−−+

    +++−

    ωω

    ωω

    ˆˆ

    ˆˆ

    8.08.064.01

    4444jj

    jj

    ee

    ee

    ω

    ωˆcos6.164.1

    ˆcos88

    +

    ?ˆ@,40004.0

    88)(,0ˆ@2ˆ πωω ω ==

    +== jeH

    2/29/2008 © 2003, JH McClellan & RW Schafer 40

    Frequency Response Plot

    ω

    ωω

    ˆ

    ˆˆ

    8.01

    22)(

    j

    jj

    e

    eeH

    +=

    freqz(b,a)

    b=[2,2]

    a=[1, -0.8]

  • 21

    2/29/2008 © 2003, JH McClellan & RW Schafer 41

    UNIT CIRCLE

    � MAPPING BETWEEN

    z = e j?ω

    z = 1 ↔ ?ω = 0

    z = −1 ↔ ?ω = ±π

    z = ± j ↔ ?ω = ± 12π

    z and ?ω

    2/29/2008 © 2003, JH McClellan & RW Schafer 42

    SINUSOIDAL RESPONSE

    � x[n] = SINUSOID => y[n] is SINUSOID

    � Get MAGNITUDE & PHASE from H(z)

    ω

    ω

    ωω

    ω

    ˆ)()( where

    )(][ then

    ][ if

    ˆ

    ˆˆ

    ˆ

    jez

    j

    njj

    nj

    zHeH

    eeHny

    enx

    ==

    =

    =

  • 22

    2/29/2008 © 2003, JH McClellan & RW Schafer 43

    POP QUIZ

    � Given:

    � Find the Impulse Response, h[n]

    � Find the output, y[n]

    � Whenx[n] = cos(0.25πn)

    H(z) =2 + 2z−1

    1− 0.8z −1

    2/29/2008 © 2003, JH McClellan & RW Schafer 44

    Evaluate FREQ. RESPONSE

    2 + 2z−1

    1 − 0.8z −1at ?ω = 0.25π

    zero at ω=πω=πω=πω=π?ω = 0.25π

    0ˆ is 1 == ωz

  • 23

    2/29/2008 © 2003, JH McClellan & RW Schafer 45

    POP QUIZ: Eval Freq. Resp.

    � Given:

    � Find output, y[n],

    when

    � Evaluate at

    x[n] = cos(0.25πn)

    H(z) =2 + 2z−1

    1− 0.8z −1

    z = e j0.25π

    y[n]= 5.182cos(0.25πn − 0.417π )

    309.1

    25.0

    22

    22

    182.58.01

    )(22)(

    j

    je

    e

    jzH

    −=

    −+=

    π

    2/29/2008 © 2003, JH McClellan & RW Schafer 46

    THREE DOMAINS

    Use H(z) to get

    Freq. Response

    z = e j?ω

  • 24

    READING ASSIGNMENTS

    � This lecture focuses on First Order

    System

    � Chapter 8, Sects. 8-1, 8-2, 8-3, 8-4, 8-5

    � 8-3.2 Block diagram structure: study by

    yourself

    � 8-5: Frequency response of first order

    system: study by yourself (Slides 36-45)