L04-ztrans

download L04-ztrans

of 36

Transcript of L04-ztrans

  • 8/11/2019 L04-ztrans

    1/36

    2013-10-02Dan Ellis 1

    ELEN E4810: Digital Signal Processing

    Topic 4: The Z Transform

    1. The Z Transform

    2. Inverse Z Transform

  • 8/11/2019 L04-ztrans

    2/36

    2013-10-02Dan Ellis 2

    1.The Z Transform! Powerful tool for analyzing & designing

    DT systems

    ! Generalization of the DTFT:

    !

    zis complex...! z= ej!DTFT

    ! z= rej!

    G(z) = Z g n[ ]{ }= g[n]z!n

    n=!"

    "

    # Z Transform

    g n[ ]r!n

    e!j"n

    n#

    DTFT ofr-ng[n]

  • 8/11/2019 L04-ztrans

    3/36

    2013-10-02Dan Ellis 3

    Region of Convergence (ROC)! Critical question:

    Does summation

    converge(to a finite value)?

    ! In general, depends on the value of z

    ! !Region of Convergence:

    Portion of complexz-plane

    for which a particularG(z)

    will converge

    G(z) = x[n]z!n

    n=!"

    "

    #

    z-plane

    Re{z}

    Im{z}

    ROC|z| > "

    "

  • 8/11/2019 L04-ztrans

    4/36

    2013-10-02Dan Ellis 4

    ROC Example! e.g.x[n] = n[n]

    ! converges onlyfor |z-1| < 1i.e. ROC is |z| > ||

    ! || < 1(e.g. 0.8) - finite energy sequence

    ! || > 1(e.g. 1.2) - divergent sequence,

    infinite energy, DTFT does notexistbut still has ZTwhen |z| > 1.2 (in ROC)

    ! X(z) = "nz#n

    n=0

    $

    % =1

    1# "z#1

    (previous slide)

    n-1 1 2 3 4-2

    M

    when|z-1| < 1

    closed form

    Re{z}

    Im{z}

    "

  • 8/11/2019 L04-ztrans

    5/36

    2013-10-02Dan Ellis 5

    About ROCs! ROCs always defined in terms of |z|

    !circularregions onz-plane

    (inside circles/outside circles/rings)

    ! If ROC includesunit circle(|z| = 1),

    !g[n]has a DTFT

    (finite energysequence)

    z-plane

    Re{z}

    Im{z}

    Unit circlelies in ROC

    !DTFT OK

    1

  • 8/11/2019 L04-ztrans

    6/36

    2013-10-02Dan Ellis 6

    Another ROC example! Anticausal (left-sided) sequence:

    ! SameZT as n[n], differentsequence?

    x n[ ] = !"n!n !1[ ] n-1

    1 2 3 4

    -2-3-4-5

    X z( )=

    !"

    n

    !n !1

    [ ]( )z!n

    n

    #= ! "

    nz

    !n

    n =!$

    !1

    # = ! "!m

    zm

    m=1

    $

    #

    =

    !"!1

    z

    1

    1! "!1z=

    1

    1! "z!1

    ROC:|"| > |z|

  • 8/11/2019 L04-ztrans

    7/36

    2013-10-02Dan Ellis 7

    ROC is necessary!! A closed-form expression for ZT

    mustspecify the ROC:

    x[n] = n[n]

    ROC|z| > ||

    x[n] = -n[-n-1]

    ROC|z| < ||! A single G(z)expression can match

    several sequences with different ROCs

    !X(z) =1

    1" #z"1

    !X(z) =1

    1" #z

    "1

    n-1

    1 2 3 4-2-3-4 z-plane

    Re

    Im

    |"|

    n-1 1 2 3 4-2-3-4

    DTFTs?

  • 8/11/2019 L04-ztrans

    8/36

    2013-10-02Dan Ellis 8

    Rational Z-transforms! G(z)expression can be any function;

    rational polynomialsare importantclass:

    !

    By convention, expressed in terms ofz-1

    matches ZT definition

    ! (Reminiscent of LCCDE expression...)

    G z( ) = P z( )D z( )

    =p0 + p1z!1 +

    + pM!1z!(M!1) + pMz!M

    d0 + d1z!1++ dN!1z

    !(N!1)+ dNz

    !N

  • 8/11/2019 L04-ztrans

    9/36

    2013-10-02Dan Ellis 9

    Factored rational ZTs! Numerator, denominator can be

    factored:

    ! {!}are roots of numerator

    !G(z) = 0!{!}are thezerosofG(z)

    ! {!}are roots of denominator

    !G(z) =#!{!}are the polesofG(z)

    G z( )=

    p0!

    !=1

    M1"#

    !z"1( )

    d0!

    !=1

    N 1" $!z"1( )

    =

    zM

    p0!

    !=1

    Mz "#

    !( )

    zNd0!

    !=1N z " $

    !( )

  • 8/11/2019 L04-ztrans

    10/36

    2013-10-02Dan Ellis 10

    Pole-zero diagram! Can plot poles and zeros on

    complexz-plane:

    ! (Value of) expression determinedby roots

    z-plane

    Re{z}

    Im{z}

    1! o

    o

    o

    o

    !

    !

    poles !

    (cpx conj for real g[n])

    zeros !

  • 8/11/2019 L04-ztrans

    11/36

    2013-10-02Dan Ellis 11

    Z-plane surface! G(z): cpx functionof a cpx variable

    ! Can calculate value over entire z-plane

    M

    ROCnot

    shown!!

  • 8/11/2019 L04-ztrans

    12/36

    2013-10-02Dan Ellis

    1

    0.5

    0

    0.5

    1

    1

    0.5

    0

    0.5

    1

    0

    2

    4

    6

    8

    10

    12

    ROCs and sidedness! Two sequences have:

    ! Each ZT pole!region in ROCoutsideor inside||for R/Lsided term in g[n]

    ! Overall ROC is intersection of each terms

    G(z) = 11! "z

    !1

    z-plane

    |"|

    ROC |z| >||!g[n] = n[n]

    n

    ROC |z|

  • 8/11/2019 L04-ztrans

    13/36

    2013-10-02Dan Ellis 13

    ZT is Linear!

    ! Thus, if

    then

    G(z) = Z g n[ ]{ }= g[n]z

    !n

    "n# Z Transform

    y[n] =!1"1n

    [n]+!2"2n

    [n]

    Y(z) =!

    1

    1# "1z#1+

    !2

    1# "2z#1

    y[n] = g[n]+ h[n]

    Y(z) = (g[n]+h[n])z-n

    =g[n]z-n+ h[n]z-n= G(z)+H(z)

    ROC:

    |z|>|"1|,|"2|

    Linear!

  • 8/11/2019 L04-ztrans

    14/36

    2013-10-02Dan Ellis 14

    G(z) = 11! "

    1z!1

    + 11! "

    2z!1

    ROC intersections

    ! Consider

    with |1| < 1, |2| > 1...

    !

    Two possible sequences for

    1term...

    ! Similarly for 2 ...

    !4 possible g[n]seqs and ROCs ...

    no ROC specified

    1n[n]

    n-

    1n[-n-1]

    nor

    n-2n[-n-1]

    n

    2n[n]or

  • 8/11/2019 L04-ztrans

    15/36

    2013-10-02Dan Ellis 15

    ROC intersections: Case 1

    ROC:|z| >|1| and|z| >|2|

    ImRe

    |"1| |"2|

    Im

    G(z) =1

    1! "1z!1+

    1

    1! "2z!1

    n

    g[n] = 1n[n]+ 2

    n[n]

    both right-sided:

  • 8/11/2019 L04-ztrans

    16/36

    2013-10-02Dan Ellis 16

    ROC intersections: Case 2

    ImRe

    |"1| |"2|

    Im

    G(z) =1

    1! "1z!1+

    1

    1! "2z!1

    n

    g[n] = -1n[-n-1]- 2

    n[-n-1]

    both left-sided:

    ROC:|z|

  • 8/11/2019 L04-ztrans

    17/36

    2013-10-02Dan Ellis 17

    ROC intersections: Case 3

    ROC:|z| >|1| and|z|

  • 8/11/2019 L04-ztrans

    18/36

    2013-10-02Dan Ellis 18

    ROC intersections: Case 4

    ROC:|z| |2| ?

    Re

    |"1| |"2|

    Im

    G(z) =1

    1! "1z!1+

    1

    1! "2z!1

    n

    g[n] = -1n[-n-1]+ 2

    n[n]

    two-sided:

    no ROC...

  • 8/11/2019 L04-ztrans

    19/36

    2013-10-02Dan Ellis 19

    ROC intersections! Note: Two-sided exponential

    ! Nooverlap in ROCs!ZT does not exist(does not converge for anyz)

    g n[ ] =!n

    =!

    n

    n[ ]+!n

    "

    n"1[ ]

    !"< n

  • 8/11/2019 L04-ztrans

    20/36

    2013-10-02Dan Ellis 20

    ZT of LCCDEs! LCCDEs have solutions of form:

    ! Hence ZT

    ! Each terminin g[n] corresponds to a

    poleiof G(z) ... and vice versa

    ! LCCDE solns are right-sided

    ROCs are |z| > |i|

    yc[n]=!i"inn[ ]+...

    Yc z( ) =!

    i

    1" #iz"1 +!

    (sames)

    outsidecircles

  • 8/11/2019 L04-ztrans

    21/36

    2013-10-02Dan Ellis 21

    Z-plane and DTFT! Slice between surfaceand unit cylinder

    (|z| = 1z= ej) is G(ej), the DTFT

    |G(ej

    )|z = ej

    0 / rad/samp

  • 8/11/2019 L04-ztrans

    22/36

    2013-10-02Dan Ellis 22

    Some common Z transforms

    g[n] G(z) ROC [n] 1 !z

    [n] |z|> 1

    n[n] |z|> ||

    rncos(0n)[n] |z|> r

    rnsin(0n)[n] |z|> r

    1

    1!z!1

    11!"z

    !1

    1!rcos "0( )z

    !1

    1!2rcos "0( )z

    !1+r

    2z!2

    rsin !0( )z"1

    1"2rcos !0( )z

    "1+r

    2z"2

    sum ofrnej0n + rne-j0n

    poles atz = rej0!

    !

    conjugate polepair

  • 8/11/2019 L04-ztrans

    23/36

    2013-10-02Dan Ellis 23

    Z Transform properties

    g[n] G(z) w/ROCRg

    Conjugation g*[n] G*(z*) Rg

    Time reversal g[-n]

    G(1/z)

    1/Rg

    Time shift g[n-n0] z-n0G(z) Rg(0/#?)

    Exp. scaling n

    g[n]

    G(z/) ||Rg

    Diff. wrtz ng[n] Rg(0/#?)!zdG(z)

    dz

  • 8/11/2019 L04-ztrans

    24/36

    2013-10-02Dan Ellis 24

    Z Transform properties

    g[n] G(z) ROC

    Convolution g[n] h[n] G(z)H(z)

    Modulation g[n]h[n]

    Parseval:

    "at least

    Rg#Rh

    1

    2!j G v( )H z v( )v

    "1dvC#

    g n[ ]h* n[ ]n=!"

    "

    # = 12$j G v( )H* 1

    v( )v!1

    dvC%

    at least

    RgRh

  • 8/11/2019 L04-ztrans

    25/36

    2013-10-02Dan Ellis 25

    ZT Example! ; can express as

    ! Hence,

    x n[ ] = rn cos !0n( ) n[ ]

    1

    2 n[ ] rej

    !0( )

    n

    + re"j!

    0( )n

    $%

    '( =v n[ ]+ v* n[ ]

    v[n] = 1/2[n]n; = rej0

    !V(z) = 1/(2(1- rej0z-1))ROC:|z| > r

    X z( ) = V z( )+ V* z*( )= 1

    21

    1!re j"0z

    !1+ 1

    1!re! j"0z

    !1( )=

    1!rcos "0( )z

    !1

    1!2rcos "0( )z

    !1+r

    2z!2

  • 8/11/2019 L04-ztrans

    26/36

    2013-10-02Dan Ellis 26

    Another ZT example

    y n[ ] = n +1( )!n n[ ]= x[n]+ nx[n] wherex[n] = n[n]

    X z( ) = 11!"z

    !1

    ! "zdX z( )

    dz

    ="z d

    dz

    1

    1"#z"1

    $

    %&

    '

    () =

    #z"1

    (1"#z"1

    )

    2

    !Y z( ) =1

    1"#z"1+

    #z"1

    (1"#z"1)2=

    1

    (1"#z"1)2

    repeatedroot - IZT

    ( |z| > || )

    ROC |z| > ||

  • 8/11/2019 L04-ztrans

    27/36

    2013-10-02Dan Ellis 27

    2.Inverse Z Transform (IZT)! Forwardztransform was defined as:

    ! 3 approaches to invertingG(z)to g[n]:! Generalization of inverse DTFT! Power series inz(long division)

    ! Manipulate into recognizablepieces (partial fractions)

    G(z) = Z g n[ ]{ }= g[n]z!n

    n=!"

    "

    #

    the usefulone

  • 8/11/2019 L04-ztrans

    28/36

    2013-10-02Dan Ellis 28

    IZT #1: Generalize IDTFT! If then

    !

    so

    ! Any closed contour around origin will do! Cauchy: g[n] = [residues of G(z)zn-1]

    z =re j!

    IDTFTz = rejd= dz/jz

    Counterclockwise

    closed contour at |z| = rwithin ROC

    Re

    Im

    g[n]rn = 12

    G rej

    ejnd

    = 12j

    CG (z) zn1rndz

    G(z) =G(rej) =

    g[n]rnejn = DTFTg[n]rn

  • 8/11/2019 L04-ztrans

    29/36

    2013-10-02Dan Ellis 29

    IZT #2: Long division! Since if we could express G(z)as a simple

    power series G(z) = a+ bz-1+ cz-2...

    then can just read off g[n] = {a, b, c, ...}! Typically G(z)is right-sided (causal)

    and a rational polynomial

    ! Can expand as power series throughlong division of polynomials

    G(z) = g[n]z!nn=!"

    "

    #

    G z( ) =P(z)

    D(z)

  • 8/11/2019 L04-ztrans

    30/36

    2013-10-02Dan Ellis 30

    IZT #2: Long division! Procedure:

    ! Express numerator, denominator in

    descending powers ofz(for a causal fn)

    !

    Find constant to cancel highest term!first term in result

    ! Subtract & repeat !lower terms in result

    !

    Just like long division for base-10numbers

  • 8/11/2019 L04-ztrans

    31/36

    2013-10-02Dan Ellis 31

    IZT #2: Long division

    ! e.g.

    H z( ) = 1+ 2z!1

    1+ 0.4z!1! 0.12z

    !2

    1+ 0.4z!1!0.12z!2

    1+ 2z!1)

    1+1.6z!1! 0.52z

    !2+ 0.4z

    !3...

    1+ 0.4z!1! 0.12z

    !2

    1.6z!1

    + 0.12z!2

    1.6z!1

    + 0.64z!2

    !0.192z

    !3

    !0.52z!2+ 0.192z

    !3

    ...

    Result

  • 8/11/2019 L04-ztrans

    32/36

    2013-10-02Dan Ellis 32

    IZT#3: Partial Fractions! Basic idea: Rearrange G(z)as sumof

    terms recognizedas simple ZTs

    ! especially

    or sin/cos forms

    ! i.e. given products

    rearrange to sums

    1

    1!"z

    !1 # "

    n

    n[ ]

    P(z)

    1!

    "z!1

    ( )1!

    #z!1

    ( )!

    A

    1!"z!1+

    B

    1! #z!1+!

  • 8/11/2019 L04-ztrans

    33/36

    2013-10-02Dan Ellis 33

    Partial Fractions!

    Note that:

    ! Can do the reversei.e.

    go from to

    ! if orderof P(z)is less thanD(z)

    A

    1!"z!1+

    B

    1! #z!1+

    C

    1! $z!1=

    A 1! #z!1( ) 1! $z!1( )+ B 1!"z!1( ) 1! $z!1( )+C1!"z!1( ) 1! #z!1( )1!"z!1( ) 1! #z!1( ) 1! $z!1( )order 3 polynomial

    order 2 polynomial

    u + vz-1 + wz-2

    P(z)

    !!=1N (1" #

    !z"1)

    !!

    1" #!z"

    1!=1

    N

    $else cancelw/ long div.

  • 8/11/2019 L04-ztrans

    34/36

    2013-10-02Dan Ellis 34

    Partial Fractions! Procedure:

    ! where

    i.e. evaluateF(z)at the pole but multipliedby the pole term !dominates = residueof pole

    F(z) =P(z)

    !!=1N

    (1" #!z"1)=

    $!

    1" #!z"1!=1

    N

    %

    !!= 1" #

    !z"1( )F z( ) z=#

    !

    ! f n[ ] = "! #!( )n n[ ]

    !=1

    N

    $

    orderN-1

    (cancels term indenominator)

    no repeatedpoles!

  • 8/11/2019 L04-ztrans

    35/36

    2013-10-02Dan Ellis 35

    Partial Fractions Example! Given (again)

    factor:

    ! where:

    H z( ) =1+ 2

    z

    !1

    1+ 0.4z!1! 0.12z

    !2

    =1+ 2z

    !1

    1+ 0.6z!1( ) 1! 0.2z!1( )=

    "1

    1+ 0.6z!1+

    "2

    1!0.2z!1

    !1 = 1+ 0.6z

    "1

    ( )H z( ) z="0.6 =1+ 2z

    "1

    1" 0.2z"1

    z="0.6

    ="1.75

    !2= 1+ 2z

    "1

    1+ 0.6z"1

    z=0.2

    =2.75

  • 8/11/2019 L04-ztrans

    36/36

    2013 10 02Dan Ellis 36

    Partial Fractions Example

    ! Hence

    ! If we know ROC |z| > || i.e. h[n]causal:

    = 1.75{ 1 -0.6 0.36 -0.216 ...}

    +2.75{ 1 0.2 0.04 0.008 ...}

    = {1 1.6 -0.52 0.4 ...}

    H z( ) = !1.751+ 0.6z

    !1+ 2.75

    1! 0.2z!1

    ! h n[ ] = "1.75( ) "0.6( )n n[ ]+ 2.75( ) 0.2( )

    n n[ ]

    same aslong division!